@seedprotocol/sdk 0.7.7-next.988.g7046e66 → 0.7.7
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-DdqRofK6.js → ClientManager-2GtDWHq6.js} +21 -21
- package/dist/{ClientManager-DdqRofK6.js.map → ClientManager-2GtDWHq6.js.map} +1 -1
- package/dist/{Item-DmK1PgK9.js → Item-D6j0IvBP.js} +53 -53
- package/dist/{Item-DmK1PgK9.js.map → Item-D6j0IvBP.js.map} +1 -1
- package/dist/{ModelProperty-DaJAII87.js → ModelProperty-B52C3CQ2.js} +26 -26
- package/dist/{ModelProperty-DaJAII87.js.map → ModelProperty-B52C3CQ2.js.map} +1 -1
- package/dist/{Schema-DhlbBQs8.js → Schema-O1QLoXv6.js} +31 -31
- package/dist/{Schema-DhlbBQs8.js.map → Schema-O1QLoXv6.js.map} +1 -1
- package/dist/{SchemaValidationService-9KHQAYQ4.js → SchemaValidationService-BxCbfDaI.js} +6 -6
- package/dist/{SchemaValidationService-9KHQAYQ4.js.map → SchemaValidationService-BxCbfDaI.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-qoVxUEEl.js → backfillMetadataPropertyIds-CzSbuucw.js} +3 -3
- package/dist/{backfillMetadataPropertyIds-qoVxUEEl.js.map → backfillMetadataPropertyIds-CzSbuucw.js.map} +1 -1
- package/dist/{configurePlatform-CazqABrK.js → configurePlatform-Bbpw_R4y.js} +2 -2
- package/dist/{configurePlatform-CazqABrK.js.map → configurePlatform-Bbpw_R4y.js.map} +1 -1
- package/dist/{detachRowsBeforeDelete-yatbnC27.js → detachRowsBeforeDelete-D1TyEMco.js} +2 -2
- package/dist/{detachRowsBeforeDelete-yatbnC27.js.map → detachRowsBeforeDelete-D1TyEMco.js.map} +1 -1
- package/dist/{discardNewDraft-q1krLqtL.js → discardNewDraft-hiVaUVjV.js} +5 -5
- package/dist/{discardNewDraft-q1krLqtL.js.map → discardNewDraft-hiVaUVjV.js.map} +1 -1
- package/dist/dist/{ClientManager-DdqRofK6.d.ts → ClientManager-2GtDWHq6.d.ts} +1 -1
- package/dist/dist/{ClientManager-DdqRofK6.d.ts.map → ClientManager-2GtDWHq6.d.ts.map} +1 -1
- package/dist/dist/{Item-DmK1PgK9.d.ts → Item-D6j0IvBP.d.ts} +1 -1
- package/dist/dist/{Item-DmK1PgK9.d.ts.map → Item-D6j0IvBP.d.ts.map} +1 -1
- package/dist/dist/{ModelProperty-DaJAII87.d.ts → ModelProperty-B52C3CQ2.d.ts} +1 -1
- package/dist/dist/{ModelProperty-DaJAII87.d.ts.map → ModelProperty-B52C3CQ2.d.ts.map} +1 -1
- package/dist/dist/{Schema-DhlbBQs8.d.ts → Schema-O1QLoXv6.d.ts} +1 -1
- package/dist/dist/{Schema-DhlbBQs8.d.ts.map → Schema-O1QLoXv6.d.ts.map} +1 -1
- package/dist/dist/{SchemaValidationService-9KHQAYQ4.d.ts → SchemaValidationService-BxCbfDaI.d.ts} +1 -1
- package/dist/dist/{SchemaValidationService-9KHQAYQ4.d.ts.map → SchemaValidationService-BxCbfDaI.d.ts.map} +1 -1
- package/dist/dist/{backfillMetadataPropertyIds-qoVxUEEl.d.ts → backfillMetadataPropertyIds-CzSbuucw.d.ts} +1 -1
- package/dist/dist/backfillMetadataPropertyIds-CzSbuucw.d.ts.map +1 -0
- package/dist/dist/{configurePlatform-CazqABrK.d.ts → configurePlatform-Bbpw_R4y.d.ts} +1 -1
- package/dist/dist/configurePlatform-Bbpw_R4y.d.ts.map +1 -0
- package/dist/dist/{detachRowsBeforeDelete-yatbnC27.d.ts → detachRowsBeforeDelete-D1TyEMco.d.ts} +1 -1
- package/dist/dist/detachRowsBeforeDelete-D1TyEMco.d.ts.map +1 -0
- package/dist/dist/{discardNewDraft-q1krLqtL.d.ts → discardNewDraft-hiVaUVjV.d.ts} +1 -1
- package/dist/dist/discardNewDraft-hiVaUVjV.d.ts.map +1 -0
- package/dist/dist/{eas-CPYt-QVJ.d.ts → eas-DOdj-EMK.d.ts} +1 -1
- package/dist/dist/eas-DOdj-EMK.d.ts.map +1 -0
- package/dist/dist/{errors-DuFqGrjo.d.ts → errors-KM-yq2MD.d.ts} +1 -1
- package/dist/dist/{errors-DuFqGrjo.d.ts.map → errors-KM-yq2MD.d.ts.map} +1 -1
- package/dist/dist/{getItem-DPapr9uy.d.ts → getItem-Bh0zv-o1.d.ts} +1 -1
- package/dist/dist/getItem-Bh0zv-o1.d.ts.map +1 -0
- package/dist/dist/{getPublishPayload-Dnv38ZW1.d.ts → getPublishPayload-oH8wJhnH.d.ts} +1 -1
- package/dist/dist/{getPublishPayload-Dnv38ZW1.d.ts.map → getPublishPayload-oH8wJhnH.d.ts.map} +1 -1
- package/dist/dist/{getPublishUploads-Dd7dCxNi.d.ts → getPublishUploads-Cex-NBe6.d.ts} +1 -1
- package/dist/dist/{getPublishUploads-Dd7dCxNi.d.ts.map → getPublishUploads-Cex-NBe6.d.ts.map} +1 -1
- package/dist/dist/{index-CTidoFhC.d.ts → index-BAao3_Po.d.ts} +5 -5
- package/dist/dist/index-BAao3_Po.d.ts.map +1 -0
- package/dist/dist/{index-PnK3Ak9Z.d.ts → index-BbFwftAv.d.ts} +1 -1
- package/dist/dist/{index-PnK3Ak9Z.d.ts.map → index-BbFwftAv.d.ts.map} +1 -1
- package/dist/dist/{index-DeUHrBqA.d.ts → index-DpgQMIRq.d.ts} +1 -1
- package/dist/dist/{index-DeUHrBqA.d.ts.map → index-DpgQMIRq.d.ts.map} +1 -1
- package/dist/dist/{index.browser-CRvkFEhl.d.ts → index.browser-nndbVM7z.d.ts} +1 -1
- package/dist/dist/{index.browser-CRvkFEhl.d.ts.map → index.browser-nndbVM7z.d.ts.map} +1 -1
- package/dist/dist/{index.node-DQTc7kEl.d.ts → index.node-BUfx-JaP.d.ts} +1 -1
- package/dist/dist/{index.node-DQTc7kEl.d.ts.map → index.node-BUfx-JaP.d.ts.map} +1 -1
- package/dist/dist/platform.browser.d.ts +2 -2
- package/dist/dist/platform.node.d.ts +2 -2
- package/dist/dist/{property-Dk_5t4-p.d.ts → property-BDBvImLs.d.ts} +3 -3
- package/dist/dist/property-BDBvImLs.d.ts.map +1 -0
- package/dist/dist/{propertyValidationRules-BtUZdfft.d.ts → propertyValidationRules-BlfLn4rP.d.ts} +1 -1
- package/dist/dist/propertyValidationRules-BlfLn4rP.d.ts.map +1 -0
- package/dist/dist/{publishDraftGraph-CN7EsPVb.d.ts → publishDraftGraph-CLO85LLz.d.ts} +1 -1
- package/dist/dist/{publishDraftGraph-CN7EsPVb.d.ts.map → publishDraftGraph-CLO85LLz.d.ts.map} +1 -1
- package/dist/dist/{resetAmbiguousLegacyItemData-DzVlhD9u.d.ts → resetAmbiguousLegacyItemData-Cy8ik7xk.d.ts} +1 -1
- package/dist/dist/resetAmbiguousLegacyItemData-Cy8ik7xk.d.ts.map +1 -0
- package/dist/dist/{resolveModelForSyncedSeed-C_BzNN8r.d.ts → resolveModelForSyncedSeed-DFr4COc4.d.ts} +3 -3
- package/dist/dist/resolveModelForSyncedSeed-DFr4COc4.d.ts.map +1 -0
- package/dist/dist/{syncDbWithEas-BMmxPq5o.d.ts → syncDbWithEas-CAOlw3i-.d.ts} +1 -1
- package/dist/dist/syncDbWithEas-CAOlw3i-.d.ts.map +1 -0
- package/dist/dist/{tabEvents-DyGJcILs.d.ts → tabEvents-DksXwk3X.d.ts} +1 -1
- package/dist/dist/{tabEvents-DyGJcILs.d.ts.map → tabEvents-DksXwk3X.d.ts.map} +1 -1
- package/dist/dist/{tolerantWebAccess-Zxy2EUzu.d.ts → tolerantWebAccess-CEIjFGf0.d.ts} +1 -1
- package/dist/dist/{tolerantWebAccess-Zxy2EUzu.d.ts.map → tolerantWebAccess-CEIjFGf0.d.ts.map} +1 -1
- package/dist/dist/{updateSeedRevokedAt-DxhC4ABM.d.ts → updateSeedRevokedAt-Cjr35YjE.d.ts} +1 -1
- package/dist/dist/updateSeedRevokedAt-Cjr35YjE.d.ts.map +1 -0
- package/dist/{eas-CPYt-QVJ.js → eas-DOdj-EMK.js} +3 -3
- package/dist/{eas-CPYt-QVJ.js.map → eas-DOdj-EMK.js.map} +1 -1
- package/dist/{errors-DuFqGrjo.js → errors-KM-yq2MD.js} +27 -27
- package/dist/{errors-DuFqGrjo.js.map → errors-KM-yq2MD.js.map} +1 -1
- package/dist/{getItem-DPapr9uy.js → getItem-Bh0zv-o1.js} +4 -4
- package/dist/{getItem-DPapr9uy.js.map → getItem-Bh0zv-o1.js.map} +1 -1
- package/dist/{getPublishPayload-Dnv38ZW1.js → getPublishPayload-oH8wJhnH.js} +13 -13
- package/dist/{getPublishPayload-Dnv38ZW1.js.map → getPublishPayload-oH8wJhnH.js.map} +1 -1
- package/dist/{getPublishUploads-Dd7dCxNi.js → getPublishUploads-Cex-NBe6.js} +6 -6
- package/dist/{getPublishUploads-Dd7dCxNi.js.map → getPublishUploads-Cex-NBe6.js.map} +1 -1
- package/dist/{index-CTidoFhC.js → index-BAao3_Po.js} +8 -8
- package/dist/index-BAao3_Po.js.map +1 -0
- package/dist/{index-PnK3Ak9Z.js → index-BbFwftAv.js} +2 -2
- package/dist/index-BbFwftAv.js.map +1 -0
- package/dist/{index-DeUHrBqA.js → index-DpgQMIRq.js} +2 -2
- package/dist/{index-DeUHrBqA.js.map → index-DpgQMIRq.js.map} +1 -1
- package/dist/{index.browser-CRvkFEhl.js → index.browser-nndbVM7z.js} +10 -12
- package/dist/index.browser-nndbVM7z.js.map +1 -0
- package/dist/{index.node-DQTc7kEl.js → index.node-BUfx-JaP.js} +6 -6
- package/dist/{index.node-DQTc7kEl.js.map → index.node-BUfx-JaP.js.map} +1 -1
- package/dist/main.js +22 -22
- package/dist/node.js +12 -12
- package/dist/node.js.map +1 -1
- package/dist/platform.browser.js +5 -5
- package/dist/platform.node.js +4 -4
- package/dist/{property-Dk_5t4-p.js → property-BDBvImLs.js} +6 -6
- package/dist/{property-Dk_5t4-p.js.map → property-BDBvImLs.js.map} +1 -1
- package/dist/{propertyValidationRules-BtUZdfft.js → propertyValidationRules-BlfLn4rP.js} +6 -6
- package/dist/{propertyValidationRules-BtUZdfft.js.map → propertyValidationRules-BlfLn4rP.js.map} +1 -1
- package/dist/{publishDraftGraph-CN7EsPVb.js → publishDraftGraph-CLO85LLz.js} +6 -6
- package/dist/{publishDraftGraph-CN7EsPVb.js.map → publishDraftGraph-CLO85LLz.js.map} +1 -1
- package/dist/{resetAmbiguousLegacyItemData-DzVlhD9u.js → resetAmbiguousLegacyItemData-Cy8ik7xk.js} +2 -2
- package/dist/{resetAmbiguousLegacyItemData-DzVlhD9u.js.map → resetAmbiguousLegacyItemData-Cy8ik7xk.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-C_BzNN8r.js → resolveModelForSyncedSeed-DFr4COc4.js} +4 -4
- package/dist/resolveModelForSyncedSeed-DFr4COc4.js.map +1 -0
- package/dist/src/browser/db/Db.d.ts.map +1 -1
- package/dist/src/db/read/resolveModelForSyncedSeed.d.ts +2 -2
- package/dist/src/node/helpers/scripts.d.ts +1 -1
- package/dist/{syncDbWithEas-BMmxPq5o.js → syncDbWithEas-CAOlw3i-.js} +13 -13
- package/dist/{syncDbWithEas-BMmxPq5o.js.map → syncDbWithEas-CAOlw3i-.js.map} +1 -1
- package/dist/{tabEvents-DyGJcILs.js → tabEvents-DksXwk3X.js} +4 -4
- package/dist/{tabEvents-DyGJcILs.js.map → tabEvents-DksXwk3X.js.map} +1 -1
- package/dist/{tolerantWebAccess-Zxy2EUzu.js → tolerantWebAccess-CEIjFGf0.js} +6 -6
- package/dist/{tolerantWebAccess-Zxy2EUzu.js.map → tolerantWebAccess-CEIjFGf0.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-DxhC4ABM.js → updateSeedRevokedAt-Cjr35YjE.js} +3 -3
- package/dist/{updateSeedRevokedAt-DxhC4ABM.js.map → updateSeedRevokedAt-Cjr35YjE.js.map} +1 -1
- package/package.json +6 -6
- package/dist/dist/backfillMetadataPropertyIds-qoVxUEEl.d.ts.map +0 -1
- package/dist/dist/configurePlatform-CazqABrK.d.ts.map +0 -1
- package/dist/dist/detachRowsBeforeDelete-yatbnC27.d.ts.map +0 -1
- package/dist/dist/discardNewDraft-q1krLqtL.d.ts.map +0 -1
- package/dist/dist/eas-CPYt-QVJ.d.ts.map +0 -1
- package/dist/dist/getItem-DPapr9uy.d.ts.map +0 -1
- package/dist/dist/index-CTidoFhC.d.ts.map +0 -1
- package/dist/dist/property-Dk_5t4-p.d.ts.map +0 -1
- package/dist/dist/propertyValidationRules-BtUZdfft.d.ts.map +0 -1
- package/dist/dist/resetAmbiguousLegacyItemData-DzVlhD9u.d.ts.map +0 -1
- package/dist/dist/resolveModelForSyncedSeed-C_BzNN8r.d.ts.map +0 -1
- package/dist/dist/syncDbWithEas-BMmxPq5o.d.ts.map +0 -1
- package/dist/dist/updateSeedRevokedAt-DxhC4ABM.d.ts.map +0 -1
- package/dist/index-CTidoFhC.js.map +0 -1
- package/dist/index-PnK3Ak9Z.js.map +0 -1
- package/dist/index.browser-CRvkFEhl.js.map +0 -1
- package/dist/resolveModelForSyncedSeed-C_BzNN8r.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { fromCallback, fromPromise, setup, assign, createActor } from 'xstate';
|
|
2
|
-
import { B as BaseDb, t as models, v as properties, ai as generateId, aJ as isInternalSchema, aK as writeModelToDb, aL as writePropertyToDb, aM as addSchemaToDb, r as modelSchemas, A as schemas, H as AmbiguousModelError, aN as renameModelInDb, aO as currentNameMatchLevels, a as TProperty } from './index-
|
|
2
|
+
import { B as BaseDb, t as models, v as properties, ai as generateId, aJ as isInternalSchema, aK as writeModelToDb, aL as writePropertyToDb, aM as addSchemaToDb, r as modelSchemas, A as schemas, H as AmbiguousModelError, aN as renameModelInDb, aO as currentNameMatchLevels, a as TProperty } from './index-DpgQMIRq.js';
|
|
3
3
|
import { eq, and, isNull, or } from 'drizzle-orm';
|
|
4
4
|
import debug from 'debug';
|
|
5
|
-
import { d as waitForEntityIdle, D as DEFAULT_READY_TIMEOUT_MS, Z as getInvariantSafePropertyDescriptor, n as findEntity, C as ClientManagerState, I as Item, _ as clearDestroySubscriptions, o as forceRemoveFromCaches, $ as unloadEntity, q as runDestroyLifecycle } from './Item-
|
|
6
|
-
import { m as getClient } from './ClientManager-
|
|
5
|
+
import { d as waitForEntityIdle, D as DEFAULT_READY_TIMEOUT_MS, Z as getInvariantSafePropertyDescriptor, n as findEntity, C as ClientManagerState, I as Item, _ as clearDestroySubscriptions, o as forceRemoveFromCaches, $ as unloadEntity, q as runDestroyLifecycle } from './Item-D6j0IvBP.js';
|
|
6
|
+
import { m as getClient } from './ClientManager-2GtDWHq6.js';
|
|
7
7
|
import { modelPropertiesToObject } from './model-oHA3YhOd.js';
|
|
8
8
|
import { localNamesInBestMatchTier } from '@seedprotocol/eas';
|
|
9
9
|
import { Type } from '@sinclair/typebox';
|
|
@@ -35,7 +35,7 @@ const createPropertyInstances = async (propertyFileIds) => {
|
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
37
|
try {
|
|
38
|
-
const mod = await import('./ModelProperty-
|
|
38
|
+
const mod = await import('./ModelProperty-B52C3CQ2.js');
|
|
39
39
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
40
40
|
if (!ModelProperty) {
|
|
41
41
|
logger$7('createPropertyInstances: ModelProperty not available from dynamic import');
|
|
@@ -101,10 +101,10 @@ const loadOrCreateModel = fromCallback(({ sendBack, input: { context }, self })
|
|
|
101
101
|
if (!modelRecord) {
|
|
102
102
|
// Model names are only unique per schema: prefer this schema's row, and otherwise only
|
|
103
103
|
// consider same-name rows that no schema claims yet (never another schema's model).
|
|
104
|
-
const _mod_0 = await import('./index-
|
|
104
|
+
const _mod_0 = await import('./index-DpgQMIRq.js');
|
|
105
105
|
const _ns_0 = _mod_0.bg;
|
|
106
106
|
const { modelSchemas } = _ns_0;
|
|
107
|
-
const _mod_1 = await import('./index-
|
|
107
|
+
const _mod_1 = await import('./index-DpgQMIRq.js');
|
|
108
108
|
const _ns_1 = _mod_1.bf;
|
|
109
109
|
const { schemas: schemasTable } = _ns_1;
|
|
110
110
|
let dbModels = await db
|
|
@@ -252,7 +252,7 @@ const loadOrCreateModel = fromCallback(({ sendBack, input: { context }, self })
|
|
|
252
252
|
// Step 2: Fallback to Schema context (only if database doesn't have the model)
|
|
253
253
|
// This handles the case where model exists in schema file but not yet in database
|
|
254
254
|
try {
|
|
255
|
-
const _mod_2 = await import('./Schema-
|
|
255
|
+
const _mod_2 = await import('./Schema-O1QLoXv6.js');
|
|
256
256
|
const _ns_2 = _mod_2.b;
|
|
257
257
|
const schemaMod = _ns_2;
|
|
258
258
|
const { Schema } = schemaMod;
|
|
@@ -403,11 +403,11 @@ const loadOrCreateModel = fromCallback(({ sendBack, input: { context }, self })
|
|
|
403
403
|
}
|
|
404
404
|
// Also check database for models (in case they're persisted but not in Schema context)
|
|
405
405
|
if (db) {
|
|
406
|
-
const _mod_3 = await import('./index-
|
|
406
|
+
const _mod_3 = await import('./index-DpgQMIRq.js');
|
|
407
407
|
const _ns_3 = _mod_3.bg;
|
|
408
408
|
const modelSchemaSchemaMod = _ns_3;
|
|
409
409
|
const { modelSchemas } = modelSchemaSchemaMod;
|
|
410
|
-
const _mod_4 = await import('./index-
|
|
410
|
+
const _mod_4 = await import('./index-DpgQMIRq.js');
|
|
411
411
|
const _ns_4 = _mod_4.bf;
|
|
412
412
|
const schemaSchemaMod = _ns_4;
|
|
413
413
|
const { schemas: schemasTable } = schemaSchemaMod;
|
|
@@ -503,7 +503,7 @@ const loadOrCreateModel = fromCallback(({ sendBack, input: { context }, self })
|
|
|
503
503
|
}
|
|
504
504
|
// Mark schema as draft when a new model is created so saveNewVersion() can persist it
|
|
505
505
|
try {
|
|
506
|
-
const _mod_5 = await import('./Schema-
|
|
506
|
+
const _mod_5 = await import('./Schema-O1QLoXv6.js');
|
|
507
507
|
const _ns_5 = _mod_5.b;
|
|
508
508
|
const schemaMod = _ns_5;
|
|
509
509
|
const { Schema } = schemaMod;
|
|
@@ -551,10 +551,10 @@ const validateModel = fromCallback(({ sendBack, input: { context }, self }) => {
|
|
|
551
551
|
const _validateModel = async () => {
|
|
552
552
|
try {
|
|
553
553
|
// Use dynamic imports to break circular dependencies
|
|
554
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
554
|
+
const validationServiceMod = await import('./SchemaValidationService-BxCbfDaI.js');
|
|
555
555
|
const { SchemaValidationService } = validationServiceMod;
|
|
556
556
|
const validationService = new SchemaValidationService();
|
|
557
|
-
const _mod_6 = await import('./Schema-
|
|
557
|
+
const _mod_6 = await import('./Schema-O1QLoXv6.js');
|
|
558
558
|
const _ns_6 = _mod_6.b;
|
|
559
559
|
const schemaMod = _ns_6;
|
|
560
560
|
const { Schema } = schemaMod;
|
|
@@ -673,7 +673,7 @@ const createModelProperties = fromCallback(({ sendBack, input, self }) => {
|
|
|
673
673
|
return;
|
|
674
674
|
}
|
|
675
675
|
logger$5(`Creating ${Object.keys(propertyDefinitions).length} properties for model "${modelName}" (id: ${_dbId})`);
|
|
676
|
-
const mod = await import('./ModelProperty-
|
|
676
|
+
const mod = await import('./ModelProperty-B52C3CQ2.js');
|
|
677
677
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
678
678
|
if (!ModelProperty) {
|
|
679
679
|
logger$5('ModelProperty not available from dynamic import');
|
|
@@ -698,7 +698,7 @@ const createModelProperties = fromCallback(({ sendBack, input, self }) => {
|
|
|
698
698
|
: undefined;
|
|
699
699
|
// Otherwise use provided ID or generate a random one
|
|
700
700
|
// IDs should be generated in the import process before creating properties
|
|
701
|
-
const _mod_7 = await import('./index-
|
|
701
|
+
const _mod_7 = await import('./index-DpgQMIRq.js');
|
|
702
702
|
const _ns_7 = _mod_7.bk;
|
|
703
703
|
const { generateId } = _ns_7;
|
|
704
704
|
const propertyFileId = propData.id || propertyRecord?.schemaFileId || generateId();
|
|
@@ -716,7 +716,7 @@ const createModelProperties = fromCallback(({ sendBack, input, self }) => {
|
|
|
716
716
|
}
|
|
717
717
|
else if (refModelName) {
|
|
718
718
|
// Fallback: resolve the ref by name within this model's schema
|
|
719
|
-
const _mod_8 = await import('./index-
|
|
719
|
+
const _mod_8 = await import('./index-DpgQMIRq.js');
|
|
720
720
|
const _ns_8 = _mod_8.bh;
|
|
721
721
|
const { resolveModelRecord } = _ns_8;
|
|
722
722
|
const refModelRecord = await resolveModelRecord(refModelName, { schemaName }, db);
|
|
@@ -887,7 +887,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
887
887
|
const evictionEpoch = currentEvictionEpoch();
|
|
888
888
|
/** The schema to validate against; throws (validation then skips the schema check) once it was evicted. */
|
|
889
889
|
const schemaForValidation = async (schemaName) => {
|
|
890
|
-
const _mod_9 = await import('./Schema-
|
|
890
|
+
const _mod_9 = await import('./Schema-O1QLoXv6.js');
|
|
891
891
|
const _ns_9 = _mod_9.b;
|
|
892
892
|
const { Schema } = _ns_9;
|
|
893
893
|
if (schemaEvictedSince(schemaName, evictionEpoch)) {
|
|
@@ -905,7 +905,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
905
905
|
const structureMsg = `[validateEntity] Validating model structure`;
|
|
906
906
|
logger$4(structureMsg);
|
|
907
907
|
// Use existing Model validation
|
|
908
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
908
|
+
const validationServiceMod = await import('./SchemaValidationService-BxCbfDaI.js');
|
|
909
909
|
const { SchemaValidationService } = validationServiceMod;
|
|
910
910
|
const validationService = new SchemaValidationService();
|
|
911
911
|
// Validate model structure
|
|
@@ -955,7 +955,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
955
955
|
}
|
|
956
956
|
else if (entityInput.entityType === 'modelProperty') {
|
|
957
957
|
// Use existing ModelProperty validation
|
|
958
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
958
|
+
const validationServiceMod = await import('./SchemaValidationService-BxCbfDaI.js');
|
|
959
959
|
const { SchemaValidationService } = validationServiceMod;
|
|
960
960
|
const validationService = new SchemaValidationService();
|
|
961
961
|
// Validate property structure
|
|
@@ -995,7 +995,7 @@ const validateEntity = fromPromise(async ({ input }) => {
|
|
|
995
995
|
}
|
|
996
996
|
else if (entityInput.entityType === 'schema') {
|
|
997
997
|
// Schema validation - use existing validation
|
|
998
|
-
const validationServiceMod = await import('./SchemaValidationService-
|
|
998
|
+
const validationServiceMod = await import('./SchemaValidationService-BxCbfDaI.js');
|
|
999
999
|
const { SchemaValidationService } = validationServiceMod;
|
|
1000
1000
|
const validationService = new SchemaValidationService();
|
|
1001
1001
|
const schemaResult = validationService.validateSchema(entityInput.entityData);
|
|
@@ -1083,7 +1083,7 @@ const writeToDatabase = fromCallback(({ sendBack, input }) => {
|
|
|
1083
1083
|
// initial write completes is not overwritten by the stale requestWrite payload.
|
|
1084
1084
|
let dataToWrite = input.entityData;
|
|
1085
1085
|
try {
|
|
1086
|
-
const mod = await import('./ModelProperty-
|
|
1086
|
+
const mod = await import('./ModelProperty-B52C3CQ2.js');
|
|
1087
1087
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
1088
1088
|
if (ModelProperty && typeof ModelProperty.getById === 'function') {
|
|
1089
1089
|
const instance = ModelProperty.getById(input.entityId);
|
|
@@ -1477,7 +1477,7 @@ const modelMachine = setup({
|
|
|
1477
1477
|
// Create ModelProperty instances for any new property IDs
|
|
1478
1478
|
if (Array.isArray(newPropertyIds) && newPropertyIds.length > 0) {
|
|
1479
1479
|
// Import and create instances asynchronously (fire-and-forget)
|
|
1480
|
-
import('./ModelProperty-
|
|
1480
|
+
import('./ModelProperty-B52C3CQ2.js').then(({ ModelProperty }) => {
|
|
1481
1481
|
if (self.getSnapshot().status === 'stopped')
|
|
1482
1482
|
return;
|
|
1483
1483
|
const createPromises = newPropertyIds.map(async (propertyFileId) => {
|
|
@@ -2011,7 +2011,7 @@ const saveDraftLogger = debug('seedSdk:model:saveDraftToDb');
|
|
|
2011
2011
|
// Lazy import cache for ModelProperty to avoid circular dependency
|
|
2012
2012
|
// Eagerly start loading to minimize delay on first access
|
|
2013
2013
|
let ModelPropertyClass = null;
|
|
2014
|
-
const modelPropertyImportPromise = import('./ModelProperty-
|
|
2014
|
+
const modelPropertyImportPromise = import('./ModelProperty-B52C3CQ2.js')
|
|
2015
2015
|
.then(module => {
|
|
2016
2016
|
ModelPropertyClass = module.ModelProperty;
|
|
2017
2017
|
return ModelPropertyClass;
|
|
@@ -3039,7 +3039,7 @@ class Model {
|
|
|
3039
3039
|
const evictionEpoch = options?.evictionEpoch ?? currentEvictionEpoch();
|
|
3040
3040
|
try {
|
|
3041
3041
|
// Query model by name (throws AmbiguousModelError when several schemas define it)
|
|
3042
|
-
const _mod_10 = await import('./index-
|
|
3042
|
+
const _mod_10 = await import('./index-DpgQMIRq.js');
|
|
3043
3043
|
const _ns_10 = _mod_10.bh;
|
|
3044
3044
|
const { resolveModelRecord } = _ns_10;
|
|
3045
3045
|
const resolved = await resolveModelRecord(modelName, {}, db);
|
|
@@ -3792,7 +3792,7 @@ class Model {
|
|
|
3792
3792
|
.limit(1);
|
|
3793
3793
|
if (modelRecords.length > 0) {
|
|
3794
3794
|
const modelId = modelRecords[0].id;
|
|
3795
|
-
const { detachModelRows } = await import('./detachRowsBeforeDelete-
|
|
3795
|
+
const { detachModelRows } = await import('./detachRowsBeforeDelete-D1TyEMco.js');
|
|
3796
3796
|
await detachModelRows(db, [typeof modelId === 'string' ? parseInt(modelId, 10) : modelId]);
|
|
3797
3797
|
await db.delete(modelSchemas).where(eq(modelSchemas.modelId, modelId));
|
|
3798
3798
|
await db
|
|
@@ -3803,7 +3803,7 @@ class Model {
|
|
|
3803
3803
|
}
|
|
3804
3804
|
if (schemaName && modelName) {
|
|
3805
3805
|
// Imported here, not at module load: Model and Schema import each other.
|
|
3806
|
-
const _mod_11 = await import('./Schema-
|
|
3806
|
+
const _mod_11 = await import('./Schema-O1QLoXv6.js');
|
|
3807
3807
|
const _ns_11 = _mod_11.b;
|
|
3808
3808
|
const { Schema } = _ns_11;
|
|
3809
3809
|
const schema = Schema.create(schemaName, { waitForReady: false });
|
|
@@ -3847,7 +3847,7 @@ class Model {
|
|
|
3847
3847
|
return undefined;
|
|
3848
3848
|
}
|
|
3849
3849
|
// Model names are only unique per schema: find this model's row by its id (schemaFileId).
|
|
3850
|
-
const _mod_12 = await import('./index-
|
|
3850
|
+
const _mod_12 = await import('./index-DpgQMIRq.js');
|
|
3851
3851
|
const _ns_12 = _mod_12.bh;
|
|
3852
3852
|
const { resolveModelRecord } = _ns_12;
|
|
3853
3853
|
const modelRecord = await resolveModelRecord(modelName, { modelFileId: context.id, schemaName: context.schemaName }, db);
|
|
@@ -4108,4 +4108,4 @@ var errors = /*#__PURE__*/Object.freeze({
|
|
|
4108
4108
|
});
|
|
4109
4109
|
|
|
4110
4110
|
export { ConflictError as C, ItemCreateValidationError as I, Model as M, TModelSchema as T, UnknownModelError as U, TModelValues as a, anyEvictionSince as b, currentEvictionEpoch as c, ItemCreateError as d, setupEntityLiveQuery as e, finishSchemaDestroy as f, getDraftSaveError as g, writeToDatabase$1 as h, isActorStopped as i, Model$1 as j, errors as k, recordSchemaDestroy as r, schemaEvictedSince as s, trackDraftSave as t, writeProcessMachine as w };
|
|
4111
|
-
//# sourceMappingURL=errors-
|
|
4111
|
+
//# sourceMappingURL=errors-KM-yq2MD.js.map
|