@depup/angular-devkit__core 21.2.2-depup.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/LICENSE +21 -0
- package/README.md +25 -0
- package/changes.json +5 -0
- package/index.d.ts +8 -0
- package/index.js +25 -0
- package/index.js.map +1 -0
- package/node/cli-logger.d.ts +15 -0
- package/node/cli-logger.js +58 -0
- package/node/cli-logger.js.map +1 -0
- package/node/host.d.ts +43 -0
- package/node/host.js +211 -0
- package/node/host.js.map +1 -0
- package/node/index.d.ts +9 -0
- package/node/index.js +26 -0
- package/node/index.js.map +1 -0
- package/node/testing/index.d.ts +20 -0
- package/node/testing/index.js +90 -0
- package/node/testing/index.js.map +1 -0
- package/package.json +76 -0
- package/src/exception.d.ts +25 -0
- package/src/exception.js +48 -0
- package/src/exception.js.map +1 -0
- package/src/index.d.ts +15 -0
- package/src/index.js +57 -0
- package/src/index.js.map +1 -0
- package/src/json/index.d.ts +10 -0
- package/src/json/index.js +50 -0
- package/src/json/index.js.map +1 -0
- package/src/json/schema/index.d.ts +15 -0
- package/src/json/schema/index.js +55 -0
- package/src/json/schema/index.js.map +1 -0
- package/src/json/schema/interface.d.ts +84 -0
- package/src/json/schema/interface.js +10 -0
- package/src/json/schema/interface.js.map +1 -0
- package/src/json/schema/pointer.d.ts +11 -0
- package/src/json/schema/pointer.js +39 -0
- package/src/json/schema/pointer.js.map +1 -0
- package/src/json/schema/registry.d.ts +79 -0
- package/src/json/schema/registry.js +565 -0
- package/src/json/schema/registry.js.map +1 -0
- package/src/json/schema/schema.d.ts +22 -0
- package/src/json/schema/schema.js +52 -0
- package/src/json/schema/schema.js.map +1 -0
- package/src/json/schema/transforms.d.ts +12 -0
- package/src/json/schema/transforms.js +101 -0
- package/src/json/schema/transforms.js.map +1 -0
- package/src/json/schema/utility.d.ts +9 -0
- package/src/json/schema/utility.js +88 -0
- package/src/json/schema/utility.js.map +1 -0
- package/src/json/schema/visitor.d.ts +34 -0
- package/src/json/schema/visitor.js +147 -0
- package/src/json/schema/visitor.js.map +1 -0
- package/src/json/utils.d.ts +15 -0
- package/src/json/utils.js +18 -0
- package/src/json/utils.js.map +1 -0
- package/src/logger/indent.d.ts +11 -0
- package/src/logger/indent.js +41 -0
- package/src/logger/indent.js.map +1 -0
- package/src/logger/index.d.ts +12 -0
- package/src/logger/index.js +29 -0
- package/src/logger/index.js.map +1 -0
- package/src/logger/level.d.ts +28 -0
- package/src/logger/level.js +51 -0
- package/src/logger/level.js.map +1 -0
- package/src/logger/logger.d.ts +55 -0
- package/src/logger/logger.js +123 -0
- package/src/logger/logger.js.map +1 -0
- package/src/logger/null-logger.d.ts +12 -0
- package/src/logger/null-logger.js +31 -0
- package/src/logger/null-logger.js.map +1 -0
- package/src/logger/transform-logger.d.ts +12 -0
- package/src/logger/transform-logger.js +19 -0
- package/src/logger/transform-logger.js.map +1 -0
- package/src/utils/index.d.ts +15 -0
- package/src/utils/index.js +56 -0
- package/src/utils/index.js.map +1 -0
- package/src/utils/lang.d.ts +11 -0
- package/src/utils/lang.js +21 -0
- package/src/utils/lang.js.map +1 -0
- package/src/utils/literals.d.ts +15 -0
- package/src/utils/literals.js +59 -0
- package/src/utils/literals.js.map +1 -0
- package/src/utils/object.d.ts +8 -0
- package/src/utils/object.js +37 -0
- package/src/utils/object.js.map +1 -0
- package/src/utils/partially-ordered-set.d.ts +38 -0
- package/src/utils/partially-ordered-set.js +145 -0
- package/src/utils/partially-ordered-set.js.map +1 -0
- package/src/utils/priority-queue.d.ts +19 -0
- package/src/utils/priority-queue.js +50 -0
- package/src/utils/priority-queue.js.map +1 -0
- package/src/utils/strings.d.ts +112 -0
- package/src/utils/strings.js +179 -0
- package/src/utils/strings.js.map +1 -0
- package/src/utils/template.d.ts +89 -0
- package/src/utils/template.js +260 -0
- package/src/utils/template.js.map +1 -0
- package/src/virtual-fs/host/alias.d.ts +60 -0
- package/src/virtual-fs/host/alias.js +84 -0
- package/src/virtual-fs/host/alias.js.map +1 -0
- package/src/virtual-fs/host/buffer.d.ts +10 -0
- package/src/virtual-fs/host/buffer.js +22 -0
- package/src/virtual-fs/host/buffer.js.map +1 -0
- package/src/virtual-fs/host/create.d.ts +21 -0
- package/src/virtual-fs/host/create.js +55 -0
- package/src/virtual-fs/host/create.js.map +1 -0
- package/src/virtual-fs/host/empty.d.ts +19 -0
- package/src/virtual-fs/host/empty.js +38 -0
- package/src/virtual-fs/host/empty.js.map +1 -0
- package/src/virtual-fs/host/index.d.ts +21 -0
- package/src/virtual-fs/host/index.js +61 -0
- package/src/virtual-fs/host/index.js.map +1 -0
- package/src/virtual-fs/host/interface.d.ts +53 -0
- package/src/virtual-fs/host/interface.js +18 -0
- package/src/virtual-fs/host/interface.js.map +1 -0
- package/src/virtual-fs/host/memory.d.ts +49 -0
- package/src/virtual-fs/host/memory.js +332 -0
- package/src/virtual-fs/host/memory.js.map +1 -0
- package/src/virtual-fs/host/pattern.d.ts +17 -0
- package/src/virtual-fs/host/pattern.js +35 -0
- package/src/virtual-fs/host/pattern.js.map +1 -0
- package/src/virtual-fs/host/record.d.ts +92 -0
- package/src/virtual-fs/host/record.js +315 -0
- package/src/virtual-fs/host/record.js.map +1 -0
- package/src/virtual-fs/host/resolver.d.ts +30 -0
- package/src/virtual-fs/host/resolver.js +57 -0
- package/src/virtual-fs/host/resolver.js.map +1 -0
- package/src/virtual-fs/host/safe.d.ts +25 -0
- package/src/virtual-fs/host/safe.js +46 -0
- package/src/virtual-fs/host/safe.js.map +1 -0
- package/src/virtual-fs/host/scoped.d.ts +15 -0
- package/src/virtual-fs/host/scoped.js +24 -0
- package/src/virtual-fs/host/scoped.js.map +1 -0
- package/src/virtual-fs/host/sync.d.ts +34 -0
- package/src/virtual-fs/host/sync.js +93 -0
- package/src/virtual-fs/host/sync.js.map +1 -0
- package/src/virtual-fs/host/test.d.ts +48 -0
- package/src/virtual-fs/host/test.js +119 -0
- package/src/virtual-fs/host/test.js.map +1 -0
- package/src/virtual-fs/index.d.ts +10 -0
- package/src/virtual-fs/index.js +50 -0
- package/src/virtual-fs/index.js.map +1 -0
- package/src/virtual-fs/path.d.ts +111 -0
- package/src/virtual-fs/path.js +286 -0
- package/src/virtual-fs/path.js.map +1 -0
- package/src/workspace/core.d.ts +61 -0
- package/src/workspace/core.js +133 -0
- package/src/workspace/core.js.map +1 -0
- package/src/workspace/definitions.d.ts +63 -0
- package/src/workspace/definitions.js +169 -0
- package/src/workspace/definitions.js.map +1 -0
- package/src/workspace/host.d.ts +15 -0
- package/src/workspace/host.js +43 -0
- package/src/workspace/host.js.map +1 -0
- package/src/workspace/index.d.ts +10 -0
- package/src/workspace/index.js +32 -0
- package/src/workspace/index.js.map +1 -0
- package/src/workspace/json/metadata.d.ts +40 -0
- package/src/workspace/json/metadata.js +60 -0
- package/src/workspace/json/metadata.js.map +1 -0
- package/src/workspace/json/reader.d.ts +14 -0
- package/src/workspace/json/reader.js +231 -0
- package/src/workspace/json/reader.js.map +1 -0
- package/src/workspace/json/utilities.d.ts +14 -0
- package/src/workspace/json/utilities.js +113 -0
- package/src/workspace/json/utilities.js.map +1 -0
- package/src/workspace/json/writer.d.ts +12 -0
- package/src/workspace/json/writer.js +145 -0
- package/src/workspace/json/writer.js.map +1 -0
|
@@ -0,0 +1,34 @@
|
|
|
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.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { Observable } from 'rxjs';
|
|
9
|
+
import { BaseException } from '../../exception';
|
|
10
|
+
import { Path, PathFragment } from '../path';
|
|
11
|
+
import { FileBuffer, FileBufferLike, Host, HostCapabilities, HostWatchEvent, HostWatchOptions, Stats } from './interface';
|
|
12
|
+
export declare class SynchronousDelegateExpectedException extends BaseException {
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Implement a synchronous-only host interface (remove the Observable parts).
|
|
17
|
+
*/
|
|
18
|
+
export declare class SyncDelegateHost<T extends object = {}> {
|
|
19
|
+
protected _delegate: Host<T>;
|
|
20
|
+
constructor(_delegate: Host<T>);
|
|
21
|
+
protected _doSyncCall<ResultT>(observable: Observable<ResultT>): ResultT;
|
|
22
|
+
get capabilities(): HostCapabilities;
|
|
23
|
+
get delegate(): Host<T>;
|
|
24
|
+
write(path: Path, content: FileBufferLike): void;
|
|
25
|
+
read(path: Path): FileBuffer;
|
|
26
|
+
delete(path: Path): void;
|
|
27
|
+
rename(from: Path, to: Path): void;
|
|
28
|
+
list(path: Path): PathFragment[];
|
|
29
|
+
exists(path: Path): boolean;
|
|
30
|
+
isDirectory(path: Path): boolean;
|
|
31
|
+
isFile(path: Path): boolean;
|
|
32
|
+
stat(path: Path): Stats<T> | null;
|
|
33
|
+
watch(path: Path, options?: HostWatchOptions): Observable<HostWatchEvent> | null;
|
|
34
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
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.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SyncDelegateHost = exports.SynchronousDelegateExpectedException = void 0;
|
|
11
|
+
const exception_1 = require("../../exception");
|
|
12
|
+
class SynchronousDelegateExpectedException extends exception_1.BaseException {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(`Expected a synchronous delegate but got an asynchronous one.`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.SynchronousDelegateExpectedException = SynchronousDelegateExpectedException;
|
|
18
|
+
/**
|
|
19
|
+
* Implement a synchronous-only host interface (remove the Observable parts).
|
|
20
|
+
*/
|
|
21
|
+
class SyncDelegateHost {
|
|
22
|
+
_delegate;
|
|
23
|
+
constructor(_delegate) {
|
|
24
|
+
this._delegate = _delegate;
|
|
25
|
+
if (!_delegate.capabilities.synchronous) {
|
|
26
|
+
throw new SynchronousDelegateExpectedException();
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
_doSyncCall(observable) {
|
|
30
|
+
let completed = false;
|
|
31
|
+
let result = undefined;
|
|
32
|
+
let errorResult = undefined;
|
|
33
|
+
// Perf note: this is not using an observer object to avoid a performance penalty in RxJS.
|
|
34
|
+
// See https://github.com/ReactiveX/rxjs/pull/5646 for details.
|
|
35
|
+
observable.subscribe((x) => (result = x), (err) => (errorResult = err), () => (completed = true));
|
|
36
|
+
if (errorResult !== undefined) {
|
|
37
|
+
throw errorResult;
|
|
38
|
+
}
|
|
39
|
+
if (!completed) {
|
|
40
|
+
throw new SynchronousDelegateExpectedException();
|
|
41
|
+
}
|
|
42
|
+
// The non-null operation is to work around `void` type. We don't allow to return undefined
|
|
43
|
+
// but ResultT could be void, which is undefined in JavaScript, so this doesn't change the
|
|
44
|
+
// behaviour.
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
get capabilities() {
|
|
49
|
+
return this._delegate.capabilities;
|
|
50
|
+
}
|
|
51
|
+
get delegate() {
|
|
52
|
+
return this._delegate;
|
|
53
|
+
}
|
|
54
|
+
write(path, content) {
|
|
55
|
+
return this._doSyncCall(this._delegate.write(path, content));
|
|
56
|
+
}
|
|
57
|
+
read(path) {
|
|
58
|
+
return this._doSyncCall(this._delegate.read(path));
|
|
59
|
+
}
|
|
60
|
+
delete(path) {
|
|
61
|
+
return this._doSyncCall(this._delegate.delete(path));
|
|
62
|
+
}
|
|
63
|
+
rename(from, to) {
|
|
64
|
+
return this._doSyncCall(this._delegate.rename(from, to));
|
|
65
|
+
}
|
|
66
|
+
list(path) {
|
|
67
|
+
return this._doSyncCall(this._delegate.list(path));
|
|
68
|
+
}
|
|
69
|
+
exists(path) {
|
|
70
|
+
return this._doSyncCall(this._delegate.exists(path));
|
|
71
|
+
}
|
|
72
|
+
isDirectory(path) {
|
|
73
|
+
return this._doSyncCall(this._delegate.isDirectory(path));
|
|
74
|
+
}
|
|
75
|
+
isFile(path) {
|
|
76
|
+
return this._doSyncCall(this._delegate.isFile(path));
|
|
77
|
+
}
|
|
78
|
+
// Some hosts may not support stat.
|
|
79
|
+
stat(path) {
|
|
80
|
+
const result = this._delegate.stat(path);
|
|
81
|
+
if (result) {
|
|
82
|
+
return this._doSyncCall(result);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
watch(path, options) {
|
|
89
|
+
return this._delegate.watch(path, options);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.SyncDelegateHost = SyncDelegateHost;
|
|
93
|
+
//# sourceMappingURL=sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["sync.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,+CAAgD;AAYhD,MAAa,oCAAqC,SAAQ,yBAAa;IACrE;QACE,KAAK,CAAC,8DAA8D,CAAC,CAAC;IACxE,CAAC;CACF;AAJD,oFAIC;AAED;;GAEG;AACH,MAAa,gBAAgB;IACL;IAAtB,YAAsB,SAAkB;QAAlB,cAAS,GAAT,SAAS,CAAS;QACtC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;YACxC,MAAM,IAAI,oCAAoC,EAAE,CAAC;QACnD,CAAC;IACH,CAAC;IAES,WAAW,CAAU,UAA+B;QAC5D,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,MAAM,GAAwB,SAAS,CAAC;QAC5C,IAAI,WAAW,GAAsB,SAAS,CAAC;QAC/C,0FAA0F;QAC1F,+DAA+D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AAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,CAAC,IAAU;QACf,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACvD,CAAC;IACD,WAAW,CAAC,IAAU;QACpB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,CAAC;IACD,MAAM,CAAC,IAAU;QACf,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,mCAAmC;IACnC,IAAI,CAAC,IAAU;QACb,MAAM,MAAM,GAAuC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE7E,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,KAAK,CAAC,IAAU,EAAE,OAA0B;QAC1C,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;CACF;AAjFD,4CAiFC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { Observable } from 'rxjs';
|
|
9
|
+
import { Path, PathFragment } from '../path';
|
|
10
|
+
import { FileBuffer, HostWatchEvent, HostWatchOptions, Stats } from './interface';
|
|
11
|
+
import { SimpleMemoryHost, SimpleMemoryHostStats } from './memory';
|
|
12
|
+
import { SyncDelegateHost } from './sync';
|
|
13
|
+
export type TestLogRecord = {
|
|
14
|
+
kind: 'write' | 'read' | 'delete' | 'list' | 'exists' | 'isDirectory' | 'isFile' | 'stat' | 'watch';
|
|
15
|
+
path: Path;
|
|
16
|
+
} | {
|
|
17
|
+
kind: 'rename';
|
|
18
|
+
from: Path;
|
|
19
|
+
to: Path;
|
|
20
|
+
};
|
|
21
|
+
export declare class TestHost extends SimpleMemoryHost {
|
|
22
|
+
protected _records: TestLogRecord[];
|
|
23
|
+
protected _sync: SyncDelegateHost<{}> | null;
|
|
24
|
+
constructor(map?: {
|
|
25
|
+
[path: string]: string;
|
|
26
|
+
});
|
|
27
|
+
get records(): TestLogRecord[];
|
|
28
|
+
clearRecords(): void;
|
|
29
|
+
get files(): Path[];
|
|
30
|
+
get sync(): SyncDelegateHost<{}>;
|
|
31
|
+
clone(): TestHost;
|
|
32
|
+
protected _write(path: Path, content: FileBuffer): void;
|
|
33
|
+
protected _read(path: Path): ArrayBuffer;
|
|
34
|
+
protected _delete(path: Path): void;
|
|
35
|
+
protected _rename(from: Path, to: Path): void;
|
|
36
|
+
protected _list(path: Path): PathFragment[];
|
|
37
|
+
protected _exists(path: Path): boolean;
|
|
38
|
+
protected _isDirectory(path: Path): boolean;
|
|
39
|
+
protected _isFile(path: Path): boolean;
|
|
40
|
+
protected _stat(path: Path): Stats<SimpleMemoryHostStats> | null;
|
|
41
|
+
protected _watch(path: Path, options?: HostWatchOptions): Observable<HostWatchEvent>;
|
|
42
|
+
$write(path: string, content: string): void;
|
|
43
|
+
$read(path: string): string;
|
|
44
|
+
$list(path: string): PathFragment[];
|
|
45
|
+
$exists(path: string): boolean;
|
|
46
|
+
$isDirectory(path: string): boolean;
|
|
47
|
+
$isFile(path: string): boolean;
|
|
48
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
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.dev/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.TestHost = void 0;
|
|
11
|
+
const path_1 = require("../path");
|
|
12
|
+
const buffer_1 = require("./buffer");
|
|
13
|
+
const memory_1 = require("./memory");
|
|
14
|
+
const sync_1 = require("./sync");
|
|
15
|
+
class TestHost extends memory_1.SimpleMemoryHost {
|
|
16
|
+
_records = [];
|
|
17
|
+
_sync = null;
|
|
18
|
+
constructor(map = {}) {
|
|
19
|
+
super();
|
|
20
|
+
for (const filePath of Object.getOwnPropertyNames(map)) {
|
|
21
|
+
this._write((0, path_1.normalize)(filePath), (0, buffer_1.stringToFileBuffer)(map[filePath]));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
get records() {
|
|
25
|
+
return [...this._records];
|
|
26
|
+
}
|
|
27
|
+
clearRecords() {
|
|
28
|
+
this._records = [];
|
|
29
|
+
}
|
|
30
|
+
get files() {
|
|
31
|
+
const sync = this.sync;
|
|
32
|
+
function _visit(p) {
|
|
33
|
+
return sync
|
|
34
|
+
.list(p)
|
|
35
|
+
.map((fragment) => (0, path_1.join)(p, fragment))
|
|
36
|
+
.reduce((files, path) => {
|
|
37
|
+
if (sync.isDirectory(path)) {
|
|
38
|
+
return files.concat(_visit(path));
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return files.concat(path);
|
|
42
|
+
}
|
|
43
|
+
}, []);
|
|
44
|
+
}
|
|
45
|
+
return _visit((0, path_1.normalize)('/'));
|
|
46
|
+
}
|
|
47
|
+
get sync() {
|
|
48
|
+
if (!this._sync) {
|
|
49
|
+
this._sync = new sync_1.SyncDelegateHost(this);
|
|
50
|
+
}
|
|
51
|
+
return this._sync;
|
|
52
|
+
}
|
|
53
|
+
clone() {
|
|
54
|
+
const newHost = new TestHost();
|
|
55
|
+
newHost._cache = new Map(this._cache);
|
|
56
|
+
return newHost;
|
|
57
|
+
}
|
|
58
|
+
// Override parents functions to keep a record of all operators that were done.
|
|
59
|
+
_write(path, content) {
|
|
60
|
+
this._records.push({ kind: 'write', path });
|
|
61
|
+
return super._write(path, content);
|
|
62
|
+
}
|
|
63
|
+
_read(path) {
|
|
64
|
+
this._records.push({ kind: 'read', path });
|
|
65
|
+
return super._read(path);
|
|
66
|
+
}
|
|
67
|
+
_delete(path) {
|
|
68
|
+
this._records.push({ kind: 'delete', path });
|
|
69
|
+
return super._delete(path);
|
|
70
|
+
}
|
|
71
|
+
_rename(from, to) {
|
|
72
|
+
this._records.push({ kind: 'rename', from, to });
|
|
73
|
+
return super._rename(from, to);
|
|
74
|
+
}
|
|
75
|
+
_list(path) {
|
|
76
|
+
this._records.push({ kind: 'list', path });
|
|
77
|
+
return super._list(path);
|
|
78
|
+
}
|
|
79
|
+
_exists(path) {
|
|
80
|
+
this._records.push({ kind: 'exists', path });
|
|
81
|
+
return super._exists(path);
|
|
82
|
+
}
|
|
83
|
+
_isDirectory(path) {
|
|
84
|
+
this._records.push({ kind: 'isDirectory', path });
|
|
85
|
+
return super._isDirectory(path);
|
|
86
|
+
}
|
|
87
|
+
_isFile(path) {
|
|
88
|
+
this._records.push({ kind: 'isFile', path });
|
|
89
|
+
return super._isFile(path);
|
|
90
|
+
}
|
|
91
|
+
_stat(path) {
|
|
92
|
+
this._records.push({ kind: 'stat', path });
|
|
93
|
+
return super._stat(path);
|
|
94
|
+
}
|
|
95
|
+
_watch(path, options) {
|
|
96
|
+
this._records.push({ kind: 'watch', path });
|
|
97
|
+
return super._watch(path, options);
|
|
98
|
+
}
|
|
99
|
+
$write(path, content) {
|
|
100
|
+
return super._write((0, path_1.normalize)(path), (0, buffer_1.stringToFileBuffer)(content));
|
|
101
|
+
}
|
|
102
|
+
$read(path) {
|
|
103
|
+
return (0, buffer_1.fileBufferToString)(super._read((0, path_1.normalize)(path)));
|
|
104
|
+
}
|
|
105
|
+
$list(path) {
|
|
106
|
+
return super._list((0, path_1.normalize)(path));
|
|
107
|
+
}
|
|
108
|
+
$exists(path) {
|
|
109
|
+
return super._exists((0, path_1.normalize)(path));
|
|
110
|
+
}
|
|
111
|
+
$isDirectory(path) {
|
|
112
|
+
return super._isDirectory((0, path_1.normalize)(path));
|
|
113
|
+
}
|
|
114
|
+
$isFile(path) {
|
|
115
|
+
return super._isFile((0, path_1.normalize)(path));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.TestHost = TestHost;
|
|
119
|
+
//# sourceMappingURL=test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["test.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,kCAA8D;AAC9D,qCAAkE;AAElE,qCAAmE;AACnE,iCAA0C;AAsB1C,MAAa,QAAS,SAAQ,yBAAgB;IAClC,QAAQ,GAAoB,EAAE,CAAC;IAC/B,KAAK,GAAgC,IAAI,CAAC;IAEpD,YAAY,MAAkC,EAAE;QAC9C,KAAK,EAAE,CAAC;QAER,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAC,EAAE,CAAC;YACvD,IAAI,CAAC,MAAM,CAAC,IAAA,gBAAS,EAAC,QAAQ,CAAC,EAAE,IAAA,2BAAkB,EAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;IAED,IAAI,OAAO;QACT,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IACD,YAAY;QACV,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;IAED,IAAI,KAAK;QACP,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACvB,SAAS,MAAM,CAAC,CAAO;YACrB,OAAO,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4BA+HC"}
|
|
@@ -0,0 +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.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import * as virtualFs from './host/index';
|
|
9
|
+
export * from './path';
|
|
10
|
+
export { virtualFs };
|
|
@@ -0,0 +1,50 @@
|
|
|
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.dev/license
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
+
var ownKeys = function(o) {
|
|
27
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
+
var ar = [];
|
|
29
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
return ownKeys(o);
|
|
33
|
+
};
|
|
34
|
+
return function (mod) {
|
|
35
|
+
if (mod && mod.__esModule) return mod;
|
|
36
|
+
var result = {};
|
|
37
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
+
__setModuleDefault(result, mod);
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
})();
|
|
42
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
43
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.virtualFs = void 0;
|
|
47
|
+
const virtualFs = __importStar(require("./host/index"));
|
|
48
|
+
exports.virtualFs = virtualFs;
|
|
49
|
+
__exportStar(require("./path"), exports);
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,wDAA0C;AAGjC,8BAAS;AADlB,yCAAuB"}
|
|
@@ -0,0 +1,111 @@
|
|
|
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.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { BaseException } from '../exception';
|
|
9
|
+
import { TemplateTag } from '../utils/literals';
|
|
10
|
+
export declare class InvalidPathException extends BaseException {
|
|
11
|
+
constructor(path: string);
|
|
12
|
+
}
|
|
13
|
+
export declare class PathMustBeAbsoluteException extends BaseException {
|
|
14
|
+
constructor(path: string);
|
|
15
|
+
}
|
|
16
|
+
export declare class PathCannotBeFragmentException extends BaseException {
|
|
17
|
+
constructor(path: string);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A Path recognized by most methods in the DevKit.
|
|
21
|
+
*/
|
|
22
|
+
export type Path = string & {
|
|
23
|
+
__PRIVATE_DEVKIT_PATH: void;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A Path fragment (file or directory name) recognized by most methods in the DevKit.
|
|
27
|
+
*/
|
|
28
|
+
export type PathFragment = Path & {
|
|
29
|
+
__PRIVATE_DEVKIT_PATH_FRAGMENT: void;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* The Separator for normalized path.
|
|
33
|
+
*/
|
|
34
|
+
export declare const NormalizedSep: Path;
|
|
35
|
+
/**
|
|
36
|
+
* The root of a normalized path.
|
|
37
|
+
*/
|
|
38
|
+
export declare const NormalizedRoot: Path;
|
|
39
|
+
/**
|
|
40
|
+
* Split a path into multiple path fragments. Each fragments except the last one will end with
|
|
41
|
+
* a path separator.
|
|
42
|
+
* @param {Path} path The path to split.
|
|
43
|
+
* @returns {Path[]} An array of path fragments.
|
|
44
|
+
*/
|
|
45
|
+
export declare function split(path: Path): PathFragment[];
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
export declare function extname(path: Path): string;
|
|
50
|
+
/**
|
|
51
|
+
* Return the basename of the path, as a Path. See path.basename
|
|
52
|
+
*/
|
|
53
|
+
export declare function basename(path: Path): PathFragment;
|
|
54
|
+
/**
|
|
55
|
+
* Return the dirname of the path, as a Path. See path.dirname
|
|
56
|
+
*/
|
|
57
|
+
export declare function dirname(path: Path): Path;
|
|
58
|
+
/**
|
|
59
|
+
* Join multiple paths together, and normalize the result. Accepts strings that will be
|
|
60
|
+
* normalized as well (but the original must be a path).
|
|
61
|
+
*/
|
|
62
|
+
export declare function join(p1: Path, ...others: string[]): Path;
|
|
63
|
+
/**
|
|
64
|
+
* Returns true if a path is absolute.
|
|
65
|
+
*/
|
|
66
|
+
export declare function isAbsolute(p: Path): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Returns a path such that `join(from, relative(from, to)) == to`.
|
|
69
|
+
* Both paths must be absolute, otherwise it does not make much sense.
|
|
70
|
+
*/
|
|
71
|
+
export declare function relative(from: Path, to: Path): Path;
|
|
72
|
+
/**
|
|
73
|
+
* Returns a Path that is the resolution of p2, from p1. If p2 is absolute, it will return p2,
|
|
74
|
+
* otherwise will join both p1 and p2.
|
|
75
|
+
*/
|
|
76
|
+
export declare function resolve(p1: Path, p2: Path): Path;
|
|
77
|
+
export declare function fragment(path: string): PathFragment;
|
|
78
|
+
/**
|
|
79
|
+
* Reset the cache. This is only useful for testing.
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
export declare function resetNormalizeCache(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Normalize a string into a Path. This is the only mean to get a Path type from a string that
|
|
85
|
+
* represents a system path. This method cache the results as real world paths tend to be
|
|
86
|
+
* duplicated often.
|
|
87
|
+
* Normalization includes:
|
|
88
|
+
* - Windows backslashes `\\` are replaced with `/`.
|
|
89
|
+
* - Windows drivers are replaced with `/X/`, where X is the drive letter.
|
|
90
|
+
* - Absolute paths starts with `/`.
|
|
91
|
+
* - Multiple `/` are replaced by a single one.
|
|
92
|
+
* - Path segments `.` are removed.
|
|
93
|
+
* - Path segments `..` are resolved.
|
|
94
|
+
* - If a path is absolute, having a `..` at the start is invalid (and will throw).
|
|
95
|
+
* @param path The path to be normalized.
|
|
96
|
+
*/
|
|
97
|
+
export declare function normalize(path: string): Path;
|
|
98
|
+
/**
|
|
99
|
+
* The no cache version of the normalize() function. Used for benchmarking and testing.
|
|
100
|
+
*/
|
|
101
|
+
export declare function noCacheNormalize(path: string): Path;
|
|
102
|
+
export declare const path: TemplateTag<Path>;
|
|
103
|
+
export type WindowsPath = string & {
|
|
104
|
+
__PRIVATE_DEVKIT_WINDOWS_PATH: void;
|
|
105
|
+
};
|
|
106
|
+
export type PosixPath = string & {
|
|
107
|
+
__PRIVATE_DEVKIT_POSIX_PATH: void;
|
|
108
|
+
};
|
|
109
|
+
export declare function asWindowsPath(path: Path): WindowsPath;
|
|
110
|
+
export declare function asPosixPath(path: Path): PosixPath;
|
|
111
|
+
export declare function getSystemPath(path: Path): string;
|