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