Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/actions/setup-deno/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ runs:

- name: Generate template manifest
shell: bash
run: deno run -A scripts/build/generate-templates-manifest.ts && deno fmt cli/templates/manifest.json
run: deno run -A scripts/build/generate-templates-manifest.ts && deno fmt templates/manifest.json

- name: Warm Redis module cache
if: inputs.warm-redis-cache == 'true' && steps.deno-cache.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ veryfront-local
src/integrations/_data.ts

# Generated template manifest (rebuild with generate-templates-manifest.ts)
cli/templates/manifest.json
templates/manifest.json

# Generated build artifacts (rebuild with `deno task generate`)
src/server/handlers/dev/framework-candidates.generated.ts
Expand Down
7 changes: 5 additions & 2 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@ cli/
├── ui/ # Colors, ANSI, box drawing
├── utils/ # General utilities
├── help/ # Command definitions, help formatting
├── discovery/ # User project file discovery (tools, agents)
└── templates/ # Project and integration templates
└── discovery/ # User project file discovery (tools, agents)
```

Project, feature, integration, and ai-rules templates live at the repository root
under `../templates/`. They are no longer a CLI-only concern: the framework and
the API read the same generated manifest.

CLI integration-test support lives outside the shipped package under `tests/support/`.

## Commands
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/init/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Single source of truth for all CLI template/integration data
*/

import type { IntegrationName } from "../../templates/types.ts";
import type { IntegrationName } from "../../../templates/types.ts";
import type { InitTemplate } from "./types.ts";
import type { SelectOption } from "../../utils/terminal-select.ts";
import {
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/init/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { initCommand } from "./init-command.ts";
import type { ParsedArgs } from "#cli/shared/types";
import type { InitRuntime, InitTemplate } from "./types.ts";
import { parseRuntime } from "./runtime.ts";
import type { IntegrationName } from "../../templates/types.ts";
import type { IntegrationName } from "../../../templates/types.ts";

/**
* Handle the init command with argument parsing and config file support
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/init/init.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { VERSION } from "#cli/utils";
import { join } from "#veryfront/compat/path/index.ts";
import { exists, makeTempDir, readTextFile, remove, stat } from "#veryfront/testing/deno-compat.ts";
import { runCommand } from "#veryfront/compat/process.ts";
import { STARTER_TEMPLATE_NAMES } from "../../templates/types.ts";
import { STARTER_TEMPLATE_NAMES } from "../../../templates/types.ts";
import type { InitOptions } from "./types.ts";

const TEST_DIR = await makeTempDir({ prefix: "veryfront-init-test-" });
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/init/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { FeatureName, IntegrationName } from "../../templates/types.ts";
import type { FeatureName, IntegrationName } from "../../../templates/types.ts";

export type InitTemplate =
| "ai-agent"
Expand Down
2 changes: 1 addition & 1 deletion cli/commands/install/registry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import manifest from "../../templates/manifest.json" with { type: "json" };
import manifest from "../../../templates/manifest.json" with { type: "json" };
import { type AITool, type AIToolId, AIToolIdSchema, AIToolSchema } from "./types.ts";

const AI_TOOLS_RAW = [
Expand Down
6 changes: 3 additions & 3 deletions cli/encrypted-token-store-template.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {
createEncryptedTokenStore,
type EncryptedKvBackend,
generateEncryptionKey,
} from "./templates/integrations/_base/files/lib/encrypted-token-store.ts";
import { createMemoryKvBackend } from "./templates/integrations/_base/files/lib/token-store-examples.ts";
import { createTokenStore } from "./templates/integrations/_base/files/lib/token-store.ts";
} from "../templates/integrations/_base/files/lib/encrypted-token-store.ts";
import { createMemoryKvBackend } from "../templates/integrations/_base/files/lib/token-store-examples.ts";
import { createTokenStore } from "../templates/integrations/_base/files/lib/token-store.ts";

const ENVELOPE_PREFIX = "vf-aes-gcm.v2:";
const LEGACY_ENVELOPE_PREFIX = "vf-aes-gcm.v1:";
Expand Down
2 changes: 1 addition & 1 deletion cli/mcp/tools/catalog-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { validateProjectName } from "../../shared/project-name.ts";
import type { MCPTool } from "../tools.ts";
import { directoryExists, formatError, toSlug } from "./helpers.ts";
import type { InitTemplate } from "../../commands/init/types.ts";
import type { IntegrationName } from "../../templates/types.ts";
import type { IntegrationName } from "../../../templates/types.ts";

// ============================================================================
// Static Data
Expand Down
2 changes: 1 addition & 1 deletion cli/shared/project-creation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { describe, it } from "#veryfront/testing/bdd.ts";
import { exists, makeTempDir, remove } from "#veryfront/testing/deno-compat.ts";
import { join } from "veryfront/platform/path";
import { formatCLIError, VeryfrontError } from "veryfront/errors";
import { STARTER_TEMPLATE_NAMES } from "../templates/types.ts";
import { STARTER_TEMPLATE_NAMES } from "../../templates/types.ts";
import {
createProject,
type CreateProjectRequest,
Expand Down
10 changes: 5 additions & 5 deletions cli/shared/project-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ import {
loadIntegrationBaseFilesFromDirectory,
loadIntegrations,
validateIntegrations,
} from "../templates/integration-loader.ts";
} from "../../templates/integration-loader.ts";
import {
loadFeature,
mergeFiles,
resolveFeatures,
validateFeatures,
} from "../templates/feature-loader.ts";
import { STARTER_TEMPLATE_NAMES } from "../templates/types.ts";
} from "../../templates/feature-loader.ts";
import { STARTER_TEMPLATE_NAMES } from "../../templates/types.ts";
import type {
EnvVarConfig,
FeatureName,
IntegrationName,
ResolvedIntegration,
TemplateFile,
} from "../templates/types.ts";
} from "../../templates/types.ts";
import { validateProjectName } from "./project-name.ts";

export interface CreateProjectRequest {
Expand Down Expand Up @@ -219,7 +219,7 @@ async function loadTemplateFiles(
}
> {
const { getAiRuleTemplate, getTemplate, getTemplateConfig } = await import(
"../templates/index.ts"
"../../templates/index.ts"
);

let files = await getTemplate(template);
Expand Down
2 changes: 1 addition & 1 deletion cli/token-store-template.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
createDefaultTokenStore,
createTokenStore,
getRefreshableAccessToken,
} from "./templates/integrations/_base/files/lib/token-store.ts";
} from "../templates/integrations/_base/files/lib/token-store.ts";

describe("generated OAuth token store", () => {
const originalNodeEnv = Deno.env.get("NODE_ENV");
Expand Down
2 changes: 1 addition & 1 deletion cli/utils/env-prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { cliLogger as logger } from "#cli/utils";
import { cyan, dim, green, yellow } from "#cli/ui";
import { isInteractive as checkIsInteractive } from "veryfront/platform";
import { isCiEnv, isDenoTestingEnv } from "veryfront/config";
import type { EnvVarConfig } from "../templates/index.ts";
import type { EnvVarConfig } from "../../templates/index.ts";
import { promptPassword, promptUser } from "./index.ts";
import { isInteractive as isCliInteractive } from "../shared/interactive.ts";

Expand Down
16 changes: 10 additions & 6 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"examples/",
"data/",
".deno_cache/",
"cli/templates/files/",
"cli/templates/integrations/"
"templates/files/",
"templates/integrations/"
],
"exports": {
".": "./src/index.ts",
Expand Down Expand Up @@ -472,14 +472,14 @@
"release": "deno run -A scripts/release.ts",
"test": "deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts,scripts' --unstable-worker-options --unstable-net",
"test:unit": "deno task generate && deno task test:unit:parallel && deno task test:unit:cwd && deno task test:unit:cwd-exclusion",
"test:unit:parallel": "DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all --v8-flags=--max-old-space-size=8192 --unstable-worker-options --unstable-net $(find src cli -name '*.test.ts*' ! -name '*.integration.test.ts*' ! -path 'src/workflow/__tests__/*' ! -path 'cli/router.test.ts' ! -path 'cli/app/operations/project-creation.test.ts' ! -path 'cli/commands/schedule/handler.test.ts' ! -path 'cli/commands/skills/validate.test.ts' ! -path 'cli/commands/webhook/handler.test.ts' ! -path 'src/platform/compat/process.test.ts' ! -path 'src/testing/cwd.test.ts' ! -path 'src/testing/cwd-exclusion-a.test.ts' ! -path 'src/testing/cwd-exclusion-b.test.ts')",
"test:unit:parallel": "DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all --v8-flags=--max-old-space-size=8192 --unstable-worker-options --unstable-net $(find src cli templates -name '*.test.ts*' ! -name '*.integration.test.ts*' ! -path 'src/workflow/__tests__/*' ! -path 'cli/router.test.ts' ! -path 'cli/app/operations/project-creation.test.ts' ! -path 'cli/commands/schedule/handler.test.ts' ! -path 'cli/commands/skills/validate.test.ts' ! -path 'cli/commands/webhook/handler.test.ts' ! -path 'src/platform/compat/process.test.ts' ! -path 'src/testing/cwd.test.ts' ! -path 'src/testing/cwd-exclusion-a.test.ts' ! -path 'src/testing/cwd-exclusion-b.test.ts')",
"test:unit:cwd": "DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --allow-all --v8-flags=--max-old-space-size=8192 --unstable-worker-options --unstable-net cli/router.test.ts cli/app/operations/project-creation.test.ts cli/commands/schedule/handler.test.ts cli/commands/skills/validate.test.ts cli/commands/webhook/handler.test.ts src/platform/compat/process.test.ts src/testing/cwd.test.ts",
"test:unit:cwd-exclusion": "DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all --v8-flags=--max-old-space-size=8192 --unstable-worker-options --unstable-net src/testing/cwd-exclusion-a.test.ts src/testing/cwd-exclusion-b.test.ts",
"test:integration": "deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' tests --unstable-worker-options --unstable-net",
"test:integration:cli": "DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --allow-all --unstable-worker-options --unstable-net $(find cli -name '*.integration.test.ts')",
"test:record": "VCR=record deno test --no-check --allow-all $(find cli -name '*.integration.test.ts' -path '*/commands/*')",
"test:coverage": "rm -rf coverage && deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests/integration/compiled-binary-e2e.test.ts' --unstable-worker-options --unstable-net || exit 1",
"test:coverage:unit": "rm -rf coverage && deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests,src/workflow/__tests__' --unstable-worker-options --unstable-net $(find src cli -name '*.test.ts*' ! -name '*.integration.test.ts*') || exit 1",
"test:coverage:unit": "rm -rf coverage && deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests,src/workflow/__tests__' --unstable-worker-options --unstable-net $(find src cli templates -name '*.test.ts*' ! -name '*.integration.test.ts*') || exit 1",
"test:coverage:integration": "rm -rf coverage && deno task generate && DENO_TESTING=1 VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --preload=src/testing/preload.ts --no-check --parallel --fail-fast --allow-all --v8-flags=--max-old-space-size=8192 --coverage=coverage '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' tests --unstable-worker-options --unstable-net || exit 1",
"coverage:report": "deno coverage coverage --include=src/ --exclude=tests '--exclude=src/**/*_test.ts' '--exclude=src/**/*_test.tsx' '--exclude=src/**/*.test.ts' '--exclude=src/**/*.test.tsx' --lcov > coverage/lcov.info && deno run --allow-read scripts/lint/check-coverage.ts 80",
"coverage:gate": "deno coverage coverage --include=src/ --exclude=tests '--exclude=src/**/*_test.ts' '--exclude=src/**/*_test.tsx' '--exclude=src/**/*.test.ts' '--exclude=src/**/*.test.tsx' --lcov > coverage/lcov.info && deno run --allow-read scripts/lint/check-coverage.ts 80",
Expand All @@ -494,8 +494,8 @@
"storybook:check": "deno test --no-lock --config=scripts/test.deno.json --no-check --allow-read scripts/storybook/storybook-workbench.test.ts",
"lint": "DENO_NO_PACKAGE_JSON=1 deno lint && deno lint --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/npm-package-metadata.test.ts scripts/build/prepare-framework-sources.test.ts && deno lint --config=scripts/codemods/deno.json scripts/codemods/",
"lint:ci": "deno task lint && deno task lint:core-deps && deno task lint:cross-runtime-jsr && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:chat-ratchets && deno task lint:esm-sh-codemod && deno task lint:test-typecheck && deno task lint:cwd-relative-test-reads && deno task storybook:check && deno task docs:api-reference:check && deno task docs:errors:check && deno test --frozen --config=scripts/test.deno.json --no-check --allow-read --allow-write scripts/ci/setup-deno-workflow.test.ts scripts/build/generated-artifact-checks.test.ts",
"fmt": "deno fmt src/ cli/ react/ && deno fmt --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/prepare-framework-sources.test.ts && deno fmt --config=scripts/codemods/deno.json scripts/codemods/",
"fmt:check": "deno fmt --check src/ cli/ react/ && deno fmt --check --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/prepare-framework-sources.test.ts && deno fmt --check --config=scripts/codemods/deno.json scripts/codemods/",
"fmt": "deno fmt src/ cli/ react/ templates/ && deno fmt --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/prepare-framework-sources.test.ts && deno fmt --config=scripts/codemods/deno.json scripts/codemods/",
"fmt:check": "deno fmt --check src/ cli/ react/ templates/ && deno fmt --check --config=scripts/test.deno.json scripts/test/ scripts/build/dnt-polyfill.ts scripts/build/dnt-polyfill.test.ts scripts/build/prepare-framework-sources.test.ts && deno fmt --check --config=scripts/codemods/deno.json scripts/codemods/",
"typecheck": "deno task generate:manifests:check && deno check src/index.ts cli/main.ts src/server/index.ts src/routing/api/index.ts src/rendering/index.ts src/platform/index.ts src/platform/adapters/index.ts src/build/index.ts src/build/production-build/index.ts src/transforms/index.ts src/config/index.ts src/utils/index.ts src/data/index.ts src/security/index.ts src/middleware/index.ts src/server/handlers/dev/index.ts src/server/handlers/request/api/index.ts src/rendering/cache/index.ts src/rendering/cache/stores/index.ts src/rendering/rsc/actions/index.ts src/html/index.ts src/html/hydration-script-builder/runtime/main.ts src/modules/index.ts src/proxy/main.ts src/react/components/ui/index.ts src/chat/index.ts src/markdown/index.ts src/mdx/index.ts src/fs/index.ts src/oauth/index.ts src/agent/index.ts src/agent/service/route-export.check.ts src/eval/index.ts src/tool/index.ts src/workflow/index.ts src/prompt/index.ts src/resource/index.ts src/runs/index.ts src/mcp/index.ts src/provider/index.ts",
"verify": "deno task generate:manifests:check && deno task fmt:check && deno task lint && deno task lint:style && deno task lint:chat-composability && deno task lint:chat-ratchets && deno task lint:esm-sh-codemod && deno task lint:cli-boundary && deno task lint:wildcard-exports && deno task lint:barrel-jsdoc && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:ban-zod && deno task lint:cwd-relative-test-reads && deno task lint:core-deps && deno task lint:cross-runtime-jsr && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task docs:api-reference:check && deno task docs:errors:check && deno task docs:validate && deno task typecheck && deno task typecheck:consumer && deno task test && deno task test:scripts && deno task test:e2e:binary",
"verify:quick": "deno task generate:manifests:check && deno task fmt:check && deno task lint && deno task lint:style && deno task lint:chat-composability && deno task lint:chat-ratchets && deno task lint:esm-sh-codemod && deno task lint:cli-boundary && deno task lint:wildcard-exports && deno task lint:barrel-jsdoc && deno task lint:ban-test-only && deno task lint:sanitizer-baseline && deno task lint:skipped-tests && deno task lint:ban-zod && deno task lint:cwd-relative-test-reads && deno task lint:core-deps && deno task lint:cross-runtime-jsr && deno task lint:dependency-boundaries && deno task lint:module-boundaries && deno task lint:extension-contracts && deno task lint:extension-capabilities && deno task docs:api-reference:check && deno task docs:errors:check && deno task docs:validate && deno task typecheck",
Expand Down Expand Up @@ -575,6 +575,8 @@
"src/**/*.js",
"cli/**/*.ts",
"cli/**/*.tsx",
"templates/**/*.ts",
"templates/**/*.tsx",
"extensions/**/*.ts",
"extensions/**/*.tsx",
"react/**/*.ts",
Expand Down Expand Up @@ -606,6 +608,8 @@
"src/**/*.tsx",
"cli/**/*.ts",
"cli/**/*.tsx",
"templates/**/*.ts",
"templates/**/*.tsx",
"react/**/*.ts",
"react/**/*.tsx"
],
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/generate-integrations-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (!tryResolve<SchemaValidator>("SchemaValidator")) {
register<SchemaValidator>("SchemaValidator", createZodAdapter());
}

const integrationsDir = "./cli/templates/integrations";
const integrationsDir = "./templates/integrations";
const dataPath = "./src/integrations/_data.ts";
const summaryPath = "./src/integrations/_tool_summaries.ts";

Expand Down
Loading
Loading