@seedprotocol/sdk 0.2.43 → 0.2.44
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-BXD_aTsx.js → ArweaveClient-CA1Vsnow.js} +2 -2
- package/dist/{ArweaveClient-BXD_aTsx.js.map → ArweaveClient-CA1Vsnow.js.map} +1 -1
- package/dist/{ArweaveClient-CkcZD_QE.js → ArweaveClient-MgJXScYG.js} +2 -2
- package/dist/{ArweaveClient-CkcZD_QE.js.map → ArweaveClient-MgJXScYG.js.map} +1 -1
- package/dist/{Db-Bug4efsE.js → Db-BEoczaGe.js} +156 -165
- package/dist/{Db-Bug4efsE.js.map → Db-BEoczaGe.js.map} +1 -1
- package/dist/{Db-B4XyOmGy.js → Db-Y1GWsyNL.js} +34 -43
- package/dist/{Db-B4XyOmGy.js.map → Db-Y1GWsyNL.js.map} +1 -1
- package/dist/{EasClient-BNwSwDTO.js → EasClient-BjlbuffX.js} +2 -2
- package/dist/{EasClient-BNwSwDTO.js.map → EasClient-BjlbuffX.js.map} +1 -1
- package/dist/{EasClient-epqE9aWI.js → EasClient-Cg1q8lBu.js} +2 -2
- package/dist/{EasClient-epqE9aWI.js.map → EasClient-Cg1q8lBu.js.map} +1 -1
- package/dist/FileManager-D53H3aUS.js +781 -0
- package/dist/FileManager-D53H3aUS.js.map +1 -0
- package/dist/FileManager-t4zcT3NL.js +38 -0
- package/dist/FileManager-t4zcT3NL.js.map +1 -0
- package/dist/{Item-vjJTzf1d.js → Item-BleJyiA2.js} +9 -12
- package/dist/{Item-vjJTzf1d.js.map → Item-BleJyiA2.js.map} +1 -1
- package/dist/{ItemProperty-DJpbernm.js → ItemProperty-CH7JmVg-.js} +9 -12
- package/dist/{ItemProperty-DJpbernm.js.map → ItemProperty-CH7JmVg-.js.map} +1 -1
- package/dist/{QueryClient-Do0C7Jnt.js → QueryClient-BKjgZnSt.js} +2 -2
- package/dist/{QueryClient-Do0C7Jnt.js.map → QueryClient-BKjgZnSt.js.map} +1 -1
- package/dist/{QueryClient-Ckl99FYC.js → QueryClient-CDsEencG.js} +2 -2
- package/dist/{QueryClient-Ckl99FYC.js.map → QueryClient-CDsEencG.js.map} +1 -1
- package/dist/bin.js +28 -27
- package/dist/bin.js.map +1 -1
- package/dist/{constants-BakHTrB9.js → constants-BIdH8wc3.js} +66 -41
- package/dist/constants-BIdH8wc3.js.map +1 -0
- package/dist/{index-DcPIAiHD.js → index-DanGFTTF.js} +1263 -1536
- package/dist/index-DanGFTTF.js.map +1 -0
- package/dist/{index-BWIn7kWN.js → index-Dk6K4W4n.js} +9 -12
- package/dist/index-Dk6K4W4n.js.map +1 -0
- package/dist/main.js +7 -10
- package/dist/main.js.map +1 -1
- package/dist/node/codegen/templates/index.njk +0 -4
- package/dist/{seed.schema.config-DGcg6TCS.js → seed.schema.config-DdCq87m_.js} +9 -11
- package/dist/seed.schema.config-DdCq87m_.js.map +1 -0
- package/dist/seedSchema/index.ts +0 -2
- package/dist/src/BaseFileManager.ts +22 -2
- package/dist/src/BaseItem.ts +4 -3
- package/dist/src/BaseItemProperty.ts +2 -2
- package/dist/src/FileDownloader.ts +63 -0
- package/dist/src/FileManager.ts +37 -6
- package/dist/src/ImageResizer.ts +84 -0
- package/dist/src/analyzeInput.ts +22 -2
- package/dist/src/constants.ts +67 -60
- package/dist/src/createMetadata.ts +27 -2
- package/dist/src/download.ts +45 -202
- package/dist/src/filesDownload.ts +326 -0
- package/dist/src/getItem.ts +5 -0
- package/dist/src/getPublishPayload.ts +15 -8
- package/dist/src/helpers.ts +0 -14
- package/dist/src/imageResize.ts +507 -0
- package/dist/src/model.ts +6 -5
- package/dist/src/saveImageSrc.ts +15 -1
- package/dist/src/syncDbWithEas.ts +0 -90
- package/dist/src/updateItemPropertyValue.ts +16 -3
- package/dist/src/waitForDb.ts +18 -17
- package/dist/types/src/Item/BaseItem.d.ts +2 -2
- package/dist/types/src/Item/BaseItem.d.ts.map +1 -1
- package/dist/types/src/ItemProperty/BaseItemProperty.d.ts +2 -2
- package/dist/types/src/ItemProperty/BaseItemProperty.d.ts.map +1 -1
- package/dist/types/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts.map +1 -1
- package/dist/types/src/ItemProperty/service/actors/saveValueToDb/saveImageSrc.d.ts.map +1 -1
- package/dist/types/src/browser/helpers/FileManager.d.ts +5 -1
- package/dist/types/src/browser/helpers/FileManager.d.ts.map +1 -1
- package/dist/types/src/browser/workers/FileDownloader.d.ts +8 -0
- package/dist/types/src/browser/workers/FileDownloader.d.ts.map +1 -0
- package/dist/types/src/browser/workers/ImageResizer.d.ts +9 -0
- package/dist/types/src/browser/workers/ImageResizer.d.ts.map +1 -0
- package/dist/types/src/browser/workers/content-hash.d.ts.map +1 -0
- package/dist/types/src/browser/workers/filesDownload.d.ts +3 -0
- package/dist/types/src/browser/workers/filesDownload.d.ts.map +1 -0
- package/dist/types/src/browser/workers/imageResize.d.ts +3 -0
- package/dist/types/src/browser/workers/imageResize.d.ts.map +1 -0
- package/dist/types/src/db/read/getItem.d.ts.map +1 -1
- package/dist/types/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/types/src/db/write/createMetadata.d.ts.map +1 -1
- package/dist/types/src/db/write/updateItemPropertyValue.d.ts +5 -1
- package/dist/types/src/db/write/updateItemPropertyValue.d.ts.map +1 -1
- package/dist/types/src/events/files/download.d.ts.map +1 -1
- package/dist/types/src/events/files/index.d.ts.map +1 -1
- package/dist/types/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/types/src/helpers/FileManager/BaseFileManager.d.ts +4 -0
- package/dist/types/src/helpers/FileManager/BaseFileManager.d.ts.map +1 -1
- package/dist/types/src/helpers/constants.d.ts +7 -0
- package/dist/types/src/helpers/constants.d.ts.map +1 -1
- package/dist/types/src/helpers/files.d.ts +1 -1
- package/dist/types/src/helpers/files.d.ts.map +1 -1
- package/dist/types/src/node/helpers/FileManager.d.ts +5 -0
- package/dist/types/src/node/helpers/FileManager.d.ts.map +1 -1
- package/dist/types/src/schema/model/index.d.ts +2 -2
- package/dist/types/src/schema/model/index.d.ts.map +1 -1
- package/dist/types/src/seedSchema/index.d.ts +0 -2
- package/dist/types/src/seedSchema/index.d.ts.map +1 -1
- package/dist/types/src/services/allItems/actors/initialize.d.ts.map +1 -1
- package/dist/types/src/services/internal/constants.d.ts +2 -2
- package/dist/types/src/services/internal/constants.d.ts.map +1 -1
- package/dist/types/src/services/internal/helpers.d.ts.map +1 -1
- package/dist/types/src/types/fileManager.d.ts +15 -0
- package/dist/types/src/types/fileManager.d.ts.map +1 -0
- package/dist/types/src/types/model.d.ts +6 -5
- package/dist/types/src/types/model.d.ts.map +1 -1
- package/package.json +5 -3
- package/dist/FileManager-CXk83EW5.js +0 -16
- package/dist/FileManager-CXk83EW5.js.map +0 -1
- package/dist/FileManager-DXi-X7r5.js +0 -28
- package/dist/FileManager-DXi-X7r5.js.map +0 -1
- package/dist/constants-BakHTrB9.js.map +0 -1
- package/dist/content-hash.js +0 -27
- package/dist/content-hash.js.map +0 -1
- package/dist/index-BWIn7kWN.js.map +0 -1
- package/dist/index-DcPIAiHD.js.map +0 -1
- package/dist/seed.schema.config-DGcg6TCS.js.map +0 -1
- package/dist/types/__tests__/__mocks__/browser/project/schema.d.ts +0 -52
- package/dist/types/__tests__/__mocks__/browser/project/schema.d.ts.map +0 -1
- package/dist/types/__tests__/__mocks__/node/schema.d.ts +0 -52
- package/dist/types/__tests__/__mocks__/node/schema.d.ts.map +0 -1
- package/dist/types/__tests__/browser/db/drizzle.test.d.ts +0 -2
- package/dist/types/__tests__/browser/db/drizzle.test.d.ts.map +0 -1
- package/dist/types/__tests__/browser/property/propertyMachine.test.d.ts +0 -2
- package/dist/types/__tests__/browser/property/propertyMachine.test.d.ts.map +0 -1
- package/dist/types/__tests__/browser/react/index.test.d.ts +0 -2
- package/dist/types/__tests__/browser/react/index.test.d.ts.map +0 -1
- package/dist/types/__tests__/dist/exports.test.d.ts +0 -2
- package/dist/types/__tests__/dist/exports.test.d.ts.map +0 -1
- package/dist/types/__tests__/fs/index.test.d.ts +0 -2
- package/dist/types/__tests__/fs/index.test.d.ts.map +0 -1
- package/dist/types/__tests__/index.test.d.ts +0 -2
- package/dist/types/__tests__/index.test.d.ts.map +0 -1
- package/dist/types/__tests__/node/Item/Item.test.d.ts +0 -2
- package/dist/types/__tests__/node/Item/Item.test.d.ts.map +0 -1
- package/dist/types/__tests__/node/setup.d.ts +0 -2
- package/dist/types/__tests__/node/setup.d.ts.map +0 -1
- package/dist/types/__tests__/scripts/bin.test.d.ts +0 -2
- package/dist/types/__tests__/scripts/bin.test.d.ts.map +0 -1
- package/dist/types/__tests__/setup.d.ts +0 -2
- package/dist/types/__tests__/setup.d.ts.map +0 -1
- package/dist/types/src/workers/content-hash.d.ts.map +0 -1
- /package/dist/types/src/{workers → browser/workers}/content-hash.d.ts +0 -0
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
export { I as Item } from './index-
|
|
1
|
+
export { I as Item } from './index-DanGFTTF.js';
|
|
2
2
|
import 'immer';
|
|
3
3
|
import 'reflect-metadata';
|
|
4
|
-
import 'tslib';
|
|
5
4
|
import '@sinclair/typebox';
|
|
6
|
-
import '
|
|
5
|
+
import 'xstate';
|
|
6
|
+
import './constants-BIdH8wc3.js';
|
|
7
|
+
import '@ethereum-attestation-service/eas-sdk';
|
|
8
|
+
import 'pluralize';
|
|
9
|
+
import 'drizzle-orm/sqlite-core';
|
|
7
10
|
import 'drizzle-orm';
|
|
8
|
-
import '
|
|
11
|
+
import 'eventemitter3';
|
|
9
12
|
import 'nanoid';
|
|
10
13
|
import 'nanoid-dictionary';
|
|
11
14
|
import '@zenfs/core';
|
|
12
15
|
import 'debug';
|
|
13
|
-
import 'drizzle-orm/sqlite-core';
|
|
14
|
-
import './constants-BakHTrB9.js';
|
|
15
|
-
import '@ethereum-attestation-service/eas-sdk';
|
|
16
|
-
import 'xstate';
|
|
17
|
-
import 'pluralize';
|
|
18
16
|
import 'lodash-es';
|
|
19
17
|
import '@statelyai/inspect';
|
|
20
18
|
import 'node:fs';
|
|
21
|
-
import '@zenfs/dom';
|
|
22
19
|
import 'path';
|
|
23
20
|
import 'arweave';
|
|
24
|
-
import 'threads';
|
|
25
21
|
import 'rxjs';
|
|
22
|
+
import 'react';
|
|
26
23
|
import 'use-immer';
|
|
27
24
|
import '@xstate/react';
|
|
28
|
-
//# sourceMappingURL=index-
|
|
25
|
+
//# sourceMappingURL=index-Dk6K4W4n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Dk6K4W4n.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/main.js
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
import 'immer';
|
|
2
2
|
import 'reflect-metadata';
|
|
3
|
-
export { D as Db, c as ImageSrc, d as Item, e as ItemProperty, J as Json, L as List, M as Model, P as Property, R as Relation, T as Text,
|
|
4
|
-
export { B as BaseArweaveClient, a as BaseEasClient, c as BaseFileManager, b as BaseQueryClient } from './constants-
|
|
5
|
-
import 'tslib';
|
|
3
|
+
export { D as Db, c as ImageSrc, d as Item, e as ItemProperty, J as Json, L as List, M as Model, P as Property, R as Relation, T as Text, v as client, r as eventEmitter, p as getCorrectId, q as getGlobalService, h as useCreateItem, j as useDeleteItem, k as useGlobalServiceStatus, f as useItem, g as useItemProperties, i as useItemProperty, u as useItems, m as usePersistedSnapshots, l as usePublishItem, o as useService, n as useServices, t as withSeed } from './index-DanGFTTF.js';
|
|
4
|
+
export { B as BaseArweaveClient, a as BaseEasClient, c as BaseFileManager, b as BaseQueryClient } from './constants-BIdH8wc3.js';
|
|
6
5
|
import '@sinclair/typebox';
|
|
7
|
-
import '
|
|
6
|
+
import 'xstate';
|
|
7
|
+
import 'pluralize';
|
|
8
|
+
import 'drizzle-orm/sqlite-core';
|
|
8
9
|
import 'drizzle-orm';
|
|
9
|
-
import '
|
|
10
|
+
import 'eventemitter3';
|
|
10
11
|
import 'nanoid';
|
|
11
12
|
import 'nanoid-dictionary';
|
|
12
13
|
import '@zenfs/core';
|
|
13
14
|
import 'debug';
|
|
14
|
-
import 'drizzle-orm/sqlite-core';
|
|
15
|
-
import 'xstate';
|
|
16
|
-
import 'pluralize';
|
|
17
15
|
import 'lodash-es';
|
|
18
16
|
import '@statelyai/inspect';
|
|
19
17
|
import 'node:fs';
|
|
20
|
-
import '@zenfs/dom';
|
|
21
18
|
import 'path';
|
|
22
19
|
import 'arweave';
|
|
23
|
-
import 'threads';
|
|
24
20
|
import 'rxjs';
|
|
25
21
|
import '@ethereum-attestation-service/eas-sdk';
|
|
22
|
+
import 'react';
|
|
26
23
|
import 'use-immer';
|
|
27
24
|
import '@xstate/react';
|
|
28
25
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -8,8 +8,6 @@ import { versions } from '../../seed/schema/VersionSchema'
|
|
|
8
8
|
import { metadata } from '../../seed/schema/MetadataSchema'
|
|
9
9
|
import { models } from '../../seed/schema/ModelSchema'
|
|
10
10
|
import { modelUids } from '../../seed/schema/ModelUidSchema'
|
|
11
|
-
import { propertyUids } from '../../seed/schema/PropertyUidSchema'
|
|
12
|
-
import { config } from '../../seed/schema/Config'
|
|
13
11
|
{% for model in models %}
|
|
14
12
|
export * from './{{ model.name }}Schema'
|
|
15
13
|
{%- endfor %}
|
|
@@ -23,8 +21,6 @@ tablesByName.set('versions', versions)
|
|
|
23
21
|
tablesByName.set('metadata', metadata)
|
|
24
22
|
tablesByName.set('models', models)
|
|
25
23
|
tablesByName.set('modelUids', modelUids)
|
|
26
|
-
tablesByName.set('propertyUids', propertyUids)
|
|
27
|
-
tablesByName.set('config', config)
|
|
28
24
|
|
|
29
25
|
export const getTable = (table: string) => {
|
|
30
26
|
return tablesByName.get(table)
|
|
@@ -1,28 +1,26 @@
|
|
|
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-DanGFTTF.js';
|
|
4
4
|
import 'immer';
|
|
5
5
|
import '@sinclair/typebox';
|
|
6
|
-
import '
|
|
6
|
+
import 'xstate';
|
|
7
|
+
import './constants-BIdH8wc3.js';
|
|
8
|
+
import '@ethereum-attestation-service/eas-sdk';
|
|
9
|
+
import 'pluralize';
|
|
10
|
+
import 'drizzle-orm/sqlite-core';
|
|
7
11
|
import 'drizzle-orm';
|
|
8
|
-
import '
|
|
12
|
+
import 'eventemitter3';
|
|
9
13
|
import 'nanoid';
|
|
10
14
|
import 'nanoid-dictionary';
|
|
11
15
|
import '@zenfs/core';
|
|
12
16
|
import 'debug';
|
|
13
|
-
import 'drizzle-orm/sqlite-core';
|
|
14
|
-
import './constants-BakHTrB9.js';
|
|
15
|
-
import '@ethereum-attestation-service/eas-sdk';
|
|
16
|
-
import 'xstate';
|
|
17
|
-
import 'pluralize';
|
|
18
17
|
import 'lodash-es';
|
|
19
18
|
import '@statelyai/inspect';
|
|
20
19
|
import 'node:fs';
|
|
21
|
-
import '@zenfs/dom';
|
|
22
20
|
import 'path';
|
|
23
21
|
import 'arweave';
|
|
24
|
-
import 'threads';
|
|
25
22
|
import 'rxjs';
|
|
23
|
+
import 'react';
|
|
26
24
|
import 'use-immer';
|
|
27
25
|
import '@xstate/react';
|
|
28
26
|
|
|
@@ -72,4 +70,4 @@ const models = {
|
|
|
72
70
|
};
|
|
73
71
|
|
|
74
72
|
export { models };
|
|
75
|
-
//# sourceMappingURL=seed.schema.config-
|
|
73
|
+
//# sourceMappingURL=seed.schema.config-DdCq87m_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seed.schema.config-DdCq87m_.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/seedSchema/index.ts
CHANGED
|
@@ -2,7 +2,5 @@ export * from './SeedSchema'
|
|
|
2
2
|
export * from './VersionSchema'
|
|
3
3
|
export * from './MetadataSchema'
|
|
4
4
|
export * from './AppStateSchema'
|
|
5
|
-
export * from './ConfigSchema'
|
|
6
5
|
export * from './ModelSchema'
|
|
7
6
|
export * from './ModelUidSchema'
|
|
8
|
-
export * from './PropertyUidSchema'
|
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
export abstract class BaseFileManager {
|
|
2
2
|
static PlatformClass: typeof BaseFileManager
|
|
3
3
|
|
|
4
|
-
static setPlatformClass(platformClass: typeof BaseFileManager) {
|
|
4
|
+
static setPlatformClass( platformClass: typeof BaseFileManager ) {
|
|
5
5
|
this.PlatformClass = platformClass
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
static
|
|
8
|
+
static initializeFileSystem(): Promise<void> {
|
|
9
|
+
return this.PlatformClass.initializeFileSystem()
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static getContentUrlFromPath( path: string ): Promise<string | undefined> {
|
|
9
13
|
return this.PlatformClass.getContentUrlFromPath(path)
|
|
10
14
|
}
|
|
15
|
+
|
|
16
|
+
static downloadAllFiles( {
|
|
17
|
+
transactionIds,
|
|
18
|
+
arweaveHost,
|
|
19
|
+
excludedTransactions,
|
|
20
|
+
}: DownloadAllFilesParams ): Promise<void> {
|
|
21
|
+
return this.PlatformClass.downloadAllFiles({ transactionIds, arweaveHost, excludedTransactions })
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static resizeImage( { filePath, width, height }: ResizeImageParams ): Promise<void> {
|
|
25
|
+
return this.PlatformClass.resizeImage({ filePath, width, height })
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static resizeAllImages( { width, height }: ResizeAllImagesParams ): Promise<void> {
|
|
29
|
+
return this.PlatformClass.resizeAllImages({ width, height })
|
|
30
|
+
}
|
|
11
31
|
}
|
package/dist/src/BaseItem.ts
CHANGED
|
@@ -32,7 +32,7 @@ import { createNewItem } from '@/db/write/createNewItem'
|
|
|
32
32
|
|
|
33
33
|
export abstract class BaseItem<T extends ModelValues<ModelSchema>> implements IItem<T> {
|
|
34
34
|
|
|
35
|
-
protected static instanceCache: Map<string, { instance:
|
|
35
|
+
protected static instanceCache: Map<string, { instance: BaseItem<any>; refCount: number }> = new Map();
|
|
36
36
|
protected _subscription: Subscription | undefined;
|
|
37
37
|
protected readonly _storageTransactionId: string | undefined;
|
|
38
38
|
[immerable] = true;
|
|
@@ -185,7 +185,7 @@ export abstract class BaseItem<T extends ModelValues<ModelSchema>> implements II
|
|
|
185
185
|
|
|
186
186
|
static async create<T extends ModelValues<ModelSchema>>(
|
|
187
187
|
props: Partial<ItemData>,
|
|
188
|
-
): Promise<
|
|
188
|
+
): Promise<BaseItem<any>> {
|
|
189
189
|
if (!props.modelName && props.type) {
|
|
190
190
|
props.modelName = startCase(props.type)
|
|
191
191
|
}
|
|
@@ -226,10 +226,11 @@ export abstract class BaseItem<T extends ModelValues<ModelSchema>> implements II
|
|
|
226
226
|
if (!props.modelName) {
|
|
227
227
|
throw new Error('Model name is required to create an item')
|
|
228
228
|
}
|
|
229
|
-
const { seedLocalId } = await createNewItem({
|
|
229
|
+
const { seedLocalId, versionLocalId, versionUid } = await createNewItem({
|
|
230
230
|
modelName: props.modelName,
|
|
231
231
|
})
|
|
232
232
|
props.seedLocalId = seedLocalId
|
|
233
|
+
props.latestVersionLocalId = versionLocalId
|
|
233
234
|
const newInstance = new this(props)
|
|
234
235
|
this.instanceCache.set(newInstance.seedUid || newInstance.seedLocalId, {
|
|
235
236
|
instance: newInstance,
|
|
@@ -30,7 +30,7 @@ type ItemPropertyFindProps = {
|
|
|
30
30
|
export abstract class BaseItemProperty<PropertyType> implements IItemProperty<PropertyType> {
|
|
31
31
|
protected static instanceCache: Map<
|
|
32
32
|
string,
|
|
33
|
-
{ instance:
|
|
33
|
+
{ instance: BaseItemProperty<any>; refCount: number }
|
|
34
34
|
> = new Map()
|
|
35
35
|
protected readonly _service: ItemPropertyService
|
|
36
36
|
protected _subject: BehaviorSubject<any>
|
|
@@ -221,7 +221,7 @@ export abstract class BaseItemProperty<PropertyType> implements IItemProperty<Pr
|
|
|
221
221
|
|
|
222
222
|
static create(
|
|
223
223
|
props: Partial<CreatePropertyInstanceProps>,
|
|
224
|
-
):
|
|
224
|
+
): BaseItemProperty<any> | undefined {
|
|
225
225
|
const { propertyName, seedLocalId, seedUid, versionLocalId, versionUid } =
|
|
226
226
|
props
|
|
227
227
|
if (!propertyName || (!seedLocalId && !seedUid)) {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { saveAppState } from '@/db/write/saveAppState.js';
|
|
2
|
+
import filesDownload from './filesDownload.js'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class FileDownloader {
|
|
7
|
+
private cores: number
|
|
8
|
+
private workersArchive: Worker[] = []
|
|
9
|
+
private workerBlobUrl: string
|
|
10
|
+
|
|
11
|
+
constructor() {
|
|
12
|
+
this.cores = Math.min(navigator.hardwareConcurrency || 4, 4);
|
|
13
|
+
|
|
14
|
+
this.workerBlobUrl = globalThis.URL.createObjectURL(
|
|
15
|
+
new Blob([filesDownload], { type: 'application/javascript' })
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public downloadAll = async ({transactionIds, arweaveHost, excludedTransactions}: DownloadAllFilesParams): Promise<void> => {
|
|
20
|
+
|
|
21
|
+
if (this.workersArchive.length > 0) {
|
|
22
|
+
for (let i = 0; i < this.workersArchive.length; i++) {
|
|
23
|
+
this.workersArchive[i].terminate()
|
|
24
|
+
delete this.workersArchive[i]
|
|
25
|
+
}
|
|
26
|
+
this.workersArchive = []
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const worker = new Worker(this.workerBlobUrl);
|
|
30
|
+
|
|
31
|
+
this.workersArchive.push(worker)
|
|
32
|
+
|
|
33
|
+
const localExcludedTransactions = new Set(excludedTransactions)
|
|
34
|
+
|
|
35
|
+
return new Promise((resolve, reject) => {
|
|
36
|
+
worker.onmessage = (e) => {
|
|
37
|
+
console.log('filesDownload main thread onmessage', e.data);
|
|
38
|
+
|
|
39
|
+
if (e.data.message === 'excludeTransaction') {
|
|
40
|
+
localExcludedTransactions.add(e.data.transactionId)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (e.data.done) {
|
|
44
|
+
saveAppState('excludedTransactions', JSON.stringify(Array.from(localExcludedTransactions)))
|
|
45
|
+
.then(() => {
|
|
46
|
+
resolve(e.data)
|
|
47
|
+
})
|
|
48
|
+
.catch((error) => {
|
|
49
|
+
reject(error)
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
if (e.data.error) {
|
|
53
|
+
reject(e.data.error)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
worker.postMessage({
|
|
58
|
+
transactionIds,
|
|
59
|
+
arweaveHost,
|
|
60
|
+
});
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
}
|
package/dist/src/FileManager.ts
CHANGED
|
@@ -1,13 +1,44 @@
|
|
|
1
|
-
import * as fsAsync
|
|
2
|
-
import { BaseFileManager } from '@/helpers/FileManager/BaseFileManager'
|
|
1
|
+
import * as fsAsync from 'fs/promises'
|
|
2
|
+
import { BaseFileManager } from '@/helpers/FileManager/BaseFileManager'
|
|
3
3
|
|
|
4
4
|
class FileManager extends BaseFileManager {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
static async readFileAsBuffer( filePath: string ): Promise<Buffer> {
|
|
7
|
+
return await fsAsync.readFile(filePath)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
static async getContentUrlFromPath( path: string ): Promise<string | undefined> {
|
|
11
|
+
return new Promise(( resolve, reject ) => {
|
|
12
|
+
reject(new Error('Not implemented'))
|
|
13
|
+
})
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static async initializeFileSystem(): Promise<void> {
|
|
17
|
+
return new Promise(( resolve, reject ) => {
|
|
18
|
+
reject(new Error('Not implemented'))
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static async downloadAllFiles(): Promise<void> {
|
|
23
|
+
return new Promise(( resolve, reject ) => {
|
|
24
|
+
reject(new Error('Not implemented'))
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static async resizeImage(): Promise<void> {
|
|
29
|
+
return new Promise(( resolve, reject ) => {
|
|
30
|
+
reject(new Error('Not implemented'))
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static async resizeAllImages(): Promise<void> {
|
|
35
|
+
return new Promise(( resolve, reject ) => {
|
|
36
|
+
reject(new Error('Not implemented'))
|
|
37
|
+
})
|
|
7
38
|
}
|
|
8
39
|
|
|
9
40
|
}
|
|
10
41
|
|
|
11
|
-
BaseFileManager.setPlatformClass(FileManager)
|
|
42
|
+
BaseFileManager.setPlatformClass(FileManager)
|
|
12
43
|
|
|
13
|
-
export { FileManager }
|
|
44
|
+
export { FileManager }
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import fs from '@zenfs/core';
|
|
2
|
+
import imageResize from './imageResize'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class ImageResizer {
|
|
7
|
+
private cores: number
|
|
8
|
+
private workersArchive: Map<string, Worker> = new Map()
|
|
9
|
+
private workerBlobUrl: string
|
|
10
|
+
|
|
11
|
+
constructor() {
|
|
12
|
+
this.cores = Math.min(navigator.hardwareConcurrency || 4, 4);
|
|
13
|
+
|
|
14
|
+
this.workerBlobUrl = globalThis.URL.createObjectURL(
|
|
15
|
+
new Blob([imageResize], { type: 'application/javascript' })
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public async resize({filePath, width, height}: ResizeImageParams) {
|
|
20
|
+
|
|
21
|
+
if (this.workersArchive.has(filePath)) {
|
|
22
|
+
const savedWorker = this.workersArchive.get(filePath)
|
|
23
|
+
savedWorker?.terminate()
|
|
24
|
+
console.log('[ImageResizer.resize] Terminated worker for filePath due to incoming request', filePath)
|
|
25
|
+
this.workersArchive.delete(filePath)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const worker = new Worker(this.workerBlobUrl);
|
|
29
|
+
|
|
30
|
+
this.workersArchive.set(filePath, worker)
|
|
31
|
+
|
|
32
|
+
return new Promise((resolve, reject) => {
|
|
33
|
+
worker.onmessage = (e) => {
|
|
34
|
+
console.log('[ImageResizer.resize] main thread onmessage', e.data);
|
|
35
|
+
if (e.data.done) {
|
|
36
|
+
const savedWorker = this.workersArchive.get(filePath)
|
|
37
|
+
savedWorker?.terminate()
|
|
38
|
+
console.log('[ImageResizer.resize] Terminated worker for filePath due to done', filePath)
|
|
39
|
+
this.workersArchive.delete(filePath)
|
|
40
|
+
resolve(e.data)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (e.data.error) {
|
|
44
|
+
reject(e.data.error)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
worker.postMessage({
|
|
49
|
+
filePath,
|
|
50
|
+
width,
|
|
51
|
+
height,
|
|
52
|
+
});
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public async resizeAll({width, height}: ResizeAllImagesParams) {
|
|
57
|
+
|
|
58
|
+
const imageDir = '/files/images'
|
|
59
|
+
let imageFilesStats = await fs.promises.readdir(imageDir, {
|
|
60
|
+
withFileTypes: true
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
imageFilesStats = imageFilesStats.filter(file => file.isFile())
|
|
64
|
+
|
|
65
|
+
const imageFiles = imageFilesStats.map(file => file.path)
|
|
66
|
+
|
|
67
|
+
const widthDir = `${imageDir}/${width}`
|
|
68
|
+
|
|
69
|
+
const widthDirExists = await fs.promises.exists(widthDir)
|
|
70
|
+
|
|
71
|
+
if (!widthDirExists) {
|
|
72
|
+
await fs.promises.mkdir(widthDir)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
for (const imageFile of imageFiles) {
|
|
76
|
+
const resizedImageExists = await fs.promises.exists(`${widthDir}/${imageFile}`)
|
|
77
|
+
if (!resizedImageExists) {
|
|
78
|
+
await this.resize({filePath: `${imageDir}/${imageFile}`, width, height})
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
}
|
|
84
|
+
}
|
package/dist/src/analyzeInput.ts
CHANGED
|
@@ -97,7 +97,7 @@ export const analyzeInput = fromCallback<
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
await updateItemPropertyValue({
|
|
100
|
+
const result = await updateItemPropertyValue({
|
|
101
101
|
localId,
|
|
102
102
|
propertyName,
|
|
103
103
|
newValue,
|
|
@@ -108,9 +108,29 @@ export const analyzeInput = fromCallback<
|
|
|
108
108
|
schemaUid,
|
|
109
109
|
})
|
|
110
110
|
|
|
111
|
+
let updatedContext: Partial<PropertyMachineContext> = {
|
|
112
|
+
propertyValue: newValue,
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (localId) {
|
|
116
|
+
updatedContext.localId = localId
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (schemaUid) {
|
|
120
|
+
updatedContext.schemaUid = schemaUid
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if (!localId && result?.localId) {
|
|
124
|
+
updatedContext.localId = result.localId
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (!schemaUid && result?.schemaUid) {
|
|
128
|
+
updatedContext.schemaUid = result.schemaUid
|
|
129
|
+
}
|
|
130
|
+
|
|
111
131
|
sendBack({
|
|
112
132
|
type: 'updateContext',
|
|
113
|
-
|
|
133
|
+
...updatedContext,
|
|
114
134
|
})
|
|
115
135
|
|
|
116
136
|
return true
|
package/dist/src/constants.ts
CHANGED
|
@@ -1,72 +1,79 @@
|
|
|
1
|
+
const ENV = (typeof process !== 'undefined' && process.env)
|
|
2
|
+
? process.env
|
|
3
|
+
: (typeof window !== 'undefined' && (window as any).env)
|
|
4
|
+
? (window as any).env
|
|
5
|
+
: {};
|
|
6
|
+
|
|
7
|
+
|
|
1
8
|
const MACHINE_ID_SCOPE = '@seedSdk'
|
|
2
9
|
|
|
3
10
|
export enum MachineIds {
|
|
4
|
-
GLOBAL
|
|
5
|
-
INTERNAL
|
|
6
|
-
DB
|
|
7
|
-
EAS
|
|
8
|
-
ITEM
|
|
9
|
-
ALL_ITEMS
|
|
10
|
-
MODEL
|
|
11
|
+
GLOBAL = `${MACHINE_ID_SCOPE}/global`,
|
|
12
|
+
INTERNAL = `${MACHINE_ID_SCOPE}/internal`,
|
|
13
|
+
DB = `${MACHINE_ID_SCOPE}/db`,
|
|
14
|
+
EAS = `${MACHINE_ID_SCOPE}/eas`,
|
|
15
|
+
ITEM = `${MACHINE_ID_SCOPE}/item`,
|
|
16
|
+
ALL_ITEMS = `${MACHINE_ID_SCOPE}/allItems`,
|
|
17
|
+
MODEL = `${MACHINE_ID_SCOPE}/model`,
|
|
11
18
|
FILE_SYSTEM = `${MACHINE_ID_SCOPE}/fileSystem`,
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
const { INTERNAL, DB, GLOBAL, EAS, MODEL } = MachineIds
|
|
15
22
|
|
|
16
23
|
export enum GlobalState {
|
|
17
|
-
UNINITIALIZED
|
|
18
|
-
INITIALIZING
|
|
19
|
-
INITIALIZED
|
|
20
|
-
PUBLISHING_ITEM
|
|
24
|
+
UNINITIALIZED = 'uninitialized',
|
|
25
|
+
INITIALIZING = 'initializing',
|
|
26
|
+
INITIALIZED = 'initialized',
|
|
27
|
+
PUBLISHING_ITEM = 'publishingItem',
|
|
21
28
|
ADDING_MODELS_TO_DB = 'addingModelsToDb',
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
const {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} = GlobalState
|
|
32
|
+
UNINITIALIZED,
|
|
33
|
+
INITIALIZING,
|
|
34
|
+
INITIALIZED,
|
|
35
|
+
PUBLISHING_ITEM,
|
|
36
|
+
ADDING_MODELS_TO_DB,
|
|
37
|
+
} = GlobalState
|
|
31
38
|
|
|
32
39
|
export enum InternalState {
|
|
33
|
-
IDLE
|
|
34
|
-
INITIALIZING
|
|
40
|
+
IDLE = 'idle',
|
|
41
|
+
INITIALIZING = 'initializing',
|
|
35
42
|
VALIDATING_INPUT = 'validatingInput',
|
|
36
|
-
CONFIGURING_FS
|
|
37
|
-
LOADING_SEED_DB
|
|
38
|
-
SAVING_CONFIG
|
|
39
|
-
LOADING_APP_DB
|
|
40
|
-
LOADING_SDK_DB
|
|
43
|
+
CONFIGURING_FS = 'configuringFs',
|
|
44
|
+
LOADING_SEED_DB = 'loadingSeedDb',
|
|
45
|
+
SAVING_CONFIG = 'savingConfig',
|
|
46
|
+
LOADING_APP_DB = 'loadingAppDb',
|
|
47
|
+
LOADING_SDK_DB = 'loadingSdkDb',
|
|
41
48
|
}
|
|
42
49
|
|
|
43
50
|
const { VALIDATING_INPUT, CONFIGURING_FS, LOADING_SEED_DB, LOADING_APP_DB } =
|
|
44
|
-
|
|
51
|
+
InternalState
|
|
45
52
|
|
|
46
53
|
export enum DbState {
|
|
47
|
-
CHECKING_STATUS
|
|
54
|
+
CHECKING_STATUS = 'checkingStatus',
|
|
48
55
|
WAITING_FOR_FILES = 'waitingForFiles',
|
|
49
|
-
VALIDATING
|
|
50
|
-
CONNECTING_TO_DB
|
|
56
|
+
VALIDATING = 'validating',
|
|
57
|
+
CONNECTING_TO_DB = 'connectingToDb',
|
|
51
58
|
// FETCHING_MIGRATIONS = 'fetchingMigrations',
|
|
52
|
-
MIGRATING
|
|
59
|
+
MIGRATING = 'migrating',
|
|
53
60
|
}
|
|
54
61
|
|
|
55
62
|
const {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} = DbState
|
|
63
|
+
CHECKING_STATUS,
|
|
64
|
+
VALIDATING,
|
|
65
|
+
CONNECTING_TO_DB,
|
|
66
|
+
WAITING_FOR_FILES,
|
|
67
|
+
MIGRATING,
|
|
68
|
+
} = DbState
|
|
62
69
|
|
|
63
70
|
export enum PublishMachineStates {
|
|
64
|
-
VALIDATING_ITEM_DATA
|
|
65
|
-
CREATING_PUBLISH_ATTEMPT
|
|
66
|
-
UPLOADING
|
|
71
|
+
VALIDATING_ITEM_DATA = 'validatingItemData',
|
|
72
|
+
CREATING_PUBLISH_ATTEMPT = 'creatingPublishAttempt',
|
|
73
|
+
UPLOADING = 'uploading',
|
|
67
74
|
PREPARING_PUBLISH_REQUEST_DATA = 'preparingPublishRequestData',
|
|
68
|
-
PUBLISHING
|
|
69
|
-
IDLE
|
|
75
|
+
PUBLISHING = 'publishing',
|
|
76
|
+
IDLE = 'idle',
|
|
70
77
|
}
|
|
71
78
|
|
|
72
79
|
export const INTERNAL_VALIDATING_INPUT_SUCCESS = `${INTERNAL}.${VALIDATING_INPUT}.success`
|
|
@@ -83,36 +90,36 @@ export const INTERNAL_LOADING_APP_DB_FAILURE = `${INTERNAL}.${LOADING_APP_DB}.fa
|
|
|
83
90
|
export const INTERNAL_SAVING_CONFIG_SUCCESS = `${INTERNAL}.savingConfig.success`
|
|
84
91
|
export const INTERNAL_SAVING_CONFIG_FAILURE = `${INTERNAL}.savingConfig.failure`
|
|
85
92
|
|
|
86
|
-
export const GLOBAL_GETTING_SEED_CLASS_SUCCESS
|
|
87
|
-
export const GLOBAL_INITIALIZING_SEND_CONFIG
|
|
88
|
-
export const GLOBAL_INITIALIZING_INTERNAL_SERVICE_READY
|
|
93
|
+
export const GLOBAL_GETTING_SEED_CLASS_SUCCESS = `${GLOBAL}.${PUBLISHING_ITEM}.success`
|
|
94
|
+
export const GLOBAL_INITIALIZING_SEND_CONFIG = `${GLOBAL}.${INITIALIZING}.sendConfig`
|
|
95
|
+
export const GLOBAL_INITIALIZING_INTERNAL_SERVICE_READY = `${GLOBAL}.${INITIALIZING}.internalServiceReady`
|
|
89
96
|
export const GLOBAL_INITIALIZING_CREATE_ALL_ITEMS_SERVICES = `${GLOBAL}.${INITIALIZING}.createAllItemsServices`
|
|
90
|
-
export const GLOBAL_ADDING_MODELS_TO_DB_SUCCESS
|
|
97
|
+
export const GLOBAL_ADDING_MODELS_TO_DB_SUCCESS = `${GLOBAL}.${ADDING_MODELS_TO_DB}.success`
|
|
91
98
|
|
|
92
|
-
export const DB_CHECK_STATUS_UPDATE_PATHS
|
|
93
|
-
export const DB_CHECK_STATUS_EXISTS
|
|
99
|
+
export const DB_CHECK_STATUS_UPDATE_PATHS = `${DB}.${CHECKING_STATUS}.updatePaths`
|
|
100
|
+
export const DB_CHECK_STATUS_EXISTS = `${DB}.${CHECKING_STATUS}.exists`
|
|
94
101
|
export const DB_CHECK_STATUS_DOES_NOT_EXIST = `${DB}.${CHECKING_STATUS}.doesNotExist`
|
|
95
|
-
export const DB_CHECK_STATUS_FAILURE
|
|
102
|
+
export const DB_CHECK_STATUS_FAILURE = `${DB}.${CHECKING_STATUS}.failure`
|
|
96
103
|
|
|
97
|
-
export const DB_VALIDATING_SUCCESS
|
|
98
|
-
export const DB_VALIDATING_WAIT
|
|
99
|
-
export const DB_MIGRATING_WAIT
|
|
100
|
-
export const DB_MIGRATING_SUCCESS
|
|
101
|
-
export const DB_CREATING_SUCCESS
|
|
104
|
+
export const DB_VALIDATING_SUCCESS = `${DB}.${VALIDATING}.success`
|
|
105
|
+
export const DB_VALIDATING_WAIT = `${DB}.${VALIDATING}.wait`
|
|
106
|
+
export const DB_MIGRATING_WAIT = `${DB}.${MIGRATING}.wait`
|
|
107
|
+
export const DB_MIGRATING_SUCCESS = `${DB}.${MIGRATING}.success`
|
|
108
|
+
export const DB_CREATING_SUCCESS = `${DB}.${CONNECTING_TO_DB}.success`
|
|
102
109
|
export const DB_WAITING_FOR_FILES_RECEIVED = `${DB}.${WAITING_FOR_FILES}.filesReceived`
|
|
103
|
-
export const DB_ON_SNAPSHOT
|
|
104
|
-
export const CHILD_SNAPSHOT
|
|
110
|
+
export const DB_ON_SNAPSHOT = `${DB}.onSnapshot`
|
|
111
|
+
export const CHILD_SNAPSHOT = 'childSnapshot'
|
|
105
112
|
|
|
106
113
|
export const INTERNAL_SERVICE_SNAPSHOT = 'internalServiceSnapshot'
|
|
107
114
|
|
|
108
|
-
export const DB_NAME_APP
|
|
115
|
+
export const DB_NAME_APP = 'app_db'
|
|
109
116
|
export const BROWSER_FS_TOP_DIR = 'app-files'
|
|
110
117
|
|
|
111
118
|
export const EAS_ENDPOINT =
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
119
|
+
ENV.NEXT_PUBLIC_EAS_ENDPOINT ||
|
|
120
|
+
ENV.EAS_ENDPOINT ||
|
|
121
|
+
'https://optimism-sepolia.easscan.org/graphql'
|
|
115
122
|
|
|
116
|
-
export const ARWEAVE_HOST
|
|
117
|
-
|
|
123
|
+
export const ARWEAVE_HOST =
|
|
124
|
+
ENV.NEXT_PUBLIC_ARWEAVE_HOST || 'arweave.net'
|
|
118
125
|
export const ARWEAVE_ENDPOINT = `https://${ARWEAVE_HOST}/graphql`
|