This commit is contained in:
CHEVALLIER Abel
2025-11-13 16:23:22 +01:00
parent de9c515a47
commit cb235644dc
34924 changed files with 3811102 additions and 0 deletions

10
node_modules/@angular-devkit/schematics/tasks/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1,10 @@
/**
* @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.dev/license
*/
export { NodePackageInstallTask } from './package-manager/install-task';
export { RepositoryInitializerTask } from './repo-init/init-task';
export { RunSchematicTask } from './run-schematic/task';

16
node_modules/@angular-devkit/schematics/tasks/index.js generated vendored Executable file
View File

@@ -0,0 +1,16 @@
"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.dev/license
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunSchematicTask = exports.RepositoryInitializerTask = exports.NodePackageInstallTask = void 0;
var install_task_1 = require("./package-manager/install-task");
Object.defineProperty(exports, "NodePackageInstallTask", { enumerable: true, get: function () { return install_task_1.NodePackageInstallTask; } });
var init_task_1 = require("./repo-init/init-task");
Object.defineProperty(exports, "RepositoryInitializerTask", { enumerable: true, get: function () { return init_task_1.RepositoryInitializerTask; } });
var task_1 = require("./run-schematic/task");
Object.defineProperty(exports, "RunSchematicTask", { enumerable: true, get: function () { return task_1.RunSchematicTask; } });

View 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.dev/license
*/
import { TaskExecutorFactory } from '../../src';
import { NodePackageTaskFactoryOptions } from '../package-manager/options';
import { RepositoryInitializerTaskFactoryOptions } from '../repo-init/options';
export declare class BuiltinTaskExecutor {
static readonly NodePackage: TaskExecutorFactory<NodePackageTaskFactoryOptions>;
static readonly RepositoryInitializer: TaskExecutorFactory<RepositoryInitializerTaskFactoryOptions>;
static readonly RunSchematic: TaskExecutorFactory<{}>;
}

61
node_modules/@angular-devkit/schematics/tasks/node/index.js generated vendored Executable file
View File

@@ -0,0 +1,61 @@
"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.dev/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 () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.BuiltinTaskExecutor = void 0;
const options_1 = require("../package-manager/options");
const options_2 = require("../repo-init/options");
const options_3 = require("../run-schematic/options");
class BuiltinTaskExecutor {
static NodePackage = {
name: options_1.NodePackageName,
create: (options) => Promise.resolve().then(() => __importStar(require('../package-manager/executor'))).then((mod) => mod.default(options)),
};
static RepositoryInitializer = {
name: options_2.RepositoryInitializerName,
create: (options) => Promise.resolve().then(() => __importStar(require('../repo-init/executor'))).then((mod) => mod.default(options)),
};
static RunSchematic = {
name: options_3.RunSchematicName,
create: () => Promise.resolve().then(() => __importStar(require('../run-schematic/executor'))).then((mod) => mod.default()),
};
}
exports.BuiltinTaskExecutor = BuiltinTaskExecutor;

View File

@@ -0,0 +1,14 @@
/**
* @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.dev/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>;

View File

@@ -0,0 +1,176 @@
"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.dev/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 () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__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;
exports.default = default_1;
const core_1 = require("@angular-devkit/core");
const node_child_process_1 = require("node:child_process");
const path = __importStar(require("node:path"));
const ora_1 = __importDefault(require("ora"));
const src_1 = require("../../src");
const packageManagers = {
'npm': {
commands: {
installAll: 'install',
installPackage: 'install',
},
},
'cnpm': {
commands: {
installAll: 'install',
installPackage: 'install',
},
},
'yarn': {
commands: {
installAll: 'install',
installPackage: 'add',
},
},
'bun': {
commands: {
installAll: 'install',
installPackage: 'add',
},
},
'pnpm': {
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 = {
shell: true,
cwd: path.join(rootDirectory, options.workingDirectory || ''),
};
if (options.hideOutput) {
spawnOptions.stdio = options.quiet ? ['ignore', 'ignore', 'pipe'] : 'pipe';
}
else {
spawnOptions.stdio = options.quiet ? ['ignore', 'ignore', 'inherit'] : 'inherit';
}
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.allowScripts) {
// Yarn requires special handling since Yarn 2+ no longer has the `--ignore-scripts` flag
if (taskPackageManagerName === 'yarn') {
spawnOptions.env = {
...process.env,
// Supported with yarn 1
'npm_config_ignore_scripts': 'true',
// Supported with yarn 2+
'YARN_ENABLE_SCRIPTS': 'false',
};
}
else {
args.push('--ignore-scripts');
}
}
if (factoryOptions.registry) {
args.push(`--registry="${factoryOptions.registry}"`);
}
if (factoryOptions.force) {
args.push('--force');
}
return new Promise((resolve, reject) => {
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, node_child_process_1.spawn)(`${taskPackageManagerName} ${args.join(' ')}`, spawnOptions).on('close', (code) => {
if (code === 0) {
spinner.succeed('Packages installed successfully.');
spinner.stop();
resolve();
}
else {
if (options.hideOutput) {
bufferedOutput.forEach(({ stream, data }) => stream.write(data));
}
spinner.fail('Package install failed, see above.');
reject(new src_1.UnsuccessfulWorkflowExecution());
}
});
if (options.hideOutput) {
childProcess.stdout?.on('data', (data) => bufferedOutput.push({ stream: process.stdout, data: data }));
childProcess.stderr?.on('data', (data) => bufferedOutput.push({ stream: process.stderr, data: data }));
}
});
};
}

View File

@@ -0,0 +1,29 @@
/**
* @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.dev/license
*/
import { TaskConfiguration, TaskConfigurationGenerator } from '../../src';
import { NodePackageTaskOptions } from './options';
interface NodePackageInstallTaskOptions {
packageManager?: string;
packageName?: string;
workingDirectory?: string;
quiet?: boolean;
hideOutput?: boolean;
allowScripts?: boolean;
}
export declare class NodePackageInstallTask implements TaskConfigurationGenerator<NodePackageTaskOptions> {
quiet: boolean;
hideOutput: boolean;
allowScripts: boolean;
workingDirectory?: string;
packageManager?: string;
packageName?: string;
constructor(workingDirectory?: string);
constructor(options: NodePackageInstallTaskOptions);
toConfiguration(): TaskConfiguration<NodePackageTaskOptions>;
}
export {};

View File

@@ -0,0 +1,59 @@
"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.dev/license
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.NodePackageInstallTask = void 0;
const options_1 = require("./options");
class NodePackageInstallTask {
quiet = true;
hideOutput = true;
allowScripts = false;
workingDirectory;
packageManager;
packageName;
constructor(options) {
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;
}
if (options.allowScripts !== undefined) {
this.allowScripts = options.allowScripts;
}
}
}
toConfiguration() {
return {
name: options_1.NodePackageName,
options: {
command: 'install',
quiet: this.quiet,
hideOutput: this.hideOutput,
workingDirectory: this.workingDirectory,
packageManager: this.packageManager,
packageName: this.packageName,
allowScripts: this.allowScripts,
},
};
}
}
exports.NodePackageInstallTask = NodePackageInstallTask;

View File

@@ -0,0 +1,24 @@
/**
* @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.dev/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;
allowScripts?: boolean;
}

View File

@@ -0,0 +1,11 @@
"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.dev/license
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.NodePackageName = void 0;
exports.NodePackageName = 'node-package';

5
node_modules/@angular-devkit/schematics/tasks/package.json generated vendored Executable file
View File

@@ -0,0 +1,5 @@
{
"name": "@angular-devkit/schematics/tasks",
"main": "index.js",
"typings": "index.d.ts"
}

View File

@@ -0,0 +1,10 @@
/**
* @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.dev/license
*/
import { TaskExecutor } from '../../src';
import { RepositoryInitializerTaskFactoryOptions, RepositoryInitializerTaskOptions } from './options';
export default function (factoryOptions?: RepositoryInitializerTaskFactoryOptions): TaskExecutor<RepositoryInitializerTaskOptions>;

View File

@@ -0,0 +1,104 @@
"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.dev/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 () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const core_1 = require("@angular-devkit/core");
const node_child_process_1 = require("node:child_process");
const path = __importStar(require("node:path"));
function default_1(factoryOptions = {}) {
const rootDirectory = factoryOptions.rootDirectory || process.cwd();
return async (options = {}, context) => {
const authorName = options.authorName;
const authorEmail = options.authorEmail;
const execute = (args, ignoreErrorStream) => {
const outputStream = 'ignore';
const errorStream = ignoreErrorStream ? 'ignore' : process.stderr;
const spawnOptions = {
stdio: [process.stdin, outputStream, errorStream],
shell: true,
cwd: path.join(rootDirectory, options.workingDirectory || ''),
env: {
...process.env,
...(authorName ? { GIT_AUTHOR_NAME: authorName, GIT_COMMITTER_NAME: authorName } : {}),
...(authorEmail
? { GIT_AUTHOR_EMAIL: authorEmail, GIT_COMMITTER_EMAIL: authorEmail }
: {}),
},
};
return new Promise((resolve, reject) => {
(0, node_child_process_1.spawn)(`git ${args.join(' ')}`, spawnOptions).on('close', (code) => {
if (code === 0) {
resolve();
}
else {
reject(code);
}
});
});
};
const hasCommand = await execute(['--version']).then(() => true, () => false);
if (!hasCommand) {
return;
}
const insideRepo = await execute(['rev-parse', '--is-inside-work-tree'], true).then(() => true, () => false);
if (insideRepo) {
context.logger.info(core_1.tags.oneLine `
Directory is already under version control.
Skipping initialization of git.
`);
return;
}
// if git is not found or an error was thrown during the `git`
// init process just swallow any errors here
// NOTE: This will be removed once task error handling is implemented
try {
await execute(['init']);
await execute(['add', '.']);
if (options.commit) {
const message = options.message || 'initial commit';
await execute(['commit', `-m "${message}"`]);
}
context.logger.info('Successfully initialized git.');
}
catch { }
};
}

View File

@@ -0,0 +1,20 @@
/**
* @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.dev/license
*/
import { TaskConfiguration, TaskConfigurationGenerator } from '../../src';
import { RepositoryInitializerTaskOptions } from './options';
export interface CommitOptions {
message?: string;
name?: string;
email?: string;
}
export declare class RepositoryInitializerTask implements TaskConfigurationGenerator<RepositoryInitializerTaskOptions> {
workingDirectory?: string | undefined;
commitOptions?: CommitOptions | undefined;
constructor(workingDirectory?: string | undefined, commitOptions?: CommitOptions | undefined);
toConfiguration(): TaskConfiguration<RepositoryInitializerTaskOptions>;
}

View File

@@ -0,0 +1,32 @@
"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.dev/license
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.RepositoryInitializerTask = void 0;
const options_1 = require("./options");
class RepositoryInitializerTask {
workingDirectory;
commitOptions;
constructor(workingDirectory, commitOptions) {
this.workingDirectory = workingDirectory;
this.commitOptions = commitOptions;
}
toConfiguration() {
return {
name: options_1.RepositoryInitializerName,
options: {
commit: !!this.commitOptions,
workingDirectory: this.workingDirectory,
authorName: this.commitOptions && this.commitOptions.name,
authorEmail: this.commitOptions && this.commitOptions.email,
message: this.commitOptions && this.commitOptions.message,
},
};
}
}
exports.RepositoryInitializerTask = RepositoryInitializerTask;

View File

@@ -0,0 +1,18 @@
/**
* @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.dev/license
*/
export declare const RepositoryInitializerName = "repo-init";
export interface RepositoryInitializerTaskFactoryOptions {
rootDirectory?: string;
}
export interface RepositoryInitializerTaskOptions {
workingDirectory?: string;
commit?: boolean;
message?: string;
authorName?: string;
authorEmail?: string;
}

View File

@@ -0,0 +1,11 @@
"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.dev/license
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.RepositoryInitializerName = void 0;
exports.RepositoryInitializerName = 'repo-init';

View File

@@ -0,0 +1,10 @@
/**
* @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.dev/license
*/
import { TaskExecutor } from '../../src';
import { RunSchematicTaskOptions } from './options';
export default function (): TaskExecutor<RunSchematicTaskOptions<{}>>;

View File

@@ -0,0 +1,29 @@
"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.dev/license
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
function default_1() {
return (options, context) => {
if (!options?.name) {
throw new Error('RunSchematicTask requires an options object with a non-empty name property.');
}
const maybeWorkflow = context.engine.workflow;
const collection = options.collection || context.schematic.collection.description.name;
if (!maybeWorkflow) {
throw new Error('Need Workflow to support executing schematics as post tasks.');
}
return maybeWorkflow.execute({
collection: collection,
schematic: options.name,
options: options.options,
// Allow private when calling from the same collection.
allowPrivate: collection == context.schematic.collection.description.name,
});
};
}

View File

@@ -0,0 +1,13 @@
/**
* @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.dev/license
*/
export declare const RunSchematicName = "run-schematic";
export interface RunSchematicTaskOptions<T> {
collection: string | null;
name: string;
options: T;
}

View File

@@ -0,0 +1,11 @@
"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.dev/license
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunSchematicName = void 0;
exports.RunSchematicName = 'run-schematic';

View File

@@ -0,0 +1,17 @@
/**
* @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.dev/license
*/
import { TaskConfiguration, TaskConfigurationGenerator } from '../../src';
import { RunSchematicTaskOptions } from './options';
export declare class RunSchematicTask<T> implements TaskConfigurationGenerator<RunSchematicTaskOptions<T>> {
protected _collection: string | null;
protected _schematic: string;
protected _options: T;
constructor(s: string, o: T);
constructor(c: string, s: string, o: T);
toConfiguration(): TaskConfiguration<RunSchematicTaskOptions<T>>;
}

View File

@@ -0,0 +1,37 @@
"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.dev/license
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.RunSchematicTask = void 0;
const options_1 = require("./options");
class RunSchematicTask {
_collection;
_schematic;
_options;
constructor(c, s, o) {
if (arguments.length == 2 || typeof s !== 'string') {
o = s;
s = c;
c = null;
}
this._collection = c;
this._schematic = s;
this._options = o;
}
toConfiguration() {
return {
name: options_1.RunSchematicName,
options: {
collection: this._collection,
name: this._schematic,
options: this._options,
},
};
}
}
exports.RunSchematicTask = RunSchematicTask;