@blocklet/component-studio-cli 0.5.20 → 0.5.21

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/dist/cli.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import chalk from 'chalk';
2
3
  import PrettyError from 'pretty-error';
3
4
  import { createComponentStudioCommand } from './commands/component-studio.js';
4
5
  import { displayLogo } from './utils/display-logo.js';
@@ -6,6 +7,12 @@ displayLogo();
6
7
  createComponentStudioCommand()
7
8
  .parseAsync()
8
9
  .catch((error) => {
10
+ // 处理用户按 Ctrl+C 退出的情况
11
+ if (error.name === 'ExitPromptError' || error.isTTYError) {
12
+ console.log(chalk.yellow('\n\nOperation cancelled by user.'));
13
+ return process.exit(0);
14
+ }
15
+ // 重新抛出其他类型的错误
9
16
  console.error(new PrettyError().render(error));
10
17
  process.exit(1);
11
18
  });
@@ -10,7 +10,7 @@ import { join, resolve, dirname, basename, relative } from 'node:path';
10
10
  import ora from 'ora';
11
11
  import os from 'os';
12
12
  import path from 'path';
13
- const workspaceVersion = '0.1.5';
13
+ const workspaceVersion = '0.1.6';
14
14
  const METADATA_FILE_NAME = '@metadata.json';
15
15
  // 获取CLI内置的workspace模板路径
16
16
  export function getWorkspaceTemplatePath() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/component-studio-cli",
3
- "version": "0.5.20",
3
+ "version": "0.5.21",
4
4
  "description": "CLI for Component Studio",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -2,4 +2,5 @@
2
2
  shamefully-hoist=true
3
3
  strict-peer-dependencies=false
4
4
  node-linker=hoisted
5
+ production=false
5
6
 
@@ -120,6 +120,13 @@
120
120
  },
121
121
  "resolutions": {
122
122
  "react-dnd": "^16.0.1",
123
- "react-dnd-html5-backend": "^16.0.1"
123
+ "react-dnd-html5-backend": "^16.0.1",
124
+ "@vitejs/plugin-react": "4.3.4",
125
+ "vite": "5.4.11",
126
+ "vite-node": "2.1.8",
127
+ "vite-plugin-blocklet": "0.9.31",
128
+ "vite-plugin-require": "1.2.14",
129
+ "vite-plugin-svgr": "4.3.0",
130
+ "vite-tsconfig-paths": "4.3.2"
124
131
  }
125
132
  }