@fungi.computer/oyster 0.57.0 → 0.57.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-computer-source.js +1 -1
- package/dist/boot-host-script.js +1 -1
- package/dist/credential-migration-002.js +6 -1
- package/dist/embed-metafiles.js +2 -2
- package/dist/embed-scripts.js +2 -2
- package/dist/git.d.ts +8 -2
- package/dist/git.js +12 -3
- package/dist/hello-app-script.js +1 -1
- package/dist/host-page-assets.js +1 -1
- package/dist/host-page.d.ts +4 -1
- package/dist/host-page.js +40 -11
- package/dist/host.d.ts +6 -0
- package/dist/host.js +57 -7
- package/dist/page/port-preview.d.ts +1 -0
- package/dist/page/port-preview.js +33 -0
- package/dist/page-script.js +3 -3
- package/dist/platform-skills.generated.d.ts +1 -1
- package/dist/platform-skills.generated.js +1 -1
- package/dist/port-preview-entry.d.ts +84 -0
- package/dist/port-preview-entry.js +86 -0
- package/dist/standalone/computer.d.ts +2 -3
- package/dist/standalone/computer.js +13 -9
- package/dist/standalone/preview.d.ts +9 -4
- package/dist/standalone/preview.js +35 -44
- package/dist/standalone/worker.js +3 -0
- package/dist/storage-frame.d.ts +3 -3
- package/dist/webhook-delivery.d.ts +1 -0
- package/dist/webhook-delivery.js +1 -1
- package/dist/workers-git.d.ts +19 -0
- package/dist/workers-git.js +98 -5
- package/docs/api/README.md +9 -0
- package/docs/api/git.md +13 -7
- package/docs/api/host.md +1 -0
- package/docs/api/workers-git.md +50 -0
- package/docs/api/workers.md +17 -16
- package/package.json +13 -13
|
@@ -11,7 +11,7 @@ async function migrateTable(store, sealer, step) {
|
|
|
11
11
|
throw new Error("Invalid table name");
|
|
12
12
|
if (!step.plaintext(columnsOf(store, step.table)))
|
|
13
13
|
return;
|
|
14
|
-
const rows = Schema.decodeUnknownSync(Schema.Array(rowSchema))(store.sql.exec(`SELECT * FROM ${step.table}`).toArray());
|
|
14
|
+
const rows = Schema.decodeUnknownSync(Schema.Array(rowSchema))(store.sql.exec(`SELECT * FROM ${step.table} ORDER BY rowid`).toArray());
|
|
15
15
|
// No keyring: plaintext rows stay closed to every reader until one exists.
|
|
16
16
|
if (rows.length !== 0 && sealer === undefined)
|
|
17
17
|
throw new CredentialError("unavailable");
|
|
@@ -26,6 +26,11 @@ async function migrateTable(store, sealer, step) {
|
|
|
26
26
|
// A concurrent attempt already finished; its rows are the current ones.
|
|
27
27
|
if (!step.plaintext(columnsOf(store, step.table)))
|
|
28
28
|
return;
|
|
29
|
+
// Sealing yields to other owner requests. Never copy a stale snapshot over
|
|
30
|
+
// a removal or update; leave the current table intact for the next retry.
|
|
31
|
+
const current = Schema.decodeUnknownSync(Schema.Array(rowSchema))(store.sql.exec(`SELECT * FROM ${step.table} ORDER BY rowid`).toArray());
|
|
32
|
+
if (JSON.stringify(current) !== JSON.stringify(rows))
|
|
33
|
+
throw new CredentialError("unavailable");
|
|
29
34
|
store.sql.exec(`ALTER TABLE ${step.table} RENAME TO ${legacy}`);
|
|
30
35
|
step.ensure(store.sql);
|
|
31
36
|
for (const values of sealed) {
|