@seedprotocol/sdk 0.7.9 → 0.7.10-next.1344.g3828e8a
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/README.md +1 -1
- package/dist/{BaseFileManager-BAlySv8w.js → BaseFileManager-DLou1TZS.js} +5 -1
- package/dist/BaseFileManager-DLou1TZS.js.map +1 -0
- package/dist/{Item-Bf4kWKpH.js → Item-CXLcIHsi.js} +559 -346
- package/dist/Item-CXLcIHsi.js.map +1 -0
- package/dist/{ModelProperty-BlaEgb_U.js → ModelProperty-B3mfR6u4.js} +35 -35
- package/dist/{ModelProperty-BlaEgb_U.js.map → ModelProperty-B3mfR6u4.js.map} +1 -1
- package/dist/{Schema-J_1f6p0c.js → Schema-BeUyEmte.js} +18 -18
- package/dist/{Schema-J_1f6p0c.js.map → Schema-BeUyEmte.js.map} +1 -1
- package/dist/{SchemaValidationService-CnmKyzR-.js → SchemaValidationService-C1xqJFxI.js} +5 -5
- package/dist/{SchemaValidationService-CnmKyzR-.js.map → SchemaValidationService-C1xqJFxI.js.map} +1 -1
- package/dist/{errors-C1qUEZ7A.js → browserSupport-C64rX-2I.js} +38 -2
- package/dist/browserSupport-C64rX-2I.js.map +1 -0
- package/dist/{configurePlatform-CiOJ1R3q.js → configurePlatform-WkmvqeTO.js} +2 -2
- package/dist/{configurePlatform-CiOJ1R3q.js.map → configurePlatform-WkmvqeTO.js.map} +1 -1
- package/dist/{detachRowsBeforeDelete-sEaUwlOU.js → detachRowsBeforeDelete-BZr_0iZU.js} +2 -2
- package/dist/{detachRowsBeforeDelete-sEaUwlOU.js.map → detachRowsBeforeDelete-BZr_0iZU.js.map} +1 -1
- package/dist/dist/{BaseFileManager-BAlySv8w.d.ts → BaseFileManager-DLou1TZS.d.ts} +3 -1
- package/dist/dist/BaseFileManager-DLou1TZS.d.ts.map +1 -0
- package/dist/dist/{configurePlatform-CiOJ1R3q.d.ts → configurePlatform-WkmvqeTO.d.ts} +1 -1
- package/dist/dist/configurePlatform-WkmvqeTO.d.ts.map +1 -0
- package/dist/dist/{index-D0V-mjCV.d.ts → index-BjWk0x4-.d.ts} +1 -1
- package/dist/dist/{index-D0V-mjCV.d.ts.map → index-BjWk0x4-.d.ts.map} +1 -1
- package/dist/dist/{index.node-CYPemH-t.d.ts → index.node-BfiBriEq.d.ts} +7 -1
- package/dist/dist/{index.node-CYPemH-t.d.ts.map → index.node-BfiBriEq.d.ts.map} +1 -1
- package/dist/dist/platform.node.d.ts +2 -2
- package/dist/{eas-wB_fQ8Tc.js → eas-DpHg66jR.js} +5 -5
- package/dist/{eas-wB_fQ8Tc.js.map → eas-DpHg66jR.js.map} +1 -1
- package/dist/{errors-DLSoqSHG.js → errors-DpC9W4i3.js} +84 -45
- package/dist/{errors-DLSoqSHG.js.map → errors-DpC9W4i3.js.map} +1 -1
- package/dist/{getPublishPayload-BnIwpwz1.js → getPublishPayload-yidQCgY_.js} +8 -8
- package/dist/{getPublishPayload-BnIwpwz1.js.map → getPublishPayload-yidQCgY_.js.map} +1 -1
- package/dist/{getPublishPendingDiff-D6_-A5ns.js → getPublishPendingDiff-D__9bh6d.js} +7 -7
- package/dist/{getPublishPendingDiff-D6_-A5ns.js.map → getPublishPendingDiff-D__9bh6d.js.map} +1 -1
- package/dist/{getPublishUploads-sS6JfPgz.js → getPublishUploads-BdZmYCo2.js} +7 -7
- package/dist/{getPublishUploads-sS6JfPgz.js.map → getPublishUploads-BdZmYCo2.js.map} +1 -1
- package/dist/{index-CYGWPoOx.js → index-BMHqJ4kN.js} +7 -7
- package/dist/index-BMHqJ4kN.js.map +1 -0
- package/dist/{index-D0V-mjCV.js → index-BjWk0x4-.js} +2 -2
- package/dist/index-BjWk0x4-.js.map +1 -0
- package/dist/{index-DmTtj1nk.js → index-CVYB2g7a.js} +402 -20
- package/dist/index-CVYB2g7a.js.map +1 -0
- package/dist/{index-BVBmz_cc.js → index-uDLe9y9H.js} +7 -7
- package/dist/index-uDLe9y9H.js.map +1 -0
- package/dist/{index.browser-CUmBVYen.js → index.browser-OACFlpMH.js} +46 -10
- package/dist/index.browser-OACFlpMH.js.map +1 -0
- package/dist/{index.node-CYPemH-t.js → index.node-BfiBriEq.js} +31 -4
- package/dist/index.node-BfiBriEq.js.map +1 -0
- package/dist/main.js +17 -16
- package/dist/main.js.map +1 -1
- package/dist/{modelPropertyRecordSchemas-C7UgA5TH.js → modelPropertyRecordSchemas-BGvtTyaG.js} +5 -5
- package/dist/{modelPropertyRecordSchemas-C7UgA5TH.js.map → modelPropertyRecordSchemas-BGvtTyaG.js.map} +1 -1
- package/dist/node.js +8 -8
- package/dist/platform.browser.js +6 -6
- package/dist/platform.node.js +4 -4
- package/dist/{property-BxUYznH0.js → property-QjljUeb9.js} +8 -8
- package/dist/{property-BxUYznH0.js.map → property-QjljUeb9.js.map} +1 -1
- package/dist/{publishGraph-EcB40Uii.js → publishGraph-CP8IROkb.js} +5 -5
- package/dist/{publishGraph-EcB40Uii.js.map → publishGraph-CP8IROkb.js.map} +1 -1
- package/dist/{readHtmlBodyForStorageSeed-D6KPtWoR.js → readHtmlBodyForStorageSeed-D3OPk2iU.js} +10 -10
- package/dist/{readHtmlBodyForStorageSeed-D6KPtWoR.js.map → readHtmlBodyForStorageSeed-D3OPk2iU.js.map} +1 -1
- package/dist/src/Item/Item.d.ts +26 -5
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts +20 -5
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/loadProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/propertyWrite.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts.map +1 -1
- package/dist/src/archive/exportArchive.d.ts +57 -0
- package/dist/src/archive/exportArchive.d.ts.map +1 -0
- package/dist/src/browser/db/Db.d.ts +5 -0
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/browser/helpers/FileManager.d.ts.map +1 -1
- package/dist/src/browser/helpers/tolerantWebAccess.d.ts +12 -1
- package/dist/src/browser/helpers/tolerantWebAccess.d.ts.map +1 -1
- package/dist/src/client/ClientManager.d.ts +14 -4
- package/dist/src/client/ClientManager.d.ts.map +1 -1
- package/dist/src/db/Db/BaseDb.d.ts +2 -0
- package/dist/src/db/Db/BaseDb.d.ts.map +1 -1
- package/dist/src/helpers/FileManager/errors.d.ts +11 -0
- package/dist/src/helpers/FileManager/errors.d.ts.map +1 -1
- package/dist/src/helpers/browserSupport.d.ts +23 -0
- package/dist/src/helpers/browserSupport.d.ts.map +1 -0
- package/dist/src/helpers/cachedPropertyRefresh.d.ts +6 -6
- package/dist/src/helpers/cachedPropertyRefresh.d.ts.map +1 -1
- package/dist/src/helpers/entity/entityCache.d.ts +34 -3
- package/dist/src/helpers/entity/entityCache.d.ts.map +1 -1
- package/dist/src/helpers/entity/entityLifecycle.d.ts +21 -3
- package/dist/src/helpers/entity/entityLifecycle.d.ts.map +1 -1
- package/dist/src/helpers/propertyDefinition.d.ts +2 -0
- package/dist/src/helpers/propertyDefinition.d.ts.map +1 -1
- package/dist/src/helpers/tabCoordinator.d.ts +9 -2
- package/dist/src/helpers/tabCoordinator.d.ts.map +1 -1
- package/dist/src/index.d.ts +4 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/IDb.d.ts +6 -0
- package/dist/src/interfaces/IDb.d.ts.map +1 -1
- package/dist/src/node/db/Db.d.ts +6 -0
- package/dist/src/node/db/Db.d.ts.map +1 -1
- package/dist/src/outbox/conflicts.d.ts.map +1 -1
- package/dist/src/outbox/outbox.d.ts +6 -0
- package/dist/src/outbox/outbox.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +16 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/{syncDbWithEas-CA7PvBgu.js → syncDbWithEas-CDjSNrVR.js} +14 -14
- package/dist/{syncDbWithEas-CA7PvBgu.js.map → syncDbWithEas-CDjSNrVR.js.map} +1 -1
- package/dist/{tabEvents-CaVmngqr.js → tabEvents-BHPY5I08.js} +38 -12
- package/dist/tabEvents-BHPY5I08.js.map +1 -0
- package/dist/{tolerantWebAccess-BJqViq08.js → tolerantWebAccess-hDq9ZGXH.js} +53 -13
- package/dist/tolerantWebAccess-hDq9ZGXH.js.map +1 -0
- package/dist/{updateSeedRevokedAt-BL9Bg-G7.js → updateSeedRevokedAt-BMwBnlnC.js} +3 -3
- package/dist/{updateSeedRevokedAt-BL9Bg-G7.js.map → updateSeedRevokedAt-BMwBnlnC.js.map} +1 -1
- package/package.json +10 -12
- package/dist/BaseFileManager-BAlySv8w.js.map +0 -1
- package/dist/Item-Bf4kWKpH.js.map +0 -1
- package/dist/dist/BaseFileManager-BAlySv8w.d.ts.map +0 -1
- package/dist/dist/configurePlatform-CiOJ1R3q.d.ts.map +0 -1
- package/dist/errors-C1qUEZ7A.js.map +0 -1
- package/dist/index-BVBmz_cc.js.map +0 -1
- package/dist/index-CYGWPoOx.js.map +0 -1
- package/dist/index-D0V-mjCV.js.map +0 -1
- package/dist/index-DmTtj1nk.js.map +0 -1
- package/dist/index.browser-CUmBVYen.js.map +0 -1
- package/dist/index.node-CYPemH-t.js.map +0 -1
- package/dist/tabEvents-CaVmngqr.js.map +0 -1
- package/dist/tolerantWebAccess-BJqViq08.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { setup, assign, createActor } from 'xstate';
|
|
2
|
-
import { T as applyContextUpdate, U as isInternalUpdate, V as evictionLog, W as holdChild, X as isEntityTornDown, Y as sameEntity, Z as DEFAULT_READY_TIMEOUT_MS, _ as waitForEntityReady, $ as createReactiveProxy, a0 as runEntityLoad, a1 as evictEntities, a2 as entityStatus, a3 as releaseEntity, a4 as destroyEntity, a5 as EntityCache } from './Item-
|
|
3
|
-
import { SchemaValidationService } from './SchemaValidationService-
|
|
4
|
-
import { m as listLatestSchemaFiles, n as readSchemaFile, o as applySchemaFile, p as resolveSchemaRow, S as SCHEMA_FILE_FORMAT, q as loadAllSchemasFromDb, M as Model, u as getDraftSaveError, C as ConflictError, w as writeNextSchemaVersion, v as queueDraftSave, x as setupEntityLiveQuery, y as mergeSchemaFiles, z as trackDraftSave } from './errors-
|
|
5
|
-
import { B as BaseDb, t as schemas, d as models, j as modelSchemas, l as properties, w as BaseFileManager } from './BaseFileManager-
|
|
2
|
+
import { T as applyContextUpdate, U as isInternalUpdate, V as evictionLog, W as holdChild, X as isEntityTornDown, Y as sameEntity, Z as DEFAULT_READY_TIMEOUT_MS, _ as waitForEntityReady, $ as createReactiveProxy, a0 as runEntityLoad, a1 as evictEntities, a2 as entityStatus, a3 as releaseEntity, a4 as destroyEntity, a5 as EntityCache } from './Item-CXLcIHsi.js';
|
|
3
|
+
import { SchemaValidationService } from './SchemaValidationService-C1xqJFxI.js';
|
|
4
|
+
import { m as listLatestSchemaFiles, n as readSchemaFile, o as applySchemaFile, p as resolveSchemaRow, S as SCHEMA_FILE_FORMAT, q as loadAllSchemasFromDb, M as Model, u as getDraftSaveError, C as ConflictError, w as writeNextSchemaVersion, v as queueDraftSave, x as setupEntityLiveQuery, y as mergeSchemaFiles, z as trackDraftSave } from './errors-DpC9W4i3.js';
|
|
5
|
+
import { B as BaseDb, t as schemas, d as models, j as modelSchemas, l as properties, w as BaseFileManager } from './BaseFileManager-DLou1TZS.js';
|
|
6
6
|
import { eq, desc, and, inArray } from 'drizzle-orm';
|
|
7
|
-
import { S as SEED_PROTOCOL_SCHEMA_NAME, I as INTERNAL_SCHEMA_IDS, m as generateId, o as addSchemaToDb, p as isInternalSchema, q as inDefinitionsTransaction, s as isClientReady, u as upsertSchemaRow, t as broadcastSchemasInvalidate } from './tabEvents-
|
|
7
|
+
import { S as SEED_PROTOCOL_SCHEMA_NAME, I as INTERNAL_SCHEMA_IDS, m as generateId, o as addSchemaToDb, p as isInternalSchema, q as inDefinitionsTransaction, s as isClientReady, u as upsertSchemaRow, t as broadcastSchemasInvalidate } from './tabEvents-BHPY5I08.js';
|
|
8
8
|
import '@seedprotocol/arweave';
|
|
9
9
|
import 'pluralize';
|
|
10
10
|
import '@seedprotocol/eas';
|
|
@@ -196,7 +196,7 @@ const createModelInstances = async (modelIds, since, owner) => {
|
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
198
|
try {
|
|
199
|
-
const _mod_0 = await import('./errors-
|
|
199
|
+
const _mod_0 = await import('./errors-DpC9W4i3.js');
|
|
200
200
|
const _ns_0 = _mod_0.a4;
|
|
201
201
|
const mod = _ns_0;
|
|
202
202
|
const Model = mod?.Model ?? mod?.default;
|
|
@@ -248,7 +248,7 @@ const findSchemaRow = async (db, schemaName) => {
|
|
|
248
248
|
*/
|
|
249
249
|
const createSchema = async (schemaName) => {
|
|
250
250
|
if (schemaName === SEED_PROTOCOL_SCHEMA_NAME) {
|
|
251
|
-
const _mod_1 = await import('./errors-
|
|
251
|
+
const _mod_1 = await import('./errors-DpC9W4i3.js');
|
|
252
252
|
const _ns_1 = _mod_1.a6;
|
|
253
253
|
const internalSchema = _ns_1;
|
|
254
254
|
const { schemaFile, schemaRecord } = await applySchemaFile(internalSchema.default, {
|
|
@@ -874,8 +874,8 @@ class Schema {
|
|
|
874
874
|
*/
|
|
875
875
|
async _buildModelsFromInstances() {
|
|
876
876
|
const context = this._getSnapshotContext();
|
|
877
|
-
const _mod_2 = await import('./index-
|
|
878
|
-
const _ns_2 = _mod_2.
|
|
877
|
+
const _mod_2 = await import('./index-CVYB2g7a.js');
|
|
878
|
+
const _ns_2 = _mod_2.k;
|
|
879
879
|
const { convertPropertyToSchemaUpdate } = _ns_2;
|
|
880
880
|
const models = {};
|
|
881
881
|
for (const modelInstance of this.models) {
|
|
@@ -890,7 +890,7 @@ class Schema {
|
|
|
890
890
|
const modelDbId = modelInstance.getService().getSnapshot().context._dbId;
|
|
891
891
|
const db = BaseDb.getAppDb();
|
|
892
892
|
if (propertyContexts.length === 0 && modelDbId && db) {
|
|
893
|
-
const { ModelProperty } = await import('./ModelProperty-
|
|
893
|
+
const { ModelProperty } = await import('./ModelProperty-B3mfR6u4.js');
|
|
894
894
|
const rows = await db.select().from(properties).where(eq(properties.modelId, modelDbId));
|
|
895
895
|
propertyContexts = rows.map((row) => {
|
|
896
896
|
const cached = row.schemaFileId ? ModelProperty.getById(row.schemaFileId) : undefined;
|
|
@@ -1019,7 +1019,7 @@ class Schema {
|
|
|
1019
1019
|
});
|
|
1020
1020
|
// Clear edited flags on the cached ModelProperty instances of the edited keys, then on the rows
|
|
1021
1021
|
// (schema, those properties, the schema's models) in one transaction.
|
|
1022
|
-
const { ModelProperty } = await import('./ModelProperty-
|
|
1022
|
+
const { ModelProperty } = await import('./ModelProperty-B3mfR6u4.js');
|
|
1023
1023
|
const thisSchemaName = this.schemaName;
|
|
1024
1024
|
const clearedKeys = [];
|
|
1025
1025
|
for (const propertyKey of context._editedProperties) {
|
|
@@ -1038,8 +1038,8 @@ class Schema {
|
|
|
1038
1038
|
cachedInstance.getService().send({ type: 'clearEdited' });
|
|
1039
1039
|
clearedKeys.push({ modelName, propertyName });
|
|
1040
1040
|
}
|
|
1041
|
-
const _mod_3 = await import('./tabEvents-
|
|
1042
|
-
const _ns_3 = _mod_3.
|
|
1041
|
+
const _mod_3 = await import('./tabEvents-BHPY5I08.js');
|
|
1042
|
+
const _ns_3 = _mod_3.bh;
|
|
1043
1043
|
const { resolveModelRecord } = _ns_3;
|
|
1044
1044
|
await inDefinitionsTransaction(async (tx) => {
|
|
1045
1045
|
await tx
|
|
@@ -1315,10 +1315,10 @@ class Schema {
|
|
|
1315
1315
|
// instances too, or a re-import would get them back with dangling _dbIds.
|
|
1316
1316
|
if (schemaName) {
|
|
1317
1317
|
const evictedModelNames = Model.evictForSchema(schemaName);
|
|
1318
|
-
const { ModelProperty } = await import('./ModelProperty-
|
|
1318
|
+
const { ModelProperty } = await import('./ModelProperty-B3mfR6u4.js');
|
|
1319
1319
|
ModelProperty.evictForModels(evictedModelNames, schemaName);
|
|
1320
1320
|
// Evicting stops new writes but not ones already running; let those land before deleting their rows
|
|
1321
|
-
const _mod_4 = await import('./errors-
|
|
1321
|
+
const _mod_4 = await import('./errors-DpC9W4i3.js');
|
|
1322
1322
|
const _ns_4 = _mod_4.a3;
|
|
1323
1323
|
const { waitForInFlightWrites } = _ns_4;
|
|
1324
1324
|
await waitForInFlightWrites();
|
|
@@ -1327,7 +1327,7 @@ class Schema {
|
|
|
1327
1327
|
const db = BaseDb.getAppDb();
|
|
1328
1328
|
if (!db || !schemaFileId)
|
|
1329
1329
|
return;
|
|
1330
|
-
const { detachModelRows } = await import('./detachRowsBeforeDelete-
|
|
1330
|
+
const { detachModelRows } = await import('./detachRowsBeforeDelete-BZr_0iZU.js');
|
|
1331
1331
|
// The schema's rows go together or not at all
|
|
1332
1332
|
const deleted = await inDefinitionsTransaction(async (tx) => {
|
|
1333
1333
|
const schemaRecords = await tx
|
|
@@ -1368,7 +1368,7 @@ class Schema {
|
|
|
1368
1368
|
// the destroyed schema back on the next Schema.all().
|
|
1369
1369
|
// Match on name as well as id: versions imported from complete schema files can each
|
|
1370
1370
|
// have their own id, and any version left behind would bring the schema back.
|
|
1371
|
-
const _mod_5 = await import('./errors-
|
|
1371
|
+
const _mod_5 = await import('./errors-DpC9W4i3.js');
|
|
1372
1372
|
const _ns_5 = _mod_5.a5;
|
|
1373
1373
|
const { listCompleteSchemaFiles } = _ns_5;
|
|
1374
1374
|
const files = await listCompleteSchemaFiles().catch(() => []);
|
|
@@ -1453,4 +1453,4 @@ var Schema$1 = /*#__PURE__*/Object.freeze({
|
|
|
1453
1453
|
});
|
|
1454
1454
|
|
|
1455
1455
|
export { Schema as S, Schema$1 as a, schemaMachine as s };
|
|
1456
|
-
//# sourceMappingURL=Schema-
|
|
1456
|
+
//# sourceMappingURL=Schema-BeUyEmte.js.map
|