@seedprotocol/sdk 0.1.19 → 0.1.21
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-scU0pJvR.js → index-CckBxrSh.js} +2 -2
- package/dist/index-CckBxrSh.js.map +1 -0
- package/dist/{index-D3JMvAuO.js → index-Cy_HipO3.js} +15 -9
- package/dist/index-Cy_HipO3.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/{seed-Dpo8KWqz.js → seed-BPdYo60X.js} +3 -3
- package/dist/{seed-Dpo8KWqz.js.map → seed-BPdYo60X.js.map} +1 -1
- package/dist/{seed-BDG7IW-o.js → seed-CKCT_cl0.js} +3 -3
- package/dist/{seed-BDG7IW-o.js.map → seed-CKCT_cl0.js.map} +1 -1
- package/dist/{seed-DBkf4fbe.js → seed-D12qMUYl.js} +2 -2
- package/dist/{seed-DBkf4fbe.js.map → seed-D12qMUYl.js.map} +1 -1
- package/dist/{seed.schema.config-CCYo8gj-.js → seed.schema.config-CoTyC5sz.js} +2 -2
- package/dist/{seed.schema.config-CCYo8gj-.js.map → seed.schema.config-CoTyC5sz.js.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/property/class.d.ts.map +1 -1
- package/dist/types/src/browser/services/internal/constants.d.ts +0 -1
- package/dist/types/src/browser/services/internal/constants.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-D3JMvAuO.js.map +0 -1
- package/dist/index-scU0pJvR.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { f as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, e as GET_PROPERTIES, G as GET_SCHEMAS, a as GET_SEEDS, b as GET_SEED_IDS, c as GET_STORAGE_TRANSACTION_ID, d as GET_VERSIONS, I as Item, g as itemMachineAll, i as itemMachineSingle } from './index-
|
|
1
|
+
export { f as GET_ALL_PROPERTIES_FOR_ALL_VERSIONS, e as GET_PROPERTIES, G as GET_SCHEMAS, a as GET_SEEDS, b as GET_SEED_IDS, c as GET_STORAGE_TRANSACTION_ID, d as GET_VERSIONS, I as Item, g as itemMachineAll, i as itemMachineSingle } from './index-Cy_HipO3.js';
|
|
2
2
|
import './constants-KW2RTtZB.js';
|
|
3
3
|
import 'path';
|
|
4
4
|
import 'reflect-metadata';
|
|
@@ -27,4 +27,4 @@ import '@xstate/react';
|
|
|
27
27
|
import '@statelyai/inspect';
|
|
28
28
|
import 'drizzle-orm/sqlite-proxy';
|
|
29
29
|
import '@zenfs/dom';
|
|
30
|
-
//# sourceMappingURL=index-
|
|
30
|
+
//# sourceMappingURL=index-CckBxrSh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CckBxrSh.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1023,7 +1023,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
1023
1023
|
renderValue: refResolvedDisplayValue,
|
|
1024
1024
|
});
|
|
1025
1025
|
if (propertyNameFromDb === 'storageTransactionId') {
|
|
1026
|
-
const { Item } = yield import('./index-
|
|
1026
|
+
const { Item } = yield import('./index-CckBxrSh.js');
|
|
1027
1027
|
const item = yield Item.find({
|
|
1028
1028
|
seedLocalId,
|
|
1029
1029
|
modelName: itemModelName,
|
|
@@ -1830,6 +1830,9 @@ class ItemProperty {
|
|
|
1830
1830
|
}
|
|
1831
1831
|
static find(_b) {
|
|
1832
1832
|
return __awaiter(this, arguments, void 0, function* ({ propertyName, seedLocalId, }) {
|
|
1833
|
+
if (!seedLocalId || !propertyName) {
|
|
1834
|
+
return;
|
|
1835
|
+
}
|
|
1833
1836
|
const cacheKey = ItemProperty.cacheKey(seedLocalId, propertyName);
|
|
1834
1837
|
if (this.instanceCache.has(cacheKey)) {
|
|
1835
1838
|
const { instance, refCount } = this.instanceCache.get(cacheKey);
|
|
@@ -3415,6 +3418,9 @@ class Item {
|
|
|
3415
3418
|
}
|
|
3416
3419
|
static find(_b) {
|
|
3417
3420
|
return __awaiter(this, arguments, void 0, function* ({ modelName, seedLocalId, seedUid, }) {
|
|
3421
|
+
if (!modelName || (!seedLocalId && !seedUid)) {
|
|
3422
|
+
return;
|
|
3423
|
+
}
|
|
3418
3424
|
const itemData = yield getItemDataFromDb({
|
|
3419
3425
|
modelName,
|
|
3420
3426
|
seedLocalId,
|
|
@@ -4345,7 +4351,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
4345
4351
|
if (!models$1) {
|
|
4346
4352
|
return;
|
|
4347
4353
|
}
|
|
4348
|
-
const { models: SeedModels } = yield import('./seed.schema.config-
|
|
4354
|
+
const { models: SeedModels } = yield import('./seed.schema.config-CoTyC5sz.js');
|
|
4349
4355
|
const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
|
|
4350
4356
|
let hasModelsInDb = false;
|
|
4351
4357
|
const schemaDefsByModelName = new Map();
|
|
@@ -4610,9 +4616,9 @@ const dbExec = (dbId_1, params_1, sql_1, dbName_1, ...args_1) => __awaiter(void
|
|
|
4610
4616
|
return rowsToReturn || [];
|
|
4611
4617
|
});
|
|
4612
4618
|
const migrate = fromCallback(({ sendBack, input: { context } }) => {
|
|
4613
|
-
const { pathToDbDir,
|
|
4619
|
+
const { pathToDbDir, dbId, dbName } = context;
|
|
4614
4620
|
logger$c('[db/actors] migrate context', context);
|
|
4615
|
-
const schemaGlobString = `${BROWSER_FS_TOP_DIR}
|
|
4621
|
+
const schemaGlobString = `${BROWSER_FS_TOP_DIR}/schema/*`;
|
|
4616
4622
|
let journalExists = false;
|
|
4617
4623
|
// const _initFs = async (): Promise<void> => {
|
|
4618
4624
|
// const handle = await navigator.storage.getDirectory()
|
|
@@ -5809,11 +5815,11 @@ const globalMachine = setup({
|
|
|
5809
5815
|
(_a) => __awaiter(void 0, [_a], void 0, function* ({ context }) {
|
|
5810
5816
|
let SeedClass;
|
|
5811
5817
|
if (context.environment === 'node') {
|
|
5812
|
-
const { SeedNode } = yield import('./seed-
|
|
5818
|
+
const { SeedNode } = yield import('./seed-BPdYo60X.js');
|
|
5813
5819
|
SeedClass = SeedNode;
|
|
5814
5820
|
}
|
|
5815
5821
|
else {
|
|
5816
|
-
const { SeedBrowser } = yield import('./seed-
|
|
5822
|
+
const { SeedBrowser } = yield import('./seed-CKCT_cl0.js');
|
|
5817
5823
|
SeedClass = SeedBrowser;
|
|
5818
5824
|
}
|
|
5819
5825
|
return SeedClass;
|
|
@@ -6287,7 +6293,7 @@ const useItemProperty = (propertyName, seedLocalId) => {
|
|
|
6287
6293
|
}
|
|
6288
6294
|
}, [dbsAreReady, property, value]);
|
|
6289
6295
|
const readFromDb = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
6290
|
-
if (!dbsAreReady && isReadingFromDb) {
|
|
6296
|
+
if (!propertyName || !seedLocalId || (!dbsAreReady && isReadingFromDb)) {
|
|
6291
6297
|
return;
|
|
6292
6298
|
}
|
|
6293
6299
|
setIsReadingFromDb(true);
|
|
@@ -6620,7 +6626,7 @@ const client = {
|
|
|
6620
6626
|
console.error('fs listeners not ready during init');
|
|
6621
6627
|
}
|
|
6622
6628
|
globalService.send({ type: 'init', endpoints, models, addresses });
|
|
6623
|
-
import('./seed.schema.config-
|
|
6629
|
+
import('./seed.schema.config-CoTyC5sz.js').then(({ models }) => {
|
|
6624
6630
|
for (const [key, value] of Object.entries(models)) {
|
|
6625
6631
|
setModel(key, value);
|
|
6626
6632
|
}
|
|
@@ -6677,4 +6683,4 @@ if (isNode()) {
|
|
|
6677
6683
|
}
|
|
6678
6684
|
|
|
6679
6685
|
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, useServices as t, useItems as u, getGlobalService as v, withSeed as w, client as x, getCorrectId as y };
|
|
6680
|
-
//# sourceMappingURL=index-
|
|
6686
|
+
//# sourceMappingURL=index-Cy_HipO3.js.map
|