@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,11 +1,11 @@
|
|
|
1
1
|
import { fromCallback, fromPromise, setup, assign, createActor } from 'xstate';
|
|
2
|
-
import { a as BaseDb, m as models, p as properties,
|
|
2
|
+
import { a as BaseDb, m as models, p as properties, J as isInternalSchema, i as modelSchemas, s as schemas } from './BasePathResolver-B6CKqoKw.js';
|
|
3
3
|
import { eq, or } from 'drizzle-orm';
|
|
4
|
-
import
|
|
4
|
+
import './index-280bL-n4.js';
|
|
5
5
|
import debug from 'debug';
|
|
6
6
|
import { generateId } from './generateId-BopUwD8F.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { y as writeModelToDb, z as writePropertyToDb, A as addSchemaToDb, C as renameModelInDb, d as TProperty } from './db-WbrzEf7c.js';
|
|
8
|
+
import { n as waitForEntityIdle, af as getInvariantSafePropertyDescriptor, q as findEntity, H as getClient, y as ClientManagerState, I as Item, ag as unloadEntity, ah as clearDestroySubscriptions, u as forceRemoveFromCaches, v as runDestroyLifecycle } from './ClientManager-ChcmUL47.js';
|
|
9
9
|
import { modelPropertiesToObject } from './model-DGMe-TTm.js';
|
|
10
10
|
import { toSnakeCase } from 'drizzle-orm/casing';
|
|
11
11
|
import { Type } from '@sinclair/typebox';
|
|
@@ -21,7 +21,7 @@ const createPropertyInstances = async (propertyFileIds) => {
|
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
23
|
try {
|
|
24
|
-
const mod = await import('./ModelProperty-
|
|
24
|
+
const mod = await import('./ModelProperty-D79uV42p.js');
|
|
25
25
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
26
26
|
if (!ModelProperty) {
|
|
27
27
|
logger$7('createPropertyInstances: ModelProperty not available from dynamic import');
|
|
@@ -205,7 +205,7 @@ const loadOrCreateModel = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
205
205
|
// Step 2: Fallback to Schema context (only if database doesn't have the model)
|
|
206
206
|
// This handles the case where model exists in schema file but not yet in database
|
|
207
207
|
try {
|
|
208
|
-
const _mod_0 = await import('./Schema-
|
|
208
|
+
const _mod_0 = await import('./Schema-a8uO-hIZ.js');
|
|
209
209
|
const _ns_0 = _mod_0.b;
|
|
210
210
|
const schemaMod = _ns_0;
|
|
211
211
|
const { Schema } = schemaMod;
|
|
@@ -353,12 +353,12 @@ const loadOrCreateModel = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
353
353
|
}
|
|
354
354
|
// Also check database for models (in case they're persisted but not in Schema context)
|
|
355
355
|
if (db) {
|
|
356
|
-
const _mod_1 = await import('./BasePathResolver-
|
|
357
|
-
const _ns_1 = _mod_1.
|
|
356
|
+
const _mod_1 = await import('./BasePathResolver-B6CKqoKw.js');
|
|
357
|
+
const _ns_1 = _mod_1.Q;
|
|
358
358
|
const modelSchemaSchemaMod = _ns_1;
|
|
359
359
|
const { modelSchemas } = modelSchemaSchemaMod;
|
|
360
|
-
const _mod_2 = await import('./BasePathResolver-
|
|
361
|
-
const _ns_2 = _mod_2.
|
|
360
|
+
const _mod_2 = await import('./BasePathResolver-B6CKqoKw.js');
|
|
361
|
+
const _ns_2 = _mod_2.O;
|
|
362
362
|
const schemaSchemaMod = _ns_2;
|
|
363
363
|
const { schemas: schemasTable } = schemaSchemaMod;
|
|
364
364
|
// Query all models for this schema to check for duplicates (case-insensitive)
|
|
@@ -453,7 +453,7 @@ const loadOrCreateModel = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
453
453
|
}
|
|
454
454
|
// Mark schema as draft when a new model is created so saveNewVersion() can persist it
|
|
455
455
|
try {
|
|
456
|
-
const _mod_3 = await import('./Schema-
|
|
456
|
+
const _mod_3 = await import('./Schema-a8uO-hIZ.js');
|
|
457
457
|
const _ns_3 = _mod_3.b;
|
|
458
458
|
const schemaMod = _ns_3;
|
|
459
459
|
const { Schema } = schemaMod;
|
|
@@ -499,10 +499,10 @@ const validateModel = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
499
499
|
const _validateModel = async () => {
|
|
500
500
|
try {
|
|
501
501
|
// Use dynamic imports to break circular dependencies
|
|
502
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
502
|
+
const validationServiceMod = await import('./SchemaValidationService-Y49vqast.js');
|
|
503
503
|
const { SchemaValidationService } = validationServiceMod;
|
|
504
504
|
const validationService = new SchemaValidationService();
|
|
505
|
-
const _mod_4 = await import('./Schema-
|
|
505
|
+
const _mod_4 = await import('./Schema-a8uO-hIZ.js');
|
|
506
506
|
const _ns_4 = _mod_4.b;
|
|
507
507
|
const schemaMod = _ns_4;
|
|
508
508
|
const { Schema } = schemaMod;
|
|
@@ -614,7 +614,7 @@ const createModelProperties = fromCallback(({ sendBack, input }) => {
|
|
|
614
614
|
return;
|
|
615
615
|
}
|
|
616
616
|
logger$5(`Creating ${Object.keys(propertyDefinitions).length} properties for model "${modelName}" (id: ${_dbId})`);
|
|
617
|
-
const mod = await import('./ModelProperty-
|
|
617
|
+
const mod = await import('./ModelProperty-D79uV42p.js');
|
|
618
618
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
619
619
|
if (!ModelProperty) {
|
|
620
620
|
logger$5('ModelProperty not available from dynamic import');
|
|
@@ -717,7 +717,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
717
717
|
const structureMsg = `[validateEntity] Validating model structure`;
|
|
718
718
|
logger$4(structureMsg);
|
|
719
719
|
// Use existing Model validation
|
|
720
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
720
|
+
const validationServiceMod = await import('./SchemaValidationService-Y49vqast.js');
|
|
721
721
|
const { SchemaValidationService } = validationServiceMod;
|
|
722
722
|
const validationService = new SchemaValidationService();
|
|
723
723
|
// Validate model structure
|
|
@@ -735,7 +735,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
735
735
|
if (entityInput.entityData.schemaName) {
|
|
736
736
|
try {
|
|
737
737
|
logger$4(`[validateEntity] Validating model against schema "${entityInput.entityData.schemaName}"`);
|
|
738
|
-
const _mod_5 = await import('./Schema-
|
|
738
|
+
const _mod_5 = await import('./Schema-a8uO-hIZ.js');
|
|
739
739
|
const _ns_5 = _mod_5.b;
|
|
740
740
|
const schemaMod = _ns_5;
|
|
741
741
|
const { Schema } = schemaMod;
|
|
@@ -773,7 +773,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
773
773
|
}
|
|
774
774
|
else if (entityInput.entityType === 'modelProperty') {
|
|
775
775
|
// Use existing ModelProperty validation
|
|
776
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
776
|
+
const validationServiceMod = await import('./SchemaValidationService-Y49vqast.js');
|
|
777
777
|
const { SchemaValidationService } = validationServiceMod;
|
|
778
778
|
const validationService = new SchemaValidationService();
|
|
779
779
|
// Validate property structure
|
|
@@ -788,7 +788,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
788
788
|
// If schema name and model name provided, validate against schema
|
|
789
789
|
if (entityInput.entityData._schemaName && entityInput.entityData.modelName) {
|
|
790
790
|
try {
|
|
791
|
-
const _mod_6 = await import('./Schema-
|
|
791
|
+
const _mod_6 = await import('./Schema-a8uO-hIZ.js');
|
|
792
792
|
const _ns_6 = _mod_6.b;
|
|
793
793
|
const schemaMod = _ns_6;
|
|
794
794
|
const { Schema } = schemaMod;
|
|
@@ -819,7 +819,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
819
819
|
}
|
|
820
820
|
else if (entityInput.entityType === 'schema') {
|
|
821
821
|
// Schema validation - use existing validation
|
|
822
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
822
|
+
const validationServiceMod = await import('./SchemaValidationService-Y49vqast.js');
|
|
823
823
|
const { SchemaValidationService } = validationServiceMod;
|
|
824
824
|
const validationService = new SchemaValidationService();
|
|
825
825
|
const schemaResult = validationService.validateSchema(entityInput.entityData);
|
|
@@ -892,7 +892,7 @@ const writeToDatabase = fromCallback(({ sendBack, input }) => {
|
|
|
892
892
|
// initial write completes is not overwritten by the stale requestWrite payload.
|
|
893
893
|
let dataToWrite = input.entityData;
|
|
894
894
|
try {
|
|
895
|
-
const mod = await import('./ModelProperty-
|
|
895
|
+
const mod = await import('./ModelProperty-D79uV42p.js');
|
|
896
896
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
897
897
|
if (ModelProperty && typeof ModelProperty.getById === 'function') {
|
|
898
898
|
const instance = ModelProperty.getById(input.entityId);
|
|
@@ -1272,7 +1272,7 @@ const modelMachine = setup({
|
|
|
1272
1272
|
// Create ModelProperty instances for any new property IDs
|
|
1273
1273
|
if (Array.isArray(newPropertyIds) && newPropertyIds.length > 0) {
|
|
1274
1274
|
// Import and create instances asynchronously (fire-and-forget)
|
|
1275
|
-
import('./ModelProperty-
|
|
1275
|
+
import('./ModelProperty-D79uV42p.js').then(({ ModelProperty }) => {
|
|
1276
1276
|
const createPromises = newPropertyIds.map(async (propertyFileId) => {
|
|
1277
1277
|
try {
|
|
1278
1278
|
const property = await ModelProperty.createById(propertyFileId);
|
|
@@ -1743,7 +1743,7 @@ const saveDraftLogger = debug('seedSdk:model:saveDraftToDb');
|
|
|
1743
1743
|
// Lazy import cache for ModelProperty to avoid circular dependency
|
|
1744
1744
|
// Eagerly start loading to minimize delay on first access
|
|
1745
1745
|
let ModelPropertyClass = null;
|
|
1746
|
-
const modelPropertyImportPromise = import('./ModelProperty-
|
|
1746
|
+
const modelPropertyImportPromise = import('./ModelProperty-D79uV42p.js')
|
|
1747
1747
|
.then(module => {
|
|
1748
1748
|
ModelPropertyClass = module.ModelProperty;
|
|
1749
1749
|
return ModelPropertyClass;
|
|
@@ -1760,7 +1760,7 @@ function getModelProperty() {
|
|
|
1760
1760
|
}
|
|
1761
1761
|
// Lazy import cache for Schema to avoid circular dependency
|
|
1762
1762
|
let SchemaClass = null;
|
|
1763
|
-
const schemaImportPromise = (async () => { const _mod_7 = await import('./Schema-
|
|
1763
|
+
const schemaImportPromise = (async () => { const _mod_7 = await import('./Schema-a8uO-hIZ.js'); return _mod_7.b; })()
|
|
1764
1764
|
.then(module => {
|
|
1765
1765
|
SchemaClass = module.Schema;
|
|
1766
1766
|
return SchemaClass;
|
|
@@ -3489,4 +3489,4 @@ const TModelValues = Type.Record(Type.String(), Type.Any());
|
|
|
3489
3489
|
const TModelSchema = Type.Record(Type.String(), TProperty);
|
|
3490
3490
|
|
|
3491
3491
|
export { ConflictError as C, Model as M, TModelSchema as T, TModelValues as a, Model$1 as b, setupEntityLiveQuery as s, writeProcessMachine as w };
|
|
3492
|
-
//# sourceMappingURL=index-
|
|
3492
|
+
//# sourceMappingURL=index-HRHkbVQd.js.map
|