@seedprotocol/sdk 0.7.6 → 0.7.7-next.988.g7046e66
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-D6YA20jP.js → ClientManager-DdqRofK6.js} +297 -218
- package/dist/ClientManager-DdqRofK6.js.map +1 -0
- package/dist/{Item-B1MH0tXx.js → Item-DmK1PgK9.js} +233 -330
- package/dist/Item-DmK1PgK9.js.map +1 -0
- package/dist/{ModelProperty-Dw6dHdu_.js → ModelProperty-DaJAII87.js} +33 -33
- package/dist/ModelProperty-DaJAII87.js.map +1 -0
- package/dist/{Schema-DppObO6h.js → Schema-DhlbBQs8.js} +49 -58
- package/dist/Schema-DhlbBQs8.js.map +1 -0
- package/dist/{SchemaValidationService-DXQ-D531.js → SchemaValidationService-9KHQAYQ4.js} +9 -9
- package/dist/SchemaValidationService-9KHQAYQ4.js.map +1 -0
- package/dist/{backfillMetadataPropertyIds-Uhzlwg9X.js → backfillMetadataPropertyIds-qoVxUEEl.js} +3 -3
- package/dist/{backfillMetadataPropertyIds-Uhzlwg9X.js.map → backfillMetadataPropertyIds-qoVxUEEl.js.map} +1 -1
- package/dist/{configurePlatform-CVoh3JeR.js → configurePlatform-CazqABrK.js} +2 -2
- package/dist/{configurePlatform-CVoh3JeR.js.map → configurePlatform-CazqABrK.js.map} +1 -1
- package/dist/{detachRowsBeforeDelete-CtmIFpgV.js → detachRowsBeforeDelete-yatbnC27.js} +2 -2
- package/dist/{detachRowsBeforeDelete-CtmIFpgV.js.map → detachRowsBeforeDelete-yatbnC27.js.map} +1 -1
- package/dist/{discardNewDraft-oGYdB5vS.js → discardNewDraft-q1krLqtL.js} +5 -5
- package/dist/{discardNewDraft-oGYdB5vS.js.map → discardNewDraft-q1krLqtL.js.map} +1 -1
- package/dist/dist/{ClientManager-D6YA20jP.d.ts → ClientManager-DdqRofK6.d.ts} +2 -1
- package/dist/dist/ClientManager-DdqRofK6.d.ts.map +1 -0
- package/dist/dist/{Item-B1MH0tXx.d.ts → Item-DmK1PgK9.d.ts} +16 -23
- package/dist/dist/Item-DmK1PgK9.d.ts.map +1 -0
- package/dist/dist/{ModelProperty-Dw6dHdu_.d.ts → ModelProperty-DaJAII87.d.ts} +1 -1
- package/dist/dist/{ModelProperty-Dw6dHdu_.d.ts.map → ModelProperty-DaJAII87.d.ts.map} +1 -1
- package/dist/dist/{Schema-DppObO6h.d.ts → Schema-DhlbBQs8.d.ts} +2 -2
- package/dist/dist/{Schema-DppObO6h.d.ts.map → Schema-DhlbBQs8.d.ts.map} +1 -1
- package/dist/dist/{SchemaValidationService-DXQ-D531.d.ts → SchemaValidationService-9KHQAYQ4.d.ts} +4 -4
- package/dist/dist/{SchemaValidationService-DXQ-D531.d.ts.map → SchemaValidationService-9KHQAYQ4.d.ts.map} +1 -1
- package/dist/dist/{backfillMetadataPropertyIds-Uhzlwg9X.d.ts → backfillMetadataPropertyIds-qoVxUEEl.d.ts} +1 -1
- package/dist/dist/backfillMetadataPropertyIds-qoVxUEEl.d.ts.map +1 -0
- package/dist/dist/{configurePlatform-CVoh3JeR.d.ts → configurePlatform-CazqABrK.d.ts} +1 -1
- package/dist/dist/configurePlatform-CazqABrK.d.ts.map +1 -0
- package/dist/dist/{detachRowsBeforeDelete-CtmIFpgV.d.ts → detachRowsBeforeDelete-yatbnC27.d.ts} +1 -1
- package/dist/dist/detachRowsBeforeDelete-yatbnC27.d.ts.map +1 -0
- package/dist/dist/{discardNewDraft-oGYdB5vS.d.ts → discardNewDraft-q1krLqtL.d.ts} +1 -1
- package/dist/dist/discardNewDraft-q1krLqtL.d.ts.map +1 -0
- package/dist/dist/{eas-CSm5wmry.d.ts → eas-CPYt-QVJ.d.ts} +1 -1
- package/dist/dist/eas-CPYt-QVJ.d.ts.map +1 -0
- package/dist/dist/{errors-3tc6XkCB.d.ts → errors-DuFqGrjo.d.ts} +21 -8
- package/dist/dist/errors-DuFqGrjo.d.ts.map +1 -0
- package/dist/dist/{getItem-DM3a-7XE.d.ts → getItem-DPapr9uy.d.ts} +1 -1
- package/dist/dist/getItem-DPapr9uy.d.ts.map +1 -0
- package/dist/dist/{getPublishPayload-CJF0k5d8.d.ts → getPublishPayload-Dnv38ZW1.d.ts} +1 -1
- package/dist/dist/getPublishPayload-Dnv38ZW1.d.ts.map +1 -0
- package/dist/dist/{getPublishUploads-C7-fYIgX.d.ts → getPublishUploads-Dd7dCxNi.d.ts} +1 -1
- package/dist/dist/{getPublishUploads-C7-fYIgX.d.ts.map → getPublishUploads-Dd7dCxNi.d.ts.map} +1 -1
- package/dist/dist/{index--mmQ3LQu.d.ts → index-CTidoFhC.d.ts} +5 -5
- package/dist/dist/index-CTidoFhC.d.ts.map +1 -0
- package/dist/dist/{index-CrvIcVFJ.d.ts → index-DeUHrBqA.d.ts} +8 -4
- package/dist/dist/index-DeUHrBqA.d.ts.map +1 -0
- package/dist/dist/{index-B7yAoYli.d.ts → index-PnK3Ak9Z.d.ts} +1 -1
- package/dist/dist/{index-B7yAoYli.d.ts.map → index-PnK3Ak9Z.d.ts.map} +1 -1
- package/dist/dist/{index.browser-BmVS-c2C.d.ts → index.browser-CRvkFEhl.d.ts} +4 -4
- package/dist/dist/{index.browser-BmVS-c2C.d.ts.map → index.browser-CRvkFEhl.d.ts.map} +1 -1
- package/dist/dist/{index.node-BKpbCAWt.d.ts → index.node-DQTc7kEl.d.ts} +1 -1
- package/dist/dist/{index.node-BKpbCAWt.d.ts.map → index.node-DQTc7kEl.d.ts.map} +1 -1
- package/dist/dist/platform.browser.d.ts +2 -2
- package/dist/dist/platform.node.d.ts +2 -2
- package/dist/dist/{property-DQ-Owzki.d.ts → property-Dk_5t4-p.d.ts} +3 -3
- package/dist/dist/property-Dk_5t4-p.d.ts.map +1 -0
- package/dist/dist/{propertyValidationRules-BDhFjlwP.d.ts → propertyValidationRules-BtUZdfft.d.ts} +1 -1
- package/dist/dist/propertyValidationRules-BtUZdfft.d.ts.map +1 -0
- package/dist/dist/{publishDraftGraph-CzPd9oe9.d.ts → publishDraftGraph-CN7EsPVb.d.ts} +1 -1
- package/dist/dist/{publishDraftGraph-CzPd9oe9.d.ts.map → publishDraftGraph-CN7EsPVb.d.ts.map} +1 -1
- package/dist/dist/{resetAmbiguousLegacyItemData-cXZm4NuG.d.ts → resetAmbiguousLegacyItemData-DzVlhD9u.d.ts} +1 -1
- package/dist/dist/resetAmbiguousLegacyItemData-DzVlhD9u.d.ts.map +1 -0
- package/dist/dist/{resolveModelForSyncedSeed-BgxtVCHI.d.ts → resolveModelForSyncedSeed-C_BzNN8r.d.ts} +1 -1
- package/dist/dist/resolveModelForSyncedSeed-C_BzNN8r.d.ts.map +1 -0
- package/dist/dist/{syncDbWithEas-Y5GysSCm.d.ts → syncDbWithEas-BMmxPq5o.d.ts} +1 -1
- package/dist/dist/syncDbWithEas-BMmxPq5o.d.ts.map +1 -0
- package/dist/dist/{tabEvents-D9x26vf2.d.ts → tabEvents-DyGJcILs.d.ts} +1 -1
- package/dist/dist/{tabEvents-D9x26vf2.d.ts.map → tabEvents-DyGJcILs.d.ts.map} +1 -1
- package/dist/dist/{tolerantWebAccess-BFU2t-SC.d.ts → tolerantWebAccess-Zxy2EUzu.d.ts} +1 -1
- package/dist/dist/{tolerantWebAccess-BFU2t-SC.d.ts.map → tolerantWebAccess-Zxy2EUzu.d.ts.map} +1 -1
- package/dist/dist/{updateSeedRevokedAt-CCF8WWYS.d.ts → updateSeedRevokedAt-DxhC4ABM.d.ts} +1 -1
- package/dist/dist/updateSeedRevokedAt-DxhC4ABM.d.ts.map +1 -0
- package/dist/{eas-CSm5wmry.js → eas-CPYt-QVJ.js} +4 -4
- package/dist/eas-CPYt-QVJ.js.map +1 -0
- package/dist/{errors-3tc6XkCB.js → errors-DuFqGrjo.js} +55 -41
- package/dist/errors-DuFqGrjo.js.map +1 -0
- package/dist/{getItem-DM3a-7XE.js → getItem-DPapr9uy.js} +4 -4
- package/dist/{getItem-DM3a-7XE.js.map → getItem-DPapr9uy.js.map} +1 -1
- package/dist/{getPublishPayload-CJF0k5d8.js → getPublishPayload-Dnv38ZW1.js} +16 -25
- package/dist/getPublishPayload-Dnv38ZW1.js.map +1 -0
- package/dist/{getPublishUploads-C7-fYIgX.js → getPublishUploads-Dd7dCxNi.js} +10 -10
- package/dist/getPublishUploads-Dd7dCxNi.js.map +1 -0
- package/dist/{index--mmQ3LQu.js → index-CTidoFhC.js} +9 -9
- package/dist/index-CTidoFhC.js.map +1 -0
- package/dist/{index-CrvIcVFJ.js → index-DeUHrBqA.js} +32 -15
- package/dist/index-DeUHrBqA.js.map +1 -0
- package/dist/{index-B7yAoYli.js → index-PnK3Ak9Z.js} +2 -2
- package/dist/index-PnK3Ak9Z.js.map +1 -0
- package/dist/{index.browser-BmVS-c2C.js → index.browser-CRvkFEhl.js} +26 -26
- package/dist/index.browser-CRvkFEhl.js.map +1 -0
- package/dist/{index.node-BKpbCAWt.js → index.node-DQTc7kEl.js} +7 -7
- package/dist/index.node-DQTc7kEl.js.map +1 -0
- package/dist/main.js +155 -26
- package/dist/main.js.map +1 -1
- package/dist/node.js +12 -12
- package/dist/node.js.map +1 -1
- package/dist/platform.browser.js +5 -5
- package/dist/platform.node.js +4 -4
- package/dist/{property-DQ-Owzki.js → property-Dk_5t4-p.js} +11 -11
- package/dist/property-Dk_5t4-p.js.map +1 -0
- package/dist/{propertyValidationRules-BDhFjlwP.js → propertyValidationRules-BtUZdfft.js} +6 -6
- package/dist/{propertyValidationRules-BDhFjlwP.js.map → propertyValidationRules-BtUZdfft.js.map} +1 -1
- package/dist/{publishDraftGraph-CzPd9oe9.js → publishDraftGraph-CN7EsPVb.js} +7 -7
- package/dist/publishDraftGraph-CN7EsPVb.js.map +1 -0
- package/dist/{resetAmbiguousLegacyItemData-cXZm4NuG.js → resetAmbiguousLegacyItemData-DzVlhD9u.js} +2 -2
- package/dist/{resetAmbiguousLegacyItemData-cXZm4NuG.js.map → resetAmbiguousLegacyItemData-DzVlhD9u.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-BgxtVCHI.js → resolveModelForSyncedSeed-C_BzNN8r.js} +2 -2
- package/dist/{resolveModelForSyncedSeed-BgxtVCHI.js.map → resolveModelForSyncedSeed-C_BzNN8r.js.map} +1 -1
- package/dist/src/Item/Item.d.ts +2 -2
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/Item/errors.d.ts +25 -0
- package/dist/src/Item/errors.d.ts.map +1 -1
- package/dist/src/Item/service/actors/loadOrCreateItem.d.ts.map +1 -1
- package/dist/src/Item/service/itemMachineSingle.d.ts.map +1 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts +14 -3
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/resolveRelatedValue.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/index.d.ts +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/index.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveFile.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveHtml.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveImage.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/propertyMachine.d.ts +1 -6
- package/dist/src/ItemProperty/service/propertyMachine.d.ts.map +1 -1
- package/dist/src/Model/Model.d.ts.map +1 -1
- package/dist/src/ModelProperty/ModelProperty.d.ts.map +1 -1
- package/dist/src/Schema/Schema.d.ts.map +1 -1
- package/dist/src/Schema/service/actors/loadOrCreateSchema.d.ts.map +1 -1
- package/dist/src/Schema/service/actors/writeSchemaToDb.d.ts.map +1 -1
- package/dist/src/Schema/service/validation/SchemaValidationService.d.ts +1 -1
- package/dist/src/Schema/service/validation/SchemaValidationService.d.ts.map +1 -1
- package/dist/src/Schema/validation.d.ts.map +1 -1
- package/dist/src/browser/db/Db.d.ts +1 -1
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/browser/helpers/PathResolver.d.ts +2 -2
- package/dist/src/browser/helpers/PathResolver.d.ts.map +1 -1
- package/dist/src/browser/seed.d.ts +1 -1
- package/dist/src/browser/seed.d.ts.map +1 -1
- package/dist/src/browser/workers/imageResize.d.ts.map +1 -1
- package/dist/src/client/BaseClientManager.d.ts +1 -1
- package/dist/src/client/BaseClientManager.d.ts.map +1 -1
- package/dist/src/client/ClientManager.d.ts +1 -0
- package/dist/src/client/ClientManager.d.ts.map +1 -1
- package/dist/src/client/actors/addModelsToDb.d.ts.map +1 -1
- package/dist/src/client/actors/fileSystemInit.d.ts.map +1 -1
- package/dist/src/client/actors/platformClassesInit.d.ts.map +1 -1
- package/dist/src/client/clientManagerMachine.d.ts.map +1 -1
- package/dist/src/client/constants.d.ts.map +1 -1
- package/dist/src/db/clearStoredDisplayUrls.d.ts +18 -0
- package/dist/src/db/clearStoredDisplayUrls.d.ts.map +1 -0
- package/dist/src/db/read/getItems.d.ts.map +1 -1
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/read/nameMatchLevels.d.ts +7 -3
- package/dist/src/db/read/nameMatchLevels.d.ts.map +1 -1
- package/dist/src/db/write/applyPropertyAttestationUidsFromPublish.d.ts +10 -0
- package/dist/src/db/write/applyPropertyAttestationUidsFromPublish.d.ts.map +1 -1
- package/dist/src/db/write/deleteItem.d.ts +4 -0
- package/dist/src/db/write/deleteItem.d.ts.map +1 -1
- package/dist/src/db/write/updateItemPropertyValue.d.ts.map +1 -1
- package/dist/src/eas.d.ts.map +1 -1
- package/dist/src/events/item/index.d.ts.map +1 -1
- package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/src/events/services/allItems.d.ts +1 -1
- package/dist/src/events/services/allItems.d.ts.map +1 -1
- package/dist/src/helpers/db.d.ts.map +1 -1
- package/dist/src/helpers/file/fetchAll/actors.d.ts.map +1 -1
- package/dist/src/helpers/file/fetchAll/index.d.ts.map +1 -1
- package/dist/src/helpers/schema.d.ts.map +1 -1
- package/dist/src/helpers/updateSchema.d.ts +1 -1
- package/dist/src/helpers/updateSchema.d.ts.map +1 -1
- package/dist/src/imports/json.d.ts.map +1 -1
- package/dist/src/imports/markdown.d.ts +1 -1
- package/dist/src/imports/markdown.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/IItem.d.ts +1 -1
- package/dist/src/interfaces/IItem.d.ts.map +1 -1
- package/dist/src/interfaces/IItemProperty.d.ts +5 -1
- package/dist/src/interfaces/IItemProperty.d.ts.map +1 -1
- package/dist/src/services/write/actors/validateEntity.d.ts.map +1 -1
- package/dist/src/services/write/writeProcessMachine.d.ts +3 -4
- package/dist/src/services/write/writeProcessMachine.d.ts.map +1 -1
- package/dist/src/types/fileManager.d.ts.map +1 -1
- package/dist/src/types/item.d.ts +5 -4
- package/dist/src/types/item.d.ts.map +1 -1
- package/dist/src/types/model.d.ts.map +1 -1
- package/dist/src/types/property.d.ts +5 -5
- package/dist/src/types/property.d.ts.map +1 -1
- package/dist/{syncDbWithEas-Y5GysSCm.js → syncDbWithEas-BMmxPq5o.js} +17 -18
- package/dist/syncDbWithEas-BMmxPq5o.js.map +1 -0
- package/dist/{tabEvents-D9x26vf2.js → tabEvents-DyGJcILs.js} +4 -4
- package/dist/{tabEvents-D9x26vf2.js.map → tabEvents-DyGJcILs.js.map} +1 -1
- package/dist/{tolerantWebAccess-BFU2t-SC.js → tolerantWebAccess-Zxy2EUzu.js} +6 -6
- package/dist/{tolerantWebAccess-BFU2t-SC.js.map → tolerantWebAccess-Zxy2EUzu.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-CCF8WWYS.js → updateSeedRevokedAt-DxhC4ABM.js} +3 -3
- package/dist/{updateSeedRevokedAt-CCF8WWYS.js.map → updateSeedRevokedAt-DxhC4ABM.js.map} +1 -1
- package/package.json +6 -6
- package/dist/ClientManager-D6YA20jP.js.map +0 -1
- package/dist/Item-B1MH0tXx.js.map +0 -1
- package/dist/ModelProperty-Dw6dHdu_.js.map +0 -1
- package/dist/Schema-DppObO6h.js.map +0 -1
- package/dist/SchemaValidationService-DXQ-D531.js.map +0 -1
- package/dist/dist/ClientManager-D6YA20jP.d.ts.map +0 -1
- package/dist/dist/Item-B1MH0tXx.d.ts.map +0 -1
- package/dist/dist/backfillMetadataPropertyIds-Uhzlwg9X.d.ts.map +0 -1
- package/dist/dist/configurePlatform-CVoh3JeR.d.ts.map +0 -1
- package/dist/dist/detachRowsBeforeDelete-CtmIFpgV.d.ts.map +0 -1
- package/dist/dist/discardNewDraft-oGYdB5vS.d.ts.map +0 -1
- package/dist/dist/eas-CSm5wmry.d.ts.map +0 -1
- package/dist/dist/errors-3tc6XkCB.d.ts.map +0 -1
- package/dist/dist/getItem-DM3a-7XE.d.ts.map +0 -1
- package/dist/dist/getPublishPayload-CJF0k5d8.d.ts.map +0 -1
- package/dist/dist/index--mmQ3LQu.d.ts.map +0 -1
- package/dist/dist/index-CrvIcVFJ.d.ts.map +0 -1
- package/dist/dist/property-DQ-Owzki.d.ts.map +0 -1
- package/dist/dist/propertyValidationRules-BDhFjlwP.d.ts.map +0 -1
- package/dist/dist/resetAmbiguousLegacyItemData-cXZm4NuG.d.ts.map +0 -1
- package/dist/dist/resolveModelForSyncedSeed-BgxtVCHI.d.ts.map +0 -1
- package/dist/dist/syncDbWithEas-Y5GysSCm.d.ts.map +0 -1
- package/dist/dist/updateSeedRevokedAt-CCF8WWYS.d.ts.map +0 -1
- package/dist/eas-CSm5wmry.js.map +0 -1
- package/dist/errors-3tc6XkCB.js.map +0 -1
- package/dist/getPublishPayload-CJF0k5d8.js.map +0 -1
- package/dist/getPublishUploads-C7-fYIgX.js.map +0 -1
- package/dist/index--mmQ3LQu.js.map +0 -1
- package/dist/index-B7yAoYli.js.map +0 -1
- package/dist/index-CrvIcVFJ.js.map +0 -1
- package/dist/index.browser-BmVS-c2C.js.map +0 -1
- package/dist/index.node-BKpbCAWt.js.map +0 -1
- package/dist/property-DQ-Owzki.js.map +0 -1
- package/dist/publishDraftGraph-CzPd9oe9.js.map +0 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveRelation.d.ts +0 -5
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveRelation.d.ts.map +0 -1
- package/dist/src/db/write/recoverDeletedItem.d.ts +0 -5
- package/dist/src/db/write/recoverDeletedItem.d.ts.map +0 -1
- package/dist/src/interfaces/IEasClient.d.ts +0 -3
- package/dist/src/interfaces/IEasClient.d.ts.map +0 -1
- package/dist/syncDbWithEas-Y5GysSCm.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { fromCallback, setup, assign, createActor } from 'xstate';
|
|
2
|
-
import { au as SEED_PROTOCOL_SCHEMA_NAME, B as BaseDb, A as schemas, aM as addSchemaToDb, i as isDataType, M as ModelPropertyDataTypes, ai as generateId, N as addModelsToDb, t as models, r as modelSchemas, v as properties, h as BaseFileManager, aP as loadModelsFromDbForSchema, aQ as mergeDbModelsIntoSchemaModels, aJ as isInternalSchema, aR as clearNameMatchLevels } from './index-
|
|
3
|
-
import { g as getRefValueType, J as createRowsWrittenSignal, K as createModelsFromJson, q as listCompleteSchemaFiles, L as getLatestSchemaVersion, l as loadSchemaFromFile, M as jsonPropertiesToSchemaProperties, u as loadAllSchemasFromDb, m as getClient } from './ClientManager-
|
|
2
|
+
import { au as SEED_PROTOCOL_SCHEMA_NAME, B as BaseDb, A as schemas, aM as addSchemaToDb, i as isDataType, M as ModelPropertyDataTypes, ai as generateId, N as addModelsToDb, t as models, r as modelSchemas, v as properties, h as BaseFileManager, aP as loadModelsFromDbForSchema, aQ as mergeDbModelsIntoSchemaModels, aJ as isInternalSchema, aR as clearNameMatchLevels } from './index-DeUHrBqA.js';
|
|
3
|
+
import { g as getRefValueType, J as createRowsWrittenSignal, K as createModelsFromJson, q as listCompleteSchemaFiles, L as getLatestSchemaVersion, l as loadSchemaFromFile, M as jsonPropertiesToSchemaProperties, u as loadAllSchemasFromDb, m as getClient } from './ClientManager-DdqRofK6.js';
|
|
4
4
|
import { eq, desc, and } from 'drizzle-orm';
|
|
5
5
|
import debug from 'debug';
|
|
6
|
-
import { c as currentEvictionEpoch, w as writeProcessMachine, t as trackDraftSave, M as Model, g as getDraftSaveError, C as ConflictError, r as recordSchemaDestroy, f as finishSchemaDestroy,
|
|
6
|
+
import { c as currentEvictionEpoch, w as writeProcessMachine, t as trackDraftSave, M as Model, g as getDraftSaveError, C as ConflictError, r as recordSchemaDestroy, f as finishSchemaDestroy, e as setupEntityLiveQuery } from './errors-DuFqGrjo.js';
|
|
7
7
|
import 'pluralize';
|
|
8
8
|
import '@seedprotocol/eas';
|
|
9
|
-
import { SchemaValidationService } from './SchemaValidationService-
|
|
10
|
-
import { D as DEFAULT_READY_TIMEOUT_MS, d as waitForEntityIdle, m as createReactiveProxy, n as findEntity, C as ClientManagerState, _ as clearDestroySubscriptions, o as forceRemoveFromCaches, $ as unloadEntity, q as runDestroyLifecycle } from './Item-
|
|
9
|
+
import { SchemaValidationService } from './SchemaValidationService-9KHQAYQ4.js';
|
|
10
|
+
import { D as DEFAULT_READY_TIMEOUT_MS, d as waitForEntityIdle, m as createReactiveProxy, n as findEntity, C as ClientManagerState, _ as clearDestroySubscriptions, o as forceRemoveFromCaches, $ as unloadEntity, q as runDestroyLifecycle } from './Item-DmK1PgK9.js';
|
|
11
11
|
|
|
12
12
|
const logger$d = debug('seedSdk:schema:actors:loadOrCreateSchema');
|
|
13
13
|
/**
|
|
@@ -51,8 +51,8 @@ const createModelInstances$2 = async (modelIds, evictionEpoch) => {
|
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
53
|
try {
|
|
54
|
-
const _mod_0 = await import('./errors-
|
|
55
|
-
const _ns_0 = _mod_0.
|
|
54
|
+
const _mod_0 = await import('./errors-DuFqGrjo.js');
|
|
55
|
+
const _ns_0 = _mod_0.j;
|
|
56
56
|
const modelMod = _ns_0;
|
|
57
57
|
const { Model } = modelMod;
|
|
58
58
|
// Create instances for all model IDs in parallel
|
|
@@ -168,7 +168,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
168
168
|
// For Seed Protocol, always load from internal file, never create new
|
|
169
169
|
logger$d(`Loading internal Seed Protocol schema from SDK`);
|
|
170
170
|
try {
|
|
171
|
-
const _mod_1 = await import('./ClientManager-
|
|
171
|
+
const _mod_1 = await import('./ClientManager-DdqRofK6.js');
|
|
172
172
|
const _ns_1 = _mod_1.S;
|
|
173
173
|
const internalSchema = _ns_1;
|
|
174
174
|
const schemaFile = internalSchema.default;
|
|
@@ -667,7 +667,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
667
667
|
// Ensure models are populated (fallback for seed-protocol if missing)
|
|
668
668
|
if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
|
|
669
669
|
try {
|
|
670
|
-
const _mod_2 = await import('./ClientManager-
|
|
670
|
+
const _mod_2 = await import('./ClientManager-DdqRofK6.js');
|
|
671
671
|
const _ns_2 = _mod_2.S;
|
|
672
672
|
const internalSchema = _ns_2;
|
|
673
673
|
const internalSchemaFile = internalSchema.default;
|
|
@@ -832,7 +832,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
832
832
|
// Ensure models are populated (fallback for seed-protocol if missing)
|
|
833
833
|
if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
|
|
834
834
|
try {
|
|
835
|
-
const _mod_3 = await import('./ClientManager-
|
|
835
|
+
const _mod_3 = await import('./ClientManager-DdqRofK6.js');
|
|
836
836
|
const _ns_3 = _mod_3.S;
|
|
837
837
|
const internalSchema = _ns_3;
|
|
838
838
|
const internalSchemaFile = internalSchema.default;
|
|
@@ -853,9 +853,6 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
853
853
|
mergedModels = mergeDbModelsIntoSchemaModels(mergedModels, dbModels);
|
|
854
854
|
}
|
|
855
855
|
}
|
|
856
|
-
// Create new schemaFile object with merged models (read-only approach)
|
|
857
|
-
({
|
|
858
|
-
...schemaFile});
|
|
859
856
|
logger$d(`Found existing schema ${schemaName} v${schemaFile.version} from file`);
|
|
860
857
|
// Debug: Log what we're sending
|
|
861
858
|
logger$d(`Sending schema with ${Object.keys(schemaFile.models || {}).length} models: ${Object.keys(schemaFile.models || {}).join(', ')}`);
|
|
@@ -890,7 +887,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
890
887
|
// Ensure models are populated (fallback for seed-protocol if missing)
|
|
891
888
|
if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
|
|
892
889
|
try {
|
|
893
|
-
const _mod_4 = await import('./ClientManager-
|
|
890
|
+
const _mod_4 = await import('./ClientManager-DdqRofK6.js');
|
|
894
891
|
const _ns_4 = _mod_4.S;
|
|
895
892
|
const internalSchema = _ns_4;
|
|
896
893
|
const internalSchemaFile = internalSchema.default;
|
|
@@ -911,11 +908,6 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
911
908
|
mergedModels = mergeDbModelsIntoSchemaModels(mergedModels, dbModels);
|
|
912
909
|
}
|
|
913
910
|
}
|
|
914
|
-
// Create new schemaFile object with merged models (read-only approach)
|
|
915
|
-
const finalSchemaFile = {
|
|
916
|
-
...schemaFile,
|
|
917
|
-
models: mergedModels,
|
|
918
|
-
};
|
|
919
911
|
// Query model IDs from database to populate _liveQueryModelIds immediately
|
|
920
912
|
let modelIds = [];
|
|
921
913
|
if (dbSchema.id) {
|
|
@@ -945,7 +937,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
945
937
|
// If schemaData is missing, try to load from internal schema file for seed-protocol
|
|
946
938
|
if (!dbSchema.schemaData && schemaName === 'Seed Protocol') {
|
|
947
939
|
try {
|
|
948
|
-
const _mod_5 = await import('./ClientManager-
|
|
940
|
+
const _mod_5 = await import('./ClientManager-DdqRofK6.js');
|
|
949
941
|
const _ns_5 = _mod_5.S;
|
|
950
942
|
const internalSchema = _ns_5;
|
|
951
943
|
const schemaFile = internalSchema.default;
|
|
@@ -1010,7 +1002,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1010
1002
|
break;
|
|
1011
1003
|
}
|
|
1012
1004
|
}
|
|
1013
|
-
catch
|
|
1005
|
+
catch {
|
|
1014
1006
|
continue;
|
|
1015
1007
|
}
|
|
1016
1008
|
}
|
|
@@ -1056,7 +1048,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1056
1048
|
// Ensure models are populated (fallback for seed-protocol if missing)
|
|
1057
1049
|
if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
|
|
1058
1050
|
try {
|
|
1059
|
-
const _mod_6 = await import('./ClientManager-
|
|
1051
|
+
const _mod_6 = await import('./ClientManager-DdqRofK6.js');
|
|
1060
1052
|
const _ns_6 = _mod_6.S;
|
|
1061
1053
|
const internalSchema = _ns_6;
|
|
1062
1054
|
const internalSchemaFile = internalSchema.default;
|
|
@@ -1383,8 +1375,8 @@ const createModelInstances$1 = async (modelIds, evictionEpoch) => {
|
|
|
1383
1375
|
return;
|
|
1384
1376
|
}
|
|
1385
1377
|
try {
|
|
1386
|
-
const _mod_7 = await import('./errors-
|
|
1387
|
-
const _ns_7 = _mod_7.
|
|
1378
|
+
const _mod_7 = await import('./errors-DuFqGrjo.js');
|
|
1379
|
+
const _ns_7 = _mod_7.j;
|
|
1388
1380
|
const mod = _ns_7;
|
|
1389
1381
|
const Model = mod?.Model ?? mod?.default;
|
|
1390
1382
|
if (!Model) {
|
|
@@ -1432,7 +1424,7 @@ const checkExistingSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1432
1424
|
if (isInternal && schemaName === SEED_PROTOCOL_SCHEMA_NAME) {
|
|
1433
1425
|
// For Seed Protocol, check if it exists in database
|
|
1434
1426
|
try {
|
|
1435
|
-
const _mod_8 = await import('./ClientManager-
|
|
1427
|
+
const _mod_8 = await import('./ClientManager-DdqRofK6.js');
|
|
1436
1428
|
const _ns_8 = _mod_8.S;
|
|
1437
1429
|
const internalSchema = _ns_8;
|
|
1438
1430
|
const schemaFile = internalSchema.default;
|
|
@@ -1547,7 +1539,7 @@ const checkExistingSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1547
1539
|
break;
|
|
1548
1540
|
}
|
|
1549
1541
|
}
|
|
1550
|
-
catch
|
|
1542
|
+
catch {
|
|
1551
1543
|
continue;
|
|
1552
1544
|
}
|
|
1553
1545
|
}
|
|
@@ -1673,7 +1665,7 @@ const checkExistingSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1673
1665
|
break;
|
|
1674
1666
|
}
|
|
1675
1667
|
}
|
|
1676
|
-
catch
|
|
1668
|
+
catch {
|
|
1677
1669
|
continue;
|
|
1678
1670
|
}
|
|
1679
1671
|
}
|
|
@@ -1768,7 +1760,7 @@ const writeSchemaToDb = fromCallback(({ sendBack, input }) => {
|
|
|
1768
1760
|
if (isInternal && schemaName === SEED_PROTOCOL_SCHEMA_NAME) {
|
|
1769
1761
|
// For Seed Protocol, load from internal file
|
|
1770
1762
|
logger$b(`Loading internal Seed Protocol schema from SDK`);
|
|
1771
|
-
const _mod_9 = await import('./ClientManager-
|
|
1763
|
+
const _mod_9 = await import('./ClientManager-DdqRofK6.js');
|
|
1772
1764
|
const _ns_9 = _mod_9.S;
|
|
1773
1765
|
const internalSchema = _ns_9;
|
|
1774
1766
|
finalSchema = internalSchema.default;
|
|
@@ -2231,7 +2223,7 @@ const logger$7 = debug('seedSdk:schema:actors:createModelInstances');
|
|
|
2231
2223
|
const createModelInstances = fromCallback(({ sendBack, input }) => {
|
|
2232
2224
|
const evictionEpoch = currentEvictionEpoch();
|
|
2233
2225
|
const _create = async () => {
|
|
2234
|
-
const { modelIds
|
|
2226
|
+
const { modelIds } = input;
|
|
2235
2227
|
if (modelIds.length === 0) {
|
|
2236
2228
|
logger$7('No model IDs provided, skipping instance creation');
|
|
2237
2229
|
sendBack({
|
|
@@ -2241,8 +2233,8 @@ const createModelInstances = fromCallback(({ sendBack, input }) => {
|
|
|
2241
2233
|
return;
|
|
2242
2234
|
}
|
|
2243
2235
|
try {
|
|
2244
|
-
const _mod_10 = await import('./errors-
|
|
2245
|
-
const _ns_10 = _mod_10.
|
|
2236
|
+
const _mod_10 = await import('./errors-DuFqGrjo.js');
|
|
2237
|
+
const _ns_10 = _mod_10.j;
|
|
2246
2238
|
const modelMod = _ns_10;
|
|
2247
2239
|
const { Model } = modelMod;
|
|
2248
2240
|
// Create instances for all model IDs in parallel
|
|
@@ -2330,8 +2322,8 @@ const verifyModelInstancesInCache = fromCallback(({ sendBack, input }) => {
|
|
|
2330
2322
|
}
|
|
2331
2323
|
try {
|
|
2332
2324
|
const result = await verifyWithRetry$2(async () => {
|
|
2333
|
-
const _mod_11 = await import('./errors-
|
|
2334
|
-
const _ns_11 = _mod_11.
|
|
2325
|
+
const _mod_11 = await import('./errors-DuFqGrjo.js');
|
|
2326
|
+
const _ns_11 = _mod_11.j;
|
|
2335
2327
|
const modelMod = _ns_11;
|
|
2336
2328
|
const { Model } = modelMod;
|
|
2337
2329
|
// Check each model ID in the cache
|
|
@@ -2389,7 +2381,7 @@ const writePropertiesToDb = fromCallback(({ sendBack, input }) => {
|
|
|
2389
2381
|
const _write = async () => {
|
|
2390
2382
|
const { modelIds } = input;
|
|
2391
2383
|
try {
|
|
2392
|
-
const _mod_12 = await import('./index-
|
|
2384
|
+
const _mod_12 = await import('./index-DeUHrBqA.js');
|
|
2393
2385
|
const _ns_12 = _mod_12.bd;
|
|
2394
2386
|
const modelSchemaMod = _ns_12;
|
|
2395
2387
|
const { models: modelsTable, properties: propertiesTable } = modelSchemaMod;
|
|
@@ -2579,10 +2571,10 @@ const createPropertyInstances = fromCallback(({ sendBack, input }) => {
|
|
|
2579
2571
|
return;
|
|
2580
2572
|
}
|
|
2581
2573
|
try {
|
|
2582
|
-
const modProp = await import('./ModelProperty-
|
|
2574
|
+
const modProp = await import('./ModelProperty-DaJAII87.js');
|
|
2583
2575
|
const ModelProperty = modProp?.ModelProperty ?? modProp?.default;
|
|
2584
|
-
const _mod_13 = await import('./errors-
|
|
2585
|
-
const _ns_13 = _mod_13.
|
|
2576
|
+
const _mod_13 = await import('./errors-DuFqGrjo.js');
|
|
2577
|
+
const _ns_13 = _mod_13.j;
|
|
2586
2578
|
const modModel = _ns_13;
|
|
2587
2579
|
const Model = modModel?.Model ?? modModel?.default;
|
|
2588
2580
|
if (!ModelProperty || !Model) {
|
|
@@ -2688,7 +2680,7 @@ const verifyPropertyInstancesInCache = fromCallback(({ sendBack, input }) => {
|
|
|
2688
2680
|
}
|
|
2689
2681
|
try {
|
|
2690
2682
|
const result = await verifyWithRetry(async () => {
|
|
2691
|
-
const mod = await import('./ModelProperty-
|
|
2683
|
+
const mod = await import('./ModelProperty-DaJAII87.js');
|
|
2692
2684
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
2693
2685
|
if (!ModelProperty) {
|
|
2694
2686
|
throw new Error('ModelProperty not available from dynamic import');
|
|
@@ -2810,7 +2802,7 @@ const schemaMachine = setup({
|
|
|
2810
2802
|
target: '.validating',
|
|
2811
2803
|
},
|
|
2812
2804
|
validationSuccess: {
|
|
2813
|
-
actions: assign(({ context
|
|
2805
|
+
actions: assign(({ context }) => ({
|
|
2814
2806
|
...context,
|
|
2815
2807
|
_validationErrors: [],
|
|
2816
2808
|
})),
|
|
@@ -3708,7 +3700,7 @@ async function loadSchemaWithRenames(schemaFilePath, modelRenames) {
|
|
|
3708
3700
|
updatedAt: new Date(schemaFile.metadata.updatedAt).getTime(),
|
|
3709
3701
|
};
|
|
3710
3702
|
// Use dynamic import to break circular dependency
|
|
3711
|
-
const _mod_14 = await import('./index-
|
|
3703
|
+
const _mod_14 = await import('./index-DeUHrBqA.js');
|
|
3712
3704
|
const _ns_14 = _mod_14.bi;
|
|
3713
3705
|
const dbMod = _ns_14;
|
|
3714
3706
|
const { addSchemaToDb, addModelsToDb } = dbMod;
|
|
@@ -3832,7 +3824,7 @@ async function renameModelProperty(schemaName, modelName, oldPropertyName, newPr
|
|
|
3832
3824
|
await BaseFileManager.waitForFileWithContent(newFilePath);
|
|
3833
3825
|
logger$1(`Renamed property ${oldPropertyName} to ${newPropertyName} in schema ${schemaName} v${newVersion}`);
|
|
3834
3826
|
// Migrate metadata rows so ItemProperty values follow the new name (prevents duplicate ItemProperties)
|
|
3835
|
-
const _mod_15 = await import('./index-
|
|
3827
|
+
const _mod_15 = await import('./index-DeUHrBqA.js');
|
|
3836
3828
|
const _ns_15 = _mod_15.bi;
|
|
3837
3829
|
const { migrateMetadataForPropertyRename } = _ns_15;
|
|
3838
3830
|
const migratedCount = await migrateMetadataForPropertyRename(modelName, oldPropertyName, newPropertyName, oldProperty.id, { schemaName });
|
|
@@ -4000,7 +3992,7 @@ async function deleteModelFromSchema(schemaName, modelName, options = {}) {
|
|
|
4000
3992
|
* @returns The file path of the new schema version
|
|
4001
3993
|
* @throws Error if schema, model, or property not found
|
|
4002
3994
|
*/
|
|
4003
|
-
async function deletePropertyFromModel(schemaName, modelName, propertyName,
|
|
3995
|
+
async function deletePropertyFromModel(schemaName, modelName, propertyName, _options = {}) {
|
|
4004
3996
|
// Get the latest version
|
|
4005
3997
|
const latestVersion = await getLatestSchemaVersion(schemaName);
|
|
4006
3998
|
if (latestVersion === 0) {
|
|
@@ -4447,7 +4439,7 @@ class Schema {
|
|
|
4447
4439
|
try {
|
|
4448
4440
|
instance.unload();
|
|
4449
4441
|
}
|
|
4450
|
-
catch
|
|
4442
|
+
catch {
|
|
4451
4443
|
// Ignore errors during cleanup (instance might already be unloaded)
|
|
4452
4444
|
}
|
|
4453
4445
|
}
|
|
@@ -4512,7 +4504,7 @@ class Schema {
|
|
|
4512
4504
|
readyTimeout,
|
|
4513
4505
|
});
|
|
4514
4506
|
}
|
|
4515
|
-
catch
|
|
4507
|
+
catch {
|
|
4516
4508
|
return undefined;
|
|
4517
4509
|
}
|
|
4518
4510
|
}
|
|
@@ -4608,7 +4600,7 @@ class Schema {
|
|
|
4608
4600
|
const instance = await this.createById(schemaFileId);
|
|
4609
4601
|
schemaInstances.push(instance);
|
|
4610
4602
|
}
|
|
4611
|
-
catch
|
|
4603
|
+
catch {
|
|
4612
4604
|
// Fallback to creating by name if createById fails
|
|
4613
4605
|
schemaInstances.push(this.create(schemaName, { waitForReady: false }));
|
|
4614
4606
|
}
|
|
@@ -4829,7 +4821,7 @@ class Schema {
|
|
|
4829
4821
|
const modelDbId = modelInstance.getService().getSnapshot().context._dbId;
|
|
4830
4822
|
const db = BaseDb.getAppDb();
|
|
4831
4823
|
if (propertyContexts.length === 0 && modelDbId && db) {
|
|
4832
|
-
const { ModelProperty } = await import('./ModelProperty-
|
|
4824
|
+
const { ModelProperty } = await import('./ModelProperty-DaJAII87.js');
|
|
4833
4825
|
const rows = await db.select().from(properties).where(eq(properties.modelId, modelDbId));
|
|
4834
4826
|
propertyContexts = rows.map((row) => {
|
|
4835
4827
|
const cached = row.schemaFileId ? ModelProperty.getById(row.schemaFileId) : undefined;
|
|
@@ -4995,7 +4987,7 @@ class Schema {
|
|
|
4995
4987
|
savedSchema: publishedSchema,
|
|
4996
4988
|
});
|
|
4997
4989
|
// Clear edited flags on all ModelProperty instances and in database
|
|
4998
|
-
const modelPropertyMod = await import('./ModelProperty-
|
|
4990
|
+
const modelPropertyMod = await import('./ModelProperty-DaJAII87.js');
|
|
4999
4991
|
const { ModelProperty } = modelPropertyMod;
|
|
5000
4992
|
for (const propertyKey of context._editedProperties) {
|
|
5001
4993
|
const [modelName, propertyName] = propertyKey.split(':');
|
|
@@ -5010,7 +5002,6 @@ class Schema {
|
|
|
5010
5002
|
});
|
|
5011
5003
|
if (cachedInstance) {
|
|
5012
5004
|
const modelProperty = cachedInstance.instance;
|
|
5013
|
-
modelProperty.getService().getSnapshot().context;
|
|
5014
5005
|
// Update original values to current values and clear edited flag
|
|
5015
5006
|
modelProperty.getService().send({
|
|
5016
5007
|
type: 'clearEdited',
|
|
@@ -5019,7 +5010,7 @@ class Schema {
|
|
|
5019
5010
|
try {
|
|
5020
5011
|
if (db && modelName && propertyName) {
|
|
5021
5012
|
// Find this schema's model by name
|
|
5022
|
-
const _mod_16 = await import('./index-
|
|
5013
|
+
const _mod_16 = await import('./index-DeUHrBqA.js');
|
|
5023
5014
|
const _ns_16 = _mod_16.bh;
|
|
5024
5015
|
const { resolveModelRecord } = _ns_16;
|
|
5025
5016
|
const modelRecord = await resolveModelRecord(modelName, { schemaName: thisSchemaName }, db);
|
|
@@ -5221,7 +5212,7 @@ class Schema {
|
|
|
5221
5212
|
try {
|
|
5222
5213
|
context = this._getSnapshotContext();
|
|
5223
5214
|
}
|
|
5224
|
-
catch
|
|
5215
|
+
catch {
|
|
5225
5216
|
// Service might be stopped, build context from what we know
|
|
5226
5217
|
logger(`Service stopped, building context from available data`);
|
|
5227
5218
|
context = {
|
|
@@ -5468,7 +5459,7 @@ class Schema {
|
|
|
5468
5459
|
});
|
|
5469
5460
|
}
|
|
5470
5461
|
}
|
|
5471
|
-
catch
|
|
5462
|
+
catch {
|
|
5472
5463
|
// Service might be stopped, ignore
|
|
5473
5464
|
}
|
|
5474
5465
|
logger(`Successfully updated schema name from "${oldName}" to "${finalNewName}" in database (found by old name)`);
|
|
@@ -5510,7 +5501,7 @@ class Schema {
|
|
|
5510
5501
|
});
|
|
5511
5502
|
}
|
|
5512
5503
|
}
|
|
5513
|
-
catch
|
|
5504
|
+
catch {
|
|
5514
5505
|
// Service might be stopped, ignore
|
|
5515
5506
|
}
|
|
5516
5507
|
saveDraftLogger(`Successfully saved draft schema "${finalNewName}" to database (key: ${saveKey})`);
|
|
@@ -5649,11 +5640,11 @@ class Schema {
|
|
|
5649
5640
|
// instances too, or a re-import would get them back with dangling _dbIds.
|
|
5650
5641
|
if (schemaName) {
|
|
5651
5642
|
const evictedModelNames = Model.evictForSchema(schemaName);
|
|
5652
|
-
const { ModelProperty } = await import('./ModelProperty-
|
|
5643
|
+
const { ModelProperty } = await import('./ModelProperty-DaJAII87.js');
|
|
5653
5644
|
ModelProperty.evictForModels(evictedModelNames, schemaName);
|
|
5654
5645
|
// Evicting stops new writes but not ones already running; let those land before deleting their rows
|
|
5655
|
-
const _mod_17 = await import('./errors-
|
|
5656
|
-
const _ns_17 = _mod_17.
|
|
5646
|
+
const _mod_17 = await import('./errors-DuFqGrjo.js');
|
|
5647
|
+
const _ns_17 = _mod_17.h;
|
|
5657
5648
|
const { waitForInFlightWrites } = _ns_17;
|
|
5658
5649
|
await waitForInFlightWrites();
|
|
5659
5650
|
}
|
|
@@ -5685,7 +5676,7 @@ class Schema {
|
|
|
5685
5676
|
.map((r) => r.modelId)
|
|
5686
5677
|
.filter((id) => id != null)),
|
|
5687
5678
|
];
|
|
5688
|
-
const { detachModelRows } = await import('./detachRowsBeforeDelete-
|
|
5679
|
+
const { detachModelRows } = await import('./detachRowsBeforeDelete-yatbnC27.js');
|
|
5689
5680
|
await detachModelRows(db, modelIds);
|
|
5690
5681
|
await db.delete(modelSchemas).where(inArray(modelSchemas.schemaId, schemaIds));
|
|
5691
5682
|
for (const modelId of modelIds) {
|
|
@@ -5700,7 +5691,7 @@ class Schema {
|
|
|
5700
5691
|
// the destroyed schema back on the next Schema.all().
|
|
5701
5692
|
// Match on name as well as id: versions imported from complete schema files can each
|
|
5702
5693
|
// have their own id, and any version left behind would bring the schema back.
|
|
5703
|
-
const _mod_18 = await import('./ClientManager-
|
|
5694
|
+
const _mod_18 = await import('./ClientManager-DdqRofK6.js');
|
|
5704
5695
|
const _ns_18 = _mod_18.N;
|
|
5705
5696
|
const { listCompleteSchemaFiles } = _ns_18;
|
|
5706
5697
|
const files = await listCompleteSchemaFiles().catch(() => []);
|
|
@@ -5896,4 +5887,4 @@ var Schema$1 = /*#__PURE__*/Object.freeze({
|
|
|
5896
5887
|
});
|
|
5897
5888
|
|
|
5898
5889
|
export { Schema as S, deletePropertyFromModel as a, Schema$1 as b, deleteModelFromSchema as d, renameModelProperty as r, schemaMachine as s, updateModelProperties as u };
|
|
5899
|
-
//# sourceMappingURL=Schema-
|
|
5890
|
+
//# sourceMappingURL=Schema-DhlbBQs8.js.map
|