@seedprotocol/sdk 0.7.5 → 0.7.6-next.957.g6bb7768
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/README.md +2 -2
- package/dist/{ClientManager-DRf4uuei.js → ClientManager-D6YA20jP.js} +207 -149
- package/dist/ClientManager-D6YA20jP.js.map +1 -0
- package/dist/{Item-DTJPMjFk.js → Item-B1MH0tXx.js} +126 -86
- package/dist/Item-B1MH0tXx.js.map +1 -0
- package/dist/{ModelProperty-Dto5C0om.js → ModelProperty-Dw6dHdu_.js} +37 -37
- package/dist/{ModelProperty-Dto5C0om.js.map → ModelProperty-Dw6dHdu_.js.map} +1 -1
- package/dist/{Schema-8DxGcORY.js → Schema-DppObO6h.js} +62 -212
- package/dist/Schema-DppObO6h.js.map +1 -0
- package/dist/{SchemaValidationService-CE92y1TT.js → SchemaValidationService-DXQ-D531.js} +6 -6
- package/dist/{SchemaValidationService-CE92y1TT.js.map → SchemaValidationService-DXQ-D531.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-CRqp-BqX.js → backfillMetadataPropertyIds-Uhzlwg9X.js} +3 -3
- package/dist/{backfillMetadataPropertyIds-CRqp-BqX.js.map → backfillMetadataPropertyIds-Uhzlwg9X.js.map} +1 -1
- package/dist/configurePlatform-CVoh3JeR.js +81 -0
- package/dist/configurePlatform-CVoh3JeR.js.map +1 -0
- package/dist/{detachRowsBeforeDelete-BVetHtn2.js → detachRowsBeforeDelete-CtmIFpgV.js} +2 -2
- package/dist/{detachRowsBeforeDelete-BVetHtn2.js.map → detachRowsBeforeDelete-CtmIFpgV.js.map} +1 -1
- package/dist/{discardNewDraft-CEOouygG.js → discardNewDraft-oGYdB5vS.js} +5 -5
- package/dist/{discardNewDraft-CEOouygG.js.map → discardNewDraft-oGYdB5vS.js.map} +1 -1
- package/dist/dist/ClientManager-D6YA20jP.d.ts +933 -0
- package/dist/dist/ClientManager-D6YA20jP.d.ts.map +1 -0
- package/dist/dist/Item-B1MH0tXx.d.ts +898 -0
- package/dist/dist/Item-B1MH0tXx.d.ts.map +1 -0
- package/dist/dist/ModelProperty-Dw6dHdu_.d.ts +315 -0
- package/dist/dist/ModelProperty-Dw6dHdu_.d.ts.map +1 -0
- package/dist/dist/Schema-DppObO6h.d.ts +601 -0
- package/dist/dist/Schema-DppObO6h.d.ts.map +1 -0
- package/dist/dist/SchemaValidationService-DXQ-D531.d.ts +118 -0
- package/dist/dist/SchemaValidationService-DXQ-D531.d.ts.map +1 -0
- package/dist/dist/backfillMetadataPropertyIds-Uhzlwg9X.d.ts +7 -0
- package/dist/dist/backfillMetadataPropertyIds-Uhzlwg9X.d.ts.map +1 -0
- package/dist/dist/configurePlatform-CVoh3JeR.d.ts +30 -0
- package/dist/dist/configurePlatform-CVoh3JeR.d.ts.map +1 -0
- package/dist/dist/detachRowsBeforeDelete-CtmIFpgV.d.ts +13 -0
- package/dist/dist/detachRowsBeforeDelete-CtmIFpgV.d.ts.map +1 -0
- package/dist/dist/discardNewDraft-oGYdB5vS.d.ts +8 -0
- package/dist/dist/discardNewDraft-oGYdB5vS.d.ts.map +1 -0
- package/dist/dist/eas-CSm5wmry.d.ts +12 -0
- package/dist/dist/eas-CSm5wmry.d.ts.map +1 -0
- package/dist/dist/errors-3tc6XkCB.d.ts +487 -0
- package/dist/dist/errors-3tc6XkCB.d.ts.map +1 -0
- package/dist/dist/errors-Do7v6RKu.d.ts +22 -0
- package/dist/dist/errors-Do7v6RKu.d.ts.map +1 -0
- package/dist/dist/getItem-DM3a-7XE.d.ts +6 -0
- package/dist/dist/getItem-DM3a-7XE.d.ts.map +1 -0
- package/dist/dist/getPublishPayload-CJF0k5d8.d.ts +47 -0
- package/dist/dist/getPublishPayload-CJF0k5d8.d.ts.map +1 -0
- package/dist/dist/getPublishUploads-C7-fYIgX.d.ts +89 -0
- package/dist/dist/getPublishUploads-C7-fYIgX.d.ts.map +1 -0
- package/dist/dist/index--mmQ3LQu.d.ts +6 -0
- package/dist/dist/index--mmQ3LQu.d.ts.map +1 -0
- package/dist/dist/index-B7yAoYli.d.ts +2752 -0
- package/dist/dist/index-B7yAoYli.d.ts.map +1 -0
- package/dist/dist/index-CrvIcVFJ.d.ts +4475 -0
- package/dist/dist/index-CrvIcVFJ.d.ts.map +1 -0
- package/dist/dist/index.browser-BmVS-c2C.d.ts +8445 -0
- package/dist/dist/index.browser-BmVS-c2C.d.ts.map +1 -0
- package/dist/dist/index.node-BKpbCAWt.d.ts +11123 -0
- package/dist/dist/index.node-BKpbCAWt.d.ts.map +1 -0
- package/dist/dist/mimeTypes-C9r76DCH.d.ts +30 -0
- package/dist/dist/mimeTypes-C9r76DCH.d.ts.map +1 -0
- package/dist/dist/model-oHA3YhOd.d.ts +6 -0
- package/dist/dist/model-oHA3YhOd.d.ts.map +1 -0
- package/dist/dist/platform.browser.d.ts +3 -0
- package/dist/dist/platform.browser.d.ts.map +1 -0
- package/dist/dist/platform.node.d.ts +3 -0
- package/dist/dist/platform.node.d.ts.map +1 -0
- package/dist/dist/property-DQ-Owzki.d.ts +37 -0
- package/dist/dist/property-DQ-Owzki.d.ts.map +1 -0
- package/dist/dist/propertyValidationRules-BDhFjlwP.d.ts +8 -0
- package/dist/dist/propertyValidationRules-BDhFjlwP.d.ts.map +1 -0
- package/dist/dist/publishDraftGraph-CzPd9oe9.d.ts +76 -0
- package/dist/dist/publishDraftGraph-CzPd9oe9.d.ts.map +1 -0
- package/dist/dist/resetAmbiguousLegacyItemData-cXZm4NuG.d.ts +17 -0
- package/dist/dist/resetAmbiguousLegacyItemData-cXZm4NuG.d.ts.map +1 -0
- package/dist/dist/resolveModelForSyncedSeed-BgxtVCHI.d.ts +21 -0
- package/dist/dist/resolveModelForSyncedSeed-BgxtVCHI.d.ts.map +1 -0
- package/dist/dist/syncDbWithEas-Y5GysSCm.d.ts +22 -0
- package/dist/dist/syncDbWithEas-Y5GysSCm.d.ts.map +1 -0
- package/dist/dist/tabEvents-D9x26vf2.d.ts +81 -0
- package/dist/dist/tabEvents-D9x26vf2.d.ts.map +1 -0
- package/dist/dist/tolerantWebAccess-BFU2t-SC.d.ts +113 -0
- package/dist/dist/tolerantWebAccess-BFU2t-SC.d.ts.map +1 -0
- package/dist/dist/updateSeedRevokedAt-CCF8WWYS.d.ts +11 -0
- package/dist/dist/updateSeedRevokedAt-CCF8WWYS.d.ts.map +1 -0
- package/dist/drizzle.js +2 -0
- package/dist/drizzle.js.map +1 -0
- package/dist/{eas-D7jvWMnI.js → eas-CSm5wmry.js} +3 -3
- package/dist/{eas-D7jvWMnI.js.map → eas-CSm5wmry.js.map} +1 -1
- package/dist/{errors-CIrbsN_i.js → errors-3tc6XkCB.js} +81 -36
- package/dist/errors-3tc6XkCB.js.map +1 -0
- package/dist/errors-Do7v6RKu.js +34 -0
- package/dist/errors-Do7v6RKu.js.map +1 -0
- package/dist/{getItem-CxU_kT5W.js → getItem-DM3a-7XE.js} +4 -4
- package/dist/{getItem-CxU_kT5W.js.map → getItem-DM3a-7XE.js.map} +1 -1
- package/dist/{getPublishPayload-DTjOKd3y.js → getPublishPayload-CJF0k5d8.js} +31 -25
- package/dist/getPublishPayload-CJF0k5d8.js.map +1 -0
- package/dist/{getPublishUploads-CVTBo_OV.js → getPublishUploads-C7-fYIgX.js} +6 -6
- package/dist/{getPublishUploads-CVTBo_OV.js.map → getPublishUploads-C7-fYIgX.js.map} +1 -1
- package/dist/{index-CMxEil8T.js → index--mmQ3LQu.js} +8 -8
- package/dist/index--mmQ3LQu.js.map +1 -0
- package/dist/{index-DWK-LOUY.js → index-B7yAoYli.js} +2 -2
- package/dist/index-B7yAoYli.js.map +1 -0
- package/dist/{BasePathResolver-CBTXCMFL.js → index-CrvIcVFJ.js} +304 -285
- package/dist/index-CrvIcVFJ.js.map +1 -0
- package/dist/{index.browser-shRXMeB3.js → index.browser-BmVS-c2C.js} +34 -44
- package/dist/index.browser-BmVS-c2C.js.map +1 -0
- package/dist/{index.node-DAKJNYp5.js → index.node-BKpbCAWt.js} +43 -7
- package/dist/index.node-BKpbCAWt.js.map +1 -0
- package/dist/main.js +23 -24
- package/dist/main.js.map +1 -1
- package/dist/node.js +13 -10
- package/dist/node.js.map +1 -1
- package/dist/platform.browser.js +7 -7
- package/dist/platform.node.js +4 -4
- package/dist/{property-lz9yIpyA.js → property-DQ-Owzki.js} +7 -7
- package/dist/{property-lz9yIpyA.js.map → property-DQ-Owzki.js.map} +1 -1
- package/dist/{propertyValidationRules-LuIwoQoJ.js → propertyValidationRules-BDhFjlwP.js} +10 -10
- package/dist/{propertyValidationRules-LuIwoQoJ.js.map → propertyValidationRules-BDhFjlwP.js.map} +1 -1
- package/dist/{publishDraftGraph-CgSLPKvQ.js → publishDraftGraph-CzPd9oe9.js} +41 -8
- package/dist/publishDraftGraph-CzPd9oe9.js.map +1 -0
- package/dist/{resetAmbiguousLegacyItemData-CuamkAAh.js → resetAmbiguousLegacyItemData-cXZm4NuG.js} +2 -2
- package/dist/{resetAmbiguousLegacyItemData-CuamkAAh.js.map → resetAmbiguousLegacyItemData-cXZm4NuG.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-BbSctSvz.js → resolveModelForSyncedSeed-BgxtVCHI.js} +2 -2
- package/dist/{resolveModelForSyncedSeed-BbSctSvz.js.map → resolveModelForSyncedSeed-BgxtVCHI.js.map} +1 -1
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/initialize.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/rowContext.d.ts +10 -0
- package/dist/src/ItemProperty/service/actors/saveValueToDb/rowContext.d.ts.map +1 -0
- 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 +20 -20
- package/dist/src/Model/Model.d.ts +8 -0
- package/dist/src/Model/Model.d.ts.map +1 -1
- package/dist/src/ModelProperty/ModelProperty.d.ts +1 -1
- package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts +3 -3
- package/dist/src/Schema/service/actors/checkExistingSchema.d.ts.map +1 -1
- package/dist/src/Schema/service/actors/loadOrCreateSchema.d.ts.map +1 -1
- package/dist/src/Schema/service/actors/writeModelsToDb.d.ts.map +1 -1
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/browser/helpers/ArweaveClient.d.ts.map +1 -1
- package/dist/src/client/actors/addModelsToDb.d.ts.map +1 -1
- package/dist/src/client/actors/platformClassesInit.d.ts +1 -7
- package/dist/src/client/actors/platformClassesInit.d.ts.map +1 -1
- package/dist/src/client/actors/saveAppState.d.ts.map +1 -1
- package/dist/src/client/actors/saveConfig.d.ts.map +1 -1
- package/dist/src/client/seedConfigDefaults.d.ts +10 -0
- package/dist/src/client/seedConfigDefaults.d.ts.map +1 -0
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/write/updateItemPropertyValue.d.ts +6 -0
- package/dist/src/db/write/updateItemPropertyValue.d.ts.map +1 -1
- package/dist/src/drizzle/index.d.ts +7 -0
- package/dist/src/drizzle/index.d.ts.map +1 -0
- package/dist/src/events/files/download.d.ts.map +1 -1
- package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/src/helpers/FileManager/errors.d.ts +11 -0
- package/dist/src/helpers/FileManager/errors.d.ts.map +1 -1
- package/dist/src/helpers/db.d.ts +14 -0
- package/dist/src/helpers/db.d.ts.map +1 -1
- package/dist/src/helpers/dotSeedPath.d.ts +7 -0
- package/dist/src/helpers/dotSeedPath.d.ts.map +1 -0
- package/dist/src/helpers/entity/entityLiveQuery.d.ts.map +1 -1
- package/dist/src/helpers/environment.d.ts +5 -0
- package/dist/src/helpers/environment.d.ts.map +1 -1
- package/dist/src/helpers/getSegmentedItemProperties.d.ts.map +1 -1
- package/dist/src/helpers/metadataPropertyNames.d.ts +10 -0
- package/dist/src/helpers/metadataPropertyNames.d.ts.map +1 -1
- package/dist/src/helpers/reconcilePropertyDraftRows.d.ts +9 -0
- package/dist/src/helpers/reconcilePropertyDraftRows.d.ts.map +1 -0
- package/dist/src/helpers/updateSchema.d.ts.map +1 -1
- package/dist/src/imports/index.d.ts +1 -1
- package/dist/src/imports/index.d.ts.map +1 -1
- package/dist/src/imports/json.d.ts +18 -5
- package/dist/src/imports/json.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/node/helpers/resolveFilesDir.d.ts +8 -0
- package/dist/src/node/helpers/resolveFilesDir.d.ts.map +1 -0
- package/dist/src/node/webpack/index.d.ts +2 -0
- package/dist/src/node/webpack/index.d.ts.map +1 -1
- package/dist/src/platform/index.browser.d.ts +5 -0
- package/dist/src/platform/index.browser.d.ts.map +1 -1
- package/dist/src/platform/index.node.d.ts +1 -0
- package/dist/src/platform/index.node.d.ts.map +1 -1
- package/dist/src/stores/eas.d.ts +1 -1
- package/dist/src/stores/eas.d.ts.map +1 -1
- package/dist/src/types/import.d.ts +15 -0
- package/dist/src/types/import.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +8 -4
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/{syncDbWithEas-CrAY9Rl2.js → syncDbWithEas-Y5GysSCm.js} +17 -13
- package/dist/syncDbWithEas-Y5GysSCm.js.map +1 -0
- package/dist/{tabEvents-BGBYV65P.js → tabEvents-D9x26vf2.js} +4 -4
- package/dist/{tabEvents-BGBYV65P.js.map → tabEvents-D9x26vf2.js.map} +1 -1
- package/dist/{tolerantWebAccess-DVHCEulL.js → tolerantWebAccess-BFU2t-SC.js} +8 -8
- package/dist/{tolerantWebAccess-DVHCEulL.js.map → tolerantWebAccess-BFU2t-SC.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-Dy5J8CfQ.js → updateSeedRevokedAt-CCF8WWYS.js} +3 -3
- package/dist/{updateSeedRevokedAt-Dy5J8CfQ.js.map → updateSeedRevokedAt-CCF8WWYS.js.map} +1 -1
- package/package.json +31 -31
- package/dist/BasePathResolver-CBTXCMFL.js.map +0 -1
- package/dist/ClientManager-DRf4uuei.js.map +0 -1
- package/dist/Item-DTJPMjFk.js.map +0 -1
- package/dist/Schema-8DxGcORY.js.map +0 -1
- package/dist/configurePlatform-D4aGjKNk.js +0 -31
- package/dist/configurePlatform-D4aGjKNk.js.map +0 -1
- package/dist/errors-CIrbsN_i.js.map +0 -1
- package/dist/errors-CrBxGWah.js +0 -17
- package/dist/errors-CrBxGWah.js.map +0 -1
- package/dist/getPublishPayload-DTjOKd3y.js.map +0 -1
- package/dist/index-CMxEil8T.js.map +0 -1
- package/dist/index-DWK-LOUY.js.map +0 -1
- package/dist/index.browser-shRXMeB3.js.map +0 -1
- package/dist/index.node-DAKJNYp5.js.map +0 -1
- package/dist/publishDraftGraph-CgSLPKvQ.js.map +0 -1
- package/dist/src/client/nodeEndpointDefaults.d.ts +0 -8
- package/dist/src/client/nodeEndpointDefaults.d.ts.map +0 -1
- package/dist/syncDbWithEas-CrAY9Rl2.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { fromCallback, setup, assign, createActor } from 'xstate';
|
|
2
|
-
import { i as isActorStopped, w as writeProcessMachine, c as currentEvictionEpoch, M as Model, b as anyEvictionSince, s as schemaEvictedSince } from './errors-
|
|
3
|
-
import { B as BaseDb, t as models, v as properties, A as schemas, r as modelSchemas,
|
|
2
|
+
import { i as isActorStopped, w as writeProcessMachine, c as currentEvictionEpoch, M as Model, b as anyEvictionSince, s as schemaEvictedSince } from './errors-3tc6XkCB.js';
|
|
3
|
+
import { B as BaseDb, t as models, v as properties, A as schemas, r as modelSchemas, ao as getModelIdByFileId, n as normalizeDataType, ai as generateId, M as ModelPropertyDataTypes, h as BaseFileManager, ap as getModelId, aq as setCachedPropertyRefresher } from './index-CrvIcVFJ.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
8
|
import debug from 'debug';
|
|
9
|
-
import { S as Schema } from './Schema-
|
|
10
|
-
import { D as DEFAULT_READY_TIMEOUT_MS, d as waitForEntityIdle, m as createReactiveProxy, n as findEntity, o as forceRemoveFromCaches, q as runDestroyLifecycle } from './Item-
|
|
11
|
-
import './ClientManager-
|
|
9
|
+
import { S as Schema } from './Schema-DppObO6h.js';
|
|
10
|
+
import { D as DEFAULT_READY_TIMEOUT_MS, d as waitForEntityIdle, m as createReactiveProxy, n as findEntity, o as forceRemoveFromCaches, q as runDestroyLifecycle } from './Item-B1MH0tXx.js';
|
|
11
|
+
import './ClientManager-D6YA20jP.js';
|
|
12
12
|
import 'lodash-es';
|
|
13
|
-
import './tabEvents-
|
|
13
|
+
import './tabEvents-D9x26vf2.js';
|
|
14
14
|
import '@seedprotocol/arweave';
|
|
15
15
|
import '@noble/hashes/sha3';
|
|
16
16
|
import '@noble/hashes/utils';
|
|
@@ -20,7 +20,7 @@ import 'drizzle-orm/sqlite-core';
|
|
|
20
20
|
import 'nanoid';
|
|
21
21
|
import 'nanoid-dictionary';
|
|
22
22
|
import '@noble/hashes/sha256';
|
|
23
|
-
import './SchemaValidationService-
|
|
23
|
+
import './SchemaValidationService-DXQ-D531.js';
|
|
24
24
|
import '@sinclair/typebox/value';
|
|
25
25
|
import 'rxjs';
|
|
26
26
|
|
|
@@ -32,15 +32,15 @@ const logger$3 = debug('seedSdk:modelProperty:actors:saveToSchema');
|
|
|
32
32
|
*/
|
|
33
33
|
async function getSchemaNameFromModel(modelName) {
|
|
34
34
|
// Get the latest schema files and find which one contains this model
|
|
35
|
-
const _mod_0 = await import('./ClientManager-
|
|
36
|
-
const _ns_0 = _mod_0.
|
|
35
|
+
const _mod_0 = await import('./ClientManager-D6YA20jP.js');
|
|
36
|
+
const _ns_0 = _mod_0.N;
|
|
37
37
|
const schemaHelpersMod = _ns_0;
|
|
38
38
|
const { listLatestSchemaFiles } = schemaHelpersMod;
|
|
39
39
|
const latestSchemas = await listLatestSchemaFiles();
|
|
40
40
|
for (const schema of latestSchemas) {
|
|
41
41
|
try {
|
|
42
|
-
const _mod_1 = await import('./
|
|
43
|
-
const _ns_1 = _mod_1.
|
|
42
|
+
const _mod_1 = await import('./index-CrvIcVFJ.js');
|
|
43
|
+
const _ns_1 = _mod_1.be;
|
|
44
44
|
const fileManagerMod = _ns_1;
|
|
45
45
|
const { BaseFileManager } = fileManagerMod;
|
|
46
46
|
const content = await BaseFileManager.readFileAsString(schema.filePath);
|
|
@@ -59,7 +59,7 @@ async function getSchemaNameFromModel(modelName) {
|
|
|
59
59
|
const saveToSchema = fromCallback(({ sendBack, input: { context }, self }) => {
|
|
60
60
|
const _saveToSchema = async () => {
|
|
61
61
|
// Use dynamic import to break circular dependency
|
|
62
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
62
|
+
const validationServiceMod = await import('./SchemaValidationService-DXQ-D531.js');
|
|
63
63
|
const { SchemaValidationService } = validationServiceMod;
|
|
64
64
|
const validationService = new SchemaValidationService();
|
|
65
65
|
// Validate property structure before saving
|
|
@@ -78,15 +78,15 @@ const saveToSchema = fromCallback(({ sendBack, input: { context }, self }) => {
|
|
|
78
78
|
throw new Error(`Model not found for modelId: ${context.modelId}`);
|
|
79
79
|
}
|
|
80
80
|
// Persist to database only - schema file is updated only when user calls Schema.saveNewVersion()
|
|
81
|
-
const _mod_2 = await import('./
|
|
82
|
-
const _ns_2 = _mod_2.
|
|
81
|
+
const _mod_2 = await import('./index-CrvIcVFJ.js');
|
|
82
|
+
const _ns_2 = _mod_2.bi;
|
|
83
83
|
const dbMod = _ns_2;
|
|
84
84
|
const { savePropertyToDb } = dbMod;
|
|
85
85
|
await savePropertyToDb(context);
|
|
86
86
|
// Mark schema as draft so user knows to save
|
|
87
87
|
const schemaName = context._schemaName ?? (await getSchemaNameFromModel(context.modelName));
|
|
88
88
|
if (schemaName) {
|
|
89
|
-
const _mod_3 = await import('./Schema-
|
|
89
|
+
const _mod_3 = await import('./Schema-DppObO6h.js');
|
|
90
90
|
const _ns_3 = _mod_3.b;
|
|
91
91
|
const schemaMod = _ns_3;
|
|
92
92
|
const { Schema } = schemaMod;
|
|
@@ -124,8 +124,8 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context }, self }
|
|
|
124
124
|
const schemaFileIdForResolve = fullContext._propertyFileId || (typeof fullContext.id === 'string' ? fullContext.id : undefined);
|
|
125
125
|
if (schemaFileIdForResolve && (fullContext.modelName === undefined || fullContext.dataType === undefined)) {
|
|
126
126
|
try {
|
|
127
|
-
const _mod_4 = await import('./
|
|
128
|
-
const _ns_4 = _mod_4.
|
|
127
|
+
const _mod_4 = await import('./index-CrvIcVFJ.js');
|
|
128
|
+
const _ns_4 = _mod_4.bi;
|
|
129
129
|
const dbMod = _ns_4;
|
|
130
130
|
const { getPropertyModelNameAndDataType, getModelNameByModelId } = dbMod;
|
|
131
131
|
let fromDb;
|
|
@@ -171,8 +171,8 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context }, self }
|
|
|
171
171
|
if (fullContext.modelName && fullContext.name && schemaFileId) {
|
|
172
172
|
logger$2(`[compareAndMarkDraft] _originalValues not set, but saving to database anyway for property ${context.modelName}:${context.name} (schemaFileId: ${schemaFileId})`);
|
|
173
173
|
try {
|
|
174
|
-
const _mod_5 = await import('./
|
|
175
|
-
const _ns_5 = _mod_5.
|
|
174
|
+
const _mod_5 = await import('./index-CrvIcVFJ.js');
|
|
175
|
+
const _ns_5 = _mod_5.bi;
|
|
176
176
|
const dbMod = _ns_5;
|
|
177
177
|
const { savePropertyToDb } = dbMod;
|
|
178
178
|
// Ensure _propertyFileId is set for savePropertyToDb to find the property
|
|
@@ -233,8 +233,8 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context }, self }
|
|
|
233
233
|
logger$2(`Property ${fullContext.modelName}:${fullContext.name} has changes, marking as edited`);
|
|
234
234
|
logger$2(`[compareAndMarkDraft] Context when saving: id=${fullContext.id}, _propertyFileId=${fullContext._propertyFileId}, name=${fullContext.name}, _originalValues.name=${fullContext._originalValues?.name}`);
|
|
235
235
|
// Use dynamic import to break circular dependency
|
|
236
|
-
const _mod_6 = await import('./
|
|
237
|
-
const _ns_6 = _mod_6.
|
|
236
|
+
const _mod_6 = await import('./index-CrvIcVFJ.js');
|
|
237
|
+
const _ns_6 = _mod_6.bi;
|
|
238
238
|
const dbMod = _ns_6;
|
|
239
239
|
const { savePropertyToDb } = dbMod;
|
|
240
240
|
// Save to database (but not JSON file) - always save to DB when there are changes
|
|
@@ -249,7 +249,7 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context }, self }
|
|
|
249
249
|
// Mark schema as draft if schema name is available
|
|
250
250
|
if (fullContext._schemaName) {
|
|
251
251
|
// Get the Schema instance and mark it as draft
|
|
252
|
-
const _mod_7 = await import('./Schema-
|
|
252
|
+
const _mod_7 = await import('./Schema-DppObO6h.js');
|
|
253
253
|
const _ns_7 = _mod_7.b;
|
|
254
254
|
const schemaMod = _ns_7;
|
|
255
255
|
const { Schema } = schemaMod;
|
|
@@ -271,7 +271,7 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context }, self }
|
|
|
271
271
|
logger$2(`Property ${fullContext.modelName}:${fullContext.name} has no changes`);
|
|
272
272
|
// Clear isEdited flag in database
|
|
273
273
|
try {
|
|
274
|
-
const _mod_8 = await import('./index-
|
|
274
|
+
const _mod_8 = await import('./index-B7yAoYli.js');
|
|
275
275
|
const _ns_8 = _mod_8.s;
|
|
276
276
|
const seedSchemaMod = _ns_8;
|
|
277
277
|
const { properties: propertiesTable, models: modelsTable } = seedSchemaMod;
|
|
@@ -280,8 +280,8 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context }, self }
|
|
|
280
280
|
const db = BaseDb.getAppDb();
|
|
281
281
|
if (db && fullContext.modelName && fullContext.name) {
|
|
282
282
|
// Find this property's model (model names are only unique per schema)
|
|
283
|
-
const _mod_9 = await import('./
|
|
284
|
-
const _ns_9 = _mod_9.
|
|
283
|
+
const _mod_9 = await import('./index-CrvIcVFJ.js');
|
|
284
|
+
const _ns_9 = _mod_9.bh;
|
|
285
285
|
const { resolveModelRecord } = _ns_9;
|
|
286
286
|
const modelRecord = await resolveModelRecord(fullContext.modelName, {
|
|
287
287
|
modelId: typeof fullContext.modelId === 'number' ? fullContext.modelId : undefined,
|
|
@@ -340,8 +340,8 @@ const validateProperty = fromCallback(({ sendBack, input: { context }, self }) =
|
|
|
340
340
|
// Brief wait so trackPendingWrite from ModelProperty.create() has time to run (it's in setTimeout(0))
|
|
341
341
|
await new Promise((r) => setTimeout(r, 60));
|
|
342
342
|
try {
|
|
343
|
-
const _mod_10 = await import('./
|
|
344
|
-
const _ns_10 = _mod_10.
|
|
343
|
+
const _mod_10 = await import('./index-CrvIcVFJ.js');
|
|
344
|
+
const _ns_10 = _mod_10.bi;
|
|
345
345
|
const dbMod = _ns_10;
|
|
346
346
|
const { getPropertyModelNameAndDataType, getModelNameByModelId } = dbMod;
|
|
347
347
|
// Try pending write first (property row may not exist yet)
|
|
@@ -394,10 +394,10 @@ const validateProperty = fromCallback(({ sendBack, input: { context }, self }) =
|
|
|
394
394
|
fullContext = { ...fullContext, dataType: (fullContext.dataType ?? context._originalValues?.dataType) || 'Text' };
|
|
395
395
|
}
|
|
396
396
|
// Use dynamic imports to break circular dependencies
|
|
397
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
397
|
+
const validationServiceMod = await import('./SchemaValidationService-DXQ-D531.js');
|
|
398
398
|
const { SchemaValidationService } = validationServiceMod;
|
|
399
399
|
const validationService = new SchemaValidationService();
|
|
400
|
-
const _mod_11 = await import('./Schema-
|
|
400
|
+
const _mod_11 = await import('./Schema-DppObO6h.js');
|
|
401
401
|
const _ns_11 = _mod_11.b;
|
|
402
402
|
const schemaMod = _ns_11;
|
|
403
403
|
const { Schema } = schemaMod;
|
|
@@ -1027,8 +1027,8 @@ class ModelProperty {
|
|
|
1027
1027
|
return fallbackIsEdited;
|
|
1028
1028
|
}
|
|
1029
1029
|
// Find this property's model (by modelId when known; model names are only unique per schema)
|
|
1030
|
-
const _mod_12 = await import('./
|
|
1031
|
-
const _ns_12 = _mod_12.
|
|
1030
|
+
const _mod_12 = await import('./index-CrvIcVFJ.js');
|
|
1031
|
+
const _ns_12 = _mod_12.bh;
|
|
1032
1032
|
const { resolveModelRecord } = _ns_12;
|
|
1033
1033
|
const modelRecord = await resolveModelRecord(property.modelName, this._ownerModelScope(property), db);
|
|
1034
1034
|
const modelRecords = modelRecord ? [modelRecord] : [];
|
|
@@ -1065,8 +1065,8 @@ class ModelProperty {
|
|
|
1065
1065
|
return undefined;
|
|
1066
1066
|
}
|
|
1067
1067
|
// Resolve the ref within the owning model's schema
|
|
1068
|
-
const _mod_13 = await import('./
|
|
1069
|
-
const _ns_13 = _mod_13.
|
|
1068
|
+
const _mod_13 = await import('./index-CrvIcVFJ.js');
|
|
1069
|
+
const _ns_13 = _mod_13.bh;
|
|
1070
1070
|
const { resolveRefModelRecord } = _ns_13;
|
|
1071
1071
|
const refModelRecord = await resolveRefModelRecord(refModelName, property ? this._ownerModelScope(property) : { schemaName: this._getSnapshotContext()._schemaName }, db);
|
|
1072
1072
|
if (refModelRecord?.id) {
|
|
@@ -1111,8 +1111,8 @@ class ModelProperty {
|
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
1113
|
if (!model && modelId) {
|
|
1114
|
-
const _mod_14 = await import('./
|
|
1115
|
-
const _ns_14 = _mod_14.
|
|
1114
|
+
const _mod_14 = await import('./index-CrvIcVFJ.js');
|
|
1115
|
+
const _ns_14 = _mod_14.bh;
|
|
1116
1116
|
const { resolveModelRecord } = _ns_14;
|
|
1117
1117
|
const modelFileId = (await resolveModelRecord(property.modelName, { modelId }))?.schemaFileId;
|
|
1118
1118
|
model = modelFileId ? Model.getById(modelFileId) : undefined;
|
|
@@ -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-CtmIFpgV.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-Dw6dHdu_.js.map
|