@analogjs/platform 3.0.0-alpha.3 → 3.0.0-alpha.30
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 +28 -18
- package/src/index.d.ts +9 -2
- package/src/index.js +11 -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 -2
- 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.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 +22 -28
- package/src/lib/content/shiki/index.js.map +1 -0
- package/src/lib/content/shiki/options.d.ts +8 -7
- package/src/lib/content/shiki/shiki-highlighter.d.ts +14 -13
- package/src/lib/content/shiki/shiki-highlighter.js +49 -43
- 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 +183 -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 +80 -82
- package/src/lib/deps-plugin.js.map +1 -0
- package/src/lib/discover-library-routes.d.ts +13 -0
- package/src/lib/discover-library-routes.js +64 -0
- package/src/lib/discover-library-routes.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/node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/camelCase.js +13 -0
- package/src/lib/nx-plugin/node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/camelCase.js.map +1 -0
- package/src/lib/nx-plugin/node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/capitalize.js +8 -0
- package/src/lib/nx-plugin/node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/capitalize.js.map +1 -0
- package/src/lib/nx-plugin/node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/words.js +9 -0
- package/src/lib/nx-plugin/node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/string/words.js.map +1 -0
- package/src/lib/nx-plugin/package.json +1 -5
- package/src/lib/nx-plugin/src/executors/vite/compat.d.ts +1 -1
- package/src/lib/nx-plugin/src/executors/vite/compat.js +6 -7
- 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 +1 -1
- package/src/lib/nx-plugin/src/executors/vite-dev-server/compat.js +6 -7
- 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 +1 -1
- package/src/lib/nx-plugin/src/executors/vitest/compat.js +6 -7
- 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 -3
- package/src/lib/nx-plugin/src/generators/app/compat.js +17 -7
- 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 -2
- 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 -20
- 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 -20
- 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 -11
- package/src/lib/nx-plugin/src/generators/app/generator.d.ts +11 -11
- package/src/lib/nx-plugin/src/generators/app/generator.js +78 -92
- 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 -81
- 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 +18 -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 +4 -5
- package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.js +61 -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 -18
- 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 +2 -3
- 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 +1 -6
- package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.d.ts +12 -17
- package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.js +11 -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 +11 -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 -3
- package/src/lib/nx-plugin/src/generators/init/compat.js +17 -7
- package/src/lib/nx-plugin/src/generators/init/compat.js.map +1 -1
- package/src/lib/nx-plugin/src/generators/init/files/vite.config.ts__template__ +2 -6
- package/src/lib/nx-plugin/src/generators/init/generator.d.ts +3 -3
- package/src/lib/nx-plugin/src/generators/init/generator.js +54 -65
- 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 -21
- 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 -66
- 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 -21
- 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 -15
- 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 -31
- 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 -51
- 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 -34
- 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 -20
- 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/__snapshots__/generator.spec.ts.snap +0 -7
- 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/files/__fileName__.page.ts__template__ +0 -1
- package/src/lib/nx-plugin/src/generators/page/generator.d.ts +3 -4
- package/src/lib/nx-plugin/src/generators/page/generator.js +34 -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 -4
- 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 -3
- package/src/lib/nx-plugin/src/generators/setup-vitest/compat.js +17 -7
- 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/files/vite.config.mts__template__ +0 -6
- 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 +32 -42
- 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 -27
- 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 -22
- 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 -2
- package/src/lib/nx-plugin/src/utils/version-utils.d.ts +1 -1
- package/src/lib/nx-plugin/src/utils/version-utils.js +20 -27
- 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.d.ts +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.d.ts +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 +8 -8
- 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 +198 -80
- package/src/lib/platform-plugin.d.ts +2 -2
- package/src/lib/platform-plugin.js +88 -62
- 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 +45 -0
- package/src/lib/route-generation-plugin.js.map +1 -0
- package/src/lib/route-idiom-diagnostics.d.ts +13 -0
- package/src/lib/route-idiom-diagnostics.js +160 -0
- package/src/lib/route-idiom-diagnostics.js.map +1 -0
- package/src/lib/route-manifest.d.ts +122 -0
- package/src/lib/route-manifest.js +431 -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 +234 -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/style-pipeline.d.ts +34 -0
- package/src/lib/style-pipeline.js +32 -0
- package/src/lib/style-pipeline.js.map +1 -0
- package/src/lib/style-preprocessor.d.ts +28 -0
- package/src/lib/style-preprocessor.js +35 -0
- package/src/lib/style-preprocessor.js.map +1 -0
- package/src/lib/tailwind-preprocessor.d.ts +23 -0
- package/src/lib/tailwind-preprocessor.js +57 -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 +234 -0
- package/src/lib/typed-routes-plugin.js.map +1 -0
- package/src/lib/utils/debug-harness.d.ts +23 -0
- package/src/lib/utils/debug-harness.js +88 -0
- package/src/lib/utils/debug-harness.js.map +1 -0
- package/src/lib/utils/debug-log-file.d.ts +5 -0
- package/src/lib/utils/debug-log-file.js +56 -0
- package/src/lib/utils/debug-log-file.js.map +1 -0
- package/src/lib/utils/debug.d.ts +22 -0
- package/src/lib/utils/debug.js +27 -0
- package/src/lib/utils/debug.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/src/style-pipeline.d.ts +1 -0
- package/src/style-pipeline.js +2 -0
- package/src/style-preprocessor.d.ts +1 -0
- package/src/style-preprocessor.js +2 -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 -110
- 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
package/src/lib/nx-plugin/src/generators/app/files/template-angular/vite.config.ts__template__
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import analog from '@analogjs/platform';
|
|
4
4
|
import { defineConfig } from 'vite';
|
|
5
|
-
|
|
5
|
+
<% if (addTailwind) { %>
|
|
6
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
7
|
+
<% } %>
|
|
6
8
|
|
|
7
9
|
// https://vitejs.dev/config/
|
|
8
10
|
export default defineConfig(({ mode }) => {
|
|
@@ -20,8 +22,10 @@ export default defineConfig(({ mode }) => {
|
|
|
20
22
|
},
|
|
21
23
|
},
|
|
22
24
|
plugins: [
|
|
25
|
+
<% if (addTailwind) { %>
|
|
26
|
+
tailwindcss(),
|
|
27
|
+
<% } %>
|
|
23
28
|
analog(),
|
|
24
|
-
nxViteTsPaths(),
|
|
25
29
|
],
|
|
26
30
|
test: {
|
|
27
31
|
globals: true,
|
|
@@ -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
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import analog from '@analogjs/platform';
|
|
4
4
|
import { defineConfig, Plugin } from 'vite';
|
|
5
|
-
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
6
5
|
<% if (addTailwind) { %>
|
|
7
|
-
// @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
|
|
8
6
|
import tailwindcss from '@tailwindcss/vite';
|
|
9
7
|
<% } %>
|
|
10
8
|
|
|
@@ -14,11 +12,6 @@ export default defineConfig(({ mode }) => {
|
|
|
14
12
|
root: __dirname,
|
|
15
13
|
publicDir: 'src/public',
|
|
16
14
|
cacheDir: `<%= offsetFromRoot %>node_modules/.vite`,
|
|
17
|
-
<% if (addTRPC) { %>
|
|
18
|
-
ssr: {
|
|
19
|
-
noExternal: ['@analogjs/trpc','@trpc/server'],
|
|
20
|
-
},
|
|
21
|
-
<% } %>
|
|
22
15
|
build: {
|
|
23
16
|
outDir: '<%= offsetFromRoot %>dist/<%= projectRoot %>/client',
|
|
24
17
|
reportCompressedSize: true,
|
|
@@ -33,20 +26,7 @@ export default defineConfig(({ mode }) => {
|
|
|
33
26
|
<% if (addTailwind) { %>
|
|
34
27
|
tailwindcss(),
|
|
35
28
|
<% } %>
|
|
36
|
-
<% if (addTRPC) { %>
|
|
37
|
-
analog({
|
|
38
|
-
nitro: {
|
|
39
|
-
routeRules: {
|
|
40
|
-
'/': {
|
|
41
|
-
prerender: false,
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}),
|
|
46
|
-
<% } else { %>
|
|
47
29
|
analog(),
|
|
48
|
-
<% } %>
|
|
49
|
-
nxViteTsPaths(),
|
|
50
30
|
],
|
|
51
31
|
test: {
|
|
52
32
|
globals: true,
|
|
@@ -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,
|
package/src/lib/nx-plugin/src/generators/app/files/template-angular-v18/vite.config.ts__template__
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import analog from '@analogjs/platform';
|
|
4
4
|
import { defineConfig, Plugin } from 'vite';
|
|
5
|
-
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
6
5
|
<% if (addTailwind) { %>
|
|
7
|
-
// @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
|
|
8
6
|
import tailwindcss from '@tailwindcss/vite';
|
|
9
7
|
<% } %>
|
|
10
8
|
|
|
@@ -13,11 +11,6 @@ export default defineConfig(({ mode }) => {
|
|
|
13
11
|
return {
|
|
14
12
|
root: __dirname,
|
|
15
13
|
cacheDir: `<%= offsetFromRoot %>node_modules/.vite`,
|
|
16
|
-
<% if (addTRPC) { %>
|
|
17
|
-
ssr: {
|
|
18
|
-
noExternal: ['@analogjs/trpc','@trpc/server'],
|
|
19
|
-
},
|
|
20
|
-
<% } %>
|
|
21
14
|
build: {
|
|
22
15
|
outDir: '<%= offsetFromRoot %>dist/<%= projectRoot %>/client',
|
|
23
16
|
reportCompressedSize: true,
|
|
@@ -32,20 +25,7 @@ export default defineConfig(({ mode }) => {
|
|
|
32
25
|
<% if (addTailwind) { %>
|
|
33
26
|
tailwindcss(),
|
|
34
27
|
<% } %>
|
|
35
|
-
<% if (addTRPC) { %>
|
|
36
|
-
analog({
|
|
37
|
-
nitro: {
|
|
38
|
-
routeRules: {
|
|
39
|
-
'/': {
|
|
40
|
-
prerender: false,
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}),
|
|
45
|
-
<% } else { %>
|
|
46
28
|
analog(),
|
|
47
|
-
<% } %>
|
|
48
|
-
nxViteTsPaths(),
|
|
49
29
|
],
|
|
50
30
|
test: {
|
|
51
31
|
globals: true,
|
|
@@ -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-v19/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-v19/vite.config.ts__template__
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import analog from '@analogjs/platform';
|
|
4
4
|
import { defineConfig } from 'vite';
|
|
5
|
-
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
6
5
|
<% if (addTailwind) { %>
|
|
7
|
-
// @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
|
|
8
6
|
import tailwindcss from '@tailwindcss/vite';
|
|
9
7
|
<% } %>
|
|
10
8
|
|
|
@@ -27,16 +25,7 @@ export default defineConfig(({ mode }) => {
|
|
|
27
25
|
<% if (addTailwind) { %>
|
|
28
26
|
tailwindcss(),
|
|
29
27
|
<% } %>
|
|
30
|
-
<% if (addTRPC) { %>
|
|
31
|
-
analog({
|
|
32
|
-
prerender: {
|
|
33
|
-
routes: []
|
|
34
|
-
}
|
|
35
|
-
}),
|
|
36
|
-
<% } else { %>
|
|
37
28
|
analog(),
|
|
38
|
-
<% } %>
|
|
39
|
-
nxViteTsPaths(),
|
|
40
29
|
],
|
|
41
30
|
test: {
|
|
42
31
|
globals: true,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { names, Tree } from
|
|
2
|
-
import { AnalogNxApplicationGeneratorOptions } from
|
|
1
|
+
import { names, Tree } from "@nx/devkit";
|
|
2
|
+
import { AnalogNxApplicationGeneratorOptions } from "./schema";
|
|
3
3
|
export interface NormalizedOptions extends AnalogNxApplicationGeneratorOptions, ReturnType<typeof names> {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
projectName: string;
|
|
5
|
+
projectRoot: string;
|
|
6
|
+
projectDirectory: string;
|
|
7
|
+
parsedTags: string[];
|
|
8
|
+
offsetFromRoot: string;
|
|
9
|
+
appsDir: string;
|
|
10
|
+
nxPackageNamespace: string;
|
|
11
|
+
isNx: boolean;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
declare function appGenerator(tree: Tree, options: AnalogNxApplicationGeneratorOptions): Promise<() => void>;
|
|
14
14
|
export default appGenerator;
|
|
@@ -1,97 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const cleanup_files_1 = require("./lib/cleanup-files");
|
|
16
|
-
const add_analog_project_config_1 = require("./lib/add-analog-project-config");
|
|
17
|
-
const update_index_html_1 = require("./lib/update-index-html");
|
|
1
|
+
const require_version_utils = require("../../utils/version-utils.js");
|
|
2
|
+
const require_add_home_page = require("./lib/add-home-page.js");
|
|
3
|
+
const require_minimum_supported_versions = require("./versions/minimum-supported-versions.js");
|
|
4
|
+
const require_add_angular_app = require("./lib/add-angular-app.js");
|
|
5
|
+
const require_src_generators_init_generator = require("../init/generator.js");
|
|
6
|
+
const require_add_files = require("./lib/add-files.js");
|
|
7
|
+
const require_add_tailwind_config = require("./lib/add-tailwind-config.js");
|
|
8
|
+
const require_cleanup_files = require("./lib/cleanup-files.js");
|
|
9
|
+
const require_add_analog_project_config = require("./lib/add-analog-project-config.js");
|
|
10
|
+
const require_update_index_html = require("./lib/update-index-html.js");
|
|
11
|
+
let _nx_devkit = require("@nx/devkit");
|
|
12
|
+
let _nx_devkit_ngcli_adapter = require("@nx/devkit/ngcli-adapter");
|
|
13
|
+
let semver = require("semver");
|
|
14
|
+
//#region packages/nx-plugin/src/generators/app/generator.ts
|
|
18
15
|
function normalizeOptions(tree, options) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
isNx,
|
|
43
|
-
};
|
|
16
|
+
const isNx = tree.exists("/nx.json");
|
|
17
|
+
const appsDir = isNx ? (0, _nx_devkit.getWorkspaceLayout)(tree).appsDir : "projects";
|
|
18
|
+
const allNames = (0, _nx_devkit.names)(options.analogAppName);
|
|
19
|
+
const projectDirectory = allNames.fileName;
|
|
20
|
+
const projectName = projectDirectory.replace(/* @__PURE__ */ new RegExp("/", "g"), "-");
|
|
21
|
+
const projectRoot = `${appsDir}/${projectDirectory}`;
|
|
22
|
+
const parsedTags = options.tags ? options.tags.split(",").map((s) => s.trim()) : [];
|
|
23
|
+
const offsetFromRoot = (0, _nx_devkit.offsetFromRoot)(projectRoot);
|
|
24
|
+
const nxPackageNamespace = "@nx";
|
|
25
|
+
const addTailwind = options.addTailwind ?? true;
|
|
26
|
+
return {
|
|
27
|
+
...options,
|
|
28
|
+
...allNames,
|
|
29
|
+
projectName,
|
|
30
|
+
projectRoot,
|
|
31
|
+
projectDirectory,
|
|
32
|
+
parsedTags,
|
|
33
|
+
offsetFromRoot,
|
|
34
|
+
appsDir,
|
|
35
|
+
nxPackageNamespace,
|
|
36
|
+
addTailwind,
|
|
37
|
+
isNx
|
|
38
|
+
};
|
|
44
39
|
}
|
|
45
40
|
async function appGenerator(tree, options) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if (normalizedOptions.addTailwind) {
|
|
85
|
-
await (0, add_tailwind_config_1.addTailwindConfig)(tree, normalizedOptions.projectName);
|
|
86
|
-
}
|
|
87
|
-
(0, add_home_page_1.addHomePage)(tree, normalizedOptions, majorAngularVersion);
|
|
88
|
-
(0, cleanup_files_1.cleanupFiles)(tree, normalizedOptions);
|
|
89
|
-
if (!normalizedOptions.skipFormat) {
|
|
90
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
91
|
-
}
|
|
92
|
-
return () => {
|
|
93
|
-
(0, devkit_1.installPackagesTask)(tree);
|
|
94
|
-
};
|
|
41
|
+
const nxVersion = require_version_utils.getInstalledPackageVersion(tree, "nx");
|
|
42
|
+
if (nxVersion && require_minimum_supported_versions.belowMinimumSupportedNxVersion(nxVersion)) throw new Error(_nx_devkit.stripIndents`Nx v17.0.0 or newer is required to install Analog`);
|
|
43
|
+
const normalizedOptions = normalizeOptions(tree, options);
|
|
44
|
+
if (nxVersion) await require_add_angular_app.addAngularApp(tree, normalizedOptions);
|
|
45
|
+
else {
|
|
46
|
+
await (0, _nx_devkit_ngcli_adapter.wrapAngularDevkitSchematic)("@schematics/angular", "application")(tree, {
|
|
47
|
+
projectRoot: normalizedOptions.projectRoot,
|
|
48
|
+
name: normalizedOptions.analogAppName
|
|
49
|
+
});
|
|
50
|
+
require_add_analog_project_config.addAnalogProjectConfig(tree, normalizedOptions.projectRoot, normalizedOptions.projectName, normalizedOptions.parsedTags, normalizedOptions.name, normalizedOptions.appsDir, normalizedOptions.nxPackageNamespace);
|
|
51
|
+
}
|
|
52
|
+
await require_src_generators_init_generator(tree, {
|
|
53
|
+
project: normalizedOptions.analogAppName,
|
|
54
|
+
vitest: true
|
|
55
|
+
});
|
|
56
|
+
const angularVersion = require_version_utils.getInstalledPackageVersion(tree, "@angular/core");
|
|
57
|
+
const coercedAngularVersion = (0, semver.coerce)(angularVersion ?? "");
|
|
58
|
+
if (!coercedAngularVersion) throw new Error("Could not determine installed Angular version.");
|
|
59
|
+
const majorAngularVersion = (0, semver.major)(coercedAngularVersion);
|
|
60
|
+
require_add_files.addFiles(tree, normalizedOptions, majorAngularVersion);
|
|
61
|
+
(0, _nx_devkit.addDependenciesToPackageJson)(tree, {
|
|
62
|
+
"front-matter": "^4.0.2",
|
|
63
|
+
marked: "^18.0.0",
|
|
64
|
+
mermaid: "^10.2.4",
|
|
65
|
+
prismjs: "^1.29.0"
|
|
66
|
+
}, {});
|
|
67
|
+
(0, _nx_devkit.updateJson)(tree, "/package.json", (json) => {
|
|
68
|
+
json.dependencies["@angular/platform-server"] = `~${angularVersion}`;
|
|
69
|
+
return json;
|
|
70
|
+
});
|
|
71
|
+
require_update_index_html.updateIndex(tree, normalizedOptions.analogAppName);
|
|
72
|
+
if (normalizedOptions.addTailwind) await require_add_tailwind_config.addTailwindConfig(tree, normalizedOptions.projectName);
|
|
73
|
+
require_add_home_page.addHomePage(tree, normalizedOptions, majorAngularVersion);
|
|
74
|
+
require_cleanup_files.cleanupFiles(tree, normalizedOptions);
|
|
75
|
+
if (!normalizedOptions.skipFormat) await (0, _nx_devkit.formatFiles)(tree);
|
|
76
|
+
return () => {
|
|
77
|
+
(0, _nx_devkit.installPackagesTask)(tree);
|
|
78
|
+
};
|
|
95
79
|
}
|
|
96
|
-
|
|
80
|
+
//#endregion
|
|
81
|
+
module.exports = appGenerator;
|
|
82
|
+
|
|
97
83
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","
|
|
1
|
+
{"version":3,"file":"generator.js","names":[],"sources":["../../../../../../../../nx-plugin/src/generators/app/generator.ts"],"sourcesContent":["import {\n formatFiles,\n getWorkspaceLayout,\n installPackagesTask,\n names,\n offsetFromRoot as determineOffsetFromRoot,\n stripIndents,\n Tree,\n addDependenciesToPackageJson,\n updateJson,\n} from '@nx/devkit';\nimport { wrapAngularDevkitSchematic } from '@nx/devkit/ngcli-adapter';\nimport { AnalogNxApplicationGeneratorOptions } from './schema';\nimport { major, coerce } from 'semver';\nimport { getInstalledPackageVersion } from '../../utils/version-utils';\nimport { addHomePage } from './lib/add-home-page';\nimport { belowMinimumSupportedNxVersion } from './versions/minimum-supported-versions';\nimport { addAngularApp } from './lib/add-angular-app';\nimport setupAnalogGenerator from '../init/generator';\nimport { addFiles } from './lib/add-files';\nimport { addTailwindConfig } from './lib/add-tailwind-config';\nimport { cleanupFiles } from './lib/cleanup-files';\nimport { addAnalogProjectConfig } from './lib/add-analog-project-config';\nimport { updateIndex } from './lib/update-index-html';\n\nexport interface NormalizedOptions\n extends AnalogNxApplicationGeneratorOptions, ReturnType<typeof names> {\n projectName: string;\n projectRoot: string;\n projectDirectory: string;\n parsedTags: string[];\n offsetFromRoot: string;\n appsDir: string;\n nxPackageNamespace: string;\n isNx: boolean;\n}\n\nfunction normalizeOptions(\n tree: Tree,\n options: AnalogNxApplicationGeneratorOptions,\n): NormalizedOptions {\n const isNx = tree.exists('/nx.json');\n const appsDir = isNx ? getWorkspaceLayout(tree).appsDir : 'projects';\n const allNames = names(options.analogAppName);\n const projectDirectory = allNames.fileName;\n const projectName = projectDirectory.replace(new RegExp('/', 'g'), '-');\n const projectRoot = `${appsDir}/${projectDirectory}`;\n const parsedTags = options.tags\n ? options.tags.split(',').map((s) => s.trim())\n : [];\n const offsetFromRoot = determineOffsetFromRoot(projectRoot);\n const nxPackageNamespace = '@nx';\n const addTailwind = options.addTailwind ?? true;\n\n return {\n ...options,\n ...allNames,\n projectName,\n projectRoot,\n projectDirectory,\n parsedTags,\n offsetFromRoot,\n appsDir,\n nxPackageNamespace,\n addTailwind,\n isNx,\n };\n}\n\nasync function appGenerator(\n tree: Tree,\n options: AnalogNxApplicationGeneratorOptions,\n): Promise<() => void> {\n const nxVersion = getInstalledPackageVersion(tree, 'nx');\n\n if (nxVersion && belowMinimumSupportedNxVersion(nxVersion)) {\n throw new Error(\n stripIndents`Nx v17.0.0 or newer is required to install Analog`,\n );\n }\n\n const normalizedOptions = normalizeOptions(tree, options);\n\n if (nxVersion) {\n await addAngularApp(tree, normalizedOptions);\n } else {\n const angularAppSchematic = wrapAngularDevkitSchematic(\n '@schematics/angular',\n 'application',\n );\n await angularAppSchematic(tree, {\n projectRoot: normalizedOptions.projectRoot,\n name: normalizedOptions.analogAppName,\n });\n addAnalogProjectConfig(\n tree,\n normalizedOptions.projectRoot,\n normalizedOptions.projectName,\n normalizedOptions.parsedTags,\n normalizedOptions.name,\n normalizedOptions.appsDir,\n normalizedOptions.nxPackageNamespace,\n );\n }\n\n await setupAnalogGenerator(tree, {\n project: normalizedOptions.analogAppName,\n vitest: true,\n });\n\n const angularVersion = getInstalledPackageVersion(tree, '@angular/core');\n const coercedAngularVersion = coerce(angularVersion ?? '');\n if (!coercedAngularVersion) {\n throw new Error('Could not determine installed Angular version.');\n }\n const majorAngularVersion = major(coercedAngularVersion);\n addFiles(tree, normalizedOptions, majorAngularVersion);\n addDependenciesToPackageJson(\n tree,\n {\n 'front-matter': '^4.0.2',\n marked: '^18.0.0',\n mermaid: '^10.2.4',\n prismjs: '^1.29.0',\n },\n {},\n );\n\n updateJson<{ dependencies: Record<string, string> }>(\n tree,\n '/package.json',\n (json) => {\n json.dependencies['@angular/platform-server'] = `~${angularVersion}`;\n\n return json;\n },\n );\n\n updateIndex(tree, normalizedOptions.analogAppName);\n\n if (normalizedOptions.addTailwind) {\n await addTailwindConfig(tree, normalizedOptions.projectName);\n }\n\n addHomePage(tree, normalizedOptions, majorAngularVersion);\n\n cleanupFiles(tree, normalizedOptions);\n\n if (!normalizedOptions.skipFormat) {\n await formatFiles(tree);\n }\n\n return () => {\n installPackagesTask(tree);\n };\n}\n\nexport default appGenerator;\n"],"mappings":";;;;;;;;;;;;;;AAqCA,SAAS,iBACP,MACA,SACmB;CACnB,MAAM,OAAO,KAAK,OAAO,WAAW;CACpC,MAAM,UAAU,QAAA,GAAA,WAAA,oBAA0B,KAAK,CAAC,UAAU;CAC1D,MAAM,YAAA,GAAA,WAAA,OAAiB,QAAQ,cAAc;CAC7C,MAAM,mBAAmB,SAAS;CAClC,MAAM,cAAc,iBAAiB,wBAAQ,IAAI,OAAO,KAAK,IAAI,EAAE,IAAI;CACvE,MAAM,cAAc,GAAG,QAAQ,GAAG;CAClC,MAAM,aAAa,QAAQ,OACvB,QAAQ,KAAK,MAAM,IAAI,CAAC,KAAK,MAAM,EAAE,MAAM,CAAC,GAC5C,EAAE;CACN,MAAM,kBAAA,GAAA,WAAA,gBAAyC,YAAY;CAC3D,MAAM,qBAAqB;CAC3B,MAAM,cAAc,QAAQ,eAAe;AAE3C,QAAO;EACL,GAAG;EACH,GAAG;EACH;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;;AAGH,eAAe,aACb,MACA,SACqB;CACrB,MAAM,YAAY,sBAAA,2BAA2B,MAAM,KAAK;AAExD,KAAI,aAAa,mCAAA,+BAA+B,UAAU,CACxD,OAAM,IAAI,MACR,WAAA,YAAY,oDACb;CAGH,MAAM,oBAAoB,iBAAiB,MAAM,QAAQ;AAEzD,KAAI,UACF,OAAM,wBAAA,cAAc,MAAM,kBAAkB;MACvC;AAKL,SAAA,GAAA,yBAAA,4BAHE,uBACA,cACD,CACyB,MAAM;GAC9B,aAAa,kBAAkB;GAC/B,MAAM,kBAAkB;GACzB,CAAC;AACF,oCAAA,uBACE,MACA,kBAAkB,aAClB,kBAAkB,aAClB,kBAAkB,YAClB,kBAAkB,MAClB,kBAAkB,SAClB,kBAAkB,mBACnB;;AAGH,OAAM,sCAAqB,MAAM;EAC/B,SAAS,kBAAkB;EAC3B,QAAQ;EACT,CAAC;CAEF,MAAM,iBAAiB,sBAAA,2BAA2B,MAAM,gBAAgB;CACxE,MAAM,yBAAA,GAAA,OAAA,QAA+B,kBAAkB,GAAG;AAC1D,KAAI,CAAC,sBACH,OAAM,IAAI,MAAM,iDAAiD;CAEnE,MAAM,uBAAA,GAAA,OAAA,OAA4B,sBAAsB;AACxD,mBAAA,SAAS,MAAM,mBAAmB,oBAAoB;AACtD,EAAA,GAAA,WAAA,8BACE,MACA;EACE,gBAAgB;EAChB,QAAQ;EACR,SAAS;EACT,SAAS;EACV,EACD,EAAE,CACH;AAED,EAAA,GAAA,WAAA,YACE,MACA,kBACC,SAAS;AACR,OAAK,aAAa,8BAA8B,IAAI;AAEpD,SAAO;GAEV;AAED,2BAAA,YAAY,MAAM,kBAAkB,cAAc;AAElD,KAAI,kBAAkB,YACpB,OAAM,4BAAA,kBAAkB,MAAM,kBAAkB,YAAY;AAG9D,uBAAA,YAAY,MAAM,mBAAmB,oBAAoB;AAEzD,uBAAA,aAAa,MAAM,kBAAkB;AAErC,KAAI,CAAC,kBAAkB,WACrB,QAAA,GAAA,WAAA,aAAkB,KAAK;AAGzB,cAAa;AACX,GAAA,GAAA,WAAA,qBAAoB,KAAK"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Tree } from
|
|
1
|
+
import { Tree } from "@nx/devkit";
|
|
2
2
|
export declare function addAnalogDependencies(tree: Tree, nxVersion: string, angularVersion: string): Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Tree } from
|
|
1
|
+
import type { Tree } from "@nx/devkit";
|
|
2
2
|
export declare function addAnalogProjectConfig(tree: Tree, projectRoot: string, projectName: string, parsedTags: string[], name: string, appsDir: string, nxPackageNamespace: string): void;
|