@powerhousedao/ph-cli 6.0.0-dev.16 → 6.0.0-dev.18
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/scripts/generate-commands-docs.d.ts +2 -0
- package/dist/scripts/generate-commands-docs.d.ts.map +1 -0
- package/dist/scripts/generate-commands-docs.js +47 -0
- package/dist/scripts/generate-commands-docs.js.map +1 -0
- package/dist/scripts/generate-commands-docs.ts +51 -0
- package/dist/scripts/generate-docs-legacy.d.ts +2 -0
- package/dist/scripts/generate-docs-legacy.d.ts.map +1 -0
- package/dist/scripts/{generate-commands-md.js → generate-docs-legacy.js} +2 -2
- package/dist/scripts/generate-docs-legacy.js.map +1 -0
- package/dist/scripts/{generate-commands-md.ts → generate-docs-legacy.ts} +1 -1
- package/dist/src/cli.js +23 -36
- package/dist/src/cli.js.map +1 -1
- package/dist/src/cli.old.d.ts +3 -0
- package/dist/src/cli.old.d.ts.map +1 -0
- package/dist/src/cli.old.js +43 -0
- package/dist/src/cli.old.js.map +1 -0
- package/dist/src/commands/access-token.d.ts +13 -8
- package/dist/src/commands/access-token.d.ts.map +1 -1
- package/dist/src/commands/access-token.js +111 -79
- package/dist/src/commands/access-token.js.map +1 -1
- package/dist/src/commands/connect.d.ts +248 -18
- package/dist/src/commands/connect.d.ts.map +1 -1
- package/dist/src/commands/connect.js +59 -84
- package/dist/src/commands/connect.js.map +1 -1
- package/dist/src/commands/generate.d.ts +57 -8
- package/dist/src/commands/generate.d.ts.map +1 -1
- package/dist/src/commands/generate.js +24 -40
- package/dist/src/commands/generate.js.map +1 -1
- package/dist/src/commands/get-package-manager.d.ts +30 -0
- package/dist/src/commands/get-package-manager.d.ts.map +1 -0
- package/dist/src/commands/get-package-manager.js +8 -0
- package/dist/src/commands/get-package-manager.js.map +1 -0
- package/dist/src/commands/index.d.ts +1 -2
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +13 -2
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/inspect.d.ts +11 -5
- package/dist/src/commands/inspect.d.ts.map +1 -1
- package/dist/src/commands/inspect.js +26 -20
- package/dist/src/commands/inspect.js.map +1 -1
- package/dist/src/commands/install.d.ts +21 -14
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +71 -123
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/legacy/access-token.old.d.ts +9 -0
- package/dist/src/commands/legacy/access-token.old.d.ts.map +1 -0
- package/dist/src/commands/legacy/access-token.old.js +110 -0
- package/dist/src/commands/legacy/access-token.old.js.map +1 -0
- package/dist/src/commands/legacy/connect.old.d.ts +19 -0
- package/dist/src/commands/legacy/connect.old.d.ts.map +1 -0
- package/dist/src/commands/legacy/connect.old.js +85 -0
- package/dist/src/commands/legacy/connect.old.js.map +1 -0
- package/dist/src/commands/legacy/generate.old.d.ts +9 -0
- package/dist/src/commands/legacy/generate.old.d.ts.map +1 -0
- package/dist/src/commands/legacy/generate.old.js +41 -0
- package/dist/src/commands/legacy/generate.old.js.map +1 -0
- package/dist/src/commands/{help.d.ts → legacy/help.old.d.ts} +1 -1
- package/dist/src/commands/legacy/help.old.d.ts.map +1 -0
- package/dist/src/commands/{help.js → legacy/help.old.js} +1 -1
- package/dist/src/commands/legacy/help.old.js.map +1 -0
- package/dist/src/commands/legacy/inspect.old.d.ts +6 -0
- package/dist/src/commands/legacy/inspect.old.d.ts.map +1 -0
- package/dist/src/commands/legacy/inspect.old.js +21 -0
- package/dist/src/commands/legacy/inspect.old.js.map +1 -0
- package/dist/src/commands/legacy/install.old.d.ts +15 -0
- package/dist/src/commands/legacy/install.old.d.ts.map +1 -0
- package/dist/src/commands/legacy/install.old.js +127 -0
- package/dist/src/commands/legacy/install.old.js.map +1 -0
- package/dist/src/commands/legacy/login.old.d.ts +12 -0
- package/dist/src/commands/legacy/login.old.d.ts.map +1 -0
- package/dist/src/commands/legacy/login.old.js +208 -0
- package/dist/src/commands/legacy/login.old.js.map +1 -0
- package/dist/src/commands/legacy/migrate.old.d.ts +11 -0
- package/dist/src/commands/legacy/migrate.old.d.ts.map +1 -0
- package/dist/src/commands/legacy/migrate.old.js +15 -0
- package/dist/src/commands/legacy/migrate.old.js.map +1 -0
- package/dist/src/commands/legacy/service.old.d.ts +5 -0
- package/dist/src/commands/legacy/service.old.d.ts.map +1 -0
- package/dist/src/commands/legacy/service.old.js +67 -0
- package/dist/src/commands/legacy/service.old.js.map +1 -0
- package/dist/src/commands/legacy/switchboard.old.d.ts +9 -0
- package/dist/src/commands/legacy/switchboard.old.d.ts.map +1 -0
- package/dist/src/commands/legacy/switchboard.old.js +78 -0
- package/dist/src/commands/legacy/switchboard.old.js.map +1 -0
- package/dist/src/commands/legacy/uninstall.old.d.ts +15 -0
- package/dist/src/commands/legacy/uninstall.old.d.ts.map +1 -0
- package/dist/src/commands/legacy/uninstall.old.js +120 -0
- package/dist/src/commands/legacy/uninstall.old.js.map +1 -0
- package/dist/src/commands/legacy/vetra.old.d.ts +23 -0
- package/dist/src/commands/legacy/vetra.old.d.ts.map +1 -0
- package/dist/src/commands/legacy/vetra.old.js +35 -0
- package/dist/src/commands/legacy/vetra.old.js.map +1 -0
- package/dist/src/commands/list.d.ts +9 -8
- package/dist/src/commands/list.d.ts.map +1 -1
- package/dist/src/commands/list.js +38 -32
- package/dist/src/commands/list.js.map +1 -1
- package/dist/src/commands/list.old.d.ts +9 -0
- package/dist/src/commands/list.old.d.ts.map +1 -0
- package/dist/src/commands/list.old.js +36 -0
- package/dist/src/commands/list.old.js.map +1 -0
- package/dist/src/commands/login.d.ts +19 -11
- package/dist/src/commands/login.d.ts.map +1 -1
- package/dist/src/commands/login.js +95 -94
- package/dist/src/commands/login.js.map +1 -1
- package/dist/src/commands/migrate.d.ts +11 -9
- package/dist/src/commands/migrate.d.ts.map +1 -1
- package/dist/src/commands/migrate.js +15 -11
- package/dist/src/commands/migrate.js.map +1 -1
- package/dist/src/commands/ph-cli-commands.d.ts +410 -0
- package/dist/src/commands/ph-cli-commands.d.ts.map +1 -0
- package/dist/src/commands/ph-cli-commands.js +25 -0
- package/dist/src/commands/ph-cli-commands.js.map +1 -0
- package/dist/src/commands/ph-cli-help.d.ts +396 -0
- package/dist/src/commands/ph-cli-help.d.ts.map +1 -0
- package/dist/src/commands/ph-cli-help.js +12 -0
- package/dist/src/commands/ph-cli-help.js.map +1 -0
- package/dist/src/commands/ph-cli.d.ts +490 -0
- package/dist/src/commands/ph-cli.d.ts.map +1 -0
- package/dist/src/commands/ph-cli.js +12 -0
- package/dist/src/commands/ph-cli.js.map +1 -0
- package/dist/src/commands/register-commands.d.ts +1 -1
- package/dist/src/commands/register-commands.d.ts.map +1 -1
- package/dist/src/commands/register-commands.js +13 -13
- package/dist/src/commands/register-commands.js.map +1 -1
- package/dist/src/commands/service.d.ts +11 -4
- package/dist/src/commands/service.d.ts.map +1 -1
- package/dist/src/commands/service.js +28 -16
- package/dist/src/commands/service.js.map +1 -1
- package/dist/src/commands/switchboard.d.ts +45 -8
- package/dist/src/commands/switchboard.d.ts.map +1 -1
- package/dist/src/commands/switchboard.js +34 -69
- package/dist/src/commands/switchboard.js.map +1 -1
- package/dist/src/commands/uninstall.d.ts +21 -14
- package/dist/src/commands/uninstall.d.ts.map +1 -1
- package/dist/src/commands/uninstall.js +68 -117
- package/dist/src/commands/uninstall.js.map +1 -1
- package/dist/src/commands/vetra.d.ts +63 -10
- package/dist/src/commands/vetra.d.ts.map +1 -1
- package/dist/src/commands/vetra.js +23 -34
- package/dist/src/commands/vetra.js.map +1 -1
- package/dist/src/get-version.d.ts +2 -0
- package/dist/src/get-version.d.ts.map +1 -0
- package/dist/src/get-version.js +7 -0
- package/dist/src/get-version.js.map +1 -0
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +0 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/services/auth.d.ts +1 -1
- package/dist/src/services/auth.d.ts.map +1 -1
- package/dist/src/services/auth.js.map +1 -1
- package/dist/src/services/connect.d.ts +4 -1
- package/dist/src/services/connect.d.ts.map +1 -1
- package/dist/src/services/connect.js +89 -1
- package/dist/src/services/connect.js.map +1 -1
- package/dist/src/services/generate.d.ts +2 -29
- package/dist/src/services/generate.d.ts.map +1 -1
- package/dist/src/services/generate.js +49 -75
- package/dist/src/services/generate.js.map +1 -1
- package/dist/src/services/inspect.d.ts +2 -4
- package/dist/src/services/inspect.d.ts.map +1 -1
- package/dist/src/services/inspect.js +8 -7
- package/dist/src/services/inspect.js.map +1 -1
- package/dist/src/services/legacy/connect.old.d.ts +2 -0
- package/dist/src/services/legacy/connect.old.d.ts.map +1 -0
- package/dist/src/services/legacy/connect.old.js +2 -0
- package/dist/src/services/legacy/connect.old.js.map +1 -0
- package/dist/src/services/legacy/generate.old.d.ts +30 -0
- package/dist/src/services/legacy/generate.old.d.ts.map +1 -0
- package/dist/src/services/legacy/generate.old.js +107 -0
- package/dist/src/services/legacy/generate.old.js.map +1 -0
- package/dist/src/services/legacy/inspect.old.d.ts +5 -0
- package/dist/src/services/legacy/inspect.old.d.ts.map +1 -0
- package/dist/src/services/legacy/inspect.old.js +49 -0
- package/dist/src/services/legacy/inspect.old.js.map +1 -0
- package/dist/src/services/legacy/migrate.old.d.ts +3 -0
- package/dist/src/services/legacy/migrate.old.d.ts.map +1 -0
- package/dist/src/services/legacy/migrate.old.js +289 -0
- package/dist/src/services/legacy/migrate.old.js.map +1 -0
- package/dist/src/services/legacy/switchboard.old.d.ts +54 -0
- package/dist/src/services/legacy/switchboard.old.d.ts.map +1 -0
- package/dist/src/services/legacy/switchboard.old.js +79 -0
- package/dist/src/services/legacy/switchboard.old.js.map +1 -0
- package/dist/src/services/legacy/vetra.old.d.ts +15 -0
- package/dist/src/services/legacy/vetra.old.d.ts.map +1 -0
- package/dist/src/services/legacy/vetra.old.js +176 -0
- package/dist/src/services/legacy/vetra.old.js.map +1 -0
- package/dist/src/services/migrate.d.ts +2 -6
- package/dist/src/services/migrate.d.ts.map +1 -1
- package/dist/src/services/migrate.js +52 -14
- package/dist/src/services/migrate.js.map +1 -1
- package/dist/src/services/switchboard.d.ts +2 -34
- package/dist/src/services/switchboard.d.ts.map +1 -1
- package/dist/src/services/switchboard.js +4 -6
- package/dist/src/services/switchboard.js.map +1 -1
- package/dist/src/services/vetra.d.ts +2 -14
- package/dist/src/services/vetra.d.ts.map +1 -1
- package/dist/src/services/vetra.js +58 -65
- package/dist/src/services/vetra.js.map +1 -1
- package/dist/src/types.d.ts +29 -0
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/constants.d.ts +2 -0
- package/dist/src/utils/constants.d.ts.map +1 -0
- package/dist/src/utils/constants.js +2 -0
- package/dist/src/utils/constants.js.map +1 -0
- package/dist/src/utils/file-system.d.ts +2 -0
- package/dist/src/utils/file-system.d.ts.map +1 -0
- package/dist/src/utils/file-system.js +15 -0
- package/dist/src/utils/file-system.js.map +1 -0
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/utils/index.js +3 -0
- package/dist/src/utils/index.js.map +1 -0
- package/dist/src/utils/projects.d.ts +19 -0
- package/dist/src/utils/projects.d.ts.map +1 -0
- package/dist/src/utils/projects.js +93 -0
- package/dist/src/utils/projects.js.map +1 -0
- package/dist/src/utils.d.ts +0 -4
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/dist/test/utils.test.js +2 -1
- package/dist/test/utils.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +30 -16
- package/dist/scripts/generate-commands-md.d.ts +0 -2
- package/dist/scripts/generate-commands-md.d.ts.map +0 -1
- package/dist/scripts/generate-commands-md.js.map +0 -1
- package/dist/src/commands/help.d.ts.map +0 -1
- package/dist/src/commands/help.js.map +0 -1
|
@@ -1,9 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
export declare const switchboard: Partial<import("cmd-ts/dist/cjs/argparser.js").Register> & {
|
|
2
|
+
parse(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
3
|
+
packages: string | undefined;
|
|
4
|
+
port: number;
|
|
5
|
+
basePath: string | undefined;
|
|
6
|
+
keypairPath: string | undefined;
|
|
7
|
+
vetraDriveId: string;
|
|
8
|
+
dbPath: string | undefined;
|
|
9
|
+
useIdentity: boolean | undefined;
|
|
10
|
+
requireIdentity: boolean | undefined;
|
|
11
|
+
migrate: boolean | undefined;
|
|
12
|
+
migrateStatus: boolean | undefined;
|
|
13
|
+
mcp: boolean;
|
|
14
|
+
useVetraDrive: boolean;
|
|
15
|
+
debug: boolean | undefined;
|
|
16
|
+
https: boolean | undefined;
|
|
17
|
+
httpsKeyFile: string | undefined;
|
|
18
|
+
httpsCertFile: string | undefined;
|
|
19
|
+
dev: boolean | undefined;
|
|
20
|
+
remoteDrives: string[];
|
|
21
|
+
disableLocalPackages: boolean;
|
|
22
|
+
}>>;
|
|
23
|
+
} & import("cmd-ts/dist/cjs/helpdoc.js").PrintHelp & import("cmd-ts/dist/cjs/helpdoc.js").ProvidesHelp & import("cmd-ts/dist/cjs/helpdoc.js").Named & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned> & import("cmd-ts/dist/cjs/argparser.js").Register & import("cmd-ts/dist/cjs/runner.js").Handling<{
|
|
24
|
+
packages: string | undefined;
|
|
25
|
+
port: number;
|
|
26
|
+
basePath: string | undefined;
|
|
27
|
+
keypairPath: string | undefined;
|
|
28
|
+
vetraDriveId: string;
|
|
29
|
+
dbPath: string | undefined;
|
|
30
|
+
useIdentity: boolean | undefined;
|
|
31
|
+
requireIdentity: boolean | undefined;
|
|
32
|
+
migrate: boolean | undefined;
|
|
33
|
+
migrateStatus: boolean | undefined;
|
|
34
|
+
mcp: boolean;
|
|
35
|
+
useVetraDrive: boolean;
|
|
36
|
+
debug: boolean | undefined;
|
|
37
|
+
https: boolean | undefined;
|
|
38
|
+
httpsKeyFile: string | undefined;
|
|
39
|
+
httpsCertFile: string | undefined;
|
|
40
|
+
dev: boolean | undefined;
|
|
41
|
+
remoteDrives: string[];
|
|
42
|
+
disableLocalPackages: boolean;
|
|
43
|
+
}, Promise<void>> & {
|
|
44
|
+
run(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<Promise<void>>>;
|
|
45
|
+
} & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned & import("cmd-ts/dist/cjs/helpdoc.js").Descriptive & import("cmd-ts/dist/cjs/helpdoc.js").Aliased>;
|
|
9
46
|
//# sourceMappingURL=switchboard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switchboard.d.ts","sourceRoot":"","sources":["../../../src/commands/switchboard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"switchboard.d.ts","sourceRoot":"","sources":["../../../src/commands/switchboard.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6JAuCtB,CAAC"}
|
|
@@ -1,78 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
.alias("reactor")
|
|
30
|
-
.description("Starts local switchboard")
|
|
31
|
-
.option("--port <PORT>", "port to host the api", "4001")
|
|
32
|
-
.option("--config-file <configFile>", "Path to the powerhouse.config.js file", "./powerhouse.config.json")
|
|
33
|
-
.option("--generate", "generate code when document model is updated")
|
|
34
|
-
.option("--dev", "enable development mode to load local packages")
|
|
35
|
-
.option("--db-path <DB_PATH>", "path to the database")
|
|
36
|
-
.option("--https-key-file <HTTPS_KEY_FILE>", "path to the ssl key file")
|
|
37
|
-
.option("--https-cert-file <HTTPS_CERT_FILE>", "path to the ssl cert file")
|
|
38
|
-
.option("--packages <packages...>", "list of packages to be loaded, if defined then packages on config file are ignored")
|
|
39
|
-
.option("--base-path <basePath>", "base path for the API endpoints (sets the BASE_PATH environment variable)")
|
|
40
|
-
.option("--mcp", "enable Mcp route at /mcp. Default: true")
|
|
41
|
-
.option("--use-identity", "enable identity using keypair from ph login (uses ~/.ph/keypair.json)")
|
|
42
|
-
.option("--keypair-path <path>", "path to custom keypair file for identity")
|
|
43
|
-
.option("--require-identity", "require existing keypair, fail if not found (implies --use-identity)")
|
|
44
|
-
.option("--migrate", "run database migrations and exit")
|
|
45
|
-
.option("--migrate-status", "show migration status and exit")
|
|
46
|
-
.action(async (...args) => {
|
|
47
|
-
const options = args[0];
|
|
48
|
-
if (options.migrate || options.migrateStatus) {
|
|
49
|
-
const { runSwitchboardMigrations } = await import("../services/switchboard-migrate.js");
|
|
1
|
+
import { switchboardArgs } from "@powerhousedao/common/clis";
|
|
2
|
+
import { command } from "cmd-ts";
|
|
3
|
+
import { runSwitchboardMigrations } from "../services/switchboard-migrate.js";
|
|
4
|
+
import { startSwitchboard } from "../services/switchboard.js";
|
|
5
|
+
export const switchboard = command({
|
|
6
|
+
name: "switchboard",
|
|
7
|
+
aliases: ["reactor"],
|
|
8
|
+
description: `
|
|
9
|
+
The switchboard command starts a local Switchboard instance, which acts as the document
|
|
10
|
+
processing engine for Powerhouse projects. It provides the infrastructure for document
|
|
11
|
+
models, processors, and real-time updates.
|
|
12
|
+
|
|
13
|
+
This command:
|
|
14
|
+
1. Starts a local switchboard server
|
|
15
|
+
2. Loads document models and processors
|
|
16
|
+
3. Provides an API for document operations
|
|
17
|
+
4. Enables real-time document processing
|
|
18
|
+
5. Can authenticate with remote services using your identity from 'ph login'`,
|
|
19
|
+
args: switchboardArgs,
|
|
20
|
+
handler: async (args) => {
|
|
21
|
+
if (args.debug) {
|
|
22
|
+
console.log(args);
|
|
23
|
+
}
|
|
24
|
+
const { basePath, dbPath, migrate, migrateStatus } = args;
|
|
25
|
+
if (basePath) {
|
|
26
|
+
process.env.BASE_PATH = basePath;
|
|
27
|
+
}
|
|
28
|
+
if (migrate || migrateStatus) {
|
|
50
29
|
await runSwitchboardMigrations({
|
|
51
|
-
dbPath
|
|
52
|
-
statusOnly:
|
|
30
|
+
dbPath,
|
|
31
|
+
statusOnly: migrateStatus,
|
|
53
32
|
});
|
|
54
|
-
|
|
33
|
+
process.exit(0);
|
|
55
34
|
}
|
|
56
|
-
const { defaultDriveUrl, connectCrypto } = await
|
|
35
|
+
const { defaultDriveUrl, connectCrypto } = await startSwitchboard(args);
|
|
57
36
|
console.log(" ➜ Switchboard:", defaultDriveUrl);
|
|
58
37
|
if (connectCrypto) {
|
|
59
38
|
const did = await connectCrypto.did();
|
|
60
39
|
console.log(" ➜ Identity:", did);
|
|
61
40
|
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
if (process.argv.at(2) === "spawn") {
|
|
66
|
-
const optionsArg = process.argv.at(3);
|
|
67
|
-
const options = optionsArg
|
|
68
|
-
? JSON.parse(optionsArg)
|
|
69
|
-
: {};
|
|
70
|
-
startLocalSwitchboard(options)
|
|
71
|
-
.then((reactor) => {
|
|
72
|
-
process.send?.(`driveUrl:${reactor.defaultDriveUrl}`);
|
|
73
|
-
})
|
|
74
|
-
.catch((e) => {
|
|
75
|
-
throw e;
|
|
76
|
-
});
|
|
77
|
-
}
|
|
41
|
+
},
|
|
42
|
+
});
|
|
78
43
|
//# sourceMappingURL=switchboard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switchboard.js","sourceRoot":"","sources":["../../../src/commands/switchboard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"switchboard.js","sourceRoot":"","sources":["../../../src/commands/switchboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;IACjC,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,WAAW,EAAE;;;;;;;;;;6EAU8D;IAC3E,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACtB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;QACD,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC;QAC1D,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,CAAC,GAAG,CAAC,SAAS,GAAG,QAAQ,CAAC;QACnC,CAAC;QAED,IAAI,OAAO,IAAI,aAAa,EAAE,CAAC;YAC7B,MAAM,wBAAwB,CAAC;gBAC7B,MAAM;gBACN,UAAU,EAAE,aAAa;aAC1B,CAAC,CAAC;YACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,MAAM,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACxE,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,eAAe,CAAC,CAAC;QACnD,IAAI,aAAa,EAAE,CAAC;YAClB,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC,GAAG,EAAE,CAAC;YACtC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
export declare const uninstall: Partial<import("cmd-ts/dist/cjs/argparser.js").Register> & {
|
|
2
|
+
parse(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
3
|
+
debug: boolean | undefined;
|
|
4
|
+
packageManager: import("package-manager-detector").Agent | undefined;
|
|
5
|
+
npm: boolean | undefined;
|
|
6
|
+
pnpm: boolean | undefined;
|
|
7
|
+
yarn: boolean | undefined;
|
|
8
|
+
bun: boolean | undefined;
|
|
9
|
+
dependencies: string[];
|
|
10
|
+
}>>;
|
|
11
|
+
} & import("cmd-ts/dist/cjs/helpdoc.js").PrintHelp & import("cmd-ts/dist/cjs/helpdoc.js").ProvidesHelp & import("cmd-ts/dist/cjs/helpdoc.js").Named & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned> & import("cmd-ts/dist/cjs/argparser.js").Register & import("cmd-ts/dist/cjs/runner.js").Handling<{
|
|
12
|
+
debug: boolean | undefined;
|
|
13
|
+
packageManager: import("package-manager-detector").Agent | undefined;
|
|
14
|
+
npm: boolean | undefined;
|
|
15
|
+
pnpm: boolean | undefined;
|
|
16
|
+
yarn: boolean | undefined;
|
|
17
|
+
bun: boolean | undefined;
|
|
18
|
+
dependencies: string[];
|
|
19
|
+
}, Promise<void>> & {
|
|
20
|
+
run(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<Promise<void>>>;
|
|
21
|
+
} & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned & import("cmd-ts/dist/cjs/helpdoc.js").Descriptive & import("cmd-ts/dist/cjs/helpdoc.js").Aliased>;
|
|
15
22
|
//# sourceMappingURL=uninstall.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/commands/uninstall.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/commands/uninstall.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;6JA4EpB,CAAC"}
|
|
@@ -1,120 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (!dependencies || dependencies.length === 0) {
|
|
25
|
-
throw new Error("❌ Dependency name is required");
|
|
26
|
-
}
|
|
27
|
-
// Parse package names to extract version/tag
|
|
28
|
-
const parsedDependencies = dependencies.map((dep) => {
|
|
29
|
-
// Handle scoped packages (@org/package[@version])
|
|
30
|
-
if (dep.startsWith("@")) {
|
|
31
|
-
const matches = /^(@[^/]+\/[^@]+)(?:@(.+))?$/.exec(dep);
|
|
32
|
-
if (!matches) {
|
|
33
|
-
throw new Error(`Invalid scoped package name format: ${dep}`);
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
name: matches[1],
|
|
37
|
-
version: matches[2] || "latest",
|
|
38
|
-
full: dep,
|
|
39
|
-
};
|
|
1
|
+
import { uninstallArgs } from "@powerhousedao/common/clis";
|
|
2
|
+
import { execSync } from "child_process";
|
|
3
|
+
import { command } from "cmd-ts";
|
|
4
|
+
import { AGENTS } from "package-manager-detector";
|
|
5
|
+
import { removeStylesImports, updateConfigFile } from "../utils.js";
|
|
6
|
+
import { getPowerhouseProjectInfo, getPowerhouseProjectUninstallCommand, makeDependenciesWithVersions, } from "../utils/projects.js";
|
|
7
|
+
export const uninstall = command({
|
|
8
|
+
name: "uninstall",
|
|
9
|
+
aliases: ["remove"],
|
|
10
|
+
description: `
|
|
11
|
+
The uninstall command removes Powerhouse dependencies from your project. It handles the
|
|
12
|
+
removal of packages, updates configuration files, and ensures proper cleanup.
|
|
13
|
+
|
|
14
|
+
This command:
|
|
15
|
+
1. Uninstalls specified Powerhouse dependencies using your package manager
|
|
16
|
+
2. Updates powerhouse.config.json to remove the dependencies
|
|
17
|
+
3. Supports various uninstallation options and configurations
|
|
18
|
+
4. Works with ${AGENTS.join(", ")} package managers
|
|
19
|
+
`,
|
|
20
|
+
args: uninstallArgs,
|
|
21
|
+
handler: async (args) => {
|
|
22
|
+
if (args.debug) {
|
|
23
|
+
console.log(args);
|
|
40
24
|
}
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
if (
|
|
44
|
-
|
|
25
|
+
const { projectPath, localProjectPath, globalProjectPath, packageManager, isGlobal, } = await getPowerhouseProjectInfo(args);
|
|
26
|
+
const dependenciesWithVersions = await makeDependenciesWithVersions(args.dependencies);
|
|
27
|
+
if (args.debug) {
|
|
28
|
+
console.log(">>> parsedDependencies", dependenciesWithVersions);
|
|
45
29
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
try {
|
|
89
|
-
console.log("⚙️ Updating powerhouse config file...");
|
|
90
|
-
updateConfigFile(parsedDependencies, projectInfo.path, "uninstall");
|
|
91
|
-
console.log("Config file updated successfully 🎉");
|
|
92
|
-
}
|
|
93
|
-
catch (error) {
|
|
94
|
-
console.error("❌ Failed to update config file");
|
|
95
|
-
throw error;
|
|
96
|
-
}
|
|
97
|
-
try {
|
|
98
|
-
console.log("⚙️ Updating styles.css file...");
|
|
99
|
-
removeStylesImports(parsedDependencies, projectInfo.path);
|
|
100
|
-
console.log("Styles file updated successfully 🎉");
|
|
101
|
-
}
|
|
102
|
-
catch (error) {
|
|
103
|
-
console.error("❌ Failed to update styles file");
|
|
104
|
-
throw error;
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
|
-
export function uninstallCommand(program) {
|
|
108
|
-
const command = program
|
|
109
|
-
.command("uninstall")
|
|
110
|
-
.alias("remove")
|
|
111
|
-
.description("Uninstall a powerhouse dependency")
|
|
112
|
-
.argument("[dependencies...]", "Names of the dependencies to remove")
|
|
113
|
-
.option("-g, --global", "Remove the dependency globally")
|
|
114
|
-
.option("--debug", "Show additional logs")
|
|
115
|
-
.option("-w, --workspace", "Uninstall the dependency in the workspace (use this option for monorepos)")
|
|
116
|
-
.option("--package-manager <packageManager>", "force package manager to use")
|
|
117
|
-
.action(uninstall);
|
|
118
|
-
setCustomHelp(command, uninstallHelp);
|
|
119
|
-
}
|
|
30
|
+
if (args.debug) {
|
|
31
|
+
console.log("\n>>> projectInfo", {
|
|
32
|
+
localProjectPath,
|
|
33
|
+
globalProjectPath,
|
|
34
|
+
packageManager,
|
|
35
|
+
isGlobal,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
console.log("Uninstalling dependencies 📦 ...");
|
|
40
|
+
const uninstallCommand = await getPowerhouseProjectUninstallCommand(packageManager);
|
|
41
|
+
execSync(uninstallCommand, {
|
|
42
|
+
stdio: "inherit",
|
|
43
|
+
cwd: projectPath,
|
|
44
|
+
});
|
|
45
|
+
console.log("Dependency uninstalled successfully 🎉");
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
console.error("❌ Failed to uninstall dependencies");
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
try {
|
|
52
|
+
console.log("⚙️ Updating powerhouse config file...");
|
|
53
|
+
updateConfigFile(dependenciesWithVersions, projectPath, "uninstall");
|
|
54
|
+
console.log("Config file updated successfully 🎉");
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
console.error("❌ Failed to update config file");
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
console.log("⚙️ Updating styles.css file...");
|
|
62
|
+
removeStylesImports(dependenciesWithVersions, projectPath);
|
|
63
|
+
console.log("Styles file updated successfully 🎉");
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
console.error("❌ Failed to update styles file");
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
});
|
|
120
71
|
//# sourceMappingURL=uninstall.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../src/commands/uninstall.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../src/commands/uninstall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EACL,wBAAwB,EACxB,oCAAoC,EACpC,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC;IAC/B,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,CAAC,QAAQ,CAAC;IACnB,WAAW,EAAE;;;;;;;;gBAQC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;CAChC;IACC,IAAI,EAAE,aAAa;IACnB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACtB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;QAED,MAAM,EACJ,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,QAAQ,GACT,GAAG,MAAM,wBAAwB,CAAC,IAAI,CAAC,CAAC;QAEzC,MAAM,wBAAwB,GAAG,MAAM,4BAA4B,CACjE,IAAI,CAAC,YAAY,CAClB,CAAC;QAEF,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,wBAAwB,CAAC,CAAC;QAClE,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE;gBAC/B,gBAAgB;gBAChB,iBAAiB;gBACjB,cAAc;gBACd,QAAQ;aACT,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;YAChD,MAAM,gBAAgB,GACpB,MAAM,oCAAoC,CAAC,cAAc,CAAC,CAAC;YAC7D,QAAQ,CAAC,gBAAgB,EAAE;gBACzB,KAAK,EAAE,SAAS;gBAChB,GAAG,EAAE,WAAW;aACjB,CAAC,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;QACxD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC;YACpD,MAAM,KAAK,CAAC;QACd,CAAC;QAED,IAAI,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;YACrD,gBAAgB,CAAC,wBAAwB,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;YACrE,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACrD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;YAChD,MAAM,KAAK,CAAC;QACd,CAAC;QAED,IAAI,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;YAC9C,mBAAmB,CAAC,wBAAwB,EAAE,WAAW,CAAC,CAAC;YAC3D,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACrD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;YAChD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1,11 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
export declare const vetra: Partial<import("cmd-ts/dist/cjs/argparser.js").Register> & {
|
|
2
|
+
parse(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<{
|
|
3
|
+
debug: boolean | undefined;
|
|
4
|
+
https: boolean | undefined;
|
|
5
|
+
httpsKeyFile: string | undefined;
|
|
6
|
+
httpsCertFile: string | undefined;
|
|
7
|
+
dev: boolean | undefined;
|
|
8
|
+
remoteDrives: string[];
|
|
9
|
+
disableLocalPackages: boolean;
|
|
10
|
+
host: boolean | undefined;
|
|
11
|
+
open: boolean | undefined;
|
|
12
|
+
cors: boolean | undefined;
|
|
13
|
+
strictPort: boolean | undefined;
|
|
14
|
+
printUrls: boolean;
|
|
15
|
+
bindCLIShortcuts: boolean;
|
|
16
|
+
watchTimeout: number;
|
|
17
|
+
connectBasePath: string;
|
|
18
|
+
logLevel: "debug" | "error" | "info" | "warn";
|
|
19
|
+
packages: string | undefined;
|
|
20
|
+
localPackage: string | undefined;
|
|
21
|
+
defaultDrivesUrl: string | undefined;
|
|
22
|
+
drivesPreserveStrategy: "preserve-all" | "preserve-by-url-and-detach";
|
|
23
|
+
force: boolean | undefined;
|
|
24
|
+
switchboardPort: number;
|
|
25
|
+
connectPort: number;
|
|
26
|
+
remoteDrive: string | undefined;
|
|
27
|
+
watch: boolean;
|
|
28
|
+
verbose: boolean;
|
|
29
|
+
disableConnect: boolean;
|
|
30
|
+
interactive: boolean;
|
|
31
|
+
}>>;
|
|
32
|
+
} & import("cmd-ts/dist/cjs/helpdoc.js").PrintHelp & import("cmd-ts/dist/cjs/helpdoc.js").ProvidesHelp & import("cmd-ts/dist/cjs/helpdoc.js").Named & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned> & import("cmd-ts/dist/cjs/argparser.js").Register & import("cmd-ts/dist/cjs/runner.js").Handling<{
|
|
33
|
+
debug: boolean | undefined;
|
|
34
|
+
https: boolean | undefined;
|
|
35
|
+
httpsKeyFile: string | undefined;
|
|
36
|
+
httpsCertFile: string | undefined;
|
|
37
|
+
dev: boolean | undefined;
|
|
38
|
+
remoteDrives: string[];
|
|
39
|
+
disableLocalPackages: boolean;
|
|
40
|
+
host: boolean | undefined;
|
|
41
|
+
open: boolean | undefined;
|
|
42
|
+
cors: boolean | undefined;
|
|
43
|
+
strictPort: boolean | undefined;
|
|
44
|
+
printUrls: boolean;
|
|
45
|
+
bindCLIShortcuts: boolean;
|
|
46
|
+
watchTimeout: number;
|
|
47
|
+
connectBasePath: string;
|
|
48
|
+
logLevel: "debug" | "error" | "info" | "warn";
|
|
49
|
+
packages: string | undefined;
|
|
50
|
+
localPackage: string | undefined;
|
|
51
|
+
defaultDrivesUrl: string | undefined;
|
|
52
|
+
drivesPreserveStrategy: "preserve-all" | "preserve-by-url-and-detach";
|
|
53
|
+
force: boolean | undefined;
|
|
54
|
+
switchboardPort: number;
|
|
55
|
+
connectPort: number;
|
|
56
|
+
remoteDrive: string | undefined;
|
|
57
|
+
watch: boolean;
|
|
58
|
+
verbose: boolean;
|
|
59
|
+
disableConnect: boolean;
|
|
60
|
+
interactive: boolean;
|
|
61
|
+
}, Promise<void>> & {
|
|
62
|
+
run(context: import("cmd-ts/dist/cjs/argparser.js").ParseContext): Promise<import("cmd-ts/dist/cjs/argparser.js").ParsingResult<Promise<void>>>;
|
|
63
|
+
} & Partial<import("cmd-ts/dist/cjs/helpdoc.js").Versioned & import("cmd-ts/dist/cjs/helpdoc.js").Descriptive & import("cmd-ts/dist/cjs/helpdoc.js").Aliased>;
|
|
11
64
|
//# sourceMappingURL=vetra.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vetra.d.ts","sourceRoot":"","sources":["../../../src/commands/vetra.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vetra.d.ts","sourceRoot":"","sources":["../../../src/commands/vetra.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6JAmBhB,CAAC"}
|
|
@@ -1,35 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
.option("--https-key-file <HTTPS_KEY_FILE>", "path to the ssl key file")
|
|
25
|
-
.option("--https-cert-file <HTTPS_CERT_FILE>", "path to the ssl cert file")
|
|
26
|
-
.option("--config-file <configFile>", "Path to the powerhouse.config.js file")
|
|
27
|
-
.option("-w, --watch", "Enable dynamic loading for document-models and editors in connect-studio and switchboard")
|
|
28
|
-
.option("--remote-drive <url>", "URL of remote drive to connect to (skips switchboard initialization)")
|
|
29
|
-
.option("--disable-connect", "Skip Connect initialization (only start switchboard and reactor)")
|
|
30
|
-
.option("--interactive", "Enable interactive mode for code generation (requires user confirmation before generating code)");
|
|
31
|
-
// Use the setCustomHelp utility to apply custom help formatting
|
|
32
|
-
setCustomHelp(cmd, vetraHelp);
|
|
33
|
-
cmd.action(vetra);
|
|
34
|
-
}
|
|
1
|
+
import { vetraArgs } from "@powerhousedao/common/clis";
|
|
2
|
+
import { command } from "cmd-ts";
|
|
3
|
+
import { startVetra } from "../services/vetra.js";
|
|
4
|
+
export const vetra = command({
|
|
5
|
+
name: "vetra",
|
|
6
|
+
description: `
|
|
7
|
+
The vetra command sets up a Vetra development environment for working with Vetra projects.
|
|
8
|
+
It starts a Vetra Switchboard and optionally Connect Studio, enabling document collaboration
|
|
9
|
+
and real-time processing with a "Vetra" drive or connection to remote drives.
|
|
10
|
+
|
|
11
|
+
This command:
|
|
12
|
+
1. Starts a Vetra Switchboard with a "Vetra" drive for document storage
|
|
13
|
+
2. Optionally connects to remote drives instead of creating a local drive
|
|
14
|
+
3. Starts Connect Studio pointing to the Switchboard for user interaction (unless disabled)
|
|
15
|
+
4. Enables real-time updates, collaboration, and code generation`,
|
|
16
|
+
args: vetraArgs,
|
|
17
|
+
handler: async (args) => {
|
|
18
|
+
if (args.debug) {
|
|
19
|
+
console.log(args);
|
|
20
|
+
}
|
|
21
|
+
await startVetra(args);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
35
24
|
//# sourceMappingURL=vetra.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vetra.js","sourceRoot":"","sources":["../../../src/commands/vetra.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vetra.js","sourceRoot":"","sources":["../../../src/commands/vetra.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,MAAM,CAAC,MAAM,KAAK,GAAG,OAAO,CAAC;IAC3B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE;;;;;;;;;iEASkD;IAC/D,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACtB,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;QACD,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-version.d.ts","sourceRoot":"","sources":["../../src/get-version.ts"],"names":[],"mappings":"AAAA,wBAAsB,UAAU,oBAK/B"}
|