@schematics/angular 17.0.6 → 17.1.0-next.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.
@@ -6,6 +6,7 @@
6
6
  "@types/express": "^4.17.17",
7
7
  "@types/jasmine": "~5.1.0",
8
8
  "@types/node": "^18.18.0",
9
+ "browser-sync": "^2.29.3",
9
10
  "express": "^4.18.2",
10
11
  "jasmine-core": "~5.1.0",
11
12
  "jasmine-spec-reporter": "~7.0.0",
@@ -14,12 +15,12 @@
14
15
  "karma-jasmine-html-reporter": "~2.1.0",
15
16
  "karma-jasmine": "~5.1.0",
16
17
  "karma": "~6.4.0",
17
- "ng-packagr": "^17.0.0",
18
+ "ng-packagr": "^17.1.0-next.0",
18
19
  "protractor": "~7.0.0",
19
20
  "rxjs": "~7.8.0",
20
21
  "tslib": "^2.3.0",
21
22
  "ts-node": "~10.9.0",
22
- "typescript": "~5.2.2",
23
+ "typescript": "~5.3.2",
23
24
  "zone.js": "~0.14.2"
24
25
  }
25
26
  }
@@ -13,7 +13,7 @@ exports.latestVersions = {
13
13
  // but ts_library doesn't support JSON inputs.
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
- Angular: '^17.0.0',
17
- DevkitBuildAngular: '^17.0.6',
18
- AngularSSR: '^17.0.6',
16
+ Angular: '^17.1.0-next.0',
17
+ DevkitBuildAngular: '^17.1.0-next.1',
18
+ AngularSSR: '^17.1.0-next.1',
19
19
  };
@@ -20,6 +20,8 @@ export declare enum Builders {
20
20
  AppShell = "@angular-devkit/build-angular:app-shell",
21
21
  Server = "@angular-devkit/build-angular:server",
22
22
  Browser = "@angular-devkit/build-angular:browser",
23
+ SsrDevServer = "@angular-devkit/build-angular:ssr-dev-server",
24
+ Prerender = "@angular-devkit/build-angular:prerender",
23
25
  BrowserEsbuild = "@angular-devkit/build-angular:browser-esbuild",
24
26
  Karma = "@angular-devkit/build-angular:karma",
25
27
  TsLint = "@angular-devkit/build-angular:tslint",
@@ -25,6 +25,8 @@ var Builders;
25
25
  Builders["AppShell"] = "@angular-devkit/build-angular:app-shell";
26
26
  Builders["Server"] = "@angular-devkit/build-angular:server";
27
27
  Builders["Browser"] = "@angular-devkit/build-angular:browser";
28
+ Builders["SsrDevServer"] = "@angular-devkit/build-angular:ssr-dev-server";
29
+ Builders["Prerender"] = "@angular-devkit/build-angular:prerender";
28
30
  Builders["BrowserEsbuild"] = "@angular-devkit/build-angular:browser-esbuild";
29
31
  Builders["Karma"] = "@angular-devkit/build-angular:karma";
30
32
  Builders["TsLint"] = "@angular-devkit/build-angular:tslint";
@@ -10,6 +10,17 @@ import { Rule, Tree } from '@angular-devkit/schematics';
10
10
  export type WorkspaceDefinition = workspaces.WorkspaceDefinition;
11
11
  export type ProjectDefinition = workspaces.ProjectDefinition;
12
12
  export type TargetDefinition = workspaces.TargetDefinition;
13
+ /**
14
+ * A {@link workspaces.WorkspaceHost} backed by a Schematics {@link Tree} instance.
15
+ */
16
+ export declare class TreeWorkspaceHost implements workspaces.WorkspaceHost {
17
+ private readonly tree;
18
+ constructor(tree: Tree);
19
+ readFile(path: string): Promise<string>;
20
+ writeFile(path: string, data: string): Promise<void>;
21
+ isDirectory(path: string): Promise<boolean>;
22
+ isFile(path: string): Promise<boolean>;
23
+ }
13
24
  /**
14
25
  * Updates the workspace file (`angular.json`) found within the root of the schematic's tree.
15
26
  * The workspace object model can be directly modified within the provided updater function
@@ -7,7 +7,7 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.allTargetOptions = exports.allWorkspaceTargets = exports.createDefaultPath = exports.buildDefaultPath = exports.writeWorkspace = exports.getWorkspace = exports.updateWorkspace = void 0;
10
+ exports.allTargetOptions = exports.allWorkspaceTargets = exports.createDefaultPath = exports.buildDefaultPath = exports.writeWorkspace = exports.getWorkspace = exports.updateWorkspace = exports.TreeWorkspaceHost = void 0;
11
11
  const core_1 = require("@angular-devkit/core");
12
12
  const schematics_1 = require("@angular-devkit/schematics");
13
13
  const workspace_models_1 = require("./workspace-models");
@@ -39,6 +39,7 @@ class TreeWorkspaceHost {
39
39
  return this.tree.exists(path);
40
40
  }
41
41
  }
42
+ exports.TreeWorkspaceHost = TreeWorkspaceHost;
42
43
  /**
43
44
  * Updates the workspace file (`angular.json`) found within the root of the schematic's tree.
44
45
  * The workspace object model can be directly modified within the provided updater function
@@ -50,11 +51,10 @@ class TreeWorkspaceHost {
50
51
  * workspace. A {@link WorkspaceDefinition} is provided as the first argument to the function.
51
52
  */
52
53
  function updateWorkspace(updater) {
53
- return async (tree) => {
54
- const host = new TreeWorkspaceHost(tree);
55
- const { workspace } = await core_1.workspaces.readWorkspace(DEFAULT_WORKSPACE_PATH, host);
54
+ return async (host) => {
55
+ const workspace = await getWorkspace(host);
56
56
  const result = await updater(workspace);
57
- await core_1.workspaces.writeWorkspace(workspace, host);
57
+ await core_1.workspaces.writeWorkspace(workspace, new TreeWorkspaceHost(host));
58
58
  return result || schematics_1.noop;
59
59
  };
60
60
  }