@seedprotocol/sdk 0.7.4-next.793.g6dd83dd → 0.7.4

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 (108) hide show
  1. package/dist/{BasePathResolver-DT63t0XU.js → BasePathResolver-DrzGVH9L.js} +231 -39
  2. package/dist/BasePathResolver-DrzGVH9L.js.map +1 -0
  3. package/dist/{ClientManager-Cos8NaRU.js → ClientManager-Dfu4jcgm.js} +300 -188
  4. package/dist/ClientManager-Dfu4jcgm.js.map +1 -0
  5. package/dist/{Item-CoP48bl3.js → Item-BUUFuywT.js} +75 -219
  6. package/dist/Item-BUUFuywT.js.map +1 -0
  7. package/dist/{ModelProperty-jSo2QWIc.js → ModelProperty-B6cnRvIz.js} +37 -38
  8. package/dist/ModelProperty-B6cnRvIz.js.map +1 -0
  9. package/dist/{Schema-DN1KwJ57.js → Schema-Bf-jOLq0.js} +36 -35
  10. package/dist/{Schema-DN1KwJ57.js.map → Schema-Bf-jOLq0.js.map} +1 -1
  11. package/dist/{SchemaValidationService-CCG9Bu__.js → SchemaValidationService-BNYMacsx.js} +7 -8
  12. package/dist/{SchemaValidationService-CCG9Bu__.js.map → SchemaValidationService-BNYMacsx.js.map} +1 -1
  13. package/dist/{backfillMetadataPropertyIds-D8t61oNl.js → backfillMetadataPropertyIds-C2-s_jUa.js} +4 -5
  14. package/dist/{backfillMetadataPropertyIds-D8t61oNl.js.map → backfillMetadataPropertyIds-C2-s_jUa.js.map} +1 -1
  15. package/dist/{configurePlatform-Su9vV5qO.js → configurePlatform-BzfirKuM.js} +3 -4
  16. package/dist/{configurePlatform-Su9vV5qO.js.map → configurePlatform-BzfirKuM.js.map} +1 -1
  17. package/dist/{detachRowsBeforeDelete-DcWDZ8KP.js → detachRowsBeforeDelete-B0Daoz9Z.js} +3 -4
  18. package/dist/{detachRowsBeforeDelete-DcWDZ8KP.js.map → detachRowsBeforeDelete-B0Daoz9Z.js.map} +1 -1
  19. package/dist/{eas-Ce0KDpvb.js → eas-Dq5Kx_Nd.js} +14 -32
  20. package/dist/eas-Dq5Kx_Nd.js.map +1 -0
  21. package/dist/{errors-D1brJy1k.js → errors-DdWbxb_n.js} +42 -39
  22. package/dist/errors-DdWbxb_n.js.map +1 -0
  23. package/dist/{getItem-Cs5IIZCQ.js → getItem-9bYSErSj.js} +4 -5
  24. package/dist/{getItem-Cs5IIZCQ.js.map → getItem-9bYSErSj.js.map} +1 -1
  25. package/dist/{getPublishPayload-CquFaK1c.js → getPublishPayload-DPy-uMrR.js} +28 -29
  26. package/dist/getPublishPayload-DPy-uMrR.js.map +1 -0
  27. package/dist/{getPublishUploads-Bv9aOq2x.js → getPublishUploads-J-143iSV.js} +10 -11
  28. package/dist/{getPublishUploads-Bv9aOq2x.js.map → getPublishUploads-J-143iSV.js.map} +1 -1
  29. package/dist/{index-BPrJV9Wt.js → index-7y2f_iQz.js} +2 -2
  30. package/dist/index-7y2f_iQz.js.map +1 -0
  31. package/dist/{index-DhP5gMMF.js → index-C61Rxy0F.js} +9 -10
  32. package/dist/index-C61Rxy0F.js.map +1 -0
  33. package/dist/{index.browser-cpZehMwT.js → index.browser-C1pisOEa.js} +10 -10
  34. package/dist/{index.browser-cpZehMwT.js.map → index.browser-C1pisOEa.js.map} +1 -1
  35. package/dist/{index.node-D_-a9z-S.js → index.node-BAlST8pD.js} +6 -6
  36. package/dist/{index.node-D_-a9z-S.js.map → index.node-BAlST8pD.js.map} +1 -1
  37. package/dist/main.js +27 -28
  38. package/dist/main.js.map +1 -1
  39. package/dist/node.js +12 -13
  40. package/dist/node.js.map +1 -1
  41. package/dist/platform.browser.js +6 -7
  42. package/dist/platform.browser.js.map +1 -1
  43. package/dist/platform.node.js +5 -6
  44. package/dist/platform.node.js.map +1 -1
  45. package/dist/{property-DNfhGsdq.js → property-zFPMtR3T.js} +10 -14
  46. package/dist/property-zFPMtR3T.js.map +1 -0
  47. package/dist/{propertyValidationRules-BiEBQvPZ.js → propertyValidationRules-CeFVhdQg.js} +10 -10
  48. package/dist/{propertyValidationRules-BiEBQvPZ.js.map → propertyValidationRules-CeFVhdQg.js.map} +1 -1
  49. package/dist/{publishDraftGraph-BZ6gku_X.js → publishDraftGraph-CuVq6iAR.js} +7 -6
  50. package/dist/{publishDraftGraph-BZ6gku_X.js.map → publishDraftGraph-CuVq6iAR.js.map} +1 -1
  51. package/dist/{resetAmbiguousLegacyItemData-CkSoBEOU.js → resetAmbiguousLegacyItemData-DsFTnMBz.js} +5 -6
  52. package/dist/resetAmbiguousLegacyItemData-DsFTnMBz.js.map +1 -0
  53. package/dist/{resolveModelForSyncedSeed-CsnKV72V.js → resolveModelForSyncedSeed-RUsgAZXG.js} +2 -2
  54. package/dist/{resolveModelForSyncedSeed-CsnKV72V.js.map → resolveModelForSyncedSeed-RUsgAZXG.js.map} +1 -1
  55. package/dist/src/Item/Item.d.ts.map +1 -1
  56. package/dist/src/ItemProperty/service/propertyMachine.d.ts +4 -4
  57. package/dist/src/Model/Model.d.ts +3 -2
  58. package/dist/src/Model/Model.d.ts.map +1 -1
  59. package/dist/src/ModelProperty/ModelProperty.d.ts +1 -1
  60. package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts +1 -1
  61. package/dist/src/Schema/service/schemaMachine.d.ts +2 -2
  62. package/dist/src/client/ClientManager.d.ts +6 -6
  63. package/dist/src/client/clientManagerMachine.d.ts +2 -2
  64. package/dist/src/client/clientManagerMachine.d.ts.map +1 -1
  65. package/dist/src/db/canonicalizeModelTypes.d.ts +18 -0
  66. package/dist/src/db/canonicalizeModelTypes.d.ts.map +1 -0
  67. package/dist/src/db/read/getModelSchemas.d.ts +6 -0
  68. package/dist/src/db/read/getModelSchemas.d.ts.map +1 -1
  69. package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
  70. package/dist/src/db/read/resolveModelRecord.d.ts.map +1 -1
  71. package/dist/src/db/write/createMetadata.d.ts.map +1 -1
  72. package/dist/src/db/write/updateMetadata.d.ts.map +1 -1
  73. package/dist/src/eas.d.ts.map +1 -1
  74. package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
  75. package/dist/src/helpers/db.d.ts +20 -0
  76. package/dist/src/helpers/db.d.ts.map +1 -1
  77. package/dist/src/helpers/index.d.ts +3 -1
  78. package/dist/src/helpers/index.d.ts.map +1 -1
  79. package/dist/src/helpers/metadataPropertyNames.d.ts +12 -0
  80. package/dist/src/helpers/metadataPropertyNames.d.ts.map +1 -1
  81. package/dist/src/imports/json.d.ts +10 -0
  82. package/dist/src/imports/json.d.ts.map +1 -1
  83. package/dist/src/index.d.ts +2 -2
  84. package/dist/src/index.d.ts.map +1 -1
  85. package/dist/src/query/createLocalQueryDataSource.d.ts.map +1 -1
  86. package/dist/src/types/import.d.ts +4 -0
  87. package/dist/src/types/import.d.ts.map +1 -1
  88. package/dist/{syncDbWithEas-CfRijZhj.js → syncDbWithEas-CRpnkq00.js} +157 -61
  89. package/dist/syncDbWithEas-CRpnkq00.js.map +1 -0
  90. package/dist/{tabEvents-D5X2Hwcp.js → tabEvents-nBUq_1u1.js} +6 -6
  91. package/dist/{tabEvents-D5X2Hwcp.js.map → tabEvents-nBUq_1u1.js.map} +1 -1
  92. package/dist/{tolerantWebAccess-BNYRvW9a.js → tolerantWebAccess-DIt3R8_u.js} +7 -8
  93. package/dist/{tolerantWebAccess-BNYRvW9a.js.map → tolerantWebAccess-DIt3R8_u.js.map} +1 -1
  94. package/dist/{updateSeedRevokedAt-B-xAQxaj.js → updateSeedRevokedAt-DtTPSzpM.js} +3 -3
  95. package/dist/{updateSeedRevokedAt-B-xAQxaj.js.map → updateSeedRevokedAt-DtTPSzpM.js.map} +1 -1
  96. package/package.json +5 -5
  97. package/dist/BasePathResolver-DT63t0XU.js.map +0 -1
  98. package/dist/ClientManager-Cos8NaRU.js.map +0 -1
  99. package/dist/Item-CoP48bl3.js.map +0 -1
  100. package/dist/ModelProperty-jSo2QWIc.js.map +0 -1
  101. package/dist/eas-Ce0KDpvb.js.map +0 -1
  102. package/dist/errors-D1brJy1k.js.map +0 -1
  103. package/dist/getPublishPayload-CquFaK1c.js.map +0 -1
  104. package/dist/index-BPrJV9Wt.js.map +0 -1
  105. package/dist/index-DhP5gMMF.js.map +0 -1
  106. package/dist/property-DNfhGsdq.js.map +0 -1
  107. package/dist/resetAmbiguousLegacyItemData-CkSoBEOU.js.map +0 -1
  108. package/dist/syncDbWithEas-CfRijZhj.js.map +0 -1
@@ -1,12 +1,13 @@
1
1
  import { fromCallback, setup, assign, createActor } from 'xstate';
2
- import { g as getRefValueType, H as createModelsFromJson, p as listCompleteSchemaFiles, J as getLatestSchemaVersion, l as loadSchemaFromFile, K as jsonPropertiesToSchemaProperties, q as loadAllSchemasFromDb, k as getClient } from './ClientManager-Cos8NaRU.js';
3
- import { aq as SEED_PROTOCOL_SCHEMA_NAME, E as BaseDb, z as schemas, aI as addSchemaToDb, i as isDataType, M as ModelPropertyDataTypes, $ as generateId, a2 as addModelsToDb, s as models, q as modelSchemas, u as properties, J as BaseFileManager, aK as loadModelsFromDbForSchema, aF as isInternalSchema } from './BasePathResolver-DT63t0XU.js';
2
+ import { g as getRefValueType, H as createModelsFromJson, p as listCompleteSchemaFiles, J as getLatestSchemaVersion, l as loadSchemaFromFile, K as jsonPropertiesToSchemaProperties, q as loadAllSchemasFromDb, k as getClient } from './ClientManager-Dfu4jcgm.js';
3
+ import { at as SEED_PROTOCOL_SCHEMA_NAME, E as BaseDb, z as schemas, aL as addSchemaToDb, i as isDataType, M as ModelPropertyDataTypes, $ as generateId, a5 as addModelsToDb, s as models, q as modelSchemas, u as properties, J as BaseFileManager, aN as loadModelsFromDbForSchema, aI as isInternalSchema } from './BasePathResolver-DrzGVH9L.js';
4
4
  import { eq, desc, and } from 'drizzle-orm';
5
5
  import debug from 'debug';
6
- import { c as currentEvictionEpoch, w as writeProcessMachine, t as trackDraftSave, M as Model, g as getDraftSaveError, C as ConflictError, r as recordSchemaDestroy, f as finishSchemaDestroy, d as setupEntityLiveQuery } from './errors-D1brJy1k.js';
6
+ import { c as currentEvictionEpoch, w as writeProcessMachine, t as trackDraftSave, M as Model, g as getDraftSaveError, C as ConflictError, r as recordSchemaDestroy, f as finishSchemaDestroy, d as setupEntityLiveQuery } from './errors-DdWbxb_n.js';
7
7
  import 'pluralize';
8
- import { SchemaValidationService } from './SchemaValidationService-CCG9Bu__.js';
9
- import { D as DEFAULT_READY_TIMEOUT_MS, n as waitForEntityIdle, o as createReactiveProxy, q as findEntity, C as ClientManagerState, a0 as clearDestroySubscriptions, t as forceRemoveFromCaches, a1 as unloadEntity, u as runDestroyLifecycle } from './Item-CoP48bl3.js';
8
+ import '@seedprotocol/eas';
9
+ import { SchemaValidationService } from './SchemaValidationService-BNYMacsx.js';
10
+ import { D as DEFAULT_READY_TIMEOUT_MS, l as waitForEntityIdle, m as createReactiveProxy, n as findEntity, C as ClientManagerState, _ as clearDestroySubscriptions, o as forceRemoveFromCaches, $ as unloadEntity, q as runDestroyLifecycle } from './Item-BUUFuywT.js';
10
11
 
11
12
  const logger$d = debug('seedSdk:schema:actors:loadOrCreateSchema');
12
13
  /**
@@ -50,7 +51,7 @@ const createModelInstances$2 = async (modelIds, evictionEpoch) => {
50
51
  return;
51
52
  }
52
53
  try {
53
- const _mod_0 = await import('./errors-D1brJy1k.js');
54
+ const _mod_0 = await import('./errors-DdWbxb_n.js');
54
55
  const _ns_0 = _mod_0.h;
55
56
  const modelMod = _ns_0;
56
57
  const { Model } = modelMod;
@@ -167,7 +168,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
167
168
  // For Seed Protocol, always load from internal file, never create new
168
169
  logger$d(`Loading internal Seed Protocol schema from SDK`);
169
170
  try {
170
- const _mod_1 = await import('./ClientManager-Cos8NaRU.js');
171
+ const _mod_1 = await import('./ClientManager-Dfu4jcgm.js');
171
172
  const _ns_1 = _mod_1.S;
172
173
  const internalSchema = _ns_1;
173
174
  const schemaFile = internalSchema.default;
@@ -662,7 +663,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
662
663
  // Ensure models are populated (fallback for seed-protocol if missing)
663
664
  if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
664
665
  try {
665
- const _mod_2 = await import('./ClientManager-Cos8NaRU.js');
666
+ const _mod_2 = await import('./ClientManager-Dfu4jcgm.js');
666
667
  const _ns_2 = _mod_2.S;
667
668
  const internalSchema = _ns_2;
668
669
  const internalSchemaFile = internalSchema.default;
@@ -893,7 +894,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
893
894
  // Ensure models are populated (fallback for seed-protocol if missing)
894
895
  if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
895
896
  try {
896
- const _mod_3 = await import('./ClientManager-Cos8NaRU.js');
897
+ const _mod_3 = await import('./ClientManager-Dfu4jcgm.js');
897
898
  const _ns_3 = _mod_3.S;
898
899
  const internalSchema = _ns_3;
899
900
  const internalSchemaFile = internalSchema.default;
@@ -984,7 +985,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
984
985
  // Ensure models are populated (fallback for seed-protocol if missing)
985
986
  if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
986
987
  try {
987
- const _mod_4 = await import('./ClientManager-Cos8NaRU.js');
988
+ const _mod_4 = await import('./ClientManager-Dfu4jcgm.js');
988
989
  const _ns_4 = _mod_4.S;
989
990
  const internalSchema = _ns_4;
990
991
  const internalSchemaFile = internalSchema.default;
@@ -1072,7 +1073,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
1072
1073
  // If schemaData is missing, try to load from internal schema file for seed-protocol
1073
1074
  if (!dbSchema.schemaData && schemaName === 'Seed Protocol') {
1074
1075
  try {
1075
- const _mod_5 = await import('./ClientManager-Cos8NaRU.js');
1076
+ const _mod_5 = await import('./ClientManager-Dfu4jcgm.js');
1076
1077
  const _ns_5 = _mod_5.S;
1077
1078
  const internalSchema = _ns_5;
1078
1079
  const schemaFile = internalSchema.default;
@@ -1183,7 +1184,7 @@ const loadOrCreateSchema = fromCallback(({ sendBack, input: { context } }) => {
1183
1184
  // Ensure models are populated (fallback for seed-protocol if missing)
1184
1185
  if ((!mergedModels || Object.keys(mergedModels).length === 0) && schemaName === 'Seed Protocol') {
1185
1186
  try {
1186
- const _mod_6 = await import('./ClientManager-Cos8NaRU.js');
1187
+ const _mod_6 = await import('./ClientManager-Dfu4jcgm.js');
1187
1188
  const _ns_6 = _mod_6.S;
1188
1189
  const internalSchema = _ns_6;
1189
1190
  const internalSchemaFile = internalSchema.default;
@@ -1510,7 +1511,7 @@ const createModelInstances$1 = async (modelIds, evictionEpoch) => {
1510
1511
  return;
1511
1512
  }
1512
1513
  try {
1513
- const _mod_7 = await import('./errors-D1brJy1k.js');
1514
+ const _mod_7 = await import('./errors-DdWbxb_n.js');
1514
1515
  const _ns_7 = _mod_7.h;
1515
1516
  const mod = _ns_7;
1516
1517
  const Model = mod?.Model ?? mod?.default;
@@ -1559,7 +1560,7 @@ const checkExistingSchema = fromCallback(({ sendBack, input: { context } }) => {
1559
1560
  if (isInternal && schemaName === SEED_PROTOCOL_SCHEMA_NAME) {
1560
1561
  // For Seed Protocol, check if it exists in database
1561
1562
  try {
1562
- const _mod_8 = await import('./ClientManager-Cos8NaRU.js');
1563
+ const _mod_8 = await import('./ClientManager-Dfu4jcgm.js');
1563
1564
  const _ns_8 = _mod_8.S;
1564
1565
  const internalSchema = _ns_8;
1565
1566
  const schemaFile = internalSchema.default;
@@ -1921,7 +1922,7 @@ const writeSchemaToDb = fromCallback(({ sendBack, input }) => {
1921
1922
  if (isInternal && schemaName === SEED_PROTOCOL_SCHEMA_NAME) {
1922
1923
  // For Seed Protocol, load from internal file
1923
1924
  logger$b(`Loading internal Seed Protocol schema from SDK`);
1924
- const _mod_9 = await import('./ClientManager-Cos8NaRU.js');
1925
+ const _mod_9 = await import('./ClientManager-Dfu4jcgm.js');
1925
1926
  const _ns_9 = _mod_9.S;
1926
1927
  const internalSchema = _ns_9;
1927
1928
  finalSchema = internalSchema.default;
@@ -2392,7 +2393,7 @@ const createModelInstances = fromCallback(({ sendBack, input }) => {
2392
2393
  return;
2393
2394
  }
2394
2395
  try {
2395
- const _mod_10 = await import('./errors-D1brJy1k.js');
2396
+ const _mod_10 = await import('./errors-DdWbxb_n.js');
2396
2397
  const _ns_10 = _mod_10.h;
2397
2398
  const modelMod = _ns_10;
2398
2399
  const { Model } = modelMod;
@@ -2481,7 +2482,7 @@ const verifyModelInstancesInCache = fromCallback(({ sendBack, input }) => {
2481
2482
  }
2482
2483
  try {
2483
2484
  const result = await verifyWithRetry$2(async () => {
2484
- const _mod_11 = await import('./errors-D1brJy1k.js');
2485
+ const _mod_11 = await import('./errors-DdWbxb_n.js');
2485
2486
  const _ns_11 = _mod_11.h;
2486
2487
  const modelMod = _ns_11;
2487
2488
  const { Model } = modelMod;
@@ -2540,8 +2541,8 @@ const writePropertiesToDb = fromCallback(({ sendBack, input }) => {
2540
2541
  const _write = async () => {
2541
2542
  const { modelIds } = input;
2542
2543
  try {
2543
- const _mod_12 = await import('./BasePathResolver-DT63t0XU.js');
2544
- const _ns_12 = _mod_12.a_;
2544
+ const _mod_12 = await import('./BasePathResolver-DrzGVH9L.js');
2545
+ const _ns_12 = _mod_12.b6;
2545
2546
  const modelSchemaMod = _ns_12;
2546
2547
  const { models: modelsTable, properties: propertiesTable } = modelSchemaMod;
2547
2548
  const drizzleMod = await import('drizzle-orm');
@@ -2730,9 +2731,9 @@ const createPropertyInstances = fromCallback(({ sendBack, input }) => {
2730
2731
  return;
2731
2732
  }
2732
2733
  try {
2733
- const modProp = await import('./ModelProperty-jSo2QWIc.js');
2734
+ const modProp = await import('./ModelProperty-B6cnRvIz.js');
2734
2735
  const ModelProperty = modProp?.ModelProperty ?? modProp?.default;
2735
- const _mod_13 = await import('./errors-D1brJy1k.js');
2736
+ const _mod_13 = await import('./errors-DdWbxb_n.js');
2736
2737
  const _ns_13 = _mod_13.h;
2737
2738
  const modModel = _ns_13;
2738
2739
  const Model = modModel?.Model ?? modModel?.default;
@@ -2839,7 +2840,7 @@ const verifyPropertyInstancesInCache = fromCallback(({ sendBack, input }) => {
2839
2840
  }
2840
2841
  try {
2841
2842
  const result = await verifyWithRetry(async () => {
2842
- const mod = await import('./ModelProperty-jSo2QWIc.js');
2843
+ const mod = await import('./ModelProperty-B6cnRvIz.js');
2843
2844
  const ModelProperty = mod?.ModelProperty ?? mod?.default;
2844
2845
  if (!ModelProperty) {
2845
2846
  throw new Error('ModelProperty not available from dynamic import');
@@ -3857,8 +3858,8 @@ async function loadSchemaWithRenames(schemaFilePath, modelRenames) {
3857
3858
  updatedAt: new Date(schemaFile.metadata.updatedAt).getTime(),
3858
3859
  };
3859
3860
  // Use dynamic import to break circular dependency
3860
- const _mod_14 = await import('./BasePathResolver-DT63t0XU.js');
3861
- const _ns_14 = _mod_14.b3;
3861
+ const _mod_14 = await import('./BasePathResolver-DrzGVH9L.js');
3862
+ const _ns_14 = _mod_14.bb;
3862
3863
  const dbMod = _ns_14;
3863
3864
  const { addSchemaToDb, addModelsToDb } = dbMod;
3864
3865
  // Add schema to database with schemaFileId
@@ -3977,8 +3978,8 @@ async function renameModelProperty(schemaName, modelName, oldPropertyName, newPr
3977
3978
  await BaseFileManager.waitForFileWithContent(newFilePath);
3978
3979
  logger$1(`Renamed property ${oldPropertyName} to ${newPropertyName} in schema ${schemaName} v${newVersion}`);
3979
3980
  // Migrate metadata rows so ItemProperty values follow the new name (prevents duplicate ItemProperties)
3980
- const _mod_15 = await import('./BasePathResolver-DT63t0XU.js');
3981
- const _ns_15 = _mod_15.b3;
3981
+ const _mod_15 = await import('./BasePathResolver-DrzGVH9L.js');
3982
+ const _ns_15 = _mod_15.bb;
3982
3983
  const { migrateMetadataForPropertyRename } = _ns_15;
3983
3984
  const migratedCount = await migrateMetadataForPropertyRename(modelName, oldPropertyName, newPropertyName, oldProperty.id, { schemaName });
3984
3985
  if (migratedCount > 0) {
@@ -4974,7 +4975,7 @@ class Schema {
4974
4975
  const modelDbId = modelInstance.getService().getSnapshot().context._dbId;
4975
4976
  const db = BaseDb.getAppDb();
4976
4977
  if (propertyContexts.length === 0 && modelDbId && db) {
4977
- const { ModelProperty } = await import('./ModelProperty-jSo2QWIc.js');
4978
+ const { ModelProperty } = await import('./ModelProperty-B6cnRvIz.js');
4978
4979
  const rows = await db.select().from(properties).where(eq(properties.modelId, modelDbId));
4979
4980
  propertyContexts = rows.map((row) => {
4980
4981
  const cached = row.schemaFileId ? ModelProperty.getById(row.schemaFileId) : undefined;
@@ -5127,7 +5128,7 @@ class Schema {
5127
5128
  savedSchema: publishedSchema,
5128
5129
  });
5129
5130
  // Clear edited flags on all ModelProperty instances and in database
5130
- const modelPropertyMod = await import('./ModelProperty-jSo2QWIc.js');
5131
+ const modelPropertyMod = await import('./ModelProperty-B6cnRvIz.js');
5131
5132
  const { ModelProperty } = modelPropertyMod;
5132
5133
  for (const propertyKey of context._editedProperties) {
5133
5134
  const [modelName, propertyName] = propertyKey.split(':');
@@ -5151,8 +5152,8 @@ class Schema {
5151
5152
  try {
5152
5153
  if (db && modelName && propertyName) {
5153
5154
  // Find this schema's model by name
5154
- const _mod_16 = await import('./BasePathResolver-DT63t0XU.js');
5155
- const _ns_16 = _mod_16.b2;
5155
+ const _mod_16 = await import('./BasePathResolver-DrzGVH9L.js');
5156
+ const _ns_16 = _mod_16.ba;
5156
5157
  const { resolveModelRecord } = _ns_16;
5157
5158
  const modelRecord = await resolveModelRecord(modelName, { schemaName: thisSchemaName }, db);
5158
5159
  const modelRecords = modelRecord ? [modelRecord] : [];
@@ -5776,10 +5777,10 @@ class Schema {
5776
5777
  // instances too, or a re-import would get them back with dangling _dbIds.
5777
5778
  if (schemaName) {
5778
5779
  const evictedModelNames = Model.evictForSchema(schemaName);
5779
- const { ModelProperty } = await import('./ModelProperty-jSo2QWIc.js');
5780
+ const { ModelProperty } = await import('./ModelProperty-B6cnRvIz.js');
5780
5781
  ModelProperty.evictForModels(evictedModelNames, schemaName);
5781
5782
  // Evicting stops new writes but not ones already running; let those land before deleting their rows
5782
- const _mod_17 = await import('./errors-D1brJy1k.js');
5783
+ const _mod_17 = await import('./errors-DdWbxb_n.js');
5783
5784
  const _ns_17 = _mod_17.e;
5784
5785
  const { waitForInFlightWrites } = _ns_17;
5785
5786
  await waitForInFlightWrites();
@@ -5812,7 +5813,7 @@ class Schema {
5812
5813
  .map((r) => r.modelId)
5813
5814
  .filter((id) => id != null)),
5814
5815
  ];
5815
- const { detachModelRows } = await import('./detachRowsBeforeDelete-DcWDZ8KP.js');
5816
+ const { detachModelRows } = await import('./detachRowsBeforeDelete-B0Daoz9Z.js');
5816
5817
  await detachModelRows(db, modelIds);
5817
5818
  await db.delete(modelSchemas).where(inArray(modelSchemas.schemaId, schemaIds));
5818
5819
  for (const modelId of modelIds) {
@@ -5827,7 +5828,7 @@ class Schema {
5827
5828
  // the destroyed schema back on the next Schema.all().
5828
5829
  // Match on name as well as id: versions imported from complete schema files can each
5829
5830
  // have their own id, and any version left behind would bring the schema back.
5830
- const _mod_18 = await import('./ClientManager-Cos8NaRU.js');
5831
+ const _mod_18 = await import('./ClientManager-Dfu4jcgm.js');
5831
5832
  const _ns_18 = _mod_18.L;
5832
5833
  const { listCompleteSchemaFiles } = _ns_18;
5833
5834
  const files = await listCompleteSchemaFiles().catch(() => []);
@@ -6023,4 +6024,4 @@ var Schema$1 = /*#__PURE__*/Object.freeze({
6023
6024
  });
6024
6025
 
6025
6026
  export { Schema as S, deletePropertyFromModel as a, Schema$1 as b, deleteModelFromSchema as d, renameModelProperty as r, schemaMachine as s, updateModelProperties as u };
6026
- //# sourceMappingURL=Schema-DN1KwJ57.js.map
6027
+ //# sourceMappingURL=Schema-Bf-jOLq0.js.map