@powerhousedao/ph-cli 6.0.0-dev.183 → 6.0.0-dev.185
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/cli.mjs +9 -3
- package/dist/cli.mjs.map +1 -1
- package/package.json +10 -10
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { t as runBuild } from "./build-BflSHYLP.mjs";
|
|
3
3
|
import { a as updateStylesFile, i as updateConfigFile, r as removeStylesImports } from "./utils-CFkM2mAC.mjs";
|
|
4
|
-
import { DEFAULT_EXPIRY_SECONDS, accessTokenArgs, assertNodeVersion, buildArgs, connectBuildArgs, connectPreviewArgs, connectStudioArgs, generateArgs, getPowerhouseProjectInfo, getPowerhouseProjectUninstallCommand, initArgs, inspectArgs, installArgs, listArgs, loginArgs, makeDependenciesWithVersions, migrateArgs, phCliHelpCommands, publishArgs, switchboardArgs, uninstallArgs, vetraArgs } from "@powerhousedao/shared/clis";
|
|
4
|
+
import { DEFAULT_EXPIRY_SECONDS, accessTokenArgs, assertNodeVersion, buildArgs, captureCliError, connectBuildArgs, connectPreviewArgs, connectStudioArgs, generateArgs, getPowerhouseProjectInfo, getPowerhouseProjectUninstallCommand, initArgs, initCliTelemetry, inspectArgs, installArgs, listArgs, loginArgs, makeDependenciesWithVersions, migrateArgs, phCliHelpCommands, publishArgs, switchboardArgs, uninstallArgs, vetraArgs } from "@powerhousedao/shared/clis";
|
|
5
5
|
import { command, run, subcommands } from "cmd-ts";
|
|
6
6
|
import { AGENTS, resolveCommand } from "package-manager-detector";
|
|
7
7
|
import { checkNpmAuth, npmPublish, resolveRegistryUrl } from "@powerhousedao/shared/registry";
|
|
@@ -639,6 +639,10 @@ const phCli = subcommands({
|
|
|
639
639
|
//#region src/cli.ts
|
|
640
640
|
async function main() {
|
|
641
641
|
assertNodeVersion();
|
|
642
|
+
await initCliTelemetry({
|
|
643
|
+
cliName: "ph-cli",
|
|
644
|
+
release: getVersion()
|
|
645
|
+
});
|
|
642
646
|
const args = process.argv.slice(2);
|
|
643
647
|
const hasNoArgs = args.length === 0;
|
|
644
648
|
const isHelp = args.some((arg) => arg === "--help" || arg === "-h");
|
|
@@ -656,8 +660,10 @@ async function main() {
|
|
|
656
660
|
]);
|
|
657
661
|
else await run(cli, args);
|
|
658
662
|
}
|
|
659
|
-
await main().catch((error) => {
|
|
660
|
-
|
|
663
|
+
await main().catch(async (error) => {
|
|
664
|
+
const isDebug = process.argv.slice(2).includes("--debug");
|
|
665
|
+
await captureCliError(error);
|
|
666
|
+
if (isDebug) throw error;
|
|
661
667
|
if (error instanceof Error) {
|
|
662
668
|
console.error(error.message);
|
|
663
669
|
process.exit(1);
|
package/dist/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.mjs","names":["version","build","getConfig"],"sources":["../src/get-version.ts","../src/utils/constants.ts","../src/commands/ph-cli-help.ts","../src/commands/access-token.ts","../src/commands/build.ts","../src/commands/connect.ts","../src/commands/generate.ts","../src/commands/init.ts","../src/commands/inspect.ts","../src/commands/install.ts","../src/commands/list.ts","../src/commands/login.ts","../src/commands/logout.ts","../src/commands/migrate.ts","../src/commands/publish.ts","../src/commands/switchboard.ts","../src/commands/uninstall.ts","../src/commands/vetra.ts","../src/commands/ph-cli-commands.ts","../src/commands/ph-cli.ts","../src/cli.ts"],"sourcesContent":["export function getVersion() {\n return (\n process.env.WORKSPACE_VERSION ||\n process.env.npm_package_version ||\n \"unknown\"\n );\n}\n","export const PH_CLI_DESCRIPTION =\n \"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.\" as const;\n","import { phCliHelpCommands } from \"@powerhousedao/shared/clis\";\nimport { subcommands } from \"cmd-ts\";\nimport { getVersion } from \"../get-version.js\";\nimport { PH_CLI_DESCRIPTION } from \"../utils/constants.js\";\n\nconst version = getVersion();\nexport const phCliHelp = subcommands({\n name: \"ph-cli\",\n description: PH_CLI_DESCRIPTION,\n version,\n cmds: phCliHelpCommands,\n});\n","import {\n accessTokenArgs,\n DEFAULT_EXPIRY_SECONDS,\n} from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const accessToken = command({\n name: \"access-token\",\n description: `\nThe access-token command generates a bearer token for API authentication. This token\ncan be used to authenticate requests to Powerhouse APIs like reactor-api (Switchboard).\n\nThis command:\n1. Uses your CLI's cryptographic identity (DID) to sign a verifiable credential\n2. Creates a JWT bearer token with configurable expiration\n3. Outputs the token to stdout (info to stderr) for easy piping\n\nPrerequisites:\n You must have a cryptographic identity. Run 'ph login' first to:\n - Generate a keypair (stored in .ph/.keypair.json)\n - Optionally link your Ethereum address (stored in .ph/.renown.json)\n\nToken Details:\n The generated token is a JWT (JSON Web Token) containing:\n - Issuer (iss): Your CLI's DID (did:key:...)\n - Subject (sub): Your CLI's DID\n - Credential Subject: Chain ID, network ID, and address (if authenticated)\n - Expiration (exp): Based on --expiry option\n - Audience (aud): If --audience is specified\n\nOutput:\n- Token information (DID, address, expiry) is printed to stderr\n- The token itself is printed to stdout for easy piping/copying\n\nThis allows you to use the command in scripts:\n TOKEN=$(ph access-token)\n curl -H \"Authorization: Bearer $TOKEN\" http://localhost:4001/graphql\n\nUsage with APIs:\n Generate token and use with curl\n TOKEN=$(ph access-token --expiry 1d)\n curl -X POST http://localhost:4001/graphql \\\\\n -H \"Content-Type: application/json\" \\\\\n -H \"Authorization: Bearer $TOKEN\" \\\\\n -d '{\"query\": \"{ drives { id name } }\"}'\n\n Export as environment variable\n export PH_ACCESS_TOKEN=$(ph access-token)\n\nNotes:\n - Tokens are self-signed using your CLI's private key\n - No network request is made; tokens are generated locally\n - The recipient API must trust your CLI's DID to accept the token\n - For reactor-api, ensure AUTH_ENABLED=true to require authentication\n`,\n args: accessTokenArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n const { generateAccessToken, parseExpiry, formatExpiry } =\n await import(\"@renown/sdk/node\");\n const { getRenown } = await import(\"../services/auth.js\");\n const renown = await getRenown();\n\n let expiresIn = DEFAULT_EXPIRY_SECONDS;\n if (args.expiry) expiresIn = parseExpiry(args.expiry);\n\n const result = await generateAccessToken(renown, {\n expiresIn,\n aud: args.audience,\n });\n\n // Output token info to stderr, token itself to stdout for piping\n console.error(`CLI DID: ${result.did}`);\n console.error(`ETH Address: ${result.address}`);\n console.error(`Token expires in: ${formatExpiry(expiresIn)}`);\n console.error(\"\");\n\n console.log(result.token);\n process.exit(0);\n },\n});\n","import { buildArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\nimport { runBuild } from \"../services/build.js\";\n\nexport const build = command({\n name: \"build\",\n args: buildArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n try {\n await runBuild(args);\n } catch (error) {\n console.error(error);\n process.exit(1);\n }\n },\n});\n","import {\n connectBuildArgs,\n connectPreviewArgs,\n connectStudioArgs,\n} from \"@powerhousedao/shared/clis\";\nimport { command, subcommands } from \"cmd-ts\";\nexport const studio = command({\n name: \"studio\",\n description: `The studio command starts the Connect Studio, a development environment for building\nand testing Powerhouse applications. It provides a visual interface for working with\nyour project.\n\nThis command:\n1. Starts a local Connect Studio server\n2. Provides a web interface for development\n3. Allows you to interact with your project components\n4. Supports various configuration options for customization\n`,\n args: connectStudioArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { runConnectStudio } = await import(\"../services/connect-studio.js\");\n await runConnectStudio(args);\n },\n});\n\nexport const build = command({\n name: \"build\",\n description: `The Connect build command creates a production build with the project's local and\nexternal packages included\n`,\n args: connectBuildArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n const { runConnectBuild } = await import(\"../services/connect-build.js\");\n await runConnectBuild(args);\n process.exit(0);\n },\n});\n\nexport const preview = command({\n name: \"preview\",\n description: `The Connect preview command previews a built Connect project.\nNOTE: You must run \\`ph connect build\\` first\n`,\n args: connectPreviewArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { runConnectPreview } =\n await import(\"../services/connect-preview.js\");\n await runConnectPreview(args);\n },\n});\n\nexport const connect = subcommands({\n name: \"connect\",\n description: `Powerhouse Connect commands. Use with \\`studio\\`, \\`build\\` or \\`preview\\`. Defaults to \\`studio\\` if not specified.`,\n cmds: {\n studio,\n build,\n preview,\n },\n});\n","import { generateArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const generate = command({\n name: \"generate\",\n description: `\nThe generate command creates code from document models. It helps you build editors, \nprocessors, and other components based on your document model files.\n\nThis command:\n1. Reads document model definitions\n2. Generates code for specified components (editors, processors, etc.)\n3. Supports customization of output and generation options\n4. Can watch files for changes and regenerate code automatically\n`,\n args: generateArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { startGenerate } = await import(\"../services/generate.js\");\n await startGenerate(args);\n process.exit(0);\n },\n});\n","import { initArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const init = command({\n name: \"init\",\n description: \"Initialize a new project\",\n args: initArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log({ args });\n }\n const { startInit } = await import(\"../services/init.js\");\n await startInit(args);\n process.exit(0);\n },\n});\n","import { inspectArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const inspect = command({\n name: \"inspect\",\n description: `\nThe inspect command examines and provides detailed information about a Powerhouse package.\nIt helps you understand the structure, dependencies, and configuration of packages in\nyour project.\n\nThis command:\n1. Analyzes the specified package\n2. Retrieves detailed information about its structure and configuration\n3. Displays package metadata, dependencies, and other relevant information\n4. Helps troubleshoot package-related issues`,\n aliases: [\"is\"],\n args: inspectArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { startInspect } = await import(\"../services/inspect.js\");\n startInspect(args);\n process.exit(0);\n },\n});\n","import {\n getPowerhouseProjectInfo,\n installArgs,\n makeDependenciesWithVersions,\n} from \"@powerhousedao/shared/clis\";\nimport { resolveRegistryUrl } from \"@powerhousedao/shared/registry\";\nimport { execSync } from \"child_process\";\nimport { command } from \"cmd-ts\";\nimport { resolveCommand } from \"package-manager-detector\";\nimport { updateConfigFile, updateStylesFile } from \"../utils.js\";\n\nexport const install = command({\n name: \"install\",\n aliases: [\"add\", \"i\"],\n description: `\nThe install command adds Powerhouse dependencies to your project.\n\nBy default it only registers the package in powerhouse.config.json with\nprovider \"registry\" — Connect will load it from the registry CDN at runtime.\n\nWith --local, the package is also installed into node_modules and marked\nas provider \"local\" — it will be bundled into ph connect build so the\npreview works without the registry being reachable.\n\nResolution order for the registry URL:\n --registry flag > PH_REGISTRY_URL env > powerhouse.config.json > default\n `,\n args: installArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n const {\n projectPath,\n localProjectPath,\n globalProjectPath,\n packageManager,\n isGlobal,\n } = await getPowerhouseProjectInfo(args);\n\n if (!projectPath) {\n throw new Error(`Could not find project path to install from.`);\n }\n\n const registryUrl = resolveRegistryUrl({\n registry: args.registry,\n projectPath,\n });\n\n if (args.debug) {\n console.log(\">>> registryUrl\", registryUrl);\n }\n\n const dependenciesWithVersions = await makeDependenciesWithVersions(\n args.dependencies,\n registryUrl,\n );\n\n if (args.debug) {\n console.log(\">>> parsedDependencies\", dependenciesWithVersions);\n console.log(\"\\n>>> projectInfo\", {\n localProjectPath,\n globalProjectPath,\n packageManager,\n isGlobal,\n });\n }\n\n if (args.local) {\n if (dependenciesWithVersions.length === 0) {\n throw new Error(\n \"--local requires at least one package name (e.g. ph install --local @scope/pkg)\",\n );\n }\n try {\n const specs = dependenciesWithVersions.map((d) =>\n d.version ? `${d.name}@${d.version}` : d.name,\n );\n\n // Route only the scopes of the packages being installed to the\n // resolved registry, leaving transitive deps from other scopes\n // (and unscoped packages) on the package manager's default. This\n // avoids requiring a project-level .npmrc when the user already\n // has packageRegistryUrl in powerhouse.config.json.\n const scopes = new Set<string>();\n for (const dep of dependenciesWithVersions) {\n if (dep.name.startsWith(\"@\")) {\n const scope = dep.name.split(\"/\")[0];\n scopes.add(scope);\n }\n }\n const scopeRegistryArgs = Array.from(scopes).map(\n (scope) => `--${scope}:registry=${registryUrl}`,\n );\n\n const resolved = resolveCommand(packageManager, \"add\", [\n ...specs,\n ...scopeRegistryArgs,\n ]);\n if (!resolved) {\n throw new Error(\n `Failed to resolve install command for package manager \"${packageManager}\".`,\n );\n }\n const installCommand = `${resolved.command} ${resolved.args.join(\" \")}`;\n if (scopeRegistryArgs.length > 0) {\n console.log(\n `Installing dependencies 📦 (routing ${Array.from(scopes).join(\", \")} → ${registryUrl})...`,\n );\n } else {\n console.log(\"Installing dependencies 📦...\");\n }\n console.log(`> ${installCommand}`);\n execSync(installCommand, {\n stdio: \"inherit\",\n cwd: projectPath,\n });\n console.log(\"Dependency installed successfully 🎉\");\n } catch (error) {\n console.error(\"❌ Failed to install dependencies\");\n throw error;\n }\n }\n\n try {\n console.log(\"⚙️ Updating powerhouse config file...\");\n updateConfigFile(\n dependenciesWithVersions,\n projectPath,\n \"install\",\n args.local ? \"local\" : \"registry\",\n );\n console.log(\"Config file updated successfully 🎉\");\n } catch (error) {\n console.error(\"❌ Failed to update config file\");\n throw error;\n }\n\n if (args.local) {\n try {\n console.log(\"⚙️ Updating styles.css file...\");\n updateStylesFile(dependenciesWithVersions, projectPath);\n console.log(\"Styles file updated successfully 🎉\");\n } catch (error) {\n console.error(\"❌ Failed to update styles file\");\n throw error;\n }\n }\n\n process.exit(0);\n },\n});\n","import { getConfig } from \"@powerhousedao/config/node\";\nimport { getPowerhouseProjectInfo, listArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const list = command({\n name: \"list\",\n description: `\nThe list command displays information about installed Powerhouse packages in your project.\nIt reads the powerhouse.config.json file and shows the packages that are currently installed.\n\nThis command:\n1. Examines your project configuration\n2. Lists all installed Powerhouse packages\n3. Provides a clear overview of your project's dependencies\n4. Helps you manage and track your Powerhouse components\n`,\n aliases: [\"l\"],\n args: listArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n try {\n const projectInfo = await getPowerhouseProjectInfo();\n console.log(\"\\n>>> projectInfo\", projectInfo);\n\n const phConfig = getConfig(\n projectInfo.projectPath + \"/powerhouse.config.json\",\n );\n\n if (!phConfig.packages || phConfig.packages.length === 0) {\n console.log(\"No packages found in the project\");\n return;\n }\n\n console.log(\"Installed Packages:\\n\");\n phConfig.packages.forEach((pkg) => {\n console.log(pkg.packageName);\n });\n } catch (e) {\n console.log(\"No packages found in the project\");\n }\n process.exit(0);\n },\n});\n","import { loginArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const login = command({\n name: \"login\",\n description: `\nThe login command authenticates you with Renown using your Ethereum wallet. This enables\nthe CLI to act on behalf of your Ethereum identity for authenticated operations.\n\nThis command:\n1. Generates or loads a cryptographic identity (DID) for the CLI\n2. Opens your browser to the Renown authentication page\n3. You authorize the CLI's DID to act on behalf of your Ethereum address\n4. Stores the credentials locally in .ph/.renown.json\n `,\n args: loginArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n const { getRenown } = await import(\"../services/auth.js\");\n const renown = await getRenown(args.renownUrl);\n\n if (args.showDid) {\n console.log(renown.did);\n process.exit(0);\n }\n\n if (args.status) {\n const { getAuthStatus } = await import(\"@renown/sdk/node\");\n const status = getAuthStatus(renown);\n if (!status.authenticated || !status.address) {\n console.log(\"Not authenticated with an Ethereum address.\");\n console.log('Run \"ph login\" to authenticate.');\n } else {\n console.log(\"Authenticated\");\n console.log(` ETH Address: ${status.address}`);\n console.log(` User DID: ${status.userDid}`);\n console.log(` Chain ID: ${status.chainId}`);\n console.log(` CLI DID: ${status.cliDid}`);\n console.log(\n ` Authenticated at: ${status.authenticatedAt?.toLocaleString()}`,\n );\n console.log(` Renown URL: ${status.baseUrl}`);\n }\n process.exit(0);\n }\n\n if (args.logout) {\n await handleLogout();\n process.exit(0);\n }\n\n const { browserLogin } = await import(\"@renown/sdk/node\");\n\n console.debug(\"Initializing cryptographic identity...\");\n console.log(`CLI DID: ${renown.did}`);\n\n try {\n const timeoutMs = args.timeout ? args.timeout * 1000 : undefined;\n\n const result = await browserLogin(renown, {\n renownUrl: args.renownUrl,\n timeoutMs,\n onLoginUrl: (url, sessionId) => {\n console.log(\"Opening browser for authentication...\");\n console.log(`Session ID: ${sessionId.slice(0, 8)}...`);\n console.log(`Login URL: ${url}`);\n console.log();\n console.log(\"Waiting for authentication in browser\");\n console.log(`(timeout in ${(timeoutMs ?? 300_000) / 1000} seconds)`);\n console.log();\n console.log(\n \"Please connect your wallet and authorize this CLI to act on your behalf.\",\n );\n console.log();\n process.stdout.write(\"Waiting\");\n },\n onPollTick: () => process.stdout.write(\".\"),\n onBrowserOpenFailed: (url) => {\n console.error(\"Failed to open browser automatically.\");\n console.log(`Please open this URL manually: ${url}`);\n },\n });\n\n console.log(); // New line after dots\n console.log();\n console.log(\"Successfully authenticated!\");\n console.log(` ETH Address: ${result.user.address}`);\n console.log(` User DID: ${result.user.did}`);\n console.log(` CLI DID: ${result.cliDid}`);\n console.log();\n console.log(\"The CLI can now act on behalf of your Ethereum identity.\");\n } catch (error) {\n console.log(); // New line after dots\n throw error;\n }\n\n process.exit(0);\n },\n});\n\nexport async function handleLogout() {\n const { getRenown } = await import(\"../services/auth.js\");\n const renown = await getRenown();\n if (!renown.user) {\n console.log(\"Not currently authenticated.\");\n return;\n }\n\n try {\n await renown.logout();\n console.log(\"Successfully logged out.\");\n } catch (error) {\n console.error(\"Failed to clear credentials.\");\n console.debug(error);\n }\n}\n","import { command } from \"cmd-ts\";\nimport { handleLogout } from \"./login.js\";\n\nexport const logout = command({\n name: \"logout\",\n description: `\nThe logout command removes an existing session created with 'ph login'`,\n args: {},\n handler: async () => {\n await handleLogout();\n process.exit(0);\n },\n});\n","import { migrateArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const migrate = command({\n name: \"migrate\",\n args: migrateArgs,\n description: \"Run migrations\",\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { startMigrate } = await import(\"../services/migrate.js\");\n await startMigrate(args);\n process.exit(0);\n },\n});\n","import {\n getPowerhouseProjectInfo,\n publishArgs,\n} from \"@powerhousedao/shared/clis\";\nimport {\n checkNpmAuth,\n npmPublish,\n resolveRegistryUrl,\n} from \"@powerhousedao/shared/registry\";\nimport { command } from \"cmd-ts\";\n\nexport const publish = command({\n name: \"publish\",\n description: `\nPublish a package to the Powerhouse registry. This is a thin wrapper around npm publish\nthat automatically sets the registry URL.\n\nThis command:\n1. Resolves the registry URL (--registry flag > PH_REGISTRY_URL env > powerhouse.config.json > default)\n2. Checks authentication with the registry via npm whoami\n3. Forwards all additional arguments to npm publish\n `,\n args: publishArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n const { projectPath } = await getPowerhouseProjectInfo();\n\n if (!projectPath) {\n throw new Error(\"Could not find project path.\");\n }\n\n const registryUrl = resolveRegistryUrl({\n registry: args.registry,\n projectPath,\n });\n\n if (args.debug) {\n console.log(\">>> registryUrl\", registryUrl);\n }\n\n try {\n await checkNpmAuth(registryUrl);\n } catch {\n console.error(`Not authenticated with registry: ${registryUrl}`);\n console.error(`Run: npm adduser --registry ${registryUrl}`);\n process.exit(1);\n }\n\n if (args.debug) {\n console.log(\n \">>> command\",\n `npm publish --registry ${registryUrl} ${args.forwardedArgs.join(\" \")}`,\n );\n }\n\n console.log(`Publishing to ${registryUrl}...`);\n const result = await npmPublish({\n registryUrl,\n cwd: projectPath,\n args: args.forwardedArgs,\n });\n if (result.stdout) {\n console.log(result.stdout);\n }\n\n process.exit(0);\n },\n});\n","import { switchboardArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const switchboard = command({\n name: \"switchboard\",\n aliases: [\"reactor\"],\n description: `\nThe switchboard command starts a local Switchboard instance, which acts as the document\nprocessing engine for Powerhouse projects. It provides the infrastructure for document\nmodels, processors, and real-time updates.\n\nThis command:\n1. Starts a local switchboard server\n2. Loads document models and processors\n3. Provides an API for document operations\n4. Enables real-time document processing\n5. Can authenticate with remote services using your identity from 'ph login'`,\n args: switchboardArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { basePath, dbPath, migrate, migrateStatus } = args;\n if (basePath) {\n process.env.BASE_PATH = basePath;\n }\n\n if (migrate || migrateStatus) {\n const { runSwitchboardMigrations } =\n await import(\"../services/switchboard-migrate.js\");\n await runSwitchboardMigrations({\n dbPath,\n statusOnly: migrateStatus,\n });\n process.exit(0);\n }\n\n const { startSwitchboard } = await import(\"../services/switchboard.js\");\n const { defaultDriveUrl, renown } = await startSwitchboard(args);\n console.log(\" ➜ Switchboard:\", defaultDriveUrl);\n if (renown) {\n console.log(\" ➜ Identity:\", renown.did);\n }\n },\n});\n","import {\n getPowerhouseProjectInfo,\n getPowerhouseProjectUninstallCommand,\n makeDependenciesWithVersions,\n uninstallArgs,\n} from \"@powerhousedao/shared/clis\";\nimport { execSync } from \"child_process\";\nimport { command } from \"cmd-ts\";\nimport { AGENTS } from \"package-manager-detector\";\nimport { removeStylesImports, updateConfigFile } from \"../utils.js\";\n\nexport const uninstall = command({\n name: \"uninstall\",\n aliases: [\"remove\"],\n description: `\nThe uninstall command removes Powerhouse dependencies from your project. It handles the\nremoval of packages, updates configuration files, and ensures proper cleanup.\n\nThis command:\n1. Uninstalls specified Powerhouse dependencies using your package manager\n2. Updates powerhouse.config.json to remove the dependencies\n3. Supports various uninstallation options and configurations\n4. Works with ${AGENTS.join(\", \")} package managers\n`,\n args: uninstallArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n const {\n projectPath,\n localProjectPath,\n globalProjectPath,\n packageManager,\n isGlobal,\n } = await getPowerhouseProjectInfo(args);\n\n if (!projectPath) {\n throw new Error(`Could not find project path to uninstall from`);\n }\n\n const dependenciesWithVersions = await makeDependenciesWithVersions(\n args.dependencies,\n );\n\n if (args.debug) {\n console.log(\">>> parsedDependencies\", dependenciesWithVersions);\n }\n\n if (args.debug) {\n console.log(\"\\n>>> projectInfo\", {\n localProjectPath,\n globalProjectPath,\n packageManager,\n isGlobal,\n });\n }\n\n try {\n console.log(\"Uninstalling dependencies 📦 ...\");\n const uninstallCommand =\n await getPowerhouseProjectUninstallCommand(packageManager);\n execSync(uninstallCommand, {\n stdio: \"inherit\",\n cwd: projectPath,\n });\n console.log(\"Dependency uninstalled successfully 🎉\");\n } catch (error) {\n console.error(\"❌ Failed to uninstall dependencies\");\n throw error;\n }\n\n try {\n console.log(\"⚙️ Updating powerhouse config file...\");\n updateConfigFile(dependenciesWithVersions, projectPath, \"uninstall\");\n console.log(\"Config file updated successfully 🎉\");\n } catch (error) {\n console.error(\"❌ Failed to update config file\");\n throw error;\n }\n\n try {\n console.log(\"⚙️ Updating styles.css file...\");\n removeStylesImports(dependenciesWithVersions, projectPath);\n console.log(\"Styles file updated successfully 🎉\");\n } catch (error) {\n console.error(\"❌ Failed to update styles file\");\n throw error;\n }\n\n process.exit(0);\n },\n});\n","import { vetraArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const vetra = command({\n name: \"vetra\",\n description: `\nThe vetra command sets up a Vetra development environment for working with Vetra projects.\nIt starts a Vetra Switchboard and optionally Connect Studio, enabling document collaboration \nand real-time processing with a \"Vetra\" drive or connection to remote drives.\n\nThis command:\n1. Starts a Vetra Switchboard with a \"Vetra\" drive for document storage\n2. Optionally connects to remote drives instead of creating a local drive\n3. Starts Connect Studio pointing to the Switchboard for user interaction (unless disabled)\n4. Enables real-time updates, collaboration, and code generation`,\n args: vetraArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { startVetra } = await import(\"../services/vetra.js\");\n await startVetra(args);\n },\n});\n","import { accessToken } from \"./access-token.js\";\nimport { build } from \"./build.js\";\nimport { connect } from \"./connect.js\";\nimport { generate } from \"./generate.js\";\nimport { init } from \"./init.js\";\nimport { inspect } from \"./inspect.js\";\nimport { install } from \"./install.js\";\nimport { list } from \"./list.js\";\nimport { login } from \"./login.js\";\nimport { logout } from \"./logout.js\";\nimport { migrate } from \"./migrate.js\";\nimport { publish } from \"./publish.js\";\nimport { switchboard } from \"./switchboard.js\";\nimport { uninstall } from \"./uninstall.js\";\nimport { vetra } from \"./vetra.js\";\n\nexport const phCliCommands = {\n init,\n generate,\n vetra,\n connect,\n build,\n publish,\n \"access-token\": accessToken,\n inspect,\n list,\n migrate,\n switchboard,\n login,\n logout,\n install,\n uninstall,\n} as const;\n","import { subcommands } from \"cmd-ts\";\nimport { getVersion } from \"../get-version.js\";\nimport { PH_CLI_DESCRIPTION } from \"../utils/constants.js\";\nimport { phCliCommands } from \"./ph-cli-commands.js\";\n\nconst version = getVersion();\nexport const phCli = subcommands({\n name: \"ph-cli\",\n description: PH_CLI_DESCRIPTION,\n version,\n cmds: phCliCommands,\n});\n","#!/usr/bin/env node\nimport { assertNodeVersion } from \"@powerhousedao/shared/clis\";\nimport { run } from \"cmd-ts\";\nimport { phCliHelp } from \"./commands/ph-cli-help.js\";\nimport { phCli } from \"./commands/ph-cli.js\";\n\nasync function main() {\n assertNodeVersion();\n const args = process.argv.slice(2);\n const hasNoArgs = args.length === 0;\n const isHelp = args.some((arg) => arg === \"--help\" || arg === \"-h\");\n const isTopLevelHelp = isHelp && args.length === 1;\n const showTopLevelHelp = hasNoArgs || isTopLevelHelp;\n const cli = showTopLevelHelp ? phCliHelp : phCli;\n const [command, ...restArgs] = args;\n if (\n command === \"connect\" &&\n ![\"studio\", \"build\", \"preview\"].includes(args[1]) &&\n !isHelp\n ) {\n const argsWithDefaultConnectSubCommand = [\"connect\", \"studio\", ...restArgs];\n await run(cli, argsWithDefaultConnectSubCommand);\n } else {\n await run(cli, args);\n }\n}\n\nawait main().catch((error) => {\n const isDebug = process.argv.slice(2).includes(\"--debug\");\n if (isDebug) {\n throw error;\n }\n if (error instanceof Error) {\n console.error(error.message);\n process.exit(1);\n } else {\n throw error;\n }\n});\n"],"mappings":";;;;;;;;;;AAAA,SAAgB,aAAa;AAC3B,QACE,QAAQ,IAAI,qBACZ,QAAQ,IAAI,uBACZ;;;;ACJJ,MAAa,qBACX;ACKF,MAAa,YAAY,YAAY;CACnC,MAAM;CACN,aAAa;CACb,SAJc,YAAY;CAK1B,MAAM;CACP,CAAC;;;ACLF,MAAa,cAAc,QAAQ;CACjC,MAAM;CACN,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Cb,MAAM;CACN,SAAS,OAAO,SAAS;AACvB,MAAI,KAAK,MACP,SAAQ,IAAI,KAAK;EAGnB,MAAM,EAAE,qBAAqB,aAAa,iBACxC,MAAM,OAAO;EACf,MAAM,EAAE,cAAc,MAAM,OAAO;EACnC,MAAM,SAAS,MAAM,WAAW;EAEhC,IAAI,YAAY;AAChB,MAAI,KAAK,OAAQ,aAAY,YAAY,KAAK,OAAO;EAErD,MAAM,SAAS,MAAM,oBAAoB,QAAQ;GAC/C;GACA,KAAK,KAAK;GACX,CAAC;AAGF,UAAQ,MAAM,YAAY,OAAO,MAAM;AACvC,UAAQ,MAAM,gBAAgB,OAAO,UAAU;AAC/C,UAAQ,MAAM,qBAAqB,aAAa,UAAU,GAAG;AAC7D,UAAQ,MAAM,GAAG;AAEjB,UAAQ,IAAI,OAAO,MAAM;AACzB,UAAQ,KAAK,EAAE;;CAElB,CAAC;;;AC/EF,MAAaC,UAAQ,QAAQ;CAC3B,MAAM;CACN,MAAM;CACN,SAAS,OAAO,SAAS;AACvB,MAAI,KAAK,MACP,SAAQ,IAAI,KAAK;AAEnB,MAAI;AACF,SAAM,SAAS,KAAK;WACb,OAAO;AACd,WAAQ,MAAM,MAAM;AACpB,WAAQ,KAAK,EAAE;;;CAGpB,CAAC;AC2CF,MAAa,UA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AAM;AAER,KAAI,iBAAiB,OAAO;AAC1B,UAAQ,MAAM,MAAM,QAAQ;AAC5B,UAAQ,KAAK,EAAE;OAEf,OAAM;EAER"}
|
|
1
|
+
{"version":3,"file":"cli.mjs","names":["version","build","getConfig"],"sources":["../src/get-version.ts","../src/utils/constants.ts","../src/commands/ph-cli-help.ts","../src/commands/access-token.ts","../src/commands/build.ts","../src/commands/connect.ts","../src/commands/generate.ts","../src/commands/init.ts","../src/commands/inspect.ts","../src/commands/install.ts","../src/commands/list.ts","../src/commands/login.ts","../src/commands/logout.ts","../src/commands/migrate.ts","../src/commands/publish.ts","../src/commands/switchboard.ts","../src/commands/uninstall.ts","../src/commands/vetra.ts","../src/commands/ph-cli-commands.ts","../src/commands/ph-cli.ts","../src/cli.ts"],"sourcesContent":["export function getVersion() {\n return (\n process.env.WORKSPACE_VERSION ||\n process.env.npm_package_version ||\n \"unknown\"\n );\n}\n","export const PH_CLI_DESCRIPTION =\n \"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.\" as const;\n","import { phCliHelpCommands } from \"@powerhousedao/shared/clis\";\nimport { subcommands } from \"cmd-ts\";\nimport { getVersion } from \"../get-version.js\";\nimport { PH_CLI_DESCRIPTION } from \"../utils/constants.js\";\n\nconst version = getVersion();\nexport const phCliHelp = subcommands({\n name: \"ph-cli\",\n description: PH_CLI_DESCRIPTION,\n version,\n cmds: phCliHelpCommands,\n});\n","import {\n accessTokenArgs,\n DEFAULT_EXPIRY_SECONDS,\n} from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const accessToken = command({\n name: \"access-token\",\n description: `\nThe access-token command generates a bearer token for API authentication. This token\ncan be used to authenticate requests to Powerhouse APIs like reactor-api (Switchboard).\n\nThis command:\n1. Uses your CLI's cryptographic identity (DID) to sign a verifiable credential\n2. Creates a JWT bearer token with configurable expiration\n3. Outputs the token to stdout (info to stderr) for easy piping\n\nPrerequisites:\n You must have a cryptographic identity. Run 'ph login' first to:\n - Generate a keypair (stored in .ph/.keypair.json)\n - Optionally link your Ethereum address (stored in .ph/.renown.json)\n\nToken Details:\n The generated token is a JWT (JSON Web Token) containing:\n - Issuer (iss): Your CLI's DID (did:key:...)\n - Subject (sub): Your CLI's DID\n - Credential Subject: Chain ID, network ID, and address (if authenticated)\n - Expiration (exp): Based on --expiry option\n - Audience (aud): If --audience is specified\n\nOutput:\n- Token information (DID, address, expiry) is printed to stderr\n- The token itself is printed to stdout for easy piping/copying\n\nThis allows you to use the command in scripts:\n TOKEN=$(ph access-token)\n curl -H \"Authorization: Bearer $TOKEN\" http://localhost:4001/graphql\n\nUsage with APIs:\n Generate token and use with curl\n TOKEN=$(ph access-token --expiry 1d)\n curl -X POST http://localhost:4001/graphql \\\\\n -H \"Content-Type: application/json\" \\\\\n -H \"Authorization: Bearer $TOKEN\" \\\\\n -d '{\"query\": \"{ drives { id name } }\"}'\n\n Export as environment variable\n export PH_ACCESS_TOKEN=$(ph access-token)\n\nNotes:\n - Tokens are self-signed using your CLI's private key\n - No network request is made; tokens are generated locally\n - The recipient API must trust your CLI's DID to accept the token\n - For reactor-api, ensure AUTH_ENABLED=true to require authentication\n`,\n args: accessTokenArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n const { generateAccessToken, parseExpiry, formatExpiry } =\n await import(\"@renown/sdk/node\");\n const { getRenown } = await import(\"../services/auth.js\");\n const renown = await getRenown();\n\n let expiresIn = DEFAULT_EXPIRY_SECONDS;\n if (args.expiry) expiresIn = parseExpiry(args.expiry);\n\n const result = await generateAccessToken(renown, {\n expiresIn,\n aud: args.audience,\n });\n\n // Output token info to stderr, token itself to stdout for piping\n console.error(`CLI DID: ${result.did}`);\n console.error(`ETH Address: ${result.address}`);\n console.error(`Token expires in: ${formatExpiry(expiresIn)}`);\n console.error(\"\");\n\n console.log(result.token);\n process.exit(0);\n },\n});\n","import { buildArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\nimport { runBuild } from \"../services/build.js\";\n\nexport const build = command({\n name: \"build\",\n args: buildArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n try {\n await runBuild(args);\n } catch (error) {\n console.error(error);\n process.exit(1);\n }\n },\n});\n","import {\n connectBuildArgs,\n connectPreviewArgs,\n connectStudioArgs,\n} from \"@powerhousedao/shared/clis\";\nimport { command, subcommands } from \"cmd-ts\";\nexport const studio = command({\n name: \"studio\",\n description: `The studio command starts the Connect Studio, a development environment for building\nand testing Powerhouse applications. It provides a visual interface for working with\nyour project.\n\nThis command:\n1. Starts a local Connect Studio server\n2. Provides a web interface for development\n3. Allows you to interact with your project components\n4. Supports various configuration options for customization\n`,\n args: connectStudioArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { runConnectStudio } = await import(\"../services/connect-studio.js\");\n await runConnectStudio(args);\n },\n});\n\nexport const build = command({\n name: \"build\",\n description: `The Connect build command creates a production build with the project's local and\nexternal packages included\n`,\n args: connectBuildArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n const { runConnectBuild } = await import(\"../services/connect-build.js\");\n await runConnectBuild(args);\n process.exit(0);\n },\n});\n\nexport const preview = command({\n name: \"preview\",\n description: `The Connect preview command previews a built Connect project.\nNOTE: You must run \\`ph connect build\\` first\n`,\n args: connectPreviewArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { runConnectPreview } =\n await import(\"../services/connect-preview.js\");\n await runConnectPreview(args);\n },\n});\n\nexport const connect = subcommands({\n name: \"connect\",\n description: `Powerhouse Connect commands. Use with \\`studio\\`, \\`build\\` or \\`preview\\`. Defaults to \\`studio\\` if not specified.`,\n cmds: {\n studio,\n build,\n preview,\n },\n});\n","import { generateArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const generate = command({\n name: \"generate\",\n description: `\nThe generate command creates code from document models. It helps you build editors, \nprocessors, and other components based on your document model files.\n\nThis command:\n1. Reads document model definitions\n2. Generates code for specified components (editors, processors, etc.)\n3. Supports customization of output and generation options\n4. Can watch files for changes and regenerate code automatically\n`,\n args: generateArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { startGenerate } = await import(\"../services/generate.js\");\n await startGenerate(args);\n process.exit(0);\n },\n});\n","import { initArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const init = command({\n name: \"init\",\n description: \"Initialize a new project\",\n args: initArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log({ args });\n }\n const { startInit } = await import(\"../services/init.js\");\n await startInit(args);\n process.exit(0);\n },\n});\n","import { inspectArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const inspect = command({\n name: \"inspect\",\n description: `\nThe inspect command examines and provides detailed information about a Powerhouse package.\nIt helps you understand the structure, dependencies, and configuration of packages in\nyour project.\n\nThis command:\n1. Analyzes the specified package\n2. Retrieves detailed information about its structure and configuration\n3. Displays package metadata, dependencies, and other relevant information\n4. Helps troubleshoot package-related issues`,\n aliases: [\"is\"],\n args: inspectArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { startInspect } = await import(\"../services/inspect.js\");\n startInspect(args);\n process.exit(0);\n },\n});\n","import {\n getPowerhouseProjectInfo,\n installArgs,\n makeDependenciesWithVersions,\n} from \"@powerhousedao/shared/clis\";\nimport { resolveRegistryUrl } from \"@powerhousedao/shared/registry\";\nimport { execSync } from \"child_process\";\nimport { command } from \"cmd-ts\";\nimport { resolveCommand } from \"package-manager-detector\";\nimport { updateConfigFile, updateStylesFile } from \"../utils.js\";\n\nexport const install = command({\n name: \"install\",\n aliases: [\"add\", \"i\"],\n description: `\nThe install command adds Powerhouse dependencies to your project.\n\nBy default it only registers the package in powerhouse.config.json with\nprovider \"registry\" — Connect will load it from the registry CDN at runtime.\n\nWith --local, the package is also installed into node_modules and marked\nas provider \"local\" — it will be bundled into ph connect build so the\npreview works without the registry being reachable.\n\nResolution order for the registry URL:\n --registry flag > PH_REGISTRY_URL env > powerhouse.config.json > default\n `,\n args: installArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n const {\n projectPath,\n localProjectPath,\n globalProjectPath,\n packageManager,\n isGlobal,\n } = await getPowerhouseProjectInfo(args);\n\n if (!projectPath) {\n throw new Error(`Could not find project path to install from.`);\n }\n\n const registryUrl = resolveRegistryUrl({\n registry: args.registry,\n projectPath,\n });\n\n if (args.debug) {\n console.log(\">>> registryUrl\", registryUrl);\n }\n\n const dependenciesWithVersions = await makeDependenciesWithVersions(\n args.dependencies,\n registryUrl,\n );\n\n if (args.debug) {\n console.log(\">>> parsedDependencies\", dependenciesWithVersions);\n console.log(\"\\n>>> projectInfo\", {\n localProjectPath,\n globalProjectPath,\n packageManager,\n isGlobal,\n });\n }\n\n if (args.local) {\n if (dependenciesWithVersions.length === 0) {\n throw new Error(\n \"--local requires at least one package name (e.g. ph install --local @scope/pkg)\",\n );\n }\n try {\n const specs = dependenciesWithVersions.map((d) =>\n d.version ? `${d.name}@${d.version}` : d.name,\n );\n\n // Route only the scopes of the packages being installed to the\n // resolved registry, leaving transitive deps from other scopes\n // (and unscoped packages) on the package manager's default. This\n // avoids requiring a project-level .npmrc when the user already\n // has packageRegistryUrl in powerhouse.config.json.\n const scopes = new Set<string>();\n for (const dep of dependenciesWithVersions) {\n if (dep.name.startsWith(\"@\")) {\n const scope = dep.name.split(\"/\")[0];\n scopes.add(scope);\n }\n }\n const scopeRegistryArgs = Array.from(scopes).map(\n (scope) => `--${scope}:registry=${registryUrl}`,\n );\n\n const resolved = resolveCommand(packageManager, \"add\", [\n ...specs,\n ...scopeRegistryArgs,\n ]);\n if (!resolved) {\n throw new Error(\n `Failed to resolve install command for package manager \"${packageManager}\".`,\n );\n }\n const installCommand = `${resolved.command} ${resolved.args.join(\" \")}`;\n if (scopeRegistryArgs.length > 0) {\n console.log(\n `Installing dependencies 📦 (routing ${Array.from(scopes).join(\", \")} → ${registryUrl})...`,\n );\n } else {\n console.log(\"Installing dependencies 📦...\");\n }\n console.log(`> ${installCommand}`);\n execSync(installCommand, {\n stdio: \"inherit\",\n cwd: projectPath,\n });\n console.log(\"Dependency installed successfully 🎉\");\n } catch (error) {\n console.error(\"❌ Failed to install dependencies\");\n throw error;\n }\n }\n\n try {\n console.log(\"⚙️ Updating powerhouse config file...\");\n updateConfigFile(\n dependenciesWithVersions,\n projectPath,\n \"install\",\n args.local ? \"local\" : \"registry\",\n );\n console.log(\"Config file updated successfully 🎉\");\n } catch (error) {\n console.error(\"❌ Failed to update config file\");\n throw error;\n }\n\n if (args.local) {\n try {\n console.log(\"⚙️ Updating styles.css file...\");\n updateStylesFile(dependenciesWithVersions, projectPath);\n console.log(\"Styles file updated successfully 🎉\");\n } catch (error) {\n console.error(\"❌ Failed to update styles file\");\n throw error;\n }\n }\n\n process.exit(0);\n },\n});\n","import { getConfig } from \"@powerhousedao/config/node\";\nimport { getPowerhouseProjectInfo, listArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const list = command({\n name: \"list\",\n description: `\nThe list command displays information about installed Powerhouse packages in your project.\nIt reads the powerhouse.config.json file and shows the packages that are currently installed.\n\nThis command:\n1. Examines your project configuration\n2. Lists all installed Powerhouse packages\n3. Provides a clear overview of your project's dependencies\n4. Helps you manage and track your Powerhouse components\n`,\n aliases: [\"l\"],\n args: listArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n try {\n const projectInfo = await getPowerhouseProjectInfo();\n console.log(\"\\n>>> projectInfo\", projectInfo);\n\n const phConfig = getConfig(\n projectInfo.projectPath + \"/powerhouse.config.json\",\n );\n\n if (!phConfig.packages || phConfig.packages.length === 0) {\n console.log(\"No packages found in the project\");\n return;\n }\n\n console.log(\"Installed Packages:\\n\");\n phConfig.packages.forEach((pkg) => {\n console.log(pkg.packageName);\n });\n } catch (e) {\n console.log(\"No packages found in the project\");\n }\n process.exit(0);\n },\n});\n","import { loginArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const login = command({\n name: \"login\",\n description: `\nThe login command authenticates you with Renown using your Ethereum wallet. This enables\nthe CLI to act on behalf of your Ethereum identity for authenticated operations.\n\nThis command:\n1. Generates or loads a cryptographic identity (DID) for the CLI\n2. Opens your browser to the Renown authentication page\n3. You authorize the CLI's DID to act on behalf of your Ethereum address\n4. Stores the credentials locally in .ph/.renown.json\n `,\n args: loginArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n const { getRenown } = await import(\"../services/auth.js\");\n const renown = await getRenown(args.renownUrl);\n\n if (args.showDid) {\n console.log(renown.did);\n process.exit(0);\n }\n\n if (args.status) {\n const { getAuthStatus } = await import(\"@renown/sdk/node\");\n const status = getAuthStatus(renown);\n if (!status.authenticated || !status.address) {\n console.log(\"Not authenticated with an Ethereum address.\");\n console.log('Run \"ph login\" to authenticate.');\n } else {\n console.log(\"Authenticated\");\n console.log(` ETH Address: ${status.address}`);\n console.log(` User DID: ${status.userDid}`);\n console.log(` Chain ID: ${status.chainId}`);\n console.log(` CLI DID: ${status.cliDid}`);\n console.log(\n ` Authenticated at: ${status.authenticatedAt?.toLocaleString()}`,\n );\n console.log(` Renown URL: ${status.baseUrl}`);\n }\n process.exit(0);\n }\n\n if (args.logout) {\n await handleLogout();\n process.exit(0);\n }\n\n const { browserLogin } = await import(\"@renown/sdk/node\");\n\n console.debug(\"Initializing cryptographic identity...\");\n console.log(`CLI DID: ${renown.did}`);\n\n try {\n const timeoutMs = args.timeout ? args.timeout * 1000 : undefined;\n\n const result = await browserLogin(renown, {\n renownUrl: args.renownUrl,\n timeoutMs,\n onLoginUrl: (url, sessionId) => {\n console.log(\"Opening browser for authentication...\");\n console.log(`Session ID: ${sessionId.slice(0, 8)}...`);\n console.log(`Login URL: ${url}`);\n console.log();\n console.log(\"Waiting for authentication in browser\");\n console.log(`(timeout in ${(timeoutMs ?? 300_000) / 1000} seconds)`);\n console.log();\n console.log(\n \"Please connect your wallet and authorize this CLI to act on your behalf.\",\n );\n console.log();\n process.stdout.write(\"Waiting\");\n },\n onPollTick: () => process.stdout.write(\".\"),\n onBrowserOpenFailed: (url) => {\n console.error(\"Failed to open browser automatically.\");\n console.log(`Please open this URL manually: ${url}`);\n },\n });\n\n console.log(); // New line after dots\n console.log();\n console.log(\"Successfully authenticated!\");\n console.log(` ETH Address: ${result.user.address}`);\n console.log(` User DID: ${result.user.did}`);\n console.log(` CLI DID: ${result.cliDid}`);\n console.log();\n console.log(\"The CLI can now act on behalf of your Ethereum identity.\");\n } catch (error) {\n console.log(); // New line after dots\n throw error;\n }\n\n process.exit(0);\n },\n});\n\nexport async function handleLogout() {\n const { getRenown } = await import(\"../services/auth.js\");\n const renown = await getRenown();\n if (!renown.user) {\n console.log(\"Not currently authenticated.\");\n return;\n }\n\n try {\n await renown.logout();\n console.log(\"Successfully logged out.\");\n } catch (error) {\n console.error(\"Failed to clear credentials.\");\n console.debug(error);\n }\n}\n","import { command } from \"cmd-ts\";\nimport { handleLogout } from \"./login.js\";\n\nexport const logout = command({\n name: \"logout\",\n description: `\nThe logout command removes an existing session created with 'ph login'`,\n args: {},\n handler: async () => {\n await handleLogout();\n process.exit(0);\n },\n});\n","import { migrateArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const migrate = command({\n name: \"migrate\",\n args: migrateArgs,\n description: \"Run migrations\",\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { startMigrate } = await import(\"../services/migrate.js\");\n await startMigrate(args);\n process.exit(0);\n },\n});\n","import {\n getPowerhouseProjectInfo,\n publishArgs,\n} from \"@powerhousedao/shared/clis\";\nimport {\n checkNpmAuth,\n npmPublish,\n resolveRegistryUrl,\n} from \"@powerhousedao/shared/registry\";\nimport { command } from \"cmd-ts\";\n\nexport const publish = command({\n name: \"publish\",\n description: `\nPublish a package to the Powerhouse registry. This is a thin wrapper around npm publish\nthat automatically sets the registry URL.\n\nThis command:\n1. Resolves the registry URL (--registry flag > PH_REGISTRY_URL env > powerhouse.config.json > default)\n2. Checks authentication with the registry via npm whoami\n3. Forwards all additional arguments to npm publish\n `,\n args: publishArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n const { projectPath } = await getPowerhouseProjectInfo();\n\n if (!projectPath) {\n throw new Error(\"Could not find project path.\");\n }\n\n const registryUrl = resolveRegistryUrl({\n registry: args.registry,\n projectPath,\n });\n\n if (args.debug) {\n console.log(\">>> registryUrl\", registryUrl);\n }\n\n try {\n await checkNpmAuth(registryUrl);\n } catch {\n console.error(`Not authenticated with registry: ${registryUrl}`);\n console.error(`Run: npm adduser --registry ${registryUrl}`);\n process.exit(1);\n }\n\n if (args.debug) {\n console.log(\n \">>> command\",\n `npm publish --registry ${registryUrl} ${args.forwardedArgs.join(\" \")}`,\n );\n }\n\n console.log(`Publishing to ${registryUrl}...`);\n const result = await npmPublish({\n registryUrl,\n cwd: projectPath,\n args: args.forwardedArgs,\n });\n if (result.stdout) {\n console.log(result.stdout);\n }\n\n process.exit(0);\n },\n});\n","import { switchboardArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const switchboard = command({\n name: \"switchboard\",\n aliases: [\"reactor\"],\n description: `\nThe switchboard command starts a local Switchboard instance, which acts as the document\nprocessing engine for Powerhouse projects. It provides the infrastructure for document\nmodels, processors, and real-time updates.\n\nThis command:\n1. Starts a local switchboard server\n2. Loads document models and processors\n3. Provides an API for document operations\n4. Enables real-time document processing\n5. Can authenticate with remote services using your identity from 'ph login'`,\n args: switchboardArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { basePath, dbPath, migrate, migrateStatus } = args;\n if (basePath) {\n process.env.BASE_PATH = basePath;\n }\n\n if (migrate || migrateStatus) {\n const { runSwitchboardMigrations } =\n await import(\"../services/switchboard-migrate.js\");\n await runSwitchboardMigrations({\n dbPath,\n statusOnly: migrateStatus,\n });\n process.exit(0);\n }\n\n const { startSwitchboard } = await import(\"../services/switchboard.js\");\n const { defaultDriveUrl, renown } = await startSwitchboard(args);\n console.log(\" ➜ Switchboard:\", defaultDriveUrl);\n if (renown) {\n console.log(\" ➜ Identity:\", renown.did);\n }\n },\n});\n","import {\n getPowerhouseProjectInfo,\n getPowerhouseProjectUninstallCommand,\n makeDependenciesWithVersions,\n uninstallArgs,\n} from \"@powerhousedao/shared/clis\";\nimport { execSync } from \"child_process\";\nimport { command } from \"cmd-ts\";\nimport { AGENTS } from \"package-manager-detector\";\nimport { removeStylesImports, updateConfigFile } from \"../utils.js\";\n\nexport const uninstall = command({\n name: \"uninstall\",\n aliases: [\"remove\"],\n description: `\nThe uninstall command removes Powerhouse dependencies from your project. It handles the\nremoval of packages, updates configuration files, and ensures proper cleanup.\n\nThis command:\n1. Uninstalls specified Powerhouse dependencies using your package manager\n2. Updates powerhouse.config.json to remove the dependencies\n3. Supports various uninstallation options and configurations\n4. Works with ${AGENTS.join(\", \")} package managers\n`,\n args: uninstallArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n\n const {\n projectPath,\n localProjectPath,\n globalProjectPath,\n packageManager,\n isGlobal,\n } = await getPowerhouseProjectInfo(args);\n\n if (!projectPath) {\n throw new Error(`Could not find project path to uninstall from`);\n }\n\n const dependenciesWithVersions = await makeDependenciesWithVersions(\n args.dependencies,\n );\n\n if (args.debug) {\n console.log(\">>> parsedDependencies\", dependenciesWithVersions);\n }\n\n if (args.debug) {\n console.log(\"\\n>>> projectInfo\", {\n localProjectPath,\n globalProjectPath,\n packageManager,\n isGlobal,\n });\n }\n\n try {\n console.log(\"Uninstalling dependencies 📦 ...\");\n const uninstallCommand =\n await getPowerhouseProjectUninstallCommand(packageManager);\n execSync(uninstallCommand, {\n stdio: \"inherit\",\n cwd: projectPath,\n });\n console.log(\"Dependency uninstalled successfully 🎉\");\n } catch (error) {\n console.error(\"❌ Failed to uninstall dependencies\");\n throw error;\n }\n\n try {\n console.log(\"⚙️ Updating powerhouse config file...\");\n updateConfigFile(dependenciesWithVersions, projectPath, \"uninstall\");\n console.log(\"Config file updated successfully 🎉\");\n } catch (error) {\n console.error(\"❌ Failed to update config file\");\n throw error;\n }\n\n try {\n console.log(\"⚙️ Updating styles.css file...\");\n removeStylesImports(dependenciesWithVersions, projectPath);\n console.log(\"Styles file updated successfully 🎉\");\n } catch (error) {\n console.error(\"❌ Failed to update styles file\");\n throw error;\n }\n\n process.exit(0);\n },\n});\n","import { vetraArgs } from \"@powerhousedao/shared/clis\";\nimport { command } from \"cmd-ts\";\n\nexport const vetra = command({\n name: \"vetra\",\n description: `\nThe vetra command sets up a Vetra development environment for working with Vetra projects.\nIt starts a Vetra Switchboard and optionally Connect Studio, enabling document collaboration \nand real-time processing with a \"Vetra\" drive or connection to remote drives.\n\nThis command:\n1. Starts a Vetra Switchboard with a \"Vetra\" drive for document storage\n2. Optionally connects to remote drives instead of creating a local drive\n3. Starts Connect Studio pointing to the Switchboard for user interaction (unless disabled)\n4. Enables real-time updates, collaboration, and code generation`,\n args: vetraArgs,\n handler: async (args) => {\n if (args.debug) {\n console.log(args);\n }\n const { startVetra } = await import(\"../services/vetra.js\");\n await startVetra(args);\n },\n});\n","import { accessToken } from \"./access-token.js\";\nimport { build } from \"./build.js\";\nimport { connect } from \"./connect.js\";\nimport { generate } from \"./generate.js\";\nimport { init } from \"./init.js\";\nimport { inspect } from \"./inspect.js\";\nimport { install } from \"./install.js\";\nimport { list } from \"./list.js\";\nimport { login } from \"./login.js\";\nimport { logout } from \"./logout.js\";\nimport { migrate } from \"./migrate.js\";\nimport { publish } from \"./publish.js\";\nimport { switchboard } from \"./switchboard.js\";\nimport { uninstall } from \"./uninstall.js\";\nimport { vetra } from \"./vetra.js\";\n\nexport const phCliCommands = {\n init,\n generate,\n vetra,\n connect,\n build,\n publish,\n \"access-token\": accessToken,\n inspect,\n list,\n migrate,\n switchboard,\n login,\n logout,\n install,\n uninstall,\n} as const;\n","import { subcommands } from \"cmd-ts\";\nimport { getVersion } from \"../get-version.js\";\nimport { PH_CLI_DESCRIPTION } from \"../utils/constants.js\";\nimport { phCliCommands } from \"./ph-cli-commands.js\";\n\nconst version = getVersion();\nexport const phCli = subcommands({\n name: \"ph-cli\",\n description: PH_CLI_DESCRIPTION,\n version,\n cmds: phCliCommands,\n});\n","#!/usr/bin/env node\nimport {\n assertNodeVersion,\n captureCliError,\n initCliTelemetry,\n} from \"@powerhousedao/shared/clis\";\nimport { run } from \"cmd-ts\";\nimport { phCliHelp } from \"./commands/ph-cli-help.js\";\nimport { phCli } from \"./commands/ph-cli.js\";\nimport { getVersion } from \"./get-version.js\";\n\nasync function main() {\n assertNodeVersion();\n // Initializes Sentry only if user consented (opt-out by default, asked\n // once on first interactive run). Respects PH_NO_TELEMETRY/DO_NOT_TRACK.\n await initCliTelemetry({ cliName: \"ph-cli\", release: getVersion() });\n const args = process.argv.slice(2);\n const hasNoArgs = args.length === 0;\n const isHelp = args.some((arg) => arg === \"--help\" || arg === \"-h\");\n const isTopLevelHelp = isHelp && args.length === 1;\n const showTopLevelHelp = hasNoArgs || isTopLevelHelp;\n const cli = showTopLevelHelp ? phCliHelp : phCli;\n const [command, ...restArgs] = args;\n if (\n command === \"connect\" &&\n ![\"studio\", \"build\", \"preview\"].includes(args[1]) &&\n !isHelp\n ) {\n const argsWithDefaultConnectSubCommand = [\"connect\", \"studio\", ...restArgs];\n await run(cli, argsWithDefaultConnectSubCommand);\n } else {\n await run(cli, args);\n }\n}\n\nawait main().catch(async (error) => {\n const isDebug = process.argv.slice(2).includes(\"--debug\");\n // Report to Sentry (no-op when telemetry disabled) before exiting.\n await captureCliError(error);\n if (isDebug) {\n throw error;\n }\n if (error instanceof Error) {\n console.error(error.message);\n process.exit(1);\n } else {\n throw error;\n }\n});\n"],"mappings":";;;;;;;;;;AAAA,SAAgB,aAAa;AAC3B,QACE,QAAQ,IAAI,qBACZ,QAAQ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,KAAK,EAAE;OAEf,OAAM;EAER"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/ph-cli",
|
|
3
|
-
"version": "6.0.0-dev.
|
|
3
|
+
"version": "6.0.0-dev.185",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"type": "module",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"semver": "7.7.4",
|
|
38
38
|
"ts-morph": "27.0.2",
|
|
39
39
|
"write-package": "7.2.0",
|
|
40
|
-
"@powerhousedao/codegen": "6.0.0-dev.
|
|
41
|
-
"document-model": "6.0.0-dev.
|
|
42
|
-
"@powerhousedao/
|
|
43
|
-
"@powerhousedao/
|
|
44
|
-
"@powerhousedao/
|
|
45
|
-
"@powerhousedao/
|
|
46
|
-
"@powerhousedao/switchboard": "6.0.0-dev.
|
|
47
|
-
"@powerhousedao/builder-tools": "6.0.0-dev.
|
|
48
|
-
"@renown/sdk": "6.0.0-dev.
|
|
40
|
+
"@powerhousedao/codegen": "6.0.0-dev.185",
|
|
41
|
+
"document-model": "6.0.0-dev.185",
|
|
42
|
+
"@powerhousedao/config": "6.0.0-dev.185",
|
|
43
|
+
"@powerhousedao/common": "6.0.0-dev.185",
|
|
44
|
+
"@powerhousedao/shared": "6.0.0-dev.185",
|
|
45
|
+
"@powerhousedao/reactor": "6.0.0-dev.185",
|
|
46
|
+
"@powerhousedao/switchboard": "6.0.0-dev.185",
|
|
47
|
+
"@powerhousedao/builder-tools": "6.0.0-dev.185",
|
|
48
|
+
"@renown/sdk": "6.0.0-dev.185"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "25.2.3",
|