@o3r/schematics 10.0.0-next.8 → 11.0.0-next.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) 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/index.js.map +1 -1
  6. package/schematics/ng-add/schema.json +2 -2
  7. package/src/cli/environment.d.ts +2 -0
  8. package/src/cli/environment.d.ts.map +1 -0
  9. package/src/cli/environment.js +5 -0
  10. package/src/cli/environment.js.map +1 -0
  11. package/src/interfaces/angular-workspace.d.ts +11 -29
  12. package/src/interfaces/angular-workspace.d.ts.map +1 -1
  13. package/src/modules/index.d.ts +1 -0
  14. package/src/modules/index.d.ts.map +1 -1
  15. package/src/modules/index.js +1 -0
  16. package/src/modules/index.js.map +1 -1
  17. package/src/modules/modules.constants.d.ts +6 -2
  18. package/src/modules/modules.constants.d.ts.map +1 -1
  19. package/src/modules/modules.constants.js +5 -3
  20. package/src/modules/modules.constants.js.map +1 -1
  21. package/src/modules/modules.display.rule.d.ts +26 -0
  22. package/src/modules/modules.display.rule.d.ts.map +1 -0
  23. package/src/modules/modules.display.rule.js +45 -0
  24. package/src/modules/modules.display.rule.js.map +1 -0
  25. package/src/modules/modules.helpers.d.ts +2 -9
  26. package/src/modules/modules.helpers.d.ts.map +1 -1
  27. package/src/modules/modules.helpers.js +1 -6
  28. package/src/modules/modules.helpers.js.map +1 -1
  29. package/src/rule-factories/add-imports/index.d.ts +0 -1
  30. package/src/rule-factories/add-imports/index.d.ts.map +1 -1
  31. package/src/rule-factories/add-imports/index.js +0 -1
  32. package/src/rule-factories/add-imports/index.js.map +1 -1
  33. package/src/rule-factories/check-packages-peers/index.d.ts +0 -1
  34. package/src/rule-factories/check-packages-peers/index.d.ts.map +1 -1
  35. package/src/rule-factories/check-packages-peers/index.js +4 -7
  36. package/src/rule-factories/check-packages-peers/index.js.map +1 -1
  37. package/src/rule-factories/dev-tools/devtools-registration.d.ts +25 -0
  38. package/src/rule-factories/dev-tools/devtools-registration.d.ts.map +1 -0
  39. package/src/rule-factories/dev-tools/devtools-registration.js +89 -0
  40. package/src/rule-factories/dev-tools/devtools-registration.js.map +1 -0
  41. package/src/rule-factories/dev-tools/index.d.ts +2 -0
  42. package/src/rule-factories/dev-tools/index.d.ts.map +1 -0
  43. package/src/rule-factories/dev-tools/index.js +5 -0
  44. package/src/rule-factories/dev-tools/index.js.map +1 -0
  45. package/src/rule-factories/eslint-fix/index.d.ts +1 -18
  46. package/src/rule-factories/eslint-fix/index.d.ts.map +1 -1
  47. package/src/rule-factories/eslint-fix/index.js +17 -26
  48. package/src/rule-factories/eslint-fix/index.js.map +1 -1
  49. package/src/rule-factories/get-test-frameworks/index.d.ts +0 -1
  50. package/src/rule-factories/get-test-frameworks/index.d.ts.map +1 -1
  51. package/src/rule-factories/get-test-frameworks/index.js +0 -1
  52. package/src/rule-factories/get-test-frameworks/index.js.map +1 -1
  53. package/src/rule-factories/index.d.ts +1 -0
  54. package/src/rule-factories/index.d.ts.map +1 -1
  55. package/src/rule-factories/index.js +1 -0
  56. package/src/rule-factories/index.js.map +1 -1
  57. package/src/rule-factories/ng-add/index.d.ts +2 -5
  58. package/src/rule-factories/ng-add/index.d.ts.map +1 -1
  59. package/src/rule-factories/ng-add/index.js +107 -83
  60. package/src/rule-factories/ng-add/index.js.map +1 -1
  61. package/src/rule-factories/remove-packages/index.d.ts +0 -1
  62. package/src/rule-factories/remove-packages/index.d.ts.map +1 -1
  63. package/src/rule-factories/remove-packages/index.js +0 -1
  64. package/src/rule-factories/remove-packages/index.js.map +1 -1
  65. package/src/rule-factories/update-imports/list-of-vars.d.ts +1 -2
  66. package/src/rule-factories/update-imports/list-of-vars.d.ts.map +1 -1
  67. package/src/rule-factories/update-imports/list-of-vars.js.map +1 -1
  68. package/src/rule-factories/update-imports/update-imports-with-scope.d.ts +0 -1
  69. package/src/rule-factories/update-imports/update-imports-with-scope.d.ts.map +1 -1
  70. package/src/rule-factories/update-imports/update-imports-with-scope.js +0 -1
  71. package/src/rule-factories/update-imports/update-imports-with-scope.js.map +1 -1
  72. package/src/rule-factories/update-imports/update-ts-imports.d.ts +0 -1
  73. package/src/rule-factories/update-imports/update-ts-imports.d.ts.map +1 -1
  74. package/src/rule-factories/update-imports/update-ts-imports.js +0 -1
  75. package/src/rule-factories/update-imports/update-ts-imports.js.map +1 -1
  76. package/src/rule-factories/update-imports/v7-to-v8-map-object.js +1 -1
  77. package/src/rule-factories/update-imports/v7-to-v8-map-object.js.map +1 -1
  78. package/src/rule-factories/vscode-extensions/index.d.ts +0 -1
  79. package/src/rule-factories/vscode-extensions/index.d.ts.map +1 -1
  80. package/src/rule-factories/vscode-extensions/index.js +0 -1
  81. package/src/rule-factories/vscode-extensions/index.js.map +1 -1
  82. package/src/rules/install.d.ts +0 -1
  83. package/src/rules/install.d.ts.map +1 -1
  84. package/src/rules/install.js +0 -1
  85. package/src/rules/install.js.map +1 -1
  86. package/src/tasks/eslint/index.d.ts +17 -1
  87. package/src/tasks/eslint/index.d.ts.map +1 -1
  88. package/src/tasks/eslint/index.js +15 -6
  89. package/src/tasks/eslint/index.js.map +1 -1
  90. package/src/tasks/package-manager/add-dev-dependency.d.ts +1 -0
  91. package/src/tasks/package-manager/add-dev-dependency.d.ts.map +1 -1
  92. package/src/tasks/package-manager/add-dev-dependency.js +3 -1
  93. package/src/tasks/package-manager/add-dev-dependency.js.map +1 -1
  94. package/src/tasks/package-manager/interfaces.d.ts +9 -0
  95. package/src/tasks/package-manager/interfaces.d.ts.map +1 -1
  96. package/src/tasks/package-manager/npm-install.d.ts +2 -1
  97. package/src/tasks/package-manager/npm-install.d.ts.map +1 -1
  98. package/src/tasks/package-manager/npm-install.js +3 -1
  99. package/src/tasks/package-manager/npm-install.js.map +1 -1
  100. package/src/utility/ast.d.ts +4 -20
  101. package/src/utility/ast.d.ts.map +1 -1
  102. package/src/utility/ast.js +0 -18
  103. package/src/utility/ast.js.map +1 -1
  104. package/src/utility/builder.d.ts +11 -0
  105. package/src/utility/builder.d.ts.map +1 -0
  106. package/src/utility/builder.js +21 -0
  107. package/src/utility/builder.js.map +1 -0
  108. package/src/utility/collection.d.ts +2 -5
  109. package/src/utility/collection.d.ts.map +1 -1
  110. package/src/utility/collection.js +11 -9
  111. package/src/utility/collection.js.map +1 -1
  112. package/src/utility/component.d.ts +0 -6
  113. package/src/utility/component.d.ts.map +1 -1
  114. package/src/utility/component.js +4 -9
  115. package/src/utility/component.js.map +1 -1
  116. package/src/utility/dependencies.d.ts +0 -2
  117. package/src/utility/dependencies.d.ts.map +1 -1
  118. package/src/utility/dependencies.js +0 -2
  119. package/src/utility/dependencies.js.map +1 -1
  120. package/src/utility/environment.d.ts +27 -0
  121. package/src/utility/environment.d.ts.map +1 -0
  122. package/src/utility/environment.js +51 -0
  123. package/src/utility/environment.js.map +1 -0
  124. package/src/utility/error.d.ts +7 -0
  125. package/src/utility/error.d.ts.map +1 -0
  126. package/src/utility/error.js +17 -0
  127. package/src/utility/error.js.map +1 -0
  128. package/src/utility/file-info.d.ts +11 -1
  129. package/src/utility/file-info.d.ts.map +1 -1
  130. package/src/utility/file-info.js +46 -4
  131. package/src/utility/file-info.js.map +1 -1
  132. package/src/utility/generation.d.ts +0 -1
  133. package/src/utility/generation.d.ts.map +1 -1
  134. package/src/utility/generation.js +7 -11
  135. package/src/utility/generation.js.map +1 -1
  136. package/src/utility/gitignore.d.ts +0 -1
  137. package/src/utility/gitignore.d.ts.map +1 -1
  138. package/src/utility/gitignore.js +0 -1
  139. package/src/utility/gitignore.js.map +1 -1
  140. package/src/utility/index.d.ts +10 -7
  141. package/src/utility/index.d.ts.map +1 -1
  142. package/src/utility/index.js +10 -7
  143. package/src/utility/index.js.map +1 -1
  144. package/src/utility/loaders.d.ts +12 -50
  145. package/src/utility/loaders.d.ts.map +1 -1
  146. package/src/utility/loaders.js +34 -97
  147. package/src/utility/loaders.js.map +1 -1
  148. package/src/utility/logo.d.ts +0 -1
  149. package/src/utility/logo.d.ts.map +1 -1
  150. package/src/utility/logo.js +0 -1
  151. package/src/utility/logo.js.map +1 -1
  152. package/src/utility/matching-peers.d.ts +11 -3
  153. package/src/utility/matching-peers.d.ts.map +1 -1
  154. package/src/utility/matching-peers.js +26 -5
  155. package/src/utility/matching-peers.js.map +1 -1
  156. package/src/utility/modules.d.ts +4 -9
  157. package/src/utility/modules.d.ts.map +1 -1
  158. package/src/utility/modules.js +17 -22
  159. package/src/utility/modules.js.map +1 -1
  160. package/src/utility/monorepo.d.ts +0 -5
  161. package/src/utility/monorepo.d.ts.map +1 -1
  162. package/src/utility/monorepo.js +0 -5
  163. package/src/utility/monorepo.js.map +1 -1
  164. package/src/utility/package-manager-runner.d.ts +24 -7
  165. package/src/utility/package-manager-runner.d.ts.map +1 -1
  166. package/src/utility/package-manager-runner.js +70 -10
  167. package/src/utility/package-manager-runner.js.map +1 -1
  168. package/src/utility/package-version.d.ts +0 -2
  169. package/src/utility/package-version.d.ts.map +1 -1
  170. package/src/utility/package-version.js +0 -2
  171. package/src/utility/package-version.js.map +1 -1
  172. package/src/utility/question.d.ts +0 -1
  173. package/src/utility/question.d.ts.map +1 -1
  174. package/src/utility/question.js +0 -1
  175. package/src/utility/question.js.map +1 -1
  176. package/src/utility/routes.d.ts +0 -3
  177. package/src/utility/routes.d.ts.map +1 -1
  178. package/src/utility/routes.js +0 -5
  179. package/src/utility/routes.js.map +1 -1
  180. package/src/utility/sub-entry.d.ts +0 -2
  181. package/src/utility/sub-entry.d.ts.map +1 -1
  182. package/src/utility/sub-entry.js +0 -2
  183. package/src/utility/sub-entry.js.map +1 -1
  184. package/src/utility/template-property.helper.d.ts +0 -15
  185. package/src/utility/template-property.helper.d.ts.map +1 -1
  186. package/src/utility/template-property.helper.js +0 -16
  187. package/src/utility/template-property.helper.js.map +1 -1
  188. package/src/utility/update-imports.d.ts +0 -1
  189. package/src/utility/update-imports.d.ts.map +1 -1
  190. package/src/utility/update-imports.js +0 -1
  191. package/src/utility/update-imports.js.map +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <h1 align="center">Otter schematics</h1>
2
2
  <p align="center">
3
- <img src="https://raw.githubusercontent.com/AmadeusITGroup/otter/main/.attachments/otter.png" alt="Super cute Otter!" width="40%"/>
3
+ <img src="https://raw.githubusercontent.com/AmadeusITGroup/otter/main/assets/logo/otter.png" alt="Super cute Otter!" width="40%"/>
4
4
  </p>
5
5
 
6
6
  This package is an [Otter Framework Module](https://github.com/AmadeusITGroup/otter/tree/main/docs/core/MODULE.md).
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@o3r/schematics",
3
- "version": "10.0.0-next.8",
3
+ "version": "11.0.0-next.0",
4
4
  "description": "Schematics module of the Otter framework",
5
5
  "main": "./src/public_api.js",
6
+ "typings": "./src/public_api.d.ts",
6
7
  "keywords": [
7
8
  "schematics",
8
9
  "otter"
@@ -16,14 +17,18 @@
16
17
  "prepare:build:builders": "yarn cpy 'schematics/**/*.json' dist/schematics && yarn cpy 'collection.json' dist",
17
18
  "build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest"
18
19
  },
20
+ "bin": {
21
+ "environment": "src/cli/environment.js"
22
+ },
19
23
  "peerDependencies": {
20
- "@angular-devkit/architect": "~0.1602.0",
21
- "@angular-devkit/core": "~16.2.0",
22
- "@angular-devkit/schematics": "~16.2.0",
23
- "@angular/cli": "~16.2.0",
24
- "@schematics/angular": "~16.2.0",
24
+ "@angular-devkit/architect": "~0.1700.0",
25
+ "@angular-devkit/core": "~17.0.0",
26
+ "@angular-devkit/schematics": "~17.0.0",
27
+ "@angular/cli": "~17.0.0",
28
+ "@schematics/angular": "~17.0.0",
29
+ "eslint": "^8.42.0",
25
30
  "rxjs": "^7.8.1",
26
- "typescript": "~5.1.6"
31
+ "typescript": "~5.2.2"
27
32
  },
28
33
  "peerDependenciesMeta": {
29
34
  "@angular-devkit/architect": {
@@ -31,61 +36,65 @@
31
36
  },
32
37
  "@angular-devkit/core": {
33
38
  "optional": true
39
+ },
40
+ "eslint": {
41
+ "optional": true
34
42
  }
35
43
  },
36
44
  "dependencies": {
37
45
  "chalk": "^4.1.2",
38
46
  "globby": "^11.1.0",
39
- "minimatch": "^9.0.0",
47
+ "minimatch": "~9.0.3",
40
48
  "semver": "^7.5.2",
41
49
  "tslib": "^2.5.3"
42
50
  },
43
51
  "devDependencies": {
44
- "@angular-devkit/build-angular": "~16.2.0",
45
- "@angular-devkit/core": "~16.2.0",
46
- "@angular-devkit/schematics": "~16.2.0",
47
- "@angular-eslint/eslint-plugin": "~16.1.0",
48
- "@angular/cli": "~16.2.0",
49
- "@angular/common": "~16.2.0",
50
- "@angular/compiler": "~16.2.0",
51
- "@angular/compiler-cli": "~16.2.0",
52
- "@angular/core": "~16.2.0",
53
- "@angular/platform-browser": "~16.2.0",
54
- "@angular/platform-browser-dynamic": "~16.2.0",
55
- "@babel/core": "~7.22.0",
56
- "@babel/preset-typescript": "~7.22.0",
52
+ "@angular-devkit/build-angular": "~17.0.3",
53
+ "@angular-devkit/core": "~17.0.3",
54
+ "@angular-devkit/schematics": "~17.0.3",
55
+ "@angular-eslint/eslint-plugin": "~17.1.0",
56
+ "@angular/cli": "~17.0.3",
57
+ "@angular/common": "~17.0.4",
58
+ "@angular/compiler": "~17.0.4",
59
+ "@angular/compiler-cli": "~17.0.4",
60
+ "@angular/core": "~17.0.4",
61
+ "@angular/platform-browser": "~17.0.4",
62
+ "@angular/platform-browser-dynamic": "~17.0.4",
63
+ "@babel/core": "~7.23.0",
64
+ "@babel/preset-typescript": "~7.23.0",
57
65
  "@compodoc/compodoc": "^1.1.19",
58
- "@nx/jest": "~16.8.0",
59
- "@nx/js": "~16.8.0",
60
- "@nx/linter": "~16.8.0",
61
- "@o3r/build-helpers": "^10.0.0-next.8",
62
- "@o3r/dev-tools": "^10.0.0-next.8",
63
- "@o3r/eslint-plugin": "^10.0.0-next.8",
64
- "@schematics/angular": "~16.2.0",
66
+ "@nx/eslint": "~17.1.1",
67
+ "@nx/eslint-plugin": "~17.1.1",
68
+ "@nx/jest": "~17.1.1",
69
+ "@nx/js": "~17.1.1",
70
+ "@o3r/build-helpers": "^11.0.0-next.0",
71
+ "@o3r/eslint-plugin": "^11.0.0-next.0",
72
+ "@schematics/angular": "~17.0.3",
65
73
  "@types/jest": "~29.5.2",
66
- "@types/node": "^18.0.0",
74
+ "@types/node": "^20.0.0",
67
75
  "@types/semver": "^7.3.13",
68
- "@typescript-eslint/eslint-plugin": "^5.59.9",
69
- "@typescript-eslint/parser": "^5.59.9",
70
- "cpy-cli": "^4.2.0",
76
+ "@typescript-eslint/eslint-plugin": "6.11.0",
77
+ "@typescript-eslint/parser": "^6.11.0",
78
+ "cpy-cli": "^5.0.0",
71
79
  "eslint": "^8.42.0",
72
80
  "eslint-import-resolver-node": "^0.3.4",
73
- "eslint-plugin-jest": "~27.2.3",
74
- "eslint-plugin-jsdoc": "~46.8.0",
81
+ "eslint-plugin-jest": "~27.6.0",
82
+ "eslint-plugin-jsdoc": "~48.0.0",
75
83
  "eslint-plugin-prefer-arrow": "~1.2.3",
76
- "eslint-plugin-unicorn": "^47.0.0",
84
+ "eslint-plugin-unicorn": "^50.0.0",
77
85
  "jest": "~29.7.0",
78
86
  "jest-junit": "~16.0.0",
87
+ "jsonc-eslint-parser": "~2.4.0",
79
88
  "jsonschema": "~1.4.1",
80
- "nx": "~16.8.0",
89
+ "nx": "~17.1.1",
81
90
  "rxjs": "^7.8.1",
82
91
  "ts-jest": "~29.1.1",
83
- "type-fest": "^3.12.0",
84
- "typescript": "~5.1.6",
85
- "zone.js": "~0.13.1"
92
+ "type-fest": "^4.3.1",
93
+ "typescript": "~5.2.2",
94
+ "zone.js": "~0.14.2"
86
95
  },
87
96
  "engines": {
88
- "node": ">=16.0.0"
97
+ "node": ">=18.0.0"
89
98
  },
90
99
  "schematics": "./collection.json",
91
100
  "type": "commonjs",
@@ -152,5 +161,6 @@
152
161
  ],
153
162
  "bugs": "https://github.com/AmadeusITGroup/otter/issues",
154
163
  "repository": "https://github.com/AmadeusITGroup/otter",
155
- "license": "BSD-3-Clause"
164
+ "license": "BSD-3-Clause",
165
+ "homepage": "https://amadeusitgroup.github.io/otter/"
156
166
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAO/E;;GAEG;AACH,wBAAgB,KAAK,IAAI,IAAI,CAwB5B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAM/E;;GAEG;AACH,wBAAgB,KAAK,IAAI,IAAI,CA0B5B"}
@@ -4,13 +4,14 @@ exports.ngAdd = void 0;
4
4
  const fs = require("node:fs");
5
5
  const path = require("node:path");
6
6
  const rxjs_1 = require("rxjs");
7
- const schematics_1 = require("@o3r/schematics");
8
7
  /**
9
8
  * Add Otter schematics to an Angular Project
10
9
  */
11
10
  function ngAdd() {
12
11
  const schematicsDependencies = ['@angular-devkit/architect', '@angular-devkit/schematics', '@angular-devkit/core', '@schematics/angular', 'globby'];
13
12
  return async (tree, context) => {
13
+ // eslint-disable-next-line @typescript-eslint/naming-convention
14
+ const { AddDevInstall } = await Promise.resolve().then(() => require('@o3r/schematics'));
14
15
  context.logger.info('Running ng add for schematics');
15
16
  const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
16
17
  const treePackageJson = tree.readJson('./package.json');
@@ -23,7 +24,7 @@ function ngAdd() {
23
24
  treePackageJson.devDependencies = { ...treePackageJson.devDependencies, [dependency]: version };
24
25
  packageName = `${packageName} ${dependency}${version ? '@' + version : ''}`;
25
26
  }
26
- context.addTask(new schematics_1.AddDevInstall({
27
+ context.addTask(new AddDevInstall({
27
28
  hideOutput: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sSchema",
4
4
  "title": "Add Otter schematics ",
5
5
  "description": "ngAdd Otter schematics ",
@@ -12,7 +12,7 @@
12
12
  }
13
13
  }
14
14
  },
15
- "additionalProperties": false,
15
+ "additionalProperties": true,
16
16
  "required": [
17
17
  ]
18
18
  }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../../src/cli/environment.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const index_1 = require("../utility/index");
4
+ console.info(`Environment information: ${(0, index_1.getEnvironmentInfoStringify)()}`);
5
+ //# sourceMappingURL=environment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.js","sourceRoot":"","sources":["../../../src/cli/environment.ts"],"names":[],"mappings":";;AAAA,4CAA+D;AAE/D,OAAO,CAAC,IAAI,CAAC,4BAA4B,IAAA,mCAA2B,GAAE,EAAE,CAAC,CAAC"}
@@ -18,47 +18,29 @@ export interface WorkspaceLayout {
18
18
  appsDir: string;
19
19
  }
20
20
  export interface WorkspaceSchematics extends SchematicOptions {
21
- /** @deprecated */
22
- '@otter/ng-tools:api-service'?: {
21
+ '@o3r/core:component'?: {
23
22
  path: string;
24
- };
25
- /** @deprecated */
26
- '@otter/ng-tools:component'?: {
27
- path: string;
28
- };
29
- /** @deprecated */
30
- '@otter/ng-tools:service'?: {
31
- path: string;
32
- };
33
- /** @deprecated */
34
- '@otter/ng-tools:store'?: {
35
- path: string;
36
- };
37
- /** @deprecated */
38
- '@otter/ng-tools:schematics'?: {
23
+ } & WorkspaceSchematics['*:*'];
24
+ '@o3r/core:service'?: {
39
25
  path: string;
40
- };
41
- '@o3r/components:component'?: {
26
+ } & WorkspaceSchematics['*:*'];
27
+ '@o3r/core:store'?: {
42
28
  path: string;
43
- };
44
- '@o3r/services:service'?: {
45
- path: string;
46
- };
47
- '@o3r/store:store'?: {
48
- path: string;
49
- };
29
+ } & WorkspaceSchematics['*:*'];
50
30
  '@o3r/core:schematics'?: {
51
31
  path: string;
52
- };
32
+ } & WorkspaceSchematics['*:*'];
53
33
  '*:ng-add'?: {
54
34
  enableMetadataExtract?: boolean;
55
- };
35
+ registerDevtool?: boolean;
36
+ } & WorkspaceSchematics['*:*'];
56
37
  '*:*'?: WorkspaceLayout & {
57
- /** in adition to the WorkspaceLayout, an optional testFramework attribute is available */
38
+ /** in addition to the WorkspaceLayout, an optional testFramework attribute is available */
58
39
  testFramework?: AvailableTestFrameworks;
59
40
  };
60
41
  }
61
42
  export interface WorkspaceProject extends NgWorkspaceProject {
43
+ name?: string;
62
44
  architect?: WorkspaceTool;
63
45
  i18n?: WorkspaceProjectI18n;
64
46
  prefix: string;
@@ -1 +1 @@
1
- {"version":3,"file":"angular-workspace.d.ts","sourceRoot":"","sources":["../../../src/interfaces/angular-workspace.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,QAAQ,IAAI,kBAAkB,EAC9B,MAAM,IAAI,iBAAiB,EAC3B,gBAAgB,EACjB,MAAM,0CAA0C,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,SAAS,CAAC;AAEzD,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AACD,MAAM,WAAW,aAAa;IAC5B,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC9B,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D,kBAAkB;IAClB,6BAA6B,CAAC,EAAE;QAC9B,IA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AC3B,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,eAAe,GAAG;QACxB,2FAA2F;QAC3F,aAAa,CAAC,EAAE,uBAAuB,CAAC;KACzC,CAAC;CACH;AACD,MAAM,WAAW,gBAAiB,SAAQ,kBAAkB;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,QAAQ,EAAE;QACN,CAAC,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC;KACjC,CAAC;IACF,UAAU,CAAC,EAAE,mBAAmB,CAAC;CAClC"}
@@ -1,3 +1,4 @@
1
1
  export * from './modules.constants';
2
2
  export * from './modules.helpers';
3
+ export * from './modules.display.rule';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC"}
@@ -3,4 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./modules.constants"), exports);
5
5
  tslib_1.__exportStar(require("./modules.helpers"), exports);
6
+ tslib_1.__exportStar(require("./modules.display.rule"), exports);
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC;AACpC,4DAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/index.ts"],"names":[],"mappings":";;;AAAA,8DAAoC;AACpC,4DAAkC;AAClC,iEAAuC"}
@@ -25,10 +25,14 @@ export type NPMRegistrySearchResponse = {
25
25
  export declare const OTTER_MODULE_PREFIX = "otter-";
26
26
  /** Otter NPM Keyword pattern */
27
27
  export type OtterModuleTag<T extends string = ''> = `${typeof OTTER_MODULE_PREFIX}${T}`;
28
- /** List of whitelisted package scopes for Otter modules */
29
- export declare const OTTER_MODULE_SUPPORTED_SCOPES: readonly ["otter", "o3r"];
28
+ /** Prefix of the Otter module keyword tags */
29
+ export declare const OTTER_MODULE_PRESET_PREFIX: OtterModuleTag<'preset-'>;
30
+ /** Otter Preset NPM Keyword pattern */
31
+ export type OtterModulePreset<T extends string = ''> = `${typeof OTTER_MODULE_PRESET_PREFIX}${T}`;
30
32
  /** Keyword defining an Otter compatible module */
31
33
  export declare const OTTER_MODULE_KEYWORD: OtterModuleTag<'module'>;
32
34
  /** Package Keyword to identify the module allowing CMS administration */
33
35
  export declare const OTTER_KEYWORD_CMS: OtterModuleTag<'cms'>;
36
+ /** List of whitelisted package scopes for Otter modules */
37
+ export declare const OTTER_MODULE_SUPPORTED_SCOPES: readonly ["otter", "o3r"];
34
38
  //# sourceMappingURL=modules.constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modules.constants.d.ts","sourceRoot":"","sources":["../../../src/modules/modules.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,4CAA4C;AAC5C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,WAAW,EA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CAAC;IACb,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,KAAK,CAAC,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,+BAA+B;IAC/B,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF,wDAAwD;AACxD,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE;QAAE,OAAO,CAAC,EAAE,kBAAkB,CAAA;KAAE,EAAE,CAAC;CAC7C,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAC5C,gCAAgC;AAChC,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,IAAI,GAAG,OAAO,mBAAmB,GAAG,CAAC,EAAE,CAAC;AAExF,8CAA8C;AAC9C,eAAO,MAAM,0BAA0B,EAAE,cAAc,CAAC,SAAS,CAAmB,CAAC;AACrF,uCAAuC;AACvC,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,IAAI,GAAG,OAAO,0BAA0B,GAAG,CAAC,EAAE,CAAC;AAElG,kDAAkD;AAClD,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,QAAQ,CAAkB,CAAC;AAC7E,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,KAAK,CAAe,CAAC;AAEpE,2DAA2D;AAC3D,eAAO,MAAM,6BAA6B,2BAA4B,CAAC"}
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OTTER_KEYWORD_CMS = exports.OTTER_MODULE_KEYWORD = exports.OTTER_MODULE_SUPPORTED_SCOPES = exports.OTTER_MODULE_PREFIX = void 0;
3
+ exports.OTTER_MODULE_SUPPORTED_SCOPES = exports.OTTER_KEYWORD_CMS = exports.OTTER_MODULE_KEYWORD = exports.OTTER_MODULE_PRESET_PREFIX = exports.OTTER_MODULE_PREFIX = void 0;
4
4
  /** Prefix of the Otter module keyword tags */
5
5
  exports.OTTER_MODULE_PREFIX = 'otter-';
6
- /** List of whitelisted package scopes for Otter modules */
7
- exports.OTTER_MODULE_SUPPORTED_SCOPES = ['otter', 'o3r'];
6
+ /** Prefix of the Otter module keyword tags */
7
+ exports.OTTER_MODULE_PRESET_PREFIX = 'otter-preset-';
8
8
  /** Keyword defining an Otter compatible module */
9
9
  exports.OTTER_MODULE_KEYWORD = 'otter-module';
10
10
  /** Package Keyword to identify the module allowing CMS administration */
11
11
  exports.OTTER_KEYWORD_CMS = 'otter-cms';
12
+ /** List of whitelisted package scopes for Otter modules */
13
+ exports.OTTER_MODULE_SUPPORTED_SCOPES = ['otter', 'o3r'];
12
14
  //# sourceMappingURL=modules.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modules.constants.js","sourceRoot":"","sources":["../../../src/modules/modules.constants.ts"],"names":[],"mappings":";;;AAyBA,8CAA8C;AACjC,QAAA,mBAAmB,GAAG,QAAQ,CAAC;AAG5C,2DAA2D;AAC9C,QAAA,6BAA6B,GAAG,CAAC,OAAO,EAAE,KAAK,CAAU,CAAC;AACvE,kDAAkD;AACrC,QAAA,oBAAoB,GAA6B,cAAc,CAAC;AAC7E,yEAAyE;AAC5D,QAAA,iBAAiB,GAA0B,WAAW,CAAC"}
1
+ {"version":3,"file":"modules.constants.js","sourceRoot":"","sources":["../../../src/modules/modules.constants.ts"],"names":[],"mappings":";;;AAyBA,8CAA8C;AACjC,QAAA,mBAAmB,GAAG,QAAQ,CAAC;AAI5C,8CAA8C;AACjC,QAAA,0BAA0B,GAA8B,eAAe,CAAC;AAIrF,kDAAkD;AACrC,QAAA,oBAAoB,GAA6B,cAAc,CAAC;AAC7E,yEAAyE;AAC5D,QAAA,iBAAiB,GAA0B,WAAW,CAAC;AAEpE,2DAA2D;AAC9C,QAAA,6BAA6B,GAAG,CAAC,OAAO,EAAE,KAAK,CAAU,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ /** Options for the Display Module rule */
3
+ export interface DisplayModuleListOptions {
4
+ /**
5
+ * List of whitelisted scopes
6
+ * @default {@see OTTER_MODULE_SUPPORTED_SCOPES}
7
+ */
8
+ scopeWhitelist: string[] | readonly string[];
9
+ /**
10
+ * Keyword to search for Otter modules
11
+ * @default {@see OTTER_MODULE_KEYWORD}
12
+ */
13
+ keyword: string;
14
+ /** Display only the Otter modules with CMS administration */
15
+ onlyCmsModules: boolean;
16
+ /** Display only the Otter modules that are not already installed */
17
+ onlyNotInstalledModules: boolean;
18
+ /** Name of the package where to install add the dependency */
19
+ packageName: string;
20
+ }
21
+ /**
22
+ * Display the list of available Otter modules
23
+ * @param options Options of the Display Module list
24
+ */
25
+ export declare function displayModuleListRule(options?: Partial<DisplayModuleListOptions>): Rule;
26
+ //# sourceMappingURL=modules.display.rule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modules.display.rule.d.ts","sourceRoot":"","sources":["../../../src/modules/modules.display.rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAMvD,0CAA0C;AAC1C,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAAC;IAC7C;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,6DAA6D;IAC7D,cAAc,EAAE,OAAO,CAAC;IACxB,oEAAoE;IACpE,uBAAuB,EAAE,OAAO,CAAC;IACjC,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAiCvF"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.displayModuleListRule = void 0;
4
+ const node_os_1 = require("node:os");
5
+ const modules_constants_1 = require("./modules.constants");
6
+ const utility_1 = require("../utility");
7
+ const modules_helpers_1 = require("./modules.helpers");
8
+ /**
9
+ * Display the list of available Otter modules
10
+ * @param options Options of the Display Module list
11
+ */
12
+ function displayModuleListRule(options) {
13
+ const scopeWhitelist = options?.scopeWhitelist || modules_constants_1.OTTER_MODULE_SUPPORTED_SCOPES;
14
+ const keyword = options?.keyword || modules_constants_1.OTTER_MODULE_KEYWORD;
15
+ return async (tree, context) => {
16
+ const tagMap = { [modules_constants_1.OTTER_KEYWORD_CMS]: 'CMS enabler' };
17
+ // const { getAvailableModulesWithLatestPackage, formatModuleDescription, getWorkspaceConfig, getPackageManagerExecutor } = await import('@o3r/schematics');
18
+ const workspaceConfig = (0, utility_1.getWorkspaceConfig)(tree);
19
+ try {
20
+ const modules = await (0, modules_helpers_1.getAvailableModulesWithLatestPackage)(keyword, {
21
+ scopeWhitelist,
22
+ onlyNotInstalled: !!options?.onlyNotInstalledModules,
23
+ logger: context.logger,
24
+ workspaceConfig
25
+ });
26
+ const message = modules
27
+ .filter((mod) => !options?.onlyCmsModules || mod.keywords?.includes(modules_constants_1.OTTER_KEYWORD_CMS))
28
+ .map((mod) => (0, modules_helpers_1.formatModuleDescription)(mod, (0, utility_1.getPackageManagerExecutor)(workspaceConfig, options?.packageName), tagMap))
29
+ .filter((msg) => !!msg)
30
+ .join(node_os_1.EOL + node_os_1.EOL);
31
+ if (message) {
32
+ context.logger.info('The following modules are now available for your application, add them according to your needs:');
33
+ // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
34
+ context.logger.info(node_os_1.EOL + message);
35
+ }
36
+ }
37
+ catch (e) {
38
+ context.logger.debug('Error during the module discovery', e);
39
+ context.logger.error('List of Otter modules unavailable');
40
+ }
41
+ return () => tree;
42
+ };
43
+ }
44
+ exports.displayModuleListRule = displayModuleListRule;
45
+ //# sourceMappingURL=modules.display.rule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modules.display.rule.js","sourceRoot":"","sources":["../../../src/modules/modules.display.rule.ts"],"names":[],"mappings":";;;AACA,qCAA8B;AAC9B,2DAA2G;AAC3G,wCAA2E;AAC3E,uDAAkG;AAsBlG;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,OAA2C;IAE/E,MAAM,cAAc,GAAG,OAAO,EAAE,cAAc,IAAI,iDAA6B,CAAC;IAChF,MAAM,OAAO,GAAG,OAAO,EAAE,OAAO,IAAI,wCAAoB,CAAC;IAEzD,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC7B,MAAM,MAAM,GAA2B,EAAE,CAAC,qCAAiB,CAAC,EAAE,aAAa,EAAE,CAAC;QAE9E,4JAA4J;QAC5J,MAAM,eAAe,GAAG,IAAA,4BAAkB,EAAC,IAAI,CAAC,CAAC;QACjD,IAAI;YACF,MAAM,OAAO,GAAG,MAAM,IAAA,sDAAoC,EAAC,OAAO,EAAE;gBAClE,cAAc;gBACd,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,uBAAuB;gBACpD,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,eAAe;aAChB,CAAC,CAAC;YACH,MAAM,OAAO,GAAG,OAAO;iBACpB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,cAAc,IAAI,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,qCAAiB,CAAC,CAAC;iBACtF,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,yCAAuB,EAAC,GAAG,EAAE,IAAA,mCAAyB,EAAC,eAAe,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;iBACpH,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;iBACtB,IAAI,CAAC,aAAG,GAAG,aAAG,CAAC,CAAC;YACnB,IAAI,OAAO,EAAE;gBACX,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,iGAAiG,CAAC,CAAC;gBACvH,qEAAqE;gBACrE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,aAAG,GAAG,OAAO,CAAC,CAAC;aACpC;SACF;QAAC,OAAO,CAAM,EAAE;YACf,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mCAAmC,EAAE,CAAC,CAAC,CAAC;YAC7D,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;SAC3D;QACD,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;IACpB,CAAC,CAAC;AACJ,CAAC;AAjCD,sDAiCC"}
@@ -1,9 +1,8 @@
1
1
  import { NpmRegistryPackage } from './modules.constants';
2
2
  import type { logging } from '@angular-devkit/core';
3
- import { PackageManagerOptions, SupportedPackageManagerExecutors } from '../utility';
3
+ import { PackageManagerOptions } from '../utility';
4
4
  /**
5
5
  * Determine if the given keyword is an Otter tag
6
- *
7
6
  * @param keyword Keyword to identify
8
7
  * @param expect tag expected for the Otter keyword
9
8
  */
@@ -12,20 +11,17 @@ export declare const isOtterTag: <T extends string | undefined>(keyword: any, ex
12
11
  export interface AvailableModuleOptions extends PackageManagerOptions {
13
12
  /**
14
13
  * Determine if only the packages that are NOT installed should be returned
15
- *
16
14
  * @default false
17
15
  */
18
16
  onlyNotInstalled?: boolean;
19
17
  /**
20
18
  * Npm Registry to fetch to get the package information
21
- *
22
19
  * @default registry.npmjs.org
23
20
  */
24
21
  npmRegistryToFetch?: string;
25
22
  }
26
23
  /**
27
24
  * Get Available Otter modules on NPMjs.org
28
- *
29
25
  * @param keyword Keyword to search for Otter modules
30
26
  * @param scopeWhitelist List of whitelisted scopes
31
27
  * @param options
@@ -35,7 +31,6 @@ export declare function getAvailableModules(keyword: string, scopeWhitelist: str
35
31
  export interface AvailableModuleOptionsWithLatestPackage extends AvailableModuleOptions {
36
32
  /**
37
33
  * List of whitelisted scopes
38
- *
39
34
  * @default {@see OTTER_MODULE_SUPPORTED_SCOPES}
40
35
  */
41
36
  scopeWhitelist?: string[] | readonly string[];
@@ -43,18 +38,16 @@ export interface AvailableModuleOptionsWithLatestPackage extends AvailableModule
43
38
  /**
44
39
  * Get Available Otter modules on NPMjs.org and get latest package information
45
40
  * Similar to {@link getAvailableModules} with additional calls to retrieve all the package's information
46
- *
47
41
  * @param keyword Keyword to search for Otter modules
48
42
  * @param options
49
43
  */
50
44
  export declare function getAvailableModulesWithLatestPackage(keyword: string | undefined, options: AvailableModuleOptionsWithLatestPackage): Promise<NpmRegistryPackage[]>;
51
45
  /**
52
46
  * Format a module description to be displayed in the terminal
53
- *
54
47
  * @param npmPackage Npm Package to display
55
48
  * @param runner runner according to the context
56
49
  * @param keywordTags Mapping of the NPM package Keywords and a displayed tag
57
50
  * @param logger Logger to use to report package read failure (as debug message)
58
51
  */
59
- export declare function formatModuleDescription(npmPackage: NpmRegistryPackage, runner?: SupportedPackageManagerExecutors, keywordTags?: Record<string, string>, logger?: logging.LoggerApi): string;
52
+ export declare function formatModuleDescription(npmPackage: NpmRegistryPackage, runner?: string, keywordTags?: Record<string, string>, logger?: logging.LoggerApi): string;
60
53
  //# sourceMappingURL=modules.helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modules.helpers.d.ts","sourceRoot":"","sources":["../../../src/modules/modules.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAuH,MAAM,qBAAqB,CAAC;AAG9K,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAUpD,OAAO,EAAqB,qBAAqB,EAAE,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAmDxG;;;;;GAKG;AACH,eAAO,MAAM,UAAU,0CAA2C,GAAG,+EAGpE,CAAC;AAEF,+CAA+C;AAC/C,MAAM,WAAW,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AAC;IAE3B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAsBxK;AAED,gEAAgE;AAChE,MAAM,WAAW,uCAAwC,SAAQ,sBAAsB;IACrF;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAAC;CAC/C;AAED;;;;;GAKG;AACH,wBAAsB,oCAAoC,CAAC,OAAO,oBAA+B,EAAE,OAAO,EAAE,uCAAuC,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAoBlL;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,UAAU,EAAE,kBAAkB,EAC9B,MAAM,SAAQ,EACd,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EACxC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,UA8B7B"}
@@ -25,7 +25,6 @@ async function promiseGetRequest(url) {
25
25
  }
26
26
  /**
27
27
  * Execute NPM search command if not run with other client
28
- *
29
28
  * @param search search text
30
29
  * @param packageManager Package manager to use, determined automatically if not specified
31
30
  * @param packageManagerOptions
@@ -35,7 +34,7 @@ async function npmSearchExec(search, packageManagerOptions, logger) {
35
34
  const manager = (0, utility_1.getPackageManager)(packageManagerOptions);
36
35
  switch (manager) {
37
36
  case 'npm': {
38
- const remoteModulesPromise = (0, node_util_1.promisify)(node_child_process_1.exec)(`npm search "${search}" --json`);
37
+ const remoteModulesPromise = (0, node_util_1.promisify)(node_child_process_1.execFile)('npm', ['search', search, '--json']);
39
38
  try {
40
39
  const results = JSON.parse((await remoteModulesPromise).stdout);
41
40
  return results
@@ -60,7 +59,6 @@ async function npmSearchExec(search, packageManagerOptions, logger) {
60
59
  }
61
60
  /**
62
61
  * Determine if the given keyword is an Otter tag
63
- *
64
62
  * @param keyword Keyword to identify
65
63
  * @param expect tag expected for the Otter keyword
66
64
  */
@@ -71,7 +69,6 @@ const isOtterTag = (keyword, expect) => {
71
69
  exports.isOtterTag = isOtterTag;
72
70
  /**
73
71
  * Get Available Otter modules on NPMjs.org
74
- *
75
72
  * @param keyword Keyword to search for Otter modules
76
73
  * @param scopeWhitelist List of whitelisted scopes
77
74
  * @param options
@@ -101,7 +98,6 @@ exports.getAvailableModules = getAvailableModules;
101
98
  /**
102
99
  * Get Available Otter modules on NPMjs.org and get latest package information
103
100
  * Similar to {@link getAvailableModules} with additional calls to retrieve all the package's information
104
- *
105
101
  * @param keyword Keyword to search for Otter modules
106
102
  * @param options
107
103
  */
@@ -127,7 +123,6 @@ async function getAvailableModulesWithLatestPackage(keyword = modules_constants_
127
123
  exports.getAvailableModulesWithLatestPackage = getAvailableModulesWithLatestPackage;
128
124
  /**
129
125
  * Format a module description to be displayed in the terminal
130
- *
131
126
  * @param npmPackage Npm Package to display
132
127
  * @param runner runner according to the context
133
128
  * @param keywordTags Mapping of the NPM package Keywords and a displayed tag
@@ -1 +1 @@
1
- {"version":3,"file":"modules.helpers.js","sourceRoot":"","sources":["../../../src/modules/modules.helpers.ts"],"names":[],"mappings":";;;AAAA,2DAA8K;AAI9K,gEAAoE;AACpE,mCAAmC;AACnC,2CAAiC;AACjC,qCAA8B;AAC9B,8BAA8B;AAC9B,kCAAkC;AAClC,yCAAsC;AACtC,2DAA0C;AAC1C,+BAA+B;AAC/B,wCAAwG;AAExG,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAElD,KAAK,UAAU,iBAAiB,CAAuB,GAAW;IAChE,MAAM,GAAG,GAAG,MAAM,IAAI,OAAO,CAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,IAAA,gBAAG,EAAC,GAAG,EAAE,OAAO,CAAC;SAClF,EAAE,CAAC,O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AC1D,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,UAAU,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7F,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC3F,CAAC;IACF,OAAO,KAAK,CAAC,IAAI,CAAC,aAAG,CAAC,CAAC;AACzB,CAAC;AAlCD,0DAkCC"}
@@ -1,7 +1,6 @@
1
1
  import { Rule } from '@angular-devkit/schematics';
2
2
  /**
3
3
  * Rule to add imports to a file
4
- *
5
4
  * @param filePath
6
5
  * @param imports
7
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/add-imports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAKlD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,aACf,MAAM,WACP;IACP,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,EAAE,KACF,IAkBF,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/add-imports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAKlD;;;;GAIG;AACH,eAAO,MAAM,cAAc,aACf,MAAM,WACP;IACP,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,EAAE,KACF,IAkBF,CAAC"}