veryfront 0.1.111 → 0.1.113
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/esm/cli/auth/login.d.ts.map +1 -1
- package/esm/cli/auth/login.js +13 -0
- package/esm/cli/commands/analyze-chunks/command-help.d.ts.map +1 -1
- package/esm/cli/commands/analyze-chunks/command-help.js +1 -0
- package/esm/cli/commands/build/command-help.d.ts.map +1 -1
- package/esm/cli/commands/build/command-help.js +1 -0
- package/esm/cli/commands/build/command.d.ts.map +1 -1
- package/esm/cli/commands/build/command.js +47 -2
- package/esm/cli/commands/clean/command-help.d.ts.map +1 -1
- package/esm/cli/commands/clean/command-help.js +1 -0
- package/esm/cli/commands/completions/command-help.d.ts +3 -0
- package/esm/cli/commands/completions/command-help.d.ts.map +1 -0
- package/esm/cli/commands/completions/command-help.js +13 -0
- package/esm/cli/commands/completions/command.d.ts +28 -0
- package/esm/cli/commands/completions/command.d.ts.map +1 -0
- package/esm/cli/commands/completions/command.js +133 -0
- package/esm/cli/commands/completions/handler.d.ts +3 -0
- package/esm/cli/commands/completions/handler.d.ts.map +1 -0
- package/esm/cli/commands/completions/handler.js +20 -0
- package/esm/cli/commands/demo/command-help.d.ts.map +1 -1
- package/esm/cli/commands/demo/command-help.js +1 -0
- package/esm/cli/commands/deploy/command-help.d.ts.map +1 -1
- package/esm/cli/commands/deploy/command-help.js +1 -0
- package/esm/cli/commands/deploy/command.d.ts.map +1 -1
- package/esm/cli/commands/deploy/command.js +73 -1
- package/esm/cli/commands/dev/command-help.d.ts.map +1 -1
- package/esm/cli/commands/dev/command-help.js +1 -0
- package/esm/cli/commands/doctor/command-help.d.ts.map +1 -1
- package/esm/cli/commands/doctor/command-help.js +1 -0
- package/esm/cli/commands/files/command-help.d.ts.map +1 -1
- package/esm/cli/commands/files/command-help.js +1 -0
- package/esm/cli/commands/generate/command-help.d.ts.map +1 -1
- package/esm/cli/commands/generate/command-help.js +1 -0
- package/esm/cli/commands/init/command-help.d.ts.map +1 -1
- package/esm/cli/commands/init/command-help.js +1 -0
- package/esm/cli/commands/install/command-help.d.ts.map +1 -1
- package/esm/cli/commands/install/command-help.js +2 -0
- package/esm/cli/commands/issues/command-help.d.ts.map +1 -1
- package/esm/cli/commands/issues/command-help.js +1 -0
- package/esm/cli/commands/knowledge/command-help.d.ts.map +1 -1
- package/esm/cli/commands/knowledge/command-help.js +1 -0
- package/esm/cli/commands/lint/command-help.d.ts +3 -0
- package/esm/cli/commands/lint/command-help.d.ts.map +1 -0
- package/esm/cli/commands/lint/command-help.js +13 -0
- package/esm/cli/commands/lint/command.d.ts +24 -0
- package/esm/cli/commands/lint/command.d.ts.map +1 -0
- package/esm/cli/commands/lint/command.js +34 -0
- package/esm/cli/commands/lint/handler.d.ts +3 -0
- package/esm/cli/commands/lint/handler.d.ts.map +1 -0
- package/esm/cli/commands/lint/handler.js +33 -0
- package/esm/cli/commands/lock/command-help.d.ts.map +1 -1
- package/esm/cli/commands/lock/command-help.js +1 -0
- package/esm/cli/commands/login/command-help.d.ts.map +1 -1
- package/esm/cli/commands/login/command-help.js +1 -0
- package/esm/cli/commands/logout/command-help.d.ts.map +1 -1
- package/esm/cli/commands/logout/command-help.js +1 -0
- package/esm/cli/commands/mcp/command-help.d.ts.map +1 -1
- package/esm/cli/commands/mcp/command-help.js +1 -0
- package/esm/cli/commands/merge/command-help.d.ts.map +1 -1
- package/esm/cli/commands/merge/command-help.js +1 -0
- package/esm/cli/commands/pull/command-help.d.ts.map +1 -1
- package/esm/cli/commands/pull/command-help.js +1 -0
- package/esm/cli/commands/push/command-help.d.ts.map +1 -1
- package/esm/cli/commands/push/command-help.js +1 -0
- package/esm/cli/commands/routes/command-help.d.ts.map +1 -1
- package/esm/cli/commands/routes/command-help.js +1 -0
- package/esm/cli/commands/schema/command-help.d.ts +3 -0
- package/esm/cli/commands/schema/command-help.d.ts.map +1 -0
- package/esm/cli/commands/schema/command-help.js +15 -0
- package/esm/cli/commands/schema/command.d.ts +30 -0
- package/esm/cli/commands/schema/command.d.ts.map +1 -0
- package/esm/cli/commands/schema/command.js +39 -0
- package/esm/cli/commands/schema/handler.d.ts +3 -0
- package/esm/cli/commands/schema/handler.d.ts.map +1 -0
- package/esm/cli/commands/schema/handler.js +25 -0
- package/esm/cli/commands/serve/command-help.d.ts.map +1 -1
- package/esm/cli/commands/serve/command-help.js +1 -0
- package/esm/cli/commands/skills/command-help.d.ts +3 -0
- package/esm/cli/commands/skills/command-help.d.ts.map +1 -0
- package/esm/cli/commands/skills/command-help.js +21 -0
- package/esm/cli/commands/skills/command.d.ts +9 -0
- package/esm/cli/commands/skills/command.d.ts.map +1 -0
- package/esm/cli/commands/skills/command.js +17 -0
- package/esm/cli/commands/skills/create.d.ts +3 -0
- package/esm/cli/commands/skills/create.d.ts.map +1 -0
- package/esm/cli/commands/skills/create.js +65 -0
- package/esm/cli/commands/skills/handler.d.ts +3 -0
- package/esm/cli/commands/skills/handler.d.ts.map +1 -0
- package/esm/cli/commands/skills/handler.js +82 -0
- package/esm/cli/commands/skills/validate.d.ts +3 -0
- package/esm/cli/commands/skills/validate.d.ts.map +1 -0
- package/esm/cli/commands/skills/validate.js +91 -0
- package/esm/cli/commands/start/command-help.d.ts.map +1 -1
- package/esm/cli/commands/start/command-help.js +1 -0
- package/esm/cli/commands/studio/command-help.d.ts.map +1 -1
- package/esm/cli/commands/studio/command-help.js +1 -0
- package/esm/cli/commands/styles/command-help.d.ts.map +1 -1
- package/esm/cli/commands/styles/command-help.js +1 -0
- package/esm/cli/commands/task/command-help.d.ts.map +1 -1
- package/esm/cli/commands/task/command-help.js +1 -0
- package/esm/cli/commands/test/command-help.d.ts +3 -0
- package/esm/cli/commands/test/command-help.d.ts.map +1 -0
- package/esm/cli/commands/test/command-help.js +16 -0
- package/esm/cli/commands/test/command.d.ts +25 -0
- package/esm/cli/commands/test/command.d.ts.map +1 -0
- package/esm/cli/commands/test/command.js +68 -0
- package/esm/cli/commands/test/handler.d.ts +3 -0
- package/esm/cli/commands/test/handler.d.ts.map +1 -0
- package/esm/cli/commands/test/handler.js +61 -0
- package/esm/cli/commands/up/command-help.d.ts.map +1 -1
- package/esm/cli/commands/up/command-help.js +1 -0
- package/esm/cli/commands/uploads/command-help.d.ts.map +1 -1
- package/esm/cli/commands/uploads/command-help.js +1 -0
- package/esm/cli/commands/whoami/command-help.d.ts.map +1 -1
- package/esm/cli/commands/whoami/command-help.js +1 -0
- package/esm/cli/commands/workflow/command-help.d.ts.map +1 -1
- package/esm/cli/commands/workflow/command-help.js +1 -0
- package/esm/cli/help/command-definitions.d.ts.map +1 -1
- package/esm/cli/help/command-definitions.js +10 -0
- package/esm/cli/help/main-help.d.ts.map +1 -1
- package/esm/cli/help/main-help.js +38 -5
- package/esm/cli/help/types.d.ts +2 -0
- package/esm/cli/help/types.d.ts.map +1 -1
- package/esm/cli/mcp/advanced-tools.d.ts.map +1 -1
- package/esm/cli/mcp/advanced-tools.js +4 -0
- package/esm/cli/mcp/server.d.ts.map +1 -1
- package/esm/cli/mcp/server.js +68 -0
- package/esm/cli/mcp/standalone.d.ts +2 -0
- package/esm/cli/mcp/standalone.d.ts.map +1 -1
- package/esm/cli/mcp/standalone.js +117 -2
- package/esm/cli/mcp/tools/cicd-tools.d.ts +3 -0
- package/esm/cli/mcp/tools/cicd-tools.d.ts.map +1 -0
- package/esm/cli/mcp/tools/cicd-tools.js +75 -0
- package/esm/cli/mcp/tools/introspection-tools.d.ts +3 -0
- package/esm/cli/mcp/tools/introspection-tools.d.ts.map +1 -0
- package/esm/cli/mcp/tools/introspection-tools.js +38 -0
- package/esm/cli/router.d.ts.map +1 -1
- package/esm/cli/router.js +35 -1
- package/esm/cli/shared/args.d.ts +4 -0
- package/esm/cli/shared/args.d.ts.map +1 -1
- package/esm/cli/shared/args.js +2 -0
- package/esm/cli/shared/interactive.d.ts +13 -0
- package/esm/cli/shared/interactive.d.ts.map +1 -0
- package/esm/cli/shared/interactive.js +26 -0
- package/esm/cli/shared/json-output.d.ts +52 -0
- package/esm/cli/shared/json-output.d.ts.map +1 -0
- package/esm/cli/shared/json-output.js +58 -0
- package/esm/cli/shared/suggest.d.ts +8 -0
- package/esm/cli/shared/suggest.d.ts.map +1 -0
- package/esm/cli/shared/suggest.js +25 -0
- package/esm/cli/skills/core-skills.d.ts +9 -0
- package/esm/cli/skills/core-skills.d.ts.map +1 -0
- package/esm/cli/skills/core-skills.js +230 -0
- package/esm/cli/skills/loader.d.ts +13 -0
- package/esm/cli/skills/loader.d.ts.map +1 -0
- package/esm/cli/skills/loader.js +87 -0
- package/esm/cli/skills/types.d.ts +29 -0
- package/esm/cli/skills/types.d.ts.map +1 -0
- package/esm/cli/skills/types.js +25 -0
- package/esm/cli/utils/index.d.ts.map +1 -1
- package/esm/cli/utils/index.js +3 -0
- package/esm/deno.d.ts +2 -0
- package/esm/deno.js +3 -1
- package/esm/src/html/dev-scripts.d.ts.map +1 -1
- package/esm/src/html/dev-scripts.js +3 -2
- package/esm/src/html/html-injection.d.ts.map +1 -1
- package/esm/src/html/html-injection.js +2 -1
- package/esm/src/html/html-shell-generator.js +1 -1
- package/esm/src/html/hydration-script-builder/dev-client-renderer.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/dev-client-renderer.js +2 -1
- package/esm/src/html/hydration-script-builder/dev-component-manifest.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/dev-component-manifest.js +2 -1
- package/esm/src/html/hydration-script-builder/dev-error-logger.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/dev-error-logger.js +2 -1
- package/esm/src/html/hydration-script-builder/dev-scripts.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/dev-scripts.js +2 -1
- package/esm/src/html/hydration-script-builder/prod-hydration.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/prod-hydration.js +2 -1
- package/esm/src/html/hydration-script-builder/prod-scripts.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/prod-scripts.js +2 -1
- package/esm/src/html/styles-builder/dev-styles.d.ts.map +1 -1
- package/esm/src/html/styles-builder/dev-styles.js +2 -1
- package/esm/src/modules/react-loader/ssr-module-loader/http-bundle-helpers.d.ts +10 -0
- package/esm/src/modules/react-loader/ssr-module-loader/http-bundle-helpers.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/http-bundle-helpers.js +53 -26
- package/esm/src/modules/react-loader/ssr-module-loader/loader.d.ts.map +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/loader.js +1 -1
- package/esm/src/modules/react-loader/ssr-module-loader/ssr-cache-manager.js +3 -3
- package/esm/src/rendering/orchestrator/html.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/html.js +94 -5
- package/esm/src/rendering/orchestrator/module-loader/index.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/module-loader/index.js +2 -2
- package/esm/src/rendering/rsc/client-boot.ts +30 -4
- package/esm/src/rendering/snippet-renderer.js +1 -1
- package/esm/src/security/http/response/security-handler.d.ts.map +1 -1
- package/esm/src/security/http/response/security-handler.js +3 -2
- package/esm/src/server/dev-server/error-overlay/html-template.d.ts +1 -1
- package/esm/src/server/dev-server/error-overlay/html-template.d.ts.map +1 -1
- package/esm/src/server/dev-server/error-overlay/html-template.js +4 -3
- package/esm/src/server/dev-server/error-overlay/overlay-renderer.d.ts +1 -1
- package/esm/src/server/dev-server/error-overlay/overlay-renderer.d.ts.map +1 -1
- package/esm/src/server/dev-server/error-overlay/overlay-renderer.js +2 -2
- package/esm/src/server/services/rendering/ssr.service.d.ts.map +1 -1
- package/esm/src/server/services/rendering/ssr.service.js +3 -3
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.d.ts.map +1 -1
- package/esm/src/server/services/rsc/endpoints/rsc-bundles.generated.js +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/cache/index.d.ts +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/cache/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/cache/index.js +10 -5
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts +2 -2
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/cache-format.js +13 -10
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.d.ts +2 -2
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.js +4 -4
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/framework-validator.d.ts +2 -3
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/framework-validator.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/framework-validator.js +71 -50
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/index.js +7 -5
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.d.ts +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.d.ts.map +1 -1
- package/esm/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.js +3 -2
- package/esm/src/utils/version.d.ts +1 -1
- package/esm/src/utils/version.js +1 -1
- package/package.json +1 -1
- package/src/cli/auth/login.ts +14 -0
- package/src/cli/commands/analyze-chunks/command-help.ts +1 -0
- package/src/cli/commands/build/command-help.ts +1 -0
- package/src/cli/commands/build/command.ts +47 -2
- package/src/cli/commands/clean/command-help.ts +1 -0
- package/src/cli/commands/completions/command-help.ts +15 -0
- package/src/cli/commands/completions/command.ts +163 -0
- package/src/cli/commands/completions/handler.ts +29 -0
- package/src/cli/commands/demo/command-help.ts +1 -0
- package/src/cli/commands/deploy/command-help.ts +1 -0
- package/src/cli/commands/deploy/command.ts +82 -1
- package/src/cli/commands/dev/command-help.ts +1 -0
- package/src/cli/commands/doctor/command-help.ts +1 -0
- package/src/cli/commands/files/command-help.ts +1 -0
- package/src/cli/commands/generate/command-help.ts +1 -0
- package/src/cli/commands/init/command-help.ts +1 -0
- package/src/cli/commands/install/command-help.ts +2 -0
- package/src/cli/commands/issues/command-help.ts +1 -0
- package/src/cli/commands/knowledge/command-help.ts +1 -0
- package/src/cli/commands/lint/command-help.ts +15 -0
- package/src/cli/commands/lint/command.ts +59 -0
- package/src/cli/commands/lint/handler.ts +36 -0
- package/src/cli/commands/lock/command-help.ts +1 -0
- package/src/cli/commands/login/command-help.ts +1 -0
- package/src/cli/commands/logout/command-help.ts +1 -0
- package/src/cli/commands/mcp/command-help.ts +1 -0
- package/src/cli/commands/merge/command-help.ts +1 -0
- package/src/cli/commands/pull/command-help.ts +1 -0
- package/src/cli/commands/push/command-help.ts +1 -0
- package/src/cli/commands/routes/command-help.ts +1 -0
- package/src/cli/commands/schema/command-help.ts +17 -0
- package/src/cli/commands/schema/command.ts +64 -0
- package/src/cli/commands/schema/handler.ts +32 -0
- package/src/cli/commands/serve/command-help.ts +1 -0
- package/src/cli/commands/skills/command-help.ts +23 -0
- package/src/cli/commands/skills/command.ts +23 -0
- package/src/cli/commands/skills/create.ts +87 -0
- package/src/cli/commands/skills/handler.ts +106 -0
- package/src/cli/commands/skills/validate.ts +110 -0
- package/src/cli/commands/start/command-help.ts +1 -0
- package/src/cli/commands/studio/command-help.ts +1 -0
- package/src/cli/commands/styles/command-help.ts +1 -0
- package/src/cli/commands/task/command-help.ts +1 -0
- package/src/cli/commands/test/command-help.ts +18 -0
- package/src/cli/commands/test/command.ts +90 -0
- package/src/cli/commands/test/handler.ts +70 -0
- package/src/cli/commands/up/command-help.ts +1 -0
- package/src/cli/commands/uploads/command-help.ts +1 -0
- package/src/cli/commands/whoami/command-help.ts +1 -0
- package/src/cli/commands/workflow/command-help.ts +1 -0
- package/src/cli/help/command-definitions.ts +10 -0
- package/src/cli/help/main-help.ts +48 -5
- package/src/cli/help/types.ts +9 -0
- package/src/cli/mcp/advanced-tools.ts +4 -0
- package/src/cli/mcp/server.ts +72 -0
- package/src/cli/mcp/standalone.ts +133 -1
- package/src/cli/mcp/tools/cicd-tools.ts +86 -0
- package/src/cli/mcp/tools/introspection-tools.ts +46 -0
- package/src/cli/router.ts +32 -1
- package/src/cli/shared/args.ts +2 -0
- package/src/cli/shared/interactive.ts +33 -0
- package/src/cli/shared/json-output.ts +96 -0
- package/src/cli/shared/suggest.ts +33 -0
- package/src/cli/skills/core-skills.ts +233 -0
- package/src/cli/skills/loader.ts +98 -0
- package/src/cli/skills/types.ts +39 -0
- package/src/cli/utils/index.ts +2 -0
- package/src/deno.js +3 -1
- package/src/src/html/dev-scripts.ts +4 -2
- package/src/src/html/html-injection.ts +2 -1
- package/src/src/html/html-shell-generator.ts +1 -1
- package/src/src/html/hydration-script-builder/dev-client-renderer.ts +2 -1
- package/src/src/html/hydration-script-builder/dev-component-manifest.ts +2 -1
- package/src/src/html/hydration-script-builder/dev-error-logger.ts +3 -1
- package/src/src/html/hydration-script-builder/dev-scripts.ts +2 -1
- package/src/src/html/hydration-script-builder/prod-hydration.ts +2 -1
- package/src/src/html/hydration-script-builder/prod-scripts.ts +2 -1
- package/src/src/html/styles-builder/dev-styles.ts +2 -1
- package/src/src/modules/react-loader/ssr-module-loader/http-bundle-helpers.ts +65 -31
- package/src/src/modules/react-loader/ssr-module-loader/loader.ts +1 -0
- package/src/src/modules/react-loader/ssr-module-loader/ssr-cache-manager.ts +4 -4
- package/src/src/rendering/orchestrator/html.ts +113 -4
- package/src/src/rendering/orchestrator/module-loader/index.ts +2 -1
- package/src/src/rendering/snippet-renderer.ts +1 -1
- package/src/src/security/http/response/security-handler.ts +3 -2
- package/src/src/server/dev-server/error-overlay/html-template.ts +4 -2
- package/src/src/server/dev-server/error-overlay/overlay-renderer.ts +2 -1
- package/src/src/server/services/rendering/ssr.service.ts +12 -7
- package/src/src/server/services/rsc/endpoints/rsc-bundles.generated.ts +1 -1
- package/src/src/transforms/mdx/esm-module-loader/cache/index.ts +15 -4
- package/src/src/transforms/mdx/esm-module-loader/cache-format.ts +24 -6
- package/src/src/transforms/mdx/esm-module-loader/module-fetcher/cache-keys.ts +10 -3
- package/src/src/transforms/mdx/esm-module-loader/module-fetcher/framework-validator.ts +98 -51
- package/src/src/transforms/mdx/esm-module-loader/module-fetcher/index.ts +20 -4
- package/src/src/transforms/mdx/esm-module-loader/module-fetcher/module-cache.ts +3 -1
- package/src/src/utils/version.ts +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { COMMANDS } from "./command-definitions.js";
|
|
2
|
+
import type { CommandCategory, CommandHelp } from "./types.js";
|
|
2
3
|
import {
|
|
3
4
|
calculateMaxLength,
|
|
4
5
|
formatCommandList,
|
|
@@ -9,6 +10,34 @@ import {
|
|
|
9
10
|
} from "./formatters.js";
|
|
10
11
|
import { bold, dim } from "../ui/colors.js";
|
|
11
12
|
|
|
13
|
+
const CATEGORY_LABELS: Record<CommandCategory, string> = {
|
|
14
|
+
development: "Development",
|
|
15
|
+
deploy: "Deploy & Sync",
|
|
16
|
+
project: "Project",
|
|
17
|
+
files: "Files & Data",
|
|
18
|
+
ai: "AI & Automation",
|
|
19
|
+
auth: "Auth",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const CATEGORY_ORDER: CommandCategory[] = [
|
|
23
|
+
"development",
|
|
24
|
+
"deploy",
|
|
25
|
+
"project",
|
|
26
|
+
"files",
|
|
27
|
+
"ai",
|
|
28
|
+
"auth",
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
function groupByCategory(commands: CommandHelp[]): Map<CommandCategory, CommandHelp[]> {
|
|
32
|
+
const groups = new Map<CommandCategory, CommandHelp[]>();
|
|
33
|
+
for (const cmd of commands) {
|
|
34
|
+
const group = groups.get(cmd.category) ?? [];
|
|
35
|
+
group.push(cmd);
|
|
36
|
+
groups.set(cmd.category, group);
|
|
37
|
+
}
|
|
38
|
+
return groups;
|
|
39
|
+
}
|
|
40
|
+
|
|
12
41
|
export function showMainHelp(): void {
|
|
13
42
|
console.log(formatHeader());
|
|
14
43
|
console.log();
|
|
@@ -17,13 +46,19 @@ export function showMainHelp(): void {
|
|
|
17
46
|
|
|
18
47
|
const commands = Object.values(COMMANDS);
|
|
19
48
|
const maxLength = calculateMaxLength(commands.map((c) => ({ length: c.name.length })));
|
|
49
|
+
const grouped = groupByCategory(commands);
|
|
50
|
+
|
|
51
|
+
for (const category of CATEGORY_ORDER) {
|
|
52
|
+
const cmds = grouped.get(category);
|
|
53
|
+
if (!cmds || cmds.length === 0) continue;
|
|
20
54
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
55
|
+
console.log(` ${formatSectionHeader(CATEGORY_LABELS[category])}`);
|
|
56
|
+
for (const line of formatCommandList(cmds, maxLength)) {
|
|
57
|
+
console.log(line);
|
|
58
|
+
}
|
|
59
|
+
console.log();
|
|
24
60
|
}
|
|
25
61
|
|
|
26
|
-
console.log();
|
|
27
62
|
console.log(` ${formatSectionHeader("Global Options")}`);
|
|
28
63
|
console.log(
|
|
29
64
|
` ${formatCommandName("-h, --help", maxLength)} ${formatDescription("Show help")}`,
|
|
@@ -31,6 +66,14 @@ export function showMainHelp(): void {
|
|
|
31
66
|
console.log(
|
|
32
67
|
` ${formatCommandName("-v, --version", maxLength)} ${formatDescription("Show version")}`,
|
|
33
68
|
);
|
|
69
|
+
console.log(
|
|
70
|
+
` ${formatCommandName("--json", maxLength)} ${formatDescription("Output as JSON")}`,
|
|
71
|
+
);
|
|
72
|
+
console.log(
|
|
73
|
+
` ${formatCommandName("--yes", maxLength)} ${
|
|
74
|
+
formatDescription("Skip confirmation prompts")
|
|
75
|
+
}`,
|
|
76
|
+
);
|
|
34
77
|
|
|
35
78
|
console.log();
|
|
36
79
|
console.log(` ${formatSectionHeader("Quick Start")}`);
|
|
@@ -42,7 +85,7 @@ export function showMainHelp(): void {
|
|
|
42
85
|
console.log(` ${formatSectionHeader("Coding Agents (MCP)")}`);
|
|
43
86
|
console.log(` ${dim("HTTP:")} MCP auto-starts on port 9999 with dev server`);
|
|
44
87
|
console.log(` ${dim("stdio:")} veryfront mcp`);
|
|
45
|
-
console.log(` ${dim("
|
|
88
|
+
console.log(` ${dim("Schema:")} veryfront schema --json`);
|
|
46
89
|
|
|
47
90
|
console.log();
|
|
48
91
|
console.log(` ${formatSectionHeader("Learn More")}`);
|
package/src/cli/help/types.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
export type CommandCategory =
|
|
2
|
+
| "development"
|
|
3
|
+
| "deploy"
|
|
4
|
+
| "project"
|
|
5
|
+
| "files"
|
|
6
|
+
| "ai"
|
|
7
|
+
| "auth";
|
|
8
|
+
|
|
1
9
|
export interface CommandOption {
|
|
2
10
|
flag: string;
|
|
3
11
|
description: string;
|
|
@@ -6,6 +14,7 @@ export interface CommandOption {
|
|
|
6
14
|
|
|
7
15
|
export interface CommandHelp {
|
|
8
16
|
name: string;
|
|
17
|
+
category: CommandCategory;
|
|
9
18
|
description: string;
|
|
10
19
|
usage: string;
|
|
11
20
|
options?: CommandOption[];
|
|
@@ -23,8 +23,12 @@ import {
|
|
|
23
23
|
} from "./tools/project-tools.js";
|
|
24
24
|
import { vfGetConventions, vfScaffold } from "./tools/scaffold-tools.js";
|
|
25
25
|
import { vfGetSkillReference, vfGetSkills } from "./tools/skill-tools.js";
|
|
26
|
+
import { cicdTools } from "./tools/cicd-tools.js";
|
|
27
|
+
import { introspectionTools } from "./tools/introspection-tools.js";
|
|
26
28
|
|
|
27
29
|
export const advancedTools: MCPTool[] = [
|
|
30
|
+
...cicdTools,
|
|
31
|
+
...introspectionTools,
|
|
28
32
|
vfGetSkills,
|
|
29
33
|
vfGetSkillReference,
|
|
30
34
|
vfListLocalProjects,
|
package/src/cli/mcp/server.ts
CHANGED
|
@@ -262,6 +262,30 @@ export class MCPDevServer {
|
|
|
262
262
|
description: "File-based issues, tasks, and plans",
|
|
263
263
|
mimeType: "application/json",
|
|
264
264
|
},
|
|
265
|
+
{
|
|
266
|
+
uri: "veryfront://schema",
|
|
267
|
+
name: "CLI Schema",
|
|
268
|
+
description: "Full CLI command schema for agent discovery",
|
|
269
|
+
mimeType: "application/json",
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
uri: "veryfront://agents-md",
|
|
273
|
+
name: "Root AGENTS.md",
|
|
274
|
+
description: "Agent onboarding documentation",
|
|
275
|
+
mimeType: "text/markdown",
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
uri: "veryfront://config",
|
|
279
|
+
name: "Project Config",
|
|
280
|
+
description: "Resolved project configuration",
|
|
281
|
+
mimeType: "application/json",
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
uri: "veryfront://skills",
|
|
285
|
+
name: "Available Skills",
|
|
286
|
+
description: "List of all available agent skills",
|
|
287
|
+
mimeType: "application/json",
|
|
288
|
+
},
|
|
265
289
|
],
|
|
266
290
|
};
|
|
267
291
|
}
|
|
@@ -316,6 +340,54 @@ export class MCPDevServer {
|
|
|
316
340
|
};
|
|
317
341
|
}
|
|
318
342
|
|
|
343
|
+
if (uri === "veryfront://schema") {
|
|
344
|
+
const { generateSchema } = await import("../commands/schema/command.js");
|
|
345
|
+
return {
|
|
346
|
+
contents: [{
|
|
347
|
+
uri,
|
|
348
|
+
mimeType: "application/json",
|
|
349
|
+
text: JSON.stringify(generateSchema()),
|
|
350
|
+
}],
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
if (uri === "veryfront://agents-md") {
|
|
355
|
+
const content = await readTextFile("AGENTS.md").catch(() => "AGENTS.md not found");
|
|
356
|
+
return {
|
|
357
|
+
contents: [{ uri, mimeType: "text/markdown", text: content }],
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
if (uri === "veryfront://config") {
|
|
362
|
+
const { getEnvironmentConfig } = await import("../../src/config/index.js");
|
|
363
|
+
const config = getEnvironmentConfig();
|
|
364
|
+
return {
|
|
365
|
+
contents: [{
|
|
366
|
+
uri,
|
|
367
|
+
mimeType: "application/json",
|
|
368
|
+
text: JSON.stringify(config, null, 2),
|
|
369
|
+
}],
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
if (uri === "veryfront://skills") {
|
|
374
|
+
const { listCoreSkills } = await import("../skills/loader.js");
|
|
375
|
+
const skills = await listCoreSkills();
|
|
376
|
+
const data = skills.map((s) => ({
|
|
377
|
+
name: s.manifest.name,
|
|
378
|
+
version: s.manifest.version,
|
|
379
|
+
description: s.manifest.description,
|
|
380
|
+
requires: s.manifest.requires,
|
|
381
|
+
}));
|
|
382
|
+
return {
|
|
383
|
+
contents: [{
|
|
384
|
+
uri,
|
|
385
|
+
mimeType: "application/json",
|
|
386
|
+
text: JSON.stringify(data, null, 2),
|
|
387
|
+
}],
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
|
|
319
391
|
if (!uri.startsWith("issues://")) throw new Error(`Unknown resource: ${uri}`);
|
|
320
392
|
|
|
321
393
|
const manager = createIssuesManager(cwd());
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
type JSONRPCResponse,
|
|
18
18
|
parseError,
|
|
19
19
|
PromptsGetParamsSchema,
|
|
20
|
+
ResourcesReadParamsSchema,
|
|
20
21
|
successResponse,
|
|
21
22
|
ToolsCallParamsSchema,
|
|
22
23
|
} from "./jsonrpc.js";
|
|
@@ -80,7 +81,7 @@ export class StandaloneMCPServer {
|
|
|
80
81
|
case "initialize":
|
|
81
82
|
return Promise.resolve({
|
|
82
83
|
protocolVersion: "2024-11-05",
|
|
83
|
-
capabilities: { tools: {}, prompts: {} },
|
|
84
|
+
capabilities: { tools: {}, resources: {}, prompts: {} },
|
|
84
85
|
serverInfo: { name: "veryfront-mcp", version: "1.0.0" },
|
|
85
86
|
});
|
|
86
87
|
case "notifications/initialized":
|
|
@@ -95,6 +96,10 @@ export class StandaloneMCPServer {
|
|
|
95
96
|
});
|
|
96
97
|
case "tools/call":
|
|
97
98
|
return this.handleToolsCall(params);
|
|
99
|
+
case "resources/list":
|
|
100
|
+
return Promise.resolve(this.handleResourcesList());
|
|
101
|
+
case "resources/read":
|
|
102
|
+
return this.handleResourcesRead(params);
|
|
98
103
|
case "prompts/list":
|
|
99
104
|
return Promise.resolve(this.handlePromptsList());
|
|
100
105
|
case "prompts/get":
|
|
@@ -114,6 +119,76 @@ export class StandaloneMCPServer {
|
|
|
114
119
|
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
115
120
|
}
|
|
116
121
|
|
|
122
|
+
private handleResourcesList(): unknown {
|
|
123
|
+
return {
|
|
124
|
+
resources: [
|
|
125
|
+
{
|
|
126
|
+
uri: "veryfront://schema",
|
|
127
|
+
name: "CLI Schema",
|
|
128
|
+
description: "Full CLI command schema for agent discovery",
|
|
129
|
+
mimeType: "application/json",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
uri: "veryfront://agents-md",
|
|
133
|
+
name: "Root AGENTS.md",
|
|
134
|
+
description: "Agent onboarding documentation",
|
|
135
|
+
mimeType: "text/markdown",
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
uri: "veryfront://skills",
|
|
139
|
+
name: "Available Skills",
|
|
140
|
+
description: "List of all available agent skills",
|
|
141
|
+
mimeType: "application/json",
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
private async handleResourcesRead(params: unknown): Promise<unknown> {
|
|
148
|
+
const { uri } = ResourcesReadParamsSchema.parse(params);
|
|
149
|
+
|
|
150
|
+
if (uri === "veryfront://schema") {
|
|
151
|
+
const { generateSchema } = await import("../commands/schema/command.js");
|
|
152
|
+
return {
|
|
153
|
+
contents: [{
|
|
154
|
+
uri,
|
|
155
|
+
mimeType: "application/json",
|
|
156
|
+
text: JSON.stringify(generateSchema(), null, 2),
|
|
157
|
+
}],
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (uri === "veryfront://agents-md") {
|
|
162
|
+
try {
|
|
163
|
+
const agentsPath = new URL("../../AGENTS.md", import.meta.url).pathname;
|
|
164
|
+
const content = await readTextFile(agentsPath);
|
|
165
|
+
return { contents: [{ uri, mimeType: "text/markdown", text: content }] };
|
|
166
|
+
} catch {
|
|
167
|
+
return { contents: [{ uri, mimeType: "text/markdown", text: "AGENTS.md not found" }] };
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (uri === "veryfront://skills") {
|
|
172
|
+
const { listCoreSkills } = await import("../skills/loader.js");
|
|
173
|
+
const skills = await listCoreSkills();
|
|
174
|
+
const data = skills.map((s) => ({
|
|
175
|
+
name: s.manifest.name,
|
|
176
|
+
version: s.manifest.version,
|
|
177
|
+
description: s.manifest.description,
|
|
178
|
+
requires: s.manifest.requires,
|
|
179
|
+
}));
|
|
180
|
+
return {
|
|
181
|
+
contents: [{
|
|
182
|
+
uri,
|
|
183
|
+
mimeType: "application/json",
|
|
184
|
+
text: JSON.stringify(data, null, 2),
|
|
185
|
+
}],
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
throw new Error(`Unknown resource: ${uri}`);
|
|
190
|
+
}
|
|
191
|
+
|
|
117
192
|
private handlePromptsList(): unknown {
|
|
118
193
|
return {
|
|
119
194
|
prompts: [
|
|
@@ -160,6 +235,63 @@ export class StandaloneMCPServer {
|
|
|
160
235
|
const client = this.client;
|
|
161
236
|
|
|
162
237
|
return [
|
|
238
|
+
{
|
|
239
|
+
name: "vf_get_schema",
|
|
240
|
+
description:
|
|
241
|
+
"Get the CLI command schema for discovering available commands, arguments, and flags.",
|
|
242
|
+
inputSchema: {
|
|
243
|
+
type: "object",
|
|
244
|
+
properties: {
|
|
245
|
+
command: {
|
|
246
|
+
type: "string",
|
|
247
|
+
description: "Get schema for a specific command",
|
|
248
|
+
},
|
|
249
|
+
category: {
|
|
250
|
+
type: "string",
|
|
251
|
+
description: "Filter by category",
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
async execute(args) {
|
|
256
|
+
const { generateCommandSchema, generateSchema } = await import(
|
|
257
|
+
"../commands/schema/command.js"
|
|
258
|
+
);
|
|
259
|
+
if (args.command) {
|
|
260
|
+
return generateCommandSchema(args.command as string) ??
|
|
261
|
+
{ error: `Unknown command: ${args.command}` };
|
|
262
|
+
}
|
|
263
|
+
return generateSchema(
|
|
264
|
+
args.category as
|
|
265
|
+
| "development"
|
|
266
|
+
| "deploy"
|
|
267
|
+
| "project"
|
|
268
|
+
| "files"
|
|
269
|
+
| "ai"
|
|
270
|
+
| "auth"
|
|
271
|
+
| undefined,
|
|
272
|
+
);
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
name: "vf_get_project_info",
|
|
277
|
+
description: "Get project metadata including project slug, version, and environment.",
|
|
278
|
+
inputSchema: { type: "object", properties: {} },
|
|
279
|
+
async execute() {
|
|
280
|
+
const { VERSION } = await import("../utils/index.js");
|
|
281
|
+
try {
|
|
282
|
+
const { getEnvironmentConfig } = await import("../../src/config/index.js");
|
|
283
|
+
const config = getEnvironmentConfig();
|
|
284
|
+
return {
|
|
285
|
+
version: VERSION,
|
|
286
|
+
projectSlug: config.projectSlug ?? null,
|
|
287
|
+
nodeEnv: config.nodeEnv,
|
|
288
|
+
veryfrontEnv: config.veryfrontEnv,
|
|
289
|
+
};
|
|
290
|
+
} catch {
|
|
291
|
+
return { version: VERSION };
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
},
|
|
163
295
|
{
|
|
164
296
|
name: "vf_get_errors",
|
|
165
297
|
description:
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { MCPTool } from "../../../src/mcp/index.js";
|
|
3
|
+
|
|
4
|
+
const getPipelineStatusInput = z.object({
|
|
5
|
+
projectSlug: z.string().describe("Project slug"),
|
|
6
|
+
environment: z.string().optional().default("production").describe("Target environment"),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const vfGetPipelineStatus: MCPTool = {
|
|
10
|
+
name: "vf_get_pipeline_status",
|
|
11
|
+
description: "Get the current build/deploy pipeline state for a project environment.",
|
|
12
|
+
inputSchema: getPipelineStatusInput,
|
|
13
|
+
execute: async (input: { projectSlug: string; environment: string }) => {
|
|
14
|
+
return {
|
|
15
|
+
status: "not_implemented",
|
|
16
|
+
message: "CI/CD pipeline API not yet available. This tool requires backend support.",
|
|
17
|
+
projectSlug: input.projectSlug,
|
|
18
|
+
environment: input.environment,
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const getDeployHistoryInput = z.object({
|
|
24
|
+
projectSlug: z.string().describe("Project slug"),
|
|
25
|
+
limit: z.number().optional().default(10).describe("Number of recent deployments to return"),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const vfGetDeployHistory: MCPTool = {
|
|
29
|
+
name: "vf_get_deploy_history",
|
|
30
|
+
description: "List recent deployments with status, version, URL, and timestamp.",
|
|
31
|
+
inputSchema: getDeployHistoryInput,
|
|
32
|
+
execute: async (input: { projectSlug: string; limit: number }) => {
|
|
33
|
+
return {
|
|
34
|
+
status: "not_implemented",
|
|
35
|
+
message: "Deploy history API not yet available.",
|
|
36
|
+
projectSlug: input.projectSlug,
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const getBuildLogsInput = z.object({
|
|
42
|
+
projectSlug: z.string().describe("Project slug"),
|
|
43
|
+
deployId: z.string().optional().describe("Specific deployment ID (latest if omitted)"),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const vfGetBuildLogs: MCPTool = {
|
|
47
|
+
name: "vf_get_build_logs",
|
|
48
|
+
description: "Get build logs from an active or recent build/deployment.",
|
|
49
|
+
inputSchema: getBuildLogsInput,
|
|
50
|
+
execute: async (input: { projectSlug: string; deployId?: string }) => {
|
|
51
|
+
return {
|
|
52
|
+
status: "not_implemented",
|
|
53
|
+
message: "Build logs API not yet available.",
|
|
54
|
+
projectSlug: input.projectSlug,
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const triggerDeployInput = z.object({
|
|
60
|
+
projectSlug: z.string().describe("Project slug"),
|
|
61
|
+
environment: z.string().optional().default("production").describe("Target environment"),
|
|
62
|
+
branch: z.string().optional().default("main").describe("Branch to deploy"),
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const vfTriggerDeploy: MCPTool = {
|
|
66
|
+
name: "vf_trigger_deploy",
|
|
67
|
+
description:
|
|
68
|
+
"Trigger a deployment to an environment. Returns a deployment ID for status tracking.",
|
|
69
|
+
inputSchema: triggerDeployInput,
|
|
70
|
+
execute: async (input: { projectSlug: string; environment: string; branch: string }) => {
|
|
71
|
+
return {
|
|
72
|
+
status: "not_implemented",
|
|
73
|
+
message: "Deploy trigger API not yet available.",
|
|
74
|
+
projectSlug: input.projectSlug,
|
|
75
|
+
environment: input.environment,
|
|
76
|
+
branch: input.branch,
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const cicdTools: MCPTool[] = [
|
|
82
|
+
vfGetPipelineStatus,
|
|
83
|
+
vfGetDeployHistory,
|
|
84
|
+
vfGetBuildLogs,
|
|
85
|
+
vfTriggerDeploy,
|
|
86
|
+
];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { MCPTool } from "../../../src/mcp/index.js";
|
|
3
|
+
import { generateCommandSchema, generateSchema } from "../../commands/schema/command.js";
|
|
4
|
+
import type { CommandCategory } from "../../help/types.js";
|
|
5
|
+
import { VERSION } from "../../utils/index.js";
|
|
6
|
+
|
|
7
|
+
const getSchemaInput = z.object({
|
|
8
|
+
command: z.string().optional().describe("Get schema for a specific command"),
|
|
9
|
+
category: z.string().optional().describe("Filter by category"),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const vfGetSchema: MCPTool = {
|
|
13
|
+
name: "vf_get_schema",
|
|
14
|
+
description:
|
|
15
|
+
"Get the CLI command schema for discovering available commands, arguments, and flags.",
|
|
16
|
+
inputSchema: getSchemaInput,
|
|
17
|
+
execute: async (input: { command?: string; category?: string }) => {
|
|
18
|
+
if (input.command) {
|
|
19
|
+
return generateCommandSchema(input.command) ?? { error: `Unknown command: ${input.command}` };
|
|
20
|
+
}
|
|
21
|
+
return generateSchema(input.category as CommandCategory | undefined);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const getProjectInfoInput = z.object({});
|
|
26
|
+
|
|
27
|
+
const vfGetProjectInfo: MCPTool = {
|
|
28
|
+
name: "vf_get_project_info",
|
|
29
|
+
description: "Get project metadata including project slug, version, and environment.",
|
|
30
|
+
inputSchema: getProjectInfoInput,
|
|
31
|
+
execute: async () => {
|
|
32
|
+
const { getEnvironmentConfig } = await import("../../../src/config/index.js");
|
|
33
|
+
const config = getEnvironmentConfig();
|
|
34
|
+
return {
|
|
35
|
+
version: VERSION,
|
|
36
|
+
projectSlug: config.projectSlug ?? null,
|
|
37
|
+
nodeEnv: config.nodeEnv,
|
|
38
|
+
veryfrontEnv: config.veryfrontEnv,
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const introspectionTools: MCPTool[] = [
|
|
44
|
+
vfGetSchema,
|
|
45
|
+
vfGetProjectInfo,
|
|
46
|
+
];
|
package/src/cli/router.ts
CHANGED
|
@@ -34,11 +34,18 @@ import { handleUpCommand } from "./commands/up/index.js";
|
|
|
34
34
|
import { handleTaskCommand } from "./commands/task/handler.js";
|
|
35
35
|
import { handleWorkflowCommand } from "./commands/workflow/handler.js";
|
|
36
36
|
import { handleWorkerCommand } from "./commands/worker/handler.js";
|
|
37
|
+
import { handleSchemaCommand } from "./commands/schema/handler.js";
|
|
38
|
+
import { handleTestCommand } from "./commands/test/handler.js";
|
|
39
|
+
import { handleLintCommand } from "./commands/lint/handler.js";
|
|
40
|
+
import { handleSkillsCommand } from "./commands/skills/handler.js";
|
|
41
|
+
import { handleCompletionsCommand } from "./commands/completions/handler.js";
|
|
37
42
|
import { login, logout, whoami } from "./auth/index.js";
|
|
38
43
|
import { parseLoginMethod } from "./auth/utils.js";
|
|
39
44
|
import { showCommandHelp, showMainHelp } from "./help/index.js";
|
|
40
45
|
import { setColorOverride } from "./ui/colors.js";
|
|
41
46
|
import { exitProcess, setQuietMode, setVerboseMode } from "./utils/index.js";
|
|
47
|
+
import { setJsonMode, setOutputPath } from "./shared/json-output.js";
|
|
48
|
+
import { detectCI, setNonInteractive } from "./shared/interactive.js";
|
|
42
49
|
import type { ParsedArgs } from "./shared/types.js";
|
|
43
50
|
|
|
44
51
|
/**
|
|
@@ -86,6 +93,11 @@ const commands: Record<string, (args: ParsedArgs) => Promise<void>> = {
|
|
|
86
93
|
"task": handleTaskCommand,
|
|
87
94
|
"workflow": handleWorkflowCommand,
|
|
88
95
|
"worker": handleWorkerCommand,
|
|
96
|
+
"schema": handleSchemaCommand,
|
|
97
|
+
"test": handleTestCommand,
|
|
98
|
+
"lint": handleLintCommand,
|
|
99
|
+
"skills": handleSkillsCommand,
|
|
100
|
+
"completions": handleCompletionsCommand,
|
|
89
101
|
};
|
|
90
102
|
|
|
91
103
|
/**
|
|
@@ -112,6 +124,12 @@ export async function routeCommand(args: ParsedArgs): Promise<void> {
|
|
|
112
124
|
if (args.verbose) setVerboseMode(true);
|
|
113
125
|
else if (args.quiet || args.q) setQuietMode(true);
|
|
114
126
|
|
|
127
|
+
if (args.json || args.j) setJsonMode(true);
|
|
128
|
+
if (typeof args.output === "string") setOutputPath(args.output);
|
|
129
|
+
else if (typeof args.o === "string") setOutputPath(args.o as string);
|
|
130
|
+
|
|
131
|
+
if (args.yes || args.y || detectCI()) setNonInteractive(true);
|
|
132
|
+
|
|
115
133
|
if (args.version || args.v) {
|
|
116
134
|
cliLogger.info(`Veryfront CLI v${VERSION}`);
|
|
117
135
|
exitProcess(0);
|
|
@@ -136,8 +154,21 @@ export async function routeCommand(args: ParsedArgs): Promise<void> {
|
|
|
136
154
|
const handler = command ? commands[command] : undefined;
|
|
137
155
|
|
|
138
156
|
if (command && !handler) {
|
|
157
|
+
const { suggestCommand } = await import("./shared/suggest.js");
|
|
158
|
+
const { COMMANDS } = await import("./help/command-definitions.js");
|
|
159
|
+
// Use canonical command names from help registry (excludes aliases like "g", "preview")
|
|
160
|
+
const canonicalNames = Object.keys(COMMANDS);
|
|
161
|
+
const suggestions = suggestCommand(command, canonicalNames);
|
|
139
162
|
cliLogger.error(`Unknown command: ${command}\n`);
|
|
140
|
-
|
|
163
|
+
if (suggestions.length > 0) {
|
|
164
|
+
cliLogger.info(` Did you mean?`);
|
|
165
|
+
for (const s of suggestions) {
|
|
166
|
+
const desc = COMMANDS[s]?.description ?? "";
|
|
167
|
+
cliLogger.info(` ${s} ${desc}`);
|
|
168
|
+
}
|
|
169
|
+
} else {
|
|
170
|
+
showHelp();
|
|
171
|
+
}
|
|
141
172
|
exitProcess(1);
|
|
142
173
|
return;
|
|
143
174
|
}
|
package/src/cli/shared/args.ts
CHANGED
|
@@ -160,6 +160,7 @@ export const CommonArgs = {
|
|
|
160
160
|
into: { keys: ["into"], type: "string" },
|
|
161
161
|
release: { keys: ["release"], type: "string" },
|
|
162
162
|
output: { keys: ["output", "o"], type: "string" },
|
|
163
|
+
json: { keys: ["json", "j"], type: "boolean" },
|
|
163
164
|
} satisfies Record<string, ArgSpec>;
|
|
164
165
|
|
|
165
166
|
// ── Raw CLI argument parsing ────────────────────────────────────────────
|
|
@@ -257,6 +258,7 @@ export function parseCliArgs(args: string[]): ParsedArgs {
|
|
|
257
258
|
s: "strict",
|
|
258
259
|
t: "template",
|
|
259
260
|
j: "json",
|
|
261
|
+
y: "yes",
|
|
260
262
|
w: "with",
|
|
261
263
|
m: "mode",
|
|
262
264
|
},
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactive mode control for CLI
|
|
3
|
+
*
|
|
4
|
+
* Controls whether the CLI prompts for user input.
|
|
5
|
+
* Non-interactive mode is enabled by --yes flag or CI detection.
|
|
6
|
+
*
|
|
7
|
+
* @module cli/shared/interactive
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { getEnv } from "../../src/platform/index.js";
|
|
11
|
+
|
|
12
|
+
let _nonInteractive = false;
|
|
13
|
+
|
|
14
|
+
export function setNonInteractive(enabled: boolean): void {
|
|
15
|
+
_nonInteractive = enabled;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function isInteractive(): boolean {
|
|
19
|
+
return !_nonInteractive;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function resetInteractiveMode(): void {
|
|
23
|
+
_nonInteractive = false;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const CI_ENV_VARS = ["CI", "GITHUB_ACTIONS", "GITLAB_CI", "JENKINS_URL", "CIRCLECI", "BUILDKITE"];
|
|
27
|
+
|
|
28
|
+
export function detectCI(): boolean {
|
|
29
|
+
return CI_ENV_VARS.some((v) => {
|
|
30
|
+
const val = getEnv(v);
|
|
31
|
+
return val !== undefined && val !== "" && val !== "0" && val !== "false";
|
|
32
|
+
});
|
|
33
|
+
}
|