@powerhousedao/ph-cli 0.33.2-dev.0 → 0.34.1-dev.0
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/package.json +51 -0
- package/dist/src/cli.d.ts +3 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +10 -0
- package/dist/src/commands/connect.d.ts +6 -0
- package/dist/src/commands/connect.d.ts.map +1 -0
- package/dist/src/commands/connect.js +44 -0
- package/dist/src/commands/dev.d.ts +14 -0
- package/dist/src/commands/dev.d.ts.map +1 -0
- package/dist/src/commands/dev.js +88 -0
- package/dist/src/commands/generate.d.ts +21 -0
- package/dist/src/commands/generate.d.ts.map +1 -0
- package/dist/src/commands/generate.js +74 -0
- package/dist/src/commands/help.d.ts +3 -0
- package/dist/src/commands/help.d.ts.map +1 -0
- package/dist/src/commands/help.js +8 -0
- package/dist/src/commands/index.d.ts +14 -0
- package/dist/src/commands/index.d.ts.map +1 -0
- package/dist/src/commands/index.js +34 -0
- package/dist/src/commands/inspect.d.ts +10 -0
- package/dist/src/commands/inspect.d.ts.map +1 -0
- package/dist/src/commands/inspect.js +57 -0
- package/dist/src/commands/install.d.ts +15 -0
- package/dist/src/commands/install.d.ts.map +1 -0
- package/dist/src/commands/install.js +80 -0
- package/dist/src/commands/list.d.ts +9 -0
- package/dist/src/commands/list.d.ts.map +1 -0
- package/dist/src/commands/list.js +33 -0
- package/dist/src/commands/service.d.ts +5 -0
- package/dist/src/commands/service.d.ts.map +1 -0
- package/dist/src/commands/service.js +141 -0
- package/dist/src/commands/switchboard.d.ts +34 -0
- package/dist/src/commands/switchboard.d.ts.map +1 -0
- package/dist/src/commands/switchboard.js +82 -0
- package/dist/src/commands/uninstall.d.ts +15 -0
- package/dist/src/commands/uninstall.d.ts.map +1 -0
- package/dist/src/commands/uninstall.js +80 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/types.d.ts +2 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +1 -0
- package/dist/src/utils.d.ts +47 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/src/utils.js +114 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +15 -15
- package/dist/chunk-3LA6D2BV.js +0 -109
- package/dist/chunk-4CHMELTF.js +0 -51
- package/dist/chunk-6VK3FH3G.js +0 -36
- package/dist/chunk-7FTFL36R.js +0 -52
- package/dist/chunk-ACKSBZXF.js +0 -85
- package/dist/chunk-D42NLWCH.js +0 -98
- package/dist/chunk-FEGQ7JEJ.js +0 -97
- package/dist/chunk-FFVIBNX6.js +0 -147
- package/dist/chunk-IFV5NKI4.js +0 -57
- package/dist/chunk-KPMNRIJU.js +0 -10
- package/dist/chunk-RRSG7FV6.js +0 -52
- package/dist/chunk-V725N3UP.js +0 -132
- package/dist/chunk-WUBXHLKE.js +0 -51
- package/dist/chunk-ZZ3KNXW6.js +0 -91
- package/dist/cli.js +0 -22
- package/dist/commands/connect.js +0 -8
- package/dist/commands/dev.js +0 -9
- package/dist/commands/generate.js +0 -8
- package/dist/commands/help.js +0 -6
- package/dist/commands/index.js +0 -68
- package/dist/commands/inspect.js +0 -9
- package/dist/commands/install.js +0 -11
- package/dist/commands/list.js +0 -9
- package/dist/commands/service.js +0 -8
- package/dist/commands/switchboard.js +0 -10
- package/dist/commands/uninstall.js +0 -11
- package/dist/index.js +0 -91
- package/dist/scripts/service-startup.sh +0 -7
- package/dist/scripts/service-unstartup.sh +0 -6
- package/dist/scripts/setup.sh +0 -24
- package/dist/types.js +0 -0
- package/dist/utils.js +0 -28
package/dist/chunk-IFV5NKI4.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getProjectInfo
|
|
3
|
-
} from "./chunk-V725N3UP.js";
|
|
4
|
-
|
|
5
|
-
// src/commands/inspect.ts
|
|
6
|
-
import path from "node:path";
|
|
7
|
-
var inspect = async (packageName, options) => {
|
|
8
|
-
if (options.debug) {
|
|
9
|
-
console.log(">>> command arguments", { options });
|
|
10
|
-
}
|
|
11
|
-
const projectInfo = getProjectInfo(options.debug);
|
|
12
|
-
if (options.debug) {
|
|
13
|
-
console.log("\n>>> projectInfo", projectInfo);
|
|
14
|
-
}
|
|
15
|
-
try {
|
|
16
|
-
const manifest = await import(path.join(packageName, "manifest"));
|
|
17
|
-
console.log(manifest.name);
|
|
18
|
-
if (manifest.documentModels) {
|
|
19
|
-
console.log("\nDocument Models:");
|
|
20
|
-
manifest.documentModels.forEach((model) => {
|
|
21
|
-
console.log(`- ${model.name} (${model.id})`);
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
if (manifest.editors) {
|
|
25
|
-
console.log("\nEditors:");
|
|
26
|
-
manifest.editors.forEach((editor) => {
|
|
27
|
-
console.log(`- ${editor.name} (${editor.id})`);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
if (manifest.processors) {
|
|
31
|
-
console.log("\nProcessors:");
|
|
32
|
-
manifest.processors.forEach((processor) => {
|
|
33
|
-
console.log(`- ${processor.name} (${processor.id})`);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
if (manifest.subgraphs) {
|
|
37
|
-
console.log("\nSubgraphs:");
|
|
38
|
-
manifest.subgraphs.forEach((subgraph) => {
|
|
39
|
-
console.log(`- ${subgraph.name} (${subgraph.id})`);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
} catch (e) {
|
|
43
|
-
if (options.debug) {
|
|
44
|
-
console.error(e);
|
|
45
|
-
} else {
|
|
46
|
-
console.log("No manifest found in the package");
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
function inspectCommand(program) {
|
|
51
|
-
program.command("inspect").alias("is").description("Inspect a package").option("--debug", "Show additional logs").argument("<packageName>", "The name of the package to inspect").action(inspect);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export {
|
|
55
|
-
inspect,
|
|
56
|
-
inspectCommand
|
|
57
|
-
};
|
package/dist/chunk-KPMNRIJU.js
DELETED
package/dist/chunk-RRSG7FV6.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
inspectCommand
|
|
3
|
-
} from "./chunk-IFV5NKI4.js";
|
|
4
|
-
import {
|
|
5
|
-
installCommand
|
|
6
|
-
} from "./chunk-FEGQ7JEJ.js";
|
|
7
|
-
import {
|
|
8
|
-
listCommand
|
|
9
|
-
} from "./chunk-6VK3FH3G.js";
|
|
10
|
-
import {
|
|
11
|
-
serviceCommand
|
|
12
|
-
} from "./chunk-FFVIBNX6.js";
|
|
13
|
-
import {
|
|
14
|
-
uninstallCommand
|
|
15
|
-
} from "./chunk-D42NLWCH.js";
|
|
16
|
-
import {
|
|
17
|
-
connectCommand
|
|
18
|
-
} from "./chunk-WUBXHLKE.js";
|
|
19
|
-
import {
|
|
20
|
-
devCommand
|
|
21
|
-
} from "./chunk-3LA6D2BV.js";
|
|
22
|
-
import {
|
|
23
|
-
reactorCommand
|
|
24
|
-
} from "./chunk-ZZ3KNXW6.js";
|
|
25
|
-
import {
|
|
26
|
-
generateCommand
|
|
27
|
-
} from "./chunk-ACKSBZXF.js";
|
|
28
|
-
import {
|
|
29
|
-
helpCommand
|
|
30
|
-
} from "./chunk-KPMNRIJU.js";
|
|
31
|
-
|
|
32
|
-
// src/commands/index.ts
|
|
33
|
-
var commands = [
|
|
34
|
-
devCommand,
|
|
35
|
-
connectCommand,
|
|
36
|
-
generateCommand,
|
|
37
|
-
reactorCommand,
|
|
38
|
-
helpCommand,
|
|
39
|
-
installCommand,
|
|
40
|
-
uninstallCommand,
|
|
41
|
-
serviceCommand,
|
|
42
|
-
listCommand,
|
|
43
|
-
inspectCommand
|
|
44
|
-
];
|
|
45
|
-
function registerCommands(program) {
|
|
46
|
-
commands.forEach((command) => command(program));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export {
|
|
50
|
-
commands,
|
|
51
|
-
registerCommands
|
|
52
|
-
};
|
package/dist/chunk-V725N3UP.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
// src/utils.ts
|
|
2
|
-
import fs from "node:fs";
|
|
3
|
-
import { homedir } from "node:os";
|
|
4
|
-
import path, { dirname } from "node:path";
|
|
5
|
-
import { getConfig } from "@powerhousedao/config/powerhouse";
|
|
6
|
-
var POWERHOUSE_CONFIG_FILE = "powerhouse.config.json";
|
|
7
|
-
var POWERHOUSE_GLOBAL_DIR = path.join(homedir(), ".ph");
|
|
8
|
-
var SUPPORTED_PACKAGE_MANAGERS = ["npm", "yarn", "pnpm", "bun"];
|
|
9
|
-
var packageManagers = {
|
|
10
|
-
bun: {
|
|
11
|
-
globalPathRegexp: /[\\/].bun[\\/]/,
|
|
12
|
-
installCommand: "bun add {{dependency}}",
|
|
13
|
-
uninstallCommand: "bun remove {{dependency}}",
|
|
14
|
-
workspaceOption: "",
|
|
15
|
-
lockfile: "bun.lock"
|
|
16
|
-
},
|
|
17
|
-
pnpm: {
|
|
18
|
-
globalPathRegexp: /[\\/]pnpm[\\/]/,
|
|
19
|
-
installCommand: "pnpm add {{dependency}}",
|
|
20
|
-
uninstallCommand: "pnpm remove {{dependency}}",
|
|
21
|
-
workspaceOption: "--workspace-root",
|
|
22
|
-
lockfile: "pnpm-lock.yaml"
|
|
23
|
-
},
|
|
24
|
-
yarn: {
|
|
25
|
-
globalPathRegexp: /[\\/]yarn[\\/]/,
|
|
26
|
-
installCommand: "yarn add {{dependency}}",
|
|
27
|
-
uninstallCommand: "yarn remove {{dependency}}",
|
|
28
|
-
workspaceOption: "-W",
|
|
29
|
-
lockfile: "yarn.lock"
|
|
30
|
-
},
|
|
31
|
-
npm: {
|
|
32
|
-
installCommand: "npm install {{dependency}}",
|
|
33
|
-
uninstallCommand: "npm uninstall {{dependency}}",
|
|
34
|
-
workspaceOption: "",
|
|
35
|
-
lockfile: "package-lock.json"
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
function defaultPathValidation() {
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
function isPowerhouseProject(dir) {
|
|
42
|
-
const powerhouseConfigPath = path.join(dir, POWERHOUSE_CONFIG_FILE);
|
|
43
|
-
return fs.existsSync(powerhouseConfigPath);
|
|
44
|
-
}
|
|
45
|
-
function findNodeProjectRoot(dir, pathValidation = defaultPathValidation) {
|
|
46
|
-
const packageJsonPath = path.join(dir, "package.json");
|
|
47
|
-
if (fs.existsSync(packageJsonPath) && pathValidation(dir)) {
|
|
48
|
-
return dir;
|
|
49
|
-
}
|
|
50
|
-
const parentDir = dirname(dir);
|
|
51
|
-
if (parentDir === dir) {
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
return findNodeProjectRoot(parentDir, pathValidation);
|
|
55
|
-
}
|
|
56
|
-
function getProjectInfo(debug) {
|
|
57
|
-
const currentPath = process.cwd();
|
|
58
|
-
if (debug) {
|
|
59
|
-
console.log(">>> currentPath", currentPath);
|
|
60
|
-
}
|
|
61
|
-
const projectPath = findNodeProjectRoot(currentPath, isPowerhouseProject);
|
|
62
|
-
if (!projectPath) {
|
|
63
|
-
return {
|
|
64
|
-
isGlobal: true,
|
|
65
|
-
path: POWERHOUSE_GLOBAL_DIR
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
isGlobal: false,
|
|
70
|
-
path: projectPath
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function getPackageManagerFromLockfile(dir) {
|
|
74
|
-
if (fs.existsSync(path.join(dir, packageManagers.pnpm.lockfile))) {
|
|
75
|
-
return "pnpm";
|
|
76
|
-
} else if (fs.existsSync(path.join(dir, packageManagers.yarn.lockfile))) {
|
|
77
|
-
return "yarn";
|
|
78
|
-
} else if (fs.existsSync(path.join(dir, packageManagers.bun.lockfile))) {
|
|
79
|
-
return "bun";
|
|
80
|
-
}
|
|
81
|
-
return "npm";
|
|
82
|
-
}
|
|
83
|
-
function getPackageManagerFromPath(dir) {
|
|
84
|
-
const lowerCasePath = dir.toLowerCase();
|
|
85
|
-
if (packageManagers.bun.globalPathRegexp.test(lowerCasePath)) {
|
|
86
|
-
return "bun";
|
|
87
|
-
} else if (packageManagers.pnpm.globalPathRegexp.test(lowerCasePath)) {
|
|
88
|
-
return "pnpm";
|
|
89
|
-
} else if (packageManagers.yarn.globalPathRegexp.test(lowerCasePath)) {
|
|
90
|
-
return "yarn";
|
|
91
|
-
}
|
|
92
|
-
return "npm";
|
|
93
|
-
}
|
|
94
|
-
function updateConfigFile(dependencies, projectPath, task = "install") {
|
|
95
|
-
const configPath = path.join(projectPath, POWERHOUSE_CONFIG_FILE);
|
|
96
|
-
const isInstall = task === "install";
|
|
97
|
-
if (!fs.existsSync(configPath)) {
|
|
98
|
-
throw new Error(
|
|
99
|
-
`powerhouse.config.json file not found. projectPath: ${projectPath}`
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
const config = JSON.parse(
|
|
103
|
-
fs.readFileSync(configPath, "utf-8")
|
|
104
|
-
);
|
|
105
|
-
const mappedPackages = dependencies.map(
|
|
106
|
-
(dep) => ({
|
|
107
|
-
packageName: dep
|
|
108
|
-
})
|
|
109
|
-
);
|
|
110
|
-
const updatedConfig = {
|
|
111
|
-
...config,
|
|
112
|
-
packages: isInstall ? [...config.packages || [], ...mappedPackages] : [...config.packages || []].filter(
|
|
113
|
-
(pkg) => !dependencies.includes(pkg.packageName)
|
|
114
|
-
)
|
|
115
|
-
};
|
|
116
|
-
fs.writeFileSync(configPath, JSON.stringify(updatedConfig, null, 2));
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export {
|
|
120
|
-
POWERHOUSE_CONFIG_FILE,
|
|
121
|
-
POWERHOUSE_GLOBAL_DIR,
|
|
122
|
-
SUPPORTED_PACKAGE_MANAGERS,
|
|
123
|
-
packageManagers,
|
|
124
|
-
defaultPathValidation,
|
|
125
|
-
isPowerhouseProject,
|
|
126
|
-
findNodeProjectRoot,
|
|
127
|
-
getProjectInfo,
|
|
128
|
-
getPackageManagerFromLockfile,
|
|
129
|
-
getPackageManagerFromPath,
|
|
130
|
-
updateConfigFile,
|
|
131
|
-
getConfig
|
|
132
|
-
};
|
package/dist/chunk-WUBXHLKE.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// src/commands/connect.ts
|
|
2
|
-
import { getConfig } from "@powerhousedao/config/powerhouse";
|
|
3
|
-
import {
|
|
4
|
-
startConnectStudio
|
|
5
|
-
} from "@powerhousedao/connect";
|
|
6
|
-
|
|
7
|
-
// package.json
|
|
8
|
-
var version = "0.33.2-dev.0";
|
|
9
|
-
|
|
10
|
-
// src/commands/connect.ts
|
|
11
|
-
async function startConnect(connectOptions) {
|
|
12
|
-
const { documentModelsDir, editorsDir } = getConfig();
|
|
13
|
-
const options = { documentModelsDir, editorsDir, ...connectOptions };
|
|
14
|
-
return await startConnectStudio(options);
|
|
15
|
-
}
|
|
16
|
-
function connectCommand(program) {
|
|
17
|
-
program.command("connect").description("Starts Connect Studio").option("-p, --port <port>", "Port to run the server on", "3000").option("-h, --host", "Expose the server to the network").option("--https", "Enable HTTPS").option("--open", "Open the browser").option(
|
|
18
|
-
"--config-file <configFile>",
|
|
19
|
-
"Path to the powerhouse.config.js file"
|
|
20
|
-
).option(
|
|
21
|
-
"-le, --local-editors <localEditors>",
|
|
22
|
-
"Link local document editors path"
|
|
23
|
-
).option(
|
|
24
|
-
"-ld, --local-documents <localDocuments>",
|
|
25
|
-
"Link local documents path"
|
|
26
|
-
).action(async (...args) => {
|
|
27
|
-
const connectOptions = args.at(0) || {};
|
|
28
|
-
const { documentModelsDir, editorsDir, packages, studio } = getConfig();
|
|
29
|
-
await startConnectStudio({
|
|
30
|
-
port: studio?.port?.toString() || void 0,
|
|
31
|
-
packages,
|
|
32
|
-
phCliVersion: typeof version === "string" ? version : void 0,
|
|
33
|
-
localDocuments: documentModelsDir || void 0,
|
|
34
|
-
localEditors: editorsDir || void 0,
|
|
35
|
-
open: studio?.openBrowser,
|
|
36
|
-
...connectOptions
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
if (process.argv.at(2) === "spawn") {
|
|
41
|
-
const optionsArg = process.argv.at(3);
|
|
42
|
-
const options = optionsArg ? JSON.parse(optionsArg) : {};
|
|
43
|
-
startConnect(options).catch((e) => {
|
|
44
|
-
throw e;
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export {
|
|
49
|
-
startConnect,
|
|
50
|
-
connectCommand
|
|
51
|
-
};
|
package/dist/chunk-ZZ3KNXW6.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
// src/commands/switchboard.ts
|
|
2
|
-
import { generateFromFile } from "@powerhousedao/codegen";
|
|
3
|
-
import { getConfig } from "@powerhousedao/config/powerhouse";
|
|
4
|
-
import {
|
|
5
|
-
DefaultStartServerOptions,
|
|
6
|
-
startServer
|
|
7
|
-
} from "@powerhousedao/reactor-local";
|
|
8
|
-
var DefaultSwitchboardOptions = {
|
|
9
|
-
...DefaultStartServerOptions,
|
|
10
|
-
dev: true
|
|
11
|
-
};
|
|
12
|
-
async function startLocalSwitchboard(switchboardOptions) {
|
|
13
|
-
const baseConfig = getConfig(switchboardOptions.configFile);
|
|
14
|
-
const options = {
|
|
15
|
-
...DefaultSwitchboardOptions,
|
|
16
|
-
...switchboardOptions
|
|
17
|
-
};
|
|
18
|
-
const https = switchboardOptions.httpsKeyFile && switchboardOptions.httpsCertFile ? {
|
|
19
|
-
keyPath: switchboardOptions.httpsKeyFile,
|
|
20
|
-
certPath: switchboardOptions.httpsCertFile
|
|
21
|
-
} : void 0;
|
|
22
|
-
const reactor = await startServer({ ...options, https });
|
|
23
|
-
if (options.generate) {
|
|
24
|
-
await addGenerateTransmitter(reactor, baseConfig);
|
|
25
|
-
}
|
|
26
|
-
return reactor;
|
|
27
|
-
}
|
|
28
|
-
async function addGenerateTransmitter(reactor, config) {
|
|
29
|
-
return reactor.addListener(
|
|
30
|
-
"powerhouse",
|
|
31
|
-
{
|
|
32
|
-
onStrands: async function(strands) {
|
|
33
|
-
const documentPaths = /* @__PURE__ */ new Set();
|
|
34
|
-
for (const strand of strands) {
|
|
35
|
-
documentPaths.add(
|
|
36
|
-
reactor.getDocumentPath(strand.driveId, strand.documentId)
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
for (const path of documentPaths) {
|
|
40
|
-
await generateFromFile(path, config);
|
|
41
|
-
}
|
|
42
|
-
return Promise.resolve();
|
|
43
|
-
},
|
|
44
|
-
onDisconnect: () => Promise.resolve()
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
filter: {
|
|
48
|
-
documentType: ["powerhouse/document-model"],
|
|
49
|
-
scope: ["global"],
|
|
50
|
-
branch: ["*"],
|
|
51
|
-
documentId: ["*"]
|
|
52
|
-
},
|
|
53
|
-
block: false,
|
|
54
|
-
listenerId: "reactor-local-document-model-generator",
|
|
55
|
-
label: "reactor-local-document-model-generator"
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
var switchboard = (options) => {
|
|
60
|
-
return startLocalSwitchboard(options);
|
|
61
|
-
};
|
|
62
|
-
function reactorCommand(program) {
|
|
63
|
-
program.command("switchboard").alias("reactor").description("Starts local switchboard").option("--port <PORT>", "port to host the api", "4001").option(
|
|
64
|
-
"--config-file <configFile>",
|
|
65
|
-
"Path to the powerhouse.config.js file",
|
|
66
|
-
"./powerhouse.config.json"
|
|
67
|
-
).option("--generate", "generate code when document model is updated").option("--db-path <DB_PATH>", "path to the database").option("--https-key-file <HTTPS_KEY_FILE>", "path to the ssl key file").option("--https-cert-file <HTTPS_CERT_FILE>", "path to the ssl cert file").option(
|
|
68
|
-
"-w, --watch",
|
|
69
|
-
"if the reactor should watch for local changes to document models and processors"
|
|
70
|
-
).option(
|
|
71
|
-
"--packages <packages...>",
|
|
72
|
-
"list of packages to be loaded, if defined then packages on config file are ignored"
|
|
73
|
-
).action(async (...args) => {
|
|
74
|
-
await switchboard(...args);
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
if (process.argv.at(2) === "spawn") {
|
|
78
|
-
const optionsArg = process.argv.at(3);
|
|
79
|
-
const options = optionsArg ? JSON.parse(optionsArg) : {};
|
|
80
|
-
startLocalSwitchboard(options).then((switchboard2) => {
|
|
81
|
-
process.send?.(`driveUrl:${switchboard2.driveUrl}`);
|
|
82
|
-
}).catch((e) => {
|
|
83
|
-
throw e;
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export {
|
|
88
|
-
DefaultSwitchboardOptions,
|
|
89
|
-
switchboard,
|
|
90
|
-
reactorCommand
|
|
91
|
-
};
|
package/dist/cli.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
registerCommands
|
|
4
|
-
} from "./chunk-RRSG7FV6.js";
|
|
5
|
-
import "./chunk-IFV5NKI4.js";
|
|
6
|
-
import "./chunk-FEGQ7JEJ.js";
|
|
7
|
-
import "./chunk-6VK3FH3G.js";
|
|
8
|
-
import "./chunk-FFVIBNX6.js";
|
|
9
|
-
import "./chunk-D42NLWCH.js";
|
|
10
|
-
import "./chunk-V725N3UP.js";
|
|
11
|
-
import "./chunk-WUBXHLKE.js";
|
|
12
|
-
import "./chunk-3LA6D2BV.js";
|
|
13
|
-
import "./chunk-ZZ3KNXW6.js";
|
|
14
|
-
import "./chunk-ACKSBZXF.js";
|
|
15
|
-
import "./chunk-KPMNRIJU.js";
|
|
16
|
-
|
|
17
|
-
// src/cli.ts
|
|
18
|
-
import { Command } from "commander";
|
|
19
|
-
var program = new Command();
|
|
20
|
-
program.name("ph-cli").description("CLI tool for Powerhouse DAO").version("1.0.0");
|
|
21
|
-
registerCommands(program);
|
|
22
|
-
program.parse(process.argv);
|
package/dist/commands/connect.js
DELETED
package/dist/commands/dev.js
DELETED
package/dist/commands/help.js
DELETED
package/dist/commands/index.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
commands,
|
|
3
|
-
registerCommands
|
|
4
|
-
} from "../chunk-RRSG7FV6.js";
|
|
5
|
-
import "../chunk-IFV5NKI4.js";
|
|
6
|
-
import {
|
|
7
|
-
install,
|
|
8
|
-
installCommand,
|
|
9
|
-
installDependency
|
|
10
|
-
} from "../chunk-FEGQ7JEJ.js";
|
|
11
|
-
import {
|
|
12
|
-
list,
|
|
13
|
-
listCommand
|
|
14
|
-
} from "../chunk-6VK3FH3G.js";
|
|
15
|
-
import {
|
|
16
|
-
manageService,
|
|
17
|
-
serviceCommand
|
|
18
|
-
} from "../chunk-FFVIBNX6.js";
|
|
19
|
-
import {
|
|
20
|
-
uninstall,
|
|
21
|
-
uninstallCommand,
|
|
22
|
-
uninstallDependency
|
|
23
|
-
} from "../chunk-D42NLWCH.js";
|
|
24
|
-
import "../chunk-V725N3UP.js";
|
|
25
|
-
import {
|
|
26
|
-
connectCommand,
|
|
27
|
-
startConnect
|
|
28
|
-
} from "../chunk-WUBXHLKE.js";
|
|
29
|
-
import {
|
|
30
|
-
dev,
|
|
31
|
-
devCommand
|
|
32
|
-
} from "../chunk-3LA6D2BV.js";
|
|
33
|
-
import {
|
|
34
|
-
DefaultSwitchboardOptions,
|
|
35
|
-
reactorCommand,
|
|
36
|
-
switchboard
|
|
37
|
-
} from "../chunk-ZZ3KNXW6.js";
|
|
38
|
-
import {
|
|
39
|
-
generate,
|
|
40
|
-
generateCommand
|
|
41
|
-
} from "../chunk-ACKSBZXF.js";
|
|
42
|
-
import {
|
|
43
|
-
helpCommand
|
|
44
|
-
} from "../chunk-KPMNRIJU.js";
|
|
45
|
-
export {
|
|
46
|
-
DefaultSwitchboardOptions,
|
|
47
|
-
commands,
|
|
48
|
-
connectCommand,
|
|
49
|
-
registerCommands as default,
|
|
50
|
-
dev,
|
|
51
|
-
devCommand,
|
|
52
|
-
generate,
|
|
53
|
-
generateCommand,
|
|
54
|
-
helpCommand,
|
|
55
|
-
install,
|
|
56
|
-
installCommand,
|
|
57
|
-
installDependency,
|
|
58
|
-
list,
|
|
59
|
-
listCommand,
|
|
60
|
-
manageService,
|
|
61
|
-
reactorCommand,
|
|
62
|
-
serviceCommand,
|
|
63
|
-
startConnect,
|
|
64
|
-
switchboard,
|
|
65
|
-
uninstall,
|
|
66
|
-
uninstallCommand,
|
|
67
|
-
uninstallDependency
|
|
68
|
-
};
|
package/dist/commands/inspect.js
DELETED
package/dist/commands/install.js
DELETED
package/dist/commands/list.js
DELETED
package/dist/commands/service.js
DELETED
package/dist/index.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
commands
|
|
3
|
-
} from "./chunk-RRSG7FV6.js";
|
|
4
|
-
import "./chunk-IFV5NKI4.js";
|
|
5
|
-
import {
|
|
6
|
-
install,
|
|
7
|
-
installCommand,
|
|
8
|
-
installDependency
|
|
9
|
-
} from "./chunk-FEGQ7JEJ.js";
|
|
10
|
-
import {
|
|
11
|
-
list,
|
|
12
|
-
listCommand
|
|
13
|
-
} from "./chunk-6VK3FH3G.js";
|
|
14
|
-
import {
|
|
15
|
-
manageService,
|
|
16
|
-
serviceCommand
|
|
17
|
-
} from "./chunk-FFVIBNX6.js";
|
|
18
|
-
import {
|
|
19
|
-
uninstall,
|
|
20
|
-
uninstallCommand,
|
|
21
|
-
uninstallDependency
|
|
22
|
-
} from "./chunk-D42NLWCH.js";
|
|
23
|
-
import {
|
|
24
|
-
POWERHOUSE_CONFIG_FILE,
|
|
25
|
-
POWERHOUSE_GLOBAL_DIR,
|
|
26
|
-
SUPPORTED_PACKAGE_MANAGERS,
|
|
27
|
-
defaultPathValidation,
|
|
28
|
-
findNodeProjectRoot,
|
|
29
|
-
getConfig,
|
|
30
|
-
getPackageManagerFromLockfile,
|
|
31
|
-
getPackageManagerFromPath,
|
|
32
|
-
getProjectInfo,
|
|
33
|
-
isPowerhouseProject,
|
|
34
|
-
packageManagers,
|
|
35
|
-
updateConfigFile
|
|
36
|
-
} from "./chunk-V725N3UP.js";
|
|
37
|
-
import {
|
|
38
|
-
connectCommand,
|
|
39
|
-
startConnect
|
|
40
|
-
} from "./chunk-WUBXHLKE.js";
|
|
41
|
-
import {
|
|
42
|
-
dev,
|
|
43
|
-
devCommand
|
|
44
|
-
} from "./chunk-3LA6D2BV.js";
|
|
45
|
-
import {
|
|
46
|
-
DefaultSwitchboardOptions,
|
|
47
|
-
reactorCommand,
|
|
48
|
-
switchboard
|
|
49
|
-
} from "./chunk-ZZ3KNXW6.js";
|
|
50
|
-
import {
|
|
51
|
-
generate,
|
|
52
|
-
generateCommand
|
|
53
|
-
} from "./chunk-ACKSBZXF.js";
|
|
54
|
-
import {
|
|
55
|
-
helpCommand
|
|
56
|
-
} from "./chunk-KPMNRIJU.js";
|
|
57
|
-
export {
|
|
58
|
-
DefaultSwitchboardOptions,
|
|
59
|
-
POWERHOUSE_CONFIG_FILE,
|
|
60
|
-
POWERHOUSE_GLOBAL_DIR,
|
|
61
|
-
SUPPORTED_PACKAGE_MANAGERS,
|
|
62
|
-
commands,
|
|
63
|
-
connectCommand,
|
|
64
|
-
defaultPathValidation,
|
|
65
|
-
dev,
|
|
66
|
-
devCommand,
|
|
67
|
-
findNodeProjectRoot,
|
|
68
|
-
generate,
|
|
69
|
-
generateCommand,
|
|
70
|
-
getConfig,
|
|
71
|
-
getPackageManagerFromLockfile,
|
|
72
|
-
getPackageManagerFromPath,
|
|
73
|
-
getProjectInfo,
|
|
74
|
-
helpCommand,
|
|
75
|
-
install,
|
|
76
|
-
installCommand,
|
|
77
|
-
installDependency,
|
|
78
|
-
isPowerhouseProject,
|
|
79
|
-
list,
|
|
80
|
-
listCommand,
|
|
81
|
-
manageService,
|
|
82
|
-
packageManagers,
|
|
83
|
-
reactorCommand,
|
|
84
|
-
serviceCommand,
|
|
85
|
-
startConnect,
|
|
86
|
-
switchboard,
|
|
87
|
-
uninstall,
|
|
88
|
-
uninstallCommand,
|
|
89
|
-
uninstallDependency,
|
|
90
|
-
updateConfigFile
|
|
91
|
-
};
|