@analogjs/platform 3.0.0-alpha.54 → 3.0.0-alpha.56

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.
Files changed (144) hide show
  1. package/migrations/migration.json +7 -1
  2. package/package.json +8 -5
  3. package/src/index.d.ts +2 -0
  4. package/src/index.js +2 -1
  5. package/src/index.js.map +1 -1
  6. package/src/lib/deps-plugin.js +2 -5
  7. package/src/lib/deps-plugin.js.map +1 -1
  8. package/src/lib/discover-library-routes.d.ts +9 -0
  9. package/src/lib/discover-library-routes.js +12 -1
  10. package/src/lib/discover-library-routes.js.map +1 -1
  11. package/src/lib/nitro/analog-nitro-plugin.d.ts +8 -0
  12. package/src/lib/nitro/analog-nitro-plugin.js +502 -0
  13. package/src/lib/nitro/analog-nitro-plugin.js.map +1 -0
  14. package/src/lib/nitro/angular-linker-plugin.d.ts +17 -0
  15. package/src/lib/nitro/angular-linker-plugin.js +51 -0
  16. package/src/lib/nitro/angular-linker-plugin.js.map +1 -0
  17. package/src/lib/nitro/build-sitemap.d.ts +23 -0
  18. package/src/lib/nitro/build-sitemap.js +137 -0
  19. package/src/lib/nitro/build-sitemap.js.map +1 -0
  20. package/src/lib/nitro/debug.d.ts +5 -0
  21. package/src/lib/nitro/debug.js +11 -0
  22. package/src/lib/nitro/debug.js.map +1 -0
  23. package/src/lib/nitro/get-content-files.d.ts +13 -0
  24. package/src/lib/nitro/get-content-files.js +52 -0
  25. package/src/lib/nitro/get-content-files.js.map +1 -0
  26. package/src/lib/nitro/get-page-handlers.d.ts +23 -0
  27. package/src/lib/nitro/get-page-handlers.js +34 -0
  28. package/src/lib/nitro/get-page-handlers.js.map +1 -0
  29. package/src/lib/nitro/i18n-prerender.d.ts +29 -0
  30. package/src/lib/nitro/i18n-prerender.js +61 -0
  31. package/src/lib/nitro/i18n-prerender.js.map +1 -0
  32. package/src/lib/nitro/page-endpoints-plugin.d.ts +7 -0
  33. package/src/lib/nitro/page-endpoints-plugin.js +72 -0
  34. package/src/lib/nitro/page-endpoints-plugin.js.map +1 -0
  35. package/src/lib/nitro/post-rendering-hook.d.ts +2 -0
  36. package/src/lib/nitro/post-rendering-hook.js +10 -0
  37. package/src/lib/nitro/post-rendering-hook.js.map +1 -0
  38. package/src/lib/nitro/renderers.d.ts +53 -0
  39. package/src/lib/nitro/renderers.js +22 -0
  40. package/src/lib/nitro/renderers.js.map +1 -0
  41. package/src/lib/nitro/types.d.ts +122 -0
  42. package/src/lib/nx-plugin/_virtual/_rolldown/runtime.js +23 -0
  43. package/src/lib/nx-plugin/builders.json +10 -2
  44. package/src/lib/nx-plugin/executors.json +10 -7
  45. package/src/lib/nx-plugin/src/builders/vite/schema.json +39 -0
  46. package/src/lib/nx-plugin/src/builders/vite/vite-build.d.ts +11 -0
  47. package/src/lib/nx-plugin/src/builders/vite/vite-build.js +18 -0
  48. package/src/lib/nx-plugin/src/builders/vite/vite-build.js.map +1 -0
  49. package/src/lib/nx-plugin/src/builders/vite-dev-server/dev-server.d.ts +7 -0
  50. package/src/lib/nx-plugin/src/builders/vite-dev-server/dev-server.js +14 -0
  51. package/src/lib/nx-plugin/src/builders/vite-dev-server/dev-server.js.map +1 -0
  52. package/src/lib/nx-plugin/src/builders/vite-dev-server/schema.json +27 -0
  53. package/src/lib/nx-plugin/src/executors/vite-dev-server/compat.js +1 -0
  54. package/src/lib/nx-plugin/src/executors/vite-dev-server/compat.js.map +1 -1
  55. package/src/lib/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.js +1 -0
  56. package/src/lib/nx-plugin/src/executors/vite-dev-server/vite-dev-server.impl.js.map +1 -1
  57. package/src/lib/nx-plugin/src/executors/vitest/compat.js +1 -0
  58. package/src/lib/nx-plugin/src/executors/vitest/compat.js.map +1 -1
  59. package/src/lib/nx-plugin/src/executors/vitest/vitest.impl.js +1 -0
  60. package/src/lib/nx-plugin/src/executors/vitest/vitest.impl.js.map +1 -1
  61. package/src/lib/nx-plugin/src/generators/app/compat.js +1 -0
  62. package/src/lib/nx-plugin/src/generators/app/compat.js.map +1 -1
  63. package/src/lib/nx-plugin/src/generators/app/generator.js +1 -0
  64. package/src/lib/nx-plugin/src/generators/app/generator.js.map +1 -1
  65. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.js +1 -0
  66. package/src/lib/nx-plugin/src/generators/app/lib/add-analog-project-config.js.map +1 -1
  67. package/src/lib/nx-plugin/src/generators/app/lib/add-angular-app.js +1 -0
  68. package/src/lib/nx-plugin/src/generators/app/lib/add-angular-app.js.map +1 -1
  69. package/src/lib/nx-plugin/src/generators/app/lib/add-files.js +1 -0
  70. package/src/lib/nx-plugin/src/generators/app/lib/add-files.js.map +1 -1
  71. package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.js +1 -0
  72. package/src/lib/nx-plugin/src/generators/app/lib/add-home-page.js.map +1 -1
  73. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.js +1 -0
  74. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-config.js.map +1 -1
  75. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.js +1 -0
  76. package/src/lib/nx-plugin/src/generators/app/lib/add-tailwind-helpers.js.map +1 -1
  77. package/src/lib/nx-plugin/src/generators/app/lib/update-index-html.js +1 -0
  78. package/src/lib/nx-plugin/src/generators/app/lib/update-index-html.js.map +1 -1
  79. package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.js +1 -0
  80. package/src/lib/nx-plugin/src/generators/app/versions/minimum-supported-versions.js.map +1 -1
  81. package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.d.ts +5 -5
  82. package/src/lib/nx-plugin/src/generators/app/versions/nx_18_X/versions.js.map +1 -1
  83. package/src/lib/nx-plugin/src/generators/init/compat.js +1 -0
  84. package/src/lib/nx-plugin/src/generators/init/compat.js.map +1 -1
  85. package/src/lib/nx-plugin/src/generators/init/generator.js +1 -0
  86. package/src/lib/nx-plugin/src/generators/init/generator.js.map +1 -1
  87. package/src/lib/nx-plugin/src/generators/init/lib/add-analog-dependencies.js +1 -0
  88. package/src/lib/nx-plugin/src/generators/init/lib/add-analog-dependencies.js.map +1 -1
  89. package/src/lib/nx-plugin/src/generators/init/lib/update-app-tsconfig.js +1 -0
  90. package/src/lib/nx-plugin/src/generators/init/lib/update-app-tsconfig.js.map +1 -1
  91. package/src/lib/nx-plugin/src/generators/init/lib/update-build-target.js +1 -0
  92. package/src/lib/nx-plugin/src/generators/init/lib/update-build-target.js.map +1 -1
  93. package/src/lib/nx-plugin/src/generators/init/lib/update-index-html.js +1 -0
  94. package/src/lib/nx-plugin/src/generators/init/lib/update-index-html.js.map +1 -1
  95. package/src/lib/nx-plugin/src/generators/init/lib/update-main.js +1 -0
  96. package/src/lib/nx-plugin/src/generators/init/lib/update-main.js.map +1 -1
  97. package/src/lib/nx-plugin/src/generators/init/lib/update-package-json.js +1 -0
  98. package/src/lib/nx-plugin/src/generators/init/lib/update-package-json.js.map +1 -1
  99. package/src/lib/nx-plugin/src/generators/init/lib/update-serve-target.js +1 -0
  100. package/src/lib/nx-plugin/src/generators/init/lib/update-serve-target.js.map +1 -1
  101. package/src/lib/nx-plugin/src/generators/init/lib/update-test-target.js +1 -0
  102. package/src/lib/nx-plugin/src/generators/init/lib/update-test-target.js.map +1 -1
  103. package/src/lib/nx-plugin/src/generators/init/lib/update-test-tsconfig.js +1 -0
  104. package/src/lib/nx-plugin/src/generators/init/lib/update-test-tsconfig.js.map +1 -1
  105. package/src/lib/nx-plugin/src/generators/page/compat.js +1 -0
  106. package/src/lib/nx-plugin/src/generators/page/compat.js.map +1 -1
  107. package/src/lib/nx-plugin/src/generators/page/generator.js +1 -0
  108. package/src/lib/nx-plugin/src/generators/page/generator.js.map +1 -1
  109. package/src/lib/nx-plugin/src/generators/preset/generator.js +1 -0
  110. package/src/lib/nx-plugin/src/generators/preset/generator.js.map +1 -1
  111. package/src/lib/nx-plugin/src/generators/setup-vitest/compat.js +1 -0
  112. package/src/lib/nx-plugin/src/generators/setup-vitest/compat.js.map +1 -1
  113. package/src/lib/nx-plugin/src/generators/setup-vitest/generator.js +1 -0
  114. package/src/lib/nx-plugin/src/generators/setup-vitest/generator.js.map +1 -1
  115. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/add-analog-dependencies.js +1 -0
  116. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/add-analog-dependencies.js.map +1 -1
  117. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-test-target.js +1 -0
  118. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-test-target.js.map +1 -1
  119. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-tsconfig.js +1 -0
  120. package/src/lib/nx-plugin/src/generators/setup-vitest/lib/update-tsconfig.js.map +1 -1
  121. package/src/lib/nx-plugin/src/utils/version-utils.js +1 -0
  122. package/src/lib/nx-plugin/src/utils/version-utils.js.map +1 -1
  123. package/src/lib/nx-plugin/src/utils/versions/dependencies.js +1 -0
  124. package/src/lib/nx-plugin/src/utils/versions/dependencies.js.map +1 -1
  125. package/src/lib/nx-plugin/src/utils/versions/dev-dependencies.js +1 -0
  126. package/src/lib/nx-plugin/src/utils/versions/dev-dependencies.js.map +1 -1
  127. package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.d.ts +5 -5
  128. package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.js +5 -5
  129. package/src/lib/nx-plugin/src/utils/versions/ng_19_X/versions.js.map +1 -1
  130. package/src/lib/options.d.ts +9 -146
  131. package/src/lib/platform-plugin.js +3 -40
  132. package/src/lib/platform-plugin.js.map +1 -1
  133. package/src/lib/style-pipeline.d.ts +0 -1
  134. package/src/lib/style-pipeline.js.map +1 -1
  135. package/src/lib/utils/debug.js +2 -2
  136. package/src/lib/utils/debug.js.map +1 -1
  137. package/src/lib/nx-plugin/src/executors/vite/compat.d.ts +0 -3
  138. package/src/lib/nx-plugin/src/executors/vite/compat.js +0 -7
  139. package/src/lib/nx-plugin/src/executors/vite/compat.js.map +0 -1
  140. package/src/lib/nx-plugin/src/executors/vite/schema.d.ts +0 -2
  141. package/src/lib/nx-plugin/src/executors/vite/schema.json +0 -147
  142. package/src/lib/nx-plugin/src/executors/vite/vite.impl.d.ts +0 -2
  143. package/src/lib/nx-plugin/src/executors/vite/vite.impl.js +0 -6
  144. package/src/lib/nx-plugin/src/executors/vite/vite.impl.js.map +0 -1
@@ -1,3 +1,4 @@
1
+ require("../../../_virtual/_rolldown/runtime.js");
1
2
  const require_versions = require("./ng_17_X/versions.js");
2
3
  const require_versions$1 = require("./ng_18_X/versions.js");
3
4
  const require_versions$2 = require("./ng_19_X/versions.js");
@@ -1 +1 @@
1
- {"version":3,"file":"dev-dependencies.js","names":[],"sources":["../../../../../../../../nx-plugin/src/utils/versions/dev-dependencies.ts"],"sourcesContent":["import { lt } from 'semver';\nimport { stripIndents } from '@nx/devkit';\nimport {\n V17_X_ANALOG_JS_PLATFORM,\n V17_X_ANALOG_JS_VITE_PLUGIN_ANGULAR,\n V17_X_ANALOG_JS_VITEST_ANGULAR,\n V17_X_JSDOM,\n V17_X_NX_VITE,\n V17_X_VITE_TSCONFIG_PATHS,\n V17_X_VITEST,\n} from './ng_17_X/versions';\nimport {\n V18_X_ANALOG_JS_PLATFORM,\n V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR,\n V18_X_NX_VITE,\n V18_X_JSDOM,\n V18_X_VITE_TSCONFIG_PATHS,\n V18_X_VITEST,\n V18_X_ANALOG_JS_VITEST_ANGULAR,\n} from './ng_18_X/versions';\nimport {\n V19_X_ANALOG_JS_PLATFORM,\n V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR,\n V19_X_ANALOG_JS_VITEST_ANGULAR,\n V19_X_NX_VITE,\n V19_X_JSDOM,\n V19_X_VITE_TSCONFIG_PATHS,\n V19_X_VITEST,\n V19_X_VITE,\n NX_X_LATEST_VITE,\n NX_X_LATEST_VITEST,\n} from './ng_19_X/versions';\n\nconst devDependencyKeys = [\n '@analogjs/platform',\n '@analogjs/vite-plugin-angular',\n 'jsdom',\n 'vite-tsconfig-paths',\n 'vitest',\n 'vite',\n '@vitest/coverage-v8',\n '@vitest/ui',\n] as const;\nexport type AnalogDevDependency = (typeof devDependencyKeys)[number];\n\nexport const getAnalogDevDependencies = (\n ngVersion: string,\n nxVersion?: string,\n): Record<AnalogDevDependency, string> => {\n const escapedNgVersion = ngVersion.replace(/[~^]/, '');\n const escapedNxVersion = nxVersion ? nxVersion.replace(/[~^]/, '') : null;\n\n const devDependencies = getDevDependencies(\n escapedNgVersion,\n escapedNxVersion,\n );\n\n return { ...devDependencies };\n};\n\nconst getDevDependencies = (\n escapedAngularVersion: string,\n escapedNxVersion: string | null,\n) => {\n // fail out for versions <17.0.0\n if (lt(escapedAngularVersion, '17.0.0')) {\n throw new Error(stripIndents`Angular v17.0.0 or newer is required.`);\n }\n\n // install 17.x deps for versions <18.0.0\n if (lt(escapedAngularVersion, '18.0.0')) {\n return {\n '@analogjs/platform': V17_X_ANALOG_JS_PLATFORM,\n '@analogjs/vite-plugin-angular': V17_X_ANALOG_JS_VITE_PLUGIN_ANGULAR,\n '@analogjs/vitest-angular': V17_X_ANALOG_JS_VITEST_ANGULAR,\n '@nx/vite': V17_X_NX_VITE,\n jsdom: V17_X_JSDOM,\n 'vite-tsconfig-paths': V17_X_VITE_TSCONFIG_PATHS,\n vite: V19_X_VITE,\n vitest: V17_X_VITEST,\n '@vitest/coverage-v8': V17_X_VITEST,\n '@vitest/ui': V17_X_VITEST,\n };\n }\n\n // install 18.x deps for versions <19.0.0\n if (lt(escapedAngularVersion, '19.0.0')) {\n return {\n '@analogjs/platform': V18_X_ANALOG_JS_PLATFORM,\n '@analogjs/vite-plugin-angular': V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR,\n '@analogjs/vitest-angular': V18_X_ANALOG_JS_VITEST_ANGULAR,\n '@nx/vite': V18_X_NX_VITE,\n jsdom: V18_X_JSDOM,\n 'vite-tsconfig-paths': V18_X_VITE_TSCONFIG_PATHS,\n vite: V19_X_VITE,\n vitest: V18_X_VITEST,\n '@vitest/coverage-v8': V18_X_VITEST,\n '@vitest/ui': V17_X_VITEST,\n };\n }\n\n // return latest 19.x deps for versions >=19.0.0\n return {\n '@analogjs/platform': V19_X_ANALOG_JS_PLATFORM,\n '@analogjs/vite-plugin-angular': V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR,\n '@analogjs/vitest-angular': V19_X_ANALOG_JS_VITEST_ANGULAR,\n '@nx/vite': V19_X_NX_VITE,\n jsdom: V19_X_JSDOM,\n 'vite-tsconfig-paths': V19_X_VITE_TSCONFIG_PATHS,\n vite:\n escapedNxVersion && lt(escapedNxVersion, '20.5.0')\n ? V19_X_VITE\n : NX_X_LATEST_VITE,\n vitest:\n lt(escapedAngularVersion, '21.0.0') ||\n (escapedNxVersion && lt(escapedNxVersion, '22.3.0'))\n ? V19_X_VITEST\n : NX_X_LATEST_VITEST,\n '@vitest/coverage-v8':\n lt(escapedAngularVersion, '21.0.0') ||\n (escapedNxVersion && lt(escapedNxVersion, '22.3.0'))\n ? V19_X_VITEST\n : NX_X_LATEST_VITEST,\n '@vitest/ui':\n lt(escapedAngularVersion, '21.0.0') ||\n (escapedNxVersion && lt(escapedNxVersion, '22.3.0'))\n ? V19_X_VITEST\n : NX_X_LATEST_VITEST,\n };\n};\n"],"mappings":";;;;;;AA6CA,IAAa,4BACX,WACA,cACwC;AASxC,QAAO,EAAE,GALe,mBAHC,UAAU,QAAQ,QAAQ,GAAG,EAC7B,YAAY,UAAU,QAAQ,QAAQ,GAAG,GAAG,KAKpE,EAE4B;;AAG/B,IAAM,sBACJ,uBACA,qBACG;AAEH,MAAA,GAAA,OAAA,IAAO,uBAAuB,SAAS,CACrC,OAAM,IAAI,MAAM,WAAA,YAAY,wCAAwC;AAItE,MAAA,GAAA,OAAA,IAAO,uBAAuB,SAAS,CACrC,QAAO;EACL,sBAAsB,iBAAA;EACtB,iCAAiC,iBAAA;EACjC,4BAA4B,iBAAA;EAC5B,YAAY,iBAAA;EACZ,OAAO,iBAAA;EACP,uBAAuB,iBAAA;EACvB,MAAM,mBAAA;EACN,QAAQ,iBAAA;EACR,uBAAuB,iBAAA;EACvB,cAAc,iBAAA;EACf;AAIH,MAAA,GAAA,OAAA,IAAO,uBAAuB,SAAS,CACrC,QAAO;EACL,sBAAsB,mBAAA;EACtB,iCAAiC,mBAAA;EACjC,4BAA4B,mBAAA;EAC5B,YAAY,mBAAA;EACZ,OAAO,mBAAA;EACP,uBAAuB,mBAAA;EACvB,MAAM,mBAAA;EACN,QAAQ,mBAAA;EACR,uBAAuB,mBAAA;EACvB,cAAc,iBAAA;EACf;AAIH,QAAO;EACL,sBAAsB,mBAAA;EACtB,iCAAiC,mBAAA;EACjC,4BAA4B,mBAAA;EAC5B,YAAY,mBAAA;EACZ,OAAO,mBAAA;EACP,uBAAuB,mBAAA;EACvB,MACE,qBAAA,GAAA,OAAA,IAAuB,kBAAkB,SAAS,GAC9C,mBAAA,aACA,mBAAA;EACN,SAAA,GAAA,OAAA,IACK,uBAAuB,SAAS,IAClC,qBAAA,GAAA,OAAA,IAAuB,kBAAkB,SAAS,GAC/C,mBAAA,eACA,mBAAA;EACN,wBAAA,GAAA,OAAA,IACK,uBAAuB,SAAS,IAClC,qBAAA,GAAA,OAAA,IAAuB,kBAAkB,SAAS,GAC/C,mBAAA,eACA,mBAAA;EACN,eAAA,GAAA,OAAA,IACK,uBAAuB,SAAS,IAClC,qBAAA,GAAA,OAAA,IAAuB,kBAAkB,SAAS,GAC/C,mBAAA,eACA,mBAAA;EACP"}
1
+ {"version":3,"file":"dev-dependencies.js","names":[],"sources":["../../../../../../../../nx-plugin/src/utils/versions/dev-dependencies.ts"],"sourcesContent":["import { lt } from 'semver';\nimport { stripIndents } from '@nx/devkit';\nimport {\n V17_X_ANALOG_JS_PLATFORM,\n V17_X_ANALOG_JS_VITE_PLUGIN_ANGULAR,\n V17_X_ANALOG_JS_VITEST_ANGULAR,\n V17_X_JSDOM,\n V17_X_NX_VITE,\n V17_X_VITE_TSCONFIG_PATHS,\n V17_X_VITEST,\n} from './ng_17_X/versions';\nimport {\n V18_X_ANALOG_JS_PLATFORM,\n V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR,\n V18_X_NX_VITE,\n V18_X_JSDOM,\n V18_X_VITE_TSCONFIG_PATHS,\n V18_X_VITEST,\n V18_X_ANALOG_JS_VITEST_ANGULAR,\n} from './ng_18_X/versions';\nimport {\n V19_X_ANALOG_JS_PLATFORM,\n V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR,\n V19_X_ANALOG_JS_VITEST_ANGULAR,\n V19_X_NX_VITE,\n V19_X_JSDOM,\n V19_X_VITE_TSCONFIG_PATHS,\n V19_X_VITEST,\n V19_X_VITE,\n NX_X_LATEST_VITE,\n NX_X_LATEST_VITEST,\n} from './ng_19_X/versions';\n\nconst devDependencyKeys = [\n '@analogjs/platform',\n '@analogjs/vite-plugin-angular',\n 'jsdom',\n 'vite-tsconfig-paths',\n 'vitest',\n 'vite',\n '@vitest/coverage-v8',\n '@vitest/ui',\n] as const;\nexport type AnalogDevDependency = (typeof devDependencyKeys)[number];\n\nexport const getAnalogDevDependencies = (\n ngVersion: string,\n nxVersion?: string,\n): Record<AnalogDevDependency, string> => {\n const escapedNgVersion = ngVersion.replace(/[~^]/, '');\n const escapedNxVersion = nxVersion ? nxVersion.replace(/[~^]/, '') : null;\n\n const devDependencies = getDevDependencies(\n escapedNgVersion,\n escapedNxVersion,\n );\n\n return { ...devDependencies };\n};\n\nconst getDevDependencies = (\n escapedAngularVersion: string,\n escapedNxVersion: string | null,\n) => {\n // fail out for versions <17.0.0\n if (lt(escapedAngularVersion, '17.0.0')) {\n throw new Error(stripIndents`Angular v17.0.0 or newer is required.`);\n }\n\n // install 17.x deps for versions <18.0.0\n if (lt(escapedAngularVersion, '18.0.0')) {\n return {\n '@analogjs/platform': V17_X_ANALOG_JS_PLATFORM,\n '@analogjs/vite-plugin-angular': V17_X_ANALOG_JS_VITE_PLUGIN_ANGULAR,\n '@analogjs/vitest-angular': V17_X_ANALOG_JS_VITEST_ANGULAR,\n '@nx/vite': V17_X_NX_VITE,\n jsdom: V17_X_JSDOM,\n 'vite-tsconfig-paths': V17_X_VITE_TSCONFIG_PATHS,\n vite: V19_X_VITE,\n vitest: V17_X_VITEST,\n '@vitest/coverage-v8': V17_X_VITEST,\n '@vitest/ui': V17_X_VITEST,\n };\n }\n\n // install 18.x deps for versions <19.0.0\n if (lt(escapedAngularVersion, '19.0.0')) {\n return {\n '@analogjs/platform': V18_X_ANALOG_JS_PLATFORM,\n '@analogjs/vite-plugin-angular': V18_X_ANALOG_JS_VITE_PLUGIN_ANGULAR,\n '@analogjs/vitest-angular': V18_X_ANALOG_JS_VITEST_ANGULAR,\n '@nx/vite': V18_X_NX_VITE,\n jsdom: V18_X_JSDOM,\n 'vite-tsconfig-paths': V18_X_VITE_TSCONFIG_PATHS,\n vite: V19_X_VITE,\n vitest: V18_X_VITEST,\n '@vitest/coverage-v8': V18_X_VITEST,\n '@vitest/ui': V17_X_VITEST,\n };\n }\n\n // return latest 19.x deps for versions >=19.0.0\n return {\n '@analogjs/platform': V19_X_ANALOG_JS_PLATFORM,\n '@analogjs/vite-plugin-angular': V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR,\n '@analogjs/vitest-angular': V19_X_ANALOG_JS_VITEST_ANGULAR,\n '@nx/vite': V19_X_NX_VITE,\n jsdom: V19_X_JSDOM,\n 'vite-tsconfig-paths': V19_X_VITE_TSCONFIG_PATHS,\n vite:\n escapedNxVersion && lt(escapedNxVersion, '20.5.0')\n ? V19_X_VITE\n : NX_X_LATEST_VITE,\n vitest:\n lt(escapedAngularVersion, '21.0.0') ||\n (escapedNxVersion && lt(escapedNxVersion, '22.3.0'))\n ? V19_X_VITEST\n : NX_X_LATEST_VITEST,\n '@vitest/coverage-v8':\n lt(escapedAngularVersion, '21.0.0') ||\n (escapedNxVersion && lt(escapedNxVersion, '22.3.0'))\n ? V19_X_VITEST\n : NX_X_LATEST_VITEST,\n '@vitest/ui':\n lt(escapedAngularVersion, '21.0.0') ||\n (escapedNxVersion && lt(escapedNxVersion, '22.3.0'))\n ? V19_X_VITEST\n : NX_X_LATEST_VITEST,\n };\n};\n"],"mappings":";;;;;;;AA6CA,IAAa,4BACX,WACA,cACwC;AASxC,QAAO,EAAE,GALe,mBAHC,UAAU,QAAQ,QAAQ,GAAG,EAC7B,YAAY,UAAU,QAAQ,QAAQ,GAAG,GAAG,KAKpE,EAE4B;;AAG/B,IAAM,sBACJ,uBACA,qBACG;AAEH,MAAA,GAAA,OAAA,IAAO,uBAAuB,SAAS,CACrC,OAAM,IAAI,MAAM,WAAA,YAAY,wCAAwC;AAItE,MAAA,GAAA,OAAA,IAAO,uBAAuB,SAAS,CACrC,QAAO;EACL,sBAAsB,iBAAA;EACtB,iCAAiC,iBAAA;EACjC,4BAA4B,iBAAA;EAC5B,YAAY,iBAAA;EACZ,OAAO,iBAAA;EACP,uBAAuB,iBAAA;EACvB,MAAM,mBAAA;EACN,QAAQ,iBAAA;EACR,uBAAuB,iBAAA;EACvB,cAAc,iBAAA;EACf;AAIH,MAAA,GAAA,OAAA,IAAO,uBAAuB,SAAS,CACrC,QAAO;EACL,sBAAsB,mBAAA;EACtB,iCAAiC,mBAAA;EACjC,4BAA4B,mBAAA;EAC5B,YAAY,mBAAA;EACZ,OAAO,mBAAA;EACP,uBAAuB,mBAAA;EACvB,MAAM,mBAAA;EACN,QAAQ,mBAAA;EACR,uBAAuB,mBAAA;EACvB,cAAc,iBAAA;EACf;AAIH,QAAO;EACL,sBAAsB,mBAAA;EACtB,iCAAiC,mBAAA;EACjC,4BAA4B,mBAAA;EAC5B,YAAY,mBAAA;EACZ,OAAO,mBAAA;EACP,uBAAuB,mBAAA;EACvB,MACE,qBAAA,GAAA,OAAA,IAAuB,kBAAkB,SAAS,GAC9C,mBAAA,aACA,mBAAA;EACN,SAAA,GAAA,OAAA,IACK,uBAAuB,SAAS,IAClC,qBAAA,GAAA,OAAA,IAAuB,kBAAkB,SAAS,GAC/C,mBAAA,eACA,mBAAA;EACN,wBAAA,GAAA,OAAA,IACK,uBAAuB,SAAS,IAClC,qBAAA,GAAA,OAAA,IAAuB,kBAAkB,SAAS,GAC/C,mBAAA,eACA,mBAAA;EACN,eAAA,GAAA,OAAA,IACK,uBAAuB,SAAS,IAClC,qBAAA,GAAA,OAAA,IAAuB,kBAAkB,SAAS,GAC/C,mBAAA,eACA,mBAAA;EACP"}
@@ -1,13 +1,13 @@
1
- export declare const V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.54";
2
- export declare const V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.54";
1
+ export declare const V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.56";
2
+ export declare const V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.56";
3
3
  export declare const V19_X_MARKED = "^18.0.0";
4
4
  export declare const V19_X_MARKED_GFM_HEADING_ID = "^4.1.1";
5
5
  export declare const V19_X_MARKED_HIGHLIGHT = "^2.2.1";
6
6
  export declare const V19_X_MARKED_MANGLE = "^1.1.10";
7
7
  export declare const V19_X_PRISMJS = "^1.29.0";
8
- export declare const V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.54";
9
- export declare const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.54";
10
- export declare const V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.54";
8
+ export declare const V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.56";
9
+ export declare const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.56";
10
+ export declare const V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.56";
11
11
  export declare const V19_X_NX_ANGULAR = "^22.0.0";
12
12
  export declare const V19_X_NX_VITE = "^22.0.0";
13
13
  export declare const V19_X_JSDOM = "^22.0.0";
@@ -1,14 +1,14 @@
1
1
  //#region packages/nx-plugin/src/utils/versions/ng_19_X/versions.ts
2
- var V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.54";
3
- var V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.54";
2
+ var V19_X_ANALOG_JS_ROUTER = "^3.0.0-alpha.56";
3
+ var V19_X_ANALOG_JS_CONTENT = "^3.0.0-alpha.56";
4
4
  var V19_X_MARKED = "^18.0.0";
5
5
  var V19_X_MARKED_GFM_HEADING_ID = "^4.1.1";
6
6
  var V19_X_MARKED_HIGHLIGHT = "^2.2.1";
7
7
  var V19_X_MARKED_MANGLE = "^1.1.10";
8
8
  var V19_X_PRISMJS = "^1.29.0";
9
- var V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.54";
10
- var V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.54";
11
- var V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.54";
9
+ var V19_X_ANALOG_JS_PLATFORM = "^3.0.0-alpha.56";
10
+ var V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = "^3.0.0-alpha.56";
11
+ var V19_X_ANALOG_JS_VITEST_ANGULAR = "^3.0.0-alpha.56";
12
12
  var V19_X_NX_VITE = "^22.0.0";
13
13
  var V19_X_JSDOM = "^22.0.0";
14
14
  var V19_X_VITE_TSCONFIG_PATHS = "^4.2.0";
@@ -1 +1 @@
1
- {"version":3,"file":"versions.js","names":[],"sources":["../../../../../../../../../nx-plugin/src/utils/versions/ng_19_X/versions.ts"],"sourcesContent":["// V19_X\nexport const V19_X_ANALOG_JS_ROUTER = '^3.0.0-alpha.54';\nexport const V19_X_ANALOG_JS_CONTENT = '^3.0.0-alpha.54';\nexport const V19_X_MARKED = '^18.0.0';\nexport const V19_X_MARKED_GFM_HEADING_ID = '^4.1.1';\nexport const V19_X_MARKED_HIGHLIGHT = '^2.2.1';\nexport const V19_X_MARKED_MANGLE = '^1.1.10';\nexport const V19_X_PRISMJS = '^1.29.0';\n\n// devDependencies\nexport const V19_X_ANALOG_JS_PLATFORM = '^3.0.0-alpha.54';\nexport const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^3.0.0-alpha.54';\nexport const V19_X_ANALOG_JS_VITEST_ANGULAR = '^3.0.0-alpha.54';\nexport const V19_X_NX_ANGULAR = '^22.0.0';\nexport const V19_X_NX_VITE = '^22.0.0';\nexport const V19_X_JSDOM = '^22.0.0';\nexport const V19_X_VITE_TSCONFIG_PATHS = '^4.2.0';\nexport const V19_X_VITEST = '^3.0.0';\nexport const V19_X_VITE = '^6.0.0';\nexport const NX_X_LATEST_VITE = '^8.0.0';\nexport const NX_X_LATEST_VITEST = '^4.0.0';\n"],"mappings":";AACA,IAAa,yBAAyB;AACtC,IAAa,0BAA0B;AACvC,IAAa,eAAe;AAC5B,IAAa,8BAA8B;AAC3C,IAAa,yBAAyB;AACtC,IAAa,sBAAsB;AACnC,IAAa,gBAAgB;AAG7B,IAAa,2BAA2B;AACxC,IAAa,sCAAsC;AACnD,IAAa,iCAAiC;AAE9C,IAAa,gBAAgB;AAC7B,IAAa,cAAc;AAC3B,IAAa,4BAA4B;AACzC,IAAa,eAAe;AAC5B,IAAa,aAAa;AAC1B,IAAa,mBAAmB;AAChC,IAAa,qBAAqB"}
1
+ {"version":3,"file":"versions.js","names":[],"sources":["../../../../../../../../../nx-plugin/src/utils/versions/ng_19_X/versions.ts"],"sourcesContent":["// V19_X\nexport const V19_X_ANALOG_JS_ROUTER = '^3.0.0-alpha.56';\nexport const V19_X_ANALOG_JS_CONTENT = '^3.0.0-alpha.56';\nexport const V19_X_MARKED = '^18.0.0';\nexport const V19_X_MARKED_GFM_HEADING_ID = '^4.1.1';\nexport const V19_X_MARKED_HIGHLIGHT = '^2.2.1';\nexport const V19_X_MARKED_MANGLE = '^1.1.10';\nexport const V19_X_PRISMJS = '^1.29.0';\n\n// devDependencies\nexport const V19_X_ANALOG_JS_PLATFORM = '^3.0.0-alpha.56';\nexport const V19_X_ANALOG_JS_VITE_PLUGIN_ANGULAR = '^3.0.0-alpha.56';\nexport const V19_X_ANALOG_JS_VITEST_ANGULAR = '^3.0.0-alpha.56';\nexport const V19_X_NX_ANGULAR = '^22.0.0';\nexport const V19_X_NX_VITE = '^22.0.0';\nexport const V19_X_JSDOM = '^22.0.0';\nexport const V19_X_VITE_TSCONFIG_PATHS = '^4.2.0';\nexport const V19_X_VITEST = '^3.0.0';\nexport const V19_X_VITE = '^6.0.0';\nexport const NX_X_LATEST_VITE = '^8.0.0';\nexport const NX_X_LATEST_VITEST = '^4.0.0';\n"],"mappings":";AACA,IAAa,yBAAyB;AACtC,IAAa,0BAA0B;AACvC,IAAa,eAAe;AAC5B,IAAa,8BAA8B;AAC3C,IAAa,yBAAyB;AACtC,IAAa,sBAAsB;AACnC,IAAa,gBAAgB;AAG7B,IAAa,2BAA2B;AACxC,IAAa,sCAAsC;AACnD,IAAa,iCAAiC;AAE9C,IAAa,gBAAgB;AAC7B,IAAa,cAAc;AAC3B,IAAa,4BAA4B;AACzC,IAAa,eAAe;AAC5B,IAAa,aAAa;AAC1B,IAAa,mBAAmB;AAChC,IAAa,qBAAqB"}
@@ -1,6 +1,5 @@
1
- import type { PluginOptions } from "@analogjs/vite-plugin-angular";
2
- import type { NitroConfig, PrerenderRoute } from "nitro/types";
3
- import type { SitemapConfig, SitemapEntry, SitemapExcludeRule, SitemapPriority, SitemapRouteDefinition, SitemapRouteInput, SitemapRouteSource, SitemapTransform, PrerenderContentDir, PrerenderContentFile, PrerenderSitemapConfig, PrerenderRouteConfig } from "@analogjs/vite-plugin-nitro";
1
+ import type { PrerenderRoute } from "nitro/types";
2
+ import type { SitemapConfig, SitemapEntry, SitemapExcludeRule, SitemapPriority, SitemapRouteDefinition, SitemapRouteInput, SitemapRouteSource, SitemapTransform, PrerenderContentDir, PrerenderContentFile, PrerenderSitemapConfig, PrerenderRouteConfig } from "./nitro/types.js";
4
3
  import type { ContentPluginOptions } from "./content-plugin.js";
5
4
  import type { DebugOption } from "./utils/debug.js";
6
5
  import type { StylePipelineOptions } from "./style-pipeline.js";
@@ -53,58 +52,29 @@ export interface I18nOptions {
53
52
  }
54
53
  export interface Options {
55
54
  ssr?: boolean;
56
- ssrBuildDir?: string;
57
55
  /**
58
56
  * Prerender the static pages without producing the server output.
59
57
  */
60
58
  static?: boolean;
61
59
  prerender?: PrerenderOptions;
62
60
  entryServer?: string;
63
- /**
64
- * Pass configuration options to the internal `@analogjs/vite-plugin-angular`
65
- * plugin. Set to `false` to disable the internal vite plugin (e.g. when
66
- * using an alternative compiler like `@oxc-angular/vite`).
67
- *
68
- * `vite.build` uses Vite's native config shape and is forwarded to the
69
- * internal Nitro/Vite build pipeline, while the remaining fields are passed
70
- * to `@analogjs/vite-plugin-angular`.
71
- *
72
- * When `false`, the following top-level options are ignored because they
73
- * are only forwarded to the internal Angular plugin: `jit`,
74
- * `disableTypeChecking`, `liveReload`, `inlineStylesExtension`,
75
- * `fileReplacements`, and `include`.
76
- *
77
- * Use this to configure the embedded Angular integration itself, not as the
78
- * primary home for Analog-owned experimental features.
79
- */
80
- vite?: PluginOptions | false;
81
- nitro?: NitroConfig;
82
61
  apiPrefix?: string;
83
- jit?: boolean;
84
62
  index?: string;
85
63
  workspaceRoot?: string;
86
64
  content?: ContentPluginOptions;
87
65
  /**
88
- * Extension applied for inline styles
89
- */
90
- inlineStylesExtension?: string;
91
- /**
92
- * Enables Analog's Angular live-reload/HMR pipeline during development/watch mode.
93
- *
94
- * This is separate from Vite's `server.hmr` option, which configures the
95
- * HMR client transport.
96
- *
97
- * Defaults to `true` for watch mode.
98
- */
99
- liveReload?: boolean;
100
- /**
101
- * Enable debug logging for specific scopes.
66
+ * Enable debug logging for the `analog:platform:*` and `analog:nitro:*`
67
+ * scopes.
102
68
  *
103
- * - `true` → enables all `analog:*` scopes (platform + angular + nitro)
69
+ * - `true` → enables all platform + nitro scopes
104
70
  * - `string[]` → enables listed namespaces
105
71
  * - `{ scopes?, mode? }` → object form with optional `mode: 'build' | 'dev'`
106
72
  * to restrict output to a specific Vite command (omit for both)
107
73
  *
74
+ * Angular scopes (`analog:angular:*`) are owned by
75
+ * `@analogjs/vite-plugin-angular` — pass `debug` to `angular()` directly
76
+ * to enable them.
77
+ *
108
78
  * Also responds to the `DEBUG` env var (Node.js) or `localStorage.debug`
109
79
  * (browser), using the `obug` convention.
110
80
  */
@@ -133,41 +103,12 @@ export interface Options {
133
103
  */
134
104
  discoverRoutes?: boolean;
135
105
  /**
136
- * Additional files to include in compilation
137
- */
138
- include?: string[];
139
- /**
140
- * Toggles internal API middleware.
141
- * If disabled, a proxy request is used to route /api
142
- * requests to / in the production server build.
143
- */
144
- useAPIMiddleware?: boolean;
145
- /**
146
- * Disable type checking diagnostics by the Angular compiler
147
- */
148
- disableTypeChecking?: boolean;
149
- /**
150
106
  * Configuration for runtime i18n support.
151
107
  * When set, enables locale detection on SSR and provides
152
108
  * the LOCALE injection token.
153
109
  */
154
110
  i18n?: I18nOptions;
155
111
  /**
156
- * Opt into the fast compile path. Skips Angular's template type-checking
157
- * and routes compilation through an internal single-pass transform.
158
- */
159
- fastCompile?: boolean;
160
- /**
161
- * Compilation output mode used when `fastCompile` is enabled.
162
- * - `'full'` (default): Emit final Ivy definitions for application builds.
163
- * - `'partial'`: Emit partial declarations for library publishing.
164
- */
165
- fastCompileMode?: "full" | "partial";
166
- /**
167
- * File replacements
168
- */
169
- fileReplacements?: PluginOptions["fileReplacements"];
170
- /**
171
112
  * Experimental features. These APIs are subject to change.
172
113
  *
173
114
  * `@analogjs/platform` is the default rollout and orchestration surface for
@@ -176,18 +117,6 @@ export interface Options {
176
117
  * a single Analog-first authoring surface.
177
118
  */
178
119
  experimental?: {
179
- /**
180
- * Use Angular's experimental compilation API.
181
- *
182
- * This is forwarded to `@analogjs/vite-plugin-angular`'s
183
- * `experimental.useAngularCompilationAPI`.
184
- *
185
- * Also accepted at `vite.experimental.useAngularCompilationAPI`
186
- * for backwards compatibility.
187
- *
188
- * Has no effect when `vite` is set to `false`.
189
- */
190
- useAngularCompilationAPI?: boolean;
191
120
  /**
192
121
  * Enable typed route table generation for type-safe navigation.
193
122
  *
@@ -219,72 +148,6 @@ export interface Options {
219
148
  */
220
149
  stylePipeline?: StylePipelineOptions | false;
221
150
  };
222
- /**
223
- * First-class Tailwind CSS v4 integration for Angular component styles.
224
- *
225
- * Angular's compiler processes component CSS through Vite's `preprocessCSS()`,
226
- * which runs `@tailwindcss/vite` — but each component stylesheet is processed
227
- * in isolation without access to the root Tailwind configuration (prefix, @theme,
228
- * @custom-variant, @plugin definitions). This causes errors like:
229
- *
230
- * "Cannot apply utility class `sa:grid` because the `sa` variant does not exist"
231
- *
232
- * The `tailwindCss` option solves this by auto-injecting a `@reference` directive
233
- * into every component CSS file that uses Tailwind utilities, pointing it to the
234
- * root Tailwind stylesheet so `@tailwindcss/vite` can resolve the full configuration.
235
- *
236
- * @example Basic usage — reference a root Tailwind CSS file:
237
- * ```ts
238
- * import { resolve } from 'node:path';
239
- *
240
- * angular({
241
- * tailwindCss: {
242
- * rootStylesheet: resolve(__dirname, 'src/styles/tailwind.css'),
243
- * },
244
- * })
245
- * ```
246
- *
247
- * @example With prefix detection — only inject for files using specific prefixes:
248
- * ```ts
249
- * angular({
250
- * tailwindCss: {
251
- * rootStylesheet: resolve(__dirname, 'src/styles/tailwind.css'),
252
- * // Only inject @reference into files that use these prefixed classes
253
- * prefixes: ['sa:', 'tw:'],
254
- * },
255
- * })
256
- * ```
257
- *
258
- * @example AnalogJS platform — passed through the `vite` option:
259
- * ```ts
260
- * analog({
261
- * vite: {
262
- * tailwindCss: {
263
- * rootStylesheet: resolve(__dirname, '../../../libs/meritos/tailwind.config.css'),
264
- * },
265
- * },
266
- * })
267
- * ```
268
- */
269
- tailwindCss?: {
270
- /**
271
- * Absolute path to the root Tailwind CSS file that contains `@import "tailwindcss"`,
272
- * `@theme`, `@custom-variant`, and `@plugin` definitions.
273
- *
274
- * A `@reference` directive pointing to this file will be auto-injected into
275
- * component CSS files that use Tailwind utilities.
276
- */
277
- rootStylesheet: string;
278
- /**
279
- * Optional list of class prefixes to detect (e.g. `['sa:', 'tw:']`).
280
- * When provided, `@reference` is only injected into component CSS files that
281
- * contain at least one of these prefixes. When omitted, `@reference` is injected
282
- * into all component CSS files that contain `@apply` or `@` directives.
283
- *
284
- * @default undefined — inject into all component CSS files with `@apply`
285
- */
286
- prefixes?: string[];
287
- };
288
151
  }
289
152
  export interface TypedRouterOptions {
290
153
  /**
@@ -10,17 +10,12 @@ import { serverModePlugin } from "../server-mode-plugin.js";
10
10
  import { routeGenerationPlugin } from "./route-generation-plugin.js";
11
11
  import { resolveStylePipelinePlugins } from "./style-pipeline.js";
12
12
  import { i18nComponentRegistryPlugin } from "./i18n-component-registry-plugin.js";
13
- import viteNitroPlugin from "@analogjs/vite-plugin-nitro";
14
- import angular from "@analogjs/vite-plugin-angular";
15
- import { mapValues, union } from "es-toolkit";
13
+ import { analogNitroPlugin } from "./nitro/analog-nitro-plugin.js";
14
+ import { union } from "es-toolkit";
16
15
  //#region packages/platform/src/lib/platform-plugin.ts
17
- function externalPlugins(plugins) {
18
- return plugins;
19
- }
20
16
  function platformPlugin(opts = {}) {
21
17
  applyDebugOption(opts.debug, opts.workspaceRoot);
22
18
  const isTest = process.env.NODE_ENV === "test" || !!process.env["VITEST"];
23
- const { experimental: viteExperimental, hmr: _removedViteHmrOption, ...forwardedViteOptions } = (opts?.vite === false ? void 0 : opts?.vite) ?? {};
24
19
  const { ...platformOptions } = {
25
20
  ssr: true,
26
21
  ...opts
@@ -31,23 +26,10 @@ function platformPlugin(opts = {}) {
31
26
  platformOptions.additionalContentDirs = union(platformOptions.additionalContentDirs ?? [], discovered.additionalContentDirs);
32
27
  platformOptions.additionalAPIDirs = union(platformOptions.additionalAPIDirs ?? [], discovered.additionalAPIDirs);
33
28
  }
34
- const useAngularCompilationAPI = platformOptions.experimental?.useAngularCompilationAPI ?? viteExperimental?.useAngularCompilationAPI;
35
29
  debugPlatform("experimental options resolved", {
36
- useAngularCompilationAPI: !!useAngularCompilationAPI,
37
30
  typedRouter: platformOptions.experimental?.typedRouter,
38
31
  stylePipeline: !!platformOptions.experimental?.stylePipeline
39
32
  });
40
- let nitroOptions = platformOptions?.nitro;
41
- if (nitroOptions?.routeRules) nitroOptions = {
42
- ...nitroOptions,
43
- routeRules: mapValues(nitroOptions.routeRules, (rule) => ({
44
- ...rule,
45
- headers: {
46
- ...rule.headers,
47
- "x-analog-no-ssr": rule?.ssr === false ? "true" : void 0
48
- }
49
- }))
50
- };
51
33
  return [
52
34
  {
53
35
  name: "analogjs-debug-activate",
@@ -55,32 +37,13 @@ function platformPlugin(opts = {}) {
55
37
  activateDeferredDebug(command);
56
38
  }
57
39
  },
58
- ...externalPlugins(viteNitroPlugin(platformOptions, nitroOptions)),
40
+ analogNitroPlugin(platformOptions),
59
41
  ...platformOptions.ssr ? [...ssrBuildPlugin(), ...injectHTMLPlugin()] : [],
60
42
  ...!isTest ? depsPlugin(platformOptions) : [],
61
43
  ...resolveStylePipelinePlugins(platformOptions.experimental?.stylePipeline, platformOptions.workspaceRoot),
62
44
  ...routerPlugin(platformOptions),
63
45
  routeGenerationPlugin(platformOptions),
64
46
  ...contentPlugin(platformOptions?.content, platformOptions),
65
- ...opts?.vite === false ? [] : externalPlugins(angular({
66
- jit: platformOptions.jit,
67
- workspaceRoot: platformOptions.workspaceRoot,
68
- disableTypeChecking: platformOptions.disableTypeChecking,
69
- include: [...platformOptions.include ?? [], ...(platformOptions.additionalPagesDirs ?? []).map((pageDir) => `${pageDir}/**/*.page.ts`)],
70
- additionalContentDirs: platformOptions.additionalContentDirs,
71
- liveReload: platformOptions.liveReload,
72
- inlineStylesExtension: platformOptions.inlineStylesExtension,
73
- fileReplacements: platformOptions.fileReplacements,
74
- fastCompile: platformOptions.fastCompile,
75
- fastCompileMode: platformOptions.fastCompileMode,
76
- debug: platformOptions.debug,
77
- stylePipeline: platformOptions.experimental?.stylePipeline?.angularPlugins?.length ? { plugins: platformOptions.experimental.stylePipeline.angularPlugins } : void 0,
78
- ...forwardedViteOptions,
79
- experimental: {
80
- ...viteExperimental ?? {},
81
- useAngularCompilationAPI
82
- }
83
- })),
84
47
  ...platformOptions.i18n ? [i18nComponentRegistryPlugin()] : [],
85
48
  ...serverModePlugin(),
86
49
  ...clearClientPageEndpointsPlugin()
@@ -1 +1 @@
1
- {"version":3,"file":"platform-plugin.js","names":[],"sources":["../../../src/lib/platform-plugin.ts"],"sourcesContent":["import { Plugin } from 'vite';\nimport viteNitroPlugin from '@analogjs/vite-plugin-nitro';\nimport angular from '@analogjs/vite-plugin-angular';\nimport { mapValues, union } from 'es-toolkit';\n\nimport { Options } from './options.js';\nimport {\n activateDeferredDebug,\n applyDebugOption,\n debugPlatform,\n} from './utils/debug.js';\nimport { discoverLibraryRoutes } from './discover-library-routes.js';\nimport { routerPlugin } from './router-plugin.js';\nimport { ssrBuildPlugin } from './ssr/ssr-build-plugin.js';\nimport { contentPlugin } from './content-plugin.js';\nimport { clearClientPageEndpointsPlugin } from './clear-client-page-endpoint.js';\nimport { depsPlugin } from './deps-plugin.js';\nimport { injectHTMLPlugin } from './ssr/inject-html-plugin.js';\nimport { serverModePlugin } from '../server-mode-plugin.js';\nimport { routeGenerationPlugin } from './route-generation-plugin.js';\nimport { resolveStylePipelinePlugins } from './style-pipeline.js';\nimport { i18nComponentRegistryPlugin } from './i18n-component-registry-plugin.js';\n\n// Bridge Plugin types from external @analogjs packages that resolve a different vite instance\nfunction externalPlugins(plugins: unknown): Plugin[] {\n return plugins as Plugin[];\n}\n\nexport function platformPlugin(opts: Options = {}): Plugin[] {\n applyDebugOption(opts.debug, opts.workspaceRoot);\n\n const isTest = process.env['NODE_ENV'] === 'test' || !!process.env['VITEST'];\n const viteOptions = opts?.vite === false ? undefined : opts?.vite;\n const {\n experimental: viteExperimental,\n hmr: _removedViteHmrOption,\n ...forwardedViteOptions\n } = viteOptions ?? {};\n const { ...platformOptions } = {\n ssr: true,\n ...opts,\n };\n if (platformOptions.discoverRoutes) {\n const workspaceRoot =\n platformOptions.workspaceRoot ??\n process.env['NX_WORKSPACE_ROOT'] ??\n process.cwd();\n const discovered = discoverLibraryRoutes(workspaceRoot);\n platformOptions.additionalPagesDirs = union(\n platformOptions.additionalPagesDirs ?? [],\n discovered.additionalPagesDirs,\n );\n platformOptions.additionalContentDirs = union(\n platformOptions.additionalContentDirs ?? [],\n discovered.additionalContentDirs,\n );\n platformOptions.additionalAPIDirs = union(\n platformOptions.additionalAPIDirs ?? [],\n discovered.additionalAPIDirs,\n );\n }\n\n const useAngularCompilationAPI =\n platformOptions.experimental?.useAngularCompilationAPI ??\n viteExperimental?.useAngularCompilationAPI;\n debugPlatform('experimental options resolved', {\n useAngularCompilationAPI: !!useAngularCompilationAPI,\n typedRouter: platformOptions.experimental?.typedRouter,\n stylePipeline: !!platformOptions.experimental?.stylePipeline,\n });\n let nitroOptions = platformOptions?.nitro;\n\n if (nitroOptions?.routeRules) {\n nitroOptions = {\n ...nitroOptions,\n routeRules: mapValues(nitroOptions.routeRules, (rule) => ({\n ...rule,\n headers: {\n ...rule.headers,\n 'x-analog-no-ssr': rule?.ssr === false ? 'true' : undefined,\n } as any,\n })),\n };\n }\n\n return [\n {\n name: 'analogjs-debug-activate',\n config(_, { command }) {\n activateDeferredDebug(command);\n },\n },\n ...externalPlugins(viteNitroPlugin(platformOptions as any, nitroOptions)),\n ...(platformOptions.ssr\n ? [...ssrBuildPlugin(), ...injectHTMLPlugin()]\n : []),\n ...(!isTest ? depsPlugin(platformOptions) : []),\n ...resolveStylePipelinePlugins(\n platformOptions.experimental?.stylePipeline,\n platformOptions.workspaceRoot,\n ),\n ...routerPlugin(platformOptions),\n routeGenerationPlugin(platformOptions),\n ...contentPlugin(platformOptions?.content, platformOptions),\n ...(opts?.vite === false\n ? []\n : externalPlugins(\n angular({\n jit: platformOptions.jit,\n workspaceRoot: platformOptions.workspaceRoot,\n // Let the Angular plugin keep its own dev-friendly default unless the\n // app explicitly opts into stricter serve-time diagnostics.\n disableTypeChecking: platformOptions.disableTypeChecking,\n include: [\n ...(platformOptions.include ?? []),\n ...(platformOptions.additionalPagesDirs ?? []).map(\n (pageDir) => `${pageDir}/**/*.page.ts`,\n ),\n ],\n additionalContentDirs: platformOptions.additionalContentDirs,\n liveReload: platformOptions.liveReload,\n inlineStylesExtension: platformOptions.inlineStylesExtension,\n fileReplacements: platformOptions.fileReplacements,\n fastCompile: platformOptions.fastCompile,\n fastCompileMode: platformOptions.fastCompileMode,\n debug: platformOptions.debug,\n stylePipeline: platformOptions.experimental?.stylePipeline\n ?.angularPlugins?.length\n ? {\n plugins:\n platformOptions.experimental.stylePipeline.angularPlugins,\n }\n : undefined,\n ...forwardedViteOptions,\n experimental: {\n ...(viteExperimental ?? {}),\n useAngularCompilationAPI,\n },\n }),\n )),\n ...(platformOptions.i18n ? [i18nComponentRegistryPlugin()] : []),\n ...serverModePlugin(),\n ...clearClientPageEndpointsPlugin(),\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAwBA,SAAS,gBAAgB,SAA4B;AACnD,QAAO;;AAGT,SAAgB,eAAe,OAAgB,EAAE,EAAY;AAC3D,kBAAiB,KAAK,OAAO,KAAK,cAAc;CAEhD,MAAM,SAAA,QAAA,IAAA,aAAqC,UAAU,CAAC,CAAC,QAAQ,IAAI;CAEnE,MAAM,EACJ,cAAc,kBACd,KAAK,uBACL,GAAG,0BAJe,MAAM,SAAS,QAAQ,KAAA,IAAY,MAAM,SAK1C,EAAE;CACrB,MAAM,EAAE,GAAG,oBAAoB;EAC7B,KAAK;EACL,GAAG;EACJ;AACD,KAAI,gBAAgB,gBAAgB;EAKlC,MAAM,aAAa,sBAHjB,gBAAgB,iBAChB,QAAQ,IAAI,wBACZ,QAAQ,KAAK,CACwC;AACvD,kBAAgB,sBAAsB,MACpC,gBAAgB,uBAAuB,EAAE,EACzC,WAAW,oBACZ;AACD,kBAAgB,wBAAwB,MACtC,gBAAgB,yBAAyB,EAAE,EAC3C,WAAW,sBACZ;AACD,kBAAgB,oBAAoB,MAClC,gBAAgB,qBAAqB,EAAE,EACvC,WAAW,kBACZ;;CAGH,MAAM,2BACJ,gBAAgB,cAAc,4BAC9B,kBAAkB;AACpB,eAAc,iCAAiC;EAC7C,0BAA0B,CAAC,CAAC;EAC5B,aAAa,gBAAgB,cAAc;EAC3C,eAAe,CAAC,CAAC,gBAAgB,cAAc;EAChD,CAAC;CACF,IAAI,eAAe,iBAAiB;AAEpC,KAAI,cAAc,WAChB,gBAAe;EACb,GAAG;EACH,YAAY,UAAU,aAAa,aAAa,UAAU;GACxD,GAAG;GACH,SAAS;IACP,GAAG,KAAK;IACR,mBAAmB,MAAM,QAAQ,QAAQ,SAAS,KAAA;IACnD;GACF,EAAE;EACJ;AAGH,QAAO;EACL;GACE,MAAM;GACN,OAAO,GAAG,EAAE,WAAW;AACrB,0BAAsB,QAAQ;;GAEjC;EACD,GAAG,gBAAgB,gBAAgB,iBAAwB,aAAa,CAAC;EACzE,GAAI,gBAAgB,MAChB,CAAC,GAAG,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,GAC5C,EAAE;EACN,GAAI,CAAC,SAAS,WAAW,gBAAgB,GAAG,EAAE;EAC9C,GAAG,4BACD,gBAAgB,cAAc,eAC9B,gBAAgB,cACjB;EACD,GAAG,aAAa,gBAAgB;EAChC,sBAAsB,gBAAgB;EACtC,GAAG,cAAc,iBAAiB,SAAS,gBAAgB;EAC3D,GAAI,MAAM,SAAS,QACf,EAAE,GACF,gBACE,QAAQ;GACN,KAAK,gBAAgB;GACrB,eAAe,gBAAgB;GAG/B,qBAAqB,gBAAgB;GACrC,SAAS,CACP,GAAI,gBAAgB,WAAW,EAAE,EACjC,IAAI,gBAAgB,uBAAuB,EAAE,EAAE,KAC5C,YAAY,GAAG,QAAQ,eACzB,CACF;GACD,uBAAuB,gBAAgB;GACvC,YAAY,gBAAgB;GAC5B,uBAAuB,gBAAgB;GACvC,kBAAkB,gBAAgB;GAClC,aAAa,gBAAgB;GAC7B,iBAAiB,gBAAgB;GACjC,OAAO,gBAAgB;GACvB,eAAe,gBAAgB,cAAc,eACzC,gBAAgB,SAChB,EACE,SACE,gBAAgB,aAAa,cAAc,gBAC9C,GACD,KAAA;GACJ,GAAG;GACH,cAAc;IACZ,GAAI,oBAAoB,EAAE;IAC1B;IACD;GACF,CAAC,CACH;EACL,GAAI,gBAAgB,OAAO,CAAC,6BAA6B,CAAC,GAAG,EAAE;EAC/D,GAAG,kBAAkB;EACrB,GAAG,gCAAgC;EACpC"}
1
+ {"version":3,"file":"platform-plugin.js","names":[],"sources":["../../../src/lib/platform-plugin.ts"],"sourcesContent":["import { Plugin } from 'vite';\nimport { union } from 'es-toolkit';\n\nimport { Options } from './options.js';\nimport {\n activateDeferredDebug,\n applyDebugOption,\n debugPlatform,\n} from './utils/debug.js';\nimport { discoverLibraryRoutes } from './discover-library-routes.js';\nimport { routerPlugin } from './router-plugin.js';\nimport { ssrBuildPlugin } from './ssr/ssr-build-plugin.js';\nimport { contentPlugin } from './content-plugin.js';\nimport { clearClientPageEndpointsPlugin } from './clear-client-page-endpoint.js';\nimport { depsPlugin } from './deps-plugin.js';\nimport { injectHTMLPlugin } from './ssr/inject-html-plugin.js';\nimport { serverModePlugin } from '../server-mode-plugin.js';\nimport { routeGenerationPlugin } from './route-generation-plugin.js';\nimport { resolveStylePipelinePlugins } from './style-pipeline.js';\nimport { i18nComponentRegistryPlugin } from './i18n-component-registry-plugin.js';\nimport { analogNitroPlugin } from './nitro/analog-nitro-plugin.js';\n\nexport function platformPlugin(opts: Options = {}): Plugin[] {\n applyDebugOption(opts.debug, opts.workspaceRoot);\n\n const isTest = process.env['NODE_ENV'] === 'test' || !!process.env['VITEST'];\n const { ...platformOptions } = {\n ssr: true,\n ...opts,\n };\n if (platformOptions.discoverRoutes) {\n const workspaceRoot =\n platformOptions.workspaceRoot ??\n process.env['NX_WORKSPACE_ROOT'] ??\n process.cwd();\n const discovered = discoverLibraryRoutes(workspaceRoot);\n platformOptions.additionalPagesDirs = union(\n platformOptions.additionalPagesDirs ?? [],\n discovered.additionalPagesDirs,\n );\n platformOptions.additionalContentDirs = union(\n platformOptions.additionalContentDirs ?? [],\n discovered.additionalContentDirs,\n );\n platformOptions.additionalAPIDirs = union(\n platformOptions.additionalAPIDirs ?? [],\n discovered.additionalAPIDirs,\n );\n }\n\n debugPlatform('experimental options resolved', {\n typedRouter: platformOptions.experimental?.typedRouter,\n stylePipeline: !!platformOptions.experimental?.stylePipeline,\n });\n\n return [\n {\n name: 'analogjs-debug-activate',\n config(_, { command }) {\n activateDeferredDebug(command);\n },\n },\n analogNitroPlugin(platformOptions),\n ...(platformOptions.ssr\n ? [...ssrBuildPlugin(), ...injectHTMLPlugin()]\n : []),\n ...(!isTest ? depsPlugin(platformOptions) : []),\n ...resolveStylePipelinePlugins(\n platformOptions.experimental?.stylePipeline,\n platformOptions.workspaceRoot,\n ),\n ...routerPlugin(platformOptions),\n routeGenerationPlugin(platformOptions),\n ...contentPlugin(platformOptions?.content, platformOptions),\n ...(platformOptions.i18n ? [i18nComponentRegistryPlugin()] : []),\n ...serverModePlugin(),\n ...clearClientPageEndpointsPlugin(),\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,SAAgB,eAAe,OAAgB,EAAE,EAAY;AAC3D,kBAAiB,KAAK,OAAO,KAAK,cAAc;CAEhD,MAAM,SAAA,QAAA,IAAA,aAAqC,UAAU,CAAC,CAAC,QAAQ,IAAI;CACnE,MAAM,EAAE,GAAG,oBAAoB;EAC7B,KAAK;EACL,GAAG;EACJ;AACD,KAAI,gBAAgB,gBAAgB;EAKlC,MAAM,aAAa,sBAHjB,gBAAgB,iBAChB,QAAQ,IAAI,wBACZ,QAAQ,KAAK,CACwC;AACvD,kBAAgB,sBAAsB,MACpC,gBAAgB,uBAAuB,EAAE,EACzC,WAAW,oBACZ;AACD,kBAAgB,wBAAwB,MACtC,gBAAgB,yBAAyB,EAAE,EAC3C,WAAW,sBACZ;AACD,kBAAgB,oBAAoB,MAClC,gBAAgB,qBAAqB,EAAE,EACvC,WAAW,kBACZ;;AAGH,eAAc,iCAAiC;EAC7C,aAAa,gBAAgB,cAAc;EAC3C,eAAe,CAAC,CAAC,gBAAgB,cAAc;EAChD,CAAC;AAEF,QAAO;EACL;GACE,MAAM;GACN,OAAO,GAAG,EAAE,WAAW;AACrB,0BAAsB,QAAQ;;GAEjC;EACD,kBAAkB,gBAAgB;EAClC,GAAI,gBAAgB,MAChB,CAAC,GAAG,gBAAgB,EAAE,GAAG,kBAAkB,CAAC,GAC5C,EAAE;EACN,GAAI,CAAC,SAAS,WAAW,gBAAgB,GAAG,EAAE;EAC9C,GAAG,4BACD,gBAAgB,cAAc,eAC9B,gBAAgB,cACjB;EACD,GAAG,aAAa,gBAAgB;EAChC,sBAAsB,gBAAgB;EACtC,GAAG,cAAc,iBAAiB,SAAS,gBAAgB;EAC3D,GAAI,gBAAgB,OAAO,CAAC,6BAA6B,CAAC,GAAG,EAAE;EAC/D,GAAG,kBAAkB;EACrB,GAAG,gCAAgC;EACpC"}
@@ -27,7 +27,6 @@ export type StylePipelinePluginFactory = (context: StylePipelineContext) => Plug
27
27
  export type StylePipelinePluginEntry = Plugin | Plugin[] | StylePipelinePluginFactory | false | null | undefined;
28
28
  export interface StylePipelineOptions {
29
29
  plugins?: StylePipelinePluginEntry[];
30
- angularPlugins?: AngularStylePipelinePlugin[];
31
30
  }
32
31
  export declare function defineStylePipeline<const T extends StylePipelineOptions>(options: T): T;
33
32
  export declare function defineStylePipelinePlugins<const T extends StylePipelinePluginEntry[]>(plugins: T): T;
@@ -1 +1 @@
1
- {"version":3,"file":"style-pipeline.js","names":[],"sources":["../../../src/lib/style-pipeline.ts"],"sourcesContent":["import type { Plugin } from 'vite';\nimport type {\n StylesheetDependency,\n StylesheetDiagnostic,\n StylesheetTransformContext,\n StylesheetTransformResult,\n} from './style-preprocessor.js';\n\nexport interface StylePipelineStylesheetRegistry {\n getPublicIdsForSource(sourcePath: string): string[];\n getRequestIdsForSource(sourcePath: string): string[];\n getDependenciesForSource(sourcePath: string): StylesheetDependency[];\n getDiagnosticsForSource(sourcePath: string): StylesheetDiagnostic[];\n getTagsForSource(sourcePath: string): string[];\n}\n\nexport interface AngularStylePipelineContext {\n workspaceRoot: string;\n}\n\nexport interface AngularStylePipelinePlugin {\n name: string;\n preprocessStylesheet?: (\n code: string,\n context: StylesheetTransformContext,\n ) => string | StylesheetTransformResult | undefined;\n configureStylesheetRegistry?: (\n registry: StylePipelineStylesheetRegistry,\n context: AngularStylePipelineContext,\n ) => void;\n}\n\nexport interface AngularStylePipelineOptions {\n plugins: AngularStylePipelinePlugin[];\n}\n\nexport function defineAngularStylePipeline<\n const T extends AngularStylePipelineOptions,\n>(options: T): T {\n return options;\n}\n\nexport function defineAngularStylePipelinePlugins<\n const T extends AngularStylePipelinePlugin[],\n>(plugins: T): T {\n return plugins;\n}\n\nexport interface StylePipelineContext {\n workspaceRoot: string;\n}\n\nexport type StylePipelinePluginFactory = (\n context: StylePipelineContext,\n) => Plugin | Plugin[] | false | null | undefined;\n\nexport type StylePipelinePluginEntry =\n | Plugin\n | Plugin[]\n | StylePipelinePluginFactory\n | false\n | null\n | undefined;\n\nexport interface StylePipelineOptions {\n plugins?: StylePipelinePluginEntry[];\n angularPlugins?: AngularStylePipelinePlugin[];\n}\n\nexport function defineStylePipeline<const T extends StylePipelineOptions>(\n options: T,\n): T {\n return options;\n}\n\nexport function defineStylePipelinePlugins<\n const T extends StylePipelinePluginEntry[],\n>(plugins: T): T {\n return plugins;\n}\n\nexport function resolveStylePipelinePlugins(\n options: StylePipelineOptions | false | undefined,\n workspaceRoot?: string,\n): Plugin[] {\n if (!options?.plugins?.length) {\n return [];\n }\n\n const context: StylePipelineContext = {\n workspaceRoot:\n workspaceRoot ?? process.env['NX_WORKSPACE_ROOT'] ?? process.cwd(),\n };\n\n const resolved: Plugin[] = [];\n\n for (const entry of options.plugins) {\n const plugins = typeof entry === 'function' ? entry(context) : entry;\n\n if (!plugins) {\n continue;\n }\n\n if (Array.isArray(plugins)) {\n resolved.push(...plugins);\n continue;\n }\n\n resolved.push(plugins);\n }\n\n return resolved;\n}\n"],"mappings":";AAoCA,SAAgB,2BAEd,SAAe;AACf,QAAO;;AAGT,SAAgB,kCAEd,SAAe;AACf,QAAO;;AAwBT,SAAgB,oBACd,SACG;AACH,QAAO;;AAGT,SAAgB,2BAEd,SAAe;AACf,QAAO;;AAGT,SAAgB,4BACd,SACA,eACU;AACV,KAAI,CAAC,SAAS,SAAS,OACrB,QAAO,EAAE;CAGX,MAAM,UAAgC,EACpC,eACE,iBAAiB,QAAQ,IAAI,wBAAwB,QAAQ,KAAK,EACrE;CAED,MAAM,WAAqB,EAAE;AAE7B,MAAK,MAAM,SAAS,QAAQ,SAAS;EACnC,MAAM,UAAU,OAAO,UAAU,aAAa,MAAM,QAAQ,GAAG;AAE/D,MAAI,CAAC,QACH;AAGF,MAAI,MAAM,QAAQ,QAAQ,EAAE;AAC1B,YAAS,KAAK,GAAG,QAAQ;AACzB;;AAGF,WAAS,KAAK,QAAQ;;AAGxB,QAAO"}
1
+ {"version":3,"file":"style-pipeline.js","names":[],"sources":["../../../src/lib/style-pipeline.ts"],"sourcesContent":["import type { Plugin } from 'vite';\nimport type {\n StylesheetDependency,\n StylesheetDiagnostic,\n StylesheetTransformContext,\n StylesheetTransformResult,\n} from './style-preprocessor.js';\n\nexport interface StylePipelineStylesheetRegistry {\n getPublicIdsForSource(sourcePath: string): string[];\n getRequestIdsForSource(sourcePath: string): string[];\n getDependenciesForSource(sourcePath: string): StylesheetDependency[];\n getDiagnosticsForSource(sourcePath: string): StylesheetDiagnostic[];\n getTagsForSource(sourcePath: string): string[];\n}\n\nexport interface AngularStylePipelineContext {\n workspaceRoot: string;\n}\n\nexport interface AngularStylePipelinePlugin {\n name: string;\n preprocessStylesheet?: (\n code: string,\n context: StylesheetTransformContext,\n ) => string | StylesheetTransformResult | undefined;\n configureStylesheetRegistry?: (\n registry: StylePipelineStylesheetRegistry,\n context: AngularStylePipelineContext,\n ) => void;\n}\n\nexport interface AngularStylePipelineOptions {\n plugins: AngularStylePipelinePlugin[];\n}\n\nexport function defineAngularStylePipeline<\n const T extends AngularStylePipelineOptions,\n>(options: T): T {\n return options;\n}\n\nexport function defineAngularStylePipelinePlugins<\n const T extends AngularStylePipelinePlugin[],\n>(plugins: T): T {\n return plugins;\n}\n\nexport interface StylePipelineContext {\n workspaceRoot: string;\n}\n\nexport type StylePipelinePluginFactory = (\n context: StylePipelineContext,\n) => Plugin | Plugin[] | false | null | undefined;\n\nexport type StylePipelinePluginEntry =\n | Plugin\n | Plugin[]\n | StylePipelinePluginFactory\n | false\n | null\n | undefined;\n\nexport interface StylePipelineOptions {\n plugins?: StylePipelinePluginEntry[];\n}\n\nexport function defineStylePipeline<const T extends StylePipelineOptions>(\n options: T,\n): T {\n return options;\n}\n\nexport function defineStylePipelinePlugins<\n const T extends StylePipelinePluginEntry[],\n>(plugins: T): T {\n return plugins;\n}\n\nexport function resolveStylePipelinePlugins(\n options: StylePipelineOptions | false | undefined,\n workspaceRoot?: string,\n): Plugin[] {\n if (!options?.plugins?.length) {\n return [];\n }\n\n const context: StylePipelineContext = {\n workspaceRoot:\n workspaceRoot ?? process.env['NX_WORKSPACE_ROOT'] ?? process.cwd(),\n };\n\n const resolved: Plugin[] = [];\n\n for (const entry of options.plugins) {\n const plugins = typeof entry === 'function' ? entry(context) : entry;\n\n if (!plugins) {\n continue;\n }\n\n if (Array.isArray(plugins)) {\n resolved.push(...plugins);\n continue;\n }\n\n resolved.push(plugins);\n }\n\n return resolved;\n}\n"],"mappings":";AAoCA,SAAgB,2BAEd,SAAe;AACf,QAAO;;AAGT,SAAgB,kCAEd,SAAe;AACf,QAAO;;AAuBT,SAAgB,oBACd,SACG;AACH,QAAO;;AAGT,SAAgB,2BAEd,SAAe;AACf,QAAO;;AAGT,SAAgB,4BACd,SACA,eACU;AACV,KAAI,CAAC,SAAS,SAAS,OACrB,QAAO,EAAE;CAGX,MAAM,UAAgC,EACpC,eACE,iBAAiB,QAAQ,IAAI,wBAAwB,QAAQ,KAAK,EACrE;CAED,MAAM,WAAqB,EAAE;AAE7B,MAAK,MAAM,SAAS,QAAQ,SAAS;EACnC,MAAM,UAAU,OAAO,UAAU,aAAa,MAAM,QAAQ,GAAG;AAE/D,MAAI,CAAC,QACH;AAGF,MAAI,MAAM,QAAQ,QAAQ,EAAE;AAC1B,YAAS,KAAK,GAAG,QAAQ;AACzB;;AAGF,WAAS,KAAK,QAAQ;;AAGxB,QAAO"}
@@ -1,6 +1,6 @@
1
+ import { nitroDebugInstances } from "../nitro/debug.js";
1
2
  import { createDebugHarness } from "./debug-harness.js";
2
3
  import { createDebug } from "obug";
3
- import { debugInstances } from "@analogjs/vite-plugin-nitro/internal";
4
4
  //#region packages/platform/src/lib/utils/debug.ts
5
5
  var debugPlatform = createDebug("analog:platform");
6
6
  var debugRoutes = createDebug("analog:platform:routes");
@@ -16,7 +16,7 @@ var harness = createDebugHarness({
16
16
  debugTypedRouter,
17
17
  debugTailwind,
18
18
  createDebug("analog:platform:style-pipeline")
19
- ], debugInstances]
19
+ ], nitroDebugInstances]
20
20
  });
21
21
  var applyDebugOption = harness.applyDebugOption;
22
22
  var activateDeferredDebug = harness.activateDeferredDebug;
@@ -1 +1 @@
1
- {"version":3,"file":"debug.js","names":[],"sources":["../../../../src/lib/utils/debug.ts"],"sourcesContent":["import { createDebug } from 'obug';\nimport { debugInstances as nitroDebugInstances } from '@analogjs/vite-plugin-nitro/internal';\nimport { createDebugHarness } from './debug-harness.js';\n\nexport const debugPlatform = createDebug('analog:platform');\nexport const debugRoutes = createDebug('analog:platform:routes');\nexport const debugContent = createDebug('analog:platform:content');\nexport const debugTypedRouter = createDebug('analog:platform:typed-router');\nexport const debugTailwind = createDebug('analog:platform:tailwind');\nexport const debugStylePipeline = createDebug('analog:platform:style-pipeline');\n\nconst platformDebugInstances = [\n debugPlatform,\n debugRoutes,\n debugContent,\n debugTypedRouter,\n debugTailwind,\n debugStylePipeline,\n];\n\nexport type DebugScope =\n | 'analog:*'\n | 'analog:platform'\n | 'analog:platform:*'\n | 'analog:platform:routes'\n | 'analog:platform:content'\n | 'analog:platform:typed-router'\n | 'analog:platform:tailwind'\n | 'analog:platform:style-pipeline'\n | 'analog:angular:*'\n | 'analog:angular:hmr'\n | 'analog:angular:styles'\n | 'analog:angular:compiler'\n | 'analog:angular:compilation-api'\n | 'analog:angular:tailwind'\n | 'analog:angular:style-pipeline'\n | 'analog:nitro'\n | 'analog:nitro:*'\n | 'analog:nitro:ssr'\n | 'analog:nitro:prerender'\n | (string & {});\n\nexport type DebugMode = 'build' | 'dev';\n\nexport interface DebugModeOptions {\n scopes?: boolean | DebugScope[];\n mode?: DebugMode;\n /**\n * Write debug output to log files under `tmp/debug/` in the workspace root.\n * - `true` or `'single'` — all output to `tmp/debug/analog.log`\n * - `'scoped'` — one file per scope, e.g. `tmp/debug/analog.angular.hmr.log`\n */\n logFile?: boolean | 'single' | 'scoped';\n}\n\nexport type DebugOption =\n | boolean\n | DebugScope[]\n | DebugModeOptions\n | DebugModeOptions[];\n\nconst harness = createDebugHarness({\n fallbackNamespace: 'analog:*',\n instanceGroups: [platformDebugInstances, nitroDebugInstances],\n});\n\nexport const applyDebugOption: (\n debug: DebugOption | undefined,\n workspaceRoot?: string,\n) => void = harness.applyDebugOption;\nexport const activateDeferredDebug: (command: 'build' | 'serve') => void =\n harness.activateDeferredDebug;\nexport const _resetDeferredDebug: () => void = harness._resetDeferredDebug;\n"],"mappings":";;;;AAIA,IAAa,gBAAgB,YAAY,kBAAkB;AAC3D,IAAa,cAAc,YAAY,yBAAyB;AAChE,IAAa,eAAe,YAAY,0BAA0B;AAClE,IAAa,mBAAmB,YAAY,+BAA+B;AAC3E,IAAa,gBAAgB,YAAY,2BAA2B;AAqDpE,IAAM,UAAU,mBAAmB;CACjC,mBAAmB;CACnB,gBAAgB,CApDa;EAC7B;EACA;EACA;EACA;EACA;EAPgC,YAAY,iCAAiC;EAS9E,EA6C0C,eAAoB;CAC9D,CAAC;AAEF,IAAa,mBAGD,QAAQ;AACpB,IAAa,wBACX,QAAQ;AACqC,QAAQ"}
1
+ {"version":3,"file":"debug.js","names":[],"sources":["../../../../src/lib/utils/debug.ts"],"sourcesContent":["import { createDebug } from 'obug';\nimport { nitroDebugInstances } from '../nitro/debug.js';\nimport { createDebugHarness } from './debug-harness.js';\n\nexport const debugPlatform = createDebug('analog:platform');\nexport const debugRoutes = createDebug('analog:platform:routes');\nexport const debugContent = createDebug('analog:platform:content');\nexport const debugTypedRouter = createDebug('analog:platform:typed-router');\nexport const debugTailwind = createDebug('analog:platform:tailwind');\nexport const debugStylePipeline = createDebug('analog:platform:style-pipeline');\n\nconst platformDebugInstances = [\n debugPlatform,\n debugRoutes,\n debugContent,\n debugTypedRouter,\n debugTailwind,\n debugStylePipeline,\n];\n\nexport type DebugScope =\n | 'analog:*'\n | 'analog:platform'\n | 'analog:platform:*'\n | 'analog:platform:routes'\n | 'analog:platform:content'\n | 'analog:platform:typed-router'\n | 'analog:platform:tailwind'\n | 'analog:platform:style-pipeline'\n | 'analog:angular:*'\n | 'analog:angular:hmr'\n | 'analog:angular:styles'\n | 'analog:angular:compiler'\n | 'analog:angular:compilation-api'\n | 'analog:angular:tailwind'\n | 'analog:angular:style-pipeline'\n | 'analog:nitro'\n | 'analog:nitro:*'\n | 'analog:nitro:ssr'\n | 'analog:nitro:prerender'\n | (string & {});\n\nexport type DebugMode = 'build' | 'dev';\n\nexport interface DebugModeOptions {\n scopes?: boolean | DebugScope[];\n mode?: DebugMode;\n /**\n * Write debug output to log files under `tmp/debug/` in the workspace root.\n * - `true` or `'single'` — all output to `tmp/debug/analog.log`\n * - `'scoped'` — one file per scope, e.g. `tmp/debug/analog.angular.hmr.log`\n */\n logFile?: boolean | 'single' | 'scoped';\n}\n\nexport type DebugOption =\n | boolean\n | DebugScope[]\n | DebugModeOptions\n | DebugModeOptions[];\n\nconst harness = createDebugHarness({\n fallbackNamespace: 'analog:*',\n instanceGroups: [platformDebugInstances, nitroDebugInstances],\n});\n\nexport const applyDebugOption: (\n debug: DebugOption | undefined,\n workspaceRoot?: string,\n) => void = harness.applyDebugOption;\nexport const activateDeferredDebug: (command: 'build' | 'serve') => void =\n harness.activateDeferredDebug;\nexport const _resetDeferredDebug: () => void = harness._resetDeferredDebug;\n"],"mappings":";;;;AAIA,IAAa,gBAAgB,YAAY,kBAAkB;AAC3D,IAAa,cAAc,YAAY,yBAAyB;AAChE,IAAa,eAAe,YAAY,0BAA0B;AAClE,IAAa,mBAAmB,YAAY,+BAA+B;AAC3E,IAAa,gBAAgB,YAAY,2BAA2B;AAqDpE,IAAM,UAAU,mBAAmB;CACjC,mBAAmB;CACnB,gBAAgB,CApDa;EAC7B;EACA;EACA;EACA;EACA;EAPgC,YAAY,iCAAiC;EAS9E,EA6C0C,oBAAoB;CAC9D,CAAC;AAEF,IAAa,mBAGD,QAAQ;AACpB,IAAa,wBACX,QAAQ;AACqC,QAAQ"}
@@ -1,3 +0,0 @@
1
- import { convertNxExecutor } from "@nx/devkit";
2
- declare const compat: ReturnType<typeof convertNxExecutor>;
3
- export default compat;
@@ -1,7 +0,0 @@
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
- //# sourceMappingURL=compat.js.map
@@ -1 +0,0 @@
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 +0,0 @@
1
- import type { FileReplacement } from '@nx/vite/plugins/rollup-replace-files.plugin';
2
- export type { ViteBuildExecutorOptions } from '@nx/vite/executors';
@@ -1,147 +0,0 @@
1
- {
2
- "version": 2,
3
- "outputCapture": "direct-nodejs",
4
- "title": "Vite Prod Builder",
5
- "cli": "nx",
6
- "description": "Builds a Vite.js application for production.",
7
- "type": "object",
8
- "presets": [
9
- {
10
- "name": "Default minimum setup",
11
- "keys": []
12
- }
13
- ],
14
- "properties": {
15
- "outputPath": {
16
- "type": "string",
17
- "description": "The output path of the generated files.",
18
- "x-completion-type": "directory",
19
- "x-priority": "important"
20
- },
21
- "buildLibsFromSource": {
22
- "type": "boolean",
23
- "description": "Read buildable libraries from source instead of building them separately.",
24
- "default": true
25
- },
26
- "skipTypeCheck": {
27
- "type": "boolean",
28
- "description": "Skip type-checking via TypeScript. Skipping type-checking speeds up the build but type errors are not caught.",
29
- "default": false
30
- },
31
- "base": {
32
- "type": "string",
33
- "description": "Base public path when served in development or production.",
34
- "alias": "baseHref"
35
- },
36
- "configFile": {
37
- "type": "string",
38
- "description": "The name of the Vite.js configuration file.",
39
- "x-completion-type": "file",
40
- "x-completion-glob": "vite.config.@(js|ts)"
41
- },
42
- "emptyOutDir": {
43
- "description": "When set to false, outputPath will not be emptied during the build process.",
44
- "type": "boolean",
45
- "default": true
46
- },
47
- "sourcemap": {
48
- "description": "Output sourcemaps. Use 'hidden' for use with error reporting tools without generating sourcemap comment.",
49
- "oneOf": [
50
- {
51
- "type": "boolean"
52
- },
53
- {
54
- "type": "string"
55
- }
56
- ]
57
- },
58
- "target": {
59
- "description": "Browser compatibility target for the final bundle. For more info: https://vitejs.dev/config/build-options.html#build-target",
60
- "type": "string"
61
- },
62
- "minify": {
63
- "description": "Output sourcemaps. Use 'hidden' for use with error reporting tools without generating sourcemap comment.",
64
- "oneOf": [
65
- {
66
- "type": "boolean"
67
- },
68
- {
69
- "type": "string"
70
- }
71
- ]
72
- },
73
- "manifest": {
74
- "description": "Output sourcemaps. Use 'hidden' for use with error reporting tools without generating sourcemap comment.",
75
- "oneOf": [
76
- {
77
- "type": "boolean"
78
- },
79
- {
80
- "type": "string"
81
- }
82
- ]
83
- },
84
- "ssrManifest": {
85
- "description": "When set to true, the build will also generate an SSR manifest for determining style links and asset preload directives in production. When the value is a string, it will be used as the manifest file name.",
86
- "oneOf": [
87
- {
88
- "type": "boolean"
89
- },
90
- {
91
- "type": "string"
92
- }
93
- ]
94
- },
95
- "ssr": {
96
- "description": "Produce SSR-oriented build. The value can be a string to directly specify the SSR entry, or true, which requires specifying the SSR entry via rollupOptions.input.",
97
- "oneOf": [
98
- {
99
- "type": "boolean"
100
- },
101
- {
102
- "type": "string"
103
- }
104
- ]
105
- },
106
- "logLevel": {
107
- "type": "string",
108
- "description": "Adjust console output verbosity.",
109
- "enum": ["info", "warn", "error", "silent"]
110
- },
111
- "mode": {
112
- "type": "string",
113
- "description": "Mode to run the build in."
114
- },
115
- "force": {
116
- "description": "Force the optimizer to ignore the cache and re-bundle",
117
- "type": "boolean"
118
- },
119
- "cssCodeSplit": {
120
- "description": "Enable/disable CSS code splitting. When enabled, CSS imported in async chunks will be inlined into the async chunk itself and inserted when the chunk is loaded.",
121
- "type": "boolean"
122
- },
123
- "watch": {
124
- "description": "Enable re-building when files change.",
125
- "oneOf": [
126
- {
127
- "type": "boolean"
128
- },
129
- {
130
- "type": "object"
131
- }
132
- ],
133
- "default": false
134
- },
135
- "generatePackageJson": {
136
- "description": "Generate a package.json for the build output.",
137
- "type": "boolean"
138
- },
139
- "includeDevDependenciesInPackageJson": {
140
- "description": "Include devDependencies in the generated package.json.",
141
- "type": "boolean"
142
- }
143
- },
144
- "definitions": {},
145
- "required": [],
146
- "examplesFile": "../../../docs/build-examples.md"
147
- }
@@ -1,2 +0,0 @@
1
- import { viteBuildExecutor } from "@nx/vite/executors";
2
- export default viteBuildExecutor;