@seedprotocol/sdk 0.7.8-next.1071.g2a141c1 → 0.7.8
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/{ClientManager-Bv15o3Oz.js → ClientManager-B1r_8P5Z.js} +37 -40
- package/dist/ClientManager-B1r_8P5Z.js.map +1 -0
- package/dist/{Item-tX3kpbj4.js → Item-CjTEShfk.js} +384 -399
- package/dist/Item-CjTEShfk.js.map +1 -0
- package/dist/{ModelProperty-N-3gBfu5.js → ModelProperty-C3749Wjq.js} +36 -36
- package/dist/{ModelProperty-N-3gBfu5.js.map → ModelProperty-C3749Wjq.js.map} +1 -1
- package/dist/{Schema-CY3OxwKS.js → Schema-CX9CTtho.js} +35 -35
- package/dist/{Schema-CY3OxwKS.js.map → Schema-CX9CTtho.js.map} +1 -1
- package/dist/{SchemaValidationService-BR2ABK2r.js → SchemaValidationService-T5mqnY8q.js} +6 -6
- package/dist/{SchemaValidationService-BR2ABK2r.js.map → SchemaValidationService-T5mqnY8q.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-vc_1RoDT.js → backfillMetadataPropertyIds-DWWkh-Ex.js} +3 -3
- package/dist/{backfillMetadataPropertyIds-vc_1RoDT.js.map → backfillMetadataPropertyIds-DWWkh-Ex.js.map} +1 -1
- package/dist/{tabEvents-BuorBItJ.js → changeFeed-DcsZ7deG.js} +369 -10
- package/dist/changeFeed-DcsZ7deG.js.map +1 -0
- package/dist/{configurePlatform-D-Pj9gTx.js → configurePlatform-AWild9o4.js} +2 -2
- package/dist/{configurePlatform-D-Pj9gTx.js.map → configurePlatform-AWild9o4.js.map} +1 -1
- package/dist/db/drizzle/0022_add_read_indexes.sql +5 -0
- package/dist/db/drizzle/0023_add_entity_changes.sql +48 -0
- package/dist/db/drizzle/meta/0022_snapshot.json +1585 -0
- package/dist/db/drizzle/meta/0023_snapshot.json +1645 -0
- package/dist/db/drizzle/meta/_journal.json +14 -0
- package/dist/{detachRowsBeforeDelete-sK1ye2W6.js → detachRowsBeforeDelete-Bo_pky-R.js} +2 -2
- package/dist/{detachRowsBeforeDelete-sK1ye2W6.js.map → detachRowsBeforeDelete-Bo_pky-R.js.map} +1 -1
- package/dist/dist/{ClientManager-Bv15o3Oz.d.ts → ClientManager-B1r_8P5Z.d.ts} +1 -1
- package/dist/dist/ClientManager-B1r_8P5Z.d.ts.map +1 -0
- package/dist/dist/{Item-tX3kpbj4.d.ts → Item-CjTEShfk.d.ts} +3 -2
- package/dist/dist/Item-CjTEShfk.d.ts.map +1 -0
- package/dist/dist/{ModelProperty-N-3gBfu5.d.ts → ModelProperty-C3749Wjq.d.ts} +1 -1
- package/dist/dist/{ModelProperty-N-3gBfu5.d.ts.map → ModelProperty-C3749Wjq.d.ts.map} +1 -1
- package/dist/dist/{Schema-CY3OxwKS.d.ts → Schema-CX9CTtho.d.ts} +2 -2
- package/dist/dist/{Schema-CY3OxwKS.d.ts.map → Schema-CX9CTtho.d.ts.map} +1 -1
- package/dist/dist/{SchemaValidationService-BR2ABK2r.d.ts → SchemaValidationService-T5mqnY8q.d.ts} +1 -1
- package/dist/dist/{SchemaValidationService-BR2ABK2r.d.ts.map → SchemaValidationService-T5mqnY8q.d.ts.map} +1 -1
- package/dist/dist/{backfillMetadataPropertyIds-vc_1RoDT.d.ts → backfillMetadataPropertyIds-DWWkh-Ex.d.ts} +1 -1
- package/dist/dist/backfillMetadataPropertyIds-DWWkh-Ex.d.ts.map +1 -0
- package/dist/dist/{tabEvents-BuorBItJ.d.ts → changeFeed-DcsZ7deG.d.ts} +101 -36
- package/dist/dist/changeFeed-DcsZ7deG.d.ts.map +1 -0
- package/dist/dist/{configurePlatform-D-Pj9gTx.d.ts → configurePlatform-AWild9o4.d.ts} +1 -1
- package/dist/dist/configurePlatform-AWild9o4.d.ts.map +1 -0
- package/dist/dist/{detachRowsBeforeDelete-sK1ye2W6.d.ts → detachRowsBeforeDelete-Bo_pky-R.d.ts} +1 -1
- package/dist/dist/detachRowsBeforeDelete-Bo_pky-R.d.ts.map +1 -0
- package/dist/dist/{eas-BSQxj7gN.d.ts → eas--9vtNkma.d.ts} +1 -1
- package/dist/dist/eas--9vtNkma.d.ts.map +1 -0
- package/dist/dist/{errors-a4Tj6hly.d.ts → errors-rIWK7gwJ.d.ts} +1 -1
- package/dist/dist/{errors-a4Tj6hly.d.ts.map → errors-rIWK7gwJ.d.ts.map} +1 -1
- package/dist/dist/{getItem-Ctps9gSs.d.ts → getItem-5j22EWWE.d.ts} +1 -1
- package/dist/dist/getItem-5j22EWWE.d.ts.map +1 -0
- package/dist/dist/{getPublishPayload-C2g5pPD2.d.ts → getPublishPayload-BGl2SaGK.d.ts} +1 -1
- package/dist/dist/{getPublishPayload-C2g5pPD2.d.ts.map → getPublishPayload-BGl2SaGK.d.ts.map} +1 -1
- package/dist/dist/{getPublishUploads-CaJHy3SL.d.ts → getPublishUploads-DVsDx6Xf.d.ts} +1 -1
- package/dist/dist/{getPublishUploads-CaJHy3SL.d.ts.map → getPublishUploads-DVsDx6Xf.d.ts.map} +1 -1
- package/dist/dist/{index-s73wD_LC.d.ts → index-C0SetTd1.d.ts} +1190 -1065
- package/dist/dist/index-C0SetTd1.d.ts.map +1 -0
- package/dist/dist/{index-BgEwcREa.d.ts → index-CJK3F_MK.d.ts} +13 -13
- package/dist/dist/index-CJK3F_MK.d.ts.map +1 -0
- package/dist/dist/{index-B6hPWSM4.d.ts → index-CZQrNqvq.d.ts} +130 -13
- package/dist/dist/{index-B6hPWSM4.d.ts.map → index-CZQrNqvq.d.ts.map} +1 -1
- package/dist/dist/{index-bOwhhJJL.d.ts → index-Dp4uyZYx.d.ts} +5 -5
- package/dist/dist/index-Dp4uyZYx.d.ts.map +1 -0
- package/dist/dist/{index.browser-C7iZp7mx.d.ts → index.browser-Ll71Y_Dl.d.ts} +391 -39
- package/dist/dist/{index.browser-C7iZp7mx.d.ts.map → index.browser-Ll71Y_Dl.d.ts.map} +1 -1
- package/dist/dist/{index.node-MPVTJR2J.d.ts → index.node-CgltN0cC.d.ts} +517 -49
- package/dist/dist/{index.node-MPVTJR2J.d.ts.map → index.node-CgltN0cC.d.ts.map} +1 -1
- package/dist/dist/modelPropertyRecordSchemas-C_lYTzMr.d.ts +7 -0
- package/dist/dist/modelPropertyRecordSchemas-C_lYTzMr.d.ts.map +1 -0
- package/dist/dist/platform.browser.d.ts +2 -2
- package/dist/dist/platform.node.d.ts +2 -2
- package/dist/dist/{property-mP9mOZ2L.d.ts → property-pcDxNEpy.d.ts} +3 -3
- package/dist/dist/property-pcDxNEpy.d.ts.map +1 -0
- package/dist/dist/{propertyValidationRules-DwzrYA7c.d.ts → propertyValidationRules-BEjN0f3-.d.ts} +6 -1
- package/dist/dist/propertyValidationRules-BEjN0f3-.d.ts.map +1 -0
- package/dist/dist/{publishDraftGraph-BzYVblZZ.d.ts → publishDraftGraph-I5yKe1Xz.d.ts} +1 -1
- package/dist/dist/{publishDraftGraph-BzYVblZZ.d.ts.map → publishDraftGraph-I5yKe1Xz.d.ts.map} +1 -1
- package/dist/dist/{resetAmbiguousLegacyItemData-B_IUQA09.d.ts → resetAmbiguousLegacyItemData-0Tin9-JK.d.ts} +1 -1
- package/dist/dist/resetAmbiguousLegacyItemData-0Tin9-JK.d.ts.map +1 -0
- package/dist/dist/{resolveModelForSyncedSeed-H-4tmU6l.d.ts → resolveModelForSyncedSeed-C5KXn6ex.d.ts} +1 -1
- package/dist/dist/resolveModelForSyncedSeed-C5KXn6ex.d.ts.map +1 -0
- package/dist/dist/{syncDbWithEas-y5VF623G.d.ts → syncDbWithEas-b4fESZ7C.d.ts} +1 -1
- package/dist/dist/syncDbWithEas-b4fESZ7C.d.ts.map +1 -0
- package/dist/dist/{tolerantWebAccess-DoI7QYT-.d.ts → tolerantWebAccess-CIpS7RLk.d.ts} +1 -1
- package/dist/dist/{tolerantWebAccess-DoI7QYT-.d.ts.map → tolerantWebAccess-CIpS7RLk.d.ts.map} +1 -1
- package/dist/dist/{updateSeedRevokedAt-BIzkbsUd.d.ts → updateSeedRevokedAt-CR4zwn-6.d.ts} +1 -1
- package/dist/dist/updateSeedRevokedAt-CR4zwn-6.d.ts.map +1 -0
- package/dist/{eas-BSQxj7gN.js → eas--9vtNkma.js} +3 -3
- package/dist/{eas-BSQxj7gN.js.map → eas--9vtNkma.js.map} +1 -1
- package/dist/{errors-a4Tj6hly.js → errors-rIWK7gwJ.js} +35 -35
- package/dist/{errors-a4Tj6hly.js.map → errors-rIWK7gwJ.js.map} +1 -1
- package/dist/{getItem-Ctps9gSs.js → getItem-5j22EWWE.js} +5 -5
- package/dist/{getItem-Ctps9gSs.js.map → getItem-5j22EWWE.js.map} +1 -1
- package/dist/{getPublishPayload-C2g5pPD2.js → getPublishPayload-BGl2SaGK.js} +14 -14
- package/dist/{getPublishPayload-C2g5pPD2.js.map → getPublishPayload-BGl2SaGK.js.map} +1 -1
- package/dist/{getPublishUploads-CaJHy3SL.js → getPublishUploads-DVsDx6Xf.js} +7 -7
- package/dist/{getPublishUploads-CaJHy3SL.js.map → getPublishUploads-DVsDx6Xf.js.map} +1 -1
- package/dist/{index-s73wD_LC.js → index-C0SetTd1.js} +52 -13
- package/dist/index-C0SetTd1.js.map +1 -0
- package/dist/{index-BgEwcREa.js → index-CJK3F_MK.js} +8 -8
- package/dist/index-CJK3F_MK.js.map +1 -0
- package/dist/{index-B6hPWSM4.js → index-CZQrNqvq.js} +3 -2
- package/dist/index-CZQrNqvq.js.map +1 -0
- package/dist/{index-bOwhhJJL.js → index-Dp4uyZYx.js} +8 -8
- package/dist/index-Dp4uyZYx.js.map +1 -0
- package/dist/{index.browser-C7iZp7mx.js → index.browser-Ll71Y_Dl.js} +243 -18
- package/dist/index.browser-Ll71Y_Dl.js.map +1 -0
- package/dist/{index.node-MPVTJR2J.js → index.node-CgltN0cC.js} +50 -15
- package/dist/index.node-CgltN0cC.js.map +1 -0
- package/dist/main.js +23 -30
- package/dist/main.js.map +1 -1
- package/dist/modelPropertyRecordSchemas-C_lYTzMr.js +94 -0
- package/dist/modelPropertyRecordSchemas-C_lYTzMr.js.map +1 -0
- package/dist/node.js +11 -11
- package/dist/platform.browser.js +5 -5
- package/dist/platform.node.js +4 -4
- package/dist/{property-mP9mOZ2L.js → property-pcDxNEpy.js} +7 -7
- package/dist/{property-mP9mOZ2L.js.map → property-pcDxNEpy.js.map} +1 -1
- package/dist/propertyValidationRules-BEjN0f3-.js +73 -0
- package/dist/propertyValidationRules-BEjN0f3-.js.map +1 -0
- package/dist/{publishDraftGraph-BzYVblZZ.js → publishDraftGraph-I5yKe1Xz.js} +6 -6
- package/dist/{publishDraftGraph-BzYVblZZ.js.map → publishDraftGraph-I5yKe1Xz.js.map} +1 -1
- package/dist/{resetAmbiguousLegacyItemData-B_IUQA09.js → resetAmbiguousLegacyItemData-0Tin9-JK.js} +2 -2
- package/dist/{resetAmbiguousLegacyItemData-B_IUQA09.js.map → resetAmbiguousLegacyItemData-0Tin9-JK.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-H-4tmU6l.js → resolveModelForSyncedSeed-C5KXn6ex.js} +2 -2
- package/dist/{resolveModelForSyncedSeed-H-4tmU6l.js.map → resolveModelForSyncedSeed-C5KXn6ex.js.map} +1 -1
- package/dist/seedSchema/EntityChangeSchema.ts +28 -0
- package/dist/seedSchema/MetadataSchema.ts +12 -4
- package/dist/seedSchema/SeedSchema.ts +9 -3
- package/dist/seedSchema/VersionSchema.ts +9 -4
- package/dist/seedSchema/index.ts +1 -0
- package/dist/src/Item/Item.d.ts +2 -1
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/Item/service/actors/loadOrCreateItem.d.ts.map +1 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/modelPropertyRecordSchemas.d.ts +21 -0
- package/dist/src/ItemProperty/service/actors/modelPropertyRecordSchemas.d.ts.map +1 -0
- package/dist/src/browser/db/Db.d.ts +2 -2
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/browser/db/changeFeed.d.ts +77 -0
- package/dist/src/browser/db/changeFeed.d.ts.map +1 -0
- package/dist/src/browser/db/drizzleFiles.d.ts +4 -2
- package/dist/src/browser/db/drizzleFiles.d.ts.map +1 -1
- package/dist/src/db/write/applyArweaveL1TransactionIdLocal.d.ts.map +1 -1
- package/dist/src/db/write/claimUnpublishedDrafts.d.ts.map +1 -1
- package/dist/src/db/write/createMetadata.d.ts.map +1 -1
- package/dist/src/db/write/createSeed.d.ts.map +1 -1
- package/dist/src/db/write/createVersion.d.ts.map +1 -1
- package/dist/src/db/write/restoreDataItemIdsOverwrittenByL1.d.ts.map +1 -1
- package/dist/src/db/write/saveMetadata.d.ts.map +1 -1
- package/dist/src/db/write/updateItemPropertyValue.d.ts.map +1 -1
- package/dist/src/db/write/updateSeedRevokedAt.d.ts.map +1 -1
- package/dist/src/db/write/updateSeedUid.d.ts.map +1 -1
- package/dist/src/db/write/updateVersionUid.d.ts.map +1 -1
- package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/src/helpers/propertyValidationRules.d.ts +8 -0
- package/dist/src/helpers/propertyValidationRules.d.ts.map +1 -1
- package/dist/src/helpers/timing.d.ts +36 -0
- package/dist/src/helpers/timing.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/node/db/singleConnectionTransactions.d.ts +6 -0
- package/dist/src/node/db/singleConnectionTransactions.d.ts.map +1 -1
- package/dist/src/outbox/itemAppliers.d.ts.map +1 -1
- package/dist/src/outbox/outbox.d.ts +2 -0
- package/dist/src/outbox/outbox.d.ts.map +1 -1
- package/dist/src/outbox/pendingValues.d.ts.map +1 -1
- package/dist/src/seedSchema/EntityChangeSchema.d.ts +126 -0
- package/dist/src/seedSchema/EntityChangeSchema.d.ts.map +1 -0
- package/dist/src/seedSchema/MetadataSchema.d.ts +4 -4
- package/dist/src/seedSchema/MetadataSchema.d.ts.map +1 -1
- package/dist/src/seedSchema/SeedSchema.d.ts +4 -4
- package/dist/src/seedSchema/SeedSchema.d.ts.map +1 -1
- package/dist/src/seedSchema/VersionSchema.d.ts +4 -4
- package/dist/src/seedSchema/VersionSchema.d.ts.map +1 -1
- package/dist/src/seedSchema/index.d.ts +1 -0
- package/dist/src/seedSchema/index.d.ts.map +1 -1
- package/dist/{syncDbWithEas-y5VF623G.js → syncDbWithEas-b4fESZ7C.js} +17 -23
- package/dist/syncDbWithEas-b4fESZ7C.js.map +1 -0
- package/dist/{tolerantWebAccess-DoI7QYT-.js → tolerantWebAccess-CIpS7RLk.js} +6 -6
- package/dist/{tolerantWebAccess-DoI7QYT-.js.map → tolerantWebAccess-CIpS7RLk.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-BIzkbsUd.js → updateSeedRevokedAt-CR4zwn-6.js} +5 -6
- package/dist/updateSeedRevokedAt-CR4zwn-6.js.map +1 -0
- package/package.json +6 -6
- package/dist/ClientManager-Bv15o3Oz.js.map +0 -1
- package/dist/Item-tX3kpbj4.js.map +0 -1
- package/dist/dist/ClientManager-Bv15o3Oz.d.ts.map +0 -1
- package/dist/dist/Item-tX3kpbj4.d.ts.map +0 -1
- package/dist/dist/backfillMetadataPropertyIds-vc_1RoDT.d.ts.map +0 -1
- package/dist/dist/configurePlatform-D-Pj9gTx.d.ts.map +0 -1
- package/dist/dist/detachRowsBeforeDelete-sK1ye2W6.d.ts.map +0 -1
- package/dist/dist/eas-BSQxj7gN.d.ts.map +0 -1
- package/dist/dist/getItem-Ctps9gSs.d.ts.map +0 -1
- package/dist/dist/index-BgEwcREa.d.ts.map +0 -1
- package/dist/dist/index-bOwhhJJL.d.ts.map +0 -1
- package/dist/dist/index-s73wD_LC.d.ts.map +0 -1
- package/dist/dist/property-mP9mOZ2L.d.ts.map +0 -1
- package/dist/dist/propertyValidationRules-DwzrYA7c.d.ts.map +0 -1
- package/dist/dist/resetAmbiguousLegacyItemData-B_IUQA09.d.ts.map +0 -1
- package/dist/dist/resolveModelForSyncedSeed-H-4tmU6l.d.ts.map +0 -1
- package/dist/dist/syncDbWithEas-y5VF623G.d.ts.map +0 -1
- package/dist/dist/tabEvents-BuorBItJ.d.ts.map +0 -1
- package/dist/dist/updateSeedRevokedAt-BIzkbsUd.d.ts.map +0 -1
- package/dist/index-B6hPWSM4.js.map +0 -1
- package/dist/index-BgEwcREa.js.map +0 -1
- package/dist/index-bOwhhJJL.js.map +0 -1
- package/dist/index-s73wD_LC.js.map +0 -1
- package/dist/index.browser-C7iZp7mx.js.map +0 -1
- package/dist/index.node-MPVTJR2J.js.map +0 -1
- package/dist/propertyValidationRules-DwzrYA7c.js +0 -51
- package/dist/propertyValidationRules-DwzrYA7c.js.map +0 -1
- package/dist/syncDbWithEas-y5VF623G.js.map +0 -1
- package/dist/tabEvents-BuorBItJ.js.map +0 -1
- package/dist/updateSeedRevokedAt-BIzkbsUd.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { fromCallback, setup, assign, createActor } from 'xstate';
|
|
2
|
-
import {
|
|
3
|
-
import { h as getRefValueType, T as createRowsWrittenSignal, U as createModelsFromJson, F as listCompleteSchemaFiles, V as getLatestSchemaVersion, l as loadSchemaFromFile, W as jsonPropertiesToSchemaProperties, G as loadAllSchemasFromDb, z as getClient } from './ClientManager-
|
|
2
|
+
import { ay as SEED_PROTOCOL_SCHEMA_NAME, G as BaseDb, B as schemas, aQ as addSchemaToDb, i as isDataType, M as ModelPropertyDataTypes, aj as generateId, R as addModelsToDb, t as models, r as modelSchemas, w as properties, Q as BaseFileManager, aU as loadModelsFromDbForSchema, aV as mergeDbModelsIntoSchemaModels, aN as isInternalSchema, aW as clearNameMatchLevels } from './index-C0SetTd1.js';
|
|
3
|
+
import { h as getRefValueType, T as createRowsWrittenSignal, U as createModelsFromJson, F as listCompleteSchemaFiles, V as getLatestSchemaVersion, l as loadSchemaFromFile, W as jsonPropertiesToSchemaProperties, G as loadAllSchemasFromDb, z as getClient } from './ClientManager-B1r_8P5Z.js';
|
|
4
4
|
import { eq, desc, and } from 'drizzle-orm';
|
|
5
5
|
import debug from 'debug';
|
|
6
|
-
import { c as currentEvictionEpoch, w as writeProcessMachine, M as Model, g as getDraftSaveError, C as ConflictError, r as recordSchemaDestroy, f as finishSchemaDestroy, e as setupEntityLiveQuery, t as trackDraftSave } from './errors-
|
|
6
|
+
import { c as currentEvictionEpoch, w as writeProcessMachine, M as Model, g as getDraftSaveError, C as ConflictError, r as recordSchemaDestroy, f as finishSchemaDestroy, e as setupEntityLiveQuery, t as trackDraftSave } from './errors-rIWK7gwJ.js';
|
|
7
7
|
import 'pluralize';
|
|
8
8
|
import '@seedprotocol/eas';
|
|
9
|
-
import { SchemaValidationService } from './SchemaValidationService-
|
|
10
|
-
import { ak as ActorKeyedState, Q as DEFAULT_READY_TIMEOUT_MS, C as waitForEntityIdle, R as createReactiveProxy, T as findEntity, X as ClientManagerState, al as clearDestroySubscriptions, U as forceRemoveFromCaches, am as unloadEntity, V as runDestroyLifecycle } from './Item-
|
|
9
|
+
import { SchemaValidationService } from './SchemaValidationService-T5mqnY8q.js';
|
|
10
|
+
import { ak as ActorKeyedState, Q as DEFAULT_READY_TIMEOUT_MS, C as waitForEntityIdle, R as createReactiveProxy, T as findEntity, X as ClientManagerState, al as clearDestroySubscriptions, U as forceRemoveFromCaches, am as unloadEntity, V as runDestroyLifecycle } from './Item-CjTEShfk.js';
|
|
11
11
|
|
|
12
12
|
const logger$d = debug('seedSdk:schema:actors:loadOrCreateSchema');
|
|
13
13
|
/**
|
|
@@ -51,7 +51,7 @@ const createModelInstances$2 = async (modelIds, evictionEpoch) => {
|
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
try {
|
|
54
|
-
const _mod_0 = await import('./errors-
|
|
54
|
+
const _mod_0 = await import('./errors-rIWK7gwJ.js');
|
|
55
55
|
const _ns_0 = _mod_0.i;
|
|
56
56
|
const modelMod = _ns_0;
|
|
57
57
|
const { Model } = modelMod;
|
|
@@ -171,7 +171,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
171
171
|
// For Seed Protocol, always load from internal file, never create new
|
|
172
172
|
logger$d(`Loading internal Seed Protocol schema from SDK`);
|
|
173
173
|
try {
|
|
174
|
-
const _mod_1 = await import('./ClientManager-
|
|
174
|
+
const _mod_1 = await import('./ClientManager-B1r_8P5Z.js');
|
|
175
175
|
const _ns_1 = _mod_1.Y;
|
|
176
176
|
const internalSchema = _ns_1;
|
|
177
177
|
const schemaFile = internalSchema.default;
|
|
@@ -670,7 +670,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
670
670
|
// Ensure models are populated (fallback for seed-protocol if missing)
|
|
671
671
|
if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
|
|
672
672
|
try {
|
|
673
|
-
const _mod_2 = await import('./ClientManager-
|
|
673
|
+
const _mod_2 = await import('./ClientManager-B1r_8P5Z.js');
|
|
674
674
|
const _ns_2 = _mod_2.Y;
|
|
675
675
|
const internalSchema = _ns_2;
|
|
676
676
|
const internalSchemaFile = internalSchema.default;
|
|
@@ -835,7 +835,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
835
835
|
// Ensure models are populated (fallback for seed-protocol if missing)
|
|
836
836
|
if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
|
|
837
837
|
try {
|
|
838
|
-
const _mod_3 = await import('./ClientManager-
|
|
838
|
+
const _mod_3 = await import('./ClientManager-B1r_8P5Z.js');
|
|
839
839
|
const _ns_3 = _mod_3.Y;
|
|
840
840
|
const internalSchema = _ns_3;
|
|
841
841
|
const internalSchemaFile = internalSchema.default;
|
|
@@ -890,7 +890,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
890
890
|
// Ensure models are populated (fallback for seed-protocol if missing)
|
|
891
891
|
if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
|
|
892
892
|
try {
|
|
893
|
-
const _mod_4 = await import('./ClientManager-
|
|
893
|
+
const _mod_4 = await import('./ClientManager-B1r_8P5Z.js');
|
|
894
894
|
const _ns_4 = _mod_4.Y;
|
|
895
895
|
const internalSchema = _ns_4;
|
|
896
896
|
const internalSchemaFile = internalSchema.default;
|
|
@@ -940,7 +940,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
940
940
|
// If schemaData is missing, try to load from internal schema file for seed-protocol
|
|
941
941
|
if (!dbSchema.schemaData && schemaName === 'Seed Protocol') {
|
|
942
942
|
try {
|
|
943
|
-
const _mod_5 = await import('./ClientManager-
|
|
943
|
+
const _mod_5 = await import('./ClientManager-B1r_8P5Z.js');
|
|
944
944
|
const _ns_5 = _mod_5.Y;
|
|
945
945
|
const internalSchema = _ns_5;
|
|
946
946
|
const schemaFile = internalSchema.default;
|
|
@@ -1051,7 +1051,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1051
1051
|
// Ensure models are populated (fallback for seed-protocol if missing)
|
|
1052
1052
|
if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
|
|
1053
1053
|
try {
|
|
1054
|
-
const _mod_6 = await import('./ClientManager-
|
|
1054
|
+
const _mod_6 = await import('./ClientManager-B1r_8P5Z.js');
|
|
1055
1055
|
const _ns_6 = _mod_6.Y;
|
|
1056
1056
|
const internalSchema = _ns_6;
|
|
1057
1057
|
const internalSchemaFile = internalSchema.default;
|
|
@@ -1378,7 +1378,7 @@ const createModelInstances$1 = async (modelIds, evictionEpoch) => {
|
|
|
1378
1378
|
return;
|
|
1379
1379
|
}
|
|
1380
1380
|
try {
|
|
1381
|
-
const _mod_7 = await import('./errors-
|
|
1381
|
+
const _mod_7 = await import('./errors-rIWK7gwJ.js');
|
|
1382
1382
|
const _ns_7 = _mod_7.i;
|
|
1383
1383
|
const mod = _ns_7;
|
|
1384
1384
|
const Model = mod?.Model ?? mod?.default;
|
|
@@ -1430,7 +1430,7 @@ const checkExistingSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1430
1430
|
if (isInternal && schemaName === SEED_PROTOCOL_SCHEMA_NAME) {
|
|
1431
1431
|
// For Seed Protocol, check if it exists in database
|
|
1432
1432
|
try {
|
|
1433
|
-
const _mod_8 = await import('./ClientManager-
|
|
1433
|
+
const _mod_8 = await import('./ClientManager-B1r_8P5Z.js');
|
|
1434
1434
|
const _ns_8 = _mod_8.Y;
|
|
1435
1435
|
const internalSchema = _ns_8;
|
|
1436
1436
|
const schemaFile = internalSchema.default;
|
|
@@ -1766,7 +1766,7 @@ const writeSchemaToDb = fromCallback(({ sendBack, input }) => {
|
|
|
1766
1766
|
if (isInternal && schemaName === SEED_PROTOCOL_SCHEMA_NAME) {
|
|
1767
1767
|
// For Seed Protocol, load from internal file
|
|
1768
1768
|
logger$b(`Loading internal Seed Protocol schema from SDK`);
|
|
1769
|
-
const _mod_9 = await import('./ClientManager-
|
|
1769
|
+
const _mod_9 = await import('./ClientManager-B1r_8P5Z.js');
|
|
1770
1770
|
const _ns_9 = _mod_9.Y;
|
|
1771
1771
|
const internalSchema = _ns_9;
|
|
1772
1772
|
finalSchema = internalSchema.default;
|
|
@@ -2239,7 +2239,7 @@ const createModelInstances = fromCallback(({ sendBack, input }) => {
|
|
|
2239
2239
|
return;
|
|
2240
2240
|
}
|
|
2241
2241
|
try {
|
|
2242
|
-
const _mod_10 = await import('./errors-
|
|
2242
|
+
const _mod_10 = await import('./errors-rIWK7gwJ.js');
|
|
2243
2243
|
const _ns_10 = _mod_10.i;
|
|
2244
2244
|
const modelMod = _ns_10;
|
|
2245
2245
|
const { Model } = modelMod;
|
|
@@ -2331,7 +2331,7 @@ const verifyModelInstancesInCache = fromCallback(({ sendBack, input }) => {
|
|
|
2331
2331
|
}
|
|
2332
2332
|
try {
|
|
2333
2333
|
const result = await verifyWithRetry$2(async () => {
|
|
2334
|
-
const _mod_11 = await import('./errors-
|
|
2334
|
+
const _mod_11 = await import('./errors-rIWK7gwJ.js');
|
|
2335
2335
|
const _ns_11 = _mod_11.i;
|
|
2336
2336
|
const modelMod = _ns_11;
|
|
2337
2337
|
const { Model } = modelMod;
|
|
@@ -2390,8 +2390,8 @@ const writePropertiesToDb = fromCallback(({ sendBack, input }) => {
|
|
|
2390
2390
|
const _write = async () => {
|
|
2391
2391
|
const { modelIds } = input;
|
|
2392
2392
|
try {
|
|
2393
|
-
const _mod_12 = await import('./index-
|
|
2394
|
-
const _ns_12 = _mod_12.
|
|
2393
|
+
const _mod_12 = await import('./index-C0SetTd1.js');
|
|
2394
|
+
const _ns_12 = _mod_12.bj;
|
|
2395
2395
|
const modelSchemaMod = _ns_12;
|
|
2396
2396
|
const { models: modelsTable, properties: propertiesTable } = modelSchemaMod;
|
|
2397
2397
|
const drizzleMod = await import('drizzle-orm');
|
|
@@ -2580,9 +2580,9 @@ const createPropertyInstances = fromCallback(({ sendBack, input }) => {
|
|
|
2580
2580
|
return;
|
|
2581
2581
|
}
|
|
2582
2582
|
try {
|
|
2583
|
-
const modProp = await import('./ModelProperty-
|
|
2583
|
+
const modProp = await import('./ModelProperty-C3749Wjq.js');
|
|
2584
2584
|
const ModelProperty = modProp?.ModelProperty ?? modProp?.default;
|
|
2585
|
-
const _mod_13 = await import('./errors-
|
|
2585
|
+
const _mod_13 = await import('./errors-rIWK7gwJ.js');
|
|
2586
2586
|
const _ns_13 = _mod_13.i;
|
|
2587
2587
|
const modModel = _ns_13;
|
|
2588
2588
|
const Model = modModel?.Model ?? modModel?.default;
|
|
@@ -2689,7 +2689,7 @@ const verifyPropertyInstancesInCache = fromCallback(({ sendBack, input }) => {
|
|
|
2689
2689
|
}
|
|
2690
2690
|
try {
|
|
2691
2691
|
const result = await verifyWithRetry(async () => {
|
|
2692
|
-
const mod = await import('./ModelProperty-
|
|
2692
|
+
const mod = await import('./ModelProperty-C3749Wjq.js');
|
|
2693
2693
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
2694
2694
|
if (!ModelProperty) {
|
|
2695
2695
|
throw new Error('ModelProperty not available from dynamic import');
|
|
@@ -3709,8 +3709,8 @@ async function loadSchemaWithRenames(schemaFilePath, modelRenames) {
|
|
|
3709
3709
|
updatedAt: new Date(schemaFile.metadata.updatedAt).getTime(),
|
|
3710
3710
|
};
|
|
3711
3711
|
// Use dynamic import to break circular dependency
|
|
3712
|
-
const _mod_14 = await import('./index-
|
|
3713
|
-
const _ns_14 = _mod_14.
|
|
3712
|
+
const _mod_14 = await import('./index-C0SetTd1.js');
|
|
3713
|
+
const _ns_14 = _mod_14.bo;
|
|
3714
3714
|
const dbMod = _ns_14;
|
|
3715
3715
|
const { addSchemaToDb, addModelsToDb } = dbMod;
|
|
3716
3716
|
// Add schema to database with schemaFileId
|
|
@@ -3833,8 +3833,8 @@ async function renameModelProperty(schemaName, modelName, oldPropertyName, newPr
|
|
|
3833
3833
|
await BaseFileManager.waitForFileWithContent(newFilePath);
|
|
3834
3834
|
logger$1(`Renamed property ${oldPropertyName} to ${newPropertyName} in schema ${schemaName} v${newVersion}`);
|
|
3835
3835
|
// Migrate metadata rows so ItemProperty values follow the new name (prevents duplicate ItemProperties)
|
|
3836
|
-
const _mod_15 = await import('./index-
|
|
3837
|
-
const _ns_15 = _mod_15.
|
|
3836
|
+
const _mod_15 = await import('./index-C0SetTd1.js');
|
|
3837
|
+
const _ns_15 = _mod_15.bo;
|
|
3838
3838
|
const { migrateMetadataForPropertyRename } = _ns_15;
|
|
3839
3839
|
const migratedCount = await migrateMetadataForPropertyRename(modelName, oldPropertyName, newPropertyName, oldProperty.id, { schemaName });
|
|
3840
3840
|
if (migratedCount > 0) {
|
|
@@ -4834,7 +4834,7 @@ class Schema {
|
|
|
4834
4834
|
const modelDbId = modelInstance.getService().getSnapshot().context._dbId;
|
|
4835
4835
|
const db = BaseDb.getAppDb();
|
|
4836
4836
|
if (propertyContexts.length === 0 && modelDbId && db) {
|
|
4837
|
-
const { ModelProperty } = await import('./ModelProperty-
|
|
4837
|
+
const { ModelProperty } = await import('./ModelProperty-C3749Wjq.js');
|
|
4838
4838
|
const rows = await db.select().from(properties).where(eq(properties.modelId, modelDbId));
|
|
4839
4839
|
propertyContexts = rows.map((row) => {
|
|
4840
4840
|
const cached = row.schemaFileId ? ModelProperty.getById(row.schemaFileId) : undefined;
|
|
@@ -5000,7 +5000,7 @@ class Schema {
|
|
|
5000
5000
|
savedSchema: publishedSchema,
|
|
5001
5001
|
});
|
|
5002
5002
|
// Clear edited flags on all ModelProperty instances and in database
|
|
5003
|
-
const modelPropertyMod = await import('./ModelProperty-
|
|
5003
|
+
const modelPropertyMod = await import('./ModelProperty-C3749Wjq.js');
|
|
5004
5004
|
const { ModelProperty } = modelPropertyMod;
|
|
5005
5005
|
for (const propertyKey of context._editedProperties) {
|
|
5006
5006
|
const [modelName, propertyName] = propertyKey.split(':');
|
|
@@ -5023,8 +5023,8 @@ class Schema {
|
|
|
5023
5023
|
try {
|
|
5024
5024
|
if (db && modelName && propertyName) {
|
|
5025
5025
|
// Find this schema's model by name
|
|
5026
|
-
const _mod_16 = await import('./index-
|
|
5027
|
-
const _ns_16 = _mod_16.
|
|
5026
|
+
const _mod_16 = await import('./index-C0SetTd1.js');
|
|
5027
|
+
const _ns_16 = _mod_16.bn;
|
|
5028
5028
|
const { resolveModelRecord } = _ns_16;
|
|
5029
5029
|
const modelRecord = await resolveModelRecord(modelName, { schemaName: thisSchemaName }, db);
|
|
5030
5030
|
const modelRecords = modelRecord ? [modelRecord] : [];
|
|
@@ -5655,10 +5655,10 @@ class Schema {
|
|
|
5655
5655
|
// instances too, or a re-import would get them back with dangling _dbIds.
|
|
5656
5656
|
if (schemaName) {
|
|
5657
5657
|
const evictedModelNames = Model.evictForSchema(schemaName);
|
|
5658
|
-
const { ModelProperty } = await import('./ModelProperty-
|
|
5658
|
+
const { ModelProperty } = await import('./ModelProperty-C3749Wjq.js');
|
|
5659
5659
|
ModelProperty.evictForModels(evictedModelNames, schemaName);
|
|
5660
5660
|
// Evicting stops new writes but not ones already running; let those land before deleting their rows
|
|
5661
|
-
const _mod_17 = await import('./errors-
|
|
5661
|
+
const _mod_17 = await import('./errors-rIWK7gwJ.js');
|
|
5662
5662
|
const _ns_17 = _mod_17.h;
|
|
5663
5663
|
const { waitForInFlightWrites } = _ns_17;
|
|
5664
5664
|
await waitForInFlightWrites();
|
|
@@ -5691,7 +5691,7 @@ class Schema {
|
|
|
5691
5691
|
.map((r) => r.modelId)
|
|
5692
5692
|
.filter((id) => id != null)),
|
|
5693
5693
|
];
|
|
5694
|
-
const { detachModelRows } = await import('./detachRowsBeforeDelete-
|
|
5694
|
+
const { detachModelRows } = await import('./detachRowsBeforeDelete-Bo_pky-R.js');
|
|
5695
5695
|
await detachModelRows(db, modelIds);
|
|
5696
5696
|
await db.delete(modelSchemas).where(inArray(modelSchemas.schemaId, schemaIds));
|
|
5697
5697
|
for (const modelId of modelIds) {
|
|
@@ -5706,7 +5706,7 @@ class Schema {
|
|
|
5706
5706
|
// the destroyed schema back on the next Schema.all().
|
|
5707
5707
|
// Match on name as well as id: versions imported from complete schema files can each
|
|
5708
5708
|
// have their own id, and any version left behind would bring the schema back.
|
|
5709
|
-
const _mod_18 = await import('./ClientManager-
|
|
5709
|
+
const _mod_18 = await import('./ClientManager-B1r_8P5Z.js');
|
|
5710
5710
|
const _ns_18 = _mod_18.X;
|
|
5711
5711
|
const { listCompleteSchemaFiles } = _ns_18;
|
|
5712
5712
|
const files = await listCompleteSchemaFiles().catch(() => []);
|
|
@@ -5902,4 +5902,4 @@ var Schema$1 = /*#__PURE__*/Object.freeze({
|
|
|
5902
5902
|
});
|
|
5903
5903
|
|
|
5904
5904
|
export { Schema as S, deletePropertyFromModel as a, Schema$1 as b, deleteModelFromSchema as d, renameModelProperty as r, schemaMachine as s, updateModelProperties as u };
|
|
5905
|
-
//# sourceMappingURL=Schema-
|
|
5905
|
+
//# sourceMappingURL=Schema-CX9CTtho.js.map
|