@seedprotocol/sdk 0.2.26 → 0.2.28
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/ArweaveClient-C-HZgUWJ.js +13 -0
- package/dist/ArweaveClient-C-HZgUWJ.js.map +1 -0
- package/dist/ArweaveClient-rTTCUjiu.js +13 -0
- package/dist/ArweaveClient-rTTCUjiu.js.map +1 -0
- package/dist/{Db-DuHi8kGi.js → Db-BIYweCKe.js} +3 -3
- package/dist/{Db-DuHi8kGi.js.map → Db-BIYweCKe.js.map} +1 -1
- package/dist/{Db-BB1DgFLW.js → Db-CURz-SUg.js} +3 -3
- package/dist/{Db-BB1DgFLW.js.map → Db-CURz-SUg.js.map} +1 -1
- package/dist/{EasClient-BGQRv2-M.js → EasClient-CKv5Eyao.js} +2 -2
- package/dist/{EasClient-BGQRv2-M.js.map → EasClient-CKv5Eyao.js.map} +1 -1
- package/dist/{EasClient-Bbxr5rcF.js → EasClient-nvmz2kCc.js} +2 -2
- package/dist/{EasClient-Bbxr5rcF.js.map → EasClient-nvmz2kCc.js.map} +1 -1
- package/dist/{FileManager-D-yaDuSt.js → FileManager-Bm_fGCH1.js} +2 -2
- package/dist/{FileManager-D-yaDuSt.js.map → FileManager-Bm_fGCH1.js.map} +1 -1
- package/dist/{FileManager-CYXquukS.js → FileManager-EGwM_VHY.js} +2 -2
- package/dist/{FileManager-CYXquukS.js.map → FileManager-EGwM_VHY.js.map} +1 -1
- package/dist/{Item-D1EbCv2s.js → Item-DEoXH_7C.js} +3 -3
- package/dist/{Item-D1EbCv2s.js.map → Item-DEoXH_7C.js.map} +1 -1
- package/dist/{ItemProperty-C_YuzqFN.js → ItemProperty-B_gQPKDe.js} +3 -3
- package/dist/{ItemProperty-C_YuzqFN.js.map → ItemProperty-B_gQPKDe.js.map} +1 -1
- package/dist/{QueryClient-Dk66c5aw.js → QueryClient-CkqXe8Nk.js} +2 -2
- package/dist/{QueryClient-Dk66c5aw.js.map → QueryClient-CkqXe8Nk.js.map} +1 -1
- package/dist/{QueryClient-CY_4gVB3.js → QueryClient-pzZAYWa0.js} +2 -2
- package/dist/{QueryClient-CY_4gVB3.js.map → QueryClient-pzZAYWa0.js.map} +1 -1
- package/dist/bin.js +6 -12
- package/dist/bin.js.map +1 -1
- package/dist/{constants-CuI_qYXt.js → constants-BjOTXEgm.js} +2 -2
- package/dist/{constants-CuI_qYXt.js.map → constants-BjOTXEgm.js.map} +1 -1
- package/dist/{index-Bsvr_g6x.js → index-boyGAsLD.js} +3 -3
- package/dist/index-boyGAsLD.js.map +1 -0
- package/dist/{index-8491IPWu.js → index-d-n1CVO_.js} +29 -23
- package/dist/index-d-n1CVO_.js.map +1 -0
- package/dist/main.js +2 -2
- package/dist/{seed.schema.config-CVQ4WO_e.js → seed.schema.config-DCQvnp98.js} +3 -3
- package/dist/{seed.schema.config-CVQ4WO_e.js.map → seed.schema.config-DCQvnp98.js.map} +1 -1
- package/dist/src/client.ts +2 -1
- package/dist/src/download.ts +0 -4
- package/dist/src/getPublishPayload.ts +3 -3
- package/dist/src/helpers.ts +4 -4
- package/dist/src/waitForDb.ts +18 -17
- package/dist/types/src/client.d.ts.map +1 -1
- package/dist/types/src/events/files/download.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index-8491IPWu.js.map +0 -1
- package/dist/index-Bsvr_g6x.js.map +0 -1
package/dist/main.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import 'immer';
|
|
2
2
|
import 'reflect-metadata';
|
|
3
|
-
export { D as Db, d as ImageSrc, e as Item, f as ItemProperty, J as Json, L as List, M as Model, P as Property, R as Relation, T as Text, x as client, v as eventEmitter, s as getCorrectId, t as getGlobalService, k as useCreateItem, m as useDeleteItem, n as useGlobalServiceStatus, h as useItem, j as useItemProperties, l as useItemProperty, u as useItems, p as usePersistedSnapshots, o as usePublishItem, r as useService, q as useServices, w as withSeed } from './index-
|
|
3
|
+
export { D as Db, d as ImageSrc, e as Item, f as ItemProperty, J as Json, L as List, M as Model, P as Property, R as Relation, T as Text, x as client, v as eventEmitter, s as getCorrectId, t as getGlobalService, k as useCreateItem, m as useDeleteItem, n as useGlobalServiceStatus, h as useItem, j as useItemProperties, l as useItemProperty, u as useItems, p as usePersistedSnapshots, o as usePublishItem, r as useService, q as useServices, w as withSeed } from './index-d-n1CVO_.js';
|
|
4
4
|
import 'tslib';
|
|
5
5
|
import 'drizzle-orm';
|
|
6
|
-
export {
|
|
6
|
+
export { B as BaseArweaveClient, a as BaseEasClient, c as BaseFileManager, b as BaseQueryClient } from './constants-BjOTXEgm.js';
|
|
7
7
|
import '@sinclair/typebox';
|
|
8
8
|
import 'react';
|
|
9
9
|
import 'dayjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import 'reflect-metadata';
|
|
3
|
-
import { T as Text, M as Model } from './index-
|
|
3
|
+
import { T as Text, M as Model } from './index-d-n1CVO_.js';
|
|
4
4
|
import 'immer';
|
|
5
5
|
import '@sinclair/typebox';
|
|
6
6
|
import 'drizzle-orm';
|
|
@@ -11,7 +11,7 @@ import 'nanoid-dictionary';
|
|
|
11
11
|
import '@zenfs/core';
|
|
12
12
|
import 'debug';
|
|
13
13
|
import 'drizzle-orm/sqlite-core';
|
|
14
|
-
import './constants-
|
|
14
|
+
import './constants-BjOTXEgm.js';
|
|
15
15
|
import '@ethereum-attestation-service/eas-sdk';
|
|
16
16
|
import 'xstate';
|
|
17
17
|
import 'pluralize';
|
|
@@ -75,4 +75,4 @@ const models = {
|
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
export { models };
|
|
78
|
-
//# sourceMappingURL=seed.schema.config-
|
|
78
|
+
//# sourceMappingURL=seed.schema.config-DCQvnp98.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.schema.config-
|
|
1
|
+
{"version":3,"file":"seed.schema.config-DCQvnp98.js","sources":["../../src/db/configs/seed.schema.config.ts"],"sourcesContent":["import { Model, Text } from '@/schema'\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/client.ts
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
setModel,
|
|
12
12
|
} from '@/stores/modelClass'
|
|
13
13
|
import { setupServiceHandlers } from '@/events/services'
|
|
14
|
-
import { setArweaveDomain } from '@/helpers/ArweaveClient'
|
|
14
|
+
import { initArweaveClient, setArweaveDomain } from '@/helpers/ArweaveClient'
|
|
15
15
|
import { initItem } from './Item'
|
|
16
16
|
import { initItemProperty } from './ItemProperty'
|
|
17
17
|
import { initEasClient } from './helpers/EasClient'
|
|
@@ -26,6 +26,7 @@ const client = {
|
|
|
26
26
|
await initItem()
|
|
27
27
|
await initItemProperty()
|
|
28
28
|
await initEasClient()
|
|
29
|
+
await initArweaveClient()
|
|
29
30
|
await initQueryClient()
|
|
30
31
|
await initFileManager()
|
|
31
32
|
await initDb()
|
package/dist/src/download.ts
CHANGED
|
@@ -153,10 +153,6 @@ export const downloadAllFilesBinaryRequestHandler = async () => {
|
|
|
153
153
|
continue
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
if (transactionId === 'ZXnDkNk_PHRl5Yqu90kEJn_R3LS3Tl9P8eLtlJTqB-M') {
|
|
157
|
-
console.log('transactionId', transactionId)
|
|
158
|
-
}
|
|
159
|
-
|
|
160
156
|
const arweaveClient = BaseArweaveClient.getArweaveClient()
|
|
161
157
|
|
|
162
158
|
const { tags: tagsResult } = await queryClient.fetchQuery({
|
|
@@ -19,9 +19,9 @@ import { getCorrectId } from '@/helpers'
|
|
|
19
19
|
import { Item } from '@/browser/Item/Item'
|
|
20
20
|
import { getSegmentedItemProperties } from '@/helpers/getSegmentedItemProperties'
|
|
21
21
|
import { IItemProperty } from '@/interfaces'
|
|
22
|
+
import { IItem } from '@/interfaces'
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
const getVersionUid = (item: Item<any>) => {
|
|
24
|
+
const getVersionUid = (item: IItem<any>) => {
|
|
25
25
|
let versionUid
|
|
26
26
|
|
|
27
27
|
if (
|
|
@@ -38,7 +38,7 @@ const getPropertyData = async (itemProperty: IItemProperty<any>) => {
|
|
|
38
38
|
const easDataType =
|
|
39
39
|
INTERNAL_DATA_TYPES[itemProperty.propertyDef!.dataType].eas
|
|
40
40
|
|
|
41
|
-
let schemaUid = itemProperty.schemaUid
|
|
41
|
+
let schemaUid: string | undefined = itemProperty.schemaUid
|
|
42
42
|
|
|
43
43
|
const propertyNameForSchema = toSnakeCase(itemProperty.propertyName)
|
|
44
44
|
|
package/dist/src/helpers.ts
CHANGED
|
@@ -112,8 +112,8 @@ export const fetchFilesRecursively = async (
|
|
|
112
112
|
localPath: string,
|
|
113
113
|
fileList: string[],
|
|
114
114
|
) => {
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
for (const file of fileList) {
|
|
116
|
+
try {
|
|
117
117
|
const fileUrl = `${url}/${file}`
|
|
118
118
|
const fileLocalPath = path.join(localPath, file)
|
|
119
119
|
|
|
@@ -121,9 +121,9 @@ export const fetchFilesRecursively = async (
|
|
|
121
121
|
// logger(`[fetchFilesRecursively] fileLocalPath: ${fileLocalPath}`)
|
|
122
122
|
|
|
123
123
|
await downloadFile(fileUrl, fileLocalPath)
|
|
124
|
+
} catch (error) {
|
|
125
|
+
console.error(`Failed to fetch files from ${url}:`, error)
|
|
124
126
|
}
|
|
125
|
-
} catch (error) {
|
|
126
|
-
console.error(`Failed to fetch files from ${url}:`, error)
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
|
package/dist/src/waitForDb.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { EventObject, fromCallback } from 'xstate'
|
|
2
|
-
import {
|
|
2
|
+
import { FromCallbackInput, PropertyMachineContext } from '@/types'
|
|
3
3
|
import { BaseDb } from '@/db/Db/BaseDb'
|
|
4
4
|
|
|
5
|
-
export const waitForDb = fromCallback<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
export const waitForDb = fromCallback<
|
|
6
|
+
EventObject,
|
|
7
|
+
FromCallbackInput<PropertyMachineContext>
|
|
8
|
+
>(({ sendBack }) => {
|
|
9
|
+
const _waitForDb = new Promise<void>((resolve) => {
|
|
10
|
+
const interval = setInterval(() => {
|
|
11
|
+
const appDb = BaseDb.getAppDb()
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
if (appDb) {
|
|
14
|
+
clearInterval(interval)
|
|
15
|
+
resolve()
|
|
16
|
+
}
|
|
17
|
+
}, 100)
|
|
18
|
+
})
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
)
|
|
20
|
+
_waitForDb.then(() => {
|
|
21
|
+
sendBack({ type: 'waitForDbSuccess' })
|
|
22
|
+
})
|
|
23
|
+
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAgBhE,QAAA,MAAM,MAAM;oBACY,sBAAsB;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAgBhE,QAAA,MAAM,MAAM;oBACY,sBAAsB;0BA4CtB,GAAG;;;qBAYR,MAAM,YAAY,GAAG;;;;0BAqBhB,MAAM;qBAGb,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC;yBAG1B,MAAM,EAAE;CAG5B,CAAA;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../../../src/events/files/download.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,8BAA8B;;;mBAQ1C,CAAA;AAED,eAAO,MAAM,oCAAoC,
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../../../src/events/files/download.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,8BAA8B;;;mBAQ1C,CAAA;AAED,eAAO,MAAM,oCAAoC,oCAwUhD,CAAA"}
|