aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager')
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/executor.d.ts14
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/executor.js144
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/install-task.d.ts27
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/install-task.js51
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/link-task.d.ts16
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/link-task.js30
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/options.d.ts23
-rw-r--r--sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/options.js11
8 files changed, 0 insertions, 316 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/executor.d.ts b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/executor.d.ts
deleted file mode 100644
index 4fa6cca4..00000000
--- a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/executor.d.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-/**
- * @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 { BaseException } from '@angular-devkit/core';
-import { TaskExecutor } from '../../src';
-import { NodePackageTaskFactoryOptions, NodePackageTaskOptions } from './options';
-export declare class UnknownPackageManagerException extends BaseException {
- constructor(name: string);
-}
-export default function (factoryOptions?: NodePackageTaskFactoryOptions): TaskExecutor<NodePackageTaskOptions>;
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/executor.js b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/executor.js
deleted file mode 100644
index bc656111..00000000
--- a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/executor.js
+++ /dev/null
@@ -1,144 +0,0 @@
-"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;
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
-}) : (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;
-};
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.UnknownPackageManagerException = void 0;
-const core_1 = require("@angular-devkit/core");
-const child_process_1 = require("child_process");
-const ora_1 = __importDefault(require("ora"));
-const path = __importStar(require("path"));
-const rxjs_1 = require("rxjs");
-const src_1 = require("../../src");
-const packageManagers = {
- 'npm': {
- quietArgument: '--quiet',
- commands: {
- installAll: 'install',
- installPackage: 'install',
- },
- },
- 'cnpm': {
- commands: {
- installAll: 'install',
- installPackage: 'install',
- },
- },
- 'yarn': {
- quietArgument: '--silent',
- commands: {
- installPackage: 'add',
- },
- },
- 'pnpm': {
- quietArgument: '--silent',
- commands: {
- installAll: 'install',
- installPackage: 'install',
- },
- },
-};
-class UnknownPackageManagerException extends core_1.BaseException {
- constructor(name) {
- super(`Unknown package manager "${name}".`);
- }
-}
-exports.UnknownPackageManagerException = UnknownPackageManagerException;
-function default_1(factoryOptions = {}) {
- const packageManagerName = factoryOptions.packageManager || 'npm';
- const packageManagerProfile = packageManagers[packageManagerName];
- if (!packageManagerProfile) {
- throw new UnknownPackageManagerException(packageManagerName);
- }
- const rootDirectory = factoryOptions.rootDirectory || process.cwd();
- return (options = { command: 'install' }) => {
- let taskPackageManagerProfile = packageManagerProfile;
- let taskPackageManagerName = packageManagerName;
- if (factoryOptions.allowPackageManagerOverride && options.packageManager) {
- taskPackageManagerProfile = packageManagers[options.packageManager];
- if (!taskPackageManagerProfile) {
- throw new UnknownPackageManagerException(options.packageManager);
- }
- taskPackageManagerName = options.packageManager;
- }
- const bufferedOutput = [];
- const spawnOptions = {
- stdio: options.hideOutput ? 'pipe' : 'inherit',
- shell: true,
- cwd: path.join(rootDirectory, options.workingDirectory || ''),
- };
- const args = [];
- if (options.packageName) {
- if (options.command === 'install') {
- args.push(taskPackageManagerProfile.commands.installPackage);
- }
- args.push(options.packageName);
- }
- else if (options.command === 'install' && taskPackageManagerProfile.commands.installAll) {
- args.push(taskPackageManagerProfile.commands.installAll);
- }
- if (options.quiet && taskPackageManagerProfile.quietArgument) {
- args.push(taskPackageManagerProfile.quietArgument);
- }
- if (factoryOptions.registry) {
- args.push(`--registry="${factoryOptions.registry}"`);
- }
- if (factoryOptions.force) {
- args.push('--force');
- }
- return new rxjs_1.Observable((obs) => {
- var _a, _b;
- const spinner = (0, ora_1.default)({
- text: `Installing packages (${taskPackageManagerName})...`,
- // Workaround for https://github.com/sindresorhus/ora/issues/136.
- discardStdin: process.platform != 'win32',
- }).start();
- const childProcess = (0, child_process_1.spawn)(taskPackageManagerName, args, spawnOptions).on('close', (code) => {
- if (code === 0) {
- spinner.succeed('Packages installed successfully.');
- spinner.stop();
- obs.next();
- obs.complete();
- }
- else {
- if (options.hideOutput) {
- bufferedOutput.forEach(({ stream, data }) => stream.write(data));
- }
- spinner.fail('Package install failed, see above.');
- obs.error(new src_1.UnsuccessfulWorkflowExecution());
- }
- });
- if (options.hideOutput) {
- (_a = childProcess.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (data) => bufferedOutput.push({ stream: process.stdout, data: data }));
- (_b = childProcess.stderr) === null || _b === void 0 ? void 0 : _b.on('data', (data) => bufferedOutput.push({ stream: process.stderr, data: data }));
- }
- });
- };
-}
-exports.default = default_1;
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/install-task.d.ts b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/install-task.d.ts
deleted file mode 100644
index 69924a69..00000000
--- a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/install-task.d.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * @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 { TaskConfiguration, TaskConfigurationGenerator } from '../../src';
-import { NodePackageTaskOptions } from './options';
-interface NodePackageInstallTaskOptions {
- packageManager?: string;
- packageName?: string;
- workingDirectory?: string;
- quiet?: boolean;
- hideOutput?: boolean;
-}
-export declare class NodePackageInstallTask implements TaskConfigurationGenerator<NodePackageTaskOptions> {
- quiet: boolean;
- hideOutput: boolean;
- workingDirectory?: string;
- packageManager?: string;
- packageName?: string;
- constructor(workingDirectory?: string);
- constructor(options: NodePackageInstallTaskOptions);
- toConfiguration(): TaskConfiguration<NodePackageTaskOptions>;
-}
-export {};
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/install-task.js b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/install-task.js
deleted file mode 100644
index ae02887b..00000000
--- a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/install-task.js
+++ /dev/null
@@ -1,51 +0,0 @@
-"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.NodePackageInstallTask = void 0;
-const options_1 = require("./options");
-class NodePackageInstallTask {
- constructor(options) {
- this.quiet = true;
- this.hideOutput = true;
- if (typeof options === 'string') {
- this.workingDirectory = options;
- }
- else if (typeof options === 'object') {
- if (options.quiet != undefined) {
- this.quiet = options.quiet;
- }
- if (options.hideOutput != undefined) {
- this.hideOutput = options.hideOutput;
- }
- if (options.workingDirectory != undefined) {
- this.workingDirectory = options.workingDirectory;
- }
- if (options.packageManager != undefined) {
- this.packageManager = options.packageManager;
- }
- if (options.packageName != undefined) {
- this.packageName = options.packageName;
- }
- }
- }
- toConfiguration() {
- return {
- name: options_1.NodePackageName,
- options: {
- command: 'install',
- quiet: this.quiet,
- hideOutput: this.hideOutput,
- workingDirectory: this.workingDirectory,
- packageManager: this.packageManager,
- packageName: this.packageName,
- },
- };
- }
-}
-exports.NodePackageInstallTask = NodePackageInstallTask;
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/link-task.d.ts b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/link-task.d.ts
deleted file mode 100644
index c7d2b63c..00000000
--- a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/link-task.d.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-/**
- * @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 { TaskConfiguration, TaskConfigurationGenerator } from '../../src';
-import { NodePackageTaskOptions } from './options';
-export declare class NodePackageLinkTask implements TaskConfigurationGenerator<NodePackageTaskOptions> {
- packageName?: string | undefined;
- workingDirectory?: string | undefined;
- quiet: boolean;
- constructor(packageName?: string | undefined, workingDirectory?: string | undefined);
- toConfiguration(): TaskConfiguration<NodePackageTaskOptions>;
-}
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/link-task.js b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/link-task.js
deleted file mode 100644
index 2518b4cb..00000000
--- a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/link-task.js
+++ /dev/null
@@ -1,30 +0,0 @@
-"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.NodePackageLinkTask = void 0;
-const options_1 = require("./options");
-class NodePackageLinkTask {
- constructor(packageName, workingDirectory) {
- this.packageName = packageName;
- this.workingDirectory = workingDirectory;
- this.quiet = true;
- }
- toConfiguration() {
- return {
- name: options_1.NodePackageName,
- options: {
- command: 'link',
- quiet: this.quiet,
- workingDirectory: this.workingDirectory,
- packageName: this.packageName,
- },
- };
- }
-}
-exports.NodePackageLinkTask = NodePackageLinkTask;
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/options.d.ts b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/options.d.ts
deleted file mode 100644
index 60c1253f..00000000
--- a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/options.d.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * @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 declare const NodePackageName = "node-package";
-export interface NodePackageTaskFactoryOptions {
- rootDirectory?: string;
- packageManager?: string;
- allowPackageManagerOverride?: boolean;
- registry?: string;
- force?: boolean;
-}
-export interface NodePackageTaskOptions {
- command: string;
- quiet?: boolean;
- hideOutput?: boolean;
- workingDirectory?: string;
- packageName?: string;
- packageManager?: string;
-}
diff --git a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/options.js b/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/options.js
deleted file mode 100644
index 3b33121f..00000000
--- a/sandbox/testAppNevena/Front/node_modules/@angular-devkit/schematics/tasks/package-manager/options.js
+++ /dev/null
@@ -1,11 +0,0 @@
-"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.NodePackageName = void 0;
-exports.NodePackageName = 'node-package';