@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.
- package/README.md +36 -34
- package/node/_golden-api.d.ts +1 -1
- package/node/_golden-api.js +1 -1
- package/node/cli-logger.d.ts +7 -0
- package/node/cli-logger.js +4 -6
- package/node/experimental/index.d.ts +2 -2
- package/node/experimental/index.js +3 -3
- package/node/experimental/jobs/index.d.ts +1 -1
- package/node/experimental/jobs/index.js +7 -7
- package/node/experimental/jobs/job-registry.d.ts +1 -1
- package/node/experimental/jobs/job-registry.js +4 -4
- package/node/fs.d.ts +7 -0
- package/node/fs.js +3 -3
- package/node/host.d.ts +2 -2
- package/node/host.js +31 -33
- package/node/index.d.ts +2 -2
- package/node/index.js +1 -1
- package/node/testing/index.d.ts +2 -2
- package/node/testing/index.js +8 -5
- package/package.json +3 -3
- package/src/_golden-api.d.ts +1 -1
- package/src/_golden-api.js +1 -1
- package/src/analytics/api.d.ts +1 -1
- package/src/analytics/api.js +7 -0
- package/src/analytics/forwarder.d.ts +1 -1
- package/src/analytics/forwarder.js +7 -0
- package/src/analytics/index.d.ts +1 -1
- package/src/analytics/index.js +7 -7
- package/src/analytics/logging.d.ts +1 -1
- package/src/analytics/logging.js +7 -0
- package/src/analytics/multi.d.ts +1 -1
- package/src/analytics/multi.js +6 -6
- package/src/analytics/noop.d.ts +1 -1
- package/src/analytics/noop.js +10 -1
- package/src/exception/exception.d.ts +1 -1
- package/src/exception/exception.js +25 -9
- package/src/exception/index.d.ts +1 -1
- package/src/exception/index.js +1 -1
- package/src/experimental/jobs/README.md +133 -112
- package/src/experimental/jobs/api.d.ts +1 -1
- package/src/experimental/jobs/api.js +8 -3
- package/src/experimental/jobs/architecture.md +43 -38
- package/src/experimental/jobs/create-job-handler.d.ts +1 -2
- package/src/experimental/jobs/create-job-handler.js +17 -14
- package/src/experimental/jobs/dispatcher.d.ts +1 -2
- package/src/experimental/jobs/dispatcher.js +7 -0
- package/src/experimental/jobs/exception.d.ts +1 -1
- package/src/experimental/jobs/exception.js +3 -3
- package/src/experimental/jobs/fallback-registry.d.ts +1 -1
- package/src/experimental/jobs/fallback-registry.js +4 -4
- package/src/experimental/jobs/index.d.ts +1 -1
- package/src/experimental/jobs/index.js +7 -7
- package/src/experimental/jobs/simple-registry.d.ts +1 -1
- package/src/experimental/jobs/simple-registry.js +6 -4
- package/src/experimental/jobs/simple-scheduler.d.ts +1 -1
- package/src/experimental/jobs/simple-scheduler.js +38 -29
- package/src/experimental/jobs/strategy.d.ts +7 -0
- package/src/experimental/jobs/strategy.js +10 -9
- package/src/experimental.d.ts +2 -2
- package/src/experimental.js +3 -3
- package/src/index.d.ts +2 -2
- package/src/index.js +7 -7
- package/src/json/index.d.ts +2 -2
- package/src/json/index.js +9 -9
- package/src/json/interface.d.ts +1 -1
- package/src/json/interface.js +7 -0
- package/src/json/parser.d.ts +1 -1
- package/src/json/parser.js +39 -22
- package/src/json/schema/index.d.ts +2 -2
- package/src/json/schema/index.js +9 -9
- package/src/json/schema/interface.d.ts +1 -1
- package/src/json/schema/interface.js +7 -0
- package/src/json/schema/pointer.d.ts +1 -1
- package/src/json/schema/pointer.js +17 -5
- package/src/json/schema/registry.d.ts +1 -1
- package/src/json/schema/registry.js +28 -47
- package/src/json/schema/schema.d.ts +1 -1
- package/src/json/schema/schema.js +3 -3
- package/src/json/schema/transforms.d.ts +1 -1
- package/src/json/schema/transforms.js +14 -13
- package/src/json/schema/utility.d.ts +7 -0
- package/src/json/schema/utility.js +7 -7
- package/src/json/schema/visitor.d.ts +1 -1
- package/src/json/schema/visitor.js +8 -7
- package/src/logger/indent.d.ts +7 -0
- package/src/logger/indent.js +5 -5
- package/src/logger/index.d.ts +1 -1
- package/src/logger/index.js +7 -7
- package/src/logger/level.d.ts +1 -1
- package/src/logger/level.js +7 -0
- package/src/logger/logger.d.ts +1 -1
- package/src/logger/logger.js +13 -6
- package/src/logger/null-logger.d.ts +7 -0
- package/src/logger/null-logger.js +3 -3
- package/src/logger/transform-logger.d.ts +1 -1
- package/src/logger/transform-logger.js +7 -0
- package/src/utils/array.d.ts +1 -1
- package/src/utils/array.js +2 -2
- package/src/utils/index.d.ts +1 -1
- package/src/utils/index.js +7 -7
- package/src/utils/lang.d.ts +1 -1
- package/src/utils/lang.js +3 -3
- package/src/utils/literals.d.ts +1 -1
- package/src/utils/literals.js +15 -8
- package/src/utils/object.d.ts +1 -1
- package/src/utils/object.js +3 -3
- package/src/utils/partially-ordered-set.d.ts +2 -2
- package/src/utils/partially-ordered-set.js +12 -8
- package/src/utils/priority-queue.d.ts +1 -1
- package/src/utils/priority-queue.js +2 -2
- package/src/utils/strings.d.ts +7 -0
- package/src/utils/strings.js +12 -9
- package/src/utils/template.d.ts +1 -1
- package/src/utils/template.js +24 -30
- package/src/virtual-fs/host/alias.d.ts +1 -1
- package/src/virtual-fs/host/alias.js +7 -5
- package/src/virtual-fs/host/buffer.d.ts +1 -1
- package/src/virtual-fs/host/buffer.js +7 -0
- package/src/virtual-fs/host/create.d.ts +7 -0
- package/src/virtual-fs/host/create.js +3 -3
- package/src/virtual-fs/host/empty.d.ts +1 -1
- package/src/virtual-fs/host/empty.js +3 -3
- package/src/virtual-fs/host/index.d.ts +1 -1
- package/src/virtual-fs/host/index.js +1 -1
- package/src/virtual-fs/host/interface.d.ts +1 -1
- package/src/virtual-fs/host/interface.js +7 -0
- package/src/virtual-fs/host/memory.d.ts +1 -1
- package/src/virtual-fs/host/memory.js +32 -20
- package/src/virtual-fs/host/pattern.d.ts +1 -1
- package/src/virtual-fs/host/pattern.js +17 -8
- package/src/virtual-fs/host/record.d.ts +1 -1
- package/src/virtual-fs/host/record.js +45 -28
- package/src/virtual-fs/host/resolver.d.ts +1 -1
- package/src/virtual-fs/host/resolver.js +10 -1
- package/src/virtual-fs/host/safe.d.ts +1 -1
- package/src/virtual-fs/host/safe.js +3 -3
- package/src/virtual-fs/host/scoped.d.ts +1 -1
- package/src/virtual-fs/host/scoped.js +3 -3
- package/src/virtual-fs/host/sync.d.ts +1 -1
- package/src/virtual-fs/host/sync.js +12 -3
- package/src/virtual-fs/host/test.d.ts +1 -1
- package/src/virtual-fs/host/test.js +11 -2
- package/src/virtual-fs/index.d.ts +2 -2
- package/src/virtual-fs/index.js +8 -8
- package/src/virtual-fs/path.d.ts +1 -1
- package/src/virtual-fs/path.js +17 -8
- package/src/workspace/core.d.ts +7 -0
- package/src/workspace/core.js +3 -3
- package/src/workspace/definitions.d.ts +1 -1
- package/src/workspace/definitions.js +7 -0
- package/src/workspace/host.d.ts +1 -1
- package/src/workspace/host.js +3 -3
- package/src/workspace/index.d.ts +1 -1
- package/src/workspace/index.js +7 -7
- package/src/workspace/json/metadata.d.ts +1 -1
- package/src/workspace/json/metadata.js +8 -1
- package/src/workspace/json/reader.d.ts +7 -0
- package/src/workspace/json/reader.js +4 -4
- package/src/workspace/json/utilities.d.ts +1 -1
- package/src/workspace/json/utilities.js +12 -5
- package/src/workspace/json/writer.d.ts +7 -0
- package/src/workspace/json/writer.js +4 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SimpleScheduler = exports.JobOutputSchemaValidationError = exports.JobInboundMessageSchemaValidationError = exports.JobArgumentSchemaValidationError = void 0;
|
|
4
2
|
/**
|
|
5
3
|
* @license
|
|
6
|
-
* Copyright Google
|
|
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.SimpleScheduler = exports.JobOutputSchemaValidationError = exports.JobInboundMessageSchemaValidationError = exports.JobArgumentSchemaValidationError = void 0;
|
|
11
11
|
const rxjs_1 = require("rxjs");
|
|
12
12
|
const operators_1 = require("rxjs/operators");
|
|
13
13
|
const json_1 = require("../../json");
|
|
@@ -40,14 +40,16 @@ function _jobShare() {
|
|
|
40
40
|
let hasError = false;
|
|
41
41
|
let isComplete = false;
|
|
42
42
|
let subscription;
|
|
43
|
-
return new rxjs_1.Observable(subscriber => {
|
|
43
|
+
return new rxjs_1.Observable((subscriber) => {
|
|
44
44
|
let innerSub;
|
|
45
45
|
refCount++;
|
|
46
46
|
if (!subject) {
|
|
47
47
|
subject = new rxjs_1.Subject();
|
|
48
48
|
innerSub = subject.subscribe(subscriber);
|
|
49
49
|
subscription = source.subscribe({
|
|
50
|
-
next(value) {
|
|
50
|
+
next(value) {
|
|
51
|
+
subject.next(value);
|
|
52
|
+
},
|
|
51
53
|
error(err) {
|
|
52
54
|
hasError = true;
|
|
53
55
|
subject.error(err);
|
|
@@ -88,7 +90,7 @@ class SimpleScheduler {
|
|
|
88
90
|
return rxjs_1.of(maybeHandler);
|
|
89
91
|
}
|
|
90
92
|
const handler = this._jobRegistry.get(name);
|
|
91
|
-
return handler.pipe(operators_1.switchMap(handler => {
|
|
93
|
+
return handler.pipe(operators_1.switchMap((handler) => {
|
|
92
94
|
if (handler === null) {
|
|
93
95
|
return rxjs_1.of(null);
|
|
94
96
|
}
|
|
@@ -118,7 +120,7 @@ class SimpleScheduler {
|
|
|
118
120
|
* @returns A description, or null if the job is not registered.
|
|
119
121
|
*/
|
|
120
122
|
getDescription(name) {
|
|
121
|
-
return rxjs_1.concat(this._getInternalDescription(name).pipe(operators_1.map(x => x && x.jobDescription)), rxjs_1.of(null)).pipe(operators_1.first());
|
|
123
|
+
return rxjs_1.concat(this._getInternalDescription(name).pipe(operators_1.map((x) => x && x.jobDescription)), rxjs_1.of(null)).pipe(operators_1.first());
|
|
122
124
|
}
|
|
123
125
|
/**
|
|
124
126
|
* Returns true if the job name has been registered.
|
|
@@ -126,7 +128,7 @@ class SimpleScheduler {
|
|
|
126
128
|
* @returns True if the job exists, false otherwise.
|
|
127
129
|
*/
|
|
128
130
|
has(name) {
|
|
129
|
-
return this.getDescription(name).pipe(operators_1.map(x => x !== null));
|
|
131
|
+
return this.getDescription(name).pipe(operators_1.map((x) => x !== null));
|
|
130
132
|
}
|
|
131
133
|
/**
|
|
132
134
|
* Pause the scheduler, temporary queueing _new_ jobs. Returns a resume function that should be
|
|
@@ -146,7 +148,7 @@ class SimpleScheduler {
|
|
|
146
148
|
// Resume the queue.
|
|
147
149
|
const q = this._queue;
|
|
148
150
|
this._queue = [];
|
|
149
|
-
q.forEach(fn => fn());
|
|
151
|
+
q.forEach((fn) => fn());
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
154
|
};
|
|
@@ -208,29 +210,32 @@ class SimpleScheduler {
|
|
|
208
210
|
let pingId = 0;
|
|
209
211
|
// Create the input channel by having a filter.
|
|
210
212
|
const input = new rxjs_1.Subject();
|
|
211
|
-
input
|
|
213
|
+
input
|
|
214
|
+
.pipe(operators_1.concatMap((message) => handler.pipe(operators_1.switchMap((handler) => {
|
|
212
215
|
if (handler === null) {
|
|
213
216
|
throw new exception_1.JobDoesNotExistException(name);
|
|
214
217
|
}
|
|
215
218
|
else {
|
|
216
|
-
return handler.inputV.pipe(operators_1.switchMap(validate => validate(message)));
|
|
219
|
+
return handler.inputV.pipe(operators_1.switchMap((validate) => validate(message)));
|
|
217
220
|
}
|
|
218
|
-
}))), operators_1.filter(result => result.success), operators_1.map(result => result.data))
|
|
221
|
+
}))), operators_1.filter((result) => result.success), operators_1.map((result) => result.data))
|
|
222
|
+
.subscribe((value) => inboundBus.next({ kind: api_1.JobInboundMessageKind.Input, value }));
|
|
219
223
|
outboundBus = rxjs_1.concat(outboundBus,
|
|
220
224
|
// Add an End message at completion. This will be filtered out if the job actually send an
|
|
221
225
|
// End.
|
|
222
|
-
handler.pipe(operators_1.switchMap(handler => {
|
|
226
|
+
handler.pipe(operators_1.switchMap((handler) => {
|
|
223
227
|
if (handler) {
|
|
224
228
|
return rxjs_1.of({
|
|
225
|
-
kind: api_1.JobOutboundMessageKind.End,
|
|
229
|
+
kind: api_1.JobOutboundMessageKind.End,
|
|
230
|
+
description: handler.jobDescription,
|
|
226
231
|
});
|
|
227
232
|
}
|
|
228
233
|
else {
|
|
229
234
|
return rxjs_1.EMPTY;
|
|
230
235
|
}
|
|
231
|
-
}))).pipe(operators_1.filter(message => this._filterJobOutboundMessages(message, state)),
|
|
236
|
+
}))).pipe(operators_1.filter((message) => this._filterJobOutboundMessages(message, state)),
|
|
232
237
|
// Update internal logic and Job<> members.
|
|
233
|
-
operators_1.tap(message => {
|
|
238
|
+
operators_1.tap((message) => {
|
|
234
239
|
// Update the state.
|
|
235
240
|
state = this._updateState(message, state);
|
|
236
241
|
switch (message.kind) {
|
|
@@ -273,16 +278,16 @@ class SimpleScheduler {
|
|
|
273
278
|
}),
|
|
274
279
|
// Do output validation (might include default values so this might have side
|
|
275
280
|
// effects). We keep all messages in order.
|
|
276
|
-
operators_1.concatMap(message => {
|
|
281
|
+
operators_1.concatMap((message) => {
|
|
277
282
|
if (message.kind !== api_1.JobOutboundMessageKind.Output) {
|
|
278
283
|
return rxjs_1.of(message);
|
|
279
284
|
}
|
|
280
|
-
return handler.pipe(operators_1.switchMap(handler => {
|
|
285
|
+
return handler.pipe(operators_1.switchMap((handler) => {
|
|
281
286
|
if (handler === null) {
|
|
282
287
|
throw new exception_1.JobDoesNotExistException(name);
|
|
283
288
|
}
|
|
284
289
|
else {
|
|
285
|
-
return handler.outputV.pipe(operators_1.switchMap(validate => validate(message.value)), operators_1.switchMap(output => {
|
|
290
|
+
return handler.outputV.pipe(operators_1.switchMap((validate) => validate(message.value)), operators_1.switchMap((output) => {
|
|
286
291
|
if (!output.success) {
|
|
287
292
|
throw new JobOutputSchemaValidationError(output.errors);
|
|
288
293
|
}
|
|
@@ -294,12 +299,14 @@ class SimpleScheduler {
|
|
|
294
299
|
}
|
|
295
300
|
}));
|
|
296
301
|
}), _jobShare());
|
|
297
|
-
const output = outboundBus.pipe(operators_1.filter(x => x.kind == api_1.JobOutboundMessageKind.Output), operators_1.map((x) => x.value), operators_1.shareReplay(1));
|
|
302
|
+
const output = outboundBus.pipe(operators_1.filter((x) => x.kind == api_1.JobOutboundMessageKind.Output), operators_1.map((x) => x.value), operators_1.shareReplay(1));
|
|
298
303
|
// Return the Job.
|
|
299
304
|
return {
|
|
300
|
-
get state() {
|
|
305
|
+
get state() {
|
|
306
|
+
return state;
|
|
307
|
+
},
|
|
301
308
|
argument,
|
|
302
|
-
description: handler.pipe(operators_1.switchMap(handler => {
|
|
309
|
+
description: handler.pipe(operators_1.switchMap((handler) => {
|
|
303
310
|
if (handler === null) {
|
|
304
311
|
throw new exception_1.JobDoesNotExistException(name);
|
|
305
312
|
}
|
|
@@ -318,14 +325,14 @@ class SimpleScheduler {
|
|
|
318
325
|
}
|
|
319
326
|
return maybeObservable.pipe(
|
|
320
327
|
// Keep the order of messages.
|
|
321
|
-
operators_1.concatMap(message => {
|
|
322
|
-
return schemaRegistry.compile(schema).pipe(operators_1.switchMap(validate => validate(message)), operators_1.filter(x => x.success), operators_1.map(x => x.data));
|
|
328
|
+
operators_1.concatMap((message) => {
|
|
329
|
+
return schemaRegistry.compile(schema).pipe(operators_1.switchMap((validate) => validate(message)), operators_1.filter((x) => x.success), operators_1.map((x) => x.data));
|
|
323
330
|
}));
|
|
324
331
|
},
|
|
325
332
|
ping() {
|
|
326
333
|
const id = pingId++;
|
|
327
334
|
inboundBus.next({ kind: api_1.JobInboundMessageKind.Ping, id });
|
|
328
|
-
return outboundBus.pipe(operators_1.filter(x => x.kind === api_1.JobOutboundMessageKind.Pong && x.id == id), operators_1.first(), operators_1.ignoreElements());
|
|
335
|
+
return outboundBus.pipe(operators_1.filter((x) => x.kind === api_1.JobOutboundMessageKind.Pong && x.id == id), operators_1.first(), operators_1.ignoreElements());
|
|
329
336
|
},
|
|
330
337
|
stop() {
|
|
331
338
|
inboundBus.next({ kind: api_1.JobInboundMessageKind.Stop });
|
|
@@ -344,14 +351,15 @@ class SimpleScheduler {
|
|
|
344
351
|
const outboundBus = rxjs_1.concat(
|
|
345
352
|
// Wait for dependencies, make sure to not report messages from dependencies. Subscribe to
|
|
346
353
|
// all dependencies at the same time so they run concurrently.
|
|
347
|
-
rxjs_1.merge(...dependencies.map(x => x.outboundBus)).pipe(operators_1.ignoreElements()),
|
|
354
|
+
rxjs_1.merge(...dependencies.map((x) => x.outboundBus)).pipe(operators_1.ignoreElements()),
|
|
348
355
|
// Wait for pause() to clear (if necessary).
|
|
349
|
-
waitable, rxjs_1.from(handler).pipe(operators_1.switchMap(handler => new rxjs_1.Observable((subscriber) => {
|
|
356
|
+
waitable, rxjs_1.from(handler).pipe(operators_1.switchMap((handler) => new rxjs_1.Observable((subscriber) => {
|
|
350
357
|
if (!handler) {
|
|
351
358
|
throw new exception_1.JobDoesNotExistException(name);
|
|
352
359
|
}
|
|
353
360
|
// Validate the argument.
|
|
354
|
-
return handler.argumentV
|
|
361
|
+
return handler.argumentV
|
|
362
|
+
.pipe(operators_1.switchMap((validate) => validate(argument)), operators_1.switchMap((output) => {
|
|
355
363
|
if (!output.success) {
|
|
356
364
|
throw new JobArgumentSchemaValidationError(output.errors);
|
|
357
365
|
}
|
|
@@ -365,7 +373,8 @@ class SimpleScheduler {
|
|
|
365
373
|
scheduler: this,
|
|
366
374
|
};
|
|
367
375
|
return handler(argument, context);
|
|
368
|
-
}))
|
|
376
|
+
}))
|
|
377
|
+
.subscribe(subscriber);
|
|
369
378
|
}))));
|
|
370
379
|
return this._createJob(name, argument, handler, inboundBus, outboundBus);
|
|
371
380
|
}
|
|
@@ -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 { JsonValue } from '../../json';
|
|
2
9
|
import { JobDescription, JobHandler } from './api';
|
|
3
10
|
export declare namespace strategy {
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.strategy = void 0;
|
|
4
2
|
/**
|
|
5
3
|
* @license
|
|
6
|
-
* Copyright Google
|
|
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.strategy = void 0;
|
|
11
11
|
const rxjs_1 = require("rxjs");
|
|
12
12
|
const operators_1 = require("rxjs/operators");
|
|
13
13
|
const api_1 = require("./api");
|
|
14
|
-
const stableStringify = require(
|
|
14
|
+
const stableStringify = require('fast-json-stable-stringify');
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
15
16
|
var strategy;
|
|
16
17
|
(function (strategy) {
|
|
17
18
|
/**
|
|
@@ -22,7 +23,7 @@ var strategy;
|
|
|
22
23
|
return (handler, options) => {
|
|
23
24
|
const newHandler = (argument, context) => {
|
|
24
25
|
const previous = latest;
|
|
25
|
-
latest = rxjs_1.concat(previous.pipe(operators_1.ignoreElements()), new rxjs_1.Observable(o => handler(argument, context).subscribe(o))).pipe(operators_1.shareReplay(0));
|
|
26
|
+
latest = rxjs_1.concat(previous.pipe(operators_1.ignoreElements()), new rxjs_1.Observable((o) => handler(argument, context).subscribe(o))).pipe(operators_1.shareReplay(0));
|
|
26
27
|
return latest;
|
|
27
28
|
};
|
|
28
29
|
return Object.assign(newHandler, {
|
|
@@ -49,10 +50,10 @@ var strategy;
|
|
|
49
50
|
// Update state.
|
|
50
51
|
rxjs_1.of(state), run).pipe(operators_1.finalize(() => subscription.unsubscribe()));
|
|
51
52
|
}
|
|
52
|
-
run = handler(argument, { ...context, inboundBus: inboundBus.asObservable() }).pipe(operators_1.tap(message => {
|
|
53
|
-
if (message.kind == api_1.JobOutboundMessageKind.Start
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
run = handler(argument, { ...context, inboundBus: inboundBus.asObservable() }).pipe(operators_1.tap((message) => {
|
|
54
|
+
if (message.kind == api_1.JobOutboundMessageKind.Start ||
|
|
55
|
+
message.kind == api_1.JobOutboundMessageKind.OnReady ||
|
|
56
|
+
message.kind == api_1.JobOutboundMessageKind.End) {
|
|
56
57
|
state = message;
|
|
57
58
|
}
|
|
58
59
|
}, undefined, () => {
|
package/src/experimental.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright Google
|
|
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
|
|
7
7
|
*/
|
|
8
8
|
import * as jobs from './experimental/jobs/index';
|
|
9
|
-
export { jobs
|
|
9
|
+
export { jobs };
|
package/src/experimental.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.jobs = void 0;
|
|
4
2
|
/**
|
|
5
3
|
* @license
|
|
6
|
-
* Copyright Google
|
|
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.jobs = void 0;
|
|
11
11
|
const jobs = require("./experimental/jobs/index");
|
|
12
12
|
exports.jobs = jobs;
|
package/src/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright Google
|
|
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
|
|
@@ -14,4 +14,4 @@ export * from './exception/exception';
|
|
|
14
14
|
export * from './json/index';
|
|
15
15
|
export * from './utils/index';
|
|
16
16
|
export * from './virtual-fs/index';
|
|
17
|
-
export { analytics, experimental, json, logging, workspaces
|
|
17
|
+
export { analytics, experimental, json, logging, workspaces };
|
package/src/index.js
CHANGED
|
@@ -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]; } });
|
|
@@ -11,13 +18,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
18
|
};
|
|
12
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
20
|
exports.workspaces = exports.logging = exports.json = exports.experimental = exports.analytics = void 0;
|
|
14
|
-
/**
|
|
15
|
-
* @license
|
|
16
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
17
|
-
*
|
|
18
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
19
|
-
* found in the LICENSE file at https://angular.io/license
|
|
20
|
-
*/
|
|
21
21
|
const analytics = require("./analytics");
|
|
22
22
|
exports.analytics = analytics;
|
|
23
23
|
const experimental = require("./experimental");
|
package/src/json/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright Google
|
|
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
|
|
7
7
|
*/
|
|
8
|
+
import * as schema from './schema/index';
|
|
8
9
|
export * from './interface';
|
|
9
10
|
export * from './parser';
|
|
10
|
-
import * as schema from './schema/index';
|
|
11
11
|
export { schema };
|
package/src/json/index.js
CHANGED
|
@@ -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]; } });
|
|
@@ -11,14 +18,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
18
|
};
|
|
12
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
20
|
exports.schema = void 0;
|
|
14
|
-
/**
|
|
15
|
-
* @license
|
|
16
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
17
|
-
*
|
|
18
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
19
|
-
* found in the LICENSE file at https://angular.io/license
|
|
20
|
-
*/
|
|
21
|
-
__exportStar(require("./interface"), exports);
|
|
22
|
-
__exportStar(require("./parser"), exports);
|
|
23
21
|
const schema = require("./schema/index");
|
|
24
22
|
exports.schema = schema;
|
|
23
|
+
__exportStar(require("./interface"), exports);
|
|
24
|
+
__exportStar(require("./parser"), exports);
|
package/src/json/interface.d.ts
CHANGED
package/src/json/interface.js
CHANGED
|
@@ -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.isJsonArray = exports.isJsonObject = void 0;
|
|
4
11
|
function isJsonObject(value) {
|
package/src/json/parser.d.ts
CHANGED
package/src/json/parser.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseJson = exports.parseJsonAst = exports.JsonParseMode = exports.PathSpecificJsonException = exports.UnexpectedEndOfInputException = exports.InvalidJsonCharacterException = exports.JsonException = void 0;
|
|
4
2
|
/**
|
|
5
3
|
* @license
|
|
6
|
-
* Copyright Google
|
|
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.parseJson = exports.parseJsonAst = exports.JsonParseMode = exports.PathSpecificJsonException = exports.UnexpectedEndOfInputException = exports.InvalidJsonCharacterException = exports.JsonException = void 0;
|
|
11
|
+
/* eslint-disable no-constant-condition */
|
|
11
12
|
const exception_1 = require("../exception");
|
|
12
13
|
class JsonException extends exception_1.BaseException {
|
|
13
14
|
}
|
|
@@ -107,8 +108,16 @@ function _readExpNumber(context, start, str, comments) {
|
|
|
107
108
|
signed = true;
|
|
108
109
|
str += char;
|
|
109
110
|
}
|
|
110
|
-
else if (char == '0' ||
|
|
111
|
-
|
|
111
|
+
else if (char == '0' ||
|
|
112
|
+
char == '1' ||
|
|
113
|
+
char == '2' ||
|
|
114
|
+
char == '3' ||
|
|
115
|
+
char == '4' ||
|
|
116
|
+
char == '5' ||
|
|
117
|
+
char == '6' ||
|
|
118
|
+
char == '7' ||
|
|
119
|
+
char == '8' ||
|
|
120
|
+
char == '9') {
|
|
112
121
|
signed = true;
|
|
113
122
|
str += char;
|
|
114
123
|
}
|
|
@@ -169,9 +178,9 @@ function _readNumber(context, comments = _readBlanks(context)) {
|
|
|
169
178
|
throw new InvalidJsonCharacterException(context);
|
|
170
179
|
}
|
|
171
180
|
}
|
|
172
|
-
else if (char == 'I'
|
|
173
|
-
|
|
174
|
-
|
|
181
|
+
else if (char == 'I' &&
|
|
182
|
+
(str == '-' || str == '' || str == '+') &&
|
|
183
|
+
(context.mode & JsonParseMode.NumberConstantsAllowed) != 0) {
|
|
175
184
|
// Infinity?
|
|
176
185
|
// _token(context, 'I'); Already read.
|
|
177
186
|
_token(context, 'n');
|
|
@@ -189,8 +198,15 @@ function _readNumber(context, comments = _readBlanks(context)) {
|
|
|
189
198
|
throw new InvalidJsonCharacterException(context);
|
|
190
199
|
}
|
|
191
200
|
}
|
|
192
|
-
else if (char == '1' ||
|
|
193
|
-
|
|
201
|
+
else if (char == '1' ||
|
|
202
|
+
char == '2' ||
|
|
203
|
+
char == '3' ||
|
|
204
|
+
char == '4' ||
|
|
205
|
+
char == '5' ||
|
|
206
|
+
char == '6' ||
|
|
207
|
+
char == '7' ||
|
|
208
|
+
char == '8' ||
|
|
209
|
+
char == '9') {
|
|
194
210
|
if (str == '0' || str == '-0') {
|
|
195
211
|
throw new InvalidJsonCharacterException(context);
|
|
196
212
|
}
|
|
@@ -207,8 +223,9 @@ function _readNumber(context, comments = _readBlanks(context)) {
|
|
|
207
223
|
else if (char == 'e' || char == 'E') {
|
|
208
224
|
return _readExpNumber(context, start, str + char, comments);
|
|
209
225
|
}
|
|
210
|
-
else if (char == 'x' &&
|
|
211
|
-
|
|
226
|
+
else if (char == 'x' &&
|
|
227
|
+
(str == '0' || str == '-0') &&
|
|
228
|
+
(context.mode & JsonParseMode.HexadecimalNumberAllowed) != 0) {
|
|
212
229
|
return _readHexaNumber(context, str == '-0', start, comments);
|
|
213
230
|
}
|
|
214
231
|
else {
|
|
@@ -241,7 +258,7 @@ function _readString(context, comments = _readBlanks(context)) {
|
|
|
241
258
|
// Consume the first string delimiter.
|
|
242
259
|
const delim = _token(context);
|
|
243
260
|
if ((context.mode & JsonParseMode.SingleQuotesAllowed) == 0) {
|
|
244
|
-
if (delim == '
|
|
261
|
+
if (delim == "'") {
|
|
245
262
|
throw new InvalidJsonCharacterException(context);
|
|
246
263
|
}
|
|
247
264
|
}
|
|
@@ -262,7 +279,7 @@ function _readString(context, comments = _readBlanks(context)) {
|
|
|
262
279
|
char = _token(context);
|
|
263
280
|
switch (char) {
|
|
264
281
|
case '\\':
|
|
265
|
-
case '
|
|
282
|
+
case '/':
|
|
266
283
|
case '"':
|
|
267
284
|
case delim:
|
|
268
285
|
str += char;
|
|
@@ -454,8 +471,8 @@ function _readIdentifier(context, comments = _readBlanks(context)) {
|
|
|
454
471
|
let value = '';
|
|
455
472
|
while (true) {
|
|
456
473
|
char = _token(context);
|
|
457
|
-
if (char == undefined
|
|
458
|
-
|
|
474
|
+
if (char == undefined ||
|
|
475
|
+
(first ? identValidFirstChar.indexOf(char) : identValidChar.indexOf(char)) == -1) {
|
|
459
476
|
context.position = context.previous;
|
|
460
477
|
return {
|
|
461
478
|
kind: 'identifier',
|
|
@@ -480,7 +497,7 @@ function _readProperty(context, comments = _readBlanks(context)) {
|
|
|
480
497
|
let key;
|
|
481
498
|
if ((context.mode & JsonParseMode.IdentifierKeyNamesAllowed) != 0) {
|
|
482
499
|
const top = _peek(context);
|
|
483
|
-
if (top == '"' || top == '
|
|
500
|
+
if (top == '"' || top == "'") {
|
|
484
501
|
key = _readString(context);
|
|
485
502
|
}
|
|
486
503
|
else {
|
|
@@ -556,8 +573,8 @@ function _readBlanks(context) {
|
|
|
556
573
|
// Multi line comment.
|
|
557
574
|
_next(context);
|
|
558
575
|
_next(context);
|
|
559
|
-
while (context.original[context.position.offset] != '*'
|
|
560
|
-
|
|
576
|
+
while (context.original[context.position.offset] != '*' ||
|
|
577
|
+
context.original[context.position.offset + 1] != '/') {
|
|
561
578
|
_next(context);
|
|
562
579
|
if (context.position.offset >= context.original.length) {
|
|
563
580
|
throw new UnexpectedEndOfInputException(context);
|
|
@@ -646,7 +663,7 @@ function _readValue(context, comments = _readBlanks(context)) {
|
|
|
646
663
|
}
|
|
647
664
|
result = _readNumber(context, comments);
|
|
648
665
|
break;
|
|
649
|
-
case '
|
|
666
|
+
case "'":
|
|
650
667
|
case '"':
|
|
651
668
|
result = _readString(context, comments);
|
|
652
669
|
break;
|
|
@@ -728,8 +745,8 @@ function parseJsonAst(input, mode = JsonParseMode.Default) {
|
|
|
728
745
|
if (context.position.offset < input.length) {
|
|
729
746
|
const rest = input.substr(context.position.offset);
|
|
730
747
|
const i = rest.length > 20 ? rest.substr(0, 20) + '...' : rest;
|
|
731
|
-
throw new Error(`Expected end of file, got "${i}" at `
|
|
732
|
-
|
|
748
|
+
throw new Error(`Expected end of file, got "${i}" at ` +
|
|
749
|
+
`${context.position.line}:${context.position.character}.`);
|
|
733
750
|
}
|
|
734
751
|
return ast;
|
|
735
752
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright Google
|
|
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
|
|
7
7
|
*/
|
|
8
|
+
import * as transforms from './transforms';
|
|
8
9
|
export * from './interface';
|
|
9
10
|
export * from './pointer';
|
|
10
11
|
export * from './registry';
|
|
11
12
|
export * from './schema';
|
|
12
13
|
export * from './visitor';
|
|
13
14
|
export * from './utility';
|
|
14
|
-
import * as transforms from './transforms';
|
|
15
15
|
export { transforms };
|
package/src/json/schema/index.js
CHANGED
|
@@ -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]; } });
|
|
@@ -11,18 +18,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
18
|
};
|
|
12
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
20
|
exports.transforms = void 0;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* Copyright Google Inc. All Rights Reserved.
|
|
17
|
-
*
|
|
18
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
19
|
-
* found in the LICENSE file at https://angular.io/license
|
|
20
|
-
*/
|
|
21
|
+
const transforms = require("./transforms");
|
|
22
|
+
exports.transforms = transforms;
|
|
21
23
|
__exportStar(require("./interface"), exports);
|
|
22
24
|
__exportStar(require("./pointer"), exports);
|
|
23
25
|
__exportStar(require("./registry"), exports);
|
|
24
26
|
__exportStar(require("./schema"), exports);
|
|
25
27
|
__exportStar(require("./visitor"), exports);
|
|
26
28
|
__exportStar(require("./utility"), exports);
|
|
27
|
-
const transforms = require("./transforms");
|
|
28
|
-
exports.transforms = transforms;
|
|
@@ -1,2 +1,9 @@
|
|
|
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 });
|