@analogjs/platform 3.0.0-alpha.2 → 3.0.0-alpha.21
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/package.json +16 -18
- package/src/index.d.ts +5 -2
- package/src/index.js +9 -3
- package/src/index.js.map +1 -0
- package/src/lib/clear-client-page-endpoint.d.ts +2 -2
- package/src/lib/clear-client-page-endpoint.js +22 -32
- package/src/lib/clear-client-page-endpoint.js.map +1 -0
- package/src/lib/content/marked/index.d.ts +5 -5
- package/src/lib/content/marked/index.js +10 -6
- package/src/lib/content/marked/index.js.map +1 -0
- package/src/lib/content/marked/marked-content-highlighter.d.ts +2 -4
- package/src/lib/content/marked/marked-content-highlighter.js +6 -3
- package/src/lib/content/marked/marked-content-highlighter.js.map +1 -0
- package/src/lib/content/marked/marked-setup.service.d.ts +8 -8
- package/src/lib/content/marked/marked-setup.service.js +44 -54
- package/src/lib/content/marked/marked-setup.service.js.map +1 -0
- package/src/lib/content/prism/angular.d.ts +1 -0
- package/src/lib/content/prism/angular.js +18 -19
- package/src/lib/content/prism/angular.js.map +1 -0
- package/src/lib/content/prism/index.d.ts +1 -1
- package/src/lib/content/prism/index.js +10 -7
- package/src/lib/content/prism/index.js.map +1 -0
- package/src/lib/content/prism/options.d.ts +1 -1
- package/src/lib/content/prism/prism-highlighter.d.ts +5 -5
- package/src/lib/content/prism/prism-highlighter.js +33 -33
- package/src/lib/content/prism/prism-highlighter.js.map +1 -0
- package/src/lib/content/shiki/index.d.ts +3 -3
- package/src/lib/content/shiki/index.js +19 -28
- package/src/lib/content/shiki/index.js.map +1 -0
- package/src/lib/content/shiki/options.d.ts +7 -7
- package/src/lib/content/shiki/shiki-highlighter.d.ts +13 -13
- package/src/lib/content/shiki/shiki-highlighter.js +45 -44
- package/src/lib/content/shiki/shiki-highlighter.js.map +1 -0
- package/src/lib/content-plugin.d.ts +19 -19
- package/src/lib/content-plugin.js +178 -196
- package/src/lib/content-plugin.js.map +1 -0
- package/src/lib/deps-plugin.d.ts +2 -2
- package/src/lib/deps-plugin.js +73 -82
- package/src/lib/deps-plugin.js.map +1 -0
- package/src/lib/json-ld-manifest-plugin.d.ts +41 -0
- package/src/lib/json-ld-manifest-plugin.js +84 -0
- package/src/lib/json-ld-manifest-plugin.js.map +1 -0
- package/src/lib/nx-plugin/builders.json +7 -0
- package/src/lib/nx-plugin/executors.json +5 -0
- package/src/lib/nx-plugin/generators.json +25 -0
- package/src/lib/nx-plugin/package.json +1 -5
- package/src/lib/nx-plugin/src/executors/vite/compat.d.ts +3 -2
- package/src/lib/nx-plugin/src/executors/vite/compat.js +6 -6
- package/src/lib/nx-plugin/src/executors/vite/compat.js.map +1 -1
- package/src/lib/nx-plugin/src/executors/vite/schema.d.ts +1 -1
- package/src/lib/nx-plugin/src/executors/vite/vite.impl.d.ts +1 -1
- package/src/lib/nx-plugin/src/executors/vite/vite.impl.js +5 -4
- package/src/lib/nx-plugin/src/executors/vite/vite.impl.js.map +1 -1
- package/src/lib/nx-plugin/src/executors/vite-dev-server/compat.d.ts +3 -2
- package/src/lib/nx-plugin/src/executors/vite-dev-server/compat.js +6 -6
- package/src/lib/nx-plugin/src/executors/vite-dev-server/compat.js.map +1 -1
- package/src/lib/nx-plugin/src/executors/vite-dev-server/schema.d.ts +1 -1
- package/src/lib/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.d.ts +1 -1
- package/src/lib/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.js +5 -4
- package/src/lib/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.js.map +1 -1
- package/src/lib/nx-plugin/src/executors/vitest/compat.d.ts +3 -2
- package/src/lib/nx-plugin/src/executors/vitest/compat.js +6 -6
- package/src/lib/nx-plugin/src/executors/vitest/compat.js.map +1 -1
- package/src/lib/nx-plugin/src/executors/vitest/schema.d.ts +1 -1
- package/src/lib/nx-plugin/src/executors/vitest/vitest.impl.d.ts +1 -1
- package/src/lib/nx-plugin/src/executors/vitest/vitest.impl.js +5 -4
- package/src/lib/nx-plugin/src/executors/vitest/vitest.impl.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/compat.d.ts +9 -2
- package/src/lib/nx-plugin/src/generators/app/compat.js +17 -6
- package/src/lib/nx-plugin/src/generators/app/compat.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/files/root/tsconfig.base.json +3 -6
- package/src/lib/nx-plugin/src/generators/app/files/template-angular/src/test-setup.ts__template__ +1 -0
- package/src/lib/nx-plugin/src/generators/app/files/template-angular/tsconfig.app.json__template__ +1 -3
- package/src/lib/nx-plugin/src/generators/app/files/template-angular/tsconfig.json__template__ +2 -1
- package/src/lib/nx-plugin/src/generators/app/files/template-angular/vite.config.ts__template__ +6 -0
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v17/src/app/app.config.ts__template__ +0 -6
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v17/tsconfig.json__template__ +4 -2
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v17/vite.config.ts__template__ +0 -18
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v18/src/app/app.config.ts__template__ +0 -6
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v18/tsconfig.json__template__ +4 -2
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v18/vite.config.ts__template__ +0 -18
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/src/app/app.config.ts__template__ +0 -6
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/tsconfig.app.json__template__ +1 -3
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/tsconfig.json__template__ +4 -2
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v19/vite.config.ts__template__ +0 -9
- package/src/lib/nx-plugin/src/generators/app/generator.d.ts +11 -11
- package/src/lib/nx-plugin/src/generators/app/generator.js +78 -88
- package/src/lib/nx-plugin/src/generators/app/generator.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-analog-dependencies.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.js +72 -89
- package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-angular-app.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/app/lib/add-angular-app.js +24 -58
- package/src/lib/nx-plugin/src/generators/app/lib/add-angular-app.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-eslint.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/app/lib/add-files.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/app/lib/add-files.js +15 -16
- package/src/lib/nx-plugin/src/generators/app/lib/add-files.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.js +14 -13
- package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.d.ts +7 -7
- package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.js +15 -30
- package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.d.ts +3 -5
- package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.js +49 -147
- package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-vite-plugin.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/cleanup-files.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/app/lib/cleanup-files.js +17 -20
- package/src/lib/nx-plugin/src/generators/app/lib/cleanup-files.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/initialize-analog-workspace.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/app/lib/update-index-html.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/app/lib/update-index-html.js +14 -12
- package/src/lib/nx-plugin/src/generators/app/lib/update-index-html.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.d.ts +4 -5
- package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.js +6 -10
- package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/versions/nx-dependencies.d.ts +0 -3
- package/src/lib/nx-plugin/src/generators/app/versions/nx_17_X/versions.d.ts +0 -5
- package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.d.ts +9 -16
- package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.js +7 -37
- package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/versions/tailwind-dependencies.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/app/versions/tailwind-dependencies.js +9 -15
- package/src/lib/nx-plugin/src/generators/app/versions/tailwind-dependencies.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/app/versions.d.ts +0 -28
- package/src/lib/nx-plugin/src/generators/init/compat.d.ts +9 -2
- package/src/lib/nx-plugin/src/generators/init/compat.js +17 -6
- package/src/lib/nx-plugin/src/generators/init/compat.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/generator.d.ts +3 -3
- package/src/lib/nx-plugin/src/generators/init/generator.js +54 -55
- package/src/lib/nx-plugin/src/generators/init/generator.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/lib/add-analog-dependencies.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/init/lib/add-analog-dependencies.js +19 -20
- package/src/lib/nx-plugin/src/generators/init/lib/add-analog-dependencies.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/lib/update-app-tsconfig.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/init/lib/update-app-tsconfig.js +20 -18
- package/src/lib/nx-plugin/src/generators/init/lib/update-app-tsconfig.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/lib/update-build-target.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/init/lib/update-build-target.js +56 -57
- package/src/lib/nx-plugin/src/generators/init/lib/update-build-target.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/lib/update-git-ignore.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/init/lib/update-git-ignore.js +12 -11
- package/src/lib/nx-plugin/src/generators/init/lib/update-git-ignore.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/lib/update-index-html.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/init/lib/update-index-html.js +17 -15
- package/src/lib/nx-plugin/src/generators/init/lib/update-index-html.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/lib/update-main.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/init/lib/update-main.js +12 -12
- package/src/lib/nx-plugin/src/generators/init/lib/update-main.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/lib/update-package-json.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/init/lib/update-package-json.js +19 -25
- package/src/lib/nx-plugin/src/generators/init/lib/update-package-json.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/lib/update-serve-target.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/init/lib/update-serve-target.js +43 -45
- package/src/lib/nx-plugin/src/generators/init/lib/update-serve-target.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/lib/update-test-target.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/init/lib/update-test-target.js +27 -28
- package/src/lib/nx-plugin/src/generators/init/lib/update-test-target.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/lib/update-test-tsconfig.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/init/lib/update-test-tsconfig.js +19 -17
- package/src/lib/nx-plugin/src/generators/init/lib/update-test-tsconfig.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/test-files/src/test-setup.ts__template__ +1 -0
- package/src/lib/nx-plugin/src/generators/page/compat.d.ts +9 -0
- package/src/lib/nx-plugin/src/generators/page/compat.js +18 -0
- package/src/lib/nx-plugin/src/generators/page/compat.js.map +1 -0
- package/src/lib/nx-plugin/src/generators/page/generator.d.ts +3 -4
- package/src/lib/nx-plugin/src/generators/page/generator.js +33 -44
- package/src/lib/nx-plugin/src/generators/page/generator.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/preset/__snapshots__/generator.spec.ts.snap +5 -3
- package/src/lib/nx-plugin/src/generators/preset/generator.d.ts +3 -3
- package/src/lib/nx-plugin/src/generators/preset/generator.js +17 -43
- package/src/lib/nx-plugin/src/generators/preset/generator.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/setup-vitest/compat.d.ts +9 -2
- package/src/lib/nx-plugin/src/generators/setup-vitest/compat.js +17 -6
- package/src/lib/nx-plugin/src/generators/setup-vitest/compat.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/setup-vitest/files/src/test-setup.ts__template__ +1 -0
- package/src/lib/nx-plugin/src/generators/setup-vitest/generator.d.ts +3 -3
- package/src/lib/nx-plugin/src/generators/setup-vitest/generator.js +35 -32
- package/src/lib/nx-plugin/src/generators/setup-vitest/generator.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/setup-vitest/lib/add-analog-dependencies.d.ts +1 -1
- package/src/lib/nx-plugin/src/generators/setup-vitest/lib/add-analog-dependencies.js +7 -7
- package/src/lib/nx-plugin/src/generators/setup-vitest/lib/add-analog-dependencies.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-test-target.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-test-target.js +20 -21
- package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-test-target.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-tsconfig.d.ts +2 -2
- package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-tsconfig.js +19 -19
- package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-tsconfig.js.map +1 -1
- package/src/lib/nx-plugin/src/index.js +0 -1
- package/src/lib/nx-plugin/src/utils/version-utils.d.ts +1 -1
- package/src/lib/nx-plugin/src/utils/version-utils.js +20 -18
- package/src/lib/nx-plugin/src/utils/version-utils.js.map +1 -1
- package/src/lib/nx-plugin/src/utils/versions/dependencies.js +42 -62
- package/src/lib/nx-plugin/src/utils/versions/dependencies.js.map +1 -1
- package/src/lib/nx-plugin/src/utils/versions/dev-dependencies.js +49 -83
- package/src/lib/nx-plugin/src/utils/versions/dev-dependencies.js.map +1 -1
- package/src/lib/nx-plugin/src/utils/versions/ng_17_X/versions.js +33 -20
- package/src/lib/nx-plugin/src/utils/versions/ng_17_X/versions.js.map +1 -1
- package/src/lib/nx-plugin/src/utils/versions/ng_18_X/versions.js +33 -20
- package/src/lib/nx-plugin/src/utils/versions/ng_18_X/versions.js.map +1 -1
- package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.d.ts +7 -7
- package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.js +37 -23
- package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.js.map +1 -1
- package/src/lib/options.d.ts +158 -80
- package/src/lib/platform-plugin.d.ts +2 -2
- package/src/lib/platform-plugin.js +67 -61
- package/src/lib/platform-plugin.js.map +1 -0
- package/src/lib/route-file-discovery.d.ts +23 -0
- package/src/lib/route-file-discovery.js +114 -0
- package/src/lib/route-file-discovery.js.map +1 -0
- package/src/lib/route-generation-plugin.d.ts +3 -0
- package/src/lib/route-generation-plugin.js +34 -0
- package/src/lib/route-generation-plugin.js.map +1 -0
- package/src/lib/route-manifest.d.ts +120 -0
- package/src/lib/route-manifest.js +411 -0
- package/src/lib/route-manifest.js.map +1 -0
- package/src/lib/router-plugin.d.ts +19 -19
- package/src/lib/router-plugin.js +193 -150
- package/src/lib/router-plugin.js.map +1 -0
- package/src/lib/ssr/inject-html-plugin.d.ts +1 -1
- package/src/lib/ssr/inject-html-plugin.js +25 -25
- package/src/lib/ssr/inject-html-plugin.js.map +1 -0
- package/src/lib/ssr/ssr-build-plugin.d.ts +18 -2
- package/src/lib/ssr/ssr-build-plugin.js +54 -30
- package/src/lib/ssr/ssr-build-plugin.js.map +1 -0
- package/src/lib/tailwind-preprocessor.d.ts +23 -0
- package/src/lib/tailwind-preprocessor.js +33 -0
- package/src/lib/tailwind-preprocessor.js.map +1 -0
- package/src/lib/typed-routes-plugin.d.ts +50 -0
- package/src/lib/typed-routes-plugin.js +204 -0
- package/src/lib/typed-routes-plugin.js.map +1 -0
- package/src/lib/utils/rolldown.d.ts +3 -0
- package/src/lib/utils/rolldown.js +15 -0
- package/src/lib/utils/rolldown.js.map +1 -0
- package/src/server-mode-plugin.d.ts +6 -6
- package/src/server-mode-plugin.js +16 -18
- package/src/server-mode-plugin.js.map +1 -0
- package/README.md +0 -5
- package/src/lib/content/prism/options.js +0 -1
- package/src/lib/content/shiki/options.js +0 -1
- package/src/lib/nx-plugin/README.md +0 -23
- package/src/lib/nx-plugin/src/generators/app/files/tailwind/v2/postcss.config.cjs__template__ +0 -10
- package/src/lib/nx-plugin/src/generators/app/files/tailwind/v2/tailwind.config.cjs__template__ +0 -14
- package/src/lib/nx-plugin/src/generators/app/files/tailwind/v3/postcss.config.cjs__template__ +0 -10
- package/src/lib/nx-plugin/src/generators/app/files/tailwind/v3/tailwind.config.ts__template__ +0 -14
- package/src/lib/nx-plugin/src/generators/app/files/tailwind/v4/.postcssrc.json +0 -5
- package/src/lib/nx-plugin/src/generators/app/files/tailwind/v4/tailwind.config.ts__template__ +0 -14
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/index.html__template__ +0 -15
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/app/app.component.spec.ts__template__ +0 -17
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/app/app.component.ts__template__ +0 -10
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/favicon.ico__template__ +0 -0
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/main.providers.ts__template__ +0 -5
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/main.server.ts__template__ +0 -23
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/main.ts__template__ +0 -17
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/public/assets/.gitkeep__template__ +0 -0
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/public/assets/analog.svg__template__ +0 -1
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/public/assets/vite.svg__template__ +0 -1
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/server/routes/v1/hello.ts__template__ +0 -3
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/styles.css__template__ +0 -4
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/test-setup.ts__template__ +0 -12
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/src/vite-env.d.ts__template__ +0 -1
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/tsconfig.app.json__template__ +0 -16
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/tsconfig.editor.json__template__ +0 -7
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/tsconfig.json__template__ +0 -32
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/tsconfig.spec.json__template__ +0 -14
- package/src/lib/nx-plugin/src/generators/app/files/template-angular-v15/vite.config.ts__template__ +0 -69
- package/src/lib/nx-plugin/src/generators/app/lib/add-analog-dependencies.js +0 -15
- package/src/lib/nx-plugin/src/generators/app/lib/add-analog-dependencies.js.map +0 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-eslint.js +0 -58
- package/src/lib/nx-plugin/src/generators/app/lib/add-eslint.js.map +0 -1
- package/src/lib/nx-plugin/src/generators/app/lib/add-vite-plugin.js +0 -47
- package/src/lib/nx-plugin/src/generators/app/lib/add-vite-plugin.js.map +0 -1
- package/src/lib/nx-plugin/src/generators/app/lib/initialize-analog-workspace.js +0 -107
- package/src/lib/nx-plugin/src/generators/app/lib/initialize-analog-workspace.js.map +0 -1
- package/src/lib/nx-plugin/src/generators/app/versions/dependencies.js +0 -56
- package/src/lib/nx-plugin/src/generators/app/versions/dependencies.js.map +0 -1
- package/src/lib/nx-plugin/src/generators/app/versions/dev-dependencies.js +0 -72
- package/src/lib/nx-plugin/src/generators/app/versions/dev-dependencies.js.map +0 -1
- package/src/lib/nx-plugin/src/generators/app/versions/nx-dependencies.js +0 -46
- package/src/lib/nx-plugin/src/generators/app/versions/nx-dependencies.js.map +0 -1
- package/src/lib/nx-plugin/src/generators/app/versions/nx_17_X/versions.js +0 -37
- package/src/lib/nx-plugin/src/generators/app/versions/nx_17_X/versions.js.map +0 -1
- package/src/lib/nx-plugin/src/generators/app/versions.js +0 -43
- package/src/lib/nx-plugin/src/generators/app/versions.js.map +0 -1
- package/src/lib/nx-plugin/src/index.d.ts +0 -0
- package/src/lib/nx-plugin/src/index.js.map +0 -1
- package/src/lib/options.js +0 -1
- package/src/lib/ssr/ssr-xhr-plugin.d.ts +0 -2
- package/src/lib/ssr/ssr-xhr-plugin.js +0 -28
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type JsonLdObject } from "./route-manifest.js";
|
|
2
|
+
export type JsonLdModuleManifestEntry = {
|
|
3
|
+
kind: "module";
|
|
4
|
+
routePath: string;
|
|
5
|
+
sourceFile: string;
|
|
6
|
+
importAlias: string;
|
|
7
|
+
};
|
|
8
|
+
export type JsonLdContentManifestEntry = {
|
|
9
|
+
kind: "content";
|
|
10
|
+
routePath: string;
|
|
11
|
+
sourceFile: string;
|
|
12
|
+
jsonLd: JsonLdObject[];
|
|
13
|
+
};
|
|
14
|
+
export type JsonLdManifestEntry = JsonLdModuleManifestEntry | JsonLdContentManifestEntry;
|
|
15
|
+
/**
|
|
16
|
+
* Heuristic detector for JSON-LD exports in route modules.
|
|
17
|
+
*
|
|
18
|
+
* This is intentionally regex-based for speed during file scanning.
|
|
19
|
+
* It reliably detects these direct export patterns:
|
|
20
|
+
*
|
|
21
|
+
* - `export const routeJsonLd = ...`
|
|
22
|
+
* - `export const routeMeta = { ..., jsonLd: ... }`
|
|
23
|
+
* - `export const routeJsonLd = (route) => ...` (function form)
|
|
24
|
+
*
|
|
25
|
+
* Known limitations (not detected):
|
|
26
|
+
*
|
|
27
|
+
* - re-exports: `export { routeJsonLd } from './data'`
|
|
28
|
+
* - aliased exports: `export { something as routeJsonLd }`
|
|
29
|
+
* - default exports: `export default { jsonLd: ... }`
|
|
30
|
+
* - indirect assignment: `const data = { jsonLd: ... }; export const routeMeta = data`
|
|
31
|
+
*
|
|
32
|
+
* Known false-positive risks:
|
|
33
|
+
*
|
|
34
|
+
* - comment text containing `export const routeJsonLd`
|
|
35
|
+
* - unrelated `jsonLd` text appearing after `export const routeMeta`
|
|
36
|
+
*
|
|
37
|
+
* Prefer the supported direct export patterns listed above.
|
|
38
|
+
*/
|
|
39
|
+
export declare function detectJsonLdModuleExports(fileContent: string): boolean;
|
|
40
|
+
export declare function extractMarkdownJsonLd(rawContent: string): JsonLdObject[];
|
|
41
|
+
export declare function generateJsonLdManifestSource(entries: JsonLdManifestEntry[], outFile: string): string;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { normalizeJsonLd } from "./route-manifest.js";
|
|
2
|
+
import { normalizePath } from "vite";
|
|
3
|
+
import { dirname, relative } from "node:path";
|
|
4
|
+
import fm from "front-matter";
|
|
5
|
+
//#region packages/platform/src/lib/json-ld-manifest-plugin.ts
|
|
6
|
+
/**
|
|
7
|
+
* Heuristic detector for JSON-LD exports in route modules.
|
|
8
|
+
*
|
|
9
|
+
* This is intentionally regex-based for speed during file scanning.
|
|
10
|
+
* It reliably detects these direct export patterns:
|
|
11
|
+
*
|
|
12
|
+
* - `export const routeJsonLd = ...`
|
|
13
|
+
* - `export const routeMeta = { ..., jsonLd: ... }`
|
|
14
|
+
* - `export const routeJsonLd = (route) => ...` (function form)
|
|
15
|
+
*
|
|
16
|
+
* Known limitations (not detected):
|
|
17
|
+
*
|
|
18
|
+
* - re-exports: `export { routeJsonLd } from './data'`
|
|
19
|
+
* - aliased exports: `export { something as routeJsonLd }`
|
|
20
|
+
* - default exports: `export default { jsonLd: ... }`
|
|
21
|
+
* - indirect assignment: `const data = { jsonLd: ... }; export const routeMeta = data`
|
|
22
|
+
*
|
|
23
|
+
* Known false-positive risks:
|
|
24
|
+
*
|
|
25
|
+
* - comment text containing `export const routeJsonLd`
|
|
26
|
+
* - unrelated `jsonLd` text appearing after `export const routeMeta`
|
|
27
|
+
*
|
|
28
|
+
* Prefer the supported direct export patterns listed above.
|
|
29
|
+
*/
|
|
30
|
+
function detectJsonLdModuleExports(fileContent) {
|
|
31
|
+
return /export\s+const\s+routeJsonLd\b/.test(fileContent) || /export\s+const\s+routeMeta\b[\s\S]*?\bjsonLd\b/.test(fileContent);
|
|
32
|
+
}
|
|
33
|
+
function extractMarkdownJsonLd(rawContent) {
|
|
34
|
+
const { attributes } = fm(rawContent);
|
|
35
|
+
return normalizeJsonLd(attributes["jsonLd"]);
|
|
36
|
+
}
|
|
37
|
+
function generateJsonLdManifestSource(entries, outFile) {
|
|
38
|
+
const lines = [];
|
|
39
|
+
const moduleEntries = entries.filter((entry) => entry.kind === "module");
|
|
40
|
+
lines.push("// This file is auto-generated by @analogjs/platform");
|
|
41
|
+
lines.push("// Do not edit manually");
|
|
42
|
+
lines.push("");
|
|
43
|
+
lines.push("import type { Graph, Thing, WithContext } from 'schema-dts';");
|
|
44
|
+
moduleEntries.forEach((entry) => {
|
|
45
|
+
lines.push(`import * as ${entry.importAlias} from '${toImportPath(outFile, entry.sourceFile)}';`);
|
|
46
|
+
});
|
|
47
|
+
lines.push("");
|
|
48
|
+
lines.push("export type AnalogJsonLdDocument = WithContext<Thing> | Graph | Array<WithContext<Thing>>;");
|
|
49
|
+
lines.push("export type GeneratedJsonLdManifestEntry = { routePath: string; sourceFile: string; kind: 'module' | 'content'; resolveJsonLd: () => AnalogJsonLdDocument[]; };");
|
|
50
|
+
lines.push("");
|
|
51
|
+
lines.push("function normalizeJsonLd(value: unknown): AnalogJsonLdDocument[] {");
|
|
52
|
+
lines.push(" if (Array.isArray(value)) {");
|
|
53
|
+
lines.push(" return value.filter((entry): entry is AnalogJsonLdDocument => typeof entry === 'object' && entry !== null && !Array.isArray(entry));");
|
|
54
|
+
lines.push(" }");
|
|
55
|
+
lines.push("");
|
|
56
|
+
lines.push(" return typeof value === 'object' && value !== null ? [value as AnalogJsonLdDocument] : [];");
|
|
57
|
+
lines.push("}");
|
|
58
|
+
lines.push("");
|
|
59
|
+
lines.push("function resolveModuleJsonLd(routeModule: unknown): AnalogJsonLdDocument[] {");
|
|
60
|
+
lines.push(" const typedRouteModule = routeModule as { routeJsonLd?: unknown; routeMeta?: { jsonLd?: unknown } };");
|
|
61
|
+
lines.push(" return normalizeJsonLd(typedRouteModule.routeMeta?.jsonLd ?? typedRouteModule.routeJsonLd);");
|
|
62
|
+
lines.push("}");
|
|
63
|
+
lines.push("");
|
|
64
|
+
lines.push("export const routeJsonLdManifest = new Map<string, GeneratedJsonLdManifestEntry>([");
|
|
65
|
+
entries.forEach((entry) => {
|
|
66
|
+
if (entry.kind === "module") {
|
|
67
|
+
lines.push(` ['${entry.routePath}', { routePath: '${entry.routePath}', sourceFile: '${entry.sourceFile}', kind: 'module', resolveJsonLd: () => resolveModuleJsonLd(${entry.importAlias}) }],`);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
lines.push(` ['${entry.routePath}', { routePath: '${entry.routePath}', sourceFile: '${entry.sourceFile}', kind: 'content', resolveJsonLd: () => ${JSON.stringify(entry.jsonLd)} }],`);
|
|
71
|
+
});
|
|
72
|
+
lines.push("]);");
|
|
73
|
+
lines.push("");
|
|
74
|
+
return lines.join("\n");
|
|
75
|
+
}
|
|
76
|
+
function toImportPath(outFile, sourceFile) {
|
|
77
|
+
const relativePath = normalizePath(relative(dirname(outFile), sourceFile.replace(/^\//, "").replace(/\.(ts|js|analog|ag)$/, "")));
|
|
78
|
+
if (relativePath.startsWith(".")) return relativePath;
|
|
79
|
+
return `./${relativePath}`;
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { detectJsonLdModuleExports, extractMarkdownJsonLd, generateJsonLdManifestSource };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=json-ld-manifest-plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-ld-manifest-plugin.js","names":[],"sources":["../../../src/lib/json-ld-manifest-plugin.ts"],"sourcesContent":["import fm from 'front-matter';\nimport { normalizePath } from 'vite';\nimport { dirname, relative } from 'node:path';\n\nimport { normalizeJsonLd, type JsonLdObject } from './route-manifest.js';\n\nexport type JsonLdModuleManifestEntry = {\n kind: 'module';\n routePath: string;\n sourceFile: string;\n importAlias: string;\n};\n\nexport type JsonLdContentManifestEntry = {\n kind: 'content';\n routePath: string;\n sourceFile: string;\n jsonLd: JsonLdObject[];\n};\n\nexport type JsonLdManifestEntry =\n | JsonLdModuleManifestEntry\n | JsonLdContentManifestEntry;\n\n/**\n * Heuristic detector for JSON-LD exports in route modules.\n *\n * This is intentionally regex-based for speed during file scanning.\n * It reliably detects these direct export patterns:\n *\n * - `export const routeJsonLd = ...`\n * - `export const routeMeta = { ..., jsonLd: ... }`\n * - `export const routeJsonLd = (route) => ...` (function form)\n *\n * Known limitations (not detected):\n *\n * - re-exports: `export { routeJsonLd } from './data'`\n * - aliased exports: `export { something as routeJsonLd }`\n * - default exports: `export default { jsonLd: ... }`\n * - indirect assignment: `const data = { jsonLd: ... }; export const routeMeta = data`\n *\n * Known false-positive risks:\n *\n * - comment text containing `export const routeJsonLd`\n * - unrelated `jsonLd` text appearing after `export const routeMeta`\n *\n * Prefer the supported direct export patterns listed above.\n */\nexport function detectJsonLdModuleExports(fileContent: string): boolean {\n return (\n /export\\s+const\\s+routeJsonLd\\b/.test(fileContent) ||\n /export\\s+const\\s+routeMeta\\b[\\s\\S]*?\\bjsonLd\\b/.test(fileContent)\n );\n}\n\nexport function extractMarkdownJsonLd(rawContent: string): JsonLdObject[] {\n const { attributes } = fm<Record<string, unknown>>(rawContent);\n return normalizeJsonLd(attributes['jsonLd']);\n}\n\nexport function generateJsonLdManifestSource(\n entries: JsonLdManifestEntry[],\n outFile: string,\n): string {\n const lines: string[] = [];\n const moduleEntries = entries.filter(\n (entry): entry is JsonLdModuleManifestEntry => entry.kind === 'module',\n );\n\n lines.push('// This file is auto-generated by @analogjs/platform');\n lines.push('// Do not edit manually');\n lines.push('');\n\n lines.push(\"import type { Graph, Thing, WithContext } from 'schema-dts';\");\n\n moduleEntries.forEach((entry) => {\n lines.push(\n `import * as ${entry.importAlias} from '${toImportPath(outFile, entry.sourceFile)}';`,\n );\n });\n\n lines.push('');\n lines.push(\n 'export type AnalogJsonLdDocument = WithContext<Thing> | Graph | Array<WithContext<Thing>>;',\n );\n lines.push(\n \"export type GeneratedJsonLdManifestEntry = { routePath: string; sourceFile: string; kind: 'module' | 'content'; resolveJsonLd: () => AnalogJsonLdDocument[]; };\",\n );\n lines.push('');\n lines.push(\n 'function normalizeJsonLd(value: unknown): AnalogJsonLdDocument[] {',\n );\n lines.push(' if (Array.isArray(value)) {');\n lines.push(\n \" return value.filter((entry): entry is AnalogJsonLdDocument => typeof entry === 'object' && entry !== null && !Array.isArray(entry));\",\n );\n lines.push(' }');\n lines.push('');\n lines.push(\n \" return typeof value === 'object' && value !== null ? [value as AnalogJsonLdDocument] : [];\",\n );\n lines.push('}');\n lines.push('');\n lines.push(\n 'function resolveModuleJsonLd(routeModule: unknown): AnalogJsonLdDocument[] {',\n );\n lines.push(\n ' const typedRouteModule = routeModule as { routeJsonLd?: unknown; routeMeta?: { jsonLd?: unknown } };',\n );\n lines.push(\n // Match runtime precedence (mergeRouteJsonLdIntoRouteMeta in routes.ts):\n // routeMeta.jsonLd wins over standalone routeJsonLd.\n ' return normalizeJsonLd(typedRouteModule.routeMeta?.jsonLd ?? typedRouteModule.routeJsonLd);',\n );\n lines.push('}');\n lines.push('');\n lines.push(\n 'export const routeJsonLdManifest = new Map<string, GeneratedJsonLdManifestEntry>([',\n );\n\n entries.forEach((entry) => {\n if (entry.kind === 'module') {\n lines.push(\n ` ['${entry.routePath}', { routePath: '${entry.routePath}', sourceFile: '${entry.sourceFile}', kind: 'module', resolveJsonLd: () => resolveModuleJsonLd(${entry.importAlias}) }],`,\n );\n return;\n }\n\n lines.push(\n ` ['${entry.routePath}', { routePath: '${entry.routePath}', sourceFile: '${entry.sourceFile}', kind: 'content', resolveJsonLd: () => ${JSON.stringify(entry.jsonLd)} }],`,\n );\n });\n\n lines.push(']);');\n lines.push('');\n\n return lines.join('\\n');\n}\n\nfunction toImportPath(outFile: string, sourceFile: string): string {\n // JSON-LD entries are emitted inside the same generated route module, so\n // imports are always resolved relative to that single output file.\n const fromDir = dirname(outFile);\n const sourceNoExt = sourceFile\n .replace(/^\\//, '')\n .replace(/\\.(ts|js|analog|ag)$/, '');\n const relativePath = normalizePath(relative(fromDir, sourceNoExt));\n\n if (relativePath.startsWith('.')) {\n return relativePath;\n }\n\n return `./${relativePath}`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,0BAA0B,aAA8B;AACtE,QACE,iCAAiC,KAAK,YAAY,IAClD,iDAAiD,KAAK,YAAY;;AAItE,SAAgB,sBAAsB,YAAoC;CACxE,MAAM,EAAE,eAAe,GAA4B,WAAW;AAC9D,QAAO,gBAAgB,WAAW,UAAU;;AAG9C,SAAgB,6BACd,SACA,SACQ;CACR,MAAM,QAAkB,EAAE;CAC1B,MAAM,gBAAgB,QAAQ,QAC3B,UAA8C,MAAM,SAAS,SAC/D;AAED,OAAM,KAAK,uDAAuD;AAClE,OAAM,KAAK,0BAA0B;AACrC,OAAM,KAAK,GAAG;AAEd,OAAM,KAAK,+DAA+D;AAE1E,eAAc,SAAS,UAAU;AAC/B,QAAM,KACJ,eAAe,MAAM,YAAY,SAAS,aAAa,SAAS,MAAM,WAAW,CAAC,IACnF;GACD;AAEF,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,6FACD;AACD,OAAM,KACJ,kKACD;AACD,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,qEACD;AACD,OAAM,KAAK,gCAAgC;AAC3C,OAAM,KACJ,2IACD;AACD,OAAM,KAAK,MAAM;AACjB,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,+FACD;AACD,OAAM,KAAK,IAAI;AACf,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,+EACD;AACD,OAAM,KACJ,yGACD;AACD,OAAM,KAGJ,gGACD;AACD,OAAM,KAAK,IAAI;AACf,OAAM,KAAK,GAAG;AACd,OAAM,KACJ,qFACD;AAED,SAAQ,SAAS,UAAU;AACzB,MAAI,MAAM,SAAS,UAAU;AAC3B,SAAM,KACJ,OAAO,MAAM,UAAU,mBAAmB,MAAM,UAAU,kBAAkB,MAAM,WAAW,8DAA8D,MAAM,YAAY,OAC9K;AACD;;AAGF,QAAM,KACJ,OAAO,MAAM,UAAU,mBAAmB,MAAM,UAAU,kBAAkB,MAAM,WAAW,2CAA2C,KAAK,UAAU,MAAM,OAAO,CAAC,MACtK;GACD;AAEF,OAAM,KAAK,MAAM;AACjB,OAAM,KAAK,GAAG;AAEd,QAAO,MAAM,KAAK,KAAK;;AAGzB,SAAS,aAAa,SAAiB,YAA4B;CAOjE,MAAM,eAAe,cAAc,SAJnB,QAAQ,QAAQ,EACZ,WACjB,QAAQ,OAAO,GAAG,CAClB,QAAQ,wBAAwB,GAAG,CAC2B,CAAC;AAElE,KAAI,aAAa,WAAW,IAAI,CAC9B,QAAO;AAGT,QAAO,KAAK"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
+
"builders": {
|
|
3
|
+
"vite-dev-server": "@analogjs/vite-plugin-angular:vite-dev-server",
|
|
4
|
+
"vite": "@analogjs/vite-plugin-angular:vite",
|
|
5
|
+
"vitest": "@analogjs/vitest-angular:test"
|
|
6
|
+
},
|
|
2
7
|
"executors": {
|
|
3
8
|
"vite-dev-server": {
|
|
4
9
|
"implementation": "./src/executors/vite-dev-server/vite-dev-server.impl",
|
|
@@ -33,5 +33,30 @@
|
|
|
33
33
|
"description": "Migrate and configure an Angular SPA to use Analog.",
|
|
34
34
|
"aliases": ["migrate"]
|
|
35
35
|
}
|
|
36
|
+
},
|
|
37
|
+
"schematics": {
|
|
38
|
+
"application": {
|
|
39
|
+
"factory": "./src/generators/app/compat#applicationSchematic",
|
|
40
|
+
"schema": "./src/generators/app/schema.json",
|
|
41
|
+
"description": "Generates an Analog application",
|
|
42
|
+
"aliases": ["app"]
|
|
43
|
+
},
|
|
44
|
+
"page": {
|
|
45
|
+
"factory": "./src/generators/page/compat#pageSchematic",
|
|
46
|
+
"schema": "./src/generators/page/schema.json",
|
|
47
|
+
"description": "Creates a new Analog page in the given or default project.",
|
|
48
|
+
"aliases": ["p"]
|
|
49
|
+
},
|
|
50
|
+
"setup-vitest": {
|
|
51
|
+
"factory": "./src/generators/setup-vitest/compat#setupVitestSchematic",
|
|
52
|
+
"schema": "./src/generators/setup-vitest/schema.json",
|
|
53
|
+
"description": "Setup the Vitest configuration."
|
|
54
|
+
},
|
|
55
|
+
"init": {
|
|
56
|
+
"factory": "./src/generators/init/compat#initSchematic",
|
|
57
|
+
"schema": "./src/generators/init/schema.json",
|
|
58
|
+
"description": "Migrate and configure an Angular SPA to use Analog.",
|
|
59
|
+
"aliases": ["migrate"]
|
|
60
|
+
}
|
|
36
61
|
}
|
|
37
62
|
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { convertNxExecutor } from "@nx/devkit";
|
|
2
|
+
declare const compat: ReturnType<typeof convertNxExecutor>;
|
|
3
|
+
export default compat;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const require_src_executors_vite_vite_impl = require("./vite.impl.js");
|
|
2
|
+
//#region packages/nx-plugin/src/executors/vite/compat.ts
|
|
3
|
+
var compat = (0, require("@nx/devkit").convertNxExecutor)(require_src_executors_vite_vite_impl);
|
|
4
|
+
//#endregion
|
|
5
|
+
module.exports = compat;
|
|
6
|
+
|
|
7
7
|
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","
|
|
1
|
+
{"version":3,"file":"compat.js","names":[],"sources":["../../../../../../../../nx-plugin/src/executors/vite/compat.ts"],"sourcesContent":["import { convertNxExecutor } from '@nx/devkit';\n\nimport viteBuildExecutor from './vite.impl';\n\nconst compat: ReturnType<typeof convertNxExecutor> =\n convertNxExecutor(viteBuildExecutor);\nexport default compat;\n"],"mappings":";;AAIA,IAAM,UAAA,yBAAA,mBACc,qCAAkB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { FileReplacement } from '@nx/vite/plugins/rollup-replace-files.plugin';
|
|
2
|
-
export { ViteBuildExecutorOptions } from '@nx/vite/executors';
|
|
2
|
+
export type { ViteBuildExecutorOptions } from '@nx/vite/executors';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { viteBuildExecutor } from
|
|
1
|
+
import { viteBuildExecutor } from "@nx/vite/executors";
|
|
2
2
|
export default viteBuildExecutor;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports
|
|
1
|
+
//#region packages/nx-plugin/src/executors/vite/vite.impl.ts
|
|
2
|
+
var vite_impl_default = require("@nx/vite/executors").viteBuildExecutor;
|
|
3
|
+
//#endregion
|
|
4
|
+
module.exports = vite_impl_default;
|
|
5
|
+
|
|
5
6
|
//# sourceMappingURL=vite.impl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.impl.js","
|
|
1
|
+
{"version":3,"file":"vite.impl.js","names":[],"sources":["../../../../../../../../nx-plugin/src/executors/vite/vite.impl.ts"],"sourcesContent":["import { viteBuildExecutor } from '@nx/vite/executors';\n\nexport default viteBuildExecutor;\n"],"mappings":";AAEA,IAAA,kDAAe"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { convertNxExecutor } from "@nx/devkit";
|
|
2
|
+
declare const compat: ReturnType<typeof convertNxExecutor>;
|
|
3
|
+
export default compat;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const require_src_executors_vite_dev_server_vite_dev_server_impl = require("./vite-dev-server.impl.js");
|
|
2
|
+
//#region packages/nx-plugin/src/executors/vite-dev-server/compat.ts
|
|
3
|
+
var compat = (0, require("@nx/devkit").convertNxExecutor)(require_src_executors_vite_dev_server_vite_dev_server_impl);
|
|
4
|
+
//#endregion
|
|
5
|
+
module.exports = compat;
|
|
6
|
+
|
|
7
7
|
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","
|
|
1
|
+
{"version":3,"file":"compat.js","names":[],"sources":["../../../../../../../../nx-plugin/src/executors/vite-dev-server/compat.ts"],"sourcesContent":["import { convertNxExecutor } from '@nx/devkit';\n\nimport viteDevServerExecutor from './vite-dev-server.impl';\n\nconst compat: ReturnType<typeof convertNxExecutor> = convertNxExecutor(\n viteDevServerExecutor,\n);\nexport default compat;\n"],"mappings":";;AAIA,IAAM,UAAA,yBAAA,mBACJ,2DACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ViteDevServerExecutorOptions } from '@nx/vite/executors';
|
|
1
|
+
export type { ViteDevServerExecutorOptions } from '@nx/vite/executors';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { viteDevServerExecutor } from
|
|
1
|
+
import { viteDevServerExecutor } from "@nx/vite/executors";
|
|
2
2
|
export default viteDevServerExecutor;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports
|
|
1
|
+
//#region packages/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.ts
|
|
2
|
+
var vite_dev_server_impl_default = require("@nx/vite/executors").viteDevServerExecutor;
|
|
3
|
+
//#endregion
|
|
4
|
+
module.exports = vite_dev_server_impl_default;
|
|
5
|
+
|
|
5
6
|
//# sourceMappingURL=vite-dev-server.impl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-dev-server.impl.js","
|
|
1
|
+
{"version":3,"file":"vite-dev-server.impl.js","names":[],"sources":["../../../../../../../../nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.ts"],"sourcesContent":["import { viteDevServerExecutor } from '@nx/vite/executors';\n\nexport default viteDevServerExecutor;\n"],"mappings":";AAEA,IAAA,6DAAe"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { convertNxExecutor } from "@nx/devkit";
|
|
2
|
+
declare const compat: ReturnType<typeof convertNxExecutor>;
|
|
3
|
+
export default compat;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const require_src_executors_vitest_vitest_impl = require("./vitest.impl.js");
|
|
2
|
+
//#region packages/nx-plugin/src/executors/vitest/compat.ts
|
|
3
|
+
var compat = (0, require("@nx/devkit").convertNxExecutor)(require_src_executors_vitest_vitest_impl);
|
|
4
|
+
//#endregion
|
|
5
|
+
module.exports = compat;
|
|
6
|
+
|
|
7
7
|
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","
|
|
1
|
+
{"version":3,"file":"compat.js","names":[],"sources":["../../../../../../../../nx-plugin/src/executors/vitest/compat.ts"],"sourcesContent":["import { convertNxExecutor } from '@nx/devkit';\n\nimport vitestExecutor from './vitest.impl';\n\nconst compat: ReturnType<typeof convertNxExecutor> =\n convertNxExecutor(vitestExecutor);\nexport default compat;\n"],"mappings":";;AAIA,IAAM,UAAA,yBAAA,mBACc,yCAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { VitestExecutorOptions } from '@nx/vite/executors';
|
|
1
|
+
export type { VitestExecutorOptions } from '@nx/vite/executors';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { vitestExecutor } from
|
|
1
|
+
import { vitestExecutor } from "@nx/vite/executors";
|
|
2
2
|
export default vitestExecutor;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
exports
|
|
1
|
+
//#region packages/nx-plugin/src/executors/vitest/vitest.impl.ts
|
|
2
|
+
var vitest_impl_default = require("@nx/vite/executors").vitestExecutor;
|
|
3
|
+
//#endregion
|
|
4
|
+
module.exports = vitest_impl_default;
|
|
5
|
+
|
|
5
6
|
//# sourceMappingURL=vitest.impl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.impl.js","
|
|
1
|
+
{"version":3,"file":"vitest.impl.js","names":[],"sources":["../../../../../../../../nx-plugin/src/executors/vitest/vitest.impl.ts"],"sourcesContent":["import { vitestExecutor } from '@nx/vite/executors';\n\nexport default vitestExecutor;\n"],"mappings":";AAEA,IAAA,oDAAe"}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { convertNxGenerator } from "@nx/devkit";
|
|
2
|
+
/**
|
|
3
|
+
* Angular CLI schematic wrapper for the Analog application generator.
|
|
4
|
+
* Referenced by `generators.json#schematics.application.factory` so that
|
|
5
|
+
* `ng generate @analogjs/platform:application` resolves through the
|
|
6
|
+
* Angular schematics engine (which uses named exports, not default).
|
|
7
|
+
*/
|
|
8
|
+
export declare const applicationSchematic: ReturnType<typeof convertNxGenerator>;
|
|
9
|
+
export default applicationSchematic;
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_src_generators_app_generator = require("./generator.js");
|
|
6
|
+
//#region packages/nx-plugin/src/generators/app/compat.ts
|
|
7
|
+
/**
|
|
8
|
+
* Angular CLI schematic wrapper for the Analog application generator.
|
|
9
|
+
* Referenced by `generators.json#schematics.application.factory` so that
|
|
10
|
+
* `ng generate @analogjs/platform:application` resolves through the
|
|
11
|
+
* Angular schematics engine (which uses named exports, not default).
|
|
12
|
+
*/
|
|
13
|
+
var applicationSchematic = (0, require("@nx/devkit").convertNxGenerator)(require_src_generators_app_generator);
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.applicationSchematic = applicationSchematic;
|
|
16
|
+
exports.default = applicationSchematic;
|
|
17
|
+
|
|
7
18
|
//# sourceMappingURL=compat.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","
|
|
1
|
+
{"version":3,"file":"compat.js","names":[],"sources":["../../../../../../../../nx-plugin/src/generators/app/compat.ts"],"sourcesContent":["import { convertNxGenerator } from '@nx/devkit';\nimport generator from './generator';\n\n/**\n * Angular CLI schematic wrapper for the Analog application generator.\n * Referenced by `generators.json#schematics.application.factory` so that\n * `ng generate @analogjs/platform:application` resolves through the\n * Angular schematics engine (which uses named exports, not default).\n */\nexport const applicationSchematic: ReturnType<typeof convertNxGenerator> =\n convertNxGenerator(generator) as ReturnType<typeof convertNxGenerator>;\nexport default applicationSchematic;\n"],"mappings":";;;;;;;;;;;;AASA,IAAa,wBAAA,yBAAA,oBACQ,qCAAU"}
|
|
@@ -4,16 +4,13 @@
|
|
|
4
4
|
"rootDir": ".",
|
|
5
5
|
"sourceMap": true,
|
|
6
6
|
"declaration": false,
|
|
7
|
-
"moduleResolution": "
|
|
8
|
-
"emitDecoratorMetadata": true,
|
|
9
|
-
"experimentalDecorators": true,
|
|
7
|
+
"moduleResolution": "bundler",
|
|
10
8
|
"importHelpers": true,
|
|
11
|
-
"target": "
|
|
9
|
+
"target": "esnext",
|
|
12
10
|
"module": "esnext",
|
|
13
|
-
"lib": ["
|
|
11
|
+
"lib": ["es2022", "dom"],
|
|
14
12
|
"skipLibCheck": true,
|
|
15
13
|
"skipDefaultLibCheck": true,
|
|
16
|
-
"baseUrl": ".",
|
|
17
14
|
"paths": {}
|
|
18
15
|
},
|
|
19
16
|
"exclude": ["node_modules", "tmp"]
|
package/src/lib/nx-plugin/src/generators/app/files/template-angular/src/test-setup.ts__template__
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<% if (majorAngularVersion > 20) { %>
|
|
2
2
|
import '@angular/compiler';
|
|
3
3
|
import '@analogjs/vitest-angular/setup-snapshots';
|
|
4
|
+
import '@analogjs/vitest-angular/setup-serializers';
|
|
4
5
|
import { setupTestBed } from '@analogjs/vitest-angular/setup-testbed';
|
|
5
6
|
|
|
6
7
|
setupTestBed();
|
package/src/lib/nx-plugin/src/generators/app/files/template-angular/vite.config.ts__template__
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
import analog from '@analogjs/platform';
|
|
4
4
|
import { defineConfig } from 'vite';
|
|
5
5
|
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
6
|
+
<% if (addTailwind) { %>
|
|
7
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
8
|
+
<% } %>
|
|
6
9
|
|
|
7
10
|
// https://vitejs.dev/config/
|
|
8
11
|
export default defineConfig(({ mode }) => {
|
|
@@ -20,6 +23,9 @@ export default defineConfig(({ mode }) => {
|
|
|
20
23
|
},
|
|
21
24
|
},
|
|
22
25
|
plugins: [
|
|
26
|
+
<% if (addTailwind) { %>
|
|
27
|
+
tailwindcss(),
|
|
28
|
+
<% } %>
|
|
23
29
|
analog(),
|
|
24
30
|
nxViteTsPaths(),
|
|
25
31
|
],
|
|
@@ -2,17 +2,11 @@ import { ApplicationConfig } from '@angular/core';
|
|
|
2
2
|
import { provideHttpClient, withFetch } from '@angular/common/http';
|
|
3
3
|
import { provideClientHydration } from '@angular/platform-browser';
|
|
4
4
|
import { provideFileRouter } from '@analogjs/router';
|
|
5
|
-
<% if (addTRPC) { %>
|
|
6
|
-
import { provideTrpcClient } from '../trpc-client';
|
|
7
|
-
<% } %>
|
|
8
5
|
|
|
9
6
|
export const appConfig: ApplicationConfig = {
|
|
10
7
|
providers: [
|
|
11
8
|
provideFileRouter(),
|
|
12
9
|
provideClientHydration(),
|
|
13
10
|
provideHttpClient(withFetch()),
|
|
14
|
-
<% if (addTRPC) { %>
|
|
15
|
-
provideTrpcClient(),
|
|
16
|
-
<% } %>
|
|
17
11
|
],
|
|
18
12
|
};
|
package/src/lib/nx-plugin/src/generators/app/files/template-angular-v17/tsconfig.json__template__
CHANGED
|
@@ -15,13 +15,15 @@
|
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
17
|
"compilerOptions": {
|
|
18
|
-
"target": "
|
|
18
|
+
"target": "ES2022",
|
|
19
|
+
"module": "ES2022",
|
|
19
20
|
"forceConsistentCasingInFileNames": true,
|
|
20
21
|
"strict": true,
|
|
21
22
|
"noImplicitOverride": true,
|
|
22
23
|
"noPropertyAccessFromIndexSignature": true,
|
|
23
24
|
"noImplicitReturns": true,
|
|
24
|
-
"noFallthroughCasesInSwitch": true
|
|
25
|
+
"noFallthroughCasesInSwitch": true,
|
|
26
|
+
"moduleResolution": "bundler"
|
|
25
27
|
},
|
|
26
28
|
"angularCompilerOptions": {
|
|
27
29
|
"enableI18nLegacyMessageIdFormat": false,
|
package/src/lib/nx-plugin/src/generators/app/files/template-angular-v17/vite.config.ts__template__
CHANGED
|
@@ -4,7 +4,6 @@ import analog from '@analogjs/platform';
|
|
|
4
4
|
import { defineConfig, Plugin } from 'vite';
|
|
5
5
|
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
6
6
|
<% if (addTailwind) { %>
|
|
7
|
-
// @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
|
|
8
7
|
import tailwindcss from '@tailwindcss/vite';
|
|
9
8
|
<% } %>
|
|
10
9
|
|
|
@@ -14,11 +13,6 @@ export default defineConfig(({ mode }) => {
|
|
|
14
13
|
root: __dirname,
|
|
15
14
|
publicDir: 'src/public',
|
|
16
15
|
cacheDir: `<%= offsetFromRoot %>node_modules/.vite`,
|
|
17
|
-
<% if (addTRPC) { %>
|
|
18
|
-
ssr: {
|
|
19
|
-
noExternal: ['@analogjs/trpc','@trpc/server'],
|
|
20
|
-
},
|
|
21
|
-
<% } %>
|
|
22
16
|
build: {
|
|
23
17
|
outDir: '<%= offsetFromRoot %>dist/<%= projectRoot %>/client',
|
|
24
18
|
reportCompressedSize: true,
|
|
@@ -33,19 +27,7 @@ export default defineConfig(({ mode }) => {
|
|
|
33
27
|
<% if (addTailwind) { %>
|
|
34
28
|
tailwindcss(),
|
|
35
29
|
<% } %>
|
|
36
|
-
<% if (addTRPC) { %>
|
|
37
|
-
analog({
|
|
38
|
-
nitro: {
|
|
39
|
-
routeRules: {
|
|
40
|
-
'/': {
|
|
41
|
-
prerender: false,
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}),
|
|
46
|
-
<% } else { %>
|
|
47
30
|
analog(),
|
|
48
|
-
<% } %>
|
|
49
31
|
nxViteTsPaths(),
|
|
50
32
|
],
|
|
51
33
|
test: {
|
|
@@ -6,9 +6,6 @@ import {
|
|
|
6
6
|
} from '@angular/common/http';
|
|
7
7
|
import { provideClientHydration } from '@angular/platform-browser';
|
|
8
8
|
import { provideFileRouter, requestContextInterceptor } from '@analogjs/router';
|
|
9
|
-
<% if (addTRPC) { %>
|
|
10
|
-
import { provideTrpcClient } from '../trpc-client';
|
|
11
|
-
<% } %>
|
|
12
9
|
|
|
13
10
|
export const appConfig: ApplicationConfig = {
|
|
14
11
|
providers: [
|
|
@@ -19,8 +16,5 @@ export const appConfig: ApplicationConfig = {
|
|
|
19
16
|
withFetch(),
|
|
20
17
|
withInterceptors([requestContextInterceptor])
|
|
21
18
|
),
|
|
22
|
-
<% if (addTRPC) { %>
|
|
23
|
-
provideTrpcClient(),
|
|
24
|
-
<% } %>
|
|
25
19
|
],
|
|
26
20
|
};
|
package/src/lib/nx-plugin/src/generators/app/files/template-angular-v18/tsconfig.json__template__
CHANGED
|
@@ -15,13 +15,15 @@
|
|
|
15
15
|
}
|
|
16
16
|
],
|
|
17
17
|
"compilerOptions": {
|
|
18
|
-
"target": "
|
|
18
|
+
"target": "ES2022",
|
|
19
|
+
"module": "ES2022",
|
|
19
20
|
"forceConsistentCasingInFileNames": true,
|
|
20
21
|
"strict": true,
|
|
21
22
|
"noImplicitOverride": true,
|
|
22
23
|
"noPropertyAccessFromIndexSignature": true,
|
|
23
24
|
"noImplicitReturns": true,
|
|
24
|
-
"noFallthroughCasesInSwitch": true
|
|
25
|
+
"noFallthroughCasesInSwitch": true,
|
|
26
|
+
"moduleResolution": "bundler"
|
|
25
27
|
},
|
|
26
28
|
"angularCompilerOptions": {
|
|
27
29
|
"enableI18nLegacyMessageIdFormat": false,
|