@seedprotocol/sdk 0.7.3 → 0.7.4-next.784.g879c6a3

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 (127) hide show
  1. package/dist/{BasePathResolver-Cm4apKRb.js → BasePathResolver-DxdS0wJ0.js} +43 -8
  2. package/dist/BasePathResolver-DxdS0wJ0.js.map +1 -0
  3. package/dist/{ClientManager-i3nJASkg.js → ClientManager-De-vKHGe.js} +37 -38
  4. package/dist/ClientManager-De-vKHGe.js.map +1 -0
  5. package/dist/{Item-DBFchXpC.js → Item-cq9VcsAY.js} +365 -191
  6. package/dist/Item-cq9VcsAY.js.map +1 -0
  7. package/dist/{ModelProperty-BS49g01Y.js → ModelProperty-DuuoFXaC.js} +45 -37
  8. package/dist/ModelProperty-DuuoFXaC.js.map +1 -0
  9. package/dist/{Schema-CpMNEnUO.js → Schema-Dc5EA8Yb.js} +246 -68
  10. package/dist/Schema-Dc5EA8Yb.js.map +1 -0
  11. package/dist/{SchemaValidationService-DieV4KL-.js → SchemaValidationService-DViJ056F.js} +49 -36
  12. package/dist/SchemaValidationService-DViJ056F.js.map +1 -0
  13. package/dist/{backfillMetadataPropertyIds-DSoOoTnX.js → backfillMetadataPropertyIds-DacVthS5.js} +3 -3
  14. package/dist/{backfillMetadataPropertyIds-DSoOoTnX.js.map → backfillMetadataPropertyIds-DacVthS5.js.map} +1 -1
  15. package/dist/{configurePlatform-D0lQGAMQ.js → configurePlatform-DlZ23w7e.js} +2 -2
  16. package/dist/{configurePlatform-D0lQGAMQ.js.map → configurePlatform-DlZ23w7e.js.map} +1 -1
  17. package/dist/{detachRowsBeforeDelete-S0q-DJPT.js → detachRowsBeforeDelete-YRSZY6dO.js} +2 -2
  18. package/dist/{detachRowsBeforeDelete-S0q-DJPT.js.map → detachRowsBeforeDelete-YRSZY6dO.js.map} +1 -1
  19. package/dist/{eas-6pjU-OuX.js → eas-D_6ptL_F.js} +4 -4
  20. package/dist/{eas-6pjU-OuX.js.map → eas-D_6ptL_F.js.map} +1 -1
  21. package/dist/{index-8O3Uow-Y.js → errors-Cl8rbtKR.js} +192 -48
  22. package/dist/errors-Cl8rbtKR.js.map +1 -0
  23. package/dist/{getItem-CxBNZ-WL.js → getItem-BcmJcUZB.js} +5 -5
  24. package/dist/{getItem-CxBNZ-WL.js.map → getItem-BcmJcUZB.js.map} +1 -1
  25. package/dist/{getPublishPayload-CTCvRUoU.js → getPublishPayload-C278kK9P.js} +15 -15
  26. package/dist/{getPublishPayload-CTCvRUoU.js.map → getPublishPayload-C278kK9P.js.map} +1 -1
  27. package/dist/{getPublishUploads-SFHCbf_y.js → getPublishUploads-DJ1UPh7i.js} +9 -9
  28. package/dist/{getPublishUploads-SFHCbf_y.js.map → getPublishUploads-DJ1UPh7i.js.map} +1 -1
  29. package/dist/{index-Cvt5UBz4.js → index-CqnU-5i0.js} +9 -9
  30. package/dist/index-CqnU-5i0.js.map +1 -0
  31. package/dist/{index-AVFTVp1m.js → index-DAl9U4rn.js} +2 -2
  32. package/dist/index-DAl9U4rn.js.map +1 -0
  33. package/dist/{index.browser-DBhxRoe8.js → index.browser-J6QZ9smP.js} +10 -10
  34. package/dist/{index.browser-DBhxRoe8.js.map → index.browser-J6QZ9smP.js.map} +1 -1
  35. package/dist/{index.node-CJhlcNHM.js → index.node-C9VB9NlX.js} +9 -9
  36. package/dist/index.node-C9VB9NlX.js.map +1 -0
  37. package/dist/main.js +24 -24
  38. package/dist/{model-DGMe-TTm.js → model-oHA3YhOd.js} +5 -1
  39. package/dist/model-oHA3YhOd.js.map +1 -0
  40. package/dist/node.js +11 -11
  41. package/dist/node.js.map +1 -1
  42. package/dist/platform.browser.js +5 -5
  43. package/dist/platform.node.js +4 -4
  44. package/dist/{property-DwPD283A.js → property-Brgr5RdT.js} +11 -11
  45. package/dist/{property-DwPD283A.js.map → property-Brgr5RdT.js.map} +1 -1
  46. package/dist/propertyValidationRules-CDRitiiK.js +51 -0
  47. package/dist/propertyValidationRules-CDRitiiK.js.map +1 -0
  48. package/dist/{publishDraftGraph-BOn3_Occ.js → publishDraftGraph-C37ibxb5.js} +6 -6
  49. package/dist/{publishDraftGraph-BOn3_Occ.js.map → publishDraftGraph-C37ibxb5.js.map} +1 -1
  50. package/dist/{resetAmbiguousLegacyItemData-BkYmBeJc.js → resetAmbiguousLegacyItemData-CcLFRREE.js} +2 -2
  51. package/dist/{resetAmbiguousLegacyItemData-BkYmBeJc.js.map → resetAmbiguousLegacyItemData-CcLFRREE.js.map} +1 -1
  52. package/dist/{resolveModelForSyncedSeed-BL24nLa7.js → resolveModelForSyncedSeed-BTAeCOJE.js} +2 -2
  53. package/dist/{resolveModelForSyncedSeed-BL24nLa7.js.map → resolveModelForSyncedSeed-BTAeCOJE.js.map} +1 -1
  54. package/dist/src/Item/Item.d.ts +6 -2
  55. package/dist/src/Item/Item.d.ts.map +1 -1
  56. package/dist/src/Item/errors.d.ts +23 -0
  57. package/dist/src/Item/errors.d.ts.map +1 -0
  58. package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
  59. package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts.map +1 -1
  60. package/dist/src/ItemProperty/service/actors/loadOrCreateProperty.d.ts.map +1 -1
  61. package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts.map +1 -1
  62. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveFile.d.ts +19 -0
  63. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveFile.d.ts.map +1 -1
  64. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveImage.d.ts.map +1 -1
  65. package/dist/src/ItemProperty/service/actors/saveValueToDb/saveItemStorage.d.ts.map +1 -1
  66. package/dist/src/ItemProperty/service/propertyMachine.d.ts.map +1 -1
  67. package/dist/src/Model/Model.d.ts +2 -0
  68. package/dist/src/Model/Model.d.ts.map +1 -1
  69. package/dist/src/Model/service/actors/createModelProperties.d.ts.map +1 -1
  70. package/dist/src/ModelProperty/ModelProperty.d.ts +2 -0
  71. package/dist/src/ModelProperty/ModelProperty.d.ts.map +1 -1
  72. package/dist/src/Schema/Schema.d.ts +11 -2
  73. package/dist/src/Schema/Schema.d.ts.map +1 -1
  74. package/dist/src/Schema/service/actors/checkExistingSchema.d.ts.map +1 -1
  75. package/dist/src/Schema/service/actors/loadOrCreateSchema.d.ts.map +1 -1
  76. package/dist/src/Schema/service/schemaMachine.d.ts.map +1 -1
  77. package/dist/src/Schema/service/validation/SchemaValidationService.d.ts +4 -1
  78. package/dist/src/Schema/service/validation/SchemaValidationService.d.ts.map +1 -1
  79. package/dist/src/db/Db/BaseDb.d.ts +5 -2
  80. package/dist/src/db/Db/BaseDb.d.ts.map +1 -1
  81. package/dist/src/db/write/updateItemPropertyValue.d.ts.map +1 -1
  82. package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
  83. package/dist/src/helpers/db.d.ts.map +1 -1
  84. package/dist/src/helpers/entity/draftSaveErrors.d.ts +4 -0
  85. package/dist/src/helpers/entity/draftSaveErrors.d.ts.map +1 -0
  86. package/dist/src/helpers/entity/entityUnload.d.ts +2 -1
  87. package/dist/src/helpers/entity/entityUnload.d.ts.map +1 -1
  88. package/dist/src/helpers/entity/evictionEpoch.d.ts +27 -2
  89. package/dist/src/helpers/entity/evictionEpoch.d.ts.map +1 -1
  90. package/dist/src/helpers/isSqliteUniqueConstraintError.d.ts.map +1 -1
  91. package/dist/src/helpers/model.d.ts.map +1 -1
  92. package/dist/src/helpers/propertyValidationRules.d.ts +12 -0
  93. package/dist/src/helpers/propertyValidationRules.d.ts.map +1 -0
  94. package/dist/src/helpers/propertyWriteQueue.d.ts +15 -0
  95. package/dist/src/helpers/propertyWriteQueue.d.ts.map +1 -0
  96. package/dist/src/helpers/schema.d.ts.map +1 -1
  97. package/dist/src/helpers/storageFileName.d.ts +7 -0
  98. package/dist/src/helpers/storageFileName.d.ts.map +1 -0
  99. package/dist/src/index.d.ts +1 -0
  100. package/dist/src/index.d.ts.map +1 -1
  101. package/dist/src/node/db/Db.d.ts +1 -1
  102. package/dist/src/node/db/Db.d.ts.map +1 -1
  103. package/dist/src/node/index.d.ts +1 -0
  104. package/dist/src/node/index.d.ts.map +1 -1
  105. package/dist/src/types/index.d.ts +12 -0
  106. package/dist/src/types/index.d.ts.map +1 -1
  107. package/dist/{syncDbWithEas-Bv2Fe38J.js → syncDbWithEas-B-Ho0IOB.js} +50 -27
  108. package/dist/syncDbWithEas-B-Ho0IOB.js.map +1 -0
  109. package/dist/{tabEvents-9s2WCYw-.js → tabEvents-BTzckWrN.js} +4 -4
  110. package/dist/{tabEvents-9s2WCYw-.js.map → tabEvents-BTzckWrN.js.map} +1 -1
  111. package/dist/{tolerantWebAccess-iUu80pAP.js → tolerantWebAccess-DOm2Xv-f.js} +6 -6
  112. package/dist/{tolerantWebAccess-iUu80pAP.js.map → tolerantWebAccess-DOm2Xv-f.js.map} +1 -1
  113. package/dist/{updateSeedRevokedAt-zBfi931j.js → updateSeedRevokedAt-IHXnJI-i.js} +3 -3
  114. package/dist/{updateSeedRevokedAt-zBfi931j.js.map → updateSeedRevokedAt-IHXnJI-i.js.map} +1 -1
  115. package/package.json +5 -5
  116. package/dist/BasePathResolver-Cm4apKRb.js.map +0 -1
  117. package/dist/ClientManager-i3nJASkg.js.map +0 -1
  118. package/dist/Item-DBFchXpC.js.map +0 -1
  119. package/dist/ModelProperty-BS49g01Y.js.map +0 -1
  120. package/dist/Schema-CpMNEnUO.js.map +0 -1
  121. package/dist/SchemaValidationService-DieV4KL-.js.map +0 -1
  122. package/dist/index-8O3Uow-Y.js.map +0 -1
  123. package/dist/index-AVFTVp1m.js.map +0 -1
  124. package/dist/index-Cvt5UBz4.js.map +0 -1
  125. package/dist/index.node-CJhlcNHM.js.map +0 -1
  126. package/dist/model-DGMe-TTm.js.map +0 -1
  127. package/dist/syncDbWithEas-Bv2Fe38J.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { startCase, isEqual } from 'lodash-es';
2
- import { E as BaseDb, l as easSyncProcesses, G as eventEmitter, a8 as isNode, ah as isBrowser, I as BasePathResolver, aA as normalizeAddressConfig, h as appState, aL as downloadAllFilesRequestHandler, aM as downloadAllFilesBinaryRequestHandler, J as BaseFileManager, H as toSnakeCase, s as models$1, r as modelUids, A as seeds, aB as normalizeAddressList, z as schemas, aK as loadModelsFromDbForSchema, aI as addSchemaToDb, aF as isInternalSchema, aN as INTERNAL_SCHEMA_IDS, $ as generateId, aO as linkModelToSchema, n as normalizeDataType, aq as SEED_PROTOCOL_SCHEMA_NAME, q as modelSchemas, m as metadata$1, u as properties, L as resolveItemModelFileId, C as versions, o as htmlEmbeddedImageCoPublish, j as arweaveL1FinalizeJobs, y as publishProcesses, X as normalizePublisher, aP as getWatchedAddressesFromDb, aQ as getOwnedAddressesFromDb, aR as CLIENT_NOT_INITIALIZED } from './BasePathResolver-Cm4apKRb.js';
2
+ import { E as BaseDb, l as easSyncProcesses, G as eventEmitter, a8 as isNode, ah as isBrowser, I as BasePathResolver, aA as normalizeAddressConfig, h as appState, aL as downloadAllFilesRequestHandler, aM as downloadAllFilesBinaryRequestHandler, J as BaseFileManager, H as toSnakeCase, s as models$1, r as modelUids, A as seeds, aB as normalizeAddressList, z as schemas, aK as loadModelsFromDbForSchema, aI as addSchemaToDb, aF as isInternalSchema, aN as INTERNAL_SCHEMA_IDS, $ as generateId, aO as linkModelToSchema, n as normalizeDataType, aq as SEED_PROTOCOL_SCHEMA_NAME, q as modelSchemas, m as metadata$1, u as properties, L as resolveItemModelFileId, C as versions, o as htmlEmbeddedImageCoPublish, j as arweaveL1FinalizeJobs, y as publishProcesses, X as normalizePublisher, aP as getWatchedAddressesFromDb, aQ as getOwnedAddressesFromDb, aR as CLIENT_NOT_INITIALIZED } from './BasePathResolver-DxdS0wJ0.js';
3
3
  import debug from 'debug';
4
4
  import { createActor, setup, assign, fromPromise, fromCallback, waitFor } from 'xstate';
5
- import { x as MachineIds, a2 as ClientManagerEvents, a3 as withLockedItemStorageRow, a4 as getItemStorageFilePath, a5 as writeItemStorageFile, c as compareMetadataRowsLatestFirst, C as ClientManagerState, a6 as resolvePublisherFromSeedRow, J as isLocalUnsealedDraft, I as Item } from './Item-DBFchXpC.js';
5
+ import { x as MachineIds, a2 as ClientManagerEvents, a3 as withLockedItemStorageRow, a4 as getItemStorageFilePath, a5 as writeItemStorageFile, c as compareMetadataRowsLatestFirst, C as ClientManagerState, a6 as resolvePublisherFromSeedRow, J as isLocalUnsealedDraft, I as Item } from './Item-cq9VcsAY.js';
6
6
  import { eq, inArray, and, isNotNull, ne, desc, countDistinct, isNull, or, like } from 'drizzle-orm';
7
- import { a as withDbTabLock, i as isLeaderTab, c as postTabMessage, o as onTabMessage, w as whenLeaderTab, l as listenForOtherTabsEvents, s as startTabCoordination, b as withSeedDbLock, p as parseAddressesPersistedPayload, e as emitAcrossTabs, A as ADDRESSES_PERSISTED_EVENT, L as LOCAL_COPIES_REMOVED_EVENT } from './tabEvents-9s2WCYw-.js';
7
+ import { a as withDbTabLock, i as isLeaderTab, c as postTabMessage, o as onTabMessage, w as whenLeaderTab, l as listenForOtherTabsEvents, s as startTabCoordination, b as withSeedDbLock, p as parseAddressesPersistedPayload, e as emitAcrossTabs, A as ADDRESSES_PERSISTED_EVENT, L as LOCAL_COPIES_REMOVED_EVENT } from './tabEvents-BTzckWrN.js';
8
8
  import { seedGatewayConfigFromSeedConfig, setPreferredArweaveReadBaseUrls, resolveSeedGatewayEndpoints, setResolvedSeedGatewayEndpoints, BaseArweaveClient, ensureReadGatewaySelected, DEFAULT_ARWEAVE_HOST } from '@seedprotocol/arweave';
9
9
  import { configureEasReadChain, BaseQueryClient, BaseEasClient, GET_SCHEMAS, whenEasReadChainSettled, getEasReadChainId, DEFAULT_EAS_CHAIN_ID, isEasReadChainConfigured, isValidEasAttestationUid } from '@seedprotocol/eas';
10
10
  import 'pluralize';
@@ -108,7 +108,7 @@ const runEasSync = fromPromise(async ({ input, }) => {
108
108
  requestPayload: input.requestPayload,
109
109
  persistedSnapshot: input.runningSnapshot,
110
110
  });
111
- const { runSyncFromEas } = await import('./syncDbWithEas-Bv2Fe38J.js');
111
+ const { runSyncFromEas } = await import('./syncDbWithEas-B-Ho0IOB.js');
112
112
  try {
113
113
  // Sync checks for rows and then inserts the rest (no unique index on uids), so syncs in
114
114
  // different tabs take turns. A sync can run for minutes, so wait without a timeout.
@@ -471,7 +471,7 @@ const platformClassesInit = fromCallback(({ sendBack, input: { context, event }
471
471
  }
472
472
  // Prefer the condition-resolved factory when available; fall back to explicit
473
473
  // platform imports so source/vitest resolution stays reliable.
474
- const { configurePlatform } = await import('./configurePlatform-D0lQGAMQ.js');
474
+ const { configurePlatform } = await import('./configurePlatform-DlZ23w7e.js');
475
475
  if (isBrowser()) {
476
476
  const { createPlatformServices } = await import('./platform.browser.js');
477
477
  configurePlatform(createPlatformServices());
@@ -732,12 +732,12 @@ const fileSystemInit = fromCallback(({ sendBack, input: { context }, }) => {
732
732
  const logger$9 = debug('seedSdk:client:actors:dbInit');
733
733
  const dbInit = fromCallback(({ sendBack, input: { context } }) => {
734
734
  const _dbInit = async () => {
735
- const { filesDir } = context;
735
+ const { filesDir, dbConfig } = context;
736
736
  if (!filesDir) {
737
737
  throw new Error('filesDir is required');
738
738
  }
739
739
  // Prepare databases - this handles all initialization, migration, and file setup
740
- await BaseDb.prepareDb(filesDir);
740
+ await BaseDb.prepareDb(filesDir, dbConfig);
741
741
  // Verify database is ready
742
742
  const appDb = BaseDb.getAppDb();
743
743
  if (!appDb) {
@@ -1378,7 +1378,8 @@ async function listCompleteSchemaFiles() {
1378
1378
  const schemas = [];
1379
1379
  for (const file of files) {
1380
1380
  // Match filename pattern: {schemaFileId}_{schemaName}_v{version}.json
1381
- const match = file.match(/^(.+)_(.+)_v(\d+)\.json$/);
1381
+ // Ids have no underscores but names can ("My_Schema"), so the id group stops at the first one
1382
+ const match = file.match(/^(.+?)_(.+)_v(\d+)\.json$/);
1382
1383
  if (match) {
1383
1384
  const [, schemaFileId, schemaName, versionStr] = match;
1384
1385
  const version = parseInt(versionStr, 10);
@@ -1752,11 +1753,9 @@ function getSchemaNameFromId(schemaId) {
1752
1753
  if (!schemaId) {
1753
1754
  return null;
1754
1755
  }
1755
- const lastDashIndex = schemaId.lastIndexOf('-');
1756
- if (lastDashIndex === -1 || lastDashIndex === 0 || lastDashIndex === schemaId.length - 1) {
1757
- return null;
1758
- }
1759
- return schemaId.substring(0, lastDashIndex);
1756
+ // Only a numeric version suffix: names may contain hyphens ("my-app" must stay "my-app").
1757
+ const match = /^(.+)-(\d+)$/.exec(schemaId);
1758
+ return match ? match[1] : null;
1760
1759
  }
1761
1760
 
1762
1761
  var schema = /*#__PURE__*/Object.freeze({
@@ -1873,8 +1872,8 @@ function getRefValueType(prop) {
1873
1872
  * @returns Promise that resolves when properties are found, or rejects if not found after max retries
1874
1873
  */
1875
1874
  const verifyPropertiesPersisted = async (db, modelId, modelName, maxRetries = 10, retryDelay = 100) => {
1876
- const _mod_0 = await import('./BasePathResolver-Cm4apKRb.js');
1877
- const _ns_0 = _mod_0.aZ;
1875
+ const _mod_0 = await import('./BasePathResolver-DxdS0wJ0.js');
1876
+ const _ns_0 = _mod_0.a_;
1878
1877
  const modelSchemaMod = _ns_0;
1879
1878
  const { properties: propertiesTable } = modelSchemaMod;
1880
1879
  const drizzleMod = await import('drizzle-orm');
@@ -2221,8 +2220,8 @@ async function importJsonSchema(importFilePathOrContents, version = 1) {
2221
2220
  // Check DB for existing schema by name+version (same as minimal path)
2222
2221
  const db = BaseDb.getAppDb();
2223
2222
  if (db) {
2224
- const _mod_1 = await import('./BasePathResolver-Cm4apKRb.js');
2225
- const _ns_1 = _mod_1.a$;
2223
+ const _mod_1 = await import('./BasePathResolver-DxdS0wJ0.js');
2224
+ const _ns_1 = _mod_1.b0;
2226
2225
  const schemaSchemaMod = _ns_1;
2227
2226
  const { schemas: schemasTable } = schemaSchemaMod;
2228
2227
  const drizzleMod = await import('drizzle-orm');
@@ -2306,8 +2305,8 @@ async function importJsonSchema(importFilePathOrContents, version = 1) {
2306
2305
  // For minimal imports: check DB for existing schema before creating new file
2307
2306
  const db = BaseDb.getAppDb();
2308
2307
  if (db) {
2309
- const _mod_2 = await import('./BasePathResolver-Cm4apKRb.js');
2310
- const _ns_2 = _mod_2.a$;
2308
+ const _mod_2 = await import('./BasePathResolver-DxdS0wJ0.js');
2309
+ const _ns_2 = _mod_2.b0;
2311
2310
  const schemaSchemaMod = _ns_2;
2312
2311
  const { schemas: schemasTable } = schemaSchemaMod;
2313
2312
  const drizzleMod = await import('drizzle-orm');
@@ -2485,8 +2484,8 @@ async function importJsonSchema(importFilePathOrContents, version = 1) {
2485
2484
  updatedAt: new Date(schemaFile.metadata.updatedAt).getTime(),
2486
2485
  };
2487
2486
  // Use dynamic import to break circular dependency
2488
- const _mod_3 = await import('./BasePathResolver-Cm4apKRb.js');
2489
- const _ns_3 = _mod_3.b2;
2487
+ const _mod_3 = await import('./BasePathResolver-DxdS0wJ0.js');
2488
+ const _ns_3 = _mod_3.b3;
2490
2489
  const dbMod = _ns_3;
2491
2490
  const { addSchemaToDb, addModelsToDb } = dbMod;
2492
2491
  // Try to add schema and models to database if database is available
@@ -2507,12 +2506,12 @@ async function importJsonSchema(importFilePathOrContents, version = 1) {
2507
2506
  });
2508
2507
  // Verify expected models are linked (single attempt - addModelsToDb already confirmed)
2509
2508
  const expectedModelNames = Object.keys(schemaFile.models || {});
2510
- const _mod_4 = await import('./BasePathResolver-Cm4apKRb.js');
2511
- const _ns_4 = _mod_4.b0;
2509
+ const _mod_4 = await import('./BasePathResolver-DxdS0wJ0.js');
2510
+ const _ns_4 = _mod_4.b1;
2512
2511
  const modelSchemaSchemaMod = _ns_4;
2513
2512
  const { modelSchemas } = modelSchemaSchemaMod;
2514
- const _mod_5 = await import('./BasePathResolver-Cm4apKRb.js');
2515
- const _ns_5 = _mod_5.aZ;
2513
+ const _mod_5 = await import('./BasePathResolver-DxdS0wJ0.js');
2514
+ const _ns_5 = _mod_5.a_;
2516
2515
  const modelSchemaMod = _ns_5;
2517
2516
  const { models: modelsTable } = modelSchemaMod;
2518
2517
  const drizzleMod = await import('drizzle-orm');
@@ -2710,8 +2709,8 @@ async function applySchemaToDb(schemaFile, modelDefinitions, modelFileIds, prope
2710
2709
  createdAt: new Date(schemaFile.metadata.createdAt).getTime(),
2711
2710
  updatedAt: new Date(schemaFile.metadata.updatedAt).getTime(),
2712
2711
  };
2713
- const _mod_6 = await import('./BasePathResolver-Cm4apKRb.js');
2714
- const _ns_6 = _mod_6.b2;
2712
+ const _mod_6 = await import('./BasePathResolver-DxdS0wJ0.js');
2713
+ const _ns_6 = _mod_6.b3;
2715
2714
  const dbMod = _ns_6;
2716
2715
  const { addSchemaToDb, addModelsToDb } = dbMod;
2717
2716
  const db = BaseDb.getAppDb();
@@ -2878,12 +2877,12 @@ const loadSchemaFromFile = async (schemaFilePath) => {
2878
2877
  ]));
2879
2878
  const { schemaRecord } = await applySchemaToDb(schemaFile, modelDefinitions, modelFileIds, propertyFileIds, propertyDefinitions);
2880
2879
  // Query the database to get model IDs that were just created
2881
- const _mod_7 = await import('./BasePathResolver-Cm4apKRb.js');
2882
- const _ns_7 = _mod_7.b0;
2880
+ const _mod_7 = await import('./BasePathResolver-DxdS0wJ0.js');
2881
+ const _ns_7 = _mod_7.b1;
2883
2882
  const modelSchemaSchemaMod = _ns_7;
2884
2883
  const { modelSchemas } = modelSchemaSchemaMod;
2885
- const _mod_8 = await import('./BasePathResolver-Cm4apKRb.js');
2886
- const _ns_8 = _mod_8.aZ;
2884
+ const _mod_8 = await import('./BasePathResolver-DxdS0wJ0.js');
2885
+ const _ns_8 = _mod_8.a_;
2887
2886
  const modelSchemaMod = _ns_8;
2888
2887
  const { models: modelsTable } = modelSchemaMod;
2889
2888
  const drizzleMod = await import('drizzle-orm');
@@ -2948,8 +2947,8 @@ const loadSchemaFromFile = async (schemaFilePath) => {
2948
2947
  // After properties are created (file path), ensure schemaFile has the correct IDs from database
2949
2948
  // Query the database to get the actual schemaFileId values that were used
2950
2949
  // This ensures schemaData matches what's actually in the database
2951
- const _mod_9 = await import('./BasePathResolver-Cm4apKRb.js');
2952
- const _ns_9 = _mod_9.aZ;
2950
+ const _mod_9 = await import('./BasePathResolver-DxdS0wJ0.js');
2951
+ const _ns_9 = _mod_9.a_;
2953
2952
  const modelSchemaMod2 = _ns_9;
2954
2953
  const { properties: propertiesTable } = modelSchemaMod2;
2955
2954
  let schemaFileUpdated = false;
@@ -2984,8 +2983,8 @@ const loadSchemaFromFile = async (schemaFilePath) => {
2984
2983
  // This is important even if nothing changed, to ensure consistency
2985
2984
  const updatedSchemaData = JSON.stringify(schemaFile, null, 2);
2986
2985
  // Update the schema record in the database with current schemaData
2987
- const _mod_10 = await import('./BasePathResolver-Cm4apKRb.js');
2988
- const _ns_10 = _mod_10.a$;
2986
+ const _mod_10 = await import('./BasePathResolver-DxdS0wJ0.js');
2987
+ const _ns_10 = _mod_10.b0;
2989
2988
  const schemaSchemaMod = _ns_10;
2990
2989
  const { schemas: schemasTable } = schemaSchemaMod;
2991
2990
  await db
@@ -3094,8 +3093,8 @@ const jsonPropertiesToSchemaProperties = (modelName, modelDef, propertyFileIds)
3094
3093
  */
3095
3094
  const createModelFromJson = async (modelName, modelDef, schemaName, modelFileId, // Optional modelFileId from JSON file
3096
3095
  propertyFileIds) => {
3097
- const _mod_11 = await import('./index-8O3Uow-Y.js');
3098
- const _ns_11 = _mod_11.f;
3096
+ const _mod_11 = await import('./errors-Cl8rbtKR.js');
3097
+ const _ns_11 = _mod_11.h;
3099
3098
  const modelMod = _ns_11;
3100
3099
  const { Model } = modelMod;
3101
3100
  const convertedProperties = jsonPropertiesToSchemaProperties(modelName, modelDef, propertyFileIds);
@@ -5152,4 +5151,4 @@ var ClientManager$1 = /*#__PURE__*/Object.freeze({
5152
5151
  });
5153
5152
 
5154
5153
  export { requestEasSyncFromModelsInit as A, sendEasSyncClientRequest as B, ClientManager as C, startEasSyncActor as D, EAS_CHAIN_ID_APP_STATE_KEY as E, unregisterSeedQueryLocalSource as F, createModelsFromJson as G, getLatestSchemaVersion as H, INIT_CONFIG_CONFLICT_MESSAGE as I, jsonPropertiesToSchemaProperties as J, schema as K, ClientManager$1 as L, SEEDPROTOCOL_Seed_Protocol_v1 as S, assertLocalDbChain as a, importJsonSchema as b, convertVerbatimItemStorageRow as c, getContentHash as d, claimUnpublishedDrafts as e, createLocalQueryDataSource as f, getRefValueType as g, createSchema as h, isVerbatimItemStorageDraftRow as i, easSyncActor as j, getClient as k, loadSchemaFromFile as l, getPublishedSeedRecord as m, getSchemaNameFromId as n, isSeedQueryLocalSourceRegistered as o, listCompleteSchemaFiles as p, loadAllSchemasFromDb as q, readJsonImportFile as r, syncSchemaFromSource as s, transformImportToSchemaFile as t, mergeEasSyncRequestIntents as u, readSchema as v, waitForEasReadChain as w, registerSeedQueryLocalSource as x, requestEasSyncFromAddressChange as y, requestEasSyncFromEventBus as z };
5155
- //# sourceMappingURL=ClientManager-i3nJASkg.js.map
5154
+ //# sourceMappingURL=ClientManager-De-vKHGe.js.map