@offckb/cli 0.1.0 → 0.1.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/dist/cli.js CHANGED
@@ -20,7 +20,10 @@ const build_lumos_config_1 = require("./cmd/build-lumos-config");
20
20
  const init_1 = require("./cmd/init");
21
21
  const accounts_1 = require("./cmd/accounts");
22
22
  const clean_1 = require("./cmd/clean");
23
+ const encoding_1 = require("./encoding");
23
24
  const version = require('../package.json').version;
25
+ // fix windows terminal encoding of simplified chinese text
26
+ (0, encoding_1.setUTF8EncodingForWindows)();
24
27
  const program = new commander_1.Command();
25
28
  program
26
29
  .name('offckb')
@@ -0,0 +1 @@
1
+ export declare function setUTF8EncodingForWindows(): void;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.setUTF8EncodingForWindows = void 0;
7
+ const child_process_1 = require("child_process");
8
+ const os_1 = __importDefault(require("os"));
9
+ function setUTF8EncodingForWindows() {
10
+ if (os_1.default.platform() === 'win32') {
11
+ try {
12
+ (0, child_process_1.execSync)('chcp 65001');
13
+ }
14
+ catch (error) {
15
+ console.error('Failed to set UTF-8 encoding for Windows terminal.', error.message);
16
+ }
17
+ }
18
+ }
19
+ exports.setUTF8EncodingForWindows = setUTF8EncodingForWindows;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@offckb/cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "ckb development network for your first try",
5
5
  "author": "Retric Su <retric@cryptape.com>",
6
6
  "license": "MIT",