@seedprotocol/sdk 0.1.120 → 0.1.121
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-CXivX9-v.js → index-Bj_ICJrP.js} +2 -3
- package/dist/index-Bj_ICJrP.js.map +1 -0
- package/dist/{index-lYH32Ucm.js → index-CQVtBXqn.js} +31 -18
- package/dist/index-CQVtBXqn.js.map +1 -0
- package/dist/main.js +1 -2
- package/dist/main.js.map +1 -1
- package/dist/{seed.schema.config-y0omDTDZ.js → seed.schema.config-CEyCY7bh.js} +2 -3
- package/dist/seed.schema.config-CEyCY7bh.js.map +1 -0
- package/dist/src/files.ts +33 -22
- package/dist/src/index.ts +4 -21
- package/dist/src/seed.ts +4 -31
- package/dist/types/src/shared/helpers/files.d.ts.map +1 -1
- package/package.json +1 -4
- package/dist/index-CXivX9-v.js.map +0 -1
- package/dist/index-lYH32Ucm.js.map +0 -1
- package/dist/seed.schema.config-y0omDTDZ.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-CQVtBXqn.js';
|
|
2
2
|
import 'tslib';
|
|
3
3
|
import 'reflect-metadata';
|
|
4
4
|
import '@sinclair/typebox';
|
|
@@ -28,10 +28,9 @@ import 'drizzle-orm/sqlite-proxy';
|
|
|
28
28
|
import 'drizzle-orm/sqlite-proxy/migrator';
|
|
29
29
|
import 'drizzle-orm/migrator';
|
|
30
30
|
import 'node:fs';
|
|
31
|
-
import 'async-es/retry';
|
|
32
31
|
import '@zenfs/dom';
|
|
33
32
|
import 'arweave';
|
|
34
33
|
import './constants-B6s6tGup.js';
|
|
35
34
|
import '@ethereum-attestation-service/eas-sdk';
|
|
36
35
|
import 'thirdweb';
|
|
37
|
-
//# sourceMappingURL=index-
|
|
36
|
+
//# sourceMappingURL=index-Bj_ICJrP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Bj_ICJrP.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -27,7 +27,6 @@ import { drizzle } from 'drizzle-orm/sqlite-proxy';
|
|
|
27
27
|
import { migrate as migrate$1 } from 'drizzle-orm/sqlite-proxy/migrator';
|
|
28
28
|
import { readMigrationFiles } from 'drizzle-orm/migrator';
|
|
29
29
|
import * as fsNode from 'node:fs';
|
|
30
|
-
import retry from 'async-es/retry';
|
|
31
30
|
import { WebAccess } from '@zenfs/dom';
|
|
32
31
|
import Arweave from 'arweave';
|
|
33
32
|
import { i as internalPropertyNames, I as INTERNAL_DATA_TYPES, V as VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA, d as defaultAttestationData } from './constants-B6s6tGup.js';
|
|
@@ -2115,7 +2114,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2115
2114
|
if (!models$1) {
|
|
2116
2115
|
return;
|
|
2117
2116
|
}
|
|
2118
|
-
const { models: SeedModels } = yield import('./seed.schema.config-
|
|
2117
|
+
const { models: SeedModels } = yield import('./seed.schema.config-CEyCY7bh.js');
|
|
2119
2118
|
const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
|
|
2120
2119
|
let hasModelsInDb = false;
|
|
2121
2120
|
const schemaDefsByModelName = new Map();
|
|
@@ -2325,23 +2324,37 @@ const validate = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2325
2324
|
const waitForFile = (filePath, interval = 500, timeout = 10000) => {
|
|
2326
2325
|
return new Promise((resolve, reject) => {
|
|
2327
2326
|
const startTime = Date.now();
|
|
2328
|
-
|
|
2329
|
-
times: Math.ceil(timeout / interval),
|
|
2330
|
-
interval: interval,
|
|
2331
|
-
}, (callback) => {
|
|
2327
|
+
const _interval = setInterval(() => {
|
|
2332
2328
|
if (fs.existsSync(filePath) && fsNode.existsSync(filePath)) {
|
|
2333
|
-
|
|
2329
|
+
clearInterval(_interval);
|
|
2330
|
+
resolve(true);
|
|
2334
2331
|
}
|
|
2335
2332
|
if (Date.now() - startTime >= timeout) {
|
|
2336
|
-
|
|
2333
|
+
clearInterval(_interval);
|
|
2334
|
+
reject(new Error('Timeout exceeded while waiting for file'));
|
|
2337
2335
|
}
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2336
|
+
}, interval);
|
|
2337
|
+
// retry(
|
|
2338
|
+
// {
|
|
2339
|
+
// times: Math.ceil(timeout / interval),
|
|
2340
|
+
// interval: interval,
|
|
2341
|
+
// },
|
|
2342
|
+
// (callback: Function) => {
|
|
2343
|
+
// if (fs.existsSync(filePath) && fsNode.existsSync(filePath)) {
|
|
2344
|
+
// return callback(null, true) // File exists, finish with success
|
|
2345
|
+
// }
|
|
2346
|
+
// if (Date.now() - startTime >= timeout) {
|
|
2347
|
+
// return callback(new Error('Timeout exceeded while waiting for file'))
|
|
2348
|
+
// }
|
|
2349
|
+
// callback(new Error('File does not exist yet')) // Retry with this error
|
|
2350
|
+
// },
|
|
2351
|
+
// (err: Error, result: boolean) => {
|
|
2352
|
+
// if (err) {
|
|
2353
|
+
// return resolve(false) // Resolve as false if timeout or error occurs
|
|
2354
|
+
// }
|
|
2355
|
+
// resolve(result) // Resolve as true if file exists
|
|
2356
|
+
// },
|
|
2357
|
+
// )
|
|
2345
2358
|
});
|
|
2346
2359
|
};
|
|
2347
2360
|
|
|
@@ -6551,7 +6564,7 @@ const client = {
|
|
|
6551
6564
|
addresses,
|
|
6552
6565
|
arweaveDomain,
|
|
6553
6566
|
});
|
|
6554
|
-
import('./seed.schema.config-
|
|
6567
|
+
import('./seed.schema.config-CEyCY7bh.js').then(({ models }) => {
|
|
6555
6568
|
for (const [key, value] of Object.entries(models)) {
|
|
6556
6569
|
setModel(key, value);
|
|
6557
6570
|
}
|
|
@@ -7226,7 +7239,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
7226
7239
|
if (propertyRecordSchema &&
|
|
7227
7240
|
propertyRecordSchema.storageType &&
|
|
7228
7241
|
propertyRecordSchema.storageType === 'ItemStorage') {
|
|
7229
|
-
const { Item } = yield import('./index-
|
|
7242
|
+
const { Item } = yield import('./index-Bj_ICJrP.js');
|
|
7230
7243
|
const item = yield Item.find({
|
|
7231
7244
|
seedLocalId,
|
|
7232
7245
|
modelName,
|
|
@@ -8168,4 +8181,4 @@ if (isNode()) {
|
|
|
8168
8181
|
}
|
|
8169
8182
|
|
|
8170
8183
|
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 };
|
|
8171
|
-
//# sourceMappingURL=index-
|
|
8184
|
+
//# sourceMappingURL=index-CQVtBXqn.js.map
|