ph-cmd 0.35.0 → 0.35.2
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/{chunk-AI5ZRXRH.js → chunk-22VPCGDT.js} +2 -9
- package/dist/{chunk-S7QYZX4U.js → chunk-CICBYVM6.js} +1 -1
- package/dist/{chunk-E2HJIPXL.js → chunk-D76UCGYZ.js} +4 -3
- package/dist/{chunk-VE7YEAW3.js → chunk-RO4WBNLC.js} +1 -1
- package/dist/cli.js +7 -11
- package/dist/commands/forward.js +2 -2
- package/dist/commands/index.js +3 -3
- package/dist/commands/setup-globals.js +2 -2
- package/dist/index.js +3 -3
- package/dist/utils.js +1 -1
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
forwardPHCommand,
|
|
3
3
|
getPackageManagerFromLockfile,
|
|
4
4
|
getProjectInfo
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-D76UCGYZ.js";
|
|
6
6
|
|
|
7
7
|
// src/commands/forward.ts
|
|
8
8
|
var forwardCommand = (args, options) => {
|
|
@@ -19,16 +19,9 @@ var forwardCommand = (args, options) => {
|
|
|
19
19
|
console.log(">>> packageManager:", packageManager);
|
|
20
20
|
console.log(">>> projectPath:", projectInfo.path);
|
|
21
21
|
console.log(">>> args:", args);
|
|
22
|
-
console.log(">>> isPackageScript:", options.isPackageScript ?? false);
|
|
23
22
|
}
|
|
24
23
|
try {
|
|
25
|
-
forwardPHCommand(
|
|
26
|
-
packageManager,
|
|
27
|
-
projectInfo.path,
|
|
28
|
-
args,
|
|
29
|
-
options.isPackageScript ?? false,
|
|
30
|
-
options.debug
|
|
31
|
-
);
|
|
24
|
+
forwardPHCommand(packageManager, projectInfo.path, args, options.debug);
|
|
32
25
|
} catch (error) {
|
|
33
26
|
console.error("\u274C Failed to forward command");
|
|
34
27
|
if (error.code === "ENOENT") {
|
|
@@ -20,7 +20,8 @@ var PH_CLI_COMMANDS = [
|
|
|
20
20
|
"uninstall",
|
|
21
21
|
"service",
|
|
22
22
|
"list",
|
|
23
|
-
"inspect"
|
|
23
|
+
"inspect",
|
|
24
|
+
"version"
|
|
24
25
|
];
|
|
25
26
|
var POWERHOUSE_CONFIG_FILE = "powerhouse.config.json";
|
|
26
27
|
var HOME_DIR = homedir();
|
|
@@ -110,9 +111,9 @@ function getProjectInfo(debug) {
|
|
|
110
111
|
path: projectPath
|
|
111
112
|
};
|
|
112
113
|
}
|
|
113
|
-
function forwardPHCommand(packageManager, projectPath, args,
|
|
114
|
+
function forwardPHCommand(packageManager, projectPath, args, debug) {
|
|
114
115
|
const manager = packageManagers[packageManager];
|
|
115
|
-
const command =
|
|
116
|
+
const command = manager.execScript;
|
|
116
117
|
const execCommand = command.replace("{{arguments}}", args);
|
|
117
118
|
const commandOptions = { cwd: projectPath };
|
|
118
119
|
if (debug) {
|
package/dist/cli.js
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
forwardCommand
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-22VPCGDT.js";
|
|
5
5
|
import {
|
|
6
6
|
registerCommands
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RO4WBNLC.js";
|
|
8
8
|
import "./chunk-5HAGY755.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import
|
|
11
|
-
PH_CLI_COMMANDS
|
|
12
|
-
} from "./chunk-E2HJIPXL.js";
|
|
9
|
+
import "./chunk-CICBYVM6.js";
|
|
10
|
+
import "./chunk-D76UCGYZ.js";
|
|
13
11
|
|
|
14
12
|
// src/cli.ts
|
|
15
13
|
import { Command } from "commander";
|
|
16
14
|
var program = new Command();
|
|
17
15
|
var defaultCommand = (options) => {
|
|
18
16
|
const allArgs = process.argv.slice(2);
|
|
19
|
-
const filteredArgs = allArgs.filter((arg) => arg !== "--verbose")
|
|
20
|
-
const command = filteredArgs.at(0);
|
|
21
|
-
const isPackageScript = options.script ?? !PH_CLI_COMMANDS.includes(command ?? "");
|
|
17
|
+
const filteredArgs = allArgs.filter((arg) => arg !== "--verbose");
|
|
22
18
|
const args = filteredArgs.join(" ");
|
|
23
|
-
forwardCommand(args, { debug: !!options.verbose
|
|
19
|
+
forwardCommand(args, { debug: !!options.verbose });
|
|
24
20
|
};
|
|
25
|
-
program.name("ph-cmd").description("CLI tool for Powerhouse DAO").allowUnknownOption().option("--verbose", "Enable debug mode").
|
|
21
|
+
program.name("ph-cmd").description("CLI tool for Powerhouse DAO").allowUnknownOption().option("--verbose", "Enable debug mode").action(defaultCommand);
|
|
26
22
|
registerCommands(program);
|
|
27
23
|
program.parse(process.argv);
|
package/dist/commands/forward.js
CHANGED
package/dist/commands/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
commands,
|
|
3
3
|
registerCommands
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-RO4WBNLC.js";
|
|
5
5
|
import {
|
|
6
6
|
init,
|
|
7
7
|
initCommand
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
setupGlobals,
|
|
11
11
|
setupGlobalsCommand
|
|
12
|
-
} from "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
} from "../chunk-CICBYVM6.js";
|
|
13
|
+
import "../chunk-D76UCGYZ.js";
|
|
14
14
|
export {
|
|
15
15
|
commands,
|
|
16
16
|
registerCommands as default,
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
commands
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RO4WBNLC.js";
|
|
4
4
|
import {
|
|
5
5
|
init,
|
|
6
6
|
initCommand
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
setupGlobals,
|
|
10
10
|
setupGlobalsCommand
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CICBYVM6.js";
|
|
12
12
|
import {
|
|
13
13
|
HOME_DIR,
|
|
14
14
|
PH_BIN,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
getProjectInfo,
|
|
26
26
|
isPowerhouseProject,
|
|
27
27
|
packageManagers
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-D76UCGYZ.js";
|
|
29
29
|
export {
|
|
30
30
|
HOME_DIR,
|
|
31
31
|
PH_BIN,
|
package/dist/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ph-cmd",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"author": "",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"commander": "^12.1.0",
|
|
20
|
-
"@powerhousedao/codegen": "0.37.
|
|
20
|
+
"@powerhousedao/codegen": "0.37.1",
|
|
21
21
|
"@powerhousedao/scalars": "1.25.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|