@seedprotocol/sdk 0.4.17 → 0.4.19
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/{ArweaveClient-Zz6VwCkj.js → ArweaveClient-CAdWVQnJ.js} +3 -3
- package/dist/{ArweaveClient-Zz6VwCkj.js.map → ArweaveClient-CAdWVQnJ.js.map} +1 -1
- package/dist/{ArweaveClient-DPeCeRMF.js → ArweaveClient-V62RJhsZ.js} +3 -3
- package/dist/{ArweaveClient-DPeCeRMF.js.map → ArweaveClient-V62RJhsZ.js.map} +1 -1
- package/dist/{Db-Cvoi9q3N.js → Db-8N3-le9a.js} +4 -4
- package/dist/{Db-Cvoi9q3N.js.map → Db-8N3-le9a.js.map} +1 -1
- package/dist/{Db-DsFElL33.js → Db-DS2GBY6h.js} +133 -6
- package/dist/Db-DS2GBY6h.js.map +1 -0
- package/dist/{EasClient-B2N8bc3C.js → EasClient-D1eibg8b.js} +2 -2
- package/dist/{EasClient-B2N8bc3C.js.map → EasClient-D1eibg8b.js.map} +1 -1
- package/dist/{EasClient-D5Nn1WBF.js → EasClient-nOmY5meW.js} +2 -2
- package/dist/{EasClient-D5Nn1WBF.js.map → EasClient-nOmY5meW.js.map} +1 -1
- package/dist/{FileManager-Bk-JeMoA.js → FileManager-Cze8qmS1.js} +2 -2
- package/dist/{FileManager-Bk-JeMoA.js.map → FileManager-Cze8qmS1.js.map} +1 -1
- package/dist/{FileManager-Cqy_Lq46.js → FileManager-DSTAwkqw.js} +2 -2
- package/dist/{FileManager-Cqy_Lq46.js.map → FileManager-DSTAwkqw.js.map} +1 -1
- package/dist/{ModelProperty-CkQaEsBu.js → ModelProperty-ChevZoUy.js} +24 -24
- package/dist/{ModelProperty-CkQaEsBu.js.map → ModelProperty-ChevZoUy.js.map} +1 -1
- package/dist/{PathResolver-DF1QFI1d.js → PathResolver-3TuYA9yv.js} +2 -2
- package/dist/{PathResolver-DF1QFI1d.js.map → PathResolver-3TuYA9yv.js.map} +1 -1
- package/dist/{PathResolver-C3sdR5LL.js → PathResolver-C5gj9EU2.js} +2 -2
- package/dist/{PathResolver-C3sdR5LL.js.map → PathResolver-C5gj9EU2.js.map} +1 -1
- package/dist/{QueryClient-Ctgd0tDn.js → QueryClient-BGv6JOls.js} +2 -2
- package/dist/{QueryClient-Ctgd0tDn.js.map → QueryClient-BGv6JOls.js.map} +1 -1
- package/dist/{QueryClient-CnONLIkA.js → QueryClient-By2vdhIz.js} +2 -2
- package/dist/{QueryClient-CnONLIkA.js.map → QueryClient-By2vdhIz.js.map} +1 -1
- package/dist/{Schema-Bnim4hAF.js → Schema-BQ5W3aOW.js} +38 -38
- package/dist/{Schema-Bnim4hAF.js.map → Schema-BQ5W3aOW.js.map} +1 -1
- package/dist/{SchemaValidationService-DXxRk-9Q.js → SchemaValidationService-DQx83Cte.js} +2 -2
- package/dist/{SchemaValidationService-DXxRk-9Q.js.map → SchemaValidationService-DQx83Cte.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-dzwzz4dA.js → backfillMetadataPropertyIds-CMsU83q9.js} +2 -2
- package/dist/{backfillMetadataPropertyIds-dzwzz4dA.js.map → backfillMetadataPropertyIds-CMsU83q9.js.map} +1 -1
- package/dist/cjs/{ModelProperty-C80601ai.js → ModelProperty-Cuj839nX.js} +17 -17
- package/dist/cjs/{ModelProperty-C80601ai.js.map → ModelProperty-Cuj839nX.js.map} +1 -1
- package/dist/cjs/{Schema-6BQKp7hO.js → Schema-TFe24NNG.js} +20 -20
- package/dist/cjs/{Schema-6BQKp7hO.js.map → Schema-TFe24NNG.js.map} +1 -1
- package/dist/cjs/{SchemaValidationService-BySF1P0v.js → SchemaValidationService-DVQrRpse.js} +2 -2
- package/dist/cjs/{SchemaValidationService-BySF1P0v.js.map → SchemaValidationService-DVQrRpse.js.map} +1 -1
- package/dist/cjs/{backfillMetadataPropertyIds-D9uzW5bW.js → backfillMetadataPropertyIds-BiXK4hT1.js} +2 -2
- package/dist/cjs/{backfillMetadataPropertyIds-D9uzW5bW.js.map → backfillMetadataPropertyIds-BiXK4hT1.js.map} +1 -1
- package/dist/cjs/{getItem-Dj49AjWB.js → getItem-FgLv9abh.js} +2 -2
- package/dist/cjs/{getItem-Dj49AjWB.js.map → getItem-FgLv9abh.js.map} +1 -1
- package/dist/cjs/{getPublishPayload-dR9co4rH.js → getPublishPayload-h_Rz8nVX.js} +527 -79
- package/dist/cjs/getPublishPayload-h_Rz8nVX.js.map +1 -0
- package/dist/cjs/{getPublishUploads-g61mgXaA.js → getPublishUploads-DdSwst2x.js} +14 -8
- package/dist/cjs/getPublishUploads-DdSwst2x.js.map +1 -0
- package/dist/cjs/{getSegmentedItemProperties-NFvOHlAi.js → getSegmentedItemProperties-Bu4P_MG8.js} +5 -4
- package/dist/cjs/getSegmentedItemProperties-Bu4P_MG8.js.map +1 -0
- package/dist/cjs/{index-ud9i9fpp.js → index-CKJeh6ic.js} +3 -3
- package/dist/cjs/index-CKJeh6ic.js.map +1 -0
- package/dist/cjs/{index-9O_Ji1kY.js → index-pyKmk9hA.js} +243 -60
- package/dist/cjs/index-pyKmk9hA.js.map +1 -0
- package/dist/cjs/{ownership-CyLRNReQ.js → ownership-gfm5thj7.js} +2 -2
- package/dist/cjs/{ownership-CyLRNReQ.js.map → ownership-gfm5thj7.js.map} +1 -1
- package/dist/cjs/{property-Hj-RhQVX.js → property-Dw0b_Sf8.js} +4 -4
- package/dist/cjs/{property-Hj-RhQVX.js.map → property-Dw0b_Sf8.js.map} +1 -1
- package/dist/db/drizzle/drizzle/0010_add_arweave_l1_finalize_jobs.sql +16 -0
- package/dist/db/drizzle/drizzle/meta/0010_snapshot.json +1182 -0
- package/dist/db/drizzle/drizzle/meta/_journal.json +7 -0
- package/dist/{getItem-ClK0UZqi.js → getItem-Bd9U9Yih.js} +2 -2
- package/dist/{getItem-ClK0UZqi.js.map → getItem-Bd9U9Yih.js.map} +1 -1
- package/dist/{getPublishPayload-CdfPTl8l.js → getPublishPayload-eJL7ktes.js} +530 -82
- package/dist/getPublishPayload-eJL7ktes.js.map +1 -0
- package/dist/{getPublishUploads-CGBky9q9.js → getPublishUploads-CKm5dsL6.js} +14 -8
- package/dist/getPublishUploads-CKm5dsL6.js.map +1 -0
- package/dist/{getSegmentedItemProperties-CJWdYH9W.js → getSegmentedItemProperties-B74LN_bz.js} +5 -4
- package/dist/getSegmentedItemProperties-B74LN_bz.js.map +1 -0
- package/dist/{index-C74KrwXN.js → index-BQv2k74p.js} +3 -2
- package/dist/index-BQv2k74p.js.map +1 -0
- package/dist/{index-uPXtq2cf.js → index-BvZCYMxA.js} +268 -75
- package/dist/index-BvZCYMxA.js.map +1 -0
- package/dist/{index-CgmWq1sF.js → index-BxfqPvtu.js} +3 -3
- package/dist/index-BxfqPvtu.js.map +1 -0
- package/dist/main.cjs +1 -1
- package/dist/main.js +155 -18
- package/dist/main.js.map +1 -1
- package/dist/node.js +10 -10
- package/dist/{ownership-QK5haR3-.js → ownership-tVhYQomL.js} +2 -2
- package/dist/{ownership-QK5haR3-.js.map → ownership-tVhYQomL.js.map} +1 -1
- package/dist/{property-Dt0U3UXJ.js → property-BOdk-wW1.js} +6 -6
- package/dist/{property-Dt0U3UXJ.js.map → property-BOdk-wW1.js.map} +1 -1
- package/dist/{queries-BUB-vUBm.js → queries-DBqVwEdv.js} +2 -2
- package/dist/{queries-BUB-vUBm.js.map → queries-DBqVwEdv.js.map} +1 -1
- package/dist/seedSchema/ArweaveL1FinalizeSchema.ts +28 -0
- package/dist/seedSchema/index.d.ts +3 -0
- package/dist/seedSchema/index.ts +1 -0
- package/dist/src/Item/Item.d.ts +12 -9
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/Item/queries.d.ts +3 -3
- package/dist/src/Item/service/actors/fetchDataFromEas.d.ts +1 -1
- package/dist/src/Item/service/actors/fetchDataFromEas.d.ts.map +1 -1
- package/dist/src/Item/service/actors/hydrateExistingItem.d.ts +1 -1
- package/dist/src/Item/service/actors/hydrateNewItem.d.ts +1 -1
- package/dist/src/Item/service/actors/initialize.d.ts +1 -1
- package/dist/src/Item/service/actors/loadOrCreateItem.d.ts +2 -2
- package/dist/src/Item/service/actors/reload.d.ts +2 -2
- package/dist/src/Item/service/actors/runPublish.d.ts +2 -2
- package/dist/src/Item/service/actors/saveDataToDb.d.ts +1 -1
- package/dist/src/Item/service/actors/waitForDb.d.ts +1 -1
- package/dist/src/Item/service/itemMachineSingle.d.ts +11 -11
- package/dist/src/ItemProperty/ItemProperty.d.ts +5 -5
- package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/initialize.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/resolveRelatedValue.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/resolveRemoteStorage.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveFile.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveHtml.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveImage.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveRelation.d.ts +2 -2
- package/dist/src/ItemProperty/service/actors/waitForDb.d.ts +1 -1
- package/dist/src/ItemProperty/service/propertyMachine.d.ts +14 -14
- package/dist/src/Model/Model.d.ts +2 -2
- package/dist/src/Model/service/actors/createModelProperties.d.ts +1 -1
- package/dist/src/Model/service/actors/loadOrCreateModel.d.ts +1 -1
- package/dist/src/Model/service/actors/validateModel.d.ts +1 -1
- package/dist/src/Model/service/modelMachine.d.ts +6 -6
- package/dist/src/ModelProperty/ModelProperty.d.ts +3 -3
- package/dist/src/ModelProperty/service/actors/compareAndMarkDraft.d.ts +1 -1
- package/dist/src/ModelProperty/service/actors/saveToSchema.d.ts +1 -1
- package/dist/src/ModelProperty/service/actors/validateProperty.d.ts +1 -1
- package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts +7 -7
- package/dist/src/Schema/Schema.d.ts +1 -1
- package/dist/src/Schema/service/actors/checkExistingSchema.d.ts +1 -1
- package/dist/src/Schema/service/actors/loadOrCreateSchema.d.ts +1 -1
- package/dist/src/Schema/service/actors/validateSchema.d.ts +1 -1
- package/dist/src/Schema/service/actors/writeModelsToDb.d.ts +1 -1
- package/dist/src/Schema/service/actors/writeSchemaToDb.d.ts +1 -1
- package/dist/src/Schema/service/addModelsMachine.d.ts +1 -1
- package/dist/src/Schema/service/schemaMachine.d.ts +7 -7
- package/dist/src/Schema/service/validation/SchemaValidationService.d.ts +4 -4
- package/dist/src/browser/db/Db.d.ts +2 -2
- package/dist/src/browser/db/drizzleFiles.d.ts +3 -2
- package/dist/src/browser/db/drizzleFiles.d.ts.map +1 -1
- package/dist/src/browser/helpers/ArweaveClient.d.ts +2 -2
- package/dist/src/browser/helpers/EasClient.d.ts +1 -1
- package/dist/src/browser/helpers/FileManager.d.ts +1 -1
- package/dist/src/browser/helpers/PathResolver.d.ts +1 -1
- package/dist/src/browser/helpers/QueryClient.d.ts +2 -2
- package/dist/src/browser/seed.d.ts +1 -1
- package/dist/src/client/BaseClientManager.d.ts +1 -1
- package/dist/src/client/ClientManager.d.ts +41 -41
- package/dist/src/client/actors/addModelsToDb.d.ts +1 -1
- package/dist/src/client/actors/addModelsToStore.d.ts +1 -1
- package/dist/src/client/actors/dbInit.d.ts +1 -1
- package/dist/src/client/actors/fileSystemInit.d.ts +1 -1
- package/dist/src/client/actors/platformClassesInit.d.ts +1 -1
- package/dist/src/client/actors/processSchemaFiles.d.ts +1 -1
- package/dist/src/client/actors/saveConfig.d.ts +1 -1
- package/dist/src/client/clientManagerMachine.d.ts +11 -11
- package/dist/src/client/constants.d.ts +2 -2
- package/dist/src/db/Db/BaseDb.d.ts +1 -1
- package/dist/src/db/read/getItem.d.ts +1 -1
- package/dist/src/db/read/getItemData.d.ts +1 -1
- package/dist/src/db/read/getItemProperties.d.ts +1 -1
- package/dist/src/db/read/getItemProperty.d.ts +1 -1
- package/dist/src/db/read/getItems.d.ts +1 -1
- package/dist/src/db/read/getMetadata.d.ts +1 -1
- package/dist/src/db/read/getModels.d.ts +1 -1
- package/dist/src/db/read/getPropertyData.d.ts +2 -2
- package/dist/src/db/read/getPublishPayload.d.ts +12 -4
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/read/getPublishPendingDiff.d.ts +25 -0
- package/dist/src/db/read/getPublishPendingDiff.d.ts.map +1 -0
- package/dist/src/db/read/getPublishUploads.d.ts +3 -3
- package/dist/src/db/read/getPublishUploads.d.ts.map +1 -1
- package/dist/src/db/read/getRelatedItemsForPublish.d.ts +1 -1
- package/dist/src/db/read/getRelatedItemsForPublish.d.ts.map +1 -1
- package/dist/src/db/read/getRelationValueData.d.ts +1 -1
- package/dist/src/db/read/getSeedData.d.ts +1 -1
- package/dist/src/db/read/getVersionData.d.ts +1 -1
- package/dist/src/db/write/applyArweaveL1TransactionIdLocal.d.ts +12 -0
- package/dist/src/db/write/applyArweaveL1TransactionIdLocal.d.ts.map +1 -0
- package/dist/src/db/write/createMetadata.d.ts +2 -2
- package/dist/src/db/write/createNewItem.d.ts +1 -1
- package/dist/src/db/write/createSeeds.d.ts +1 -1
- package/dist/src/db/write/saveMetadata.d.ts +1 -1
- package/dist/src/db/write/updateItemPropertyValue.d.ts +1 -1
- package/dist/src/db/write/updateMetadata.d.ts +2 -2
- package/dist/src/eas.d.ts +12 -1
- package/dist/src/eas.d.ts.map +1 -1
- package/dist/src/events/files/download.d.ts +1 -1
- package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/src/helpers/ArweaveClient/BaseArweaveClient.d.ts +1 -1
- package/dist/src/helpers/ArweaveClient/arweaveL1UploadApi.d.ts +46 -0
- package/dist/src/helpers/ArweaveClient/arweaveL1UploadApi.d.ts.map +1 -0
- package/dist/src/helpers/ArweaveClient/uploadApiVerification.d.ts +1 -1
- package/dist/src/helpers/EasClient/BaseEasClient.d.ts +1 -1
- package/dist/src/helpers/QueryClient/BaseQueryClient.d.ts +1 -1
- package/dist/src/helpers/addresses.d.ts +1 -1
- package/dist/src/helpers/constants.d.ts +2 -0
- package/dist/src/helpers/constants.d.ts.map +1 -1
- package/dist/src/helpers/db.d.ts +4 -4
- package/dist/src/helpers/easPropertyCanonical.d.ts +15 -0
- package/dist/src/helpers/easPropertyCanonical.d.ts.map +1 -0
- package/dist/src/helpers/file/fetchAll/index.d.ts +1 -1
- package/dist/src/helpers/getSchemaForItemProperty.d.ts +1 -1
- package/dist/src/helpers/getSegmentedItemProperties.d.ts +6 -6
- package/dist/src/helpers/getSegmentedItemProperties.d.ts.map +1 -1
- package/dist/src/helpers/index.d.ts +4 -1
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/model.d.ts +1 -1
- package/dist/src/helpers/ownership.d.ts +1 -1
- package/dist/src/helpers/property/index.d.ts +1 -1
- package/dist/src/helpers/property.d.ts +1 -1
- package/dist/src/helpers/publishConfig.d.ts +1 -1
- package/dist/src/helpers/relationSeedRef.d.ts +8 -0
- package/dist/src/helpers/relationSeedRef.d.ts.map +1 -0
- package/dist/src/helpers/schema.d.ts +2 -2
- package/dist/src/helpers/updateSchema.d.ts +2 -2
- package/dist/src/imports/json.d.ts +1 -1
- package/dist/src/imports/markdown.d.ts +1 -1
- package/dist/src/index.d.ts +11 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/IItem.d.ts +5 -3
- package/dist/src/interfaces/IItem.d.ts.map +1 -1
- package/dist/src/interfaces/IItemProperty.d.ts +3 -3
- package/dist/src/node/codegen/drizzle.d.ts +1 -1
- package/dist/src/node/db/Db.d.ts +3 -3
- package/dist/src/node/helpers/ArweaveClient.d.ts +2 -2
- package/dist/src/node/helpers/EasClient.d.ts +1 -1
- package/dist/src/node/helpers/FileManager.d.ts +1 -1
- package/dist/src/node/helpers/PathResolver.d.ts +1 -1
- package/dist/src/node/helpers/QueryClient.d.ts +2 -2
- package/dist/src/seedSchema/ArweaveL1FinalizeSchema.d.ts +233 -0
- package/dist/src/seedSchema/ArweaveL1FinalizeSchema.d.ts.map +1 -0
- package/dist/src/seedSchema/index.d.ts +1 -0
- package/dist/src/seedSchema/index.d.ts.map +1 -1
- package/dist/src/services/publish/actors/createPublishAttempt.d.ts +1 -1
- package/dist/src/services/publish/actors/preparePublishRequestData.d.ts +1 -1
- package/dist/src/services/publish/actors/upload.d.ts +1 -1
- package/dist/src/services/publish/actors/validateItemData.d.ts +1 -1
- package/dist/src/services/publish/publishMachine.d.ts +7 -7
- package/dist/src/services/write/writeProcessMachine.d.ts +1 -1
- package/dist/src/types/db.d.ts +1 -1
- package/dist/src/types/index.d.ts +1 -1
- package/dist/src/types/item.d.ts +6 -6
- package/dist/src/types/machines.d.ts +2 -2
- package/dist/src/types/model.d.ts +3 -3
- package/dist/src/types/property.d.ts +3 -3
- package/dist/src/types/publish.d.ts +1 -1
- package/dist/src/types/seedProtocol.d.ts +1 -1
- package/package.json +2 -2
- package/dist/Db-DsFElL33.js.map +0 -1
- package/dist/cjs/getPublishPayload-dR9co4rH.js.map +0 -1
- package/dist/cjs/getPublishUploads-g61mgXaA.js.map +0 -1
- package/dist/cjs/getSegmentedItemProperties-NFvOHlAi.js.map +0 -1
- package/dist/cjs/index-9O_Ji1kY.js.map +0 -1
- package/dist/cjs/index-ud9i9fpp.js.map +0 -1
- package/dist/getPublishPayload-CdfPTl8l.js.map +0 -1
- package/dist/getPublishUploads-CGBky9q9.js.map +0 -1
- package/dist/getSegmentedItemProperties-CJWdYH9W.js.map +0 -1
- package/dist/index-C74KrwXN.js.map +0 -1
- package/dist/index-CgmWq1sF.js.map +0 -1
- package/dist/index-uPXtq2cf.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { fromCallback, setup, assign, createActor } from 'xstate';
|
|
2
2
|
import 'reflect-metadata';
|
|
3
|
-
import { o as BaseDb,
|
|
3
|
+
import { o as BaseDb, ax as writeProcessMachine, y as models, z as properties, M as Model, C as modelPropertiesToObject, af as schemas, a8 as modelSchemas, ay as getModelIdByFileId, n as normalizeDataType, az as generateId, aA as waitForEntityIdle, aB as createReactiveProxy, aC as findEntity, u as BaseFileManager, aD as forceRemoveFromCaches, aE as runDestroyLifecycle, aF as getModelId } from './index-BvZCYMxA.js';
|
|
4
4
|
import 'pluralize';
|
|
5
5
|
import { eq, and } from 'drizzle-orm';
|
|
6
6
|
import debug from 'debug';
|
|
7
|
-
import { S as Schema } from './Schema-
|
|
7
|
+
import { S as Schema } from './Schema-BQ5W3aOW.js';
|
|
8
8
|
import 'drizzle-orm/sqlite-core';
|
|
9
9
|
import 'nanoid';
|
|
10
10
|
import 'nanoid-dictionary';
|
|
@@ -16,7 +16,7 @@ import 'rxjs';
|
|
|
16
16
|
import 'eventemitter3';
|
|
17
17
|
import 'arweave';
|
|
18
18
|
import 'js-sha3';
|
|
19
|
-
import './SchemaValidationService-
|
|
19
|
+
import './SchemaValidationService-DQx83Cte.js';
|
|
20
20
|
import '@sinclair/typebox/value';
|
|
21
21
|
|
|
22
22
|
const logger$3 = debug('seedSdk:modelProperty:actors:saveToSchema');
|
|
@@ -27,15 +27,15 @@ const logger$3 = debug('seedSdk:modelProperty:actors:saveToSchema');
|
|
|
27
27
|
*/
|
|
28
28
|
async function getSchemaNameFromModel(modelName) {
|
|
29
29
|
// Get the latest schema files and find which one contains this model
|
|
30
|
-
const _mod_0 = await import('./index-
|
|
31
|
-
const _ns_0 = _mod_0.
|
|
30
|
+
const _mod_0 = await import('./index-BvZCYMxA.js');
|
|
31
|
+
const _ns_0 = _mod_0.bD;
|
|
32
32
|
const schemaHelpersMod = _ns_0;
|
|
33
33
|
const { listLatestSchemaFiles } = schemaHelpersMod;
|
|
34
34
|
const latestSchemas = await listLatestSchemaFiles();
|
|
35
35
|
for (const schema of latestSchemas) {
|
|
36
36
|
try {
|
|
37
|
-
const _mod_1 = await import('./index-
|
|
38
|
-
const _ns_1 = _mod_1.
|
|
37
|
+
const _mod_1 = await import('./index-BvZCYMxA.js');
|
|
38
|
+
const _ns_1 = _mod_1.bz;
|
|
39
39
|
const fileManagerMod = _ns_1;
|
|
40
40
|
const { BaseFileManager } = fileManagerMod;
|
|
41
41
|
const content = await BaseFileManager.readFileAsString(schema.filePath);
|
|
@@ -54,7 +54,7 @@ async function getSchemaNameFromModel(modelName) {
|
|
|
54
54
|
const saveToSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
55
55
|
const _saveToSchema = async () => {
|
|
56
56
|
// Use dynamic import to break circular dependency
|
|
57
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
57
|
+
const validationServiceMod = await import('./SchemaValidationService-DQx83Cte.js');
|
|
58
58
|
const { SchemaValidationService } = validationServiceMod;
|
|
59
59
|
const validationService = new SchemaValidationService();
|
|
60
60
|
// Validate property structure before saving
|
|
@@ -73,15 +73,15 @@ const saveToSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
73
73
|
throw new Error(`Model not found for modelId: ${context.modelId}`);
|
|
74
74
|
}
|
|
75
75
|
// Persist to database only - schema file is updated only when user calls Schema.saveNewVersion()
|
|
76
|
-
const _mod_2 = await import('./index-
|
|
77
|
-
const _ns_2 = _mod_2.
|
|
76
|
+
const _mod_2 = await import('./index-BvZCYMxA.js');
|
|
77
|
+
const _ns_2 = _mod_2.bA;
|
|
78
78
|
const dbMod = _ns_2;
|
|
79
79
|
const { savePropertyToDb } = dbMod;
|
|
80
80
|
await savePropertyToDb(context);
|
|
81
81
|
// Mark schema as draft so user knows to save
|
|
82
82
|
const schemaName = context._schemaName ?? (await getSchemaNameFromModel(context.modelName));
|
|
83
83
|
if (schemaName) {
|
|
84
|
-
const _mod_3 = await import('./Schema-
|
|
84
|
+
const _mod_3 = await import('./Schema-BQ5W3aOW.js');
|
|
85
85
|
const _ns_3 = _mod_3.b;
|
|
86
86
|
const schemaMod = _ns_3;
|
|
87
87
|
const { Schema } = schemaMod;
|
|
@@ -116,8 +116,8 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
116
116
|
const schemaFileIdForResolve = fullContext._propertyFileId || (typeof fullContext.id === 'string' ? fullContext.id : undefined);
|
|
117
117
|
if (schemaFileIdForResolve && (fullContext.modelName === undefined || fullContext.dataType === undefined)) {
|
|
118
118
|
try {
|
|
119
|
-
const _mod_4 = await import('./index-
|
|
120
|
-
const _ns_4 = _mod_4.
|
|
119
|
+
const _mod_4 = await import('./index-BvZCYMxA.js');
|
|
120
|
+
const _ns_4 = _mod_4.bA;
|
|
121
121
|
const dbMod = _ns_4;
|
|
122
122
|
const { getPropertyModelNameAndDataType, getModelNameByModelId } = dbMod;
|
|
123
123
|
let fromDb;
|
|
@@ -163,8 +163,8 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
163
163
|
if (fullContext.modelName && fullContext.name && schemaFileId) {
|
|
164
164
|
logger$2(`[compareAndMarkDraft] _originalValues not set, but saving to database anyway for property ${context.modelName}:${context.name} (schemaFileId: ${schemaFileId})`);
|
|
165
165
|
try {
|
|
166
|
-
const _mod_5 = await import('./index-
|
|
167
|
-
const _ns_5 = _mod_5.
|
|
166
|
+
const _mod_5 = await import('./index-BvZCYMxA.js');
|
|
167
|
+
const _ns_5 = _mod_5.bA;
|
|
168
168
|
const dbMod = _ns_5;
|
|
169
169
|
const { savePropertyToDb } = dbMod;
|
|
170
170
|
// Ensure _propertyFileId is set for savePropertyToDb to find the property
|
|
@@ -225,8 +225,8 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
225
225
|
logger$2(`Property ${fullContext.modelName}:${fullContext.name} has changes, marking as edited`);
|
|
226
226
|
logger$2(`[compareAndMarkDraft] Context when saving: id=${fullContext.id}, _propertyFileId=${fullContext._propertyFileId}, name=${fullContext.name}, _originalValues.name=${fullContext._originalValues?.name}`);
|
|
227
227
|
// Use dynamic import to break circular dependency
|
|
228
|
-
const _mod_6 = await import('./index-
|
|
229
|
-
const _ns_6 = _mod_6.
|
|
228
|
+
const _mod_6 = await import('./index-BvZCYMxA.js');
|
|
229
|
+
const _ns_6 = _mod_6.bA;
|
|
230
230
|
const dbMod = _ns_6;
|
|
231
231
|
const { savePropertyToDb } = dbMod;
|
|
232
232
|
// Save to database (but not JSON file) - always save to DB when there are changes
|
|
@@ -241,7 +241,7 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
241
241
|
// Mark schema as draft if schema name is available
|
|
242
242
|
if (fullContext._schemaName) {
|
|
243
243
|
// Get the Schema instance and mark it as draft
|
|
244
|
-
const _mod_7 = await import('./Schema-
|
|
244
|
+
const _mod_7 = await import('./Schema-BQ5W3aOW.js');
|
|
245
245
|
const _ns_7 = _mod_7.b;
|
|
246
246
|
const schemaMod = _ns_7;
|
|
247
247
|
const { Schema } = schemaMod;
|
|
@@ -260,7 +260,7 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
260
260
|
logger$2(`Property ${fullContext.modelName}:${fullContext.name} has no changes`);
|
|
261
261
|
// Clear isEdited flag in database
|
|
262
262
|
try {
|
|
263
|
-
const _mod_8 = await import('./index-
|
|
263
|
+
const _mod_8 = await import('./index-BQv2k74p.js');
|
|
264
264
|
const _ns_8 = _mod_8.s;
|
|
265
265
|
const seedSchemaMod = _ns_8;
|
|
266
266
|
const { properties: propertiesTable, models: modelsTable } = seedSchemaMod;
|
|
@@ -326,8 +326,8 @@ const validateProperty = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
326
326
|
// Brief wait so trackPendingWrite from ModelProperty.create() has time to run (it's in setTimeout(0))
|
|
327
327
|
await new Promise((r) => setTimeout(r, 60));
|
|
328
328
|
try {
|
|
329
|
-
const _mod_9 = await import('./index-
|
|
330
|
-
const _ns_9 = _mod_9.
|
|
329
|
+
const _mod_9 = await import('./index-BvZCYMxA.js');
|
|
330
|
+
const _ns_9 = _mod_9.bA;
|
|
331
331
|
const dbMod = _ns_9;
|
|
332
332
|
const { getPropertyModelNameAndDataType, getModelNameByModelId } = dbMod;
|
|
333
333
|
// Try pending write first (property row may not exist yet)
|
|
@@ -380,10 +380,10 @@ const validateProperty = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
380
380
|
fullContext = { ...fullContext, dataType: (fullContext.dataType ?? context._originalValues?.dataType) || 'Text' };
|
|
381
381
|
}
|
|
382
382
|
// Use dynamic imports to break circular dependencies
|
|
383
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
383
|
+
const validationServiceMod = await import('./SchemaValidationService-DQx83Cte.js');
|
|
384
384
|
const { SchemaValidationService } = validationServiceMod;
|
|
385
385
|
const validationService = new SchemaValidationService();
|
|
386
|
-
const _mod_10 = await import('./Schema-
|
|
386
|
+
const _mod_10 = await import('./Schema-BQ5W3aOW.js');
|
|
387
387
|
const _ns_10 = _mod_10.b;
|
|
388
388
|
const schemaMod = _ns_10;
|
|
389
389
|
const { Schema } = schemaMod;
|
|
@@ -1769,4 +1769,4 @@ var ModelProperty$1 = /*#__PURE__*/Object.freeze({
|
|
|
1769
1769
|
});
|
|
1770
1770
|
|
|
1771
1771
|
export { ModelProperty };
|
|
1772
|
-
//# sourceMappingURL=ModelProperty-
|
|
1772
|
+
//# sourceMappingURL=ModelProperty-ChevZoUy.js.map
|