@seedprotocol/sdk 0.1.124 → 0.1.125

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.
@@ -2114,7 +2114,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
2114
2114
  if (!models$1) {
2115
2115
  return;
2116
2116
  }
2117
- const { models: SeedModels } = yield import('./seed.schema.config-B_quI2AB.js');
2117
+ const { models: SeedModels } = yield import('./seed.schema.config-Cj3PtmOG.js');
2118
2118
  const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
2119
2119
  let hasModelsInDb = false;
2120
2120
  const schemaDefsByModelName = new Map();
@@ -6609,7 +6609,7 @@ const client = {
6609
6609
  addresses,
6610
6610
  arweaveDomain,
6611
6611
  });
6612
- import('./seed.schema.config-B_quI2AB.js').then(({ models }) => {
6612
+ import('./seed.schema.config-Cj3PtmOG.js').then(({ models }) => {
6613
6613
  for (const [key, value] of Object.entries(models)) {
6614
6614
  setModel(key, value);
6615
6615
  }
@@ -7289,7 +7289,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
7289
7289
  if (propertyRecordSchema &&
7290
7290
  propertyRecordSchema.storageType &&
7291
7291
  propertyRecordSchema.storageType === 'ItemStorage') {
7292
- const { Item } = yield import('./index-Bh9mwpKP.js');
7292
+ const { Item } = yield import('./index-D1R2g9ZX.js');
7293
7293
  const item = yield Item.find({
7294
7294
  seedLocalId,
7295
7295
  modelName,
@@ -7645,10 +7645,20 @@ const saveImageSrc = fromCallback(({ sendBack, input: { context, event } }) => {
7645
7645
  seedType: 'image',
7646
7646
  });
7647
7647
  if (fileData instanceof ArrayBuffer) {
7648
- yield fs.promises.writeFile(filePath, new Uint8Array(fileData));
7648
+ try {
7649
+ yield fs.promises.writeFile(filePath, new Uint8Array(fileData));
7650
+ }
7651
+ catch (e) {
7652
+ fs.writeFileSync(filePath, new Uint8Array(fileData));
7653
+ }
7649
7654
  }
7650
7655
  if (typeof fileData === 'string') {
7651
- yield fs.promises.writeFile(filePath, fileData);
7656
+ try {
7657
+ yield fs.promises.writeFile(filePath, fileData);
7658
+ }
7659
+ catch (e) {
7660
+ fs.writeFileSync(filePath, fileData);
7661
+ }
7652
7662
  }
7653
7663
  const refResolvedDisplayValue = yield getContentUrlFromPath(filePath);
7654
7664
  if (!schemaUid) {
@@ -8236,4 +8246,4 @@ if (isNode()) {
8236
8246
  }
8237
8247
 
8238
8248
  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 };
8239
- //# sourceMappingURL=index-B_wcyM6Y.js.map
8249
+ //# sourceMappingURL=index-B4chWeSi.js.map