@schematics/angular 17.0.0 → 17.0.1

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.
@@ -227,7 +227,7 @@
227
227
  </svg>
228
228
  <h1>Hello, {{ title }}</h1>
229
229
  <p>Congratulations! Your app is running. 🎉</p>
230
- </div>
230
+ </div>
231
231
  <div class="divider" role="separator" aria-label="Divider"></div>
232
232
  <div class="right-side">
233
233
  <div class="pill-group">
@@ -240,7 +240,7 @@
240
240
  ]; track item.title) {
241
241
  <a
242
242
  class="pill"
243
- href="{{ item.link }}"
243
+ [href]="item.link"
244
244
  target="_blank"
245
245
  rel="noopener"
246
246
  >
@@ -11,7 +11,7 @@ import { Component } from '@angular/core';
11
11
  `,<% } else { %>
12
12
  templateUrl: './app.component.html',<% } if(inlineStyle) { %>
13
13
  styles: []<% } else { %>
14
- styleUrls: ['./app.component.<%= style %>']<% } %>
14
+ styleUrl: './app.component.<%= style %>'<% } %>
15
15
  })
16
16
  export class AppComponent {
17
17
  title = '<%= name %>';
@@ -15,7 +15,7 @@ import { RouterOutlet } from '@angular/router';<% } %>
15
15
  `,<% } else { %>
16
16
  templateUrl: './app.component.html',<% } if(inlineStyle) { %>
17
17
  styles: [],<% } else { %>
18
- styleUrls: ['./app.component.<%= style %>']<% } %>
18
+ styleUrl: './app.component.<%= style %>'<% } %>
19
19
  })
20
20
  export class AppComponent {
21
21
  title = '<%= name %>';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "17.0.0",
3
+ "version": "17.0.1",
4
4
  "description": "Schematics specific to Angular",
5
5
  "homepage": "https://github.com/angular/angular-cli",
6
6
  "keywords": [
@@ -23,8 +23,8 @@
23
23
  },
24
24
  "schematics": "./collection.json",
25
25
  "dependencies": {
26
- "@angular-devkit/core": "17.0.0",
27
- "@angular-devkit/schematics": "17.0.0",
26
+ "@angular-devkit/core": "17.0.1",
27
+ "@angular-devkit/schematics": "17.0.1",
28
28
  "jsonc-parser": "3.2.0"
29
29
  },
30
30
  "repository": {
package/ssr/index.js CHANGED
@@ -33,22 +33,28 @@ async function getOutputPath(host, projectName, target) {
33
33
  }
34
34
  return outputPath;
35
35
  }
36
- function addScriptsRule(options) {
36
+ function addScriptsRule({ project }, isUsingApplicationBuilder) {
37
37
  return async (host) => {
38
38
  const pkgPath = '/package.json';
39
- const buffer = host.read(pkgPath);
40
- if (buffer === null) {
39
+ const pkg = host.readJson(pkgPath);
40
+ if (pkg === null) {
41
41
  throw new schematics_1.SchematicsException('Could not find package.json');
42
42
  }
43
- const serverDist = await getOutputPath(host, options.project, 'server');
44
- const pkg = JSON.parse(buffer.toString());
45
- pkg.scripts = {
46
- ...pkg.scripts,
47
- 'dev:ssr': `ng run ${options.project}:${SERVE_SSR_TARGET_NAME}`,
48
- 'serve:ssr': `node ${serverDist}/main.js`,
49
- 'build:ssr': `ng build && ng run ${options.project}:server`,
50
- 'prerender': `ng run ${options.project}:${PRERENDER_TARGET_NAME}`,
51
- };
43
+ if (isUsingApplicationBuilder) {
44
+ const distPath = await getOutputPath(host, project, 'build');
45
+ pkg.scripts ??= {};
46
+ pkg.scripts[`serve:ssr:${project}`] = `node ${distPath}/server/server.mjs`;
47
+ }
48
+ else {
49
+ const serverDist = await getOutputPath(host, project, 'server');
50
+ pkg.scripts = {
51
+ ...pkg.scripts,
52
+ 'dev:ssr': `ng run ${project}:${SERVE_SSR_TARGET_NAME}`,
53
+ 'serve:ssr': `node ${serverDist}/main.js`,
54
+ 'build:ssr': `ng build && ng run ${project}:server`,
55
+ 'prerender': `ng run ${project}:${PRERENDER_TARGET_NAME}`,
56
+ };
57
+ }
52
58
  host.overwrite(pkgPath, JSON.stringify(pkg, null, 2));
53
59
  };
54
60
  }
@@ -218,11 +224,11 @@ function default_1(options) {
218
224
  updateApplicationBuilderTsConfigRule(options),
219
225
  ]
220
226
  : [
221
- addScriptsRule(options),
222
227
  updateWebpackBuilderServerTsConfigRule(options),
223
228
  updateWebpackBuilderWorkspaceConfigRule(options),
224
229
  ]),
225
230
  addServerFile(options, isStandalone),
231
+ addScriptsRule(options, isUsingApplicationBuilder),
226
232
  addDependencies(),
227
233
  ]);
228
234
  };
@@ -14,6 +14,6 @@ exports.latestVersions = {
14
14
  ...require('./latest-versions/package.json')['dependencies'],
15
15
  // As Angular CLI works with same minor versions of Angular Framework, a tilde match for the current
16
16
  Angular: '^17.0.0',
17
- DevkitBuildAngular: '^17.0.0',
18
- AngularSSR: '^17.0.0',
17
+ DevkitBuildAngular: '^17.0.1',
18
+ AngularSSR: '^17.0.1',
19
19
  };
@@ -12,7 +12,6 @@
12
12
  "esModuleInterop": true,
13
13
  "sourceMap": true,
14
14
  "declaration": false,
15
- "downlevelIteration": true,
16
15
  "experimentalDecorators": true,
17
16
  "moduleResolution": "node",
18
17
  "importHelpers": true,