@o3r/schematics 10.0.0-next.9 → 10.0.0-prerelease.2

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 (193) hide show
  1. package/README.md +1 -1
  2. package/package.json +51 -41
  3. package/schematics/ng-add/index.d.ts.map +1 -1
  4. package/schematics/ng-add/index.js +3 -2
  5. package/schematics/ng-add/schema.json +2 -2
  6. package/src/cli/environment.d.ts +2 -0
  7. package/src/cli/environment.d.ts.map +1 -0
  8. package/src/cli/environment.js +5 -0
  9. package/src/cli/environment.js.map +1 -0
  10. package/src/interfaces/angular-workspace.d.ts +11 -29
  11. package/src/interfaces/angular-workspace.d.ts.map +1 -1
  12. package/src/modules/index.d.ts +1 -0
  13. package/src/modules/index.d.ts.map +1 -1
  14. package/src/modules/index.js +1 -0
  15. package/src/modules/index.js.map +1 -1
  16. package/src/modules/modules.constants.d.ts +6 -2
  17. package/src/modules/modules.constants.d.ts.map +1 -1
  18. package/src/modules/modules.constants.js +5 -3
  19. package/src/modules/modules.constants.js.map +1 -1
  20. package/src/modules/modules.display.rule.d.ts +26 -0
  21. package/src/modules/modules.display.rule.d.ts.map +1 -0
  22. package/src/modules/modules.display.rule.js +45 -0
  23. package/src/modules/modules.display.rule.js.map +1 -0
  24. package/src/modules/modules.helpers.d.ts +2 -9
  25. package/src/modules/modules.helpers.d.ts.map +1 -1
  26. package/src/modules/modules.helpers.js +1 -6
  27. package/src/modules/modules.helpers.js.map +1 -1
  28. package/src/rule-factories/add-imports/index.d.ts +0 -1
  29. package/src/rule-factories/add-imports/index.d.ts.map +1 -1
  30. package/src/rule-factories/add-imports/index.js +0 -1
  31. package/src/rule-factories/add-imports/index.js.map +1 -1
  32. package/src/rule-factories/check-packages-peers/index.d.ts +0 -1
  33. package/src/rule-factories/check-packages-peers/index.d.ts.map +1 -1
  34. package/src/rule-factories/check-packages-peers/index.js +4 -7
  35. package/src/rule-factories/check-packages-peers/index.js.map +1 -1
  36. package/src/rule-factories/dev-tools/devtools-registration.d.ts +25 -0
  37. package/src/rule-factories/dev-tools/devtools-registration.d.ts.map +1 -0
  38. package/src/rule-factories/dev-tools/devtools-registration.js +89 -0
  39. package/src/rule-factories/dev-tools/devtools-registration.js.map +1 -0
  40. package/src/rule-factories/dev-tools/index.d.ts +2 -0
  41. package/src/rule-factories/dev-tools/index.d.ts.map +1 -0
  42. package/src/rule-factories/dev-tools/index.js +5 -0
  43. package/src/rule-factories/dev-tools/index.js.map +1 -0
  44. package/src/rule-factories/eslint-fix/index.d.ts +1 -18
  45. package/src/rule-factories/eslint-fix/index.d.ts.map +1 -1
  46. package/src/rule-factories/eslint-fix/index.js +17 -26
  47. package/src/rule-factories/eslint-fix/index.js.map +1 -1
  48. package/src/rule-factories/get-test-frameworks/index.d.ts +0 -1
  49. package/src/rule-factories/get-test-frameworks/index.d.ts.map +1 -1
  50. package/src/rule-factories/get-test-frameworks/index.js +0 -1
  51. package/src/rule-factories/get-test-frameworks/index.js.map +1 -1
  52. package/src/rule-factories/index.d.ts +1 -0
  53. package/src/rule-factories/index.d.ts.map +1 -1
  54. package/src/rule-factories/index.js +1 -0
  55. package/src/rule-factories/index.js.map +1 -1
  56. package/src/rule-factories/ng-add/index.d.ts +2 -5
  57. package/src/rule-factories/ng-add/index.d.ts.map +1 -1
  58. package/src/rule-factories/ng-add/index.js +107 -83
  59. package/src/rule-factories/ng-add/index.js.map +1 -1
  60. package/src/rule-factories/remove-packages/index.d.ts +0 -1
  61. package/src/rule-factories/remove-packages/index.d.ts.map +1 -1
  62. package/src/rule-factories/remove-packages/index.js +0 -1
  63. package/src/rule-factories/remove-packages/index.js.map +1 -1
  64. package/src/rule-factories/update-imports/list-of-vars.d.ts +1 -2
  65. package/src/rule-factories/update-imports/list-of-vars.d.ts.map +1 -1
  66. package/src/rule-factories/update-imports/list-of-vars.js.map +1 -1
  67. package/src/rule-factories/update-imports/update-imports-with-scope.d.ts +0 -1
  68. package/src/rule-factories/update-imports/update-imports-with-scope.d.ts.map +1 -1
  69. package/src/rule-factories/update-imports/update-imports-with-scope.js +0 -1
  70. package/src/rule-factories/update-imports/update-imports-with-scope.js.map +1 -1
  71. package/src/rule-factories/update-imports/update-ts-imports.d.ts +0 -1
  72. package/src/rule-factories/update-imports/update-ts-imports.d.ts.map +1 -1
  73. package/src/rule-factories/update-imports/update-ts-imports.js +0 -1
  74. package/src/rule-factories/update-imports/update-ts-imports.js.map +1 -1
  75. package/src/rule-factories/update-imports/v7-to-v8-map-object.js +1 -1
  76. package/src/rule-factories/update-imports/v7-to-v8-map-object.js.map +1 -1
  77. package/src/rule-factories/vscode-extensions/index.d.ts +0 -1
  78. package/src/rule-factories/vscode-extensions/index.d.ts.map +1 -1
  79. package/src/rule-factories/vscode-extensions/index.js +0 -1
  80. package/src/rule-factories/vscode-extensions/index.js.map +1 -1
  81. package/src/rules/install.d.ts +0 -1
  82. package/src/rules/install.d.ts.map +1 -1
  83. package/src/rules/install.js +0 -1
  84. package/src/rules/install.js.map +1 -1
  85. package/src/tasks/eslint/index.d.ts +17 -1
  86. package/src/tasks/eslint/index.d.ts.map +1 -1
  87. package/src/tasks/eslint/index.js +15 -6
  88. package/src/tasks/eslint/index.js.map +1 -1
  89. package/src/tasks/package-manager/add-dev-dependency.d.ts +1 -0
  90. package/src/tasks/package-manager/add-dev-dependency.d.ts.map +1 -1
  91. package/src/tasks/package-manager/add-dev-dependency.js +3 -1
  92. package/src/tasks/package-manager/add-dev-dependency.js.map +1 -1
  93. package/src/tasks/package-manager/interfaces.d.ts +9 -0
  94. package/src/tasks/package-manager/interfaces.d.ts.map +1 -1
  95. package/src/tasks/package-manager/npm-install.d.ts +2 -1
  96. package/src/tasks/package-manager/npm-install.d.ts.map +1 -1
  97. package/src/tasks/package-manager/npm-install.js +3 -1
  98. package/src/tasks/package-manager/npm-install.js.map +1 -1
  99. package/src/utility/ast.d.ts +4 -20
  100. package/src/utility/ast.d.ts.map +1 -1
  101. package/src/utility/ast.js +0 -18
  102. package/src/utility/ast.js.map +1 -1
  103. package/src/utility/builder.d.ts +11 -0
  104. package/src/utility/builder.d.ts.map +1 -0
  105. package/src/utility/builder.js +21 -0
  106. package/src/utility/builder.js.map +1 -0
  107. package/src/utility/collection.d.ts +2 -5
  108. package/src/utility/collection.d.ts.map +1 -1
  109. package/src/utility/collection.js +11 -9
  110. package/src/utility/collection.js.map +1 -1
  111. package/src/utility/component.d.ts +0 -6
  112. package/src/utility/component.d.ts.map +1 -1
  113. package/src/utility/component.js +4 -9
  114. package/src/utility/component.js.map +1 -1
  115. package/src/utility/dependencies.d.ts +0 -2
  116. package/src/utility/dependencies.d.ts.map +1 -1
  117. package/src/utility/dependencies.js +0 -2
  118. package/src/utility/dependencies.js.map +1 -1
  119. package/src/utility/environment.d.ts +27 -0
  120. package/src/utility/environment.d.ts.map +1 -0
  121. package/src/utility/environment.js +51 -0
  122. package/src/utility/environment.js.map +1 -0
  123. package/src/utility/error.d.ts +7 -0
  124. package/src/utility/error.d.ts.map +1 -0
  125. package/src/utility/error.js +17 -0
  126. package/src/utility/error.js.map +1 -0
  127. package/src/utility/file-info.d.ts +11 -1
  128. package/src/utility/file-info.d.ts.map +1 -1
  129. package/src/utility/file-info.js +46 -4
  130. package/src/utility/file-info.js.map +1 -1
  131. package/src/utility/generation.d.ts +0 -1
  132. package/src/utility/generation.d.ts.map +1 -1
  133. package/src/utility/generation.js +7 -11
  134. package/src/utility/generation.js.map +1 -1
  135. package/src/utility/gitignore.d.ts +0 -1
  136. package/src/utility/gitignore.d.ts.map +1 -1
  137. package/src/utility/gitignore.js +0 -1
  138. package/src/utility/gitignore.js.map +1 -1
  139. package/src/utility/index.d.ts +10 -7
  140. package/src/utility/index.d.ts.map +1 -1
  141. package/src/utility/index.js +10 -7
  142. package/src/utility/index.js.map +1 -1
  143. package/src/utility/loaders.d.ts +12 -50
  144. package/src/utility/loaders.d.ts.map +1 -1
  145. package/src/utility/loaders.js +34 -97
  146. package/src/utility/loaders.js.map +1 -1
  147. package/src/utility/logo.d.ts +0 -1
  148. package/src/utility/logo.d.ts.map +1 -1
  149. package/src/utility/logo.js +0 -1
  150. package/src/utility/logo.js.map +1 -1
  151. package/src/utility/matching-peers.d.ts +18 -6
  152. package/src/utility/matching-peers.d.ts.map +1 -1
  153. package/src/utility/matching-peers.js +33 -10
  154. package/src/utility/matching-peers.js.map +1 -1
  155. package/src/utility/modules.d.ts +4 -9
  156. package/src/utility/modules.d.ts.map +1 -1
  157. package/src/utility/modules.js +17 -22
  158. package/src/utility/modules.js.map +1 -1
  159. package/src/utility/monorepo.d.ts +0 -5
  160. package/src/utility/monorepo.d.ts.map +1 -1
  161. package/src/utility/monorepo.js +0 -5
  162. package/src/utility/monorepo.js.map +1 -1
  163. package/src/utility/package-manager-runner.d.ts +24 -7
  164. package/src/utility/package-manager-runner.d.ts.map +1 -1
  165. package/src/utility/package-manager-runner.js +70 -10
  166. package/src/utility/package-manager-runner.js.map +1 -1
  167. package/src/utility/package-version.d.ts +0 -2
  168. package/src/utility/package-version.d.ts.map +1 -1
  169. package/src/utility/package-version.js +0 -2
  170. package/src/utility/package-version.js.map +1 -1
  171. package/src/utility/question.d.ts +0 -1
  172. package/src/utility/question.d.ts.map +1 -1
  173. package/src/utility/question.js +0 -1
  174. package/src/utility/question.js.map +1 -1
  175. package/src/utility/routes.d.ts +0 -3
  176. package/src/utility/routes.d.ts.map +1 -1
  177. package/src/utility/routes.js +0 -5
  178. package/src/utility/routes.js.map +1 -1
  179. package/src/utility/sub-entry.d.ts +0 -2
  180. package/src/utility/sub-entry.d.ts.map +1 -1
  181. package/src/utility/sub-entry.js +0 -2
  182. package/src/utility/sub-entry.js.map +1 -1
  183. package/src/utility/template-property.helper.d.ts +0 -15
  184. package/src/utility/template-property.helper.d.ts.map +1 -1
  185. package/src/utility/template-property.helper.js +0 -16
  186. package/src/utility/template-property.helper.js.map +1 -1
  187. package/src/utility/update-imports.d.ts +0 -1
  188. package/src/utility/update-imports.d.ts.map +1 -1
  189. package/src/utility/update-imports.js +0 -1
  190. package/src/utility/update-imports.js.map +1 -1
  191. package/schematics/ng-add/index.js.map +0 -1
  192. package/schematics/ng-add/schema.js.map +0 -1
  193. package/schematics/package.json +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"generation.js","sourceRoot":"","sources":["../../../src/utility/generation.ts"],"names":[],"mappings":";;;AAGA,uCAAgE;AAYhE,gCAAgC;AACnB,QAAA,gBAAgB,GAAwB;IACnD,qBAAqB;IACrB,gBAAgB;IAChB,mBAAmB;IACnB,iBAAiB;IACjB,6BAA6B;IAC7B,kCAAkC;IAClC,gCAAgC;CACjC,CAAC;AAEF,sEAAsE;AACzD,QAAA,oBAAoB,GAAkE;IACjG,gEAAgE;IAChE,qBAAqB,EAAE,EAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,EAAC;IACrE,gEAAgE;IAChE,gBAAgB,EAAE,EAAC,GAAG,EAAE,SAAS,EAAC;IAClC,gEAAgE;IAChE,mBAAmB,EAAE,EAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,cAAc,EAAC;IAC/D,gEAAgE;IAChE,iBAAiB,EAAE,EAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,EAAC;IACvD,gEAAgE;IAChE,6BAA6B,EAAE,EAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,gBAAgB,EAAC;IAC7E,gEAAgE;IAChE,kCAAkC,EAAE,EAAE,GAAG,EAAE,0BAA0B,EAAE;IACvE,gEAAgE;IAChE,gCAAgC,EAAE,EAAE,GAAG,EAAE,uBAAuB,EAAE;CACnE,CAAC;AAEF;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,UAA6B,EAAE,SAAoC,EAAE,IAAU,EAAE,OAAuB;IACzI,IAAI,SAAS,EAAE;QACb,OAAO,SAAS,CAAC;KAClB;IAED;;;OAGG;IACH,MAAM,yBAAyB,GAAG,CAChC,SAA6C,EAC7C,aAAgC,EAAY,EAAE;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{ Tree } from '@angular-devkit/schematics';
2
2
  /**
3
3
  * Add patterns to .gitignore file
4
- *
5
4
  * @param tree Schematics files tree
6
5
  * @param patternsToAdd List of patterns with description to add to gitignore files
7
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"gitignore.d.ts","sourceRoot":"","sources":["../../../src/utility/gitignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAC,EAAE,gEAoBrG"}
1
+ {"version":3,"file":"gitignore.d.ts","sourceRoot":"","sources":["../../../src/utility/gitignore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAC,EAAE,gEAoBrG"}
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ignorePatterns = void 0;
4
4
  /**
5
5
  * Add patterns to .gitignore file
6
- *
7
6
  * @param tree Schematics files tree
8
7
  * @param patternsToAdd List of patterns with description to add to gitignore files
9
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"gitignore.js","sourceRoot":"","sources":["../../../src/utility/gitignore.ts"],"names":[],"mappings":";;;AAEA;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,IAAU,EAAE,aAA2D;IACpG,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;QAE9B,IAAI,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAE,CAAC,QAAQ,EAAE,CAAC;QACzD,IAAI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CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,EAAC,CAAC,CAAC;aACxK,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;aACzC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,EAAE;YACrC,KAAK,GAAG,IAAI,CAAC;YACb,aAAa,GAAG,aAAa,GAAG,OAAO,WAAY,KAAK,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QAClF,CAAC,CAAC,CAAC;QAEL,IAAI,KAAK,EAAE;YACT,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;SAC9C;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AApBD,wCAoBC"}
@@ -1,20 +1,23 @@
1
1
  export * from './ast';
2
+ export * from './collection';
2
3
  export * from './component';
3
4
  export * from './dependencies';
5
+ export * from './environment';
6
+ export * from './error';
4
7
  export * from './file-info';
5
8
  export * from './generation';
6
9
  export * from './gitignore';
7
10
  export * from './loaders';
8
- export * from './modules';
9
- export * from './routes';
10
- export * from './sub-entry';
11
- export * from './template-property.helper';
11
+ export * from './logo';
12
12
  export * from './matching-peers';
13
+ export * from './modules';
14
+ export * from './monorepo';
13
15
  export * from './package-manager-runner';
14
16
  export * from './package-version';
15
17
  export * from './question';
16
- export * from './monorepo';
18
+ export * from './routes';
19
+ export * from './sub-entry';
20
+ export * from './template-property.helper';
17
21
  export * from './update-imports';
18
- export * from './collection';
19
- export * from './logo';
22
+ export * from './builder';
20
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utility/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utility/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC"}
@@ -2,22 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./ast"), exports);
5
+ tslib_1.__exportStar(require("./collection"), exports);
5
6
  tslib_1.__exportStar(require("./component"), exports);
6
7
  tslib_1.__exportStar(require("./dependencies"), exports);
8
+ tslib_1.__exportStar(require("./environment"), exports);
9
+ tslib_1.__exportStar(require("./error"), exports);
7
10
  tslib_1.__exportStar(require("./file-info"), exports);
8
11
  tslib_1.__exportStar(require("./generation"), exports);
9
12
  tslib_1.__exportStar(require("./gitignore"), exports);
10
13
  tslib_1.__exportStar(require("./loaders"), exports);
11
- tslib_1.__exportStar(require("./modules"), exports);
12
- tslib_1.__exportStar(require("./routes"), exports);
13
- tslib_1.__exportStar(require("./sub-entry"), exports);
14
- tslib_1.__exportStar(require("./template-property.helper"), exports);
14
+ tslib_1.__exportStar(require("./logo"), exports);
15
15
  tslib_1.__exportStar(require("./matching-peers"), exports);
16
+ tslib_1.__exportStar(require("./modules"), exports);
17
+ tslib_1.__exportStar(require("./monorepo"), exports);
16
18
  tslib_1.__exportStar(require("./package-manager-runner"), exports);
17
19
  tslib_1.__exportStar(require("./package-version"), exports);
18
20
  tslib_1.__exportStar(require("./question"), exports);
19
- tslib_1.__exportStar(require("./monorepo"), exports);
21
+ tslib_1.__exportStar(require("./routes"), exports);
22
+ tslib_1.__exportStar(require("./sub-entry"), exports);
23
+ tslib_1.__exportStar(require("./template-property.helper"), exports);
20
24
  tslib_1.__exportStar(require("./update-imports"), exports);
21
- tslib_1.__exportStar(require("./collection"), exports);
22
- tslib_1.__exportStar(require("./logo"), exports);
25
+ tslib_1.__exportStar(require("./builder"), exports);
23
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utility/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,sDAA4B;AAC5B,yDAA+B;AAC/B,sDAA4B;AAC5B,uDAA6B;AAC7B,sDAA4B;AAC5B,oDAA0B;AAC1B,oDAA0B;AAC1B,mDAAyB;AACzB,sDAA4B;AAC5B,qEAA2C;AAC3C,2DAAiC;AACjC,mEAAyC;AACzC,4DAAkC;AAClC,qDAA2B;AAC3B,qDAA2B;AAC3B,2DAAiC;AACjC,uDAA6B;AAC7B,iDAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utility/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,uDAA6B;AAC7B,sDAA4B;AAC5B,yDAA+B;AAC/B,wDAA8B;AAC9B,kDAAwB;AACxB,sDAA4B;AAC5B,uDAA6B;AAC7B,sDAA4B;AAC5B,oDAA0B;AAC1B,iDAAuB;AACvB,2DAAiC;AACjC,oDAA0B;AAC1B,qDAA2B;AAC3B,mEAAyC;AACzC,4DAAkC;AAClC,qDAA2B;AAC3B,mDAAyB;AACzB,sDAA4B;AAC5B,qEAA2C;AAC3C,2DAAiC;AACjC,oDAA0B"}
@@ -1,19 +1,18 @@
1
+ import type { DirEntry, FileEntry } from '@angular-devkit/schematics';
1
2
  import { Tree } from '@angular-devkit/schematics';
2
3
  import { NodeDependencyType } from '@schematics/angular/utility/dependencies';
3
4
  import type { PackageJson } from 'type-fest';
4
5
  import type { WorkspaceProject, WorkspaceSchema } from '../interfaces/index';
5
6
  /**
6
- * Load the angular.json file
7
7
  *
8
- * @param tree File tree
9
- * @param angularJsonFile Angular.json file path
10
- * @throws Angular JSON invalid or non exist
11
- * @deprecate use {@link getWorkspaceConfig} function instead, will be removed in Otter v10
8
+ * Helper function that looks for files in the Tree
9
+ * @param directory where to perform the search
10
+ * @param fileMatchesCriteria a function defining the criteria to look for
11
+ * @param ignoreDirectories optional parameter to ignore folders
12
12
  */
13
- export declare function readAngularJson(tree: Tree, angularJsonFile?: string): WorkspaceSchema;
13
+ export declare function findFilesInTree(directory: DirEntry, fileMatchesCriteria: (file: string) => boolean, ignoreDirectories?: string[]): FileEntry[];
14
14
  /**
15
15
  * Load the Workspace configuration object
16
- *
17
16
  * @param tree File tree
18
17
  * @param workspaceConfigFile Workspace config file path, /angular.json in an Angular project
19
18
  * @returns null if the given config file does not exist
@@ -21,7 +20,6 @@ export declare function readAngularJson(tree: Tree, angularJsonFile?: string): W
21
20
  export declare function getWorkspaceConfig<T extends WorkspaceSchema = WorkspaceSchema>(tree: Tree, workspaceConfigFile?: string): WorkspaceSchema | null;
22
21
  /**
23
22
  * Update angular.json file
24
- *
25
23
  * @param tree File tree
26
24
  * @param workspace Angular workspace
27
25
  * @param angularJsonFile Angular.json file path
@@ -29,46 +27,19 @@ export declare function getWorkspaceConfig<T extends WorkspaceSchema = Workspace
29
27
  export declare function writeAngularJson(tree: Tree, workspace: WorkspaceSchema, angularJsonFile?: string): import("@angular-devkit/schematics/src/tree/interface").Tree;
30
28
  /**
31
29
  * Load the target's package.json file
32
- *
33
30
  * @param tree File tree
34
31
  * @param workspaceProject Angular workspace project
35
32
  * @throws Package JSON invalid or non exist
36
33
  */
37
34
  export declare function readPackageJson(tree: Tree, workspaceProject: WorkspaceProject): PackageJson;
38
- /**
39
- * Get the workspace project
40
- *
41
- * @param tree File tree
42
- * @param projectName Name of the Angular project
43
- * @param projectType
44
- */
45
- export declare function getProjectFromTree(tree: Tree, projectName?: string | null, projectType?: 'application' | 'library'): WorkspaceProject & {
46
- name: string;
47
- } | undefined;
48
- /**
49
- * Returns the root directory of a project with the given name ( a relative path from the project root)
50
- *
51
- * @param tree Files tree
52
- * @param projectName Name of the project inside the workspace
53
- */
54
- export declare function getProjectRootDir(tree: Tree, projectName?: string | null): string | undefined;
55
35
  /**
56
36
  * Return the type of install to run depending on the project type (Peer or default)
57
- *
37
+ * @param project
58
38
  * @param tree
59
39
  */
60
- export declare function getProjectDepType(tree: Tree): NodeDependencyType.Default | NodeDependencyType.Peer;
61
- /**
62
- * Get the default project name
63
- *
64
- * @deprecated use {@link getProjectFromTree} function instead, will be removed in Otter V10
65
- * @param projectType
66
- * @param tree File tree
67
- */
68
- export declare function getDefaultProjectName(tree: Tree, projectType?: 'application' | 'library'): string | undefined;
40
+ export declare function getProjectNewDependenciesType(project?: WorkspaceProject): NodeDependencyType.Default | NodeDependencyType.Peer;
69
41
  /**
70
42
  * Get the folder of the templates for a specific sub-schematics
71
- *
72
43
  * @param rootPath Root directory of the schematics ran
73
44
  * @param currentPath Directory of the current sub-schematics ran
74
45
  * @param templateFolder Folder containing the templates
@@ -76,7 +47,6 @@ export declare function getDefaultProjectName(tree: Tree, projectType?: 'applica
76
47
  export declare function getTemplateFolder(rootPath: string, currentPath: string, templateFolder?: string): string;
77
48
  /**
78
49
  * Get the path of all the files in the Tree
79
- *
80
50
  * @param basePath Base path from which starting the list
81
51
  * @param tree Schematics file tree
82
52
  * @param excludes Array of globs to be ignored
@@ -84,17 +54,13 @@ export declare function getTemplateFolder(rootPath: string, currentPath: string,
84
54
  */
85
55
  export declare function getAllFilesInTree(tree: Tree, basePath?: string, excludes?: string[], recursive?: boolean): string[];
86
56
  /**
87
- * Get all files with specific extension from the specified folder for all the projects described in the workspace
88
- *
89
- * @deprecated please use {@link getFilesInFolderFromWorkspaceProjectsInTree}, will be removed in v9
90
- * @param tree
91
- * @param folderInProject
92
- * @param extension
57
+ * Get the path of all the files in the Tree
58
+ * @param tree Schematics file tree
59
+ * @param patterns Array of globs to be search in the tree
93
60
  */
94
- export declare function getFilesInFolderFromWorkspaceProjects(tree: Tree, folderInProject: string, extension: string): string[];
61
+ export declare function globInTree(tree: Tree, patterns: string[]): string[];
95
62
  /**
96
63
  * Get all files with specific extension from the specified folder for all the projects described in the workspace
97
- *
98
64
  * @param tree
99
65
  * @param folderInProject
100
66
  * @param extension
@@ -102,28 +68,24 @@ export declare function getFilesInFolderFromWorkspaceProjects(tree: Tree, folder
102
68
  export declare function getFilesInFolderFromWorkspaceProjectsInTree(tree: Tree, folderInProject: string, extension: string): string[];
103
69
  /**
104
70
  * Get all files with specific extension from the tree
105
- *
106
71
  * @param tree
107
72
  * @param extension
108
73
  */
109
74
  export declare function getFilesWithExtensionFromTree(tree: Tree, extension: string): string[];
110
75
  /**
111
76
  * Get all files with specific extension from the root of all the projects described in the workspace
112
- *
113
77
  * @param tree
114
78
  * @param extension
115
79
  */
116
80
  export declare function getFilesFromRootOfWorkspaceProjects(tree: Tree, extension: string): string[];
117
81
  /**
118
82
  * Get all files with specific extension from the src folder for all the projects described in the workspace
119
- *
120
83
  * @param tree
121
84
  * @param extension
122
85
  */
123
86
  export declare function getFilesFromWorkspaceProjects(tree: Tree, extension: string): string[];
124
87
  /**
125
88
  * Get all the typescript files from the src folder for all the projects described in the workspace
126
- *
127
89
  * @param tree
128
90
  */
129
91
  export declare function getSourceFilesFromWorkspaceProjects(tree: Tree): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"loaders.d.ts","sourceRoot":"","sources":["../../../src/utility/loaders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAI9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE7E;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,SAAkB,GAAG,eAAe,CAM9F;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,mBAAmB,SAAkB,GAAG,eAAe,GAAG,IAAI,CAKzJ;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,SAAkB,gEAGzG;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,gBAAgB,eAQ7E;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,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AAI,EAAE,IAAI,EAAE,QAAQ,SAAM,EAAE,QAAQ,GAAE,MAAM,EAAO,EAAE,SAAS,UAAO,GAAG,MAAM,EAAE,CAQjH;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAGnE;AAED;;;;;GAKG;AACH,wBAAgB,2CAA2C,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,YAOjH;AAGD;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,YAK1E;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,YAEhF;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,YAE1E;AAGD;;;GAGG;AACH,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,IAAI,YAE7D"}
@@ -1,30 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSourceFilesFromWorkspaceProjects = exports.getFilesFromWorkspaceProjects = exports.getFilesFromRootOfWorkspaceProjects = exports.getFilesWithExtensionFromTree = exports.getFilesInFolderFromWorkspaceProjectsInTree = exports.getFilesInFolderFromWorkspaceProjects = exports.getAllFilesInTree = exports.getTemplateFolder = exports.getDefaultProjectName = exports.getProjectDepType = exports.getProjectRootDir = exports.getProjectFromTree = exports.readPackageJson = exports.writeAngularJson = exports.getWorkspaceConfig = exports.readAngularJson = void 0;
3
+ exports.getSourceFilesFromWorkspaceProjects = exports.getFilesFromWorkspaceProjects = exports.getFilesFromRootOfWorkspaceProjects = exports.getFilesWithExtensionFromTree = exports.getFilesInFolderFromWorkspaceProjectsInTree = exports.globInTree = exports.getAllFilesInTree = exports.getTemplateFolder = exports.getProjectNewDependenciesType = exports.readPackageJson = exports.writeAngularJson = exports.getWorkspaceConfig = exports.findFilesInTree = void 0;
4
4
  const schematics_1 = require("@angular-devkit/schematics");
5
5
  const dependencies_1 = require("@schematics/angular/utility/dependencies");
6
- const globby_1 = require("globby");
7
6
  const minimatch_1 = require("minimatch");
8
7
  const path = require("node:path");
8
+ function findFilesInTreeRec(memory, directory, fileMatchesCriteria, ignoreDirectories) {
9
+ if (ignoreDirectories.some(i => directory.path.split(path.posix.sep).includes(i))) {
10
+ return memory;
11
+ }
12
+ directory.subfiles
13
+ .filter(fileMatchesCriteria)
14
+ .forEach((file) => memory.add(directory.file(file)));
15
+ directory.subdirs
16
+ .forEach((dir) => findFilesInTreeRec(memory, directory.dir(dir), fileMatchesCriteria, ignoreDirectories));
17
+ return memory;
18
+ }
9
19
  /**
10
- * Load the angular.json file
11
20
  *
12
- * @param tree File tree
13
- * @param angularJsonFile Angular.json file path
14
- * @throws Angular JSON invalid or non exist
15
- * @deprecate use {@link getWorkspaceConfig} function instead, will be removed in Otter v10
21
+ * Helper function that looks for files in the Tree
22
+ * @param directory where to perform the search
23
+ * @param fileMatchesCriteria a function defining the criteria to look for
24
+ * @param ignoreDirectories optional parameter to ignore folders
16
25
  */
17
- function readAngularJson(tree, angularJsonFile = '/angular.json') {
18
- if (!tree.exists(angularJsonFile)) {
19
- throw new schematics_1.SchematicsException('Could not find Angular workspace configuration');
20
- }
21
- const workspaceConfig = tree.readJson(angularJsonFile);
22
- return workspaceConfig;
26
+ function findFilesInTree(directory, fileMatchesCriteria, ignoreDirectories = ['node_modules', '.git', '.yarn']) {
27
+ const memory = new Set();
28
+ findFilesInTreeRec(memory, directory, fileMatchesCriteria, ignoreDirectories);
29
+ return Array.from(memory);
23
30
  }
24
- exports.readAngularJson = readAngularJson;
31
+ exports.findFilesInTree = findFilesInTree;
25
32
  /**
26
33
  * Load the Workspace configuration object
27
- *
28
34
  * @param tree File tree
29
35
  * @param workspaceConfigFile Workspace config file path, /angular.json in an Angular project
30
36
  * @returns null if the given config file does not exist
@@ -38,7 +44,6 @@ function getWorkspaceConfig(tree, workspaceConfigFile = '/angular.json') {
38
44
  exports.getWorkspaceConfig = getWorkspaceConfig;
39
45
  /**
40
46
  * Update angular.json file
41
- *
42
47
  * @param tree File tree
43
48
  * @param workspace Angular workspace
44
49
  * @param angularJsonFile Angular.json file path
@@ -50,7 +55,6 @@ function writeAngularJson(tree, workspace, angularJsonFile = '/angular.json') {
50
55
  exports.writeAngularJson = writeAngularJson;
51
56
  /**
52
57
  * Load the target's package.json file
53
- *
54
58
  * @param tree File tree
55
59
  * @param workspaceProject Angular workspace project
56
60
  * @throws Package JSON invalid or non exist
@@ -64,70 +68,17 @@ function readPackageJson(tree, workspaceProject) {
64
68
  return workspaceConfig;
65
69
  }
66
70
  exports.readPackageJson = readPackageJson;
67
- /**
68
- * Get the workspace project
69
- *
70
- * @param tree File tree
71
- * @param projectName Name of the Angular project
72
- * @param projectType
73
- */
74
- function getProjectFromTree(tree, projectName, projectType) {
75
- const workspace = getWorkspaceConfig(tree);
76
- if (!workspace) {
77
- return undefined;
78
- }
79
- const projectGuessedName = projectName || Object.keys(workspace.projects)[0];
80
- // eslint-disable-next-line max-len
81
- let workspaceProject = projectGuessedName && workspace.projects[projectGuessedName] && (!projectType || workspace.projects[projectGuessedName]?.projectType === projectType) ?
82
- {
83
- ...workspace.projects[projectGuessedName],
84
- name: projectGuessedName
85
- } :
86
- undefined;
87
- // if not found we fallback to the more relevant first one
88
- if (!workspaceProject) {
89
- workspaceProject = Object.entries(workspace.projects)
90
- .filter(([, project]) => !projectType || project.projectType === projectType)
91
- .map(([name, project]) => ({ ...project, name }))[0];
92
- }
93
- return workspaceProject;
94
- }
95
- exports.getProjectFromTree = getProjectFromTree;
96
- /**
97
- * Returns the root directory of a project with the given name ( a relative path from the project root)
98
- *
99
- * @param tree Files tree
100
- * @param projectName Name of the project inside the workspace
101
- */
102
- function getProjectRootDir(tree, projectName) {
103
- return getProjectFromTree(tree, projectName)?.root;
104
- }
105
- exports.getProjectRootDir = getProjectRootDir;
106
71
  /**
107
72
  * Return the type of install to run depending on the project type (Peer or default)
108
- *
73
+ * @param project
109
74
  * @param tree
110
75
  */
111
- function getProjectDepType(tree) {
112
- const workspaceProject = tree.exists('angular.json') ? getProjectFromTree(tree) : undefined;
113
- const projectType = workspaceProject?.projectType || 'application';
114
- return projectType === 'application' ? dependencies_1.NodeDependencyType.Default : dependencies_1.NodeDependencyType.Peer;
115
- }
116
- exports.getProjectDepType = getProjectDepType;
117
- /**
118
- * Get the default project name
119
- *
120
- * @deprecated use {@link getProjectFromTree} function instead, will be removed in Otter V10
121
- * @param projectType
122
- * @param tree File tree
123
- */
124
- function getDefaultProjectName(tree, projectType) {
125
- return getProjectFromTree(tree, null, projectType)?.name;
76
+ function getProjectNewDependenciesType(project) {
77
+ return project?.projectType === 'library' ? dependencies_1.NodeDependencyType.Peer : dependencies_1.NodeDependencyType.Default;
126
78
  }
127
- exports.getDefaultProjectName = getDefaultProjectName;
79
+ exports.getProjectNewDependenciesType = getProjectNewDependenciesType;
128
80
  /**
129
81
  * Get the folder of the templates for a specific sub-schematics
130
- *
131
82
  * @param rootPath Root directory of the schematics ran
132
83
  * @param currentPath Directory of the current sub-schematics ran
133
84
  * @param templateFolder Folder containing the templates
@@ -139,7 +90,6 @@ function getTemplateFolder(rootPath, currentPath, templateFolder = 'templates')
139
90
  exports.getTemplateFolder = getTemplateFolder;
140
91
  /**
141
92
  * Get the path of all the files in the Tree
142
- *
143
93
  * @param basePath Base path from which starting the list
144
94
  * @param tree Schematics file tree
145
95
  * @param excludes Array of globs to be ignored
@@ -156,42 +106,32 @@ function getAllFilesInTree(tree, basePath = '/', excludes = [], recursive = true
156
106
  }
157
107
  exports.getAllFilesInTree = getAllFilesInTree;
158
108
  /**
159
- * Get all files with specific extension from the specified folder for all the projects described in the workspace
160
- *
161
- * @deprecated please use {@link getFilesInFolderFromWorkspaceProjectsInTree}, will be removed in v9
162
- * @param tree
163
- * @param folderInProject
164
- * @param extension
109
+ * Get the path of all the files in the Tree
110
+ * @param tree Schematics file tree
111
+ * @param patterns Array of globs to be search in the tree
165
112
  */
166
- function getFilesInFolderFromWorkspaceProjects(tree, folderInProject, extension) {
167
- const workspace = readAngularJson(tree);
168
- const projectSources = Object.values(workspace.projects)
169
- .map((project) => path.join(project.root, folderInProject, '**', `*.${extension}`).replace(/\\/g, '/'));
170
- return projectSources.reduce((acc, projectSource) => {
171
- acc.push(...(0, globby_1.sync)(projectSource, { ignore: ['**/node_modules/**'] }));
172
- return acc;
173
- }, []);
113
+ function globInTree(tree, patterns) {
114
+ const files = getAllFilesInTree(tree);
115
+ return files.filter((basePath) => patterns.some((p) => (0, minimatch_1.minimatch)(basePath, p, { dot: true })));
174
116
  }
175
- exports.getFilesInFolderFromWorkspaceProjects = getFilesInFolderFromWorkspaceProjects;
117
+ exports.globInTree = globInTree;
176
118
  /**
177
119
  * Get all files with specific extension from the specified folder for all the projects described in the workspace
178
- *
179
120
  * @param tree
180
121
  * @param folderInProject
181
122
  * @param extension
182
123
  */
183
124
  function getFilesInFolderFromWorkspaceProjectsInTree(tree, folderInProject, extension) {
184
- const workspace = readAngularJson(tree);
125
+ const workspace = getWorkspaceConfig(tree);
185
126
  const extensionMatcher = new RegExp(`\\.${extension.replace(/^\./, '')}$`);
186
127
  const excludes = ['**/node_modules/**', '**/.cache/**'];
187
- return Object.values(workspace.projects)
128
+ return Object.values(workspace?.projects || {})
188
129
  .flatMap((project) => getAllFilesInTree(tree, path.posix.join(project.root, folderInProject), excludes))
189
130
  .filter((filePath) => extensionMatcher.test(filePath));
190
131
  }
191
132
  exports.getFilesInFolderFromWorkspaceProjectsInTree = getFilesInFolderFromWorkspaceProjectsInTree;
192
133
  /**
193
134
  * Get all files with specific extension from the tree
194
- *
195
135
  * @param tree
196
136
  * @param extension
197
137
  */
@@ -204,7 +144,6 @@ function getFilesWithExtensionFromTree(tree, extension) {
204
144
  exports.getFilesWithExtensionFromTree = getFilesWithExtensionFromTree;
205
145
  /**
206
146
  * Get all files with specific extension from the root of all the projects described in the workspace
207
- *
208
147
  * @param tree
209
148
  * @param extension
210
149
  */
@@ -214,7 +153,6 @@ function getFilesFromRootOfWorkspaceProjects(tree, extension) {
214
153
  exports.getFilesFromRootOfWorkspaceProjects = getFilesFromRootOfWorkspaceProjects;
215
154
  /**
216
155
  * Get all files with specific extension from the src folder for all the projects described in the workspace
217
- *
218
156
  * @param tree
219
157
  * @param extension
220
158
  */
@@ -224,7 +162,6 @@ function getFilesFromWorkspaceProjects(tree, extension) {
224
162
  exports.getFilesFromWorkspaceProjects = getFilesFromWorkspaceProjects;
225
163
  /**
226
164
  * Get all the typescript files from the src folder for all the projects described in the workspace
227
- *
228
165
  * @param tree
229
166
  */
230
167
  function getSourceFilesFromWorkspaceProjects(tree) {
@@ -1 +1 @@
1
- {"version":3,"file":"loaders.js","sourceRoot":"","sources":["../../../src/utility/loaders.ts"],"names":[],"mappings":";;;AAAA,2DAAuE;AACvE,2EAA8E;AAC9E,mCAA4C;AAC5C,yCAAsC;AACtC,kCAAkC;AAIlC;;;;;;;GAOG;AACH,SAAgB,eAAe,CAAC,IAAU,EAAE,eAAe,GAAG,eAAe;IAC3E,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;QACjC,MAAM,IAAI,gCAAmB,CAAC,gDAAgD,CAAC,CAAC;KACjF;IACD,MAAM,eAAe,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IACvD,OAAO,eAAsB,CAAC;AAChC,CAAC;AAND,0CAMC;AAED;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAA8C,IAAU,EAAE,mBAAmB,GAAG,eAAe;IAC/H,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE;QACrC,OAAO,IAAI,CAAC;KACb;IACD,OAAO,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAiB,CA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o for Otter Project
3
- *
4
3
  * @param size Size of the logo to generate
5
4
  */
6
5
  export declare const getLogo: (size?: 'medium' | 'small') => string;
@@ -1 +1 @@
1
- {"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../../src/utility/logo.ts"],"names":[],"mappings":"AAiCA;;;;GAIG;AACH,eAAO,MAAM,OAAO,UAAU,QAAQ,GAAG,OAAO,WAM/C,CAAC"}
1
+ {"version":3,"file":"logo.d.ts","sourceRoot":"","sources":["../../../src/utility/logo.ts"],"names":[],"mappings":"AAiCA;;;GAGG;AACH,eAAO,MAAM,OAAO,UAAU,QAAQ,GAAG,OAAO,WAM/C,CAAC"}
@@ -33,7 +33,6 @@ const logoSmall = `
33
33
  `;
34
34
  /**
35
35
  * Generate Logo for Otter Project
36
- *
37
36
  * @param size Size of the logo to generate
38
37
  */
39
38
  const getLogo = (size = 'medium') => {
@@ -1 +1 @@
1
- {"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../src/utility/logo.ts"],"names":[],"mappings":";;;AACA,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;GAsBhB,CAAC;AAEJ,MAAM,SAAS,GAAG;;;;;;GAMf,CAAC;AAEJ;;;;GAIG;AACI,MAAM,OAAO,GAAG,CAAC,OAA2B,QAAQ,EAAE,EAAE;IAC7D,MAAM,KAAK,GAAgC;QACzC,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,SAAS;KACjB,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC,CAAC;AANW,QAAA,OAAO,WAMlB"}
1
+ {"version":3,"file":"logo.js","sourceRoot":"","sources":["../../../src/utility/logo.ts"],"names":[],"mappings":";;;AACA,MAAM,UAAU,GAAG;;;;;;;;;;;;;;;;;;;;;;GAsBhB,CAAC;AAEJ,MAAM,SAAS,GAAG;;;;;;GAMf,CAAC;AAEJ;;;GAGG;AACI,MAAM,OAAO,GAAG,CAAC,OAA2B,QAAQ,EAAE,EAAE;IAC7D,MAAM,KAAK,GAAgC;QACzC,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,SAAS;KACjB,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC,CAAC;AANW,QAAA,OAAO,WAMlB"}
@@ -1,24 +1,36 @@
1
1
  /**
2
2
  * Retrieve the peer dependencies with the given pattern from the given package json file
3
- *
4
3
  * @param packageJsonPath
5
4
  * @param pattern
6
5
  */
7
- export declare function getPeerDepWithPattern(packageJsonPath: string, pattern?: RegExp): {
6
+ export declare function getPeerDepWithPattern(packageJsonPath: string, pattern?: RegExp | string[]): {
8
7
  packageName: string | undefined;
9
8
  packageVersion: string | undefined;
10
9
  matchingPackages: string[];
10
+ matchingPackagesVersions: {
11
+ [k: string]: string | undefined;
12
+ };
11
13
  };
12
14
  /**
13
15
  * Get the list of o3r peer deps from a given package.json file
14
- *
15
16
  * @param packageJsonPath The package json on which we search for o3r peer deps
16
- * @param filterBasics If activated it will remove the basic peer deps (o3r/core, o3r/dev-tools and o3r/schematics) from the list of results
17
+ * @param filterBasics If activated it will remove the basic peer deps (o3r/core, o3r/dev-tools, o3r/workspace and o3r/schematics) from the list of results
17
18
  * @param packagePattern Pattern of the package name to look in the packages peer dependencies.
19
+ * @param versionRangePrefix Prefix to add to the package version to determine Semver Range
18
20
  */
19
- export declare function getO3rPeerDeps(packageJsonPath: string, filterBasics?: boolean, packagePattern?: RegExp): {
21
+ export declare function getO3rPeerDeps(packageJsonPath: string, filterBasics?: boolean, packagePattern?: RegExp, versionRangePrefix?: string): {
20
22
  packageName: string | undefined;
21
- packageVersion: string | undefined;
23
+ packageVersion: string;
22
24
  o3rPeerDeps: string[];
23
25
  };
26
+ /**
27
+ * Get the list of o3r generator deps from a given package.json file
28
+ * @param packageJsonPath The package json on which we search for o3r generator deps
29
+ * @param packagePattern Pattern of the package name to look in the packages generator dependencies.
30
+ */
31
+ export declare function getO3rGeneratorDeps(packageJsonPath: string, packagePattern?: RegExp): {
32
+ packageName: string | undefined;
33
+ packageVersion: string | undefined;
34
+ o3rGeneratorDeps: string[];
35
+ };
24
36
  //# sourceMappingURL=matching-peers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"matching-peers.d.ts","sourceRoot":"","sources":["../../../src/utility/matching-peers.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,SAA0B;;;;EAY/F;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,YAAY,UAAO,EAAE,cAAc,SAAsB;;;;EAUhH"}
1
+ {"version":3,"file":"matching-peers.d.ts","sourceRoot":"","sources":["../../../src/utility/matching-peers.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,GAAE,MAAM,GAAG,MAAM,EAA4B;;;;;;;EAelH;AASD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,YAAY,UAAO,EAAE,cAAc,SAAsB,EAAE,kBAAkB,SAAM;;;;EAU1I;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,cAAc,SAAsB;;;;EAahG"}