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

View File

@@ -0,0 +1,8 @@
import { <%= classify(name) %>Pipe } from './<%= dasherize(name) %><%= typeSeparator %>pipe';
describe('<%= classify(name) %>Pipe', () => {
it('create an instance', () => {
const pipe = new <%= classify(name) %>Pipe();
expect(pipe).toBeTruthy();
});
});

View File

@@ -0,0 +1,13 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: '<%= camelize(name) %>'<% if(!standalone) {%>,
standalone: false<%}%>
})
export class <%= classify(name) %>Pipe implements PipeTransform {
transform(value: unknown, ...args: unknown[]): unknown {
return null;
}
}

10
node_modules/@schematics/angular/pipe/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 PipeOptions } from './schema';
export default function (options: PipeOptions): Rule;

34
node_modules/@schematics/angular/pipe/index.js generated vendored Executable file
View File

@@ -0,0 +1,34 @@
"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 add_declaration_to_ng_module_1 = require("../utility/add-declaration-to-ng-module");
const find_module_1 = require("../utility/find-module");
const generate_from_files_1 = require("../utility/generate-from-files");
const parse_name_1 = require("../utility/parse-name");
const validation_1 = require("../utility/validation");
const workspace_1 = require("../utility/workspace");
function default_1(options) {
return async (host) => {
options.path ??= await (0, workspace_1.createDefaultPath)(host, options.project);
options.module = (0, find_module_1.findModuleFromOptions)(host, options);
const parsedPath = (0, parse_name_1.parseName)(options.path, options.name);
options.name = parsedPath.name;
options.path = parsedPath.path;
(0, validation_1.validateClassName)(schematics_1.strings.classify(options.name));
return (0, schematics_1.chain)([
(0, add_declaration_to_ng_module_1.addDeclarationToNgModule)({
type: 'pipe',
...options,
}),
(0, generate_from_files_1.generateFromFiles)(options),
]);
};
}

65
node_modules/@schematics/angular/pipe/schema.d.ts generated vendored Executable file
View File

@@ -0,0 +1,65 @@
/**
* 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 Schema = {
/**
* 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;
};
/**
* 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`.
*/
export declare enum TypeSeparator {
Empty = "-",
TypeSeparator = "."
}

14
node_modules/@schematics/angular/pipe/schema.js generated vendored Executable file
View File

@@ -0,0 +1,14 @@
"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.TypeSeparator = void 0;
/**
* 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`.
*/
var TypeSeparator;
(function (TypeSeparator) {
TypeSeparator["Empty"] = "-";
TypeSeparator["TypeSeparator"] = ".";
})(TypeSeparator || (exports.TypeSeparator = TypeSeparator = {}));

73
node_modules/@schematics/angular/pipe/schema.json generated vendored Executable file
View File

@@ -0,0 +1,73 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "SchematicsAngularPipe",
"title": "Angular Pipe Options Schema",
"type": "object",
"additionalProperties": false,
"description": "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.",
"properties": {
"name": {
"type": "string",
"description": "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`).",
"$default": {
"$source": "argv",
"index": 0
},
"x-prompt": "What name would you like to use for the pipe?"
},
"path": {
"type": "string",
"format": "path",
"$default": {
"$source": "workingDirectory"
},
"description": "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.",
"visible": false
},
"project": {
"type": "string",
"description": "The name of the project where the pipe should be created. If not specified, the CLI will determine the project from the current directory.",
"$default": {
"$source": "projectName"
}
},
"flat": {
"type": "boolean",
"default": true,
"description": "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."
},
"skipTests": {
"type": "boolean",
"description": "Prevent the generation of a unit test file `spec.ts` for the new pipe.",
"default": false
},
"skipImport": {
"type": "boolean",
"default": false,
"description": "Do not automatically import the new pipe into its closest NgModule."
},
"standalone": {
"description": "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.",
"type": "boolean",
"default": true,
"x-user-analytics": "ep.ng_standalone"
},
"module": {
"type": "string",
"description": "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.",
"alias": "m"
},
"export": {
"type": "boolean",
"default": false,
"description": "Automatically export the pipe from the specified NgModule, making it accessible to other modules in the application."
},
"typeSeparator": {
"type": "string",
"default": "-",
"enum": ["-", "."],
"description": "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`."
}
},
"required": ["name", "project"]
}