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
|
@@ -16,12 +16,19 @@ import { buildMdxEsmPathCacheKey, buildMdxEsmTransformCacheKey } from "../cache-
|
|
|
16
16
|
export function getTransformCacheKey(
|
|
17
17
|
projectId: string,
|
|
18
18
|
contentSourceId: string,
|
|
19
|
+
reactVersion: string,
|
|
19
20
|
normalizedPath: string,
|
|
20
21
|
contentHash: string,
|
|
21
22
|
): string {
|
|
22
|
-
return buildMdxEsmTransformCacheKey(
|
|
23
|
+
return buildMdxEsmTransformCacheKey(
|
|
24
|
+
projectId,
|
|
25
|
+
contentSourceId,
|
|
26
|
+
reactVersion,
|
|
27
|
+
normalizedPath,
|
|
28
|
+
contentHash,
|
|
29
|
+
);
|
|
23
30
|
}
|
|
24
31
|
|
|
25
|
-
export function getVersionedPathCacheKey(normalizedPath: string): string {
|
|
26
|
-
return buildMdxEsmPathCacheKey(normalizedPath);
|
|
32
|
+
export function getVersionedPathCacheKey(normalizedPath: string, reactVersion: string): string {
|
|
33
|
+
return buildMdxEsmPathCacheKey(normalizedPath, reactVersion);
|
|
27
34
|
}
|
|
@@ -8,12 +8,20 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type { Logger } from "../../../../utils/logger/logger.js";
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
extractAllFilePaths,
|
|
13
|
+
extractAllFilePathsRecursive,
|
|
14
|
+
extractAllHttpBundlePathsRecursive,
|
|
15
|
+
visitImportedVfModules,
|
|
16
|
+
} from "../../../../modules/react-loader/ssr-module-loader/http-bundle-helpers.js";
|
|
17
|
+
import {
|
|
18
|
+
getCacheBaseDir,
|
|
19
|
+
getHttpBundleCacheDir,
|
|
20
|
+
getMdxEsmCacheDir,
|
|
21
|
+
} from "../../../../utils/cache-dir.js";
|
|
12
22
|
import { FRAMEWORK_ROOT, LOG_PREFIX_MDX_LOADER } from "../constants.js";
|
|
13
23
|
import { getLocalFs } from "../cache/index.js";
|
|
14
|
-
import { extractHttpBundlePaths } from "../../../../modules/react-loader/ssr-module-loader/http-bundle-helpers.js";
|
|
15
24
|
import { ensureHttpBundlesExist } from "../../../esm/http-cache.js";
|
|
16
|
-
import { MDX_ESM_MJS_FILE_URL_PATTERN_SOURCE } from "../cache-format.js";
|
|
17
25
|
import { ensureMdxModuleDependencies } from "./dependency-recovery.js";
|
|
18
26
|
|
|
19
27
|
interface MdxRecoveryOptions {
|
|
@@ -21,47 +29,38 @@ interface MdxRecoveryOptions {
|
|
|
21
29
|
contentSourceId: string;
|
|
22
30
|
}
|
|
23
31
|
|
|
24
|
-
|
|
25
|
-
* Check if cached code has file:// paths that are incompatible with this environment.
|
|
26
|
-
* Returns true if the cached code should be invalidated (has paths from a different environment).
|
|
27
|
-
*
|
|
28
|
-
* Checks for:
|
|
29
|
-
* 1. Framework source paths (file:///app/src/...) that don't match FRAMEWORK_ROOT
|
|
30
|
-
* 2. HTTP bundle cache paths (file:///app/.cache/veryfront-http-bundle/...) that don't match local cache dir
|
|
31
|
-
* 3. MDX ESM cache paths (file:///app/.cache/veryfront-mdx-esm/...) that don't match local cache dir
|
|
32
|
-
*
|
|
33
|
-
* IMPORTANT: This function creates a new RegExp on each call to avoid race conditions
|
|
34
|
-
* when multiple modules are processed concurrently. Using a shared global regex with
|
|
35
|
-
* the 'g' flag would cause interleaved exec() calls to skip paths.
|
|
36
|
-
*/
|
|
37
|
-
export async function hasIncompatibleFrameworkPaths(code: string, log: Logger): Promise<boolean> {
|
|
38
|
-
// Check for esm.sh URLs that reference /_vf_modules/ paths - these are invalid
|
|
39
|
-
// and indicate a cached transform from before the fix was deployed
|
|
40
|
-
if (/esm\.sh\/_?vf_modules\//.test(code)) {
|
|
41
|
-
log.debug(`${LOG_PREFIX_MDX_LOADER} Cached code has invalid esm.sh/_vf_modules URL`);
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
32
|
+
const INVALID_VFMOD_ESM_URL_PATTERN = /esm\.sh\/_?vf_modules\//;
|
|
44
33
|
|
|
45
|
-
|
|
46
|
-
|
|
34
|
+
async function hasIncompatibleFrameworkPathsInCode(
|
|
35
|
+
code: string,
|
|
36
|
+
log: Logger,
|
|
37
|
+
options: {
|
|
38
|
+
localHttpCacheDir: string;
|
|
39
|
+
localMdxCacheDir: string;
|
|
40
|
+
localCacheBaseDir: string;
|
|
41
|
+
sourcePath?: string;
|
|
42
|
+
},
|
|
43
|
+
): Promise<boolean> {
|
|
47
44
|
const localFs = getLocalFs();
|
|
45
|
+
const sourceContext = options.sourcePath ? { vfModulePath: options.sourcePath } : {};
|
|
48
46
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
while ((match = allFilePathsPattern.exec(code)) !== null) {
|
|
56
|
-
if (match[1]) allPaths.push(match[1]);
|
|
47
|
+
if (INVALID_VFMOD_ESM_URL_PATTERN.test(code)) {
|
|
48
|
+
log.debug(
|
|
49
|
+
`${LOG_PREFIX_MDX_LOADER} Cached code has invalid esm.sh/_vf_modules URL`,
|
|
50
|
+
sourceContext,
|
|
51
|
+
);
|
|
52
|
+
return true;
|
|
57
53
|
}
|
|
58
54
|
|
|
55
|
+
const allPaths = extractAllFilePaths(code);
|
|
56
|
+
|
|
59
57
|
for (const path of allPaths) {
|
|
60
58
|
if (path.includes("veryfront-http-bundle")) {
|
|
61
|
-
if (!path.startsWith(localHttpCacheDir)) {
|
|
59
|
+
if (!path.startsWith(options.localHttpCacheDir)) {
|
|
62
60
|
log.debug(`${LOG_PREFIX_MDX_LOADER} HTTP bundle path from different environment`, {
|
|
63
61
|
path,
|
|
64
|
-
expectedDir: localHttpCacheDir,
|
|
62
|
+
expectedDir: options.localHttpCacheDir,
|
|
63
|
+
...sourceContext,
|
|
65
64
|
});
|
|
66
65
|
return true;
|
|
67
66
|
}
|
|
@@ -69,22 +68,37 @@ export async function hasIncompatibleFrameworkPaths(code: string, log: Logger):
|
|
|
69
68
|
}
|
|
70
69
|
|
|
71
70
|
if (path.includes("veryfront-mdx-esm")) {
|
|
72
|
-
if (!path.startsWith(localMdxCacheDir)) {
|
|
71
|
+
if (!path.startsWith(options.localMdxCacheDir)) {
|
|
73
72
|
log.debug(`${LOG_PREFIX_MDX_LOADER} MDX cache path from different environment`, {
|
|
74
73
|
path,
|
|
75
|
-
expectedDir: localMdxCacheDir,
|
|
74
|
+
expectedDir: options.localMdxCacheDir,
|
|
75
|
+
...sourceContext,
|
|
76
76
|
});
|
|
77
77
|
return true;
|
|
78
78
|
}
|
|
79
79
|
continue;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
// Legacy cache entries sometimes point directly at pod-local .cache source files
|
|
83
|
+
// like file:///app/.cache/markdown.tsx. These paths are not portable across pods.
|
|
84
|
+
// Allow local cache-base paths so valid local file:// dependencies under .cache
|
|
85
|
+
// are not evicted on every read.
|
|
86
|
+
if (path.includes(".cache/") && !path.startsWith(options.localCacheBaseDir)) {
|
|
87
|
+
log.debug(`${LOG_PREFIX_MDX_LOADER} Legacy cache path is not portable`, {
|
|
88
|
+
path,
|
|
89
|
+
expectedBaseDir: options.localCacheBaseDir,
|
|
90
|
+
...sourceContext,
|
|
91
|
+
});
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
|
|
82
95
|
if (!path.includes("/src/") || path.includes(".cache")) continue;
|
|
83
96
|
|
|
84
97
|
if (!path.startsWith(FRAMEWORK_ROOT)) {
|
|
85
98
|
log.debug(`${LOG_PREFIX_MDX_LOADER} Framework path from different environment`, {
|
|
86
99
|
path,
|
|
87
100
|
expectedRoot: FRAMEWORK_ROOT,
|
|
101
|
+
...sourceContext,
|
|
88
102
|
});
|
|
89
103
|
return true;
|
|
90
104
|
}
|
|
@@ -92,12 +106,18 @@ export async function hasIncompatibleFrameworkPaths(code: string, log: Logger):
|
|
|
92
106
|
try {
|
|
93
107
|
const stat = await localFs.stat(path);
|
|
94
108
|
if (!stat?.isFile) {
|
|
95
|
-
log.debug(`${LOG_PREFIX_MDX_LOADER} Framework path does not exist`, {
|
|
109
|
+
log.debug(`${LOG_PREFIX_MDX_LOADER} Framework path does not exist`, {
|
|
110
|
+
path,
|
|
111
|
+
...sourceContext,
|
|
112
|
+
});
|
|
96
113
|
return true;
|
|
97
114
|
}
|
|
98
115
|
} catch (_) {
|
|
99
116
|
/* expected: framework file may not exist in this environment */
|
|
100
|
-
log.debug(`${LOG_PREFIX_MDX_LOADER} Framework path not accessible`, {
|
|
117
|
+
log.debug(`${LOG_PREFIX_MDX_LOADER} Framework path not accessible`, {
|
|
118
|
+
path,
|
|
119
|
+
...sourceContext,
|
|
120
|
+
});
|
|
101
121
|
return true;
|
|
102
122
|
}
|
|
103
123
|
}
|
|
@@ -105,6 +125,42 @@ export async function hasIncompatibleFrameworkPaths(code: string, log: Logger):
|
|
|
105
125
|
return false;
|
|
106
126
|
}
|
|
107
127
|
|
|
128
|
+
/**
|
|
129
|
+
* Check if cached code has file:// paths that are incompatible with this environment.
|
|
130
|
+
* Returns true if the cached code should be invalidated (has paths from a different environment).
|
|
131
|
+
*
|
|
132
|
+
* Checks for:
|
|
133
|
+
* 1. Framework source paths (file:///app/src/...) that don't match FRAMEWORK_ROOT
|
|
134
|
+
* 2. HTTP bundle cache paths (file:///app/.cache/veryfront-http-bundle/...) that don't match local cache dir
|
|
135
|
+
* 3. MDX ESM cache paths (file:///app/.cache/veryfront-mdx-esm/...) that don't match local cache dir
|
|
136
|
+
*
|
|
137
|
+
* This check also walks transitively imported VF modules so nested stale paths
|
|
138
|
+
* are rejected before import-time failures.
|
|
139
|
+
*/
|
|
140
|
+
export async function hasIncompatibleFrameworkPaths(code: string, log: Logger): Promise<boolean> {
|
|
141
|
+
const options = {
|
|
142
|
+
localHttpCacheDir: getHttpBundleCacheDir(),
|
|
143
|
+
localMdxCacheDir: getMdxEsmCacheDir(),
|
|
144
|
+
localCacheBaseDir: getCacheBaseDir(),
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
if (await hasIncompatibleFrameworkPathsInCode(code, log, options)) {
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
let incompatible = false;
|
|
152
|
+
await visitImportedVfModules(code, async (vfModuleCode, vfModulePath) => {
|
|
153
|
+
if (incompatible) return;
|
|
154
|
+
|
|
155
|
+
incompatible = await hasIncompatibleFrameworkPathsInCode(vfModuleCode, log, {
|
|
156
|
+
...options,
|
|
157
|
+
sourcePath: vfModulePath,
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
return incompatible;
|
|
162
|
+
}
|
|
163
|
+
|
|
108
164
|
/**
|
|
109
165
|
* Check if cached code has file:// paths that don't exist locally.
|
|
110
166
|
* Returns list of missing paths, or empty array if all exist.
|
|
@@ -117,19 +173,10 @@ export async function findMissingFileDependenciesInCode(
|
|
|
117
173
|
log: Logger,
|
|
118
174
|
): Promise<string[]> {
|
|
119
175
|
const localFs = getLocalFs();
|
|
120
|
-
const pattern = new RegExp(MDX_ESM_MJS_FILE_URL_PATTERN_SOURCE, "gi");
|
|
121
176
|
const missing: string[] = [];
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
let match;
|
|
125
|
-
while ((match = pattern.exec(code)) !== null) {
|
|
126
|
-
const path = match[1] as string;
|
|
127
|
-
// Skip query parameters in paths
|
|
128
|
-
const cleanPath = path.replace(/\?.*$/, "");
|
|
129
|
-
|
|
130
|
-
if (checked.has(cleanPath)) continue;
|
|
131
|
-
checked.add(cleanPath);
|
|
177
|
+
const allPaths = await extractAllFilePathsRecursive(code);
|
|
132
178
|
|
|
179
|
+
for (const cleanPath of allPaths) {
|
|
133
180
|
try {
|
|
134
181
|
const stat = await localFs.stat(cleanPath);
|
|
135
182
|
if (!stat?.isFile) {
|
|
@@ -184,7 +231,7 @@ export async function validateCachedModule(
|
|
|
184
231
|
return false;
|
|
185
232
|
}
|
|
186
233
|
|
|
187
|
-
const bundlePaths =
|
|
234
|
+
const bundlePaths = await extractAllHttpBundlePathsRecursive(cachedCode);
|
|
188
235
|
if (bundlePaths.length > 0) {
|
|
189
236
|
const cacheDir = getHttpBundleCacheDir();
|
|
190
237
|
const failed = await ensureHttpBundlesExist(bundlePaths, cacheDir);
|
|
@@ -19,6 +19,7 @@ import { transformToESM } from "../../../esm-transform.js";
|
|
|
19
19
|
import { cacheHttpImportsToLocal } from "../../../esm/http-cache.js";
|
|
20
20
|
import { loadImportMap } from "../../../../modules/import-map/index.js";
|
|
21
21
|
import { getHttpBundleCacheDir } from "../../../../utils/cache-dir.js";
|
|
22
|
+
import { REACT_DEFAULT_VERSION } from "../../../../utils/constants/cdn.js";
|
|
22
23
|
import { LOG_PREFIX_MDX_LOADER } from "../constants.js";
|
|
23
24
|
import type { ModuleFetcherContext } from "../types.js";
|
|
24
25
|
import { getLocalFs, getModulePathCache } from "../cache/index.js";
|
|
@@ -191,9 +192,10 @@ async function doFetchAndCacheModule(
|
|
|
191
192
|
): Promise<string | null> {
|
|
192
193
|
const log = getLog(context);
|
|
193
194
|
const { esmCacheDir, adapter, projectDir, projectId, contentSourceId } = context;
|
|
195
|
+
const effectiveReactVersion = context.reactVersion ?? REACT_DEFAULT_VERSION;
|
|
194
196
|
|
|
195
197
|
const pathCache = await getModulePathCache(esmCacheDir);
|
|
196
|
-
const versionedKey = getVersionedPathCacheKey(normalizedPath);
|
|
198
|
+
const versionedKey = getVersionedPathCacheKey(normalizedPath, effectiveReactVersion);
|
|
197
199
|
const cachedPath = pathCache.get(versionedKey);
|
|
198
200
|
|
|
199
201
|
if (cachedPath) {
|
|
@@ -241,7 +243,14 @@ async function doFetchAndCacheModule(
|
|
|
241
243
|
);
|
|
242
244
|
|
|
243
245
|
if (moduleCode) {
|
|
244
|
-
return await cacheModule(
|
|
246
|
+
return await cacheModule(
|
|
247
|
+
normalizedPath,
|
|
248
|
+
moduleCode,
|
|
249
|
+
esmCacheDir,
|
|
250
|
+
pathCache,
|
|
251
|
+
log,
|
|
252
|
+
effectiveReactVersion,
|
|
253
|
+
);
|
|
245
254
|
}
|
|
246
255
|
|
|
247
256
|
if (context.strictMissingModules ?? true) {
|
|
@@ -259,7 +268,13 @@ async function doFetchAndCacheModule(
|
|
|
259
268
|
|
|
260
269
|
const contentHash = hashString(sourceCode);
|
|
261
270
|
const transformCacheKey = contentSourceId
|
|
262
|
-
? getTransformCacheKey(
|
|
271
|
+
? getTransformCacheKey(
|
|
272
|
+
projectId,
|
|
273
|
+
contentSourceId,
|
|
274
|
+
effectiveReactVersion,
|
|
275
|
+
normalizedPath,
|
|
276
|
+
contentHash,
|
|
277
|
+
)
|
|
263
278
|
: null;
|
|
264
279
|
|
|
265
280
|
let moduleCode: string | null = null;
|
|
@@ -276,7 +291,7 @@ async function doFetchAndCacheModule(
|
|
|
276
291
|
normalizedPath,
|
|
277
292
|
projectSlug,
|
|
278
293
|
projectDir,
|
|
279
|
-
|
|
294
|
+
effectiveReactVersion,
|
|
280
295
|
log,
|
|
281
296
|
)
|
|
282
297
|
: null;
|
|
@@ -437,6 +452,7 @@ async function doFetchAndCacheModule(
|
|
|
437
452
|
esmCacheDir,
|
|
438
453
|
pathCache,
|
|
439
454
|
log,
|
|
455
|
+
effectiveReactVersion,
|
|
440
456
|
);
|
|
441
457
|
log.debug(`${LOG_PREFIX_MDX_LOADER} [fetchAndCacheModule] cacheModule DONE`, {
|
|
442
458
|
projectSlug,
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import { join } from "../../../../platform/compat/path/index.js";
|
|
11
11
|
import * as posix from "../../../../../deps/jsr.io/@std/path/1.1.4/posix/mod.js";
|
|
12
12
|
import type { Logger } from "../../../../utils/logger/logger.js";
|
|
13
|
+
import { REACT_DEFAULT_VERSION } from "../../../../utils/constants/cdn.js";
|
|
13
14
|
import { LOG_PREFIX_MDX_LOADER } from "../constants.js";
|
|
14
15
|
import { getLocalFs, saveModulePathCache } from "../cache/index.js";
|
|
15
16
|
import { hashString } from "../utils/hash.js";
|
|
@@ -48,6 +49,7 @@ export async function cacheModule(
|
|
|
48
49
|
esmCacheDir: string,
|
|
49
50
|
pathCache: Map<string, string>,
|
|
50
51
|
log: Logger,
|
|
52
|
+
reactVersion = REACT_DEFAULT_VERSION,
|
|
51
53
|
): Promise<string | null> {
|
|
52
54
|
const unresolved = hasUnresolvedImports(moduleCode);
|
|
53
55
|
if (unresolved.count > 0) {
|
|
@@ -60,7 +62,7 @@ export async function cacheModule(
|
|
|
60
62
|
|
|
61
63
|
const contentHash = hashString(normalizedPath + moduleCode);
|
|
62
64
|
const cachePath = join(esmCacheDir, buildMdxEsmModuleFileName(contentHash));
|
|
63
|
-
const pathCacheKey = buildMdxEsmPathCacheKey(normalizedPath);
|
|
65
|
+
const pathCacheKey = buildMdxEsmPathCacheKey(normalizedPath, reactVersion);
|
|
64
66
|
|
|
65
67
|
const localFs = getLocalFs();
|
|
66
68
|
try {
|
package/src/src/utils/version.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { getEnv } from "../platform/compat/process.js";
|
|
|
3
3
|
|
|
4
4
|
// Keep in sync with deno.json version.
|
|
5
5
|
// scripts/release.ts updates this constant during releases.
|
|
6
|
-
export const VERSION = "0.1.
|
|
6
|
+
export const VERSION = "0.1.113";
|
|
7
7
|
|
|
8
8
|
export function normalizeVeryfrontVersion(version: string | undefined): string | undefined {
|
|
9
9
|
if (!version) return undefined;
|