@seedprotocol/sdk 0.1.55 → 0.1.56
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-D4my8yy8.js → index-Cdz3ZpGp.js} +8 -7
- package/dist/index-Cdz3ZpGp.js.map +1 -0
- package/dist/{index-BkzKfVvD.js → index-DcYDcCt6.js} +2 -2
- package/dist/index-DcYDcCt6.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/{seed.schema.config-BHZSMMmL.js → seed.schema.config-BjnTnTUw.js} +2 -2
- package/dist/{seed.schema.config-BHZSMMmL.js.map → seed.schema.config-BjnTnTUw.js.map} +1 -1
- package/dist/src/saveImageSrc.ts +2 -1
- package/dist/types/src/browser/property/actors/saveValueToDb/saveImageSrc.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-BkzKfVvD.js.map +0 -1
- package/dist/index-D4my8yy8.js.map +0 -1
|
@@ -239,7 +239,7 @@ const identifyString = (str) => {
|
|
|
239
239
|
return 'text';
|
|
240
240
|
};
|
|
241
241
|
const getMimeType = (base64) => {
|
|
242
|
-
if (!base64
|
|
242
|
+
if (!base64) {
|
|
243
243
|
return null;
|
|
244
244
|
}
|
|
245
245
|
const result = base64.match(/^data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,/);
|
|
@@ -990,7 +990,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
990
990
|
renderValue: refResolvedDisplayValue,
|
|
991
991
|
});
|
|
992
992
|
if (propertyNameFromDb === 'storageTransactionId') {
|
|
993
|
-
const { Item } = yield import('./index-
|
|
993
|
+
const { Item } = yield import('./index-DcYDcCt6.js');
|
|
994
994
|
const item = yield Item.find({
|
|
995
995
|
seedLocalId,
|
|
996
996
|
modelName: itemModelName,
|
|
@@ -1514,6 +1514,7 @@ const saveImageSrc = fromCallback(({ sendBack, input: { context, event } }) => {
|
|
|
1514
1514
|
}
|
|
1515
1515
|
if (newValueType === 'imageBase64') {
|
|
1516
1516
|
mimeType = getMimeType(newValue);
|
|
1517
|
+
fileData = newValue;
|
|
1517
1518
|
}
|
|
1518
1519
|
if (newValueType === 'url') {
|
|
1519
1520
|
fileData = yield fetchImage(newValue);
|
|
@@ -1536,7 +1537,7 @@ const saveImageSrc = fromCallback(({ sendBack, input: { context, event } }) => {
|
|
|
1536
1537
|
}
|
|
1537
1538
|
}
|
|
1538
1539
|
const filePath = `/files/images/${fileName}`;
|
|
1539
|
-
yield createVersion({
|
|
1540
|
+
const imageVersionLocalId = yield createVersion({
|
|
1540
1541
|
seedLocalId: newImageSeedLocalId,
|
|
1541
1542
|
seedType: 'image',
|
|
1542
1543
|
});
|
|
@@ -1553,7 +1554,7 @@ const saveImageSrc = fromCallback(({ sendBack, input: { context, event } }) => {
|
|
|
1553
1554
|
propertyValue: newImageSeedLocalId,
|
|
1554
1555
|
seedLocalId,
|
|
1555
1556
|
seedUid,
|
|
1556
|
-
versionLocalId,
|
|
1557
|
+
versionLocalId: imageVersionLocalId,
|
|
1557
1558
|
versionUid,
|
|
1558
1559
|
modelName: itemModelName,
|
|
1559
1560
|
schemaUid,
|
|
@@ -2899,7 +2900,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2899
2900
|
if (!models$1) {
|
|
2900
2901
|
return;
|
|
2901
2902
|
}
|
|
2902
|
-
const { models: SeedModels } = yield import('./seed.schema.config-
|
|
2903
|
+
const { models: SeedModels } = yield import('./seed.schema.config-BjnTnTUw.js');
|
|
2903
2904
|
const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
|
|
2904
2905
|
let hasModelsInDb = false;
|
|
2905
2906
|
const schemaDefsByModelName = new Map();
|
|
@@ -6798,7 +6799,7 @@ const client = {
|
|
|
6798
6799
|
console.error('fs listeners not ready during init');
|
|
6799
6800
|
}
|
|
6800
6801
|
globalService.send({ type: 'init', endpoints, models, addresses });
|
|
6801
|
-
import('./seed.schema.config-
|
|
6802
|
+
import('./seed.schema.config-BjnTnTUw.js').then(({ models }) => {
|
|
6802
6803
|
for (const [key, value] of Object.entries(models)) {
|
|
6803
6804
|
setModel(key, value);
|
|
6804
6805
|
}
|
|
@@ -7370,4 +7371,4 @@ if (isNode()) {
|
|
|
7370
7371
|
}
|
|
7371
7372
|
|
|
7372
7373
|
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 };
|
|
7373
|
-
//# sourceMappingURL=index-
|
|
7374
|
+
//# sourceMappingURL=index-Cdz3ZpGp.js.map
|