@seedprotocol/sdk 0.2.26 → 0.2.27
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-BB1DgFLW.js → Db-BXj7xeIK.js} +2 -2
- package/dist/{Db-BB1DgFLW.js.map → Db-BXj7xeIK.js.map} +1 -1
- package/dist/{Db-DuHi8kGi.js → Db-Dk-X1anD.js} +2 -2
- package/dist/{Db-DuHi8kGi.js.map → Db-Dk-X1anD.js.map} +1 -1
- package/dist/{Item-D1EbCv2s.js → Item-DXgQOWw4.js} +2 -2
- package/dist/{Item-D1EbCv2s.js.map → Item-DXgQOWw4.js.map} +1 -1
- package/dist/{ItemProperty-C_YuzqFN.js → ItemProperty-Dmpm-jKr.js} +2 -2
- package/dist/{ItemProperty-C_YuzqFN.js.map → ItemProperty-Dmpm-jKr.js.map} +1 -1
- package/dist/{index-8491IPWu.js → index-CreT8SAL.js} +13 -13
- package/dist/index-CreT8SAL.js.map +1 -0
- package/dist/{index-Bsvr_g6x.js → index-hIQeW9Wa.js} +2 -2
- package/dist/index-hIQeW9Wa.js.map +1 -0
- package/dist/main.js +1 -1
- package/dist/{seed.schema.config-CVQ4WO_e.js → seed.schema.config-CVCqLN-b.js} +2 -2
- package/dist/{seed.schema.config-CVQ4WO_e.js.map → seed.schema.config-CVCqLN-b.js.map} +1 -1
- package/dist/src/getPublishPayload.ts +3 -3
- package/dist/src/helpers.ts +4 -4
- package/dist/src/waitForDb.ts +18 -17
- package/package.json +1 -1
- package/dist/index-8491IPWu.js.map +0 -1
- package/dist/index-Bsvr_g6x.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { I as Item } from './index-
|
|
1
|
+
export { I as Item } from './index-CreT8SAL.js';
|
|
2
2
|
import 'immer';
|
|
3
3
|
import 'reflect-metadata';
|
|
4
4
|
import 'tslib';
|
|
@@ -28,4 +28,4 @@ import 'arweave';
|
|
|
28
28
|
import 'use-immer';
|
|
29
29
|
import '@xstate/react';
|
|
30
30
|
import 'rxjs';
|
|
31
|
-
//# sourceMappingURL=index-
|
|
31
|
+
//# sourceMappingURL=index-hIQeW9Wa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-hIQeW9Wa.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-CreT8SAL.js';
|
|
4
4
|
import 'tslib';
|
|
5
5
|
import 'drizzle-orm';
|
|
6
6
|
export { c as BaseArweaveClient, B as BaseEasClient, b as BaseFileManager, a as BaseQueryClient } from './constants-CuI_qYXt.js';
|
|
@@ -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-CreT8SAL.js';
|
|
4
4
|
import 'immer';
|
|
5
5
|
import '@sinclair/typebox';
|
|
6
6
|
import 'drizzle-orm';
|
|
@@ -75,4 +75,4 @@ const models = {
|
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
export { models };
|
|
78
|
-
//# sourceMappingURL=seed.schema.config-
|
|
78
|
+
//# sourceMappingURL=seed.schema.config-CVCqLN-b.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seed.schema.config-
|
|
1
|
+
{"version":3,"file":"seed.schema.config-CVCqLN-b.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;;;;;"}
|
|
@@ -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
|
+
})
|