UNPKG

everything-dev

Version:

A consolidated product package for building Module Federation apps with oRPC APIs.

1 lines • 17.9 kB
{"version":3,"file":"contract.meta.cjs","names":[],"sources":["../src/contract.meta.ts"],"sourcesContent":["export type CliCommandMeta = {\n commandPath?: string[];\n summary: string;\n description?: string;\n examples?: string[];\n interactive?: boolean;\n longRunning?: boolean;\n fields?: Record<string, { positional?: boolean; description?: string }>;\n};\n\nexport const cliCommandMeta = {\n dev: {\n commandPath: [\"dev\"],\n summary: \"Start a development session\",\n interactive: true,\n longRunning: true,\n fields: {\n remotePlugins: {\n description:\n \"Comma-separated plugin IDs to force remote (e.g. --remote-plugins auth,registry)\",\n },\n logLevel: {\n description:\n \"Log tail level: error, warn (default), info, or debug (overrides BOS_LOG_LEVEL; the file always gets everything)\",\n },\n },\n },\n start: {\n commandPath: [\"start\"],\n summary: \"Start the production host\",\n interactive: false,\n longRunning: true,\n fields: {\n env: { description: \"Environment: production or staging\" },\n registry: {\n description:\n \"Override FastKV registry contract account (defaults: dev.everything.near / dev.allthethings.testnet)\",\n },\n configPath: {\n description:\n \"Boot from a local bos config file — skips FastKV resolution and SRI integrity verification\",\n },\n },\n },\n build: {\n commandPath: [\"build\"],\n summary: \"Build selected workspaces\",\n interactive: false,\n fields: {\n packages: { positional: true, description: \"Comma-separated package list\" },\n },\n },\n config: {\n commandPath: [\"config\"],\n summary: \"Print the loaded BOS configuration\",\n interactive: false,\n fields: {\n full: { description: \"Print the fully resolved configuration\" },\n },\n },\n registryUse: {\n commandPath: [\"registry\", \"use\"],\n summary:\n \"Compose app.ui/app.host/app.api/plugins.<key> sections from a published runtime into bos.config.json\",\n interactive: false,\n fields: {\n from: {\n positional: true,\n description:\n \"Published runtime (account/gateway or bos:// URL), e.g. v1.citynode.near/citynode.app\",\n },\n sections: {\n description: \"Comma-separated sections to compose, e.g. app.ui,plugins.apps\",\n },\n dryRun: { description: \"Preview the merged config without writing\" },\n },\n },\n pluginAdd: {\n commandPath: [\"plugin\", \"add\"],\n summary: \"Add a plugin attachment\",\n interactive: false,\n fields: {\n source: {\n positional: true,\n description: \"Plugin source (local:path, bos://account/domain, or URL)\",\n },\n as: { description: \"Plugin alias\" },\n production: { description: \"Production URL override\" },\n },\n },\n pluginRemove: {\n commandPath: [\"plugin\", \"remove\"],\n summary: \"Remove a plugin attachment\",\n interactive: false,\n fields: { key: { positional: true, description: \"Plugin key\" } },\n },\n pluginList: {\n commandPath: [\"plugin\", \"list\"],\n summary: \"List configured plugins\",\n interactive: false,\n },\n pluginPublish: {\n commandPath: [\"plugin\", \"publish\"],\n summary: \"Publish a single plugin\",\n interactive: false,\n fields: { key: { positional: true, description: \"Plugin key\" } },\n },\n publish: {\n commandPath: [\"publish\"],\n summary:\n \"Publish the current workspace configuration (no build — use bos deploy for the full train)\",\n interactive: false,\n fields: {\n dryRun: { description: \"Preview what would be published without writing\" },\n verbose: { description: \"Show full build output instead of clean summary\" },\n env: { description: \"Environment: production or staging\" },\n network: { description: \"NEAR network: mainnet or testnet\" },\n wallet: {\n description:\n \"Publish gaslessly with a one-time wallet approval (NEP-366 delegate action relayed by the platform relayer)\",\n },\n registry: {\n description:\n \"Override FastKV registry contract account (defaults: dev.everything.near / dev.allthethings.testnet)\",\n },\n },\n },\n rollback: {\n commandPath: [\"rollback\"],\n summary: \"Republish an earlier config snapshot from the registry publish history\",\n interactive: true,\n fields: {\n version: { description: \"Block height (or timestamp) of the snapshot from the listing\" },\n previous: { description: \"Roll back to the write immediately before the current one\" },\n force: {\n description:\n \"Allow pre-Phase-A snapshots without verifiable manifest pins (their bytes were overwritten in place)\",\n },\n limit: { description: \"Listing depth (1-200, default 20)\" },\n dryRun: { description: \"Preview the rollback without publishing\" },\n env: { description: \"Environment: production or staging\" },\n network: { description: \"NEAR network: mainnet or testnet\" },\n wallet: {\n description:\n \"Publish gaslessly with a one-time wallet approval (NEP-366 delegate action relayed by the platform relayer)\",\n },\n registry: {\n description:\n \"Override FastKV registry contract account (defaults: dev.everything.near / dev.allthethings.testnet)\",\n },\n },\n },\n deploy: {\n commandPath: [\"deploy\"],\n summary:\n \"Deploy train: preflight → build → upload bundles → publish config → runtime image (pre-pushed digest or local docker build) → Railway (pull-only)\",\n interactive: false,\n fields: {\n env: { description: \"Environment: production or staging\" },\n build: { description: \"Build and deploy workspaces before publish (default: true)\" },\n dryRun: { description: \"Preview what would be deployed without writing\" },\n verbose: { description: \"Show full build output instead of clean summary\" },\n service: { description: \"Override Railway service name from config\" },\n imageDigest: {\n description:\n \"Digest of a pre-pushed runtime image (sha256:…) — skips the local image build/push; Railway pins this digest\",\n },\n registry: {\n description:\n \"Override FastKV registry contract account (defaults: dev.everything.near / dev.allthethings.testnet)\",\n },\n },\n },\n login: {\n commandPath: [\"login\"],\n summary:\n \"Sign in with your NEAR account via the hosted site (wallet, passkey, or social login)\",\n interactive: true,\n fields: {\n key: { description: \"Also mint and export a scoped publish key for headless/CI use\" },\n site: { description: \"Override site URL hosting the CLI login page\" },\n device: { description: \"Device label recorded on the credential (default: hostname)\" },\n expiresIn: { description: \"Session lifetime in seconds (default: 90 days)\" },\n env: { description: \"Environment: production (default) or staging\" },\n },\n },\n logout: {\n commandPath: [\"logout\"],\n summary: \"Revoke the stored CLI session and delete the exported publish key\",\n interactive: false,\n },\n keyPublish: {\n commandPath: [\"key\", \"generate\"],\n summary: \"Generate a publish access key\",\n interactive: true,\n fields: {\n env: { description: \"Environment: production or staging\" },\n allowance: { description: \"NEAR allowance for the key (default: 1NEAR, min: 0.3NEAR)\" },\n removeOldKeys: {\n description:\n \"Remove existing publish key(s) without prompting (default: ask on a TTY, yes when non-interactive)\",\n },\n registry: {\n description:\n \"Override FastKV registry contract account (defaults: dev.everything.near / dev.allthethings.testnet)\",\n },\n },\n },\n init: {\n commandPath: [\"init\"],\n summary: \"Scaffold a new project by extending a deployed app or template\",\n interactive: true,\n fields: {\n domain: {\n positional: true,\n description: \"New project domain (e.g. myapp.everything.dev)\",\n },\n extends: {\n description: \"Parent to extend from (e.g. bos://account/gateway or account/gateway)\",\n },\n account: { description: \"New project NEAR account (auto-derived from extends)\" },\n directory: { description: \"Target directory (auto-derived from domain)\" },\n source: { description: \"Local source dir (skips GitHub download)\" },\n plugins: {\n description: \"Comma-separated plugin keys to include (requires --overrides=plugins)\",\n },\n overrides: {\n description: \"Comma-separated sections to customize locally: ui,api,host,plugins\",\n },\n level: {\n description:\n \"Starter complexity: simple (public shell) or advanced (adds dashboard, orgs, admin)\",\n },\n noInteractive: { description: \"Skip prompts, use flags only\" },\n noInstall: { description: \"Skip pnpm install\" },\n },\n },\n sync: {\n commandPath: [\"sync\"],\n summary: \"Sync template files from parent project\",\n interactive: false,\n fields: {\n dryRun: { description: \"Preview changes without writing files\" },\n noInstall: { description: \"Skip pnpm install\" },\n },\n },\n upgrade: {\n commandPath: [\"upgrade\"],\n summary: \"Upgrade framework packages and sync template files\",\n interactive: true,\n fields: {\n dryRun: { description: \"Preview changes without writing\" },\n noInstall: { description: \"Skip pnpm install\" },\n noSync: { description: \"Only upgrade packages, skip template sync\" },\n },\n },\n typesGen: {\n commandPath: [\"types\", \"gen\"],\n summary: \"Generate type definitions from configured API and plugin contracts\",\n interactive: false,\n fields: {\n env: { description: \"Environment: development (default) or production\" },\n dryRun: { description: \"Preview what would be fetched without writing files\" },\n remotePlugins: {\n description:\n \"Comma-separated plugin IDs to fetch contract types remotely (e.g. --remote-plugins auth,registry)\",\n },\n },\n },\n typecheck: {\n commandPath: [\"typecheck\"],\n summary: \"Run TypeScript type checking across all local workspaces\",\n interactive: false,\n fields: {\n packages: {\n positional: true,\n description: \"Comma-separated workspace list (default: all)\",\n },\n },\n },\n mfCheck: {\n commandPath: [\"mf\", \"check\"],\n summary:\n \"Verify Module Federation runtime compatibility across published host + plugin bundles\",\n interactive: false,\n },\n dbStudio: {\n commandPath: [\"db\", \"studio\"],\n summary: \"Open Drizzle Studio for a plugin's database\",\n fields: {\n plugin: {\n positional: true,\n description: \"Plugin key: api, auth, or a plugin name (default: api)\",\n },\n },\n },\n dbDoctor: {\n commandPath: [\"db\", \"doctor\"],\n summary: \"Diagnose migration health for a plugin's database\",\n fields: {\n plugin: {\n positional: true,\n description: \"Plugin key: api, auth, or a plugin name\",\n },\n },\n },\n dbRepair: {\n commandPath: [\"db\", \"repair\"],\n summary: \"Reset migration history and reapply migrations for a plugin\",\n fields: {\n plugin: {\n positional: true,\n description: \"Plugin key: api, auth, or a plugin name\",\n },\n mode: {\n description: \"Repair mode: history-reset (default) or recreate (not yet supported)\",\n },\n yes: {\n description: \"Skip confirmation prompt\",\n },\n },\n },\n status: {\n commandPath: [\"status\"],\n summary: \"Show project health, versions, and update availability\",\n interactive: false,\n },\n ps: {\n commandPath: [\"ps\"],\n summary: \"List tracked development processes\",\n interactive: false,\n },\n logs: {\n commandPath: [\"logs\"],\n summary: \"Read dev session logs (.bos/logs/dev-latest.log)\",\n interactive: false,\n fields: {\n service: {\n description: \"Filter by service name (e.g. host, api, auth, ui, plugin:votes)\",\n },\n tail: { description: \"Show only the last N lines\" },\n follow: { description: \"Stream the log as lines are appended\" },\n },\n },\n kill: {\n commandPath: [\"kill\"],\n summary: \"Stop tracked development processes\",\n interactive: false,\n fields: {\n configDir: { description: \"Kill processes owned by a config directory (defaults to cwd)\" },\n signal: { description: \"Signal: SIGTERM (default) or SIGKILL\" },\n all: { description: \"Kill processes across all config directories\" },\n },\n },\n infraExport: {\n commandPath: [\"infra\", \"export\"],\n summary: \"Emit the resolved CI infra plan (env + services) for the current runtime\",\n interactive: false,\n fields: {\n target: { description: \"Export target: ci (default) or local\" },\n network: { description: \"NEAR network: mainnet or testnet\" },\n configDir: { description: \"Override config directory\" },\n },\n },\n} as const satisfies Record<string, CliCommandMeta>;\n"],"mappings":";;AAUA,MAAa,iBAAiB;CAC5B,KAAK;EACH,aAAa,CAAC,KAAK;EACnB,SAAS;EACT,aAAa;EACb,aAAa;EACb,QAAQ;GACN,eAAe,EACb,aACE,mFACJ;GACA,UAAU,EACR,aACE,mHACJ;EACF;CACF;CACA,OAAO;E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