@angular-devkit/core 14.0.0-next.4 → 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 +0 -1
- package/node/experimental/index.js +5 -1
- package/node/experimental/jobs/index.js +5 -1
- package/node/host.js +10 -42
- package/node/index.js +5 -1
- package/node/testing/index.js +5 -1
- package/package.json +4 -4
- package/src/analytics/index.d.ts +1 -1
- package/src/analytics/index.js +7 -3
- package/src/{exception/exception.d.ts → exception.d.ts} +15 -0
- package/src/{exception/exception.js → exception.js} +15 -0
- package/src/experimental/jobs/create-job-handler.d.ts +1 -1
- package/src/experimental/jobs/create-job-handler.js +4 -4
- package/src/experimental/jobs/exception.d.ts +1 -1
- package/src/experimental/jobs/exception.js +3 -3
- package/src/experimental/jobs/index.js +5 -1
- package/src/experimental.js +5 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +6 -2
- package/src/json/index.js +5 -1
- package/src/json/parser.js +3 -3
- package/src/json/schema/index.js +5 -1
- package/src/json/schema/registry.d.ts +1 -1
- package/src/json/schema/registry.js +6 -2
- package/src/logger/index.js +5 -1
- package/src/utils/index.js +5 -1
- package/src/utils/strings.js +1 -1
- package/src/virtual-fs/host/index.js +5 -1
- package/src/virtual-fs/index.js +5 -1
- package/src/virtual-fs/path.js +4 -4
- package/src/workspace/index.js +5 -1
- package/src/workspace/json/utilities.js +1 -1
- package/src/exception/index.d.ts +0 -8
- package/src/exception/index.js +0 -20
package/node/BUILD.bazel
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
package/node/host.js
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -75,21 +79,7 @@ class NodeJsAsyncHost {
|
|
|
75
79
|
return (0, rxjs_1.from)(fs_1.promises.readFile((0, src_1.getSystemPath)(path))).pipe((0, operators_1.map)((buffer) => new Uint8Array(buffer).buffer));
|
|
76
80
|
}
|
|
77
81
|
delete(path) {
|
|
78
|
-
return
|
|
79
|
-
if (isDirectory) {
|
|
80
|
-
// The below should be removed and replaced with just `rm` when support for Node.Js 12 is removed.
|
|
81
|
-
const { rm, rmdir } = fs_1.promises;
|
|
82
|
-
if (rm) {
|
|
83
|
-
await rm((0, src_1.getSystemPath)(path), { force: true, recursive: true, maxRetries: 3 });
|
|
84
|
-
}
|
|
85
|
-
else {
|
|
86
|
-
await rmdir((0, src_1.getSystemPath)(path), { recursive: true, maxRetries: 3 });
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
await fs_1.promises.unlink((0, src_1.getSystemPath)(path));
|
|
91
|
-
}
|
|
92
|
-
}));
|
|
82
|
+
return (0, rxjs_1.from)(fs_1.promises.rm((0, src_1.getSystemPath)(path), { force: true, recursive: true, maxRetries: 3 }));
|
|
93
83
|
}
|
|
94
84
|
rename(from, to) {
|
|
95
85
|
return (0, rxjs_1.from)(fs_1.promises.rename((0, src_1.getSystemPath)(from), (0, src_1.getSystemPath)(to)));
|
|
@@ -166,32 +156,10 @@ class NodeJsSyncHost {
|
|
|
166
156
|
});
|
|
167
157
|
}
|
|
168
158
|
delete(path) {
|
|
169
|
-
return
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// The below should be removed and replaced with just `rmSync` when support for Node.Js 12 is removed.
|
|
174
|
-
const { rmSync, rmdirSync } = fs_1.default;
|
|
175
|
-
if (rmSync) {
|
|
176
|
-
rmSync((0, src_1.getSystemPath)(path), { force: true, recursive: true, maxRetries: 3 });
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
rmdirSync((0, src_1.getSystemPath)(path), { recursive: true, maxRetries: 3 });
|
|
180
|
-
}
|
|
181
|
-
obs.complete();
|
|
182
|
-
});
|
|
183
|
-
return (0, rxjs_1.concat)(...dirPaths.map((name) => this.delete((0, src_1.join)(path, name))), rmDirComplete);
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
try {
|
|
187
|
-
(0, fs_1.unlinkSync)((0, src_1.getSystemPath)(path));
|
|
188
|
-
}
|
|
189
|
-
catch (err) {
|
|
190
|
-
return (0, rxjs_1.throwError)(err);
|
|
191
|
-
}
|
|
192
|
-
return (0, rxjs_1.of)(undefined);
|
|
193
|
-
}
|
|
194
|
-
}));
|
|
159
|
+
return new rxjs_1.Observable((obs) => {
|
|
160
|
+
fs_1.default.rmSync((0, src_1.getSystemPath)(path), { force: true, recursive: true, maxRetries: 3 });
|
|
161
|
+
obs.complete();
|
|
162
|
+
});
|
|
195
163
|
}
|
|
196
164
|
rename(from, to) {
|
|
197
165
|
return new rxjs_1.Observable((obs) => {
|
package/node/index.js
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
package/node/testing/index.js
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/core",
|
|
3
|
-
"version": "14.0.0-next.
|
|
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,9 +14,9 @@
|
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"ajv-formats": "2.1.1",
|
|
17
|
-
"ajv": "8.
|
|
17
|
+
"ajv": "8.11.0",
|
|
18
18
|
"fast-json-stable-stringify": "2.1.0",
|
|
19
|
-
"magic-string": "0.
|
|
19
|
+
"magic-string": "0.26.1",
|
|
20
20
|
"rxjs": "6.6.7",
|
|
21
21
|
"source-map": "0.7.3"
|
|
22
22
|
},
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"url": "https://github.com/angular/angular-cli.git"
|
|
34
34
|
},
|
|
35
35
|
"engines": {
|
|
36
|
-
"node": "^
|
|
36
|
+
"node": "^14.15.0 || >=16.10.0",
|
|
37
37
|
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
|
38
38
|
"yarn": ">= 1.13.0"
|
|
39
39
|
},
|
package/src/analytics/index.d.ts
CHANGED
package/src/analytics/index.js
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -39,7 +43,7 @@ var NgCliAnalyticsDimensions;
|
|
|
39
43
|
NgCliAnalyticsDimensions[NgCliAnalyticsDimensions["RamInGigabytes"] = 3] = "RamInGigabytes";
|
|
40
44
|
NgCliAnalyticsDimensions[NgCliAnalyticsDimensions["NodeVersion"] = 4] = "NodeVersion";
|
|
41
45
|
NgCliAnalyticsDimensions[NgCliAnalyticsDimensions["NgAddCollection"] = 6] = "NgAddCollection";
|
|
42
|
-
NgCliAnalyticsDimensions[NgCliAnalyticsDimensions["
|
|
46
|
+
NgCliAnalyticsDimensions[NgCliAnalyticsDimensions["AngularCLIMajorVersion"] = 8] = "AngularCLIMajorVersion";
|
|
43
47
|
NgCliAnalyticsDimensions[NgCliAnalyticsDimensions["BuildErrors"] = 20] = "BuildErrors";
|
|
44
48
|
})(NgCliAnalyticsDimensions = exports.NgCliAnalyticsDimensions || (exports.NgCliAnalyticsDimensions = {}));
|
|
45
49
|
var NgCliAnalyticsMetrics;
|
|
@@ -68,7 +72,7 @@ exports.NgCliAnalyticsDimensionsFlagInfo = {
|
|
|
68
72
|
RamInGigabytes: ['RAM (In GB)', 'number'],
|
|
69
73
|
NodeVersion: ['Node Version', 'number'],
|
|
70
74
|
NgAddCollection: ['--collection', 'string'],
|
|
71
|
-
|
|
75
|
+
AngularCLIMajorVersion: ['Angular CLI Major Version', 'string'],
|
|
72
76
|
BuildErrors: ['Build Errors (comma separated)', 'string'],
|
|
73
77
|
};
|
|
74
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
|
|
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
|
|
14
|
-
const
|
|
13
|
+
const exception_1 = require("../../exception");
|
|
14
|
+
const index_1 = require("../../utils/index");
|
|
15
15
|
const api_1 = require("./api");
|
|
16
|
-
class ChannelAlreadyExistException extends
|
|
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,
|
|
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
|
|
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
|
|
12
|
-
class JobNameAlreadyRegisteredException extends
|
|
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
|
|
18
|
+
class JobDoesNotExistException extends exception_1.BaseException {
|
|
19
19
|
constructor(name) {
|
|
20
20
|
super(`Job name ${JSON.stringify(name)} does not exist.`);
|
|
21
21
|
}
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
package/src/experimental.js
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
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
|
|
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
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -40,7 +44,7 @@ const logging = __importStar(require("./logger/index"));
|
|
|
40
44
|
exports.logging = logging;
|
|
41
45
|
const workspaces = __importStar(require("./workspace"));
|
|
42
46
|
exports.workspaces = workspaces;
|
|
43
|
-
__exportStar(require("./exception
|
|
47
|
+
__exportStar(require("./exception"), exports);
|
|
44
48
|
__exportStar(require("./json/index"), exports);
|
|
45
49
|
__exportStar(require("./utils/index"), exports);
|
|
46
50
|
__exportStar(require("./virtual-fs/index"), exports);
|
package/src/json/index.js
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
package/src/json/parser.js
CHANGED
|
@@ -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.
|
|
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.
|
|
749
|
-
const i = rest.length > 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
|
}
|
package/src/json/schema/index.js
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { ValidateFunction } from 'ajv';
|
|
9
9
|
import { Observable } from 'rxjs';
|
|
10
|
-
import { BaseException } from '../../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';
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -37,7 +41,7 @@ const https = __importStar(require("https"));
|
|
|
37
41
|
const rxjs_1 = require("rxjs");
|
|
38
42
|
const operators_1 = require("rxjs/operators");
|
|
39
43
|
const Url = __importStar(require("url"));
|
|
40
|
-
const exception_1 = require("../../exception
|
|
44
|
+
const exception_1 = require("../../exception");
|
|
41
45
|
const utils_1 = require("../../utils");
|
|
42
46
|
const utils_2 = require("../utils");
|
|
43
47
|
const utility_1 = require("./utility");
|
package/src/logger/index.js
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
package/src/utils/index.js
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
package/src/utils/strings.js
CHANGED
|
@@ -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.
|
|
133
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
134
134
|
}
|
|
135
135
|
exports.capitalize = capitalize;
|
|
136
136
|
/**
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
package/src/virtual-fs/index.js
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
package/src/virtual-fs/path.js
CHANGED
|
@@ -61,7 +61,7 @@ function extname(path) {
|
|
|
61
61
|
return '';
|
|
62
62
|
}
|
|
63
63
|
else {
|
|
64
|
-
return base.
|
|
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.
|
|
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.
|
|
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.
|
|
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);
|
package/src/workspace/index.js
CHANGED
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.
|
|
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);
|
|
12
16
|
}) : (function(o, m, k, k2) {
|
|
13
17
|
if (k2 === undefined) k2 = k;
|
|
14
18
|
o[k2] = m[k];
|
|
@@ -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.
|
|
225
|
+
const relativeKey = key.slice(path.length + 1);
|
|
226
226
|
if (relativeKey.length > 0 && !relativeKey.includes('/')) {
|
|
227
227
|
keys.push(`${unescapeKey(relativeKey)}`);
|
|
228
228
|
}
|
package/src/exception/index.d.ts
DELETED
package/src/exception/index.js
DELETED
|
@@ -1,20 +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
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
17
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
__exportStar(require("./exception"), exports);
|