@angular/build 18.0.0-next.3

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 (253) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +5 -0
  3. package/builders.json +14 -0
  4. package/package.json +87 -0
  5. package/src/builders/application/build-action.d.ts +33 -0
  6. package/src/builders/application/build-action.js +183 -0
  7. package/src/builders/application/execute-build.d.ts +11 -0
  8. package/src/builders/application/execute-build.js +125 -0
  9. package/src/builders/application/execute-post-bundle.d.ts +25 -0
  10. package/src/builders/application/execute-post-bundle.js +93 -0
  11. package/src/builders/application/i18n.d.ts +29 -0
  12. package/src/builders/application/i18n.js +128 -0
  13. package/src/builders/application/index.d.ts +57 -0
  14. package/src/builders/application/index.js +121 -0
  15. package/src/builders/application/options.d.ts +149 -0
  16. package/src/builders/application/options.js +369 -0
  17. package/src/builders/application/schema.d.ts +512 -0
  18. package/src/builders/application/schema.js +58 -0
  19. package/src/builders/application/schema.json +635 -0
  20. package/src/builders/application/setup-bundling.d.ts +19 -0
  21. package/src/builders/application/setup-bundling.js +71 -0
  22. package/src/builders/dev-server/builder.d.ts +32 -0
  23. package/src/builders/dev-server/builder.js +70 -0
  24. package/src/builders/dev-server/index.d.ts +14 -0
  25. package/src/builders/dev-server/index.js +15 -0
  26. package/src/builders/dev-server/internal.d.ts +19 -0
  27. package/src/builders/dev-server/internal.js +29 -0
  28. package/src/builders/dev-server/options.d.ts +47 -0
  29. package/src/builders/dev-server/options.js +65 -0
  30. package/src/builders/dev-server/output.d.ts +16 -0
  31. package/src/builders/dev-server/output.js +9 -0
  32. package/src/builders/dev-server/schema.d.ts +118 -0
  33. package/src/builders/dev-server/schema.js +4 -0
  34. package/src/builders/dev-server/schema.json +131 -0
  35. package/src/builders/dev-server/vite-server.d.ts +31 -0
  36. package/src/builders/dev-server/vite-server.js +504 -0
  37. package/src/index.d.ts +11 -0
  38. package/src/index.js +16 -0
  39. package/src/private.d.ts +35 -0
  40. package/src/private.js +70 -0
  41. package/src/tools/babel/plugins/adjust-static-class-members.d.ts +26 -0
  42. package/src/tools/babel/plugins/adjust-static-class-members.js +351 -0
  43. package/src/tools/babel/plugins/adjust-typescript-enums.d.ts +22 -0
  44. package/src/tools/babel/plugins/adjust-typescript-enums.js +113 -0
  45. package/src/tools/babel/plugins/elide-angular-metadata.d.ts +22 -0
  46. package/src/tools/babel/plugins/elide-angular-metadata.js +110 -0
  47. package/src/tools/babel/plugins/index.d.ts +11 -0
  48. package/src/tools/babel/plugins/index.js +21 -0
  49. package/src/tools/babel/plugins/pure-toplevel-functions.d.ts +15 -0
  50. package/src/tools/babel/plugins/pure-toplevel-functions.js +90 -0
  51. package/src/tools/babel/typings.d.ts +21 -0
  52. package/src/tools/esbuild/angular/angular-host.d.ts +26 -0
  53. package/src/tools/esbuild/angular/angular-host.js +134 -0
  54. package/src/tools/esbuild/angular/compilation/angular-compilation.d.ts +42 -0
  55. package/src/tools/esbuild/angular/compilation/angular-compilation.js +94 -0
  56. package/src/tools/esbuild/angular/compilation/aot-compilation.d.ts +21 -0
  57. package/src/tools/esbuild/angular/compilation/aot-compilation.js +224 -0
  58. package/src/tools/esbuild/angular/compilation/factory.d.ts +16 -0
  59. package/src/tools/esbuild/angular/compilation/factory.js +56 -0
  60. package/src/tools/esbuild/angular/compilation/index.d.ts +10 -0
  61. package/src/tools/esbuild/angular/compilation/index.js +17 -0
  62. package/src/tools/esbuild/angular/compilation/jit-bootstrap-transformer.d.ts +10 -0
  63. package/src/tools/esbuild/angular/compilation/jit-bootstrap-transformer.js +182 -0
  64. package/src/tools/esbuild/angular/compilation/jit-compilation.d.ts +21 -0
  65. package/src/tools/esbuild/angular/compilation/jit-compilation.js +106 -0
  66. package/src/tools/esbuild/angular/compilation/noop-compilation.d.ts +20 -0
  67. package/src/tools/esbuild/angular/compilation/noop-compilation.js +26 -0
  68. package/src/tools/esbuild/angular/compilation/parallel-compilation.d.ts +42 -0
  69. package/src/tools/esbuild/angular/compilation/parallel-compilation.js +123 -0
  70. package/src/tools/esbuild/angular/compilation/parallel-worker.d.ts +33 -0
  71. package/src/tools/esbuild/angular/compilation/parallel-worker.js +90 -0
  72. package/src/tools/esbuild/angular/compilation-state.d.ts +15 -0
  73. package/src/tools/esbuild/angular/compilation-state.js +44 -0
  74. package/src/tools/esbuild/angular/compiler-plugin.d.ts +27 -0
  75. package/src/tools/esbuild/angular/compiler-plugin.js +441 -0
  76. package/src/tools/esbuild/angular/component-stylesheets.d.ts +44 -0
  77. package/src/tools/esbuild/angular/component-stylesheets.js +150 -0
  78. package/src/tools/esbuild/angular/diagnostics.d.ts +15 -0
  79. package/src/tools/esbuild/angular/diagnostics.js +69 -0
  80. package/src/tools/esbuild/angular/file-reference-tracker.d.ts +17 -0
  81. package/src/tools/esbuild/angular/file-reference-tracker.js +57 -0
  82. package/src/tools/esbuild/angular/jit-plugin-callbacks.d.ts +23 -0
  83. package/src/tools/esbuild/angular/jit-plugin-callbacks.js +117 -0
  84. package/src/tools/esbuild/angular/jit-resource-transformer.d.ts +17 -0
  85. package/src/tools/esbuild/angular/jit-resource-transformer.js +186 -0
  86. package/src/tools/esbuild/angular/source-file-cache.d.ts +18 -0
  87. package/src/tools/esbuild/angular/source-file-cache.js +65 -0
  88. package/src/tools/esbuild/angular/uri.d.ts +54 -0
  89. package/src/tools/esbuild/angular/uri.js +74 -0
  90. package/src/tools/esbuild/angular/web-worker-transformer.d.ts +17 -0
  91. package/src/tools/esbuild/angular/web-worker-transformer.js +94 -0
  92. package/src/tools/esbuild/application-code-bundle.d.ts +20 -0
  93. package/src/tools/esbuild/application-code-bundle.js +368 -0
  94. package/src/tools/esbuild/budget-stats.d.ts +19 -0
  95. package/src/tools/esbuild/budget-stats.js +59 -0
  96. package/src/tools/esbuild/bundler-context.d.ts +75 -0
  97. package/src/tools/esbuild/bundler-context.js +366 -0
  98. package/src/tools/esbuild/bundler-execution-result.d.ts +71 -0
  99. package/src/tools/esbuild/bundler-execution-result.js +131 -0
  100. package/src/tools/esbuild/cache.d.ts +88 -0
  101. package/src/tools/esbuild/cache.js +92 -0
  102. package/src/tools/esbuild/commonjs-checker.d.ts +28 -0
  103. package/src/tools/esbuild/commonjs-checker.js +151 -0
  104. package/src/tools/esbuild/compiler-plugin-options.d.ts +16 -0
  105. package/src/tools/esbuild/compiler-plugin-options.js +49 -0
  106. package/src/tools/esbuild/external-packages-plugin.d.ts +18 -0
  107. package/src/tools/esbuild/external-packages-plugin.js +70 -0
  108. package/src/tools/esbuild/global-scripts.d.ts +16 -0
  109. package/src/tools/esbuild/global-scripts.js +142 -0
  110. package/src/tools/esbuild/global-styles.d.ts +10 -0
  111. package/src/tools/esbuild/global-styles.js +74 -0
  112. package/src/tools/esbuild/i18n-inliner-worker.d.ts +42 -0
  113. package/src/tools/esbuild/i18n-inliner-worker.js +136 -0
  114. package/src/tools/esbuild/i18n-inliner.d.ts +44 -0
  115. package/src/tools/esbuild/i18n-inliner.js +150 -0
  116. package/src/tools/esbuild/i18n-locale-plugin.d.ts +22 -0
  117. package/src/tools/esbuild/i18n-locale-plugin.js +120 -0
  118. package/src/tools/esbuild/index-html-generator.d.ts +15 -0
  119. package/src/tools/esbuild/index-html-generator.js +81 -0
  120. package/src/tools/esbuild/javascript-transformer-worker.d.ts +19 -0
  121. package/src/tools/esbuild/javascript-transformer-worker.js +154 -0
  122. package/src/tools/esbuild/javascript-transformer.d.ts +54 -0
  123. package/src/tools/esbuild/javascript-transformer.js +147 -0
  124. package/src/tools/esbuild/license-extractor.d.ts +25 -0
  125. package/src/tools/esbuild/license-extractor.js +158 -0
  126. package/src/tools/esbuild/load-result-cache.d.ts +21 -0
  127. package/src/tools/esbuild/load-result-cache.js +75 -0
  128. package/src/tools/esbuild/profiling.d.ts +11 -0
  129. package/src/tools/esbuild/profiling.js +78 -0
  130. package/src/tools/esbuild/rxjs-esm-resolution-plugin.d.ts +18 -0
  131. package/src/tools/esbuild/rxjs-esm-resolution-plugin.js +44 -0
  132. package/src/tools/esbuild/sourcemap-ignorelist-plugin.d.ts +17 -0
  133. package/src/tools/esbuild/sourcemap-ignorelist-plugin.js +73 -0
  134. package/src/tools/esbuild/stylesheets/bundle-options.d.ts +35 -0
  135. package/src/tools/esbuild/stylesheets/bundle-options.js +64 -0
  136. package/src/tools/esbuild/stylesheets/css-inline-fonts-plugin.d.ts +25 -0
  137. package/src/tools/esbuild/stylesheets/css-inline-fonts-plugin.js +57 -0
  138. package/src/tools/esbuild/stylesheets/css-language.d.ts +9 -0
  139. package/src/tools/esbuild/stylesheets/css-language.js +15 -0
  140. package/src/tools/esbuild/stylesheets/css-resource-plugin.d.ts +18 -0
  141. package/src/tools/esbuild/stylesheets/css-resource-plugin.js +114 -0
  142. package/src/tools/esbuild/stylesheets/less-language.d.ts +9 -0
  143. package/src/tools/esbuild/stylesheets/less-language.js +155 -0
  144. package/src/tools/esbuild/stylesheets/sass-language.d.ts +10 -0
  145. package/src/tools/esbuild/stylesheets/sass-language.js +185 -0
  146. package/src/tools/esbuild/stylesheets/stylesheet-plugin-factory.d.ts +58 -0
  147. package/src/tools/esbuild/stylesheets/stylesheet-plugin-factory.js +282 -0
  148. package/src/tools/esbuild/utils.d.ts +49 -0
  149. package/src/tools/esbuild/utils.js +392 -0
  150. package/src/tools/esbuild/virtual-module-plugin.d.ts +33 -0
  151. package/src/tools/esbuild/virtual-module-plugin.js +43 -0
  152. package/src/tools/esbuild/watcher.d.ts +25 -0
  153. package/src/tools/esbuild/watcher.js +118 -0
  154. package/src/tools/sass/lexer.d.ts +18 -0
  155. package/src/tools/sass/lexer.js +161 -0
  156. package/src/tools/sass/rebasing-importer.d.ts +101 -0
  157. package/src/tools/sass/rebasing-importer.js +334 -0
  158. package/src/tools/sass/sass-service.d.ts +72 -0
  159. package/src/tools/sass/sass-service.js +213 -0
  160. package/src/tools/sass/worker.d.ts +8 -0
  161. package/src/tools/sass/worker.js +192 -0
  162. package/src/tools/vite/angular-memory-plugin.d.ts +24 -0
  163. package/src/tools/vite/angular-memory-plugin.js +268 -0
  164. package/src/tools/vite/i18n-locale-plugin.d.ts +18 -0
  165. package/src/tools/vite/i18n-locale-plugin.js +55 -0
  166. package/src/utils/bundle-calculator.d.ts +44 -0
  167. package/src/utils/bundle-calculator.js +303 -0
  168. package/src/utils/check-port.d.ts +8 -0
  169. package/src/utils/check-port.js +58 -0
  170. package/src/utils/color.d.ts +10 -0
  171. package/src/utils/color.js +63 -0
  172. package/src/utils/delete-output-dir.d.ts +11 -0
  173. package/src/utils/delete-output-dir.js +46 -0
  174. package/src/utils/environment-options.d.ts +16 -0
  175. package/src/utils/environment-options.js +79 -0
  176. package/src/utils/error.d.ts +10 -0
  177. package/src/utils/error.js +21 -0
  178. package/src/utils/format-bytes.d.ts +8 -0
  179. package/src/utils/format-bytes.js +22 -0
  180. package/src/utils/i18n-options.d.ts +33 -0
  181. package/src/utils/i18n-options.js +161 -0
  182. package/src/utils/index-file/add-event-dispatch-contract.d.ts +8 -0
  183. package/src/utils/index-file/add-event-dispatch-contract.js +28 -0
  184. package/src/utils/index-file/augment-index-html.d.ts +40 -0
  185. package/src/utils/index-file/augment-index-html.js +239 -0
  186. package/src/utils/index-file/html-rewriting-stream.d.ts +11 -0
  187. package/src/utils/index-file/html-rewriting-stream.js +28 -0
  188. package/src/utils/index-file/index-html-generator.d.ts +57 -0
  189. package/src/utils/index-file/index-html-generator.js +135 -0
  190. package/src/utils/index-file/inline-critical-css.d.ts +24 -0
  191. package/src/utils/index-file/inline-critical-css.js +179 -0
  192. package/src/utils/index-file/inline-fonts.d.ts +23 -0
  193. package/src/utils/index-file/inline-fonts.js +267 -0
  194. package/src/utils/index-file/nonce.d.ts +12 -0
  195. package/src/utils/index-file/nonce.js +55 -0
  196. package/src/utils/index-file/style-nonce.d.ts +12 -0
  197. package/src/utils/index-file/style-nonce.js +55 -0
  198. package/src/utils/index.d.ts +11 -0
  199. package/src/utils/index.js +27 -0
  200. package/src/utils/load-esm.d.ts +20 -0
  201. package/src/utils/load-esm.js +31 -0
  202. package/src/utils/load-proxy-config.d.ts +8 -0
  203. package/src/utils/load-proxy-config.js +189 -0
  204. package/src/utils/load-translations.d.ts +16 -0
  205. package/src/utils/load-translations.js +84 -0
  206. package/src/utils/normalize-asset-patterns.d.ts +14 -0
  207. package/src/utils/normalize-asset-patterns.js +96 -0
  208. package/src/utils/normalize-cache.d.ts +16 -0
  209. package/src/utils/normalize-cache.js +44 -0
  210. package/src/utils/normalize-optimization.d.ts +13 -0
  211. package/src/utils/normalize-optimization.js +42 -0
  212. package/src/utils/normalize-source-maps.d.ts +9 -0
  213. package/src/utils/normalize-source-maps.js +23 -0
  214. package/src/utils/postcss-configuration.d.ts +17 -0
  215. package/src/utils/postcss-configuration.js +86 -0
  216. package/src/utils/purge-cache.d.ts +10 -0
  217. package/src/utils/purge-cache.js +40 -0
  218. package/src/utils/resolve-assets.d.ts +18 -0
  219. package/src/utils/resolve-assets.js +35 -0
  220. package/src/utils/routes-extractor/extractor.d.ts +15 -0
  221. package/src/utils/routes-extractor/extractor.js +97 -0
  222. package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.d.ts +18 -0
  223. package/src/utils/server-rendering/esm-in-memory-loader/loader-hooks.js +129 -0
  224. package/src/utils/server-rendering/esm-in-memory-loader/register-hooks.d.ts +8 -0
  225. package/src/utils/server-rendering/esm-in-memory-loader/register-hooks.js +13 -0
  226. package/src/utils/server-rendering/fetch-patch.d.ts +8 -0
  227. package/src/utils/server-rendering/fetch-patch.js +66 -0
  228. package/src/utils/server-rendering/load-esm-from-memory.d.ts +10 -0
  229. package/src/utils/server-rendering/load-esm-from-memory.js +26 -0
  230. package/src/utils/server-rendering/main-bundle-exports.d.ts +27 -0
  231. package/src/utils/server-rendering/main-bundle-exports.js +9 -0
  232. package/src/utils/server-rendering/prerender.d.ts +23 -0
  233. package/src/utils/server-rendering/prerender.js +192 -0
  234. package/src/utils/server-rendering/render-page.d.ts +26 -0
  235. package/src/utils/server-rendering/render-page.js +110 -0
  236. package/src/utils/server-rendering/render-worker.d.ts +22 -0
  237. package/src/utils/server-rendering/render-worker.js +30 -0
  238. package/src/utils/server-rendering/routes-extractor-worker.d.ts +21 -0
  239. package/src/utils/server-rendering/routes-extractor-worker.js +53 -0
  240. package/src/utils/service-worker.d.ts +25 -0
  241. package/src/utils/service-worker.js +211 -0
  242. package/src/utils/spinner.d.ts +20 -0
  243. package/src/utils/spinner.js +55 -0
  244. package/src/utils/stats-table.d.ts +20 -0
  245. package/src/utils/stats-table.js +205 -0
  246. package/src/utils/supported-browsers.d.ts +10 -0
  247. package/src/utils/supported-browsers.js +42 -0
  248. package/src/utils/tty.d.ts +8 -0
  249. package/src/utils/tty.js +23 -0
  250. package/src/utils/url.d.ts +8 -0
  251. package/src/utils/url.js +18 -0
  252. package/src/utils/version.d.ts +8 -0
  253. package/src/utils/version.js +59 -0
@@ -0,0 +1,635 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema",
3
+ "title": "Application schema for Build Facade.",
4
+ "description": "Application builder target options",
5
+ "type": "object",
6
+ "properties": {
7
+ "assets": {
8
+ "type": "array",
9
+ "description": "List of static application assets.",
10
+ "default": [],
11
+ "items": {
12
+ "$ref": "#/definitions/assetPattern"
13
+ }
14
+ },
15
+ "browser": {
16
+ "type": "string",
17
+ "description": "The full path for the browser entry point to the application, relative to the current workspace."
18
+ },
19
+ "server": {
20
+ "type": "string",
21
+ "description": "The full path for the server entry point to the application, relative to the current workspace."
22
+ },
23
+ "polyfills": {
24
+ "description": "A list of polyfills to include in the build. Can be a full path for a file, relative to the current workspace or module specifier. Example: 'zone.js'.",
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string",
28
+ "uniqueItems": true
29
+ },
30
+ "default": []
31
+ },
32
+ "tsConfig": {
33
+ "type": "string",
34
+ "description": "The full path for the TypeScript configuration file, relative to the current workspace."
35
+ },
36
+ "deployUrl": {
37
+ "type": "string",
38
+ "description": "Customize the base path for the URLs of resources in 'index.html' and component stylesheets. This option is only necessary for specific deployment scenarios, such as with Angular Elements or when utilizing different CDN locations."
39
+ },
40
+ "scripts": {
41
+ "description": "Global scripts to be included in the build.",
42
+ "type": "array",
43
+ "default": [],
44
+ "items": {
45
+ "oneOf": [
46
+ {
47
+ "type": "object",
48
+ "properties": {
49
+ "input": {
50
+ "type": "string",
51
+ "description": "The file to include.",
52
+ "pattern": "\\.[cm]?jsx?$"
53
+ },
54
+ "bundleName": {
55
+ "type": "string",
56
+ "pattern": "^[\\w\\-.]*$",
57
+ "description": "The bundle name for this extra entry point."
58
+ },
59
+ "inject": {
60
+ "type": "boolean",
61
+ "description": "If the bundle will be referenced in the HTML file.",
62
+ "default": true
63
+ }
64
+ },
65
+ "additionalProperties": false,
66
+ "required": ["input"]
67
+ },
68
+ {
69
+ "type": "string",
70
+ "description": "The JavaScript/TypeScript file or package containing the file to include."
71
+ }
72
+ ]
73
+ }
74
+ },
75
+ "styles": {
76
+ "description": "Global styles to be included in the build.",
77
+ "type": "array",
78
+ "default": [],
79
+ "items": {
80
+ "oneOf": [
81
+ {
82
+ "type": "object",
83
+ "properties": {
84
+ "input": {
85
+ "type": "string",
86
+ "description": "The file to include.",
87
+ "pattern": "\\.(?:css|scss|sass|less)$"
88
+ },
89
+ "bundleName": {
90
+ "type": "string",
91
+ "pattern": "^[\\w\\-.]*$",
92
+ "description": "The bundle name for this extra entry point."
93
+ },
94
+ "inject": {
95
+ "type": "boolean",
96
+ "description": "If the bundle will be referenced in the HTML file.",
97
+ "default": true
98
+ }
99
+ },
100
+ "additionalProperties": false,
101
+ "required": ["input"]
102
+ },
103
+ {
104
+ "type": "string",
105
+ "description": "The file to include.",
106
+ "pattern": "\\.(?:css|scss|sass|less)$"
107
+ }
108
+ ]
109
+ }
110
+ },
111
+ "inlineStyleLanguage": {
112
+ "description": "The stylesheet language to use for the application's inline component styles.",
113
+ "type": "string",
114
+ "default": "css",
115
+ "enum": ["css", "less", "sass", "scss"]
116
+ },
117
+ "stylePreprocessorOptions": {
118
+ "description": "Options to pass to style preprocessors.",
119
+ "type": "object",
120
+ "properties": {
121
+ "includePaths": {
122
+ "description": "Paths to include. Paths will be resolved to workspace root.",
123
+ "type": "array",
124
+ "items": {
125
+ "type": "string"
126
+ },
127
+ "default": []
128
+ }
129
+ },
130
+ "additionalProperties": false
131
+ },
132
+ "externalDependencies": {
133
+ "description": "Exclude the listed external dependencies from being bundled into the bundle. Instead, the created bundle relies on these dependencies to be available during runtime.",
134
+ "type": "array",
135
+ "items": {
136
+ "type": "string"
137
+ },
138
+ "default": []
139
+ },
140
+ "clearScreen": {
141
+ "type": "boolean",
142
+ "default": false,
143
+ "description": "Automatically clear the terminal screen during rebuilds."
144
+ },
145
+ "optimization": {
146
+ "description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.io/guide/workspace-config#optimization-configuration.",
147
+ "default": true,
148
+ "x-user-analytics": "ep.ng_optimization",
149
+ "oneOf": [
150
+ {
151
+ "type": "object",
152
+ "properties": {
153
+ "scripts": {
154
+ "type": "boolean",
155
+ "description": "Enables optimization of the scripts output.",
156
+ "default": true
157
+ },
158
+ "styles": {
159
+ "description": "Enables optimization of the styles output.",
160
+ "default": true,
161
+ "oneOf": [
162
+ {
163
+ "type": "object",
164
+ "properties": {
165
+ "minify": {
166
+ "type": "boolean",
167
+ "description": "Minify CSS definitions by removing extraneous whitespace and comments, merging identifiers and minimizing values.",
168
+ "default": true
169
+ },
170
+ "inlineCritical": {
171
+ "type": "boolean",
172
+ "description": "Extract and inline critical CSS definitions to improve first paint time.",
173
+ "default": true
174
+ },
175
+ "removeSpecialComments": {
176
+ "type": "boolean",
177
+ "description": "Remove comments in global CSS that contains '@license' or '@preserve' or that starts with '//!' or '/*!'.",
178
+ "default": true
179
+ }
180
+ },
181
+ "additionalProperties": false
182
+ },
183
+ {
184
+ "type": "boolean"
185
+ }
186
+ ]
187
+ },
188
+ "fonts": {
189
+ "description": "Enables optimization for fonts. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
190
+ "default": true,
191
+ "oneOf": [
192
+ {
193
+ "type": "object",
194
+ "properties": {
195
+ "inline": {
196
+ "type": "boolean",
197
+ "description": "Reduce render blocking requests by inlining external Google Fonts and Adobe Fonts CSS definitions in the application's HTML index file. This option requires internet access. `HTTPS_PROXY` environment variable can be used to specify a proxy server.",
198
+ "default": true
199
+ }
200
+ },
201
+ "additionalProperties": false
202
+ },
203
+ {
204
+ "type": "boolean"
205
+ }
206
+ ]
207
+ }
208
+ },
209
+ "additionalProperties": false
210
+ },
211
+ {
212
+ "type": "boolean"
213
+ }
214
+ ]
215
+ },
216
+ "loader": {
217
+ "description": "Defines the type of loader to use with a specified file extension when used with a JavaScript `import`. `text` inlines the content as a string; `binary` inlines the content as a Uint8Array; `file` emits the file and provides the runtime location of the file; `empty` considers the content to be empty and not include it in bundles.",
218
+ "type": "object",
219
+ "patternProperties": {
220
+ "^\\.\\S+$": { "enum": ["text", "binary", "file", "empty"] }
221
+ }
222
+ },
223
+ "define": {
224
+ "description": "Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced.",
225
+ "type": "object",
226
+ "additionalProperties": {
227
+ "type": "string"
228
+ }
229
+ },
230
+ "fileReplacements": {
231
+ "description": "Replace compilation source files with other compilation source files in the build.",
232
+ "type": "array",
233
+ "items": {
234
+ "$ref": "#/definitions/fileReplacement"
235
+ },
236
+ "default": []
237
+ },
238
+ "outputPath": {
239
+ "description": "Specify the output path relative to workspace root.",
240
+ "oneOf": [
241
+ {
242
+ "type": "object",
243
+ "properties": {
244
+ "base": {
245
+ "type": "string",
246
+ "description": "Specify the output path relative to workspace root."
247
+ },
248
+ "browser": {
249
+ "type": "string",
250
+ "pattern": "^[-\\w\\.]*$",
251
+ "default": "browser",
252
+ "description": "The output directory name of your browser build within the output path base. Defaults to 'browser'."
253
+ },
254
+ "server": {
255
+ "type": "string",
256
+ "pattern": "^[-\\w\\.]*$",
257
+ "default": "server",
258
+ "description": "The output directory name of your server build within the output path base. Defaults to 'server'."
259
+ },
260
+ "media": {
261
+ "type": "string",
262
+ "pattern": "^[-\\w\\.]+$",
263
+ "default": "media",
264
+ "description": "The output directory name of your media files within the output browser directory. Defaults to 'media'."
265
+ }
266
+ },
267
+ "required": ["base"],
268
+ "additionalProperties": false
269
+ },
270
+ {
271
+ "type": "string"
272
+ }
273
+ ]
274
+ },
275
+ "aot": {
276
+ "type": "boolean",
277
+ "description": "Build using Ahead of Time compilation.",
278
+ "x-user-analytics": "ep.ng_aot",
279
+ "default": true
280
+ },
281
+ "sourceMap": {
282
+ "description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration.",
283
+ "default": false,
284
+ "oneOf": [
285
+ {
286
+ "type": "object",
287
+ "properties": {
288
+ "scripts": {
289
+ "type": "boolean",
290
+ "description": "Output source maps for all scripts.",
291
+ "default": true
292
+ },
293
+ "styles": {
294
+ "type": "boolean",
295
+ "description": "Output source maps for all styles.",
296
+ "default": true
297
+ },
298
+ "hidden": {
299
+ "type": "boolean",
300
+ "description": "Output source maps used for error reporting tools.",
301
+ "default": false
302
+ },
303
+ "vendor": {
304
+ "type": "boolean",
305
+ "description": "Resolve vendor packages source maps.",
306
+ "default": false
307
+ }
308
+ },
309
+ "additionalProperties": false
310
+ },
311
+ {
312
+ "type": "boolean"
313
+ }
314
+ ]
315
+ },
316
+ "baseHref": {
317
+ "type": "string",
318
+ "description": "Base url for the application being built."
319
+ },
320
+ "verbose": {
321
+ "type": "boolean",
322
+ "description": "Adds more details to output logging.",
323
+ "default": false
324
+ },
325
+ "progress": {
326
+ "type": "boolean",
327
+ "description": "Log progress to the console while building.",
328
+ "default": true
329
+ },
330
+ "i18nMissingTranslation": {
331
+ "type": "string",
332
+ "description": "How to handle missing translations for i18n.",
333
+ "enum": ["warning", "error", "ignore"],
334
+ "default": "warning"
335
+ },
336
+ "i18nDuplicateTranslation": {
337
+ "type": "string",
338
+ "description": "How to handle duplicate translations for i18n.",
339
+ "enum": ["warning", "error", "ignore"],
340
+ "default": "warning"
341
+ },
342
+ "localize": {
343
+ "description": "Translate the bundles in one or more locales.",
344
+ "oneOf": [
345
+ {
346
+ "type": "boolean",
347
+ "description": "Translate all locales."
348
+ },
349
+ {
350
+ "type": "array",
351
+ "description": "List of locales ID's to translate.",
352
+ "minItems": 1,
353
+ "items": {
354
+ "type": "string",
355
+ "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z]{4})?(-([a-zA-Z]{2}|[0-9]{3}))?(-[a-zA-Z]{5,8})?(-x(-[a-zA-Z0-9]{1,8})+)?$"
356
+ }
357
+ }
358
+ ]
359
+ },
360
+ "watch": {
361
+ "type": "boolean",
362
+ "description": "Run build when files change.",
363
+ "default": false
364
+ },
365
+ "outputHashing": {
366
+ "type": "string",
367
+ "description": "Define the output filename cache-busting hashing mode.",
368
+ "default": "none",
369
+ "enum": ["none", "all", "media", "bundles"]
370
+ },
371
+ "poll": {
372
+ "type": "number",
373
+ "description": "Enable and define the file watching poll time period in milliseconds."
374
+ },
375
+ "deleteOutputPath": {
376
+ "type": "boolean",
377
+ "description": "Delete the output path before building.",
378
+ "default": true
379
+ },
380
+ "preserveSymlinks": {
381
+ "type": "boolean",
382
+ "description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
383
+ },
384
+ "extractLicenses": {
385
+ "type": "boolean",
386
+ "description": "Extract all licenses in a separate file.",
387
+ "default": true
388
+ },
389
+ "namedChunks": {
390
+ "type": "boolean",
391
+ "description": "Use file name for lazy loaded chunks.",
392
+ "default": false
393
+ },
394
+ "subresourceIntegrity": {
395
+ "type": "boolean",
396
+ "description": "Enables the use of subresource integrity validation.",
397
+ "default": false
398
+ },
399
+ "serviceWorker": {
400
+ "description": "Generates a service worker configuration.",
401
+ "default": false,
402
+ "oneOf": [
403
+ {
404
+ "type": "string",
405
+ "description": "Path to ngsw-config.json."
406
+ },
407
+ {
408
+ "const": false,
409
+ "type": "boolean",
410
+ "description": "Does not generate a service worker configuration."
411
+ }
412
+ ]
413
+ },
414
+ "index": {
415
+ "description": "Configures the generation of the application's HTML index.",
416
+ "oneOf": [
417
+ {
418
+ "type": "string",
419
+ "description": "The path of a file to use for the application's HTML index. The filename of the specified path will be used for the generated file and will be created in the root of the application's configured output path."
420
+ },
421
+ {
422
+ "type": "object",
423
+ "description": "",
424
+ "properties": {
425
+ "input": {
426
+ "type": "string",
427
+ "minLength": 1,
428
+ "description": "The path of a file to use for the application's generated HTML index."
429
+ },
430
+ "output": {
431
+ "type": "string",
432
+ "minLength": 1,
433
+ "default": "index.html",
434
+ "description": "The output path of the application's generated HTML index file. The full provided path will be used and will be considered relative to the application's configured output path."
435
+ },
436
+ "preloadInitial": {
437
+ "type": "boolean",
438
+ "default": true,
439
+ "description": "Generates 'preload', 'modulepreload', and 'preconnect' link elements for initial application files and resources."
440
+ }
441
+ },
442
+ "required": ["input"]
443
+ },
444
+ {
445
+ "const": false,
446
+ "type": "boolean",
447
+ "description": "Does not generate an `index.html` file."
448
+ }
449
+ ]
450
+ },
451
+ "statsJson": {
452
+ "type": "boolean",
453
+ "description": "Generates a 'stats.json' file which can be analyzed with https://esbuild.github.io/analyze/.",
454
+ "default": false
455
+ },
456
+ "budgets": {
457
+ "description": "Budget thresholds to ensure parts of your application stay within boundaries which you set.",
458
+ "type": "array",
459
+ "items": {
460
+ "$ref": "#/definitions/budget"
461
+ },
462
+ "default": []
463
+ },
464
+ "webWorkerTsConfig": {
465
+ "type": "string",
466
+ "description": "TypeScript configuration for Web Worker modules."
467
+ },
468
+ "crossOrigin": {
469
+ "type": "string",
470
+ "description": "Define the crossorigin attribute setting of elements that provide CORS support.",
471
+ "default": "none",
472
+ "enum": ["none", "anonymous", "use-credentials"]
473
+ },
474
+ "allowedCommonJsDependencies": {
475
+ "description": "A list of CommonJS or AMD packages that are allowed to be used without a build time warning. Use `'*'` to allow all.",
476
+ "type": "array",
477
+ "items": {
478
+ "type": "string"
479
+ },
480
+ "default": []
481
+ },
482
+ "prerender": {
483
+ "description": "Prerender (SSG) pages of your application during build time.",
484
+ "default": false,
485
+ "oneOf": [
486
+ {
487
+ "type": "boolean",
488
+ "description": "Enable prerending of pages of your application during build time."
489
+ },
490
+ {
491
+ "type": "object",
492
+ "properties": {
493
+ "routesFile": {
494
+ "type": "string",
495
+ "description": "The path to a file that contains a list of all routes to prerender, separated by newlines. This option is useful if you want to prerender routes with parameterized URLs."
496
+ },
497
+ "discoverRoutes": {
498
+ "type": "boolean",
499
+ "description": "Whether the builder should process the Angular Router configuration to find all unparameterized routes and prerender them.",
500
+ "default": true
501
+ }
502
+ },
503
+ "additionalProperties": false
504
+ }
505
+ ]
506
+ },
507
+ "ssr": {
508
+ "description": "Server side render (SSR) pages of your application during runtime.",
509
+ "default": false,
510
+ "oneOf": [
511
+ {
512
+ "type": "boolean",
513
+ "description": "Enable the server bundles to be written to disk."
514
+ },
515
+ {
516
+ "type": "object",
517
+ "properties": {
518
+ "entry": {
519
+ "type": "string",
520
+ "description": "The server entry-point that when executed will spawn the web server."
521
+ }
522
+ },
523
+ "additionalProperties": false
524
+ }
525
+ ]
526
+ },
527
+ "appShell": {
528
+ "type": "boolean",
529
+ "description": "Generates an application shell during build time.",
530
+ "default": false
531
+ }
532
+ },
533
+ "additionalProperties": false,
534
+ "required": ["outputPath", "index", "browser", "tsConfig"],
535
+ "definitions": {
536
+ "assetPattern": {
537
+ "oneOf": [
538
+ {
539
+ "type": "object",
540
+ "properties": {
541
+ "followSymlinks": {
542
+ "type": "boolean",
543
+ "default": false,
544
+ "description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched."
545
+ },
546
+ "glob": {
547
+ "type": "string",
548
+ "description": "The pattern to match."
549
+ },
550
+ "input": {
551
+ "type": "string",
552
+ "description": "The input directory path in which to apply 'glob'. Defaults to the project root."
553
+ },
554
+ "ignore": {
555
+ "description": "An array of globs to ignore.",
556
+ "type": "array",
557
+ "items": {
558
+ "type": "string"
559
+ }
560
+ },
561
+ "output": {
562
+ "type": "string",
563
+ "default": "",
564
+ "description": "Absolute path within the output."
565
+ }
566
+ },
567
+ "additionalProperties": false,
568
+ "required": ["glob", "input"]
569
+ },
570
+ {
571
+ "type": "string"
572
+ }
573
+ ]
574
+ },
575
+ "fileReplacement": {
576
+ "type": "object",
577
+ "properties": {
578
+ "replace": {
579
+ "type": "string",
580
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
581
+ },
582
+ "with": {
583
+ "type": "string",
584
+ "pattern": "\\.(([cm]?[jt])sx?|json)$"
585
+ }
586
+ },
587
+ "additionalProperties": false,
588
+ "required": ["replace", "with"]
589
+ },
590
+ "budget": {
591
+ "type": "object",
592
+ "properties": {
593
+ "type": {
594
+ "type": "string",
595
+ "description": "The type of budget.",
596
+ "enum": ["all", "allScript", "any", "anyScript", "anyComponentStyle", "bundle", "initial"]
597
+ },
598
+ "name": {
599
+ "type": "string",
600
+ "description": "The name of the bundle."
601
+ },
602
+ "baseline": {
603
+ "type": "string",
604
+ "description": "The baseline size for comparison."
605
+ },
606
+ "maximumWarning": {
607
+ "type": "string",
608
+ "description": "The maximum threshold for warning relative to the baseline."
609
+ },
610
+ "maximumError": {
611
+ "type": "string",
612
+ "description": "The maximum threshold for error relative to the baseline."
613
+ },
614
+ "minimumWarning": {
615
+ "type": "string",
616
+ "description": "The minimum threshold for warning relative to the baseline."
617
+ },
618
+ "minimumError": {
619
+ "type": "string",
620
+ "description": "The minimum threshold for error relative to the baseline."
621
+ },
622
+ "warning": {
623
+ "type": "string",
624
+ "description": "The threshold for warning relative to the baseline (min & max)."
625
+ },
626
+ "error": {
627
+ "type": "string",
628
+ "description": "The threshold for error relative to the baseline (min & max)."
629
+ }
630
+ },
631
+ "additionalProperties": false,
632
+ "required": ["type"]
633
+ }
634
+ }
635
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import { SourceFileCache } from '../../tools/esbuild/angular/source-file-cache';
9
+ import { BundlerContext } from '../../tools/esbuild/bundler-context';
10
+ import { NormalizedApplicationBuildOptions } from './options';
11
+ /**
12
+ * Generates one or more BundlerContext instances based on the builder provided
13
+ * configuration.
14
+ * @param options The normalized application builder options to use.
15
+ * @param browsers An string array of browserslist browsers to support.
16
+ * @param codeBundleCache An instance of the TypeScript source file cache.
17
+ * @returns An array of BundlerContext objects.
18
+ */
19
+ export declare function setupBundlerContexts(options: NormalizedApplicationBuildOptions, browsers: string[], codeBundleCache: SourceFileCache): BundlerContext[];