@seedprotocol/sdk 0.4.13 → 0.4.14
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/{ArweaveClient-Bot35vMf.js → ArweaveClient-D6E8xe3J.js} +3 -3
- package/dist/{ArweaveClient-Bot35vMf.js.map → ArweaveClient-D6E8xe3J.js.map} +1 -1
- package/dist/{ArweaveClient-C6mBPWwy.js → ArweaveClient-DElJwN08.js} +3 -3
- package/dist/{ArweaveClient-C6mBPWwy.js.map → ArweaveClient-DElJwN08.js.map} +1 -1
- package/dist/{Db-rlxROH4S.js → Db-DW1Un2jz.js} +3 -3
- package/dist/{Db-rlxROH4S.js.map → Db-DW1Un2jz.js.map} +1 -1
- package/dist/{Db-DP7ELP9S.js → Db-De4o7jww.js} +3 -3
- package/dist/{Db-DP7ELP9S.js.map → Db-De4o7jww.js.map} +1 -1
- package/dist/{EasClient-CHI9lBP8.js → EasClient-BpGDIkmb.js} +2 -2
- package/dist/{EasClient-CHI9lBP8.js.map → EasClient-BpGDIkmb.js.map} +1 -1
- package/dist/{EasClient-CszJzwqw.js → EasClient-DGY_mkrd.js} +2 -2
- package/dist/{EasClient-CszJzwqw.js.map → EasClient-DGY_mkrd.js.map} +1 -1
- package/dist/{FileManager-Dy3BbIxq.js → FileManager-Cw8mOIqZ.js} +2 -2
- package/dist/{FileManager-Dy3BbIxq.js.map → FileManager-Cw8mOIqZ.js.map} +1 -1
- package/dist/{FileManager-C7yOhPvS.js → FileManager-DrHQbmYj.js} +2 -2
- package/dist/{FileManager-C7yOhPvS.js.map → FileManager-DrHQbmYj.js.map} +1 -1
- package/dist/{ModelProperty--OQb3Dy0.js → ModelProperty-D8d25NtC.js} +17 -17
- package/dist/{ModelProperty--OQb3Dy0.js.map → ModelProperty-D8d25NtC.js.map} +1 -1
- package/dist/{PathResolver-D--w4fFE.js → PathResolver-BHj0UZTj.js} +2 -2
- package/dist/{PathResolver-D--w4fFE.js.map → PathResolver-BHj0UZTj.js.map} +1 -1
- package/dist/{PathResolver-BtnV9pXS.js → PathResolver-D1k3dZg5.js} +2 -2
- package/dist/{PathResolver-BtnV9pXS.js.map → PathResolver-D1k3dZg5.js.map} +1 -1
- package/dist/{QueryClient-Bia5wKCO.js → QueryClient-BCVom0BA.js} +2 -2
- package/dist/{QueryClient-Bia5wKCO.js.map → QueryClient-BCVom0BA.js.map} +1 -1
- package/dist/{QueryClient-BdNnK6Es.js → QueryClient-D4974vvo.js} +2 -2
- package/dist/{QueryClient-BdNnK6Es.js.map → QueryClient-D4974vvo.js.map} +1 -1
- package/dist/{Schema-DF4mLt86.js → Schema-CLlE7onI.js} +21 -21
- package/dist/{Schema-DF4mLt86.js.map → Schema-CLlE7onI.js.map} +1 -1
- package/dist/{SchemaValidationService-D4LwnnIB.js → SchemaValidationService-CwKY3QlY.js} +2 -2
- package/dist/{SchemaValidationService-D4LwnnIB.js.map → SchemaValidationService-CwKY3QlY.js.map} +1 -1
- package/dist/cjs/{ModelProperty-C5BRfISV.js → ModelProperty-CgQ3zR-u.js} +17 -17
- package/dist/cjs/{ModelProperty-C5BRfISV.js.map → ModelProperty-CgQ3zR-u.js.map} +1 -1
- package/dist/cjs/{Schema-DVJG8ISB.js → Schema-B0D7LgYb.js} +20 -20
- package/dist/cjs/{Schema-DVJG8ISB.js.map → Schema-B0D7LgYb.js.map} +1 -1
- package/dist/cjs/{SchemaValidationService-_wef0VX6.js → SchemaValidationService-DUIOUvC_.js} +2 -2
- package/dist/cjs/{SchemaValidationService-_wef0VX6.js.map → SchemaValidationService-DUIOUvC_.js.map} +1 -1
- package/dist/cjs/{getItem-CUGoglni.js → getItem-BP4BYB4Z.js} +2 -2
- package/dist/cjs/{getItem-CUGoglni.js.map → getItem-BP4BYB4Z.js.map} +1 -1
- package/dist/cjs/{getPublishPayload-CGl97AXX.js → getPublishPayload-B90BFd8m.js} +5 -5
- package/dist/cjs/{getPublishPayload-CGl97AXX.js.map → getPublishPayload-B90BFd8m.js.map} +1 -1
- package/dist/cjs/{getPublishUploads-BA5PdoJ3.js → getPublishUploads-D4DMfuOm.js} +3 -3
- package/dist/cjs/{getPublishUploads-BA5PdoJ3.js.map → getPublishUploads-D4DMfuOm.js.map} +1 -1
- package/dist/cjs/{getSegmentedItemProperties-D3iBFPeo.js → getSegmentedItemProperties-KdudlzXm.js} +2 -2
- package/dist/cjs/{getSegmentedItemProperties-D3iBFPeo.js.map → getSegmentedItemProperties-KdudlzXm.js.map} +1 -1
- package/dist/cjs/{index-CpBFvNId.js → index-BM8CSlnN.js} +2 -2
- package/dist/cjs/index-BM8CSlnN.js.map +1 -0
- package/dist/cjs/{index-B3K0jG2t.js → index-CUd7xS2i.js} +33 -30
- package/dist/cjs/index-CUd7xS2i.js.map +1 -0
- package/dist/cjs/{ownership-CkgGUliG.js → ownership-D3npAPnx.js} +2 -2
- package/dist/cjs/{ownership-CkgGUliG.js.map → ownership-D3npAPnx.js.map} +1 -1
- package/dist/{getItem-CbGS6wbp.js → getItem-B_IP-uNX.js} +2 -2
- package/dist/{getItem-CbGS6wbp.js.map → getItem-B_IP-uNX.js.map} +1 -1
- package/dist/{getPublishPayload-jUcwhhs1.js → getPublishPayload-BekDN5Ti.js} +5 -5
- package/dist/{getPublishPayload-jUcwhhs1.js.map → getPublishPayload-BekDN5Ti.js.map} +1 -1
- package/dist/{getPublishUploads-BAsUuLSM.js → getPublishUploads-DPk5RcAG.js} +3 -3
- package/dist/{getPublishUploads-BAsUuLSM.js.map → getPublishUploads-DPk5RcAG.js.map} +1 -1
- package/dist/{getSegmentedItemProperties-1QklOMkN.js → getSegmentedItemProperties-DfQNbOpb.js} +2 -2
- package/dist/{getSegmentedItemProperties-1QklOMkN.js.map → getSegmentedItemProperties-DfQNbOpb.js.map} +1 -1
- package/dist/{index-CjAALVQh.js → index-DbmqfO-Q.js} +2 -2
- package/dist/index-DbmqfO-Q.js.map +1 -0
- package/dist/{index-BUFvepcD.js → index-Dh_gxItx.js} +47 -44
- package/dist/index-Dh_gxItx.js.map +1 -0
- package/dist/{index-BnBV-CWp.js → index-XBnjc_SF.js} +3 -3
- package/dist/index-XBnjc_SF.js.map +1 -0
- package/dist/main.cjs +1 -1
- package/dist/main.js +11 -11
- package/dist/node.js +10 -10
- package/dist/{ownership-CeuRaVwP.js → ownership-CEv7BhIh.js} +2 -2
- package/dist/{ownership-CeuRaVwP.js.map → ownership-CEv7BhIh.js.map} +1 -1
- package/dist/{property-BiZvboSH.js → property-CppuVi-i.js} +4 -4
- package/dist/{property-BiZvboSH.js.map → property-CppuVi-i.js.map} +1 -1
- package/dist/{queries-B2xdenwS.js → queries-B1vaglQW.js} +2 -2
- package/dist/{queries-B2xdenwS.js.map → queries-B1vaglQW.js.map} +1 -1
- package/dist/src/browser/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/QueryClient/BaseQueryClient.d.ts.map +1 -1
- package/dist/src/vite/index.d.ts.map +1 -1
- package/dist/vite.cjs +129 -1
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.js +128 -1
- package/dist/vite.js.map +1 -1
- package/package.json +5 -3
- package/dist/cjs/index-B3K0jG2t.js.map +0 -1
- package/dist/cjs/index-CpBFvNId.js.map +0 -1
- package/dist/index-BUFvepcD.js.map +0 -1
- package/dist/index-BnBV-CWp.js.map +0 -1
- package/dist/index-CjAALVQh.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSegmentedItemProperties-
|
|
1
|
+
{"version":3,"file":"getSegmentedItemProperties-KdudlzXm.js","sources":["../../../src/helpers/getSegmentedItemProperties.ts"],"sourcesContent":["import { UploadProperty } from '@/db/read/getPublishUploads'\nimport { IItem } from '@/interfaces'\nimport { ModelPropertyDataTypes } from '@/Schema'\n\nexport const getSegmentedItemProperties = (item: IItem<any>) => {\n const itemBasicProperties = []\n const itemRelationProperties = []\n const itemListProperties = []\n const itemUploadProperties: UploadProperty[] = []\n const itemImageProperties = []\n const itemStorageProperties = []\n let itemStorageTransactionProperty: UploadProperty | undefined\n\n for (const itemProperty of item.properties) {\n if (!itemProperty.propertyDef) {\n continue\n }\n\n const isItemStorage =\n itemProperty.propertyDef.storageType &&\n itemProperty.propertyDef.storageType === 'ItemStorage'\n\n\n const isStorageTransaction =\n itemProperty.propertyName === 'storageTransactionId'\n\n const isStorageSeedType =\n itemProperty.propertyDef.dataType === ModelPropertyDataTypes.Image ||\n itemProperty.propertyDef.dataType === ModelPropertyDataTypes.File ||\n itemProperty.propertyDef.dataType === ModelPropertyDataTypes.Html\n\n if (isStorageSeedType) {\n itemImageProperties.push(itemProperty)\n continue\n }\n\n if (itemProperty.propertyDef.dataType === ModelPropertyDataTypes.Relation) {\n itemRelationProperties.push(itemProperty)\n continue\n }\n\n if (itemProperty.propertyDef.dataType === ModelPropertyDataTypes.List) {\n // List-of-relations: ref present, goes to processListProperty\n // List-of-primitives: ref absent, treat as basic property\n if (itemProperty.propertyDef.ref) {\n itemListProperties.push(itemProperty)\n } else {\n itemBasicProperties.push(itemProperty)\n }\n continue\n }\n\n if (isItemStorage) {\n itemStorageProperties.push(itemProperty)\n continue\n }\n\n if (isStorageTransaction) {\n itemStorageTransactionProperty = { itemProperty, childProperties: [] }\n continue\n }\n\n itemBasicProperties.push(itemProperty)\n }\n\n if (itemStorageTransactionProperty && itemStorageProperties.length > 0) {\n itemStorageTransactionProperty.childProperties = itemStorageProperties\n }\n\n if (itemStorageTransactionProperty) {\n itemUploadProperties.push(itemStorageTransactionProperty)\n }\n\n return {\n itemBasicProperties,\n itemRelationProperties,\n itemListProperties,\n itemUploadProperties,\n itemImageProperties,\n }\n}\n"],"names":["ModelPropertyDataTypes"],"mappings":";;;;;;;AAIO,MAAM,0BAA0B,GAAG,CAAC,IAAgB,KAAI;IAC7D,MAAM,mBAAmB,GAAG,EAAE;IAC9B,MAAM,sBAAsB,GAAG,EAAE;IACjC,MAAM,kBAAkB,GAAG,EAAE;IAC7B,MAAM,oBAAoB,GAAqB,EAAE;IACjD,MAAM,mBAAmB,GAAG,EAAE;IAC9B,MAAM,qBAAqB,GAAG,EAAE;AAChC,IAAA,IAAI,8BAA0D;AAE9D,IAAA,KAAK,MAAM,YAAY,IAAI,IAAI,CAAC,UAAU,EAAE;AAC1C,QAAA,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE;YAC7B;QACF;AAEA,QAAA,MAAM,aAAa,GACjB,YAAY,CAAC,WAAW,CAAC,WAAW;AACpC,YAAA,YAAY,CAAC,WAAW,CAAC,WAAW,KAAK,aAAa;AAGxD,QAAA,MAAM,oBAAoB,GACxB,YAAY,CAAC,YAAY,KAAK,sBAAsB;QAEtD,MAAM,iBAAiB,GACrB,YAAY,CAAC,WAAW,CAAC,QAAQ,KAAKA,+BAAsB,CAAC,KAAK;AAClE,YAAA,YAAY,CAAC,WAAW,CAAC,QAAQ,KAAKA,+BAAsB,CAAC,IAAI;YACjE,YAAY,CAAC,WAAW,CAAC,QAAQ,KAAKA,+BAAsB,CAAC,IAAI;QAEnE,IAAI,iBAAiB,EAAE;AACrB,YAAA,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC;YACtC;QACF;QAEA,IAAI,YAAY,CAAC,WAAW,CAAC,QAAQ,KAAKA,+BAAsB,CAAC,QAAQ,EAAE;AACzE,YAAA,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC;YACzC;QACF;QAEA,IAAI,YAAY,CAAC,WAAW,CAAC,QAAQ,KAAKA,+BAAsB,CAAC,IAAI,EAAE;;;AAGrE,YAAA,IAAI,YAAY,CAAC,WAAW,CAAC,GAAG,EAAE;AAChC,gBAAA,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC;YACvC;iBAAO;AACL,gBAAA,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC;YACxC;YACA;QACF;QAEA,IAAI,aAAa,EAAE;AACjB,YAAA,qBAAqB,CAAC,IAAI,CAAC,YAAY,CAAC;YACxC;QACF;QAEA,IAAI,oBAAoB,EAAE;YACxB,8BAA8B,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,EAAE,EAAE;YACtE;QACF;AAEA,QAAA,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC;IACxC;IAEA,IAAI,8BAA8B,IAAI,qBAAqB,CAAC,MAAM,GAAG,CAAC,EAAE;AACtE,QAAA,8BAA8B,CAAC,eAAe,GAAG,qBAAqB;IACxE;IAEA,IAAI,8BAA8B,EAAE;AAClC,QAAA,oBAAoB,CAAC,IAAI,CAAC,8BAA8B,CAAC;IAC3D;IAEA,OAAO;QACL,mBAAmB;QACnB,sBAAsB;QACtB,kBAAkB;QAClB,oBAAoB;QACpB,mBAAmB;KACpB;AACH;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('reflect-metadata');
|
|
4
|
-
var main_cjs = require('./index-
|
|
4
|
+
var main_cjs = require('./index-CUd7xS2i.js');
|
|
5
5
|
require('pluralize');
|
|
6
6
|
require('drizzle-orm');
|
|
7
7
|
require('immer');
|
|
@@ -55,4 +55,4 @@ exports.TStorageType = main_cjs.TStorageType;
|
|
|
55
55
|
exports.TValidationRules = main_cjs.TValidationRules;
|
|
56
56
|
exports.Text = main_cjs.Text;
|
|
57
57
|
exports.normalizeDataType = main_cjs.normalizeDataType;
|
|
58
|
-
//# sourceMappingURL=index-
|
|
58
|
+
//# sourceMappingURL=index-BM8CSlnN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BM8CSlnN.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -563,6 +563,9 @@ class BaseQueryClient {
|
|
|
563
563
|
this.PlatformClass = platformClass;
|
|
564
564
|
}
|
|
565
565
|
static getQueryClient() {
|
|
566
|
+
if (!this.PlatformClass) {
|
|
567
|
+
throw new Error('QueryClient PlatformClass has not been set. Ensure the platform-specific QueryClient is initialized before use. For Node.js, import from @seedprotocol/sdk/node. For browser, the SDK should auto-initialize via platformClassesInit().');
|
|
568
|
+
}
|
|
566
569
|
return this.PlatformClass.getQueryClient();
|
|
567
570
|
}
|
|
568
571
|
}
|
|
@@ -807,7 +810,7 @@ const createPropertyInstances = async (propertyFileIds) => {
|
|
|
807
810
|
return;
|
|
808
811
|
}
|
|
809
812
|
try {
|
|
810
|
-
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-
|
|
813
|
+
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-CgQ3zR-u.js'); });
|
|
811
814
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
812
815
|
if (!ModelProperty) {
|
|
813
816
|
logger$x('createPropertyInstances: ModelProperty not available from dynamic import');
|
|
@@ -991,7 +994,7 @@ const loadOrCreateModel = xstate.fromCallback(({ sendBack, input: { context } })
|
|
|
991
994
|
// Step 2: Fallback to Schema context (only if database doesn't have the model)
|
|
992
995
|
// This handles the case where model exists in schema file but not yet in database
|
|
993
996
|
try {
|
|
994
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
997
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B0D7LgYb.js'); });
|
|
995
998
|
const { Schema } = schemaMod;
|
|
996
999
|
const schema = Schema.create(schemaName, { waitForReady: false });
|
|
997
1000
|
const schemaSnapshot = schema.getService().getSnapshot();
|
|
@@ -1235,7 +1238,7 @@ const loadOrCreateModel = xstate.fromCallback(({ sendBack, input: { context } })
|
|
|
1235
1238
|
}
|
|
1236
1239
|
// Mark schema as draft when a new model is created so saveNewVersion() can persist it
|
|
1237
1240
|
try {
|
|
1238
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
1241
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B0D7LgYb.js'); });
|
|
1239
1242
|
const { Schema } = schemaMod;
|
|
1240
1243
|
const schema = Schema.create(schemaName, { waitForReady: false });
|
|
1241
1244
|
schema.getService().send({ type: 'markAsDraft', propertyKey: 'schema:models' });
|
|
@@ -1279,10 +1282,10 @@ const validateModel = xstate.fromCallback(({ sendBack, input: { context } }) =>
|
|
|
1279
1282
|
const _validateModel = async () => {
|
|
1280
1283
|
try {
|
|
1281
1284
|
// Use dynamic imports to break circular dependencies
|
|
1282
|
-
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-
|
|
1285
|
+
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-DUIOUvC_.js'); });
|
|
1283
1286
|
const { SchemaValidationService } = validationServiceMod;
|
|
1284
1287
|
const validationService = new SchemaValidationService();
|
|
1285
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
1288
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B0D7LgYb.js'); });
|
|
1286
1289
|
const { Schema } = schemaMod;
|
|
1287
1290
|
// Validate model structure
|
|
1288
1291
|
const structureResult = validationService.validateModelStructure(context);
|
|
@@ -1392,7 +1395,7 @@ const createModelProperties = xstate.fromCallback(({ sendBack, input }) => {
|
|
|
1392
1395
|
return;
|
|
1393
1396
|
}
|
|
1394
1397
|
logger$v(`Creating ${Object.keys(propertyDefinitions).length} properties for model "${modelName}" (id: ${_dbId})`);
|
|
1395
|
-
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-
|
|
1398
|
+
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-CgQ3zR-u.js'); });
|
|
1396
1399
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
1397
1400
|
if (!ModelProperty) {
|
|
1398
1401
|
logger$v('ModelProperty not available from dynamic import');
|
|
@@ -1495,7 +1498,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
|
|
|
1495
1498
|
const structureMsg = `[validateEntity] Validating model structure`;
|
|
1496
1499
|
logger$u(structureMsg);
|
|
1497
1500
|
// Use existing Model validation
|
|
1498
|
-
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-
|
|
1501
|
+
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-DUIOUvC_.js'); });
|
|
1499
1502
|
const { SchemaValidationService } = validationServiceMod;
|
|
1500
1503
|
const validationService = new SchemaValidationService();
|
|
1501
1504
|
// Validate model structure
|
|
@@ -1513,7 +1516,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
|
|
|
1513
1516
|
if (entityInput.entityData.schemaName) {
|
|
1514
1517
|
try {
|
|
1515
1518
|
logger$u(`[validateEntity] Validating model against schema "${entityInput.entityData.schemaName}"`);
|
|
1516
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
1519
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B0D7LgYb.js'); });
|
|
1517
1520
|
const { Schema } = schemaMod;
|
|
1518
1521
|
const schema = Schema.create(entityInput.entityData.schemaName, {
|
|
1519
1522
|
waitForReady: false,
|
|
@@ -1549,7 +1552,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
|
|
|
1549
1552
|
}
|
|
1550
1553
|
else if (entityInput.entityType === 'modelProperty') {
|
|
1551
1554
|
// Use existing ModelProperty validation
|
|
1552
|
-
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-
|
|
1555
|
+
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-DUIOUvC_.js'); });
|
|
1553
1556
|
const { SchemaValidationService } = validationServiceMod;
|
|
1554
1557
|
const validationService = new SchemaValidationService();
|
|
1555
1558
|
// Validate property structure
|
|
@@ -1564,7 +1567,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
|
|
|
1564
1567
|
// If schema name and model name provided, validate against schema
|
|
1565
1568
|
if (entityInput.entityData._schemaName && entityInput.entityData.modelName) {
|
|
1566
1569
|
try {
|
|
1567
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-
|
|
1570
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B0D7LgYb.js'); });
|
|
1568
1571
|
const { Schema } = schemaMod;
|
|
1569
1572
|
const schema = Schema.create(entityInput.entityData._schemaName, {
|
|
1570
1573
|
waitForReady: false,
|
|
@@ -1593,7 +1596,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
|
|
|
1593
1596
|
}
|
|
1594
1597
|
else if (entityInput.entityType === 'schema') {
|
|
1595
1598
|
// Schema validation - use existing validation
|
|
1596
|
-
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-
|
|
1599
|
+
const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-DUIOUvC_.js'); });
|
|
1597
1600
|
const { SchemaValidationService } = validationServiceMod;
|
|
1598
1601
|
const validationService = new SchemaValidationService();
|
|
1599
1602
|
const schemaResult = validationService.validateSchema(entityInput.entityData);
|
|
@@ -2230,7 +2233,7 @@ async function checkIfPropertyIsEdited(modelName, propertyName, schemaFileValue)
|
|
|
2230
2233
|
const cacheKey = `${modelName}:${propertyName}`;
|
|
2231
2234
|
// First, check the in-memory cache (for current session edits)
|
|
2232
2235
|
// Robust dynamic import for consumer re-bundling (named or default export)
|
|
2233
|
-
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-
|
|
2236
|
+
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-CgQ3zR-u.js'); });
|
|
2234
2237
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
2235
2238
|
if (!ModelProperty) {
|
|
2236
2239
|
logger$t('ModelProperty not available from dynamic import');
|
|
@@ -3538,7 +3541,7 @@ const writeToDatabase = xstate.fromCallback(({ sendBack, input }) => {
|
|
|
3538
3541
|
// initial write completes is not overwritten by the stale requestWrite payload.
|
|
3539
3542
|
let dataToWrite = input.entityData;
|
|
3540
3543
|
try {
|
|
3541
|
-
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-
|
|
3544
|
+
const mod = await Promise.resolve().then(function () { return require('./ModelProperty-CgQ3zR-u.js'); });
|
|
3542
3545
|
const ModelProperty = mod?.ModelProperty ?? mod?.default;
|
|
3543
3546
|
if (ModelProperty && typeof ModelProperty.getById === 'function') {
|
|
3544
3547
|
const instance = ModelProperty.getById(input.entityId);
|
|
@@ -3918,7 +3921,7 @@ const modelMachine = xstate.setup({
|
|
|
3918
3921
|
// Create ModelProperty instances for any new property IDs
|
|
3919
3922
|
if (Array.isArray(newPropertyIds) && newPropertyIds.length > 0) {
|
|
3920
3923
|
// Import and create instances asynchronously (fire-and-forget)
|
|
3921
|
-
Promise.resolve().then(function () { return require('./ModelProperty-
|
|
3924
|
+
Promise.resolve().then(function () { return require('./ModelProperty-CgQ3zR-u.js'); }).then(({ ModelProperty }) => {
|
|
3922
3925
|
const createPromises = newPropertyIds.map(async (propertyFileId) => {
|
|
3923
3926
|
try {
|
|
3924
3927
|
const property = await ModelProperty.createById(propertyFileId);
|
|
@@ -5378,9 +5381,9 @@ const runPublish = xstate.fromCallback(({ sendBack, input: { context } }) => {
|
|
|
5378
5381
|
sendBack({ type: 'publishError', error: new Error(`Item not found for seedLocalId: ${seedLocalId}`) });
|
|
5379
5382
|
return;
|
|
5380
5383
|
}
|
|
5381
|
-
const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-
|
|
5384
|
+
const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-D4DMfuOm.js'); });
|
|
5382
5385
|
const { getPublishUploads } = getPublishUploadsMod;
|
|
5383
|
-
const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-
|
|
5386
|
+
const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-B90BFd8m.js'); });
|
|
5384
5387
|
const { getPublishPayload } = getPublishPayloadMod;
|
|
5385
5388
|
const uploads = await getPublishUploads(item);
|
|
5386
5389
|
let uploadedTransactions = [];
|
|
@@ -6139,7 +6142,7 @@ const resolveRelatedValue = xstate.fromCallback(({ sendBack, input: { context }
|
|
|
6139
6142
|
const { isRelation, propertyValue, propertyName, seedUid, propertyRecordSchema, populatedFromDb, schemaUid, } = context;
|
|
6140
6143
|
const _resolveRelatedValue = async () => {
|
|
6141
6144
|
// Use dynamic import to break circular dependency
|
|
6142
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
6145
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./index-BM8CSlnN.js'); });
|
|
6143
6146
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
6144
6147
|
if (!propertyValue || !isRelation || populatedFromDb) {
|
|
6145
6148
|
return;
|
|
@@ -6479,7 +6482,7 @@ const hydrateFromDb = xstate.fromCallback(({ sendBack, input: { context } }) =>
|
|
|
6479
6482
|
// to use dynamically imported ModelPropertyDataTypes
|
|
6480
6483
|
const _hydrateFromDb = async () => {
|
|
6481
6484
|
// Use dynamic import to break circular dependency
|
|
6482
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
6485
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./index-BM8CSlnN.js'); });
|
|
6483
6486
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
6484
6487
|
const appDb = BaseDb.getAppDb();
|
|
6485
6488
|
const whereClauses = [];
|
|
@@ -6989,7 +6992,7 @@ const analyzeInput = xstate.fromCallback(({ sendBack, input: { context, event }
|
|
|
6989
6992
|
}
|
|
6990
6993
|
const _analyzeInput = async () => {
|
|
6991
6994
|
// Use dynamic import to break circular dependency
|
|
6992
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
6995
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./index-BM8CSlnN.js'); });
|
|
6993
6996
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
6994
6997
|
let propertyName = propertyNameRaw;
|
|
6995
6998
|
if (!propertyName) {
|
|
@@ -7633,7 +7636,7 @@ const saveRelation = xstate.fromCallback(({ sendBack, input: { context, event }
|
|
|
7633
7636
|
}
|
|
7634
7637
|
const _saveRelation = async () => {
|
|
7635
7638
|
// Use dynamic import to break circular dependency
|
|
7636
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
7639
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./index-BM8CSlnN.js'); });
|
|
7637
7640
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
7638
7641
|
if (!propertyNameRaw) {
|
|
7639
7642
|
throw new Error('propertyName is required');
|
|
@@ -8497,7 +8500,7 @@ class ItemProperty {
|
|
|
8497
8500
|
return;
|
|
8498
8501
|
}
|
|
8499
8502
|
// Use dynamic import to break circular dependency
|
|
8500
|
-
const schemaMod = await Promise.resolve().then(function () { return require('./index-
|
|
8503
|
+
const schemaMod = await Promise.resolve().then(function () { return require('./index-BM8CSlnN.js'); });
|
|
8501
8504
|
const { ModelPropertyDataTypes } = schemaMod;
|
|
8502
8505
|
const { context } = snapshot;
|
|
8503
8506
|
const { propertyRecordSchema } = context;
|
|
@@ -9183,7 +9186,7 @@ class ItemProperty {
|
|
|
9183
9186
|
}
|
|
9184
9187
|
async save() {
|
|
9185
9188
|
const ctx = this._getSnapshotContext();
|
|
9186
|
-
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-
|
|
9189
|
+
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-D3npAPnx.js'); });
|
|
9187
9190
|
await assertItemOwned({
|
|
9188
9191
|
seedLocalId: ctx?.seedLocalId ?? undefined,
|
|
9189
9192
|
seedUid: ctx?.seedUid ?? undefined,
|
|
@@ -9503,7 +9506,7 @@ class Item {
|
|
|
9503
9506
|
});
|
|
9504
9507
|
};
|
|
9505
9508
|
this.publish = async () => {
|
|
9506
|
-
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-
|
|
9509
|
+
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-D3npAPnx.js'); });
|
|
9507
9510
|
await assertItemOwned(this);
|
|
9508
9511
|
this._service.send({ type: 'startPublish' });
|
|
9509
9512
|
return new Promise((resolve, reject) => {
|
|
@@ -9539,13 +9542,13 @@ class Item {
|
|
|
9539
9542
|
};
|
|
9540
9543
|
this.getPublishUploads = async () => {
|
|
9541
9544
|
// Use dynamic import to break circular dependency
|
|
9542
|
-
const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-
|
|
9545
|
+
const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-D4DMfuOm.js'); });
|
|
9543
9546
|
const { getPublishUploads } = getPublishUploadsMod;
|
|
9544
9547
|
return await getPublishUploads(this);
|
|
9545
9548
|
};
|
|
9546
9549
|
this.getPublishPayload = async (uploadedTransactions) => {
|
|
9547
9550
|
// Use dynamic import to break circular dependency
|
|
9548
|
-
const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-
|
|
9551
|
+
const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-B90BFd8m.js'); });
|
|
9549
9552
|
const { getPublishPayload } = getPublishPayloadMod;
|
|
9550
9553
|
return await getPublishPayload(this, uploadedTransactions);
|
|
9551
9554
|
};
|
|
@@ -10667,7 +10670,7 @@ class Item {
|
|
|
10667
10670
|
* Destroy the item: soft delete in DB, remove from caches, clean up subscriptions, stop service.
|
|
10668
10671
|
*/
|
|
10669
10672
|
async destroy() {
|
|
10670
|
-
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-
|
|
10673
|
+
const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-D3npAPnx.js'); });
|
|
10671
10674
|
await assertItemOwned(this);
|
|
10672
10675
|
const context = this._getSnapshotContext();
|
|
10673
10676
|
const cacheKey = context.seedUid || context.seedLocalId;
|
|
@@ -14496,7 +14499,7 @@ const saveDraftLogger = debug('seedSdk:model:saveDraftToDb');
|
|
|
14496
14499
|
// Lazy import cache for ModelProperty to avoid circular dependency
|
|
14497
14500
|
// Eagerly start loading to minimize delay on first access
|
|
14498
14501
|
let ModelPropertyClass = null;
|
|
14499
|
-
const modelPropertyImportPromise = Promise.resolve().then(function () { return require('./ModelProperty-
|
|
14502
|
+
const modelPropertyImportPromise = Promise.resolve().then(function () { return require('./ModelProperty-CgQ3zR-u.js'); })
|
|
14500
14503
|
.then(module => {
|
|
14501
14504
|
ModelPropertyClass = module.ModelProperty;
|
|
14502
14505
|
return ModelPropertyClass;
|
|
@@ -14513,7 +14516,7 @@ function getModelProperty() {
|
|
|
14513
14516
|
}
|
|
14514
14517
|
// Lazy import cache for Schema to avoid circular dependency
|
|
14515
14518
|
let SchemaClass = null;
|
|
14516
|
-
const schemaImportPromise = Promise.resolve().then(function () { return require('./Schema-
|
|
14519
|
+
const schemaImportPromise = Promise.resolve().then(function () { return require('./Schema-B0D7LgYb.js'); })
|
|
14517
14520
|
.then(module => {
|
|
14518
14521
|
SchemaClass = module.Schema;
|
|
14519
14522
|
return SchemaClass;
|
|
@@ -17109,7 +17112,7 @@ const getTsImport = async (filePath) => {
|
|
|
17109
17112
|
|
|
17110
17113
|
// Get the directory of this file to resolve relative paths
|
|
17111
17114
|
// @ts-ignore - rollup plugin-typescript doesn't recognize import.meta with module: "preserve"
|
|
17112
|
-
const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cjs/index-
|
|
17115
|
+
const __filename$1 = url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('cjs/index-CUd7xS2i.js', document.baseURI).href)));
|
|
17113
17116
|
path.dirname(__filename$1);
|
|
17114
17117
|
const commandExists = (command) => {
|
|
17115
17118
|
try {
|
|
@@ -17665,4 +17668,4 @@ exports.versions = versions;
|
|
|
17665
17668
|
exports.waitForEntityIdle = waitForEntityIdle;
|
|
17666
17669
|
exports.withSeed = withSeed;
|
|
17667
17670
|
exports.writeProcessMachine = writeProcessMachine;
|
|
17668
|
-
//# sourceMappingURL=index-
|
|
17671
|
+
//# sourceMappingURL=index-CUd7xS2i.js.map
|