@seedprotocol/sdk 0.2.27 → 0.2.29

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 (46) hide show
  1. package/dist/ArweaveClient-C-HZgUWJ.js +13 -0
  2. package/dist/ArweaveClient-C-HZgUWJ.js.map +1 -0
  3. package/dist/ArweaveClient-rTTCUjiu.js +13 -0
  4. package/dist/ArweaveClient-rTTCUjiu.js.map +1 -0
  5. package/dist/{Db-Dk-X1anD.js → Db-Bu5Y7_fn.js} +3 -3
  6. package/dist/{Db-Dk-X1anD.js.map → Db-Bu5Y7_fn.js.map} +1 -1
  7. package/dist/{Db-BXj7xeIK.js → Db-lX4nNJTb.js} +3 -3
  8. package/dist/{Db-BXj7xeIK.js.map → Db-lX4nNJTb.js.map} +1 -1
  9. package/dist/{EasClient-BGQRv2-M.js → EasClient-CKv5Eyao.js} +2 -2
  10. package/dist/{EasClient-BGQRv2-M.js.map → EasClient-CKv5Eyao.js.map} +1 -1
  11. package/dist/{EasClient-Bbxr5rcF.js → EasClient-nvmz2kCc.js} +2 -2
  12. package/dist/{EasClient-Bbxr5rcF.js.map → EasClient-nvmz2kCc.js.map} +1 -1
  13. package/dist/{FileManager-D-yaDuSt.js → FileManager-Bm_fGCH1.js} +2 -2
  14. package/dist/{FileManager-D-yaDuSt.js.map → FileManager-Bm_fGCH1.js.map} +1 -1
  15. package/dist/{FileManager-CYXquukS.js → FileManager-EGwM_VHY.js} +2 -2
  16. package/dist/{FileManager-CYXquukS.js.map → FileManager-EGwM_VHY.js.map} +1 -1
  17. package/dist/{Item-DXgQOWw4.js → Item-BRHX17yq.js} +3 -3
  18. package/dist/{Item-DXgQOWw4.js.map → Item-BRHX17yq.js.map} +1 -1
  19. package/dist/{ItemProperty-Dmpm-jKr.js → ItemProperty-CZzIP1b8.js} +3 -3
  20. package/dist/{ItemProperty-Dmpm-jKr.js.map → ItemProperty-CZzIP1b8.js.map} +1 -1
  21. package/dist/{QueryClient-Dk66c5aw.js → QueryClient-CkqXe8Nk.js} +2 -2
  22. package/dist/{QueryClient-Dk66c5aw.js.map → QueryClient-CkqXe8Nk.js.map} +1 -1
  23. package/dist/{QueryClient-CY_4gVB3.js → QueryClient-pzZAYWa0.js} +2 -2
  24. package/dist/{QueryClient-CY_4gVB3.js.map → QueryClient-pzZAYWa0.js.map} +1 -1
  25. package/dist/bin.js +6 -12
  26. package/dist/bin.js.map +1 -1
  27. package/dist/{constants-CuI_qYXt.js → constants-BjOTXEgm.js} +2 -2
  28. package/dist/{constants-CuI_qYXt.js.map → constants-BjOTXEgm.js.map} +1 -1
  29. package/dist/{index-CreT8SAL.js → index-BCmsQoYg.js} +26 -19
  30. package/dist/index-BCmsQoYg.js.map +1 -0
  31. package/dist/{index-hIQeW9Wa.js → index-DzDVTUae.js} +3 -3
  32. package/dist/index-DzDVTUae.js.map +1 -0
  33. package/dist/main.js +2 -2
  34. package/dist/{seed.schema.config-CVCqLN-b.js → seed.schema.config-BswsDyRe.js} +3 -3
  35. package/dist/{seed.schema.config-CVCqLN-b.js.map → seed.schema.config-BswsDyRe.js.map} +1 -1
  36. package/dist/src/actors.ts +34 -272
  37. package/dist/src/client.ts +2 -1
  38. package/dist/src/download.ts +0 -4
  39. package/dist/src/getPublishPayload.ts +2 -1
  40. package/dist/src/waitForDb.ts +17 -18
  41. package/dist/types/src/client.d.ts.map +1 -1
  42. package/dist/types/src/db/read/getPublishPayload.d.ts.map +1 -1
  43. package/dist/types/src/events/files/download.d.ts.map +1 -1
  44. package/package.json +1 -1
  45. package/dist/index-CreT8SAL.js.map +0 -1
  46. package/dist/index-hIQeW9Wa.js.map +0 -1
@@ -10,7 +10,7 @@ import * as nanoIdDictionary from 'nanoid-dictionary';
10
10
  import fs$1, { fs, configureSingle } from '@zenfs/core';
11
11
  import debug from 'debug';
12
12
  import { sqliteTable, text, int, blob, check, unique } from 'drizzle-orm/sqlite-core';
13
- import { a as BaseQueryClient, B as BaseEasClient, I as INTERNAL_DATA_TYPES, G as GLOBAL_INITIALIZING_INTERNAL_SERVICE_READY, e as GLOBAL_INITIALIZING_SEND_CONFIG, f as GLOBAL_INITIALIZING_CREATE_ALL_ITEMS_SERVICES, g as GLOBAL_ADDING_MODELS_TO_DB_SUCCESS, D as DB_CHECK_STATUS_UPDATE_PATHS, h as DB_CHECK_STATUS_EXISTS, i as BROWSER_FS_TOP_DIR, j as DB_CREATING_SUCCESS, k as DB_VALIDATING_SUCCESS, l as DB_VALIDATING_WAIT, m as DB_MIGRATING_SUCCESS, M as MachineIds, n as DB_WAITING_FOR_FILES_RECEIVED, o as DB_MIGRATING_WAIT, p as DbState, q as INTERNAL_VALIDATING_INPUT_SUCCESS, r as ARWEAVE_HOST, c as BaseArweaveClient, s as INTERNAL_CONFIGURING_FS_SUCCESS, t as INTERNAL_SAVING_CONFIG_SUCCESS, u as INTERNAL_LOADING_APP_DB_SUCCESS, v as DB_ON_SNAPSHOT, w as DB_NAME_APP, x as InternalState, P as PublishMachineStates, y as GlobalState, b as BaseFileManager, z as internalPropertyNames, V as VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA, C as defaultAttestationData } from './constants-CuI_qYXt.js';
13
+ import { b as BaseQueryClient, a as BaseEasClient, I as INTERNAL_DATA_TYPES, G as GLOBAL_INITIALIZING_INTERNAL_SERVICE_READY, e as GLOBAL_INITIALIZING_SEND_CONFIG, f as GLOBAL_INITIALIZING_CREATE_ALL_ITEMS_SERVICES, g as GLOBAL_ADDING_MODELS_TO_DB_SUCCESS, D as DB_CHECK_STATUS_UPDATE_PATHS, h as DB_CHECK_STATUS_EXISTS, i as BROWSER_FS_TOP_DIR, j as DB_CREATING_SUCCESS, k as DB_VALIDATING_SUCCESS, l as DB_VALIDATING_WAIT, m as DB_MIGRATING_SUCCESS, M as MachineIds, n as DB_WAITING_FOR_FILES_RECEIVED, o as DB_MIGRATING_WAIT, p as DbState, q as INTERNAL_VALIDATING_INPUT_SUCCESS, r as ARWEAVE_HOST, B as BaseArweaveClient, s as INTERNAL_CONFIGURING_FS_SUCCESS, t as INTERNAL_SAVING_CONFIG_SUCCESS, u as INTERNAL_LOADING_APP_DB_SUCCESS, v as DB_ON_SNAPSHOT, w as DB_NAME_APP, x as InternalState, P as PublishMachineStates, y as GlobalState, c as BaseFileManager, z as internalPropertyNames, V as VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA, C as defaultAttestationData } from './constants-BjOTXEgm.js';
14
14
  import { fromCallback, setup, assign, waitFor, createActor, raise } from 'xstate';
15
15
  import pluralize from 'pluralize';
16
16
  import EventEmitter from 'eventemitter3';
@@ -134,7 +134,7 @@ const initItem = () => __awaiter(void 0, void 0, void 0, function* () {
134
134
  Item$2 = (yield Promise.resolve().then(function () { return Item$1; })).Item;
135
135
  }
136
136
  if (!isBrowser()) {
137
- Item$2 = (yield import('./Item-DXgQOWw4.js')).Item;
137
+ Item$2 = (yield import('./Item-BRHX17yq.js')).Item;
138
138
  }
139
139
  });
140
140
 
@@ -184,17 +184,17 @@ const initItemProperty = () => __awaiter(void 0, void 0, void 0, function* () {
184
184
  ItemProperty$2 = (yield Promise.resolve().then(function () { return ItemProperty$1; })).ItemProperty;
185
185
  }
186
186
  if (!isBrowser()) {
187
- ItemProperty$2 = (yield import('./ItemProperty-Dmpm-jKr.js')).ItemProperty;
187
+ ItemProperty$2 = (yield import('./ItemProperty-CZzIP1b8.js')).ItemProperty;
188
188
  }
189
189
  });
190
190
 
191
191
  let Db;
192
192
  const initDb = () => __awaiter(void 0, void 0, void 0, function* () {
193
193
  if (isBrowser()) {
194
- Db = (yield import('./Db-Dk-X1anD.js')).Db;
194
+ Db = (yield import('./Db-Bu5Y7_fn.js')).Db;
195
195
  }
196
196
  if (!isBrowser()) {
197
- Db = (yield import('./Db-BXj7xeIK.js')).Db;
197
+ Db = (yield import('./Db-lX4nNJTb.js')).Db;
198
198
  }
199
199
  // TODO: Add config for React Native
200
200
  });
@@ -1696,7 +1696,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
1696
1696
  if (!models$1) {
1697
1697
  return;
1698
1698
  }
1699
- const { models: SeedModels } = yield import('./seed.schema.config-CVCqLN-b.js');
1699
+ const { models: SeedModels } = yield import('./seed.schema.config-BswsDyRe.js');
1700
1700
  const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
1701
1701
  let hasModelsInDb = false;
1702
1702
  const schemaDefsByModelName = new Map();
@@ -2576,6 +2576,14 @@ const saveAppState = (key, value) => __awaiter(void 0, void 0, void 0, function*
2576
2576
  });
2577
2577
  });
2578
2578
 
2579
+ const initArweaveClient = () => __awaiter(void 0, void 0, void 0, function* () {
2580
+ if (isBrowser()) {
2581
+ (yield import('./ArweaveClient-rTTCUjiu.js')).ArweaveClient;
2582
+ }
2583
+ if (!isBrowser()) {
2584
+ (yield import('./ArweaveClient-C-HZgUWJ.js')).ArweaveClient;
2585
+ }
2586
+ });
2579
2587
  let domain = 'arweave.net';
2580
2588
  const getArweave = () => {
2581
2589
  if (typeof window === 'undefined' ||
@@ -2707,9 +2715,6 @@ const downloadAllFilesBinaryRequestHandler = () => __awaiter(void 0, void 0, voi
2707
2715
  yield saveAppState('excludedTransactions', JSON.stringify(Array.from(excludedTransactions)));
2708
2716
  continue;
2709
2717
  }
2710
- if (transactionId === 'ZXnDkNk_PHRl5Yqu90kEJn_R3LS3Tl9P8eLtlJTqB-M') {
2711
- console.log('transactionId', transactionId);
2712
- }
2713
2718
  const arweaveClient = BaseArweaveClient.getArweaveClient();
2714
2719
  const { tags: tagsResult } = yield queryClient.fetchQuery({
2715
2720
  queryKey: ['getTransactionTags', transactionId],
@@ -5517,7 +5522,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
5517
5522
  if (propertyRecordSchema &&
5518
5523
  propertyRecordSchema.storageType &&
5519
5524
  propertyRecordSchema.storageType === 'ItemStorage') {
5520
- const { Item } = yield import('./index-hIQeW9Wa.js');
5525
+ const { Item } = yield import('./index-DzDVTUae.js');
5521
5526
  const item = yield Item.find({
5522
5527
  seedLocalId,
5523
5528
  modelName,
@@ -6980,7 +6985,8 @@ const processListProperty = (listProperty, multiPublishPayload) => __awaiter(voi
6980
6985
  seedUid,
6981
6986
  });
6982
6987
  if (!relatedItem) {
6983
- throw new Error(`No related item found for list property: ${listProperty.propertyName}`);
6988
+ console.error(`No related item found for list property: ${listProperty.propertyName}`);
6989
+ continue;
6984
6990
  }
6985
6991
  if (relatedItem.seedUid) {
6986
6992
  return multiPublishPayload;
@@ -8087,28 +8093,28 @@ const setupServiceHandlers = () => {
8087
8093
 
8088
8094
  const initEasClient = () => __awaiter(void 0, void 0, void 0, function* () {
8089
8095
  if (isBrowser()) {
8090
- (yield import('./EasClient-Bbxr5rcF.js')).EasClient;
8096
+ (yield import('./EasClient-nvmz2kCc.js')).EasClient;
8091
8097
  }
8092
8098
  if (!isBrowser()) {
8093
- (yield import('./EasClient-BGQRv2-M.js')).EasClient;
8099
+ (yield import('./EasClient-CKv5Eyao.js')).EasClient;
8094
8100
  }
8095
8101
  });
8096
8102
 
8097
8103
  const initQueryClient = () => __awaiter(void 0, void 0, void 0, function* () {
8098
8104
  if (isBrowser()) {
8099
- (yield import('./QueryClient-Dk66c5aw.js')).QueryClient;
8105
+ (yield import('./QueryClient-CkqXe8Nk.js')).QueryClient;
8100
8106
  }
8101
8107
  if (!isBrowser()) {
8102
- (yield import('./QueryClient-CY_4gVB3.js')).QueryClient;
8108
+ (yield import('./QueryClient-pzZAYWa0.js')).QueryClient;
8103
8109
  }
8104
8110
  });
8105
8111
 
8106
8112
  const initFileManager = () => __awaiter(void 0, void 0, void 0, function* () {
8107
8113
  if (isBrowser()) {
8108
- (yield import('./FileManager-D-yaDuSt.js')).FileManager;
8114
+ (yield import('./FileManager-Bm_fGCH1.js')).FileManager;
8109
8115
  }
8110
8116
  if (!isBrowser()) {
8111
- (yield import('./FileManager-CYXquukS.js')).FileManager;
8117
+ (yield import('./FileManager-EGwM_VHY.js')).FileManager;
8112
8118
  }
8113
8119
  });
8114
8120
 
@@ -8118,6 +8124,7 @@ const client = {
8118
8124
  yield initItem();
8119
8125
  yield initItemProperty();
8120
8126
  yield initEasClient();
8127
+ yield initArweaveClient();
8121
8128
  yield initQueryClient();
8122
8129
  yield initFileManager();
8123
8130
  yield initDb();
@@ -8146,7 +8153,7 @@ const client = {
8146
8153
  arweaveDomain,
8147
8154
  filesDir,
8148
8155
  });
8149
- const { models: internalModels } = yield import('./seed.schema.config-CVCqLN-b.js');
8156
+ const { models: internalModels } = yield import('./seed.schema.config-BswsDyRe.js');
8150
8157
  for (const [key, value] of Object.entries(internalModels)) {
8151
8158
  setModel(key, value);
8152
8159
  }
@@ -8194,4 +8201,4 @@ const client = {
8194
8201
  enableMapSet();
8195
8202
 
8196
8203
  export { BaseItem as B, Db as D, Item as I, Json as J, List as L, Model as M, Property as P, Relation as R, Text as T, BaseItemProperty as a, BaseDb as b, getSqliteWasmClient as c, ImageSrc as d, Item$2 as e, ItemProperty$2 as f, getAppDb as g, useItem as h, isAppDbReady as i, useItemProperties as j, useCreateItem as k, useItemProperty as l, useDeleteItem as m, useGlobalServiceStatus as n, usePublishItem as o, usePersistedSnapshots as p, useServices as q, useService as r, getCorrectId as s, getGlobalService as t, useItems as u, eventEmitter as v, withSeed as w, client as x };
8197
- //# sourceMappingURL=index-CreT8SAL.js.map
8204
+ //# sourceMappingURL=index-BCmsQoYg.js.map