@abp/ng.schematics 9.2.0-rc.2 → 9.2.0-rc.4

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 (117) hide show
  1. package/commands/change-theme/index.d.ts +8 -3
  2. package/commands/change-theme/index.js +300 -71
  3. package/commands/change-theme/index.js.map +1 -1
  4. package/commands/change-theme/style-map.d.ts +2 -0
  5. package/commands/change-theme/style-map.js +96 -9
  6. package/commands/change-theme/style-map.js.map +1 -1
  7. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/.eslintrc.json.template +44 -0
  8. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/config/ng-package.json.template +7 -0
  9. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/config/src/enums/index.ts.template +1 -0
  10. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/config/src/enums/route-names.ts.template +3 -0
  11. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/config/src/providers/index.ts.template +1 -0
  12. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/config/src/providers/route.provider.ts.template +30 -0
  13. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/config/src/public-api.ts.template +2 -0
  14. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/karma.conf.js.template +44 -0
  15. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/ng-package.json.template +7 -0
  16. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/package.json.template +11 -0
  17. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/src/lib/__libraryName@kebab__.component.ts.template +11 -0
  18. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/src/lib/__libraryName@kebab__.routes.ts.template +9 -0
  19. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/src/lib/index.ts.template +1 -0
  20. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/src/public-api.ts.template +4 -0
  21. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/src/test.ts.template +26 -0
  22. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/tsconfig.lib.json.template +20 -0
  23. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/tsconfig.lib.prod.json.template +10 -0
  24. package/commands/create-lib/files-package-standalone/__libraryName@kebab__/tsconfig.spec.json.template +17 -0
  25. package/commands/create-lib/files-secondary-entrypoint-standalone/__libraryName@kebab__/ng-package.json.template +6 -0
  26. package/commands/create-lib/files-secondary-entrypoint-standalone/__libraryName@kebab__/src/lib/__target@kebab__-__libraryName@kebab__.ts.template +7 -0
  27. package/commands/create-lib/files-secondary-entrypoint-standalone/__libraryName@kebab__/src/lib/index.ts.template +1 -0
  28. package/commands/create-lib/files-secondary-entrypoint-standalone/__libraryName@kebab__/src/public-api.ts.template +1 -0
  29. package/commands/create-lib/index.d.ts +7 -3
  30. package/commands/create-lib/index.js +161 -58
  31. package/commands/create-lib/index.js.map +1 -1
  32. package/commands/create-lib/models/generate-lib-schema.d.ts +8 -1
  33. package/commands/create-lib/models/generate-lib-schema.js +6 -0
  34. package/commands/create-lib/models/generate-lib-schema.js.map +1 -1
  35. package/commands/create-lib/schema.json +13 -9
  36. package/package.json +1 -1
  37. package/utils/angular/add-declaration-to-ng-module.d.ts +2 -1
  38. package/utils/angular/add-declaration-to-ng-module.js +4 -4
  39. package/utils/angular/add-declaration-to-ng-module.js.map +1 -1
  40. package/utils/angular/ast-utils.d.ts +18 -8
  41. package/utils/angular/ast-utils.js +70 -41
  42. package/utils/angular/ast-utils.js.map +1 -1
  43. package/utils/angular/change.d.ts +1 -1
  44. package/utils/angular/change.js +4 -4
  45. package/utils/angular/change.js.map +1 -1
  46. package/utils/angular/dependencies.d.ts +1 -1
  47. package/utils/angular/dependencies.js +1 -1
  48. package/utils/angular/dependency.d.ts +1 -1
  49. package/utils/angular/dependency.js +2 -2
  50. package/utils/angular/dependency.js.map +1 -1
  51. package/utils/angular/eol.d.ts +8 -0
  52. package/utils/angular/eol.js +24 -0
  53. package/utils/angular/eol.js.map +1 -0
  54. package/utils/angular/find-module.d.ts +1 -1
  55. package/utils/angular/find-module.js +5 -5
  56. package/utils/angular/find-module.js.map +1 -1
  57. package/utils/angular/generate-from-files.d.ts +3 -1
  58. package/utils/angular/generate-from-files.js +15 -2
  59. package/utils/angular/generate-from-files.js.map +1 -1
  60. package/utils/angular/index.d.ts +1 -0
  61. package/utils/angular/index.js +1 -0
  62. package/utils/angular/index.js.map +1 -1
  63. package/utils/angular/json-file.d.ts +3 -2
  64. package/utils/angular/json-file.js +6 -3
  65. package/utils/angular/json-file.js.map +1 -1
  66. package/utils/angular/ng-ast-utils.d.ts +2 -2
  67. package/utils/angular/ng-ast-utils.js +19 -7
  68. package/utils/angular/ng-ast-utils.js.map +1 -1
  69. package/utils/angular/parse-name.d.ts +1 -1
  70. package/utils/angular/parse-name.js +1 -1
  71. package/utils/angular/paths.d.ts +1 -1
  72. package/utils/angular/paths.js +4 -7
  73. package/utils/angular/paths.js.map +1 -1
  74. package/utils/angular/project-targets.d.ts +3 -1
  75. package/utils/angular/project-targets.js +9 -2
  76. package/utils/angular/project-targets.js.map +1 -1
  77. package/utils/angular/standalone/app_component.d.ts +29 -0
  78. package/utils/angular/standalone/app_component.js +108 -0
  79. package/utils/angular/standalone/app_component.js.map +1 -0
  80. package/utils/angular/standalone/app_config.d.ts +23 -0
  81. package/utils/angular/standalone/app_config.js +90 -0
  82. package/utils/angular/standalone/app_config.js.map +1 -0
  83. package/utils/angular/standalone/code_block.d.ts +53 -0
  84. package/utils/angular/standalone/code_block.js +80 -0
  85. package/utils/angular/standalone/code_block.js.map +1 -0
  86. package/utils/angular/standalone/index.d.ts +9 -0
  87. package/utils/angular/standalone/index.js +14 -0
  88. package/utils/angular/standalone/index.js.map +1 -0
  89. package/utils/angular/standalone/rules.d.ts +45 -0
  90. package/utils/angular/standalone/rules.js +189 -0
  91. package/utils/angular/standalone/rules.js.map +1 -0
  92. package/utils/angular/standalone/util.d.ts +35 -0
  93. package/utils/angular/standalone/util.js +136 -0
  94. package/utils/angular/standalone/util.js.map +1 -0
  95. package/utils/angular/validation.d.ts +1 -1
  96. package/utils/angular/validation.js +2 -2
  97. package/utils/angular/validation.js.map +1 -1
  98. package/utils/angular/workspace-models.d.ts +12 -6
  99. package/utils/angular/workspace-models.js +11 -3
  100. package/utils/angular/workspace-models.js.map +1 -1
  101. package/utils/angular/workspace.d.ts +12 -1
  102. package/utils/angular/workspace.js +6 -6
  103. package/utils/angular/workspace.js.map +1 -1
  104. package/utils/ast.d.ts +1 -0
  105. package/utils/ast.js +6 -1
  106. package/utils/ast.js.map +1 -1
  107. package/utils/index.d.ts +2 -0
  108. package/utils/index.js +2 -0
  109. package/utils/index.js.map +1 -1
  110. package/utils/ng-module.d.ts +46 -0
  111. package/utils/ng-module.js +126 -0
  112. package/utils/ng-module.js.map +1 -0
  113. package/utils/standalone.d.ts +59 -0
  114. package/utils/standalone.js +146 -0
  115. package/utils/standalone.js.map +1 -0
  116. package/utils/workspace.js +1 -1
  117. package/utils/workspace.js.map +1 -1
@@ -4,17 +4,19 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.JSONFile = void 0;
11
11
  const jsonc_parser_1 = require("jsonc-parser");
12
- /** @internal */
12
+ const eol_1 = require("./eol");
13
+ /** @private */
13
14
  class JSONFile {
14
15
  constructor(host, path) {
15
16
  this.host = host;
16
17
  this.path = path;
17
18
  this.content = this.host.readText(this.path);
19
+ this.eol = (0, eol_1.getEOL)(this.content);
18
20
  }
19
21
  get JsonAst() {
20
22
  if (this._jsonAst) {
@@ -43,7 +45,7 @@ class JSONFile {
43
45
  let getInsertionIndex;
44
46
  if (insertInOrder === undefined) {
45
47
  const property = jsonPath.slice(-1)[0];
46
- getInsertionIndex = (properties) => [...properties, property].sort().findIndex((p) => p === property);
48
+ getInsertionIndex = properties => [...properties, property].sort().findIndex(p => p === property);
47
49
  }
48
50
  else if (insertInOrder !== false) {
49
51
  getInsertionIndex = insertInOrder;
@@ -51,6 +53,7 @@ class JSONFile {
51
53
  const edits = (0, jsonc_parser_1.modify)(this.content, jsonPath, value, {
52
54
  getInsertionIndex,
53
55
  formattingOptions: {
56
+ eol: this.eol,
54
57
  insertSpaces: true,
55
58
  tabSize: 2,
56
59
  },
@@ -1 +1 @@
1
- {"version":3,"file":"json-file.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/json-file.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIH,+CASsB;AAKtB,gBAAgB;AAChB,MAAa,QAAQ;IAGnB,YAA6B,IAAU,EAAmB,IAAY;QAAzC,SAAI,GAAJ,IAAI,CAAM;QAAmB,SAAI,GAAJ,IAAI,CAAQ;QACpE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAGD,IAAY,OAAO;QACjB,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;SACtB;QAED,MAAM,MAAM,GAAiB,EAAE,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,IAAA,wBAAS,EAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9E,IAAI,MAAM,CAAC,MAAM,EAAE;YACjB,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACpC,MAAM,IAAI,KAAK,CACb,oBAAoB,IAAI,CAAC,IAAI,yBAAyB,IAAA,kCAAmB,EACvE,KAAK,CACN,iBAAiB,MAAM,GAAG,CAC5B,CAAC;SACH;QAED,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,GAAG,C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C,OAAO,GAAG,IAAA,yBAAU,EAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC/C,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,QAAkB;QACvB,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,SAAS,EAAE;YACpC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;SAClC;IACH,CAAC;CACF;AAjFD,4BAiFC"}
@@ -3,10 +3,10 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import { Tree } from '@angular-devkit/schematics';
9
9
  import * as ts from 'typescript';
10
10
  export declare function findBootstrapModuleCall(host: Tree, mainPath: string): ts.CallExpression | null;
11
- export declare function findBootstrapModulePath(host: Tree, mainPath: string): string;
12
11
  export declare function getAppModulePath(host: Tree, mainPath: string): string;
12
+ export declare function isStandaloneApp(host: Tree, mainPath: string): boolean;
@@ -4,15 +4,15 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.getAppModulePath = exports.findBootstrapModulePath = exports.findBootstrapModuleCall = void 0;
11
- const core_1 = require("@angular-devkit/core");
10
+ exports.isStandaloneApp = exports.getAppModulePath = exports.findBootstrapModuleCall = void 0;
12
11
  const schematics_1 = require("@angular-devkit/schematics");
13
- const path_1 = require("path");
12
+ const posix_1 = require("node:path/posix");
14
13
  const ts = require("typescript");
15
14
  const ast_utils_1 = require("./ast-utils");
15
+ const util_1 = require("./standalone/util");
16
16
  function findBootstrapModuleCall(host, mainPath) {
17
17
  const mainText = host.readText(mainPath);
18
18
  const source = ts.createSourceFile(mainPath, mainText, ts.ScriptTarget.Latest, true);
@@ -57,12 +57,24 @@ function findBootstrapModulePath(host, mainPath) {
57
57
  })[0];
58
58
  return bootstrapModuleRelativePath;
59
59
  }
60
- exports.findBootstrapModulePath = findBootstrapModulePath;
61
60
  function getAppModulePath(host, mainPath) {
62
61
  const moduleRelativePath = findBootstrapModulePath(host, mainPath);
63
- const mainDir = (0, path_1.dirname)(mainPath);
64
- const modulePath = (0, core_1.normalize)(`/${mainDir}/${moduleRelativePath}.ts`);
62
+ const mainDir = (0, posix_1.dirname)(mainPath);
63
+ const modulePath = (0, posix_1.join)(mainDir, `${moduleRelativePath}.ts`);
65
64
  return modulePath;
66
65
  }
67
66
  exports.getAppModulePath = getAppModulePath;
67
+ function isStandaloneApp(host, mainPath) {
68
+ try {
69
+ (0, util_1.findBootstrapApplicationCall)(host, mainPath);
70
+ return true;
71
+ }
72
+ catch (error) {
73
+ if (error instanceof schematics_1.SchematicsException) {
74
+ return false;
75
+ }
76
+ throw error;
77
+ }
78
+ }
79
+ exports.isStandaloneApp = isStandaloneApp;
68
80
  //# sourceMappingURL=ng-ast-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ng-ast-utils.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/ng-ast-utils.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,+CAAiD;AACjD,2DAAuE;AACvE,+BAA+B;AAC/B,iCAAiC;AACjC,2CAAuD;AAEvD,SAAgB,uBAAuB,CAAC,IAAU,EAAE,QAAgB;IAClE,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,EAAE,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ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C;AAZD,0CAYC"}
@@ -3,7 +3,7 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import { Path } from '@angular-devkit/core';
9
9
  export interface Location {
@@ -4,7 +4,7 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.parseName = void 0;
@@ -3,6 +3,6 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  export declare function relativePathToWorkspaceRoot(projectRoot: string | undefined): string;
@@ -4,19 +4,16 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.relativePathToWorkspaceRoot = void 0;
11
- const core_1 = require("@angular-devkit/core");
11
+ const posix_1 = require("node:path/posix");
12
12
  function relativePathToWorkspaceRoot(projectRoot) {
13
- const normalizedPath = (0, core_1.split)((0, core_1.normalize)(projectRoot || ''));
14
- if (normalizedPath.length === 0 || !normalizedPath[0]) {
13
+ if (!projectRoot) {
15
14
  return '.';
16
15
  }
17
- else {
18
- return normalizedPath.map(() => '..').join('/');
19
- }
16
+ return (0, posix_1.relative)((0, posix_1.join)('/', projectRoot), '/') || '.';
20
17
  }
21
18
  exports.relativePathToWorkspaceRoot = relativePathToWorkspaceRoot;
22
19
  //# sourceMappingURL=paths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/paths.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,+CAAwD;AAExD,SAAgB,2BAA2B,CAAC,WAA+B;IACzE,MAAM,cAAc,GAAG,IAAA,YAAK,EAAC,IAAA,gBAAS,EAAC,WAAW,IAAI,EAAE,CAAC,CAAC,CAAC;IAE3D,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE;QACrD,OAAO,GAAG,CAAC;KACZ;SAAM;QACL,OAAO,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KACjD;AACH,CAAC;AARD,kEAQC"}
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/paths.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,2CAAiD;AAEjD,SAAgB,2BAA2B,CAAC,WAA+B;IACzE,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,GAAG,CAAC;KACZ;IAED,OAAO,IAAA,gBAAQ,EAAC,IAAA,YAAI,EAAC,GAAG,EAAE,WAAW,CAAC,EAAE,GAAG,CAAC,IAAI,GAAG,CAAC;AACtD,CAAC;AAND,kEAMC"}
@@ -3,7 +3,9 @@
3
3
  * Copyright Google LLC All Rights Reserved.
4
4
  *
5
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.io/license
6
+ * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import { SchematicsException } from '@angular-devkit/schematics';
9
+ import { ProjectDefinition } from './workspace';
9
10
  export declare function targetBuildNotFoundError(): SchematicsException;
11
+ export declare function isUsingApplicationBuilder(project: ProjectDefinition): boolean;
@@ -4,13 +4,20 @@
4
4
  * Copyright Google LLC All Rights Reserved.
5
5
  *
6
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.io/license
7
+ * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.targetBuildNotFoundError = void 0;
10
+ exports.isUsingApplicationBuilder = exports.targetBuildNotFoundError = void 0;
11
11
  const schematics_1 = require("@angular-devkit/schematics");
12
+ const workspace_models_1 = require("./workspace-models");
12
13
  function targetBuildNotFoundError() {
13
14
  return new schematics_1.SchematicsException(`Project target "build" not found.`);
14
15
  }
15
16
  exports.targetBuildNotFoundError = targetBuildNotFoundError;
17
+ function isUsingApplicationBuilder(project) {
18
+ const buildBuilder = project.targets.get('build')?.builder;
19
+ const isUsingApplicationBuilder = buildBuilder === workspace_models_1.Builders.Application || buildBuilder === workspace_models_1.Builders.BuildApplication;
20
+ return isUsingApplicationBuilder;
21
+ }
22
+ exports.isUsingApplicationBuilder = isUsingApplicationBuilder;
16
23
  //# sourceMappingURL=project-targets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"project-targets.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/project-targets.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,2DAAiE;AAEjE,SAAgB,wBAAwB;IACtC,OAAO,IAAI,gCAAmB,CAAC,mCAAmC,CAAC,CAAC;AACtE,CAAC;AAFD,4DAEC"}
1
+ {"version":3,"file":"project-targets.js","sourceRoot":"","sources":["../../../../../packages/schematics/src/utils/angular/project-targets.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,2DAAiE;AAEjE,yDAA8C;AAE9C,SAAgB,wBAAwB;IACtC,OAAO,IAAI,gCAAmB,CAAC,mCAAmC,CAAC,CAAC;AACtE,CAAC;AAFD,4DAEC;AAED,SAAgB,yBAAyB,CAAC,OAA0B;IAClE,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3D,MAAM,yBAAyB,GAC7B,YAAY,KAAK,2BAAQ,CAAC,WAAW,IAAI,YAAY,KAAK,2BAAQ,CAAC,gBAAgB,CAAC;IAEtF,OAAO,yBAAyB,CAAC;AACnC,CAAC;AAND,8DAMC"}
@@ -0,0 +1,29 @@
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 { Tree } from '@angular-devkit/schematics';
9
+ /** Data resolved for a bootstrapped component. */
10
+ interface BootstrappedComponentData {
11
+ /** Original name of the component class. */
12
+ componentName: string;
13
+ /** Path under which the component was imported in the main entrypoint. */
14
+ componentImportPathInSameFile: string;
15
+ /** Original name of the NgModule being bootstrapped, null if the app isn't module-based. */
16
+ moduleName: string | null;
17
+ /**
18
+ * Path under which the module was imported in the main entrypoint,
19
+ * null if the app isn't module-based.
20
+ */
21
+ moduleImportPathInSameFile: string | null;
22
+ }
23
+ /**
24
+ * Finds the original name and path relative to the `main.ts` of the bootrstrapped app component.
25
+ * @param tree File tree in which to look for the component.
26
+ * @param mainFilePath Path of the `main` file.
27
+ */
28
+ export declare function resolveBootstrappedComponentData(tree: Tree, mainFilePath: string): BootstrappedComponentData | null;
29
+ export {};
@@ -0,0 +1,108 @@
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.resolveBootstrappedComponentData = void 0;
11
+ const schematics_1 = require("@angular-devkit/schematics");
12
+ const ts = require("typescript");
13
+ const ast_utils_1 = require("../ast-utils");
14
+ const ng_ast_utils_1 = require("../ng-ast-utils");
15
+ const util_1 = require("./util");
16
+ /**
17
+ * Finds the original name and path relative to the `main.ts` of the bootrstrapped app component.
18
+ * @param tree File tree in which to look for the component.
19
+ * @param mainFilePath Path of the `main` file.
20
+ */
21
+ function resolveBootstrappedComponentData(tree, mainFilePath) {
22
+ // First try to resolve for a standalone app.
23
+ try {
24
+ const call = (0, util_1.findBootstrapApplicationCall)(tree, mainFilePath);
25
+ if (call.arguments.length > 0 && ts.isIdentifier(call.arguments[0])) {
26
+ const resolved = resolveIdentifier(call.arguments[0]);
27
+ if (resolved) {
28
+ return {
29
+ componentName: resolved.name,
30
+ componentImportPathInSameFile: resolved.path,
31
+ moduleName: null,
32
+ moduleImportPathInSameFile: null,
33
+ };
34
+ }
35
+ }
36
+ }
37
+ catch (e) {
38
+ // `findBootstrapApplicationCall` will throw if it can't find the `bootrstrapApplication` call.
39
+ // Catch so we can continue to the fallback logic.
40
+ if (!(e instanceof schematics_1.SchematicsException)) {
41
+ throw e;
42
+ }
43
+ }
44
+ // Otherwise fall back to resolving an NgModule-based app.
45
+ return resolveNgModuleBasedData(tree, mainFilePath);
46
+ }
47
+ exports.resolveBootstrappedComponentData = resolveBootstrappedComponentData;
48
+ /** Resolves the bootstrap data for a NgModule-based app. */
49
+ function resolveNgModuleBasedData(tree, mainFilePath) {
50
+ const appModulePath = (0, ng_ast_utils_1.getAppModulePath)(tree, mainFilePath);
51
+ const appModuleFile = (0, util_1.getSourceFile)(tree, appModulePath);
52
+ const metadataNodes = (0, ast_utils_1.getDecoratorMetadata)(appModuleFile, 'NgModule', '@angular/core');
53
+ for (const node of metadataNodes) {
54
+ if (!ts.isObjectLiteralExpression(node)) {
55
+ continue;
56
+ }
57
+ const bootstrapProp = (0, ast_utils_1.getMetadataField)(node, 'bootstrap').find(prop => {
58
+ return (ts.isArrayLiteralExpression(prop.initializer) &&
59
+ prop.initializer.elements.length > 0 &&
60
+ ts.isIdentifier(prop.initializer.elements[0]));
61
+ });
62
+ const componentIdentifier = (bootstrapProp?.initializer)
63
+ .elements[0];
64
+ const componentResult = componentIdentifier ? resolveIdentifier(componentIdentifier) : null;
65
+ const bootstrapCall = (0, ng_ast_utils_1.findBootstrapModuleCall)(tree, mainFilePath);
66
+ if (componentResult &&
67
+ bootstrapCall &&
68
+ bootstrapCall.arguments.length > 0 &&
69
+ ts.isIdentifier(bootstrapCall.arguments[0])) {
70
+ const moduleResult = resolveIdentifier(bootstrapCall.arguments[0]);
71
+ if (moduleResult) {
72
+ return {
73
+ componentName: componentResult.name,
74
+ componentImportPathInSameFile: componentResult.path,
75
+ moduleName: moduleResult.name,
76
+ moduleImportPathInSameFile: moduleResult.path,
77
+ };
78
+ }
79
+ }
80
+ }
81
+ return null;
82
+ }
83
+ /** Resolves an identifier to its original name and path that it was imported from. */
84
+ function resolveIdentifier(identifier) {
85
+ const sourceFile = identifier.getSourceFile();
86
+ // Try to resolve the import path by looking at the top-level named imports of the file.
87
+ for (const node of sourceFile.statements) {
88
+ if (!ts.isImportDeclaration(node) ||
89
+ !ts.isStringLiteral(node.moduleSpecifier) ||
90
+ !node.importClause ||
91
+ !node.importClause.namedBindings ||
92
+ !ts.isNamedImports(node.importClause.namedBindings)) {
93
+ continue;
94
+ }
95
+ for (const element of node.importClause.namedBindings.elements) {
96
+ if (element.name.text === identifier.text) {
97
+ return {
98
+ // Note that we use `propertyName` if available, because it contains
99
+ // the real name in the case where the import is aliased.
100
+ name: (element.propertyName || element.name).text,
101
+ path: node.moduleSpecifier.text,
102
+ };
103
+ }
104
+ }
105
+ }
106
+ return null;
107
+ }
108
+ //# sourceMappingURL=app_component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app_component.js","sourceRoot":"","sources":["../../../../../../packages/schematics/src/utils/angular/standalone/app_component.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,2DAAuE;AACvE,iCAAiC;AACjC,4CAAsE;AACtE,kDAA4E;AAC5E,iCAAqE;AAoBrE;;;;GAIG;AACH,SAAgB,gCAAgC,CAC9C,IAAU,EACV,YAAoB;IAEpB,6CAA6C;IAC7C,IAAI;QACF,MAAM,IAAI,GAAG,IAAA,m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BAAmB,CAAC,IAAI,CAAC;YAC7B,CAAC,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC;YACzC,CAAC,IAAI,CAAC,YAAY;YAClB,CAAC,IAAI,CAAC,YAAY,CAAC,aAAa;YAChC,CAAC,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,EACnD;YACA,SAAS;SACV;QAED,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,QAAQ,EAAE;YAC9D,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,EAAE;gBACzC,OAAO;oBACL,oEAAoE;oBACpE,yDAAyD;oBACzD,IAAI,EAAE,CAAC,OAAO,CAAC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI;oBACjD,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI;iBAChC,CAAC;aACH;SACF;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,23 @@
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 { Tree } from '@angular-devkit/schematics';
9
+ import * as ts from 'typescript';
10
+ /** App config that was resolved to its source node. */
11
+ export interface ResolvedAppConfig {
12
+ /** Tree-relative path of the file containing the app config. */
13
+ filePath: string;
14
+ /** Node defining the app config. */
15
+ node: ts.ObjectLiteralExpression;
16
+ }
17
+ /**
18
+ * Resolves the node that defines the app config from a bootstrap call.
19
+ * @param bootstrapCall Call for which to resolve the config.
20
+ * @param tree File tree of the project.
21
+ * @param filePath File path of the bootstrap call.
22
+ */
23
+ export declare function findAppConfig(bootstrapCall: ts.CallExpression, tree: Tree, filePath: string): ResolvedAppConfig | null;
@@ -0,0 +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
+ }
90
+ //# sourceMappingURL=app_config.js.map
@@ -0,0 +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,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MAAM,gBAAgB,GAAG,6BAA6B,CACpD,kBAAkB,EAClB,CAAC,SAAS,CAAC,YAAY,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAChD,CAAC;YAEF,IAAI,gBAAgB,EAAE;gBACpB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC;aAC7C;SACF;KACF;IAED,MAAM,kBAAkB,GAAG,6BAA6B,CAAC,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAEtF,OAAO,kBAAkB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,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;QACxC,IAAI,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE;YAChC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,eAAe,CAAC,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"}
@@ -0,0 +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 {};
@@ -0,0 +1,80 @@
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;
80
+ //# sourceMappingURL=code_block.js.map
@@ -0,0 +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,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