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

7
node_modules/@schematics/angular/config/.browserslistrc generated vendored Executable file
View File

@@ -0,0 +1,7 @@
Chrome >= 107
ChromeAndroid >= 107
Edge >= 107
Firefox >= 104
FirefoxAndroid >= 104
Safari >= 16
iOS >= 16

View File

@@ -0,0 +1,11 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For Angular's browser support policy, please see:
# https://angular.dev/reference/versions#browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
<%= config %>

View File

@@ -0,0 +1,38 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine'<% if (needDevkitPlugin) { %>, '@angular-devkit/build-angular'<% } %>],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),<% if (needDevkitPlugin) { %>
require('@angular-devkit/build-angular/plugins/karma')<% } %>
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, '<%= relativePathToWorkspaceRoot %>/coverage/<%= folderName %>'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
browsers: ['Chrome'],
restartOnFileChange: true
});
};

10
node_modules/@schematics/angular/config/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
*/
import { Rule } from '@angular-devkit/schematics';
import { Schema as ConfigOptions } from './schema';
export default function (options: ConfigOptions): Rule;

77
node_modules/@schematics/angular/config/index.js generated vendored Executable file
View File

@@ -0,0 +1,77 @@
"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;
const schematics_1 = require("@angular-devkit/schematics");
const promises_1 = require("node:fs/promises");
const node_path_1 = require("node:path");
const paths_1 = require("../utility/paths");
const workspace_1 = require("../utility/workspace");
const workspace_models_1 = require("../utility/workspace-models");
const schema_1 = require("./schema");
function default_1(options) {
switch (options.type) {
case schema_1.Type.Karma:
return addKarmaConfig(options);
case schema_1.Type.Browserslist:
return addBrowserslistConfig(options);
default:
throw new schematics_1.SchematicsException(`"${options.type}" is an unknown configuration file type.`);
}
}
function addBrowserslistConfig(options) {
return async (host) => {
const workspace = await (0, workspace_1.getWorkspace)(host);
const project = workspace.projects.get(options.project);
if (!project) {
throw new schematics_1.SchematicsException(`Project name "${options.project}" doesn't not exist.`);
}
// Read Angular's default vendored `.browserslistrc` file.
const config = await (0, promises_1.readFile)(node_path_1.posix.join(__dirname, '.browserslistrc'), 'utf8');
return (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
(0, schematics_1.filter)((p) => p.endsWith('.browserslistrc.template')),
(0, schematics_1.applyTemplates)({ config }),
(0, schematics_1.move)(project.root),
]));
};
}
function addKarmaConfig(options) {
return (0, workspace_1.updateWorkspace)((workspace) => {
const project = workspace.projects.get(options.project);
if (!project) {
throw new schematics_1.SchematicsException(`Project name "${options.project}" doesn't not exist.`);
}
const testTarget = project.targets.get('test');
if (!testTarget) {
throw new schematics_1.SchematicsException(`No "test" target found for project "${options.project}".` +
' A "test" target is required to generate a karma configuration.');
}
if (testTarget.builder !== workspace_models_1.Builders.Karma &&
testTarget.builder !== workspace_models_1.Builders.BuildKarma) {
throw new schematics_1.SchematicsException(`Cannot add a karma configuration as builder for "test" target in project does not` +
` use "${workspace_models_1.Builders.Karma}" or "${workspace_models_1.Builders.BuildKarma}".`);
}
testTarget.options ??= {};
testTarget.options.karmaConfig = node_path_1.posix.join(project.root, 'karma.conf.js');
// If scoped project (i.e. "@foo/bar"), convert dir to "foo/bar".
let folderName = options.project.startsWith('@') ? options.project.slice(1) : options.project;
if (/[A-Z]/.test(folderName)) {
folderName = schematics_1.strings.dasherize(folderName);
}
return (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
(0, schematics_1.filter)((p) => p.endsWith('karma.conf.js.template')),
(0, schematics_1.applyTemplates)({
relativePathToWorkspaceRoot: (0, paths_1.relativePathToWorkspaceRoot)(project.root),
folderName,
needDevkitPlugin: testTarget.builder === workspace_models_1.Builders.Karma,
}),
(0, schematics_1.move)(project.root),
]));
});
}

22
node_modules/@schematics/angular/config/schema.d.ts generated vendored Executable file
View File

@@ -0,0 +1,22 @@
/**
* Generates configuration files for your project. These files control various aspects of
* your project's build process, testing, and browser compatibility. This schematic helps
* you create or update essential configuration files with ease.
*/
export type Schema = {
/**
* The name of the project where the configuration file should be created or updated.
*/
project: string;
/**
* Specifies the type of configuration file to generate.
*/
type: Type;
};
/**
* Specifies the type of configuration file to generate.
*/
export declare enum Type {
Browserslist = "browserslist",
Karma = "karma"
}

13
node_modules/@schematics/angular/config/schema.js generated vendored Executable file
View File

@@ -0,0 +1,13 @@
"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.Type = void 0;
/**
* Specifies the type of configuration file to generate.
*/
var Type;
(function (Type) {
Type["Browserslist"] = "browserslist";
Type["Karma"] = "karma";
})(Type || (exports.Type = Type = {}));

28
node_modules/@schematics/angular/config/schema.json generated vendored Executable file
View File

@@ -0,0 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsAngularConfig",
"title": "Angular Config File Options Schema",
"type": "object",
"additionalProperties": false,
"description": "Generates configuration files for your project. These files control various aspects of your project's build process, testing, and browser compatibility. This schematic helps you create or update essential configuration files with ease.",
"properties": {
"project": {
"type": "string",
"description": "The name of the project where the configuration file should be created or updated.",
"$default": {
"$source": "projectName"
}
},
"type": {
"type": "string",
"description": "Specifies the type of configuration file to generate.",
"enum": ["karma", "browserslist"],
"x-prompt": "Which type of configuration file would you like to create?",
"$default": {
"$source": "argv",
"index": 0
}
}
},
"required": ["project", "type"]
}