@seedprotocol/sdk 0.1.69 → 0.1.70

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 { f as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, e as GET_PROPERTIES, G as GET_SCHEMAS, a as GET_SEEDS, b as GET_SEED_IDS, c as GET_STORAGE_TRANSACTION_ID, d as GET_VERSIONS, I as Item, g as itemMachineAll, i as itemMachineSingle } from './index-YshZfGRu.js';
1
+ export { f as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, e as GET_PROPERTIES, G as GET_SCHEMAS, a as GET_SEEDS, b as GET_SEED_IDS, c as GET_STORAGE_TRANSACTION_ID, d as GET_VERSIONS, I as Item, g as itemMachineAll, i as itemMachineSingle } from './index-Cy1fke9s.js';
2
2
  import './constants-BLctWkrn.js';
3
3
  import 'path';
4
4
  import 'reflect-metadata';
@@ -27,4 +27,4 @@ import '@zenfs/dom';
27
27
  import 'arweave';
28
28
  import 'use-immer';
29
29
  import '@xstate/react';
30
- //# sourceMappingURL=index-VSlWKRIZ.js.map
30
+ //# sourceMappingURL=index-B6WilINl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-B6WilINl.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -989,7 +989,13 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
989
989
  urlNeedsToBeRefreshed = true;
990
990
  }
991
991
  if (urlNeedsToBeRefreshed) {
992
- const filePath = `/files/${localStorageDir}/${refResolvedValue}`;
992
+ let dir = localStorageDir;
993
+ if (!dir &&
994
+ propertyRecordSchema &&
995
+ propertyRecordSchema.refValueType === 'ImageSrc') {
996
+ dir = 'images';
997
+ }
998
+ const filePath = `/files/${dir}/${refResolvedValue}`;
993
999
  const fileExists = yield fs.promises.exists(filePath);
994
1000
  if (fileExists) {
995
1001
  const fileContents = yield fs.promises.readFile(filePath);
@@ -1041,7 +1047,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
1041
1047
  if (propertyRecordSchema &&
1042
1048
  propertyRecordSchema.storageType &&
1043
1049
  propertyRecordSchema.storageType === 'ItemStorage') {
1044
- const { Item } = yield import('./index-VSlWKRIZ.js');
1050
+ const { Item } = yield import('./index-B6WilINl.js');
1045
1051
  const item = yield Item.find({
1046
1052
  seedLocalId,
1047
1053
  modelName: itemModelName,
@@ -2546,7 +2552,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
2546
2552
  if (!models$1) {
2547
2553
  return;
2548
2554
  }
2549
- const { models: SeedModels } = yield import('./seed.schema.config-BEvGEHkp.js');
2555
+ const { models: SeedModels } = yield import('./seed.schema.config-dylVDX7W.js');
2550
2556
  const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
2551
2557
  let hasModelsInDb = false;
2552
2558
  const schemaDefsByModelName = new Map();
@@ -6498,7 +6504,7 @@ const client = {
6498
6504
  console.error('fs listeners not ready during init');
6499
6505
  }
6500
6506
  globalService.send({ type: 'init', endpoints, models, addresses });
6501
- import('./seed.schema.config-BEvGEHkp.js').then(({ models }) => {
6507
+ import('./seed.schema.config-dylVDX7W.js').then(({ models }) => {
6502
6508
  for (const [key, value] of Object.entries(models)) {
6503
6509
  setModel(key, value);
6504
6510
  }
@@ -7459,4 +7465,4 @@ if (isNode()) {
7459
7465
  }
7460
7466
 
7461
7467
  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_SEEDS as a, GET_SEED_IDS as b, GET_STORAGE_TRANSACTION_ID as c, GET_VERSIONS as d, GET_PROPERTIES as e, GET_ALL_PROPERTIES_FOR_ALL_VERSIONS as f, itemMachineAll as g, ImageSrc as h, itemMachineSingle as i, ItemProperty as j, useItem as k, useItemProperties as l, useCreateItem as m, useItemProperty as n, useDeleteItem as o, useGlobalServiceStatus as p, useServices as q, getGlobalService as r, client as s, getCorrectId as t, useItems as u, withSeed as w };
7462
- //# sourceMappingURL=index-YshZfGRu.js.map
7468
+ //# sourceMappingURL=index-Cy1fke9s.js.map