@seedprotocol/sdk 0.1.79 → 0.1.80
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-DmrlOoY_.js → index-BY-tsRPF.js} +2 -2
- package/dist/{index-DmrlOoY_.js.map → index-BY-tsRPF.js.map} +1 -1
- package/dist/{index-_JWt4nA-.js → index-_do0SYbJ.js} +41 -34
- package/dist/index-_do0SYbJ.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/{seed.schema.config-CD9Ee46X.js → seed.schema.config-BuDndgih.js} +2 -2
- package/dist/{seed.schema.config-CD9Ee46X.js.map → seed.schema.config-BuDndgih.js.map} +1 -1
- package/dist/src/download.ts +6 -2
- package/dist/types/src/browser/events/files/download.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-_JWt4nA-.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, f as GET_PROPERTIES, G as GET_SCHEMAS, a as GET_SCHEMA_BY_NAME, b as GET_SEEDS, c as GET_SEED_IDS, d as GET_STORAGE_TRANSACTION_ID, e as GET_VERSIONS, I as Item, h as itemMachineAll, i as itemMachineSingle } from './index-
|
|
1
|
+
export { g as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, f as GET_PROPERTIES, G as GET_SCHEMAS, a as GET_SCHEMA_BY_NAME, b as GET_SEEDS, c as GET_SEED_IDS, d as GET_STORAGE_TRANSACTION_ID, e as GET_VERSIONS, I as Item, h as itemMachineAll, i as itemMachineSingle } from './index-_do0SYbJ.js';
|
|
2
2
|
import './constants-rmQ8zg8_.js';
|
|
3
3
|
import '@ethereum-attestation-service/eas-sdk';
|
|
4
4
|
import 'thirdweb';
|
|
@@ -29,4 +29,4 @@ import 'rxjs';
|
|
|
29
29
|
import 'drizzle-orm/sqlite-proxy';
|
|
30
30
|
import '@zenfs/dom';
|
|
31
31
|
import 'arweave';
|
|
32
|
-
//# sourceMappingURL=index-
|
|
32
|
+
//# sourceMappingURL=index-BY-tsRPF.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BY-tsRPF.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1050,7 +1050,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1050
1050
|
if (propertyRecordSchema &&
|
|
1051
1051
|
propertyRecordSchema.storageType &&
|
|
1052
1052
|
propertyRecordSchema.storageType === 'ItemStorage') {
|
|
1053
|
-
const { Item } = yield import('./index-
|
|
1053
|
+
const { Item } = yield import('./index-BY-tsRPF.js');
|
|
1054
1054
|
const item = yield Item.find({
|
|
1055
1055
|
seedLocalId,
|
|
1056
1056
|
modelName: itemModelName,
|
|
@@ -2612,7 +2612,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2612
2612
|
if (!models$1) {
|
|
2613
2613
|
return;
|
|
2614
2614
|
}
|
|
2615
|
-
const { models: SeedModels } = yield import('./seed.schema.config-
|
|
2615
|
+
const { models: SeedModels } = yield import('./seed.schema.config-BuDndgih.js');
|
|
2616
2616
|
const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
|
|
2617
2617
|
let hasModelsInDb = false;
|
|
2618
2618
|
const schemaDefsByModelName = new Map();
|
|
@@ -3805,41 +3805,48 @@ const downloadAllFilesBinaryRequestHandler = () => __awaiter(void 0, void 0, voi
|
|
|
3805
3805
|
continue;
|
|
3806
3806
|
}
|
|
3807
3807
|
const mimeType = getMimeType(dataString);
|
|
3808
|
-
let
|
|
3809
|
-
if (
|
|
3810
|
-
|
|
3811
|
-
|
|
3808
|
+
let fileExtension = mimeType;
|
|
3809
|
+
if (fileExtension && (fileExtension === null || fileExtension === void 0 ? void 0 : fileExtension.startsWith('image'))) {
|
|
3810
|
+
fileExtension = fileExtension.replace('image/', '');
|
|
3811
|
+
let fileName = transactionId;
|
|
3812
|
+
if (contentType === 'base64') {
|
|
3813
|
+
if (fileExtension) {
|
|
3814
|
+
fileName += `.${fileExtension}`;
|
|
3815
|
+
}
|
|
3816
|
+
// Remove the Base64 header if it exists (e.g., "data:image/png;base64,")
|
|
3817
|
+
const base64Data = dataString.split(',').pop() || '';
|
|
3818
|
+
// Decode the Base64 string to binary
|
|
3819
|
+
const binaryString = atob(base64Data);
|
|
3820
|
+
const length = binaryString.length;
|
|
3821
|
+
const binaryData = new Uint8Array(length);
|
|
3822
|
+
for (let i = 0; i < length; i++) {
|
|
3823
|
+
binaryData[i] = binaryString.charCodeAt(i);
|
|
3824
|
+
}
|
|
3825
|
+
yield fs.promises.writeFile(`/files/images/${fileName}`, binaryData, {
|
|
3826
|
+
encoding: 'binary',
|
|
3827
|
+
});
|
|
3828
|
+
// if (dataUint8Array && dataUint8Array instanceof Uint8Array) {
|
|
3829
|
+
// await fs.promises.writeFile(
|
|
3830
|
+
// `/files/images/${fileName}`,
|
|
3831
|
+
// dataUint8Array,
|
|
3832
|
+
// )
|
|
3833
|
+
// }
|
|
3812
3834
|
}
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
binaryData[i] = binaryString.charCodeAt(i);
|
|
3835
|
+
if (contentType === 'html') {
|
|
3836
|
+
fileName += '.html';
|
|
3837
|
+
yield fs.promises.writeFile(`/files/html/${fileName}`, dataString);
|
|
3838
|
+
}
|
|
3839
|
+
if (contentType === 'json') {
|
|
3840
|
+
fileName += '.json';
|
|
3841
|
+
yield fs.promises.writeFile(`/files/json/${fileName}`, dataString);
|
|
3821
3842
|
}
|
|
3822
|
-
yield fs.promises.writeFile(`/files/images/${fileName}`, binaryData, {
|
|
3823
|
-
encoding: 'binary',
|
|
3824
|
-
});
|
|
3825
|
-
// if (dataUint8Array && dataUint8Array instanceof Uint8Array) {
|
|
3826
|
-
// await fs.promises.writeFile(
|
|
3827
|
-
// `/files/images/${fileName}`,
|
|
3828
|
-
// dataUint8Array,
|
|
3829
|
-
// )
|
|
3830
|
-
// }
|
|
3831
|
-
}
|
|
3832
|
-
if (contentType === 'html') {
|
|
3833
|
-
fileName += '.html';
|
|
3834
|
-
yield fs.promises.writeFile(`/files/html/${fileName}`, dataString);
|
|
3835
3843
|
}
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
|
|
3844
|
+
try { }
|
|
3845
|
+
catch (error) {
|
|
3846
|
+
logger$c(error);
|
|
3839
3847
|
}
|
|
3840
3848
|
}
|
|
3841
|
-
|
|
3842
|
-
logger$c(error);
|
|
3849
|
+
finally {
|
|
3843
3850
|
}
|
|
3844
3851
|
}
|
|
3845
3852
|
});
|
|
@@ -6612,7 +6619,7 @@ const client = {
|
|
|
6612
6619
|
console.error('fs listeners not ready during init');
|
|
6613
6620
|
}
|
|
6614
6621
|
globalService.send({ type: 'init', endpoints, models, addresses });
|
|
6615
|
-
import('./seed.schema.config-
|
|
6622
|
+
import('./seed.schema.config-BuDndgih.js').then(({ models }) => {
|
|
6616
6623
|
for (const [key, value] of Object.entries(models)) {
|
|
6617
6624
|
setModel(key, value);
|
|
6618
6625
|
}
|
|
@@ -7566,4 +7573,4 @@ if (isNode()) {
|
|
|
7566
7573
|
}
|
|
7567
7574
|
|
|
7568
7575
|
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 };
|
|
7569
|
-
//# sourceMappingURL=index-
|
|
7576
|
+
//# sourceMappingURL=index-_do0SYbJ.js.map
|