@abp/ng.schematics 10.5.0-rc.4 → 10.6.0-rc.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 (259) hide show
  1. package/commands/ai-config/index.d.ts +3 -3
  2. package/commands/ai-config/index.js +88 -88
  3. package/commands/ai-config/index.js.map +1 -1
  4. package/commands/ai-config/model.d.ts +10 -10
  5. package/commands/ai-config/model.js +2 -2
  6. package/commands/api/files-service/proxy/__namespace@dir__/__name@kebab__.service.ts.template +6 -4
  7. package/commands/api/index.d.ts +2 -2
  8. package/commands/api/index.js +139 -138
  9. package/commands/api/index.js.map +1 -1
  10. package/commands/change-theme/index.d.ts +28 -28
  11. package/commands/change-theme/index.js +474 -473
  12. package/commands/change-theme/index.js.map +1 -1
  13. package/commands/change-theme/model.d.ts +5 -5
  14. package/commands/change-theme/model.js +2 -2
  15. package/commands/change-theme/style-map.d.ts +16 -16
  16. package/commands/change-theme/style-map.js +424 -424
  17. package/commands/change-theme/theme-options.enum.d.ts +6 -6
  18. package/commands/change-theme/theme-options.enum.js +11 -11
  19. package/commands/change-theme/theme-options.enum.js.map +1 -1
  20. package/commands/create-lib/index.d.ts +13 -13
  21. package/commands/create-lib/index.js +298 -298
  22. package/commands/create-lib/index.js.map +1 -1
  23. package/commands/create-lib/models/generate-lib-schema.d.ts +20 -20
  24. package/commands/create-lib/models/generate-lib-schema.js +8 -8
  25. package/commands/create-lib/models/generate-lib-schema.js.map +1 -1
  26. package/commands/create-lib/models/index.d.ts +1 -1
  27. package/commands/create-lib/models/index.js +4 -17
  28. package/commands/create-lib/models/index.js.map +1 -1
  29. package/commands/proxy-add/index.d.ts +2 -2
  30. package/commands/proxy-add/index.js +41 -41
  31. package/commands/proxy-add/index.js.map +1 -1
  32. package/commands/proxy-index/index.d.ts +5 -5
  33. package/commands/proxy-index/index.js +14 -14
  34. package/commands/proxy-index/index.js.map +1 -1
  35. package/commands/proxy-refresh/index.d.ts +3 -3
  36. package/commands/proxy-refresh/index.js +27 -27
  37. package/commands/proxy-refresh/index.js.map +1 -1
  38. package/commands/proxy-remove/index.d.ts +3 -3
  39. package/commands/proxy-remove/index.js +33 -33
  40. package/commands/proxy-remove/index.js.map +1 -1
  41. package/commands/ssr-add/index.d.ts +11 -11
  42. package/commands/ssr-add/index.js +360 -361
  43. package/commands/ssr-add/index.js.map +1 -1
  44. package/commands/ssr-add/server/index.d.ts +10 -10
  45. package/commands/ssr-add/server/index.js +209 -205
  46. package/commands/ssr-add/server/index.js.map +1 -1
  47. package/commands/ssr-add/server/index.ts +6 -2
  48. package/constants/api.d.ts +1 -1
  49. package/constants/api.js +4 -4
  50. package/constants/index.d.ts +4 -4
  51. package/constants/index.js +7 -20
  52. package/constants/index.js.map +1 -1
  53. package/constants/proxy.d.ts +4 -4
  54. package/constants/proxy.js +7 -7
  55. package/constants/symbols.d.ts +1 -1
  56. package/constants/symbols.js +4 -4
  57. package/constants/system-types.d.ts +1 -1
  58. package/constants/system-types.js +29 -29
  59. package/constants/volo.d.ts +5 -5
  60. package/constants/volo.js +34 -34
  61. package/enums/binding-source-id.d.ts +8 -7
  62. package/enums/binding-source-id.js +12 -11
  63. package/enums/binding-source-id.js.map +1 -1
  64. package/enums/exception.d.ts +17 -17
  65. package/enums/exception.js +2 -2
  66. package/enums/import-keyword.d.ts +4 -4
  67. package/enums/import-keyword.js +8 -8
  68. package/enums/import-keyword.js.map +1 -1
  69. package/enums/index.d.ts +5 -5
  70. package/enums/index.js +8 -21
  71. package/enums/index.js.map +1 -1
  72. package/enums/method-modifier.d.ts +6 -6
  73. package/enums/method-modifier.js +10 -10
  74. package/enums/method-modifier.js.map +1 -1
  75. package/enums/service-types.d.ts +6 -6
  76. package/enums/service-types.js +10 -10
  77. package/enums/service-types.js.map +1 -1
  78. package/index.d.ts +3 -3
  79. package/index.js +6 -19
  80. package/index.js.map +1 -1
  81. package/models/api-definition.d.ts +97 -93
  82. package/models/api-definition.js +2 -2
  83. package/models/generate-proxy-schema.d.ts +28 -28
  84. package/models/generate-proxy-schema.js +2 -2
  85. package/models/import.d.ts +11 -11
  86. package/models/import.js +13 -13
  87. package/models/index.d.ts +11 -11
  88. package/models/index.js +14 -27
  89. package/models/index.js.map +1 -1
  90. package/models/method.d.ts +36 -34
  91. package/models/method.js +73 -70
  92. package/models/method.js.map +1 -1
  93. package/models/model.d.ts +48 -48
  94. package/models/model.js +76 -76
  95. package/models/model.js.map +1 -1
  96. package/models/project.d.ts +5 -5
  97. package/models/project.js +2 -2
  98. package/models/proxy-config.d.ts +4 -4
  99. package/models/proxy-config.js +2 -2
  100. package/models/rule.d.ts +2 -2
  101. package/models/rule.js +2 -2
  102. package/models/service.d.ts +21 -21
  103. package/models/service.js +11 -11
  104. package/models/tree.d.ts +1 -1
  105. package/models/tree.js +2 -2
  106. package/models/util.d.ts +7 -7
  107. package/models/util.js +2 -2
  108. package/package.json +6 -6
  109. package/utils/angular/add-declaration-to-ng-module.d.ts +20 -20
  110. package/utils/angular/add-declaration-to-ng-module.js +45 -45
  111. package/utils/angular/add-declaration-to-ng-module.js.map +1 -1
  112. package/utils/angular/ast-utils.d.ts +106 -106
  113. package/utils/angular/ast-utils.js +518 -518
  114. package/utils/angular/ast-utils.js.map +1 -1
  115. package/utils/angular/change.d.ts +68 -68
  116. package/utils/angular/change.js +121 -121
  117. package/utils/angular/change.js.map +1 -1
  118. package/utils/angular/dependencies.d.ts +23 -23
  119. package/utils/angular/dependencies.js +56 -56
  120. package/utils/angular/dependencies.js.map +1 -1
  121. package/utils/angular/dependency.d.ts +96 -96
  122. package/utils/angular/dependency.js +123 -122
  123. package/utils/angular/dependency.js.map +1 -1
  124. package/utils/angular/eol.d.ts +8 -8
  125. package/utils/angular/eol.js +22 -23
  126. package/utils/angular/eol.js.map +1 -1
  127. package/utils/angular/find-module.d.ts +33 -33
  128. package/utils/angular/find-module.js +105 -105
  129. package/utils/angular/find-module.js.map +1 -1
  130. package/utils/angular/generate-from-files.d.ts +19 -19
  131. package/utils/angular/generate-from-files.js +48 -49
  132. package/utils/angular/generate-from-files.js.map +1 -1
  133. package/utils/angular/index.d.ts +15 -15
  134. package/utils/angular/index.js +18 -31
  135. package/utils/angular/index.js.map +1 -1
  136. package/utils/angular/json-file.d.ts +24 -24
  137. package/utils/angular/json-file.js +71 -71
  138. package/utils/angular/json-file.js.map +1 -1
  139. package/utils/angular/latest-versions/index.d.ts +28 -28
  140. package/utils/angular/latest-versions/index.js +31 -31
  141. package/utils/angular/ng-ast-utils.d.ts +12 -12
  142. package/utils/angular/ng-ast-utils.js +79 -79
  143. package/utils/angular/ng-ast-utils.js.map +1 -1
  144. package/utils/angular/parse-name.d.ts +13 -13
  145. package/utils/angular/parse-name.js +19 -20
  146. package/utils/angular/parse-name.js.map +1 -1
  147. package/utils/angular/paths.d.ts +8 -8
  148. package/utils/angular/paths.js +17 -18
  149. package/utils/angular/paths.js.map +1 -1
  150. package/utils/angular/project-targets.d.ts +11 -11
  151. package/utils/angular/project-targets.js +21 -22
  152. package/utils/angular/project-targets.js.map +1 -1
  153. package/utils/angular/standalone/app_component.d.ts +29 -29
  154. package/utils/angular/standalone/app_component.js +107 -107
  155. package/utils/angular/standalone/app_component.js.map +1 -1
  156. package/utils/angular/standalone/app_config.d.ts +23 -23
  157. package/utils/angular/standalone/app_config.js +89 -89
  158. package/utils/angular/standalone/app_config.js.map +1 -1
  159. package/utils/angular/standalone/code_block.d.ts +53 -53
  160. package/utils/angular/standalone/code_block.js +80 -79
  161. package/utils/angular/standalone/code_block.js.map +1 -1
  162. package/utils/angular/standalone/index.d.ts +9 -9
  163. package/utils/angular/standalone/index.js +13 -13
  164. package/utils/angular/standalone/rules.d.ts +45 -45
  165. package/utils/angular/standalone/rules.js +187 -188
  166. package/utils/angular/standalone/rules.js.map +1 -1
  167. package/utils/angular/standalone/util.d.ts +35 -35
  168. package/utils/angular/standalone/util.js +135 -135
  169. package/utils/angular/standalone/util.js.map +1 -1
  170. package/utils/angular/test/create-app-module.d.ts +9 -9
  171. package/utils/angular/test/create-app-module.js +14 -15
  172. package/utils/angular/test/create-app-module.js.map +1 -1
  173. package/utils/angular/test/get-file-content.d.ts +9 -9
  174. package/utils/angular/test/get-file-content.js +17 -18
  175. package/utils/angular/test/get-file-content.js.map +1 -1
  176. package/utils/angular/test/index.d.ts +9 -9
  177. package/utils/angular/test/index.js +12 -25
  178. package/utils/angular/test/index.js.map +1 -1
  179. package/utils/angular/validation.d.ts +10 -10
  180. package/utils/angular/validation.js +28 -28
  181. package/utils/angular/validation.js.map +1 -1
  182. package/utils/angular/workspace-models.d.ts +167 -167
  183. package/utils/angular/workspace-models.js +43 -43
  184. package/utils/angular/workspace-models.js.map +1 -1
  185. package/utils/angular/workspace.d.ts +65 -65
  186. package/utils/angular/workspace.js +135 -135
  187. package/utils/angular/workspace.js.map +1 -1
  188. package/utils/angular-schematic/generate-lib.d.ts +3 -3
  189. package/utils/angular-schematic/generate-lib.js +52 -53
  190. package/utils/angular-schematic/generate-lib.js.map +1 -1
  191. package/utils/angular-schematic/index.d.ts +1 -1
  192. package/utils/angular-schematic/index.js +4 -17
  193. package/utils/angular-schematic/index.js.map +1 -1
  194. package/utils/api.d.ts +2 -2
  195. package/utils/api.js +7 -8
  196. package/utils/api.js.map +1 -1
  197. package/utils/ast.d.ts +5 -5
  198. package/utils/ast.js +28 -28
  199. package/utils/ast.js.map +1 -1
  200. package/utils/barrel.d.ts +4 -4
  201. package/utils/barrel.js +86 -87
  202. package/utils/barrel.js.map +1 -1
  203. package/utils/common.d.ts +11 -11
  204. package/utils/common.js +78 -78
  205. package/utils/common.js.map +1 -1
  206. package/utils/enum.d.ts +18 -18
  207. package/utils/enum.js +39 -40
  208. package/utils/enum.js.map +1 -1
  209. package/utils/file.d.ts +2 -2
  210. package/utils/file.js +8 -9
  211. package/utils/file.js.map +1 -1
  212. package/utils/generics.d.ts +26 -26
  213. package/utils/generics.js +89 -89
  214. package/utils/generics.js.map +1 -1
  215. package/utils/import.d.ts +3 -3
  216. package/utils/import.js +10 -11
  217. package/utils/import.js.map +1 -1
  218. package/utils/index.d.ts +22 -22
  219. package/utils/index.js +25 -38
  220. package/utils/index.js.map +1 -1
  221. package/utils/methods.d.ts +4 -4
  222. package/utils/methods.js +31 -29
  223. package/utils/methods.js.map +1 -1
  224. package/utils/model.d.ts +14 -14
  225. package/utils/model.js +217 -211
  226. package/utils/model.js.map +1 -1
  227. package/utils/namespace.d.ts +1 -1
  228. package/utils/namespace.js +17 -18
  229. package/utils/namespace.js.map +1 -1
  230. package/utils/ng-module.d.ts +46 -46
  231. package/utils/ng-module.js +126 -125
  232. package/utils/ng-module.js.map +1 -1
  233. package/utils/path.d.ts +2 -2
  234. package/utils/path.js +35 -36
  235. package/utils/path.js.map +1 -1
  236. package/utils/rule.d.ts +4 -4
  237. package/utils/rule.js +32 -33
  238. package/utils/rule.js.map +1 -1
  239. package/utils/service.d.ts +8 -8
  240. package/utils/service.js +280 -171
  241. package/utils/service.js.map +1 -1
  242. package/utils/source.d.ts +13 -13
  243. package/utils/source.js +165 -165
  244. package/utils/source.js.map +1 -1
  245. package/utils/standalone.d.ts +59 -59
  246. package/utils/standalone.js +146 -145
  247. package/utils/standalone.js.map +1 -1
  248. package/utils/text.d.ts +10 -10
  249. package/utils/text.js +59 -59
  250. package/utils/text.js.map +1 -1
  251. package/utils/tree.d.ts +14 -14
  252. package/utils/tree.js +83 -83
  253. package/utils/tree.js.map +1 -1
  254. package/utils/type.d.ts +13 -13
  255. package/utils/type.js +112 -113
  256. package/utils/type.js.map +1 -1
  257. package/utils/workspace.d.ts +20 -20
  258. package/utils/workspace.js +113 -114
  259. package/utils/workspace.js.map +1 -1
@@ -1,90 +1,90 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.findAppConfig = void 0;
11
- const node_path_1 = require("node:path");
12
- const ts = require("typescript");
13
- const util_1 = require("./util");
14
- /**
15
- * Resolves the node that defines the app config from a bootstrap call.
16
- * @param bootstrapCall Call for which to resolve the config.
17
- * @param tree File tree of the project.
18
- * @param filePath File path of the bootstrap call.
19
- */
20
- function findAppConfig(bootstrapCall, tree, filePath) {
21
- if (bootstrapCall.arguments.length > 1) {
22
- const config = bootstrapCall.arguments[1];
23
- if (ts.isObjectLiteralExpression(config)) {
24
- return { filePath, node: config };
25
- }
26
- if (ts.isIdentifier(config)) {
27
- return resolveAppConfigFromIdentifier(config, tree, filePath);
28
- }
29
- }
30
- return null;
31
- }
32
- exports.findAppConfig = findAppConfig;
33
- /**
34
- * Resolves the app config from an identifier referring to it.
35
- * @param identifier Identifier referring to the app config.
36
- * @param tree File tree of the project.
37
- * @param bootstapFilePath Path of the bootstrap call.
38
- */
39
- function resolveAppConfigFromIdentifier(identifier, tree, bootstapFilePath) {
40
- const sourceFile = identifier.getSourceFile();
41
- for (const node of sourceFile.statements) {
42
- // Only look at relative imports. This will break if the app uses a path
43
- // mapping to refer to the import, but in order to resolve those, we would
44
- // need knowledge about the entire program.
45
- if (!ts.isImportDeclaration(node) ||
46
- !node.importClause?.namedBindings ||
47
- !ts.isNamedImports(node.importClause.namedBindings) ||
48
- !ts.isStringLiteralLike(node.moduleSpecifier) ||
49
- !node.moduleSpecifier.text.startsWith('.')) {
50
- continue;
51
- }
52
- for (const specifier of node.importClause.namedBindings.elements) {
53
- if (specifier.name.text !== identifier.text) {
54
- continue;
55
- }
56
- // Look for a variable with the imported name in the file. Note that ideally we would use
57
- // the type checker to resolve this, but we can't because these utilities are set up to
58
- // operate on individual files, not the entire program.
59
- const filePath = (0, node_path_1.join)((0, node_path_1.dirname)(bootstapFilePath), node.moduleSpecifier.text + '.ts');
60
- const importedSourceFile = (0, util_1.getSourceFile)(tree, filePath);
61
- const resolvedVariable = findAppConfigFromVariableName(importedSourceFile, (specifier.propertyName || specifier.name).text);
62
- if (resolvedVariable) {
63
- return { filePath, node: resolvedVariable };
64
- }
65
- }
66
- }
67
- const variableInSameFile = findAppConfigFromVariableName(sourceFile, identifier.text);
68
- return variableInSameFile ? { filePath: bootstapFilePath, node: variableInSameFile } : null;
69
- }
70
- /**
71
- * Finds an app config within the top-level variables of a file.
72
- * @param sourceFile File in which to search for the config.
73
- * @param variableName Name of the variable containing the config.
74
- */
75
- function findAppConfigFromVariableName(sourceFile, variableName) {
76
- for (const node of sourceFile.statements) {
77
- if (ts.isVariableStatement(node)) {
78
- for (const decl of node.declarationList.declarations) {
79
- if (ts.isIdentifier(decl.name) &&
80
- decl.name.text === variableName &&
81
- decl.initializer &&
82
- ts.isObjectLiteralExpression(decl.initializer)) {
83
- return decl.initializer;
84
- }
85
- }
86
- }
87
- }
88
- return null;
89
- }
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.dev/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.findAppConfig = findAppConfig;
11
+ const tslib_1 = require("tslib");
12
+ const node_path_1 = require("node:path");
13
+ const ts = tslib_1.__importStar(require("typescript"));
14
+ const util_1 = require("./util");
15
+ /**
16
+ * Resolves the node that defines the app config from a bootstrap call.
17
+ * @param bootstrapCall Call for which to resolve the config.
18
+ * @param tree File tree of the project.
19
+ * @param filePath File path of the bootstrap call.
20
+ */
21
+ function findAppConfig(bootstrapCall, tree, filePath) {
22
+ if (bootstrapCall.arguments.length > 1) {
23
+ const config = bootstrapCall.arguments[1];
24
+ if (ts.isObjectLiteralExpression(config)) {
25
+ return { filePath, node: config };
26
+ }
27
+ if (ts.isIdentifier(config)) {
28
+ return resolveAppConfigFromIdentifier(config, tree, filePath);
29
+ }
30
+ }
31
+ return null;
32
+ }
33
+ /**
34
+ * Resolves the app config from an identifier referring to it.
35
+ * @param identifier Identifier referring to the app config.
36
+ * @param tree File tree of the project.
37
+ * @param bootstapFilePath Path of the bootstrap call.
38
+ */
39
+ function resolveAppConfigFromIdentifier(identifier, tree, bootstapFilePath) {
40
+ const sourceFile = identifier.getSourceFile();
41
+ for (const node of sourceFile.statements) {
42
+ // Only look at relative imports. This will break if the app uses a path
43
+ // mapping to refer to the import, but in order to resolve those, we would
44
+ // need knowledge about the entire program.
45
+ if (!ts.isImportDeclaration(node) ||
46
+ !node.importClause?.namedBindings ||
47
+ !ts.isNamedImports(node.importClause.namedBindings) ||
48
+ !ts.isStringLiteralLike(node.moduleSpecifier) ||
49
+ !node.moduleSpecifier.text.startsWith('.')) {
50
+ continue;
51
+ }
52
+ for (const specifier of node.importClause.namedBindings.elements) {
53
+ if (specifier.name.text !== identifier.text) {
54
+ continue;
55
+ }
56
+ // Look for a variable with the imported name in the file. Note that ideally we would use
57
+ // the type checker to resolve this, but we can't because these utilities are set up to
58
+ // operate on individual files, not the entire program.
59
+ const filePath = (0, node_path_1.join)((0, node_path_1.dirname)(bootstapFilePath), node.moduleSpecifier.text + '.ts');
60
+ const importedSourceFile = (0, util_1.getSourceFile)(tree, filePath);
61
+ const resolvedVariable = findAppConfigFromVariableName(importedSourceFile, (specifier.propertyName || specifier.name).text);
62
+ if (resolvedVariable) {
63
+ return { filePath, node: resolvedVariable };
64
+ }
65
+ }
66
+ }
67
+ const variableInSameFile = findAppConfigFromVariableName(sourceFile, identifier.text);
68
+ return variableInSameFile ? { filePath: bootstapFilePath, node: variableInSameFile } : null;
69
+ }
70
+ /**
71
+ * Finds an app config within the top-level variables of a file.
72
+ * @param sourceFile File in which to search for the config.
73
+ * @param variableName Name of the variable containing the config.
74
+ */
75
+ function findAppConfigFromVariableName(sourceFile, variableName) {
76
+ for (const node of sourceFile.statements) {
77
+ if (ts.isVariableStatement(node)) {
78
+ for (const decl of node.declarationList.declarations) {
79
+ if (ts.isIdentifier(decl.name) &&
80
+ decl.name.text === variableName &&
81
+ decl.initializer &&
82
+ ts.isObjectLiteralExpression(decl.initializer)) {
83
+ return decl.initializer;
84
+ }
85
+ }
86
+ }
87
+ }
88
+ return null;
89
+ }
90
90
  //# sourceMappingURL=app_config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app_config.js","sourceRoot":"","sources":["../../../../../../packages/schematics/src/utils/angular/standalone/app_config.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,yCAA0C;AAC1C,iCAAiC;AACjC,iCAAuC;AAWvC;;;;;GAKG;AACH,SAAgB,aAAa,CAC3B,aAAgC,EAChC,IAAU,EACV,QAAgB;IAEhB,IAAI,aAAa,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;QACtC,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAE1C,IAAI,EAAE,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE;YACxC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;SACnC;QAED,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;YAC3B,OAAO,8BAA8B,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;SAC/D;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAlBD,sCAkBC;AAED;;;;;GAKG;AACH,SAAS,8BAA8B,CACrC,UAAyB,EACzB,IAAU,EACV,gBAAwB;IAExB,MAAM,UAAU,GAAG,UAAU,CAAC,aAAa,EAAE,CAAC;IAE9C,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,UAAU,EAAE;QACxC,wEAAwE;QACxE,0EAA0E;QAC1E,2CAA2C;QAC3C,IACE,CAAC,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC;YAC7B,CAAC,IAAI,CAAC,YAAY,EAAE,aAAa;YACjC,CAAC,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC;YACnD,CAAC,EAAE,CAAC,mBAAmB,CAAC,IAAI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AC,YAAY,EAAE;gBACpD,IACE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;oBAC1B,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,YAAY;oBAC/B,IAAI,CAAC,WAAW;oBAChB,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,WAAW,CAAC,EAC9C;oBACA,OAAO,IAAI,CAAC,WAAW,CAAC;iBACzB;aACF;SACF;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
1
+ {"version":3,"file":"app_config.js","sourceRoot":"","sources":["../../../../../../packages/schematics/src/utils/angular/standalone/app_config.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAsBH,sCAkBC;;AArCD,yCAA0C;AAC1C,uDAAiC;AACjC,iCAAuC;AAWvC;;;;;GAKG;AACH,SAAgB,aAAa,CAC3B,aAAgC,EAChC,IAAU,EACV,QAAgB;IAEhB,IAAI,aAAa,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAE1C,IAAI,EAAE,CAAC,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;YACzC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QACpC,CAAC;QAED,IAAI,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5B,OAAO,8BAA8B,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,SAAS,8BAA8B,CACrC,UAAyB,EACzB,IAAU,EACV,gBAAwB;IAExB,MAAM,UAAU,GAAG,UAAU,CAAC,aAAa,EAAE,CAAC;IAE9C,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;QACzC,wEAAwE;QACxE,0EAA0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,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9F,CAAC;AAED;;;;GAIG;AACH,SAAS,6BAA6B,CACpC,UAAyB,EACzB,YAAoB;IAEpB,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;QACzC,IAAI,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,CAAC;YACjC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,eAAe,CAAC,YAAY,EAAE,CAAC;gBACrD,IACE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;oBAC1B,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,YAAY;oBAC/B,IAAI,CAAC,WAAW;oBAChB,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC,WAAW,CAAC,EAC9C,CAAC;oBACD,OAAO,IAAI,CAAC,WAAW,CAAC;gBAC1B,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,53 +1,53 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import { Rule } from '@angular-devkit/schematics';
9
- /** Generated code that hasn't been interpolated yet. */
10
- export interface PendingCode {
11
- /** Code that will be inserted. */
12
- expression: string;
13
- /** Imports that need to be added to the file in which the code is inserted. */
14
- imports: PendingImports;
15
- }
16
- /** Map keeping track of imports and aliases under which they're referred to in an expression. */
17
- declare type PendingImports = Map<string, Map<string, string>>;
18
- /**
19
- * Callback invoked by a Rule that produces the code
20
- * that needs to be inserted somewhere in the app.
21
- */
22
- export declare type CodeBlockCallback = (block: CodeBlock) => PendingCode;
23
- /**
24
- * Utility class used to generate blocks of code that
25
- * can be inserted by the devkit into a user's app.
26
- */
27
- export declare class CodeBlock {
28
- private _imports;
29
- /** Function used to tag a code block in order to produce a `PendingCode` object. */
30
- code: (strings: TemplateStringsArray, ...params: unknown[]) => PendingCode;
31
- /**
32
- * Used inside of a code block to mark external symbols and which module they should be imported
33
- * from. When the code is inserted, the required import statements will be produced automatically.
34
- * @param symbolName Name of the external symbol.
35
- * @param moduleName Module from which the symbol should be imported.
36
- */
37
- external: (symbolName: string, moduleName: string) => string;
38
- /**
39
- * Produces the necessary rules to transform a `PendingCode` object into valid code.
40
- * @param initialCode Code pending transformed.
41
- * @param filePath Path of the file in which the code will be inserted.
42
- */
43
- static transformPendingCode(initialCode: PendingCode, filePath: string): {
44
- code: {
45
- /** Code that will be inserted. */
46
- expression: string;
47
- /** Imports that need to be added to the file in which the code is inserted. */
48
- imports: PendingImports;
49
- };
50
- rules: Rule[];
51
- };
52
- }
53
- export {};
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ import { Rule } from '@angular-devkit/schematics';
9
+ /** Generated code that hasn't been interpolated yet. */
10
+ export interface PendingCode {
11
+ /** Code that will be inserted. */
12
+ expression: string;
13
+ /** Imports that need to be added to the file in which the code is inserted. */
14
+ imports: PendingImports;
15
+ }
16
+ /** Map keeping track of imports and aliases under which they're referred to in an expression. */
17
+ type PendingImports = Map<string, Map<string, string>>;
18
+ /**
19
+ * Callback invoked by a Rule that produces the code
20
+ * that needs to be inserted somewhere in the app.
21
+ */
22
+ export type CodeBlockCallback = (block: CodeBlock) => PendingCode;
23
+ /**
24
+ * Utility class used to generate blocks of code that
25
+ * can be inserted by the devkit into a user's app.
26
+ */
27
+ export declare class CodeBlock {
28
+ private _imports;
29
+ /** Function used to tag a code block in order to produce a `PendingCode` object. */
30
+ code: (strings: TemplateStringsArray, ...params: unknown[]) => PendingCode;
31
+ /**
32
+ * Used inside of a code block to mark external symbols and which module they should be imported
33
+ * from. When the code is inserted, the required import statements will be produced automatically.
34
+ * @param symbolName Name of the external symbol.
35
+ * @param moduleName Module from which the symbol should be imported.
36
+ */
37
+ external: (symbolName: string, moduleName: string) => string;
38
+ /**
39
+ * Produces the necessary rules to transform a `PendingCode` object into valid code.
40
+ * @param initialCode Code pending transformed.
41
+ * @param filePath Path of the file in which the code will be inserted.
42
+ */
43
+ static transformPendingCode(initialCode: PendingCode, filePath: string): {
44
+ code: {
45
+ /** Code that will be inserted. */
46
+ expression: string;
47
+ /** Imports that need to be added to the file in which the code is inserted. */
48
+ imports: PendingImports;
49
+ };
50
+ rules: Rule[];
51
+ };
52
+ }
53
+ export {};
@@ -1,80 +1,81 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.CodeBlock = void 0;
11
- const ts = require("typescript");
12
- const ast_utils_1 = require("../ast-utils");
13
- const change_1 = require("../change");
14
- /** Counter used to generate unique IDs. */
15
- let uniqueIdCounter = 0;
16
- /**
17
- * Utility class used to generate blocks of code that
18
- * can be inserted by the devkit into a user's app.
19
- */
20
- class CodeBlock {
21
- constructor() {
22
- this._imports = new Map();
23
- // Note: the methods here are defined as arrow function so that they can be destructured by
24
- // consumers without losing their context. This makes the API more concise.
25
- /** Function used to tag a code block in order to produce a `PendingCode` object. */
26
- this.code = (strings, ...params) => {
27
- return {
28
- expression: strings.map((part, index) => part + (params[index] || '')).join(''),
29
- imports: this._imports,
30
- };
31
- };
32
- /**
33
- * Used inside of a code block to mark external symbols and which module they should be imported
34
- * from. When the code is inserted, the required import statements will be produced automatically.
35
- * @param symbolName Name of the external symbol.
36
- * @param moduleName Module from which the symbol should be imported.
37
- */
38
- this.external = (symbolName, moduleName) => {
39
- if (!this._imports.has(moduleName)) {
40
- this._imports.set(moduleName, new Map());
41
- }
42
- const symbolsPerModule = this._imports.get(moduleName);
43
- if (!symbolsPerModule.has(symbolName)) {
44
- symbolsPerModule.set(symbolName, `@@__SCHEMATIC_PLACEHOLDER_${uniqueIdCounter++}__@@`);
45
- }
46
- return symbolsPerModule.get(symbolName);
47
- };
48
- }
49
- /**
50
- * Produces the necessary rules to transform a `PendingCode` object into valid code.
51
- * @param initialCode Code pending transformed.
52
- * @param filePath Path of the file in which the code will be inserted.
53
- */
54
- static transformPendingCode(initialCode, filePath) {
55
- const code = { ...initialCode };
56
- const rules = [];
57
- code.imports.forEach((symbols, moduleName) => {
58
- symbols.forEach((placeholder, symbolName) => {
59
- rules.push((tree) => {
60
- const recorder = tree.beginUpdate(filePath);
61
- const sourceFile = ts.createSourceFile(filePath, tree.readText(filePath), ts.ScriptTarget.Latest, true);
62
- // Note that this could still technically clash if there's a top-level symbol called
63
- // `${symbolName}_alias`, however this is unlikely. We can revisit this if it becomes
64
- // a problem.
65
- const alias = (0, ast_utils_1.hasTopLevelIdentifier)(sourceFile, symbolName, moduleName)
66
- ? symbolName + '_alias'
67
- : undefined;
68
- code.expression = code.expression.replace(new RegExp(placeholder, 'g'), alias || symbolName);
69
- (0, change_1.applyToUpdateRecorder)(recorder, [
70
- (0, ast_utils_1.insertImport)(sourceFile, filePath, symbolName, moduleName, false, alias),
71
- ]);
72
- tree.commitUpdate(recorder);
73
- });
74
- });
75
- });
76
- return { code, rules };
77
- }
78
- }
79
- exports.CodeBlock = CodeBlock;
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.dev/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.CodeBlock = void 0;
11
+ const tslib_1 = require("tslib");
12
+ const ts = tslib_1.__importStar(require("typescript"));
13
+ const ast_utils_1 = require("../ast-utils");
14
+ const change_1 = require("../change");
15
+ /** Counter used to generate unique IDs. */
16
+ let uniqueIdCounter = 0;
17
+ /**
18
+ * Utility class used to generate blocks of code that
19
+ * can be inserted by the devkit into a user's app.
20
+ */
21
+ class CodeBlock {
22
+ constructor() {
23
+ this._imports = new Map();
24
+ // Note: the methods here are defined as arrow function so that they can be destructured by
25
+ // consumers without losing their context. This makes the API more concise.
26
+ /** Function used to tag a code block in order to produce a `PendingCode` object. */
27
+ this.code = (strings, ...params) => {
28
+ return {
29
+ expression: strings.map((part, index) => part + (params[index] || '')).join(''),
30
+ imports: this._imports,
31
+ };
32
+ };
33
+ /**
34
+ * Used inside of a code block to mark external symbols and which module they should be imported
35
+ * from. When the code is inserted, the required import statements will be produced automatically.
36
+ * @param symbolName Name of the external symbol.
37
+ * @param moduleName Module from which the symbol should be imported.
38
+ */
39
+ this.external = (symbolName, moduleName) => {
40
+ if (!this._imports.has(moduleName)) {
41
+ this._imports.set(moduleName, new Map());
42
+ }
43
+ const symbolsPerModule = this._imports.get(moduleName);
44
+ if (!symbolsPerModule.has(symbolName)) {
45
+ symbolsPerModule.set(symbolName, `@@__SCHEMATIC_PLACEHOLDER_${uniqueIdCounter++}__@@`);
46
+ }
47
+ return symbolsPerModule.get(symbolName);
48
+ };
49
+ }
50
+ /**
51
+ * Produces the necessary rules to transform a `PendingCode` object into valid code.
52
+ * @param initialCode Code pending transformed.
53
+ * @param filePath Path of the file in which the code will be inserted.
54
+ */
55
+ static transformPendingCode(initialCode, filePath) {
56
+ const code = { ...initialCode };
57
+ const rules = [];
58
+ code.imports.forEach((symbols, moduleName) => {
59
+ symbols.forEach((placeholder, symbolName) => {
60
+ rules.push((tree) => {
61
+ const recorder = tree.beginUpdate(filePath);
62
+ const sourceFile = ts.createSourceFile(filePath, tree.readText(filePath), ts.ScriptTarget.Latest, true);
63
+ // Note that this could still technically clash if there's a top-level symbol called
64
+ // `${symbolName}_alias`, however this is unlikely. We can revisit this if it becomes
65
+ // a problem.
66
+ const alias = (0, ast_utils_1.hasTopLevelIdentifier)(sourceFile, symbolName, moduleName)
67
+ ? symbolName + '_alias'
68
+ : undefined;
69
+ code.expression = code.expression.replace(new RegExp(placeholder, 'g'), alias || symbolName);
70
+ (0, change_1.applyToUpdateRecorder)(recorder, [
71
+ (0, ast_utils_1.insertImport)(sourceFile, filePath, symbolName, moduleName, false, alias),
72
+ ]);
73
+ tree.commitUpdate(recorder);
74
+ });
75
+ });
76
+ });
77
+ return { code, rules };
78
+ }
79
+ }
80
+ exports.CodeBlock = CodeBlock;
80
81
  //# sourceMappingURL=code_block.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"code_block.js","sourceRoot":"","sources":["../../../../../../packages/schematics/src/utils/angular/standalone/code_block.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,iCAAiC;AACjC,4CAAmE;AACnE,sCAAkD;AAclD,2CAA2C;AAC3C,IAAI,eAAe,GAAG,CAAC,CAAC;AAQxB;;;GAGG;AACH,MAAa,SAAS;IAAtB;QACU,aAAQ,GAAmB,IAAI,GAAG,EAA+B,CAAC;QAE1E,2FAA2F;QAC3F,2EAA2E;QAE3E,oFAAoF;QACpF,SAAI,GAAG,CAAC,OAA6B,EAAE,GAAG,MAAiB,EAAe,EAAE;YAC1E,OAAO;gBACL,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC/E,OAAO,EAAE,IAAI,CAAC,QAAQ;aACvB,CAAC;QACJ,CAAC,CAAC;QAEF;;;;;WAKG;QACH,aAAQ,GAAG,CAAC,UAAkB,EAAE,UAAkB,EAAU,EAAE;YAC5D,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE;gBAClC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;aAC1C;YAED,MAAM,gBAAgB,GAAG,IAAI,CAA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IAAA,8BAAqB,EAAC,QAAQ,EAAE;wBAC9B,IAAA,wBAAY,EAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC;qBACzE,CAAC,CAAC;oBACH,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;gBAC9B,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;CACF;AA5ED,8BA4EC"}
1
+ {"version":3,"file":"code_block.js","sourceRoot":"","sources":["../../../../../../packages/schematics/src/utils/angular/standalone/code_block.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uDAAiC;AACjC,4CAAmE;AACnE,sCAAkD;AAclD,2CAA2C;AAC3C,IAAI,eAAe,GAAG,CAAC,CAAC;AAQxB;;;GAGG;AACH,MAAa,SAAS;IAAtB;QACU,aAAQ,GAAmB,IAAI,GAAG,EAA+B,CAAC;QAE1E,2FAA2F;QAC3F,2EAA2E;QAE3E,oFAAoF;QACpF,SAAI,GAAG,CAAC,OAA6B,EAAE,GAAG,MAAiB,EAAe,EAAE;YAC1E,OAAO;gBACL,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC/E,OAAO,EAAE,IAAI,CAAC,QAAQ;aACvB,CAAC;QACJ,CAAC,CAAC;QAEF;;;;;WAKG;QACH,aAAQ,GAAG,CAAC,UAAkB,EAAE,UAAkB,EAAU,EAAE;YAC5D,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;gBACnC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,EA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,CACvC,IAAI,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,EAC5B,KAAK,IAAI,UAAU,CACpB,CAAC;oBAEF,IAAA,8BAAqB,EAAC,QAAQ,EAAE;wBAC9B,IAAA,wBAAY,EAAC,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC;qBACzE,CAAC,CAAC;oBACH,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;gBAC9B,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACzB,CAAC;CACF;AA5ED,8BA4EC"}
@@ -1,9 +1,9 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- export { addRootImport, addRootProvider } from './rules';
9
- export type { PendingCode, CodeBlockCallback, CodeBlock } from './code_block';
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ export { addRootImport, addRootProvider } from './rules';
9
+ export type { PendingCode, CodeBlockCallback, CodeBlock } from './code_block';
@@ -1,14 +1,14 @@
1
- "use strict";
2
- /**
3
- * @license
4
- * Copyright Google LLC All Rights Reserved.
5
- *
6
- * Use of this source code is governed by an MIT-style license that can be
7
- * found in the LICENSE file at https://angular.dev/license
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.addRootProvider = exports.addRootImport = void 0;
11
- var rules_1 = require("./rules");
12
- Object.defineProperty(exports, "addRootImport", { enumerable: true, get: function () { return rules_1.addRootImport; } });
13
- Object.defineProperty(exports, "addRootProvider", { enumerable: true, get: function () { return rules_1.addRootProvider; } });
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.dev/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.addRootProvider = exports.addRootImport = void 0;
11
+ var rules_1 = require("./rules");
12
+ Object.defineProperty(exports, "addRootImport", { enumerable: true, get: function () { return rules_1.addRootImport; } });
13
+ Object.defineProperty(exports, "addRootProvider", { enumerable: true, get: function () { return rules_1.addRootProvider; } });
14
14
  //# sourceMappingURL=index.js.map
@@ -1,45 +1,45 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.dev/license
7
- */
8
- import { Rule } from '@angular-devkit/schematics';
9
- import { CodeBlockCallback } from './code_block';
10
- /**
11
- * Adds an import to the root of the project.
12
- * @param project Name of the project to which to add the import.
13
- * @param callback Function that generates the code block which should be inserted.
14
- * @example
15
- *
16
- * ```ts
17
- * import { Rule } from '@angular-devkit/schematics';
18
- * import { addRootImport } from '@schematics/angular/utility';
19
- *
20
- * export default function(): Rule {
21
- * return addRootImport('default', ({code, external}) => {
22
- * return code`${external('MyModule', '@my/module')}.forRoot({})`;
23
- * });
24
- * }
25
- * ```
26
- */
27
- export declare function addRootImport(project: string, callback: CodeBlockCallback): Rule;
28
- /**
29
- * Adds a provider to the root of the project.
30
- * @param project Name of the project to which to add the import.
31
- * @param callback Function that generates the code block which should be inserted.
32
- * @example
33
- *
34
- * ```ts
35
- * import { Rule } from '@angular-devkit/schematics';
36
- * import { addRootProvider } from '@schematics/angular/utility';
37
- *
38
- * export default function(): Rule {
39
- * return addRootProvider('default', ({code, external}) => {
40
- * return code`${external('provideLibrary', '@my/library')}({})`;
41
- * });
42
- * }
43
- * ```
44
- */
45
- export declare function addRootProvider(project: string, callback: CodeBlockCallback): Rule;
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ import { Rule } from '@angular-devkit/schematics';
9
+ import { CodeBlockCallback } from './code_block';
10
+ /**
11
+ * Adds an import to the root of the project.
12
+ * @param project Name of the project to which to add the import.
13
+ * @param callback Function that generates the code block which should be inserted.
14
+ * @example
15
+ *
16
+ * ```ts
17
+ * import { Rule } from '@angular-devkit/schematics';
18
+ * import { addRootImport } from '@schematics/angular/utility';
19
+ *
20
+ * export default function(): Rule {
21
+ * return addRootImport('default', ({code, external}) => {
22
+ * return code`${external('MyModule', '@my/module')}.forRoot({})`;
23
+ * });
24
+ * }
25
+ * ```
26
+ */
27
+ export declare function addRootImport(project: string, callback: CodeBlockCallback): Rule;
28
+ /**
29
+ * Adds a provider to the root of the project.
30
+ * @param project Name of the project to which to add the import.
31
+ * @param callback Function that generates the code block which should be inserted.
32
+ * @example
33
+ *
34
+ * ```ts
35
+ * import { Rule } from '@angular-devkit/schematics';
36
+ * import { addRootProvider } from '@schematics/angular/utility';
37
+ *
38
+ * export default function(): Rule {
39
+ * return addRootProvider('default', ({code, external}) => {
40
+ * return code`${external('provideLibrary', '@my/library')}({})`;
41
+ * });
42
+ * }
43
+ * ```
44
+ */
45
+ export declare function addRootProvider(project: string, callback: CodeBlockCallback): Rule;