jiek 2.0.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,6 +7,7 @@ var filterWorkspacePackages = require('@pnpm/filter-workspace-packages');
7
7
  var commander = require('commander');
8
8
  var jsYaml = require('js-yaml');
9
9
  var getWorkspaceDir = require('@jiek/utils/getWorkspaceDir');
10
+ var prompts = require('@inquirer/prompts');
10
11
  var cliProgress = require('cli-progress');
11
12
  var execa = require('execa');
12
13
 
@@ -115,7 +116,7 @@ async function getSelectedProjectsGraph(filter = commander.program.getOptionValu
115
116
 
116
117
  var name = "jiek";
117
118
  var type = "module";
118
- var version = "2.0.0";
119
+ var version = "2.0.2";
119
120
  var description$1 = "A lightweight toolkit for compiling and managing libraries based on `package.json` metadata and suitable for `Monorepo`.";
120
121
  var author = "YiJie <yijie4188@gmail.com>";
121
122
  var repository = {
@@ -154,6 +155,7 @@ var dependencies = {
154
155
  "@jiek/pkger": "workspace:^",
155
156
  "@jiek/rollup-plugin-dts": "^6.2.1",
156
157
  "@jiek/utils": "workspace:^",
158
+ "@inquirer/prompts": "^7.1.0",
157
159
  "@rollup/plugin-commonjs": "^28.0.0",
158
160
  "@rollup/plugin-json": "^6.0.1",
159
161
  "@rollup/plugin-node-resolve": "^15.3.0",
@@ -161,12 +163,11 @@ var dependencies = {
161
163
  commander: "^12.0.0",
162
164
  "detect-indent": "^6.1.0",
163
165
  execa: "9.3.1",
164
- inquirer: "^8.2.6",
165
166
  "js-yaml": "^4.1.0",
166
167
  "jsonc-parser": "^3.2.1",
167
168
  rollup: "4.13.2"
168
169
  };
169
- var optionalDependencies = {
170
+ var peerDependencies = {
170
171
  "@rollup/plugin-terser": "^0.4.4",
171
172
  "@pnpm/filter-workspace-packages": "^7.2.13",
172
173
  "esbuild-register": "^3.5.0",
@@ -176,6 +177,32 @@ var optionalDependencies = {
176
177
  "rollup-plugin-swc3": "^0.12.1",
177
178
  typescript: "^4.0.0||^5.0.0"
178
179
  };
180
+ var peerDependenciesMeta = {
181
+ "@rollup/plugin-terser": {
182
+ optional: true
183
+ },
184
+ "@pnpm/filter-workspace-packages": {
185
+ optional: true
186
+ },
187
+ "esbuild-register": {
188
+ optional: true
189
+ },
190
+ postcss: {
191
+ optional: true
192
+ },
193
+ "rollup-plugin-postcss": {
194
+ optional: true
195
+ },
196
+ "rollup-plugin-esbuild": {
197
+ optional: true
198
+ },
199
+ "rollup-plugin-swc3": {
200
+ optional: true
201
+ },
202
+ typescript: {
203
+ optional: true
204
+ }
205
+ };
179
206
  var devDependencies = {
180
207
  "@npm/types": "^1.0.2",
181
208
  "@pnpm/filter-workspace-packages": "^7.2.13",
@@ -246,7 +273,8 @@ var pkg = {
246
273
  exports: exports$1,
247
274
  imports: imports,
248
275
  dependencies: dependencies,
249
- optionalDependencies: optionalDependencies,
276
+ peerDependencies: peerDependencies,
277
+ peerDependenciesMeta: peerDependenciesMeta,
250
278
  devDependencies: devDependencies,
251
279
  publishConfig: publishConfig
252
280
  };
@@ -402,12 +430,13 @@ async function checkDependency(dependency) {
402
430
  require$1.resolve(dependency);
403
431
  } catch (e) {
404
432
  console.error(`The package '${dependency}' is not installed, please install it first.`);
405
- const answer = prompt("Do you want to install it now? (Y/n)", "Y");
406
433
  const { notWorkspace } = getWD();
407
- if (answer === "Y") {
408
- await execa.execaCommand(`pnpm install -${notWorkspace ? "" : "w"}D ${dependency}`);
434
+ const command2 = `pnpm install -${notWorkspace ? "" : "w"}D ${dependency}`;
435
+ if (await prompts.confirm({ message: "Do you want to install it now?" })) {
436
+ await execa.execaCommand(command2);
409
437
  } else {
410
- return;
438
+ console.warn(`You can run the command '${command2}' to install it manually.`);
439
+ process.exit(1);
411
440
  }
412
441
  }
413
442
  }
@@ -5,6 +5,7 @@ import { filterPackagesFromDir } from '@pnpm/filter-workspace-packages';
5
5
  import { program } from 'commander';
6
6
  import { load } from 'js-yaml';
7
7
  import { isWorkspaceDir, getWorkspaceDir } from '@jiek/utils/getWorkspaceDir';
8
+ import { confirm } from '@inquirer/prompts';
8
9
  import { MultiBar, Presets } from 'cli-progress';
9
10
  import { execaCommand } from 'execa';
10
11
 
@@ -107,7 +108,7 @@ async function getSelectedProjectsGraph(filter = program.getOptionValue("filter"
107
108
 
108
109
  var name = "jiek";
109
110
  var type = "module";
110
- var version = "2.0.0";
111
+ var version = "2.0.2";
111
112
  var description$1 = "A lightweight toolkit for compiling and managing libraries based on `package.json` metadata and suitable for `Monorepo`.";
112
113
  var author = "YiJie <yijie4188@gmail.com>";
113
114
  var repository = {
@@ -146,6 +147,7 @@ var dependencies = {
146
147
  "@jiek/pkger": "workspace:^",
147
148
  "@jiek/rollup-plugin-dts": "^6.2.1",
148
149
  "@jiek/utils": "workspace:^",
150
+ "@inquirer/prompts": "^7.1.0",
149
151
  "@rollup/plugin-commonjs": "^28.0.0",
150
152
  "@rollup/plugin-json": "^6.0.1",
151
153
  "@rollup/plugin-node-resolve": "^15.3.0",
@@ -153,12 +155,11 @@ var dependencies = {
153
155
  commander: "^12.0.0",
154
156
  "detect-indent": "^6.1.0",
155
157
  execa: "9.3.1",
156
- inquirer: "^8.2.6",
157
158
  "js-yaml": "^4.1.0",
158
159
  "jsonc-parser": "^3.2.1",
159
160
  rollup: "4.13.2"
160
161
  };
161
- var optionalDependencies = {
162
+ var peerDependencies = {
162
163
  "@rollup/plugin-terser": "^0.4.4",
163
164
  "@pnpm/filter-workspace-packages": "^7.2.13",
164
165
  "esbuild-register": "^3.5.0",
@@ -168,6 +169,32 @@ var optionalDependencies = {
168
169
  "rollup-plugin-swc3": "^0.12.1",
169
170
  typescript: "^4.0.0||^5.0.0"
170
171
  };
172
+ var peerDependenciesMeta = {
173
+ "@rollup/plugin-terser": {
174
+ optional: true
175
+ },
176
+ "@pnpm/filter-workspace-packages": {
177
+ optional: true
178
+ },
179
+ "esbuild-register": {
180
+ optional: true
181
+ },
182
+ postcss: {
183
+ optional: true
184
+ },
185
+ "rollup-plugin-postcss": {
186
+ optional: true
187
+ },
188
+ "rollup-plugin-esbuild": {
189
+ optional: true
190
+ },
191
+ "rollup-plugin-swc3": {
192
+ optional: true
193
+ },
194
+ typescript: {
195
+ optional: true
196
+ }
197
+ };
171
198
  var devDependencies = {
172
199
  "@npm/types": "^1.0.2",
173
200
  "@pnpm/filter-workspace-packages": "^7.2.13",
@@ -238,7 +265,8 @@ var pkg = {
238
265
  exports: exports,
239
266
  imports: imports,
240
267
  dependencies: dependencies,
241
- optionalDependencies: optionalDependencies,
268
+ peerDependencies: peerDependencies,
269
+ peerDependenciesMeta: peerDependenciesMeta,
242
270
  devDependencies: devDependencies,
243
271
  publishConfig: publishConfig
244
272
  };
@@ -394,12 +422,13 @@ async function checkDependency(dependency) {
394
422
  require.resolve(dependency);
395
423
  } catch (e) {
396
424
  console.error(`The package '${dependency}' is not installed, please install it first.`);
397
- const answer = prompt("Do you want to install it now? (Y/n)", "Y");
398
425
  const { notWorkspace } = getWD();
399
- if (answer === "Y") {
400
- await execaCommand(`pnpm install -${notWorkspace ? "" : "w"}D ${dependency}`);
426
+ const command2 = `pnpm install -${notWorkspace ? "" : "w"}D ${dependency}`;
427
+ if (await confirm({ message: "Do you want to install it now?" })) {
428
+ await execaCommand(command2);
401
429
  } else {
402
- return;
430
+ console.warn(`You can run the command '${command2}' to install it manually.`);
431
+ process.exit(1);
403
432
  }
404
433
  }
405
434
  }