@seedprotocol/sdk 0.4.10 → 0.4.11

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.
Files changed (88) hide show
  1. package/dist/{ArweaveClient-sN5h2FvY.js → ArweaveClient-CwXE3NCK.js} +3 -3
  2. package/dist/{ArweaveClient-sN5h2FvY.js.map → ArweaveClient-CwXE3NCK.js.map} +1 -1
  3. package/dist/{ArweaveClient-DFqnm5Kj.js → ArweaveClient-DyhvHiIT.js} +3 -3
  4. package/dist/{ArweaveClient-DFqnm5Kj.js.map → ArweaveClient-DyhvHiIT.js.map} +1 -1
  5. package/dist/{Db-DIythELU.js → Db-Dr6gWq8d.js} +3 -3
  6. package/dist/{Db-DIythELU.js.map → Db-Dr6gWq8d.js.map} +1 -1
  7. package/dist/{Db-Dz17KxVs.js → Db-mH9nSDfI.js} +3 -3
  8. package/dist/{Db-Dz17KxVs.js.map → Db-mH9nSDfI.js.map} +1 -1
  9. package/dist/{EasClient-BadfcFDk.js → EasClient-Yh-t7zEA.js} +2 -2
  10. package/dist/{EasClient-DosbWaZN.js.map → EasClient-Yh-t7zEA.js.map} +1 -1
  11. package/dist/{EasClient-DosbWaZN.js → EasClient-aggdMFrc.js} +2 -2
  12. package/dist/{EasClient-BadfcFDk.js.map → EasClient-aggdMFrc.js.map} +1 -1
  13. package/dist/{FileManager-Wthr5yHO.js → FileManager-ClU_rIR0.js} +2 -2
  14. package/dist/{FileManager-Wthr5yHO.js.map → FileManager-ClU_rIR0.js.map} +1 -1
  15. package/dist/{FileManager-BHuVNWT3.js → FileManager-Dl2DD4Uc.js} +2 -2
  16. package/dist/{FileManager-BHuVNWT3.js.map → FileManager-Dl2DD4Uc.js.map} +1 -1
  17. package/dist/{ModelProperty-B9Z2DRxI.js → ModelProperty-gBmew8gY.js} +94 -18
  18. package/dist/ModelProperty-gBmew8gY.js.map +1 -0
  19. package/dist/{PathResolver-NEpTSgQK.js → PathResolver-CILJPhz1.js} +2 -2
  20. package/dist/{PathResolver-NEpTSgQK.js.map → PathResolver-CILJPhz1.js.map} +1 -1
  21. package/dist/{PathResolver-Cd1PZDLG.js → PathResolver-CfA_D3wa.js} +2 -2
  22. package/dist/{PathResolver-Cd1PZDLG.js.map → PathResolver-CfA_D3wa.js.map} +1 -1
  23. package/dist/{QueryClient-C9U8oZUe.js → QueryClient-BdpWYoxo.js} +2 -2
  24. package/dist/{QueryClient-C9U8oZUe.js.map → QueryClient-BdpWYoxo.js.map} +1 -1
  25. package/dist/{QueryClient-ndmA8MYL.js → QueryClient-Dl_P8u5s.js} +2 -2
  26. package/dist/{QueryClient-ndmA8MYL.js.map → QueryClient-Dl_P8u5s.js.map} +1 -1
  27. package/dist/{Schema-D1-HjT8z.js → Schema-B-vCLIuU.js} +21 -21
  28. package/dist/{Schema-D1-HjT8z.js.map → Schema-B-vCLIuU.js.map} +1 -1
  29. package/dist/{SchemaValidationService-CIXKzSpb.js → SchemaValidationService-C_iTQIjR.js} +2 -2
  30. package/dist/{SchemaValidationService-CIXKzSpb.js.map → SchemaValidationService-C_iTQIjR.js.map} +1 -1
  31. package/dist/cjs/{ModelProperty-09hNvSBl.js → ModelProperty-DcAM5M8T.js} +94 -18
  32. package/dist/cjs/ModelProperty-DcAM5M8T.js.map +1 -0
  33. package/dist/cjs/{Schema-BcwvUABB.js → Schema-B6ifYEhD.js} +20 -20
  34. package/dist/cjs/{Schema-BcwvUABB.js.map → Schema-B6ifYEhD.js.map} +1 -1
  35. package/dist/cjs/{SchemaValidationService-zty4nfCu.js → SchemaValidationService-OFyzZIUX.js} +2 -2
  36. package/dist/cjs/{SchemaValidationService-zty4nfCu.js.map → SchemaValidationService-OFyzZIUX.js.map} +1 -1
  37. package/dist/cjs/{getItem-Dlb5YSQn.js → getItem-CAYQYTpg.js} +2 -2
  38. package/dist/cjs/{getItem-Dlb5YSQn.js.map → getItem-CAYQYTpg.js.map} +1 -1
  39. package/dist/cjs/{getPublishPayload-BqL06sEI.js → getPublishPayload-CBuGIazw.js} +5 -5
  40. package/dist/cjs/{getPublishPayload-BqL06sEI.js.map → getPublishPayload-CBuGIazw.js.map} +1 -1
  41. package/dist/cjs/{getPublishUploads-oukGI2N6.js → getPublishUploads-B7bB1OGg.js} +3 -3
  42. package/dist/cjs/{getPublishUploads-oukGI2N6.js.map → getPublishUploads-B7bB1OGg.js.map} +1 -1
  43. package/dist/cjs/{getSegmentedItemProperties-JT984OOp.js → getSegmentedItemProperties-MVZ-0mQG.js} +2 -2
  44. package/dist/cjs/{getSegmentedItemProperties-JT984OOp.js.map → getSegmentedItemProperties-MVZ-0mQG.js.map} +1 -1
  45. package/dist/cjs/{index-jubgGeM2.js → index-6P4MEsbO.js} +2 -2
  46. package/dist/cjs/index-6P4MEsbO.js.map +1 -0
  47. package/dist/cjs/{index-BLETlVgA.js → index-CA4i5TA7.js} +105 -46
  48. package/dist/cjs/index-CA4i5TA7.js.map +1 -0
  49. package/dist/cjs/{ownership-vfvyz3KJ.js → ownership-5TQ-v2CF.js} +2 -2
  50. package/dist/cjs/{ownership-vfvyz3KJ.js.map → ownership-5TQ-v2CF.js.map} +1 -1
  51. package/dist/{getItem-f9rNUz7I.js → getItem-xpxRXqHI.js} +2 -2
  52. package/dist/{getItem-f9rNUz7I.js.map → getItem-xpxRXqHI.js.map} +1 -1
  53. package/dist/{getPublishPayload-BBI_j9I2.js → getPublishPayload-CBeCMSeQ.js} +5 -5
  54. package/dist/{getPublishPayload-BBI_j9I2.js.map → getPublishPayload-CBeCMSeQ.js.map} +1 -1
  55. package/dist/{getPublishUploads-BFM94w5S.js → getPublishUploads-NITxWWDD.js} +3 -3
  56. package/dist/{getPublishUploads-BFM94w5S.js.map → getPublishUploads-NITxWWDD.js.map} +1 -1
  57. package/dist/{getSegmentedItemProperties-Di9vevKz.js → getSegmentedItemProperties-CYzNtJxH.js} +2 -2
  58. package/dist/{getSegmentedItemProperties-Di9vevKz.js.map → getSegmentedItemProperties-CYzNtJxH.js.map} +1 -1
  59. package/dist/{index-CSAVWKeA.js → index-BC0xKxkf.js} +3 -3
  60. package/dist/index-BC0xKxkf.js.map +1 -0
  61. package/dist/{index-j8WN8W6V.js → index-B_apqB1Q.js} +120 -61
  62. package/dist/index-B_apqB1Q.js.map +1 -0
  63. package/dist/{index-ajj6SHkh.js → index-CcXvJ2H7.js} +2 -2
  64. package/dist/index-CcXvJ2H7.js.map +1 -0
  65. package/dist/main.cjs +1 -1
  66. package/dist/main.js +11 -11
  67. package/dist/node.js +10 -10
  68. package/dist/{ownership-DLNI17NE.js → ownership-C7Afj3yr.js} +2 -2
  69. package/dist/{ownership-DLNI17NE.js.map → ownership-C7Afj3yr.js.map} +1 -1
  70. package/dist/{property-C6qoOzLG.js → property-C2gviIFJ.js} +4 -4
  71. package/dist/{property-C6qoOzLG.js.map → property-C2gviIFJ.js.map} +1 -1
  72. package/dist/{queries-jMaUn86w.js → queries-BFzkFn4Y.js} +2 -2
  73. package/dist/{queries-jMaUn86w.js.map → queries-BFzkFn4Y.js.map} +1 -1
  74. package/dist/src/ModelProperty/ModelProperty.d.ts +5 -0
  75. package/dist/src/ModelProperty/ModelProperty.d.ts.map +1 -1
  76. package/dist/src/ModelProperty/service/actors/compareAndMarkDraft.d.ts.map +1 -1
  77. package/dist/src/ModelProperty/service/actors/validateProperty.d.ts.map +1 -1
  78. package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts.map +1 -1
  79. package/dist/src/helpers/db.d.ts.map +1 -1
  80. package/dist/src/services/write/actors/writeToDatabase.d.ts.map +1 -1
  81. package/package.json +1 -1
  82. package/dist/ModelProperty-B9Z2DRxI.js.map +0 -1
  83. package/dist/cjs/ModelProperty-09hNvSBl.js.map +0 -1
  84. package/dist/cjs/index-BLETlVgA.js.map +0 -1
  85. package/dist/cjs/index-jubgGeM2.js.map +0 -1
  86. package/dist/index-CSAVWKeA.js.map +0 -1
  87. package/dist/index-ajj6SHkh.js.map +0 -1
  88. package/dist/index-j8WN8W6V.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"getSegmentedItemProperties-JT984OOp.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
+ {"version":3,"file":"getSegmentedItemProperties-MVZ-0mQG.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-BLETlVgA.js');
4
+ var main_cjs = require('./index-CA4i5TA7.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-jubgGeM2.js.map
58
+ //# sourceMappingURL=index-6P4MEsbO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-6P4MEsbO.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -807,7 +807,7 @@ const createPropertyInstances = async (propertyFileIds) => {
807
807
  return;
808
808
  }
809
809
  try {
810
- const mod = await Promise.resolve().then(function () { return require('./ModelProperty-09hNvSBl.js'); });
810
+ const mod = await Promise.resolve().then(function () { return require('./ModelProperty-DcAM5M8T.js'); });
811
811
  const ModelProperty = mod?.ModelProperty ?? mod?.default;
812
812
  if (!ModelProperty) {
813
813
  logger$x('createPropertyInstances: ModelProperty not available from dynamic import');
@@ -991,7 +991,7 @@ const loadOrCreateModel = xstate.fromCallback(({ sendBack, input: { context } })
991
991
  // Step 2: Fallback to Schema context (only if database doesn't have the model)
992
992
  // This handles the case where model exists in schema file but not yet in database
993
993
  try {
994
- const schemaMod = await Promise.resolve().then(function () { return require('./Schema-BcwvUABB.js'); });
994
+ const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B6ifYEhD.js'); });
995
995
  const { Schema } = schemaMod;
996
996
  const schema = Schema.create(schemaName, { waitForReady: false });
997
997
  const schemaSnapshot = schema.getService().getSnapshot();
@@ -1235,7 +1235,7 @@ const loadOrCreateModel = xstate.fromCallback(({ sendBack, input: { context } })
1235
1235
  }
1236
1236
  // Mark schema as draft when a new model is created so saveNewVersion() can persist it
1237
1237
  try {
1238
- const schemaMod = await Promise.resolve().then(function () { return require('./Schema-BcwvUABB.js'); });
1238
+ const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B6ifYEhD.js'); });
1239
1239
  const { Schema } = schemaMod;
1240
1240
  const schema = Schema.create(schemaName, { waitForReady: false });
1241
1241
  schema.getService().send({ type: 'markAsDraft', propertyKey: 'schema:models' });
@@ -1279,10 +1279,10 @@ const validateModel = xstate.fromCallback(({ sendBack, input: { context } }) =>
1279
1279
  const _validateModel = async () => {
1280
1280
  try {
1281
1281
  // Use dynamic imports to break circular dependencies
1282
- const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-zty4nfCu.js'); });
1282
+ const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-OFyzZIUX.js'); });
1283
1283
  const { SchemaValidationService } = validationServiceMod;
1284
1284
  const validationService = new SchemaValidationService();
1285
- const schemaMod = await Promise.resolve().then(function () { return require('./Schema-BcwvUABB.js'); });
1285
+ const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B6ifYEhD.js'); });
1286
1286
  const { Schema } = schemaMod;
1287
1287
  // Validate model structure
1288
1288
  const structureResult = validationService.validateModelStructure(context);
@@ -1392,7 +1392,7 @@ const createModelProperties = xstate.fromCallback(({ sendBack, input }) => {
1392
1392
  return;
1393
1393
  }
1394
1394
  logger$v(`Creating ${Object.keys(propertyDefinitions).length} properties for model "${modelName}" (id: ${_dbId})`);
1395
- const mod = await Promise.resolve().then(function () { return require('./ModelProperty-09hNvSBl.js'); });
1395
+ const mod = await Promise.resolve().then(function () { return require('./ModelProperty-DcAM5M8T.js'); });
1396
1396
  const ModelProperty = mod?.ModelProperty ?? mod?.default;
1397
1397
  if (!ModelProperty) {
1398
1398
  logger$v('ModelProperty not available from dynamic import');
@@ -1495,7 +1495,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
1495
1495
  const structureMsg = `[validateEntity] Validating model structure`;
1496
1496
  logger$u(structureMsg);
1497
1497
  // Use existing Model validation
1498
- const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-zty4nfCu.js'); });
1498
+ const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-OFyzZIUX.js'); });
1499
1499
  const { SchemaValidationService } = validationServiceMod;
1500
1500
  const validationService = new SchemaValidationService();
1501
1501
  // Validate model structure
@@ -1513,7 +1513,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
1513
1513
  if (entityInput.entityData.schemaName) {
1514
1514
  try {
1515
1515
  logger$u(`[validateEntity] Validating model against schema "${entityInput.entityData.schemaName}"`);
1516
- const schemaMod = await Promise.resolve().then(function () { return require('./Schema-BcwvUABB.js'); });
1516
+ const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B6ifYEhD.js'); });
1517
1517
  const { Schema } = schemaMod;
1518
1518
  const schema = Schema.create(entityInput.entityData.schemaName, {
1519
1519
  waitForReady: false,
@@ -1549,7 +1549,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
1549
1549
  }
1550
1550
  else if (entityInput.entityType === 'modelProperty') {
1551
1551
  // Use existing ModelProperty validation
1552
- const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-zty4nfCu.js'); });
1552
+ const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-OFyzZIUX.js'); });
1553
1553
  const { SchemaValidationService } = validationServiceMod;
1554
1554
  const validationService = new SchemaValidationService();
1555
1555
  // Validate property structure
@@ -1564,7 +1564,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
1564
1564
  // If schema name and model name provided, validate against schema
1565
1565
  if (entityInput.entityData._schemaName && entityInput.entityData.modelName) {
1566
1566
  try {
1567
- const schemaMod = await Promise.resolve().then(function () { return require('./Schema-BcwvUABB.js'); });
1567
+ const schemaMod = await Promise.resolve().then(function () { return require('./Schema-B6ifYEhD.js'); });
1568
1568
  const { Schema } = schemaMod;
1569
1569
  const schema = Schema.create(entityInput.entityData._schemaName, {
1570
1570
  waitForReady: false,
@@ -1593,7 +1593,7 @@ const validateEntity = xstate.fromPromise(async ({ input }) => {
1593
1593
  }
1594
1594
  else if (entityInput.entityType === 'schema') {
1595
1595
  // Schema validation - use existing validation
1596
- const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-zty4nfCu.js'); });
1596
+ const validationServiceMod = await Promise.resolve().then(function () { return require('./SchemaValidationService-OFyzZIUX.js'); });
1597
1597
  const { SchemaValidationService } = validationServiceMod;
1598
1598
  const validationService = new SchemaValidationService();
1599
1599
  const schemaResult = validationService.validateSchema(entityInput.entityData);
@@ -2230,7 +2230,7 @@ async function checkIfPropertyIsEdited(modelName, propertyName, schemaFileValue)
2230
2230
  const cacheKey = `${modelName}:${propertyName}`;
2231
2231
  // First, check the in-memory cache (for current session edits)
2232
2232
  // Robust dynamic import for consumer re-bundling (named or default export)
2233
- const mod = await Promise.resolve().then(function () { return require('./ModelProperty-09hNvSBl.js'); });
2233
+ const mod = await Promise.resolve().then(function () { return require('./ModelProperty-DcAM5M8T.js'); });
2234
2234
  const ModelProperty = mod?.ModelProperty ?? mod?.default;
2235
2235
  if (!ModelProperty) {
2236
2236
  logger$t('ModelProperty not available from dynamic import');
@@ -2793,23 +2793,58 @@ const savePropertyToDb = async (property) => {
2793
2793
  if (!db) {
2794
2794
  throw new Error('Database not found');
2795
2795
  }
2796
- if (!property.modelName || !property.name) {
2797
- throw new Error('Model name and property name are required');
2796
+ if (!property.name) {
2797
+ throw new Error('Property name is required');
2798
2798
  }
2799
- // Find the model
2800
- const modelRecords = await db
2801
- .select()
2802
- .from(models$1)
2803
- .where(drizzleOrm.eq(models$1.name, property.modelName))
2804
- .limit(1);
2805
- if (modelRecords.length === 0) {
2806
- throw new Error(`Model ${property.modelName} not found in database`);
2799
+ // Find the model: prefer modelId (reliable), then modelName as name, then modelName as schemaFileId
2800
+ // (context.modelName can be a model schemaFileId when schema uses that as identifier)
2801
+ let modelRecord;
2802
+ if (property.modelId != null && typeof property.modelId === 'number') {
2803
+ const byId = await db
2804
+ .select()
2805
+ .from(models$1)
2806
+ .where(drizzleOrm.eq(models$1.id, property.modelId))
2807
+ .limit(1);
2808
+ modelRecord = byId[0];
2809
+ }
2810
+ if (!modelRecord && property.modelName) {
2811
+ const byName = await db
2812
+ .select()
2813
+ .from(models$1)
2814
+ .where(drizzleOrm.eq(models$1.name, property.modelName))
2815
+ .limit(1);
2816
+ modelRecord = byName[0];
2817
+ }
2818
+ if (!modelRecord && property.modelName) {
2819
+ const bySchemaFileId = await db
2820
+ .select()
2821
+ .from(models$1)
2822
+ .where(drizzleOrm.eq(models$1.schemaFileId, property.modelName))
2823
+ .limit(1);
2824
+ modelRecord = bySchemaFileId[0];
2825
+ }
2826
+ // Fallback: resolve model from existing property row (by schemaFileId) when modelName is wrong
2827
+ const schemaFileId = property._propertyFileId || (typeof property.id === 'string' ? property.id : undefined);
2828
+ if (!modelRecord && schemaFileId) {
2829
+ const propRows = await db
2830
+ .select({ modelId: properties.modelId })
2831
+ .from(properties)
2832
+ .where(drizzleOrm.eq(properties.schemaFileId, schemaFileId))
2833
+ .limit(1);
2834
+ if (propRows.length > 0 && propRows[0].modelId) {
2835
+ const byPropModelId = await db
2836
+ .select()
2837
+ .from(models$1)
2838
+ .where(drizzleOrm.eq(models$1.id, propRows[0].modelId))
2839
+ .limit(1);
2840
+ modelRecord = byPropModelId[0];
2841
+ }
2842
+ }
2843
+ if (!modelRecord) {
2844
+ throw new Error(`Model not found in database (modelId=${property.modelId}, modelName=${property.modelName})`);
2807
2845
  }
2808
- const modelRecord = modelRecords[0];
2809
2846
  // Find existing property - try multiple strategies to handle name changes
2810
2847
  // 1. First try by schemaFileId (most reliable - doesn't change when name changes)
2811
- // Use _propertyFileId first (from getPropertySchema), then id if it's a string (schemaFileId)
2812
- const schemaFileId = property._propertyFileId || (typeof property.id === 'string' ? property.id : undefined);
2813
2848
  let existingProperties = [];
2814
2849
  logger$t(`[savePropertyToDb] Looking for property ${property.modelName}:${property.name} (schemaFileId: ${schemaFileId}, originalName: ${property._originalValues?.name})`);
2815
2850
  if (schemaFileId) {
@@ -2883,6 +2918,11 @@ const savePropertyToDb = async (property) => {
2883
2918
  })
2884
2919
  .where(drizzleOrm.eq(properties.id, existingProperty.id));
2885
2920
  logger$t(`Updated property ${property.modelName}:${property._originalValues?.name || 'unknown'} -> ${property.name} in database`);
2921
+ // #region agent log
2922
+ if (typeof fetch === 'function') {
2923
+ fetch('http://127.0.0.1:7242/ingest/0978b378-ebae-46bf-8fd3-134ef2e16cdd', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Debug-Session-Id': '9ee076' }, body: JSON.stringify({ sessionId: '9ee076', location: 'db.ts:savePropertyToDb-update', message: 'savePropertyToDb UPDATED row', data: { oldName: property._originalValues?.name, newName: property.name, dbId: existingProperty.id }, timestamp: Date.now(), hypothesisId: 'B' }) }).catch(() => { });
2924
+ }
2925
+ // #endregion
2886
2926
  }
2887
2927
  else {
2888
2928
  // Property doesn't exist, create it
@@ -2892,6 +2932,11 @@ const savePropertyToDb = async (property) => {
2892
2932
  isEdited: true, // Runtime-created properties are edited
2893
2933
  });
2894
2934
  logger$t(`Created property ${property.modelName}:${property.name} in database`);
2935
+ // #region agent log
2936
+ if (typeof fetch === 'function') {
2937
+ fetch('http://127.0.0.1:7242/ingest/0978b378-ebae-46bf-8fd3-134ef2e16cdd', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Debug-Session-Id': '9ee076' }, body: JSON.stringify({ sessionId: '9ee076', location: 'db.ts:savePropertyToDb-insert', message: 'savePropertyToDb INSERTED new row', data: { name: property.name, schemaFileId }, timestamp: Date.now(), hypothesisId: 'B' }) }).catch(() => { });
2938
+ }
2939
+ // #endregion
2895
2940
  }
2896
2941
  };
2897
2942
  function parseAddressConfig(value) {
@@ -3210,11 +3255,14 @@ async function writePropertyToDb(propertyFileId, data, isEdited = false) {
3210
3255
  // Note: Additional property fields like storageType, localStorageDir, filenameSuffix
3211
3256
  // are not stored in the properties table but may be in the schema JSON
3212
3257
  if (existingProperties.length > 0) {
3213
- // Property exists, update it with new values
3258
+ // Property exists, update it with new values.
3259
+ // Use existing row id for WHERE (not name+modelId) so renames work: the row
3260
+ // may have the old name but we're updating to the new one.
3261
+ const existing = existingProperties[0];
3214
3262
  await db
3215
3263
  .update(properties)
3216
3264
  .set(propertyData)
3217
- .where(drizzleOrm.and(drizzleOrm.eq(properties.name, data.name), drizzleOrm.eq(properties.modelId, data.modelId)));
3265
+ .where(drizzleOrm.eq(properties.id, existing.id));
3218
3266
  logger$t(`Updated property ${data.name} (${propertyFileId}) in database`);
3219
3267
  }
3220
3268
  else {
@@ -3489,15 +3537,21 @@ const writeToDatabase = xstate.fromCallback(({ sendBack, input }) => {
3489
3537
  // initial write completes is not overwritten by the stale requestWrite payload.
3490
3538
  let dataToWrite = input.entityData;
3491
3539
  try {
3492
- const mod = await Promise.resolve().then(function () { return require('./ModelProperty-09hNvSBl.js'); });
3540
+ const mod = await Promise.resolve().then(function () { return require('./ModelProperty-DcAM5M8T.js'); });
3493
3541
  const ModelProperty = mod?.ModelProperty ?? mod?.default;
3494
3542
  if (ModelProperty && typeof ModelProperty.getById === 'function') {
3495
3543
  const instance = ModelProperty.getById(input.entityId);
3496
3544
  if (instance && typeof instance._getSnapshotContext === 'function') {
3497
3545
  const ctx = instance._getSnapshotContext();
3546
+ const ctxName = ctx.name ?? input.entityData.name;
3547
+ // #region agent log
3548
+ if (ctx.name !== input.entityData.name && typeof fetch === 'function') {
3549
+ fetch('http://127.0.0.1:7242/ingest/0978b378-ebae-46bf-8fd3-134ef2e16cdd', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Debug-Session-Id': '9ee076' }, body: JSON.stringify({ sessionId: '9ee076', location: 'writeToDatabase.ts:modelProperty', message: 'writeToDatabase using ctx name (rename detected)', data: { requestWriteName: input.entityData.name, ctxName: ctx.name, finalName: ctxName }, timestamp: Date.now(), hypothesisId: 'C' }) }).catch(() => { });
3550
+ }
3551
+ // #endregion
3498
3552
  dataToWrite = {
3499
3553
  ...input.entityData,
3500
- name: ctx.name ?? input.entityData.name,
3554
+ name: ctxName,
3501
3555
  dataType: ctx.dataType ?? input.entityData.dataType,
3502
3556
  refModelId: ctx.refModelId ?? input.entityData.refModelId,
3503
3557
  refValueType: ctx.refValueType ?? input.entityData.refValueType,
@@ -3513,6 +3567,11 @@ const writeToDatabase = xstate.fromCallback(({ sendBack, input }) => {
3513
3567
  // Fall back to input.entityData if instance not available
3514
3568
  }
3515
3569
  await writePropertyToDb(input.entityId, dataToWrite);
3570
+ // #region agent log
3571
+ if (typeof fetch === 'function') {
3572
+ fetch('http://127.0.0.1:7242/ingest/0978b378-ebae-46bf-8fd3-134ef2e16cdd', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Debug-Session-Id': '9ee076' }, body: JSON.stringify({ sessionId: '9ee076', location: 'writeToDatabase.ts:writePropertyToDbDone', message: 'writePropertyToDb completed', data: { entityId: input.entityId, name: dataToWrite.name }, timestamp: Date.now(), hypothesisId: 'C' }) }).catch(() => { });
3573
+ }
3574
+ // #endregion
3516
3575
  output = input.entityData;
3517
3576
  }
3518
3577
  else if (input.entityType === 'schema') {
@@ -3868,7 +3927,7 @@ const modelMachine = xstate.setup({
3868
3927
  // Create ModelProperty instances for any new property IDs
3869
3928
  if (Array.isArray(newPropertyIds) && newPropertyIds.length > 0) {
3870
3929
  // Import and create instances asynchronously (fire-and-forget)
3871
- Promise.resolve().then(function () { return require('./ModelProperty-09hNvSBl.js'); }).then(({ ModelProperty }) => {
3930
+ Promise.resolve().then(function () { return require('./ModelProperty-DcAM5M8T.js'); }).then(({ ModelProperty }) => {
3872
3931
  const createPromises = newPropertyIds.map(async (propertyFileId) => {
3873
3932
  try {
3874
3933
  const property = await ModelProperty.createById(propertyFileId);
@@ -5326,9 +5385,9 @@ const runPublish = xstate.fromCallback(({ sendBack, input: { context } }) => {
5326
5385
  sendBack({ type: 'publishError', error: new Error(`Item not found for seedLocalId: ${seedLocalId}`) });
5327
5386
  return;
5328
5387
  }
5329
- const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-oukGI2N6.js'); });
5388
+ const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-B7bB1OGg.js'); });
5330
5389
  const { getPublishUploads } = getPublishUploadsMod;
5331
- const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-BqL06sEI.js'); });
5390
+ const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-CBuGIazw.js'); });
5332
5391
  const { getPublishPayload } = getPublishPayloadMod;
5333
5392
  const uploads = await getPublishUploads(item);
5334
5393
  let uploadedTransactions = [];
@@ -6087,7 +6146,7 @@ const resolveRelatedValue = xstate.fromCallback(({ sendBack, input: { context }
6087
6146
  const { isRelation, propertyValue, propertyName, seedUid, propertyRecordSchema, populatedFromDb, schemaUid, } = context;
6088
6147
  const _resolveRelatedValue = async () => {
6089
6148
  // Use dynamic import to break circular dependency
6090
- const schemaMod = await Promise.resolve().then(function () { return require('./index-jubgGeM2.js'); });
6149
+ const schemaMod = await Promise.resolve().then(function () { return require('./index-6P4MEsbO.js'); });
6091
6150
  const { ModelPropertyDataTypes } = schemaMod;
6092
6151
  if (!propertyValue || !isRelation || populatedFromDb) {
6093
6152
  return;
@@ -6427,7 +6486,7 @@ const hydrateFromDb = xstate.fromCallback(({ sendBack, input: { context } }) =>
6427
6486
  // to use dynamically imported ModelPropertyDataTypes
6428
6487
  const _hydrateFromDb = async () => {
6429
6488
  // Use dynamic import to break circular dependency
6430
- const schemaMod = await Promise.resolve().then(function () { return require('./index-jubgGeM2.js'); });
6489
+ const schemaMod = await Promise.resolve().then(function () { return require('./index-6P4MEsbO.js'); });
6431
6490
  const { ModelPropertyDataTypes } = schemaMod;
6432
6491
  const appDb = BaseDb.getAppDb();
6433
6492
  const whereClauses = [];
@@ -6937,7 +6996,7 @@ const analyzeInput = xstate.fromCallback(({ sendBack, input: { context, event }
6937
6996
  }
6938
6997
  const _analyzeInput = async () => {
6939
6998
  // Use dynamic import to break circular dependency
6940
- const schemaMod = await Promise.resolve().then(function () { return require('./index-jubgGeM2.js'); });
6999
+ const schemaMod = await Promise.resolve().then(function () { return require('./index-6P4MEsbO.js'); });
6941
7000
  const { ModelPropertyDataTypes } = schemaMod;
6942
7001
  let propertyName = propertyNameRaw;
6943
7002
  if (!propertyName) {
@@ -7579,7 +7638,7 @@ const saveRelation = xstate.fromCallback(({ sendBack, input: { context, event }
7579
7638
  }
7580
7639
  const _saveRelation = async () => {
7581
7640
  // Use dynamic import to break circular dependency
7582
- const schemaMod = await Promise.resolve().then(function () { return require('./index-jubgGeM2.js'); });
7641
+ const schemaMod = await Promise.resolve().then(function () { return require('./index-6P4MEsbO.js'); });
7583
7642
  const { ModelPropertyDataTypes } = schemaMod;
7584
7643
  if (!propertyNameRaw) {
7585
7644
  throw new Error('propertyName is required');
@@ -8443,7 +8502,7 @@ class ItemProperty {
8443
8502
  return;
8444
8503
  }
8445
8504
  // Use dynamic import to break circular dependency
8446
- const schemaMod = await Promise.resolve().then(function () { return require('./index-jubgGeM2.js'); });
8505
+ const schemaMod = await Promise.resolve().then(function () { return require('./index-6P4MEsbO.js'); });
8447
8506
  const { ModelPropertyDataTypes } = schemaMod;
8448
8507
  const { context } = snapshot;
8449
8508
  const { propertyRecordSchema } = context;
@@ -9129,7 +9188,7 @@ class ItemProperty {
9129
9188
  }
9130
9189
  async save() {
9131
9190
  const ctx = this._getSnapshotContext();
9132
- const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-vfvyz3KJ.js'); });
9191
+ const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-5TQ-v2CF.js'); });
9133
9192
  await assertItemOwned({
9134
9193
  seedLocalId: ctx?.seedLocalId ?? undefined,
9135
9194
  seedUid: ctx?.seedUid ?? undefined,
@@ -9449,7 +9508,7 @@ class Item {
9449
9508
  });
9450
9509
  };
9451
9510
  this.publish = async () => {
9452
- const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-vfvyz3KJ.js'); });
9511
+ const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-5TQ-v2CF.js'); });
9453
9512
  await assertItemOwned(this);
9454
9513
  this._service.send({ type: 'startPublish' });
9455
9514
  return new Promise((resolve, reject) => {
@@ -9485,13 +9544,13 @@ class Item {
9485
9544
  };
9486
9545
  this.getPublishUploads = async () => {
9487
9546
  // Use dynamic import to break circular dependency
9488
- const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-oukGI2N6.js'); });
9547
+ const getPublishUploadsMod = await Promise.resolve().then(function () { return require('./getPublishUploads-B7bB1OGg.js'); });
9489
9548
  const { getPublishUploads } = getPublishUploadsMod;
9490
9549
  return await getPublishUploads(this);
9491
9550
  };
9492
9551
  this.getPublishPayload = async (uploadedTransactions) => {
9493
9552
  // Use dynamic import to break circular dependency
9494
- const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-BqL06sEI.js'); });
9553
+ const getPublishPayloadMod = await Promise.resolve().then(function () { return require('./getPublishPayload-CBuGIazw.js'); });
9495
9554
  const { getPublishPayload } = getPublishPayloadMod;
9496
9555
  return await getPublishPayload(this, uploadedTransactions);
9497
9556
  };
@@ -10613,7 +10672,7 @@ class Item {
10613
10672
  * Destroy the item: soft delete in DB, remove from caches, clean up subscriptions, stop service.
10614
10673
  */
10615
10674
  async destroy() {
10616
- const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-vfvyz3KJ.js'); });
10675
+ const { assertItemOwned } = await Promise.resolve().then(function () { return require('./ownership-5TQ-v2CF.js'); });
10617
10676
  await assertItemOwned(this);
10618
10677
  const context = this._getSnapshotContext();
10619
10678
  const cacheKey = context.seedUid || context.seedLocalId;
@@ -14442,7 +14501,7 @@ const saveDraftLogger = debug('seedSdk:model:saveDraftToDb');
14442
14501
  // Lazy import cache for ModelProperty to avoid circular dependency
14443
14502
  // Eagerly start loading to minimize delay on first access
14444
14503
  let ModelPropertyClass = null;
14445
- const modelPropertyImportPromise = Promise.resolve().then(function () { return require('./ModelProperty-09hNvSBl.js'); })
14504
+ const modelPropertyImportPromise = Promise.resolve().then(function () { return require('./ModelProperty-DcAM5M8T.js'); })
14446
14505
  .then(module => {
14447
14506
  ModelPropertyClass = module.ModelProperty;
14448
14507
  return ModelPropertyClass;
@@ -14459,7 +14518,7 @@ function getModelProperty() {
14459
14518
  }
14460
14519
  // Lazy import cache for Schema to avoid circular dependency
14461
14520
  let SchemaClass = null;
14462
- const schemaImportPromise = Promise.resolve().then(function () { return require('./Schema-BcwvUABB.js'); })
14521
+ const schemaImportPromise = Promise.resolve().then(function () { return require('./Schema-B6ifYEhD.js'); })
14463
14522
  .then(module => {
14464
14523
  SchemaClass = module.Schema;
14465
14524
  return SchemaClass;
@@ -17055,7 +17114,7 @@ const getTsImport = async (filePath) => {
17055
17114
 
17056
17115
  // Get the directory of this file to resolve relative paths
17057
17116
  // @ts-ignore - rollup plugin-typescript doesn't recognize import.meta with module: "preserve"
17058
- 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-BLETlVgA.js', document.baseURI).href)));
17117
+ 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-CA4i5TA7.js', document.baseURI).href)));
17059
17118
  path.dirname(__filename$1);
17060
17119
  const commandExists = (command) => {
17061
17120
  try {
@@ -17611,4 +17670,4 @@ exports.versions = versions;
17611
17670
  exports.waitForEntityIdle = waitForEntityIdle;
17612
17671
  exports.withSeed = withSeed;
17613
17672
  exports.writeProcessMachine = writeProcessMachine;
17614
- //# sourceMappingURL=index-BLETlVgA.js.map
17673
+ //# sourceMappingURL=index-CA4i5TA7.js.map