@seedprotocol/sdk 0.7.3-next.654.g52217f6 → 0.7.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/{db-D9K_f5cF.js → BasePathResolver-Cm4apKRb.js} +2041 -127
- package/dist/BasePathResolver-Cm4apKRb.js.map +1 -0
- package/dist/{ClientManager-C-QXqUK9.js → ClientManager-i3nJASkg.js} +249 -147
- package/dist/ClientManager-i3nJASkg.js.map +1 -0
- package/dist/{Item-C7sUUu2B.js → Item-DBFchXpC.js} +259 -169
- package/dist/Item-DBFchXpC.js.map +1 -0
- package/dist/{ModelProperty-DJxeOOrc.js → ModelProperty-BS49g01Y.js} +166 -47
- package/dist/ModelProperty-BS49g01Y.js.map +1 -0
- package/dist/{Schema-fXtvd-yL.js → Schema-CpMNEnUO.js} +53 -42
- package/dist/Schema-CpMNEnUO.js.map +1 -0
- package/dist/{SchemaValidationService-CvRS2HSO.js → SchemaValidationService-DieV4KL-.js} +15 -17
- package/dist/{SchemaValidationService-CvRS2HSO.js.map → SchemaValidationService-DieV4KL-.js.map} +1 -1
- package/dist/{backfillMetadataPropertyIds-SXW-8C64.js → backfillMetadataPropertyIds-DSoOoTnX.js} +14 -7
- package/dist/{backfillMetadataPropertyIds-SXW-8C64.js.map → backfillMetadataPropertyIds-DSoOoTnX.js.map} +1 -1
- package/dist/{configurePlatform-BRw2j0ZN.js → configurePlatform-D0lQGAMQ.js} +5 -7
- package/dist/{configurePlatform-BRw2j0ZN.js.map → configurePlatform-D0lQGAMQ.js.map} +1 -1
- package/dist/detachRowsBeforeDelete-S0q-DJPT.js +50 -0
- package/dist/detachRowsBeforeDelete-S0q-DJPT.js.map +1 -0
- package/dist/{eas-DHxfswCt.js → eas-6pjU-OuX.js} +6 -8
- package/dist/eas-6pjU-OuX.js.map +1 -0
- package/dist/{getItem-d6N_aM6S.js → getItem-CxBNZ-WL.js} +10 -11
- package/dist/{getItem-d6N_aM6S.js.map → getItem-CxBNZ-WL.js.map} +1 -1
- package/dist/{getPublishPayload-BHrxVtzY.js → getPublishPayload-CTCvRUoU.js} +50 -18
- package/dist/getPublishPayload-CTCvRUoU.js.map +1 -0
- package/dist/{getPublishUploads-BEqRiKIS.js → getPublishUploads-SFHCbf_y.js} +13 -22
- package/dist/{getPublishUploads-BEqRiKIS.js.map → getPublishUploads-SFHCbf_y.js.map} +1 -1
- package/dist/{index-s15q14rm.js → index-8O3Uow-Y.js} +125 -57
- package/dist/index-8O3Uow-Y.js.map +1 -0
- package/dist/{index-DglvthOk.js → index-AVFTVp1m.js} +2 -2
- package/dist/index-AVFTVp1m.js.map +1 -0
- package/dist/index-Cvt5UBz4.js +30 -0
- package/dist/index-Cvt5UBz4.js.map +1 -0
- package/dist/{index.browser-Cm06tP4X.js → index.browser-DBhxRoe8.js} +11 -10
- package/dist/{index.browser-Cm06tP4X.js.map → index.browser-DBhxRoe8.js.map} +1 -1
- package/dist/{index.node-C30dmFgn.js → index.node-CJhlcNHM.js} +25 -13
- package/dist/index.node-CJhlcNHM.js.map +1 -0
- package/dist/main.js +27 -32
- package/dist/main.js.map +1 -1
- package/dist/node.js +19 -22
- package/dist/node.js.map +1 -1
- package/dist/platform.browser.js +9 -9
- package/dist/platform.node.js +18 -5
- package/dist/platform.node.js.map +1 -1
- package/dist/{property-DhmmYAvQ.js → property-DwPD283A.js} +11 -12
- package/dist/property-DwPD283A.js.map +1 -0
- package/dist/{publishDraftGraph-yYP74WRt.js → publishDraftGraph-BOn3_Occ.js} +6 -9
- package/dist/{publishDraftGraph-yYP74WRt.js.map → publishDraftGraph-BOn3_Occ.js.map} +1 -1
- package/dist/{resetAmbiguousLegacyItemData-Bk0QyDW8.js → resetAmbiguousLegacyItemData-BkYmBeJc.js} +14 -3
- package/dist/{resetAmbiguousLegacyItemData-Bk0QyDW8.js.map → resetAmbiguousLegacyItemData-BkYmBeJc.js.map} +1 -1
- package/dist/{resolveModelForSyncedSeed-8cAzvUFd.js → resolveModelForSyncedSeed-BL24nLa7.js} +2 -2
- package/dist/{resolveModelForSyncedSeed-8cAzvUFd.js.map → resolveModelForSyncedSeed-BL24nLa7.js.map} +1 -1
- package/dist/src/Item/Item.d.ts +20 -2
- package/dist/src/Item/Item.d.ts.map +1 -1
- package/dist/src/Item/service/actors/runPublish.d.ts +11 -2
- package/dist/src/Item/service/actors/runPublish.d.ts.map +1 -1
- package/dist/src/Item/service/itemMachineSingle.d.ts +12 -2
- package/dist/src/Item/service/itemMachineSingle.d.ts.map +1 -1
- package/dist/src/ItemProperty/ItemProperty.d.ts +5 -3
- package/dist/src/ItemProperty/ItemProperty.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/actors/saveValueToDb/analyzeInput.d.ts.map +1 -1
- package/dist/src/ItemProperty/service/propertyMachine.d.ts.map +1 -1
- package/dist/src/Model/Model.d.ts +10 -4
- package/dist/src/Model/Model.d.ts.map +1 -1
- package/dist/src/Model/index.d.ts +2 -2
- package/dist/src/ModelProperty/ModelProperty.d.ts +10 -2
- package/dist/src/ModelProperty/ModelProperty.d.ts.map +1 -1
- package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts +3 -0
- package/dist/src/ModelProperty/service/modelPropertyMachine.d.ts.map +1 -1
- package/dist/src/Schema/Schema.d.ts +2 -2
- package/dist/src/Schema/Schema.d.ts.map +1 -1
- package/dist/src/Schema/index.d.ts +0 -1
- package/dist/src/Schema/index.d.ts.map +1 -1
- package/dist/src/client/ClientManager.d.ts +30 -11
- package/dist/src/client/ClientManager.d.ts.map +1 -1
- package/dist/src/client/actors/platformClassesInit.d.ts +6 -0
- package/dist/src/client/actors/platformClassesInit.d.ts.map +1 -1
- package/dist/src/client/actors/processSchemaFiles.d.ts.map +1 -1
- package/dist/src/client/actors/saveConfig.d.ts +13 -6
- package/dist/src/client/actors/saveConfig.d.ts.map +1 -1
- package/dist/src/db/read/getPublishPayload.d.ts +1 -1
- package/dist/src/db/read/getPublishPayload.d.ts.map +1 -1
- package/dist/src/db/write/claimUnpublishedDrafts.d.ts +2 -0
- package/dist/src/db/write/claimUnpublishedDrafts.d.ts.map +1 -1
- package/dist/src/eventBus.d.ts +5 -0
- package/dist/src/eventBus.d.ts.map +1 -1
- package/dist/src/helpers/cachedPropertyRefresh.d.ts +12 -0
- package/dist/src/helpers/cachedPropertyRefresh.d.ts.map +1 -0
- package/dist/src/helpers/db.d.ts +3 -0
- package/dist/src/helpers/db.d.ts.map +1 -1
- package/dist/src/helpers/easSdk.d.ts +16 -0
- package/dist/src/helpers/easSdk.d.ts.map +1 -0
- package/dist/src/helpers/entity/detachRowsBeforeDelete.d.ts +16 -0
- package/dist/src/helpers/entity/detachRowsBeforeDelete.d.ts.map +1 -0
- package/dist/src/helpers/entity/entityDestroy.d.ts +2 -0
- package/dist/src/helpers/entity/entityDestroy.d.ts.map +1 -1
- package/dist/src/helpers/ownership.d.ts +9 -1
- package/dist/src/helpers/ownership.d.ts.map +1 -1
- package/dist/src/helpers/property/index.d.ts +37 -51
- package/dist/src/helpers/property/index.d.ts.map +1 -1
- package/dist/src/helpers/publishConfig.d.ts +27 -8
- package/dist/src/helpers/publishConfig.d.ts.map +1 -1
- package/dist/src/helpers/updateSchema.d.ts +5 -0
- package/dist/src/helpers/updateSchema.d.ts.map +1 -1
- package/dist/src/helpers/waitForEntityIdle.d.ts +5 -0
- package/dist/src/helpers/waitForEntityIdle.d.ts.map +1 -1
- package/dist/src/imports/json.d.ts +9 -0
- package/dist/src/imports/json.d.ts.map +1 -1
- package/dist/src/index.d.ts +6 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/interfaces/IItem.d.ts +7 -1
- package/dist/src/interfaces/IItem.d.ts.map +1 -1
- package/dist/src/node/db/Db.d.ts.map +1 -1
- package/dist/src/node/helpers/PathResolver.d.ts.map +1 -1
- package/dist/src/node/index.d.ts +8 -1
- package/dist/src/node/index.d.ts.map +1 -1
- package/dist/src/platform/index.browser.d.ts +2 -0
- package/dist/src/platform/index.browser.d.ts.map +1 -1
- package/dist/src/platform/index.node.d.ts +2 -0
- package/dist/src/platform/index.node.d.ts.map +1 -1
- package/dist/src/types/index.d.ts +12 -1
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/machines.d.ts +2 -0
- package/dist/src/types/machines.d.ts.map +1 -1
- package/dist/src/types/property.d.ts +8 -0
- package/dist/src/types/property.d.ts.map +1 -1
- package/dist/{syncDbWithEas--HUA9WNb.js → syncDbWithEas-Bv2Fe38J.js} +15 -16
- package/dist/syncDbWithEas-Bv2Fe38J.js.map +1 -0
- package/dist/tabEvents-9s2WCYw-.js +335 -0
- package/dist/tabEvents-9s2WCYw-.js.map +1 -0
- package/dist/{tolerantWebAccess-BZYWt09Y.js → tolerantWebAccess-iUu80pAP.js} +9 -9
- package/dist/{tolerantWebAccess-BZYWt09Y.js.map → tolerantWebAccess-iUu80pAP.js.map} +1 -1
- package/dist/{updateSeedRevokedAt-D_EG-q3b.js → updateSeedRevokedAt-zBfi931j.js} +3 -3
- package/dist/{updateSeedRevokedAt-D_EG-q3b.js.map → updateSeedRevokedAt-zBfi931j.js.map} +1 -1
- package/package.json +11 -12
- package/src/node/easLodashRegister.js +4 -0
- package/dist/BasePathResolver-CfSfMW5_.js +0 -676
- package/dist/BasePathResolver-CfSfMW5_.js.map +0 -1
- package/dist/ClientManager-C-QXqUK9.js.map +0 -1
- package/dist/Item-C7sUUu2B.js.map +0 -1
- package/dist/ModelProperty-DJxeOOrc.js.map +0 -1
- package/dist/Schema-fXtvd-yL.js.map +0 -1
- package/dist/cjs/ModelProperty-DXZ39Wyv.js +0 -1978
- package/dist/cjs/ModelProperty-DXZ39Wyv.js.map +0 -1
- package/dist/cjs/Schema-DdP109QD.js +0 -5257
- package/dist/cjs/Schema-DdP109QD.js.map +0 -1
- package/dist/cjs/SchemaValidationService-CSXxx7sQ.js +0 -779
- package/dist/cjs/SchemaValidationService-CSXxx7sQ.js.map +0 -1
- package/dist/cjs/backfillMetadataPropertyIds-CPYoaMl4.js +0 -90
- package/dist/cjs/backfillMetadataPropertyIds-CPYoaMl4.js.map +0 -1
- package/dist/cjs/eas-B2YDQssV.js +0 -139
- package/dist/cjs/eas-B2YDQssV.js.map +0 -1
- package/dist/cjs/getItem-DgnaQzbE.js +0 -59
- package/dist/cjs/getItem-DgnaQzbE.js.map +0 -1
- package/dist/cjs/getPublishPayload-CqlqRdot.js +0 -1604
- package/dist/cjs/getPublishPayload-CqlqRdot.js.map +0 -1
- package/dist/cjs/getPublishUploads-DsXY9S4U.js +0 -872
- package/dist/cjs/getPublishUploads-DsXY9S4U.js.map +0 -1
- package/dist/cjs/index-BHaWOwNF.js +0 -71
- package/dist/cjs/index-BHaWOwNF.js.map +0 -1
- package/dist/cjs/index-C4XlgCJ4.js +0 -22801
- package/dist/cjs/index-C4XlgCJ4.js.map +0 -1
- package/dist/cjs/index.browser-BSf8HpnU.js +0 -22
- package/dist/cjs/index.browser-BSf8HpnU.js.map +0 -1
- package/dist/cjs/property-fa0iju0J.js +0 -328
- package/dist/cjs/property-fa0iju0J.js.map +0 -1
- package/dist/cjs/publishDraftGraph-3ASwAlD7.js +0 -403
- package/dist/cjs/publishDraftGraph-3ASwAlD7.js.map +0 -1
- package/dist/cjs/resetAmbiguousLegacyItemData-Bu_MBBYt.js +0 -117
- package/dist/cjs/resetAmbiguousLegacyItemData-Bu_MBBYt.js.map +0 -1
- package/dist/cjs/resolveModelForSyncedSeed-BANIiuFU.js +0 -49
- package/dist/cjs/resolveModelForSyncedSeed-BANIiuFU.js.map +0 -1
- package/dist/cjs/syncDbWithEas-CrmxxmUW.js +0 -887
- package/dist/cjs/syncDbWithEas-CrmxxmUW.js.map +0 -1
- package/dist/db-D9K_f5cF.js.map +0 -1
- package/dist/eas-DHxfswCt.js.map +0 -1
- package/dist/getPublishPayload-BHrxVtzY.js.map +0 -1
- package/dist/index-CiMEoGu3.js +0 -32
- package/dist/index-CiMEoGu3.js.map +0 -1
- package/dist/index-DglvthOk.js.map +0 -1
- package/dist/index-s15q14rm.js.map +0 -1
- package/dist/index.node-C30dmFgn.js.map +0 -1
- package/dist/main.cjs +0 -85
- package/dist/main.cjs.map +0 -1
- package/dist/property-DhmmYAvQ.js.map +0 -1
- package/dist/syncDbWithEas--HUA9WNb.js.map +0 -1
- package/dist/tabEvents-DguZpCCv.js +0 -1580
- package/dist/tabEvents-DguZpCCv.js.map +0 -1
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import * as fs from 'fs';
|
|
3
3
|
import fs__default from 'fs';
|
|
4
|
-
import {
|
|
4
|
+
import { J as BaseFileManager, h as appState, I as BasePathResolver, E as BaseDb, a6 as SEED_CONFIG_FILE, a7 as SEED_CONFIG_FALLBACKS } from './BasePathResolver-Cm4apKRb.js';
|
|
5
5
|
import debug from 'debug';
|
|
6
6
|
import * as fsAsync from 'fs/promises';
|
|
7
7
|
import { pathToFileURL } from 'url';
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
|
-
import { s as schema } from './index-
|
|
9
|
+
import { s as schema } from './index-AVFTVp1m.js';
|
|
10
10
|
import { createClient } from '@libsql/client';
|
|
11
11
|
import { drizzle } from 'drizzle-orm/libsql';
|
|
12
12
|
import { migrate } from 'drizzle-orm/libsql/migrator';
|
|
13
13
|
import { interval, startWith, switchMap, distinctUntilChanged } from 'rxjs';
|
|
14
14
|
import { NodeArweaveClient } from '@seedprotocol/arweave/node';
|
|
15
15
|
import { NodeQueryClient, NodeEasClient } from '@seedprotocol/eas/node';
|
|
16
|
+
import './configurePlatform-D0lQGAMQ.js';
|
|
16
17
|
|
|
17
18
|
class NodeFileManager {
|
|
18
19
|
async getFs() {
|
|
@@ -189,18 +190,21 @@ function resolveSdkDrizzleMigrationsDir(sdkRootDir) {
|
|
|
189
190
|
return process.cwd();
|
|
190
191
|
}
|
|
191
192
|
})();
|
|
192
|
-
//
|
|
193
|
-
//
|
|
193
|
+
// Look next to this module first, so the SDK always runs its own migrations
|
|
194
|
+
// whatever the working directory (monorepos, packaged Electron apps, scripts
|
|
195
|
+
// run from elsewhere). Rollup bundles this file into a chunk directly under
|
|
196
|
+
// dist/, next to the copied dist/db/drizzle.
|
|
194
197
|
const moduleDir = path.dirname(fileURLToPath(import.meta.url));
|
|
195
198
|
const candidates = [
|
|
199
|
+
path.join(moduleDir, 'db', 'drizzle'), // bundled: dist/<chunk>.js -> dist/db/drizzle
|
|
200
|
+
path.join(moduleDir, '..', '..', 'db', 'drizzle'), // source: src/node/db -> src/db/drizzle
|
|
201
|
+
path.join(moduleDir, '..', 'db', 'drizzle'), // dist layout variants
|
|
202
|
+
path.join(moduleDir, '..', '..', '..', 'src', 'db', 'drizzle'), // dist/node -> src
|
|
196
203
|
path.join(root, 'db', 'drizzle'), // production: sdkRoot is dist/
|
|
197
204
|
path.join(root, 'dist', 'db', 'drizzle'), // sdk package root with built dist
|
|
198
205
|
path.join(root, 'src', 'db', 'drizzle'), // monorepo / sdk-dev
|
|
199
206
|
path.join(root, 'packages', 'sdk', 'src', 'db', 'drizzle'), // monorepo root as cwd
|
|
200
207
|
path.join(root, 'packages', 'sdk', 'dist', 'db', 'drizzle'),
|
|
201
|
-
path.join(moduleDir, '..', '..', 'db', 'drizzle'), // src/node/db -> src/db/drizzle
|
|
202
|
-
path.join(moduleDir, '..', '..', '..', 'src', 'db', 'drizzle'), // dist/node -> src
|
|
203
|
-
path.join(moduleDir, '..', 'db', 'drizzle'), // dist layout variants
|
|
204
208
|
];
|
|
205
209
|
for (const candidate of candidates) {
|
|
206
210
|
if (fs__default.existsSync(path.join(candidate, 'meta', '_journal.json'))) {
|
|
@@ -261,10 +265,10 @@ class NodeDb {
|
|
|
261
265
|
logger$1('[Db.prepareDb] running migrations from %s', outDir);
|
|
262
266
|
await migrate(db, { migrationsFolder: outDir });
|
|
263
267
|
this.db = db;
|
|
264
|
-
const { backfillMetadataPropertyIds } = await import('./backfillMetadataPropertyIds-
|
|
268
|
+
const { backfillMetadataPropertyIds } = await import('./backfillMetadataPropertyIds-DSoOoTnX.js');
|
|
265
269
|
await backfillMetadataPropertyIds();
|
|
266
270
|
// One-time: clear item data whose model can't be determined (seeds.model_file_id, migration 0015)
|
|
267
|
-
const { resetAmbiguousLegacyItemData } = await import('./resetAmbiguousLegacyItemData-
|
|
271
|
+
const { resetAmbiguousLegacyItemData } = await import('./resetAmbiguousLegacyItemData-BkYmBeJc.js');
|
|
268
272
|
await resetAmbiguousLegacyItemData();
|
|
269
273
|
return this.db;
|
|
270
274
|
}
|
|
@@ -431,9 +435,17 @@ class NodePathResolver {
|
|
|
431
435
|
// When running from packages/sdk directly
|
|
432
436
|
return rootWithNodeModules;
|
|
433
437
|
}
|
|
434
|
-
//
|
|
435
|
-
//
|
|
436
|
-
|
|
438
|
+
// Production: {sdk package}/dist. Resolve the installed package rather than
|
|
439
|
+
// assuming it sits under the working directory: hoisted monorepos, packaged
|
|
440
|
+
// Electron apps and scripts run from another directory all differ.
|
|
441
|
+
try {
|
|
442
|
+
const { createRequire } = process.getBuiltinModule('node:module');
|
|
443
|
+
const pkgJson = createRequire(import.meta.url).resolve('@seedprotocol/sdk/package.json');
|
|
444
|
+
return path.join(path.dirname(pkgJson), 'dist');
|
|
445
|
+
}
|
|
446
|
+
catch {
|
|
447
|
+
return path.join(rootWithNodeModules, 'node_modules', '@seedprotocol', 'sdk', 'dist');
|
|
448
|
+
}
|
|
437
449
|
}
|
|
438
450
|
getNodeModulesDir() {
|
|
439
451
|
const env = this.detectEnvironment();
|
|
@@ -515,4 +527,4 @@ function createPlatformServices() {
|
|
|
515
527
|
}
|
|
516
528
|
|
|
517
529
|
export { Db as D, FileManager as F, PathResolver as P, createPlatformServices as c, resolveSdkDrizzleMigrationsDir as r };
|
|
518
|
-
//# sourceMappingURL=index.node-
|
|
530
|
+
//# sourceMappingURL=index.node-CJhlcNHM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.node-CJhlcNHM.js","sources":["../../src/node/helpers/FileManager.ts","../../src/node/db/Db.ts","../../src/node/helpers/PathResolver.ts","../../src/platform/index.node.ts"],"sourcesContent":["import * as fsAsync from 'fs/promises'\nimport * as fs from 'fs'\nimport { BaseFileManager } from '@/helpers/FileManager/BaseFileManager'\nimport type { IFileManager } from '@/helpers/FileManager/IFileManager'\nimport path from 'path'\nimport { pathToFileURL } from 'url'\n\nexport class NodeFileManager implements IFileManager {\n async getFs() {\n return fs\n }\n\n getFsSync() {\n return fs\n }\n\n /** Node has no blob URLs; a file:// URL keeps refResolvedDisplayValue meaningful for server callers. */\n async getContentUrlFromPath(filePath: string): Promise<string | undefined> {\n return pathToFileURL(path.resolve(filePath)).href\n }\n\n async initializeFileSystem(_workingDir?: string): Promise<void> {\n return // No need to initialize file system in node\n }\n\n async downloadAllFiles(): Promise<void> {\n throw new Error('Not implemented')\n }\n\n async resizeImage(): Promise<void> {\n throw new Error('Not implemented')\n }\n\n async resizeAllImages(): Promise<void> {\n throw new Error('Not implemented')\n }\n\n async pathExists(filePath: string): Promise<boolean> {\n return await fsAsync.access(filePath).then(() => true).catch(() => false)\n }\n\n /** Node reads the real file system; nothing is cached. */\n async invalidateCachedPaths(): Promise<void> {}\n\n async getFileSize(filePath: string): Promise<number | null> {\n try {\n const stat = await fsAsync.stat(filePath)\n return stat.size\n } catch {\n return null\n }\n }\n\n async listImageFiles(): Promise<string[]> {\n return this.listFiles('images')\n }\n\n async listFiles(dir: string): Promise<string[]> {\n const targetDir = BaseFileManager.getFilesPath(dir)\n const exists = await this.pathExists(targetDir)\n if (!exists) {\n return []\n }\n const entries = await fsAsync.readdir(targetDir, { withFileTypes: true })\n return entries.filter((entry) => entry.isFile()).map((entry) => entry.name)\n }\n\n async createDirIfNotExists(filePath: string): Promise<void> {\n await fsAsync.mkdir(filePath, { recursive: true })\n }\n\n async waitForFile(filePath: string, interval: number = 1000, timeout: number = 60000): Promise<boolean> {\n const pathExists = await this.pathExists(filePath)\n if (pathExists) {\n return true\n }\n\n return new Promise((resolve, reject) => {\n const startTime = Date.now()\n let isBusy = false\n\n const checkInterval = setInterval(async () => {\n if (isBusy) {\n return\n }\n isBusy = true\n\n try {\n const exists = await this.pathExists(filePath)\n if (exists) {\n clearInterval(checkInterval)\n resolve(true)\n return\n }\n\n if (Date.now() - startTime >= timeout) {\n clearInterval(checkInterval)\n reject(new Error('Timeout exceeded while waiting for file'))\n return\n }\n } catch (error) {\n clearInterval(checkInterval)\n reject(error)\n return\n } finally {\n isBusy = false\n }\n }, interval)\n })\n }\n\n async waitForFileWithContent(filePath: string, interval: number = 100, timeout: number = 5000): Promise<boolean> {\n return this.waitForFile(filePath, interval, timeout)\n }\n\n async saveFile(filePath: string, content: string | Blob | ArrayBuffer): Promise<void> {\n const dir = path.dirname(filePath)\n await fsAsync.mkdir(dir, { recursive: true })\n\n if (typeof content === 'string') {\n await fsAsync.writeFile(filePath, content, 'utf-8')\n } else if (content instanceof Blob) {\n const arrayBuffer = await content.arrayBuffer()\n await fsAsync.writeFile(filePath, new Uint8Array(arrayBuffer))\n } else if (content instanceof ArrayBuffer) {\n await fsAsync.writeFile(filePath, new Uint8Array(content))\n } else {\n throw new Error('Unsupported content type')\n }\n }\n\n saveFileSync(filePath: string, content: string | Blob | ArrayBuffer): void {\n const dir = path.dirname(filePath)\n if (!fs.existsSync(dir)) {\n fs.mkdirSync(dir, { recursive: true })\n }\n\n if (typeof content === 'string') {\n fs.writeFileSync(filePath, content, 'utf-8')\n } else if (content instanceof Blob) {\n throw new Error('Blob content not supported in saveFileSync. Use saveFile() instead or convert to ArrayBuffer first.')\n } else if (content instanceof ArrayBuffer) {\n fs.writeFileSync(filePath, new Uint8Array(content))\n } else {\n throw new Error('Unsupported content type')\n }\n }\n\n async readFileAsBuffer(filePath: string): Promise<Buffer> {\n return await fsAsync.readFile(filePath)\n }\n\n async readFileAsString(filePath: string): Promise<string> {\n return await fsAsync.readFile(filePath, 'utf-8')\n }\n\n async readFile(filePath: string): Promise<File> {\n return new File([await fsAsync.readFile(filePath)], filePath)\n }\n\n readFileSync(filePath: string): File {\n return new File([fs.readFileSync(filePath)], filePath)\n }\n\n getParentDirPath(filePath: string): string {\n return path.dirname(filePath)\n }\n\n getFilenameFromPath(filePath: string): string {\n return path.basename(filePath)\n }\n\n getPathModule(): any {\n return path\n }\n}\n\n/** @deprecated Prefer NodeFileManager */\nexport const FileManager = NodeFileManager\n\nBaseFileManager.configure(new NodeFileManager())\n\nconst _check: IFileManager = new NodeFileManager()\nvoid _check\n","import { BaseDb } from '@/db/Db/BaseDb'\nimport type { IDb } from '@/interfaces/IDb'\nimport path from 'path'\nimport { fileURLToPath } from 'node:url'\nimport debug from 'debug'\nimport { appState } from '@/seedSchema'\nimport fs from 'fs'\nimport { createClient } from '@libsql/client'\nimport { drizzle } from 'drizzle-orm/libsql'\nimport { migrate } from 'drizzle-orm/libsql/migrator'\nimport * as schema from '@/seedSchema'\nimport { Observable, interval, switchMap, distinctUntilChanged, startWith } from 'rxjs'\nimport { BasePathResolver } from '@/helpers/PathResolver/BasePathResolver'\n\nconst logger = debug('seedSdk:node:db:Db')\n\nexport interface DbConfig {\n dbUrl?: string\n /** @deprecated Unused — schema is the static SDK seedSchema + prebuilt SQL migrations */\n schemaDir?: string\n outDir?: string\n}\n\nfunction resolveDbPaths(filesDir: string, config?: DbConfig) {\n const outDir = config?.outDir || path.join(filesDir, 'db')\n const dbPath = config?.dbUrl\n ? (config.dbUrl.startsWith('file:') ? config.dbUrl.replace(/^file:/, '') : config.dbUrl)\n : path.join(outDir, 'seed.db')\n return { outDir, dbPath }\n}\n\n/**\n * Locate prebuilt drizzle migration SQL shipped with the SDK\n * (same files the browser embeds via drizzleFiles.ts).\n */\nexport function resolveSdkDrizzleMigrationsDir(sdkRootDir?: string): string {\n const root =\n sdkRootDir ||\n (() => {\n try {\n return BasePathResolver.getSdkRootDir()\n } catch {\n return process.cwd()\n }\n })()\n\n // Look next to this module first, so the SDK always runs its own migrations\n // whatever the working directory (monorepos, packaged Electron apps, scripts\n // run from elsewhere). Rollup bundles this file into a chunk directly under\n // dist/, next to the copied dist/db/drizzle.\n const moduleDir = path.dirname(fileURLToPath(import.meta.url))\n\n const candidates = [\n path.join(moduleDir, 'db', 'drizzle'), // bundled: dist/<chunk>.js -> dist/db/drizzle\n path.join(moduleDir, '..', '..', 'db', 'drizzle'), // source: src/node/db -> src/db/drizzle\n path.join(moduleDir, '..', 'db', 'drizzle'), // dist layout variants\n path.join(moduleDir, '..', '..', '..', 'src', 'db', 'drizzle'), // dist/node -> src\n path.join(root, 'db', 'drizzle'), // production: sdkRoot is dist/\n path.join(root, 'dist', 'db', 'drizzle'), // sdk package root with built dist\n path.join(root, 'src', 'db', 'drizzle'), // monorepo / sdk-dev\n path.join(root, 'packages', 'sdk', 'src', 'db', 'drizzle'), // monorepo root as cwd\n path.join(root, 'packages', 'sdk', 'dist', 'db', 'drizzle'),\n ]\n\n for (const candidate of candidates) {\n if (fs.existsSync(path.join(candidate, 'meta', '_journal.json'))) {\n return candidate\n }\n }\n\n throw new Error(\n `Could not find SDK drizzle migrations (meta/_journal.json). Searched under: ${candidates.join(', ')}`,\n )\n}\n\nfunction copyDirRecursive(sourceDir: string, targetDir: string) {\n if (!fs.existsSync(targetDir)) {\n fs.mkdirSync(targetDir, { recursive: true })\n }\n for (const entry of fs.readdirSync(sourceDir)) {\n const sourcePath = path.join(sourceDir, entry)\n const targetPath = path.join(targetDir, entry)\n const stats = fs.statSync(sourcePath)\n if (stats.isDirectory()) {\n copyDirRecursive(sourcePath, targetPath)\n } else {\n fs.copyFileSync(sourcePath, targetPath)\n }\n }\n}\n\nexport class NodeDb implements IDb {\n db: any\n\n\n getAppDb() {\n return this.db\n }\n\n isAppDbReady() {\n return true\n }\n\n /**\n * Copy prebuilt SQL migrations into the app db directory (overwrite to stay current).\n */\n copyDrizzleFiles(filesDir: string, migrationsSourceDir?: string): string {\n const { outDir } = resolveDbPaths(filesDir)\n const source = migrationsSourceDir || resolveSdkDrizzleMigrationsDir()\n logger('[Db.copyDrizzleFiles] copying from %s to %s', source, outDir)\n copyDirRecursive(source, outDir)\n return outDir\n }\n\n async prepareDb(filesDir: string, config?: DbConfig) {\n const resolvedFilesDir = path.resolve(filesDir)\n\n if (!fs.existsSync(resolvedFilesDir)) {\n fs.mkdirSync(resolvedFilesDir, { recursive: true })\n }\n\n const { outDir, dbPath } = resolveDbPaths(resolvedFilesDir, config)\n\n if (!fs.existsSync(outDir)) {\n fs.mkdirSync(outDir, { recursive: true })\n }\n\n // Install SDK migration SQL next to the DB (same source of truth as browser)\n this.copyDrizzleFiles(resolvedFilesDir)\n\n const dbUrl = config?.dbUrl\n ? (config.dbUrl.startsWith('file:') ? config.dbUrl : `file:${path.resolve(config.dbUrl)}`)\n : `file:${path.resolve(dbPath)}`\n\n const client = createClient({ url: dbUrl })\n const db = drizzle(client, { schema })\n\n logger('[Db.prepareDb] running migrations from %s', outDir)\n await migrate(db, { migrationsFolder: outDir })\n\n this.db = db\n\n const { backfillMetadataPropertyIds } = await import('@/db/backfillMetadataPropertyIds')\n await backfillMetadataPropertyIds()\n\n // One-time: clear item data whose model can't be determined (seeds.model_file_id, migration 0015)\n const { resetAmbiguousLegacyItemData } = await import('@/db/resetAmbiguousLegacyItemData')\n await resetAmbiguousLegacyItemData()\n\n return this.db\n }\n\n async connectToDb(_pathToDir: string) {\n return {\n id: this.db ? this.db.constructor.name : '',\n }\n }\n\n async migrate(pathToDbDir: string, _dbName: string, _dbId: string) {\n try {\n if (!this.db) {\n throw new Error('Database not initialized. Call prepareDb first.')\n }\n\n await migrate(this.db, { migrationsFolder: pathToDbDir })\n const queryResult = await this.db.select().from(appState)\n logger('queryResult', queryResult)\n } catch (error: any) {\n const errorMessage = error.message || String(error) || ''\n const errorString = String(error)\n const isMigrationError =\n errorMessage.includes(\"Can't find meta/_journal.json\") ||\n errorMessage.includes('_journal.json') ||\n errorMessage.includes(\"Cannot read properties of undefined\") ||\n errorMessage.includes(\"reading 'dialect'\") ||\n errorMessage.includes('undefined is not an object') ||\n errorString.includes('dialect') ||\n errorString.includes('undefined is not an object')\n\n if (isMigrationError) {\n if (process.env.NODE_ENV === 'test' || process.env.IS_SEED_DEV) {\n logger(\n 'Warning: Migration failed, but continuing in test environment:',\n errorMessage || errorString,\n )\n return this.db\n }\n }\n throw error\n }\n\n return this.db\n }\n\n /**\n * Polling-based liveQuery stub for Node. Prefer browser reactive queries in UI apps.\n */\n liveQuery<T>(query: ((sql: any) => any) | any): Observable<T[]> {\n if (!this.db) {\n throw new Error('Database not initialized. Call prepareDb first.')\n }\n\n const pollInterval = 1000\n\n if (typeof query === 'function') {\n throw new Error(\n 'SQL tag functions are not supported in node liveQuery stub implementation. Use Drizzle query builders instead.',\n )\n }\n\n const queryBuilder = query\n\n return interval(pollInterval).pipe(\n startWith(0),\n switchMap(async () => {\n try {\n const result = await Promise.resolve(queryBuilder)\n return result as T[]\n } catch (error) {\n logger('[Db.liveQuery] Error executing query:', error)\n throw error\n }\n }),\n distinctUntilChanged((prev, curr) => {\n return JSON.stringify(prev) === JSON.stringify(curr)\n }),\n )\n }\n}\n\n/** @deprecated Prefer NodeDb */\nexport const Db = NodeDb\n\nBaseDb.configure(new NodeDb())\n\nconst _check: IDb = new NodeDb()\nvoid _check\n","import path from 'path'\nimport fs from 'fs'\nimport { SEED_CONFIG_FILE, SEED_CONFIG_FALLBACKS } from '@/helpers/constants'\nimport type { IPathResolver } from '@/helpers/PathResolver/IPathResolver'\nimport { BasePathResolver } from '@/helpers/PathResolver/BasePathResolver'\nimport debug from 'debug'\n\nconst logger = debug('seedSdk:node:helpers:PathResolver')\n\nexport class NodePathResolver implements IPathResolver {\n /** @deprecated Prefer BasePathResolver static methods or configure(). */\n static getInstance(): IPathResolver {\n return BasePathResolver.getInstance()\n }\n\n /**\n * Detects the current environment based on filesystem structure and package.json\n */\n private detectEnvironment(): 'sdk-dev' | 'linked-sdk' | 'production' | 'test' {\n // Check if we're in the SDK repo itself\n if (process.env.NODE_ENV !== 'test' && this.isInSdkRepo()) {\n return 'sdk-dev'\n }\n\n // Check if we're running tests\n if (process.env.NODE_ENV === 'test') {\n return 'test'\n }\n\n // Check if we're using a linked version of the SDK\n if (this.isUsingLinkedSdk()) {\n return 'linked-sdk'\n }\n\n // Default to production environment\n return 'production'\n }\n\n private isInSdkRepo(): boolean {\n try {\n const currentDir = process.cwd()\n // Check when running from packages/sdk (SDK package root)\n if (fs.existsSync(path.join(currentDir, 'src', 'node')) &&\n fs.existsSync(path.join(currentDir, 'package.json')) &&\n JSON.parse(fs.readFileSync(path.join(currentDir, 'package.json'), 'utf8')).name === '@seedprotocol/sdk') {\n return true\n }\n // Check when running from monorepo root\n if (fs.existsSync(path.join(currentDir, 'packages', 'sdk', 'src', 'node')) &&\n fs.existsSync(path.join(currentDir, 'packages', 'sdk', 'package.json')) &&\n JSON.parse(fs.readFileSync(path.join(currentDir, 'packages', 'sdk', 'package.json'), 'utf8')).name === '@seedprotocol/sdk') {\n return true\n }\n return false\n } catch {\n return false\n }\n }\n\n private isUsingLinkedSdk(): boolean {\n try {\n const pkgPath = path.join(process.cwd(), 'package.json')\n if (!fs.existsSync(pkgPath)) return false\n \n const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'))\n const sdkDep = pkg.dependencies?.['@seedprotocol/sdk']\n \n return sdkDep && (sdkDep.startsWith('link:') || sdkDep.startsWith('portal:'))\n } catch {\n return false\n }\n }\n\n /**\n * Gets the root directory containing node_modules\n */\n getRootWithNodeModules(): string {\n const processCwd = process.cwd()\n\n const calledFromMocks = processCwd.includes('__mocks__')\n\n if (calledFromMocks) {\n return path.join(processCwd, '..', '..', '..', '..',)\n }\n\n return processCwd\n }\n\n /**\n * Gets the SDK root directory\n */\n getSdkRootDir(): string {\n const env = this.detectEnvironment()\n const rootWithNodeModules = this.getRootWithNodeModules()\n const processCwd = process.cwd()\n\n // For test environment, always return the SDK root directory\n if (env === 'test') {\n return rootWithNodeModules\n }\n\n if (env === 'linked-sdk') {\n // For linked packages, find the package directory\n const pkgJson = JSON.parse(fs.readFileSync(path.join(processCwd, 'package.json'), 'utf8'))\n const sdkPath = pkgJson.dependencies?.['@seedprotocol/sdk'] || pkgJson.devDependencies?.['@seedprotocol/sdk']\n if (sdkPath === 'link:@seedprotocol/sdk') {\n return path.join(processCwd, 'node_modules', '@seedprotocol', 'sdk',)\n }\n return path.resolve(processCwd, sdkPath.replace(/^(link:|portal:)/, ''))\n }\n\n // After early returns, env can only be 'sdk-dev' or 'production'\n if (env === 'sdk-dev') {\n // When running from monorepo root, SDK root is packages/sdk\n if (fs.existsSync(path.join(rootWithNodeModules, 'packages', 'sdk', 'package.json'))) {\n return path.join(rootWithNodeModules, 'packages', 'sdk')\n }\n // When running from packages/sdk directly\n return rootWithNodeModules\n }\n \n // Production: {sdk package}/dist. Resolve the installed package rather than\n // assuming it sits under the working directory: hoisted monorepos, packaged\n // Electron apps and scripts run from another directory all differ.\n try {\n const { createRequire } = process.getBuiltinModule('node:module')\n const pkgJson = createRequire(import.meta.url).resolve('@seedprotocol/sdk/package.json')\n return path.join(path.dirname(pkgJson), 'dist')\n } catch {\n return path.join(rootWithNodeModules, 'node_modules', '@seedprotocol', 'sdk', 'dist')\n }\n }\n\n getNodeModulesDir(): string {\n const env = this.detectEnvironment()\n const rootWithNodeModules = this.getRootWithNodeModules()\n\n let nodeModulesDir = path.join(rootWithNodeModules, 'node_modules')\n\n if (env !== 'linked-sdk' && env !== 'sdk-dev' && nodeModulesDir.includes('__tests__')) {\n nodeModulesDir = path.join(process.cwd(), '..', '..', '..', '..', 'node_modules',)\n }\n\n return nodeModulesDir\n }\n\n /**\n * Gets the .seed directory path\n */\n getDotSeedDir(schemaFileDir?: string): string {\n if (!schemaFileDir && process.env.SEED_SDK_TEST_PROJECT_TYPE && !process.cwd().includes('__mocks__')) {\n return path.join(process.cwd(), '__tests__', '__mocks__', process.env.SEED_SDK_TEST_PROJECT_TYPE, 'project', '.seed')\n }\n return path.join(schemaFileDir || process.cwd(), '.seed')\n }\n\n /**\n * Finds the Seed Protocol config file in the given directory\n * @param searchDir - Directory to search for the config file\n * @returns The path to the found config file, or null if not found\n */\n findConfigFile(searchDir: string = process.cwd()): string | null {\n // First try the primary config file name\n const primaryPath = path.join(searchDir, SEED_CONFIG_FILE)\n if (fs.existsSync(primaryPath)) {\n return primaryPath\n }\n\n // Then try fallback names in order\n for (const fallbackName of SEED_CONFIG_FALLBACKS) {\n const fallbackPath = path.join(searchDir, fallbackName)\n if (fs.existsSync(fallbackPath)) {\n return fallbackPath\n }\n }\n\n return null\n }\n\n /**\n * Gets paths for app-specific directories\n */\n getAppPaths(schemaFileDir?: string | undefined) {\n const env = this.detectEnvironment()\n const dotSeedDir = this.getDotSeedDir(schemaFileDir)\n const nodeModulesDir = this.getNodeModulesDir()\n\n logger('env', env)\n\n logger('getAppPaths', {\n sdkRootDir: this.getSdkRootDir(),\n dotSeedDir,\n nodeModulesDir,\n appSchemaDir: path.join(dotSeedDir, 'schema'),\n appDbDir: path.join(dotSeedDir, 'db'),\n appMetaDir: path.join(dotSeedDir, 'db', 'meta'),\n })\n\n return {\n sdkRootDir: this.getSdkRootDir(),\n dotSeedDir,\n nodeModulesDir,\n appSchemaDir: path.join(dotSeedDir, 'schema'),\n appDbDir: path.join(dotSeedDir, 'db'),\n appMetaDir: path.join(dotSeedDir, 'db', 'meta'),\n }\n }\n}\n\n/** @deprecated Prefer NodePathResolver; kept for CLI / node entry exports. */\nexport const PathResolver = NodePathResolver\n\nBasePathResolver.configure(new NodePathResolver())\n\nconst _check: IPathResolver = new NodePathResolver()\nvoid _check\n","import { NodePathResolver } from '@/node/helpers/PathResolver'\nimport { NodeFileManager } from '@/node/helpers/FileManager'\nimport { NodeDb } from '@/node/db/Db'\nimport { NodeArweaveClient } from '@/node/helpers/ArweaveClient'\nimport { NodeEasClient } from '@/node/helpers/EasClient'\nimport { NodeQueryClient } from '@/node/helpers/QueryClient'\nimport type { PlatformServices } from './types'\n\nexport function createPlatformServices(): PlatformServices {\n return {\n pathResolver: new NodePathResolver(),\n fileManager: new NodeFileManager(),\n db: new NodeDb(),\n arweaveClient: new NodeArweaveClient(),\n easClient: new NodeEasClient(),\n queryClient: new NodeQueryClient(),\n }\n}\n\nexport { configurePlatform } from './configurePlatform'\nexport type { PlatformServices } from './types'\n"],"names":["logger","fs"],"mappings":";;;;;;;;;;;;;;;;;MAOa,eAAe,CAAA;AAC1B,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,OAAO,EAAE;IACX;IAEA,SAAS,GAAA;AACP,QAAA,OAAO,EAAE;IACX;;IAGA,MAAM,qBAAqB,CAAC,QAAgB,EAAA;QAC1C,OAAO,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI;IACnD;IAEA,MAAM,oBAAoB,CAAC,WAAoB,EAAA;AAC7C,QAAA,OAAM;IACR;AAEA,IAAA,MAAM,gBAAgB,GAAA;AACpB,QAAA,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC;IACpC;AAEA,IAAA,MAAM,WAAW,GAAA;AACf,QAAA,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC;IACpC;AAEA,IAAA,MAAM,eAAe,GAAA;AACnB,QAAA,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC;IACpC;IAEA,MAAM,UAAU,CAAC,QAAgB,EAAA;QAC/B,OAAO,MAAM,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC;IAC3E;;IAGA,MAAM,qBAAqB,GAAA,EAAmB;IAE9C,MAAM,WAAW,CAAC,QAAgB,EAAA;AAChC,QAAA,IAAI;YACF,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC;YACzC,OAAO,IAAI,CAAC,IAAI;QAClB;AAAE,QAAA,MAAM;AACN,YAAA,OAAO,IAAI;QACb;IACF;AAEA,IAAA,MAAM,cAAc,GAAA;AAClB,QAAA,OAAO,IAAI,C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I,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC;YAC7C,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC;YACrC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC;SAChD;IACH;AACD;AAED;AACO,MAAM,YAAY,GAAG;AAE5B,gBAAgB,CAAC,SAAS,CAAC,IAAI,gBAAgB,EAAE,CAAC;;SC5MlC,sBAAsB,GAAA;IACpC,OAAO;QACL,YAAY,EAAE,IAAI,gBAAgB,EAAE;QACpC,WAAW,EAAE,IAAI,eAAe,EAAE;QAClC,EAAE,EAAE,IAAI,MAAM,EAAE;QAChB,aAAa,EAAE,IAAI,iBAAiB,EAAE;QACtC,SAAS,EAAE,IAAI,aAAa,EAAE;QAC9B,WAAW,EAAE,IAAI,eAAe,EAAE;KACnC;AACH;;"}
|
package/dist/main.js
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
import {
|
|
7
|
-
export {
|
|
8
|
-
import {
|
|
9
|
-
export {
|
|
10
|
-
import { j as isVersionRevoked, c as compareMetadataRowsLatestFirst, t as isPublishedMetadataRow, b as getLatestPublishedVersionRow, p as parseListPropertyValueFromStorage, I as Item, k as waitForEntityIdle } from './Item-C7sUUu2B.js';
|
|
11
|
-
export { C as ClientManagerState, h as ItemProperty, i as ItemPropertySaveValidationError, M as METADATA_LATEST_FIRST_ORDER_SQL, u as MachineIds, v as createNewItem, x as getEasSchemaForItemProperty, f as getGetAdditionalSyncAddresses, y as getGetPublisherForNewSeeds, z as getMetadataLatest, A as getRevokeExecutor, B as getUploadExecutor, D as getVersionData, E as isItemOwned, F as isLocalUnsealedDraft, G as isSeedRowOwned, l as listRelationEasPropertyName, H as localUnsealedDraftSql, J as ownedPublisherSql, K as ownedSeedsSql, L as pickLatestMetadataRowPerProperty, N as placeholderUidSql, O as propertyMachine, P as publisherInAddressListSql, Q as publisherIsInOwnedSet, R as setAdditionalSyncAddresses, S as setGetPublisherForNewSeeds, T as setRevokeExecutor, U as setUploadExecutor } from './Item-C7sUUu2B.js';
|
|
12
|
-
import { B as BaseDb, v as versions, q as seeds, m as metadata, h as htmlEmbeddedImageCoPublish, t as BaseFileManager, C as INTERNAL_STORAGE_MODEL_FILE_IDS, I as INTERNAL_PROPERTY_NAMES, Z as ZERO_BYTES32 } from './BasePathResolver-CfSfMW5_.js';
|
|
13
|
-
export { E as EAS_SEED_DATA_SYNCED_TO_DB_EVENT, x as INTERNAL_DATA_TYPES, D as ImageSize, F as SEED_PROTOCOL_SCHEMA_NAME, G as SeedModels, H as VERSION_SCHEMA_DEF, V as VERSION_SCHEMA_UID, J as VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA, a as appState, b as arweaveL1FinalizeJobs, e as easSyncProcesses, f as modelSchemas, g as modelUids, i as models, p as properties, n as propertyUids, o as publishProcesses, s as schemas, u as uploadProcesses } from './BasePathResolver-CfSfMW5_.js';
|
|
1
|
+
export { C as ConflictError, M as Model } from './index-8O3Uow-Y.js';
|
|
2
|
+
import { E as BaseDb, C as versions, X as normalizePublisher, A as seeds, $ as generateId, m as metadata, O as normalizeRelationPropertyValue, N as resolveSeedIdsFromRefString, i as isDataType, M as ModelPropertyDataTypes, o as htmlEmbeddedImageCoPublish, J as BaseFileManager, al as getArweaveUrlForTransaction, am as INTERNAL_STORAGE_MODEL_FILE_IDS, ad as INTERNAL_PROPERTY_NAMES, a9 as ZERO_BYTES32, n as normalizeDataType, R as getStorageDirForDataType } from './BasePathResolver-Cm4apKRb.js';
|
|
3
|
+
export { F as AmbiguousModelError, an as CONTENT_SHA256_TAG, ao as CONTENT_TYPE_TAG, _ as EAS_SEED_DATA_SYNCED_TO_DB_EVENT, ag as INTERNAL_DATA_TYPES, ap as ImageSize, aq as SEED_PROTOCOL_SCHEMA_NAME, ar as SeedModels, as as VERSION_SCHEMA_DEF, ac as VERSION_SCHEMA_UID, at as VERSION_SCHEMA_UID_OPTIMISM_SEPOLIA, h as appState, j as arweaveL1FinalizeJobs, U as buildArweaveContentTags, au as classifyMediaRef, av as closestImageSize, aw as contentSha256TagMatches, l as easSyncProcesses, ax as ensureImageLocal, G as eventEmitter, ay as getAddressesForItemsFilter, S as getContentSha256, a5 as getCorrectId, az as getFeedItemStringField, Q as isPublishedSeedRef, q as modelSchemas, r as modelUids, s as models, aA as normalizeAddressConfig, aB as normalizeAddressList, aC as normalizeArweaveTxIdForEnsure, aD as normalizeFeedItemFields, a0 as normalizeHexAddress, u as properties, x as propertyUids, y as publishProcesses, aE as resolveMediaRef, z as schemas, B as uploadProcesses } from './BasePathResolver-Cm4apKRb.js';
|
|
4
|
+
export { getPropertySchema } from './property-DwPD283A.js';
|
|
5
|
+
export { A as ADDRESSES_PERSISTED_EVENT, F as FILES_CHANGED_EVENT, L as LOCAL_COPIES_REMOVED_EVENT, T as TabLockTimeoutError, i as isLeaderTab, p as parseAddressesPersistedPayload, w as whenLeaderTab } from './tabEvents-9s2WCYw-.js';
|
|
6
|
+
import { d as getContentHash } from './ClientManager-i3nJASkg.js';
|
|
7
|
+
export { E as EAS_CHAIN_ID_APP_STATE_KEY, I as INIT_CONFIG_CONFLICT_MESSAGE, a as assertLocalDbChain, e as claimUnpublishedDrafts, C as client, f as createLocalQueryDataSource, h as createSchema, j as easSyncActor, k as getClient, m as getPublishedSeedRecord, n as getSchemaNameFromId, b as importJsonSchema, o as isSeedQueryLocalSourceRegistered, p as listSchemas, q as loadAllSchemasFromDb, u as mergeEasSyncRequestIntents, r as readJsonImportFile, v as readSchema, x as registerSeedQueryLocalSource, y as requestEasSyncFromAddressChange, z as requestEasSyncFromEventBus, A as requestEasSyncFromModelsInit, B as sendEasSyncClientRequest, D as startEasSyncActor, s as syncSchemaFromSource, t as transformImportToSchemaFile, F as unregisterSeedQueryLocalSource } from './ClientManager-i3nJASkg.js';
|
|
8
|
+
import { m as isVersionRevoked, c as compareMetadataRowsLatestFirst, v as isPublishedMetadataRow, k as getLatestPublishedVersionRow, p as parseListPropertyValueFromStorage, I as Item, n as waitForEntityIdle } from './Item-DBFchXpC.js';
|
|
9
|
+
export { C as ClientManagerState, e as ItemProperty, f as ItemPropertySaveValidationError, M as METADATA_LATEST_FIRST_ORDER_SQL, x as MachineIds, O as OwnershipError, P as PUBLISH_NOT_CONFIGURED_MESSAGE, h as assertItemOwned, y as createNewItem, z as getEasSchemaForItemProperty, d as getGetAdditionalSyncAddresses, A as getGetPublisherForNewSeeds, B as getMetadataLatest, E as getPublishExecutor, F as getRevokeExecutor, G as getUploadExecutor, H as getVersionData, i as isItemOwned, J as isLocalUnsealedDraft, K as isSeedRowOwned, l as listRelationEasPropertyName, L as localUnsealedDraftSql, N as ownedPublisherSql, Q as ownedSeedsSql, R as pickLatestMetadataRowPerProperty, S as placeholderUidSql, T as propertyMachine, U as publisherInAddressListSql, V as publisherIsInOwnedSet, W as setAdditionalSyncAddresses, X as setGetPublisherForNewSeeds, Y as setPublishExecutor, Z as setRevokeExecutor, _ as setUploadExecutor } from './Item-DBFchXpC.js';
|
|
14
10
|
import { eq, desc, and, or, isNotNull, ne } from 'drizzle-orm';
|
|
15
11
|
import { isPlaceholderUid, isValidEasAttestationUid, normalizeBytes32Hex } from '@seedprotocol/eas';
|
|
16
12
|
export { EAS_CHAIN_DEPLOYMENTS, BaseEasClient as EasClient, getCanonicalItemPropertiesFromEas, getEasChainDeployment, getEasEndpoint, getEasReadChainId, getEasSchemaUidBySchemaName, getItemPropertiesFromEas, getItemVersionsFromEas, getSeedsBySchemaName, getSeedsFromSchemaUids, isPlaceholderUid, isValidEasAttestationUid, normalizeBytes32Hex, pickLatestPropertyAttestationsByRefAndSchema, setSchemaUidForModel, setSchemaUidForSchemaDefinition, withExcludeRevokedFilter } from '@seedprotocol/eas';
|
|
17
|
-
export { S as Schema, d as deleteModelFromSchema, a as deletePropertyFromModel, r as renameModelProperty, s as schemaMachine, u as updateModelProperties } from './Schema-
|
|
13
|
+
export { S as Schema, d as deleteModelFromSchema, a as deletePropertyFromModel, r as renameModelProperty, s as schemaMachine, u as updateModelProperties } from './Schema-CpMNEnUO.js';
|
|
18
14
|
export { F as FileSystemLockedError } from './errors-CrBxGWah.js';
|
|
19
|
-
export { M as MODEL_AMBIGUOUS_EVENT } from './resolveModelForSyncedSeed-
|
|
20
|
-
export { ModelProperty } from './ModelProperty-
|
|
21
|
-
export { getModelSchemasFromEas } from './eas-
|
|
15
|
+
export { M as MODEL_AMBIGUOUS_EVENT } from './resolveModelForSyncedSeed-BL24nLa7.js';
|
|
16
|
+
export { ModelProperty } from './ModelProperty-BS49g01Y.js';
|
|
17
|
+
export { getModelSchemasFromEas } from './eas-6pjU-OuX.js';
|
|
22
18
|
export { BaseArweaveClient, DEFAULT_ARWEAVE_GATEWAYS, DEFAULT_ARWEAVE_GRAPHQL_URL, DEFAULT_ARWEAVE_HOST, DEFAULT_GATEWAY_SIDECAR_HOST, DEFAULT_GATEWAY_SIDECAR_PORT, DEFAULT_SEED_FEED_HYPER_KEY, DEFAULT_SEED_GATEWAY_HYPER_KEY, SEED_RSS_IMAGE_RELATION_FIELD_KEYS, ensureReadGatewaySelected, fetchArweaveRawFromBaseUrl, fetchArweaveRawTextAcrossGateways, getArweaveReadBaseUrls, getArweaveUploadStatus, getDefaultArweaveReadGatewayHostsOrdered, getLastHealthyReadGatewayHost, getPreferredArweaveReadBaseUrls, getReadGatewayHostsForConfig, getResolvedArweaveReadBaseUrls, getResolvedSeedGatewayEndpoints, getUploadApiArweaveDataUrl, getUploadApiArweaveStatusUrl, getUploadPipelineTransactionStatus, hasArweaveContentReadTransform, invalidateReadGatewayCache, invalidateSidecarProbeCache, isArweaveL1AnchoringComplete, isEasAttestationExplorerUrl, isGatewayHostCircuitOpen, isKnownArweaveGatewayHostname, isReadGatewayKnownHealthy, mergePrimaryHostWithDefaults, normalizeGatewayHostKey, normalizeUploadApiBaseUrl, queryArweaveGatewayTransaction, queryArweaveGatewayTransactionWithFallback, readArweaveContentResponse, recordGatewayHostFailure, recordGatewayHostSuccess, resetArweaveReadGatewayForTests, resolveSeedGatewayEndpoints, resolveSeedRssImageRelationFromItem, resolveSeedRssImageRelationRef, seedGatewayConfigFromClientContext, seedGatewayConfigFromSeedConfig, setArweaveContentReadTransform, setPreferredArweaveReadBaseUrls, setResolvedSeedGatewayEndpoints, transformArweaveContent } from '@seedprotocol/arweave';
|
|
23
|
-
export { u as updateSeedRevokedAt } from './updateSeedRevokedAt-
|
|
24
|
-
import { a as getSegmentedItemProperties, g as getPublishDraftGraph, i as isSeedRevoked, f as findRelatedSeedRow, b as isUnpublishedSeed, h as htmlPropertyNameForHtmlSeed, r as relatedModelNameFromDef } from './publishDraftGraph-
|
|
25
|
-
export { P as PublishValidationFailedError, R as RELATED_ITEM_UNPUBLISHED_CODE, a as RelatedItemUnpublishedError, r as resolvePublishPayloadValues, v as validateItemForPublish } from './getPublishPayload-
|
|
19
|
+
export { u as updateSeedRevokedAt } from './updateSeedRevokedAt-zBfi931j.js';
|
|
20
|
+
import { a as getSegmentedItemProperties, g as getPublishDraftGraph, i as isSeedRevoked, f as findRelatedSeedRow, b as isUnpublishedSeed, h as htmlPropertyNameForHtmlSeed, r as relatedModelNameFromDef } from './publishDraftGraph-BOn3_Occ.js';
|
|
21
|
+
export { P as PublishValidationFailedError, R as RELATED_ITEM_UNPUBLISHED_CODE, a as RelatedItemUnpublishedError, r as resolvePublishPayloadValues, v as validateItemForPublish } from './getPublishPayload-CTCvRUoU.js';
|
|
26
22
|
import 'pluralize';
|
|
27
|
-
export { getPublishUploadData, itemHasPublishUploadCandidates } from './getPublishUploads-
|
|
23
|
+
export { getPublishUploadData, itemHasPublishUploadCandidates } from './getPublishUploads-SFHCbf_y.js';
|
|
28
24
|
import { parseFragment } from 'parse5';
|
|
29
25
|
import 'js-yaml';
|
|
30
26
|
import 'fs';
|
|
@@ -33,18 +29,17 @@ import 'debug';
|
|
|
33
29
|
import './model-DGMe-TTm.js';
|
|
34
30
|
import 'drizzle-orm/casing';
|
|
35
31
|
import '@sinclair/typebox';
|
|
32
|
+
import 'drizzle-orm/sqlite-core';
|
|
36
33
|
import 'lodash-es';
|
|
37
|
-
import 'rxjs';
|
|
38
34
|
import 'nanoid';
|
|
39
35
|
import 'nanoid-dictionary';
|
|
40
36
|
import '@seedprotocol/query';
|
|
41
37
|
import '@noble/hashes/sha256';
|
|
42
38
|
import '@noble/hashes/sha3';
|
|
43
39
|
import '@noble/hashes/utils';
|
|
44
|
-
import '
|
|
45
|
-
import './SchemaValidationService-
|
|
40
|
+
import 'rxjs';
|
|
41
|
+
import './SchemaValidationService-DieV4KL-.js';
|
|
46
42
|
import '@sinclair/typebox/value';
|
|
47
|
-
import '@ethereum-attestation-service/eas-sdk';
|
|
48
43
|
import './mimeTypes-DHAHC4eZ.js';
|
|
49
44
|
|
|
50
45
|
/**
|
|
@@ -531,7 +526,7 @@ async function getRelatedItemsForPublish(item, visited = new Set()) {
|
|
|
531
526
|
visited.add(seedLocalId);
|
|
532
527
|
const result = [];
|
|
533
528
|
const { itemRelationProperties, itemImageProperties, itemListProperties } = await getSegmentedItemProperties(item);
|
|
534
|
-
const getItemMod = await import('./getItem-
|
|
529
|
+
const getItemMod = await import('./getItem-CxBNZ-WL.js');
|
|
535
530
|
const { getItem } = getItemMod;
|
|
536
531
|
const processRelationOrImage = async (prop) => {
|
|
537
532
|
const snapshot = prop.getService().getSnapshot();
|
|
@@ -550,8 +545,8 @@ async function getRelatedItemsForPublish(item, visited = new Set()) {
|
|
|
550
545
|
if (!value && prop.propertyName && isStorageSeed) {
|
|
551
546
|
const ctx = context;
|
|
552
547
|
if (ctx.seedLocalId || ctx.seedUid) {
|
|
553
|
-
const _mod_0 = await import('./Item-
|
|
554
|
-
const _ns_0 = _mod_0.
|
|
548
|
+
const _mod_0 = await import('./Item-DBFchXpC.js');
|
|
549
|
+
const _ns_0 = _mod_0.a7;
|
|
555
550
|
const { getPropertyData } = _ns_0;
|
|
556
551
|
const meta = await getPropertyData({
|
|
557
552
|
propertyName: prop.propertyName,
|
|
@@ -902,7 +897,7 @@ async function prepareHtmlEmbeddedImagesForPublish(item, publishPolicy) {
|
|
|
902
897
|
* (publishDraftGraph.ts). Html-embedded images of these items are co-published with `item` like its own.
|
|
903
898
|
*/
|
|
904
899
|
async function getRelatedDraftsCoPublishedWith(item) {
|
|
905
|
-
const _mod_1 = await import('./publishDraftGraph-
|
|
900
|
+
const _mod_1 = await import('./publishDraftGraph-BOn3_Occ.js');
|
|
906
901
|
const _ns_1 = _mod_1.p;
|
|
907
902
|
const { getPublishDraftGraph } = _ns_1;
|
|
908
903
|
const { drafts } = await getPublishDraftGraph(item);
|
|
@@ -1207,7 +1202,7 @@ async function loadRelatedItem(value) {
|
|
|
1207
1202
|
const { seedLocalId, seedUid } = resolveSeedIdsFromRefString(normalized);
|
|
1208
1203
|
if (!seedLocalId && !seedUid)
|
|
1209
1204
|
return undefined;
|
|
1210
|
-
const { getItem } = await import('./getItem-
|
|
1205
|
+
const { getItem } = await import('./getItem-CxBNZ-WL.js');
|
|
1211
1206
|
try {
|
|
1212
1207
|
return await getItem({ seedLocalId, seedUid });
|
|
1213
1208
|
}
|
|
@@ -1303,8 +1298,8 @@ async function appendCoPublishImages(item, acc, seen, visited, forceFullSnapshot
|
|
|
1303
1298
|
.from(htmlEmbeddedImageCoPublish)
|
|
1304
1299
|
.where(eq(htmlEmbeddedImageCoPublish.parentSeedLocalId, item.seedLocalId));
|
|
1305
1300
|
for (const row of rows) {
|
|
1306
|
-
const _mod_2 = await import('./Item-
|
|
1307
|
-
const _ns_2 = _mod_2.
|
|
1301
|
+
const _mod_2 = await import('./Item-DBFchXpC.js');
|
|
1302
|
+
const _ns_2 = _mod_2.a8;
|
|
1308
1303
|
const { Item } = _ns_2;
|
|
1309
1304
|
const imageItem = await Item.find({
|
|
1310
1305
|
seedLocalId: row.imageSeedLocalId,
|