@angular-devkit/core 12.0.0-rc.0 → 12.0.0

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 (162) hide show
  1. package/README.md +36 -34
  2. package/node/_golden-api.d.ts +1 -1
  3. package/node/_golden-api.js +1 -1
  4. package/node/cli-logger.d.ts +7 -0
  5. package/node/cli-logger.js +4 -6
  6. package/node/experimental/index.d.ts +2 -2
  7. package/node/experimental/index.js +3 -3
  8. package/node/experimental/jobs/index.d.ts +1 -1
  9. package/node/experimental/jobs/index.js +7 -7
  10. package/node/experimental/jobs/job-registry.d.ts +1 -1
  11. package/node/experimental/jobs/job-registry.js +4 -4
  12. package/node/fs.d.ts +7 -0
  13. package/node/fs.js +3 -3
  14. package/node/host.d.ts +2 -2
  15. package/node/host.js +31 -33
  16. package/node/index.d.ts +2 -2
  17. package/node/index.js +1 -1
  18. package/node/testing/index.d.ts +2 -2
  19. package/node/testing/index.js +8 -5
  20. package/package.json +3 -3
  21. package/src/_golden-api.d.ts +1 -1
  22. package/src/_golden-api.js +1 -1
  23. package/src/analytics/api.d.ts +1 -1
  24. package/src/analytics/api.js +7 -0
  25. package/src/analytics/forwarder.d.ts +1 -1
  26. package/src/analytics/forwarder.js +7 -0
  27. package/src/analytics/index.d.ts +1 -1
  28. package/src/analytics/index.js +7 -7
  29. package/src/analytics/logging.d.ts +1 -1
  30. package/src/analytics/logging.js +7 -0
  31. package/src/analytics/multi.d.ts +1 -1
  32. package/src/analytics/multi.js +6 -6
  33. package/src/analytics/noop.d.ts +1 -1
  34. package/src/analytics/noop.js +10 -1
  35. package/src/exception/exception.d.ts +1 -1
  36. package/src/exception/exception.js +25 -9
  37. package/src/exception/index.d.ts +1 -1
  38. package/src/exception/index.js +1 -1
  39. package/src/experimental/jobs/README.md +133 -112
  40. package/src/experimental/jobs/api.d.ts +1 -1
  41. package/src/experimental/jobs/api.js +8 -3
  42. package/src/experimental/jobs/architecture.md +43 -38
  43. package/src/experimental/jobs/create-job-handler.d.ts +1 -2
  44. package/src/experimental/jobs/create-job-handler.js +17 -14
  45. package/src/experimental/jobs/dispatcher.d.ts +1 -2
  46. package/src/experimental/jobs/dispatcher.js +7 -0
  47. package/src/experimental/jobs/exception.d.ts +1 -1
  48. package/src/experimental/jobs/exception.js +3 -3
  49. package/src/experimental/jobs/fallback-registry.d.ts +1 -1
  50. package/src/experimental/jobs/fallback-registry.js +4 -4
  51. package/src/experimental/jobs/index.d.ts +1 -1
  52. package/src/experimental/jobs/index.js +7 -7
  53. package/src/experimental/jobs/simple-registry.d.ts +1 -1
  54. package/src/experimental/jobs/simple-registry.js +6 -4
  55. package/src/experimental/jobs/simple-scheduler.d.ts +1 -1
  56. package/src/experimental/jobs/simple-scheduler.js +38 -29
  57. package/src/experimental/jobs/strategy.d.ts +7 -0
  58. package/src/experimental/jobs/strategy.js +10 -9
  59. package/src/experimental.d.ts +2 -2
  60. package/src/experimental.js +3 -3
  61. package/src/index.d.ts +2 -2
  62. package/src/index.js +7 -7
  63. package/src/json/index.d.ts +2 -2
  64. package/src/json/index.js +9 -9
  65. package/src/json/interface.d.ts +1 -1
  66. package/src/json/interface.js +7 -0
  67. package/src/json/parser.d.ts +1 -1
  68. package/src/json/parser.js +39 -22
  69. package/src/json/schema/index.d.ts +2 -2
  70. package/src/json/schema/index.js +9 -9
  71. package/src/json/schema/interface.d.ts +1 -1
  72. package/src/json/schema/interface.js +7 -0
  73. package/src/json/schema/pointer.d.ts +1 -1
  74. package/src/json/schema/pointer.js +17 -5
  75. package/src/json/schema/registry.d.ts +1 -1
  76. package/src/json/schema/registry.js +28 -47
  77. package/src/json/schema/schema.d.ts +1 -1
  78. package/src/json/schema/schema.js +3 -3
  79. package/src/json/schema/transforms.d.ts +1 -1
  80. package/src/json/schema/transforms.js +14 -13
  81. package/src/json/schema/utility.d.ts +7 -0
  82. package/src/json/schema/utility.js +7 -7
  83. package/src/json/schema/visitor.d.ts +1 -1
  84. package/src/json/schema/visitor.js +8 -7
  85. package/src/logger/indent.d.ts +7 -0
  86. package/src/logger/indent.js +5 -5
  87. package/src/logger/index.d.ts +1 -1
  88. package/src/logger/index.js +7 -7
  89. package/src/logger/level.d.ts +1 -1
  90. package/src/logger/level.js +7 -0
  91. package/src/logger/logger.d.ts +1 -1
  92. package/src/logger/logger.js +13 -6
  93. package/src/logger/null-logger.d.ts +7 -0
  94. package/src/logger/null-logger.js +3 -3
  95. package/src/logger/transform-logger.d.ts +1 -1
  96. package/src/logger/transform-logger.js +7 -0
  97. package/src/utils/array.d.ts +1 -1
  98. package/src/utils/array.js +2 -2
  99. package/src/utils/index.d.ts +1 -1
  100. package/src/utils/index.js +7 -7
  101. package/src/utils/lang.d.ts +1 -1
  102. package/src/utils/lang.js +3 -3
  103. package/src/utils/literals.d.ts +1 -1
  104. package/src/utils/literals.js +15 -8
  105. package/src/utils/object.d.ts +1 -1
  106. package/src/utils/object.js +3 -3
  107. package/src/utils/partially-ordered-set.d.ts +2 -2
  108. package/src/utils/partially-ordered-set.js +12 -8
  109. package/src/utils/priority-queue.d.ts +1 -1
  110. package/src/utils/priority-queue.js +2 -2
  111. package/src/utils/strings.d.ts +7 -0
  112. package/src/utils/strings.js +12 -9
  113. package/src/utils/template.d.ts +1 -1
  114. package/src/utils/template.js +24 -30
  115. package/src/virtual-fs/host/alias.d.ts +1 -1
  116. package/src/virtual-fs/host/alias.js +7 -5
  117. package/src/virtual-fs/host/buffer.d.ts +1 -1
  118. package/src/virtual-fs/host/buffer.js +7 -0
  119. package/src/virtual-fs/host/create.d.ts +7 -0
  120. package/src/virtual-fs/host/create.js +3 -3
  121. package/src/virtual-fs/host/empty.d.ts +1 -1
  122. package/src/virtual-fs/host/empty.js +3 -3
  123. package/src/virtual-fs/host/index.d.ts +1 -1
  124. package/src/virtual-fs/host/index.js +1 -1
  125. package/src/virtual-fs/host/interface.d.ts +1 -1
  126. package/src/virtual-fs/host/interface.js +7 -0
  127. package/src/virtual-fs/host/memory.d.ts +1 -1
  128. package/src/virtual-fs/host/memory.js +32 -20
  129. package/src/virtual-fs/host/pattern.d.ts +1 -1
  130. package/src/virtual-fs/host/pattern.js +17 -8
  131. package/src/virtual-fs/host/record.d.ts +1 -1
  132. package/src/virtual-fs/host/record.js +45 -28
  133. package/src/virtual-fs/host/resolver.d.ts +1 -1
  134. package/src/virtual-fs/host/resolver.js +10 -1
  135. package/src/virtual-fs/host/safe.d.ts +1 -1
  136. package/src/virtual-fs/host/safe.js +3 -3
  137. package/src/virtual-fs/host/scoped.d.ts +1 -1
  138. package/src/virtual-fs/host/scoped.js +3 -3
  139. package/src/virtual-fs/host/sync.d.ts +1 -1
  140. package/src/virtual-fs/host/sync.js +12 -3
  141. package/src/virtual-fs/host/test.d.ts +1 -1
  142. package/src/virtual-fs/host/test.js +11 -2
  143. package/src/virtual-fs/index.d.ts +2 -2
  144. package/src/virtual-fs/index.js +8 -8
  145. package/src/virtual-fs/path.d.ts +1 -1
  146. package/src/virtual-fs/path.js +17 -8
  147. package/src/workspace/core.d.ts +7 -0
  148. package/src/workspace/core.js +3 -3
  149. package/src/workspace/definitions.d.ts +1 -1
  150. package/src/workspace/definitions.js +7 -0
  151. package/src/workspace/host.d.ts +1 -1
  152. package/src/workspace/host.js +3 -3
  153. package/src/workspace/index.d.ts +1 -1
  154. package/src/workspace/index.js +7 -7
  155. package/src/workspace/json/metadata.d.ts +1 -1
  156. package/src/workspace/json/metadata.js +8 -1
  157. package/src/workspace/json/reader.d.ts +7 -0
  158. package/src/workspace/json/reader.js +4 -4
  159. package/src/workspace/json/utilities.d.ts +1 -1
  160. package/src/workspace/json/utilities.js +12 -5
  161. package/src/workspace/json/writer.d.ts +7 -0
  162. package/src/workspace/json/writer.js +4 -4
@@ -1,11 +1,20 @@
1
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
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  exports.parseJsonPointer = exports.joinJsonPointer = exports.buildJsonPointer = void 0;
4
11
  function buildJsonPointer(fragments) {
5
- return ('/' + fragments.map(f => {
6
- return f.replace(/~/g, '~0')
7
- .replace(/\//g, '~1');
8
- }).join('/'));
12
+ return ('/' +
13
+ fragments
14
+ .map((f) => {
15
+ return f.replace(/~/g, '~0').replace(/\//g, '~1');
16
+ })
17
+ .join('/'));
9
18
  }
10
19
  exports.buildJsonPointer = buildJsonPointer;
11
20
  function joinJsonPointer(root, ...others) {
@@ -22,6 +31,9 @@ function parseJsonPointer(pointer) {
22
31
  if (pointer.charAt(0) !== '/') {
23
32
  throw new Error('Relative pointer: ' + pointer);
24
33
  }
25
- return pointer.substring(1).split(/\//).map(str => str.replace(/~1/g, '/').replace(/~0/g, '~'));
34
+ return pointer
35
+ .substring(1)
36
+ .split(/\//)
37
+ .map((str) => str.replace(/~1/g, '/').replace(/~0/g, '~'));
26
38
  }
27
39
  exports.parseJsonPointer = parseJsonPointer;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
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
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CoreSchemaRegistry = exports.SchemaValidationException = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.CoreSchemaRegistry = exports.SchemaValidationException = void 0;
11
11
  const ajv_1 = require("ajv");
12
12
  const ajv_formats_1 = require("ajv-formats");
13
13
  const http = require("http");
@@ -86,7 +86,7 @@ class CoreSchemaRegistry {
86
86
  return new Promise((resolve, reject) => {
87
87
  const url = new Url.URL(uri);
88
88
  const client = url.protocol === 'https:' ? https : http;
89
- client.get(url, res => {
89
+ client.get(url, (res) => {
90
90
  if (!res.statusCode || res.statusCode >= 300) {
91
91
  // Consume the rest of the data to free memory.
92
92
  res.resume();
@@ -95,7 +95,7 @@ class CoreSchemaRegistry {
95
95
  else {
96
96
  res.setEncoding('utf8');
97
97
  let data = '';
98
- res.on('data', chunk => {
98
+ res.on('data', (chunk) => {
99
99
  data += chunk;
100
100
  });
101
101
  res.on('end', () => {
@@ -170,14 +170,15 @@ class CoreSchemaRegistry {
170
170
  this._ajv.removeSchema(schema);
171
171
  this._currentCompilationSchemaInfo = undefined;
172
172
  const validate = await this._ajv.compileAsync(schema);
173
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
173
174
  const self = this;
174
175
  function visitor(current, pointer, parentSchema, index) {
175
- if (current
176
- && parentSchema
177
- && index
178
- && interface_1.isJsonObject(current)
179
- && current.hasOwnProperty('$ref')
180
- && typeof current['$ref'] == 'string') {
176
+ if (current &&
177
+ parentSchema &&
178
+ index &&
179
+ interface_1.isJsonObject(current) &&
180
+ Object.prototype.hasOwnProperty.call(current, '$ref') &&
181
+ typeof current['$ref'] == 'string') {
181
182
  const resolved = self._resolver(current['$ref'], validate);
182
183
  if (resolved.schema) {
183
184
  parentSchema[index] = resolved.schema;
@@ -196,7 +197,7 @@ class CoreSchemaRegistry {
196
197
  * @returns An Observable of the Validation function.
197
198
  */
198
199
  compile(schema) {
199
- return rxjs_1.from(this._compile(schema)).pipe(operators_1.map(validate => (value, options) => rxjs_1.from(validate(value, options))));
200
+ return rxjs_1.from(this._compile(schema)).pipe(operators_1.map((validate) => (value, options) => rxjs_1.from(validate(value, options))));
200
201
  }
201
202
  async _compile(schema) {
202
203
  if (typeof schema === 'boolean') {
@@ -246,8 +247,7 @@ class CoreSchemaRegistry {
246
247
  if (typeof schema === 'object') {
247
248
  await visitor_1.visitJson(data, visitor, schema, this._resolver.bind(this), validator).toPromise();
248
249
  }
249
- const definitions = schemaInfo.promptDefinitions
250
- .filter(def => !validationContext.promptFieldsWithValue.has(def.id));
250
+ const definitions = schemaInfo.promptDefinitions.filter((def) => !validationContext.promptFieldsWithValue.has(def.id));
251
251
  if (definitions.length > 0) {
252
252
  await this._applyPrompts(data, definitions);
253
253
  }
@@ -288,7 +288,7 @@ class CoreSchemaRegistry {
288
288
  // We cheat, heavily.
289
289
  const pathArray = it.dataPathArr
290
290
  .slice(1, it.dataLevel + 1)
291
- .map(p => typeof p === 'number' ? p : p.str.slice(1, -1));
291
+ .map((p) => (typeof p === 'number' ? p : p.str.slice(1, -1)));
292
292
  compilationSchemInfo.smartDefaultRecord.set(JSON.stringify(pathArray), schema);
293
293
  return () => true;
294
294
  },
@@ -321,9 +321,11 @@ class CoreSchemaRegistry {
321
321
  if (!compilationSchemInfo) {
322
322
  return () => true;
323
323
  }
324
- const path = '/' + it.dataPathArr
325
- .slice(1, it.dataLevel + 1)
326
- .map(p => typeof p === 'number' ? p : p.str.slice(1, -1)).join('/');
324
+ const path = '/' +
325
+ it.dataPathArr
326
+ .slice(1, it.dataLevel + 1)
327
+ .map((p) => (typeof p === 'number' ? p : p.str.slice(1, -1)))
328
+ .join('/');
327
329
  let type;
328
330
  let items;
329
331
  let message;
@@ -360,7 +362,8 @@ class CoreSchemaRegistry {
360
362
  ? propertyTypes.size === 1 && propertyTypes.has('array')
361
363
  : schema.multiselect;
362
364
  const enumValues = multiselect
363
- ? parentSchema.items && parentSchema.items.enum
365
+ ? parentSchema.items &&
366
+ parentSchema.items.enum
364
367
  : parentSchema.enum;
365
368
  if (!items && Array.isArray(enumValues)) {
366
369
  items = [];
@@ -450,37 +453,15 @@ class CoreSchemaRegistry {
450
453
  }
451
454
  }
452
455
  static _set(
453
- // tslint:disable-next-line:no-any
454
- data, fragments, value,
455
- // tslint:disable-next-line:no-any
456
- parent = null, parentProperty, force) {
457
- for (let i = 0; i < fragments.length; i++) {
458
- const f = fragments[i];
459
- if (f[0] == 'i') {
460
- if (!Array.isArray(data)) {
461
- return;
462
- }
463
- for (let j = 0; j < data.length; j++) {
464
- CoreSchemaRegistry._set(data[j], fragments.slice(i + 1), value, data, '' + j);
465
- }
466
- return;
467
- }
468
- if (f.startsWith('key')) {
469
- if (typeof data !== 'object') {
470
- return;
471
- }
472
- for (const property in data) {
473
- CoreSchemaRegistry._set(data[property], fragments.slice(i + 1), value, data, property);
474
- }
475
- return;
476
- }
477
- // We know we need an object because the fragment is a property key.
456
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
457
+ data, fragments, value, parent = null, parentProperty, force) {
458
+ for (const fragment of fragments) {
478
459
  if (!data && parent !== null && parentProperty) {
479
460
  data = parent[parentProperty] = {};
480
461
  }
481
462
  parent = data;
482
- parentProperty = f;
483
- data = data[f];
463
+ parentProperty = fragment;
464
+ data = data[fragment];
484
465
  }
485
466
  if (parent && parentProperty && (force || parent[parentProperty] === undefined)) {
486
467
  parent[parentProperty] = value;
@@ -520,7 +501,7 @@ class CoreSchemaRegistry {
520
501
  if (typeof schema.id === 'string') {
521
502
  schema.$id = schema.id;
522
503
  delete schema.id;
523
- // tslint:disable-next-line:no-console
504
+ // eslint-disable-next-line no-console
524
505
  console.warn(`"${schema.$id}" schema is using the keyword "id" which its support is deprecated. Use "$id" for schema ID.`);
525
506
  }
526
507
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
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
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mergeSchemas = exports.isJsonSchema = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.mergeSchemas = exports.isJsonSchema = void 0;
11
11
  const interface_1 = require("../interface");
12
12
  function isJsonSchema(value) {
13
13
  return interface_1.isJsonObject(value) || value === false || value === true;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
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
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.addUndefinedDefaults = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.addUndefinedDefaults = void 0;
11
11
  const interface_1 = require("../interface");
12
12
  const utility_1 = require("./utility");
13
13
  function addUndefinedDefaults(value, _pointer, schema) {
@@ -69,17 +69,18 @@ function addUndefinedDefaults(value, _pointer, schema) {
69
69
  const propertySchemas = schemaObject.oneOf || schemaObject.anyOf;
70
70
  const allProperties = Object.keys(value);
71
71
  // Locate a schema which declares all the properties that the object contains.
72
- const adjustedSchema = interface_1.isJsonArray(propertySchemas) && propertySchemas.find(s => {
73
- if (!interface_1.isJsonObject(s)) {
72
+ const adjustedSchema = interface_1.isJsonArray(propertySchemas) &&
73
+ propertySchemas.find((s) => {
74
+ if (!interface_1.isJsonObject(s)) {
75
+ return false;
76
+ }
77
+ const schemaType = utility_1.getTypesOfSchema(s);
78
+ if (schemaType.size === 1 && schemaType.has('object') && interface_1.isJsonObject(s.properties)) {
79
+ const properties = Object.keys(s.properties);
80
+ return allProperties.every((key) => properties.includes(key));
81
+ }
74
82
  return false;
75
- }
76
- const schemaType = utility_1.getTypesOfSchema(s);
77
- if (schemaType.size === 1 && schemaType.has('object') && interface_1.isJsonObject(s.properties)) {
78
- const properties = Object.keys(s.properties);
79
- return allProperties.every(key => properties.includes(key));
80
- }
81
- return false;
82
- });
83
+ });
83
84
  if (adjustedSchema && interface_1.isJsonObject(adjustedSchema)) {
84
85
  newValue[propName] = addUndefinedDefaults(value, _pointer, adjustedSchema);
85
86
  }
@@ -1,2 +1,9 @@
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
+ */
1
8
  import { JsonSchema } from './schema';
2
9
  export declare function getTypesOfSchema(schema: JsonSchema): Set<string>;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTypesOfSchema = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.getTypesOfSchema = void 0;
11
11
  const interface_1 = require("../interface");
12
12
  const allTypes = ['string', 'integer', 'number', 'object', 'array', 'boolean', 'null'];
13
13
  function getTypesOfSchema(schema) {
@@ -53,12 +53,12 @@ function getTypesOfSchema(schema) {
53
53
  }
54
54
  if (interface_1.isJsonObject(schema.not)) {
55
55
  const notTypes = getTypesOfSchema(schema.not);
56
- potentials = new Set([...potentials].filter(p => !notTypes.has(p)));
56
+ potentials = new Set([...potentials].filter((p) => !notTypes.has(p)));
57
57
  }
58
58
  if (Array.isArray(schema.allOf)) {
59
59
  for (const sub of schema.allOf) {
60
60
  const types = getTypesOfSchema(sub);
61
- potentials = new Set([...types].filter(t => potentials.has(t)));
61
+ potentials = new Set([...types].filter((t) => potentials.has(t)));
62
62
  }
63
63
  }
64
64
  if (Array.isArray(schema.oneOf)) {
@@ -67,7 +67,7 @@ function getTypesOfSchema(schema) {
67
67
  const types = getTypesOfSchema(sub);
68
68
  options = new Set([...options, ...types]);
69
69
  }
70
- potentials = new Set([...options].filter(o => potentials.has(o)));
70
+ potentials = new Set([...options].filter((o) => potentials.has(o)));
71
71
  }
72
72
  if (Array.isArray(schema.anyOf)) {
73
73
  let options = new Set();
@@ -75,7 +75,7 @@ function getTypesOfSchema(schema) {
75
75
  const types = getTypesOfSchema(sub);
76
76
  options = new Set([...options, ...types]);
77
77
  }
78
- potentials = new Set([...options].filter(o => potentials.has(o)));
78
+ potentials = new Set([...options].filter((o) => potentials.has(o)));
79
79
  }
80
80
  if (schema.properties) {
81
81
  potentials.add('object');
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
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
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.visitJsonSchema = exports.visitJson = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.visitJsonSchema = exports.visitJson = void 0;
11
11
  const rxjs_1 = require("rxjs");
12
12
  const operators_1 = require("rxjs/operators");
13
13
  const pointer_1 = require("./pointer");
@@ -37,6 +37,7 @@ function _visitJsonRecursive(json, visitor, ptr, schema, refResolver, context, r
37
37
  // There's no schema definition, so just visit the JSON recursively.
38
38
  schema = undefined;
39
39
  }
40
+ // eslint-disable-next-line no-prototype-builtins
40
41
  if (schema && schema.hasOwnProperty('$ref') && typeof schema['$ref'] == 'string') {
41
42
  if (refResolver) {
42
43
  const resolved = refResolver(schema['$ref'], context);
@@ -45,15 +46,15 @@ function _visitJsonRecursive(json, visitor, ptr, schema, refResolver, context, r
45
46
  }
46
47
  }
47
48
  const value = visitor(json, ptr, schema, root);
48
- return (rxjs_1.isObservable(value) ? value : rxjs_1.of(value)).pipe(operators_1.concatMap(value => {
49
+ return (rxjs_1.isObservable(value) ? value : rxjs_1.of(value)).pipe(operators_1.concatMap((value) => {
49
50
  if (Array.isArray(value)) {
50
51
  return rxjs_1.concat(rxjs_1.from(value).pipe(operators_1.mergeMap((item, i) => {
51
- return _visitJsonRecursive(item, visitor, pointer_1.joinJsonPointer(ptr, '' + i), _getObjectSubSchema(schema, '' + i), refResolver, context, root || value).pipe(operators_1.tap(x => (value[i] = x)));
52
+ return _visitJsonRecursive(item, visitor, pointer_1.joinJsonPointer(ptr, '' + i), _getObjectSubSchema(schema, '' + i), refResolver, context, root || value).pipe(operators_1.tap((x) => (value[i] = x)));
52
53
  }), operators_1.ignoreElements()), rxjs_1.of(value));
53
54
  }
54
55
  else if (typeof value == 'object' && value !== null) {
55
- return rxjs_1.concat(rxjs_1.from(Object.getOwnPropertyNames(value)).pipe(operators_1.mergeMap(key => {
56
- return _visitJsonRecursive(value[key], visitor, pointer_1.joinJsonPointer(ptr, key), _getObjectSubSchema(schema, key), refResolver, context, root || value).pipe(operators_1.tap(x => {
56
+ return rxjs_1.concat(rxjs_1.from(Object.getOwnPropertyNames(value)).pipe(operators_1.mergeMap((key) => {
57
+ return _visitJsonRecursive(value[key], visitor, pointer_1.joinJsonPointer(ptr, key), _getObjectSubSchema(schema, key), refResolver, context, root || value).pipe(operators_1.tap((x) => {
57
58
  const descriptor = Object.getOwnPropertyDescriptor(value, key);
58
59
  if (descriptor && descriptor.writable && value[key] !== x) {
59
60
  value[key] = x;
@@ -1,3 +1,10 @@
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
+ */
1
8
  import { Logger } from './logger';
2
9
  export declare class IndentLogger extends Logger {
3
10
  constructor(name: string, parent?: Logger | null, indentation?: string);
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IndentLogger = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.IndentLogger = void 0;
11
11
  const operators_1 = require("rxjs/operators");
12
12
  const logger_1 = require("./logger");
13
13
  /**
@@ -23,8 +23,8 @@ class IndentLogger extends logger_1.Logger {
23
23
  super(name, parent);
24
24
  indentationMap[indentation] = indentationMap[indentation] || [''];
25
25
  const indentMap = indentationMap[indentation];
26
- this._observable = this._observable.pipe(operators_1.map(entry => {
27
- const l = entry.path.filter(x => !!x).length;
26
+ this._observable = this._observable.pipe(operators_1.map((entry) => {
27
+ const l = entry.path.filter((x) => !!x).length;
28
28
  if (l >= indentMap.length) {
29
29
  let current = indentMap[indentMap.length - 1];
30
30
  while (l >= indentMap.length) {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
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
@@ -1,4 +1,11 @@
1
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
+ */
2
9
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
10
  if (k2 === undefined) k2 = k;
4
11
  Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
@@ -10,13 +17,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
17
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
18
  };
12
19
  Object.defineProperty(exports, "__esModule", { value: true });
13
- /**
14
- * @license
15
- * Copyright Google Inc. All Rights Reserved.
16
- *
17
- * Use of this source code is governed by an MIT-style license that can be
18
- * found in the LICENSE file at https://angular.io/license
19
- */
20
20
  __exportStar(require("./indent"), exports);
21
21
  __exportStar(require("./level"), exports);
22
22
  __exportStar(require("./logger"), exports);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
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
@@ -1,4 +1,11 @@
1
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
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  exports.LevelCapLogger = exports.LevelTransformLogger = void 0;
4
11
  const logger_1 = require("./logger");
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
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
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Logger = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.Logger = void 0;
11
11
  const rxjs_1 = require("rxjs");
12
12
  class Logger extends rxjs_1.Observable {
13
13
  constructor(name, parent = null) {
@@ -30,7 +30,9 @@ class Logger extends rxjs_1.Observable {
30
30
  this.parent._subject.subscribe(undefined, undefined, () => this.complete());
31
31
  }
32
32
  }
33
- get _observable() { return this._obs; }
33
+ get _observable() {
34
+ return this._obs;
35
+ }
34
36
  set _observable(v) {
35
37
  if (this._subscription) {
36
38
  this._subscription.unsubscribe();
@@ -74,7 +76,9 @@ class Logger extends rxjs_1.Observable {
74
76
  }
75
77
  log(level, message, metadata = {}) {
76
78
  const entry = Object.assign({}, metadata, this._metadata, {
77
- level, message, timestamp: +Date.now(),
79
+ level,
80
+ message,
81
+ timestamp: +Date.now(),
78
82
  });
79
83
  this._subject.next(entry);
80
84
  }
@@ -103,7 +107,10 @@ class Logger extends rxjs_1.Observable {
103
107
  return this._observable.lift(operator);
104
108
  }
105
109
  subscribe(_observerOrNext, _error, _complete) {
106
- return this._observable.subscribe.apply(this._observable, arguments);
110
+ // eslint-disable-next-line prefer-spread
111
+ return this._observable.subscribe.apply(this._observable,
112
+ // eslint-disable-next-line prefer-rest-params
113
+ arguments);
107
114
  }
108
115
  forEach(next, PromiseCtor) {
109
116
  return this._observable.forEach(next, PromiseCtor);
@@ -1,3 +1,10 @@
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
+ */
1
8
  import { Logger, LoggerApi } from './logger';
2
9
  export declare class NullLogger extends Logger {
3
10
  constructor(parent?: Logger | null);
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NullLogger = void 0;
4
2
  /**
5
3
  * @license
6
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
7
5
  *
8
6
  * Use of this source code is governed by an MIT-style license that can be
9
7
  * found in the LICENSE file at https://angular.io/license
10
8
  */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.NullLogger = void 0;
11
11
  const rxjs_1 = require("rxjs");
12
12
  const logger_1 = require("./logger");
13
13
  class NullLogger extends logger_1.Logger {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
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
@@ -1,4 +1,11 @@
1
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
+ */
2
9
  Object.defineProperty(exports, "__esModule", { value: true });
3
10
  exports.TransformLogger = void 0;
4
11
  const logger_1 = require("./logger");
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
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
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * @license
4
- * Copyright Google Inc. All Rights Reserved.
4
+ * Copyright Google LLC All Rights Reserved.
5
5
  *
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.io/license
@@ -10,6 +10,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.clean = void 0;
11
11
  /** @deprecated Since v12.0, unused by the Angular tooling */
12
12
  function clean(array) {
13
- return array.filter(x => x !== undefined);
13
+ return array.filter((x) => x !== undefined);
14
14
  }
15
15
  exports.clean = clean;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright Google Inc. All Rights Reserved.
3
+ * Copyright Google LLC All Rights Reserved.
4
4
  *
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