@schematics/angular 19.1.0-rc.0 → 19.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/app-shell/schema.d.ts +4 -3
  2. package/app-shell/schema.json +3 -3
  3. package/application/schema.d.ts +40 -25
  4. package/application/schema.js +3 -2
  5. package/application/schema.json +18 -18
  6. package/class/schema.d.ts +13 -6
  7. package/class/schema.json +6 -6
  8. package/component/schema.d.ts +47 -29
  9. package/component/schema.js +5 -4
  10. package/component/schema.json +21 -21
  11. package/config/schema.d.ts +6 -4
  12. package/config/schema.js +1 -1
  13. package/config/schema.json +3 -3
  14. package/directive/schema.d.ts +25 -13
  15. package/directive/schema.json +12 -12
  16. package/enum/schema.d.ts +11 -6
  17. package/enum/schema.json +5 -5
  18. package/environments/schema.d.ts +5 -2
  19. package/environments/schema.json +2 -2
  20. package/guard/schema.d.ts +18 -9
  21. package/guard/schema.json +8 -8
  22. package/interceptor/schema.d.ts +16 -7
  23. package/interceptor/schema.json +7 -7
  24. package/interface/schema.d.ts +14 -6
  25. package/interface/schema.json +6 -6
  26. package/library/schema.d.ts +22 -10
  27. package/library/schema.json +9 -9
  28. package/ng-new/schema.d.ts +51 -31
  29. package/ng-new/schema.js +5 -2
  30. package/ng-new/schema.json +20 -20
  31. package/package.json +3 -3
  32. package/pipe/schema.d.ts +21 -10
  33. package/pipe/schema.json +10 -10
  34. package/resolver/schema.d.ts +15 -8
  35. package/resolver/schema.json +8 -8
  36. package/server/schema.d.ts +7 -4
  37. package/server/schema.json +4 -4
  38. package/service/schema.d.ts +12 -6
  39. package/service/schema.json +6 -6
  40. package/service-worker/schema.d.ts +7 -3
  41. package/service-worker/schema.json +3 -3
  42. package/ssr/schema.d.ts +12 -4
  43. package/ssr/schema.json +4 -3
  44. package/utility/latest-versions/package.json +2 -2
  45. package/utility/latest-versions.js +3 -3
  46. package/web-worker/schema.d.ts +11 -5
  47. package/web-worker/schema.json +5 -5
  48. package/workspace/schema.d.ts +15 -10
  49. package/workspace/schema.js +1 -1
  50. package/workspace/schema.json +6 -6
@@ -3,7 +3,7 @@
3
3
  "$id": "SchematicsAngularComponent",
4
4
  "title": "Angular Component Options Schema",
5
5
  "type": "object",
6
- "description": "Creates a new, generic component definition in the given project.",
6
+ "description": "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.",
7
7
  "additionalProperties": false,
8
8
  "properties": {
9
9
  "path": {
@@ -12,19 +12,19 @@
12
12
  "$default": {
13
13
  "$source": "workingDirectory"
14
14
  },
15
- "description": "The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.",
15
+ "description": "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.",
16
16
  "visible": false
17
17
  },
18
18
  "project": {
19
19
  "type": "string",
20
- "description": "The name of the project.",
20
+ "description": "The name of the project where the component should be added. If not specified, the CLI will determine the project from the current directory.",
21
21
  "$default": {
22
22
  "$source": "projectName"
23
23
  }
24
24
  },
25
25
  "name": {
26
26
  "type": "string",
27
- "description": "The name of the component.",
27
+ "description": "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.component.ts`, `my-component.component.html`, and `my-component.component.css`.",
28
28
  "$default": {
29
29
  "$source": "argv",
30
30
  "index": 0
@@ -32,39 +32,39 @@
32
32
  "x-prompt": "What name would you like to use for the component?"
33
33
  },
34
34
  "displayBlock": {
35
- "description": "Specifies if the style will contain `:host { display: block; }`.",
35
+ "description": "Adds `:host { display: block; }` to the component's stylesheet, ensuring the component renders as a block-level element. This is useful for layout purposes.",
36
36
  "type": "boolean",
37
37
  "default": false,
38
38
  "alias": "b"
39
39
  },
40
40
  "inlineStyle": {
41
- "description": "Include styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file.",
41
+ "description": "Include the component's styles directly in the `component.ts` file. By default, a separate stylesheet file (e.g., `my-component.component.css`) is created.",
42
42
  "type": "boolean",
43
43
  "default": false,
44
44
  "alias": "s",
45
45
  "x-user-analytics": "ep.ng_inline_style"
46
46
  },
47
47
  "inlineTemplate": {
48
- "description": "Include template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.",
48
+ "description": "Include the component's HTML template directly in the `component.ts` file. By default, a separate template file (e.g., `my-component.component.html`) is created.",
49
49
  "type": "boolean",
50
50
  "default": false,
51
51
  "alias": "t",
52
52
  "x-user-analytics": "ep.ng_inline_template"
53
53
  },
54
54
  "standalone": {
55
- "description": "Whether the generated component is standalone.",
55
+ "description": "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.",
56
56
  "type": "boolean",
57
57
  "default": true,
58
58
  "x-user-analytics": "ep.ng_standalone"
59
59
  },
60
60
  "viewEncapsulation": {
61
- "description": "The view encapsulation strategy to use in the new component.",
61
+ "description": "Sets the view encapsulation mode for the component. This determines how the component's styles are scoped and applied.",
62
62
  "enum": ["Emulated", "None", "ShadowDom"],
63
63
  "type": "string",
64
64
  "alias": "v"
65
65
  },
66
66
  "changeDetection": {
67
- "description": "The change detection strategy to use in the new component.",
67
+ "description": "Configures the change detection strategy for the component.",
68
68
  "enum": ["Default", "OnPush"],
69
69
  "type": "string",
70
70
  "default": "Default",
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "prefix": {
74
74
  "type": "string",
75
- "description": "The prefix to apply to the generated component selector.",
75
+ "description": "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`.",
76
76
  "alias": "p",
77
77
  "oneOf": [
78
78
  {
@@ -85,7 +85,7 @@
85
85
  ]
86
86
  },
87
87
  "style": {
88
- "description": "The file extension or preprocessor to use for style files, or 'none' to skip generating the style file.",
88
+ "description": "Specify the type of stylesheet to be created for the component, or `none` to skip creating a stylesheet.",
89
89
  "type": "string",
90
90
  "default": "css",
91
91
  "enum": ["css", "scss", "sass", "less", "none"],
@@ -93,48 +93,48 @@
93
93
  },
94
94
  "type": {
95
95
  "type": "string",
96
- "description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".",
96
+ "description": "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`.",
97
97
  "default": "Component"
98
98
  },
99
99
  "skipTests": {
100
100
  "type": "boolean",
101
- "description": "Do not create \"spec.ts\" test files for the new component.",
101
+ "description": "Skip the generation of unit test files `spec.ts`.",
102
102
  "default": false
103
103
  },
104
104
  "flat": {
105
105
  "type": "boolean",
106
- "description": "Create the new files at the top level of the current project.",
106
+ "description": "Create the component files directly in the project's `src/app` directory instead of creating a new folder for them.",
107
107
  "default": false
108
108
  },
109
109
  "skipImport": {
110
110
  "type": "boolean",
111
- "description": "Do not import this component into the owning NgModule.",
111
+ "description": "Do not automatically import the new component into its closest NgModule.",
112
112
  "default": false
113
113
  },
114
114
  "selector": {
115
115
  "type": "string",
116
116
  "format": "html-selector",
117
- "description": "The HTML selector to use for this component."
117
+ "description": "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`)."
118
118
  },
119
119
  "skipSelector": {
120
120
  "type": "boolean",
121
121
  "default": false,
122
- "description": "Specifies if the component should have a selector or not."
122
+ "description": "Skip the generation of an HTML selector for the component."
123
123
  },
124
124
  "module": {
125
125
  "type": "string",
126
- "description": "The declaring NgModule.",
126
+ "description": "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.",
127
127
  "alias": "m"
128
128
  },
129
129
  "export": {
130
130
  "type": "boolean",
131
131
  "default": false,
132
- "description": "The declaring NgModule exports this component."
132
+ "description": "Automatically export the component from the specified NgModule, making it accessible to other modules in the application."
133
133
  },
134
134
  "exportDefault": {
135
135
  "type": "boolean",
136
136
  "default": false,
137
- "description": "Use default export for the component instead of a named export."
137
+ "description": "Use a default export for the component in its TypeScript file instead of a named export."
138
138
  }
139
139
  },
140
140
  "required": ["name", "project"]
@@ -1,18 +1,20 @@
1
1
  /**
2
- * Generates a configuration file in the given project.
2
+ * Generates configuration files for your project. These files control various aspects of
3
+ * your project's build process, testing, and browser compatibility. This schematic helps
4
+ * you create or update essential configuration files with ease.
3
5
  */
4
6
  export interface Schema {
5
7
  /**
6
- * The name of the project.
8
+ * The name of the project where the configuration file should be created or updated.
7
9
  */
8
10
  project: string;
9
11
  /**
10
- * Specifies which type of configuration file to create.
12
+ * Specifies the type of configuration file to generate.
11
13
  */
12
14
  type: Type;
13
15
  }
14
16
  /**
15
- * Specifies which type of configuration file to create.
17
+ * Specifies the type of configuration file to generate.
16
18
  */
17
19
  export declare enum Type {
18
20
  Browserslist = "browserslist",
package/config/schema.js CHANGED
@@ -4,7 +4,7 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.Type = void 0;
6
6
  /**
7
- * Specifies which type of configuration file to create.
7
+ * Specifies the type of configuration file to generate.
8
8
  */
9
9
  var Type;
10
10
  (function (Type) {
@@ -4,18 +4,18 @@
4
4
  "title": "Angular Config File Options Schema",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
- "description": "Generates a configuration file in the given project.",
7
+ "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.",
8
8
  "properties": {
9
9
  "project": {
10
10
  "type": "string",
11
- "description": "The name of the project.",
11
+ "description": "The name of the project where the configuration file should be created or updated.",
12
12
  "$default": {
13
13
  "$source": "projectName"
14
14
  }
15
15
  },
16
16
  "type": {
17
17
  "type": "string",
18
- "description": "Specifies which type of configuration file to create.",
18
+ "description": "Specifies the type of configuration file to generate.",
19
19
  "enum": ["karma", "browserslist"],
20
20
  "x-prompt": "Which type of configuration file would you like to create?",
21
21
  "$default": {
@@ -1,50 +1,62 @@
1
1
  /**
2
- * Creates a new, generic directive definition in the given project.
2
+ * Creates a new directive in your project. Directives are used to extend the behavior or
3
+ * appearance of HTML elements and components. They allow you to manipulate the DOM, add
4
+ * custom attributes, and respond to events. This schematic generates the necessary files
5
+ * and boilerplate code for a new directive.
3
6
  */
4
7
  export interface Schema {
5
8
  /**
6
- * The declaring NgModule exports this directive.
9
+ * Automatically export the directive from the specified NgModule, making it accessible to
10
+ * other modules in the application.
7
11
  */
8
12
  export?: boolean;
9
13
  /**
10
- * When true (the default), creates the new files at the top level of the current project.
14
+ * Creates the new directive files at the top level of the current project. If set to false,
15
+ * a new folder with the directive's name will be created to contain the files.
11
16
  */
12
17
  flat?: boolean;
13
18
  /**
14
- * The declaring NgModule.
19
+ * Specify the NgModule where the directive should be declared. If not provided, the CLI
20
+ * will attempt to find the closest NgModule in the directive's path.
15
21
  */
16
22
  module?: string;
17
23
  /**
18
- * The name of the new directive.
24
+ * The name for the new directive. This will be used to create the directive's class and
25
+ * spec files (e.g., `my-directive.directive.ts` and `my-directive.directive.spec.ts`).
19
26
  */
20
27
  name: string;
21
28
  /**
22
- * The path at which to create the interface that defines the directive, relative to the
23
- * workspace root.
29
+ * The path where the directive files should be created, relative to the workspace root. If
30
+ * not provided, the directive will be created in the current directory.
24
31
  */
25
32
  path?: string;
26
33
  /**
27
- * A prefix to apply to generated selectors.
34
+ * A prefix to be added to the directive's selector. For example, if the prefix is `app` and
35
+ * the directive name is `highlight`, the selector will be `appHighlight`.
28
36
  */
29
37
  prefix?: string;
30
38
  /**
31
- * The name of the project.
39
+ * The name of the project where the directive should be added. If not specified, the CLI
40
+ * will determine the project from the current directory.
32
41
  */
33
42
  project: string;
34
43
  /**
35
- * The HTML selector to use for this directive.
44
+ * The HTML selector to use for this directive. If not provided, a selector will be
45
+ * generated based on the directive's name (e.g., `appHighlight`).
36
46
  */
37
47
  selector?: string;
38
48
  /**
39
- * Do not import this directive into the owning NgModule.
49
+ * Do not automatically import the new directive into its closest NgModule.
40
50
  */
41
51
  skipImport?: boolean;
42
52
  /**
43
- * Do not create "spec.ts" test files for the new class.
53
+ * Skip the generation of a unit test file `spec.ts` for the new directive.
44
54
  */
45
55
  skipTests?: boolean;
46
56
  /**
47
- * Whether the generated directive is standalone.
57
+ * Generate a standalone directive. Standalone directives are self-contained and don't need
58
+ * to be declared in an NgModule. They can be used independently or imported directly into
59
+ * other standalone components or directives.
48
60
  */
49
61
  standalone?: boolean;
50
62
  }
@@ -3,12 +3,12 @@
3
3
  "$id": "SchematicsAngularDirective",
4
4
  "title": "Angular Directive Options Schema",
5
5
  "type": "object",
6
- "description": "Creates a new, generic directive definition in the given project.",
6
+ "description": "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.",
7
7
  "additionalProperties": false,
8
8
  "properties": {
9
9
  "name": {
10
10
  "type": "string",
11
- "description": "The name of the new directive.",
11
+ "description": "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`).",
12
12
  "$default": {
13
13
  "$source": "argv",
14
14
  "index": 0
@@ -21,19 +21,19 @@
21
21
  "$default": {
22
22
  "$source": "workingDirectory"
23
23
  },
24
- "description": "The path at which to create the interface that defines the directive, relative to the workspace root.",
24
+ "description": "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.",
25
25
  "visible": false
26
26
  },
27
27
  "project": {
28
28
  "type": "string",
29
- "description": "The name of the project.",
29
+ "description": "The name of the project where the directive should be added. If not specified, the CLI will determine the project from the current directory.",
30
30
  "$default": {
31
31
  "$source": "projectName"
32
32
  }
33
33
  },
34
34
  "prefix": {
35
35
  "type": "string",
36
- "description": "A prefix to apply to generated selectors.",
36
+ "description": "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`.",
37
37
  "alias": "p",
38
38
  "oneOf": [
39
39
  {
@@ -47,39 +47,39 @@
47
47
  },
48
48
  "skipTests": {
49
49
  "type": "boolean",
50
- "description": "Do not create \"spec.ts\" test files for the new class.",
50
+ "description": "Skip the generation of a unit test file `spec.ts` for the new directive.",
51
51
  "default": false
52
52
  },
53
53
  "skipImport": {
54
54
  "type": "boolean",
55
- "description": "Do not import this directive into the owning NgModule.",
55
+ "description": "Do not automatically import the new directive into its closest NgModule.",
56
56
  "default": false
57
57
  },
58
58
  "selector": {
59
59
  "type": "string",
60
60
  "format": "html-selector",
61
- "description": "The HTML selector to use for this directive."
61
+ "description": "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`)."
62
62
  },
63
63
  "standalone": {
64
- "description": "Whether the generated directive is standalone.",
64
+ "description": "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.",
65
65
  "type": "boolean",
66
66
  "default": true,
67
67
  "x-user-analytics": "ep.ng_standalone"
68
68
  },
69
69
  "flat": {
70
70
  "type": "boolean",
71
- "description": "When true (the default), creates the new files at the top level of the current project.",
71
+ "description": "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.",
72
72
  "default": true
73
73
  },
74
74
  "module": {
75
75
  "type": "string",
76
- "description": "The declaring NgModule.",
76
+ "description": "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.",
77
77
  "alias": "m"
78
78
  },
79
79
  "export": {
80
80
  "type": "boolean",
81
81
  "default": false,
82
- "description": "The declaring NgModule exports this directive."
82
+ "description": "Automatically export the directive from the specified NgModule, making it accessible to other modules in the application."
83
83
  }
84
84
  },
85
85
  "required": ["name", "project"]
package/enum/schema.d.ts CHANGED
@@ -1,22 +1,27 @@
1
1
  /**
2
- * Generates a new, generic enum definition in the given project.
2
+ * Creates a new enum in your project. Enums (enumerations) are a way to define a set of
3
+ * named constants, making your code more readable and maintainable. This schematic
4
+ * generates a new enum with the specified name and type.
3
5
  */
4
6
  export interface Schema {
5
7
  /**
6
- * The name of the enum.
8
+ * The name for the new enum. This will be used to create the enum file (e.g.,
9
+ * `my-enum.enum.ts`).
7
10
  */
8
11
  name: string;
9
12
  /**
10
- * The path at which to create the enum definition, relative to the current workspace.
13
+ * The path where the enum file should be created, relative to the current workspace. If not
14
+ * specified, the enum will be created in the current directory.
11
15
  */
12
16
  path?: string;
13
17
  /**
14
- * The name of the project in which to create the enum. Default is the configured default
15
- * project for the workspace.
18
+ * The name of the project where the enum should be created. If not specified, the CLI will
19
+ * determine the project from the current directory.
16
20
  */
17
21
  project: string;
18
22
  /**
19
- * Adds a developer-defined type to the filename, in the format "name.type.ts".
23
+ * Adds a custom type to the filename, allowing you to create more descriptive enum names.
24
+ * For example, if you set the type to `status`, the filename will be `my-enum.status.ts`.
20
25
  */
21
26
  type?: string;
22
27
  }
package/enum/schema.json CHANGED
@@ -3,12 +3,12 @@
3
3
  "$id": "SchematicsAngularEnum",
4
4
  "title": "Angular Enum Options Schema",
5
5
  "type": "object",
6
- "description": "Generates a new, generic enum definition in the given project.",
6
+ "description": "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.",
7
7
  "additionalProperties": false,
8
8
  "properties": {
9
9
  "name": {
10
10
  "type": "string",
11
- "description": "The name of the enum.",
11
+ "description": "The name for the new enum. This will be used to create the enum file (e.g., `my-enum.enum.ts`).",
12
12
  "$default": {
13
13
  "$source": "argv",
14
14
  "index": 0
@@ -21,19 +21,19 @@
21
21
  "$default": {
22
22
  "$source": "workingDirectory"
23
23
  },
24
- "description": "The path at which to create the enum definition, relative to the current workspace.",
24
+ "description": "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.",
25
25
  "visible": false
26
26
  },
27
27
  "project": {
28
28
  "type": "string",
29
- "description": "The name of the project in which to create the enum. Default is the configured default project for the workspace.",
29
+ "description": "The name of the project where the enum should be created. If not specified, the CLI will determine the project from the current directory.",
30
30
  "$default": {
31
31
  "$source": "projectName"
32
32
  }
33
33
  },
34
34
  "type": {
35
35
  "type": "string",
36
- "description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\"."
36
+ "description": "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`."
37
37
  }
38
38
  },
39
39
  "required": ["name", "project"]
@@ -1,9 +1,12 @@
1
1
  /**
2
- * Generates and configures environment files for a project.
2
+ * Generates and configures environment files for your project. Environment files allow you
3
+ * to define different settings and configurations for various environments, such as
4
+ * development, testing, and production. This schematic helps you create and manage these
5
+ * files, making it easier to customize your application's behavior for each environment.
3
6
  */
4
7
  export interface Schema {
5
8
  /**
6
- * The name of the project.
9
+ * The name of the project where the environment files should be created or updated.
7
10
  */
8
11
  project: string;
9
12
  }
@@ -4,11 +4,11 @@
4
4
  "title": "Angular Environments Options Schema",
5
5
  "type": "object",
6
6
  "additionalProperties": false,
7
- "description": "Generates and configures environment files for a project.",
7
+ "description": "Generates and configures environment files for your project. Environment files allow you to define different settings and configurations for various environments, such as development, testing, and production. This schematic helps you create and manage these files, making it easier to customize your application's behavior for each environment.",
8
8
  "properties": {
9
9
  "project": {
10
10
  "type": "string",
11
- "description": "The name of the project.",
11
+ "description": "The name of the project where the environment files should be created or updated.",
12
12
  "$default": {
13
13
  "$source": "projectName"
14
14
  }
package/guard/schema.d.ts CHANGED
@@ -1,34 +1,43 @@
1
1
  /**
2
- * Generates a new, generic route guard definition in the given project.
2
+ * Creates a new route guard in your project. Route guards are used to control access to
3
+ * parts of your application by checking certain conditions before a route is activated.
4
+ * This schematic generates a new guard with the specified name, type, and options.
3
5
  */
4
6
  export interface Schema {
5
7
  /**
6
- * When true (the default), creates the new files at the top level of the current project.
8
+ * Creates the new guard files at the top level of the current project. If set to false, a
9
+ * new folder with the guard's name will be created to contain the files.
7
10
  */
8
11
  flat?: boolean;
9
12
  /**
10
- * Specifies whether to generate a guard as a function.
13
+ * Generate the guard as a function instead of a class. Functional guards can be simpler for
14
+ * basic scenarios.
11
15
  */
12
16
  functional?: boolean;
13
17
  /**
14
- * Specifies which type of guard to create.
18
+ * Specifies the type(s) of guard to create. You can choose one or more of the following:
19
+ * `CanActivate` (controls access to a route), `CanActivateChild` (controls access to child
20
+ * routes), `CanDeactivate` (asks for confirmation before leaving a route), `CanMatch`
21
+ * (determines if a route can be matched).
15
22
  */
16
23
  implements?: Implement[];
17
24
  /**
18
- * The name of the new route guard.
25
+ * The name for the new route guard. This will be used to create the guard's class and spec
26
+ * files (e.g., `my-guard.guard.ts` and `my-guard.guard.spec.ts`).
19
27
  */
20
28
  name: string;
21
29
  /**
22
- * The path at which to create the interface that defines the guard, relative to the current
23
- * workspace.
30
+ * The path where the guard files should be created, relative to the current workspace. If
31
+ * not provided, the guard will be created in the current directory.
24
32
  */
25
33
  path?: string;
26
34
  /**
27
- * The name of the project.
35
+ * The name of the project where the guard should be created. If not specified, the CLI will
36
+ * determine the project from the current directory.
28
37
  */
29
38
  project: string;
30
39
  /**
31
- * Do not create "spec.ts" test files for the new guard.
40
+ * Skip the generation of a unit test file `spec.ts` for the new guard.
32
41
  */
33
42
  skipTests?: boolean;
34
43
  }
package/guard/schema.json CHANGED
@@ -3,12 +3,12 @@
3
3
  "$id": "SchematicsAngularGuard",
4
4
  "title": "Angular Guard Options Schema",
5
5
  "type": "object",
6
- "description": "Generates a new, generic route guard definition in the given project.",
6
+ "description": "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.",
7
7
  "additionalProperties": false,
8
8
  "properties": {
9
9
  "name": {
10
10
  "type": "string",
11
- "description": "The name of the new route guard.",
11
+ "description": "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`).",
12
12
  "$default": {
13
13
  "$source": "argv",
14
14
  "index": 0
@@ -17,12 +17,12 @@
17
17
  },
18
18
  "skipTests": {
19
19
  "type": "boolean",
20
- "description": "Do not create \"spec.ts\" test files for the new guard.",
20
+ "description": "Skip the generation of a unit test file `spec.ts` for the new guard.",
21
21
  "default": false
22
22
  },
23
23
  "flat": {
24
24
  "type": "boolean",
25
- "description": "When true (the default), creates the new files at the top level of the current project.",
25
+ "description": "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.",
26
26
  "default": true
27
27
  },
28
28
  "path": {
@@ -31,25 +31,25 @@
31
31
  "$default": {
32
32
  "$source": "workingDirectory"
33
33
  },
34
- "description": "The path at which to create the interface that defines the guard, relative to the current workspace.",
34
+ "description": "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.",
35
35
  "visible": false
36
36
  },
37
37
  "project": {
38
38
  "type": "string",
39
- "description": "The name of the project.",
39
+ "description": "The name of the project where the guard should be created. If not specified, the CLI will determine the project from the current directory.",
40
40
  "$default": {
41
41
  "$source": "projectName"
42
42
  }
43
43
  },
44
44
  "functional": {
45
45
  "type": "boolean",
46
- "description": "Specifies whether to generate a guard as a function.",
46
+ "description": "Generate the guard as a function instead of a class. Functional guards can be simpler for basic scenarios.",
47
47
  "default": true
48
48
  },
49
49
  "implements": {
50
50
  "alias": "guardType",
51
51
  "type": "array",
52
- "description": "Specifies which type of guard to create.",
52
+ "description": "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).",
53
53
  "uniqueItems": true,
54
54
  "minItems": 1,
55
55
  "items": {