@o3r/schematics 10.0.0-prerelease.11 → 10.0.0-prerelease.110

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. package/README.md +2 -1
  2. package/{src/cli → cli}/environment.d.ts.map +1 -1
  3. package/{src/cli → cli}/environment.js +1 -1
  4. package/cli/package.json +3 -0
  5. package/package.json +44 -36
  6. package/schematics/ng-add/index.d.ts +2 -1
  7. package/schematics/ng-add/index.d.ts.map +1 -1
  8. package/schematics/ng-add/index.js +30 -27
  9. package/schematics/ng-add/schema.d.ts +1 -1
  10. package/schematics/ng-add/schema.d.ts.map +1 -1
  11. package/src/interfaces/angular-workspace.d.ts.map +1 -1
  12. package/src/interfaces/index.d.ts +1 -0
  13. package/src/interfaces/index.d.ts.map +1 -1
  14. package/src/interfaces/index.js +1 -0
  15. package/src/interfaces/index.js.map +1 -1
  16. package/src/{rule-factories/interfaces.d.ts → interfaces/rule-factories.d.ts} +2 -2
  17. package/src/interfaces/rule-factories.d.ts.map +1 -0
  18. package/src/{rule-factories/interfaces.js → interfaces/rule-factories.js} +1 -1
  19. package/src/interfaces/rule-factories.js.map +1 -0
  20. package/src/modules/modules.display.rule.d.ts.map +1 -1
  21. package/src/modules/modules.display.rule.js +3 -4
  22. package/src/modules/modules.display.rule.js.map +1 -1
  23. package/src/modules/modules.helpers.d.ts +1 -1
  24. package/src/modules/modules.helpers.d.ts.map +1 -1
  25. package/src/modules/modules.helpers.js +2 -2
  26. package/src/modules/modules.helpers.js.map +1 -1
  27. package/src/public_api.d.ts +6 -1
  28. package/src/public_api.d.ts.map +1 -1
  29. package/src/public_api.js +6 -1
  30. package/src/public_api.js.map +1 -1
  31. package/src/rule-factories/add-imports/index.js.map +1 -1
  32. package/src/rule-factories/dev-tools/devtools-registration.js +7 -7
  33. package/src/rule-factories/dev-tools/devtools-registration.js.map +1 -1
  34. package/src/rule-factories/eslint-fix/index.d.ts +1 -1
  35. package/src/rule-factories/eslint-fix/index.d.ts.map +1 -1
  36. package/src/rule-factories/eslint-fix/index.js +5 -3
  37. package/src/rule-factories/eslint-fix/index.js.map +1 -1
  38. package/src/rule-factories/get-test-frameworks/index.js +2 -2
  39. package/src/rule-factories/get-test-frameworks/index.js.map +1 -1
  40. package/src/rule-factories/index.d.ts +1 -1
  41. package/src/rule-factories/index.d.ts.map +1 -1
  42. package/src/rule-factories/index.js +1 -1
  43. package/src/rule-factories/index.js.map +1 -1
  44. package/src/rule-factories/ng-add/dependencies.d.ts +78 -0
  45. package/src/rule-factories/ng-add/dependencies.d.ts.map +1 -0
  46. package/src/rule-factories/ng-add/dependencies.js +156 -0
  47. package/src/rule-factories/ng-add/dependencies.js.map +1 -0
  48. package/src/rule-factories/ng-add/index.d.ts +3 -36
  49. package/src/rule-factories/ng-add/index.d.ts.map +1 -1
  50. package/src/rule-factories/ng-add/index.js +4 -218
  51. package/src/rule-factories/ng-add/index.js.map +1 -1
  52. package/src/rule-factories/ng-add/ng-add.helpers.d.ts +22 -0
  53. package/src/rule-factories/ng-add/ng-add.helpers.d.ts.map +1 -0
  54. package/src/rule-factories/ng-add/ng-add.helpers.js +162 -0
  55. package/src/rule-factories/ng-add/ng-add.helpers.js.map +1 -0
  56. package/src/rule-factories/ng-add/schematics-register.d.ts +17 -0
  57. package/src/rule-factories/ng-add/schematics-register.d.ts.map +1 -0
  58. package/src/rule-factories/ng-add/schematics-register.js +64 -0
  59. package/src/rule-factories/ng-add/schematics-register.js.map +1 -0
  60. package/src/rule-factories/update-imports/index.d.ts +0 -1
  61. package/src/rule-factories/update-imports/index.d.ts.map +1 -1
  62. package/src/rule-factories/update-imports/index.js +0 -1
  63. package/src/rule-factories/update-imports/index.js.map +1 -1
  64. package/src/rule-factories/update-imports/list-of-vars.d.ts +4 -5
  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 +1 -1
  68. package/src/rule-factories/update-imports/update-imports-with-scope.js +3 -3
  69. package/src/rule-factories/update-imports/update-imports-with-scope.js.map +1 -1
  70. package/src/rule-factories/update-imports/update-ts-imports.d.ts +1 -1
  71. package/src/rule-factories/update-imports/update-ts-imports.d.ts.map +1 -1
  72. package/src/rule-factories/update-imports/update-ts-imports.js +7 -6
  73. package/src/rule-factories/update-imports/update-ts-imports.js.map +1 -1
  74. package/src/rules/install.d.ts +8 -4
  75. package/src/rules/install.d.ts.map +1 -1
  76. package/src/rules/install.js +10 -8
  77. package/src/rules/install.js.map +1 -1
  78. package/src/tasks/ng-add/index.d.ts +1 -0
  79. package/src/tasks/ng-add/index.d.ts.map +1 -1
  80. package/src/tasks/ng-add/index.js +1 -0
  81. package/src/tasks/ng-add/index.js.map +1 -1
  82. package/src/tasks/package-manager/add-dev-dependency.d.ts +1 -0
  83. package/src/tasks/package-manager/add-dev-dependency.d.ts.map +1 -1
  84. package/src/tasks/package-manager/add-dev-dependency.js +4 -3
  85. package/src/tasks/package-manager/add-dev-dependency.js.map +1 -1
  86. package/src/tasks/package-manager/interfaces.d.ts +1 -1
  87. package/src/tasks/package-manager/interfaces.d.ts.map +1 -1
  88. package/src/tasks/package-manager/npm-install.js +3 -3
  89. package/src/tasks/package-manager/npm-install.js.map +1 -1
  90. package/src/utility/collection.d.ts.map +1 -1
  91. package/src/utility/collection.js +1 -1
  92. package/src/utility/collection.js.map +1 -1
  93. package/src/utility/component.d.ts +1 -1
  94. package/src/utility/component.d.ts.map +1 -1
  95. package/src/utility/dependencies.d.ts.map +1 -1
  96. package/src/utility/dependencies.js +1 -1
  97. package/src/utility/dependencies.js.map +1 -1
  98. package/src/utility/environment.d.ts +1 -0
  99. package/src/utility/environment.d.ts.map +1 -1
  100. package/src/utility/file-info.d.ts +1 -2
  101. package/src/utility/file-info.d.ts.map +1 -1
  102. package/src/utility/file-info.js.map +1 -1
  103. package/src/utility/generation.d.ts +1 -1
  104. package/src/utility/generation.d.ts.map +1 -1
  105. package/src/utility/gitignore.d.ts +1 -1
  106. package/src/utility/gitignore.d.ts.map +1 -1
  107. package/src/utility/index.d.ts +1 -0
  108. package/src/utility/index.d.ts.map +1 -1
  109. package/src/utility/index.js +1 -0
  110. package/src/utility/index.js.map +1 -1
  111. package/src/utility/loaders.d.ts +6 -1
  112. package/src/utility/loaders.d.ts.map +1 -1
  113. package/src/utility/loaders.js +10 -2
  114. package/src/utility/loaders.js.map +1 -1
  115. package/src/utility/matching-peers.d.ts.map +1 -1
  116. package/src/utility/matching-peers.js +1 -1
  117. package/src/utility/matching-peers.js.map +1 -1
  118. package/src/utility/monorepo.d.ts +1 -1
  119. package/src/utility/monorepo.d.ts.map +1 -1
  120. package/src/utility/package-manager-runner.d.ts +1 -1
  121. package/src/utility/package-manager-runner.d.ts.map +1 -1
  122. package/src/utility/routes.d.ts +1 -1
  123. package/src/utility/routes.d.ts.map +1 -1
  124. package/src/utility/sub-entry.d.ts +1 -1
  125. package/src/utility/sub-entry.d.ts.map +1 -1
  126. package/src/utility/template-property.helper.js.map +1 -1
  127. package/src/utility/update-imports.d.ts.map +1 -1
  128. package/src/utility/update-imports.js +17 -7
  129. package/src/utility/update-imports.js.map +1 -1
  130. package/src/utility/update-pipes.d.ts +15 -0
  131. package/src/utility/update-pipes.d.ts.map +1 -0
  132. package/src/utility/update-pipes.js +82 -0
  133. package/src/utility/update-pipes.js.map +1 -0
  134. package/src/utility/wrapper.d.ts.map +1 -1
  135. package/src/utility/wrapper.js +49 -3
  136. package/src/utility/wrapper.js.map +1 -1
  137. package/src/cli/environment.js.map +0 -1
  138. package/src/index.d.ts +0 -7
  139. package/src/index.d.ts.map +0 -1
  140. package/src/index.js +0 -10
  141. package/src/index.js.map +0 -1
  142. package/src/rule-factories/interfaces.d.ts.map +0 -1
  143. package/src/rule-factories/interfaces.js.map +0 -1
  144. package/src/rule-factories/update-imports/v7-to-v8-map-object.d.ts +0 -8
  145. package/src/rule-factories/update-imports/v7-to-v8-map-object.d.ts.map +0 -1
  146. package/src/rule-factories/update-imports/v7-to-v8-map-object.js +0 -2049
  147. package/src/rule-factories/update-imports/v7-to-v8-map-object.js.map +0 -1
  148. /package/{src/cli → cli}/environment.d.ts +0 -0
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ngAddPeerDependencyPackages = exports.ngAddPackages = void 0;
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const tasks_1 = require("@angular-devkit/schematics/tasks");
6
+ const dependencies_1 = require("@schematics/angular/utility/dependencies");
7
+ const node_fs_1 = require("node:fs");
8
+ const path = require("node:path");
9
+ const rxjs_1 = require("rxjs");
10
+ const index_1 = require("../../utility/index");
11
+ /**
12
+ * Install via `ng add` a list of npm packages.
13
+ * @param packages List of packages to be installed via `ng add`
14
+ * @param options install options
15
+ * @param packageJsonPath path of the package json of the project where they will be installed
16
+ */
17
+ function ngAddPackages(packages, options, packageJsonPath = '/package.json') {
18
+ if (!packages.length) {
19
+ return schematics_1.noop;
20
+ }
21
+ const cwd = process.cwd().replace(/[\\/]+/g, '/');
22
+ // FileSystem working directory might be different from Tree working directory (when using `yarn workspace` for example)
23
+ const fsWorkingDirectory = (options?.workingDirectory && !cwd.endsWith(options.workingDirectory)) ? options.workingDirectory : '.';
24
+ const versions = Object.fromEntries(packages.map((packageName, index) => [packageName, typeof options?.version === 'object' ? options.version[index] : options?.version]));
25
+ if (options?.workingDirectory && !packageJsonPath.startsWith(options.workingDirectory)) {
26
+ packageJsonPath = path.join(options.workingDirectory, packageJsonPath);
27
+ }
28
+ const getInstalledVersion = (packageName) => {
29
+ let versionFound;
30
+ for (const workingDirectory of new Set([fsWorkingDirectory, '.'])) {
31
+ try {
32
+ const fileSystemPackageJson = JSON.parse((0, node_fs_1.readFileSync)(path.join(workingDirectory, 'package.json'), { encoding: 'utf8' }));
33
+ let version;
34
+ if (options?.dependencyType === dependencies_1.NodeDependencyType.Dev) {
35
+ version = fileSystemPackageJson.devDependencies[packageName];
36
+ }
37
+ else if (options?.dependencyType === dependencies_1.NodeDependencyType.Peer) {
38
+ version = fileSystemPackageJson.peerDependencies[packageName];
39
+ }
40
+ else {
41
+ version = fileSystemPackageJson.dependencies[packageName];
42
+ }
43
+ if (versionFound && version !== versionFound) {
44
+ // In case of conflict between package.json files, we consider the package as not installed to force its update
45
+ return;
46
+ }
47
+ versionFound = version;
48
+ }
49
+ catch (e) {
50
+ return;
51
+ }
52
+ }
53
+ return versionFound;
54
+ };
55
+ const getNgAddSchema = (packageName, context) => {
56
+ try {
57
+ const collection = context.engine.createCollection(packageName);
58
+ return collection.createSchematic('ng-add');
59
+ }
60
+ catch {
61
+ context.logger.warn(`No ng-add found for ${packageName}`);
62
+ return undefined;
63
+ }
64
+ };
65
+ const getOptions = (schema) => {
66
+ const schemaOptions = schema.description.schemaJson?.properties || {};
67
+ return Object.entries(options || {}).reduce((accOptions, [key, value]) => {
68
+ if (schemaOptions[key]) {
69
+ accOptions[key] = value;
70
+ }
71
+ return accOptions;
72
+ }, {});
73
+ };
74
+ const installedVersions = packages.map((packageName) => getInstalledVersion(packageName));
75
+ const packageManager = (0, index_1.getPackageManager)();
76
+ const packagesToInstall = packages.filter((packageName, index) => !installedVersions[index] || installedVersions[index] !== versions[packageName]);
77
+ if (packagesToInstall.length < 1) {
78
+ return schematics_1.noop;
79
+ }
80
+ return (0, schematics_1.chain)([
81
+ // Update package.json in tree
82
+ (tree) => {
83
+ const sortDependencies = (packageJson, depType) => {
84
+ packageJson[depType] = packageJson[depType] ?
85
+ Object.fromEntries(Object.entries(packageJson[depType] || {}).sort(([key1, _val1], [key2, _val2]) => key1.localeCompare(key2))) :
86
+ undefined;
87
+ };
88
+ for (const filePath of new Set([packageJsonPath, './package.json'])) {
89
+ const packageJson = tree.readJson(filePath);
90
+ packages.forEach((packageName) => {
91
+ const version = versions[packageName] || 'latest';
92
+ if (options?.dependencyType === dependencies_1.NodeDependencyType.Dev) {
93
+ packageJson.devDependencies = { ...packageJson.devDependencies, [packageName]: version };
94
+ }
95
+ else if (options?.dependencyType === dependencies_1.NodeDependencyType.Peer) {
96
+ packageJson.peerDependencies = { ...packageJson.peerDependencies, [packageName]: version };
97
+ }
98
+ else {
99
+ packageJson.dependencies = { ...packageJson.dependencies, [packageName]: version };
100
+ }
101
+ });
102
+ ['dependencies', 'devDependencies', 'peerDependencies'].forEach((depType) => {
103
+ sortDependencies(packageJson, depType);
104
+ });
105
+ tree.overwrite(filePath, JSON.stringify(packageJson, null, 2));
106
+ }
107
+ },
108
+ // Run ng-adds
109
+ async (tree, context) => {
110
+ if (options?.skipNgAddSchematicRun) {
111
+ context.logger.info(`Package(s) '${packagesToInstall.join(', ')}' was(were) installed.
112
+ The run of 'ng-add' schematics for the package(s) is intentionally skipped. You can do the run standalone, later.`);
113
+ return schematics_1.noop;
114
+ }
115
+ new Set([packageJsonPath, './package.json']).forEach((filePath) => {
116
+ (0, node_fs_1.mkdirSync)(path.join(process.cwd(), path.dirname(filePath)), { recursive: true });
117
+ (0, node_fs_1.writeFileSync)(path.join(process.cwd(), filePath), tree.readText(filePath));
118
+ });
119
+ context.addTask(new tasks_1.NodePackageInstallTask({
120
+ packageManager: packageManager,
121
+ hideOutput: false,
122
+ quiet: false
123
+ }));
124
+ await (0, rxjs_1.lastValueFrom)(context.engine.executePostTasks());
125
+ const ngAddsToApply = packagesToInstall
126
+ .map((packageName) => ({ packageName, ngAddCollection: getNgAddSchema(packageName, context) }))
127
+ .filter(({ packageName, ngAddCollection }) => {
128
+ if (!ngAddCollection) {
129
+ context.logger.info(`No ng-add schematic found for: '${packageName}'. Skipping ng add for: ${packageName}${versions[packageName] ? ' with version: ' + versions[packageName] : ''}`);
130
+ }
131
+ return !!ngAddCollection;
132
+ })
133
+ .map(({ packageName, ngAddCollection }) => (0, schematics_1.externalSchematic)(packageName, 'ng-add', getOptions(ngAddCollection)));
134
+ return (0, schematics_1.chain)(ngAddsToApply);
135
+ }
136
+ ]);
137
+ }
138
+ exports.ngAddPackages = ngAddPackages;
139
+ /**
140
+ * Look for the peer dependencies and run ng add on the package requested version
141
+ * @param packages list of the name of the packages needed
142
+ * @param packageJsonPath path to package json that needs the peer to be resolved
143
+ * @param type how to install the dependency (dev, peer for a library or default for an application)
144
+ * @param options
145
+ * @param parentPackageInfo for logging purposes
146
+ */
147
+ function ngAddPeerDependencyPackages(packages, packageJsonPath, type = dependencies_1.NodeDependencyType.Default, options, parentPackageInfo) {
148
+ if (!packages.length) {
149
+ return schematics_1.noop;
150
+ }
151
+ const dependencies = (0, index_1.getNodeDependencyList)((0, index_1.getExternalDependenciesVersionRange)(packages, packageJsonPath), type);
152
+ return ngAddPackages(dependencies.map(({ name }) => name), {
153
+ ...options,
154
+ skipConfirmation: true,
155
+ version: dependencies.map(({ version }) => version),
156
+ parentPackageInfo,
157
+ dependencyType: type,
158
+ workingDirectory: options.workingDirectory
159
+ });
160
+ }
161
+ exports.ngAddPeerDependencyPackages = ngAddPeerDependencyPackages;
162
+ //# sourceMappingURL=ng-add.helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-add.helpers.js","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/ng-add.helpers.ts"],"names":[],"mappings":";;;AAAA,2DAA+G;AAC/G,4DAA0E;AAE1E,2EAA8E;AAC9E,qCAAiE;AACjE,kCAAkC;AAClC,+BAAqC;AAGrC,+CAAoH;AAEpH;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,QAAkB,EAAE,OAA8F,EAAE,eAAe,GAAG,eAAe;IACjL,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;QACpB,OAAO,iBAAI,CAAC;KACb;IACD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IAClD,wHAAwH;IACxH,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,gBAAgB,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CA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E,OAA2B,iCAAkB,CAAC,OAAO,EAC5I,OAA4B,EAAE,iBAA0B;IACxD,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;QACpB,OAAO,iBAAI,CAAC;KACb;IACD,MAAM,YAAY,GAAqB,IAAA,6BAAqB,EAC1D,IAAA,2CAAmC,EAAC,QAAQ,EAAE,eAAe,CAAC,EAC9D,IAAI,CACL,CAAC;IACF,OAAO,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE;QACzD,GAAG,OAAO;QACV,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC;QACnD,iBAAiB;QACjB,cAAc,EAAE,IAAI;QACpB,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;KAC3C,CAAC,CAAC;AACL,CAAC;AAjBD,kEAiBC"}
@@ -0,0 +1,17 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ import type { PackageJson } from 'type-fest';
3
+ import type { SchematicOptionObject } from '../../interfaces/index';
4
+ /**
5
+ * Register the given package in the Angular CLI schematics
6
+ * @param packageJson PackageJson of the project containing the collection to add to the project
7
+ * @param angularJsonFile Path to the Angular.json file. Will use the workspace root's angular.json if not specified
8
+ */
9
+ export declare function registerPackageCollectionSchematics(packageJson: PackageJson, angularJsonFile?: string): Rule;
10
+ /**
11
+ * Setup schematics default params in angular.json
12
+ * @param schematicsDefaultParams default params to setup by schematic
13
+ * @param overrideValue Define if the given value should override the one already defined in the workspace
14
+ * @param angularJsonFile Path to the Angular.json file. Will use the workspace root's angular.json if not specified
15
+ */
16
+ export declare function setupSchematicsDefaultParams(schematicsDefaultParams: Record<string, SchematicOptionObject>, overrideValue?: boolean, angularJsonFile?: string): Rule;
17
+ //# sourceMappingURL=schematics-register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schematics-register.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/schematics-register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAIpE;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,WAAW,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAY5G;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,EAAE,aAAa,UAAQ,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAgClK"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.setupSchematicsDefaultParams = exports.registerPackageCollectionSchematics = void 0;
4
+ const utility_1 = require("../../utility");
5
+ /**
6
+ * Register the given package in the Angular CLI schematics
7
+ * @param packageJson PackageJson of the project containing the collection to add to the project
8
+ * @param angularJsonFile Path to the Angular.json file. Will use the workspace root's angular.json if not specified
9
+ */
10
+ function registerPackageCollectionSchematics(packageJson, angularJsonFile) {
11
+ return (tree, context) => {
12
+ if (!packageJson.name) {
13
+ return tree;
14
+ }
15
+ const workspace = (0, utility_1.getWorkspaceConfig)(tree, angularJsonFile);
16
+ if (!workspace) {
17
+ context.logger.error('No workspace found');
18
+ return tree;
19
+ }
20
+ return (0, utility_1.writeAngularJson)(tree, (0, utility_1.registerCollectionSchematics)(workspace, packageJson.name), angularJsonFile);
21
+ };
22
+ }
23
+ exports.registerPackageCollectionSchematics = registerPackageCollectionSchematics;
24
+ /**
25
+ * Setup schematics default params in angular.json
26
+ * @param schematicsDefaultParams default params to setup by schematic
27
+ * @param overrideValue Define if the given value should override the one already defined in the workspace
28
+ * @param angularJsonFile Path to the Angular.json file. Will use the workspace root's angular.json if not specified
29
+ */
30
+ function setupSchematicsDefaultParams(schematicsDefaultParams, overrideValue = false, angularJsonFile) {
31
+ return (tree, context) => {
32
+ const workspace = (0, utility_1.getWorkspaceConfig)(tree, angularJsonFile);
33
+ if (!workspace) {
34
+ context.logger.error('No workspace found');
35
+ return tree;
36
+ }
37
+ workspace.schematics ||= {};
38
+ Object.entries(schematicsDefaultParams).forEach(([schematicName, defaultParams]) => {
39
+ workspace.schematics[schematicName] = overrideValue ? {
40
+ ...workspace.schematics[schematicName],
41
+ ...defaultParams
42
+ } : {
43
+ ...defaultParams,
44
+ ...workspace.schematics[schematicName]
45
+ };
46
+ });
47
+ Object.values(workspace.projects).forEach((project) => {
48
+ Object.entries(schematicsDefaultParams).forEach(([schematicName, defaultParams]) => {
49
+ if (project.schematics?.[schematicName]) {
50
+ project.schematics[schematicName] = overrideValue ? {
51
+ ...project.schematics[schematicName],
52
+ ...defaultParams
53
+ } : {
54
+ ...defaultParams,
55
+ ...project.schematics[schematicName]
56
+ };
57
+ }
58
+ });
59
+ });
60
+ return (0, utility_1.writeAngularJson)(tree, workspace, angularJsonFile);
61
+ };
62
+ }
63
+ exports.setupSchematicsDefaultParams = setupSchematicsDefaultParams;
64
+ //# sourceMappingURL=schematics-register.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schematics-register.js","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/schematics-register.ts"],"names":[],"mappings":";;;AAGA,2CAAmG;AAGnG;;;;GAIG;AACH,SAAgB,mCAAmC,CAAC,WAAwB,EAAE,eAAwB;IACpG,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;YACrB,OAAO,IAAI,CAAC;SACb;QACD,MAAM,SAAS,GAAG,IAAA,4BAAkB,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAC5D,IAAI,CAAC,SA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gBACjF,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,aAAa,CAAC,EAAE;oBACvC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC;wBAClD,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;wBACpC,GAAG,aAAa;qBACjB,CAAC,CAAC,CAAC;wBACF,GAAG,aAAa;wBAChB,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;qBACrC,CAAC;iBACH;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO,IAAA,0BAAgB,EAAC,IAAI,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IAC5D,CAAC,CAAC;AACJ,CAAC;AAhCD,oEAgCC"}
@@ -1,5 +1,4 @@
1
1
  export * from './list-of-vars';
2
2
  export * from './update-imports-with-scope';
3
3
  export * from './update-ts-imports';
4
- export * from './v7-to-v8-map-object';
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC"}
@@ -4,5 +4,4 @@ const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./list-of-vars"), exports);
5
5
  tslib_1.__exportStar(require("./update-imports-with-scope"), exports);
6
6
  tslib_1.__exportStar(require("./update-ts-imports"), exports);
7
- tslib_1.__exportStar(require("./v7-to-v8-map-object"), exports);
8
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,sEAA4C;AAC5C,8DAAoC;AACpC,gEAAsC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,sEAA4C;AAC5C,8DAAoC"}
@@ -1,13 +1,12 @@
1
1
  /**
2
- *
3
- *Represents an element that is exposed in a Sass import.
4
- * @property value: The name of the exposed element.
5
- * @property type: The type of the exposed element, either 'function' or 'var'.
6
- * @property replacement: The name of the replacement element, if any.
2
+ * Represents an element that is exposed in a Sass import.
7
3
  */
8
4
  export interface SassImportExposedElement {
5
+ /** The name of the exposed element */
9
6
  value: string;
7
+ /** The type of the exposed element, either 'function' or 'var' */
10
8
  type: 'function' | 'var';
9
+ /** The name of the replacement element, if any */
11
10
  replacement?: string | undefined;
12
11
  }
13
12
  export declare const listOfExposedElements: SassImportExposedElement[];
@@ -1 +1 @@
1
- {"version":3,"file":"list-of-vars.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/list-of-vars.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,GAAG,KAAK,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AAED,eAAO,MAAM,qBAAqB,EAAE,wBAAwB,EAuC3D,CAAC"}
1
+ {"version":3,"file":"list-of-vars.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/list-of-vars.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,IAAI,EAAE,UAAU,GAAG,KAAK,CAAC;IACzB,kDAAkD;IA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AAK,EAAE,sBAAsB,EAAE,IAAI,EAAE,UAAU,EAAC;IACjD,EAAC,KAAK,EAAE,2BAA2B,EAAE,IAAI,EAAE,UAAU,EAAC;IACtD,qBAAqB;IACrB,EAAC,KAAK,EAAE,uBAAuB,EAAE,IAAI,EAAE,KAAK,EAAC;IAC7C,EAAC,KAAK,EAAE,qBAAqB,EAAE,IAAI,EAAE,KAAK,EAAC;CAC5C,CAAC"}
@@ -4,7 +4,7 @@ import { SassImportExposedElement } from './list-of-vars';
4
4
  * Update SASS imports to use a scoped dependency
5
5
  * @param alias The name of the otter styling package
6
6
  * @param dependencyName The name of the dependency to update imports on
7
- * @param exposedElements The list of exposed elemeents
7
+ * @param exposedElements The list of exposed elements
8
8
  * @param fromRoot Perform on all files in project
9
9
  */
10
10
  export declare function updateSassImports(alias: string, dependencyName?: string, exposedElements?: SassImportExposedElement[], fromRoot?: boolean): Rule;
@@ -1,19 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateSassImports = void 0;
4
- const utility_1 = require("../../utility");
4
+ const index_1 = require("../../utility/index");
5
5
  const list_of_vars_1 = require("./list-of-vars");
6
6
  const imports = new RegExp(/^@import\s+['"]~?@(o3r|otter)\/styling.*\s*/, 'gm');
7
7
  /**
8
8
  * Update SASS imports to use a scoped dependency
9
9
  * @param alias The name of the otter styling package
10
10
  * @param dependencyName The name of the dependency to update imports on
11
- * @param exposedElements The list of exposed elemeents
11
+ * @param exposedElements The list of exposed elements
12
12
  * @param fromRoot Perform on all files in project
13
13
  */
14
14
  function updateSassImports(alias, dependencyName = '@o3r/styling', exposedElements = list_of_vars_1.listOfExposedElements, fromRoot = false) {
15
15
  return (tree, _context) => {
16
- const files = fromRoot ? (0, utility_1.getFilesWithExtensionFromTree)(tree, 'scss') : (0, utility_1.getFilesFromRootOfWorkspaceProjects)(tree, 'scss');
16
+ const files = fromRoot ? (0, index_1.getFilesWithExtensionFromTree)(tree, 'scss') : (0, index_1.getFilesFromRootOfWorkspaceProjects)(tree, 'scss');
17
17
  files.forEach((file) => {
18
18
  let content = tree.read(file).toString();
19
19
  if (content.match(imports)) {
@@ -1 +1 @@
1
- {"version":3,"file":"update-imports-with-scope.js","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/update-imports-with-scope.ts"],"names":[],"mappings":";;;AACA,2CAAmG;AACnG,iDAAiF;AAEjF,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,6CAA6C,EAAE,IAAI,CAAC,CAAC;AAEhF;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAAC,KAAa,EAAE,cAAc,GAAG,cAAc,EAAE,kBAA8C,oCAAqB,EAAE,QAAQ,GAAG,KAAK;IACrK,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAEhD,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAA,uCAA6B,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAA,6CAAmC,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACzH,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,IAAI,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAE,CAAC,QAAQ,EAAE,CAAC;YAC1C,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;gBAC1B,MAAM,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBAC3D,OAAO,GAAG,SAAS,cAAc,QAAQ,KAAK,MAAM,qBAAqB,EAAE,CAAC;gBAC5E,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;oBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,wBAAwB,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,8BAA8B,EAAE,GAAG,CAAC,CAAC;oBACtI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,KAAK,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACvF,CAAC,CAAC,CAAC;gBACH,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;aAC/B;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAnBD,8CAmBC"}
1
+ {"version":3,"file":"update-imports-with-scope.js","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/update-imports-with-scope.ts"],"names":[],"mappings":";;;AACA,+CAAyG;AACzG,iDAAiF;AAEjF,MAAM,OAAO,GAAG,IAAI,MAAM,CAAC,6CAA6C,EAAE,IAAI,CAAC,CAAC;AAEhF;;;;;;GAMG;AACH,SAAgB,iBAAiB,CAAC,KAAa,EAAE,cAAc,GAAG,cAAc,EAAE,kBAA8C,oCAAqB,EAAE,QAAQ,GAAG,KAAK;IACrK,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAEhD,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAA,qCAA6B,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAA,2CAAmC,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACzH,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,IAAI,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAE,CAAC,QAAQ,EAAE,CAAC;YAC1C,IAAI,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;gBAC1B,MAAM,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBAC3D,OAAO,GAAG,SAAS,cAAc,QAAQ,KAAK,MAAM,qBAAqB,EAAE,CAAC;gBAC5E,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;oBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,wBAAwB,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,KAAK,8BAA8B,EAAE,GAAG,CAAC,CAAC;oBACtI,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,KAAK,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;gBACvF,CAAC,CAAC,CAAC;gBACH,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;aAC/B;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AAnBD,8CAmBC"}
@@ -1,5 +1,5 @@
1
1
  import { Rule } from '@angular-devkit/schematics';
2
- import { ImportsMapping } from '../../utility';
2
+ import { ImportsMapping } from '../../utility/index';
3
3
  /**
4
4
  * Update imports based on mapping
5
5
  * @param mapImports Map of the import to replace
@@ -1 +1 @@
1
- {"version":3,"file":"update-ts-imports.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/update-ts-imports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,EAAsE,cAAc,EAAuB,MAAM,eAAe,CAAC;AAExI;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,UAAU,GAAE,cAAmB,EAAE,eAAe,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EAAE,QAAQ,UAAQ,GAAG,IAAI,CA2BnI"}
1
+ {"version":3,"file":"update-ts-imports.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/update-ts-imports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD,OAAO,EAAsE,cAAc,EAAuB,MAAM,qBAAqB,CAAC;AAE9I;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,UAAU,GAAE,cAAmB,EAAE,eAAe,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,EAAE,QAAQ,UAAQ,GAAG,IAAI,CA4BnI"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateImports = void 0;
4
4
  const ts = require("typescript");
5
- const utility_1 = require("../../utility");
5
+ const index_1 = require("../../utility/index");
6
6
  /**
7
7
  * Update imports based on mapping
8
8
  * @param mapImports Map of the import to replace
@@ -11,15 +11,16 @@ const utility_1 = require("../../utility");
11
11
  */
12
12
  function updateImports(mapImports = {}, renamedPackages = {}, fromRoot = false) {
13
13
  return (tree, context) => {
14
- const files = fromRoot ? (0, utility_1.getFilesWithExtensionFromTree)(tree, 'ts') : (0, utility_1.getSourceFilesFromWorkspaceProjects)(tree);
14
+ const files = fromRoot ? (0, index_1.getFilesWithExtensionFromTree)(tree, 'ts') : (0, index_1.getSourceFilesFromWorkspaceProjects)(tree);
15
15
  // exact match on import path
16
- const importsRegexp = new RegExp(`^(${[...Object.keys(mapImports)].join('|')})$`);
16
+ const escapeRegExp = (str) => str.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&');
17
+ const importsRegexp = new RegExp(`^(${Object.keys(mapImports).map(escapeRegExp).join('|')})$`);
17
18
  // match the import path starting with the package to be renamed
18
- const renamePackagesRegexp = new RegExp(`^(${[...Object.keys(renamedPackages)].join('|')})`);
19
+ const renamePackagesRegexp = new RegExp(`^(${Object.keys(renamedPackages).map(escapeRegExp).join('|')})`);
19
20
  let nbOfUnResolvedImports = 0;
20
21
  files.forEach((file) => {
21
- const sourceFile = ts.createSourceFile(file, tree.read(file).toString(), ts.ScriptTarget.ES2015, true);
22
- nbOfUnResolvedImports += (0, utility_1.updateImportsInFile)(context.logger, tree, sourceFile, importsRegexp, renamePackagesRegexp, mapImports, renamedPackages);
22
+ const sourceFile = ts.createSourceFile(file, tree.readText(file), ts.ScriptTarget.ES2015, true);
23
+ nbOfUnResolvedImports += (0, index_1.updateImportsInFile)(context.logger, tree, sourceFile, importsRegexp, renamePackagesRegexp, mapImports, renamedPackages);
23
24
  });
24
25
  if (nbOfUnResolvedImports > 0) {
25
26
  context.logger.warn(`The migration rule could not resolve a total of ${nbOfUnResolvedImports} imports that you may have to migrate manually (see the details above).`);
@@ -1 +1 @@
1
- {"version":3,"file":"update-ts-imports.js","sourceRoot":"","sources":["../../../../src/rule-factories/update-imports/update-ts-imports.ts"],"names":[],"mappings":";;;AACA,iCAAiC;AACjC,2CAAwI;AAExI;;;;;GAKG;AACH,SAAgB,aAAa,CAAC,aAA6B,EAAE,EAAE,kBAA0C,EAAE,EAAE,QAAQ,GAAG,KAAK;IAE3H,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,IAAA,uCAA6B,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAA,6CAAmC,EAAC,IAAI,CAAC,CAAC;QAE/G,6BAA6B;QAC7B,MAAM,aAAa,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClF,gEAAgE;QAChE,MAAM,oBAAoB,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC7F,IAAI,qBAAqB,GAAG,CAAC,CAAC;QAE9B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CACpC,IAAI,E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B,GAAG,IAAI,MAAM,CAAC,KAAK,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAC1G,IAAI,qBAAqB,GAAG,CAAC,CAAC;QAE9B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACrB,MAAM,UAAU,GAAG,EAAE,CAAC,gBAAgB,CACpC,IAAI,EACJ,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EACnB,EAAE,CAAC,YAAY,CAAC,MAAM,EACtB,IAAI,CACL,CAAC;YACF,qBAAqB,IAAI,IAAA,2BAAmB,EAAC,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,oBAAoB,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;QACnJ,CAAC,CAAC,CAAC;QAEH,IAAI,qBAAqB,GAAG,CAAC,EAAE;YAC7B,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,mDAAmD,qBAAqB,yEAAyE,CAAC,CAAC;SACxK;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AA5BD,sCA4BC"}
@@ -1,8 +1,12 @@
1
- import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ import { type SupportedPackageManagers } from '../utility/package-manager-runner';
2
3
  /**
3
4
  * Install the Otter packages
4
- * @param tree
5
- * @param context
5
+ * @deprecated use {@link setupDependencies} instead, will be removed in V11
6
+ * @param options
7
+ * @param options.packageManager
6
8
  */
7
- export declare function install(tree: Tree, context: SchematicContext): Promise<Rule>;
9
+ export declare function install(options?: {
10
+ packageManager?: SupportedPackageManagers;
11
+ }): Rule;
8
12
  //# sourceMappingURL=install.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/rules/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAK1E;;;;GAIG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAMlF"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/rules/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGvD,OAAO,EAAqB,KAAK,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAErG;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,OAAO,CAAC,EAAE;IAAC,cAAc,CAAC,EAAE,wBAAwB,CAAA;CAAC,GAAG,IAAI,CAOnF"}
@@ -6,15 +6,17 @@ const rxjs_1 = require("rxjs");
6
6
  const package_manager_runner_1 = require("../utility/package-manager-runner");
7
7
  /**
8
8
  * Install the Otter packages
9
- * @param tree
10
- * @param context
9
+ * @deprecated use {@link setupDependencies} instead, will be removed in V11
10
+ * @param options
11
+ * @param options.packageManager
11
12
  */
12
- async function install(tree, context) {
13
- const packageManager = (0, package_manager_runner_1.getPackageManager)();
14
- context.logger.info('Running application install');
15
- context.addTask(new tasks_1.NodePackageInstallTask({ packageManager }));
16
- await (0, rxjs_1.lastValueFrom)(context.engine.executePostTasks());
17
- return () => tree;
13
+ function install(options) {
14
+ return async (_, context) => {
15
+ const packageManager = options?.packageManager || (0, package_manager_runner_1.getPackageManager)();
16
+ context.logger.info('Running application install');
17
+ context.addTask(new tasks_1.NodePackageInstallTask({ packageManager }));
18
+ await (0, rxjs_1.lastValueFrom)(context.engine.executePostTasks());
19
+ };
18
20
  }
19
21
  exports.install = install;
20
22
  //# sourceMappingURL=install.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/rules/install.ts"],"names":[],"mappings":";;;AACA,4DAA0E;AAC1E,+BAAqC;AACrC,8EAAsE;AAEtE;;;;GAIG;AACI,KAAK,UAAU,OAAO,CAAC,IAAU,EAAE,OAAyB;IACjE,MAAM,cAAc,GAAG,IAAA,0CAAiB,GAAE,CAAC;IAC3C,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IACnD,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,CAAC,EAAC,cAAc,EAAC,CAAC,CAAC,CAAC;IAC9D,MAAM,IAAA,oBAAa,EAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACvD,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;AACpB,CAAC;AAND,0BAMC"}
1
+ {"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/rules/install.ts"],"names":[],"mappings":";;;AACA,4DAA0E;AAC1E,+BAAqC;AACrC,8EAAqG;AAErG;;;;;GAKG;AACH,SAAgB,OAAO,CAAC,OAAqD;IAC3E,OAAO,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE;QAC1B,MAAM,cAAc,GAAG,OAAO,EAAE,cAAc,IAAI,IAAA,0CAAiB,GAAE,CAAC;QACtE,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;QACnD,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,CAAC,EAAC,cAAc,EAAC,CAAC,CAAC,CAAC;QAC9D,MAAM,IAAA,oBAAa,EAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACzD,CAAC,CAAC;AACJ,CAAC;AAPD,0BAOC"}
@@ -22,6 +22,7 @@ export interface NgAddPackageOptions {
22
22
  /** Flag to skip the execution of ng add and only install the package. Used mostly for external packages */
23
23
  skipNgAddSchematicRun?: boolean;
24
24
  }
25
+ /** @deprecated use {@link setupDependencies} instead, will be removed in V11 */
25
26
  export declare class NodePackageNgAddTask implements TaskConfigurationGenerator<NodePackageTaskOptions> {
26
27
  packageName: string;
27
28
  options?: NgAddPackageOptions | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tasks/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,EAAmB,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AACnH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAGnF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,kBAAkB;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;IAEpC,2GAA2G;IAC3G,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,qBAAa,oBAAqB,YAAW,0BAA0B,CAAC,sBAAsB,CAAC;IAG1E,WAAW,EAAE,MAAM;IAAS,OAAO,CAAC;IAFhD,KAAK,UAAS;gBAEF,WAAW,EAAE,MAAM,EAAS,OAAO,CAAC,iCAAqB;IAErE,eAAe,IAAI,iBAAiB,CAAC,sBAAsB,CAAC;CAgBpE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tasks/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,EAAmB,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AACnH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAGnF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,yBAAyB;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,kBAAkB;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,yBAAyB;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,0BAA0B;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;IAEpC,2GAA2G;IAC3G,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,gFAAgF;AAChF,qBAAa,oBAAqB,YAAW,0BAA0B,CAAC,sBAAsB,CAAC;IAG1E,WAAW,EAAE,MAAM;IAAS,OAAO,CAAC;IAFhD,KAAK,UAAS;gBAEF,WAAW,EAAE,MAAM,EAAS,OAAO,CAAC,iCAAqB;IAErE,eAAe,IAAI,iBAAiB,CAAC,sBAAsB,CAAC;CAgBpE"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NodePackageNgAddTask = void 0;
4
4
  const options_1 = require("@angular-devkit/schematics/tasks/package-manager/options");
5
5
  const package_manager_runner_1 = require("../../utility/package-manager-runner");
6
+ /** @deprecated use {@link setupDependencies} instead, will be removed in V11 */
6
7
  class NodePackageNgAddTask {
7
8
  constructor(packageName, options) {
8
9
  this.packageName = packageName;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tasks/ng-add/index.ts"],"names":[],"mappings":";;;AACA,sFAAmH;AAEnH,iFAAyE;AA8BzE,MAAa,oBAAoB;IAG/B,YAAmB,WAAmB,EAAS,OAA6B;QAAzD,gBAAW,GAAX,WAAW,CAAQ;QAAS,YAAO,GAAP,OAAO,CAAsB;QAFrE,UAAK,GAAG,KAAK,CAAC;IAE0D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AAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE;SAC7E,CAAC;QACF,OAAO;YACL,IAAI,EAAE,yBAAe;YACrB,OAAO,EAAE;gBACP,OAAO,EAAE,QAAQ;gBACjB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,gBAAgB,EAAE,IAAI,CAAC,OAAO,EAAE,gBAAgB;gBAChD,WAAW,EAAE,UAAU,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBAC7H,cAAc,EAAE,IAAA,0CAAiB,GAAE;aACpC;SAC2C,CAAC;IACjD,CAAC;CACF;AArBD,oDAqBC"}
@@ -2,6 +2,7 @@ import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
2
2
  import { NodePackageInstallTaskOptions } from './interfaces';
3
3
  /**
4
4
  * Install new dev dependency on your package
5
+ * @deprecated use {@link setupDependencies} instead, will be removed in V11
5
6
  */
6
7
  export declare class AddDevInstall extends NodePackageInstallTask {
7
8
  quiet: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"add-dev-dependency.d.ts","sourceRoot":"","sources":["../../../../src/tasks/package-manager/add-dev-dependency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAE7D;;GAEG;AACH,qBAAa,aAAc,SAAQ,sBAAsB;IAChD,KAAK,UAAS;IACd,KAAK,UAAS;gBAET,OAAO,CAAC,EAAE,6BAA6B;IAUnD,kBAAkB;IACX,eAAe;;;;;;;;;;;;;CAYvB"}
1
+ {"version":3,"file":"add-dev-dependency.d.ts","sourceRoot":"","sources":["../../../../src/tasks/package-manager/add-dev-dependency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAE7D;;;GAGG;AACH,qBAAa,aAAc,SAAQ,sBAAsB;IAChD,KAAK,UAAS;IACd,KAAK,UAAS;gBAET,OAAO,CAAC,EAAE,6BAA6B;IAUnD,kBAAkB;IACX,eAAe;;;;;;;;;;;;;CAYvB"}
@@ -3,17 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AddDevInstall = void 0;
4
4
  const tasks_1 = require("@angular-devkit/schematics/tasks");
5
5
  const options_1 = require("@angular-devkit/schematics/tasks/package-manager/options");
6
- const utility_1 = require("../../utility");
6
+ const index_1 = require("../../utility/index");
7
7
  /**
8
8
  * Install new dev dependency on your package
9
+ * @deprecated use {@link setupDependencies} instead, will be removed in V11
9
10
  */
10
11
  class AddDevInstall extends tasks_1.NodePackageInstallTask {
11
12
  constructor(options) {
12
13
  super(options);
13
14
  this.quiet = false;
14
15
  this.force = false;
15
- this.packageManager = (0, utility_1.getPackageManager)({
16
- workspaceConfig: options?.tree && (0, utility_1.getWorkspaceConfig)(options.tree),
16
+ this.packageManager = (0, index_1.getPackageManager)({
17
+ workspaceConfig: options?.tree && (0, index_1.getWorkspaceConfig)(options.tree),
17
18
  enforcedNpmManager: options?.packageName
18
19
  });
19
20
  this.force = !!options?.force;
@@ -1 +1 @@
1
- {"version":3,"file":"add-dev-dependency.js","sourceRoot":"","sources":["../../../../src/tasks/package-manager/add-dev-dependency.ts"],"names":[],"mappings":";;;AAAA,4DAA0E;AAC1E,sFAA2F;AAC3F,2CAAsE;AAGtE;;GAEG;AACH,MAAa,aAAc,SAAQ,8BAAsB;IAIvD,YAAY,OAAuC;QACjD,KAAK,CAAC,OAAc,CAAC,CAAC;QAJjB,UAAK,GAAG,KAAK,CAAC;QACd,UAAK,GAAG,KAAK,CAAC;QAInB,IAAI,CAAC,cAAc,GAAG,IAAA,2BAAiB,EAAC;YACtC,eAAe,EAAE,OAAO,EAAE,IAAI,IAAI,IAAA,4BAAkB,EAAC,OAAO,CAAC,IAAI,CAAC;YAClE,kBAAkB,EAAE,OAAO,EAAE,WAAW;SACzC,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;IAChC,CAAC;IAGD,kBAAkB;IACX,eAAe;QACpB,MAAM,aAAa,GAAG,KAAK,CAAC,eAAe,EAAE,CAAC;QAC9C,OAAO;YACL,GAAG,aAAa;YAChB,IAAI,EAAE,yBAAe;YACrB,OAAO,EAAE;gBACP,GAAG,aAAa,CAAC,OAAO;gBACxB,OAAO,EAAE,SAAS;gBAClB,WAAW,EAAE,GAAG,IAAI,CAAC,WAAY,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,KAAK,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE;aACtK;SACF,CAAC;IACJ,CAAC;CACF;AA3BD,sCA2BC"}
1
+ {"version":3,"file":"add-dev-dependency.js","sourceRoot":"","sources":["../../../../src/tasks/package-manager/add-dev-dependency.ts"],"names":[],"mappings":";;;AAAA,4DAA0E;AAC1E,sFAA2F;AAC3F,+CAA4E;AAG5E;;;GAGG;AACH,MAAa,aAAc,SAAQ,8BAAsB;IAIvD,YAAY,OAAuC;QACjD,KAAK,CAAC,OAAc,CAAC,CAAC;QAJjB,UAAK,GAAG,KAAK,CAAC;QACd,UAAK,GAAG,KAAK,CAAC;QAInB,IAAI,CAAC,cAAc,GAAG,IAAA,yBAAiB,EAAC;YACtC,eAAe,EAAE,OAAO,EAAE,IAAI,IAAI,IAAA,0BAAkB,EAAC,OAAO,CAAC,IAAI,CAAC;YAClE,kBAAkB,EAAE,OAAO,EAAE,WAAW;SACzC,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC;IAChC,CAAC;IAGD,kBAAkB;IACX,eAAe;QACpB,MAAM,aAAa,GAAG,KAAK,CAAC,eAAe,EAAE,CAAC;QAC9C,OAAO;YACL,GAAG,aAAa;YAChB,IAAI,EAAE,yBAAe;YACrB,OAAO,EAAE;gBACP,GAAG,aAAa,CAAC,OAAO;gBACxB,OAAO,EAAE,SAAS;gBAClB,WAAW,EAAE,GAAG,IAAI,CAAC,WAAY,IAAI,IAAI,CAAC,cAAc,KAAK,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,KAAK,KAAK,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE;aACtK;SACF,CAAC;IACJ,CAAC;CACF;AA3BD,sCA2BC"}
@@ -1,4 +1,4 @@
1
- import { Tree } from '@angular-devkit/schematics';
1
+ import type { Tree } from '@angular-devkit/schematics';
2
2
  /**
3
3
  * Duplication of the interface not exposed by the @angular-devkit/schematics
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/tasks/package-manager/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,WAAW;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,sBAAsB;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,EAAE,CAAC;IACrC,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mBAAmB;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wCAAwC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/tasks/package-manager/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,WAAW;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,sBAAsB;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,EAAE,CAAC;IACrC,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gCAAgC;IAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,mBAAmB;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wCAAwC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NpmInstall = void 0;
4
4
  const tasks_1 = require("@angular-devkit/schematics/tasks");
5
- const utility_1 = require("../../utility");
5
+ const index_1 = require("../../utility/index");
6
6
  const options_1 = require("@angular-devkit/schematics/tasks/package-manager/options");
7
7
  /**
8
8
  * Run NPM Install
@@ -12,8 +12,8 @@ class NpmInstall extends tasks_1.NodePackageInstallTask {
12
12
  super(options);
13
13
  this.quiet = false;
14
14
  this.force = false;
15
- this.packageManager = (0, utility_1.getPackageManager)({
16
- workspaceConfig: options?.tree && (0, utility_1.getWorkspaceConfig)(options.tree),
15
+ this.packageManager = (0, index_1.getPackageManager)({
16
+ workspaceConfig: options?.tree && (0, index_1.getWorkspaceConfig)(options.tree),
17
17
  enforcedNpmManager: options?.packageName
18
18
  });
19
19
  this.force = !!options?.force;