devextreme-cli 1.14.0 → 1.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devextreme-cli",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "DevExtreme CLI",
5
5
  "keywords": [
6
6
  "devexpress",
@@ -77,5 +77,5 @@
77
77
  "@babel/traverse@<7.23.2": ">=7.23.2",
78
78
  "braces@<3.0.3": ">=3.0.3"
79
79
  },
80
- "gitHead": "fee8377b9b4ce9fb3939130e2be62a2671f0c399"
80
+ "gitHead": "1f3ffa8ec11b0545d13e3fc2ec20b0c7fdae178b"
81
81
  }
@@ -63,40 +63,6 @@ function localPackageExists(packageName) {
63
63
  return false;
64
64
  }
65
65
 
66
- function getLocalCollectionPath(packageName) {
67
- const nodeModulesPath = path.join(process.cwd(), 'node_modules', packageName, 'src', 'collection.json');
68
- if(fs.existsSync(nodeModulesPath)) {
69
- return nodeModulesPath;
70
- }
71
- return null;
72
- }
73
-
74
- function getCollectionPath(packageName) {
75
- const localPath = getLocalCollectionPath(packageName);
76
- if(localPath) {
77
- return localPath;
78
- }
79
-
80
- try {
81
- const packageJsonPath = require.resolve(`${packageName}/package.json`);
82
- const collectionPath = path.join(path.dirname(packageJsonPath), 'src', 'collection.json');
83
- if(fs.existsSync(collectionPath)) {
84
- return collectionPath;
85
- }
86
- } catch(e) {}
87
-
88
- return null;
89
- }
90
-
91
- function schematicsCliExists() {
92
- try {
93
- require.resolve('@angular-devkit/schematics-cli/package.json');
94
- return true;
95
- } catch(e) {
96
- return false;
97
- }
98
- }
99
-
100
66
  const hasSutableNgCli = async() => {
101
67
  const localVersion = ngVersion.getLocalNgVersion();
102
68
 
@@ -189,44 +155,17 @@ const addView = (viewName, options) => {
189
155
 
190
156
  const migrateConfigComponents = async(options = {}) => {
191
157
  const collectionName = 'devextreme-schematics';
192
- const collectionPath = getCollectionPath(collectionName);
193
-
194
- if(!collectionPath) {
195
- const prompts = require('prompts');
196
-
197
- console.log(`\nRequired package is missing: '${collectionName}'`);
198
-
199
- const response = await prompts({
200
- type: 'confirm',
201
- name: 'install',
202
- message: `Would you like to install '${collectionName}@${schematicsVersion}' in the npm cache?`,
203
- initial: true
204
- });
205
-
206
- if(!response.install) {
207
- console.log('Migration was canceled.');
208
- process.exit(1);
209
- }
210
- }
211
158
 
212
159
  const schematicOptions = {
213
160
  ...options
214
161
  };
215
162
 
216
- const hasSchematicsCli = schematicsCliExists();
217
163
  const commandArguments = ['--yes'];
218
164
 
219
- if(!hasSchematicsCli) {
220
- commandArguments.push('-p', '@angular-devkit/schematics-cli');
221
- }
222
-
223
- if(!collectionPath) {
224
- commandArguments.push('-p', `${collectionName}@${schematicsVersion}`);
225
- }
165
+ commandArguments.push('-p', '@angular-devkit/schematics-cli');
166
+ commandArguments.push('-p', `${collectionName}@${schematicsVersion}`);
226
167
 
227
- const collectionSpecifier = collectionPath
228
- ? `${collectionPath.replace(/\\/g, '/')}:migrate-config-components`
229
- : `${collectionName}:migrate-config-components`;
168
+ const collectionSpecifier = `${collectionName}:migrate-config-components`;
230
169
 
231
170
  commandArguments.push('schematics', collectionSpecifier);
232
171