@seedprotocol/sdk 0.2.7 → 0.2.9
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/Db-6ASfloxO.js +138 -0
- package/dist/Db-6ASfloxO.js.map +1 -0
- package/dist/Db-CekaG8x5.js +39 -0
- package/dist/Db-CekaG8x5.js.map +1 -0
- package/dist/EasClient-DdahV-My.js +13 -0
- package/dist/EasClient-DdahV-My.js.map +1 -0
- package/dist/EasClient-virlpmud.js +13 -0
- package/dist/EasClient-virlpmud.js.map +1 -0
- package/dist/FileManager-5GT-dMg0.js +16 -0
- package/dist/FileManager-5GT-dMg0.js.map +1 -0
- package/dist/FileManager-hdyZkwYe.js +18 -0
- package/dist/FileManager-hdyZkwYe.js.map +1 -0
- package/dist/{Item-C0yRQjy9.js → Item-Bbve5-Tc.js} +3 -3
- package/dist/{Item-C0yRQjy9.js.map → Item-Bbve5-Tc.js.map} +1 -1
- package/dist/QueryClient-DI1wuuAt.js +23 -0
- package/dist/QueryClient-DI1wuuAt.js.map +1 -0
- package/dist/QueryClient-J0ohccHX.js +21 -0
- package/dist/QueryClient-J0ohccHX.js.map +1 -0
- package/dist/bin.js +4 -26
- package/dist/bin.js.map +1 -1
- package/dist/{constants-CtWTDW5q.js → constants-C0HNnrob.js} +11 -2
- package/dist/constants-C0HNnrob.js.map +1 -0
- package/dist/{index-CvJyeO8i.js → index-CvK9G39a.js} +50 -16
- package/dist/index-CvK9G39a.js.map +1 -0
- package/dist/{index-BOWZmkrB.js → index-DUCFXs2O.js} +3 -3
- package/dist/index-DUCFXs2O.js.map +1 -0
- package/dist/main.js +2 -2
- package/dist/{seed.schema.config-DLCIfUGL.js → seed.schema.config-B5xOlSs5.js} +3 -3
- package/dist/{seed.schema.config-DLCIfUGL.js.map → seed.schema.config-B5xOlSs5.js.map} +1 -1
- package/dist/src/BaseArweaveClient.ts +1 -1
- package/dist/src/Db.ts +1 -1
- package/dist/src/{EasClientNode.ts → EasClient.ts} +4 -4
- package/dist/src/FileManager.ts +13 -0
- package/dist/src/{QueryClientNode.ts → QueryClient.ts} +4 -6
- package/dist/src/addModelsToDb.ts +1 -1
- package/dist/src/client.ts +8 -0
- package/dist/src/connectToDb.ts +1 -1
- package/dist/src/createMetadata.ts +1 -1
- package/dist/src/createSeed.ts +1 -1
- package/dist/src/createSeeds.ts +1 -1
- package/dist/src/createVersion.ts +1 -1
- package/dist/src/deleteItem.ts +1 -1
- package/dist/src/download.ts +1 -1
- package/dist/src/fetchRelatedItems.ts +3 -3
- package/dist/src/fetchSeeds.ts +2 -2
- package/dist/src/fetchVersions.ts +2 -2
- package/dist/src/getExistingItem.ts +1 -1
- package/dist/src/getItemData.ts +1 -1
- package/dist/src/getItemProperties.ts +1 -1
- package/dist/src/getItemProperty.ts +1 -1
- package/dist/src/getItems.ts +1 -1
- package/dist/src/getMetadata.ts +1 -1
- package/dist/src/getModelSchemas.ts +3 -3
- package/dist/src/getPropertyData.ts +1 -1
- package/dist/src/getRelationValueData.ts +1 -1
- package/dist/src/getSchemaUidForModel.ts +2 -2
- package/dist/src/getSeedData.ts +1 -1
- package/dist/src/getStorageTransactionIdForSeedUid.ts +1 -1
- package/dist/src/getVersionData.ts +1 -1
- package/dist/src/hydrateFromDb.ts +1 -1
- package/dist/src/initialize.ts +1 -1
- package/dist/src/prepareDb.ts +1 -1
- package/dist/src/preparePublishRequestData.ts +1 -1
- package/dist/src/recoverDeletedItem.ts +1 -1
- package/dist/src/saveAppState.ts +1 -1
- package/dist/src/saveConfig.ts +1 -1
- package/dist/src/saveDataToDb.ts +1 -1
- package/dist/src/saveImageSrc.ts +1 -1
- package/dist/src/saveItemStorage.ts +1 -1
- package/dist/src/saveMetadata.ts +1 -1
- package/dist/src/services.ts +1 -1
- package/dist/src/syncDbWithEas.ts +3 -3
- package/dist/src/updateMetadata.ts +1 -1
- package/dist/src/versionData.ts +1 -1
- package/dist/src/waitForDb.ts +1 -1
- package/dist/types/scripts/bin.d.ts +3 -3
- package/dist/types/scripts/bin.d.ts.map +1 -1
- package/dist/types/src/browser/db/Db.d.ts +1 -1
- package/dist/types/src/browser/db/Db.d.ts.map +1 -1
- package/dist/types/src/browser/helpers/EasClient.d.ts +7 -0
- package/dist/types/src/browser/helpers/EasClient.d.ts.map +1 -0
- package/dist/types/src/browser/helpers/FileManager.d.ts +6 -0
- package/dist/types/src/browser/helpers/FileManager.d.ts.map +1 -0
- package/dist/types/src/browser/helpers/QueryClient.d.ts +7 -0
- package/dist/types/src/browser/helpers/QueryClient.d.ts.map +1 -0
- package/dist/types/src/client.d.ts.map +1 -1
- package/dist/types/src/db/Db/BaseDb.d.ts.map +1 -0
- package/dist/types/src/db/Db/index.d.ts +5 -0
- package/dist/types/src/db/Db/index.d.ts.map +1 -0
- package/dist/types/src/helpers/EasClient/BaseEasClient.d.ts.map +1 -0
- package/dist/types/src/helpers/EasClient/index.d.ts +5 -0
- package/dist/types/src/helpers/EasClient/index.d.ts.map +1 -0
- package/dist/types/src/helpers/FileManager/BaseFileManager.d.ts.map +1 -0
- package/dist/types/src/helpers/FileManager/index.d.ts +5 -0
- package/dist/types/src/helpers/FileManager/index.d.ts.map +1 -0
- package/dist/types/src/helpers/QueryClient/BaseQueryClient.d.ts.map +1 -0
- package/dist/types/src/helpers/QueryClient/index.d.ts +5 -0
- package/dist/types/src/helpers/QueryClient/index.d.ts.map +1 -0
- package/dist/types/src/helpers/index.d.ts +3 -3
- package/dist/types/src/helpers/index.d.ts.map +1 -1
- package/dist/types/src/node/db/Db.d.ts +1 -1
- package/dist/types/src/node/db/Db.d.ts.map +1 -1
- package/dist/types/src/node/helpers/EasClient.d.ts +7 -0
- package/dist/types/src/node/helpers/EasClient.d.ts.map +1 -0
- package/dist/types/src/node/helpers/FileManager.d.ts +6 -0
- package/dist/types/src/node/helpers/FileManager.d.ts.map +1 -0
- package/dist/types/src/node/helpers/QueryClient.d.ts +9 -0
- package/dist/types/src/node/helpers/QueryClient.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/constants-CtWTDW5q.js.map +0 -1
- package/dist/index-BOWZmkrB.js.map +0 -1
- package/dist/index-CvJyeO8i.js.map +0 -1
- package/dist/src/EasClientWeb.ts +0 -13
- package/dist/src/FileManagerNode.ts +0 -31
- package/dist/src/FileManagerWeb.ts +0 -18
- package/dist/src/QueryClientWeb.ts +0 -20
- package/dist/types/src/browser/helpers/EasClientWeb.d.ts +0 -7
- package/dist/types/src/browser/helpers/EasClientWeb.d.ts.map +0 -1
- package/dist/types/src/browser/helpers/FileManagerWeb.d.ts +0 -5
- package/dist/types/src/browser/helpers/FileManagerWeb.d.ts.map +0 -1
- package/dist/types/src/browser/helpers/QueryClientWeb.d.ts +0 -7
- package/dist/types/src/browser/helpers/QueryClientWeb.d.ts.map +0 -1
- package/dist/types/src/db/BaseDb.d.ts.map +0 -1
- package/dist/types/src/helpers/BaseEasClient.d.ts.map +0 -1
- package/dist/types/src/helpers/BaseFileManager.d.ts.map +0 -1
- package/dist/types/src/helpers/BaseQueryClient.d.ts.map +0 -1
- package/dist/types/src/node/helpers/EasClientNode.d.ts +0 -7
- package/dist/types/src/node/helpers/EasClientNode.d.ts.map +0 -1
- package/dist/types/src/node/helpers/FileManagerNode.d.ts +0 -9
- package/dist/types/src/node/helpers/FileManagerNode.d.ts.map +0 -1
- package/dist/types/src/node/helpers/QueryClientNode.d.ts +0 -9
- package/dist/types/src/node/helpers/QueryClientNode.d.ts.map +0 -1
- /package/dist/types/src/db/{BaseDb.d.ts → Db/BaseDb.d.ts} +0 -0
- /package/dist/types/src/helpers/{BaseEasClient.d.ts → EasClient/BaseEasClient.d.ts} +0 -0
- /package/dist/types/src/helpers/{BaseFileManager.d.ts → FileManager/BaseFileManager.d.ts} +0 -0
- /package/dist/types/src/helpers/{BaseQueryClient.d.ts → QueryClient/BaseQueryClient.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { I as Item } from './index-
|
|
1
|
+
export { I as Item } from './index-CvK9G39a.js';
|
|
2
2
|
import 'immer';
|
|
3
3
|
import 'reflect-metadata';
|
|
4
4
|
import 'tslib';
|
|
@@ -10,7 +10,7 @@ import 'dayjs';
|
|
|
10
10
|
import 'nanoid';
|
|
11
11
|
import 'nanoid-dictionary';
|
|
12
12
|
import 'debug';
|
|
13
|
-
import './constants-
|
|
13
|
+
import './constants-C0HNnrob.js';
|
|
14
14
|
import '@ethereum-attestation-service/eas-sdk';
|
|
15
15
|
import 'drizzle-orm/sqlite-core';
|
|
16
16
|
import 'drizzle-orm';
|
|
@@ -28,4 +28,4 @@ import '@zenfs/dom';
|
|
|
28
28
|
import 'arweave';
|
|
29
29
|
import 'use-immer';
|
|
30
30
|
import '@xstate/react';
|
|
31
|
-
//# sourceMappingURL=index-
|
|
31
|
+
//# sourceMappingURL=index-DUCFXs2O.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DUCFXs2O.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/main.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import 'immer';
|
|
2
2
|
import 'reflect-metadata';
|
|
3
|
-
export {
|
|
3
|
+
export { c as ImageSrc, I as Item, d as ItemProperty, J as Json, L as List, M as Model, P as Property, R as Relation, T as Text, q as client, p as eventEmitter, o as getCorrectId, n as getGlobalService, h as useCreateItem, k as useDeleteItem, l as useGlobalServiceStatus, e as useItem, f as useItemProperties, j as useItemProperty, u as useItems, m as useServices, w as withSeed } from './index-CvK9G39a.js';
|
|
4
4
|
import 'tslib';
|
|
5
5
|
import 'xstate';
|
|
6
6
|
import 'arweave';
|
|
7
7
|
import 'drizzle-orm';
|
|
8
|
-
export {
|
|
8
|
+
export { c as BaseArweaveClient, B as BaseEasClient, b as BaseFileManager, a as BaseQueryClient } from './constants-C0HNnrob.js';
|
|
9
9
|
import '@sinclair/typebox';
|
|
10
10
|
import 'rxjs';
|
|
11
11
|
import '@zenfs/core';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import 'drizzle-orm';
|
|
3
|
-
import { T as Text, M as Model } from './index-
|
|
3
|
+
import { T as Text, M as Model } from './index-CvK9G39a.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'reflect-metadata';
|
|
6
6
|
import 'xstate';
|
|
@@ -13,7 +13,7 @@ import 'dayjs';
|
|
|
13
13
|
import 'nanoid';
|
|
14
14
|
import 'nanoid-dictionary';
|
|
15
15
|
import 'debug';
|
|
16
|
-
import './constants-
|
|
16
|
+
import './constants-C0HNnrob.js';
|
|
17
17
|
import '@ethereum-attestation-service/eas-sdk';
|
|
18
18
|
import 'drizzle-orm/sqlite-core';
|
|
19
19
|
import 'path';
|
|
@@ -75,4 +75,4 @@ const models = {
|
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
export { models };
|
|
78
|
-
//# sourceMappingURL=seed.schema.config-
|
|
78
|
+
//# sourceMappingURL=seed.schema.config-B5xOlSs5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.schema.config-
|
|
1
|
+
{"version":3,"file":"seed.schema.config-B5xOlSs5.js","sources":["../../src/shared/configs/seed.schema.config.ts"],"sourcesContent":["import { Model, Text } from '@/browser'\n\n@Model\nclass Seed {\n @Text() uid!: string\n @Text() type!: string\n}\n\n@Model\nclass Version {\n @Text() seedUid!: string\n @Text() note!: string\n}\n\n@Model\nclass Metadata {\n @Text() key!: string\n @Text() value!: string\n}\n\nexport const models = {\n Seed,\n Version,\n Metadata,\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAM,IAAI,GAAV,MAAM,IAAI,CAAA;CAGT;AAFS,UAAA,CAAA;AAAP,IAAA,IAAI,EAAE;;AAAa,CAAA,EAAA,IAAA,CAAA,SAAA,EAAA,KAAA,EAAA,KAAA,CAAA,CAAA;AACZ,UAAA,CAAA;AAAP,IAAA,IAAI,EAAE;;AAAc,CAAA,EAAA,IAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA;AAFjB,IAAI,GAAA,UAAA,CAAA;IADT;AACK,CAAA,EAAA,IAAI,CAGT;AAGD,IAAM,OAAO,GAAb,MAAM,OAAO,CAAA;CAGZ;AAFS,UAAA,CAAA;AAAP,IAAA,IAAI,EAAE;;AAAiB,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA;AAChB,UAAA,CAAA;AAAP,IAAA,IAAI,EAAE;;AAAc,CAAA,EAAA,OAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA;AAFjB,OAAO,GAAA,UAAA,CAAA;IADZ;AACK,CAAA,EAAA,OAAO,CAGZ;AAGD,IAAM,QAAQ,GAAd,MAAM,QAAQ,CAAA;CAGb;AAFS,UAAA,CAAA;AAAP,IAAA,IAAI,EAAE;;AAAa,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,KAAA,EAAA,KAAA,CAAA,CAAA;AACZ,UAAA,CAAA;AAAP,IAAA,IAAI,EAAE;;AAAe,CAAA,EAAA,QAAA,CAAA,SAAA,EAAA,OAAA,EAAA,KAAA,CAAA,CAAA;AAFlB,QAAQ,GAAA,UAAA,CAAA;IADb;AACK,CAAA,EAAA,QAAQ,CAGb;AAEY,MAAA,MAAM,GAAG;IACpB,IAAI;IACJ,OAAO;IACP,QAAQ;;;;;"}
|
package/dist/src/Db.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { BaseEasClient } from "@/helpers/BaseEasClient"
|
|
1
|
+
import { BaseEasClient } from "@/helpers/EasClient/BaseEasClient"
|
|
2
2
|
import { EAS_ENDPOINT } from "@/services/internal/constants"
|
|
3
3
|
import { GraphQLClient } from "graphql-request"
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class EasClient extends BaseEasClient {
|
|
6
6
|
static getEasClient() {
|
|
7
7
|
return new GraphQLClient(EAS_ENDPOINT)
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
BaseEasClient.setPlatformClass(
|
|
11
|
+
BaseEasClient.setPlatformClass(EasClient)
|
|
12
12
|
|
|
13
|
-
export {
|
|
13
|
+
export { EasClient }
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { promises as fs } from 'fs';
|
|
2
|
+
import { BaseFileManager } from '@/helpers/FileManager/BaseFileManager';
|
|
3
|
+
|
|
4
|
+
class FileManager extends BaseFileManager {
|
|
5
|
+
static async readFileAsBuffer(filePath: string): Promise<Buffer> {
|
|
6
|
+
return await fs.readFile(filePath);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
BaseFileManager.setPlatformClass(FileManager);
|
|
12
|
+
|
|
13
|
+
export { FileManager };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { BaseQueryClient } from "@/helpers/BaseQueryClient"
|
|
2
|
-
import { EAS_ENDPOINT } from "@/services/internal/constants"
|
|
3
|
-
import { GraphQLClient } from "graphql-request"
|
|
1
|
+
import { BaseQueryClient } from "@/helpers/QueryClient/BaseQueryClient"
|
|
4
2
|
|
|
5
|
-
class
|
|
3
|
+
class QueryClient extends BaseQueryClient {
|
|
6
4
|
static getQueryClient() {
|
|
7
5
|
return {
|
|
8
6
|
fetchQuery: () => {
|
|
@@ -19,6 +17,6 @@ class QueryClientNode extends BaseQueryClient {
|
|
|
19
17
|
}
|
|
20
18
|
}
|
|
21
19
|
|
|
22
|
-
BaseQueryClient.setPlatformClass(
|
|
20
|
+
BaseQueryClient.setPlatformClass(QueryClient)
|
|
23
21
|
|
|
24
|
-
export {
|
|
22
|
+
export { QueryClient }
|
|
@@ -2,7 +2,7 @@ import { EventObject, fromCallback } from 'xstate'
|
|
|
2
2
|
import { models as modelsTable, modelUids } from '@/seedSchema'
|
|
3
3
|
import { eq } from 'drizzle-orm'
|
|
4
4
|
import { toSnakeCase, BaseEasClient, BaseQueryClient } from '@/helpers'
|
|
5
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
5
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
6
6
|
import { GLOBAL_ADDING_MODELS_TO_DB_SUCCESS } from '@/services/internal/constants'
|
|
7
7
|
import { eventEmitter } from '@/eventBus'
|
|
8
8
|
import { FromCallbackInput, GlobalMachineContext } from '@/types'
|
package/dist/src/client.ts
CHANGED
|
@@ -14,12 +14,20 @@ import { setupServiceHandlers } from '@/events/services'
|
|
|
14
14
|
import { setArweaveDomain } from '@/browser/helpers/arweave'
|
|
15
15
|
import { initItem } from './Item'
|
|
16
16
|
import { initItemProperty } from './ItemProperty'
|
|
17
|
+
import { initEasClient } from './helpers/EasClient'
|
|
18
|
+
import { initQueryClient } from './helpers/QueryClient'
|
|
19
|
+
import { initFileManager } from './helpers/FileManager'
|
|
20
|
+
import { initDb } from './db/Db'
|
|
17
21
|
|
|
18
22
|
const client = {
|
|
19
23
|
init: async ({ config, addresses }: Promise<SeedConstructorOptions>) => {
|
|
20
24
|
|
|
21
25
|
await initItem()
|
|
22
26
|
await initItemProperty()
|
|
27
|
+
await initEasClient()
|
|
28
|
+
await initQueryClient()
|
|
29
|
+
await initFileManager()
|
|
30
|
+
await initDb()
|
|
23
31
|
|
|
24
32
|
const { endpoints, models, arweaveDomain } = config
|
|
25
33
|
|
package/dist/src/connectToDb.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { DbServiceContext, FromCallbackInput } from '@/types'
|
|
|
3
3
|
import { getSqliteWasmClient } from '@/db/sqlWasmClient'
|
|
4
4
|
import { DB_CREATING_SUCCESS } from '@/services/internal/constants'
|
|
5
5
|
import debug from 'debug'
|
|
6
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
6
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
7
7
|
|
|
8
8
|
const logger = debug('app:services:db:actors:connectToDb')
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { metadata, MetadataType } from '@/seedSchema'
|
|
2
2
|
import { generateId } from '@/helpers'
|
|
3
3
|
import { PropertyType } from '@/types'
|
|
4
|
-
import { BaseDb } from '../BaseDb'
|
|
4
|
+
import { BaseDb } from '../Db/BaseDb'
|
|
5
5
|
|
|
6
6
|
type CreateMetadata = (
|
|
7
7
|
metadataValues: Partial<MetadataType>,
|
package/dist/src/createSeed.ts
CHANGED
package/dist/src/createSeeds.ts
CHANGED
package/dist/src/deleteItem.ts
CHANGED
package/dist/src/download.ts
CHANGED
|
@@ -19,7 +19,7 @@ import { getMetadata } from '@/db/read/getMetadata'
|
|
|
19
19
|
import { saveMetadata } from '@/db/write/saveMetadata'
|
|
20
20
|
import { GET_TRANSACTION_TAGS } from '@/browser/arweave/queries'
|
|
21
21
|
import { saveAppState } from '@/db/write/saveAppState'
|
|
22
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
22
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
23
23
|
import { BaseEasClient, BaseQueryClient, BaseArweaveClient } from '@/helpers'
|
|
24
24
|
|
|
25
25
|
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
} from '@/types'
|
|
18
18
|
import { getAddressesFromDb } from '@/helpers/db'
|
|
19
19
|
import { eq } from 'drizzle-orm'
|
|
20
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
21
|
-
import { BaseEasClient } from '@/helpers/BaseEasClient'
|
|
22
|
-
import { BaseQueryClient } from '@/helpers/BaseQueryClient'
|
|
20
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
21
|
+
import { BaseEasClient } from '@/helpers/EasClient/BaseEasClient'
|
|
22
|
+
import { BaseQueryClient } from '@/helpers/QueryClient/BaseQueryClient'
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
export const fetchRelatedItems = fromCallback<
|
package/dist/src/fetchSeeds.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { EventObject, fromCallback } from 'xstate'
|
|
|
2
2
|
import { GET_SEEDS } from '@/Item/queries'
|
|
3
3
|
import { AllItemsMachineContext, FromCallbackInput } from '@/types'
|
|
4
4
|
import { Attestation } from '@/graphql/gql/graphql'
|
|
5
|
-
import { BaseEasClient } from '@/helpers/BaseEasClient'
|
|
6
|
-
import { BaseQueryClient } from '@/helpers/BaseQueryClient'
|
|
5
|
+
import { BaseEasClient } from '@/helpers/EasClient/BaseEasClient'
|
|
6
|
+
import { BaseQueryClient } from '@/helpers/QueryClient/BaseQueryClient'
|
|
7
7
|
import debug from 'debug'
|
|
8
8
|
|
|
9
9
|
|
|
@@ -2,8 +2,8 @@ import { EventObject, fromCallback } from 'xstate'
|
|
|
2
2
|
import { GET_VERSIONS } from '@/Item/queries'
|
|
3
3
|
import { AllItemsMachineContext, FromCallbackInput } from '@/types'
|
|
4
4
|
import { Attestation } from '@/graphql/gql/graphql'
|
|
5
|
-
import { BaseEasClient } from '@/helpers/BaseEasClient'
|
|
6
|
-
import { BaseQueryClient } from '@/helpers/BaseQueryClient'
|
|
5
|
+
import { BaseEasClient } from '@/helpers/EasClient/BaseEasClient'
|
|
6
|
+
import { BaseQueryClient } from '@/helpers/QueryClient/BaseQueryClient'
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
export const fetchVersions = fromCallback<
|
package/dist/src/getItemData.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetItemData, ItemData } from "@/types"
|
|
2
2
|
import debug from "debug"
|
|
3
|
-
import { BaseDb } from "../BaseDb"
|
|
3
|
+
import { BaseDb } from "../Db/BaseDb"
|
|
4
4
|
import { and, eq, getTableColumns, gt, SQL, sql } from "drizzle-orm"
|
|
5
5
|
import { getItemProperties } from "./getItemProperties"
|
|
6
6
|
import { getVersionData } from "./subqueries/versionData"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GetItemProperties, PropertyData } from '@/types'
|
|
2
2
|
import { metadata, seeds, versions } from '@/seedSchema'
|
|
3
3
|
import { and, eq, getTableColumns, isNotNull, isNull, SQL } from 'drizzle-orm'
|
|
4
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
4
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export const getItemProperties: GetItemProperties = async ({
|
package/dist/src/getItems.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ItemData } from '@/types'
|
|
2
2
|
import { and, eq, gt, isNotNull, isNull, or, SQL, sql } from 'drizzle-orm'
|
|
3
3
|
import { seeds } from '@/seedSchema'
|
|
4
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
4
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
5
5
|
import { getVersionData } from './subqueries/versionData'
|
|
6
6
|
|
|
7
7
|
type GetItemsDataProps = {
|
package/dist/src/getMetadata.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { getModels } from '@/stores/modelClass'
|
|
2
2
|
import { GetSchemasQuery, Schema } from '@/graphql/gql/graphql'
|
|
3
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
3
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
4
4
|
import { models as modelsTable, modelUids } from '@/seedSchema'
|
|
5
5
|
import { eq } from 'drizzle-orm'
|
|
6
6
|
import pluralize from 'pluralize'
|
|
7
7
|
import { toSnakeCase } from '@/helpers'
|
|
8
8
|
import { GET_SCHEMAS } from '@/Item/queries'
|
|
9
|
-
import { BaseEasClient } from '@/helpers/BaseEasClient'
|
|
10
|
-
import { BaseQueryClient } from '@/helpers/BaseQueryClient'
|
|
9
|
+
import { BaseEasClient } from '@/helpers/EasClient/BaseEasClient'
|
|
10
|
+
import { BaseQueryClient } from '@/helpers/QueryClient/BaseQueryClient'
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
type GetModelSchemasReturn = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GET_SCHEMAS } from '@/Item/queries'
|
|
2
|
-
import { BaseEasClient } from '@/helpers/BaseEasClient'
|
|
3
|
-
import { BaseQueryClient } from '@/helpers/BaseQueryClient'
|
|
2
|
+
import { BaseEasClient } from '@/helpers/EasClient/BaseEasClient'
|
|
3
|
+
import { BaseQueryClient } from '@/helpers/QueryClient/BaseQueryClient'
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
export const getSchemaUidForModel = async (
|
package/dist/src/getSeedData.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { and, eq, or, sql } from 'drizzle-orm'
|
|
|
3
3
|
import debug from 'debug'
|
|
4
4
|
import { fs } from '@zenfs/core'
|
|
5
5
|
import { metadata } from '@/seedSchema'
|
|
6
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
6
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
7
7
|
import { updateMetadata } from '@/db/write/updateMetadata'
|
|
8
8
|
import { FromCallbackInput } from '@/types/machines'
|
|
9
9
|
import { PropertyMachineContext } from '@/types/property'
|
package/dist/src/initialize.ts
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from '@/services/internal/constants'
|
|
8
8
|
import debug from 'debug'
|
|
9
9
|
import { FromCallbackInput, GlobalMachineContext } from '@/types'
|
|
10
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
10
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
11
11
|
import { appState } from '@/seedSchema'
|
|
12
12
|
import { like } from 'drizzle-orm'
|
|
13
13
|
import { fetchSchemaUids } from '@/stores/eas'
|
package/dist/src/prepareDb.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { EventObject, fromCallback } from 'xstate'
|
|
|
2
2
|
import { FromCallbackInput, PublishMachineContext } from '@/types'
|
|
3
3
|
import { Item } from '@/browser/Item'
|
|
4
4
|
import { models as modelsTable, modelUids } from '@/seedSchema'
|
|
5
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
5
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
6
6
|
import { eq } from 'drizzle-orm'
|
|
7
7
|
import { getModelSchemas } from '@/db/read/getModelSchemas'
|
|
8
8
|
|
package/dist/src/saveAppState.ts
CHANGED
package/dist/src/saveConfig.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventObject, fromCallback } from 'xstate'
|
|
2
2
|
import { INTERNAL_SAVING_CONFIG_SUCCESS } from '@/services/internal/constants'
|
|
3
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
3
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
4
4
|
import debug from 'debug'
|
|
5
5
|
import { FromCallbackInput, InternalMachineContext } from '@/types'
|
|
6
6
|
import { appState } from '@/seedSchema'
|
package/dist/src/saveDataToDb.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { itemMachineSingle } from '@/Item/service/itemMachineSingle'
|
|
|
3
3
|
import { sql } from 'drizzle-orm'
|
|
4
4
|
import { escapeSqliteString } from '@/helpers/db'
|
|
5
5
|
import { generateId } from '@/helpers'
|
|
6
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
6
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
7
7
|
|
|
8
8
|
const relatedSnakeCaseToCamelCase = (snakeCase: string): string => {
|
|
9
9
|
let camelCasePropertyName = snakeCase
|
package/dist/src/saveImageSrc.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { createMetadata } from '@/db/write/createMetadata'
|
|
|
14
14
|
import { updateItemPropertyValue } from '@/db/write/updateItemPropertyValue'
|
|
15
15
|
import { getSchemaUidForSchemaDefinition } from '@/stores/eas'
|
|
16
16
|
import { getSchemaUidForModel } from '@/db/read/getSchemaUidForModel'
|
|
17
|
-
import { BaseFileManager } from '@/helpers/BaseFileManager'
|
|
17
|
+
import { BaseFileManager } from '@/helpers/FileManager/BaseFileManager'
|
|
18
18
|
|
|
19
19
|
const readFileAsDataUrl = async (file: File): Promise<string> => {
|
|
20
20
|
return new Promise((resolve) => {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
PropertyMachineContext,
|
|
6
6
|
SaveValueToDbEvent,
|
|
7
7
|
} from '@/types/property'
|
|
8
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
8
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
9
9
|
import { getItemPropertyData } from '@/db/read/getItemProperty'
|
|
10
10
|
import { getItemData } from '@/db/read/getItemData'
|
|
11
11
|
import { and, eq } from 'drizzle-orm'
|
package/dist/src/saveMetadata.ts
CHANGED
package/dist/src/services.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { useSelector } from '@xstate/react'
|
|
|
9
9
|
import debug from 'debug'
|
|
10
10
|
import { appState } from '@/seedSchema'
|
|
11
11
|
import { like } from 'drizzle-orm'
|
|
12
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
12
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
13
13
|
import { MachineIds } from '@/services/internal/constants'
|
|
14
14
|
|
|
15
15
|
const logger = debug('app:react:services')
|
|
@@ -26,13 +26,13 @@ import { INTERNAL_DATA_TYPES } from '@/helpers/constants'
|
|
|
26
26
|
import { escapeSqliteString, getAddressesFromDb } from '@/helpers/db'
|
|
27
27
|
import { eventEmitter } from '@/eventBus'
|
|
28
28
|
import { getModelNames, getModels } from '@/stores/modelClass'
|
|
29
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
29
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
30
30
|
import { getModelSchemas } from '@/db/read/getModelSchemas'
|
|
31
31
|
import { ModelSchema, PropertyType } from '@/types'
|
|
32
32
|
import { createSeeds } from '@/db/write/createSeeds'
|
|
33
33
|
import { setSchemaUidForSchemaDefinition } from '@/stores/eas'
|
|
34
|
-
import { BaseEasClient } from '@/helpers/BaseEasClient'
|
|
35
|
-
import { BaseQueryClient } from '@/helpers/BaseQueryClient'
|
|
34
|
+
import { BaseEasClient } from '@/helpers/EasClient/BaseEasClient'
|
|
35
|
+
import { BaseQueryClient } from '@/helpers/QueryClient/BaseQueryClient'
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
package/dist/src/versionData.ts
CHANGED
package/dist/src/waitForDb.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventObject, fromCallback } from 'xstate'
|
|
2
2
|
import { itemMachineSingle } from '@/Item/service/itemMachineSingle'
|
|
3
|
-
import { BaseDb } from '@/db/BaseDb'
|
|
3
|
+
import { BaseDb } from '@/db/Db/BaseDb'
|
|
4
4
|
|
|
5
5
|
export const waitForDb = fromCallback<EventObject, typeof itemMachineSingle>(
|
|
6
6
|
({ sendBack }) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import '../src/node/helpers/
|
|
3
|
-
import '../src/node/helpers/
|
|
4
|
-
import '../src/node/helpers/
|
|
2
|
+
import '../src/node/helpers/EasClient';
|
|
3
|
+
import '../src/node/helpers/QueryClient';
|
|
4
|
+
import '../src/node/helpers/FileManager';
|
|
5
5
|
import '../src/node/helpers/ArweaveClientNode';
|
|
6
6
|
declare const init: (args: string[]) => void;
|
|
7
7
|
export { init };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../scripts/bin.ts"],"names":[],"mappings":";AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../../../scripts/bin.ts"],"names":[],"mappings":";AAOA,OAAO,+BAA+B,CAAA;AACtC,OAAO,iCAAiC,CAAA;AACxC,OAAO,iCAAiC,CAAA;AACxC,OAAO,uCAAuC,CAAA;AAoB9C,QAAA,MAAM,IAAI,SAAU,MAAM,EAAE,SA+I3B,CAAA;AAeD,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Db.d.ts","sourceRoot":"","sources":["../../../../../src/browser/db/Db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Db.d.ts","sourceRoot":"","sources":["../../../../../src/browser/db/Db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAOvC,cAAM,EAAG,SAAQ,MAAO,YAAW,GAAG;;IAKpC,MAAM,CAAC,QAAQ;IAIf,MAAM,CAAC,YAAY;IAInB,MAAM,CAAC,SAAS;IAoBhB,MAAM,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAoCrD;AAID,OAAO,EAAE,EAAE,EAAE,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseEasClient } from '../../helpers/EasClient/BaseEasClient';
|
|
2
|
+
import { GraphQLClient } from 'graphql-request';
|
|
3
|
+
declare class EasClient extends BaseEasClient {
|
|
4
|
+
static getEasClient(): GraphQLClient;
|
|
5
|
+
}
|
|
6
|
+
export { EasClient };
|
|
7
|
+
//# sourceMappingURL=EasClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EasClient.d.ts","sourceRoot":"","sources":["../../../../../src/browser/helpers/EasClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAA;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAG/C,cAAM,SAAU,SAAQ,aAAa;IACnC,MAAM,CAAC,YAAY,IAAI,aAAa;CAGrC;AAID,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileManager.d.ts","sourceRoot":"","sources":["../../../../../src/browser/helpers/FileManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,cAAM,WAAY,SAAQ,eAAe;WAC1B,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAQjE;AAID,OAAO,EAAE,WAAW,EAAE,CAAC"}
|