Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
15
my-app/node_modules/@angular-devkit/core/node/cli-logger.d.ts
generated
vendored
Executable file
15
my-app/node_modules/@angular-devkit/core/node/cli-logger.d.ts
generated
vendored
Executable file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
import { logging } from '../src';
|
||||
export interface ProcessOutput {
|
||||
write(buffer: string | Buffer): boolean;
|
||||
}
|
||||
/**
|
||||
* A Logger that sends information to STDOUT and STDERR.
|
||||
*/
|
||||
export declare function createConsoleLogger(verbose?: boolean, stdout?: ProcessOutput, stderr?: ProcessOutput, colors?: Partial<Record<logging.LogLevel, (s: string) => string>>): logging.Logger;
|
58
my-app/node_modules/@angular-devkit/core/node/cli-logger.js
generated
vendored
Executable file
58
my-app/node_modules/@angular-devkit/core/node/cli-logger.js
generated
vendored
Executable file
|
@ -0,0 +1,58 @@
|
|||
"use strict";
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createConsoleLogger = void 0;
|
||||
const rxjs_1 = require("rxjs");
|
||||
const src_1 = require("../src");
|
||||
/**
|
||||
* A Logger that sends information to STDOUT and STDERR.
|
||||
*/
|
||||
function createConsoleLogger(verbose = false, stdout = process.stdout, stderr = process.stderr, colors) {
|
||||
const logger = new src_1.logging.IndentLogger('cling');
|
||||
logger.pipe((0, rxjs_1.filter)((entry) => entry.level !== 'debug' || verbose)).subscribe((entry) => {
|
||||
const color = colors && colors[entry.level];
|
||||
let output = stdout;
|
||||
switch (entry.level) {
|
||||
case 'warn':
|
||||
case 'fatal':
|
||||
case 'error':
|
||||
output = stderr;
|
||||
break;
|
||||
}
|
||||
// If we do console.log(message) or process.stdout.write(message + '\n'), the process might
|
||||
// stop before the whole message is written and the stream is flushed. This happens when
|
||||
// streams are asynchronous.
|
||||
//
|
||||
// NodeJS IO streams are different depending on platform and usage. In POSIX environment,
|
||||
// for example, they're asynchronous when writing to a pipe, but synchronous when writing
|
||||
// to a TTY. In windows, it's the other way around. You can verify which is which with
|
||||
// stream.isTTY and platform, but this is not good enough.
|
||||
// In the async case, one should wait for the callback before sending more data or
|
||||
// continuing the process. In our case it would be rather hard to do (but not impossible).
|
||||
//
|
||||
// Instead we take the easy way out and simply chunk the message and call the write
|
||||
// function while the buffer drain itself asynchronously. With a smaller chunk size than
|
||||
// the buffer, we are mostly certain that it works. In this case, the chunk has been picked
|
||||
// as half a page size (4096/2 = 2048), minus some bytes for the color formatting.
|
||||
// On POSIX it seems the buffer is 2 pages (8192), but just to be sure (could be different
|
||||
// by platform).
|
||||
//
|
||||
// For more details, see https://nodejs.org/api/process.html#process_a_note_on_process_i_o
|
||||
const chunkSize = 2000; // Small chunk.
|
||||
let message = entry.message;
|
||||
while (message) {
|
||||
const chunk = message.slice(0, chunkSize);
|
||||
message = message.slice(chunkSize);
|
||||
output.write(color ? color(chunk) : chunk);
|
||||
}
|
||||
output.write('\n');
|
||||
});
|
||||
return logger;
|
||||
}
|
||||
exports.createConsoleLogger = createConsoleLogger;
|
46
my-app/node_modules/@angular-devkit/core/node/host.d.ts
generated
vendored
Executable file
46
my-app/node_modules/@angular-devkit/core/node/host.d.ts
generated
vendored
Executable file
|
@ -0,0 +1,46 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
/// <reference types="@types/node/fs" />
|
||||
/// <reference types="@types/node/ts4.8/fs" />
|
||||
import { Stats } from 'node:fs';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Path, PathFragment, virtualFs } from '../src';
|
||||
/**
|
||||
* An implementation of the Virtual FS using Node as the background. There are two versions; one
|
||||
* synchronous and one asynchronous.
|
||||
*/
|
||||
export declare class NodeJsAsyncHost implements virtualFs.Host<Stats> {
|
||||
get capabilities(): virtualFs.HostCapabilities;
|
||||
write(path: Path, content: virtualFs.FileBuffer): Observable<void>;
|
||||
read(path: Path): Observable<virtualFs.FileBuffer>;
|
||||
delete(path: Path): Observable<void>;
|
||||
rename(from: Path, to: Path): Observable<void>;
|
||||
list(path: Path): Observable<PathFragment[]>;
|
||||
exists(path: Path): Observable<boolean>;
|
||||
isDirectory(path: Path): Observable<boolean>;
|
||||
isFile(path: Path): Observable<boolean>;
|
||||
stat(path: Path): Observable<virtualFs.Stats<Stats>>;
|
||||
watch(path: Path, _options?: virtualFs.HostWatchOptions): Observable<virtualFs.HostWatchEvent> | null;
|
||||
}
|
||||
/**
|
||||
* An implementation of the Virtual FS using Node as the backend, synchronously.
|
||||
*/
|
||||
export declare class NodeJsSyncHost implements virtualFs.Host<Stats> {
|
||||
get capabilities(): virtualFs.HostCapabilities;
|
||||
write(path: Path, content: virtualFs.FileBuffer): Observable<void>;
|
||||
read(path: Path): Observable<virtualFs.FileBuffer>;
|
||||
delete(path: Path): Observable<void>;
|
||||
rename(from: Path, to: Path): Observable<void>;
|
||||
list(path: Path): Observable<PathFragment[]>;
|
||||
exists(path: Path): Observable<boolean>;
|
||||
isDirectory(path: Path): Observable<boolean>;
|
||||
isFile(path: Path): Observable<boolean>;
|
||||
stat(path: Path): Observable<virtualFs.Stats<Stats>>;
|
||||
watch(path: Path, _options?: virtualFs.HostWatchOptions): Observable<virtualFs.HostWatchEvent> | null;
|
||||
}
|
212
my-app/node_modules/@angular-devkit/core/node/host.js
generated
vendored
Executable file
212
my-app/node_modules/@angular-devkit/core/node/host.js
generated
vendored
Executable file
|
@ -0,0 +1,212 @@
|
|||
"use strict";
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.NodeJsSyncHost = exports.NodeJsAsyncHost = void 0;
|
||||
const node_fs_1 = require("node:fs");
|
||||
const node_path_1 = require("node:path");
|
||||
const rxjs_1 = require("rxjs");
|
||||
const src_1 = require("../src");
|
||||
async function exists(path) {
|
||||
try {
|
||||
await node_fs_1.promises.access(path, node_fs_1.constants.F_OK);
|
||||
return true;
|
||||
}
|
||||
catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// This will only be initialized if the watch() method is called.
|
||||
// Otherwise chokidar appears only in type positions, and shouldn't be referenced
|
||||
// in the JavaScript output.
|
||||
let FSWatcher;
|
||||
function loadFSWatcher() {
|
||||
if (!FSWatcher) {
|
||||
try {
|
||||
FSWatcher = require('chokidar').FSWatcher;
|
||||
}
|
||||
catch (e) {
|
||||
if (e.code !== 'MODULE_NOT_FOUND') {
|
||||
throw new Error('As of angular-devkit version 8.0, the "chokidar" package ' +
|
||||
'must be installed in order to use watch() features.');
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* An implementation of the Virtual FS using Node as the background. There are two versions; one
|
||||
* synchronous and one asynchronous.
|
||||
*/
|
||||
class NodeJsAsyncHost {
|
||||
get capabilities() {
|
||||
return { synchronous: false };
|
||||
}
|
||||
write(path, content) {
|
||||
return (0, rxjs_1.from)(node_fs_1.promises.mkdir((0, src_1.getSystemPath)((0, src_1.dirname)(path)), { recursive: true })).pipe((0, rxjs_1.mergeMap)(() => node_fs_1.promises.writeFile((0, src_1.getSystemPath)(path), new Uint8Array(content))));
|
||||
}
|
||||
read(path) {
|
||||
return (0, rxjs_1.from)(node_fs_1.promises.readFile((0, src_1.getSystemPath)(path))).pipe((0, rxjs_1.map)((buffer) => new Uint8Array(buffer).buffer));
|
||||
}
|
||||
delete(path) {
|
||||
return (0, rxjs_1.from)(node_fs_1.promises.rm((0, src_1.getSystemPath)(path), { force: true, recursive: true, maxRetries: 3 }));
|
||||
}
|
||||
rename(from, to) {
|
||||
return (0, rxjs_1.from)(node_fs_1.promises.rename((0, src_1.getSystemPath)(from), (0, src_1.getSystemPath)(to)));
|
||||
}
|
||||
list(path) {
|
||||
return (0, rxjs_1.from)(node_fs_1.promises.readdir((0, src_1.getSystemPath)(path))).pipe((0, rxjs_1.map)((names) => names.map((name) => (0, src_1.fragment)(name))));
|
||||
}
|
||||
exists(path) {
|
||||
return (0, rxjs_1.from)(exists((0, src_1.getSystemPath)(path)));
|
||||
}
|
||||
isDirectory(path) {
|
||||
return this.stat(path).pipe((0, rxjs_1.map)((stat) => stat.isDirectory()));
|
||||
}
|
||||
isFile(path) {
|
||||
return this.stat(path).pipe((0, rxjs_1.map)((stat) => stat.isFile()));
|
||||
}
|
||||
// Some hosts may not support stat.
|
||||
stat(path) {
|
||||
return (0, rxjs_1.from)(node_fs_1.promises.stat((0, src_1.getSystemPath)(path)));
|
||||
}
|
||||
// Some hosts may not support watching.
|
||||
watch(path, _options) {
|
||||
return new rxjs_1.Observable((obs) => {
|
||||
loadFSWatcher();
|
||||
const watcher = new FSWatcher({ persistent: true });
|
||||
watcher.add((0, src_1.getSystemPath)(path));
|
||||
watcher
|
||||
.on('change', (path) => {
|
||||
obs.next({
|
||||
path: (0, src_1.normalize)(path),
|
||||
time: new Date(),
|
||||
type: 0 /* virtualFs.HostWatchEventType.Changed */,
|
||||
});
|
||||
})
|
||||
.on('add', (path) => {
|
||||
obs.next({
|
||||
path: (0, src_1.normalize)(path),
|
||||
time: new Date(),
|
||||
type: 1 /* virtualFs.HostWatchEventType.Created */,
|
||||
});
|
||||
})
|
||||
.on('unlink', (path) => {
|
||||
obs.next({
|
||||
path: (0, src_1.normalize)(path),
|
||||
time: new Date(),
|
||||
type: 2 /* virtualFs.HostWatchEventType.Deleted */,
|
||||
});
|
||||
});
|
||||
return () => {
|
||||
void watcher.close();
|
||||
};
|
||||
}).pipe((0, rxjs_1.publish)(), (0, rxjs_1.refCount)());
|
||||
}
|
||||
}
|
||||
exports.NodeJsAsyncHost = NodeJsAsyncHost;
|
||||
/**
|
||||
* An implementation of the Virtual FS using Node as the backend, synchronously.
|
||||
*/
|
||||
class NodeJsSyncHost {
|
||||
get capabilities() {
|
||||
return { synchronous: true };
|
||||
}
|
||||
write(path, content) {
|
||||
return new rxjs_1.Observable((obs) => {
|
||||
(0, node_fs_1.mkdirSync)((0, src_1.getSystemPath)((0, src_1.dirname)(path)), { recursive: true });
|
||||
(0, node_fs_1.writeFileSync)((0, src_1.getSystemPath)(path), new Uint8Array(content));
|
||||
obs.next();
|
||||
obs.complete();
|
||||
});
|
||||
}
|
||||
read(path) {
|
||||
return new rxjs_1.Observable((obs) => {
|
||||
const buffer = (0, node_fs_1.readFileSync)((0, src_1.getSystemPath)(path));
|
||||
obs.next(new Uint8Array(buffer).buffer);
|
||||
obs.complete();
|
||||
});
|
||||
}
|
||||
delete(path) {
|
||||
return new rxjs_1.Observable((obs) => {
|
||||
(0, node_fs_1.rmSync)((0, src_1.getSystemPath)(path), { force: true, recursive: true, maxRetries: 3 });
|
||||
obs.complete();
|
||||
});
|
||||
}
|
||||
rename(from, to) {
|
||||
return new rxjs_1.Observable((obs) => {
|
||||
const toSystemPath = (0, src_1.getSystemPath)(to);
|
||||
(0, node_fs_1.mkdirSync)((0, node_path_1.dirname)(toSystemPath), { recursive: true });
|
||||
(0, node_fs_1.renameSync)((0, src_1.getSystemPath)(from), toSystemPath);
|
||||
obs.next();
|
||||
obs.complete();
|
||||
});
|
||||
}
|
||||
list(path) {
|
||||
return new rxjs_1.Observable((obs) => {
|
||||
const names = (0, node_fs_1.readdirSync)((0, src_1.getSystemPath)(path));
|
||||
obs.next(names.map((name) => (0, src_1.fragment)(name)));
|
||||
obs.complete();
|
||||
});
|
||||
}
|
||||
exists(path) {
|
||||
return new rxjs_1.Observable((obs) => {
|
||||
obs.next((0, node_fs_1.existsSync)((0, src_1.getSystemPath)(path)));
|
||||
obs.complete();
|
||||
});
|
||||
}
|
||||
isDirectory(path) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
return this.stat(path).pipe((0, rxjs_1.map)((stat) => stat.isDirectory()));
|
||||
}
|
||||
isFile(path) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
return this.stat(path).pipe((0, rxjs_1.map)((stat) => stat.isFile()));
|
||||
}
|
||||
// Some hosts may not support stat.
|
||||
stat(path) {
|
||||
return new rxjs_1.Observable((obs) => {
|
||||
obs.next((0, node_fs_1.statSync)((0, src_1.getSystemPath)(path)));
|
||||
obs.complete();
|
||||
});
|
||||
}
|
||||
// Some hosts may not support watching.
|
||||
watch(path, _options) {
|
||||
return new rxjs_1.Observable((obs) => {
|
||||
loadFSWatcher();
|
||||
const watcher = new FSWatcher({ persistent: false });
|
||||
watcher.add((0, src_1.getSystemPath)(path));
|
||||
watcher
|
||||
.on('change', (path) => {
|
||||
obs.next({
|
||||
path: (0, src_1.normalize)(path),
|
||||
time: new Date(),
|
||||
type: 0 /* virtualFs.HostWatchEventType.Changed */,
|
||||
});
|
||||
})
|
||||
.on('add', (path) => {
|
||||
obs.next({
|
||||
path: (0, src_1.normalize)(path),
|
||||
time: new Date(),
|
||||
type: 1 /* virtualFs.HostWatchEventType.Created */,
|
||||
});
|
||||
})
|
||||
.on('unlink', (path) => {
|
||||
obs.next({
|
||||
path: (0, src_1.normalize)(path),
|
||||
time: new Date(),
|
||||
type: 2 /* virtualFs.HostWatchEventType.Deleted */,
|
||||
});
|
||||
});
|
||||
return () => {
|
||||
void watcher.close();
|
||||
};
|
||||
}).pipe((0, rxjs_1.publish)(), (0, rxjs_1.refCount)());
|
||||
}
|
||||
}
|
||||
exports.NodeJsSyncHost = NodeJsSyncHost;
|
9
my-app/node_modules/@angular-devkit/core/node/index.d.ts
generated
vendored
Executable file
9
my-app/node_modules/@angular-devkit/core/node/index.d.ts
generated
vendored
Executable file
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
export * from './cli-logger';
|
||||
export * from './host';
|
25
my-app/node_modules/@angular-devkit/core/node/index.js
generated
vendored
Executable file
25
my-app/node_modules/@angular-devkit/core/node/index.js
generated
vendored
Executable file
|
@ -0,0 +1,25 @@
|
|||
"use strict";
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./cli-logger"), exports);
|
||||
__exportStar(require("./host"), exports);
|
23
my-app/node_modules/@angular-devkit/core/node/testing/index.d.ts
generated
vendored
Executable file
23
my-app/node_modules/@angular-devkit/core/node/testing/index.d.ts
generated
vendored
Executable file
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
/// <reference types="@types/node/fs" />
|
||||
/// <reference types="@types/node/ts4.8/fs" />
|
||||
import * as fs from 'fs';
|
||||
import { Path, virtualFs } from '../../src';
|
||||
/**
|
||||
* A Sync Scoped Host that creates a temporary directory and scope to it.
|
||||
*/
|
||||
export declare class TempScopedNodeJsSyncHost extends virtualFs.ScopedHost<fs.Stats> {
|
||||
protected _sync?: virtualFs.SyncDelegateHost<fs.Stats>;
|
||||
protected _root: Path;
|
||||
constructor();
|
||||
get files(): Path[];
|
||||
get root(): Path;
|
||||
get sync(): virtualFs.SyncDelegateHost<fs.Stats>;
|
||||
}
|
78
my-app/node_modules/@angular-devkit/core/node/testing/index.js
generated
vendored
Executable file
78
my-app/node_modules/@angular-devkit/core/node/testing/index.js
generated
vendored
Executable file
|
@ -0,0 +1,78 @@
|
|||
"use strict";
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google LLC All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
||||
}
|
||||
Object.defineProperty(o, k2, desc);
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||
}) : function(o, v) {
|
||||
o["default"] = v;
|
||||
});
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||
__setModuleDefault(result, mod);
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.TempScopedNodeJsSyncHost = void 0;
|
||||
const fs = __importStar(require("fs"));
|
||||
const os = __importStar(require("os"));
|
||||
const path = __importStar(require("path"));
|
||||
const src_1 = require("../../src");
|
||||
const host_1 = require("../host");
|
||||
/**
|
||||
* A Sync Scoped Host that creates a temporary directory and scope to it.
|
||||
*/
|
||||
class TempScopedNodeJsSyncHost extends src_1.virtualFs.ScopedHost {
|
||||
_sync;
|
||||
_root;
|
||||
constructor() {
|
||||
const root = (0, src_1.normalize)(path.join(os.tmpdir(), `devkit-host-${+Date.now()}-${process.pid}`));
|
||||
fs.mkdirSync((0, src_1.getSystemPath)(root));
|
||||
super(new host_1.NodeJsSyncHost(), root);
|
||||
this._root = root;
|
||||
}
|
||||
get files() {
|
||||
const sync = this.sync;
|
||||
function _visit(p) {
|
||||
return sync
|
||||
.list(p)
|
||||
.map((fragment) => (0, src_1.join)(p, fragment))
|
||||
.reduce((files, path) => {
|
||||
if (sync.isDirectory(path)) {
|
||||
return files.concat(_visit(path));
|
||||
}
|
||||
else {
|
||||
return files.concat(path);
|
||||
}
|
||||
}, []);
|
||||
}
|
||||
return _visit((0, src_1.normalize)('/'));
|
||||
}
|
||||
get root() {
|
||||
return this._root;
|
||||
}
|
||||
get sync() {
|
||||
if (!this._sync) {
|
||||
this._sync = new src_1.virtualFs.SyncDelegateHost(this);
|
||||
}
|
||||
return this._sync;
|
||||
}
|
||||
}
|
||||
exports.TempScopedNodeJsSyncHost = TempScopedNodeJsSyncHost;
|
Loading…
Add table
Add a link
Reference in a new issue