@powerhousedao/ph-cli 6.0.0-dev.173 → 6.0.0-dev.174

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 CHANGED
@@ -8,6 +8,7 @@ import { DEFAULT_REGISTRY_URL } from "@powerhousedao/config";
8
8
  import { execSync } from "child_process";
9
9
  import { join } from "path";
10
10
  import { getConfig as getConfig$1 } from "@powerhousedao/config/node";
11
+ import { checkNpmAuth, npmPublish, resolveRegistryUrl } from "@powerhousedao/shared/registry";
11
12
  //#region src/get-version.ts
12
13
  function getVersion() {
13
14
  return process.env.WORKSPACE_VERSION || process.env.npm_package_version || "unknown";
@@ -451,7 +452,7 @@ Publish a package to the Powerhouse registry. This is a thin wrapper around npm
451
452
  that automatically sets the registry URL.
452
453
 
453
454
  This command:
454
- 1. Resolves the registry URL (--registry flag > powerhouse.config.json > PH_REGISTRY_URL env > default)
455
+ 1. Resolves the registry URL (--registry flag > PH_REGISTRY_URL env > powerhouse.config.json > default)
455
456
  2. Checks authentication with the registry via npm whoami
456
457
  3. Forwards all additional arguments to npm publish
457
458
  `,
@@ -460,23 +461,26 @@ This command:
460
461
  if (args.debug) console.log(args);
461
462
  const { projectPath } = await getPowerhouseProjectInfo();
462
463
  if (!projectPath) throw new Error("Could not find project path.");
463
- const config = getConfig$1(join(projectPath, "powerhouse.config.json"));
464
- const registryUrl = args.registry ?? process.env.PH_REGISTRY_URL ?? config.packageRegistryUrl ?? DEFAULT_REGISTRY_URL;
464
+ const registryUrl = resolveRegistryUrl({
465
+ registry: args.registry,
466
+ projectPath
467
+ });
465
468
  if (args.debug) console.log(">>> registryUrl", registryUrl);
466
469
  try {
467
- execSync(`npm whoami --registry ${registryUrl}`, { stdio: "pipe" });
470
+ await checkNpmAuth(registryUrl);
468
471
  } catch {
469
472
  console.error(`Not authenticated with registry: ${registryUrl}`);
470
473
  console.error(`Run: npm adduser --registry ${registryUrl}`);
471
474
  process.exit(1);
472
475
  }
473
- const cmd = `npm publish --registry ${registryUrl} ${args.forwardedArgs.join(" ")}`.trim();
474
- if (args.debug) console.log(">>> command", cmd);
476
+ if (args.debug) console.log(">>> command", `npm publish --registry ${registryUrl} ${args.forwardedArgs.join(" ")}`);
475
477
  console.log(`Publishing to ${registryUrl}...`);
476
- execSync(cmd, {
477
- stdio: "inherit",
478
- cwd: projectPath
478
+ const result = await npmPublish({
479
+ registryUrl,
480
+ cwd: projectPath,
481
+ args: args.forwardedArgs
479
482
  });
483
+ if (result.stdout) console.log(result.stdout);
480
484
  process.exit(0);
481
485
  }
482
486
  });
package/dist/cli.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.mjs","names":["version","build","getConfig","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 { DEFAULT_REGISTRY_URL } from \"@powerhousedao/config\";\nimport {\n getConfig,\n getPowerhouseProjectInfo,\n getPowerhouseProjectInstallCommand,\n installArgs,\n makeDependenciesWithVersions,\n} from \"@powerhousedao/shared/clis\";\nimport { execSync } from \"child_process\";\nimport { command } from \"cmd-ts\";\nimport { join } from \"path\";\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. It installs packages\nfrom the Powerhouse registry by default and updates configuration files.\n\nThis command:\n1. Resolves the registry URL (--registry flag > powerhouse.config.json > PH_REGISTRY_URL env > default)\n2. Installs the package using your package manager with the resolved registry\n3. Updates powerhouse.config.json to include the new dependencies\n4. Updates style.css with CSS imports if applicable\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 // Resolve registry URL: flag > config > env > default\n const configPath = join(projectPath, \"powerhouse.config.json\");\n const config = getConfig(configPath);\n const registryUrl =\n args.registry ??\n config.packageRegistryUrl ??\n process.env.PH_REGISTRY_URL ??\n DEFAULT_REGISTRY_URL;\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 }\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(`installing dependencies 📦 from ${registryUrl}...`);\n const installCommand = getPowerhouseProjectInstallCommand(\n packageManager,\n [\"--registry\", registryUrl],\n );\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 if (args.debug) {\n console.log(\"\\n>>> updateConfigFile arguments:\");\n console.log(\">>> dependencies\", args.dependencies);\n console.log(\">>> projectPath\", projectPath);\n }\n\n try {\n console.log(\"⚙️ Updating powerhouse config file...\");\n updateConfigFile(dependenciesWithVersions, projectPath, \"install\");\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 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 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 { DEFAULT_REGISTRY_URL } from \"@powerhousedao/config\";\nimport { getConfig } from \"@powerhousedao/config/node\";\nimport {\n getPowerhouseProjectInfo,\n publishArgs,\n} from \"@powerhousedao/shared/clis\";\nimport { execSync } from \"child_process\";\nimport { command } from \"cmd-ts\";\nimport { join } from \"path\";\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 > powerhouse.config.json > PH_REGISTRY_URL env > 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 // Resolve registry URL: flag > config > env > default\n const configPath = join(projectPath, \"powerhouse.config.json\");\n const config = getConfig(configPath);\n const registryUrl =\n args.registry ??\n process.env.PH_REGISTRY_URL ??\n config.packageRegistryUrl ??\n DEFAULT_REGISTRY_URL;\n\n if (args.debug) {\n console.log(\">>> registryUrl\", registryUrl);\n }\n\n // Check authentication\n try {\n execSync(`npm whoami --registry ${registryUrl}`, { stdio: \"pipe\" });\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 // Forward remaining args to npm publish\n const forwardedArgs = args.forwardedArgs;\n const cmd =\n `npm publish --registry ${registryUrl} ${forwardedArgs.join(\" \")}`.trim();\n\n if (args.debug) {\n console.log(\">>> command\", cmd);\n }\n\n console.log(`Publishing to ${registryUrl}...`);\n execSync(cmd, { stdio: \"inherit\", cwd: projectPath });\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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;C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,CAAC;EAAC;EAAU;EAAS;EAAU,CAAC,SAAS,KAAK,GAAG,IACjD,CAAC,OAGD,OAAM,IAAI,KAD+B;EAAC;EAAW;EAAU,GAAG;EAAS,CAC3B;KAEhD,OAAM,IAAI,KAAK,KAAK;;AAIxB,MAAM,MAAM,CAAC,OAAO,UAAU;AAE5B,KADgB,QAAQ,KAAK,MAAM,EAAE,CAAC,SAAS,UAAU,CAEvD,OAAM;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 { DEFAULT_REGISTRY_URL } from \"@powerhousedao/config\";\nimport {\n getConfig,\n getPowerhouseProjectInfo,\n getPowerhouseProjectInstallCommand,\n installArgs,\n makeDependenciesWithVersions,\n} from \"@powerhousedao/shared/clis\";\nimport { execSync } from \"child_process\";\nimport { command } from \"cmd-ts\";\nimport { join } from \"path\";\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. It installs packages\nfrom the Powerhouse registry by default and updates configuration files.\n\nThis command:\n1. Resolves the registry URL (--registry flag > powerhouse.config.json > PH_REGISTRY_URL env > default)\n2. Installs the package using your package manager with the resolved registry\n3. Updates powerhouse.config.json to include the new dependencies\n4. Updates style.css with CSS imports if applicable\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 // Resolve registry URL: flag > config > env > default\n const configPath = join(projectPath, \"powerhouse.config.json\");\n const config = getConfig(configPath);\n const registryUrl =\n args.registry ??\n config.packageRegistryUrl ??\n process.env.PH_REGISTRY_URL ??\n DEFAULT_REGISTRY_URL;\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 }\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(`installing dependencies 📦 from ${registryUrl}...`);\n const installCommand = getPowerhouseProjectInstallCommand(\n packageManager,\n [\"--registry\", registryUrl],\n );\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 if (args.debug) {\n console.log(\"\\n>>> updateConfigFile arguments:\");\n console.log(\">>> dependencies\", args.dependencies);\n console.log(\">>> projectPath\", projectPath);\n }\n\n try {\n console.log(\"⚙️ Updating powerhouse config file...\");\n updateConfigFile(dependenciesWithVersions, projectPath, \"install\");\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 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 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,KA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KAAI,iBAAiB,OAAO;AAC1B,UAAQ,MAAM,MAAM,QAAQ;AAC5B,UAAQ,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.173",
3
+ "version": "6.0.0-dev.174",
4
4
  "description": "",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
@@ -24,28 +24,28 @@
24
24
  "author": "",
25
25
  "dependencies": {
26
26
  "tsdown": "0.21.0",
27
- "vite": "8.0.2",
27
+ "vite": "8.0.8",
28
28
  "chalk": "5.6.2",
29
29
  "change-case": "5.4.4",
30
30
  "cmd-ts": "0.15.0",
31
31
  "enquirer": "2.4.1",
32
32
  "colorette": "2.0.20",
33
- "kysely": "0.28.11",
33
+ "kysely": "0.28.16",
34
34
  "package-manager-detector": "1.6.0",
35
35
  "pg": "8.18.0",
36
36
  "read-pkg": "10.1.0",
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.173",
41
- "document-model": "6.0.0-dev.173",
42
- "@powerhousedao/config": "6.0.0-dev.173",
43
- "@powerhousedao/common": "6.0.0-dev.173",
44
- "@powerhousedao/reactor": "6.0.0-dev.173",
45
- "@powerhousedao/shared": "6.0.0-dev.173",
46
- "@powerhousedao/switchboard": "6.0.0-dev.173",
47
- "@renown/sdk": "6.0.0-dev.173",
48
- "@powerhousedao/builder-tools": "6.0.0-dev.173"
40
+ "@powerhousedao/codegen": "6.0.0-dev.174",
41
+ "@powerhousedao/common": "6.0.0-dev.174",
42
+ "@powerhousedao/reactor": "6.0.0-dev.174",
43
+ "document-model": "6.0.0-dev.174",
44
+ "@powerhousedao/config": "6.0.0-dev.174",
45
+ "@powerhousedao/switchboard": "6.0.0-dev.174",
46
+ "@renown/sdk": "6.0.0-dev.174",
47
+ "@powerhousedao/builder-tools": "6.0.0-dev.174",
48
+ "@powerhousedao/shared": "6.0.0-dev.174"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "25.2.3",