weapp-ide-cli 2.0.1 → 2.0.3
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/{chunk-4TQBAV7J.js → chunk-GIWEXLLE.js} +3 -2
- package/dist/cli.cjs +9 -8
- package/dist/cli.js +1 -1
- package/dist/index.cjs +9 -8
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/defaults.ts
|
|
2
|
-
import path from "node:path";
|
|
3
2
|
import os from "node:os";
|
|
3
|
+
import path from "pathe";
|
|
4
4
|
var homedir = os.homedir();
|
|
5
5
|
var SupportedPlatformsMap = {
|
|
6
6
|
Windows_NT: "Windows_NT",
|
|
@@ -25,8 +25,8 @@ var logger_default = logger;
|
|
|
25
25
|
// src/utils.ts
|
|
26
26
|
import process from "node:process";
|
|
27
27
|
import path2 from "pathe";
|
|
28
|
-
import { execa } from "execa";
|
|
29
28
|
async function execute(cliPath, argv) {
|
|
29
|
+
const { execa } = await import("execa");
|
|
30
30
|
const task = execa(cliPath, argv);
|
|
31
31
|
task?.stdout?.pipe(process.stdout);
|
|
32
32
|
await task;
|
|
@@ -113,6 +113,7 @@ async function getConfig() {
|
|
|
113
113
|
encoding: "utf8"
|
|
114
114
|
});
|
|
115
115
|
const config = JSON.parse(content);
|
|
116
|
+
logger_default.log("> \u5168\u5C40\u914D\u7F6E\u6587\u4EF6\u8DEF\u5F84\uFF1A", defaultCustomConfigFilePath);
|
|
116
117
|
logger_default.log("> \u81EA\u5B9A\u4E49cli\u8DEF\u5F84\uFF1A", config.cliPath);
|
|
117
118
|
return config;
|
|
118
119
|
} else {
|
package/dist/cli.cjs
CHANGED
|
@@ -31,8 +31,8 @@ var import_node_process2 = __toESM(require("process"), 1);
|
|
|
31
31
|
var import_fs_extra2 = __toESM(require("fs-extra"), 1);
|
|
32
32
|
|
|
33
33
|
// src/defaults.ts
|
|
34
|
-
var import_node_path = __toESM(require("path"), 1);
|
|
35
34
|
var import_node_os = __toESM(require("os"), 1);
|
|
35
|
+
var import_pathe = __toESM(require("pathe"), 1);
|
|
36
36
|
var homedir = import_node_os.default.homedir();
|
|
37
37
|
var SupportedPlatformsMap = {
|
|
38
38
|
Windows_NT: "Windows_NT",
|
|
@@ -43,8 +43,8 @@ var defaultPathMap = {
|
|
|
43
43
|
[SupportedPlatformsMap.Darwin]: "/Applications/wechatwebdevtools.app/Contents/MacOS/cli"
|
|
44
44
|
};
|
|
45
45
|
var operatingSystemName = import_node_os.default.type();
|
|
46
|
-
var defaultCustomConfigDirPath =
|
|
47
|
-
var defaultCustomConfigFilePath =
|
|
46
|
+
var defaultCustomConfigDirPath = import_pathe.default.join(homedir, ".weapp-ide-cli");
|
|
47
|
+
var defaultCustomConfigFilePath = import_pathe.default.join(
|
|
48
48
|
defaultCustomConfigDirPath,
|
|
49
49
|
"config.json"
|
|
50
50
|
);
|
|
@@ -84,6 +84,7 @@ async function getConfig() {
|
|
|
84
84
|
encoding: "utf8"
|
|
85
85
|
});
|
|
86
86
|
const config = JSON.parse(content);
|
|
87
|
+
logger_default.log("> \u5168\u5C40\u914D\u7F6E\u6587\u4EF6\u8DEF\u5F84\uFF1A", defaultCustomConfigFilePath);
|
|
87
88
|
logger_default.log("> \u81EA\u5B9A\u4E49cli\u8DEF\u5F84\uFF1A", config.cliPath);
|
|
88
89
|
return config;
|
|
89
90
|
} else {
|
|
@@ -95,18 +96,18 @@ async function getConfig() {
|
|
|
95
96
|
|
|
96
97
|
// src/utils.ts
|
|
97
98
|
var import_node_process = __toESM(require("process"), 1);
|
|
98
|
-
var
|
|
99
|
-
var import_execa = require("execa");
|
|
99
|
+
var import_pathe2 = __toESM(require("pathe"), 1);
|
|
100
100
|
async function execute(cliPath, argv2) {
|
|
101
|
-
const
|
|
101
|
+
const { execa } = await import("execa");
|
|
102
|
+
const task = execa(cliPath, argv2);
|
|
102
103
|
task?.stdout?.pipe(import_node_process.default.stdout);
|
|
103
104
|
await task;
|
|
104
105
|
}
|
|
105
106
|
function resolvePath(filePath) {
|
|
106
|
-
if (
|
|
107
|
+
if (import_pathe2.default.isAbsolute(filePath)) {
|
|
107
108
|
return filePath;
|
|
108
109
|
} else {
|
|
109
|
-
return
|
|
110
|
+
return import_pathe2.default.resolve(import_node_process.default.cwd(), filePath);
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
function alias(argv2, entry) {
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -48,8 +48,8 @@ var import_node_process2 = __toESM(require("process"), 1);
|
|
|
48
48
|
var import_fs_extra2 = __toESM(require("fs-extra"), 1);
|
|
49
49
|
|
|
50
50
|
// src/defaults.ts
|
|
51
|
-
var import_node_path = __toESM(require("path"), 1);
|
|
52
51
|
var import_node_os = __toESM(require("os"), 1);
|
|
52
|
+
var import_pathe = __toESM(require("pathe"), 1);
|
|
53
53
|
var homedir = import_node_os.default.homedir();
|
|
54
54
|
var SupportedPlatformsMap = {
|
|
55
55
|
Windows_NT: "Windows_NT",
|
|
@@ -60,8 +60,8 @@ var defaultPathMap = {
|
|
|
60
60
|
[SupportedPlatformsMap.Darwin]: "/Applications/wechatwebdevtools.app/Contents/MacOS/cli"
|
|
61
61
|
};
|
|
62
62
|
var operatingSystemName = import_node_os.default.type();
|
|
63
|
-
var defaultCustomConfigDirPath =
|
|
64
|
-
var defaultCustomConfigFilePath =
|
|
63
|
+
var defaultCustomConfigDirPath = import_pathe.default.join(homedir, ".weapp-ide-cli");
|
|
64
|
+
var defaultCustomConfigFilePath = import_pathe.default.join(
|
|
65
65
|
defaultCustomConfigDirPath,
|
|
66
66
|
"config.json"
|
|
67
67
|
);
|
|
@@ -101,6 +101,7 @@ async function getConfig() {
|
|
|
101
101
|
encoding: "utf8"
|
|
102
102
|
});
|
|
103
103
|
const config = JSON.parse(content);
|
|
104
|
+
logger_default.log("> \u5168\u5C40\u914D\u7F6E\u6587\u4EF6\u8DEF\u5F84\uFF1A", defaultCustomConfigFilePath);
|
|
104
105
|
logger_default.log("> \u81EA\u5B9A\u4E49cli\u8DEF\u5F84\uFF1A", config.cliPath);
|
|
105
106
|
return config;
|
|
106
107
|
} else {
|
|
@@ -112,18 +113,18 @@ async function getConfig() {
|
|
|
112
113
|
|
|
113
114
|
// src/utils.ts
|
|
114
115
|
var import_node_process = __toESM(require("process"), 1);
|
|
115
|
-
var
|
|
116
|
-
var import_execa = require("execa");
|
|
116
|
+
var import_pathe2 = __toESM(require("pathe"), 1);
|
|
117
117
|
async function execute(cliPath, argv) {
|
|
118
|
-
const
|
|
118
|
+
const { execa } = await import("execa");
|
|
119
|
+
const task = execa(cliPath, argv);
|
|
119
120
|
task?.stdout?.pipe(import_node_process.default.stdout);
|
|
120
121
|
await task;
|
|
121
122
|
}
|
|
122
123
|
function resolvePath(filePath) {
|
|
123
|
-
if (
|
|
124
|
+
if (import_pathe2.default.isAbsolute(filePath)) {
|
|
124
125
|
return filePath;
|
|
125
126
|
} else {
|
|
126
|
-
return
|
|
127
|
+
return import_pathe2.default.resolve(import_node_process.default.cwd(), filePath);
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
130
|
function alias(argv, entry) {
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-ide-cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.3",
|
|
5
5
|
"description": "让微信开发者工具,用起来更加方便!",
|
|
6
6
|
"author": "SonOfMagic <qq1324318532@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"registry": "https://registry.npmjs.org/"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"execa": "9.3.
|
|
51
|
+
"execa": "9.3.1",
|
|
52
52
|
"fs-extra": "^11.2.0",
|
|
53
53
|
"pathe": "^1.1.2",
|
|
54
54
|
"@weapp-core/logger": "^1.0.1"
|