@seedprotocol/sdk 0.7.6 → 0.7.7
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-2GtDWHq6.js} +297 -218
- package/dist/ClientManager-2GtDWHq6.js.map +1 -0
- package/dist/{Item-B1MH0tXx.js → Item-D6j0IvBP.js} +233 -330
- package/dist/Item-D6j0IvBP.js.map +1 -0
- package/dist/{ModelProperty-Dw6dHdu_.js → ModelProperty-B52C3CQ2.js} +33 -33
- package/dist/ModelProperty-B52C3CQ2.js.map +1 -0
- package/dist/{Schema-DppObO6h.js → Schema-O1QLoXv6.js} +49 -58
- package/dist/Schema-O1QLoXv6.js.map +1 -0
- package/dist/{SchemaValidationService-DXQ-D531.js → SchemaValidationService-BxCbfDaI.js} +9 -9
- package/dist/SchemaValidationService-BxCbfDaI.js.map +1 -0
- package/dist/{backfillMetadataPropertyIds-Uhzlwg9X.js → backfillMetadataPropertyIds-CzSbuucw.js} +3 -3
- package/dist/{backfillMetadataPropertyIds-Uhzlwg9X.js.map → backfillMetadataPropertyIds-CzSbuucw.js.map} +1 -1
- package/dist/{configurePlatform-CVoh3JeR.js → configurePlatform-Bbpw_R4y.js} +2 -2
- package/dist/{configurePlatform-CVoh3JeR.js.map → configurePlatform-Bbpw_R4y.js.map} +1 -1
- package/dist/{detachRowsBeforeDelete-CtmIFpgV.js → detachRowsBeforeDelete-D1TyEMco.js} +2 -2
- package/dist/{detachRowsBeforeDelete-CtmIFpgV.js.map → detachRowsBeforeDelete-D1TyEMco.js.map} +1 -1
- package/dist/{discardNewDraft-oGYdB5vS.js → discardNewDraft-hiVaUVjV.js} +5 -5
- package/dist/{discardNewDraft-oGYdB5vS.js.map → discardNewDraft-hiVaUVjV.js.map} +1 -1
- package/dist/dist/{ClientManager-D6YA20jP.d.ts → ClientManager-2GtDWHq6.d.ts} +2 -1
- package/dist/dist/ClientManager-2GtDWHq6.d.ts.map +1 -0
- package/dist/dist/{Item-B1MH0tXx.d.ts → Item-D6j0IvBP.d.ts} +16 -23
- package/dist/dist/Item-D6j0IvBP.d.ts.map +1 -0
- package/dist/dist/{ModelProperty-Dw6dHdu_.d.ts → ModelProperty-B52C3CQ2.d.ts} +1 -1
- package/dist/dist/{ModelProperty-Dw6dHdu_.d.ts.map → ModelProperty-B52C3CQ2.d.ts.map} +1 -1
- package/dist/dist/{Schema-DppObO6h.d.ts → Schema-O1QLoXv6.d.ts} +2 -2
- package/dist/dist/{Schema-DppObO6h.d.ts.map → Schema-O1QLoXv6.d.ts.map} +1 -1
- package/dist/dist/{SchemaValidationService-DXQ-D531.d.ts → SchemaValidationService-BxCbfDaI.d.ts} +4 -4
- package/dist/dist/{SchemaValidationService-DXQ-D531.d.ts.map → SchemaValidationService-BxCbfDaI.d.ts.map} +1 -1
- package/dist/dist/{backfillMetadataPropertyIds-Uhzlwg9X.d.ts → backfillMetadataPropertyIds-CzSbuucw.d.ts} +1 -1
- package/dist/dist/backfillMetadataPropertyIds-CzSbuucw.d.ts.map +1 -0
- package/dist/dist/{configurePlatform-CVoh3JeR.d.ts → configurePlatform-Bbpw_R4y.d.ts} +1 -1
- package/dist/dist/configurePlatform-Bbpw_R4y.d.ts.map +1 -0
- package/dist/dist/{detachRowsBeforeDelete-CtmIFpgV.d.ts → detachRowsBeforeDelete-D1TyEMco.d.ts} +1 -1
- package/dist/dist/detachRowsBeforeDelete-D1TyEMco.d.ts.map +1 -0
- package/dist/dist/{discardNewDraft-oGYdB5vS.d.ts → discardNewDraft-hiVaUVjV.d.ts} +1 -1
- package/dist/dist/discardNewDraft-hiVaUVjV.d.ts.map +1 -0
- package/dist/dist/{eas-CSm5wmry.d.ts → eas-DOdj-EMK.d.ts} +1 -1
- package/dist/dist/eas-DOdj-EMK.d.ts.map +1 -0
- package/dist/dist/{errors-3tc6XkCB.d.ts → errors-KM-yq2MD.d.ts} +21 -8
- package/dist/dist/errors-KM-yq2MD.d.ts.map +1 -0
- package/dist/dist/{getItem-DM3a-7XE.d.ts → getItem-Bh0zv-o1.d.ts} +1 -1
- package/dist/dist/getItem-Bh0zv-o1.d.ts.map +1 -0
- package/dist/dist/{getPublishPayload-CJF0k5d8.d.ts → getPublishPayload-oH8wJhnH.d.ts} +1 -1
- package/dist/dist/getPublishPayload-oH8wJhnH.d.ts.map +1 -0
- package/dist/dist/{getPublishUploads-C7-fYIgX.d.ts → getPublishUploads-Cex-NBe6.d.ts} +1 -1
- package/dist/dist/{getPublishUploads-C7-fYIgX.d.ts.map → getPublishUploads-Cex-NBe6.d.ts.map} +1 -1
- package/dist/dist/{index--mmQ3LQu.d.ts → index-BAao3_Po.d.ts} +5 -5
- package/dist/dist/index-BAao3_Po.d.ts.map +1 -0
- package/dist/dist/{index-B7yAoYli.d.ts → index-BbFwftAv.d.ts} +1 -1
- package/dist/dist/{index-B7yAoYli.d.ts.map → index-BbFwftAv.d.ts.map} +1 -1
- package/dist/dist/{index-CrvIcVFJ.d.ts → index-DpgQMIRq.d.ts} +8 -4
- package/dist/dist/index-DpgQMIRq.d.ts.map +1 -0
- package/dist/dist/{index.browser-BmVS-c2C.d.ts → index.browser-nndbVM7z.d.ts} +4 -4
- package/dist/dist/{index.browser-BmVS-c2C.d.ts.map → index.browser-nndbVM7z.d.ts.map} +1 -1
- package/dist/dist/{index.node-BKpbCAWt.d.ts → index.node-BUfx-JaP.d.ts} +1 -1
- package/dist/dist/{index.node-BKpbCAWt.d.ts.map → index.node-BUfx-JaP.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-BDBvImLs.d.ts} +3 -3
- package/dist/dist/property-BDBvImLs.d.ts.map +1 -0
- package/dist/dist/{propertyValidationRules-BDhFjlwP.d.ts → propertyValidationRules-BlfLn4rP.d.ts} +1 -1
- package/dist/dist/propertyValidationRules-BlfLn4rP.d.ts.map +1 -0
- package/dist/dist/{publishDraftGraph-CzPd9oe9.d.ts → publishDraftGraph-CLO85LLz.d.ts} +1 -1
- package/dist/dist/{publishDraftGraph-CzPd9oe9.d.ts.map → publishDraftGraph-CLO85LLz.d.ts.map} +1 -1
- package/dist/dist/{resetAmbiguousLegacyItemData-cXZm4NuG.d.ts → resetAmbiguousLegacyItemData-Cy8ik7xk.d.ts} +1 -1
- package/dist/dist/resetAmbiguousLegacyItemData-Cy8ik7xk.d.ts.map +1 -0
- package/dist/dist/{resolveModelForSyncedSeed-BgxtVCHI.d.ts → resolveModelForSyncedSeed-DFr4COc4.d.ts} +3 -3
- package/dist/dist/resolveModelForSyncedSeed-DFr4COc4.d.ts.map +1 -0
- package/dist/dist/{syncDbWithEas-Y5GysSCm.d.ts → syncDbWithEas-CAOlw3i-.d.ts} +1 -1
- package/dist/dist/syncDbWithEas-CAOlw3i-.d.ts.map +1 -0
- package/dist/dist/{tabEvents-D9x26vf2.d.ts → tabEvents-DksXwk3X.d.ts} +1 -1
- package/dist/dist/{tabEvents-D9x26vf2.d.ts.map → tabEvents-DksXwk3X.d.ts.map} +1 -1
- package/dist/dist/{tolerantWebAccess-BFU2t-SC.d.ts → tolerantWebAccess-CEIjFGf0.d.ts} +1 -1
- package/dist/dist/{tolerantWebAccess-BFU2t-SC.d.ts.map → tolerantWebAccess-CEIjFGf0.d.ts.map} +1 -1
- package/dist/dist/{updateSeedRevokedAt-CCF8WWYS.d.ts → updateSeedRevokedAt-Cjr35YjE.d.ts} +1 -1
- package/dist/dist/updateSeedRevokedAt-Cjr35YjE.d.ts.map +1 -0
- package/dist/{eas-CSm5wmry.js → eas-DOdj-EMK.js} +4 -4
- package/dist/eas-DOdj-EMK.js.map +1 -0
- package/dist/{errors-3tc6XkCB.js → errors-KM-yq2MD.js} +55 -41
- package/dist/errors-KM-yq2MD.js.map +1 -0
- package/dist/{getItem-DM3a-7XE.js → getItem-Bh0zv-o1.js} +4 -4
- package/dist/{getItem-DM3a-7XE.js.map → getItem-Bh0zv-o1.js.map} +1 -1
- package/dist/{getPublishPayload-CJF0k5d8.js → getPublishPayload-oH8wJhnH.js} +16 -25
- package/dist/getPublishPayload-oH8wJhnH.js.map +1 -0
- package/dist/{getPublishUploads-C7-fYIgX.js → getPublishUploads-Cex-NBe6.js} +10 -10
- package/dist/getPublishUploads-Cex-NBe6.js.map +1 -0
- package/dist/{index--mmQ3LQu.js → index-BAao3_Po.js} +9 -9
- package/dist/index-BAao3_Po.js.map +1 -0
- package/dist/{index-B7yAoYli.js → index-BbFwftAv.js} +2 -2
- package/dist/index-BbFwftAv.js.map +1 -0
- package/dist/{index-CrvIcVFJ.js → index-DpgQMIRq.js} +32 -15
- package/dist/index-DpgQMIRq.js.map +1 -0
- package/dist/{index.browser-BmVS-c2C.js → index.browser-nndbVM7z.js} +26 -28
- package/dist/index.browser-nndbVM7z.js.map +1 -0
- package/dist/{index.node-BKpbCAWt.js → index.node-BUfx-JaP.js} +7 -7
- package/dist/index.node-BUfx-JaP.js.map +1 -0
- package/dist/main.js +155 -26
- package/dist/main.js.map +1 -1
- package/dist/node.js +13 -13
- 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-BDBvImLs.js} +11 -11
- package/dist/property-BDBvImLs.js.map +1 -0
- package/dist/{propertyValidationRules-BDhFjlwP.js → propertyValidationRules-BlfLn4rP.js} +6 -6
- package/dist/{propertyValidationRules-BDhFjlwP.js.map → propertyValidationRules-BlfLn4rP.js.map} +1 -1
- package/dist/{publishDraftGraph-CzPd9oe9.js → publishDraftGraph-CLO85LLz.js} +7 -7
- package/dist/publishDraftGraph-CLO85LLz.js.map +1 -0
- package/dist/{resetAmbiguousLegacyItemData-cXZm4NuG.js → resetAmbiguousLegacyItemData-Cy8ik7xk.js} +2 -2
- package/dist/{resetAmbiguousLegacyItemData-cXZm4NuG.js.map → resetAmbiguousLegacyItemData-Cy8ik7xk.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-BgxtVCHI.js → resolveModelForSyncedSeed-DFr4COc4.js} +4 -4
- package/dist/resolveModelForSyncedSeed-DFr4COc4.js.map +1 -0
- 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/read/resolveModelForSyncedSeed.d.ts +2 -2
- 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/node/helpers/scripts.d.ts +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-CAOlw3i-.js} +17 -18
- package/dist/syncDbWithEas-CAOlw3i-.js.map +1 -0
- package/dist/{tabEvents-D9x26vf2.js → tabEvents-DksXwk3X.js} +4 -4
- package/dist/{tabEvents-D9x26vf2.js.map → tabEvents-DksXwk3X.js.map} +1 -1
- package/dist/{tolerantWebAccess-BFU2t-SC.js → tolerantWebAccess-CEIjFGf0.js} +6 -6
- package/dist/{tolerantWebAccess-BFU2t-SC.js.map → tolerantWebAccess-CEIjFGf0.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-CCF8WWYS.js → updateSeedRevokedAt-Cjr35YjE.js} +3 -3
- package/dist/{updateSeedRevokedAt-CCF8WWYS.js.map → updateSeedRevokedAt-Cjr35YjE.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/resolveModelForSyncedSeed-BgxtVCHI.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,19 +1,19 @@
|
|
|
1
1
|
import { Value } from '@sinclair/typebox/value';
|
|
2
|
-
import './errors-
|
|
3
|
-
import { M as ModelPropertyDataTypes, c as TPropertyDataType, n as normalizeDataType, a as TProperty, D as DEFAULT_TEXT_MAX_LENGTH, i as isDataType } from './index-
|
|
2
|
+
import './errors-KM-yq2MD.js';
|
|
3
|
+
import { M as ModelPropertyDataTypes, c as TPropertyDataType, n as normalizeDataType, a as TProperty, D as DEFAULT_TEXT_MAX_LENGTH, i as isDataType } from './index-DpgQMIRq.js';
|
|
4
4
|
import 'pluralize';
|
|
5
5
|
import '@seedprotocol/eas';
|
|
6
6
|
import 'drizzle-orm';
|
|
7
7
|
import { Type, FormatRegistry } from '@sinclair/typebox';
|
|
8
8
|
import debug from 'debug';
|
|
9
9
|
import 'xstate';
|
|
10
|
-
import './Item-
|
|
10
|
+
import './Item-D6j0IvBP.js';
|
|
11
11
|
import 'rxjs';
|
|
12
12
|
import 'lodash-es';
|
|
13
13
|
import '@seedprotocol/arweave';
|
|
14
|
-
import './tabEvents-
|
|
14
|
+
import './tabEvents-DksXwk3X.js';
|
|
15
15
|
import './model-oHA3YhOd.js';
|
|
16
|
-
import './ClientManager-
|
|
16
|
+
import './ClientManager-2GtDWHq6.js';
|
|
17
17
|
import '@noble/hashes/sha3';
|
|
18
18
|
import '@noble/hashes/utils';
|
|
19
19
|
import '@seedprotocol/query';
|
|
@@ -121,7 +121,7 @@ class SchemaValidationService {
|
|
|
121
121
|
/**
|
|
122
122
|
* Extract literal value from a schema
|
|
123
123
|
*/
|
|
124
|
-
extractLiteralValue(schema,
|
|
124
|
+
extractLiteralValue(schema, _fieldPath) {
|
|
125
125
|
try {
|
|
126
126
|
if (schema && typeof schema === 'object') {
|
|
127
127
|
const schemaObj = schema;
|
|
@@ -627,7 +627,7 @@ class SchemaValidationService {
|
|
|
627
627
|
/**
|
|
628
628
|
* Validate a model within a schema (requires model to already be in schema context)
|
|
629
629
|
*/
|
|
630
|
-
validateModel(schema, modelName,
|
|
630
|
+
validateModel(schema, modelName, _modelData) {
|
|
631
631
|
const errors = [];
|
|
632
632
|
if (!schema.models || !schema.models[modelName]) {
|
|
633
633
|
errors.push({
|
|
@@ -641,7 +641,7 @@ class SchemaValidationService {
|
|
|
641
641
|
const model = schema.models[modelName];
|
|
642
642
|
// Validate all properties in the model
|
|
643
643
|
if (model.properties) {
|
|
644
|
-
for (const
|
|
644
|
+
for (const propertyName of Object.keys(model.properties)) {
|
|
645
645
|
const propertyResult = this.validateProperty(schema, modelName, propertyName);
|
|
646
646
|
if (!propertyResult.isValid) {
|
|
647
647
|
errors.push(...propertyResult.errors.map(err => ({
|
|
@@ -777,4 +777,4 @@ class SchemaValidationService {
|
|
|
777
777
|
}
|
|
778
778
|
|
|
779
779
|
export { SchemaValidationService };
|
|
780
|
-
//# sourceMappingURL=SchemaValidationService-
|
|
780
|
+
//# sourceMappingURL=SchemaValidationService-BxCbfDaI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SchemaValidationService-BxCbfDaI.js","sources":["../../src/Schema/service/validation/SchemaValidationService.ts"],"sourcesContent":["import { Value } from '@sinclair/typebox/value'\nimport { TProperty } from '@/Schema'\nimport { ModelPropertyDataTypes, TPropertyDataType, isDataType, normalizeDataType } from '@/helpers/property'\nimport { ValidationResult, ValidationError, ValidationRules, DEFAULT_TEXT_MAX_LENGTH } from '@/Schema/validation'\nimport { SchemaMachineContext } from '../schemaMachine'\nimport { ModelPropertyMachineContext } from '@/ModelProperty/service/modelPropertyMachine'\nimport { ModelMachineContext } from '@/Model/service/modelMachine'\nimport { FormatRegistry, Type, TSchema, TUnion, TLiteral } from '@sinclair/typebox'\nimport debug from 'debug'\n\nconst logger = debug('seedSdk:schema:validation')\n\n// Date properties use Type.String({ format: 'date-time' }). TypeBox only checks formats that are\n// registered, and fails every value for an unknown one, so without this no Date value was valid.\nif (!FormatRegistry.Has('date-time')) {\n FormatRegistry.Set('date-time', (value) => !Number.isNaN(Date.parse(value)))\n}\n\n/**\n * Service for validating schemas, models, and properties using TypeBox\n */\nexport class SchemaValidationService {\n /**\n * Enhance TypeBox error message with expected values for union/literal types\n */\n private enhanceErrorMessage(\n error: any,\n schema: TSchema,\n fieldPath: string\n ): string {\n const originalMessage = error.message || 'Validation failed'\n \n // Handle Union type errors (like TPropertyDataType)\n if (error.type === 'Union' || originalMessage.includes('union')) {\n const expectedValues = this.extractExpectedValues(schema, fieldPath)\n if (expectedValues.length > 0) {\n return `Expected one of: ${expectedValues.join(', ')}. Received: ${JSON.stringify(error.value)}`\n }\n }\n \n // Handle Literal type errors\n if (error.type === 'Literal') {\n const expectedValue = this.extractLiteralValue(schema, fieldPath)\n if (expectedValue !== undefined) {\n return `Expected: ${JSON.stringify(expectedValue)}. Received: ${JSON.stringify(error.value)}`\n }\n }\n \n // Return enhanced message with value info if available\n if (error.value !== undefined) {\n return `${originalMessage}. Received: ${JSON.stringify(error.value)}`\n }\n \n return originalMessage\n }\n\n /**\n * Extract expected values from a schema for a given field path\n */\n private extractExpectedValues(schema: TSchema | null, fieldPath: string): string[] {\n try {\n // Handle TProperty schema - check if this is the dataType field\n if (fieldPath === '/dataType' || fieldPath.endsWith('/dataType')) {\n // Return all ModelPropertyDataTypes enum values\n return Object.values(ModelPropertyDataTypes) as string[]\n }\n \n // Handle TStorageType\n if (fieldPath === '/storageType' || fieldPath.endsWith('/storageType')) {\n return ['ItemStorage', 'PropertyStorage']\n }\n \n // If we have a schema, try to extract from it\n if (!schema) {\n return []\n }\n \n // Try to extract from TypeBox Union type using the schema directly\n const schemaObj = schema as any\n const kind = schemaObj[Symbol.for('TypeBox.Kind')]\n \n if (kind === 'Union') {\n const union = schemaObj as TUnion<any>\n const anyOf = union.anyOf || []\n const values: string[] = []\n \n for (const item of anyOf) {\n const itemKind = item?.[Symbol.for('TypeBox.Kind')]\n if (itemKind === 'Literal') {\n const literal = item as TLiteral<any>\n if (literal.const !== undefined) {\n values.push(String(literal.const))\n }\n }\n }\n \n if (values.length > 0) {\n return values\n }\n }\n \n // Fallback: try to extract from JSON schema format\n if (typeof schema === 'object' && 'anyOf' in schema) {\n const union = schema as any\n if (Array.isArray(union.anyOf)) {\n return union.anyOf\n .map((item: any) => {\n if (item.const !== undefined) return String(item.const)\n if (item.enum && Array.isArray(item.enum)) return item.enum.map(String)\n return null\n })\n .filter((val: any) => val !== null)\n .flat()\n .map(String)\n }\n }\n } catch (error) {\n logger('Error extracting expected values:', error)\n }\n \n return []\n }\n\n /**\n * Extract literal value from a schema\n */\n private extractLiteralValue(schema: TSchema, _fieldPath: string): any {\n try {\n if (schema && typeof schema === 'object') {\n const schemaObj = schema as any\n if (schemaObj[Symbol.for('TypeBox.Kind')] === 'Literal') {\n return (schemaObj as TLiteral<any>).const\n }\n if (schemaObj.const !== undefined) {\n return schemaObj.const\n }\n }\n } catch (error) {\n logger('Error extracting literal value:', error)\n }\n \n return undefined\n }\n\n /**\n * Get the schema for a specific field path\n */\n private getSchemaForField(schema: TSchema, fieldPath: string): TSchema | null {\n try {\n if (!schema || typeof schema !== 'object') return null\n \n // Remove leading slash\n const path = fieldPath.replace(/^\\//, '')\n if (!path) return schema\n \n const schemaObj = schema as any\n const kind = schemaObj[Symbol.for('TypeBox.Kind')]\n \n // For TProperty (Object type), check properties\n if (kind === 'Object') {\n const properties = schemaObj.properties\n if (properties && properties[path]) {\n return properties[path]\n }\n }\n \n // Special handling for known fields - return the actual schema\n if (path === 'dataType') {\n return TPropertyDataType as TSchema\n }\n \n // Fallback: check if schema has the property\n if (path in schemaObj) {\n return schemaObj[path]\n }\n } catch (error) {\n logger('Error getting schema for field:', error)\n }\n \n return null\n }\n\n /**\n * Validate a property structure against TProperty schema\n */\n validatePropertyStructure(\n property: ModelPropertyMachineContext\n ): ValidationResult {\n try {\n // Normalize dataType and refValueType for case-insensitive schema support (e.g. \"relation\" -> \"Relation\")\n const normalized = { ...property }\n if (typeof normalized.dataType === 'string') {\n normalized.dataType = normalizeDataType(normalized.dataType) as any\n }\n if (typeof normalized.refValueType === 'string') {\n normalized.refValueType = normalizeDataType(normalized.refValueType) as any\n }\n const isValid = Value.Check(TProperty, normalized)\n \n const errors: ValidationError[] = []\n \n if (!isValid) {\n const typeBoxErrors = [...Value.Errors(TProperty, normalized)]\n errors.push(...typeBoxErrors.map(err => {\n const fieldPath = err.path || 'unknown'\n const fieldSchema = this.getSchemaForField(TProperty, fieldPath)\n const enhancedMessage = this.enhanceErrorMessage(err, fieldSchema || TProperty, fieldPath)\n \n return {\n field: fieldPath,\n message: enhancedMessage,\n code: String(err.type || 'validation_error'),\n severity: 'error' as const,\n }\n }))\n }\n \n if (normalized.validation?.custom) {\n errors.push({\n field: 'validation.custom',\n message: `Custom validators are not supported (validation.custom: \"${normalized.validation.custom}\"). Use pattern, minLength, maxLength or enum.`,\n code: 'custom_validation_unsupported',\n severity: 'error' as const,\n })\n }\n\n // Non-List types: refValueType is only valid for Relation+Image (related entity type). Reject otherwise.\n const nonListTypes = [\n ModelPropertyDataTypes.Text,\n ModelPropertyDataTypes.Number,\n ModelPropertyDataTypes.Boolean,\n ModelPropertyDataTypes.Date,\n ModelPropertyDataTypes.Json,\n ModelPropertyDataTypes.Image,\n ModelPropertyDataTypes.File,\n ModelPropertyDataTypes.Html,\n ModelPropertyDataTypes.Relation,\n ]\n if (nonListTypes.includes(normalized.dataType as ModelPropertyDataTypes)) {\n const hasRefValueType = normalized.refValueType != null && String(normalized.refValueType).trim() !== ''\n if (hasRefValueType) {\n // Relation may keep refValueType only for Image (relation to Image entity)\n if (normalized.dataType === ModelPropertyDataTypes.Relation && normalized.refValueType === ModelPropertyDataTypes.Image) {\n // Allowed: Relation to Image\n } else {\n errors.push({\n field: 'refValueType',\n message: `refValueType is only valid for List properties. Use dataType 'List' with refValueType '${normalized.refValueType}' for lists of ${normalized.refValueType}.`,\n code: 'invalid_ref_value_type',\n severity: 'error' as const,\n })\n }\n }\n }\n\n // List: refValueType is required\n if (normalized.dataType === ModelPropertyDataTypes.List) {\n const hasRefValueType = normalized.refValueType != null && String(normalized.refValueType).trim() !== ''\n if (!hasRefValueType) {\n errors.push({\n field: 'refValueType',\n message: `List properties require refValueType (e.g. 'Text', 'Number', 'Relation') to specify the element type.`,\n code: 'missing_ref_value_type',\n severity: 'error' as const,\n })\n }\n // List of relations: ref is required\n if (hasRefValueType && normalized.refValueType === ModelPropertyDataTypes.Relation) {\n const hasRef = normalized.ref && normalized.ref.trim() !== ''\n const hasRefModelName = normalized.refModelName && normalized.refModelName.trim() !== ''\n const hasRefModelId = normalized.refModelId !== undefined && normalized.refModelId !== null\n if (!hasRef && !hasRefModelName && !hasRefModelId) {\n errors.push({\n field: 'ref',\n message: `List properties with refValueType 'Relation' require either a \"ref\", \"refModelName\", or \"refModelId\" field to be defined`,\n code: 'missing_ref',\n severity: 'error' as const,\n })\n }\n }\n }\n\n // Relation (single): ref is required\n if (normalized.dataType === ModelPropertyDataTypes.Relation) {\n const hasRef = normalized.ref && normalized.ref.trim() !== ''\n const hasRefModelName = normalized.refModelName && normalized.refModelName.trim() !== ''\n const hasRefModelId = normalized.refModelId !== undefined && normalized.refModelId !== null\n if (!hasRef && !hasRefModelName && !hasRefModelId) {\n errors.push({\n field: 'ref',\n message: `Property with dataType \"Relation\" requires either a \"ref\", \"refModelName\", or \"refModelId\" field to be defined`,\n code: 'missing_ref',\n severity: 'error' as const,\n })\n }\n if ((hasRef || hasRefModelName) && !hasRefModelId) {\n logger(`Property \"${normalized.name}\" has ref/refModelName but no refModelId - will be resolved asynchronously`)\n }\n }\n \n return {\n isValid: errors.length === 0,\n errors,\n }\n } catch (error) {\n logger('Error validating property structure:', error)\n return {\n isValid: false,\n errors: [{\n field: 'property',\n message: error instanceof Error ? error.message : 'Unknown validation error',\n code: 'validation_exception',\n severity: 'error' as const,\n }],\n }\n }\n }\n\n /**\n * Validate a property value against its validation rules\n * @param value - The value to validate\n * @param dataType - The property's data type\n * @param validationRules - Optional validation rules (enum, pattern, minLength, maxLength)\n * @param refValueType - For List properties: the element type (Text, Number, etc.). When set, each array element is validated against this type + validationRules.\n */\n validatePropertyValue(\n value: any,\n dataType: ModelPropertyDataTypes,\n validationRules?: ValidationRules,\n refValueType?: ModelPropertyDataTypes | string\n ): ValidationResult {\n dataType = normalizeDataType(dataType) as ModelPropertyDataTypes\n const errors: ValidationError[] = []\n const warnings: ValidationError[] = []\n\n try {\n // Array values are only allowed for List properties\n if (dataType !== ModelPropertyDataTypes.List && Array.isArray(value)) {\n errors.push({\n field: 'value',\n message: 'Array values are only allowed for List properties. Use dataType \"List\" with refValueType to store multiple values.',\n code: 'array_not_allowed',\n severity: 'error' as const,\n })\n }\n\n // File/Image: accept File objects from OS picker, and Blobs for Image (saveImage persists both).\n // The TypeBox schema only allows string|null.\n const isFileObject = typeof File !== 'undefined' && value instanceof File\n const isBlobObject = typeof Blob !== 'undefined' && value instanceof Blob\n if (\n (dataType === ModelPropertyDataTypes.File && isFileObject) ||\n (dataType === ModelPropertyDataTypes.Image && isBlobObject)\n ) {\n if (validationRules) {\n const customErrors = this.validateCustomRules(value, validationRules)\n errors.push(...customErrors)\n }\n return {\n isValid: errors.length === 0,\n errors,\n warnings: warnings.length > 0 ? warnings : undefined,\n }\n }\n\n // List with refValueType: validate each element against element schema + validation rules\n if (dataType === ModelPropertyDataTypes.List && refValueType && Array.isArray(value)) {\n const elementDataType = normalizeDataType(String(refValueType)) as ModelPropertyDataTypes\n // Apply default maxLength for Text elements in List. Html elements hold arbitrary-length content.\n const elementEffectiveRules = validationRules ? { ...validationRules } : {}\n if (\n elementDataType === ModelPropertyDataTypes.Text &&\n elementEffectiveRules.maxLength === undefined &&\n !(Array.isArray(elementEffectiveRules.enum) && elementEffectiveRules.enum.length > 0)\n ) {\n elementEffectiveRules.maxLength = DEFAULT_TEXT_MAX_LENGTH\n }\n for (let i = 0; i < value.length; i++) {\n const elementResult = this.validatePropertyValue(\n value[i],\n elementDataType,\n elementEffectiveRules\n )\n if (!elementResult.isValid && elementResult.errors.length > 0) {\n for (const err of elementResult.errors) {\n errors.push({\n field: `value[${i}]`,\n message: `Element at index ${i}: ${err.message}`,\n code: validationRules?.enum && Array.isArray(validationRules.enum) && validationRules.enum.length > 0 ? 'enum_violation' : err.code,\n severity: err.severity,\n })\n }\n }\n }\n if (validationRules) {\n const customErrors = this.validateCustomRules(value, validationRules)\n errors.push(...customErrors)\n }\n return {\n isValid: errors.length === 0,\n errors,\n warnings: warnings.length > 0 ? warnings : undefined,\n }\n }\n\n // List without refValueType or non-array: validate as scalar/array\n if (dataType === ModelPropertyDataTypes.List && !Array.isArray(value) && value != null) {\n errors.push({\n field: 'value',\n message: 'List properties require an array value.',\n code: 'array_required',\n severity: 'error' as const,\n })\n return { isValid: false, errors }\n }\n\n // Build base TypeBox schema from dataType\n let schema: TSchema = this.getBaseSchemaForDataType(dataType)\n\n // Apply default maxLength for Text when not explicitly set. Html holds arbitrary-length content (e.g. article body) and must not default to 255.\n const effectiveRules = validationRules ? { ...validationRules } : {}\n // An enum already bounds the value, so the default limit is not added to it.\n const hasEnum = !!(effectiveRules.enum && Array.isArray(effectiveRules.enum) && effectiveRules.enum.length > 0)\n if (dataType === ModelPropertyDataTypes.Text && effectiveRules.maxLength === undefined && !hasEnum) {\n effectiveRules.maxLength = DEFAULT_TEXT_MAX_LENGTH\n }\n\n // Apply validation rules\n const hasEnumRules = !!(validationRules?.enum && Array.isArray(validationRules.enum) && validationRules.enum.length > 0)\n if (Object.keys(effectiveRules).length > 0) {\n schema = this.applyValidationRules(schema, dataType, effectiveRules)\n }\n\n // Validate using TypeBox\n const isValid = Value.Check(schema, value)\n \n if (!isValid) {\n const typeBoxErrors = [...Value.Errors(schema, value)]\n const effectiveMaxLength = effectiveRules.maxLength\n const isDefaultTextLimit =\n dataType === ModelPropertyDataTypes.Text &&\n effectiveMaxLength === DEFAULT_TEXT_MAX_LENGTH &&\n validationRules?.maxLength === undefined\n errors.push(...typeBoxErrors.map(err => {\n const fieldPath = err.path || 'value'\n const originalMessage = (err.message || '').toLowerCase()\n // TypeBox maxLength errors have message like \"Expected string length less or equal to X\"\n const isMaxLengthError = originalMessage.includes('length') && (originalMessage.includes('less') || originalMessage.includes('equal') || originalMessage.includes('max'))\n let enhancedMessage: string\n if (isMaxLengthError && effectiveMaxLength !== undefined) {\n const typeLabel = dataType === ModelPropertyDataTypes.Html ? 'Html' : 'Text'\n if (isDefaultTextLimit) {\n enhancedMessage = `Text properties have a default limit of 255 characters. For longer content, use a File property instead, which can hold arbitrary amounts of text or data.`\n } else {\n enhancedMessage = `${typeLabel} must be ${effectiveMaxLength} characters or less. For longer content, use a File property instead, which can hold arbitrary amounts of text or data.`\n }\n } else {\n enhancedMessage = this.enhanceErrorMessage(err, schema, fieldPath)\n }\n // Use max_length_exceeded when failure is due to maxLength; enum_violation when enum rules; else generic\n const code = isMaxLengthError\n ? 'max_length_exceeded'\n : hasEnumRules\n ? 'enum_violation'\n : String(err.type || 'value_validation_error')\n\n return {\n field: fieldPath,\n message: enhancedMessage,\n code,\n severity: 'error' as const,\n }\n }))\n }\n\n // Additional custom validations\n if (validationRules) {\n const customErrors = this.validateCustomRules(value, validationRules)\n errors.push(...customErrors)\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n warnings: warnings.length > 0 ? warnings : undefined,\n }\n } catch (error) {\n logger('Error validating property value:', error)\n return {\n isValid: false,\n errors: [{\n field: 'value',\n message: error instanceof Error ? error.message : 'Unknown validation error',\n code: 'validation_exception',\n severity: 'error' as const,\n }],\n }\n }\n }\n\n /**\n * Validate a specific property within a schema\n */\n validateProperty(\n schema: SchemaMachineContext,\n modelName: string,\n propertyName: string,\n propertyData?: ModelPropertyMachineContext\n ): ValidationResult {\n const errors: ValidationError[] = []\n\n // Check if model exists\n if (!schema.models || !schema.models[modelName]) {\n errors.push({\n field: 'model',\n message: `Model \"${modelName}\" not found in schema`,\n code: 'model_not_found',\n severity: 'error' as const,\n })\n return { isValid: false, errors }\n }\n\n const model = schema.models[modelName]\n\n // Check if property exists in model\n // If the property name has changed (renamed), check if the original name exists\n let propertyDefinition = model.properties?.[propertyName]\n \n if (!propertyDefinition && propertyData?._originalValues?.name) {\n const originalName = propertyData._originalValues.name\n // If the current name differs from the original, check if original exists\n if (originalName !== propertyName && model.properties?.[originalName]) {\n propertyDefinition = model.properties[originalName]\n // Property is being renamed, which is allowed - continue validation\n }\n }\n \n if (!propertyDefinition) {\n errors.push({\n field: 'property',\n message: `Property \"${propertyName}\" not found in model \"${modelName}\"`,\n code: 'property_not_found',\n severity: 'error' as const,\n })\n return { isValid: false, errors }\n }\n\n // If propertyData is provided, validate its structure\n if (propertyData) {\n const structureResult = this.validatePropertyStructure(propertyData)\n errors.push(...structureResult.errors)\n }\n\n // Schema context definitions come in two shapes: schema-file ({ type, model }) and runtime\n // ({ dataType, ref/refModelName }, e.g. models added from Model instances). Accept both, as the\n // List check below already does; requiring `type` rejected every edit to a runtime-shaped property.\n const definitionType = propertyDefinition.type ?? (propertyDefinition as any).dataType\n const definitionRefModel: string | undefined =\n propertyDefinition.model ?? (propertyDefinition as any).ref ?? (propertyDefinition as any).refModelName\n\n // Validate property definition structure\n if (!definitionType) {\n errors.push({\n field: 'property.type',\n message: 'Property type is required',\n code: 'missing_type',\n severity: 'error' as const,\n })\n }\n\n // Validate Relation: requires model\n if (isDataType(definitionType, ModelPropertyDataTypes.Relation)) {\n if (!definitionRefModel || definitionRefModel.trim() === '') {\n errors.push({\n field: 'property.model',\n message: `Property with type \"Relation\" requires a \"model\" field to be defined`,\n code: 'missing_ref',\n severity: 'error' as const,\n })\n } else if (!schema.models[definitionRefModel]) {\n errors.push({\n field: 'property.model',\n message: `Referenced model \"${definitionRefModel}\" not found in schema`,\n code: 'invalid_reference',\n severity: 'error' as const,\n })\n }\n }\n\n // Validate List: requires refValueType; ref (model) required only when refValueType === 'Relation' (case-insensitive)\n if (isDataType(propertyDefinition.type, ModelPropertyDataTypes.List) || isDataType((propertyDefinition as any).dataType, ModelPropertyDataTypes.List)) {\n const rawRefValueType = (propertyDefinition as any).refValueType ?? (propertyDefinition as any).items?.type ?? (propertyDefinition as any).refvaluetype\n const refValueType = rawRefValueType ? normalizeDataType(String(rawRefValueType)) : undefined\n if (!refValueType || String(refValueType).trim() === '') {\n errors.push({\n field: 'property.refValueType',\n message: 'List properties require \"refValueType\" (e.g. refValueType: \"Text\" or refValueType: \"Relation\" with ref: \"Tag\")',\n code: 'missing_ref_value_type',\n severity: 'error' as const,\n })\n } else if (refValueType === 'Relation' || refValueType === 'RelationProperty') {\n const model = (propertyDefinition as any).ref ?? (propertyDefinition as any).model ?? (propertyDefinition as any).items?.model\n if (!model || String(model).trim() === '') {\n errors.push({\n field: 'property.ref',\n message: 'List of relations requires \"ref\" to specify the related model',\n code: 'missing_ref',\n severity: 'error' as const,\n })\n } else if (schema.models && !schema.models[model]) {\n errors.push({\n field: 'property.ref',\n message: `Referenced model \"${model}\" not found in schema`,\n code: 'invalid_reference',\n severity: 'error' as const,\n })\n }\n }\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n }\n }\n\n /**\n * Validate model structure (basic structure checks)\n */\n validateModelStructure(\n model: ModelMachineContext & { properties?: { [key: string]: any } }\n ): ValidationResult {\n const errors: ValidationError[] = []\n\n // Validate model name\n if (!model.modelName || model.modelName.trim() === '') {\n errors.push({\n field: 'modelName',\n message: 'Model name is required',\n code: 'missing_model_name',\n severity: 'error' as const,\n })\n }\n\n // Validate schema name\n if (!model.schemaName || model.schemaName.trim() === '') {\n errors.push({\n field: 'schemaName',\n message: 'Schema name is required',\n code: 'missing_schema_name',\n severity: 'error' as const,\n })\n }\n\n // Validate properties is an object\n if (model.properties && typeof model.properties !== 'object') {\n errors.push({\n field: 'properties',\n message: 'Properties must be an object',\n code: 'invalid_properties',\n severity: 'error' as const,\n })\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n }\n }\n\n /**\n * Validate a model against a schema WITHOUT requiring it to be in the schema's context\n * This allows validation before registration, preventing update loops\n */\n validateModelAgainstSchema(\n schema: SchemaMachineContext,\n modelName: string,\n modelData: ModelMachineContext & { properties?: { [key: string]: any } }\n ): ValidationResult {\n\n // Create a temporary schema context that includes this model for validation purposes\n // This allows validateProperty to work without actually adding the model to the real schema\n const tempSchemaContext: SchemaMachineContext = {\n ...schema,\n models: {\n ...schema.models,\n [modelName]: {\n properties: modelData.properties || {},\n },\n },\n }\n\n // Use validateModel which now works because the model is in the temp context\n return this.validateModel(tempSchemaContext, modelName, modelData)\n }\n\n /**\n * Validate a model within a schema (requires model to already be in schema context)\n */\n validateModel(\n schema: SchemaMachineContext,\n modelName: string,\n _modelData?: ModelMachineContext\n ): ValidationResult {\n const errors: ValidationError[] = []\n\n if (!schema.models || !schema.models[modelName]) {\n errors.push({\n field: 'model',\n message: `Model \"${modelName}\" not found in schema`,\n code: 'model_not_found',\n severity: 'error' as const,\n })\n return { isValid: false, errors }\n }\n\n const model = schema.models[modelName]\n\n // Validate all properties in the model\n if (model.properties) {\n for (const propertyName of Object.keys(model.properties)) {\n const propertyResult = this.validateProperty(schema, modelName, propertyName)\n if (!propertyResult.isValid) {\n errors.push(...propertyResult.errors.map(err => ({\n ...err,\n field: `${modelName}.${propertyName}.${err.field}`,\n })))\n }\n }\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n }\n }\n\n /**\n * Validate entire schema\n */\n validateSchema(schema: SchemaMachineContext): ValidationResult {\n const errors: ValidationError[] = []\n\n // Validate schema name\n if (!schema.schemaName || schema.schemaName.trim() === '') {\n errors.push({\n field: 'schemaName',\n message: 'Schema name is required',\n code: 'missing_schema_name',\n severity: 'error' as const,\n })\n }\n\n // Validate metadata\n if (!schema.metadata) {\n errors.push({\n field: 'metadata',\n message: 'Schema metadata is required',\n code: 'missing_metadata',\n severity: 'error' as const,\n })\n } else {\n if (!schema.metadata.name || schema.metadata.name.trim() === '') {\n errors.push({\n field: 'metadata.name',\n message: 'Schema metadata name is required',\n code: 'missing_metadata_name',\n severity: 'error' as const,\n })\n }\n }\n\n // Validate models if they exist\n if (schema.models && Object.keys(schema.models).length > 0) {\n // Validate each model\n for (const modelName of Object.keys(schema.models)) {\n const modelResult = this.validateModel(schema, modelName)\n if (!modelResult.isValid) {\n errors.push(...modelResult.errors)\n }\n }\n }\n\n return {\n isValid: errors.length === 0,\n errors,\n }\n }\n\n /**\n * Get base TypeBox schema for a data type\n */\n private getBaseSchemaForDataType(dataType: ModelPropertyDataTypes): TSchema {\n switch (dataType) {\n case ModelPropertyDataTypes.Text:\n case ModelPropertyDataTypes.Html:\n return Type.String()\n case ModelPropertyDataTypes.Number:\n return Type.Number()\n case ModelPropertyDataTypes.Boolean:\n return Type.Boolean()\n case ModelPropertyDataTypes.Date:\n return Type.String({ format: 'date-time' })\n case ModelPropertyDataTypes.Json:\n return Type.Any()\n case ModelPropertyDataTypes.List:\n return Type.Array(Type.Any())\n case ModelPropertyDataTypes.Relation:\n case ModelPropertyDataTypes.Image:\n case ModelPropertyDataTypes.File:\n return Type.Union([Type.String(), Type.Null()])\n default:\n return Type.Any()\n }\n }\n\n /**\n * Apply validation rules to a TypeBox schema. For Text and Html, pattern, minLength and\n * maxLength combine into one string schema; enum further restricts the value to its list.\n * (Each rule used to replace the schema built so far, so e.g. Text's default maxLength\n * silently dropped any pattern.)\n */\n private applyValidationRules(\n schema: TSchema,\n dataType: ModelPropertyDataTypes,\n rules: ValidationRules\n ): TSchema {\n let result = schema\n\n if (dataType === ModelPropertyDataTypes.Text || dataType === ModelPropertyDataTypes.Html) {\n const options: { pattern?: string; minLength?: number; maxLength?: number } = {}\n if (rules.pattern) {\n try {\n new RegExp(rules.pattern)\n options.pattern = rules.pattern\n } catch (error) {\n logger('Invalid regex pattern:', rules.pattern, error)\n }\n }\n if (rules.minLength !== undefined) options.minLength = rules.minLength\n if (rules.maxLength !== undefined) options.maxLength = rules.maxLength\n if (Object.keys(options).length > 0) {\n result = Type.String(options)\n }\n }\n\n if (rules.enum && Array.isArray(rules.enum) && rules.enum.length > 0) {\n const allowed = Type.Union(rules.enum.map(val => Type.Literal(val)))\n result = result === schema ? allowed : Type.Intersect([result, allowed])\n }\n\n return result\n }\n\n /**\n * Validate custom validation rules\n */\n private validateCustomRules(\n value: any,\n rules: ValidationRules\n ): ValidationError[] {\n const errors: ValidationError[] = []\n\n // Custom validators are not supported; validatePropertyStructure rejects schemas that use them.\n if (rules.custom) {\n logger('Ignoring unsupported custom validator:', rules.custom)\n }\n\n return errors\n }\n}\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAUA,MAAM,MAAM,GAAG,KAAK,CAAC,2BAA2B,CAAC;AAEjD;AACA;AACA,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;IACpC,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,KAAK,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;AAC9E;AAEA;;AAEG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AC,wCAAwC,EAAE,KAAK,CAAC,MAAM,CAAC;QAChE;AAEA,QAAA,OAAO,MAAM;IACf;AACD;;"}
|
package/dist/{backfillMetadataPropertyIds-Uhzlwg9X.js → backfillMetadataPropertyIds-CzSbuucw.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BaseDb, m as metadata, K as getPropertyIdForModelAndName, L as resolveItemModelFileId } from './index-
|
|
2
|
-
import { s as skipSeedOnAmbiguousModel } from './resolveModelForSyncedSeed-
|
|
1
|
+
import { B as BaseDb, m as metadata, K as getPropertyIdForModelAndName, L as resolveItemModelFileId } from './index-DpgQMIRq.js';
|
|
2
|
+
import { s as skipSeedOnAmbiguousModel } from './resolveModelForSyncedSeed-DFr4COc4.js';
|
|
3
3
|
import { and, isNull, sql, eq } from 'drizzle-orm';
|
|
4
4
|
import debug from 'debug';
|
|
5
5
|
import '@seedprotocol/arweave';
|
|
@@ -69,4 +69,4 @@ async function backfillMetadataPropertyIds() {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export { backfillMetadataPropertyIds };
|
|
72
|
-
//# sourceMappingURL=backfillMetadataPropertyIds-
|
|
72
|
+
//# sourceMappingURL=backfillMetadataPropertyIds-CzSbuucw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backfillMetadataPropertyIds-
|
|
1
|
+
{"version":3,"file":"backfillMetadataPropertyIds-CzSbuucw.js","sources":["../../src/db/backfillMetadataPropertyIds.ts"],"sourcesContent":["import { resolveItemModelFileId } from '@/db/read/resolveModelRecord'\nimport { skipSeedOnAmbiguousModel } from '@/db/read/resolveModelForSyncedSeed'\nimport { and, eq, isNull, sql } from 'drizzle-orm'\nimport { BaseDb } from '@/db/Db/BaseDb'\nimport { metadata } from '@/seedSchema'\nimport { getPropertyIdForModelAndName } from '@/helpers/db'\nimport debug from 'debug'\n\nconst logger = debug('seedSdk:db:backfillMetadataPropertyIds')\n\n/**\n * Backfill metadata.property_id for rows that have model_type and property_name\n * but property_id is null. Run after migrations. Idempotent - only updates NULL rows.\n * Call after appDb is set (e.g. at end of prepareDb).\n */\nexport async function backfillMetadataPropertyIds(): Promise<number> {\n const db = BaseDb.getAppDb()\n if (!db) {\n logger('No app db available, skipping backfill')\n return 0\n }\n\n try {\n const rowsToBackfill = await db\n .select({\n localId: metadata.localId,\n modelType: metadata.modelType,\n propertyName: metadata.propertyName,\n seedLocalId: metadata.seedLocalId,\n })\n .from(metadata)\n .where(\n and(\n isNull(metadata.propertyId),\n sql`${metadata.modelType} IS NOT NULL`,\n sql`${metadata.propertyName} IS NOT NULL`,\n ),\n )\n\n if (rowsToBackfill.length === 0) {\n return 0\n }\n\n let updated = 0\n for (const row of rowsToBackfill) {\n if (!row.modelType || !row.propertyName || !row.localId) continue\n\n // Pin to the seed's own model (model names are only unique per schema).\n const propertyId = await skipSeedOnAmbiguousModel(\n { seedLocalId: row.seedLocalId },\n 'backfillMetadataPropertyIds',\n async () =>\n getPropertyIdForModelAndName(row.modelType!, row.propertyName!, {\n modelFileId: await resolveItemModelFileId({ seedLocalId: row.seedLocalId }),\n }),\n )\n if (propertyId == null) continue\n\n await db\n .update(metadata)\n .set({ propertyId })\n .where(eq(metadata.localId, row.localId))\n\n updated++\n }\n\n if (updated > 0) {\n logger(`Backfilled property_id for ${updated}/${rowsToBackfill.length} metadata rows`)\n }\n return updated\n } catch (error) {\n logger('Backfill error:', error)\n throw error\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAQA,MAAM,MAAM,GAAG,KAAK,CAAC,wCAAwC,CAAC;AAE9D;;;;AAIG;AACI,eAAe,2BAA2B,GAAA;AAC/C,IAAA,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE;IAC5B,IAAI,CAAC,EAAE,EAAE;QACP,MAAM,CAAC,wCAAwC,CAAC;AAChD,QAAA,OAAO,CAAC;IACV;AAEA,IAAA,IAAI;QACF,MAAM,cAAc,GAAG,MAAM;AAC1B,aAAA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AAI,OAAO,GAAG,CAAC,EAAE;YACf,MAAM,CAAC,8BAA8B,OAAO,CAAA,CAAA,EAAI,cAAc,CAAC,MAAM,CAAA,cAAA,CAAgB,CAAC;QACxF;AACA,QAAA,OAAO,OAAO;IAChB;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,MAAM,CAAC,iBAAiB,EAAE,KAAK,CAAC;AAChC,QAAA,MAAM,KAAK;IACb;AACF;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as BaseFileManager, B as BaseDb } from './index-
|
|
1
|
+
import { h as BaseFileManager, B as BaseDb } from './index-DpgQMIRq.js';
|
|
2
2
|
import { BaseEasClient, BaseQueryClient } from '@seedprotocol/eas';
|
|
3
3
|
import { BaseArweaveClient } from '@seedprotocol/arweave';
|
|
4
4
|
|
|
@@ -78,4 +78,4 @@ var configurePlatform$1 = /*#__PURE__*/Object.freeze({
|
|
|
78
78
|
});
|
|
79
79
|
|
|
80
80
|
export { BasePathResolver as B, configurePlatform$1 as a, configurePlatform as c };
|
|
81
|
-
//# sourceMappingURL=configurePlatform-
|
|
81
|
+
//# sourceMappingURL=configurePlatform-Bbpw_R4y.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurePlatform-
|
|
1
|
+
{"version":3,"file":"configurePlatform-Bbpw_R4y.js","sources":["../../src/testing/platformTestHandle.ts","../../src/helpers/PathResolver/BasePathResolver.ts","../../src/platform/configurePlatform.ts"],"sourcesContent":["export type PlatformTestHandle = {\n restore(): void\n}\n\n/**\n * Save/restore helper for swapping a single facade implementation in tests.\n */\nexport function createFacadeTestHandle<T>(\n getImpl: () => T | null,\n setImpl: (impl: T | null) => void,\n next: T,\n): PlatformTestHandle {\n const previous = getImpl()\n setImpl(next)\n return {\n restore() {\n setImpl(previous)\n },\n }\n}\n","import type { IPathResolver } from './IPathResolver'\nimport {\n createFacadeTestHandle,\n type PlatformTestHandle,\n} from '@/testing/platformTestHandle'\n\nexport abstract class BasePathResolver {\n private static _impl: IPathResolver | null = null\n\n static configure(impl: IPathResolver): void {\n if (!impl) {\n throw new Error(\n 'Cannot configure PathResolver with undefined or null. Ensure the platform-specific PathResolver is properly created.',\n )\n }\n BasePathResolver._impl = impl\n }\n\n static createForTesting(impl: IPathResolver): PlatformTestHandle {\n return createFacadeTestHandle(\n () => BasePathResolver._impl,\n (next) => {\n BasePathResolver._impl = next\n },\n impl,\n )\n }\n\n private static requireImpl(): IPathResolver {\n if (!BasePathResolver._impl) {\n throw new Error(\n 'PathResolver not configured. Please ensure the platform-specific PathResolver is registered. For Node.js, import from @seedprotocol/sdk/node. For browser, the SDK should auto-initialize.',\n )\n }\n return BasePathResolver._impl\n }\n\n /**\n * @deprecated Prefer static facade methods (e.g. BasePathResolver.getDotSeedDir()).\n */\n static getInstance(): IPathResolver {\n return BasePathResolver.requireImpl()\n }\n\n static getRootWithNodeModules(): string {\n return BasePathResolver.requireImpl().getRootWithNodeModules()\n }\n\n static getSdkRootDir(): string {\n return BasePathResolver.requireImpl().getSdkRootDir()\n }\n\n static getNodeModulesDir(): string {\n return BasePathResolver.requireImpl().getNodeModulesDir()\n }\n\n static getDotSeedDir(schemaFileDir?: string): string {\n return BasePathResolver.requireImpl().getDotSeedDir(schemaFileDir)\n }\n\n static findConfigFile(searchDir?: string): string | null {\n return BasePathResolver.requireImpl().findConfigFile(searchDir)\n }\n\n static getAppPaths(schemaFileDir?: string | undefined) {\n return BasePathResolver.requireImpl().getAppPaths(schemaFileDir)\n }\n}\n","import { BasePathResolver } from '@/helpers/PathResolver/BasePathResolver'\nimport { BaseFileManager } from '@/helpers/FileManager/BaseFileManager'\nimport { BaseDb } from '@/db/Db/BaseDb'\nimport { BaseArweaveClient } from '@/helpers'\nimport { BaseEasClient } from '@/helpers/EasClient/BaseEasClient'\nimport { BaseQueryClient } from '@/helpers/QueryClient/BaseQueryClient'\nimport type { PlatformServices } from './types'\n\n/**\n * Wire all platform facades to the given service instances.\n */\nexport function configurePlatform(services: PlatformServices): void {\n BasePathResolver.configure(services.pathResolver)\n BaseFileManager.configure(services.fileManager)\n BaseDb.configure(services.db)\n BaseArweaveClient.configure(services.arweaveClient)\n BaseEasClient.configure(services.easClient)\n BaseQueryClient.configure(services.queryClient)\n}\n"],"names":[],"mappings":";;;;AAIA;;AAEG;SACa,sBAAsB,CACpC,OAAuB,EACvB,OAAiC,EACjC,IAAO,EAAA;AAEP,IAAA,MAAM,QAAQ,GAAG,OAAO,EAAE;IAC1B,OAAO,CAAC,IAAI,CAAC;IACb,OAAO;QACL,OAAO,GAAA;YACL,OAAO,CAAC,QAAQ,CAAC;QACnB,CAAC;KACF;AACH;;MCbsB,gBAAgB,CAAA;IAGpC,OAAO,SAAS,CAAC,IAAmB,EAAA;QAClC,IAAI,CAAC,IAAI,EAAE;AACT,YAAA,MAAM,IAAI,KAAK,CACb,sHAAsH,CACvH;QACH;AACA,QAAA,gBAAgB,CAAC,KAAK,GAAG,IAAI;IAC/B;IAEA,OAAO,gBAAgB,CAAC,IAAmB,EAAA;AACzC,QAAA,OAAO,sBAAsB,CAC3B,MAAM,gBAAgB,CAAC,KAAK,EAC5B,CAAC,IAAI,KAAI;AACP,YAAA,gBAAgB,CAAC,KAAK,GAAG,IAAI;QAC/B,CAAC,EACD,IAAI,CACL;IACH;AAEQ,IAAA,OAAO,WAAW,GAAA;AACxB,QAAA,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE;AAC3B,YAAA,MAAM,IAAI,KAAK,CACb,4LAA4L,CAC7L;QACH;QACA,OAAO,gBAAgB,CAAC,KAAK;IAC/B;AAEA;;AAEG;AACH,IAAA,OAAO,WAAW,GAAA;AAChB,QAAA,OAAO,gBAAgB,CAAC,WAAW,EAAE;IACvC;AAEA,IAAA,OAAO,sBAAsB,GAAA;AAC3B,QAAA,OAAO,gBAAgB,CAAC,WAAW,EAAE,CAAC,sBAAsB,EAAE;IAChE;AAEA,IAAA,OAAO,aAAa,GAAA;AAClB,QAAA,OAAO,gBAAgB,CAAC,WAAW,EAAE,CAAC,aAAa,EAAE;IACvD;AAEA,IAAA,OAAO,iBAAiB,GAAA;AACtB,QAAA,OAAO,gBAAgB,CAAC,WAAW,EAAE,CAAC,iBAAiB,EAAE;IAC3D;IAEA,OAAO,aAAa,CAAC,aAAsB,EAAA;QACzC,OAAO,gBAAgB,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,aAAa,CAAC;IACpE;IAEA,OAAO,cAAc,CAAC,SAAkB,EAAA;QACtC,OAAO,gBAAgB,CAAC,WAAW,EAAE,CAAC,cAAc,CAAC,SAAS,CAAC;IACjE;IAEA,OAAO,WAAW,CAAC,aAAkC,EAAA;QACnD,OAAO,gBAAgB,CAAC,WAAW,EAAE,CAAC,WAAW,CAAC,aAAa,CAAC;IAClE;;AA3De,gBAAA,CAAA,KAAK,GAAyB,IAAI;;ACCnD;;AAEG;AACG,SAAU,iBAAiB,CAAC,QAA0B,EAAA;AAC1D,IAAA,gBAAgB,CAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC;AACjD,IAAA,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC;AAC/C,IAAA,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC;AAC7B,IAAA,iBAAiB,CAAC,SAAS,CAAC,QAAQ,CAAC,aAAa,CAAC;AACnD,IAAA,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC;AAC3C,IAAA,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC;AACjD;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { inArray } from 'drizzle-orm';
|
|
2
|
-
import { v as properties, s as modelUids, m as metadata, y as propertyUids } from './index-
|
|
2
|
+
import { v as properties, s as modelUids, m as metadata, y as propertyUids } from './index-DpgQMIRq.js';
|
|
3
3
|
import 'debug';
|
|
4
4
|
import '@seedprotocol/arweave';
|
|
5
5
|
import '@seedprotocol/eas';
|
|
@@ -46,4 +46,4 @@ async function detachModelRows(db, modelIds) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export { detachModelRows, detachPropertyRows };
|
|
49
|
-
//# sourceMappingURL=detachRowsBeforeDelete-
|
|
49
|
+
//# sourceMappingURL=detachRowsBeforeDelete-D1TyEMco.js.map
|
package/dist/{detachRowsBeforeDelete-CtmIFpgV.js.map → detachRowsBeforeDelete-D1TyEMco.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detachRowsBeforeDelete-
|
|
1
|
+
{"version":3,"file":"detachRowsBeforeDelete-D1TyEMco.js","sources":["../../src/helpers/entity/detachRowsBeforeDelete.ts"],"sourcesContent":["import { inArray } from 'drizzle-orm'\nimport type { BaseDb } from '@/db/Db/BaseDb'\nimport { metadata, modelUids, properties, propertyUids } from '@/seedSchema'\n\ntype AppDb = NonNullable<ReturnType<typeof BaseDb.getAppDb>>\n\n/**\n * Before deleting property rows: unlink stored item values (metadata.property_id → NULL; the\n * values stay, keyed by property name) and drop the properties' EAS uid mappings. Without this,\n * Node (libsql enforces foreign keys) fails the delete as soon as an item has a value, and the\n * browser leaves rows pointing at deleted ids.\n */\nexport async function detachPropertyRows(db: AppDb, propertyIds: readonly number[]): Promise<void> {\n if (propertyIds.length === 0) return\n const ids = [...propertyIds]\n await db.update(metadata).set({ propertyId: null }).where(inArray(metadata.propertyId, ids))\n await db.delete(propertyUids).where(inArray(propertyUids.propertyId, ids))\n}\n\n/**\n * Before deleting model rows: detach their properties' rows (as above), drop the models' EAS\n * uid mappings, and clear relation properties elsewhere that point at them (ref_model_id).\n */\nexport async function detachModelRows(db: AppDb, modelIds: readonly number[]): Promise<void> {\n if (modelIds.length === 0) return\n const ids = [...modelIds]\n const propertyRows = await db\n .select({ id: properties.id })\n .from(properties)\n .where(inArray(properties.modelId, ids))\n await detachPropertyRows(\n db,\n propertyRows.map((row: { id: number | null }) => row.id).filter((id: number | null): id is number => id != null),\n )\n await db.delete(modelUids).where(inArray(modelUids.modelId, ids))\n await db.update(properties).set({ refModelId: null }).where(inArray(properties.refModelId, ids))\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAMA;;;;;AAKG;AACI,eAAe,kBAAkB,CAAC,EAAS,EAAE,WAA8B,EAAA;AAChF,IAAA,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE;AAC9B,IAAA,MAAM,GAAG,GAAG,CAAC,GAAG,WAAW,CAAC;IAC5B,MAAM,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAC5F,IAAA,MAAM,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAC5E;AAEA;;;AAGG;AACI,eAAe,eAAe,CAAC,EAAS,EAAE,QAA2B,EAAA;AAC1E,IAAA,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE;AAC3B,IAAA,MAAM,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC;IACzB,MAAM,YAAY,GAAG,MAAM;SACxB,MAAM,CAAC,EAAE,EAAE,EAAE,UAAU,CAAC,EAAE,EAAE;SAC5B,IAAI,CAAC,UAAU;SACf,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC1C,IAAA,MAAM,kBAAkB,CACtB,EAAE,EACF,YAAY,CAAC,GAAG,CAAC,CAAC,GAA0B,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAiB,KAAmB,EAAE,IAAI,IAAI,CAAC,CACjH;AACD,IAAA,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IACjE,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC;AAClG;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { eq } from 'drizzle-orm';
|
|
2
2
|
import debug from 'debug';
|
|
3
|
-
import { B as BaseDb, m as metadata, h as BaseFileManager } from './index-
|
|
4
|
-
import { h as hardDeleteLocalSeedsByLocalIds } from './ClientManager-
|
|
3
|
+
import { B as BaseDb, m as metadata, h as BaseFileManager } from './index-DpgQMIRq.js';
|
|
4
|
+
import { h as hardDeleteLocalSeedsByLocalIds } from './ClientManager-2GtDWHq6.js';
|
|
5
5
|
import '@seedprotocol/arweave';
|
|
6
6
|
import '@seedprotocol/eas';
|
|
7
7
|
import 'xstate';
|
|
@@ -15,9 +15,9 @@ import '@noble/hashes/sha256';
|
|
|
15
15
|
import '@noble/hashes/sha3';
|
|
16
16
|
import '@noble/hashes/utils';
|
|
17
17
|
import 'lodash-es';
|
|
18
|
-
import './Item-
|
|
18
|
+
import './Item-D6j0IvBP.js';
|
|
19
19
|
import 'rxjs';
|
|
20
|
-
import './tabEvents-
|
|
20
|
+
import './tabEvents-DksXwk3X.js';
|
|
21
21
|
import './model-oHA3YhOd.js';
|
|
22
22
|
|
|
23
23
|
const logger = debug('seedSdk:db:write:discardNewDraft');
|
|
@@ -75,4 +75,4 @@ async function discardNewDraft(seedLocalId) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
export { discardNewDraft };
|
|
78
|
-
//# sourceMappingURL=discardNewDraft-
|
|
78
|
+
//# sourceMappingURL=discardNewDraft-hiVaUVjV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discardNewDraft-
|
|
1
|
+
{"version":3,"file":"discardNewDraft-hiVaUVjV.js","sources":["../../src/db/write/discardNewDraft.ts"],"sourcesContent":["import { eq } from 'drizzle-orm'\nimport debug from 'debug'\nimport { BaseDb } from '@/db/Db/BaseDb'\nimport { metadata } from '@/seedSchema'\nimport { BaseFileManager } from '@/helpers/FileManager/BaseFileManager'\nimport { hardDeleteLocalSeedsByLocalIds } from '@/db/write/removeLocalCopiesForAddresses'\n\nconst logger = debug('seedSdk:db:write:discardNewDraft')\n\n/** Storage seeds a property row points at: Html, Image and File values are seeds of their own. */\nconst STORAGE_REF_TYPES = new Set(['html', 'image', 'file'])\n\n/**\n * Removes a draft that Item.create wrote and then failed to finish: the seed, its versions and\n * property rows, the storage seeds its property rows point at (Html, Image, File), and the files\n * those rows name. Only for a seed created in this call: it deletes rows, it doesn't soft-delete.\n * File deletion is best-effort.\n */\nexport async function discardNewDraft(seedLocalId: string): Promise<void> {\n const appDb = BaseDb.getAppDb()\n if (!appDb) return\n\n const rows = await appDb\n .select({\n propertyValue: metadata.propertyValue,\n refSeedType: metadata.refSeedType,\n refResolvedValue: metadata.refResolvedValue,\n localStorageDir: metadata.localStorageDir,\n })\n .from(metadata)\n .where(eq(metadata.seedLocalId, seedLocalId))\n\n const childSeedLocalIds: string[] = []\n const filePaths: string[] = []\n for (const row of rows) {\n if (row.refSeedType && STORAGE_REF_TYPES.has(row.refSeedType) && row.propertyValue) {\n childSeedLocalIds.push(row.propertyValue)\n }\n if (row.localStorageDir && row.refResolvedValue) {\n filePaths.push(BaseFileManager.getFilesPath(row.localStorageDir, row.refResolvedValue))\n }\n }\n\n await hardDeleteLocalSeedsByLocalIds([seedLocalId, ...childSeedLocalIds])\n\n if (filePaths.length === 0) return\n try {\n const fs = await BaseFileManager.getFs()\n for (const filePath of filePaths) {\n try {\n if (fs?.promises?.unlink) await fs.promises.unlink(filePath)\n else fs?.unlinkSync?.(filePath)\n } catch (error) {\n logger(`could not delete ${filePath}`, error)\n }\n }\n } catch (error) {\n logger('could not delete files', error)\n }\n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IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE;AAC5B,IAAA,IAAI;AACF,QAAA,MAAM,EAAE,GAAG,MAAM,eAAe,CAAC,KAAK,EAAE;AACxC,QAAA,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE;AAChC,YAAA,IAAI;AACF,gBAAA,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM;oBAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC;;AACvD,oBAAA,EAAE,EAAE,UAAU,GAAG,QAAQ,CAAC;YACjC;YAAE,OAAO,KAAK,EAAE;AACd,gBAAA,MAAM,CAAC,CAAA,iBAAA,EAAoB,QAAQ,EAAE,EAAE,KAAK,CAAC;YAC/C;QACF;IACF;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,MAAM,CAAC,wBAAwB,EAAE,KAAK,CAAC;IACzC;AACF;;"}
|
|
@@ -130,6 +130,7 @@ declare var schema: Readonly<{
|
|
|
130
130
|
}>;
|
|
131
131
|
declare var ClientManager$1: Readonly<{
|
|
132
132
|
__proto__: null;
|
|
133
|
+
CLIENT_ALREADY_STOPPED_WARNING: string;
|
|
133
134
|
ClientManager: {
|
|
134
135
|
isInitialized: () => any;
|
|
135
136
|
getService: () => import("xstate").Actor<import("xstate").StateMachine<{}, import("xstate").AnyEventObject, {
|
|
@@ -930,4 +931,4 @@ declare function migrateFileSchemasToDb(): Promise<number>;
|
|
|
930
931
|
*/
|
|
931
932
|
declare function updateSchema(schema: any, schemaFileId: any): Promise<void>;
|
|
932
933
|
export { requestEasSyncFromEventBus as A, requestEasSyncFromModelsInit as B, ClientManager as C, sendEasSyncClientRequest as D, EAS_CHAIN_ID_APP_STATE_KEY as E, setRetriesWhenOnlineEnabled as F, startEasSyncActor as G, unregisterSeedQueryLocalSource as H, INIT_CONFIG_CONFLICT_MESSAGE as I, createRowsWrittenSignal as J, createModelsFromJson as K, getLatestSchemaVersion as L, jsonPropertiesToSchemaProperties as M, schema as N, ClientManager$1 as O, SEEDPROTOCOL_Seed_Protocol_v1 as S, getContentHash as a, isVerbatimItemStorageDraftRow as b, convertVerbatimItemStorageRow as c, assertLocalDbChain as d, claimUnpublishedDrafts as e, createLocalQueryDataSource as f, getRefValueType as g, hardDeleteLocalSeedsByLocalIds as h, importJsonSchema as i, createSchema as j, easSyncActor as k, loadSchemaFromFile as l, getClient as m, getPublishedSeedRecord as n, getSchemaNameFromId as o, isSeedQueryLocalSourceRegistered as p, listCompleteSchemaFiles as q, readJsonImportFile as r, syncSchemaFromSource as s, transformImportToSchemaFile as t, loadAllSchemasFromDb as u, mergeEasSyncRequestIntents as v, waitForEasReadChain as w, readSchema as x, registerSeedQueryLocalSource as y, requestEasSyncFromAddressChange as z };
|
|
933
|
-
//# sourceMappingURL=ClientManager-
|
|
934
|
+
//# sourceMappingURL=ClientManager-2GtDWHq6.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientManager-2GtDWHq6.d.ts","sourceRoot":"","sources":["../ClientManager-2GtDWHq6.js"],"names":[],"mappings":"AAucA,oDAEC;AAuBD,sDAEC;;IAqhKkB,8BAGd;IACW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAGX;IAMK,2CAoBL;IACa,qDAUb;IACa;;;OAKb;IACkB,2CAGlB;IACoB,6CAGpB;IAMuB;;;;;OAMvB;IAK8B;;;OAmB9B;IAKY,kDAYZ;IACS,gDAWT;IAKQ,4CAkBR;IACK,sBAAwC;IACtC,wBAAuC;;AAhqKnD,kFAQC;AAqiBD,yFAAyF;AACzF,0CAAmC,YAAY,CAAC;AA74BhD;;;GAGG;AACH,gEAIC;AAqQD,2CAMC;AA+zJD,6DAA6D;AAC7D,wDAGC;AA2KD,mDAEkH;AA9oElH;;;;GAIG;AACH;;;EAMC;AAkCD;;;;;;;;GAQG;AACH,+HAiBC;AAj0DD;;;;;GAKG;AACH,iEASC;AAwqDD;;;;;GAKG;AACH,2GA4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;EA4BN;AA5aD;;;;;;GAMG;AACH,iIAMC;AAr7GD;;;;GAIG;AACH,mEAOC;AAy5GD,6DAEC;AAtyHD;;;;;KAqDC;AAgsBD;;;;;;;;GAQG;AACH;;;;GAgBC;AA4sBD;;;;;;;GAOG;AACH,kEAiBC;AA11BD;;;;;GAKG;AACH;;;;;;;;;;;;;;;;;;EAkDC;AAplBD;;;;;;;;;;;;;;;;;;;;;MAyMC;AA5qDD;;;GAGG;AACH;;;;EA0BC;AAg9BD;;;GAGG;AACH,wEAIC;AA6PD;;;;;;GAMG;AACH,sFAaC;AA22HD;;;;GAIG;AACH,qEAaC;AA3wJD,uEAaC;AAs5BD;;;;;;GAMG;AACH,yFAeC;AA4JD;;;;;GAKG;AACH,0DAcC;AAtED;;;;GAIG;AACH,2DAYC;AAiBD;;;GAGG;AACH,yDAWC;AA1JD;;;;;GAKG;AACH;;;;KA4CC;AAwUD;;;;;GAKG;AACH,2DAiDC;AA5dD;;;;;GAKG;AACH,6EAaC"}
|
|
@@ -77,7 +77,7 @@ declare class Item {
|
|
|
77
77
|
/**
|
|
78
78
|
* Run each File/Image/Html/ItemStorage initial value through its ItemProperty save pipeline (sequentially, to
|
|
79
79
|
* avoid SQLite write contention). Rejects on the first failure, with ItemCreateValidationError when the
|
|
80
|
-
* value breaks its property's rules; Item.create then removes the item.
|
|
80
|
+
* value breaks its property's rules and ItemCreateError otherwise; Item.create then removes the item.
|
|
81
81
|
*/
|
|
82
82
|
static savePipelineValues(item: any, pipelineValues: any, timeout: any): Promise<void>;
|
|
83
83
|
static waitForPropertyInstance(item: any, propertyName: any, timeout: any): Promise<any>;
|
|
@@ -360,10 +360,6 @@ declare const propertyMachine: import("xstate").StateMachine<{}, import("xstate"
|
|
|
360
360
|
src: "saveHtml";
|
|
361
361
|
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
362
362
|
id: string | undefined;
|
|
363
|
-
} | {
|
|
364
|
-
src: "saveRelation";
|
|
365
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
366
|
-
id: string | undefined;
|
|
367
363
|
} | {
|
|
368
364
|
src: "saveItemStorage";
|
|
369
365
|
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
@@ -372,7 +368,7 @@ declare const propertyMachine: import("xstate").StateMachine<{}, import("xstate"
|
|
|
372
368
|
type: "propertyMachineIsIdle";
|
|
373
369
|
params: import("xstate").NonReducibleUnknown;
|
|
374
370
|
}, never, "error" | "idle" | "initializing" | "loading" | "waitingForDb" | "hydratingFromDb" | "resolvingRelatedValue" | {
|
|
375
|
-
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "
|
|
371
|
+
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "savingItemStorage";
|
|
376
372
|
}, string, {}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
377
373
|
id: "itemProperty";
|
|
378
374
|
states: {
|
|
@@ -389,7 +385,6 @@ declare const propertyMachine: import("xstate").StateMachine<{}, import("xstate"
|
|
|
389
385
|
readonly savingImage: {};
|
|
390
386
|
readonly savingFile: {};
|
|
391
387
|
readonly savingHtml: {};
|
|
392
|
-
readonly savingRelation: {};
|
|
393
388
|
readonly savingItemStorage: {};
|
|
394
389
|
readonly doneSaving: {};
|
|
395
390
|
};
|
|
@@ -504,10 +499,6 @@ declare class ItemProperty {
|
|
|
504
499
|
src: "saveHtml";
|
|
505
500
|
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
506
501
|
id: string | undefined;
|
|
507
|
-
} | {
|
|
508
|
-
src: "saveRelation";
|
|
509
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
510
|
-
id: string | undefined;
|
|
511
502
|
} | {
|
|
512
503
|
src: "saveItemStorage";
|
|
513
504
|
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
@@ -516,7 +507,7 @@ declare class ItemProperty {
|
|
|
516
507
|
type: "propertyMachineIsIdle";
|
|
517
508
|
params: import("xstate").NonReducibleUnknown;
|
|
518
509
|
}, never, "error" | "idle" | "initializing" | "loading" | "waitingForDb" | "hydratingFromDb" | "resolvingRelatedValue" | {
|
|
519
|
-
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "
|
|
510
|
+
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "savingItemStorage";
|
|
520
511
|
}, string, {}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
521
512
|
id: "itemProperty";
|
|
522
513
|
states: {
|
|
@@ -533,7 +524,6 @@ declare class ItemProperty {
|
|
|
533
524
|
readonly savingImage: {};
|
|
534
525
|
readonly savingFile: {};
|
|
535
526
|
readonly savingHtml: {};
|
|
536
|
-
readonly savingRelation: {};
|
|
537
527
|
readonly savingItemStorage: {};
|
|
538
528
|
readonly doneSaving: {};
|
|
539
529
|
};
|
|
@@ -591,10 +581,6 @@ declare class ItemProperty {
|
|
|
591
581
|
src: "saveHtml";
|
|
592
582
|
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
593
583
|
id: string | undefined;
|
|
594
|
-
} | {
|
|
595
|
-
src: "saveRelation";
|
|
596
|
-
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
597
|
-
id: string | undefined;
|
|
598
584
|
} | {
|
|
599
585
|
src: "saveItemStorage";
|
|
600
586
|
logic: import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>;
|
|
@@ -603,7 +589,7 @@ declare class ItemProperty {
|
|
|
603
589
|
type: "propertyMachineIsIdle";
|
|
604
590
|
params: import("xstate").NonReducibleUnknown;
|
|
605
591
|
}, never, "error" | "idle" | "initializing" | "loading" | "waitingForDb" | "hydratingFromDb" | "resolvingRelatedValue" | {
|
|
606
|
-
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "
|
|
592
|
+
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "savingItemStorage";
|
|
607
593
|
}, string, {}, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
608
594
|
id: "itemProperty";
|
|
609
595
|
states: {
|
|
@@ -620,7 +606,6 @@ declare class ItemProperty {
|
|
|
620
606
|
readonly savingImage: {};
|
|
621
607
|
readonly savingFile: {};
|
|
622
608
|
readonly savingHtml: {};
|
|
623
|
-
readonly savingRelation: {};
|
|
624
609
|
readonly savingItemStorage: {};
|
|
625
610
|
readonly doneSaving: {};
|
|
626
611
|
};
|
|
@@ -630,7 +615,7 @@ declare class ItemProperty {
|
|
|
630
615
|
_getSnapshot(): import("xstate").MachineSnapshot<{}, import("xstate").AnyEventObject, {
|
|
631
616
|
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").CallbackActorLogic<import("xstate").EventObject, import("xstate").NonReducibleUnknown, import("xstate").EventObject>> | undefined;
|
|
632
617
|
}, "error" | "idle" | "initializing" | "loading" | "waitingForDb" | "hydratingFromDb" | "resolvingRelatedValue" | {
|
|
633
|
-
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "
|
|
618
|
+
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "savingItemStorage";
|
|
634
619
|
}, string, import("xstate").NonReducibleUnknown, import("xstate").MetaObject, {
|
|
635
620
|
id: "itemProperty";
|
|
636
621
|
states: {
|
|
@@ -647,7 +632,6 @@ declare class ItemProperty {
|
|
|
647
632
|
readonly savingImage: {};
|
|
648
633
|
readonly savingFile: {};
|
|
649
634
|
readonly savingHtml: {};
|
|
650
|
-
readonly savingRelation: {};
|
|
651
635
|
readonly savingItemStorage: {};
|
|
652
636
|
readonly doneSaving: {};
|
|
653
637
|
};
|
|
@@ -670,13 +654,22 @@ declare class ItemProperty {
|
|
|
670
654
|
get localStoragePath(): string | undefined;
|
|
671
655
|
get versionLocalId(): any;
|
|
672
656
|
get status(): "error" | "idle" | "initializing" | "loading" | "waitingForDb" | "hydratingFromDb" | "resolvingRelatedValue" | {
|
|
673
|
-
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "
|
|
657
|
+
saving: "analyzingInput" | "doneSaving" | "savingImage" | "savingFile" | "savingHtml" | "savingItemStorage";
|
|
674
658
|
};
|
|
675
659
|
/** Validation errors from last failed save (enum, pattern, minLength, maxLength). Cleared when the next save starts. */
|
|
676
660
|
get saveValidationErrors(): any;
|
|
677
661
|
get alias(): any;
|
|
678
662
|
set value(value: any);
|
|
679
663
|
get value(): any;
|
|
664
|
+
/**
|
|
665
|
+
* Shows `value` at once and saves it; `await property.save()` to wait for the result. Unlike
|
|
666
|
+
* assigning `property.value`, it saves even when `value` is already in context.
|
|
667
|
+
*
|
|
668
|
+
* @param options.before - The values to restore if the save is refused or fails. Defaults to the
|
|
669
|
+
* current context; pass it when you already put `value` into context (a debounced input, say),
|
|
670
|
+
* so a refusal still rolls back to what was there before.
|
|
671
|
+
*/
|
|
672
|
+
setValue(value: any, options?: {}): void;
|
|
680
673
|
_pendingSchemaSave: Promise<boolean> | undefined;
|
|
681
674
|
get published(): boolean;
|
|
682
675
|
subscribe(callback: any): import("xstate").Subscription;
|
|
@@ -895,4 +888,4 @@ declare function getMetadataLatest({ seedLocalId, seedUid }: {
|
|
|
895
888
|
}): any;
|
|
896
889
|
import { BehaviorSubject } from 'rxjs';
|
|
897
890
|
export { unloadEntity as $, getPublishExecutor as A, getRevokeExecutor as B, ClientManagerState as C, DEFAULT_READY_TIMEOUT_MS as D, getUploadExecutor as E, getVersionData$1 as F, isLocalUnsealedDraft as G, isSeedRowOwned as H, Item as I, localUnsealedDraftSql as J, ownedPublisherSql as K, ownedSeedsSql as L, METADATA_LATEST_FIRST_ORDER_SQL as M, pickLatestMetadataRowPerProperty as N, OwnershipError as O, PUBLISH_NOT_CONFIGURED_MESSAGE as P, placeholderUidSql as Q, propertyMachine as R, publisherInAddressListSql as S, publisherIsInOwnedSet as T, setAdditionalSyncAddresses as U, setGetPublisherForNewSeeds as V, setPublishExecutor as W, setRevokeExecutor as X, setUploadExecutor as Y, getInvariantSafePropertyDescriptor as Z, clearDestroySubscriptions as _, ItemProperty as a, ClientManagerEvents as a0, withLockedItemStorageRow as a1, getItemStorageFilePath as a2, writeItemStorageFile as a3, resolvePublisherFromSeedRow as a4, getPropertyData$1 as a5, Item$1 as a6, ItemPropertySaveValidationError as b, assertItemOwned as c, waitForEntityIdle as d, compareMetadataRowsLatestFirst as e, getEasSchemaUidForModel as f, getItemData as g, getLatestPublishedVersionRow as h, isItemOwned as i, chunkValues as j, getGetAdditionalSyncAddresses as k, isVersionRevoked as l, createReactiveProxy as m, findEntity as n, forceRemoveFromCaches as o, parseListPropertyValueFromStorage as p, runDestroyLifecycle as q, rowsPerInsert as r, selectInBatches as s, isPublishedMetadataRow as t, MachineIds as u, createNewItem as v, writeInBatches as w, getEasSchemaForItemProperty as x, getGetPublisherForNewSeeds as y, getMetadataLatest as z };
|
|
898
|
-
//# sourceMappingURL=Item-
|
|
891
|
+
//# sourceMappingURL=Item-D6j0IvBP.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Item-D6j0IvBP.d.ts","sourceRoot":"","sources":["../Item-D6j0IvBP.js"],"names":[],"mappings":"AA22JA;;;;;;GAMG;AACH,gEA+DC;AA30JD,2CAEC;AAeD,0CAEC;AAoJD,oCAAuB;AAjQvB;;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FAkBC;AAtlHD;;;GAGG;AACH,mDAAyI;AAYzI;;;GAGG;AACH,yFAMC;AAzRD;;;;GAIG;AACH,2DAAuG;AA36BvG,4BAAe;AAmoMf;;;;;;;;GA6EC;AAhhKD,wGAAwG;AACxG,uFAIC;AAgXD;;;;;;;;;kBA+bmB,CAAC;;;eAvYnB;AAlyDD,mDAEC;AAuYD;;;GAGG;AACH;;;QA2BC;gCA9e+B,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModelProperty-
|
|
1
|
+
{"version":3,"file":"ModelProperty-B52C3CQ2.d.ts","sourceRoot":"","sources":["../ModelProperty-B52C3CQ2.js"],"names":[],"mappings":"AA+1BA;IAwZI,gDA+RC;IACD,+EAA+E;IAC/E,qEASC;IACD,8FAA8F;IAC9F,+DAmBC;IACD;;;;OAIG;IACH,0CAMC;IACD;;OAEG;IACH,yCAmBC;IACD;;;OAGG;IACH,mEAyFC;IACD;;;;;;OAMG;IACH,0DAwEC;IACD;;;;;OAKG;IACH;;;;qBAWC;IACD;;;OAGG;IACH,2DAqBC;IACD;;OAEG;IACH,kEAOC;IACD;;;;OAIG;IACH,8EAQC;IACD;;OAEG;IACH,qEAeC;IACD;;OAEG;IACH,kDAIC;IACD;;;OAGG;IACH,mDAEC;IAyGD;;;;OAIG;IACH,8DAwBC;IAppCD,2BAqBC;IApBG,2GAA2G;IAC3G,uBAA4C;IAY5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAEE;IAMN;;;OAGG;IACH,iCAIC;IACD;;;;;OAKG;IACH,+CA+GC;IACD;;;;;OAKG;IACH,wEAgCC;IACD;;;;OAIG;IACH,mEAuBC;IACD,6EAA6E;IAC7E;;;MAOC;IACD;;;OAGG;IACH;;;;;;;mBA6EC;IACD;;;OAGG;IACH,6CAiDC;IACD;;;OAGG;IACH,kEA8BC;IACD;;;OAGG;IACH,qCAKC;IAynBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAEC;IACD;;;;;;;;;;;;;;;;;;;;;;;;OAEC;IACD,0BAEC;IACD,+BAMC;IACD,iBAEC;IACD,oBAcC;IACD,4BAEC;IACD,uBAGC;IACD;;;OAGG;IACH,yBA8BC;IACD,aAaC;IACD;;;;;OAKG;IACH,wBAOC;IA+BD;;;;OAIG;IACH,eAmBC;IACD;;OAEG;IACH,yBAmEC;CACJ"}
|
|
@@ -441,7 +441,7 @@ declare namespace Schema {
|
|
|
441
441
|
* @returns The file path of the new schema version
|
|
442
442
|
* @throws Error if schema, model, or property not found
|
|
443
443
|
*/
|
|
444
|
-
declare function deletePropertyFromModel(schemaName: any, modelName: any, propertyName: any,
|
|
444
|
+
declare function deletePropertyFromModel(schemaName: any, modelName: any, propertyName: any, _options?: {}): Promise<any>;
|
|
445
445
|
declare var Schema$1: Readonly<{
|
|
446
446
|
__proto__: null;
|
|
447
447
|
Schema: typeof Schema;
|
|
@@ -598,4 +598,4 @@ declare const schemaMachine: import("xstate").StateMachine<{}, import("xstate").
|
|
|
598
598
|
*/
|
|
599
599
|
declare function updateModelProperties(schemaName: any, propertyUpdates: any, modelUpdates: any): Promise<any>;
|
|
600
600
|
export { Schema as S, deletePropertyFromModel as a, Schema$1 as b, deleteModelFromSchema as d, renameModelProperty as r, schemaMachine as s, updateModelProperties as u };
|
|
601
|
-
//# sourceMappingURL=Schema-
|
|
601
|
+
//# sourceMappingURL=Schema-O1QLoXv6.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Schema-
|
|
1
|
+
{"version":3,"file":"Schema-O1QLoXv6.d.ts","sourceRoot":"","sources":["../Schema-O1QLoXv6.js"],"names":[],"mappings":"AAygIA;IAiCI,kDAoPC;IACD;;;;OAIG;IACH,iEAgBC;IACD;;;OAGG;IACH,uCAUC;IACD;;;;OAIG;IACH,0BAwBC;IACD;;;;;OAKG;IACH,mDA8BC;IACD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