@seedprotocol/sdk 0.1.38 → 0.1.40
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-C10-kbIJ.js → index-B6e21b8Z.js} +37 -31
- package/dist/{index-C10-kbIJ.js.map → index-B6e21b8Z.js.map} +1 -1
- package/dist/{index-aq3KM2AI.js → index-BbMR37dq.js} +2 -2
- package/dist/index-BbMR37dq.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/{seed-GJkiyGC5.js → seed-C8LDZtnw.js} +3 -3
- package/dist/{seed-GJkiyGC5.js.map → seed-C8LDZtnw.js.map} +1 -1
- package/dist/{seed-mY1NrOwT.js → seed-Dm6nbxxo.js} +3 -3
- package/dist/{seed-mY1NrOwT.js.map → seed-Dm6nbxxo.js.map} +1 -1
- package/dist/{seed-D1Jb9jY7.js → seed-E3XylWTI.js} +2 -2
- package/dist/{seed-D1Jb9jY7.js.map → seed-E3XylWTI.js.map} +1 -1
- package/dist/{seed.schema.config-Lv1DZAJh.js → seed.schema.config-cLeX7Oyb.js} +2 -2
- package/dist/{seed.schema.config-Lv1DZAJh.js.map → seed.schema.config-cLeX7Oyb.js.map} +1 -1
- package/dist/types/src/browser/db/write.d.ts +2 -3
- package/dist/types/src/browser/db/write.d.ts.map +1 -1
- package/dist/types/src/browser/events/files/download.d.ts.map +1 -1
- package/dist/types/src/browser/item/class.d.ts +1 -1
- package/dist/types/src/browser/item/class.d.ts.map +1 -1
- package/dist/types/src/browser/item/single/actors/saveDataToDb.d.ts +55 -1
- package/dist/types/src/browser/item/single/actors/saveDataToDb.d.ts.map +1 -1
- package/dist/types/src/browser/item/single/itemMachineSingle.d.ts +56 -1
- package/dist/types/src/browser/item/single/itemMachineSingle.d.ts.map +1 -1
- package/dist/types/src/browser/property/actors/resolveRelatedValue.d.ts +1 -2
- package/dist/types/src/browser/property/actors/resolveRelatedValue.d.ts.map +1 -1
- package/dist/types/src/browser/property/actors/saveValueToDb.d.ts +1 -2
- package/dist/types/src/browser/property/actors/saveValueToDb.d.ts.map +1 -1
- package/dist/types/src/browser/property/class.d.ts +158 -13
- package/dist/types/src/browser/property/class.d.ts.map +1 -1
- package/dist/types/src/browser/schema/file/fetchAll/actors.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-aq3KM2AI.js.map +0 -1
|
@@ -984,7 +984,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
984
984
|
renderValue: refResolvedDisplayValue,
|
|
985
985
|
});
|
|
986
986
|
if (propertyNameFromDb === 'storageTransactionId') {
|
|
987
|
-
const { Item } = yield import('./index-
|
|
987
|
+
const { Item } = yield import('./index-BbMR37dq.js');
|
|
988
988
|
const item = yield Item.find({
|
|
989
989
|
seedLocalId,
|
|
990
990
|
modelName: itemModelName,
|
|
@@ -3355,31 +3355,37 @@ class Item {
|
|
|
3355
3355
|
});
|
|
3356
3356
|
}
|
|
3357
3357
|
static create(props) {
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3358
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3359
|
+
if (props.seedUid || props.seedLocalId) {
|
|
3360
|
+
const seedId = props.seedUid || props.seedLocalId;
|
|
3361
|
+
if (Item.instanceCache.has(seedId)) {
|
|
3362
|
+
const { instance, refCount } = Item.instanceCache.get(seedId);
|
|
3363
|
+
Item.instanceCache.set(seedId, {
|
|
3364
|
+
instance,
|
|
3365
|
+
refCount: refCount + 1,
|
|
3366
|
+
});
|
|
3367
|
+
return instance;
|
|
3368
|
+
}
|
|
3369
|
+
if (!Item.instanceCache.has(props.seedLocalId)) {
|
|
3370
|
+
const newInstance = new Item(props);
|
|
3371
|
+
Item.instanceCache.set(seedId, {
|
|
3372
|
+
instance: newInstance,
|
|
3373
|
+
refCount: 1,
|
|
3374
|
+
});
|
|
3375
|
+
return newInstance;
|
|
3376
|
+
}
|
|
3375
3377
|
}
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3378
|
+
const { seedLocalId } = yield createNewItem({
|
|
3379
|
+
modelName: props.modelName,
|
|
3380
|
+
});
|
|
3381
|
+
props.seedLocalId = seedLocalId;
|
|
3382
|
+
const newInstance = new Item(props);
|
|
3383
|
+
Item.instanceCache.set(newInstance.seedUid || newInstance.seedLocalId, {
|
|
3384
|
+
instance: newInstance,
|
|
3385
|
+
refCount: 1,
|
|
3386
|
+
});
|
|
3387
|
+
return newInstance;
|
|
3381
3388
|
});
|
|
3382
|
-
return newInstance;
|
|
3383
3389
|
}
|
|
3384
3390
|
static find(_b) {
|
|
3385
3391
|
return __awaiter(this, arguments, void 0, function* ({ modelName, seedLocalId, seedUid, }) {
|
|
@@ -3399,7 +3405,7 @@ class Item {
|
|
|
3399
3405
|
const itemsData = yield getItemsData(modelName);
|
|
3400
3406
|
const itemInstances = [];
|
|
3401
3407
|
for (const itemData of itemsData) {
|
|
3402
|
-
itemInstances.push(Item.create(Object.assign(Object.assign({}, itemData), { modelName })));
|
|
3408
|
+
itemInstances.push(yield Item.create(Object.assign(Object.assign({}, itemData), { modelName })));
|
|
3403
3409
|
}
|
|
3404
3410
|
return orderBy(itemInstances, ['createdAt'], ['desc']);
|
|
3405
3411
|
});
|
|
@@ -4356,7 +4362,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
4356
4362
|
if (!models$1) {
|
|
4357
4363
|
return;
|
|
4358
4364
|
}
|
|
4359
|
-
const { models: SeedModels } = yield import('./seed.schema.config-
|
|
4365
|
+
const { models: SeedModels } = yield import('./seed.schema.config-cLeX7Oyb.js');
|
|
4360
4366
|
const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
|
|
4361
4367
|
let hasModelsInDb = false;
|
|
4362
4368
|
const schemaDefsByModelName = new Map();
|
|
@@ -5241,7 +5247,7 @@ const downloadAllFilesBinaryRequestHandler = () => __awaiter(void 0, void 0, voi
|
|
|
5241
5247
|
if (res.status !== 200) {
|
|
5242
5248
|
logger$8(`[fetchAll/actors] [fetchAllBinaryData] error fetching transaction data for ${transactionId}`);
|
|
5243
5249
|
excludedTransactions.add(transactionId);
|
|
5244
|
-
yield writeAppState(
|
|
5250
|
+
yield writeAppState('excludedTransactions', JSON.stringify(Array.from(excludedTransactions)));
|
|
5245
5251
|
continue;
|
|
5246
5252
|
}
|
|
5247
5253
|
const dataString = yield arweave.transactions
|
|
@@ -5832,11 +5838,11 @@ const globalMachine = setup({
|
|
|
5832
5838
|
(_a) => __awaiter(void 0, [_a], void 0, function* ({ context }) {
|
|
5833
5839
|
let SeedClass;
|
|
5834
5840
|
if (context.environment === 'node') {
|
|
5835
|
-
const { SeedNode } = yield import('./seed-
|
|
5841
|
+
const { SeedNode } = yield import('./seed-C8LDZtnw.js');
|
|
5836
5842
|
SeedClass = SeedNode;
|
|
5837
5843
|
}
|
|
5838
5844
|
else {
|
|
5839
|
-
const { SeedBrowser } = yield import('./seed-
|
|
5845
|
+
const { SeedBrowser } = yield import('./seed-Dm6nbxxo.js');
|
|
5840
5846
|
SeedClass = SeedBrowser;
|
|
5841
5847
|
}
|
|
5842
5848
|
return SeedClass;
|
|
@@ -6637,7 +6643,7 @@ const client = {
|
|
|
6637
6643
|
console.error('fs listeners not ready during init');
|
|
6638
6644
|
}
|
|
6639
6645
|
globalService.send({ type: 'init', endpoints, models, addresses });
|
|
6640
|
-
import('./seed.schema.config-
|
|
6646
|
+
import('./seed.schema.config-cLeX7Oyb.js').then(({ models }) => {
|
|
6641
6647
|
for (const [key, value] of Object.entries(models)) {
|
|
6642
6648
|
setModel(key, value);
|
|
6643
6649
|
}
|
|
@@ -6694,4 +6700,4 @@ if (isNode()) {
|
|
|
6694
6700
|
}
|
|
6695
6701
|
|
|
6696
6702
|
export { CHILD_SNAPSHOT as C, 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, internalMachine as h, itemMachineSingle as i, isNode as j, isBrowser as k, isReactNative as l, ImageSrc as m, ItemProperty as n, useItem as o, useItemProperties as p, useCreateItem as q, useItemProperty as r, useDeleteItem as s, useGlobalServiceStatus as t, useItems as u, useServices as v, withSeed as w, getGlobalService as x, client as y, getCorrectId as z };
|
|
6697
|
-
//# sourceMappingURL=index-
|
|
6703
|
+
//# sourceMappingURL=index-B6e21b8Z.js.map
|