@powerhousedao/switchboard 4.1.0-dev.7 → 4.1.0-dev.71
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/.env +1 -1
- package/Auth.md +396 -0
- package/CHANGELOG.md +573 -0
- package/Dockerfile +6 -4
- package/README.md +15 -14
- package/dist/src/clients/redis.d.ts +1 -1
- package/dist/src/clients/redis.d.ts.map +1 -1
- package/dist/src/clients/redis.js.map +1 -1
- package/dist/src/config.d.ts +1 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +2 -1
- package/dist/src/config.js.map +1 -1
- package/dist/src/feature-flags.d.ts +4 -0
- package/dist/src/feature-flags.d.ts.map +1 -0
- package/dist/src/feature-flags.js +17 -0
- package/dist/src/feature-flags.js.map +1 -0
- package/dist/src/index.js +12 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/server.d.ts +1 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +126 -54
- package/dist/src/server.js.map +1 -1
- package/dist/src/types.d.ts +12 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/gen-doc-model-type-defs.d.ts +1 -1
- package/dist/src/utils/gen-doc-model-type-defs.d.ts.map +1 -1
- package/dist/src/utils/gen-doc-model-type-defs.js +14 -13
- package/dist/src/utils/gen-doc-model-type-defs.js.map +1 -1
- package/dist/src/utils.d.ts +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +1 -1
- package/dist/src/utils.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/entrypoint.sh +6 -0
- package/package.json +24 -21
- package/tsconfig.json +16 -2
package/dist/src/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import dotenv from "dotenv";
|
|
2
2
|
dotenv.config();
|
|
3
|
-
import { getConfig } from "@powerhousedao/config/
|
|
3
|
+
import { getConfig } from "@powerhousedao/config/node";
|
|
4
4
|
const phConfig = getConfig();
|
|
5
5
|
const { switchboard } = phConfig;
|
|
6
6
|
export const config = {
|
|
@@ -14,5 +14,6 @@ export const config = {
|
|
|
14
14
|
!isNaN(Number(process.env.PH_SWITCHBOARD_PORT))
|
|
15
15
|
? Number(process.env.PH_SWITCHBOARD_PORT)
|
|
16
16
|
: (switchboard?.port ?? 4001),
|
|
17
|
+
mcp: true,
|
|
17
18
|
};
|
|
18
19
|
//# sourceMappingURL=config.js.map
|
package/dist/src/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;AAC7B,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,CAAC;AAQjC,MAAM,CAAC,MAAM,MAAM,GAAW;IAC5B,QAAQ,EAAE;QACR,0FAA0F;QAC1F,GAAG,EACD,OAAO,CAAC,GAAG,CAAC,2BAA2B;YACvC,WAAW,EAAE,QAAQ,EAAE,GAAG;YAC1B,QAAQ;KACX;IACD,IAAI,EACF,OAAO,CAAC,GAAG,CAAC,mBAAmB;QAC/B,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;QAC7C,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;QACzC,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,IAAI,IAAI,CAAC;IACjC,GAAG,EAAE,IAAI;CACV,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function initFeatureFlags(): Promise<import("@openfeature/server-sdk").Client>;
|
|
2
|
+
export declare function isReactorv2Enabled(): Promise<boolean>;
|
|
3
|
+
export declare function isDualActionCreateEnabled(): Promise<boolean>;
|
|
4
|
+
//# sourceMappingURL=feature-flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-flags.d.ts","sourceRoot":"","sources":["../../src/feature-flags.ts"],"names":[],"mappings":"AAGA,wBAAsB,gBAAgB,sDAOrC;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC,CAG3D;AAED,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,OAAO,CAAC,CAMlE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { EnvVarProvider } from "@openfeature/env-var-provider";
|
|
2
|
+
import { OpenFeature } from "@openfeature/server-sdk";
|
|
3
|
+
export async function initFeatureFlags() {
|
|
4
|
+
// for now, we're only using env vars for feature flags
|
|
5
|
+
const provider = new EnvVarProvider();
|
|
6
|
+
await OpenFeature.setProviderAndWait(provider);
|
|
7
|
+
return OpenFeature.getClient();
|
|
8
|
+
}
|
|
9
|
+
export async function isReactorv2Enabled() {
|
|
10
|
+
const client = OpenFeature.getClient();
|
|
11
|
+
return await client.getBooleanValue("FEATURE_REACTORV2_ENABLED", false);
|
|
12
|
+
}
|
|
13
|
+
export async function isDualActionCreateEnabled() {
|
|
14
|
+
const client = OpenFeature.getClient();
|
|
15
|
+
return await client.getBooleanValue("FEATURE_DUAL_ACTION_CREATE_ENABLED", false);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=feature-flags.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-flags.js","sourceRoot":"","sources":["../../src/feature-flags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,uDAAuD;IACvD,MAAM,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC;IAEtC,MAAM,WAAW,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAE/C,OAAO,WAAW,CAAC,SAAS,EAAE,CAAC;AACjC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,MAAM,MAAM,GAAG,WAAW,CAAC,SAAS,EAAE,CAAC;IACvC,OAAO,MAAM,MAAM,CAAC,eAAe,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;AAC1E,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,yBAAyB;IAC7C,MAAM,MAAM,GAAG,WAAW,CAAC,SAAS,EAAE,CAAC;IACvC,OAAO,MAAM,MAAM,CAAC,eAAe,CACjC,oCAAoC,EACpC,KAAK,CACN,CAAC;AACJ,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { config } from "./config.js";
|
|
3
3
|
import { startSwitchboard } from "./server.js";
|
|
4
|
+
function ensureNodeVersion(minVersion = "22") {
|
|
5
|
+
const version = process.versions.node;
|
|
6
|
+
if (!version) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (version < minVersion) {
|
|
10
|
+
console.error(`Node version ${minVersion} or higher is required. Current version: ${version}`);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
// Ensure minimum Node.js version
|
|
15
|
+
ensureNodeVersion("22");
|
|
4
16
|
startSwitchboard(config).catch(console.error);
|
|
5
17
|
//# sourceMappingURL=index.js.map
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,gBAAgB,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,SAAS,iBAAiB,CAAC,UAAU,GAAG,IAAI;IAC1C,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC;IACtC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO;IACT,CAAC;IAED,IAAI,OAAO,GAAG,UAAU,EAAE,CAAC;QACzB,OAAO,CAAC,KAAK,CACX,gBAAgB,UAAU,4CAA4C,OAAO,EAAE,CAChF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AACD,iCAAiC;AACjC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AAExB,gBAAgB,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
package/dist/src/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import type { StartServerOptions, SwitchboardReactor } from "./types.js";
|
|
3
3
|
export declare const startSwitchboard: (options?: StartServerOptions) => Promise<SwitchboardReactor>;
|
|
4
4
|
export * from "./types.js";
|
|
5
5
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/src/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AAoCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AA6JzE,eAAO,MAAM,gBAAgB,GAC3B,UAAS,kBAAuB,KAC/B,OAAO,CAAC,kBAAkB,CAgC5B,CAAC;AAEF,cAAc,YAAY,CAAC"}
|
package/dist/src/server.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { EventBus, InMemoryQueue, Reactor, ReactorClientBuilder, } from "@powerhousedao/reactor";
|
|
3
|
+
import { VitePackageLoader, startAPI, startViteServer, } from "@powerhousedao/reactor-api";
|
|
3
4
|
import * as Sentry from "@sentry/node";
|
|
4
|
-
import { InMemoryCache, ReactorBuilder, driveDocumentModelModule, } from "document-drive";
|
|
5
|
-
import RedisCache from "document-drive/cache/redis";
|
|
5
|
+
import { DocumentAlreadyExistsError, InMemoryCache, ReactorBuilder, RedisCache, driveDocumentModelModule, } from "document-drive";
|
|
6
6
|
import { FilesystemStorage } from "document-drive/storage/filesystem";
|
|
7
7
|
import { PrismaStorageFactory } from "document-drive/storage/prisma";
|
|
8
|
-
import { documentModelDocumentModelModule
|
|
8
|
+
import { documentModelDocumentModelModule } from "document-model";
|
|
9
9
|
import dotenv from "dotenv";
|
|
10
10
|
import express from "express";
|
|
11
11
|
import path from "path";
|
|
12
12
|
import { initRedis } from "./clients/redis.js";
|
|
13
|
+
import { initFeatureFlags, isDualActionCreateEnabled, isReactorv2Enabled, } from "./feature-flags.js";
|
|
13
14
|
import { initProfilerFromEnv } from "./profiler.js";
|
|
14
15
|
import { addDefaultDrive } from "./utils.js";
|
|
15
16
|
dotenv.config();
|
|
@@ -24,8 +25,128 @@ if (process.env.SENTRY_DSN) {
|
|
|
24
25
|
Sentry.setupExpressErrorHandler(app);
|
|
25
26
|
}
|
|
26
27
|
const DEFAULT_PORT = process.env.PORT ? Number(process.env.PORT) : 4001;
|
|
28
|
+
async function initServer(serverPort, options) {
|
|
29
|
+
const { dev, packages = [], remoteDrives = [] } = options;
|
|
30
|
+
// start redis if configured
|
|
31
|
+
const redisUrl = process.env.REDIS_TLS_URL ?? process.env.REDIS_URL;
|
|
32
|
+
let redis;
|
|
33
|
+
if (redisUrl) {
|
|
34
|
+
try {
|
|
35
|
+
redis = await initRedis(redisUrl);
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
console.error(e);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const connectionString = process.env.DATABASE_URL ?? "./.ph/drive-storage";
|
|
42
|
+
const dbUrl = connectionString.includes("amazonaws") &&
|
|
43
|
+
!connectionString.includes("sslmode=no-verify")
|
|
44
|
+
? connectionString + "?sslmode=no-verify"
|
|
45
|
+
: connectionString;
|
|
46
|
+
const cache = redis ? new RedisCache(redis) : new InMemoryCache();
|
|
47
|
+
const storageFactory = dbUrl.startsWith("postgresql")
|
|
48
|
+
? new PrismaStorageFactory(dbUrl, cache)
|
|
49
|
+
: undefined;
|
|
50
|
+
const storage = storageFactory
|
|
51
|
+
? storageFactory.build()
|
|
52
|
+
: new FilesystemStorage(path.join(process.cwd(), dbUrl));
|
|
53
|
+
const driveServer = new ReactorBuilder([
|
|
54
|
+
documentModelDocumentModelModule,
|
|
55
|
+
driveDocumentModelModule,
|
|
56
|
+
])
|
|
57
|
+
.withStorage(storage)
|
|
58
|
+
.withCache(cache)
|
|
59
|
+
.withOptions({
|
|
60
|
+
featureFlags: {
|
|
61
|
+
enableDualActionCreate: options.reactorOptions?.enableDualActionCreate ?? false,
|
|
62
|
+
},
|
|
63
|
+
})
|
|
64
|
+
.build();
|
|
65
|
+
// init drive server
|
|
66
|
+
await driveServer.initialize();
|
|
67
|
+
const queue = new InMemoryQueue(new EventBus());
|
|
68
|
+
const reactor = new Reactor(driveServer, storage, queue);
|
|
69
|
+
const client = new ReactorClientBuilder().withReactor(reactor).build();
|
|
70
|
+
const dbPath = dbUrl.startsWith("postgresql") ? dbUrl : ".ph/read-storage";
|
|
71
|
+
let defaultDriveUrl = undefined;
|
|
72
|
+
// Create default drive if provided
|
|
73
|
+
if (options.drive) {
|
|
74
|
+
defaultDriveUrl = await addDefaultDrive(driveServer, options.drive, serverPort);
|
|
75
|
+
}
|
|
76
|
+
// start vite server if dev mode is enabled
|
|
77
|
+
const vite = dev ? await startViteServer() : undefined;
|
|
78
|
+
// get paths to local document models
|
|
79
|
+
if (dev && !options.disableLocalPackages) {
|
|
80
|
+
// TODO get path from powerhouse config
|
|
81
|
+
const basePath = process.cwd();
|
|
82
|
+
packages.push(basePath);
|
|
83
|
+
}
|
|
84
|
+
// create loader
|
|
85
|
+
const packageLoader = vite ? await VitePackageLoader.build(vite) : undefined;
|
|
86
|
+
// Start the API with the reactor and options
|
|
87
|
+
const api = await startAPI(driveServer, client, {
|
|
88
|
+
express: app,
|
|
89
|
+
port: serverPort,
|
|
90
|
+
dbPath: options.dbPath ?? dbPath,
|
|
91
|
+
https: options.https,
|
|
92
|
+
packageLoader,
|
|
93
|
+
packages: packages,
|
|
94
|
+
processorConfig: options.processorConfig,
|
|
95
|
+
configFile: options.configFile ?? path.join(process.cwd(), "powerhouse.config.json"),
|
|
96
|
+
mcp: options.mcp ?? true,
|
|
97
|
+
subgraphs: options.subgraphs,
|
|
98
|
+
});
|
|
99
|
+
// add vite middleware after express app is initialized if applicable
|
|
100
|
+
if (vite) {
|
|
101
|
+
api.app.use(vite.middlewares);
|
|
102
|
+
}
|
|
103
|
+
// Connect to remote drives AFTER packages are loaded
|
|
104
|
+
if (remoteDrives.length > 0) {
|
|
105
|
+
for (const remoteDriveUrl of remoteDrives) {
|
|
106
|
+
try {
|
|
107
|
+
await driveServer.addRemoteDrive(remoteDriveUrl, {
|
|
108
|
+
availableOffline: true,
|
|
109
|
+
sharingType: "public",
|
|
110
|
+
listeners: [],
|
|
111
|
+
triggers: [],
|
|
112
|
+
});
|
|
113
|
+
// Use the first remote drive URL as the default
|
|
114
|
+
if (!defaultDriveUrl) {
|
|
115
|
+
defaultDriveUrl = remoteDriveUrl;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
if (error instanceof DocumentAlreadyExistsError) {
|
|
120
|
+
console.info(`Remote drive already added: ${remoteDriveUrl}`);
|
|
121
|
+
// Still use this drive URL as default if not already set
|
|
122
|
+
if (!defaultDriveUrl) {
|
|
123
|
+
defaultDriveUrl = remoteDriveUrl;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
console.error(`Failed to connect to remote drive ${remoteDriveUrl}:`, error);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
defaultDriveUrl,
|
|
134
|
+
api,
|
|
135
|
+
reactor: driveServer,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
27
138
|
export const startSwitchboard = async (options = {}) => {
|
|
28
139
|
const serverPort = options.port ?? DEFAULT_PORT;
|
|
140
|
+
// Initialize feature flags
|
|
141
|
+
await initFeatureFlags();
|
|
142
|
+
const enabled = await isReactorv2Enabled();
|
|
143
|
+
options.subgraphs = {
|
|
144
|
+
isReactorv2Enabled: enabled,
|
|
145
|
+
};
|
|
146
|
+
const dualActionCreateEnabled = await isDualActionCreateEnabled();
|
|
147
|
+
options.reactorOptions = {
|
|
148
|
+
enableDualActionCreate: dualActionCreateEnabled,
|
|
149
|
+
};
|
|
29
150
|
if (process.env.PYROSCOPE_SERVER_ADDRESS) {
|
|
30
151
|
try {
|
|
31
152
|
await initProfilerFromEnv(process.env);
|
|
@@ -36,56 +157,7 @@ export const startSwitchboard = async (options = {}) => {
|
|
|
36
157
|
}
|
|
37
158
|
}
|
|
38
159
|
try {
|
|
39
|
-
|
|
40
|
-
let redis;
|
|
41
|
-
if (redisUrl) {
|
|
42
|
-
try {
|
|
43
|
-
redis = await initRedis(redisUrl);
|
|
44
|
-
}
|
|
45
|
-
catch (e) {
|
|
46
|
-
console.error(e);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const connectionString = process.env.DATABASE_URL ?? "./.ph/drive-storage";
|
|
50
|
-
const dbUrl = connectionString.includes("amazonaws") &&
|
|
51
|
-
!connectionString.includes("sslmode=no-verify")
|
|
52
|
-
? connectionString + "?sslmode=no-verify"
|
|
53
|
-
: connectionString;
|
|
54
|
-
const cache = redis ? new RedisCache(redis) : new InMemoryCache();
|
|
55
|
-
const storageFactory = dbUrl.startsWith("postgresql")
|
|
56
|
-
? new PrismaStorageFactory(dbUrl, cache)
|
|
57
|
-
: undefined;
|
|
58
|
-
const storage = storageFactory
|
|
59
|
-
? storageFactory.build()
|
|
60
|
-
: new FilesystemStorage(path.join(process.cwd(), dbUrl));
|
|
61
|
-
const reactor = new ReactorBuilder([
|
|
62
|
-
documentModelDocumentModelModule,
|
|
63
|
-
driveDocumentModelModule,
|
|
64
|
-
])
|
|
65
|
-
.withStorage(storage)
|
|
66
|
-
.withCache(cache)
|
|
67
|
-
.build();
|
|
68
|
-
// init drive server
|
|
69
|
-
await reactor.initialize();
|
|
70
|
-
const dbPath = dbUrl.startsWith("postgresql") ? dbUrl : ".ph/read-storage";
|
|
71
|
-
let defaultDriveUrl = undefined;
|
|
72
|
-
if (options.drive) {
|
|
73
|
-
defaultDriveUrl = await addDefaultDrive(reactor, options.drive, serverPort);
|
|
74
|
-
}
|
|
75
|
-
// Start the API with the reactor and options
|
|
76
|
-
await startAPI(reactor, {
|
|
77
|
-
express: app,
|
|
78
|
-
port: serverPort,
|
|
79
|
-
dbPath: options.dbPath ?? dbPath,
|
|
80
|
-
https: options.https,
|
|
81
|
-
packages: options.packages,
|
|
82
|
-
configFile: options.configFile ??
|
|
83
|
-
path.join(process.cwd(), "powerhouse.config.json"),
|
|
84
|
-
});
|
|
85
|
-
return {
|
|
86
|
-
defaultDriveUrl,
|
|
87
|
-
reactor,
|
|
88
|
-
};
|
|
160
|
+
return await initServer(serverPort, options);
|
|
89
161
|
}
|
|
90
162
|
catch (e) {
|
|
91
163
|
Sentry.captureException(e);
|
package/dist/src/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server.ts"],"names":[],"mappings":";AACA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,OAAO,EACP,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,QAAQ,EACR,eAAe,GAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AAEvC,OAAO,EACL,0BAA0B,EAC1B,aAAa,EACb,cAAc,EACd,UAAU,EACV,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,EAAE,gCAAgC,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,kDAAkD;AAClD,MAAM,GAAG,GAAG,OAAO,EAAE,CAAC;AAE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AAuB,GAAG,MAAM,yBAAyB,EAAE,CAAC;IAClE,OAAO,CAAC,cAAc,GAAG;QACvB,sBAAsB,EAAE,uBAAuB;KAChD,CAAC;IAEF,IAAI,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,MAAM,mBAAmB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACzC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;YAC3B,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,CAAC,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,IAAI,CAAC;QACH,OAAO,MAAM,UAAU,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;QAC3B,OAAO,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;QAChC,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC,CAAC;AAEF,cAAc,YAAY,CAAC"}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DriveInput, IDocumentDriveServer } from "document-drive";
|
|
2
2
|
export type StorageOptions = {
|
|
3
3
|
type: "filesystem" | "memory" | "postgres" | "browser";
|
|
4
4
|
filesystemPath?: string;
|
|
@@ -7,9 +7,11 @@ export type StorageOptions = {
|
|
|
7
7
|
export type StartServerOptions = {
|
|
8
8
|
configFile?: string;
|
|
9
9
|
port?: number;
|
|
10
|
+
dev?: boolean;
|
|
10
11
|
dbPath?: string;
|
|
11
12
|
drive?: DriveInput;
|
|
12
13
|
packages?: string[];
|
|
14
|
+
remoteDrives?: string[];
|
|
13
15
|
https?: {
|
|
14
16
|
keyPath: string;
|
|
15
17
|
certPath: string;
|
|
@@ -20,6 +22,15 @@ export type StartServerOptions = {
|
|
|
20
22
|
users: string[];
|
|
21
23
|
admins: string[];
|
|
22
24
|
};
|
|
25
|
+
mcp?: boolean;
|
|
26
|
+
processorConfig?: Map<string, unknown>;
|
|
27
|
+
disableLocalPackages?: boolean;
|
|
28
|
+
subgraphs?: {
|
|
29
|
+
isReactorv2Enabled?: boolean;
|
|
30
|
+
};
|
|
31
|
+
reactorOptions?: {
|
|
32
|
+
enableDualActionCreate?: boolean;
|
|
33
|
+
};
|
|
23
34
|
};
|
|
24
35
|
export type SwitchboardReactor = {
|
|
25
36
|
defaultDriveUrl: string | undefined;
|
package/dist/src/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEvE,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;IACvD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,CAAC,EACF;QACE,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;KAClB,GACD,OAAO,GACP,SAAS,CAAC;IACd,IAAI,CAAC,EAAE;QACL,OAAO,EAAE,OAAO,CAAC;QACjB,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;IACF,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,SAAS,CAAC,EAAE;QACV,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B,CAAC;IACF,cAAc,CAAC,EAAE;QACf,sBAAsB,CAAC,EAAE,OAAO,CAAC;KAClC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,OAAO,EAAE,oBAAoB,CAAC;CAC/B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BaseDocumentDriveServer } from "document-drive";
|
|
2
2
|
export declare const getDocumentModelTypeDefs: (documentDriveServer: BaseDocumentDriveServer, typeDefs: string) => import("graphql").DocumentNode;
|
|
3
3
|
//# sourceMappingURL=gen-doc-model-type-defs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gen-doc-model-type-defs.d.ts","sourceRoot":"","sources":["../../../src/utils/gen-doc-model-type-defs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"gen-doc-model-type-defs.d.ts","sourceRoot":"","sources":["../../../src/utils/gen-doc-model-type-defs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAG9D,eAAO,MAAM,wBAAwB,GACnC,qBAAqB,uBAAuB,EAC5C,UAAU,MAAM,mCAkEjB,CAAC"}
|
|
@@ -4,20 +4,20 @@ export const getDocumentModelTypeDefs = (documentDriveServer, typeDefs) => {
|
|
|
4
4
|
let dmSchema = "";
|
|
5
5
|
documentModels.forEach(({ documentModel }) => {
|
|
6
6
|
dmSchema += `
|
|
7
|
-
${documentModel.specifications
|
|
7
|
+
${documentModel.global.specifications
|
|
8
8
|
.map((specification) => specification.state.global.schema
|
|
9
|
-
.replaceAll(" Account ", ` ${documentModel.name}Account `)
|
|
10
|
-
.replaceAll(`: Account`, `: ${documentModel.name}Account`)
|
|
11
|
-
.replaceAll(`[Account!]!`, `[${documentModel.name}Account!]!`)
|
|
9
|
+
.replaceAll(" Account ", ` ${documentModel.global.name}Account `)
|
|
10
|
+
.replaceAll(`: Account`, `: ${documentModel.global.name}Account`)
|
|
11
|
+
.replaceAll(`[Account!]!`, `[${documentModel.global.name}Account!]!`)
|
|
12
12
|
.replaceAll("scalar DateTime", "")
|
|
13
13
|
.replaceAll(/input (.*?) {[\s\S]*?}/g, ""))
|
|
14
14
|
.join("\n")};
|
|
15
15
|
|
|
16
|
-
${documentModel.specifications
|
|
16
|
+
${documentModel.global.specifications
|
|
17
17
|
.map((specification) => specification.state.local.schema
|
|
18
|
-
.replaceAll(" Account ", ` ${documentModel.name}Account `)
|
|
19
|
-
.replaceAll(`: Account`, `: ${documentModel.name}Account`)
|
|
20
|
-
.replaceAll(`[Account!]!`, `[${documentModel.name}Account!]!`)
|
|
18
|
+
.replaceAll(" Account ", ` ${documentModel.global.name}Account `)
|
|
19
|
+
.replaceAll(`: Account`, `: ${documentModel.global.name}Account`)
|
|
20
|
+
.replaceAll(`[Account!]!`, `[${documentModel.global.name}Account!]!`)
|
|
21
21
|
.replaceAll("scalar DateTime", "")
|
|
22
22
|
.replaceAll(/input (.*?) {[\s\S]*?}/g, "")
|
|
23
23
|
.replaceAll("type AccountSnapshotLocalState", "")
|
|
@@ -25,14 +25,15 @@ export const getDocumentModelTypeDefs = (documentDriveServer, typeDefs) => {
|
|
|
25
25
|
.replaceAll("type ScopeFrameworkLocalState", ""))
|
|
26
26
|
.join("\n")};
|
|
27
27
|
|
|
28
|
-
type ${documentModel.name} implements IDocument {
|
|
28
|
+
type ${documentModel.global.name} implements IDocument {
|
|
29
29
|
id: ID!
|
|
30
30
|
name: String!
|
|
31
31
|
documentType: String!
|
|
32
32
|
revision: Int!
|
|
33
33
|
created: DateTime!
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
createdAtUtcIso: DateTime!
|
|
35
|
+
lastModifiedAtUtcIso: DateTime!
|
|
36
|
+
${documentModel.global.name !== "DocumentModel" ? `state: ${documentModel.global.name}State!` : ""}
|
|
36
37
|
}\n`;
|
|
37
38
|
});
|
|
38
39
|
// add the mutation and query types
|
|
@@ -43,8 +44,8 @@ export const getDocumentModelTypeDefs = (documentDriveServer, typeDefs) => {
|
|
|
43
44
|
documentType: String!
|
|
44
45
|
revision: Int!
|
|
45
46
|
created: DateTime!
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
createdAtUtcIso: DateTime!
|
|
48
|
+
lastModifiedAtUtcIso: DateTime!
|
|
48
49
|
}
|
|
49
50
|
${dmSchema}
|
|
50
51
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gen-doc-model-type-defs.js","sourceRoot":"","sources":["../../../src/utils/gen-doc-model-type-defs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CACtC,mBAA4C,EAC5C,QAAgB,EAChB,EAAE;IACF,MAAM,cAAc,GAAG,mBAAmB,CAAC,uBAAuB,EAAE,CAAC;IACrE,IAAI,QAAQ,GAAG,EAAE,CAAC;IAClB,cAAc,CAAC,OAAO,CAAC,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE;QAC3C,QAAQ,IAAI;UACN,aAAa,CAAC,cAAc;
|
|
1
|
+
{"version":3,"file":"gen-doc-model-type-defs.js","sourceR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B,EAAE,EAAE,CAAC;aACjC,UAAU,CAAC,yBAAyB,EAAE,EAAE,CAAC;aACzC,UAAU,CAAC,gCAAgC,EAAE,EAAE,CAAC;aAChD,UAAU,CAAC,gCAAgC,EAAE,EAAE,CAAC;aAChD,UAAU,CAAC,+BAA+B,EAAE,EAAE,CAAC,CACnD;aACA,IAAI,CAAC,IAAI,CAAC;;eAEN,aAAa,CAAC,MAAM,CAAC,IAAI;;;;;;;;cAQ1B,aAAa,CAAC,MAAM,CAAC,IAAI,KAAK,eAAe,CAAC,CAAC,CAAC,UAAU,aAAa,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE;YAClG,CAAC;IACX,CAAC,CAAC,CAAC;IAEH,mCAAmC;IACnC,MAAM,MAAM,GAAG;;;;;;;;;;MAUX,QAAQ;;MAER,QAAQ;KACT,CAAC;IAEJ,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3C,CAAC,CAAC"}
|
package/dist/src/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DriveInput, IDocumentDriveServer } from "document-drive";
|
|
2
2
|
export declare function addDefaultDrive(driveServer: IDocumentDriveServer, drive: DriveInput, serverPort: number): Promise<string>;
|
|
3
3
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGvE,wBAAsB,eAAe,CACnC,WAAW,EAAE,oBAAoB,EACjC,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,MAAM,mBAqBnB"}
|
package/dist/src/utils.js
CHANGED
package/dist/src/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,WAAiC,EACjC,KAAiB,EACjB,UAAkB;IAElB,IAAI,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC;IACvB,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrC,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC;IACvB,CAAC;IAED,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,CAAC;QACH,oBAAoB;QACpB,MAAM,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,CAAC,CAAC,YAAY,0BAA0B,CAAC,EAAE,CAAC;YAC/C,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC;IAED,OAAO,oBAAoB,UAAU,MAAM,OAAO,EAAE,CAAC;AACvD,CAAC"}
|