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

11
node_modules/@angular/cli/lib/cli/index.d.ts generated vendored Executable file
View File

@@ -0,0 +1,11 @@
/**
* @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 { VERSION } from '../../src/utilities/version';
export default function (options: {
cliArgs: string[];
}): Promise<number>;

108
node_modules/@angular/cli/lib/cli/index.js generated vendored Executable file
View File

@@ -0,0 +1,108 @@
"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.VERSION = void 0;
exports.default = default_1;
const core_1 = require("@angular-devkit/core");
const node_util_1 = require("node:util");
const command_module_1 = require("../../src/command-builder/command-module");
const command_runner_1 = require("../../src/command-builder/command-runner");
const color_1 = require("../../src/utilities/color");
const environment_options_1 = require("../../src/utilities/environment-options");
const log_file_1 = require("../../src/utilities/log-file");
var version_1 = require("../../src/utilities/version");
Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_1.VERSION; } });
const MIN_NODEJS_VERSION = [20, 19];
/* eslint-disable no-console */
async function default_1(options) {
// This node version check ensures that the requirements of the project instance of the CLI are met
const [major, minor] = process.versions.node.split('.').map((part) => Number(part));
if (major < MIN_NODEJS_VERSION[0] ||
(major === MIN_NODEJS_VERSION[0] && minor < MIN_NODEJS_VERSION[1])) {
process.stderr.write(`Node.js version ${process.version} detected.\n` +
`The Angular CLI requires a minimum of v${MIN_NODEJS_VERSION[0]}.${MIN_NODEJS_VERSION[1]}.\n\n` +
'Please update your Node.js version or visit https://nodejs.org/ for additional instructions.\n');
return 3;
}
const colorLevels = {
info: (s) => s,
debug: (s) => s,
warn: (s) => color_1.colors.bold(color_1.colors.yellow(s)),
error: (s) => color_1.colors.bold(color_1.colors.red(s)),
fatal: (s) => color_1.colors.bold(color_1.colors.red(s)),
};
const logger = new core_1.logging.IndentLogger('cli-main-logger');
const logInfo = console.log;
const logError = console.error;
const useColor = (0, color_1.supportColor)();
const loggerFinished = logger.forEach((entry) => {
if (!environment_options_1.ngDebug && entry.level === 'debug') {
return;
}
const color = useColor ? colorLevels[entry.level] : node_util_1.stripVTControlCharacters;
const message = color(entry.message);
switch (entry.level) {
case 'warn':
case 'fatal':
case 'error':
logError(message);
break;
default:
logInfo(message);
break;
}
});
// Redirect console to logger
console.info = console.log = function (...args) {
logger.info((0, node_util_1.format)(...args));
};
console.warn = function (...args) {
logger.warn((0, node_util_1.format)(...args));
};
console.error = function (...args) {
logger.error((0, node_util_1.format)(...args));
};
try {
return await (0, command_runner_1.runCommand)(options.cliArgs, logger);
}
catch (err) {
if (err instanceof command_module_1.CommandModuleError) {
logger.fatal(`Error: ${err.message}`);
}
else if (err instanceof Error) {
try {
const logPath = (0, log_file_1.writeErrorToLogFile)(err);
logger.fatal(`An unhandled exception occurred: ${err.message}\n` +
`See "${logPath}" for further details.`);
}
catch (e) {
logger.fatal(`An unhandled exception occurred: ${err.message}\n` +
`Fatal error writing debug log file: ${e}`);
if (err.stack) {
logger.fatal(err.stack);
}
}
return 127;
}
else if (typeof err === 'string') {
logger.fatal(err);
}
else if (typeof err === 'number') {
// Log nothing.
}
else {
logger.fatal(`An unexpected error occurred: ${err}`);
}
return 1;
}
finally {
logger.complete();
await loggerFinished;
}
}

BIN
node_modules/@angular/cli/lib/code-examples.db generated vendored Executable file

Binary file not shown.

5901
node_modules/@angular/cli/lib/config/schema.json generated vendored Executable file

File diff suppressed because it is too large Load Diff

966
node_modules/@angular/cli/lib/config/workspace-schema.d.ts generated vendored Executable file
View File

@@ -0,0 +1,966 @@
export type Schema = {
$schema?: string;
cli?: CliOptions;
/**
* Path where new projects will be created.
*/
newProjectRoot?: string;
projects?: Projects;
schematics?: SchematicOptions;
version: number;
};
export type CliOptions = {
/**
* Share pseudonymous usage data with the Angular Team at Google.
*/
analytics?: Analytics;
/**
* Control disk cache.
*/
cache?: Cache;
/**
* Specify which package manager tool to use.
*/
packageManager?: PackageManager;
/**
* The list of schematic collections to use.
*/
schematicCollections?: string[];
/**
* Control CLI specific console warnings
*/
warnings?: Warnings;
};
/**
* Share pseudonymous usage data with the Angular Team at Google.
*/
export type Analytics = boolean | string;
/**
* Control disk cache.
*/
export type Cache = {
/**
* Configure whether disk caching is enabled.
*/
enabled?: boolean;
/**
* Configure in which environment disk cache is enabled.
*/
environment?: Environment;
/**
* Cache base path.
*/
path?: string;
};
/**
* Configure in which environment disk cache is enabled.
*/
export declare enum Environment {
All = "all",
Ci = "ci",
Local = "local"
}
/**
* Specify which package manager tool to use.
*
* The package manager used to install dependencies.
*/
export declare enum PackageManager {
Bun = "bun",
Cnpm = "cnpm",
Npm = "npm",
Pnpm = "pnpm",
Yarn = "yarn"
}
/**
* Control CLI specific console warnings
*/
export type Warnings = {
/**
* Show a warning when the global version is newer than the local one.
*/
versionMismatch?: boolean;
};
export type Projects = {};
export type SchematicOptions = {
"@schematics/angular:application"?: AngularApplicationOptionsSchema;
"@schematics/angular:class"?: AngularClassOptionsSchema;
"@schematics/angular:component"?: AngularComponentOptionsSchema;
"@schematics/angular:directive"?: AngularDirectiveOptionsSchema;
"@schematics/angular:enum"?: AngularEnumOptionsSchema;
"@schematics/angular:guard"?: AngularGuardOptionsSchema;
"@schematics/angular:interceptor"?: AngularInterceptorOptionsSchema;
"@schematics/angular:interface"?: AngularInterfaceOptionsSchema;
"@schematics/angular:library"?: LibraryOptionsSchema;
"@schematics/angular:ng-new"?: AngularNgNewOptionsSchema;
"@schematics/angular:pipe"?: AngularPipeOptionsSchema;
"@schematics/angular:resolver"?: AngularResolverOptionsSchema;
"@schematics/angular:service"?: AngularServiceOptionsSchema;
"@schematics/angular:web-worker"?: AngularWebWorkerOptionsSchema;
[property: string]: any;
};
/**
* Generates a new Angular application within your workspace. This schematic sets up the
* foundational structure of your project, including the root component, module, and
* configuration files. You can customize various aspects of the application, such as
* routing, styling, and testing.
*/
export type AngularApplicationOptionsSchema = {
/**
* Include the styles for the root component directly within the `app.component.ts` file.
* Only CSS styles can be included inline. By default, a separate stylesheet file (e.g.,
* `app.component.css`) is created.
*/
inlineStyle?: boolean;
/**
* Include the HTML template for the root component directly within the `app.component.ts`
* file. By default, a separate template file (e.g., `app.component.html`) is created.
*/
inlineTemplate?: boolean;
/**
* Generate a minimal project without any testing frameworks. This is intended for learning
* purposes and simple experimentation, not for production applications.
*/
minimal?: boolean;
/**
* The name for the new application. This name will be used for the project directory and
* various identifiers throughout the application's code.
*/
name: string;
/**
* A prefix to be added to the selectors of components generated within this application.
* For example, if the prefix is `my-app` and you generate a component named `my-component`,
* the selector will be `my-app-my-component`.
*/
prefix?: string;
/**
* The directory where the new application's files will be created, relative to the
* workspace root. If not specified, the application will be created in a subfolder within
* the `projects` directory, using the application's name.
*/
projectRoot?: string;
/**
* Generate an application with routing already configured. This sets up the necessary files
* and modules for managing navigation between different views in your application.
*/
routing?: boolean;
/**
* Skip the automatic installation of packages. You will need to manually install the
* dependencies later.
*/
skipInstall?: boolean;
/**
* Do not add dependencies to the `package.json` file.
*/
skipPackageJson?: boolean;
/**
* Skip the generation of a unit test files `spec.ts`.
*/
skipTests?: boolean;
/**
* Configure the application for Server-Side Rendering (SSR) and Static Site Generation
* (SSG/Prerendering).
*/
ssr?: boolean;
/**
* Create an application that utilizes the standalone API, eliminating the need for
* NgModules. This can simplify the structure of your application.
*/
standalone?: boolean;
/**
* Enable stricter bundle budget settings for the application. This helps to keep your
* application's bundle size small and improve performance. For more information, see
* https://angular.dev/tools/cli/template-typecheck#strict-mode
*/
strict?: boolean;
/**
* The type of stylesheet files to be created for components in the application.
*/
style?: SchematicsAngularApplicationStyle;
/**
* Sets the view encapsulation mode for the application's components. This determines how
* component styles are scoped and applied.
*/
viewEncapsulation?: ViewEncapsulation;
/**
* Generate an application that does not use `zone.js`.
*/
zoneless?: boolean;
};
/**
* The type of stylesheet files to be created for components in the application.
*
* The type of stylesheet files to be created for components in the initial project.
*/
export declare enum SchematicsAngularApplicationStyle {
Css = "css",
Less = "less",
Sass = "sass",
Scss = "scss"
}
/**
* Sets the view encapsulation mode for the application's components. This determines how
* component styles are scoped and applied.
*
* Sets the view encapsulation mode for the component. This determines how the component's
* styles are scoped and applied.
*
* Sets the view encapsulation mode for components in the initial project. This determines
* how component styles are scoped and applied. Options include: `Emulated` (default, styles
* are scoped to the component), `None` (styles are global), and `ShadowDom` (styles are
* encapsulated using Shadow DOM).
*/
export declare enum ViewEncapsulation {
Emulated = "Emulated",
None = "None",
ShadowDom = "ShadowDom"
}
/**
* Creates a new class in your project. Classes are the fundamental building blocks for
* object-oriented programming in TypeScript. They provide a blueprint for creating objects
* with properties and methods. This schematic helps you generate a new class with the basic
* structure and optional test files.
*/
export type AngularClassOptionsSchema = {
/**
* The name for the new class. This will be used to create the class file (e.g.,
* `my-class.ts`) and, if enabled, the corresponding test file `my-class.spec.ts`.
*/
name: string;
/**
* The path where the class file should be created, relative to the workspace root. If not
* specified, the class will be created in the current directory.
*/
path?: string;
/**
* The name of the project where the class should be added. If not specified, the CLI will
* determine the project from the current directory.
*/
project: string;
/**
* Skip the generation of a unit test file `spec.ts` for the new class.
*/
skipTests?: boolean;
/**
* Adds a custom type to the filename, allowing you to create more descriptive class names.
* For example, if you set the type to `helper`, the filename will be `my-class.helper.ts`.
*/
type?: string;
};
/**
* Creates a new Angular component. Components are the basic building blocks of Angular
* applications. Each component consists of a TypeScript class, an HTML template, and an
* optional CSS stylesheet. Use this schematic to generate a new component in your project.
*/
export type AngularComponentOptionsSchema = {
/**
* Configures the change detection strategy for the component.
*/
changeDetection?: ChangeDetection;
/**
* Adds `:host { display: block; }` to the component's stylesheet, ensuring the component
* renders as a block-level element. This is useful for layout purposes.
*/
displayBlock?: boolean;
/**
* Automatically export the component from the specified NgModule, making it accessible to
* other modules in the application.
*/
export?: boolean;
/**
* Use a default export for the component in its TypeScript file instead of a named export.
*/
exportDefault?: boolean;
/**
* Create the component files directly in the project's `src/app` directory instead of
* creating a new folder for them.
*/
flat?: boolean;
/**
* Include the component's styles directly in the `component.ts` file. By default, a
* separate stylesheet file (e.g., `my-component.css`) is created.
*/
inlineStyle?: boolean;
/**
* Include the component's HTML template directly in the `component.ts` file. By default, a
* separate template file (e.g., `my-component.html`) is created.
*/
inlineTemplate?: boolean;
/**
* Specify the NgModule where the component should be declared. If not provided, the CLI
* will attempt to find the closest NgModule in the component's path.
*/
module?: string;
/**
* The name for the new component. This will be used to create the component's class,
* template, and stylesheet files. For example, if you provide `my-component`, the files
* will be named `my-component.ts`, `my-component.html`, and `my-component.css`.
*/
name: string;
/**
* Generate component template files with an '.ng.html' file extension instead of '.html'.
*/
ngHtml?: boolean;
/**
* The path where the component files should be created, relative to the current workspace.
* If not provided, a folder with the same name as the component will be created in the
* project's `src/app` directory.
*/
path?: string;
/**
* A prefix to be added to the component's selector. For example, if the prefix is `app` and
* the component name is `my-component`, the selector will be `app-my-component`.
*/
prefix?: string;
/**
* The name of the project where the component should be added. If not specified, the CLI
* will determine the project from the current directory.
*/
project: string;
/**
* The HTML selector to use for this component. If not provided, a selector will be
* generated based on the component name (e.g., `app-my-component`).
*/
selector?: string;
/**
* Do not automatically import the new component into its closest NgModule.
*/
skipImport?: boolean;
/**
* Skip the generation of an HTML selector for the component.
*/
skipSelector?: boolean;
/**
* Skip the generation of unit test files `spec.ts`.
*/
skipTests?: boolean;
/**
* Generate a standalone component. Standalone components are self-contained and don't need
* to be declared in an NgModule. They can be used independently or imported directly into
* other standalone components.
*/
standalone?: boolean;
/**
* Specify the type of stylesheet to be created for the component, or `none` to skip
* creating a stylesheet.
*/
style?: SchematicsAngularComponentStyle;
/**
* Append a custom type to the component's filename. For example, if you set the type to
* `container`, the file will be named `my-component.container.ts`.
*/
type?: string;
/**
* Sets the view encapsulation mode for the component. This determines how the component's
* styles are scoped and applied.
*/
viewEncapsulation?: ViewEncapsulation;
};
/**
* Configures the change detection strategy for the component.
*/
export declare enum ChangeDetection {
Default = "Default",
OnPush = "OnPush"
}
/**
* Specify the type of stylesheet to be created for the component, or `none` to skip
* creating a stylesheet.
*/
export declare enum SchematicsAngularComponentStyle {
Css = "css",
Less = "less",
None = "none",
Sass = "sass",
Scss = "scss"
}
/**
* Creates a new directive in your project. Directives are used to extend the behavior or
* appearance of HTML elements and components. They allow you to manipulate the DOM, add
* custom attributes, and respond to events. This schematic generates the necessary files
* and boilerplate code for a new directive.
*/
export type AngularDirectiveOptionsSchema = {
/**
* Automatically export the directive from the specified NgModule, making it accessible to
* other modules in the application.
*/
export?: boolean;
/**
* Creates the new directive files at the top level of the current project. If set to false,
* a new folder with the directive's name will be created to contain the files.
*/
flat?: boolean;
/**
* Specify the NgModule where the directive should be declared. If not provided, the CLI
* will attempt to find the closest NgModule in the directive's path.
*/
module?: string;
/**
* The name for the new directive. This will be used to create the directive's class and
* spec files (e.g., `my-directive.directive.ts` and `my-directive.directive.spec.ts`).
*/
name: string;
/**
* The path where the directive files should be created, relative to the workspace root. If
* not provided, the directive will be created in the current directory.
*/
path?: string;
/**
* A prefix to be added to the directive's selector. For example, if the prefix is `app` and
* the directive name is `highlight`, the selector will be `appHighlight`.
*/
prefix?: string;
/**
* The name of the project where the directive should be added. If not specified, the CLI
* will determine the project from the current directory.
*/
project: string;
/**
* The HTML selector to use for this directive. If not provided, a selector will be
* generated based on the directive's name (e.g., `appHighlight`).
*/
selector?: string;
/**
* Do not automatically import the new directive into its closest NgModule.
*/
skipImport?: boolean;
/**
* Skip the generation of a unit test file `spec.ts` for the new directive.
*/
skipTests?: boolean;
/**
* Generate a standalone directive. Standalone directives are self-contained and don't need
* to be declared in an NgModule. They can be used independently or imported directly into
* other standalone components or directives.
*/
standalone?: boolean;
/**
* Append a custom type to the directive's filename. For example, if you set the type to
* `directive`, the file will be named `example.directive.ts`.
*/
type?: string;
};
/**
* Creates a new enum in your project. Enums (enumerations) are a way to define a set of
* named constants, making your code more readable and maintainable. This schematic
* generates a new enum with the specified name and type.
*/
export type AngularEnumOptionsSchema = {
/**
* The name for the new enum. This will be used to create the enum file (e.g.,
* `my-enum.enum.ts`).
*/
name: string;
/**
* The path where the enum file should be created, relative to the current workspace. If not
* specified, the enum will be created in the current directory.
*/
path?: string;
/**
* The name of the project where the enum should be created. If not specified, the CLI will
* determine the project from the current directory.
*/
project: string;
/**
* Adds a custom type to the filename, allowing you to create more descriptive enum names.
* For example, if you set the type to `status`, the filename will be `my-enum.status.ts`.
*/
type?: string;
};
/**
* Creates a new route guard in your project. Route guards are used to control access to
* parts of your application by checking certain conditions before a route is activated.
* This schematic generates a new guard with the specified name, type, and options.
*/
export type AngularGuardOptionsSchema = {
/**
* Creates the new guard files at the top level of the current project. If set to false, a
* new folder with the guard's name will be created to contain the files.
*/
flat?: boolean;
/**
* Generate the guard as a function instead of a class. Functional guards can be simpler for
* basic scenarios.
*/
functional?: boolean;
/**
* Specifies the type(s) of guard to create. You can choose one or more of the following:
* `CanActivate` (controls access to a route), `CanActivateChild` (controls access to child
* routes), `CanDeactivate` (asks for confirmation before leaving a route), `CanMatch`
* (determines if a route can be matched).
*/
implements?: Implement[];
/**
* The name for the new route guard. This will be used to create the guard's class and spec
* files (e.g., `my-guard.guard.ts` and `my-guard.guard.spec.ts`).
*/
name: string;
/**
* The path where the guard files should be created, relative to the current workspace. If
* not provided, the guard will be created in the current directory.
*/
path?: string;
/**
* The name of the project where the guard should be created. If not specified, the CLI will
* determine the project from the current directory.
*/
project: string;
/**
* Skip the generation of a unit test file `spec.ts` for the new guard.
*/
skipTests?: boolean;
/**
* The separator character to use before the type within the generated file's name. For
* example, if you set the option to `.`, the file will be named `example.guard.ts`.
*/
typeSeparator?: TypeSeparator;
};
export declare enum Implement {
CanActivate = "CanActivate",
CanActivateChild = "CanActivateChild",
CanDeactivate = "CanDeactivate",
CanMatch = "CanMatch"
}
/**
* The separator character to use before the type within the generated file's name. For
* example, if you set the option to `.`, the file will be named `example.guard.ts`.
*
* The separator character to use before the type within the generated file's name. For
* example, if you set the option to `.`, the file will be named `example.interceptor.ts`.
*
* The separator character to use before the type within the generated file's name. For
* example, if you set the option to `.`, the file will be named `example.pipe.ts`.
*
* The separator character to use before the type within the generated file's name. For
* example, if you set the option to `.`, the file will be named `example.resolver.ts`.
*/
export declare enum TypeSeparator {
Empty = "-",
TypeSeparator = "."
}
/**
* Creates a new interceptor in your project. Interceptors are used to intercept and modify
* HTTP requests and responses before they reach their destination. This allows you to
* perform tasks like adding authentication headers, handling errors, or logging requests.
* This schematic generates the necessary files and boilerplate code for a new interceptor.
*/
export type AngularInterceptorOptionsSchema = {
/**
* Creates the new interceptor files at the top level of the current project. If set to
* false, a new folder with the interceptor's name will be created to contain the files.
*/
flat?: boolean;
/**
* Creates the interceptor as a function `HttpInterceptorFn` instead of a class. Functional
* interceptors can be simpler for basic scenarios.
*/
functional?: boolean;
/**
* The name for the new interceptor. This will be used to create the interceptor's class and
* spec files (e.g., `my-interceptor.interceptor.ts` and
* `my-interceptor.interceptor.spec.ts`).
*/
name: string;
/**
* The path where the interceptor files should be created, relative to the workspace root.
* If not provided, the interceptor will be created in the current directory.
*/
path?: string;
/**
* The name of the project where the interceptor should be created. If not specified, the
* CLI will determine the project from the current directory.
*/
project: string;
/**
* Skip the generation of a unit test file `spec.ts` for the new interceptor.
*/
skipTests?: boolean;
/**
* The separator character to use before the type within the generated file's name. For
* example, if you set the option to `.`, the file will be named `example.interceptor.ts`.
*/
typeSeparator?: TypeSeparator;
};
/**
* Creates a new interface in your project. Interfaces define the structure of objects in
* TypeScript, ensuring type safety and code clarity. This schematic generates a new
* interface with the specified name and type.
*/
export type AngularInterfaceOptionsSchema = {
/**
* The name for the new interface. This will be used to create the interface file (e.g.,
* `my-interface.interface.ts`).
*/
name: string;
/**
* The path where the interface file should be created, relative to the workspace root. If
* not provided, the interface will be created in the current directory.
*/
path?: string;
/**
* A prefix to be added to the interface name. This is typically not used for interfaces, as
* they don't have selectors like components or directives.
*/
prefix?: string;
/**
* The name of the project where the interface should be created. If not specified, the CLI
* will determine the project from the current directory.
*/
project: string;
/**
* Adds a custom type to the filename, allowing you to create more descriptive interface
* names. For example, if you set the type to `data`, the filename will be
* `my-interface.data.ts`.
*/
type?: string;
};
/**
* Creates a new library project in your Angular workspace. Libraries are reusable
* collections of components, services, and other Angular artifacts that can be shared
* across multiple applications. This schematic simplifies the process of generating a new
* library with the necessary files and configurations.
*/
export type LibraryOptionsSchema = {
/**
* The path to the library's public API file, relative to the workspace root. This file
* defines what parts of the library are accessible to applications that import it.
*/
entryFile?: string;
/**
* The name for the new library. This name will be used for the project directory and
* various identifiers within the library's code.
*/
name: string;
/**
* A prefix to be added to the selectors of components generated within this library. For
* example, if the prefix is `my-lib` and you generate a component named `my-component`, the
* selector will be `my-lib-my-component`.
*/
prefix?: string;
/**
* The root directory for the new library, relative to the workspace root. If not specified,
* the library will be created in a subfolder within the `projects` directory, using the
* library's name.
*/
projectRoot?: string;
/**
* Skip the automatic installation of packages. You will need to manually install the
* dependencies later.
*/
skipInstall?: boolean;
/**
* Do not automatically add dependencies to the `package.json` file.
*/
skipPackageJson?: boolean;
/**
* Do not update the workspace `tsconfig.json` file to add a path mapping for the new
* library. The path mapping is needed to use the library in an application, but can be
* disabled here to simplify development.
*/
skipTsConfig?: boolean;
/**
* Create a library that utilizes the standalone API, eliminating the need for NgModules.
* This can simplify the structure of your library and its usage in applications.
*/
standalone?: boolean;
};
/**
* Creates a new Angular workspace and an initial project. This schematic sets up the
* foundation for your Angular development, generating the workspace configuration files and
* an optional starter application. You can customize various aspects of the workspace and
* the initial project, such as routing, styling, and testing.
*/
export type AngularNgNewOptionsSchema = {
/**
* Specifies which AI tools to generate configuration files for. These file are used to
* improve the outputs of AI tools by following the best practices.
*/
aiConfig?: AiConfig[];
/**
* Configure the initial Git commit for the new repository.
*/
commit?: CommitUnion;
/**
* Create a new initial application project in the new workspace. When false, creates an
* empty workspace with no initial application. You can then use the `ng generate
* application` command to create applications in the `projects` directory.
*/
createApplication?: boolean;
/**
* The directory where the new workspace and project should be created. If not specified,
* the workspace will be created in the current directory.
*/
directory?: string;
/**
* Include the styles for the initial application's root component directly within the
* `app.component.ts` file. By default, a separate stylesheet file (e.g.,
* `app.component.css`) is created.
*/
inlineStyle?: boolean;
/**
* Include the HTML template for the initial application's root component directly within
* the `app.component.ts` file. By default, a separate template file (e.g.,
* `app.component.html`) is created.
*/
inlineTemplate?: boolean;
/**
* Generate a minimal Angular workspace without any testing frameworks. This is intended for
* learning purposes and simple experimentation, not for production applications.
*/
minimal?: boolean;
/**
* The name for the new workspace and the initial project. This name will be used for the
* root directory and various identifiers throughout the project.
*/
name: string;
/**
* The path where new projects will be created within the workspace, relative to the
* workspace root. By default, new projects are created in the `projects` directory.
*/
newProjectRoot?: string;
/**
* The package manager used to install dependencies.
*/
packageManager?: PackageManager;
/**
* The prefix to apply to generated selectors for the initial project. For example, if the
* prefix is `my-app` and you generate a component named `my-component`, the selector will
* be `my-app-my-component`.
*/
prefix?: string;
/**
* Enable routing in the initial application project. This sets up the necessary files and
* modules for managing navigation between different views in your application.
*/
routing?: boolean;
/**
* Do not initialize a Git repository in the new workspace. By default, a Git repository is
* initialized to help you track changes to your project.
*/
skipGit?: boolean;
/**
* Skip the automatic installation of packages. You will need to manually install the
* dependencies later.
*/
skipInstall?: boolean;
/**
* Skip the generation of unit test files `spec.ts`.
*/
skipTests?: boolean;
/**
* Configure the initial application for Server-Side Rendering (SSR) and Static Site
* Generation (SSG/Prerendering).
*/
ssr?: boolean;
/**
* Creates an application based upon the standalone API, without NgModules.
*/
standalone?: boolean;
/**
* Enable stricter type checking and stricter bundle budgets settings. This setting helps
* improve maintainability and catch bugs ahead of time. For more information, see
* https://angular.dev/tools/cli/template-typecheck#strict-mode
*/
strict?: boolean;
/**
* The type of stylesheet files to be created for components in the initial project.
*/
style?: SchematicsAngularApplicationStyle;
/**
* The version of the Angular CLI to use.
*/
version: string;
/**
* Sets the view encapsulation mode for components in the initial project. This determines
* how component styles are scoped and applied. Options include: `Emulated` (default, styles
* are scoped to the component), `None` (styles are global), and `ShadowDom` (styles are
* encapsulated using Shadow DOM).
*/
viewEncapsulation?: ViewEncapsulation;
/**
* Create an initial application that does not utilize `zone.js`.
*/
zoneless?: boolean;
};
export declare enum AiConfig {
Claude = "claude",
Copilot = "copilot",
Cursor = "cursor",
Gemini = "gemini",
Jetbrains = "jetbrains",
None = "none",
Windsurf = "windsurf"
}
/**
* Configure the initial Git commit for the new repository.
*/
export type CommitUnion = boolean | CommitObject;
export type CommitObject = {
email: string;
message?: string;
name: string;
[property: string]: any;
};
/**
* Creates a new pipe in your project. Pipes are used to transform data for display in
* templates. They take input values and apply a specific transformation, such as formatting
* dates, currency, or filtering arrays. This schematic generates the necessary files and
* boilerplate code for a new pipe.
*/
export type AngularPipeOptionsSchema = {
/**
* Automatically export the pipe from the specified NgModule, making it accessible to other
* modules in the application.
*/
export?: boolean;
/**
* Creates the new pipe files at the top level of the current project. If set to false, a
* new folder with the pipe's name will be created to contain the files.
*/
flat?: boolean;
/**
* Specify the NgModule where the pipe should be declared. If not provided, the CLI will
* attempt to find the closest NgModule in the pipe's path.
*/
module?: string;
/**
* The name for the new pipe. This will be used to create the pipe's class and spec files
* (e.g., `my-pipe.pipe.ts` and `my-pipe.pipe.spec.ts`).
*/
name: string;
/**
* The path where the pipe files should be created, relative to the workspace root. If not
* provided, the pipe will be created in the current directory.
*/
path?: string;
/**
* The name of the project where the pipe should be created. If not specified, the CLI will
* determine the project from the current directory.
*/
project: string;
/**
* Do not automatically import the new pipe into its closest NgModule.
*/
skipImport?: boolean;
/**
* Prevent the generation of a unit test file `spec.ts` for the new pipe.
*/
skipTests?: boolean;
/**
* Generate a standalone pipe. Standalone pipes are self-contained and don't need to be
* declared in an NgModule. They can be used independently or imported directly into other
* standalone components, directives, or pipes.
*/
standalone?: boolean;
/**
* The separator character to use before the type within the generated file's name. For
* example, if you set the option to `.`, the file will be named `example.pipe.ts`.
*/
typeSeparator?: TypeSeparator;
};
/**
* Creates a new resolver in your project. Resolvers are used to pre-fetch data before a
* route is activated, ensuring that the necessary data is available before the component is
* displayed. This can improve the user experience by preventing delays and loading states.
* This schematic generates a new resolver with the specified name and options.
*/
export type AngularResolverOptionsSchema = {
/**
* Creates the new resolver files at the top level of the current project. If set to false,
* a new folder with the resolver's name will be created to contain the files.
*/
flat?: boolean;
/**
* Creates the resolver as a function `ResolveFn` instead of a class. Functional resolvers
* can be simpler for basic scenarios.
*/
functional?: boolean;
/**
* The name for the new resolver. This will be used to create the resolver's class and spec
* files (e.g., `my-resolver.resolver.ts` and `my-resolver.resolver.spec.ts`).
*/
name: string;
/**
* The path where the resolver files should be created, relative to the current workspace.
* If not provided, the resolver will be created in the current directory.
*/
path?: string;
/**
* The name of the project where the resolver should be created. If not specified, the CLI
* will determine the project from the current directory.
*/
project: string;
/**
* Skip the generation of a unit test file `spec.ts` for the new resolver.
*/
skipTests?: boolean;
/**
* The separator character to use before the type within the generated file's name. For
* example, if you set the option to `.`, the file will be named `example.resolver.ts`.
*/
typeSeparator?: TypeSeparator;
};
/**
* Creates a new service in your project. Services are used to encapsulate reusable logic,
* such as data access, API calls, or utility functions. This schematic simplifies the
* process of generating a new service with the necessary files and boilerplate code.
*/
export type AngularServiceOptionsSchema = {
/**
* Creates files at the top level of the project or the given path. If set to false, a new
* folder with the service's name will be created to contain the files.
*/
flat?: boolean;
/**
* The name for the new service. This will be used to create the service's class and spec
* files (e.g., `my-service.service.ts` and `my-service.service.spec.ts`).
*/
name: string;
/**
* The path where the service files should be created, relative to the workspace root. If
* not provided, the service will be created in the project's `src/app` directory.
*/
path?: string;
/**
* The name of the project where the service should be added. If not specified, the CLI will
* determine the project from the current directory.
*/
project: string;
/**
* Skip the generation of a unit test file `spec.ts` for the service.
*/
skipTests?: boolean;
/**
* Append a custom type to the service's filename. For example, if you set the type to
* `service`, the file will be named `my-service.service.ts`.
*/
type?: string;
};
/**
* Creates a new web worker in your project. Web workers allow you to run JavaScript code in
* the background, improving the performance and responsiveness of your application by
* offloading computationally intensive tasks. This schematic generates the necessary files
* for a new web worker and provides an optional code snippet to demonstrate its usage.
*/
export type AngularWebWorkerOptionsSchema = {
/**
* The name for the new web worker. This will be used to create the worker file (e.g.,
* `my-worker.worker.ts`).
*/
name: string;
/**
* The path where the web worker file should be created, relative to the current workspace.
* If not specified, the worker will be created in the current directory.
*/
path?: string;
/**
* The name of the project where the web worker should be created. If not specified, the CLI
* will determine the project from the current directory.
*/
project: string;
/**
* Generate a code snippet that demonstrates how to create and use the new web worker.
*/
snippet?: boolean;
};

112
node_modules/@angular/cli/lib/config/workspace-schema.js generated vendored Executable file
View File

@@ -0,0 +1,112 @@
"use strict";
// THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
// CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
Object.defineProperty(exports, "__esModule", { value: true });
exports.AiConfig = exports.TypeSeparator = exports.Implement = exports.SchematicsAngularComponentStyle = exports.ChangeDetection = exports.ViewEncapsulation = exports.SchematicsAngularApplicationStyle = exports.PackageManager = exports.Environment = void 0;
/**
* Configure in which environment disk cache is enabled.
*/
var Environment;
(function (Environment) {
Environment["All"] = "all";
Environment["Ci"] = "ci";
Environment["Local"] = "local";
})(Environment || (exports.Environment = Environment = {}));
/**
* Specify which package manager tool to use.
*
* The package manager used to install dependencies.
*/
var PackageManager;
(function (PackageManager) {
PackageManager["Bun"] = "bun";
PackageManager["Cnpm"] = "cnpm";
PackageManager["Npm"] = "npm";
PackageManager["Pnpm"] = "pnpm";
PackageManager["Yarn"] = "yarn";
})(PackageManager || (exports.PackageManager = PackageManager = {}));
/**
* The type of stylesheet files to be created for components in the application.
*
* The type of stylesheet files to be created for components in the initial project.
*/
var SchematicsAngularApplicationStyle;
(function (SchematicsAngularApplicationStyle) {
SchematicsAngularApplicationStyle["Css"] = "css";
SchematicsAngularApplicationStyle["Less"] = "less";
SchematicsAngularApplicationStyle["Sass"] = "sass";
SchematicsAngularApplicationStyle["Scss"] = "scss";
})(SchematicsAngularApplicationStyle || (exports.SchematicsAngularApplicationStyle = SchematicsAngularApplicationStyle = {}));
/**
* Sets the view encapsulation mode for the application's components. This determines how
* component styles are scoped and applied.
*
* Sets the view encapsulation mode for the component. This determines how the component's
* styles are scoped and applied.
*
* Sets the view encapsulation mode for components in the initial project. This determines
* how component styles are scoped and applied. Options include: `Emulated` (default, styles
* are scoped to the component), `None` (styles are global), and `ShadowDom` (styles are
* encapsulated using Shadow DOM).
*/
var ViewEncapsulation;
(function (ViewEncapsulation) {
ViewEncapsulation["Emulated"] = "Emulated";
ViewEncapsulation["None"] = "None";
ViewEncapsulation["ShadowDom"] = "ShadowDom";
})(ViewEncapsulation || (exports.ViewEncapsulation = ViewEncapsulation = {}));
/**
* Configures the change detection strategy for the component.
*/
var ChangeDetection;
(function (ChangeDetection) {
ChangeDetection["Default"] = "Default";
ChangeDetection["OnPush"] = "OnPush";
})(ChangeDetection || (exports.ChangeDetection = ChangeDetection = {}));
/**
* Specify the type of stylesheet to be created for the component, or `none` to skip
* creating a stylesheet.
*/
var SchematicsAngularComponentStyle;
(function (SchematicsAngularComponentStyle) {
SchematicsAngularComponentStyle["Css"] = "css";
SchematicsAngularComponentStyle["Less"] = "less";
SchematicsAngularComponentStyle["None"] = "none";
SchematicsAngularComponentStyle["Sass"] = "sass";
SchematicsAngularComponentStyle["Scss"] = "scss";
})(SchematicsAngularComponentStyle || (exports.SchematicsAngularComponentStyle = SchematicsAngularComponentStyle = {}));
var Implement;
(function (Implement) {
Implement["CanActivate"] = "CanActivate";
Implement["CanActivateChild"] = "CanActivateChild";
Implement["CanDeactivate"] = "CanDeactivate";
Implement["CanMatch"] = "CanMatch";
})(Implement || (exports.Implement = Implement = {}));
/**
* The separator character to use before the type within the generated file's name. For
* example, if you set the option to `.`, the file will be named `example.guard.ts`.
*
* The separator character to use before the type within the generated file's name. For
* example, if you set the option to `.`, the file will be named `example.interceptor.ts`.
*
* The separator character to use before the type within the generated file's name. For
* example, if you set the option to `.`, the file will be named `example.pipe.ts`.
*
* The separator character to use before the type within the generated file's name. For
* example, if you set the option to `.`, the file will be named `example.resolver.ts`.
*/
var TypeSeparator;
(function (TypeSeparator) {
TypeSeparator["Empty"] = "-";
TypeSeparator["TypeSeparator"] = ".";
})(TypeSeparator || (exports.TypeSeparator = TypeSeparator = {}));
var AiConfig;
(function (AiConfig) {
AiConfig["Claude"] = "claude";
AiConfig["Copilot"] = "copilot";
AiConfig["Cursor"] = "cursor";
AiConfig["Gemini"] = "gemini";
AiConfig["Jetbrains"] = "jetbrains";
AiConfig["None"] = "none";
AiConfig["Windsurf"] = "windsurf";
})(AiConfig || (exports.AiConfig = AiConfig = {}));

8
node_modules/@angular/cli/lib/init.d.ts generated vendored Executable file
View File

@@ -0,0 +1,8 @@
/**
* @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 {};

161
node_modules/@angular/cli/lib/init.js generated vendored Executable file
View File

@@ -0,0 +1,161 @@
"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 });
const promises_1 = require("node:fs/promises");
const node_module_1 = require("node:module");
const path = __importStar(require("node:path"));
const semver_1 = require("semver");
const color_1 = require("../src/utilities/color");
const config_1 = require("../src/utilities/config");
const environment_options_1 = require("../src/utilities/environment-options");
const version_1 = require("../src/utilities/version");
/**
* Angular CLI versions prior to v14 may not exit correctly if not forcibly exited
* via `process.exit()`. When bootstrapping, `forceExit` will be set to `true`
* if the local CLI version is less than v14 to prevent the CLI from hanging on
* exit in those cases.
*/
let forceExit = false;
(async () => {
/**
* Disable Browserslist old data warning as otherwise with every release we'd need to update this dependency
* which is cumbersome considering we pin versions and the warning is not user actionable.
* `Browserslist: caniuse-lite is outdated. Please run next command `npm update`
* See: https://github.com/browserslist/browserslist/blob/819c4337456996d19db6ba953014579329e9c6e1/node.js#L324
*/
process.env.BROWSERSLIST_IGNORE_OLD_DATA = '1';
const rawCommandName = process.argv[2];
/**
* Disable CLI version mismatch checks and forces usage of the invoked CLI
* instead of invoking the local installed version.
*
* When running `ng new` always favor the global version. As in some
* cases orphan `node_modules` would cause the non global CLI to be used.
* @see: https://github.com/angular/angular-cli/issues/14603
*/
if (environment_options_1.disableVersionCheck || rawCommandName === 'new') {
return (await Promise.resolve().then(() => __importStar(require('./cli')))).default;
}
let cli;
try {
// No error implies a projectLocalCli, which will load whatever
// version of ng-cli you have installed in a local package.json
const cwdRequire = (0, node_module_1.createRequire)(process.cwd() + '/');
const projectLocalCli = cwdRequire.resolve('@angular/cli');
cli = await Promise.resolve(`${projectLocalCli}`).then(s => __importStar(require(s)));
const globalVersion = new semver_1.SemVer(version_1.VERSION.full);
// Older versions might not have the VERSION export
let localVersion = cli.VERSION?.full;
if (!localVersion) {
try {
const localPackageJson = await (0, promises_1.readFile)(path.join(path.dirname(projectLocalCli), '../../package.json'), 'utf-8');
localVersion = JSON.parse(localPackageJson).version;
}
catch (error) {
// eslint-disable-next-line no-console
console.error('Version mismatch check skipped. Unable to retrieve local version: ' + error);
}
}
// Ensure older versions of the CLI fully exit
const localMajorVersion = (0, semver_1.major)(localVersion);
if (localMajorVersion > 0 && localMajorVersion < 14) {
forceExit = true;
// Versions prior to 14 didn't implement completion command.
if (rawCommandName === 'completion') {
return null;
}
}
let isGlobalGreater = false;
try {
isGlobalGreater = localVersion > 0 && globalVersion.compare(localVersion) > 0;
}
catch (error) {
// eslint-disable-next-line no-console
console.error('Version mismatch check skipped. Unable to compare local version: ' + error);
}
// When using the completion command, don't show the warning as otherwise this will break completion.
if (isGlobalGreater &&
rawCommandName !== '--get-yargs-completions' &&
rawCommandName !== 'completion') {
// If using the update command and the global version is greater, use the newer update command
// This allows improvements in update to be used in older versions that do not have bootstrapping
if (rawCommandName === 'update' &&
cli.VERSION &&
cli.VERSION.major - globalVersion.major <= 1) {
cli = await Promise.resolve().then(() => __importStar(require('./cli')));
}
else if (await (0, config_1.isWarningEnabled)('versionMismatch')) {
// Otherwise, use local version and warn if global is newer than local
const warning = `Your global Angular CLI version (${globalVersion}) is greater than your local ` +
`version (${localVersion}). The local Angular CLI version is used.\n\n` +
'To disable this warning use "ng config -g cli.warnings.versionMismatch false".';
// eslint-disable-next-line no-console
console.error(color_1.colors.yellow(warning));
}
}
}
catch {
// If there is an error, resolve could not find the ng-cli
// library from a package.json. Instead, include it from a relative
// path to this script file (which is likely a globally installed
// npm package). Most common cause for hitting this is `ng new`
cli = await Promise.resolve().then(() => __importStar(require('./cli')));
}
if ('default' in cli) {
cli = cli['default'];
}
return cli;
})()
.then((cli) => cli?.({
cliArgs: process.argv.slice(2),
}))
.then((exitCode = 0) => {
if (forceExit) {
process.exit(exitCode);
}
process.exitCode = exitCode;
})
.catch((err) => {
// eslint-disable-next-line no-console
console.error('Unknown error: ' + err.toString());
process.exit(127);
});