@schematics/angular 15.0.0-rc.0 → 15.0.0-rc.2

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.
@@ -23,7 +23,11 @@ export class <%= classify(name) %>Guard implements <%= implementations %> {
23
23
  nextState?: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
24
24
  return true;
25
25
  }
26
- <% } %><% if (implements.includes('CanLoad')) { %>canLoad(
26
+ <% } %><% if (implements.includes('CanMatch')) { %>canMatch(
27
+ route: Route,
28
+ segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
29
+ return true;
30
+ }<% } %><% if (implements.includes('CanLoad')) { %>canLoad(
27
31
  route: Route,
28
32
  segments: UrlSegment[]): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
29
33
  return true;
package/guard/index.js CHANGED
@@ -19,7 +19,8 @@ function default_1(options) {
19
19
  .join(', ');
20
20
  const commonRouterNameImports = ['ActivatedRouteSnapshot', 'RouterStateSnapshot'];
21
21
  const routerNamedImports = [...options.implements, 'UrlTree'];
22
- if (options.implements.includes(schema_1.Implement.CanLoad)) {
22
+ if (options.implements.includes(schema_1.Implement.CanLoad) ||
23
+ options.implements.includes(schema_1.Implement.CanMatch)) {
23
24
  routerNamedImports.push('Route', 'UrlSegment');
24
25
  if (options.implements.length > 1) {
25
26
  routerNamedImports.push(...commonRouterNameImports);
package/guard/schema.d.ts CHANGED
@@ -32,5 +32,6 @@ export declare enum Implement {
32
32
  CanActivate = "CanActivate",
33
33
  CanActivateChild = "CanActivateChild",
34
34
  CanDeactivate = "CanDeactivate",
35
- CanLoad = "CanLoad"
35
+ CanLoad = "CanLoad",
36
+ CanMatch = "CanMatch"
36
37
  }
package/guard/schema.js CHANGED
@@ -9,4 +9,5 @@ var Implement;
9
9
  Implement["CanActivateChild"] = "CanActivateChild";
10
10
  Implement["CanDeactivate"] = "CanDeactivate";
11
11
  Implement["CanLoad"] = "CanLoad";
12
+ Implement["CanMatch"] = "CanMatch";
12
13
  })(Implement = exports.Implement || (exports.Implement = {}));
package/guard/schema.json CHANGED
@@ -47,7 +47,7 @@
47
47
  "uniqueItems": true,
48
48
  "minItems": 1,
49
49
  "items": {
50
- "enum": ["CanActivate", "CanActivateChild", "CanDeactivate", "CanLoad"],
50
+ "enum": ["CanActivate", "CanActivateChild", "CanDeactivate", "CanLoad", "CanMatch"],
51
51
  "type": "string"
52
52
  },
53
53
  "default": ["CanActivate"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schematics/angular",
3
- "version": "15.0.0-rc.0",
3
+ "version": "15.0.0-rc.2",
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": "15.0.0-rc.0",
27
- "@angular-devkit/schematics": "15.0.0-rc.0",
26
+ "@angular-devkit/core": "15.0.0-rc.2",
27
+ "@angular-devkit/schematics": "15.0.0-rc.2",
28
28
  "jsonc-parser": "3.2.0"
29
29
  },
30
30
  "repository": {
@@ -3,10 +3,9 @@
3
3
  "extends": "./<%= tsConfigExtends %>",
4
4
  "compilerOptions": {
5
5
  "outDir": "<%= relativePathToWorkspaceRoot %>/out-tsc/server",
6
- "target": "es2019",
7
6
  "types": [
8
7
  "node"<% if (hasLocalizePackage) { %>,
9
- "@angular/localize/init"<% } %>
8
+ "@angular/localize"<% } %>
10
9
  ]
11
10
  },
12
11
  "files": [
@@ -5,7 +5,7 @@
5
5
  "dependencies": {
6
6
  "@types/jasmine": "~4.3.0",
7
7
  "@types/node": "^14.15.0",
8
- "jasmine-core": "~4.4.0",
8
+ "jasmine-core": "~4.5.0",
9
9
  "jasmine-spec-reporter": "~7.0.0",
10
10
  "karma-chrome-launcher": "~3.1.0",
11
11
  "karma-coverage": "~2.2.0",