@seedprotocol/sdk 0.6.1 → 0.6.3
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/{BasePathResolver-DWY_hb8w.js → BasePathResolver-0IHnXxtL.js} +5 -1
- package/dist/BasePathResolver-0IHnXxtL.js.map +1 -0
- package/dist/{ModelProperty-CHIxRLfS.js → ModelProperty-BiDQu5rE.js} +40 -30
- package/dist/ModelProperty-BiDQu5rE.js.map +1 -0
- package/dist/{Schema-BaVOWeUb.js → Schema-qciDB7Nu.js} +43 -39
- package/dist/{Schema-BaVOWeUb.js.map → Schema-qciDB7Nu.js.map} +1 -1
- package/dist/{SchemaValidationService-BX4GcEKY.js → SchemaValidationService-BaOkRjsU.js} +6 -6
- package/dist/{SchemaValidationService-BX4GcEKY.js.map → SchemaValidationService-BaOkRjsU.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-6kBwLScb.js → backfillMetadataPropertyIds-oypxoBXv.js} +3 -3
- package/dist/{backfillMetadataPropertyIds-6kBwLScb.js.map → backfillMetadataPropertyIds-oypxoBXv.js.map} +1 -1
- package/dist/cjs/{ModelProperty-BphJm1e3.js → ModelProperty-DvIIhBnK.js} +17 -17
- package/dist/cjs/{ModelProperty-BphJm1e3.js.map → ModelProperty-DvIIhBnK.js.map} +1 -1
- package/dist/cjs/{Schema-z1fBr4Rv.js → Schema-FdzNqyGo.js} +20 -20
- package/dist/cjs/{Schema-z1fBr4Rv.js.map → Schema-FdzNqyGo.js.map} +1 -1
- package/dist/cjs/{SchemaValidationService-DWmIhQqz.js → SchemaValidationService-pxRoOs79.js} +2 -2
- package/dist/cjs/{SchemaValidationService-DWmIhQqz.js.map → SchemaValidationService-pxRoOs79.js.map} +1 -1
- package/dist/cjs/{backfillMetadataPropertyIds--9WN2zaG.js → backfillMetadataPropertyIds-D0o5VwBh.js} +2 -2
- package/dist/cjs/{backfillMetadataPropertyIds--9WN2zaG.js.map → backfillMetadataPropertyIds-D0o5VwBh.js.map} +1 -1
- package/dist/cjs/{eas-YuOI6X_v.js → eas-DSZkoDUn.js} +3 -3
- package/dist/cjs/{eas-YuOI6X_v.js.map → eas-DSZkoDUn.js.map} +1 -1
- package/dist/cjs/{getItem-CKDdJztx.js → getItem-CPcdcFuS.js} +2 -2
- package/dist/cjs/{getItem-CKDdJztx.js.map → getItem-CPcdcFuS.js.map} +1 -1
- package/dist/cjs/{getPublishPayload-DXHDgXU3.js → getPublishPayload-BvmVTKoc.js} +11 -11
- package/dist/cjs/{getPublishPayload-DXHDgXU3.js.map → getPublishPayload-BvmVTKoc.js.map} +1 -1
- package/dist/cjs/{getPublishUploads-yFW9CKSW.js → getPublishUploads-D2VZHZnu.js} +4 -4
- package/dist/cjs/{getPublishUploads-yFW9CKSW.js.map → getPublishUploads-D2VZHZnu.js.map} +1 -1
- package/dist/cjs/{getSegmentedItemProperties-BLdMFDBt.js → getSegmentedItemProperties-Bm1TEvBS.js} +3 -3
- package/dist/cjs/{getSegmentedItemProperties-BLdMFDBt.js.map → getSegmentedItemProperties-Bm1TEvBS.js.map} +1 -1
- package/dist/cjs/{index-WOQkKWSU.js → index-C-POwaLs.js} +445 -315
- package/dist/cjs/index-C-POwaLs.js.map +1 -0
- package/dist/cjs/{index-Bp16LrkZ.js → index-D_ph4zut.js} +3 -3
- package/dist/cjs/index-D_ph4zut.js.map +1 -0
- package/dist/cjs/{property-DSh60oEw.js → property-DkUtJxV2.js} +4 -4
- package/dist/cjs/{property-DSh60oEw.js.map → property-DkUtJxV2.js.map} +1 -1
- package/dist/cjs/{syncDbWithEas-pVjTHk3y.js → syncDbWithEas-DRoys7eo.js} +17 -10
- package/dist/cjs/syncDbWithEas-DRoys7eo.js.map +1 -0
- package/dist/{configurePlatform-CXQCT7N8.js → configurePlatform-Df4BlXwQ.js} +3 -3
- package/dist/{configurePlatform-CXQCT7N8.js.map → configurePlatform-Df4BlXwQ.js.map} +1 -1
- package/dist/{constants-DMHTYMgJ.js → constants-Bre6dTJR.js} +3 -1
- package/dist/constants-Bre6dTJR.js.map +1 -0
- package/dist/{constants-B7aNfB_1.js → constants-CROrIRd-.js} +2 -2
- package/dist/{constants-B7aNfB_1.js.map → constants-CROrIRd-.js.map} +1 -1
- package/dist/{db-CMQ3TG6N.js → db-DVsy4QZe.js} +121 -56
- package/dist/db-DVsy4QZe.js.map +1 -0
- package/dist/{eas-BG3zRyHC.js → eas-z4W41ith.js} +5 -5
- package/dist/{eas-BG3zRyHC.js.map → eas-z4W41ith.js.map} +1 -1
- package/dist/{getItem-BFDi98NG.js → getItem-BiE_b7Fu.js} +6 -6
- package/dist/{getItem-BFDi98NG.js.map → getItem-BiE_b7Fu.js.map} +1 -1
- package/dist/{getPublishPayload-B2D-72EC.js → getPublishPayload-CuRGEZa5.js} +17 -17
- package/dist/{getPublishPayload-B2D-72EC.js.map → getPublishPayload-CuRGEZa5.js.map} +1 -1
- package/dist/{getPublishUploads-D-fMspZI.js → getPublishUploads-CMgzBCzZ.js} +8 -8
- package/dist/{getPublishUploads-D-fMspZI.js.map → getPublishUploads-CMgzBCzZ.js.map} +1 -1
- package/dist/{getSegmentedItemProperties-DzjK6JE5.js → getSegmentedItemProperties-BCCSwTxr.js} +5 -5
- package/dist/{getSegmentedItemProperties-DzjK6JE5.js.map → getSegmentedItemProperties-BCCSwTxr.js.map} +1 -1
- package/dist/{index-BaPbRFSy.js → index-C41UZTmQ.js} +8 -8
- package/dist/index-C41UZTmQ.js.map +1 -0
- package/dist/{index-Dx0RL3Tx.js → index-DjwIC6U3.js} +418 -343
- package/dist/index-DjwIC6U3.js.map +1 -0
- package/dist/{index-DrEkRiuK.js → index-xNWgPtlN.js} +2 -2
- package/dist/index-xNWgPtlN.js.map +1 -0
- package/dist/{index.node-hhs7zosf.js → index.node-DQZ3cPe-.js} +14 -5
- package/dist/index.node-DQZ3cPe-.js.map +1 -0
- package/dist/main.cjs +1 -1
- package/dist/main.js +300 -24
- package/dist/main.js.map +1 -1
- package/dist/node.js +11 -11
- package/dist/platform.browser.js +14 -4
- package/dist/platform.browser.js.map +1 -1
- package/dist/platform.node.js +4 -4
- package/dist/{property-B2xdCZz_.js → property-Bs3a4Dna.js} +9 -9
- package/dist/{property-B2xdCZz_.js.map → property-Bs3a4Dna.js.map} +1 -1
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/Model/Model.d.ts.map +1 -1
- package/dist/src/browser/helpers/FileManager.d.ts +1 -0
- package/dist/src/browser/helpers/FileManager.d.ts.map +1 -1
- package/dist/src/client/ClientManager.d.ts +12 -0
- package/dist/src/client/ClientManager.d.ts.map +1 -1
- package/dist/src/client/actors/saveConfig.d.ts.map +1 -1
- package/dist/src/db/read/getItems.d.ts.map +1 -1
- package/dist/src/db/read/summarizePublishWork.d.ts +24 -0
- package/dist/src/db/read/summarizePublishWork.d.ts.map +1 -0
- package/dist/src/db/write/claimUnpublishedDrafts.d.ts +11 -0
- package/dist/src/db/write/claimUnpublishedDrafts.d.ts.map +1 -0
- package/dist/src/db/write/createMetadata.d.ts.map +1 -1
- package/dist/src/db/write/createSeed.d.ts.map +1 -1
- package/dist/src/db/write/createSeeds.d.ts.map +1 -1
- package/dist/src/db/write/createVersion.d.ts.map +1 -1
- package/dist/src/db/write/updateMetadata.d.ts.map +1 -1
- package/dist/src/db/write/updateSeedUid.d.ts.map +1 -1
- package/dist/src/db/write/updateVersionUid.d.ts.map +1 -1
- package/dist/src/events/item/syncDbWithEas.d.ts.map +1 -1
- package/dist/src/helpers/FileManager/BaseFileManager.d.ts +2 -0
- package/dist/src/helpers/FileManager/BaseFileManager.d.ts.map +1 -1
- package/dist/src/helpers/FileManager/IFileManager.d.ts +2 -0
- package/dist/src/helpers/FileManager/IFileManager.d.ts.map +1 -1
- package/dist/src/helpers/addresses.d.ts +14 -0
- package/dist/src/helpers/addresses.d.ts.map +1 -1
- package/dist/src/helpers/constants.d.ts.map +1 -1
- package/dist/src/helpers/db.d.ts +2 -2
- package/dist/src/helpers/db.d.ts.map +1 -1
- package/dist/src/helpers/ownership.d.ts +36 -8
- package/dist/src/helpers/ownership.d.ts.map +1 -1
- package/dist/src/helpers/publishConfig.d.ts +4 -3
- package/dist/src/helpers/publishConfig.d.ts.map +1 -1
- package/dist/src/helpers/reactiveProxy.d.ts +10 -0
- package/dist/src/helpers/reactiveProxy.d.ts.map +1 -1
- package/dist/src/index.d.ts +4 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/node/helpers/FileManager.d.ts +1 -0
- package/dist/src/node/helpers/FileManager.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +6 -1
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/{syncDbWithEas-B9Riqty1.js → syncDbWithEas-DRpLRxwb.js} +25 -18
- package/dist/syncDbWithEas-DRpLRxwb.js.map +1 -0
- package/dist/{updateSeedRevokedAt-CtRjZiyh.js → updateSeedRevokedAt-F0ZDvwOO.js} +2 -2
- package/dist/{updateSeedRevokedAt-CtRjZiyh.js.map → updateSeedRevokedAt-F0ZDvwOO.js.map} +1 -1
- package/package.json +5 -5
- package/dist/BasePathResolver-DWY_hb8w.js.map +0 -1
- package/dist/ModelProperty-CHIxRLfS.js.map +0 -1
- package/dist/cjs/index-Bp16LrkZ.js.map +0 -1
- package/dist/cjs/index-WOQkKWSU.js.map +0 -1
- package/dist/cjs/syncDbWithEas-pVjTHk3y.js.map +0 -1
- package/dist/constants-DMHTYMgJ.js.map +0 -1
- package/dist/db-CMQ3TG6N.js.map +0 -1
- package/dist/index-BaPbRFSy.js.map +0 -1
- package/dist/index-DrEkRiuK.js.map +0 -1
- package/dist/index-Dx0RL3Tx.js.map +0 -1
- package/dist/index.node-hhs7zosf.js.map +0 -1
- package/dist/syncDbWithEas-B9Riqty1.js.map +0 -1
package/dist/node.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { enableMapSet } from 'immer';
|
|
2
2
|
import 'reflect-metadata';
|
|
3
|
-
export { I as Item, j as ItemProperty, M as Model, C as client, f as eventEmitter, k as getRefValueType, l as importJsonSchema, n as loadSchemaFromFile, o as readJsonImportFile, q as syncSchemaFromSource, t as transformImportToSchemaFile } from './index-
|
|
4
|
-
import { M as ModelPropertyDataTypes, P as Property } from './constants-
|
|
5
|
-
export { B as Boolean, a as Date, I as Image, J as Json, L as List, N as Number, R as Relation, j as Text, l as getCorrectId } from './constants-
|
|
3
|
+
export { I as Item, j as ItemProperty, M as Model, C as client, f as eventEmitter, k as getRefValueType, l as importJsonSchema, n as loadSchemaFromFile, o as readJsonImportFile, q as syncSchemaFromSource, t as transformImportToSchemaFile } from './index-DjwIC6U3.js';
|
|
4
|
+
import { M as ModelPropertyDataTypes, P as Property } from './constants-CROrIRd-.js';
|
|
5
|
+
export { B as Boolean, a as Date, I as Image, J as Json, L as List, N as Number, R as Relation, j as Text, l as getCorrectId } from './constants-CROrIRd-.js';
|
|
6
6
|
import 'pluralize';
|
|
7
|
-
import { a as BaseDb } from './BasePathResolver-
|
|
8
|
-
export { t as BasePathResolver, c as appState, e as config, b as metadata, j as modelUids, m as models, r as seeds, v as versions } from './BasePathResolver-
|
|
7
|
+
import { a as BaseDb } from './BasePathResolver-0IHnXxtL.js';
|
|
8
|
+
export { t as BasePathResolver, c as appState, e as config, b as metadata, j as modelUids, m as models, r as seeds, v as versions } from './BasePathResolver-0IHnXxtL.js';
|
|
9
9
|
import 'drizzle-orm';
|
|
10
|
-
import { c as createPlatformServices } from './index.node-
|
|
11
|
-
export { D as Db, F as FileManager, P as PathResolver, r as resolveSdkDrizzleMigrationsDir } from './index.node-
|
|
10
|
+
import { c as createPlatformServices } from './index.node-DQZ3cPe-.js';
|
|
11
|
+
export { D as Db, F as FileManager, P as PathResolver, r as resolveSdkDrizzleMigrationsDir } from './index.node-DQZ3cPe-.js';
|
|
12
12
|
import yaml from 'js-yaml';
|
|
13
13
|
import fs__default, { readFileSync } from 'fs';
|
|
14
|
-
import { addModelsToDb } from './db-
|
|
14
|
+
import { c as addModelsToDb } from './db-DVsy4QZe.js';
|
|
15
15
|
import { execSync } from 'child_process';
|
|
16
16
|
import path from 'path';
|
|
17
|
-
export { INIT_SCRIPT_SUCCESS_MESSAGE, SCHEMA_TS } from './constants-
|
|
18
|
-
import { configurePlatform } from './configurePlatform-
|
|
17
|
+
export { INIT_SCRIPT_SUCCESS_MESSAGE, SCHEMA_TS } from './constants-Bre6dTJR.js';
|
|
18
|
+
import { configurePlatform } from './configurePlatform-Df4BlXwQ.js';
|
|
19
19
|
import 'xstate';
|
|
20
20
|
import 'debug';
|
|
21
21
|
import 'nanoid';
|
|
@@ -31,7 +31,7 @@ import '@sinclair/typebox';
|
|
|
31
31
|
import 'drizzle-orm/sqlite-core';
|
|
32
32
|
import 'fs/promises';
|
|
33
33
|
import 'node:url';
|
|
34
|
-
import './index-
|
|
34
|
+
import './index-xNWgPtlN.js';
|
|
35
35
|
import '@libsql/client';
|
|
36
36
|
import 'drizzle-orm/libsql';
|
|
37
37
|
import 'drizzle-orm/libsql/migrator';
|
package/dist/platform.browser.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as BaseDb, c as appState, t as BasePathResolver, B as BaseFileManager } from './BasePathResolver-
|
|
1
|
+
import { a as BaseDb, c as appState, t as BasePathResolver, B as BaseFileManager } from './BasePathResolver-0IHnXxtL.js';
|
|
2
2
|
import debug from 'debug';
|
|
3
3
|
import { sql } from 'drizzle-orm';
|
|
4
4
|
import { readMigrationFiles } from 'drizzle-orm/migrator';
|
|
5
5
|
import { drizzle } from 'drizzle-orm/sqlite-proxy';
|
|
6
6
|
import { migrate } from 'drizzle-orm/sqlite-proxy/migrator';
|
|
7
|
-
import { E as EAS_ENDPOINT } from './constants-
|
|
8
|
-
import { s as schema } from './index-
|
|
7
|
+
import { E as EAS_ENDPOINT } from './constants-CROrIRd-.js';
|
|
8
|
+
import { s as schema } from './index-xNWgPtlN.js';
|
|
9
9
|
import { SQLocalDrizzle } from 'sqlocal/drizzle';
|
|
10
10
|
import { Observable, distinctUntilChanged } from 'rxjs';
|
|
11
11
|
import { BaseArweaveClient, GET_TRANSACTION_TAGS } from '@seedprotocol/arweave';
|
|
@@ -1043,6 +1043,16 @@ class BrowserFileManager {
|
|
|
1043
1043
|
throw error;
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
|
+
async getFileSize(filePath) {
|
|
1047
|
+
try {
|
|
1048
|
+
const zenfs = await this.getFs();
|
|
1049
|
+
const stat = await zenfs.promises.stat(filePath);
|
|
1050
|
+
return typeof stat?.size === 'number' ? stat.size : null;
|
|
1051
|
+
}
|
|
1052
|
+
catch {
|
|
1053
|
+
return null;
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1046
1056
|
async createDirIfNotExists(filePath) {
|
|
1047
1057
|
if (!(await this.pathExists(filePath))) {
|
|
1048
1058
|
try {
|
|
@@ -3068,7 +3078,7 @@ class BrowserDb {
|
|
|
3068
3078
|
logger$1('[Db.prepareDb] database prepared');
|
|
3069
3079
|
await this.runMigrations(db);
|
|
3070
3080
|
this.appDb = db;
|
|
3071
|
-
const { backfillMetadataPropertyIds } = await import('./backfillMetadataPropertyIds-
|
|
3081
|
+
const { backfillMetadataPropertyIds } = await import('./backfillMetadataPropertyIds-oypxoBXv.js');
|
|
3072
3082
|
await backfillMetadataPropertyIds();
|
|
3073
3083
|
return this.appDb;
|
|
3074
3084
|
}
|