@seedprotocol/sdk 0.1.118 → 0.1.119
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-BPIesZ_6.js → index-D9hBdVBw.js} +28 -12
- package/dist/index-D9hBdVBw.js.map +1 -0
- package/dist/{index-B_TEG7RD.js → index-PI7JgtNo.js} +3 -3
- package/dist/index-PI7JgtNo.js.map +1 -0
- package/dist/main.js +2 -2
- package/dist/{seed.schema.config-BB6-tbUU.js → seed.schema.config-DcbShLHu.js} +3 -3
- package/dist/{seed.schema.config-BB6-tbUU.js.map → seed.schema.config-DcbShLHu.js.map} +1 -1
- package/dist/src/actors.ts +289 -7
- package/dist/src/index.ts +62 -10
- package/dist/src/seed.ts +31 -4
- package/dist/types/src/node/webpack/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-BPIesZ_6.js.map +0 -1
- package/dist/index-B_TEG7RD.js.map +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { __awaiter, __rest } from 'tslib';
|
|
2
|
-
import path, { basename } from 'path';
|
|
3
2
|
import 'reflect-metadata';
|
|
4
3
|
import { Type } from '@sinclair/typebox';
|
|
5
4
|
import { fromCallback, createActor, waitFor, setup, assign, raise } from 'xstate';
|
|
@@ -15,6 +14,7 @@ import { QueryClient } from '@tanstack/react-query';
|
|
|
15
14
|
import { GraphQLClient } from 'graphql-request';
|
|
16
15
|
import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister';
|
|
17
16
|
import { persistQueryClient } from '@tanstack/react-query-persist-client';
|
|
17
|
+
import path, { basename } from 'path';
|
|
18
18
|
import { useImmer } from 'use-immer';
|
|
19
19
|
import { useSelector } from '@xstate/react';
|
|
20
20
|
import EventEmitter from 'eventemitter3';
|
|
@@ -63,13 +63,29 @@ const withSeed$1 = (config, webpack, isServer) => {
|
|
|
63
63
|
// console.log('crypto-browserify exists:', fs.existsSync(path.resolve(process.cwd(), './node_modules/crypto-browserify')))
|
|
64
64
|
// console.log('path-browserify exists:', fs.existsSync(path.resolve(process.cwd(), './node_modules/path-browserify')))
|
|
65
65
|
if (!isServer) {
|
|
66
|
-
config.resolve.alias['fs'] =
|
|
67
|
-
config.resolve.alias['node:fs'] =
|
|
68
|
-
config.resolve.alias['
|
|
69
|
-
|
|
70
|
-
// config.resolve.alias['
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
config.resolve.alias['fs'] = '@zenfs/core';
|
|
67
|
+
config.resolve.alias['node:fs'] = '@zenfs/core';
|
|
68
|
+
config.resolve.alias['node:path'] = 'path-browserify';
|
|
69
|
+
config.resolve.alias['path'] = 'path-browserify';
|
|
70
|
+
// config.resolve.alias['fs'] = path.resolve(
|
|
71
|
+
// process.cwd(),
|
|
72
|
+
// './node_modules/@zenfs/core',
|
|
73
|
+
// )
|
|
74
|
+
// config.resolve.alias['node:fs'] = path.resolve(
|
|
75
|
+
// process.cwd(),
|
|
76
|
+
// './node_modules/@zenfs/core',
|
|
77
|
+
// )
|
|
78
|
+
// config.resolve.alias['@schema'] = path.resolve(process.cwd(), 'schema.ts')
|
|
79
|
+
// // config.resolve.alias['crypto'] = path.resolve(process.cwd(), './node_modules/crypto-browserify')
|
|
80
|
+
// // config.resolve.alias['node:crypto'] = path.resolve(process.cwd(), './node_modules/crypto-browserify')
|
|
81
|
+
// config.resolve.alias['node:path'] = path.resolve(
|
|
82
|
+
// process.cwd(),
|
|
83
|
+
// './node_modules/path-browserify',
|
|
84
|
+
// )
|
|
85
|
+
// config.resolve.alias['path'] = path.resolve(
|
|
86
|
+
// process.cwd(),
|
|
87
|
+
// './node_modules/path-browserify',
|
|
88
|
+
// )
|
|
73
89
|
}
|
|
74
90
|
if (isServer) {
|
|
75
91
|
config.externals.push('@sqlite.org/sqlite-wasm');
|
|
@@ -2098,7 +2114,7 @@ const addModelsToDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
2098
2114
|
if (!models$1) {
|
|
2099
2115
|
return;
|
|
2100
2116
|
}
|
|
2101
|
-
const { models: SeedModels } = yield import('./seed.schema.config-
|
|
2117
|
+
const { models: SeedModels } = yield import('./seed.schema.config-DcbShLHu.js');
|
|
2102
2118
|
const allModels = Object.assign(Object.assign({}, SeedModels), models$1);
|
|
2103
2119
|
let hasModelsInDb = false;
|
|
2104
2120
|
const schemaDefsByModelName = new Map();
|
|
@@ -6500,7 +6516,7 @@ const client = {
|
|
|
6500
6516
|
addresses,
|
|
6501
6517
|
arweaveDomain,
|
|
6502
6518
|
});
|
|
6503
|
-
import('./seed.schema.config-
|
|
6519
|
+
import('./seed.schema.config-DcbShLHu.js').then(({ models }) => {
|
|
6504
6520
|
for (const [key, value] of Object.entries(models)) {
|
|
6505
6521
|
setModel(key, value);
|
|
6506
6522
|
}
|
|
@@ -7175,7 +7191,7 @@ const hydrateFromDb = fromCallback(({ sendBack, input: { context } }) => {
|
|
|
7175
7191
|
if (propertyRecordSchema &&
|
|
7176
7192
|
propertyRecordSchema.storageType &&
|
|
7177
7193
|
propertyRecordSchema.storageType === 'ItemStorage') {
|
|
7178
|
-
const { Item } = yield import('./index-
|
|
7194
|
+
const { Item } = yield import('./index-PI7JgtNo.js');
|
|
7179
7195
|
const item = yield Item.find({
|
|
7180
7196
|
seedLocalId,
|
|
7181
7197
|
modelName,
|
|
@@ -8117,4 +8133,4 @@ if (isNode()) {
|
|
|
8117
8133
|
}
|
|
8118
8134
|
|
|
8119
8135
|
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 };
|
|
8120
|
-
//# sourceMappingURL=index-
|
|
8136
|
+
//# sourceMappingURL=index-D9hBdVBw.js.map
|