@angular-devkit/core 18.1.0-next.0 → 18.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.
@@ -5,7 +5,6 @@
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
- /// <reference types="node" />
9
8
  import { logging } from '../src';
10
9
  export interface ProcessOutput {
11
10
  write(buffer: string | Buffer): boolean;
@@ -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.createConsoleLogger = void 0;
10
+ exports.createConsoleLogger = createConsoleLogger;
11
11
  const rxjs_1 = require("rxjs");
12
12
  const src_1 = require("../src");
13
13
  /**
@@ -55,4 +55,3 @@ function createConsoleLogger(verbose = false, stdout = process.stdout, stderr =
55
55
  });
56
56
  return logger;
57
57
  }
58
- exports.createConsoleLogger = createConsoleLogger;
package/node/host.d.ts CHANGED
@@ -5,7 +5,6 @@
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
- /// <reference types="node" />
9
8
  import { Stats } from 'node:fs';
10
9
  import { Observable } from 'rxjs';
11
10
  import { Path, PathFragment, virtualFs } from '../src';
@@ -5,7 +5,6 @@
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
- /// <reference types="node" />
9
8
  import * as fs from 'fs';
10
9
  import { Path, virtualFs } from '../../src';
11
10
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-devkit/core",
3
- "version": "18.1.0-next.0",
3
+ "version": "18.1.0-next.1",
4
4
  "description": "Angular DevKit - Core Utility Library",
5
5
  "main": "src/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "ajv-formats": "3.0.1",
34
- "ajv": "8.14.0",
34
+ "ajv": "8.16.0",
35
35
  "jsonc-parser": "3.2.1",
36
36
  "picomatch": "4.0.2",
37
37
  "rxjs": "7.8.1",
@@ -7,7 +7,9 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.parseJsonPointer = exports.joinJsonPointer = exports.buildJsonPointer = void 0;
10
+ exports.buildJsonPointer = buildJsonPointer;
11
+ exports.joinJsonPointer = joinJsonPointer;
12
+ exports.parseJsonPointer = parseJsonPointer;
11
13
  function buildJsonPointer(fragments) {
12
14
  return ('/' +
13
15
  fragments
@@ -16,14 +18,12 @@ function buildJsonPointer(fragments) {
16
18
  })
17
19
  .join('/'));
18
20
  }
19
- exports.buildJsonPointer = buildJsonPointer;
20
21
  function joinJsonPointer(root, ...others) {
21
22
  if (root == '/') {
22
23
  return buildJsonPointer(others);
23
24
  }
24
25
  return (root + buildJsonPointer(others));
25
26
  }
26
- exports.joinJsonPointer = joinJsonPointer;
27
27
  function parseJsonPointer(pointer) {
28
28
  if (pointer === '') {
29
29
  return [];
@@ -36,4 +36,3 @@ function parseJsonPointer(pointer) {
36
36
  .split(/\//)
37
37
  .map((str) => str.replace(/~1/g, '/').replace(/~0/g, '~'));
38
38
  }
39
- exports.parseJsonPointer = parseJsonPointer;
@@ -7,12 +7,12 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.mergeSchemas = exports.isJsonSchema = void 0;
10
+ exports.isJsonSchema = isJsonSchema;
11
+ exports.mergeSchemas = mergeSchemas;
11
12
  const utils_1 = require("../utils");
12
13
  function isJsonSchema(value) {
13
14
  return (0, utils_1.isJsonObject)(value) || value === false || value === true;
14
15
  }
15
- exports.isJsonSchema = isJsonSchema;
16
16
  /**
17
17
  * Return a schema that is the merge of all subschemas, ie. it should validate all the schemas
18
18
  * that were passed in. It is possible to make an invalid schema this way, e.g. by using
@@ -49,4 +49,3 @@ function mergeSchemas(...schemas) {
49
49
  }
50
50
  }, true);
51
51
  }
52
- exports.mergeSchemas = mergeSchemas;
@@ -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.addUndefinedDefaults = void 0;
10
+ exports.addUndefinedDefaults = addUndefinedDefaults;
11
11
  const utils_1 = require("../utils");
12
12
  const utility_1 = require("./utility");
13
13
  function addUndefinedDefaults(value, _pointer, schema) {
@@ -91,4 +91,3 @@ function addUndefinedDefaults(value, _pointer, schema) {
91
91
  }
92
92
  return value;
93
93
  }
94
- exports.addUndefinedDefaults = addUndefinedDefaults;
@@ -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.getTypesOfSchema = void 0;
10
+ exports.getTypesOfSchema = getTypesOfSchema;
11
11
  const utils_1 = require("../utils");
12
12
  const allTypes = ['string', 'integer', 'number', 'object', 'array', 'boolean', 'null'];
13
13
  function getTypesOfSchema(schema) {
@@ -85,4 +85,3 @@ function getTypesOfSchema(schema) {
85
85
  }
86
86
  return potentials;
87
87
  }
88
- exports.getTypesOfSchema = getTypesOfSchema;
@@ -7,7 +7,8 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.visitJsonSchema = exports.visitJson = void 0;
10
+ exports.visitJson = visitJson;
11
+ exports.visitJsonSchema = visitJsonSchema;
11
12
  const rxjs_1 = require("rxjs");
12
13
  const pointer_1 = require("./pointer");
13
14
  function _getObjectSubSchema(schema, key) {
@@ -84,7 +85,6 @@ function _visitJsonRecursive(json, visitor, ptr, schema, refResolver, context, r
84
85
  function visitJson(json, visitor, schema, refResolver, context) {
85
86
  return _visitJsonRecursive(json, visitor, (0, pointer_1.buildJsonPointer)([]), schema, refResolver, context);
86
87
  }
87
- exports.visitJson = visitJson;
88
88
  function visitJsonSchema(schema, visitor) {
89
89
  if (schema === false || schema === true) {
90
90
  // Nothing to visit.
@@ -144,4 +144,3 @@ function visitJsonSchema(schema, visitor) {
144
144
  }
145
145
  _traverse(schema, (0, pointer_1.buildJsonPointer)([]), schema);
146
146
  }
147
- exports.visitJsonSchema = visitJsonSchema;
package/src/json/utils.js CHANGED
@@ -7,12 +7,11 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.isJsonArray = exports.isJsonObject = void 0;
10
+ exports.isJsonObject = isJsonObject;
11
+ exports.isJsonArray = isJsonArray;
11
12
  function isJsonObject(value) {
12
13
  return value != null && typeof value === 'object' && !Array.isArray(value);
13
14
  }
14
- exports.isJsonObject = isJsonObject;
15
15
  function isJsonArray(value) {
16
16
  return Array.isArray(value);
17
17
  }
18
- exports.isJsonArray = isJsonArray;
package/src/utils/lang.js CHANGED
@@ -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.isPromise = void 0;
10
+ exports.isPromise = isPromise;
11
11
  // Borrowed from @angular/core
12
12
  /**
13
13
  * Determine if the argument is shaped like a Promise
@@ -18,4 +18,3 @@ function isPromise(obj) {
18
18
  // It's up to the caller to ensure that obj.then conforms to the spec
19
19
  return !!obj && typeof obj.then === 'function';
20
20
  }
21
- exports.isPromise = isPromise;
@@ -7,13 +7,16 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.trimNewlines = exports.stripIndents = exports.stripIndent = exports.indentBy = exports.oneLine = void 0;
10
+ exports.oneLine = oneLine;
11
+ exports.indentBy = indentBy;
12
+ exports.stripIndent = stripIndent;
13
+ exports.stripIndents = stripIndents;
14
+ exports.trimNewlines = trimNewlines;
11
15
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
16
  function oneLine(strings, ...values) {
13
17
  const endResult = String.raw(strings, ...values);
14
18
  return endResult.replace(/(?:\r?\n(?:\s*))+/gm, ' ').trim();
15
19
  }
16
- exports.oneLine = oneLine;
17
20
  function indentBy(indentations) {
18
21
  let i = '';
19
22
  while (indentations--) {
@@ -23,7 +26,6 @@ function indentBy(indentations) {
23
26
  return i + stripIndent(strings, ...values).replace(/\n/g, '\n' + i);
24
27
  };
25
28
  }
26
- exports.indentBy = indentBy;
27
29
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
30
  function stripIndent(strings, ...values) {
29
31
  const endResult = String.raw(strings, ...values);
@@ -37,7 +39,6 @@ function stripIndent(strings, ...values) {
37
39
  const regexp = new RegExp('^[ \\t]{' + indent + '}', 'gm');
38
40
  return (indent > 0 ? endResult.replace(regexp, '') : endResult).trim();
39
41
  }
40
- exports.stripIndent = stripIndent;
41
42
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
43
  function stripIndents(strings, ...values) {
43
44
  return String.raw(strings, ...values)
@@ -46,7 +47,6 @@ function stripIndents(strings, ...values) {
46
47
  .join('\n')
47
48
  .trim();
48
49
  }
49
- exports.stripIndents = stripIndents;
50
50
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
51
51
  function trimNewlines(strings, ...values) {
52
52
  const endResult = String.raw(strings, ...values);
@@ -56,4 +56,3 @@ function trimNewlines(strings, ...values) {
56
56
  // Remove the newline at the end and following whitespace.
57
57
  .replace(/(?:\r?\n(?:\s*))$/, ''));
58
58
  }
59
- exports.trimNewlines = trimNewlines;
@@ -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.deepCopy = void 0;
10
+ exports.deepCopy = deepCopy;
11
11
  const copySymbol = Symbol();
12
12
  function deepCopy(value) {
13
13
  if (Array.isArray(value)) {
@@ -34,4 +34,3 @@ function deepCopy(value) {
34
34
  return value;
35
35
  }
36
36
  }
37
- exports.deepCopy = deepCopy;
@@ -7,7 +7,13 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.levenshtein = exports.capitalize = exports.underscore = exports.classify = exports.camelize = exports.dasherize = exports.decamelize = void 0;
10
+ exports.decamelize = decamelize;
11
+ exports.dasherize = dasherize;
12
+ exports.camelize = camelize;
13
+ exports.classify = classify;
14
+ exports.underscore = underscore;
15
+ exports.capitalize = capitalize;
16
+ exports.levenshtein = levenshtein;
11
17
  const STRING_DASHERIZE_REGEXP = /[ _]/g;
12
18
  const STRING_DECAMELIZE_REGEXP = /([a-z\d])([A-Z])/g;
13
19
  const STRING_CAMELIZE_REGEXP = /(-|_|\.|\s)+(.)?/g;
@@ -30,7 +36,6 @@ const STRING_UNDERSCORE_REGEXP_2 = /-|\s+/g;
30
36
  function decamelize(str) {
31
37
  return str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase();
32
38
  }
33
- exports.decamelize = decamelize;
34
39
  /**
35
40
  Replaces underscores, spaces, or camelCase with dashes.
36
41
 
@@ -48,7 +53,6 @@ exports.decamelize = decamelize;
48
53
  function dasherize(str) {
49
54
  return decamelize(str).replace(STRING_DASHERIZE_REGEXP, '-');
50
55
  }
51
- exports.dasherize = dasherize;
52
56
  /**
53
57
  Returns the lowerCamelCase form of a string.
54
58
 
@@ -71,7 +75,6 @@ function camelize(str) {
71
75
  })
72
76
  .replace(/^([A-Z])/, (match) => match.toLowerCase());
73
77
  }
74
- exports.camelize = camelize;
75
78
  /**
76
79
  Returns the UpperCamelCase form of a string.
77
80
 
@@ -93,7 +96,6 @@ function classify(str) {
93
96
  .map((part) => capitalize(camelize(part)))
94
97
  .join('');
95
98
  }
96
- exports.classify = classify;
97
99
  /**
98
100
  More general than decamelize. Returns the lower_case_and_underscored
99
101
  form of a string.
@@ -115,7 +117,6 @@ function underscore(str) {
115
117
  .replace(STRING_UNDERSCORE_REGEXP_2, '_')
116
118
  .toLowerCase();
117
119
  }
118
- exports.underscore = underscore;
119
120
  /**
120
121
  Returns the Capitalized form of a string
121
122
 
@@ -133,7 +134,6 @@ exports.underscore = underscore;
133
134
  function capitalize(str) {
134
135
  return str.charAt(0).toUpperCase() + str.slice(1);
135
136
  }
136
- exports.capitalize = capitalize;
137
137
  /**
138
138
  * Calculate the levenshtein distance of two strings.
139
139
  * See https://en.wikipedia.org/wiki/Levenshtein_distance.
@@ -176,4 +176,3 @@ function levenshtein(a, b) {
176
176
  }
177
177
  return matrix[b.length][a.length];
178
178
  }
179
- exports.levenshtein = levenshtein;
@@ -7,7 +7,8 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.template = exports.templateParser = void 0;
10
+ exports.templateParser = templateParser;
11
+ exports.template = template;
11
12
  const source_map_1 = require("source-map");
12
13
  // Matches <%= expr %>. This does not support structural JavaScript (for/if/...).
13
14
  const kInterpolateRe = /<%=([\s\S]+?)%>/g;
@@ -105,7 +106,6 @@ function templateParser(sourceText, fileName) {
105
106
  children,
106
107
  };
107
108
  }
108
- exports.templateParser = templateParser;
109
109
  /**
110
110
  * Fastest implementation of the templating algorithm. It only add strings and does not bother
111
111
  * with source maps.
@@ -259,4 +259,3 @@ function template(content, options) {
259
259
  result.source = source;
260
260
  return result;
261
261
  }
262
- exports.template = template;
@@ -7,19 +7,19 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.fileBuffer = exports.fileBufferToString = exports.stringToFileBuffer = void 0;
10
+ exports.fileBuffer = void 0;
11
+ exports.stringToFileBuffer = stringToFileBuffer;
12
+ exports.fileBufferToString = fileBufferToString;
11
13
  const node_util_1 = require("node:util");
12
14
  function stringToFileBuffer(str) {
13
15
  return new node_util_1.TextEncoder().encode(str).buffer;
14
16
  }
15
- exports.stringToFileBuffer = stringToFileBuffer;
16
17
  function fileBufferToString(fileBuffer) {
17
18
  if (fileBuffer.toString.length === 1) {
18
19
  return fileBuffer.toString('utf-8');
19
20
  }
20
21
  return new node_util_1.TextDecoder('utf-8').decode(new Uint8Array(fileBuffer));
21
22
  }
22
- exports.fileBufferToString = fileBufferToString;
23
23
  /** @deprecated use `stringToFileBuffer` instead. */
24
24
  const fileBuffer = (strings, ...values) => {
25
25
  return stringToFileBuffer(String.raw(strings, ...values));
@@ -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.createSyncHost = void 0;
10
+ exports.createSyncHost = createSyncHost;
11
11
  const rxjs_1 = require("rxjs");
12
12
  function wrapAction(action) {
13
13
  return new rxjs_1.Observable((subscriber) => {
@@ -52,4 +52,3 @@ function createSyncHost(handler) {
52
52
  }
53
53
  })();
54
54
  }
55
- exports.createSyncHost = createSyncHost;
@@ -7,7 +7,22 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.getSystemPath = exports.asPosixPath = exports.asWindowsPath = exports.path = exports.noCacheNormalize = exports.normalize = exports.resetNormalizeCache = exports.fragment = exports.resolve = exports.relative = exports.isAbsolute = exports.join = exports.dirname = exports.basename = exports.extname = exports.split = exports.NormalizedRoot = exports.NormalizedSep = exports.PathCannotBeFragmentException = exports.PathMustBeAbsoluteException = exports.InvalidPathException = void 0;
10
+ exports.path = exports.NormalizedRoot = exports.NormalizedSep = exports.PathCannotBeFragmentException = exports.PathMustBeAbsoluteException = exports.InvalidPathException = void 0;
11
+ exports.split = split;
12
+ exports.extname = extname;
13
+ exports.basename = basename;
14
+ exports.dirname = dirname;
15
+ exports.join = join;
16
+ exports.isAbsolute = isAbsolute;
17
+ exports.relative = relative;
18
+ exports.resolve = resolve;
19
+ exports.fragment = fragment;
20
+ exports.resetNormalizeCache = resetNormalizeCache;
21
+ exports.normalize = normalize;
22
+ exports.noCacheNormalize = noCacheNormalize;
23
+ exports.asWindowsPath = asWindowsPath;
24
+ exports.asPosixPath = asPosixPath;
25
+ exports.getSystemPath = getSystemPath;
11
26
  const exception_1 = require("../exception");
12
27
  class InvalidPathException extends exception_1.BaseException {
13
28
  constructor(path) {
@@ -50,7 +65,6 @@ function split(path) {
50
65
  }
51
66
  return fragments;
52
67
  }
53
- exports.split = split;
54
68
  /**
55
69
  *
56
70
  */
@@ -64,7 +78,6 @@ function extname(path) {
64
78
  return base.slice(i);
65
79
  }
66
80
  }
67
- exports.extname = extname;
68
81
  /**
69
82
  * Return the basename of the path, as a Path. See path.basename
70
83
  */
@@ -77,7 +90,6 @@ function basename(path) {
77
90
  return fragment(path.slice(path.lastIndexOf(exports.NormalizedSep) + 1));
78
91
  }
79
92
  }
80
- exports.basename = basename;
81
93
  /**
82
94
  * Return the dirname of the path, as a Path. See path.dirname
83
95
  */
@@ -89,7 +101,6 @@ function dirname(path) {
89
101
  const endIndex = index === 0 ? 1 : index; // case of file under root: '/file'
90
102
  return normalize(path.slice(0, endIndex));
91
103
  }
92
- exports.dirname = dirname;
93
104
  /**
94
105
  * Join multiple paths together, and normalize the result. Accepts strings that will be
95
106
  * normalized as well (but the original must be a path).
@@ -102,14 +113,12 @@ function join(p1, ...others) {
102
113
  return p1;
103
114
  }
104
115
  }
105
- exports.join = join;
106
116
  /**
107
117
  * Returns true if a path is absolute.
108
118
  */
109
119
  function isAbsolute(p) {
110
120
  return p.startsWith(exports.NormalizedSep);
111
121
  }
112
- exports.isAbsolute = isAbsolute;
113
122
  /**
114
123
  * Returns a path such that `join(from, relative(from, to)) == to`.
115
124
  * Both paths must be absolute, otherwise it does not make much sense.
@@ -144,7 +153,6 @@ function relative(from, to) {
144
153
  }
145
154
  return normalize(p);
146
155
  }
147
- exports.relative = relative;
148
156
  /**
149
157
  * Returns a Path that is the resolution of p2, from p1. If p2 is absolute, it will return p2,
150
158
  * otherwise will join both p1 and p2.
@@ -157,14 +165,12 @@ function resolve(p1, p2) {
157
165
  return join(p1, p2);
158
166
  }
159
167
  }
160
- exports.resolve = resolve;
161
168
  function fragment(path) {
162
169
  if (path.indexOf(exports.NormalizedSep) != -1) {
163
170
  throw new PathCannotBeFragmentException(path);
164
171
  }
165
172
  return path;
166
173
  }
167
- exports.fragment = fragment;
168
174
  /**
169
175
  * normalize() cache to reduce computation. For now this grows and we never flush it, but in the
170
176
  * future we might want to add a few cache flush to prevent this from growing too large.
@@ -177,7 +183,6 @@ let normalizedCache = new Map();
177
183
  function resetNormalizeCache() {
178
184
  normalizedCache = new Map();
179
185
  }
180
- exports.resetNormalizeCache = resetNormalizeCache;
181
186
  /**
182
187
  * Normalize a string into a Path. This is the only mean to get a Path type from a string that
183
188
  * represents a system path. This method cache the results as real world paths tend to be
@@ -200,7 +205,6 @@ function normalize(path) {
200
205
  }
201
206
  return maybePath;
202
207
  }
203
- exports.normalize = normalize;
204
208
  /**
205
209
  * The no cache version of the normalize() function. Used for benchmarking and testing.
206
210
  */
@@ -258,7 +262,6 @@ function noCacheNormalize(path) {
258
262
  return p.join(exports.NormalizedSep);
259
263
  }
260
264
  }
261
- exports.noCacheNormalize = noCacheNormalize;
262
265
  const path = (strings, ...values) => {
263
266
  return normalize(String.raw(strings, ...values));
264
267
  };
@@ -271,11 +274,9 @@ function asWindowsPath(path) {
271
274
  }
272
275
  return path.replace(/\//g, '\\');
273
276
  }
274
- exports.asWindowsPath = asWindowsPath;
275
277
  function asPosixPath(path) {
276
278
  return path;
277
279
  }
278
- exports.asPosixPath = asPosixPath;
279
280
  function getSystemPath(path) {
280
281
  if (process.platform.startsWith('win32')) {
281
282
  return asWindowsPath(path);
@@ -284,4 +285,3 @@ function getSystemPath(path) {
284
285
  return asPosixPath(path);
285
286
  }
286
287
  }
287
- exports.getSystemPath = getSystemPath;
@@ -7,7 +7,11 @@
7
7
  * found in the LICENSE file at https://angular.io/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.writeWorkspace = exports.readWorkspace = exports._test_removeWorkspaceFile = exports._test_addWorkspaceFile = exports.WorkspaceFormat = void 0;
10
+ exports.WorkspaceFormat = void 0;
11
+ exports._test_addWorkspaceFile = _test_addWorkspaceFile;
12
+ exports._test_removeWorkspaceFile = _test_removeWorkspaceFile;
13
+ exports.readWorkspace = readWorkspace;
14
+ exports.writeWorkspace = writeWorkspace;
11
15
  const virtual_fs_1 = require("../virtual-fs");
12
16
  const reader_1 = require("./json/reader");
13
17
  const writer_1 = require("./json/writer");
@@ -25,14 +29,12 @@ var WorkspaceFormat;
25
29
  function _test_addWorkspaceFile(name, format) {
26
30
  workspaceFiles[name] = format;
27
31
  }
28
- exports._test_addWorkspaceFile = _test_addWorkspaceFile;
29
32
  /**
30
33
  * @private
31
34
  */
32
35
  function _test_removeWorkspaceFile(name) {
33
36
  delete workspaceFiles[name];
34
37
  }
35
- exports._test_removeWorkspaceFile = _test_removeWorkspaceFile;
36
38
  // NOTE: future additions could also perform content analysis to determine format/version
37
39
  const workspaceFiles = {
38
40
  'angular.json': WorkspaceFormat.JSON,
@@ -96,7 +98,6 @@ async function readWorkspace(path, host, format) {
96
98
  formatLookup.set(workspace, WorkspaceFormat.JSON);
97
99
  return { workspace };
98
100
  }
99
- exports.readWorkspace = readWorkspace;
100
101
  /**
101
102
  * Writes a `WorkspaceDefinition` to the underlying storage via the provided `WorkspaceHost`.
102
103
  * If the `WorkspaceDefinition` was created via the `readWorkspace` function, metadata will be
@@ -129,4 +130,3 @@ async function writeWorkspace(workspace, host, path, format) {
129
130
  throw new Error('Unsupported workspace format.');
130
131
  }
131
132
  }
132
- exports.writeWorkspace = writeWorkspace;
@@ -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.createWorkspaceHost = void 0;
10
+ exports.createWorkspaceHost = createWorkspaceHost;
11
11
  const rxjs_1 = require("rxjs");
12
12
  const virtual_fs_1 = require("../virtual-fs");
13
13
  function createWorkspaceHost(host) {
@@ -40,4 +40,3 @@ function createWorkspaceHost(host) {
40
40
  };
41
41
  return workspaceHost;
42
42
  }
43
- exports.createWorkspaceHost = createWorkspaceHost;
@@ -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.readJsonWorkspace = void 0;
10
+ exports.readJsonWorkspace = readJsonWorkspace;
11
11
  const jsonc_parser_1 = require("jsonc-parser");
12
12
  const utils_1 = require("../../json/utils");
13
13
  const definitions_1 = require("../definitions");
@@ -58,7 +58,6 @@ async function readJsonWorkspace(path, host, options = {}) {
58
58
  const workspace = parseWorkspace(ast, context);
59
59
  return workspace;
60
60
  }
61
- exports.readJsonWorkspace = readJsonWorkspace;
62
61
  function parseWorkspace(workspaceNode, context) {
63
62
  const jsonMetadata = context.metadata;
64
63
  let projects;
@@ -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.createVirtualAstObject = void 0;
10
+ exports.createVirtualAstObject = createVirtualAstObject;
11
11
  const json_1 = require("../../json");
12
12
  function createVirtualAstObject(root, options = {}) {
13
13
  const reporter = (path, target, oldValue, newValue) => {
@@ -29,7 +29,6 @@ function createVirtualAstObject(root, options = {}) {
29
29
  };
30
30
  return create(Array.isArray(root) ? [...root] : { ...root }, [], reporter, new Set(options.exclude), options.include?.length ? new Set(options.include) : undefined);
31
31
  }
32
- exports.createVirtualAstObject = createVirtualAstObject;
33
32
  function create(obj, path, reporter, excluded = new Set(), included) {
34
33
  return new Proxy(obj, {
35
34
  getOwnPropertyDescriptor(target, p) {
@@ -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.writeJsonWorkspace = void 0;
10
+ exports.writeJsonWorkspace = writeJsonWorkspace;
11
11
  const jsonc_parser_1 = require("jsonc-parser");
12
12
  const node_os_1 = require("node:os");
13
13
  const metadata_1 = require("./metadata");
@@ -31,7 +31,6 @@ async function writeJsonWorkspace(workspace, host, path, options = {}) {
31
31
  return host.writeFile(path, data);
32
32
  }
33
33
  }
34
- exports.writeJsonWorkspace = writeJsonWorkspace;
35
34
  function convertJsonWorkspace(workspace, schema) {
36
35
  const obj = {
37
36
  $schema: schema || './node_modules/@angular/cli/lib/config/schema.json',