@seedprotocol/sdk 0.1.80 → 0.1.81
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.
- package/dist/{index-_do0SYbJ.js → index-C6xQQWVh.js} +13 -5
- package/dist/index-C6xQQWVh.js.map +1 -0
- package/dist/{index-BY-tsRPF.js → index-DANJVD5r.js} +2 -2
- package/dist/{index-BY-tsRPF.js.map → index-DANJVD5r.js.map} +1 -1
- package/dist/main.js +1 -1
- package/dist/{seed.schema.config-BuDndgih.js → seed.schema.config-C7EjL9AF.js} +2 -2
- package/dist/{seed.schema.config-BuDndgih.js.map → seed.schema.config-C7EjL9AF.js.map} +1 -1
- package/dist/src/hydrateFromDb.ts +10 -1
- package/dist/types/src/browser/property/actors/hydrateFromDb.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-_do0SYbJ.js.map +0 -1
|
@@ -1013,7 +1013,15 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1013
1013
|
}
|
|
1014
1014
|
}
|
|
1015
1015
|
const filePath = `/files/${dir}/${refResolvedValue}`;
|
|
1016
|
-
const
|
|
1016
|
+
const files = yield fs.promises.readdir(filePath);
|
|
1017
|
+
const matchingFiles = files.filter((file) => {
|
|
1018
|
+
return path.basename(file).includes(refResolvedValue);
|
|
1019
|
+
});
|
|
1020
|
+
let fileExists = false;
|
|
1021
|
+
if (matchingFiles && matchingFiles.length > 0) {
|
|
1022
|
+
fileExists = true;
|
|
1023
|
+
}
|
|
1024
|
+
// const fileExists = await fs.promises.exists(filePath)
|
|
1017
1025
|
if (fileExists) {
|
|
1018
1026
|
const fileContents = yield fs.promises.readFile(filePath);
|
|
1019
1027
|
const fileHandler = new File([fileContents], refResolvedValue);
|
|
@@ -1050,7 +1058,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1050
1058
|
if (propertyRecordSchema &&
|
|
1051
1059
|
propertyRecordSchema.storageType &&
|
|
1052
1060
|
propertyRecordSchema.storageType === 'ItemStorage') {
|
|
1053
|
-
const { Item } = yield import('./index-
|
|
1061
|
+
const { Item } = yield import('./index-DANJVD5r.js');
|
|
1054
1062
|
const item = yield Item.find({
|
|
1055
1063
|
seedLocalId,
|
|
1056
1064
|
modelName: itemModelName,
|
|
@@ -2612,7 +2620,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2612
2620
|
if (!models$1) {
|
|
2613
2621
|
return;
|
|
2614
2622
|
}
|
|
2615
|
-
const { models: SeedModels } = yield import('./seed.schema.config-
|
|
2623
|
+
const { models: SeedModels } = yield import('./seed.schema.config-C7EjL9AF.js');
|
|
2616
2624
|
const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
|
|
2617
2625
|
let hasModelsInDb = false;
|
|
2618
2626
|
const schemaDefsByModelName = new Map();
|
|
@@ -6619,7 +6627,7 @@ const client = {
|
|
|
6619
6627
|
console.error('fs listeners not ready during init');
|
|
6620
6628
|
}
|
|
6621
6629
|
globalService.send({ type: 'init', endpoints, models, addresses });
|
|
6622
|
-
import('./seed.schema.config-
|
|
6630
|
+
import('./seed.schema.config-C7EjL9AF.js').then(({ models }) => {
|
|
6623
6631
|
for (const [key, value] of Object.entries(models)) {
|
|
6624
6632
|
setModel(key, value);
|
|
6625
6633
|
}
|
|
@@ -7573,4 +7581,4 @@ if (isNode()) {
|
|
|
7573
7581
|
}
|
|
7574
7582
|
|
|
7575
7583
|
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 };
|
|
7576
|
-
//# sourceMappingURL=index-
|
|
7584
|
+
//# sourceMappingURL=index-C6xQQWVh.js.map
|