@powerhousedao/ph-cli 0.40.54-dev.0 → 0.40.54-dev.1

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.
Files changed (41) hide show
  1. package/dist/package.json +3 -1
  2. package/dist/scripts/generate-commands-md.d.ts +2 -0
  3. package/dist/scripts/generate-commands-md.d.ts.map +1 -0
  4. package/dist/scripts/generate-commands-md.js +72 -0
  5. package/dist/scripts/generate-commands-md.js.map +1 -0
  6. package/dist/src/commands/connect.d.ts.map +1 -1
  7. package/dist/src/commands/connect.js +2 -0
  8. package/dist/src/commands/connect.js.map +1 -1
  9. package/dist/src/commands/dev.d.ts.map +1 -1
  10. package/dist/src/commands/dev.js +2 -0
  11. package/dist/src/commands/dev.js.map +1 -1
  12. package/dist/src/commands/generate.d.ts.map +1 -1
  13. package/dist/src/commands/generate.js +2 -0
  14. package/dist/src/commands/generate.js.map +1 -1
  15. package/dist/src/commands/inspect.d.ts.map +1 -1
  16. package/dist/src/commands/inspect.js +2 -0
  17. package/dist/src/commands/inspect.js.map +1 -1
  18. package/dist/src/commands/install.d.ts.map +1 -1
  19. package/dist/src/commands/install.js +2 -0
  20. package/dist/src/commands/install.js.map +1 -1
  21. package/dist/src/commands/list.d.ts.map +1 -1
  22. package/dist/src/commands/list.js +2 -0
  23. package/dist/src/commands/list.js.map +1 -1
  24. package/dist/src/commands/service.d.ts.map +1 -1
  25. package/dist/src/commands/service.js +2 -0
  26. package/dist/src/commands/service.js.map +1 -1
  27. package/dist/src/commands/switchboard.d.ts.map +1 -1
  28. package/dist/src/commands/switchboard.js +2 -0
  29. package/dist/src/commands/switchboard.js.map +1 -1
  30. package/dist/src/commands/uninstall.d.ts.map +1 -1
  31. package/dist/src/commands/uninstall.js +2 -0
  32. package/dist/src/commands/uninstall.js.map +1 -1
  33. package/dist/src/commands/version.d.ts.map +1 -1
  34. package/dist/src/commands/version.js +2 -0
  35. package/dist/src/commands/version.js.map +1 -1
  36. package/dist/src/help.d.ts +41 -0
  37. package/dist/src/help.d.ts.map +1 -0
  38. package/dist/src/help.js +415 -0
  39. package/dist/src/help.js.map +1 -0
  40. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  41. package/package.json +5 -3
@@ -0,0 +1,415 @@
1
+ /**
2
+ * Help text for the connect command
3
+ */
4
+ export const connectHelp = `
5
+ Command Overview:
6
+ The connect command starts the Connect Studio, a development environment for building
7
+ and testing Powerhouse applications. It provides a visual interface for working with
8
+ your project.
9
+
10
+ This command:
11
+ 1. Starts a local Connect Studio server
12
+ 2. Provides a web interface for development
13
+ 3. Allows you to interact with your project components
14
+ 4. Supports various configuration options for customization
15
+
16
+ Options:
17
+ -p, --port <port> Port to run the server on. Default is 3000.
18
+
19
+ -h, --host Expose the server to the network. By default, the server
20
+ only accepts connections from localhost.
21
+
22
+ --https Enable HTTPS for secure connections. You may need to provide
23
+ certificate files for this option to work properly.
24
+
25
+ --open Automatically open the browser window after starting the server.
26
+
27
+ --config-file <path> Path to the powerhouse.config.js file. This allows you to
28
+ customize the behavior of Connect Studio.
29
+
30
+ Examples:
31
+ $ ph connect # Start Connect Studio on default port 3000
32
+ $ ph connect -p 8080 # Start on port 8080
33
+ $ ph connect -h # Expose to network (not just localhost)
34
+ $ ph connect --https # Enable HTTPS
35
+ $ ph connect --open # Open browser automatically
36
+ $ ph connect --config-file custom.config.js # Use custom configuration
37
+ $ ph connect -p 8080 --open # Start on port 8080 and open browser
38
+ `;
39
+ /**
40
+ * Help text for the generate command
41
+ */
42
+ export const generateHelp = `
43
+ Command Overview:
44
+ The generate command creates code from document models. It helps you build editors,
45
+ processors, and other components based on your document model files.
46
+
47
+ This command:
48
+ 1. Reads document model definitions
49
+ 2. Generates code for specified components (editors, processors, etc.)
50
+ 3. Supports customization of output and generation options
51
+ 4. Can watch files for changes and regenerate code automatically
52
+
53
+ Arguments:
54
+ [document-model-file] Optional. Path to the document model file to generate code from.
55
+ If not provided, the command will look for document models in
56
+ the default location.
57
+
58
+ Options:
59
+ -i, --interactive Run the command in interactive mode, which will guide you
60
+ through the generation process with prompts and options.
61
+
62
+ --editors <path> Path to the directory where editors should be generated or found.
63
+
64
+ -e, --editor <name> Name of the editor to generate or use.
65
+
66
+ --file <path> Specific file path to the document model.
67
+
68
+ --processors <path> Path to the directory where processors should be generated or found.
69
+
70
+ -p, --processor <name> Name of the processor to generate.
71
+
72
+ --processor-type <type> Type of processor to generate.
73
+
74
+ -s, --subgraph <name> Name of the subgraph to use or create.
75
+
76
+ --document-models <path> Path to the document models directory.
77
+
78
+ --document-types <types> Document types supported by the editor, in the format
79
+ 'namespace/type' (e.g., 'powerhouse/todo').
80
+
81
+ -is, --import-script <name> Name of the import script to generate.
82
+
83
+ -sf, --skip-format Skip formatting the generated code.
84
+
85
+ -w, --watch Watch for changes in the document model and regenerate code
86
+ when changes are detected.
87
+
88
+ -d, --drive-editor <name> Generate a drive editor with the specified name.
89
+
90
+ Examples:
91
+ $ ph generate # Generate code using defaults
92
+ $ ph generate my-document-model.zip # Generate from a specific model zip file
93
+ $ ph generate -i # Run in interactive mode
94
+ $ ph generate --editor ToDoList --document-types powerhouse/todo # Generate a ToDoList editor for todo documents
95
+ $ ph generate -p MyProcessor # Generate a specific processor
96
+ $ ph generate --watch # Generate and watch for changes
97
+ $ ph generate --drive-editor custom-drive-explorer # Generate a custom drive editor
98
+ $ ph generate -s MySubgraph # Generate with a specific subgraph
99
+ $ ph generate --skip-format # Generate without formatting
100
+ `;
101
+ /**
102
+ * Help text for the install command
103
+ */
104
+ export const installHelp = `
105
+ Command Overview:
106
+ The install command adds Powerhouse dependencies to your project. It handles installation
107
+ of packages, updates configuration files, and ensures proper setup of dependencies.
108
+
109
+ This command:
110
+ 1. Installs specified Powerhouse dependencies using your package manager
111
+ 2. Updates powerhouse.config.json to include the new dependencies
112
+ 3. Supports various installation options and configurations
113
+ 4. Works with npm, yarn, pnpm, and bun package managers
114
+
115
+ Arguments:
116
+ [dependencies...] Names of the dependencies to install. You can provide multiple
117
+ dependency names separated by spaces.
118
+
119
+ Options:
120
+ -g, --global Install the dependencies globally rather than in the current project.
121
+
122
+ --debug Show additional logs during the installation process for troubleshooting.
123
+
124
+ -w, --workspace Install the dependencies in the workspace (use this option for monorepos).
125
+ This ensures packages are installed with proper workspace configuration.
126
+
127
+ --package-manager <pm> Force a specific package manager to use. Supported values are:
128
+ "npm", "yarn", "pnpm", "bun". If not specified, the command will
129
+ detect the appropriate package manager from lockfiles.
130
+
131
+ Examples:
132
+ $ ph install @powerhousedao/core # Install a single dependency
133
+ $ ph install @powerhousedao/core @powerhousedao/utils # Install multiple dependencies
134
+ $ ph install @powerhousedao/cli -g # Install globally
135
+ $ ph install @powerhousedao/document-model -w # Install in workspace (monorepo)
136
+ $ ph install @powerhousedao/core --package-manager yarn # Force using yarn
137
+ $ ph install @powerhousedao/editor --debug # Show verbose logs during installation
138
+
139
+ Aliases:
140
+ $ ph add # Alias for install
141
+ $ ph i # Shorthand for install
142
+ `;
143
+ /**
144
+ * Help text for the uninstall command
145
+ */
146
+ export const uninstallHelp = `
147
+ Command Overview:
148
+ The uninstall command removes Powerhouse dependencies from your project. It handles the
149
+ removal of packages, updates configuration files, and ensures proper cleanup.
150
+
151
+ This command:
152
+ 1. Uninstalls specified Powerhouse dependencies using your package manager
153
+ 2. Updates powerhouse.config.json to remove the dependencies
154
+ 3. Supports various uninstallation options and configurations
155
+ 4. Works with npm, yarn, pnpm, and bun package managers
156
+
157
+ Arguments:
158
+ [dependencies...] Names of the dependencies to uninstall. You can provide multiple
159
+ dependency names separated by spaces.
160
+
161
+ Options:
162
+ -g, --global Uninstall the dependencies from the global installation
163
+ rather than from the current project.
164
+
165
+ --debug Show additional logs during the uninstallation process
166
+ for troubleshooting and to trace the command execution.
167
+
168
+ -w, --workspace Uninstall the dependencies from the workspace (use this option
169
+ for monorepos). This ensures packages are removed while
170
+ respecting workspace configurations.
171
+
172
+ --package-manager <pm> Force a specific package manager to use. Supported values are:
173
+ "npm", "yarn", "pnpm", "bun". If not specified, the command will
174
+ detect the appropriate package manager from lockfiles.
175
+
176
+ Examples:
177
+ $ ph uninstall @powerhousedao/core # Uninstall a single dependency
178
+ $ ph uninstall @powerhousedao/core @powerhousedao/utils # Uninstall multiple dependencies
179
+ $ ph uninstall @powerhousedao/cli -g # Uninstall globally
180
+ $ ph uninstall @powerhousedao/document-model -w # Uninstall from workspace (monorepo)
181
+ $ ph uninstall @powerhousedao/core --package-manager yarn # Force using yarn
182
+ $ ph uninstall @powerhousedao/editor --debug # Show verbose logs during uninstallation
183
+
184
+ Aliases:
185
+ $ ph remove # Alias for uninstall
186
+ `;
187
+ /**
188
+ * Help text for the list command
189
+ */
190
+ export const listHelp = `
191
+ Command Overview:
192
+ The list command displays information about installed Powerhouse packages in your project.
193
+ It reads the powerhouse.config.json file and shows the packages that are currently installed.
194
+
195
+ This command:
196
+ 1. Examines your project configuration
197
+ 2. Lists all installed Powerhouse packages
198
+ 3. Provides a clear overview of your project's dependencies
199
+ 4. Helps you manage and track your Powerhouse components
200
+
201
+ Options:
202
+ --debug Show additional logs during the listing process. This provides
203
+ more detailed information about the command execution and can
204
+ be helpful for troubleshooting.
205
+
206
+ Examples:
207
+ $ ph list # List all installed packages
208
+ $ ph list --debug # List packages with detailed debug information
209
+
210
+ Aliases:
211
+ $ ph l # Shorthand for list
212
+
213
+ Notes:
214
+ - The command reads from powerhouse.config.json in your project root
215
+ - If no packages are found, the command will inform you that no packages are installed
216
+ - Each package is displayed by its package name
217
+ `;
218
+ /**
219
+ * Help text for the dev command
220
+ */
221
+ export const devHelp = `
222
+ Command Overview:
223
+ The dev command sets up a development environment for working with Powerhouse projects.
224
+ It starts a local development server with a Switchboard, enabling real-time document
225
+ model editing and processing.
226
+
227
+ This command:
228
+ 1. Starts a local development server
229
+ 2. Sets up a Switchboard for document processing
230
+ 3. Enables real-time updates and code generation
231
+ 4. Configures necessary services for development
232
+
233
+ Options:
234
+ --generate Generate code automatically when document models are updated.
235
+ This keeps your code in sync with model changes.
236
+
237
+ --switchboard-port <port> Specify the port to use for the Switchboard service.
238
+ The Switchboard handles document processing and communication.
239
+
240
+ --https-key-file <path> Path to the SSL key file if using HTTPS for secure connections.
241
+
242
+ --https-cert-file <path> Path to the SSL certificate file if using HTTPS.
243
+
244
+ --config-file <path> Path to the powerhouse.config.js file. This allows you to
245
+ customize the behavior of the development environment.
246
+
247
+ -w, --watch Watch for local changes to document models and processors,
248
+ and automatically update the Switchboard accordingly.
249
+
250
+ Examples:
251
+ $ ph dev # Start dev environment with defaults
252
+ $ ph dev --generate # Auto-generate code on model changes
253
+ $ ph dev --switchboard-port 5000 # Use custom port for Switchboard
254
+ $ ph dev --config-file custom.powerhouse.config.js # Use custom configuration
255
+ $ ph dev --watch # Watch for changes and auto-update
256
+ $ ph dev --https-key-file key.pem --https-cert-file cert.pem # Use HTTPS
257
+ `;
258
+ /**
259
+ * Help text for the inspect command
260
+ */
261
+ export const inspectHelp = `
262
+ Command Overview:
263
+ The inspect command examines and provides detailed information about a Powerhouse package.
264
+ It helps you understand the structure, dependencies, and configuration of packages in
265
+ your project.
266
+
267
+ This command:
268
+ 1. Analyzes the specified package
269
+ 2. Retrieves detailed information about its structure and configuration
270
+ 3. Displays package metadata, dependencies, and other relevant information
271
+ 4. Helps troubleshoot package-related issues
272
+
273
+ Arguments:
274
+ <packageName> Required. The name of the package to inspect. This should be
275
+ the name of a Powerhouse package or component.
276
+
277
+ Options:
278
+ --debug Show additional logs during the inspection process. This is
279
+ useful for troubleshooting or getting more detailed information
280
+ about how the inspection is performed.
281
+
282
+ Examples:
283
+ $ ph inspect @powerhousedao/core # Inspect the core package
284
+ $ ph inspect @powerhousedao/document-model # Inspect the document-model package
285
+ $ ph inspect my-custom-component # Inspect a custom component
286
+ $ ph inspect @powerhousedao/editor --debug # Inspect with detailed logs
287
+
288
+ Aliases:
289
+ $ ph is # Shorthand for inspect
290
+
291
+ Notes:
292
+ - This command is useful for debugging and understanding package configurations
293
+ - Information displayed includes package structure, dependencies, and metadata
294
+ - The command requires the package to be installed in your project
295
+ `;
296
+ /**
297
+ * Help text for the service command
298
+ */
299
+ export const serviceHelp = `
300
+ Command Overview:
301
+ The service command manages Powerhouse services, allowing you to start, stop, check status,
302
+ and more. It provides a centralized way to control the lifecycle of services in your project.
303
+
304
+ This command:
305
+ 1. Controls service lifecycle (start, stop, status, etc.)
306
+ 2. Manages multiple services from a single interface
307
+ 3. Provides detailed information about running services
308
+ 4. Uses PM2 under the hood for process management
309
+
310
+ Arguments:
311
+ <action> The action to perform. Available actions:
312
+ - start: Launch the specified service
313
+ - stop: Terminate the specified service
314
+ - status: Check the current status of services
315
+ - list: List all managed services (default)
316
+ - startup: Configure services to start on system boot
317
+ - unstartup: Remove services from system startup
318
+
319
+ [service] Optional. The service to act upon. Available services:
320
+ - switchboard: The document processing engine
321
+ - connect: The Connect Studio interface
322
+ - all: Act on all services (default)
323
+
324
+ Examples:
325
+ $ ph service # List all services (same as 'ph service list all')
326
+ $ ph service start switchboard # Start the Switchboard service
327
+ $ ph service stop connect # Stop the Connect service
328
+ $ ph service start all # Start all services
329
+ $ ph service status # Check status of all services
330
+ $ ph service startup # Configure services to start on system boot
331
+ $ ph service unstartup # Remove services from system startup
332
+
333
+ Notes:
334
+ - Services are managed using PM2, a process manager for Node.js applications
335
+ - The 'status' action shows uptime, memory usage, CPU usage, and other metrics
336
+ - The 'list' action is the default when no action is specified
337
+ - The 'all' service is the default when no service is specified
338
+ `;
339
+ /**
340
+ * Help text for the switchboard command
341
+ */
342
+ export const switchboardHelp = `
343
+ Command Overview:
344
+ The switchboard command (also known as reactor) starts a local Switchboard instance,
345
+ which acts as the document processing engine for Powerhouse projects. It provides
346
+ the infrastructure for document models, processors, and real-time updates.
347
+
348
+ This command:
349
+ 1. Starts a local Switchboard server
350
+ 2. Loads document models and processors
351
+ 3. Provides an API for document operations
352
+ 4. Supports real-time updates and code generation
353
+
354
+ Options:
355
+ --port <PORT> Port to host the API. Default is 4001.
356
+
357
+ --config-file <path> Path to the powerhouse.config.js file. Default is
358
+ './powerhouse.config.json'. This configures the Switchboard behavior.
359
+
360
+ --generate Generate code automatically when document models are updated.
361
+
362
+ --db-path <DB_PATH> Path to the database for storing document data.
363
+
364
+ --https-key-file <path> Path to the SSL key file if using HTTPS for secure connections.
365
+
366
+ --https-cert-file <path> Path to the SSL certificate file if using HTTPS.
367
+
368
+ -w, --watch Watch for local changes to document models and processors,
369
+ and automatically update the Switchboard accordingly.
370
+
371
+ --packages <pkg...> List of packages to be loaded. If defined, packages specified
372
+ in the config file are ignored.
373
+
374
+ Examples:
375
+ $ ph switchboard # Start Switchboard with default settings
376
+ $ ph switchboard --port 5000 # Use custom port 5000
377
+ $ ph switchboard --generate # Enable auto code generation
378
+ $ ph switchboard --watch # Watch for local file changes
379
+ $ ph switchboard --config-file custom.json # Use custom configuration file
380
+ $ ph switchboard --packages pkg1 pkg2 # Load specific packages
381
+
382
+ Aliases:
383
+ $ ph reactor # Alias for switchboard
384
+ `;
385
+ /**
386
+ * Help text for the version command
387
+ */
388
+ export const versionHelp = `
389
+ Command Overview:
390
+ The version command displays the current version of the Powerhouse CLI tool.
391
+ It helps you track which version you're using and ensure compatibility.
392
+
393
+ This command:
394
+ 1. Retrieves version information from package.json
395
+ 2. Displays the version number of the CLI tool
396
+ 3. Can be used to verify successful installation or updates
397
+
398
+ Options:
399
+ --debug Show additional logs during version retrieval. This provides
400
+ more detailed information about how the version is determined,
401
+ which can be helpful for troubleshooting.
402
+
403
+ Examples:
404
+ $ ph version # Display the CLI version
405
+ $ ph version --debug # Show version with debug information
406
+
407
+ Aliases:
408
+ $ ph v # Shorthand for version
409
+
410
+ Notes:
411
+ - The version follows semantic versioning (MAJOR.MINOR.PATCH)
412
+ - Using the correct CLI version is important for compatibility with your project
413
+ - Version information is read from the package.json file of the CLI
414
+ `;
415
+ //# sourceMappingURL=help.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/help.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC1B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D3B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsC1B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC5B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BvB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCtB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC1B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC1B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0C9B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B1B,CAAC"}