jiek 2.0.1 → 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.1";
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,7 +163,6 @@ 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"
@@ -429,12 +430,13 @@ async function checkDependency(dependency) {
429
430
  require$1.resolve(dependency);
430
431
  } catch (e) {
431
432
  console.error(`The package '${dependency}' is not installed, please install it first.`);
432
- const answer = prompt("Do you want to install it now? (Y/n)", "Y");
433
433
  const { notWorkspace } = getWD();
434
- if (answer === "Y") {
435
- 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);
436
437
  } else {
437
- return;
438
+ console.warn(`You can run the command '${command2}' to install it manually.`);
439
+ process.exit(1);
438
440
  }
439
441
  }
440
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.1";
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,7 +155,6 @@ 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"
@@ -421,12 +422,13 @@ async function checkDependency(dependency) {
421
422
  require.resolve(dependency);
422
423
  } catch (e) {
423
424
  console.error(`The package '${dependency}' is not installed, please install it first.`);
424
- const answer = prompt("Do you want to install it now? (Y/n)", "Y");
425
425
  const { notWorkspace } = getWD();
426
- if (answer === "Y") {
427
- 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);
428
429
  } else {
429
- return;
430
+ console.warn(`You can run the command '${command2}' to install it manually.`);
431
+ process.exit(1);
430
432
  }
431
433
  }
432
434
  }