@seedprotocol/sdk 0.6.7 → 0.6.9
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/{BasePathResolver-qV0apdVY.js → BasePathResolver-B6CKqoKw.js} +16 -5
- package/dist/BasePathResolver-B6CKqoKw.js.map +1 -0
- package/dist/{ClientManager-Y5EWQuJj.js → ClientManager-ChcmUL47.js} +619 -264
- package/dist/ClientManager-ChcmUL47.js.map +1 -0
- package/dist/{ModelProperty-DuB5nk6A.js → ModelProperty-D79uV42p.js} +33 -30
- package/dist/ModelProperty-D79uV42p.js.map +1 -0
- package/dist/{Schema-BYM-GNdE.js → Schema-a8uO-hIZ.js} +43 -43
- package/dist/Schema-a8uO-hIZ.js.map +1 -0
- package/dist/{SchemaValidationService-Dr6nmwPm.js → SchemaValidationService-Y49vqast.js} +13 -12
- package/dist/SchemaValidationService-Y49vqast.js.map +1 -0
- package/dist/{backfillMetadataPropertyIds-BzbAB-C5.js → backfillMetadataPropertyIds-CBsf7LnU.js} +5 -3
- package/dist/{backfillMetadataPropertyIds-BzbAB-C5.js.map → backfillMetadataPropertyIds-CBsf7LnU.js.map} +1 -1
- package/dist/cjs/{ModelProperty-CDTOx5zi.js → ModelProperty-D9FGaGuE.js} +21 -17
- package/dist/cjs/ModelProperty-D9FGaGuE.js.map +1 -0
- package/dist/cjs/{Schema-XXcwj3hV.js → Schema-BiJIPLEL.js} +25 -24
- package/dist/cjs/Schema-BiJIPLEL.js.map +1 -0
- package/dist/cjs/{SchemaValidationService-Z7OhtGn5.js → SchemaValidationService-DtYs_CNY.js} +5 -3
- package/dist/cjs/SchemaValidationService-DtYs_CNY.js.map +1 -0
- package/dist/cjs/{backfillMetadataPropertyIds-Bt4fzfIV.js → backfillMetadataPropertyIds-2XaN3b9S.js} +3 -2
- package/dist/cjs/{backfillMetadataPropertyIds-Bt4fzfIV.js.map → backfillMetadataPropertyIds-2XaN3b9S.js.map} +1 -1
- package/dist/cjs/{eas-DdI-4vwl.js → eas-CMNppmGE.js} +4 -3
- package/dist/cjs/{eas-DdI-4vwl.js.map → eas-CMNppmGE.js.map} +1 -1
- package/dist/cjs/{getItem-B_2GeTQf.js → getItem-B6jEINjW.js} +3 -2
- package/dist/cjs/{getItem-B_2GeTQf.js.map → getItem-B6jEINjW.js.map} +1 -1
- package/dist/cjs/{getPublishPayload-Jmgi1RUj.js → getPublishPayload-D5DhLGvN.js} +64 -59
- package/dist/cjs/getPublishPayload-D5DhLGvN.js.map +1 -0
- package/dist/cjs/{getPublishUploads-DNULcrN5.js → getPublishUploads-DMhCCKYF.js} +17 -10
- package/dist/cjs/getPublishUploads-DMhCCKYF.js.map +1 -0
- package/dist/cjs/{getSegmentedItemProperties-DK82kjri.js → getSegmentedItemProperties-CU8rtBAo.js} +3 -51
- package/dist/cjs/getSegmentedItemProperties-CU8rtBAo.js.map +1 -0
- package/dist/cjs/{index-DM1WR83P.js → index-CSNtEnbF.js} +879 -467
- package/dist/cjs/index-CSNtEnbF.js.map +1 -0
- package/dist/cjs/{index-tpO1Nj4v.js → index-DPp9rdRL.js} +6 -3
- package/dist/cjs/index-DPp9rdRL.js.map +1 -0
- package/dist/cjs/{property-DmvgA8FD.js → property-DlKiAWt4.js} +7 -4
- package/dist/cjs/{property-DmvgA8FD.js.map → property-DlKiAWt4.js.map} +1 -1
- package/dist/cjs/{syncDbWithEas-3hOoPdu1.js → syncDbWithEas-C6n34o_Q.js} +11 -6
- package/dist/cjs/syncDbWithEas-C6n34o_Q.js.map +1 -0
- package/dist/{configurePlatform-CCYQruij.js → configurePlatform-CE0Vew17.js} +5 -5
- package/dist/{configurePlatform-CCYQruij.js.map → configurePlatform-CE0Vew17.js.map} +1 -1
- package/dist/db/drizzle/0014_add_error_code_to_publish_processes.sql +1 -0
- package/dist/db/drizzle/meta/0014_snapshot.json +1269 -0
- package/dist/db/drizzle/meta/_journal.json +7 -0
- package/dist/{db-CceyWksv.js → db-WbrzEf7c.js} +254 -35
- package/dist/db-WbrzEf7c.js.map +1 -0
- package/dist/{eas-CH8iFIST.js → eas-CfYCu4IX.js} +6 -6
- package/dist/{eas-CH8iFIST.js.map → eas-CfYCu4IX.js.map} +1 -1
- package/dist/{getItem-C7Mtfz6O.js → getItem-Br-bGNFO.js} +6 -6
- package/dist/{getItem-C7Mtfz6O.js.map → getItem-Br-bGNFO.js.map} +1 -1
- package/dist/{getPublishPayload-2gnnDdMh.js → getPublishPayload-BIrTVUxb.js} +66 -62
- package/dist/getPublishPayload-BIrTVUxb.js.map +1 -0
- package/dist/{getPublishUploads-AKISt3JA.js → getPublishUploads-C6cDeZdz.js} +19 -13
- package/dist/getPublishUploads-C6cDeZdz.js.map +1 -0
- package/dist/{getSegmentedItemProperties-eIjvhCP_.js → getSegmentedItemProperties-BmKE71vU.js} +5 -5
- package/dist/{getSegmentedItemProperties-eIjvhCP_.js.map → getSegmentedItemProperties-BmKE71vU.js.map} +1 -1
- package/dist/{constants-DSqHBPNe.js → index-280bL-n4.js} +32 -257
- package/dist/index-280bL-n4.js.map +1 -0
- package/dist/{index-CHi212ST.js → index-ClSv5pTA.js} +13 -13
- package/dist/index-ClSv5pTA.js.map +1 -0
- package/dist/{index-CsmiM0RI.js → index-Djd3667v.js} +2 -2
- package/dist/index-Djd3667v.js.map +1 -0
- package/dist/{index-BFpbtEsg.js → index-HRHkbVQd.js} +24 -24
- package/dist/{index-BFpbtEsg.js.map → index-HRHkbVQd.js.map} +1 -1
- package/dist/{index.node-CbWB4MDz.js → index.node-DBtQkEfz.js} +8 -6
- package/dist/index.node-DBtQkEfz.js.map +1 -0
- package/dist/main.cjs +6 -1
- package/dist/main.cjs.map +1 -1
- package/dist/main.js +36 -38
- package/dist/main.js.map +1 -1
- package/dist/node.js +15 -14
- package/dist/node.js.map +1 -1
- package/dist/platform.browser.js +108 -46
- package/dist/platform.browser.js.map +1 -1
- package/dist/platform.node.js +4 -3
- package/dist/platform.node.js.map +1 -1
- package/dist/{property-CWKcZ5YZ.js → property-CQjuZ4JW.js} +14 -13
- package/dist/property-CQjuZ4JW.js.map +1 -0
- package/dist/seedSchema/PublishProcessSchema.ts +1 -0
- package/dist/src/Item/Item.d.ts +6 -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 +10 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/resolveRelatedValue.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/saveRelation.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/propertyMachine.d.ts.map +1 -1
- package/dist/src/ModelProperty/ModelProperty.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/Schema/service/addModelsMachine.d.ts.map +1 -1
- package/dist/src/Schema/service/validation/SchemaValidationService.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/browser/helpers/ArweaveClient.d.ts.map +1 -1
- package/dist/src/browser/helpers/EasClient.d.ts +2 -1
- package/dist/src/browser/helpers/EasClient.d.ts.map +1 -1
- package/dist/src/browser/helpers/FileManager.d.ts +1 -1
- package/dist/src/browser/helpers/FileManager.d.ts.map +1 -1
- package/dist/src/browser/workers/FileDownloader.d.ts +1 -1
- package/dist/src/browser/workers/FileDownloader.d.ts.map +1 -1
- package/dist/src/browser/workers/filesDownload.d.ts.map +1 -1
- package/dist/src/client/actors/platformClassesInit.d.ts.map +1 -1
- package/dist/src/client/actors/saveConfig.d.ts.map +1 -1
- package/dist/src/client/constants.d.ts +4 -0
- package/dist/src/client/constants.d.ts.map +1 -1
- package/dist/src/client/nodeEndpointDefaults.d.ts +8 -0
- package/dist/src/client/nodeEndpointDefaults.d.ts.map +1 -0
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/read/getPublishUploads.d.ts.map +1 -1
- package/dist/src/db/read/getRelatedItemsForPublish.d.ts.map +1 -1
- package/dist/src/db/write/createMetadata.d.ts.map +1 -1
- 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/ArweaveClient/index.d.ts.map +1 -1
- package/dist/src/helpers/FileManager/BaseFileManager.d.ts +2 -2
- package/dist/src/helpers/FileManager/BaseFileManager.d.ts.map +1 -1
- package/dist/src/helpers/FileManager/IFileManager.d.ts +4 -0
- package/dist/src/helpers/FileManager/IFileManager.d.ts.map +1 -1
- package/dist/src/helpers/constants.d.ts +8 -0
- package/dist/src/helpers/constants.d.ts.map +1 -1
- package/dist/src/helpers/db.d.ts +6 -0
- package/dist/src/helpers/db.d.ts.map +1 -1
- package/dist/src/helpers/gateway/gatewayState.d.ts +1 -1
- package/dist/src/helpers/gateway/gatewayState.d.ts.map +1 -1
- package/dist/src/helpers/localDbChain.d.ts +22 -0
- package/dist/src/helpers/localDbChain.d.ts.map +1 -0
- package/dist/src/helpers/metadataPropertyNames.d.ts +9 -0
- package/dist/src/helpers/metadataPropertyNames.d.ts.map +1 -1
- package/dist/src/helpers/property/index.d.ts +12 -0
- package/dist/src/helpers/property/index.d.ts.map +1 -1
- package/dist/src/helpers/readHtmlBodyForStorageSeed.d.ts.map +1 -1
- package/dist/src/helpers/relationSeedRef.d.ts +8 -0
- package/dist/src/helpers/relationSeedRef.d.ts.map +1 -1
- package/dist/src/index.d.ts +9 -5
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/node/easLodashHook.d.ts +2 -0
- package/dist/src/node/easLodashHook.d.ts.map +1 -0
- package/dist/src/node/easLodashRegister.d.ts +2 -0
- package/dist/src/node/easLodashRegister.d.ts.map +1 -0
- package/dist/src/node/helpers/FileManager.d.ts +2 -1
- package/dist/src/node/helpers/FileManager.d.ts.map +1 -1
- package/dist/src/node/index.d.ts +2 -1
- package/dist/src/node/index.d.ts.map +1 -1
- package/dist/src/seedSchema/PublishProcessSchema.d.ts +19 -0
- package/dist/src/seedSchema/PublishProcessSchema.d.ts.map +1 -1
- package/dist/src/types/fileManager.d.ts +4 -0
- package/dist/src/types/fileManager.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +15 -1
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/{syncDbWithEas-5kZneTEL.js → syncDbWithEas-CuARXfyN.js} +16 -12
- package/dist/syncDbWithEas-CuARXfyN.js.map +1 -0
- package/dist/{updateSeedRevokedAt-CgfOBtqJ.js → updateSeedRevokedAt-CBcLfHWs.js} +2 -2
- package/dist/{updateSeedRevokedAt-CgfOBtqJ.js.map → updateSeedRevokedAt-CBcLfHWs.js.map} +1 -1
- package/package.json +11 -7
- package/src/node/easLodashHook.js +22 -0
- package/src/node/easLodashRegister.js +13 -0
- package/dist/BasePathResolver-qV0apdVY.js.map +0 -1
- package/dist/ClientManager-Y5EWQuJj.js.map +0 -1
- package/dist/ModelProperty-DuB5nk6A.js.map +0 -1
- package/dist/Schema-BYM-GNdE.js.map +0 -1
- package/dist/SchemaValidationService-Dr6nmwPm.js.map +0 -1
- package/dist/cjs/ModelProperty-CDTOx5zi.js.map +0 -1
- package/dist/cjs/Schema-XXcwj3hV.js.map +0 -1
- package/dist/cjs/SchemaValidationService-Z7OhtGn5.js.map +0 -1
- package/dist/cjs/getPublishPayload-Jmgi1RUj.js.map +0 -1
- package/dist/cjs/getPublishUploads-DNULcrN5.js.map +0 -1
- package/dist/cjs/getSegmentedItemProperties-DK82kjri.js.map +0 -1
- package/dist/cjs/index-DM1WR83P.js.map +0 -1
- package/dist/cjs/index-tpO1Nj4v.js.map +0 -1
- package/dist/cjs/syncDbWithEas-3hOoPdu1.js.map +0 -1
- package/dist/constants-DSqHBPNe.js.map +0 -1
- package/dist/db-CceyWksv.js.map +0 -1
- package/dist/getPublishPayload-2gnnDdMh.js.map +0 -1
- package/dist/getPublishUploads-AKISt3JA.js.map +0 -1
- package/dist/index-CHi212ST.js.map +0 -1
- package/dist/index-CsmiM0RI.js.map +0 -1
- package/dist/index.node-CbWB4MDz.js.map +0 -1
- package/dist/property-CWKcZ5YZ.js.map +0 -1
- package/dist/seedSchema/AppStateSchema.d.ts +0 -82
- package/dist/seedSchema/AppStateSchema.d.ts.map +0 -1
- package/dist/seedSchema/ConfigSchema.d.ts +0 -101
- package/dist/seedSchema/ConfigSchema.d.ts.map +0 -1
- package/dist/seedSchema/MetadataSchema.d.ts +0 -422
- package/dist/seedSchema/MetadataSchema.d.ts.map +0 -1
- package/dist/seedSchema/ModelSchema.d.ts +0 -243
- package/dist/seedSchema/ModelSchema.d.ts.map +0 -1
- package/dist/seedSchema/ModelSchemaSchema.d.ts +0 -61
- package/dist/seedSchema/ModelSchemaSchema.d.ts.map +0 -1
- package/dist/seedSchema/ModelUidSchema.d.ts +0 -64
- package/dist/seedSchema/ModelUidSchema.d.ts.map +0 -1
- package/dist/seedSchema/PropertyUidSchema.d.ts +0 -64
- package/dist/seedSchema/PropertyUidSchema.d.ts.map +0 -1
- package/dist/seedSchema/SchemaSchema.d.ts +0 -169
- package/dist/seedSchema/SchemaSchema.d.ts.map +0 -1
- package/dist/seedSchema/SeedSchema.d.ts +0 -192
- package/dist/seedSchema/SeedSchema.d.ts.map +0 -1
- package/dist/seedSchema/VersionSchema.d.ts +0 -194
- package/dist/seedSchema/VersionSchema.d.ts.map +0 -1
- package/dist/seedSchema/index.d.ts +0 -14
- package/dist/seedSchema/index.d.ts.map +0 -1
- package/dist/syncDbWithEas-5kZneTEL.js.map +0 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { fromCallback, setup, assign, createActor } from 'xstate';
|
|
2
2
|
import 'reflect-metadata';
|
|
3
|
-
import { w as writeProcessMachine, M as Model } from './index-
|
|
4
|
-
import { n as normalizeDataType } from './
|
|
3
|
+
import { w as writeProcessMachine, M as Model } from './index-HRHkbVQd.js';
|
|
4
|
+
import { t as getModelIdByFileId, n as normalizeDataType, u as getModelId } from './db-WbrzEf7c.js';
|
|
5
5
|
import 'pluralize';
|
|
6
|
-
import { a as BaseDb, m as models, p as properties, s as schemas, i as modelSchemas, B as BaseFileManager } from './BasePathResolver-
|
|
6
|
+
import { a as BaseDb, m as models, p as properties, s as schemas, i as modelSchemas, B as BaseFileManager } from './BasePathResolver-B6CKqoKw.js';
|
|
7
7
|
import { eq, and } from 'drizzle-orm';
|
|
8
8
|
import { modelPropertiesToObject } from './model-DGMe-TTm.js';
|
|
9
9
|
import debug from 'debug';
|
|
10
|
-
import
|
|
11
|
-
import { S as Schema } from './Schema-
|
|
12
|
-
import {
|
|
10
|
+
import './index-280bL-n4.js';
|
|
11
|
+
import { S as Schema } from './Schema-a8uO-hIZ.js';
|
|
12
|
+
import { n as waitForEntityIdle, o as createReactiveProxy, q as findEntity, u as forceRemoveFromCaches, v as runDestroyLifecycle } from './ClientManager-ChcmUL47.js';
|
|
13
13
|
import { generateId } from './generateId-BopUwD8F.js';
|
|
14
14
|
import 'drizzle-orm/casing';
|
|
15
15
|
import '@sinclair/typebox';
|
|
16
|
+
import 'lodash-es';
|
|
17
|
+
import 'drizzle-orm/sqlite-core';
|
|
16
18
|
import '@seedprotocol/arweave';
|
|
17
19
|
import '@seedprotocol/eas';
|
|
18
20
|
import 'nanoid';
|
|
19
21
|
import 'nanoid-dictionary';
|
|
20
22
|
import '@seedprotocol/query';
|
|
21
|
-
import '
|
|
22
|
-
import 'drizzle-orm/sqlite-core';
|
|
23
|
-
import './SchemaValidationService-Dr6nmwPm.js';
|
|
23
|
+
import './SchemaValidationService-Y49vqast.js';
|
|
24
24
|
import '@sinclair/typebox/value';
|
|
25
25
|
import '@noble/hashes/sha3';
|
|
26
26
|
import '@noble/hashes/utils';
|
|
@@ -34,15 +34,15 @@ const logger$3 = debug('seedSdk:modelProperty:actors:saveToSchema');
|
|
|
34
34
|
*/
|
|
35
35
|
async function getSchemaNameFromModel(modelName) {
|
|
36
36
|
// Get the latest schema files and find which one contains this model
|
|
37
|
-
const _mod_0 = await import('./ClientManager-
|
|
38
|
-
const _ns_0 = _mod_0.
|
|
37
|
+
const _mod_0 = await import('./ClientManager-ChcmUL47.js');
|
|
38
|
+
const _ns_0 = _mod_0.an;
|
|
39
39
|
const schemaHelpersMod = _ns_0;
|
|
40
40
|
const { listLatestSchemaFiles } = schemaHelpersMod;
|
|
41
41
|
const latestSchemas = await listLatestSchemaFiles();
|
|
42
42
|
for (const schema of latestSchemas) {
|
|
43
43
|
try {
|
|
44
|
-
const _mod_1 = await import('./BasePathResolver-
|
|
45
|
-
const _ns_1 = _mod_1.
|
|
44
|
+
const _mod_1 = await import('./BasePathResolver-B6CKqoKw.js');
|
|
45
|
+
const _ns_1 = _mod_1.N;
|
|
46
46
|
const fileManagerMod = _ns_1;
|
|
47
47
|
const { BaseFileManager } = fileManagerMod;
|
|
48
48
|
const content = await BaseFileManager.readFileAsString(schema.filePath);
|
|
@@ -61,7 +61,7 @@ async function getSchemaNameFromModel(modelName) {
|
|
|
61
61
|
const saveToSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
62
62
|
const _saveToSchema = async () => {
|
|
63
63
|
// Use dynamic import to break circular dependency
|
|
64
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
64
|
+
const validationServiceMod = await import('./SchemaValidationService-Y49vqast.js');
|
|
65
65
|
const { SchemaValidationService } = validationServiceMod;
|
|
66
66
|
const validationService = new SchemaValidationService();
|
|
67
67
|
// Validate property structure before saving
|
|
@@ -80,15 +80,15 @@ const saveToSchema = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
80
80
|
throw new Error(`Model not found for modelId: ${context.modelId}`);
|
|
81
81
|
}
|
|
82
82
|
// Persist to database only - schema file is updated only when user calls Schema.saveNewVersion()
|
|
83
|
-
const _mod_2 = await import('./db-
|
|
84
|
-
const _ns_2 = _mod_2.
|
|
83
|
+
const _mod_2 = await import('./db-WbrzEf7c.js');
|
|
84
|
+
const _ns_2 = _mod_2.Q;
|
|
85
85
|
const dbMod = _ns_2;
|
|
86
86
|
const { savePropertyToDb } = dbMod;
|
|
87
87
|
await savePropertyToDb(context);
|
|
88
88
|
// Mark schema as draft so user knows to save
|
|
89
89
|
const schemaName = context._schemaName ?? (await getSchemaNameFromModel(context.modelName));
|
|
90
90
|
if (schemaName) {
|
|
91
|
-
const _mod_3 = await import('./Schema-
|
|
91
|
+
const _mod_3 = await import('./Schema-a8uO-hIZ.js');
|
|
92
92
|
const _ns_3 = _mod_3.b;
|
|
93
93
|
const schemaMod = _ns_3;
|
|
94
94
|
const { Schema } = schemaMod;
|
|
@@ -123,8 +123,8 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
123
123
|
const schemaFileIdForResolve = fullContext._propertyFileId || (typeof fullContext.id === 'string' ? fullContext.id : undefined);
|
|
124
124
|
if (schemaFileIdForResolve && (fullContext.modelName === undefined || fullContext.dataType === undefined)) {
|
|
125
125
|
try {
|
|
126
|
-
const _mod_4 = await import('./db-
|
|
127
|
-
const _ns_4 = _mod_4.
|
|
126
|
+
const _mod_4 = await import('./db-WbrzEf7c.js');
|
|
127
|
+
const _ns_4 = _mod_4.Q;
|
|
128
128
|
const dbMod = _ns_4;
|
|
129
129
|
const { getPropertyModelNameAndDataType, getModelNameByModelId } = dbMod;
|
|
130
130
|
let fromDb;
|
|
@@ -170,8 +170,8 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
170
170
|
if (fullContext.modelName && fullContext.name && schemaFileId) {
|
|
171
171
|
logger$2(`[compareAndMarkDraft] _originalValues not set, but saving to database anyway for property ${context.modelName}:${context.name} (schemaFileId: ${schemaFileId})`);
|
|
172
172
|
try {
|
|
173
|
-
const _mod_5 = await import('./db-
|
|
174
|
-
const _ns_5 = _mod_5.
|
|
173
|
+
const _mod_5 = await import('./db-WbrzEf7c.js');
|
|
174
|
+
const _ns_5 = _mod_5.Q;
|
|
175
175
|
const dbMod = _ns_5;
|
|
176
176
|
const { savePropertyToDb } = dbMod;
|
|
177
177
|
// Ensure _propertyFileId is set for savePropertyToDb to find the property
|
|
@@ -232,8 +232,8 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
232
232
|
logger$2(`Property ${fullContext.modelName}:${fullContext.name} has changes, marking as edited`);
|
|
233
233
|
logger$2(`[compareAndMarkDraft] Context when saving: id=${fullContext.id}, _propertyFileId=${fullContext._propertyFileId}, name=${fullContext.name}, _originalValues.name=${fullContext._originalValues?.name}`);
|
|
234
234
|
// Use dynamic import to break circular dependency
|
|
235
|
-
const _mod_6 = await import('./db-
|
|
236
|
-
const _ns_6 = _mod_6.
|
|
235
|
+
const _mod_6 = await import('./db-WbrzEf7c.js');
|
|
236
|
+
const _ns_6 = _mod_6.Q;
|
|
237
237
|
const dbMod = _ns_6;
|
|
238
238
|
const { savePropertyToDb } = dbMod;
|
|
239
239
|
// Save to database (but not JSON file) - always save to DB when there are changes
|
|
@@ -248,7 +248,7 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
248
248
|
// Mark schema as draft if schema name is available
|
|
249
249
|
if (fullContext._schemaName) {
|
|
250
250
|
// Get the Schema instance and mark it as draft
|
|
251
|
-
const _mod_7 = await import('./Schema-
|
|
251
|
+
const _mod_7 = await import('./Schema-a8uO-hIZ.js');
|
|
252
252
|
const _ns_7 = _mod_7.b;
|
|
253
253
|
const schemaMod = _ns_7;
|
|
254
254
|
const { Schema } = schemaMod;
|
|
@@ -267,7 +267,7 @@ const compareAndMarkDraft = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
267
267
|
logger$2(`Property ${fullContext.modelName}:${fullContext.name} has no changes`);
|
|
268
268
|
// Clear isEdited flag in database
|
|
269
269
|
try {
|
|
270
|
-
const _mod_8 = await import('./index-
|
|
270
|
+
const _mod_8 = await import('./index-Djd3667v.js');
|
|
271
271
|
const _ns_8 = _mod_8.s;
|
|
272
272
|
const seedSchemaMod = _ns_8;
|
|
273
273
|
const { properties: propertiesTable, models: modelsTable } = seedSchemaMod;
|
|
@@ -333,8 +333,8 @@ const validateProperty = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
333
333
|
// Brief wait so trackPendingWrite from ModelProperty.create() has time to run (it's in setTimeout(0))
|
|
334
334
|
await new Promise((r) => setTimeout(r, 60));
|
|
335
335
|
try {
|
|
336
|
-
const _mod_9 = await import('./db-
|
|
337
|
-
const _ns_9 = _mod_9.
|
|
336
|
+
const _mod_9 = await import('./db-WbrzEf7c.js');
|
|
337
|
+
const _ns_9 = _mod_9.Q;
|
|
338
338
|
const dbMod = _ns_9;
|
|
339
339
|
const { getPropertyModelNameAndDataType, getModelNameByModelId } = dbMod;
|
|
340
340
|
// Try pending write first (property row may not exist yet)
|
|
@@ -387,10 +387,10 @@ const validateProperty = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
387
387
|
fullContext = { ...fullContext, dataType: (fullContext.dataType ?? context._originalValues?.dataType) || 'Text' };
|
|
388
388
|
}
|
|
389
389
|
// Use dynamic imports to break circular dependencies
|
|
390
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
390
|
+
const validationServiceMod = await import('./SchemaValidationService-Y49vqast.js');
|
|
391
391
|
const { SchemaValidationService } = validationServiceMod;
|
|
392
392
|
const validationService = new SchemaValidationService();
|
|
393
|
-
const _mod_10 = await import('./Schema-
|
|
393
|
+
const _mod_10 = await import('./Schema-a8uO-hIZ.js');
|
|
394
394
|
const _ns_10 = _mod_10.b;
|
|
395
395
|
const schemaMod = _ns_10;
|
|
396
396
|
const { Schema } = schemaMod;
|
|
@@ -1205,6 +1205,9 @@ class ModelProperty {
|
|
|
1205
1205
|
if (rawType) {
|
|
1206
1206
|
propertyWithId.dataType = normalizeDataType(rawType);
|
|
1207
1207
|
}
|
|
1208
|
+
if (typeof propertyWithId.refValueType === 'string') {
|
|
1209
|
+
propertyWithId.refValueType = normalizeDataType(propertyWithId.refValueType);
|
|
1210
|
+
}
|
|
1208
1211
|
// Ensure id (schemaFileId) is set correctly
|
|
1209
1212
|
// Priority: _propertyFileId > id (if string) > generate new
|
|
1210
1213
|
// If id is a number (old format), use _propertyFileId instead
|
|
@@ -1776,4 +1779,4 @@ var ModelProperty$1 = /*#__PURE__*/Object.freeze({
|
|
|
1776
1779
|
});
|
|
1777
1780
|
|
|
1778
1781
|
export { ModelProperty };
|
|
1779
|
-
//# sourceMappingURL=ModelProperty-
|
|
1782
|
+
//# sourceMappingURL=ModelProperty-D79uV42p.js.map
|