@powerhousedao/ph-cli 5.0.0-staging.8 → 5.0.1-staging.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/README.md +21 -4
- package/dist/src/cli.js +14 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/connect.d.ts +17 -6
- package/dist/src/commands/connect.d.ts.map +1 -1
- package/dist/src/commands/connect.js +55 -31
- package/dist/src/commands/connect.js.map +1 -1
- package/dist/src/commands/dev.d.ts +3 -3
- package/dist/src/commands/dev.d.ts.map +1 -1
- package/dist/src/commands/generate.d.ts +4 -4
- package/dist/src/commands/generate.d.ts.map +1 -1
- package/dist/src/commands/generate.js +4 -3
- package/dist/src/commands/generate.js.map +1 -1
- package/dist/src/commands/help.d.ts +1 -1
- package/dist/src/commands/help.d.ts.map +1 -1
- package/dist/src/commands/index.d.ts +13 -4
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +13 -29
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/inspect.d.ts +3 -3
- package/dist/src/commands/inspect.d.ts.map +1 -1
- package/dist/src/commands/install.d.ts +2 -3
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +1 -2
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/list.d.ts +2 -2
- package/dist/src/commands/list.d.ts.map +1 -1
- package/dist/src/commands/list.js +1 -1
- package/dist/src/commands/list.js.map +1 -1
- package/dist/src/commands/reactor.d.ts +4 -4
- package/dist/src/commands/reactor.d.ts.map +1 -1
- package/dist/src/commands/register-commands.d.ts +5 -0
- package/dist/src/commands/register-commands.d.ts.map +1 -0
- package/dist/src/commands/register-commands.js +30 -0
- package/dist/src/commands/register-commands.js.map +1 -0
- package/dist/src/commands/service.d.ts +2 -2
- package/dist/src/commands/service.d.ts.map +1 -1
- package/dist/src/commands/service.js.map +1 -1
- package/dist/src/commands/switchboard.d.ts +5 -5
- package/dist/src/commands/switchboard.d.ts.map +1 -1
- package/dist/src/commands/switchboard.js +2 -4
- package/dist/src/commands/switchboard.js.map +1 -1
- package/dist/src/commands/uninstall.d.ts +3 -3
- package/dist/src/commands/uninstall.d.ts.map +1 -1
- package/dist/src/commands/uninstall.js.map +1 -1
- package/dist/src/commands/vetra.d.ts +4 -3
- package/dist/src/commands/vetra.d.ts.map +1 -1
- package/dist/src/commands/vetra.js +2 -1
- package/dist/src/commands/vetra.js.map +1 -1
- package/dist/src/help.d.ts +5 -5
- package/dist/src/help.d.ts.map +1 -1
- package/dist/src/help.js +95 -37
- package/dist/src/help.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/services/connect.d.ts +1 -3
- package/dist/src/services/connect.d.ts.map +1 -1
- package/dist/src/services/connect.js +1 -15
- package/dist/src/services/connect.js.map +1 -1
- package/dist/src/services/dev.d.ts.map +1 -1
- package/dist/src/services/dev.js +8 -6
- package/dist/src/services/dev.js.map +1 -1
- package/dist/src/services/generate.d.ts +3 -0
- package/dist/src/services/generate.d.ts.map +1 -1
- package/dist/src/services/generate.js +11 -2
- package/dist/src/services/generate.js.map +1 -1
- package/dist/src/services/reactor.d.ts +1 -1
- package/dist/src/services/reactor.d.ts.map +1 -1
- package/dist/src/services/reactor.js +2 -2
- package/dist/src/services/reactor.js.map +1 -1
- package/dist/src/services/switchboard.d.ts +2 -1
- package/dist/src/services/switchboard.d.ts.map +1 -1
- package/dist/src/services/switchboard.js +24 -22
- package/dist/src/services/switchboard.js.map +1 -1
- package/dist/src/services/vetra.d.ts +2 -2
- package/dist/src/services/vetra.d.ts.map +1 -1
- package/dist/src/services/vetra.js +31 -67
- package/dist/src/services/vetra.js.map +1 -1
- package/dist/src/utils.d.ts +11 -4
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +18 -14
- 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.d.ts +2 -0
- package/dist/test/utils.test.d.ts.map +1 -0
- package/dist/test/utils.test.js +132 -0
- package/dist/test/utils.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +16 -20
- package/dist/package.json +0 -58
- package/dist/tsconfig.lib.tsbuildinfo +0 -1
package/README.md
CHANGED
|
@@ -69,6 +69,7 @@ ph generate --interactive
|
|
|
69
69
|
Starts Connect Studio, a development environment for Powerhouse. This command launches a local development server with hot-reloading and debugging capabilities.
|
|
70
70
|
|
|
71
71
|
#### Options:
|
|
72
|
+
|
|
72
73
|
- `-p, --port <port>`: Port to run the server on (default: 3000)
|
|
73
74
|
- `-h, --host`: Expose the server to the network
|
|
74
75
|
- `--https`: Enable HTTPS
|
|
@@ -76,6 +77,7 @@ Starts Connect Studio, a development environment for Powerhouse. This command la
|
|
|
76
77
|
- `--config-file <configFile>`: Path to the powerhouse.config.js file
|
|
77
78
|
|
|
78
79
|
#### Examples:
|
|
80
|
+
|
|
79
81
|
```bash
|
|
80
82
|
# Start Connect Studio on default port (3000)
|
|
81
83
|
ph connect
|
|
@@ -98,6 +100,7 @@ ph connect --config-file ./my-config.js
|
|
|
98
100
|
Generate code from document models with various options. This command supports multiple generation types including editors, processors, subgraphs, and import scripts.
|
|
99
101
|
|
|
100
102
|
#### Options:
|
|
103
|
+
|
|
101
104
|
- `-i, --interactive`: Run the command in interactive mode
|
|
102
105
|
- `--editors <type>`: Path to the editors directory
|
|
103
106
|
- `-e, --editor <type>`: Editor Name
|
|
@@ -114,6 +117,7 @@ Generate code from document models with various options. This command supports m
|
|
|
114
117
|
- `-d, --drive-editor <name>`: Generate a drive editor with the specified name
|
|
115
118
|
|
|
116
119
|
#### Examples:
|
|
120
|
+
|
|
117
121
|
```bash
|
|
118
122
|
# Generate code from a specific file
|
|
119
123
|
ph generate path/to/model.json
|
|
@@ -145,12 +149,14 @@ ph generate --watch
|
|
|
145
149
|
Install Powerhouse dependencies with support for global and workspace-specific installations.
|
|
146
150
|
|
|
147
151
|
#### Options:
|
|
152
|
+
|
|
148
153
|
- `-g, --global`: Install the dependency globally
|
|
149
154
|
- `--debug`: Show additional logs
|
|
150
155
|
- `-w, --workspace`: Install the dependency in the workspace (use this option for monorepos)
|
|
151
156
|
- `--package-manager <packageManager>`: Force package manager to use
|
|
152
157
|
|
|
153
158
|
#### Examples:
|
|
159
|
+
|
|
154
160
|
```bash
|
|
155
161
|
# Install a package
|
|
156
162
|
ph install @powerhousedao/package-name
|
|
@@ -170,12 +176,14 @@ ph install @powerhousedao/package1 @powerhousedao/package2
|
|
|
170
176
|
Remove Powerhouse dependencies from your project.
|
|
171
177
|
|
|
172
178
|
#### Options:
|
|
179
|
+
|
|
173
180
|
- `-g, --global`: Remove the dependency globally
|
|
174
181
|
- `--debug`: Show additional logs
|
|
175
182
|
- `-w, --workspace`: Remove the dependency in the workspace (use this option for monorepos)
|
|
176
183
|
- `--package-manager <packageManager>`: Force package manager to use
|
|
177
184
|
|
|
178
185
|
#### Examples:
|
|
186
|
+
|
|
179
187
|
```bash
|
|
180
188
|
# Remove a package
|
|
181
189
|
ph uninstall @powerhousedao/package-name
|
|
@@ -192,9 +200,11 @@ ph uninstall -w @powerhousedao/package-name
|
|
|
192
200
|
List all installed Powerhouse packages in your project with detailed information.
|
|
193
201
|
|
|
194
202
|
#### Options:
|
|
203
|
+
|
|
195
204
|
- `--debug`: Show additional logs
|
|
196
205
|
|
|
197
206
|
#### Examples:
|
|
207
|
+
|
|
198
208
|
```bash
|
|
199
209
|
# List packages
|
|
200
210
|
ph list
|
|
@@ -208,9 +218,11 @@ ph list --debug
|
|
|
208
218
|
Inspect a specific package for detailed information about its dependencies, configuration, and usage.
|
|
209
219
|
|
|
210
220
|
#### Options:
|
|
221
|
+
|
|
211
222
|
- `--debug`: Show additional logs
|
|
212
223
|
|
|
213
224
|
#### Examples:
|
|
225
|
+
|
|
214
226
|
```bash
|
|
215
227
|
# Inspect a package
|
|
216
228
|
ph inspect @powerhousedao/package-name
|
|
@@ -224,10 +236,12 @@ ph inspect --debug @powerhousedao/package-name
|
|
|
224
236
|
Manage Powerhouse services with various operations.
|
|
225
237
|
|
|
226
238
|
#### Options:
|
|
239
|
+
|
|
227
240
|
- `action`: The action to perform (default: "list")
|
|
228
241
|
- `service`: The service to manage (default: "all")
|
|
229
242
|
|
|
230
243
|
#### Examples:
|
|
244
|
+
|
|
231
245
|
```bash
|
|
232
246
|
# List all services
|
|
233
247
|
ph service list
|
|
@@ -241,9 +255,11 @@ ph service list service-name
|
|
|
241
255
|
Display the current version of the PH CLI and related information.
|
|
242
256
|
|
|
243
257
|
#### Options:
|
|
258
|
+
|
|
244
259
|
- `--debug`: Show additional logs
|
|
245
260
|
|
|
246
261
|
#### Examples:
|
|
262
|
+
|
|
247
263
|
```bash
|
|
248
264
|
ph version
|
|
249
265
|
```
|
|
@@ -253,6 +269,7 @@ ph version
|
|
|
253
269
|
Display comprehensive help information about the CLI and its commands.
|
|
254
270
|
|
|
255
271
|
#### Examples:
|
|
272
|
+
|
|
256
273
|
```bash
|
|
257
274
|
# Show general help
|
|
258
275
|
ph help
|
|
@@ -270,11 +287,11 @@ module.exports = {
|
|
|
270
287
|
port: 3000,
|
|
271
288
|
host: false,
|
|
272
289
|
https: false,
|
|
273
|
-
packageManager:
|
|
290
|
+
packageManager: "npm",
|
|
274
291
|
workspace: {
|
|
275
292
|
enabled: true,
|
|
276
|
-
root:
|
|
277
|
-
}
|
|
293
|
+
root: "./packages",
|
|
294
|
+
},
|
|
278
295
|
};
|
|
279
296
|
```
|
|
280
297
|
|
|
@@ -315,4 +332,4 @@ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) f
|
|
|
315
332
|
|
|
316
333
|
## License
|
|
317
334
|
|
|
318
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
335
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
package/dist/src/cli.js
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
-
import registerCommands from "
|
|
3
|
+
import { registerCommands } from "@powerhousedao/ph-cli";
|
|
4
|
+
function ensureNodeVersion(minVersion = "22") {
|
|
5
|
+
const version = process.versions.node;
|
|
6
|
+
if (!version) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
if (version < minVersion) {
|
|
10
|
+
console.error(`Node version ${minVersion} or higher is required. Current version: ${version}`);
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
// Ensure minimum Node.js version
|
|
15
|
+
ensureNodeVersion("22");
|
|
4
16
|
const program = new Command();
|
|
5
17
|
program
|
|
6
18
|
.name("ph-cli")
|
|
7
19
|
.description("The Powerhouse CLI (ph-cli) is a command-line interface tool that provides essential commands for managing Powerhouse projects. The tool and it's commands are fundamental for creating, building, and running Document Models as a builder in studio mode.")
|
|
8
20
|
.allowUnknownOption(true)
|
|
9
21
|
.option("--verbose, --debug", "Enable debug mode");
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
10
23
|
// @ts-ignore build time version file
|
|
11
24
|
import("./version.js")
|
|
12
25
|
.then(({ version }) => program.version(version))
|
package/dist/src/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,gBAAgB,MAAM,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,SAAS,iBAAiB,CAAC,UAAU,GAAG,IA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AAC;QACrB,OAAO;IACT,CAAC;IAED,MAAM,YAAY,GAChB,KAAK,YAAY,KAAK;QACpB,CAAC,CAAC,KAAK,CAAC,OAAO;QACf,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ;YACzB,CAAC,CAAC,KAAK;YACP,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAEvC,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC"}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
+
import type { ConnectBuildOptions, ConnectCommonOptions, ConnectPreviewOptions, ConnectStudioOptions } from "@powerhousedao/builder-tools";
|
|
1
2
|
import { Command } from "commander";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare
|
|
3
|
+
import type { CommandActionType } from "../types.js";
|
|
4
|
+
type CliConnectCommonOptions = Pick<ConnectCommonOptions, "base" | "mode" | "configFile" | "projectRoot" | "viteConfigFile">;
|
|
5
|
+
type CliConnectStudioOptions = ConnectStudioOptions["devServerOptions"] & CliConnectCommonOptions;
|
|
6
|
+
type CliConnectBuildOptions = Omit<ConnectBuildOptions, keyof ConnectCommonOptions> & CliConnectCommonOptions;
|
|
7
|
+
type CliConnectPreviewOptions = Omit<ConnectPreviewOptions, keyof ConnectCommonOptions> & CliConnectCommonOptions;
|
|
8
|
+
export declare const connectStudioCommand: CommandActionType<[
|
|
9
|
+
CliConnectStudioOptions
|
|
10
|
+
], void>;
|
|
11
|
+
export declare const buildConnectCommand: CommandActionType<[
|
|
12
|
+
CliConnectBuildOptions
|
|
13
|
+
], void>;
|
|
14
|
+
export declare const previewConnectCommand: CommandActionType<[
|
|
15
|
+
CliConnectPreviewOptions
|
|
16
|
+
], void>;
|
|
17
|
+
export declare function connectCommand(program: Command): Command;
|
|
18
|
+
export {};
|
|
8
19
|
//# sourceMappingURL=connect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../src/commands/connect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../src/commands/connect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,KAAK,uBAAuB,GAAG,IAAI,CACjC,oBAAoB,EACpB,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,aAAa,GAAG,gBAAgB,CAClE,CAAC;AAEF,KAAK,uBAAuB,GAAG,oBAAoB,CAAC,kBAAkB,CAAC,GACrE,uBAAuB,CAAC;AAE1B,KAAK,sBAAsB,GAAG,IAAI,CAChC,mBAAmB,EACnB,MAAM,oBAAoB,CAC3B,GACC,uBAAuB,CAAC;AAE1B,KAAK,wBAAwB,GAAG,IAAI,CAClC,qBAAqB,EACrB,MAAM,oBAAoB,CAC3B,GACC,uBAAuB,CAAC;AAY1B,eAAO,MAAM,oBAAoB,EAAE,iBAAiB,CAClD;IAAC,uBAAuB;CAAC,EACzB,IAAI,CAGL,CAAC;AA2BF,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,CACjD;IAAC,sBAAsB;CAAC,EACxB,IAAI,CAGL,CAAC;AAyBF,eAAO,MAAM,qBAAqB,EAAE,iBAAiB,CACnD;IAAC,wBAAwB;CAAC,EAC1B,IAAI,CAGL,CAAC;AAyBF,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,WAQ9C"}
|
|
@@ -1,60 +1,84 @@
|
|
|
1
|
-
import { buildConnect, previewConnect, } from "@powerhousedao/builder-tools/connect-build";
|
|
2
1
|
import { Command } from "commander";
|
|
3
2
|
import { connectBuildHelp, connectPreviewHelp, connectStudioHelp, } from "../help.js";
|
|
4
3
|
import { setCustomHelp } from "../utils.js";
|
|
5
|
-
async function
|
|
6
|
-
const
|
|
7
|
-
const {
|
|
8
|
-
return
|
|
4
|
+
async function startConnectStudio(options = {}) {
|
|
5
|
+
const { startConnectStudio } = await import("../services/connect.js");
|
|
6
|
+
const { port, host, open, cors, strictPort, force, ...otherOptions } = options;
|
|
7
|
+
return startConnectStudio({
|
|
8
|
+
...otherOptions,
|
|
9
|
+
devServerOptions: { port, host, open, cors, strictPort, force },
|
|
10
|
+
});
|
|
9
11
|
}
|
|
10
|
-
export const
|
|
11
|
-
return
|
|
12
|
+
export const connectStudioCommand = (options) => {
|
|
13
|
+
return startConnectStudio(options);
|
|
12
14
|
};
|
|
13
15
|
const studioCommand = new Command("studio")
|
|
14
16
|
.description("Starts Connect Studio (default)")
|
|
15
|
-
.option("
|
|
16
|
-
.option("
|
|
17
|
-
.option("--
|
|
18
|
-
.option("--
|
|
17
|
+
.option("--port <port>", "Port to run the server on", "3000")
|
|
18
|
+
.option("--host", "Expose the server to the network")
|
|
19
|
+
.option("--open", "Open browser on startup")
|
|
20
|
+
.option("--cors", `Enable CORS`)
|
|
21
|
+
.option("--strictPort", `Exit if specified port is already in use`)
|
|
22
|
+
.option("--force", `Force the optimizer to ignore the cache and re-bundle`)
|
|
23
|
+
.option("--mode <mode>", `Vite mode to use`)
|
|
19
24
|
.option("--config-file <configFile>", "Path to the powerhouse.config.js file")
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
.option("--vite-config-file <viteConfigFile>", "Path to the vite config file")
|
|
26
|
+
.option("--project-root <projectRoot>", "The root directory of the project", process.cwd())
|
|
27
|
+
.action(connectStudioCommand);
|
|
23
28
|
setCustomHelp(studioCommand, connectStudioHelp);
|
|
29
|
+
async function buildConnect(options) {
|
|
30
|
+
const { buildConnect } = await import("../services/connect.js");
|
|
31
|
+
return buildConnect(options);
|
|
32
|
+
}
|
|
33
|
+
export const buildConnectCommand = (options) => {
|
|
34
|
+
return buildConnect(options);
|
|
35
|
+
};
|
|
24
36
|
const buildCommand = new Command("build")
|
|
25
37
|
.description("Build Connect project")
|
|
38
|
+
.option("--outDir <outDir>", "Output directory. Defaults to '.ph/connect-build/dist/'")
|
|
26
39
|
.option("--base <base>", "Base path for the app")
|
|
27
|
-
.option("--
|
|
28
|
-
.option("--
|
|
29
|
-
.option("--
|
|
30
|
-
.option("--
|
|
31
|
-
.
|
|
32
|
-
.action(async (...args) => {
|
|
33
|
-
await buildConnect(...args);
|
|
34
|
-
});
|
|
40
|
+
.option("--mode <mode>", `Vite mode to use`)
|
|
41
|
+
.option("--config-file <configFile>", "Path to the powerhouse.config.js file")
|
|
42
|
+
.option("--vite-config-file <viteConfigFile>", "Path to the vite config file")
|
|
43
|
+
.option("--project-root <projectRoot>", "The root directory of the project", process.cwd())
|
|
44
|
+
.action(buildConnectCommand);
|
|
35
45
|
setCustomHelp(buildCommand, connectBuildHelp);
|
|
46
|
+
async function previewConnect(options) {
|
|
47
|
+
const { previewConnect } = await import("../services/connect.js");
|
|
48
|
+
return previewConnect(options);
|
|
49
|
+
}
|
|
50
|
+
export const previewConnectCommand = (options) => {
|
|
51
|
+
return previewConnect(options).then();
|
|
52
|
+
};
|
|
36
53
|
const previewCommand = new Command("preview")
|
|
37
54
|
.description("Preview built Connect project")
|
|
55
|
+
.option("--outDir <outDir>", "Output directory. Defaults to '.ph/connect-build/dist/'")
|
|
56
|
+
.option("--port <port>", "Port to run the server on", "4173")
|
|
57
|
+
.option("--host", "Expose the server to the network")
|
|
58
|
+
.option("--open", "Open browser on startup")
|
|
59
|
+
.option("--strictPort", `Exit if specified port is already in use`)
|
|
38
60
|
.option("--base <base>", "Base path for the app")
|
|
39
|
-
.option("--
|
|
40
|
-
.option("-
|
|
41
|
-
.option("--
|
|
42
|
-
.
|
|
43
|
-
|
|
44
|
-
});
|
|
61
|
+
.option("--mode <mode>", `Vite mode to use`)
|
|
62
|
+
.option("--config-file <configFile>", "Path to the powerhouse.config.js file")
|
|
63
|
+
.option("--vite-config-file <viteConfigFile>", "Path to the vite config file")
|
|
64
|
+
.option("--project-root <projectRoot>", "The root directory of the project", process.cwd())
|
|
65
|
+
.action(previewConnectCommand);
|
|
45
66
|
setCustomHelp(previewCommand, connectPreviewHelp);
|
|
46
67
|
export function connectCommand(program) {
|
|
47
|
-
|
|
68
|
+
return program
|
|
48
69
|
.command("connect")
|
|
49
70
|
.description("Powerhouse Connect commands")
|
|
71
|
+
.allowUnknownOption(true)
|
|
50
72
|
.addCommand(studioCommand, { isDefault: true })
|
|
51
73
|
.addCommand(buildCommand)
|
|
52
74
|
.addCommand(previewCommand);
|
|
53
75
|
}
|
|
54
76
|
if (process.argv.at(2) === "spawn") {
|
|
55
77
|
const optionsArg = process.argv.at(3);
|
|
56
|
-
const options = optionsArg
|
|
57
|
-
|
|
78
|
+
const options = optionsArg
|
|
79
|
+
? JSON.parse(optionsArg)
|
|
80
|
+
: {};
|
|
81
|
+
startConnectStudio(options).catch((e) => {
|
|
58
82
|
throw e;
|
|
59
83
|
});
|
|
60
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../src/commands/connect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../src/commands/connect.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAsB5C,KAAK,UAAU,kBAAkB,CAAC,UAAmC,EAAE;IACrE,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,MAAM,CAAC,wBAAwB,CAAC,CAAC;IACtE,MAAM,EAAE,IAAI,EAAE,I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AAE,0CAA0C,CAAC;KAClE,MAAM,CAAC,eAAe,EAAE,uBAAuB,CAAC;KAChD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC;KAC3C,MAAM,CAAC,4BAA4B,EAAE,uCAAuC,CAAC;KAC7E,MAAM,CAAC,qCAAqC,EAAE,8BAA8B,CAAC;KAC7E,MAAM,CACL,8BAA8B,EAC9B,mCAAmC,EACnC,OAAO,CAAC,GAAG,EAAE,CACd;KACA,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAEjC,aAAa,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;AAElD,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO,OAAO;SACX,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,6BAA6B,CAAC;SAC1C,kBAAkB,CAAC,IAAI,CAAC;SACxB,UAAU,CAAC,aAAa,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;SAC9C,UAAU,CAAC,YAAY,CAAC;SACxB,UAAU,CAAC,cAAc,CAAC,CAAC;AAChC,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC;IACnC,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,UAAU;QACxB,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAA6B;QACrD,CAAC,CAAC,EAAE,CAAC;IACP,kBAAkB,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE;QAC/C,MAAM,CAAC,CAAC;IACV,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { DevOptions } from "../services/dev.js";
|
|
3
|
+
import type { CommandActionType } from "../types.js";
|
|
4
4
|
export declare const dev: CommandActionType<[DevOptions]>;
|
|
5
5
|
export declare function devCommand(program: Command): void;
|
|
6
6
|
//# sourceMappingURL=dev.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../src/commands/dev.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../src/commands/dev.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AASrD,eAAO,MAAM,GAAG,EAAE,iBAAiB,CAAC,CAAC,UAAU,CAAC,CAE/C,CAAC;AAEF,wBAAgB,UAAU,CAAC,OAAO,EAAE,OAAO,QAqB1C"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { GenerateOptions } from "../services/generate.js";
|
|
3
|
+
import type { CommandActionType } from "../types.js";
|
|
4
4
|
export declare const generate: CommandActionType<[
|
|
5
|
-
string | undefined,
|
|
5
|
+
string | string[] | undefined,
|
|
6
6
|
GenerateOptions
|
|
7
7
|
]>;
|
|
8
8
|
export declare function generateCommand(program: Command): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/commands/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/commands/generate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAcrD,eAAO,MAAM,QAAQ,EAAE,iBAAiB,CACtC;IAAC,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS;IAAE,eAAe;CAAC,CAGjD,CAAC;AAEF,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,QAoC/C"}
|
|
@@ -3,7 +3,8 @@ import { setCustomHelp } from "../utils.js";
|
|
|
3
3
|
async function startGenerate(filePath, options) {
|
|
4
4
|
const Generate = await import("../services/generate.js");
|
|
5
5
|
const { startGenerate } = Generate;
|
|
6
|
-
|
|
6
|
+
const resolvedPath = Array.isArray(filePath) ? filePath.join(" ") : filePath;
|
|
7
|
+
return startGenerate(resolvedPath, options);
|
|
7
8
|
}
|
|
8
9
|
export const generate = async (filePath, options) => {
|
|
9
10
|
return startGenerate(filePath, options);
|
|
@@ -12,14 +13,14 @@ export function generateCommand(program) {
|
|
|
12
13
|
const cmd = program
|
|
13
14
|
.command("generate")
|
|
14
15
|
.description("Generate code from the document models")
|
|
15
|
-
.argument("[document-model-file]", "Path to the document model file")
|
|
16
|
+
.argument("[document-model-file...]", "Path to the document model file")
|
|
16
17
|
.option("-i, --interactive", "Run the command in interactive mode")
|
|
17
18
|
.option("--editors <type>", "Path to the editors directory")
|
|
18
19
|
.option("-e, --editor <type>", "Editor Name")
|
|
19
20
|
.option("--file <path>", "File path to document model")
|
|
20
21
|
.option("--processors <type>", "Path to the processors directory")
|
|
21
22
|
.option("-p, --processor <type>", "Processor Name")
|
|
22
|
-
.option("--processor-type <type>", "Processor Type")
|
|
23
|
+
.option("--processor-type <type>", "Processor Type: 'relationalDb' or 'analytics'")
|
|
23
24
|
.option("-s, --subgraph <type>", "Subgraph Name")
|
|
24
25
|
.option("--document-models <type>", "Path to the document models directory")
|
|
25
26
|
.option("--document-types <type>", "Supported document types by the editor")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/commands/generate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,KAAK,UAAU,aAAa,CAC1B,
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../src/commands/generate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG1C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,KAAK,UAAU,aAAa,CAC1B,QAAuC,EACvC,OAAwB;IAExB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC;IACzD,MAAM,EAAE,aAAa,EAAE,GAAG,QAAQ,CAAC;IAEnC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC7E,OAAO,aAAa,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAEjB,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IAC9B,OAAO,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,UAAU,eAAe,CAAC,OAAgB;IAC9C,MAAM,GAAG,GAAG,OAAO;SAChB,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,wCAAwC,CAAC;SACrD,QAAQ,CAAC,0BAA0B,EAAE,iCAAiC,CAAC;SACvE,MAAM,CAAC,mBAAmB,EAAE,qCAAqC,CAAC;SAClE,MAAM,CAAC,kBAAkB,EAAE,+BAA+B,CAAC;SAC3D,MAAM,CAAC,qBAAqB,EAAE,aAAa,CAAC;SAC5C,MAAM,CAAC,eAAe,EAAE,6BAA6B,CAAC;SACtD,MAAM,CAAC,qBAAqB,EAAE,kCAAkC,CAAC;SACjE,MAAM,CAAC,wBAAwB,EAAE,gBAAgB,CAAC;SAClD,MAAM,CACL,yBAAyB,EACzB,+CAA+C,CAChD;SACA,MAAM,CAAC,uBAAuB,EAAE,eAAe,CAAC;SAChD,MAAM,CAAC,0BAA0B,EAAE,uCAAuC,CAAC;SAC3E,MAAM,CAAC,yBAAyB,EAAE,wCAAwC,CAAC;SAC3E,MAAM,CAAC,6BAA6B,EAAE,oBAAoB,CAAC;SAC3D,MAAM,CAAC,oBAAoB,EAAE,oCAAoC,CAAC;SAClE,MAAM,CAAC,aAAa,EAAE,8BAA8B,CAAC;SACrD,MAAM,CAAC,aAAa,EAAE,0BAA0B,CAAC;SACjD,MAAM,CACL,2BAA2B,EAC3B,iDAAiD,CAClD;SACA,MAAM,CAAC,yBAAyB,EAAE,4BAA4B,CAAC;SAC/D,MAAM,CACL,sBAAsB,EACtB,oDAAoD,CACrD,CAAC;IAEJ,gEAAgE;IAChE,aAAa,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAEjC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/commands/help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,QAO3C"}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export * from "./connect.js";
|
|
2
|
+
export * from "./dev.js";
|
|
3
|
+
export * from "./generate.js";
|
|
4
|
+
export * from "./help.js";
|
|
5
|
+
export * from "./inspect.js";
|
|
6
|
+
export * from "./install.js";
|
|
7
|
+
export * from "./list.js";
|
|
8
|
+
export * from "./reactor.js";
|
|
9
|
+
export * from "./register-commands.js";
|
|
10
|
+
export * from "./service.js";
|
|
11
|
+
export * from "./switchboard.js";
|
|
12
|
+
export * from "./uninstall.js";
|
|
13
|
+
export * from "./vetra.js";
|
|
5
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
|
|
@@ -1,30 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
// devCommand,
|
|
15
|
-
connectCommand,
|
|
16
|
-
generateCommand,
|
|
17
|
-
reactorCommand,
|
|
18
|
-
helpCommand,
|
|
19
|
-
installCommand,
|
|
20
|
-
uninstallCommand,
|
|
21
|
-
serviceCommand,
|
|
22
|
-
listCommand,
|
|
23
|
-
inspectCommand,
|
|
24
|
-
switchboardCommand,
|
|
25
|
-
vetraCommand,
|
|
26
|
-
];
|
|
27
|
-
export default function registerCommands(program) {
|
|
28
|
-
commands.forEach((command) => command(program));
|
|
29
|
-
}
|
|
1
|
+
export * from "./connect.js";
|
|
2
|
+
export * from "./dev.js";
|
|
3
|
+
export * from "./generate.js";
|
|
4
|
+
export * from "./help.js";
|
|
5
|
+
export * from "./inspect.js";
|
|
6
|
+
export * from "./install.js";
|
|
7
|
+
export * from "./list.js";
|
|
8
|
+
export * from "./reactor.js";
|
|
9
|
+
export * from "./register-commands.js";
|
|
10
|
+
export * from "./service.js";
|
|
11
|
+
export * from "./switchboard.js";
|
|
12
|
+
export * from "./uninstall.js";
|
|
13
|
+
export * from "./vetra.js";
|
|
30
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { InspectOptions } from "../services/inspect.js";
|
|
3
|
+
import type { CommandActionType } from "../types.js";
|
|
4
4
|
export declare const inspect: CommandActionType<[string, InspectOptions]>;
|
|
5
5
|
export declare function inspectCommand(program: Command): void;
|
|
6
6
|
//# sourceMappingURL=inspect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../src/commands/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../../src/commands/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AASrD,eAAO,MAAM,OAAO,EAAE,iBAAiB,CAAC,CAAC,MAAM,EAAE,cAAc,CAAC,CAK/D,CAAC;AAEF,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,QAU9C"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { type PackageManager } from "../utils.js";
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { CommandActionType, PackageManager } from "@powerhousedao/ph-cli";
|
|
4
3
|
export declare function installDependency(packageManager: PackageManager, dependencies: string[], projectPath: string, workspace?: boolean): string;
|
|
5
4
|
export declare function buildInstallCommand(packageManager: PackageManager, dependencies: string[], workspace?: boolean): string;
|
|
6
5
|
export declare const install: CommandActionType<[
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAY/E,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,MAAM,EAAE,EACtB,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,OAAO,UAGpB;AAED,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,MAAM,EAAE,EACtB,SAAS,CAAC,EAAE,OAAO,GAClB,MAAM,CAaR;AAED,eAAO,MAAM,OAAO,EAAE,iBAAiB,CACrC;IACE,MAAM,EAAE,GAAG,SAAS;IACpB;QACE,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB;CACF,CAsHF,CAAC;AAEF,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,QAoB9C"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { execSync } from "node:child_process";
|
|
2
2
|
import fs from "node:fs";
|
|
3
|
-
import { installHelp } from "
|
|
4
|
-
import { getPackageManagerFromLockfile, getProjectInfo, packageManagers, setCustomHelp, SUPPORTED_PACKAGE_MANAGERS, updateConfigFile, updateStylesFile, } from "../utils.js";
|
|
3
|
+
import { getPackageManagerFromLockfile, getProjectInfo, installHelp, packageManagers, setCustomHelp, SUPPORTED_PACKAGE_MANAGERS, updateConfigFile, updateStylesFile, } from "@powerhousedao/ph-cli";
|
|
5
4
|
export function installDependency(packageManager, dependencies, projectPath, workspace) {
|
|
6
5
|
return buildInstallCommand(packageManager, dependencies, workspace);
|
|
7
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/commands/install.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,
|
|
1
|
+
{"version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AAgB;IAC7C,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,SAAS,CAAC;SAClB,KAAK,CAAC,KAAK,CAAC;SACZ,KAAK,CAAC,GAAG,CAAC;SACV,WAAW,CAAC,iCAAiC,CAAC;SAC9C,QAAQ,CAAC,mBAAmB,EAAE,sCAAsC,CAAC;SACrE,MAAM,CAAC,cAAc,EAAE,iCAAiC,CAAC;SACzD,MAAM,CAAC,SAAS,EAAE,sBAAsB,CAAC;SACzC,MAAM,CACL,iBAAiB,EACjB,yEAAyE,CAC1E;SACA,MAAM,CACL,oCAAoC,EACpC,8BAA8B,CAC/B;SACA,MAAM,CAAC,OAAO,CAAC,CAAC;IAEnB,aAAa,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import type { CommandActionType } from "../types.js";
|
|
3
3
|
export declare const list: CommandActionType<[
|
|
4
4
|
{
|
|
5
5
|
debug?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/list.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD,eAAO,MAAM,IAAI,EAAE,iBAAiB,CAClC;IACE;QACE,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CACF,CA2BF,CAAC;AAEF,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,QAS3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/list.ts"],"names":[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