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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as dntShim from "../../../_dnt.shims.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { createArgParser, parseArgsOrThrow } from "../../shared/args.js";
|
|
4
|
+
import type { ParsedArgs } from "../../shared/types.js";
|
|
5
|
+
import type { CommandCategory } from "../../help/types.js";
|
|
6
|
+
import { generateCommandSchema, generateSchema } from "./command.js";
|
|
7
|
+
|
|
8
|
+
const SchemaArgsSchema = z.object({
|
|
9
|
+
category: z.string().optional(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const parseSchemaArgs = createArgParser(SchemaArgsSchema, {
|
|
13
|
+
category: { keys: ["category", "c"], type: "string" },
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export async function handleSchemaCommand(args: ParsedArgs): Promise<void> {
|
|
17
|
+
const opts = parseArgsOrThrow(parseSchemaArgs, "schema", args);
|
|
18
|
+
const commandName = args._[1] as string | undefined;
|
|
19
|
+
|
|
20
|
+
if (commandName) {
|
|
21
|
+
const schema = generateCommandSchema(commandName);
|
|
22
|
+
if (!schema) {
|
|
23
|
+
console.error(`Unknown command: ${commandName}`);
|
|
24
|
+
dntShim.Deno.exit(1);
|
|
25
|
+
}
|
|
26
|
+
console.log(JSON.stringify(schema, null, 2));
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const schema = generateSchema(opts.category as CommandCategory | undefined);
|
|
31
|
+
console.log(JSON.stringify(schema, null, 2));
|
|
32
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CommandHelp } from "../../help/types.js";
|
|
2
|
+
|
|
3
|
+
export const skillsHelp: CommandHelp = {
|
|
4
|
+
name: "skills",
|
|
5
|
+
category: "ai",
|
|
6
|
+
description: "List and inspect available agent skills",
|
|
7
|
+
usage: "veryfront skills [subcommand] [options]",
|
|
8
|
+
options: [
|
|
9
|
+
{ flag: "--json", description: "Output as JSON" },
|
|
10
|
+
],
|
|
11
|
+
examples: [
|
|
12
|
+
"veryfront skills list",
|
|
13
|
+
"veryfront skills list --json",
|
|
14
|
+
"veryfront skills info scaffold-app",
|
|
15
|
+
"veryfront skills info deploy-safely --json",
|
|
16
|
+
"veryfront skills create my-skill",
|
|
17
|
+
"veryfront skills validate ./my-skill",
|
|
18
|
+
],
|
|
19
|
+
notes: [
|
|
20
|
+
"Subcommands: list (default), info, create, validate",
|
|
21
|
+
"Skills provide step-by-step agent workflows using CLI commands and MCP tools",
|
|
22
|
+
],
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills command — list and inspect agent skills
|
|
3
|
+
*
|
|
4
|
+
* @module cli/commands/skills
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { listAllSkills, loadSkill } from "../../skills/loader.js";
|
|
8
|
+
import type { LoadedSkill } from "../../skills/types.js";
|
|
9
|
+
|
|
10
|
+
export async function listSkills(): Promise<LoadedSkill[]> {
|
|
11
|
+
return await listAllSkills();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export async function getSkillInfo(
|
|
15
|
+
name: string,
|
|
16
|
+
): Promise<LoadedSkill | null> {
|
|
17
|
+
const skills = await listAllSkills();
|
|
18
|
+
const found = skills.find((s) => s.manifest.name === name);
|
|
19
|
+
if (found) return found;
|
|
20
|
+
|
|
21
|
+
// Try loading directly by path
|
|
22
|
+
return await loadSkill(name);
|
|
23
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills create command — scaffold a new skill
|
|
3
|
+
*
|
|
4
|
+
* @module cli/commands/skills/create
|
|
5
|
+
*/
|
|
6
|
+
import * as dntShim from "../../../_dnt.shims.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import type { ParsedArgs } from "../../shared/types.js";
|
|
10
|
+
import { createSuccessEnvelope, isJsonMode, outputJson } from "../../shared/json-output.js";
|
|
11
|
+
import { logSuccess } from "../../utils/index.js";
|
|
12
|
+
import { createFileSystem } from "../../../src/platform/index.js";
|
|
13
|
+
|
|
14
|
+
const VALID_SKILL_NAME = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/;
|
|
15
|
+
|
|
16
|
+
const SKILL_JSON_TEMPLATE = (name: string) =>
|
|
17
|
+
JSON.stringify(
|
|
18
|
+
{
|
|
19
|
+
name,
|
|
20
|
+
version: "1.0.0",
|
|
21
|
+
description: `${name} skill`,
|
|
22
|
+
requires: {
|
|
23
|
+
cli: [],
|
|
24
|
+
mcp: [],
|
|
25
|
+
},
|
|
26
|
+
inputs: {},
|
|
27
|
+
},
|
|
28
|
+
null,
|
|
29
|
+
2,
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const SKILL_MD_TEMPLATE = (name: string) =>
|
|
33
|
+
`# ${name}
|
|
34
|
+
|
|
35
|
+
## Overview
|
|
36
|
+
|
|
37
|
+
Describe what this skill does.
|
|
38
|
+
|
|
39
|
+
## Steps
|
|
40
|
+
|
|
41
|
+
1. **Step 1** — Description
|
|
42
|
+
\`\`\`bash
|
|
43
|
+
veryfront <command> --json
|
|
44
|
+
\`\`\`
|
|
45
|
+
|
|
46
|
+
2. **Step 2** — Description
|
|
47
|
+
|
|
48
|
+
## Error Recovery
|
|
49
|
+
|
|
50
|
+
- If step 1 fails: ...
|
|
51
|
+
- If step 2 fails: ...
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
export async function createSkill(args: ParsedArgs): Promise<void> {
|
|
55
|
+
const name = args._[2] as string | undefined;
|
|
56
|
+
if (!name) {
|
|
57
|
+
console.error("Usage: veryfront skills create <name>");
|
|
58
|
+
dntShim.Deno.exit(1);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (!VALID_SKILL_NAME.test(name)) {
|
|
62
|
+
console.error(
|
|
63
|
+
`Invalid skill name "${name}". Use lowercase letters, numbers, and hyphens (e.g. "my-skill").`,
|
|
64
|
+
);
|
|
65
|
+
dntShim.Deno.exit(1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const fs = createFileSystem();
|
|
69
|
+
const dir = name;
|
|
70
|
+
|
|
71
|
+
await fs.mkdir(dir, { recursive: true });
|
|
72
|
+
await fs.writeTextFile(`${dir}/skill.json`, SKILL_JSON_TEMPLATE(name));
|
|
73
|
+
await fs.writeTextFile(`${dir}/SKILL.md`, SKILL_MD_TEMPLATE(name));
|
|
74
|
+
|
|
75
|
+
if (isJsonMode()) {
|
|
76
|
+
await outputJson(
|
|
77
|
+
createSuccessEnvelope("skills", {
|
|
78
|
+
created: name,
|
|
79
|
+
files: [`${dir}/skill.json`, `${dir}/SKILL.md`],
|
|
80
|
+
}),
|
|
81
|
+
);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
logSuccess(`Created skill "${name}" at ./${dir}/`);
|
|
86
|
+
console.log(` Files: skill.json, SKILL.md`);
|
|
87
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import * as dntShim from "../../../_dnt.shims.js";
|
|
2
|
+
import type { ParsedArgs } from "../../shared/types.js";
|
|
3
|
+
import { createSuccessEnvelope, isJsonMode, outputJson } from "../../shared/json-output.js";
|
|
4
|
+
import { getSkillInfo, listSkills } from "./command.js";
|
|
5
|
+
import { bold, dim } from "../../ui/colors.js";
|
|
6
|
+
|
|
7
|
+
export async function handleSkillsCommand(args: ParsedArgs): Promise<void> {
|
|
8
|
+
const subcommand = args._[1] as string | undefined;
|
|
9
|
+
|
|
10
|
+
switch (subcommand) {
|
|
11
|
+
case "info":
|
|
12
|
+
return await handleSkillInfo(args);
|
|
13
|
+
case "create":
|
|
14
|
+
return await handleSkillCreate(args);
|
|
15
|
+
case "validate":
|
|
16
|
+
return await handleSkillValidate(args);
|
|
17
|
+
case "list":
|
|
18
|
+
default:
|
|
19
|
+
return await handleSkillList();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async function handleSkillList(): Promise<void> {
|
|
24
|
+
const skills = await listSkills();
|
|
25
|
+
|
|
26
|
+
if (isJsonMode()) {
|
|
27
|
+
await outputJson(
|
|
28
|
+
createSuccessEnvelope(
|
|
29
|
+
"skills",
|
|
30
|
+
skills.map((s) => ({
|
|
31
|
+
name: s.manifest.name,
|
|
32
|
+
version: s.manifest.version,
|
|
33
|
+
description: s.manifest.description,
|
|
34
|
+
requires: s.manifest.requires,
|
|
35
|
+
})),
|
|
36
|
+
),
|
|
37
|
+
);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (skills.length === 0) {
|
|
42
|
+
console.log(` ${dim("No skills found.")}`);
|
|
43
|
+
console.log(
|
|
44
|
+
` ${dim("Skills are located in cli/mcp/skills/")}`,
|
|
45
|
+
);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
console.log(`\n ${bold("Available Skills")}\n`);
|
|
50
|
+
for (const skill of skills) {
|
|
51
|
+
console.log(
|
|
52
|
+
` ${bold(skill.manifest.name)} ${dim(`v${skill.manifest.version}`)}`,
|
|
53
|
+
);
|
|
54
|
+
console.log(` ${skill.manifest.description}`);
|
|
55
|
+
}
|
|
56
|
+
console.log();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function handleSkillInfo(args: ParsedArgs): Promise<void> {
|
|
60
|
+
const name = args._[2] as string | undefined;
|
|
61
|
+
if (!name) {
|
|
62
|
+
console.error("Usage: veryfront skills info <name>");
|
|
63
|
+
dntShim.Deno.exit(1);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const skill = await getSkillInfo(name);
|
|
67
|
+
if (!skill) {
|
|
68
|
+
console.error(`Skill not found: ${name}`);
|
|
69
|
+
dntShim.Deno.exit(1);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (isJsonMode()) {
|
|
73
|
+
await outputJson(
|
|
74
|
+
createSuccessEnvelope("skills", {
|
|
75
|
+
...skill.manifest,
|
|
76
|
+
content: skill.skillMd,
|
|
77
|
+
directory: skill.directory,
|
|
78
|
+
}),
|
|
79
|
+
);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
console.log(`\n ${bold(skill.manifest.name)} ${dim(`v${skill.manifest.version}`)}`);
|
|
84
|
+
console.log(` ${skill.manifest.description}\n`);
|
|
85
|
+
if (skill.manifest.requires) {
|
|
86
|
+
if (skill.manifest.requires.cli?.length) {
|
|
87
|
+
console.log(` ${dim("CLI:")} ${skill.manifest.requires.cli.join(", ")}`);
|
|
88
|
+
}
|
|
89
|
+
if (skill.manifest.requires.mcp?.length) {
|
|
90
|
+
console.log(` ${dim("MCP:")} ${skill.manifest.requires.mcp.join(", ")}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (skill.skillMd) {
|
|
94
|
+
console.log(`\n${skill.skillMd}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async function handleSkillCreate(args: ParsedArgs): Promise<void> {
|
|
99
|
+
const { createSkill } = await import("./create.js");
|
|
100
|
+
await createSkill(args);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
async function handleSkillValidate(args: ParsedArgs): Promise<void> {
|
|
104
|
+
const { validateSkill } = await import("./validate.js");
|
|
105
|
+
await validateSkill(args);
|
|
106
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skills validate command — validate a skill directory
|
|
3
|
+
*
|
|
4
|
+
* @module cli/commands/skills/validate
|
|
5
|
+
*/
|
|
6
|
+
import * as dntShim from "../../../_dnt.shims.js";
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
import type { ParsedArgs } from "../../shared/types.js";
|
|
10
|
+
import { createSuccessEnvelope, isJsonMode, outputJson } from "../../shared/json-output.js";
|
|
11
|
+
import { parseSkillJson } from "../../skills/types.js";
|
|
12
|
+
import { COMMANDS } from "../../help/command-definitions.js";
|
|
13
|
+
import { logError, logSuccess } from "../../utils/index.js";
|
|
14
|
+
import { createFileSystem } from "../../../src/platform/index.js";
|
|
15
|
+
|
|
16
|
+
interface ValidationIssue {
|
|
17
|
+
severity: "error" | "warning";
|
|
18
|
+
message: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export async function validateSkill(args: ParsedArgs): Promise<void> {
|
|
22
|
+
const dir = (args._[2] as string | undefined) ?? ".";
|
|
23
|
+
const issues: ValidationIssue[] = [];
|
|
24
|
+
const fs = createFileSystem();
|
|
25
|
+
|
|
26
|
+
// Check skill.json exists and parses
|
|
27
|
+
let manifestRaw: string;
|
|
28
|
+
try {
|
|
29
|
+
manifestRaw = await fs.readTextFile(`${dir}/skill.json`);
|
|
30
|
+
} catch {
|
|
31
|
+
issues.push({ severity: "error", message: "skill.json not found" });
|
|
32
|
+
return outputResults(dir, issues);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
let parsed: ReturnType<typeof parseSkillJson>;
|
|
36
|
+
try {
|
|
37
|
+
parsed = parseSkillJson(JSON.parse(manifestRaw));
|
|
38
|
+
} catch {
|
|
39
|
+
issues.push({
|
|
40
|
+
severity: "error",
|
|
41
|
+
message: "skill.json is not valid JSON",
|
|
42
|
+
});
|
|
43
|
+
return outputResults(dir, issues);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (!parsed.success) {
|
|
47
|
+
issues.push({
|
|
48
|
+
severity: "error",
|
|
49
|
+
message: `skill.json schema error: ${parsed.error}`,
|
|
50
|
+
});
|
|
51
|
+
return outputResults(dir, issues);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Check SKILL.md exists
|
|
55
|
+
try {
|
|
56
|
+
const content = await fs.readTextFile(`${dir}/SKILL.md`);
|
|
57
|
+
if (!content.trim()) {
|
|
58
|
+
issues.push({ severity: "warning", message: "SKILL.md is empty" });
|
|
59
|
+
}
|
|
60
|
+
} catch {
|
|
61
|
+
issues.push({ severity: "error", message: "SKILL.md not found" });
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Check required CLI commands exist
|
|
65
|
+
const cliReqs = parsed.data.requires?.cli ?? [];
|
|
66
|
+
for (const cmd of cliReqs) {
|
|
67
|
+
if (!COMMANDS[cmd]) {
|
|
68
|
+
issues.push({
|
|
69
|
+
severity: "warning",
|
|
70
|
+
message: `Required CLI command "${cmd}" not found in registry`,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return outputResults(dir, issues);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
async function outputResults(
|
|
79
|
+
dir: string,
|
|
80
|
+
issues: ValidationIssue[],
|
|
81
|
+
): Promise<void> {
|
|
82
|
+
const hasErrors = issues.some((i) => i.severity === "error");
|
|
83
|
+
|
|
84
|
+
if (isJsonMode()) {
|
|
85
|
+
await outputJson(
|
|
86
|
+
createSuccessEnvelope("skills", {
|
|
87
|
+
directory: dir,
|
|
88
|
+
valid: !hasErrors,
|
|
89
|
+
issues,
|
|
90
|
+
}),
|
|
91
|
+
);
|
|
92
|
+
if (hasErrors) dntShim.Deno.exit(1);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (issues.length === 0) {
|
|
97
|
+
logSuccess(`Skill at "${dir}" is valid`);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
for (const issue of issues) {
|
|
102
|
+
if (issue.severity === "error") {
|
|
103
|
+
logError(issue.message);
|
|
104
|
+
} else {
|
|
105
|
+
console.log(` ! ${issue.message}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (hasErrors) dntShim.Deno.exit(1);
|
|
110
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CommandHelp } from "../../help/types.js";
|
|
2
|
+
|
|
3
|
+
export const testHelp: CommandHelp = {
|
|
4
|
+
name: "test",
|
|
5
|
+
category: "development",
|
|
6
|
+
description: "Run tests with optional structured JSON output",
|
|
7
|
+
usage: "veryfront test [filter] [options]",
|
|
8
|
+
options: [
|
|
9
|
+
{ flag: "--json", description: "Output structured JSON results" },
|
|
10
|
+
{ flag: "--parallel", description: "Run tests in parallel" },
|
|
11
|
+
{ flag: "--filter <pattern>", description: "Filter tests by name" },
|
|
12
|
+
],
|
|
13
|
+
examples: [
|
|
14
|
+
"veryfront test",
|
|
15
|
+
"veryfront test --json",
|
|
16
|
+
"veryfront test --filter 'deploy' --json",
|
|
17
|
+
],
|
|
18
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test wrapper command
|
|
3
|
+
*
|
|
4
|
+
* Runs deno test and transforms output to structured JSON.
|
|
5
|
+
*
|
|
6
|
+
* @module cli/commands/test
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export interface TestResult {
|
|
10
|
+
success: boolean;
|
|
11
|
+
summary: {
|
|
12
|
+
total: number;
|
|
13
|
+
passed: number;
|
|
14
|
+
failed: number;
|
|
15
|
+
skipped: number;
|
|
16
|
+
duration_ms: number;
|
|
17
|
+
};
|
|
18
|
+
failures: Array<{
|
|
19
|
+
file: string;
|
|
20
|
+
test: string;
|
|
21
|
+
error: string;
|
|
22
|
+
line?: number;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export function parseTestOutput(output: string, exitCode: number): TestResult {
|
|
27
|
+
const lines = output.split("\n");
|
|
28
|
+
|
|
29
|
+
let passed = 0;
|
|
30
|
+
let failed = 0;
|
|
31
|
+
let skipped = 0;
|
|
32
|
+
let durationMs = 0;
|
|
33
|
+
|
|
34
|
+
for (const line of lines) {
|
|
35
|
+
const summaryMatch = line.match(/(\d+)\s+passed\s*\|\s*(\d+)\s+failed/);
|
|
36
|
+
if (summaryMatch) {
|
|
37
|
+
passed = parseInt(summaryMatch[1] ?? "0", 10);
|
|
38
|
+
failed = parseInt(summaryMatch[2] ?? "0", 10);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const durationMatch = line.match(/\((\d+\.?\d*)s\)/);
|
|
42
|
+
if (durationMatch) {
|
|
43
|
+
durationMs = Math.round(parseFloat(durationMatch[1] ?? "0") * 1000);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const skippedMatch = line.match(/(\d+)\s+ignored/);
|
|
47
|
+
if (skippedMatch) {
|
|
48
|
+
skipped = parseInt(skippedMatch[1] ?? "0", 10);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const failures: TestResult["failures"] = [];
|
|
53
|
+
const failureRegex = /^(.*?)\s+\.\.\.\s+FAILED/;
|
|
54
|
+
for (let i = 0; i < lines.length; i++) {
|
|
55
|
+
const currentLine = lines[i];
|
|
56
|
+
if (!currentLine) continue;
|
|
57
|
+
const match = currentLine.match(failureRegex);
|
|
58
|
+
if (match) {
|
|
59
|
+
const testName = (match[1] ?? "").trim();
|
|
60
|
+
let error = "";
|
|
61
|
+
let file = "";
|
|
62
|
+
let line: number | undefined;
|
|
63
|
+
for (let j = i + 1; j < Math.min(i + 10, lines.length); j++) {
|
|
64
|
+
const lineText = lines[j];
|
|
65
|
+
if (!lineText) continue;
|
|
66
|
+
const fileLine = lineText.match(/at\s+(.*?):(\d+)/);
|
|
67
|
+
if (fileLine?.[1] && fileLine[2]) {
|
|
68
|
+
file = fileLine[1];
|
|
69
|
+
line = parseInt(fileLine[2], 10);
|
|
70
|
+
}
|
|
71
|
+
if (lineText.includes("Error:") || lineText.includes("assert")) {
|
|
72
|
+
error = lineText.trim();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
failures.push({ file, test: testName, error, line });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
success: exitCode === 0,
|
|
81
|
+
summary: {
|
|
82
|
+
total: passed + failed + skipped,
|
|
83
|
+
passed,
|
|
84
|
+
failed,
|
|
85
|
+
skipped,
|
|
86
|
+
duration_ms: durationMs,
|
|
87
|
+
},
|
|
88
|
+
failures,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as dntShim from "../../../_dnt.shims.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { createArgParser, parseArgsOrThrow } from "../../shared/args.js";
|
|
4
|
+
import type { ParsedArgs } from "../../shared/types.js";
|
|
5
|
+
import {
|
|
6
|
+
createErrorEnvelope,
|
|
7
|
+
createSuccessEnvelope,
|
|
8
|
+
isJsonMode,
|
|
9
|
+
outputJson,
|
|
10
|
+
} from "../../shared/json-output.js";
|
|
11
|
+
import { parseTestOutput } from "./command.js";
|
|
12
|
+
|
|
13
|
+
const TestArgsSchema = z.object({
|
|
14
|
+
filter: z.string().optional(),
|
|
15
|
+
parallel: z.boolean().default(false),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const parseTestArgs = createArgParser(TestArgsSchema, {
|
|
19
|
+
filter: { keys: ["filter"], type: "string", positional: 0 },
|
|
20
|
+
parallel: { keys: ["parallel"], type: "boolean" },
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export async function handleTestCommand(args: ParsedArgs): Promise<void> {
|
|
24
|
+
const opts = parseArgsOrThrow(parseTestArgs, "test", args);
|
|
25
|
+
|
|
26
|
+
const cmd = new dntShim.Deno.Command("deno", {
|
|
27
|
+
args: [
|
|
28
|
+
"test",
|
|
29
|
+
"--no-check",
|
|
30
|
+
"--allow-all",
|
|
31
|
+
"--unstable-worker-options",
|
|
32
|
+
"--unstable-net",
|
|
33
|
+
...(opts.parallel ? ["--parallel"] : []),
|
|
34
|
+
...(opts.filter ? [`--filter=${opts.filter}`] : []),
|
|
35
|
+
],
|
|
36
|
+
stdout: "piped",
|
|
37
|
+
stderr: "piped",
|
|
38
|
+
env: {
|
|
39
|
+
VF_DISABLE_LRU_INTERVAL: "1",
|
|
40
|
+
SSR_TRANSFORM_PER_PROJECT_LIMIT: "0",
|
|
41
|
+
REVALIDATION_PER_PROJECT_LIMIT: "0",
|
|
42
|
+
NODE_ENV: "production",
|
|
43
|
+
LOG_FORMAT: "text",
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const result = await cmd.output();
|
|
48
|
+
const stdout = new TextDecoder().decode(result.stdout);
|
|
49
|
+
const stderr = new TextDecoder().decode(result.stderr);
|
|
50
|
+
const fullOutput = stdout + "\n" + stderr;
|
|
51
|
+
|
|
52
|
+
if (isJsonMode()) {
|
|
53
|
+
const parsed = parseTestOutput(fullOutput, result.code);
|
|
54
|
+
if (parsed.success) {
|
|
55
|
+
await outputJson(createSuccessEnvelope("test", parsed));
|
|
56
|
+
} else {
|
|
57
|
+
await outputJson(createErrorEnvelope("test", {
|
|
58
|
+
code: "TEST_FAILURE",
|
|
59
|
+
slug: "tests-failed",
|
|
60
|
+
message: `${parsed.summary.failed} test(s) failed`,
|
|
61
|
+
context: parsed as unknown as Record<string, unknown>,
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
} else {
|
|
65
|
+
if (stdout) console.log(stdout);
|
|
66
|
+
if (stderr) console.error(stderr);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
dntShim.Deno.exit(result.code);
|
|
70
|
+
}
|
|
@@ -38,6 +38,11 @@ import { issuesHelp } from "../commands/issues/command-help.js";
|
|
|
38
38
|
import { startHelp } from "../commands/start/command-help.js";
|
|
39
39
|
import { taskHelp } from "../commands/task/command-help.js";
|
|
40
40
|
import { workflowHelp } from "../commands/workflow/command-help.js";
|
|
41
|
+
import { schemaHelp } from "../commands/schema/command-help.js";
|
|
42
|
+
import { testHelp } from "../commands/test/command-help.js";
|
|
43
|
+
import { lintHelp } from "../commands/lint/command-help.js";
|
|
44
|
+
import { skillsHelp } from "../commands/skills/command-help.js";
|
|
45
|
+
import { completionsHelp } from "../commands/completions/command-help.js";
|
|
41
46
|
|
|
42
47
|
/**
|
|
43
48
|
* Central registry of all command help definitions.
|
|
@@ -75,4 +80,9 @@ export const COMMANDS: CommandRegistry = {
|
|
|
75
80
|
start: startHelp,
|
|
76
81
|
task: taskHelp,
|
|
77
82
|
workflow: workflowHelp,
|
|
83
|
+
schema: schemaHelp,
|
|
84
|
+
test: testHelp,
|
|
85
|
+
lint: lintHelp,
|
|
86
|
+
skills: skillsHelp,
|
|
87
|
+
completions: completionsHelp,
|
|
78
88
|
};
|