ph-cmd 0.43.14-dev.0 → 0.43.14-dev.10
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-md.d.ts +2 -0
- package/dist/scripts/generate-commands-md.d.ts.map +1 -0
- package/dist/scripts/generate-commands-md.js +72 -0
- package/dist/scripts/generate-commands-md.js.map +1 -0
- package/dist/scripts/generate-version.d.ts +2 -0
- package/dist/scripts/generate-version.d.ts.map +1 -0
- package/dist/scripts/generate-version.js +13 -0
- package/dist/scripts/generate-version.js.map +1 -0
- package/dist/src/cli.js +65 -8
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/__tests__/update.test.js +21 -17
- package/dist/src/commands/__tests__/update.test.js.map +1 -1
- package/dist/src/commands/__tests__/use.test.js +20 -16
- package/dist/src/commands/__tests__/use.test.js.map +1 -1
- package/dist/src/commands/forward.d.ts +2 -1
- package/dist/src/commands/forward.d.ts.map +1 -1
- package/dist/src/commands/forward.js +16 -4
- package/dist/src/commands/forward.js.map +1 -1
- package/dist/src/commands/help.d.ts +7 -0
- package/dist/src/commands/help.d.ts.map +1 -0
- package/dist/src/commands/help.js +14 -0
- package/dist/src/commands/help.js.map +1 -0
- package/dist/src/commands/index.d.ts +4 -2
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +6 -0
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.d.ts +10 -9
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +7 -4
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/setup-globals.d.ts +10 -9
- package/dist/src/commands/setup-globals.d.ts.map +1 -1
- package/dist/src/commands/setup-globals.js +7 -26
- package/dist/src/commands/setup-globals.js.map +1 -1
- package/dist/src/commands/update.d.ts +7 -8
- package/dist/src/commands/update.d.ts.map +1 -1
- package/dist/src/commands/update.js +9 -16
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/use.d.ts +13 -12
- package/dist/src/commands/use.d.ts.map +1 -1
- package/dist/src/commands/use.js +21 -9
- package/dist/src/commands/use.js.map +1 -1
- package/dist/src/commands/version.d.ts +4 -0
- package/dist/src/commands/version.d.ts.map +1 -0
- package/dist/src/commands/version.js +25 -0
- package/dist/src/commands/version.js.map +1 -0
- package/dist/src/help.d.ts +21 -0
- package/dist/src/help.d.ts.map +1 -0
- package/dist/src/help.js +186 -0
- package/dist/src/help.js.map +1 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/utils/help-formatting.d.ts +35 -0
- package/dist/src/utils/help-formatting.d.ts.map +1 -0
- package/dist/src/utils/help-formatting.js +176 -0
- package/dist/src/utils/help-formatting.js.map +1 -0
- package/dist/src/{utils.d.ts → utils/index.d.ts} +44 -4
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/{utils.js → utils/index.js} +121 -7
- package/dist/src/utils/index.js.map +1 -0
- package/dist/src/version.d.ts +2 -0
- package/dist/src/version.d.ts.map +1 -0
- package/dist/src/version.js +3 -0
- package/dist/src/version.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/dist/src/utils.d.ts.map +0 -1
- package/dist/src/utils.js.map +0 -1
package/dist/src/help.js
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Help text for CLI commands
|
|
3
|
+
* This file centralizes all help text to keep command files clean
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Help text for the update command
|
|
7
|
+
*/
|
|
8
|
+
export const updateHelp = `
|
|
9
|
+
Command Overview:
|
|
10
|
+
The update command helps you manage and update Powerhouse dependencies in your project. It provides
|
|
11
|
+
an efficient way to keep your project up-to-date with the latest versions of Powerhouse packages.
|
|
12
|
+
|
|
13
|
+
This command:
|
|
14
|
+
1. Updates all Powerhouse dependencies based on the semver ranges specified in your package.json
|
|
15
|
+
2. Can force update all dependencies to a specific environment version (dev, prod, latest)
|
|
16
|
+
3. Automatically builds any local dependencies before updating
|
|
17
|
+
4. Works with all dependencies with @powerhousedao/ prefix and special packages like document-model
|
|
18
|
+
|
|
19
|
+
Options:
|
|
20
|
+
--force <env> Force update to the latest available version for the environment specified.
|
|
21
|
+
Valid environments: dev, prod, latest.
|
|
22
|
+
- dev: Uses @dev tag for all dependencies
|
|
23
|
+
- prod/latest: Uses @latest tag for all dependencies
|
|
24
|
+
|
|
25
|
+
--package-manager Override the auto-detected package manager with the specified one.
|
|
26
|
+
|
|
27
|
+
--debug Show additional logs while executing the command.
|
|
28
|
+
|
|
29
|
+
Special Cases:
|
|
30
|
+
- Local Dependencies: If you have dependencies linked from a local monorepo (using file: or link:
|
|
31
|
+
protocols), the command will detect the monorepo root, build affected packages, then update.
|
|
32
|
+
|
|
33
|
+
- No Dependencies: If no Powerhouse dependencies are found in your project, the command will
|
|
34
|
+
display a message and exit without making changes.
|
|
35
|
+
|
|
36
|
+
Examples:
|
|
37
|
+
$ ph update # Update dependencies based on package.json ranges
|
|
38
|
+
$ ph update --force dev # Force update to latest dev version available
|
|
39
|
+
$ ph update --force prod # Force update to latest stable version available (same as latest)
|
|
40
|
+
$ ph update --force latest # Force update to latest stable version available (same as prod)
|
|
41
|
+
$ ph update --package-manager pnpm # Specify package manager to use
|
|
42
|
+
$ ph update --debug # Show debug information during update
|
|
43
|
+
`;
|
|
44
|
+
/**
|
|
45
|
+
* Help text for the use command
|
|
46
|
+
*/
|
|
47
|
+
export const useHelp = `
|
|
48
|
+
Command Overview:
|
|
49
|
+
The use command allows you to quickly switch between different environments for all Powerhouse
|
|
50
|
+
dependencies in your project. It provides a convenient way to toggle between development,
|
|
51
|
+
production, and local versions of the packages.
|
|
52
|
+
|
|
53
|
+
This command:
|
|
54
|
+
1. Updates all installed Powerhouse dependencies to the specified environment
|
|
55
|
+
2. Can link to local dependencies from a monorepo for development
|
|
56
|
+
3. Only updates dependencies that are already present in your package.json
|
|
57
|
+
4. Supports special packages without the @powerhousedao prefix
|
|
58
|
+
|
|
59
|
+
Arguments:
|
|
60
|
+
<environment> Required. The environment to use. Valid options:
|
|
61
|
+
- dev: Use development versions (@dev tag)
|
|
62
|
+
- prod/latest: Use production versions (@latest tag)
|
|
63
|
+
- local: Use local filesystem versions (requires localPath)
|
|
64
|
+
|
|
65
|
+
[localPath] Path to the local monorepo. Required when environment is 'local'.
|
|
66
|
+
This should be the root of your Powerhouse monorepo.
|
|
67
|
+
|
|
68
|
+
Options:
|
|
69
|
+
--force Force environment to use, even if not in the predefined list
|
|
70
|
+
|
|
71
|
+
--package-manager Override the auto-detected package manager with the specified one.
|
|
72
|
+
|
|
73
|
+
--debug Show additional logs during execution for troubleshooting.
|
|
74
|
+
|
|
75
|
+
Special Cases:
|
|
76
|
+
- Local Development: When using the 'local' environment, dependencies are linked directly
|
|
77
|
+
to local filesystem paths, allowing for real-time development and testing.
|
|
78
|
+
|
|
79
|
+
- Missing Dependencies: The command only updates Powerhouse dependencies that are already
|
|
80
|
+
installed in your project. It won't add new ones.
|
|
81
|
+
|
|
82
|
+
Examples:
|
|
83
|
+
$ ph use dev # Switch all dependencies to development versions
|
|
84
|
+
$ ph use prod # Switch all dependencies to production versions
|
|
85
|
+
$ ph use latest # Same as 'prod', use latest production versions
|
|
86
|
+
$ ph use local /path/to/monorepo # Link to local versions in the specified monorepo
|
|
87
|
+
$ ph use dev --package-manager npm # Use npm instead of the auto-detected package manager
|
|
88
|
+
$ ph use dev --debug # Show debug information during execution
|
|
89
|
+
`;
|
|
90
|
+
/**
|
|
91
|
+
* Help text for the setup-globals command
|
|
92
|
+
*/
|
|
93
|
+
export const setupGlobalsHelp = `
|
|
94
|
+
Command Overview:
|
|
95
|
+
The setup-globals command initializes a new Powerhouse project with the necessary global
|
|
96
|
+
configuration. It helps you set up a project quickly with proper defaults and dependencies.
|
|
97
|
+
|
|
98
|
+
This command:
|
|
99
|
+
1. Creates a new project with the specified name or in the current directory
|
|
100
|
+
2. Sets up all required Powerhouse dependencies
|
|
101
|
+
3. Configures the project with appropriate settings
|
|
102
|
+
4. Can run in interactive mode to guide you through the setup process
|
|
103
|
+
|
|
104
|
+
Arguments:
|
|
105
|
+
[project-name] Optional. Name of the project to create. If not provided,
|
|
106
|
+
the command will use the current directory.
|
|
107
|
+
|
|
108
|
+
Options:
|
|
109
|
+
-p, --project Specify the name of the project to create.
|
|
110
|
+
|
|
111
|
+
-i, --interactive Run the command in interactive mode, which will guide you
|
|
112
|
+
through the setup process with questions and prompts.
|
|
113
|
+
|
|
114
|
+
-v, --version Specify the development version to use. Defaults to "main".
|
|
115
|
+
|
|
116
|
+
--dev Use the "development" version of the boilerplate.
|
|
117
|
+
|
|
118
|
+
--staging Use the "staging" version of the boilerplate.
|
|
119
|
+
|
|
120
|
+
--package-manager Override the auto-detected package manager with the specified one.
|
|
121
|
+
|
|
122
|
+
Project Structure:
|
|
123
|
+
The command will set up a project with the following structure:
|
|
124
|
+
- Proper configuration files for TypeScript and ESLint
|
|
125
|
+
- Dependencies for Powerhouse packages
|
|
126
|
+
- Build and development scripts
|
|
127
|
+
|
|
128
|
+
Examples:
|
|
129
|
+
$ ph setup-globals my-project # Create a new project named "my-project"
|
|
130
|
+
$ ph setup-globals # Set up a project in the current directory
|
|
131
|
+
$ ph setup-globals -i # Run setup in interactive mode
|
|
132
|
+
$ ph setup-globals --dev # Use development version
|
|
133
|
+
$ ph setup-globals -v beta # Use specific version
|
|
134
|
+
$ ph setup-globals --package-manager npm # Use npm as package manager
|
|
135
|
+
`;
|
|
136
|
+
/**
|
|
137
|
+
* Help text for the init command
|
|
138
|
+
*/
|
|
139
|
+
export const initHelp = `
|
|
140
|
+
Command Overview:
|
|
141
|
+
The init command creates a new Powerhouse project with optimal defaults. It sets up a fully
|
|
142
|
+
configured project structure with all necessary dependencies, configurations, and boilerplate.
|
|
143
|
+
|
|
144
|
+
This command:
|
|
145
|
+
1. Creates a new project with the specified name
|
|
146
|
+
2. Installs all required dependencies for Powerhouse development
|
|
147
|
+
3. Sets up a proper project structure and configuration files
|
|
148
|
+
4. Can run in interactive mode for customized setup
|
|
149
|
+
|
|
150
|
+
Arguments:
|
|
151
|
+
[project-name] Optional. Name of the project to create. If not provided,
|
|
152
|
+
you'll be prompted to provide a name, or the current directory
|
|
153
|
+
will be used if in interactive mode.
|
|
154
|
+
|
|
155
|
+
Options:
|
|
156
|
+
-p, --project Specify the name of the project to create.
|
|
157
|
+
|
|
158
|
+
-i, --interactive Run the command in interactive mode, which will guide you
|
|
159
|
+
through the project setup with customizable options.
|
|
160
|
+
|
|
161
|
+
-v, --version Specify the development version to use. Defaults to "main".
|
|
162
|
+
|
|
163
|
+
--dev Use the "development" version of the boilerplate.
|
|
164
|
+
|
|
165
|
+
--staging Use the "staging" version of the boilerplate.
|
|
166
|
+
|
|
167
|
+
--package-manager Override the auto-detected package manager with the specified one.
|
|
168
|
+
|
|
169
|
+
Project Structure:
|
|
170
|
+
The command will create a complete project with:
|
|
171
|
+
- Properly configured TypeScript and build settings
|
|
172
|
+
- Powerhouse document-model integration
|
|
173
|
+
- All necessary package.json dependencies
|
|
174
|
+
- Development scripts and tooling
|
|
175
|
+
|
|
176
|
+
Examples:
|
|
177
|
+
$ ph init my-awesome-project # Create a new project named "my-awesome-project"
|
|
178
|
+
$ ph init -i # Create a project in interactive mode
|
|
179
|
+
$ ph init -p my-project # Same as ph init my-project
|
|
180
|
+
$ ph init --dev # Use development version of boilerplate
|
|
181
|
+
$ ph init -v beta # Use specific version
|
|
182
|
+
$ ph init --package-manager yarn # Use yarn as package manager
|
|
183
|
+
$ ph init my-awesome-project --dev --package-manager pnpm # Create a project with Powerhouse dev packages and pnpm as package manager
|
|
184
|
+
`;
|
|
185
|
+
// Add other command help texts here as needed
|
|
186
|
+
//# sourceMappingURL=help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/help.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCzB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CtB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0C/B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CvB,CAAC;AAEF,8CAA8C"}
|
package/dist/src/index.d.ts
CHANGED
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
|
package/dist/src/index.js
CHANGED
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type Command } from "commander";
|
|
2
|
+
export declare const HELP_FORMATTING_CONFIG: {
|
|
3
|
+
FIXED_COLUMN_WIDTH: number;
|
|
4
|
+
COMMANDS_TO_PAD: string[];
|
|
5
|
+
DESCRIPTION_PADDING: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Merges CLI help text with the forwarded PH CLI help text
|
|
9
|
+
* @param {string} cliHelp - Commander-generated help text
|
|
10
|
+
* @param {string} forwardedHelp - Help text from the PH CLI
|
|
11
|
+
* @returns {string} Merged help text
|
|
12
|
+
*/
|
|
13
|
+
export declare function mergeHelp(cliHelp: string, forwardedHelp: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Applies padding to command descriptions for better alignment
|
|
16
|
+
* @param {Command} program - Commander program instance
|
|
17
|
+
*/
|
|
18
|
+
export declare function applyCommandPadding(program: Command): void;
|
|
19
|
+
/**
|
|
20
|
+
* Restores original command descriptions after generating help
|
|
21
|
+
* @param {Command} program - Commander program instance
|
|
22
|
+
*/
|
|
23
|
+
export declare function restoreCommandDescriptions(program: Command): void;
|
|
24
|
+
/**
|
|
25
|
+
* Captures Commander help output as a string
|
|
26
|
+
* @param {Command} program - Commander program instance
|
|
27
|
+
* @returns {string} Help text as a string
|
|
28
|
+
*/
|
|
29
|
+
export declare function captureCommanderHelp(program: Command): string;
|
|
30
|
+
/**
|
|
31
|
+
* Generates and displays the merged help output
|
|
32
|
+
* @param {Command} program - Commander program instance
|
|
33
|
+
*/
|
|
34
|
+
export declare function generateMergedHelp(program: Command): Promise<void>;
|
|
35
|
+
//# sourceMappingURL=help-formatting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-formatting.d.ts","sourceRoot":"","sources":["../../../src/utils/help-formatting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,eAAO,MAAM,sBAAsB;;;;CAOlC,CAAC;AAiEF;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CA2DxE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAS1D;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAOjE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAe7D;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CA+BxE"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { forwardPHCommand, getPackageManagerFromLockfile, getProjectInfo, } from "./index.js";
|
|
2
|
+
// Configuration constants for help formatting
|
|
3
|
+
export const HELP_FORMATTING_CONFIG = {
|
|
4
|
+
// Column width for command descriptions alignment
|
|
5
|
+
FIXED_COLUMN_WIDTH: 55,
|
|
6
|
+
// List of command names to apply padding to
|
|
7
|
+
COMMANDS_TO_PAD: ["setup-globals", "init", "use", "update", "help"],
|
|
8
|
+
// Padding to add before command descriptions for alignment
|
|
9
|
+
DESCRIPTION_PADDING: " ",
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Extracts command and description parts from a command line
|
|
13
|
+
* @param {string} line - A line from the help text containing a command
|
|
14
|
+
* @returns {{ cmd: string, desc: string }} Normalized command parts
|
|
15
|
+
*/
|
|
16
|
+
function extractCommandParts(line) {
|
|
17
|
+
// First try to match a command with options and arguments
|
|
18
|
+
let match = /^(\s+\S+(?:\|\S+)*(?:\s+\[options\])?(?:\s+\[[^\]]+\]|\s+<[^>]+>)*)(.*)$/.exec(line);
|
|
19
|
+
if (!match) {
|
|
20
|
+
// Fallback to a simpler pattern
|
|
21
|
+
match = /^(\s+\S+(?:\|\S+)*)(.*)$/.exec(line);
|
|
22
|
+
}
|
|
23
|
+
if (!match) {
|
|
24
|
+
return { cmd: line, desc: "" };
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
cmd: match[1].trimEnd(),
|
|
28
|
+
desc: match[2].trim(),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Formats a command with proper description alignment
|
|
33
|
+
* @param {object} parts - Command parts with cmd and desc properties
|
|
34
|
+
* @param {number} columnWidth - Fixed position for descriptions to start
|
|
35
|
+
* @returns {string} Formatted command line
|
|
36
|
+
*/
|
|
37
|
+
function formatCommandLine({ cmd, desc }, columnWidth) {
|
|
38
|
+
// Calculate padding needed for alignment
|
|
39
|
+
const padding = " ".repeat(Math.max(2, columnWidth - cmd.length));
|
|
40
|
+
return `${cmd}${padding}${desc}`;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Extracts command lines from help text starting from the Commands section
|
|
44
|
+
* @param {string[]} lines - Help text split into lines
|
|
45
|
+
* @param {number} startIndex - Index of the Commands section header
|
|
46
|
+
* @returns {string[]} Array of command lines
|
|
47
|
+
*/
|
|
48
|
+
function extractCommandLines(lines, startIndex) {
|
|
49
|
+
const commands = [];
|
|
50
|
+
for (let i = startIndex + 1; i < lines.length; i++) {
|
|
51
|
+
const line = lines[i];
|
|
52
|
+
// Stop when we hit an empty line or no longer see command formatting
|
|
53
|
+
if (!line.trim() || !/^\s{2}\S/.exec(line)) {
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
commands.push(line);
|
|
57
|
+
}
|
|
58
|
+
return commands;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Merges CLI help text with the forwarded PH CLI help text
|
|
62
|
+
* @param {string} cliHelp - Commander-generated help text
|
|
63
|
+
* @param {string} forwardedHelp - Help text from the PH CLI
|
|
64
|
+
* @returns {string} Merged help text
|
|
65
|
+
*/
|
|
66
|
+
export function mergeHelp(cliHelp, forwardedHelp) {
|
|
67
|
+
// Split help text into lines
|
|
68
|
+
const cliLines = cliHelp.split("\n");
|
|
69
|
+
const forwardedLines = forwardedHelp.split("\n");
|
|
70
|
+
// Find the Commands section in both help texts
|
|
71
|
+
const cliCommandsIndex = cliLines.findIndex((line) => line.trim() === "Commands:");
|
|
72
|
+
const forwardedCommandsIndex = forwardedLines.findIndex((line) => line.trim() === "Commands:");
|
|
73
|
+
// Extract command lines
|
|
74
|
+
const cliCommands = extractCommandLines(cliLines, cliCommandsIndex);
|
|
75
|
+
const forwardedCommands = extractCommandLines(forwardedLines, forwardedCommandsIndex);
|
|
76
|
+
// Create a set of CLI command names to avoid duplicates
|
|
77
|
+
const cliCommandNames = new Set();
|
|
78
|
+
cliCommands.forEach((line) => {
|
|
79
|
+
const match = /^\s+(\S+)(?:\|.*)?/.exec(line);
|
|
80
|
+
if (match)
|
|
81
|
+
cliCommandNames.add(match[1]);
|
|
82
|
+
});
|
|
83
|
+
// Filter out duplicate commands from forwarded help
|
|
84
|
+
const uniqueForwardedCommands = forwardedCommands.filter((line) => {
|
|
85
|
+
const match = /^\s+(\S+)(?:\|.*)?/.exec(line);
|
|
86
|
+
if (!match)
|
|
87
|
+
return false;
|
|
88
|
+
// Explicitly filter out 'help' command from forwarded commands
|
|
89
|
+
if (match[1] === "help")
|
|
90
|
+
return false;
|
|
91
|
+
return !cliCommandNames.has(match[1]);
|
|
92
|
+
});
|
|
93
|
+
// Process and format all commands
|
|
94
|
+
const cliParts = cliCommands.map(extractCommandParts);
|
|
95
|
+
const forwardedParts = uniqueForwardedCommands.map(extractCommandParts);
|
|
96
|
+
// Format with consistent alignment
|
|
97
|
+
const formattedCliCommands = cliParts.map((parts) => formatCommandLine(parts, HELP_FORMATTING_CONFIG.FIXED_COLUMN_WIDTH));
|
|
98
|
+
const formattedForwardedCommands = forwardedParts.map((parts) => formatCommandLine(parts, HELP_FORMATTING_CONFIG.FIXED_COLUMN_WIDTH));
|
|
99
|
+
// Extract header section
|
|
100
|
+
const headerSection = cliLines.slice(0, cliCommandsIndex + 1).join("\n");
|
|
101
|
+
// Combine all sections
|
|
102
|
+
return [
|
|
103
|
+
headerSection,
|
|
104
|
+
formattedCliCommands.join("\n"),
|
|
105
|
+
formattedForwardedCommands.join("\n"),
|
|
106
|
+
].join("\n");
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Applies padding to command descriptions for better alignment
|
|
110
|
+
* @param {Command} program - Commander program instance
|
|
111
|
+
*/
|
|
112
|
+
export function applyCommandPadding(program) {
|
|
113
|
+
program.commands.forEach((cmd) => {
|
|
114
|
+
if (HELP_FORMATTING_CONFIG.COMMANDS_TO_PAD.includes(cmd.name())) {
|
|
115
|
+
// Store original description in a property we can retrieve later
|
|
116
|
+
const desc = cmd.description();
|
|
117
|
+
// Add padding to the description
|
|
118
|
+
cmd.description(HELP_FORMATTING_CONFIG.DESCRIPTION_PADDING + desc);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Restores original command descriptions after generating help
|
|
124
|
+
* @param {Command} program - Commander program instance
|
|
125
|
+
*/
|
|
126
|
+
export function restoreCommandDescriptions(program) {
|
|
127
|
+
program.commands.forEach((cmd) => {
|
|
128
|
+
if (HELP_FORMATTING_CONFIG.COMMANDS_TO_PAD.includes(cmd.name())) {
|
|
129
|
+
const desc = cmd.description();
|
|
130
|
+
cmd.description(desc.trim());
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Captures Commander help output as a string
|
|
136
|
+
* @param {Command} program - Commander program instance
|
|
137
|
+
* @returns {string} Help text as a string
|
|
138
|
+
*/
|
|
139
|
+
export function captureCommanderHelp(program) {
|
|
140
|
+
let helpText = "";
|
|
141
|
+
const originalConsoleLog = console.log;
|
|
142
|
+
// Override console.log to capture output
|
|
143
|
+
console.log = (...args) => {
|
|
144
|
+
helpText += args.join(" ") + "\n";
|
|
145
|
+
};
|
|
146
|
+
program.outputHelp();
|
|
147
|
+
// Restore console.log
|
|
148
|
+
console.log = originalConsoleLog;
|
|
149
|
+
return helpText;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Generates and displays the merged help output
|
|
153
|
+
* @param {Command} program - Commander program instance
|
|
154
|
+
*/
|
|
155
|
+
export async function generateMergedHelp(program) {
|
|
156
|
+
// Get project information
|
|
157
|
+
const projectInfo = await getProjectInfo(undefined, false);
|
|
158
|
+
if (projectInfo.available) {
|
|
159
|
+
const packageManager = getPackageManagerFromLockfile(projectInfo.path);
|
|
160
|
+
// Get forwarded help from PH CLI
|
|
161
|
+
const forwardedHelp = forwardPHCommand(packageManager, projectInfo.path, "help", undefined, true);
|
|
162
|
+
// Apply padding to command descriptions for better alignment
|
|
163
|
+
applyCommandPadding(program);
|
|
164
|
+
// Capture the output without displaying it
|
|
165
|
+
const helpText = captureCommanderHelp(program);
|
|
166
|
+
// Restore original descriptions
|
|
167
|
+
restoreCommandDescriptions(program);
|
|
168
|
+
// Merge and display help
|
|
169
|
+
const mergedHelp = mergeHelp(helpText, forwardedHelp);
|
|
170
|
+
console.log(mergedHelp);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
console.log(captureCommanderHelp(program));
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
//# sourceMappingURL=help-formatting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-formatting.js","sourceRoot":"","sources":["../../../src/utils/help-formatting.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,6BAA6B,EAC7B,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,8CAA8C;AAC9C,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,kDAAkD;IAClD,kBAAkB,EAAE,EAAE;IACtB,4CAA4C;IAC5C,eAAe,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC;IACnE,2DAA2D;IAC3D,mBAAmB,EAAE,cAAc;CACpC,CAAC;AAEF;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,IAAY;IACvC,0DAA0D;IAC1D,IAAI,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C,MAAM,aAAa,GAAG,gBAAgB,CACpC,cAAc,EACd,WAAW,CAAC,IAAI,EAChB,MAAM,EACN,SAAS,EACT,IAAI,CACL,CAAC;QAEF,6DAA6D;QAC7D,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAE7B,2CAA2C;QAC3C,MAAM,QAAQ,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAE/C,gCAAgC;QAChC,0BAA0B,CAAC,OAAO,CAAC,CAAC;QAEpC,yBAAyB;QACzB,MAAM,UAAU,GAAG,SAAS,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC1B,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type Command } from "commander";
|
|
2
|
+
export * from "./help-formatting.js";
|
|
1
3
|
export declare const PH_BIN_PATH: string;
|
|
2
4
|
export declare const PH_BIN = "ph-cli";
|
|
3
5
|
export declare const PH_CLI_COMMANDS: string[];
|
|
@@ -48,6 +50,7 @@ export declare const packageManagers: {
|
|
|
48
50
|
};
|
|
49
51
|
export type ProjectInfo = {
|
|
50
52
|
isGlobal: boolean;
|
|
53
|
+
available: boolean;
|
|
51
54
|
path: string;
|
|
52
55
|
};
|
|
53
56
|
export type PackageManager = "npm" | "yarn" | "pnpm" | "bun";
|
|
@@ -57,8 +60,8 @@ export declare function isPowerhouseProject(dir: string): boolean;
|
|
|
57
60
|
export declare function findNodeProjectRoot(dir: string, pathValidation?: PathValidation): string | null;
|
|
58
61
|
export declare function getPackageManagerFromPath(dir: string): PackageManager;
|
|
59
62
|
export declare function getPackageManagerFromLockfile(dir: string): PackageManager;
|
|
60
|
-
export declare function getProjectInfo(debug?: boolean): ProjectInfo
|
|
61
|
-
export declare function forwardPHCommand(packageManager: PackageManager, projectPath: string, args: string, debug?: boolean):
|
|
63
|
+
export declare function getProjectInfo(debug?: boolean, generateGlobalProject?: boolean): Promise<ProjectInfo>;
|
|
64
|
+
export declare function forwardPHCommand(packageManager: PackageManager, projectPath: string, args: string, debug?: boolean, captureOutput?: boolean): string;
|
|
62
65
|
/**
|
|
63
66
|
* Recursively searches for a specific file by traversing up the directory tree.
|
|
64
67
|
* Starting from the given path, it checks each parent directory until it finds
|
|
@@ -77,5 +80,42 @@ export declare function forwardPHCommand(packageManager: PackageManager, project
|
|
|
77
80
|
*/
|
|
78
81
|
export declare const findContainerDirectory: (startPath: string, targetFile: string) => string | null;
|
|
79
82
|
export declare function installDependency(packageManager: PackageManager, dependencies: string[], projectPath: string, workspace?: boolean): void;
|
|
80
|
-
export {
|
|
81
|
-
|
|
83
|
+
export type GlobalProjectOptions = {
|
|
84
|
+
project?: string;
|
|
85
|
+
interactive?: boolean;
|
|
86
|
+
version?: string;
|
|
87
|
+
dev?: boolean;
|
|
88
|
+
staging?: boolean;
|
|
89
|
+
packageManager?: string;
|
|
90
|
+
};
|
|
91
|
+
export declare const createGlobalProject: (projectName?: string, options?: GlobalProjectOptions) => Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Helper to handle help flag detection for commands
|
|
94
|
+
* This centralizes the pattern of checking for help flags and showing command-specific help
|
|
95
|
+
*
|
|
96
|
+
* @param command - The Command instance
|
|
97
|
+
* @param actionFn - The original action function to call if help is not requested
|
|
98
|
+
* @returns A wrapped action function
|
|
99
|
+
*/
|
|
100
|
+
export declare function withHelpHandler<T extends unknown[]>(command: Command, actionFn: (...args: T) => Promise<void> | void): (...args: T) => Promise<void> | void;
|
|
101
|
+
/**
|
|
102
|
+
* Simplified utility to connect a command with an action function that includes help handling
|
|
103
|
+
* This reduces boilerplate in command files by automatically setting up the action with help handling
|
|
104
|
+
*
|
|
105
|
+
* @param command - The Command instance
|
|
106
|
+
* @param actionFn - The action function to call when the command is executed
|
|
107
|
+
* @param preCheck - Optional validation function that runs before the action
|
|
108
|
+
* @returns The command for chaining
|
|
109
|
+
*/
|
|
110
|
+
export declare function withHelpAction<T extends unknown[]>(command: Command, actionFn: (...args: T) => Promise<void> | void, preCheck?: (...args: T) => boolean | undefined): Command;
|
|
111
|
+
/**
|
|
112
|
+
* Enhanced version of withHelpAction that allows custom help text without duplication
|
|
113
|
+
*
|
|
114
|
+
* @param command - The Command instance
|
|
115
|
+
* @param actionFn - The action function to call when the command is executed
|
|
116
|
+
* @param helpText - The custom help text to display (replacing the auto-generated help)
|
|
117
|
+
* @param preCheck - Optional validation function that runs before the action
|
|
118
|
+
* @returns The command for chaining
|
|
119
|
+
*/
|
|
120
|
+
export declare function withCustomHelp<T extends unknown[]>(command: Command, actionFn: (...args: T) => Promise<void> | void, helpText: string, preCheck?: (...args: T) => boolean | undefined): Command;
|
|
121
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAMzC,cAAc,sBAAsB,CAAC;AACrC,eAAO,MAAM,WAAW,QAAkB,CAAC;AAC3C,eAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,eAAO,MAAM,eAAe,UAiB3B,CAAC;AACF,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAC/D,eAAO,MAAM,QAAQ,QAAY,CAAC;AAClC,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAC5C,eAAO,MAAM,qBAAqB,QAGjC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwClB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,M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