@angular-devkit/core 14.0.0-next.6 → 14.0.0-next.7

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.
package/node/BUILD.bazel CHANGED
@@ -57,7 +57,6 @@ jasmine_node_test(
57
57
  srcs = [":node_test_lib"],
58
58
  deps = [
59
59
  "@npm//chokidar",
60
- "@npm//temp",
61
60
  # @node_module: ajv
62
61
  # @node_module: fast_json_stable_stringify
63
62
  # @node_module: magic_string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-devkit/core",
3
- "version": "14.0.0-next.6",
3
+ "version": "14.0.0-next.7",
4
4
  "description": "Angular DevKit - Core Utility Library",
5
5
  "main": "src/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  ],
15
15
  "dependencies": {
16
16
  "ajv-formats": "2.1.1",
17
- "ajv": "8.10.0",
17
+ "ajv": "8.11.0",
18
18
  "fast-json-stable-stringify": "2.1.0",
19
19
  "magic-string": "0.26.1",
20
20
  "rxjs": "6.6.7",
@@ -25,7 +25,7 @@ export declare enum NgCliAnalyticsDimensions {
25
25
  RamInGigabytes = 3,
26
26
  NodeVersion = 4,
27
27
  NgAddCollection = 6,
28
- AotEnabled = 8,
28
+ AngularCLIMajorVersion = 8,
29
29
  BuildErrors = 20
30
30
  }
31
31
  export declare enum NgCliAnalyticsMetrics {
@@ -43,7 +43,7 @@ var NgCliAnalyticsDimensions;
43
43
  NgCliAnalyticsDimensions[NgCliAnalyticsDimensions["RamInGigabytes"] = 3] = "RamInGigabytes";
44
44
  NgCliAnalyticsDimensions[NgCliAnalyticsDimensions["NodeVersion"] = 4] = "NodeVersion";
45
45
  NgCliAnalyticsDimensions[NgCliAnalyticsDimensions["NgAddCollection"] = 6] = "NgAddCollection";
46
- NgCliAnalyticsDimensions[NgCliAnalyticsDimensions["AotEnabled"] = 8] = "AotEnabled";
46
+ NgCliAnalyticsDimensions[NgCliAnalyticsDimensions["AngularCLIMajorVersion"] = 8] = "AngularCLIMajorVersion";
47
47
  NgCliAnalyticsDimensions[NgCliAnalyticsDimensions["BuildErrors"] = 20] = "BuildErrors";
48
48
  })(NgCliAnalyticsDimensions = exports.NgCliAnalyticsDimensions || (exports.NgCliAnalyticsDimensions = {}));
49
49
  var NgCliAnalyticsMetrics;
@@ -72,7 +72,7 @@ exports.NgCliAnalyticsDimensionsFlagInfo = {
72
72
  RamInGigabytes: ['RAM (In GB)', 'number'],
73
73
  NodeVersion: ['Node Version', 'number'],
74
74
  NgAddCollection: ['--collection', 'string'],
75
- AotEnabled: ['AOT Enabled', 'boolean'],
75
+ AngularCLIMajorVersion: ['Angular CLI Major Version', 'string'],
76
76
  BuildErrors: ['Build Errors (comma separated)', 'string'],
77
77
  };
78
78
  // This table is used when generating the analytics.md file. It should match the enum above
@@ -23,18 +23,33 @@ export declare class PathIsDirectoryException extends BaseException {
23
23
  export declare class PathIsFileException extends BaseException {
24
24
  constructor(path: string);
25
25
  }
26
+ /**
27
+ * @deprecated since version 14. Use the same symbol from `@angular-devkit/schematics`.
28
+ */
26
29
  export declare class ContentHasMutatedException extends BaseException {
27
30
  constructor(path: string);
28
31
  }
32
+ /**
33
+ * @deprecated since version 14. Use the same symbol from `@angular-devkit/schematics`.
34
+ */
29
35
  export declare class InvalidUpdateRecordException extends BaseException {
30
36
  constructor();
31
37
  }
38
+ /**
39
+ * @deprecated since version 14. Use the same symbol from `@angular-devkit/schematics`.
40
+ */
32
41
  export declare class MergeConflictException extends BaseException {
33
42
  constructor(path: string);
34
43
  }
44
+ /**
45
+ * @deprecated since version 14. Create a custom exception implementation instead.
46
+ */
35
47
  export declare class UnimplementedException extends BaseException {
36
48
  constructor();
37
49
  }
50
+ /**
51
+ * @deprecated since version 14. Create a custom exception implementation instead.
52
+ */
38
53
  export declare class UnsupportedPlatformException extends BaseException {
39
54
  constructor();
40
55
  }
@@ -45,30 +45,45 @@ class PathIsFileException extends BaseException {
45
45
  }
46
46
  }
47
47
  exports.PathIsFileException = PathIsFileException;
48
+ /**
49
+ * @deprecated since version 14. Use the same symbol from `@angular-devkit/schematics`.
50
+ */
48
51
  class ContentHasMutatedException extends BaseException {
49
52
  constructor(path) {
50
53
  super(`Content at path "${path}" has changed between the start and the end of an update.`);
51
54
  }
52
55
  }
53
56
  exports.ContentHasMutatedException = ContentHasMutatedException;
57
+ /**
58
+ * @deprecated since version 14. Use the same symbol from `@angular-devkit/schematics`.
59
+ */
54
60
  class InvalidUpdateRecordException extends BaseException {
55
61
  constructor() {
56
62
  super(`Invalid record instance.`);
57
63
  }
58
64
  }
59
65
  exports.InvalidUpdateRecordException = InvalidUpdateRecordException;
66
+ /**
67
+ * @deprecated since version 14. Use the same symbol from `@angular-devkit/schematics`.
68
+ */
60
69
  class MergeConflictException extends BaseException {
61
70
  constructor(path) {
62
71
  super(`A merge conflicted on path "${path}".`);
63
72
  }
64
73
  }
65
74
  exports.MergeConflictException = MergeConflictException;
75
+ /**
76
+ * @deprecated since version 14. Create a custom exception implementation instead.
77
+ */
66
78
  class UnimplementedException extends BaseException {
67
79
  constructor() {
68
80
  super('This function is unimplemented.');
69
81
  }
70
82
  }
71
83
  exports.UnimplementedException = UnimplementedException;
84
+ /**
85
+ * @deprecated since version 14. Create a custom exception implementation instead.
86
+ */
72
87
  class UnsupportedPlatformException extends BaseException {
73
88
  constructor() {
74
89
  super('This platform is not supported by this code path.');
@@ -6,7 +6,7 @@
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
8
  import { Observable, Observer } from 'rxjs';
9
- import { BaseException } from '../../exception/index';
9
+ import { BaseException } from '../../exception';
10
10
  import { JsonValue } from '../../json/index';
11
11
  import { LoggerApi } from '../../logger';
12
12
  import { JobDescription, JobHandler, JobHandlerContext } from './api';
@@ -10,10 +10,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.createLoggerJob = exports.createJobFactory = exports.createJobHandler = exports.ChannelAlreadyExistException = void 0;
11
11
  const rxjs_1 = require("rxjs");
12
12
  const operators_1 = require("rxjs/operators");
13
- const index_1 = require("../../exception/index");
14
- const index_2 = require("../../utils/index");
13
+ const exception_1 = require("../../exception");
14
+ const index_1 = require("../../utils/index");
15
15
  const api_1 = require("./api");
16
- class ChannelAlreadyExistException extends index_1.BaseException {
16
+ class ChannelAlreadyExistException extends exception_1.BaseException {
17
17
  constructor(name) {
18
18
  super(`Channel ${JSON.stringify(name)} already exist.`);
19
19
  }
@@ -93,7 +93,7 @@ function createJobHandler(fn, options = {}) {
93
93
  subject.next({ kind: api_1.JobOutboundMessageKind.Start, description });
94
94
  let result = fn(argument, newContext);
95
95
  // If the result is a promise, simply wait for it to complete before reporting the result.
96
- if ((0, index_2.isPromise)(result)) {
96
+ if ((0, index_1.isPromise)(result)) {
97
97
  result = (0, rxjs_1.from)(result);
98
98
  }
99
99
  else if (!(0, rxjs_1.isObservable)(result)) {
@@ -5,7 +5,7 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { BaseException } from '../../exception/index';
8
+ import { BaseException } from '../../exception';
9
9
  import { JobName } from './api';
10
10
  export declare class JobNameAlreadyRegisteredException extends BaseException {
11
11
  constructor(name: JobName);
@@ -8,14 +8,14 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.JobDoesNotExistException = exports.JobNameAlreadyRegisteredException = void 0;
11
- const index_1 = require("../../exception/index");
12
- class JobNameAlreadyRegisteredException extends index_1.BaseException {
11
+ const exception_1 = require("../../exception");
12
+ class JobNameAlreadyRegisteredException extends exception_1.BaseException {
13
13
  constructor(name) {
14
14
  super(`Job named ${JSON.stringify(name)} already exists.`);
15
15
  }
16
16
  }
17
17
  exports.JobNameAlreadyRegisteredException = JobNameAlreadyRegisteredException;
18
- class JobDoesNotExistException extends index_1.BaseException {
18
+ class JobDoesNotExistException extends exception_1.BaseException {
19
19
  constructor(name) {
20
20
  super(`Job name ${JSON.stringify(name)} does not exist.`);
21
21
  }
package/src/index.d.ts CHANGED
@@ -10,7 +10,7 @@ import * as experimental from './experimental';
10
10
  import * as json from './json/index';
11
11
  import * as logging from './logger/index';
12
12
  import * as workspaces from './workspace';
13
- export * from './exception/exception';
13
+ export * from './exception';
14
14
  export * from './json/index';
15
15
  export * from './utils/index';
16
16
  export * from './virtual-fs/index';
package/src/index.js CHANGED
@@ -44,7 +44,7 @@ const logging = __importStar(require("./logger/index"));
44
44
  exports.logging = logging;
45
45
  const workspaces = __importStar(require("./workspace"));
46
46
  exports.workspaces = workspaces;
47
- __exportStar(require("./exception/exception"), exports);
47
+ __exportStar(require("./exception"), exports);
48
48
  __exportStar(require("./json/index"), exports);
49
49
  __exportStar(require("./utils/index"), exports);
50
50
  __exportStar(require("./virtual-fs/index"), exports);
@@ -480,7 +480,7 @@ function _readIdentifier(context, comments = _readBlanks(context)) {
480
480
  kind: 'identifier',
481
481
  start,
482
482
  end: context.position,
483
- text: context.original.substr(start.offset, context.position.offset),
483
+ text: context.original.slice(start.offset, start.offset + context.position.offset),
484
484
  value,
485
485
  comments,
486
486
  };
@@ -745,8 +745,8 @@ function parseJsonAst(input, mode = JsonParseMode.Default) {
745
745
  };
746
746
  const ast = _readValue(context);
747
747
  if (context.position.offset < input.length) {
748
- const rest = input.substr(context.position.offset);
749
- const i = rest.length > 20 ? rest.substr(0, 20) + '...' : rest;
748
+ const rest = input.slice(context.position.offset);
749
+ const i = rest.length > 20 ? rest.slice(0, 20) + '...' : rest;
750
750
  throw new Error(`Expected end of file, got "${i}" at ` +
751
751
  `${context.position.line}:${context.position.character}.`);
752
752
  }
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { ValidateFunction } from 'ajv';
9
9
  import { Observable } from 'rxjs';
10
- import { BaseException } from '../../exception/exception';
10
+ import { BaseException } from '../../exception';
11
11
  import { JsonObject } from '../utils';
12
12
  import { JsonVisitor, PromptProvider, SchemaFormat, SchemaRegistry, SchemaValidator, SchemaValidatorError, SmartDefaultProvider } from './interface';
13
13
  import { JsonSchema } from './schema';
@@ -41,7 +41,7 @@ const https = __importStar(require("https"));
41
41
  const rxjs_1 = require("rxjs");
42
42
  const operators_1 = require("rxjs/operators");
43
43
  const Url = __importStar(require("url"));
44
- const exception_1 = require("../../exception/exception");
44
+ const exception_1 = require("../../exception");
45
45
  const utils_1 = require("../../utils");
46
46
  const utils_2 = require("../utils");
47
47
  const utility_1 = require("./utility");
@@ -130,7 +130,7 @@ exports.underscore = underscore;
130
130
  @return {String} The capitalized string.
131
131
  */
132
132
  function capitalize(str) {
133
- return str.charAt(0).toUpperCase() + str.substr(1);
133
+ return str.charAt(0).toUpperCase() + str.slice(1);
134
134
  }
135
135
  exports.capitalize = capitalize;
136
136
  /**
@@ -61,7 +61,7 @@ function extname(path) {
61
61
  return '';
62
62
  }
63
63
  else {
64
- return base.substr(i);
64
+ return base.slice(i);
65
65
  }
66
66
  }
67
67
  exports.extname = extname;
@@ -74,7 +74,7 @@ function basename(path) {
74
74
  return fragment(path);
75
75
  }
76
76
  else {
77
- return fragment(path.substr(path.lastIndexOf(exports.NormalizedSep) + 1));
77
+ return fragment(path.slice(path.lastIndexOf(exports.NormalizedSep) + 1));
78
78
  }
79
79
  }
80
80
  exports.basename = basename;
@@ -87,7 +87,7 @@ function dirname(path) {
87
87
  return '';
88
88
  }
89
89
  const endIndex = index === 0 ? 1 : index; // case of file under root: '/file'
90
- return normalize(path.substr(0, endIndex));
90
+ return normalize(path.slice(0, endIndex));
91
91
  }
92
92
  exports.dirname = dirname;
93
93
  /**
@@ -214,7 +214,7 @@ function noCacheNormalize(path) {
214
214
  // Match absolute windows path.
215
215
  const original = path;
216
216
  if (path.match(/^[A-Z]:[/\\]/i)) {
217
- path = '\\' + path[0] + '\\' + path.substr(3);
217
+ path = '\\' + path[0] + '\\' + path.slice(3);
218
218
  }
219
219
  // We convert Windows paths as well here.
220
220
  const p = path.split(/[/\\]/g);
@@ -222,7 +222,7 @@ function create(ast, path, reporter, excluded = new Set(), included, base) {
222
222
  keys = [];
223
223
  }
224
224
  for (const key of cache.keys()) {
225
- const relativeKey = key.substr(path.length + 1);
225
+ const relativeKey = key.slice(path.length + 1);
226
226
  if (relativeKey.length > 0 && !relativeKey.includes('/')) {
227
227
  keys.push(`${unescapeKey(relativeKey)}`);
228
228
  }
@@ -1,8 +0,0 @@
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
- export * from './exception';
@@ -1,24 +0,0 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.io/license
8
- */
9
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- var desc = Object.getOwnPropertyDescriptor(m, k);
12
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
- desc = { enumerable: true, get: function() { return m[k]; } };
14
- }
15
- Object.defineProperty(o, k2, desc);
16
- }) : (function(o, m, k, k2) {
17
- if (k2 === undefined) k2 = k;
18
- o[k2] = m[k];
19
- }));
20
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
22
- };
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- __exportStar(require("./exception"), exports);