@seedprotocol/sdk 0.1.110 → 0.1.112

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.
@@ -1,4 +1,4 @@
1
- export { g as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, f as GET_PROPERTIES, G as GET_SCHEMAS, a as GET_SCHEMA_BY_NAME, b as GET_SEEDS, c as GET_SEED_IDS, d as GET_STORAGE_TRANSACTION_ID, e as GET_VERSIONS, I as Item, h as itemMachineAll, i as itemMachineSingle } from './index-DPl7MLMn.js';
1
+ export { g as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, f as GET_PROPERTIES, G as GET_SCHEMAS, a as GET_SCHEMA_BY_NAME, b as GET_SEEDS, c as GET_SEED_IDS, d as GET_STORAGE_TRANSACTION_ID, e as GET_VERSIONS, I as Item, h as itemMachineAll, i as itemMachineSingle } from './index-OiUariqS.js';
2
2
  import './constants-CEnkzyny.js';
3
3
  import '@ethereum-attestation-service/eas-sdk';
4
4
  import 'thirdweb';
@@ -29,4 +29,4 @@ import 'rxjs';
29
29
  import 'drizzle-orm/sqlite-proxy';
30
30
  import '@zenfs/dom';
31
31
  import 'arweave';
32
- //# sourceMappingURL=index-DBeuQew5.js.map
32
+ //# sourceMappingURL=index-CwNnbNh8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-DBeuQew5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index-CwNnbNh8.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2090,7 +2090,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
2090
2090
  if (!models$1) {
2091
2091
  return;
2092
2092
  }
2093
- const { models: SeedModels } = yield import('./seed.schema.config-B7qlhJai.js');
2093
+ const { models: SeedModels } = yield import('./seed.schema.config-CY5ZbFqn.js');
2094
2094
  const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
2095
2095
  let hasModelsInDb = false;
2096
2096
  const schemaDefsByModelName = new Map();
@@ -5531,12 +5531,12 @@ const processUploadProperty = (uploadProperty, uploads, relatedItemProperty) =>
5531
5531
  const childUploads = [];
5532
5532
  for (const childProperty of uploadProperty.childProperties) {
5533
5533
  const filePath = childProperty.localStoragePath;
5534
- if (!filePath) {
5535
- throw new Error(`No localStoragePath found for ItemProperty ${childProperty.propertyName}`);
5534
+ if (!filePath || filePath.endsWith('undefined')) {
5535
+ continue;
5536
5536
  }
5537
5537
  const exists = yield fs.promises.exists(filePath);
5538
5538
  if (!exists) {
5539
- throw new Error(`File doesn't exist at ${filePath}`);
5539
+ continue;
5540
5540
  }
5541
5541
  childUploads.push({
5542
5542
  propertyName: childProperty.propertyName,
@@ -5569,9 +5569,12 @@ const processUploadProperty = (uploadProperty, uploads, relatedItemProperty) =>
5569
5569
  if (!childUploads || childUploads.length === 0) {
5570
5570
  if (relatedItemProperty && relatedItemProperty.localStoragePath) {
5571
5571
  const filePath = relatedItemProperty.localStoragePath;
5572
+ if (!filePath || filePath.endsWith('undefined')) {
5573
+ return uploads;
5574
+ }
5572
5575
  const exists = yield fs.promises.exists(filePath);
5573
5576
  if (!exists) {
5574
- throw new Error(`File doesn't exist at ${filePath}`);
5577
+ return uploads;
5575
5578
  // const handle = await navigator.storage.getDirectory()
5576
5579
  //
5577
5580
  // await configureSingle({
@@ -6451,7 +6454,7 @@ const client = {
6451
6454
  console.error('fs listeners not ready during init');
6452
6455
  }
6453
6456
  globalService.send({ type: 'init', endpoints, models, addresses });
6454
- import('./seed.schema.config-B7qlhJai.js').then(({ models }) => {
6457
+ import('./seed.schema.config-CY5ZbFqn.js').then(({ models }) => {
6455
6458
  for (const [key, value] of Object.entries(models)) {
6456
6459
  setModel(key, value);
6457
6460
  }
@@ -7126,7 +7129,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
7126
7129
  if (propertyRecordSchema &&
7127
7130
  propertyRecordSchema.storageType &&
7128
7131
  propertyRecordSchema.storageType === 'ItemStorage') {
7129
- const { Item } = yield import('./index-DBeuQew5.js');
7132
+ const { Item } = yield import('./index-CwNnbNh8.js');
7130
7133
  const item = yield Item.find({
7131
7134
  seedLocalId,
7132
7135
  modelName,
@@ -8068,4 +8071,4 @@ if (isNode()) {
8068
8071
  }
8069
8072
 
8070
8073
  export { GET_SCHEMAS as G, Item as I, Json as J, List as L, Model as M, Property as P, Relation as R, Text as T, GET_SCHEMA_BY_NAME as a, GET_SEEDS as b, GET_SEED_IDS as c, GET_STORAGE_TRANSACTION_ID as d, GET_VERSIONS as e, GET_PROPERTIES as f, GET_ALL_PROPERTIES_FOR_ALL_VERSIONS as g, itemMachineAll as h, itemMachineSingle as i, ImageSrc as j, ItemProperty as k, useItem as l, useItemProperties as m, useCreateItem as n, useItemProperty as o, useDeleteItem as p, useGlobalServiceStatus as q, useServices as r, getGlobalService as s, client as t, useItems as u, getCorrectId as v, withSeed as w };
8071
- //# sourceMappingURL=index-DPl7MLMn.js.map
8074
+ //# sourceMappingURL=index-OiUariqS.js.map