@seedprotocol/sdk 0.1.99 → 0.1.101
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-BoPvASL1.js → index-BraifCoG.js} +10 -9
- package/dist/{index-BoPvASL1.js.map → index-BraifCoG.js.map} +1 -1
- package/dist/{index-Mt8WaytK.js → index-CB87k8S8.js} +2 -2
- package/dist/{index-Mt8WaytK.js.map → index-CB87k8S8.js.map} +1 -1
- package/dist/main.js +1 -1
- package/dist/{seed.schema.config-Dffe0eOd.js → seed.schema.config-Bw0_BXD8.js} +2 -2
- package/dist/{seed.schema.config-Dffe0eOd.js.map → seed.schema.config-Bw0_BXD8.js.map} +1 -1
- package/dist/src/getSchemaForItemProperty.ts +8 -7
- package/dist/types/src/browser/helpers/getSchemaForItemProperty.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1068,7 +1068,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1068
1068
|
if (propertyRecordSchema &&
|
|
1069
1069
|
propertyRecordSchema.storageType &&
|
|
1070
1070
|
propertyRecordSchema.storageType === 'ItemStorage') {
|
|
1071
|
-
const { Item } = yield import('./index-
|
|
1071
|
+
const { Item } = yield import('./index-CB87k8S8.js');
|
|
1072
1072
|
const item = yield Item.find({
|
|
1073
1073
|
seedLocalId,
|
|
1074
1074
|
modelName: itemModelName,
|
|
@@ -2622,7 +2622,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2622
2622
|
if (!models$1) {
|
|
2623
2623
|
return;
|
|
2624
2624
|
}
|
|
2625
|
-
const { models: SeedModels } = yield import('./seed.schema.config-
|
|
2625
|
+
const { models: SeedModels } = yield import('./seed.schema.config-Bw0_BXD8.js');
|
|
2626
2626
|
const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
|
|
2627
2627
|
let hasModelsInDb = false;
|
|
2628
2628
|
const schemaDefsByModelName = new Map();
|
|
@@ -5788,6 +5788,8 @@ const getItem = (_a) => __awaiter(void 0, [_a], void 0, function* ({ modelName,
|
|
|
5788
5788
|
});
|
|
5789
5789
|
|
|
5790
5790
|
const getSchemaForItemProperty = (_a) => __awaiter(void 0, [_a], void 0, function* ({ schemaUid, propertyName, easDataType, }) {
|
|
5791
|
+
const propertyNameSnakeCase = toSnakeCase(propertyName);
|
|
5792
|
+
const isMissingSchemaUid = !schemaUid || schemaUid === 'null' || schemaUid === 'undefined';
|
|
5791
5793
|
let queryParams = {
|
|
5792
5794
|
where: {
|
|
5793
5795
|
id: {
|
|
@@ -5795,23 +5797,22 @@ const getSchemaForItemProperty = (_a) => __awaiter(void 0, [_a], void 0, functio
|
|
|
5795
5797
|
},
|
|
5796
5798
|
},
|
|
5797
5799
|
};
|
|
5798
|
-
if (
|
|
5800
|
+
if (easDataType) {
|
|
5799
5801
|
queryParams = {
|
|
5800
5802
|
where: {
|
|
5801
5803
|
schema: {
|
|
5802
|
-
equals: `${easDataType} ${
|
|
5804
|
+
equals: `${easDataType} ${propertyNameSnakeCase}`,
|
|
5803
5805
|
},
|
|
5804
5806
|
},
|
|
5805
5807
|
};
|
|
5806
5808
|
}
|
|
5807
|
-
if (!easDataType &&
|
|
5808
|
-
(!schemaUid || schemaUid === 'null' || schemaUid === 'undefined')) {
|
|
5809
|
+
if (!easDataType && isMissingSchemaUid) {
|
|
5809
5810
|
queryParams = {
|
|
5810
5811
|
where: {
|
|
5811
5812
|
schemaNames: {
|
|
5812
5813
|
some: {
|
|
5813
5814
|
name: {
|
|
5814
|
-
equals:
|
|
5815
|
+
equals: propertyNameSnakeCase,
|
|
5815
5816
|
},
|
|
5816
5817
|
},
|
|
5817
5818
|
},
|
|
@@ -6684,7 +6685,7 @@ const client = {
|
|
|
6684
6685
|
console.error('fs listeners not ready during init');
|
|
6685
6686
|
}
|
|
6686
6687
|
globalService.send({ type: 'init', endpoints, models, addresses });
|
|
6687
|
-
import('./seed.schema.config-
|
|
6688
|
+
import('./seed.schema.config-Bw0_BXD8.js').then(({ models }) => {
|
|
6688
6689
|
for (const [key, value] of Object.entries(models)) {
|
|
6689
6690
|
setModel(key, value);
|
|
6690
6691
|
}
|
|
@@ -7637,4 +7638,4 @@ if (isNode()) {
|
|
|
7637
7638
|
}
|
|
7638
7639
|
|
|
7639
7640
|
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 };
|
|
7640
|
-
//# sourceMappingURL=index-
|
|
7641
|
+
//# sourceMappingURL=index-BraifCoG.js.map
|