MCPcopy
hub / github.com/audreyt/ethercalc / push

Method push

packages/client-multi/src/Foldr.ts:133–145  ·  view source on GitHub ↗

Append a new row (writes to server, then pushes locally).

(row: FoldrRow)

Source from the content-addressed store, hash-verified

131
132 /** Append a new row (writes to server, then pushes locally). */
133 async push(row: FoldrRow): Promise<this> {
134 await this.initIfNeeded(row);
135 const res = await this.postCsv(row.link, row.title);
136 const command = extractCommand(res);
137 if (typeof command === 'string') {
138 const m = /paste A(\d+) all/.exec(command);
139 if (m) {
140 row.row = parseInt(m[1] as string, 10);
141 }
142 }
143 this.rows.push(row);
144 return this;
145 }
146
147 /**
148 * Update a row in-place. When `title` is set, dispatches a

Callers 15

fetchMethod · 0.95
main.jsFile · 0.80
fn$Function · 0.80
eqFunction · 0.80
sc.jsFile · 0.80
player.jsFile · 0.80
addEventListenerMethod · 0.80
sendMethod · 0.80
factoryFunction · 0.80
setTimeoutFnFunction · 0.80
boot.test.tsFile · 0.80
bFunction · 0.80

Calls 3

initIfNeededMethod · 0.95
postCsvMethod · 0.95
extractCommandFunction · 0.85

Tested by 15

bFunction · 0.64
factoryFunction · 0.64
makeDepsFunction · 0.64
putSnapshotMethod · 0.64
putLogMethod · 0.64
putAuditMethod · 0.64
putChatMethod · 0.64
putEcellMethod · 0.64
setRoomIndexMethod · 0.64
withObserverFunction · 0.64
makeSocketFunction · 0.64
collectFunction · 0.64