@seedprotocol/sdk 0.7.9 → 0.7.10-next.1344.g3828e8a

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 (126) hide show
  1. package/README.md +1 -1
  2. package/dist/{BaseFileManager-BAlySv8w.js → BaseFileManager-DLou1TZS.js} +5 -1
  3. package/dist/BaseFileManager-DLou1TZS.js.map +1 -0
  4. package/dist/{Item-Bf4kWKpH.js → Item-CXLcIHsi.js} +559 -346
  5. package/dist/Item-CXLcIHsi.js.map +1 -0
  6. package/dist/{ModelProperty-BlaEgb_U.js → ModelProperty-B3mfR6u4.js} +35 -35
  7. package/dist/{ModelProperty-BlaEgb_U.js.map → ModelProperty-B3mfR6u4.js.map} +1 -1
  8. package/dist/{Schema-J_1f6p0c.js → Schema-BeUyEmte.js} +18 -18
  9. package/dist/{Schema-J_1f6p0c.js.map → Schema-BeUyEmte.js.map} +1 -1
  10. package/dist/{SchemaValidationService-CnmKyzR-.js → SchemaValidationService-C1xqJFxI.js} +5 -5
  11. package/dist/{SchemaValidationService-CnmKyzR-.js.map → SchemaValidationService-C1xqJFxI.js.map} +1 -1
  12. package/dist/{errors-C1qUEZ7A.js → browserSupport-C64rX-2I.js} +38 -2
  13. package/dist/browserSupport-C64rX-2I.js.map +1 -0
  14. package/dist/{configurePlatform-CiOJ1R3q.js → configurePlatform-WkmvqeTO.js} +2 -2
  15. package/dist/{configurePlatform-CiOJ1R3q.js.map → configurePlatform-WkmvqeTO.js.map} +1 -1
  16. package/dist/{detachRowsBeforeDelete-sEaUwlOU.js → detachRowsBeforeDelete-BZr_0iZU.js} +2 -2
  17. package/dist/{detachRowsBeforeDelete-sEaUwlOU.js.map → detachRowsBeforeDelete-BZr_0iZU.js.map} +1 -1
  18. package/dist/dist/{BaseFileManager-BAlySv8w.d.ts → BaseFileManager-DLou1TZS.d.ts} +3 -1
  19. package/dist/dist/BaseFileManager-DLou1TZS.d.ts.map +1 -0
  20. package/dist/dist/{configurePlatform-CiOJ1R3q.d.ts → configurePlatform-WkmvqeTO.d.ts} +1 -1
  21. package/dist/dist/configurePlatform-WkmvqeTO.d.ts.map +1 -0
  22. package/dist/dist/{index-D0V-mjCV.d.ts → index-BjWk0x4-.d.ts} +1 -1
  23. package/dist/dist/{index-D0V-mjCV.d.ts.map → index-BjWk0x4-.d.ts.map} +1 -1
  24. package/dist/dist/{index.node-CYPemH-t.d.ts → index.node-BfiBriEq.d.ts} +7 -1
  25. package/dist/dist/{index.node-CYPemH-t.d.ts.map → index.node-BfiBriEq.d.ts.map} +1 -1
  26. package/dist/dist/platform.node.d.ts +2 -2
  27. package/dist/{eas-wB_fQ8Tc.js → eas-DpHg66jR.js} +5 -5
  28. package/dist/{eas-wB_fQ8Tc.js.map → eas-DpHg66jR.js.map} +1 -1
  29. package/dist/{errors-DLSoqSHG.js → errors-DpC9W4i3.js} +84 -45
  30. package/dist/{errors-DLSoqSHG.js.map → errors-DpC9W4i3.js.map} +1 -1
  31. package/dist/{getPublishPayload-BnIwpwz1.js → getPublishPayload-yidQCgY_.js} +8 -8
  32. package/dist/{getPublishPayload-BnIwpwz1.js.map → getPublishPayload-yidQCgY_.js.map} +1 -1
  33. package/dist/{getPublishPendingDiff-D6_-A5ns.js → getPublishPendingDiff-D__9bh6d.js} +7 -7
  34. package/dist/{getPublishPendingDiff-D6_-A5ns.js.map → getPublishPendingDiff-D__9bh6d.js.map} +1 -1
  35. package/dist/{getPublishUploads-sS6JfPgz.js → getPublishUploads-BdZmYCo2.js} +7 -7
  36. package/dist/{getPublishUploads-sS6JfPgz.js.map → getPublishUploads-BdZmYCo2.js.map} +1 -1
  37. package/dist/{index-CYGWPoOx.js → index-BMHqJ4kN.js} +7 -7
  38. package/dist/index-BMHqJ4kN.js.map +1 -0
  39. package/dist/{index-D0V-mjCV.js → index-BjWk0x4-.js} +2 -2
  40. package/dist/index-BjWk0x4-.js.map +1 -0
  41. package/dist/{index-DmTtj1nk.js → index-CVYB2g7a.js} +402 -20
  42. package/dist/index-CVYB2g7a.js.map +1 -0
  43. package/dist/{index-BVBmz_cc.js → index-uDLe9y9H.js} +7 -7
  44. package/dist/index-uDLe9y9H.js.map +1 -0
  45. package/dist/{index.browser-CUmBVYen.js → index.browser-OACFlpMH.js} +46 -10
  46. package/dist/index.browser-OACFlpMH.js.map +1 -0
  47. package/dist/{index.node-CYPemH-t.js → index.node-BfiBriEq.js} +31 -4
  48. package/dist/index.node-BfiBriEq.js.map +1 -0
  49. package/dist/main.js +17 -16
  50. package/dist/main.js.map +1 -1
  51. package/dist/{modelPropertyRecordSchemas-C7UgA5TH.js → modelPropertyRecordSchemas-BGvtTyaG.js} +5 -5
  52. package/dist/{modelPropertyRecordSchemas-C7UgA5TH.js.map → modelPropertyRecordSchemas-BGvtTyaG.js.map} +1 -1
  53. package/dist/node.js +8 -8
  54. package/dist/platform.browser.js +6 -6
  55. package/dist/platform.node.js +4 -4
  56. package/dist/{property-BxUYznH0.js → property-QjljUeb9.js} +8 -8
  57. package/dist/{property-BxUYznH0.js.map → property-QjljUeb9.js.map} +1 -1
  58. package/dist/{publishGraph-EcB40Uii.js → publishGraph-CP8IROkb.js} +5 -5
  59. package/dist/{publishGraph-EcB40Uii.js.map → publishGraph-CP8IROkb.js.map} +1 -1
  60. package/dist/{readHtmlBodyForStorageSeed-D6KPtWoR.js → readHtmlBodyForStorageSeed-D3OPk2iU.js} +10 -10
  61. package/dist/{readHtmlBodyForStorageSeed-D6KPtWoR.js.map → readHtmlBodyForStorageSeed-D3OPk2iU.js.map} +1 -1
  62. package/dist/src/Item/Item.d.ts +26 -5
  63. package/dist/src/Item/Item.d.ts.map +1 -1
  64. package/dist/src/ItemProperty/ItemProperty.d.ts +20 -5
  65. package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
  66. package/dist/src/ItemProperty/loadProperty.d.ts.map +1 -1
  67. package/dist/src/ItemProperty/propertyWrite.d.ts.map +1 -1
  68. package/dist/src/ItemProperty/service/actors/hydrateFromDb.d.ts.map +1 -1
  69. package/dist/src/archive/exportArchive.d.ts +57 -0
  70. package/dist/src/archive/exportArchive.d.ts.map +1 -0
  71. package/dist/src/browser/db/Db.d.ts +5 -0
  72. package/dist/src/browser/db/Db.d.ts.map +1 -1
  73. package/dist/src/browser/helpers/FileManager.d.ts.map +1 -1
  74. package/dist/src/browser/helpers/tolerantWebAccess.d.ts +12 -1
  75. package/dist/src/browser/helpers/tolerantWebAccess.d.ts.map +1 -1
  76. package/dist/src/client/ClientManager.d.ts +14 -4
  77. package/dist/src/client/ClientManager.d.ts.map +1 -1
  78. package/dist/src/db/Db/BaseDb.d.ts +2 -0
  79. package/dist/src/db/Db/BaseDb.d.ts.map +1 -1
  80. package/dist/src/helpers/FileManager/errors.d.ts +11 -0
  81. package/dist/src/helpers/FileManager/errors.d.ts.map +1 -1
  82. package/dist/src/helpers/browserSupport.d.ts +23 -0
  83. package/dist/src/helpers/browserSupport.d.ts.map +1 -0
  84. package/dist/src/helpers/cachedPropertyRefresh.d.ts +6 -6
  85. package/dist/src/helpers/cachedPropertyRefresh.d.ts.map +1 -1
  86. package/dist/src/helpers/entity/entityCache.d.ts +34 -3
  87. package/dist/src/helpers/entity/entityCache.d.ts.map +1 -1
  88. package/dist/src/helpers/entity/entityLifecycle.d.ts +21 -3
  89. package/dist/src/helpers/entity/entityLifecycle.d.ts.map +1 -1
  90. package/dist/src/helpers/propertyDefinition.d.ts +2 -0
  91. package/dist/src/helpers/propertyDefinition.d.ts.map +1 -1
  92. package/dist/src/helpers/tabCoordinator.d.ts +9 -2
  93. package/dist/src/helpers/tabCoordinator.d.ts.map +1 -1
  94. package/dist/src/index.d.ts +4 -1
  95. package/dist/src/index.d.ts.map +1 -1
  96. package/dist/src/interfaces/IDb.d.ts +6 -0
  97. package/dist/src/interfaces/IDb.d.ts.map +1 -1
  98. package/dist/src/node/db/Db.d.ts +6 -0
  99. package/dist/src/node/db/Db.d.ts.map +1 -1
  100. package/dist/src/outbox/conflicts.d.ts.map +1 -1
  101. package/dist/src/outbox/outbox.d.ts +6 -0
  102. package/dist/src/outbox/outbox.d.ts.map +1 -1
  103. package/dist/src/types/index.d.ts +16 -0
  104. package/dist/src/types/index.d.ts.map +1 -1
  105. package/dist/{syncDbWithEas-CA7PvBgu.js → syncDbWithEas-CDjSNrVR.js} +14 -14
  106. package/dist/{syncDbWithEas-CA7PvBgu.js.map → syncDbWithEas-CDjSNrVR.js.map} +1 -1
  107. package/dist/{tabEvents-CaVmngqr.js → tabEvents-BHPY5I08.js} +38 -12
  108. package/dist/tabEvents-BHPY5I08.js.map +1 -0
  109. package/dist/{tolerantWebAccess-BJqViq08.js → tolerantWebAccess-hDq9ZGXH.js} +53 -13
  110. package/dist/tolerantWebAccess-hDq9ZGXH.js.map +1 -0
  111. package/dist/{updateSeedRevokedAt-BL9Bg-G7.js → updateSeedRevokedAt-BMwBnlnC.js} +3 -3
  112. package/dist/{updateSeedRevokedAt-BL9Bg-G7.js.map → updateSeedRevokedAt-BMwBnlnC.js.map} +1 -1
  113. package/package.json +10 -12
  114. package/dist/BaseFileManager-BAlySv8w.js.map +0 -1
  115. package/dist/Item-Bf4kWKpH.js.map +0 -1
  116. package/dist/dist/BaseFileManager-BAlySv8w.d.ts.map +0 -1
  117. package/dist/dist/configurePlatform-CiOJ1R3q.d.ts.map +0 -1
  118. package/dist/errors-C1qUEZ7A.js.map +0 -1
  119. package/dist/index-BVBmz_cc.js.map +0 -1
  120. package/dist/index-CYGWPoOx.js.map +0 -1
  121. package/dist/index-D0V-mjCV.js.map +0 -1
  122. package/dist/index-DmTtj1nk.js.map +0 -1
  123. package/dist/index.browser-CUmBVYen.js.map +0 -1
  124. package/dist/index.node-CYPemH-t.js.map +0 -1
  125. package/dist/tabEvents-CaVmngqr.js.map +0 -1
  126. package/dist/tolerantWebAccess-BJqViq08.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { setup, assign, createActor } from 'xstate';
2
- import { T as applyContextUpdate, U as isInternalUpdate, V as evictionLog, W as holdChild, X as isEntityTornDown, Y as sameEntity, Z as DEFAULT_READY_TIMEOUT_MS, _ as waitForEntityReady, $ as createReactiveProxy, a0 as runEntityLoad, a1 as evictEntities, a2 as entityStatus, a3 as releaseEntity, a4 as destroyEntity, a5 as EntityCache } from './Item-Bf4kWKpH.js';
3
- import { SchemaValidationService } from './SchemaValidationService-CnmKyzR-.js';
4
- import { m as listLatestSchemaFiles, n as readSchemaFile, o as applySchemaFile, p as resolveSchemaRow, S as SCHEMA_FILE_FORMAT, q as loadAllSchemasFromDb, M as Model, u as getDraftSaveError, C as ConflictError, w as writeNextSchemaVersion, v as queueDraftSave, x as setupEntityLiveQuery, y as mergeSchemaFiles, z as trackDraftSave } from './errors-DLSoqSHG.js';
5
- import { B as BaseDb, t as schemas, d as models, j as modelSchemas, l as properties, w as BaseFileManager } from './BaseFileManager-BAlySv8w.js';
2
+ import { T as applyContextUpdate, U as isInternalUpdate, V as evictionLog, W as holdChild, X as isEntityTornDown, Y as sameEntity, Z as DEFAULT_READY_TIMEOUT_MS, _ as waitForEntityReady, $ as createReactiveProxy, a0 as runEntityLoad, a1 as evictEntities, a2 as entityStatus, a3 as releaseEntity, a4 as destroyEntity, a5 as EntityCache } from './Item-CXLcIHsi.js';
3
+ import { SchemaValidationService } from './SchemaValidationService-C1xqJFxI.js';
4
+ import { m as listLatestSchemaFiles, n as readSchemaFile, o as applySchemaFile, p as resolveSchemaRow, S as SCHEMA_FILE_FORMAT, q as loadAllSchemasFromDb, M as Model, u as getDraftSaveError, C as ConflictError, w as writeNextSchemaVersion, v as queueDraftSave, x as setupEntityLiveQuery, y as mergeSchemaFiles, z as trackDraftSave } from './errors-DpC9W4i3.js';
5
+ import { B as BaseDb, t as schemas, d as models, j as modelSchemas, l as properties, w as BaseFileManager } from './BaseFileManager-DLou1TZS.js';
6
6
  import { eq, desc, and, inArray } from 'drizzle-orm';
7
- import { S as SEED_PROTOCOL_SCHEMA_NAME, I as INTERNAL_SCHEMA_IDS, m as generateId, o as addSchemaToDb, p as isInternalSchema, q as inDefinitionsTransaction, s as isClientReady, u as upsertSchemaRow, t as broadcastSchemasInvalidate } from './tabEvents-CaVmngqr.js';
7
+ import { S as SEED_PROTOCOL_SCHEMA_NAME, I as INTERNAL_SCHEMA_IDS, m as generateId, o as addSchemaToDb, p as isInternalSchema, q as inDefinitionsTransaction, s as isClientReady, u as upsertSchemaRow, t as broadcastSchemasInvalidate } from './tabEvents-BHPY5I08.js';
8
8
  import '@seedprotocol/arweave';
9
9
  import 'pluralize';
10
10
  import '@seedprotocol/eas';
@@ -196,7 +196,7 @@ const createModelInstances = async (modelIds, since, owner) => {
196
196
  return;
197
197
  }
198
198
  try {
199
- const _mod_0 = await import('./errors-DLSoqSHG.js');
199
+ const _mod_0 = await import('./errors-DpC9W4i3.js');
200
200
  const _ns_0 = _mod_0.a4;
201
201
  const mod = _ns_0;
202
202
  const Model = mod?.Model ?? mod?.default;
@@ -248,7 +248,7 @@ const findSchemaRow = async (db, schemaName) => {
248
248
  */
249
249
  const createSchema = async (schemaName) => {
250
250
  if (schemaName === SEED_PROTOCOL_SCHEMA_NAME) {
251
- const _mod_1 = await import('./errors-DLSoqSHG.js');
251
+ const _mod_1 = await import('./errors-DpC9W4i3.js');
252
252
  const _ns_1 = _mod_1.a6;
253
253
  const internalSchema = _ns_1;
254
254
  const { schemaFile, schemaRecord } = await applySchemaFile(internalSchema.default, {
@@ -874,8 +874,8 @@ class Schema {
874
874
  */
875
875
  async _buildModelsFromInstances() {
876
876
  const context = this._getSnapshotContext();
877
- const _mod_2 = await import('./index-DmTtj1nk.js');
878
- const _ns_2 = _mod_2.j;
877
+ const _mod_2 = await import('./index-CVYB2g7a.js');
878
+ const _ns_2 = _mod_2.k;
879
879
  const { convertPropertyToSchemaUpdate } = _ns_2;
880
880
  const models = {};
881
881
  for (const modelInstance of this.models) {
@@ -890,7 +890,7 @@ class Schema {
890
890
  const modelDbId = modelInstance.getService().getSnapshot().context._dbId;
891
891
  const db = BaseDb.getAppDb();
892
892
  if (propertyContexts.length === 0 && modelDbId && db) {
893
- const { ModelProperty } = await import('./ModelProperty-BlaEgb_U.js');
893
+ const { ModelProperty } = await import('./ModelProperty-B3mfR6u4.js');
894
894
  const rows = await db.select().from(properties).where(eq(properties.modelId, modelDbId));
895
895
  propertyContexts = rows.map((row) => {
896
896
  const cached = row.schemaFileId ? ModelProperty.getById(row.schemaFileId) : undefined;
@@ -1019,7 +1019,7 @@ class Schema {
1019
1019
  });
1020
1020
  // Clear edited flags on the cached ModelProperty instances of the edited keys, then on the rows
1021
1021
  // (schema, those properties, the schema's models) in one transaction.
1022
- const { ModelProperty } = await import('./ModelProperty-BlaEgb_U.js');
1022
+ const { ModelProperty } = await import('./ModelProperty-B3mfR6u4.js');
1023
1023
  const thisSchemaName = this.schemaName;
1024
1024
  const clearedKeys = [];
1025
1025
  for (const propertyKey of context._editedProperties) {
@@ -1038,8 +1038,8 @@ class Schema {
1038
1038
  cachedInstance.getService().send({ type: 'clearEdited' });
1039
1039
  clearedKeys.push({ modelName, propertyName });
1040
1040
  }
1041
- const _mod_3 = await import('./tabEvents-CaVmngqr.js');
1042
- const _ns_3 = _mod_3.be;
1041
+ const _mod_3 = await import('./tabEvents-BHPY5I08.js');
1042
+ const _ns_3 = _mod_3.bh;
1043
1043
  const { resolveModelRecord } = _ns_3;
1044
1044
  await inDefinitionsTransaction(async (tx) => {
1045
1045
  await tx
@@ -1315,10 +1315,10 @@ class Schema {
1315
1315
  // instances too, or a re-import would get them back with dangling _dbIds.
1316
1316
  if (schemaName) {
1317
1317
  const evictedModelNames = Model.evictForSchema(schemaName);
1318
- const { ModelProperty } = await import('./ModelProperty-BlaEgb_U.js');
1318
+ const { ModelProperty } = await import('./ModelProperty-B3mfR6u4.js');
1319
1319
  ModelProperty.evictForModels(evictedModelNames, schemaName);
1320
1320
  // Evicting stops new writes but not ones already running; let those land before deleting their rows
1321
- const _mod_4 = await import('./errors-DLSoqSHG.js');
1321
+ const _mod_4 = await import('./errors-DpC9W4i3.js');
1322
1322
  const _ns_4 = _mod_4.a3;
1323
1323
  const { waitForInFlightWrites } = _ns_4;
1324
1324
  await waitForInFlightWrites();
@@ -1327,7 +1327,7 @@ class Schema {
1327
1327
  const db = BaseDb.getAppDb();
1328
1328
  if (!db || !schemaFileId)
1329
1329
  return;
1330
- const { detachModelRows } = await import('./detachRowsBeforeDelete-sEaUwlOU.js');
1330
+ const { detachModelRows } = await import('./detachRowsBeforeDelete-BZr_0iZU.js');
1331
1331
  // The schema's rows go together or not at all
1332
1332
  const deleted = await inDefinitionsTransaction(async (tx) => {
1333
1333
  const schemaRecords = await tx
@@ -1368,7 +1368,7 @@ class Schema {
1368
1368
  // the destroyed schema back on the next Schema.all().
1369
1369
  // Match on name as well as id: versions imported from complete schema files can each
1370
1370
  // have their own id, and any version left behind would bring the schema back.
1371
- const _mod_5 = await import('./errors-DLSoqSHG.js');
1371
+ const _mod_5 = await import('./errors-DpC9W4i3.js');
1372
1372
  const _ns_5 = _mod_5.a5;
1373
1373
  const { listCompleteSchemaFiles } = _ns_5;
1374
1374
  const files = await listCompleteSchemaFiles().catch(() => []);
@@ -1453,4 +1453,4 @@ var Schema$1 = /*#__PURE__*/Object.freeze({
1453
1453
  });
1454
1454
 
1455
1455
  export { Schema as S, Schema$1 as a, schemaMachine as s };
1456
- //# sourceMappingURL=Schema-J_1f6p0c.js.map
1456
+ //# sourceMappingURL=Schema-BeUyEmte.js.map