diff options
| author | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-01 21:54:41 +0100 | 
|---|---|---|
| committer | Danijel Andjelkovic <adanijel99@gmail.com> | 2022-03-01 21:54:41 +0100 | 
| commit | 6c8128f9fd5a5d0be115806c35a21b3d683df8d6 (patch) | |
| tree | f46c2f6b3b9b294ff32bd75c08ccdc9e7a8cc4ef /sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/sink/dryrun.js | |
| parent | 2400b84e95913665da6279114168148444b8f9ab (diff) | |
| parent | 7d3640f824f46490b47bd95f1c5a16644f712068 (diff) | |
Merge branch 'dev' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into logo
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/sink/dryrun.js')
| -rw-r--r-- | sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/sink/dryrun.js | 80 | 
1 files changed, 80 insertions, 0 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/sink/dryrun.js b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/sink/dryrun.js new file mode 100644 index 00000000..7ff91540 --- /dev/null +++ b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/src/sink/dryrun.js @@ -0,0 +1,80 @@ +"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.DryRunSink = void 0; +const core_1 = require("@angular-devkit/core"); +const node_1 = require("@angular-devkit/core/node"); +const rxjs_1 = require("rxjs"); +const host_1 = require("./host"); +class DryRunSink extends host_1.HostSink { +    constructor(host, force = false) { +        super(typeof host == 'string' +            ? new core_1.virtualFs.ScopedHost(new node_1.NodeJsSyncHost(), (0, core_1.normalize)(host)) +            : host, force); +        this._subject = new rxjs_1.Subject(); +        this._fileDoesNotExistExceptionSet = new Set(); +        this._fileAlreadyExistExceptionSet = new Set(); +        this.reporter = this._subject.asObservable(); +    } +    _fileAlreadyExistException(path) { +        this._fileAlreadyExistExceptionSet.add(path); +    } +    _fileDoesNotExistException(path) { +        this._fileDoesNotExistExceptionSet.add(path); +    } +    _done() { +        this._fileAlreadyExistExceptionSet.forEach((path) => { +            this._subject.next({ +                kind: 'error', +                description: 'alreadyExist', +                path, +            }); +        }); +        this._fileDoesNotExistExceptionSet.forEach((path) => { +            this._subject.next({ +                kind: 'error', +                description: 'doesNotExist', +                path, +            }); +        }); +        this._filesToDelete.forEach((path) => { +            // Check if this is a renaming. +            for (const [from] of this._filesToRename) { +                if (from == path) { +                    // The event is sent later on. +                    return; +                } +            } +            this._subject.next({ kind: 'delete', path }); +        }); +        this._filesToRename.forEach(([path, to]) => { +            this._subject.next({ kind: 'rename', path, to }); +        }); +        this._filesToCreate.forEach((content, path) => { +            // Check if this is a renaming. +            for (const [, to] of this._filesToRename) { +                if (to == path) { +                    // The event is sent later on. +                    return; +                } +            } +            if (this._fileAlreadyExistExceptionSet.has(path) || +                this._fileDoesNotExistExceptionSet.has(path)) { +                return; +            } +            this._subject.next({ kind: 'create', path, content: content.generate() }); +        }); +        this._filesToUpdate.forEach((content, path) => { +            this._subject.next({ kind: 'update', path, content: content.generate() }); +        }); +        this._subject.complete(); +        return (0, rxjs_1.of)(undefined); +    } +} +exports.DryRunSink = DryRunSink;  | 
