@seedprotocol/sdk 0.7.9-next.1177.ga3e08ed → 0.7.9-next.1189.g5e63267
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-GZfXErDX.js → ClientManager-DqL0q_eu.js} +30 -17
- package/dist/ClientManager-DqL0q_eu.js.map +1 -0
- package/dist/{Item-0oDoTPhi.js → Item-CG5IhPtL.js} +260 -113
- package/dist/Item-CG5IhPtL.js.map +1 -0
- package/dist/{ModelProperty-i5flwzQG.js → ModelProperty-DDD47KVm.js} +26 -26
- package/dist/{ModelProperty-i5flwzQG.js.map → ModelProperty-DDD47KVm.js.map} +1 -1
- package/dist/{Schema-PFZwG9Nl.js → Schema-BS8oR7QV.js} +24 -24
- package/dist/{Schema-PFZwG9Nl.js.map → Schema-BS8oR7QV.js.map} +1 -1
- package/dist/{SchemaValidationService-DnGKel4V.js → SchemaValidationService-CZzKNL04.js} +6 -6
- package/dist/{SchemaValidationService-DnGKel4V.js.map → SchemaValidationService-CZzKNL04.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-BbxgavEQ.js → backfillMetadataPropertyIds-C7P7FL6F.js} +3 -3
- package/dist/{backfillMetadataPropertyIds-BbxgavEQ.js.map → backfillMetadataPropertyIds-C7P7FL6F.js.map} +1 -1
- package/dist/{changeFeed-DKdVlUmt.js → changeFeed-M8sGbOrW.js} +6 -6
- package/dist/{changeFeed-DKdVlUmt.js.map → changeFeed-M8sGbOrW.js.map} +1 -1
- package/dist/{configurePlatform-CrMafpMW.js → configurePlatform-Dukm2QwO.js} +2 -2
- package/dist/{configurePlatform-CrMafpMW.js.map → configurePlatform-Dukm2QwO.js.map} +1 -1
- package/dist/db/drizzle/0025_add_metadata_retract.sql +1 -0
- package/dist/db/drizzle/meta/0025_snapshot.json +1652 -0
- package/dist/db/drizzle/meta/_journal.json +7 -0
- package/dist/{detachRowsBeforeDelete-DXFYSHRR.js → detachRowsBeforeDelete-Di1enVUF.js} +2 -2
- package/dist/{detachRowsBeforeDelete-DXFYSHRR.js.map → detachRowsBeforeDelete-Di1enVUF.js.map} +1 -1
- package/dist/dist/{ClientManager-GZfXErDX.d.ts → ClientManager-DqL0q_eu.d.ts} +1 -1
- package/dist/dist/{ClientManager-GZfXErDX.d.ts.map → ClientManager-DqL0q_eu.d.ts.map} +1 -1
- package/dist/dist/{Item-0oDoTPhi.d.ts → Item-CG5IhPtL.d.ts} +103 -64
- package/dist/dist/Item-CG5IhPtL.d.ts.map +1 -0
- package/dist/dist/{ModelProperty-i5flwzQG.d.ts → ModelProperty-DDD47KVm.d.ts} +1 -1
- package/dist/dist/{ModelProperty-i5flwzQG.d.ts.map → ModelProperty-DDD47KVm.d.ts.map} +1 -1
- package/dist/dist/{Schema-PFZwG9Nl.d.ts → Schema-BS8oR7QV.d.ts} +2 -2
- package/dist/dist/{Schema-PFZwG9Nl.d.ts.map → Schema-BS8oR7QV.d.ts.map} +1 -1
- package/dist/dist/{SchemaValidationService-DnGKel4V.d.ts → SchemaValidationService-CZzKNL04.d.ts} +1 -1
- package/dist/dist/{SchemaValidationService-DnGKel4V.d.ts.map → SchemaValidationService-CZzKNL04.d.ts.map} +1 -1
- package/dist/dist/{backfillMetadataPropertyIds-BbxgavEQ.d.ts → backfillMetadataPropertyIds-C7P7FL6F.d.ts} +1 -1
- package/dist/dist/backfillMetadataPropertyIds-C7P7FL6F.d.ts.map +1 -0
- package/dist/dist/{changeFeed-DKdVlUmt.d.ts → changeFeed-M8sGbOrW.d.ts} +1 -1
- package/dist/dist/{changeFeed-DKdVlUmt.d.ts.map → changeFeed-M8sGbOrW.d.ts.map} +1 -1
- package/dist/dist/{configurePlatform-CrMafpMW.d.ts → configurePlatform-Dukm2QwO.d.ts} +1 -1
- package/dist/dist/configurePlatform-Dukm2QwO.d.ts.map +1 -0
- package/dist/dist/{detachRowsBeforeDelete-DXFYSHRR.d.ts → detachRowsBeforeDelete-Di1enVUF.d.ts} +1 -1
- package/dist/dist/detachRowsBeforeDelete-Di1enVUF.d.ts.map +1 -0
- package/dist/dist/{eas-dyepi5jz.d.ts → eas-B5VJolSj.d.ts} +1 -1
- package/dist/dist/eas-B5VJolSj.d.ts.map +1 -0
- package/dist/dist/{errors-D1zHAqjr.d.ts → errors-CS3nDpUU.d.ts} +1 -1
- package/dist/dist/{errors-D1zHAqjr.d.ts.map → errors-CS3nDpUU.d.ts.map} +1 -1
- package/dist/dist/{findSeedRowsByUid-CT3sOXXw.d.ts → findSeedRowsByUid-CuQmK7An.d.ts} +1 -1
- package/dist/dist/findSeedRowsByUid-CuQmK7An.d.ts.map +1 -0
- package/dist/dist/{getItem-Bhjecbia.d.ts → getItem-Uha3_H0t.d.ts} +1 -1
- package/dist/dist/getItem-Uha3_H0t.d.ts.map +1 -0
- package/dist/dist/{getPublishPayload-DH4rMqXG.d.ts → getPublishPayload-pbin4lk8.d.ts} +20 -2
- package/dist/dist/getPublishPayload-pbin4lk8.d.ts.map +1 -0
- package/dist/dist/getPublishPendingDiff-ByIaPvCn.d.ts +18 -0
- package/dist/dist/getPublishPendingDiff-ByIaPvCn.d.ts.map +1 -0
- package/dist/dist/{getPublishUploads-BzUIDA2G.d.ts → getPublishUploads-BBqiowVc.d.ts} +1 -1
- package/dist/dist/{getPublishUploads-BzUIDA2G.d.ts.map → getPublishUploads-BBqiowVc.d.ts.map} +1 -1
- package/dist/dist/{index-DJmWkVIK.d.ts → index-DQoyhp2c.d.ts} +5 -5
- package/dist/dist/index-DQoyhp2c.d.ts.map +1 -0
- package/dist/dist/{index-PbnKw2es.d.ts → index-DxHpPNfn.d.ts} +18 -1
- package/dist/dist/{index-PbnKw2es.d.ts.map → index-DxHpPNfn.d.ts.map} +1 -1
- package/dist/dist/{index-CkYb3wcU.d.ts → index-njjjo74v.d.ts} +13 -13
- package/dist/dist/index-njjjo74v.d.ts.map +1 -0
- package/dist/dist/{index-Dx_GTdyQ.d.ts → index-rOTW-2QZ.d.ts} +139 -118
- package/dist/dist/index-rOTW-2QZ.d.ts.map +1 -0
- package/dist/dist/{index.browser-i9uPJice.d.ts → index.browser-QPWBkLJA.d.ts} +52 -1
- package/dist/dist/{index.browser-i9uPJice.d.ts.map → index.browser-QPWBkLJA.d.ts.map} +1 -1
- package/dist/dist/{index.node-CzMwMr_d.d.ts → index.node-WsEJCOwC.d.ts} +69 -1
- package/dist/dist/{index.node-CzMwMr_d.d.ts.map → index.node-WsEJCOwC.d.ts.map} +1 -1
- package/dist/dist/{modelPropertyRecordSchemas-C5lW9aA-.d.ts → modelPropertyRecordSchemas-onFOG2x6.d.ts} +1 -1
- package/dist/dist/modelPropertyRecordSchemas-onFOG2x6.d.ts.map +1 -0
- package/dist/dist/platform.browser.d.ts +2 -2
- package/dist/dist/platform.node.d.ts +2 -2
- package/dist/dist/{property-BwYtg5Q_.d.ts → property-C85DCD7K.d.ts} +3 -3
- package/dist/dist/property-C85DCD7K.d.ts.map +1 -0
- package/dist/dist/{propertyValidationRules-CyHdpcPP.d.ts → propertyValidationRules-CjUPOFeu.d.ts} +1 -1
- package/dist/dist/propertyValidationRules-CjUPOFeu.d.ts.map +1 -0
- package/dist/dist/{publishDraftGraph-C5F6b7GK.d.ts → publishDraftGraph-DBWAN72w.d.ts} +1 -1
- package/dist/dist/{publishDraftGraph-C5F6b7GK.d.ts.map → publishDraftGraph-DBWAN72w.d.ts.map} +1 -1
- package/dist/dist/{resolveModelForSyncedSeed-4gO9Hfn2.d.ts → resolveModelForSyncedSeed-fIURvYRV.d.ts} +1 -1
- package/dist/dist/resolveModelForSyncedSeed-fIURvYRV.d.ts.map +1 -0
- package/dist/dist/{syncDbWithEas-DUu_wjUG.d.ts → syncDbWithEas-BMHoou6X.d.ts} +1 -1
- package/dist/dist/syncDbWithEas-BMHoou6X.d.ts.map +1 -0
- package/dist/dist/{tolerantWebAccess-DecKDGen.d.ts → tolerantWebAccess-BHndShch.d.ts} +1 -1
- package/dist/dist/{tolerantWebAccess-DecKDGen.d.ts.map → tolerantWebAccess-BHndShch.d.ts.map} +1 -1
- package/dist/dist/{updateSeedRevokedAt-CP606vKs.d.ts → updateSeedRevokedAt-DpfG6ztE.d.ts} +1 -1
- package/dist/dist/updateSeedRevokedAt-DpfG6ztE.d.ts.map +1 -0
- package/dist/{eas-dyepi5jz.js → eas-B5VJolSj.js} +3 -3
- package/dist/{eas-dyepi5jz.js.map → eas-B5VJolSj.js.map} +1 -1
- package/dist/{errors-D1zHAqjr.js → errors-CS3nDpUU.js} +26 -26
- package/dist/{errors-D1zHAqjr.js.map → errors-CS3nDpUU.js.map} +1 -1
- package/dist/{findSeedRowsByUid-CT3sOXXw.js → findSeedRowsByUid-CuQmK7An.js} +3 -3
- package/dist/{findSeedRowsByUid-CT3sOXXw.js.map → findSeedRowsByUid-CuQmK7An.js.map} +1 -1
- package/dist/{getItem-Bhjecbia.js → getItem-Uha3_H0t.js} +4 -4
- package/dist/{getItem-Bhjecbia.js.map → getItem-Uha3_H0t.js.map} +1 -1
- package/dist/{getPublishPayload-DH4rMqXG.js → getPublishPayload-pbin4lk8.js} +201 -99
- package/dist/getPublishPayload-pbin4lk8.js.map +1 -0
- package/dist/getPublishPendingDiff-ByIaPvCn.js +118 -0
- package/dist/getPublishPendingDiff-ByIaPvCn.js.map +1 -0
- package/dist/{getPublishUploads-BzUIDA2G.js → getPublishUploads-BBqiowVc.js} +7 -7
- package/dist/{getPublishUploads-BzUIDA2G.js.map → getPublishUploads-BBqiowVc.js.map} +1 -1
- package/dist/{index-DJmWkVIK.js → index-DQoyhp2c.js} +8 -8
- package/dist/index-DQoyhp2c.js.map +1 -0
- package/dist/{index-PbnKw2es.js → index-DxHpPNfn.js} +2 -2
- package/dist/index-DxHpPNfn.js.map +1 -0
- package/dist/{index-CkYb3wcU.js → index-njjjo74v.js} +7 -7
- package/dist/index-njjjo74v.js.map +1 -0
- package/dist/{index-Dx_GTdyQ.js → index-rOTW-2QZ.js} +18 -3
- package/dist/index-rOTW-2QZ.js.map +1 -0
- package/dist/{index.browser-i9uPJice.js → index.browser-QPWBkLJA.js} +50 -34
- package/dist/index.browser-QPWBkLJA.js.map +1 -0
- package/dist/{index.node-CzMwMr_d.js → index.node-WsEJCOwC.js} +5 -5
- package/dist/{index.node-CzMwMr_d.js.map → index.node-WsEJCOwC.js.map} +1 -1
- package/dist/main.js +73 -103
- package/dist/main.js.map +1 -1
- package/dist/{modelPropertyRecordSchemas-C5lW9aA-.js → modelPropertyRecordSchemas-onFOG2x6.js} +4 -4
- package/dist/{modelPropertyRecordSchemas-C5lW9aA-.js.map → modelPropertyRecordSchemas-onFOG2x6.js.map} +1 -1
- package/dist/node.js +9 -9
- package/dist/node.js.map +1 -1
- package/dist/platform.browser.js +5 -5
- package/dist/platform.node.js +4 -4
- package/dist/{property-BwYtg5Q_.js → property-C85DCD7K.js} +6 -6
- package/dist/{property-BwYtg5Q_.js.map → property-C85DCD7K.js.map} +1 -1
- package/dist/{propertyValidationRules-CyHdpcPP.js → propertyValidationRules-CjUPOFeu.js} +6 -6
- package/dist/{propertyValidationRules-CyHdpcPP.js.map → propertyValidationRules-CjUPOFeu.js.map} +1 -1
- package/dist/{publishDraftGraph-C5F6b7GK.js → publishDraftGraph-DBWAN72w.js} +9 -9
- package/dist/{publishDraftGraph-C5F6b7GK.js.map → publishDraftGraph-DBWAN72w.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-4gO9Hfn2.js → resolveModelForSyncedSeed-fIURvYRV.js} +2 -2
- package/dist/{resolveModelForSyncedSeed-4gO9Hfn2.js.map → resolveModelForSyncedSeed-fIURvYRV.js.map} +1 -1
- package/dist/seedSchema/MetadataSchema.ts +3 -0
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/Item/service/actors/loadOrCreateItem.d.ts.map +1 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts +26 -0
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.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/saveImage.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/propertyMachine.d.ts +4 -1
- package/dist/src/ItemProperty/service/propertyMachine.d.ts.map +1 -1
- package/dist/src/browser/db/drizzleFiles.d.ts +3 -2
- package/dist/src/browser/db/drizzleFiles.d.ts.map +1 -1
- package/dist/src/db/read/getPropertyClear.d.ts +45 -0
- package/dist/src/db/read/getPropertyClear.d.ts.map +1 -0
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/read/getPublishPendingDiff.d.ts +5 -0
- package/dist/src/db/read/getPublishPendingDiff.d.ts.map +1 -1
- package/dist/src/db/read/summarizePublishWork.d.ts +5 -0
- package/dist/src/db/read/summarizePublishWork.d.ts.map +1 -1
- package/dist/src/db/write/markPropertyAttestationsRetracted.d.ts +11 -0
- package/dist/src/db/write/markPropertyAttestationsRetracted.d.ts.map +1 -0
- package/dist/src/db/write/updateItemPropertyValue.d.ts +2 -0
- package/dist/src/db/write/updateItemPropertyValue.d.ts.map +1 -1
- package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/src/helpers/compareMetadataRowsLatestFirst.d.ts +9 -9
- package/dist/src/helpers/compareMetadataRowsLatestFirst.d.ts.map +1 -1
- package/dist/src/helpers/metadataPropertyNames.d.ts +6 -1
- package/dist/src/helpers/metadataPropertyNames.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/IItemProperty.d.ts +4 -0
- package/dist/src/interfaces/IItemProperty.d.ts.map +1 -1
- package/dist/src/node/index.d.ts +1 -1
- package/dist/src/node/index.d.ts.map +1 -1
- package/dist/src/outbox/itemAppliers.d.ts +7 -0
- package/dist/src/outbox/itemAppliers.d.ts.map +1 -1
- package/dist/src/outbox/pendingValues.d.ts.map +1 -1
- package/dist/src/seedSchema/MetadataSchema.d.ts +17 -0
- package/dist/src/seedSchema/MetadataSchema.d.ts.map +1 -1
- package/dist/src/types/property.d.ts +8 -0
- package/dist/src/types/property.d.ts.map +1 -1
- package/dist/{syncDbWithEas-DUu_wjUG.js → syncDbWithEas-BMHoou6X.js} +47 -23
- package/dist/syncDbWithEas-BMHoou6X.js.map +1 -0
- package/dist/{tolerantWebAccess-DecKDGen.js → tolerantWebAccess-BHndShch.js} +6 -6
- package/dist/{tolerantWebAccess-DecKDGen.js.map → tolerantWebAccess-BHndShch.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-CP606vKs.js → updateSeedRevokedAt-DpfG6ztE.js} +3 -3
- package/dist/{updateSeedRevokedAt-CP606vKs.js.map → updateSeedRevokedAt-DpfG6ztE.js.map} +1 -1
- package/package.json +6 -6
- package/dist/ClientManager-GZfXErDX.js.map +0 -1
- package/dist/Item-0oDoTPhi.js.map +0 -1
- package/dist/dist/Item-0oDoTPhi.d.ts.map +0 -1
- package/dist/dist/backfillMetadataPropertyIds-BbxgavEQ.d.ts.map +0 -1
- package/dist/dist/configurePlatform-CrMafpMW.d.ts.map +0 -1
- package/dist/dist/detachRowsBeforeDelete-DXFYSHRR.d.ts.map +0 -1
- package/dist/dist/eas-dyepi5jz.d.ts.map +0 -1
- package/dist/dist/findSeedRowsByUid-CT3sOXXw.d.ts.map +0 -1
- package/dist/dist/getItem-Bhjecbia.d.ts.map +0 -1
- package/dist/dist/getPublishPayload-DH4rMqXG.d.ts.map +0 -1
- package/dist/dist/index-CkYb3wcU.d.ts.map +0 -1
- package/dist/dist/index-DJmWkVIK.d.ts.map +0 -1
- package/dist/dist/index-Dx_GTdyQ.d.ts.map +0 -1
- package/dist/dist/modelPropertyRecordSchemas-C5lW9aA-.d.ts.map +0 -1
- package/dist/dist/property-BwYtg5Q_.d.ts.map +0 -1
- package/dist/dist/propertyValidationRules-CyHdpcPP.d.ts.map +0 -1
- package/dist/dist/resolveModelForSyncedSeed-4gO9Hfn2.d.ts.map +0 -1
- package/dist/dist/syncDbWithEas-DUu_wjUG.d.ts.map +0 -1
- package/dist/dist/updateSeedRevokedAt-CP606vKs.d.ts.map +0 -1
- package/dist/getPublishPayload-DH4rMqXG.js.map +0 -1
- package/dist/index-CkYb3wcU.js.map +0 -1
- package/dist/index-DJmWkVIK.js.map +0 -1
- package/dist/index-Dx_GTdyQ.js.map +0 -1
- package/dist/index-PbnKw2es.js.map +0 -1
- package/dist/index.browser-i9uPJice.js.map +0 -1
- package/dist/syncDbWithEas-DUu_wjUG.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { fromCallback, setup, assign, createActor } from 'xstate';
|
|
2
|
-
import { w as writeProcessMachine, c as currentEvictionEpoch, M as Model, b as anyEvictionSince, s as schemaEvictedSince } from './errors-
|
|
3
|
-
import { L as BaseDb, p as models, E as properties, J as schemas, z as modelSchemas,
|
|
2
|
+
import { w as writeProcessMachine, c as currentEvictionEpoch, M as Model, b as anyEvictionSince, s as schemaEvictedSince } from './errors-CS3nDpUU.js';
|
|
3
|
+
import { L as BaseDb, p as models, E as properties, J as schemas, z as modelSchemas, ai as getModelIdByFileId, n as normalizeDataType, a5 as generateId, M as ModelPropertyDataTypes, Q as BaseFileManager, aj as getModelId, ak as setCachedPropertyRefresher } from './index-rOTW-2QZ.js';
|
|
4
4
|
import 'pluralize';
|
|
5
5
|
import '@seedprotocol/eas';
|
|
6
6
|
import { eq, and, inArray } from 'drizzle-orm';
|
|
7
7
|
import { modelPropertiesToObject } from './model-oHA3YhOd.js';
|
|
8
|
-
import {
|
|
8
|
+
import { P as isActorStopped, Q as DEFAULT_READY_TIMEOUT_MS, F as waitForEntityIdle, R as createReactiveProxy, S as sameEntity, T as findEntity, U as forceRemoveFromCaches, V as runDestroyLifecycle } from './Item-CG5IhPtL.js';
|
|
9
9
|
import debug from 'debug';
|
|
10
|
-
import { S as Schema } from './Schema-
|
|
11
|
-
import './ClientManager-
|
|
10
|
+
import { S as Schema } from './Schema-BS8oR7QV.js';
|
|
11
|
+
import './ClientManager-DqL0q_eu.js';
|
|
12
12
|
import 'lodash-es';
|
|
13
|
-
import './changeFeed-
|
|
13
|
+
import './changeFeed-M8sGbOrW.js';
|
|
14
14
|
import './eventBus-7vxTCc3a.js';
|
|
15
15
|
import '@seedprotocol/arweave';
|
|
16
16
|
import '@noble/hashes/sha3';
|
|
@@ -22,7 +22,7 @@ import 'nanoid';
|
|
|
22
22
|
import 'nanoid-dictionary';
|
|
23
23
|
import '@noble/hashes/sha256';
|
|
24
24
|
import 'rxjs';
|
|
25
|
-
import './SchemaValidationService-
|
|
25
|
+
import './SchemaValidationService-CZzKNL04.js';
|
|
26
26
|
import '@sinclair/typebox/value';
|
|
27
27
|
|
|
28
28
|
const logger$3 = debug('seedSdk:modelProperty:actors:saveToSchema');
|
|
@@ -33,14 +33,14 @@ const logger$3 = debug('seedSdk:modelProperty:actors:saveToSchema');
|
|
|
33
33
|
*/
|
|
34
34
|
async function getSchemaNameFromModel(modelName) {
|
|
35
35
|
// Get the latest schema files and find which one contains this model
|
|
36
|
-
const _mod_0 = await import('./ClientManager-
|
|
36
|
+
const _mod_0 = await import('./ClientManager-DqL0q_eu.js');
|
|
37
37
|
const _ns_0 = _mod_0.S;
|
|
38
38
|
const schemaHelpersMod = _ns_0;
|
|
39
39
|
const { listLatestSchemaFiles } = schemaHelpersMod;
|
|
40
40
|
const latestSchemas = await listLatestSchemaFiles();
|
|
41
41
|
for (const schema of latestSchemas) {
|
|
42
42
|
try {
|
|
43
|
-
const _mod_1 = await import('./index-
|
|
43
|
+
const _mod_1 = await import('./index-rOTW-2QZ.js');
|
|
44
44
|
const _ns_1 = _mod_1.bb;
|
|
45
45
|
const fileManagerMod = _ns_1;
|
|
46
46
|
const { BaseFileManager } = fileManagerMod;
|
|
@@ -60,7 +60,7 @@ async function getSchemaNameFromModel(modelName) {
|
|
|
60
60
|
const saveToSchema = fromCallback(({ sendBack, input: { context }, self }) => {
|
|
61
61
|
const _saveToSchema = async () => {
|
|
62
62
|
// Use dynamic import to break circular dependency
|
|
63
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
63
|
+
const validationServiceMod = await import('./SchemaValidationService-CZzKNL04.js');
|
|
64
64
|
const { SchemaValidationService } = validationServiceMod;
|
|
65
65
|
const validationService = new SchemaValidationService();
|
|
66
66
|
// Validate property structure before saving
|
|
@@ -79,7 +79,7 @@ const saveToSchema = fromCallback(({ sendBack, input: { context }, self }) => {
|
|
|
79
79
|
throw new Error(`Model not found for modelId: ${context.modelId}`);
|
|
80
80
|
}
|
|
81
81
|
// Persist to database only - schema file is updated only when user calls Schema.saveNewVersion()
|
|
82
|
-
const _mod_2 = await import('./index-
|
|
82
|
+
const _mod_2 = await import('./index-rOTW-2QZ.js');
|
|
83
83
|
const _ns_2 = _mod_2.bf;
|
|
84
84
|
const dbMod = _ns_2;
|
|
85
85
|
const { savePropertyToDb } = dbMod;
|
|
@@ -87,7 +87,7 @@ const saveToSchema = fromCallback(({ sendBack, input: { context }, self }) => {
|
|
|
87
87
|
// Mark schema as draft so user knows to save
|
|
88
88
|
const schemaName = context._schemaName ?? (await getSchemaNameFromModel(context.modelName));
|
|
89
89
|
if (schemaName) {
|
|
90
|
-
const _mod_3 = await import('./Schema-
|
|
90
|
+
const _mod_3 = await import('./Schema-BS8oR7QV.js');
|
|
91
91
|
const _ns_3 = _mod_3.a;
|
|
92
92
|
const schemaMod = _ns_3;
|
|
93
93
|
const { Schema } = schemaMod;
|
|
@@ -125,7 +125,7 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context }, self }
|
|
|
125
125
|
const schemaFileIdForResolve = fullContext._propertyFileId || (typeof fullContext.id === 'string' ? fullContext.id : undefined);
|
|
126
126
|
if (schemaFileIdForResolve && (fullContext.modelName === undefined || fullContext.dataType === undefined)) {
|
|
127
127
|
try {
|
|
128
|
-
const _mod_4 = await import('./index-
|
|
128
|
+
const _mod_4 = await import('./index-rOTW-2QZ.js');
|
|
129
129
|
const _ns_4 = _mod_4.bf;
|
|
130
130
|
const dbMod = _ns_4;
|
|
131
131
|
const { getPropertyModelNameAndDataType, getModelNameByModelId } = dbMod;
|
|
@@ -172,7 +172,7 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context }, self }
|
|
|
172
172
|
if (fullContext.modelName && fullContext.name && schemaFileId) {
|
|
173
173
|
logger$2(`[compareAndMarkDraft] _originalValues not set, but saving to database anyway for property ${context.modelName}:${context.name} (schemaFileId: ${schemaFileId})`);
|
|
174
174
|
try {
|
|
175
|
-
const _mod_5 = await import('./index-
|
|
175
|
+
const _mod_5 = await import('./index-rOTW-2QZ.js');
|
|
176
176
|
const _ns_5 = _mod_5.bf;
|
|
177
177
|
const dbMod = _ns_5;
|
|
178
178
|
const { savePropertyToDb } = dbMod;
|
|
@@ -234,7 +234,7 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context }, self }
|
|
|
234
234
|
logger$2(`Property ${fullContext.modelName}:${fullContext.name} has changes, marking as edited`);
|
|
235
235
|
logger$2(`[compareAndMarkDraft] Context when saving: id=${fullContext.id}, _propertyFileId=${fullContext._propertyFileId}, name=${fullContext.name}, _originalValues.name=${fullContext._originalValues?.name}`);
|
|
236
236
|
// Use dynamic import to break circular dependency
|
|
237
|
-
const _mod_6 = await import('./index-
|
|
237
|
+
const _mod_6 = await import('./index-rOTW-2QZ.js');
|
|
238
238
|
const _ns_6 = _mod_6.bf;
|
|
239
239
|
const dbMod = _ns_6;
|
|
240
240
|
const { savePropertyToDb } = dbMod;
|
|
@@ -250,7 +250,7 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context }, self }
|
|
|
250
250
|
// Mark schema as draft if schema name is available
|
|
251
251
|
if (fullContext._schemaName) {
|
|
252
252
|
// Get the Schema instance and mark it as draft
|
|
253
|
-
const _mod_7 = await import('./Schema-
|
|
253
|
+
const _mod_7 = await import('./Schema-BS8oR7QV.js');
|
|
254
254
|
const _ns_7 = _mod_7.a;
|
|
255
255
|
const schemaMod = _ns_7;
|
|
256
256
|
const { Schema } = schemaMod;
|
|
@@ -270,7 +270,7 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context }, self }
|
|
|
270
270
|
logger$2(`Property ${fullContext.modelName}:${fullContext.name} has no changes`);
|
|
271
271
|
// Clear isEdited flag in database
|
|
272
272
|
try {
|
|
273
|
-
const _mod_8 = await import('./index-
|
|
273
|
+
const _mod_8 = await import('./index-DxHpPNfn.js');
|
|
274
274
|
const _ns_8 = _mod_8.s;
|
|
275
275
|
const seedSchemaMod = _ns_8;
|
|
276
276
|
const { properties: propertiesTable } = seedSchemaMod;
|
|
@@ -279,7 +279,7 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context }, self }
|
|
|
279
279
|
const db = BaseDb.getAppDb();
|
|
280
280
|
if (db && fullContext.modelName && fullContext.name) {
|
|
281
281
|
// Find this property's model (model names are only unique per schema)
|
|
282
|
-
const _mod_9 = await import('./index-
|
|
282
|
+
const _mod_9 = await import('./index-rOTW-2QZ.js');
|
|
283
283
|
const _ns_9 = _mod_9.be;
|
|
284
284
|
const { resolveModelRecord } = _ns_9;
|
|
285
285
|
const modelRecord = await resolveModelRecord(fullContext.modelName, {
|
|
@@ -339,7 +339,7 @@ const validateProperty = fromCallback(({ sendBack, input: { context }, self }) =
|
|
|
339
339
|
// Brief wait so trackPendingWrite from ModelProperty.create() has time to run (it's in setTimeout(0))
|
|
340
340
|
await new Promise((r) => setTimeout(r, 60));
|
|
341
341
|
try {
|
|
342
|
-
const _mod_10 = await import('./index-
|
|
342
|
+
const _mod_10 = await import('./index-rOTW-2QZ.js');
|
|
343
343
|
const _ns_10 = _mod_10.bf;
|
|
344
344
|
const dbMod = _ns_10;
|
|
345
345
|
const { getPropertyModelNameAndDataType, getModelNameByModelId } = dbMod;
|
|
@@ -393,10 +393,10 @@ const validateProperty = fromCallback(({ sendBack, input: { context }, self }) =
|
|
|
393
393
|
fullContext = { ...fullContext, dataType: (fullContext.dataType ?? context._originalValues?.dataType) || 'Text' };
|
|
394
394
|
}
|
|
395
395
|
// Use dynamic imports to break circular dependencies
|
|
396
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
396
|
+
const validationServiceMod = await import('./SchemaValidationService-CZzKNL04.js');
|
|
397
397
|
const { SchemaValidationService } = validationServiceMod;
|
|
398
398
|
const validationService = new SchemaValidationService();
|
|
399
|
-
const _mod_11 = await import('./Schema-
|
|
399
|
+
const _mod_11 = await import('./Schema-BS8oR7QV.js');
|
|
400
400
|
const _ns_11 = _mod_11.a;
|
|
401
401
|
const schemaMod = _ns_11;
|
|
402
402
|
const { Schema } = schemaMod;
|
|
@@ -1024,7 +1024,7 @@ class ModelProperty {
|
|
|
1024
1024
|
return fallbackIsEdited;
|
|
1025
1025
|
}
|
|
1026
1026
|
// Find this property's model (by modelId when known; model names are only unique per schema)
|
|
1027
|
-
const _mod_12 = await import('./index-
|
|
1027
|
+
const _mod_12 = await import('./index-rOTW-2QZ.js');
|
|
1028
1028
|
const _ns_12 = _mod_12.be;
|
|
1029
1029
|
const { resolveModelRecord } = _ns_12;
|
|
1030
1030
|
const modelRecord = await resolveModelRecord(property.modelName, this._ownerModelScope(property), db);
|
|
@@ -1062,7 +1062,7 @@ class ModelProperty {
|
|
|
1062
1062
|
return undefined;
|
|
1063
1063
|
}
|
|
1064
1064
|
// Resolve the ref within the owning model's schema
|
|
1065
|
-
const _mod_13 = await import('./index-
|
|
1065
|
+
const _mod_13 = await import('./index-rOTW-2QZ.js');
|
|
1066
1066
|
const _ns_13 = _mod_13.be;
|
|
1067
1067
|
const { resolveRefModelRecord } = _ns_13;
|
|
1068
1068
|
const refModelRecord = await resolveRefModelRecord(refModelName, property ? this._ownerModelScope(property) : { schemaName: this._getSnapshotContext()._schemaName }, db);
|
|
@@ -1108,7 +1108,7 @@ class ModelProperty {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
1110
|
if (!model && modelId) {
|
|
1111
|
-
const _mod_14 = await import('./index-
|
|
1111
|
+
const _mod_14 = await import('./index-rOTW-2QZ.js');
|
|
1112
1112
|
const _ns_14 = _mod_14.be;
|
|
1113
1113
|
const { resolveModelRecord } = _ns_14;
|
|
1114
1114
|
const modelFileId = (await resolveModelRecord(property.modelName, { modelId }))?.schemaFileId;
|
|
@@ -2108,7 +2108,7 @@ class ModelProperty {
|
|
|
2108
2108
|
.where(and(eq(schemas.name, schemaName), eq(models.name, modelName), eq(properties.name, propertyName)))
|
|
2109
2109
|
.limit(1);
|
|
2110
2110
|
if (propertyRecords.length > 0 && propertyRecords[0].propertyId != null) {
|
|
2111
|
-
const { detachPropertyRows } = await import('./detachRowsBeforeDelete-
|
|
2111
|
+
const { detachPropertyRows } = await import('./detachRowsBeforeDelete-Di1enVUF.js');
|
|
2112
2112
|
await detachPropertyRows(db, [propertyRecords[0].propertyId]);
|
|
2113
2113
|
await db
|
|
2114
2114
|
.delete(properties)
|
|
@@ -2157,4 +2157,4 @@ var ModelProperty$1 = /*#__PURE__*/Object.freeze({
|
|
|
2157
2157
|
});
|
|
2158
2158
|
|
|
2159
2159
|
export { ModelProperty };
|
|
2160
|
-
//# sourceMappingURL=ModelProperty-
|
|
2160
|
+
//# sourceMappingURL=ModelProperty-DDD47KVm.js.map
|