weapp-ide-cli 2.0.3 → 2.0.5
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/LICENSE +1 -1
- package/dist/{chunk-GIWEXLLE.js → chunk-63LTOOC2.js} +21 -28
- package/dist/cli.cjs +28 -35
- package/dist/cli.js +1 -1
- package/dist/index.cjs +25 -32
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/package.json +6 -5
package/LICENSE
CHANGED
|
@@ -81,28 +81,34 @@ function createPathCompat(option) {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
// src/parse.ts
|
|
84
|
-
import readline from "node:readline";
|
|
85
84
|
import process2 from "node:process";
|
|
85
|
+
import readline from "node:readline";
|
|
86
86
|
import fs2 from "fs-extra";
|
|
87
87
|
|
|
88
|
+
// src/compose.ts
|
|
89
|
+
function compose(...funcs) {
|
|
90
|
+
if (funcs.length === 0) {
|
|
91
|
+
return (arg) => arg;
|
|
92
|
+
}
|
|
93
|
+
if (funcs.length === 1) {
|
|
94
|
+
return funcs[0];
|
|
95
|
+
}
|
|
96
|
+
return funcs.reduce(
|
|
97
|
+
(a, b) => (...args) => a(b(...args))
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
88
101
|
// src/config.ts
|
|
89
102
|
import fs from "fs-extra";
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (!isExisted) {
|
|
93
|
-
await fs.mkdir(defaultCustomConfigDirPath, { recursive: true });
|
|
94
|
-
}
|
|
95
|
-
await fs.writeFile(
|
|
103
|
+
function createCustomConfig(params) {
|
|
104
|
+
return fs.outputJSON(
|
|
96
105
|
defaultCustomConfigFilePath,
|
|
97
|
-
JSON.stringify(
|
|
98
|
-
{
|
|
99
|
-
cliPath: params.cliPath
|
|
100
|
-
},
|
|
101
|
-
null,
|
|
102
|
-
2
|
|
103
|
-
),
|
|
104
106
|
{
|
|
105
|
-
|
|
107
|
+
cliPath: params.cliPath
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
encoding: "utf8",
|
|
111
|
+
spaces: 2
|
|
106
112
|
}
|
|
107
113
|
);
|
|
108
114
|
}
|
|
@@ -123,19 +129,6 @@ async function getConfig() {
|
|
|
123
129
|
}
|
|
124
130
|
}
|
|
125
131
|
|
|
126
|
-
// src/compose.ts
|
|
127
|
-
function compose(...funcs) {
|
|
128
|
-
if (funcs.length === 0) {
|
|
129
|
-
return (arg) => arg;
|
|
130
|
-
}
|
|
131
|
-
if (funcs.length === 1) {
|
|
132
|
-
return funcs[0];
|
|
133
|
-
}
|
|
134
|
-
return funcs.reduce(
|
|
135
|
-
(a, b) => (...args) => a(b(...args))
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
132
|
// src/parse.ts
|
|
140
133
|
var rl = readline.createInterface({
|
|
141
134
|
input: process2.stdin,
|
package/dist/cli.cjs
CHANGED
|
@@ -25,11 +25,31 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
// src/cli.ts
|
|
26
26
|
var import_node_process3 = __toESM(require("process"), 1);
|
|
27
27
|
|
|
28
|
+
// src/logger.ts
|
|
29
|
+
var import_logger = __toESM(require("@weapp-core/logger"), 1);
|
|
30
|
+
var logger_default = import_logger.default;
|
|
31
|
+
|
|
28
32
|
// src/parse.ts
|
|
29
|
-
var import_node_readline = __toESM(require("readline"), 1);
|
|
30
33
|
var import_node_process2 = __toESM(require("process"), 1);
|
|
34
|
+
var import_node_readline = __toESM(require("readline"), 1);
|
|
31
35
|
var import_fs_extra2 = __toESM(require("fs-extra"), 1);
|
|
32
36
|
|
|
37
|
+
// src/compose.ts
|
|
38
|
+
function compose(...funcs) {
|
|
39
|
+
if (funcs.length === 0) {
|
|
40
|
+
return (arg) => arg;
|
|
41
|
+
}
|
|
42
|
+
if (funcs.length === 1) {
|
|
43
|
+
return funcs[0];
|
|
44
|
+
}
|
|
45
|
+
return funcs.reduce(
|
|
46
|
+
(a, b) => (...args) => a(b(...args))
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// src/config.ts
|
|
51
|
+
var import_fs_extra = __toESM(require("fs-extra"), 1);
|
|
52
|
+
|
|
33
53
|
// src/defaults.ts
|
|
34
54
|
var import_node_os = __toESM(require("os"), 1);
|
|
35
55
|
var import_pathe = __toESM(require("pathe"), 1);
|
|
@@ -51,29 +71,15 @@ var defaultCustomConfigFilePath = import_pathe.default.join(
|
|
|
51
71
|
var defaultPath = defaultPathMap[operatingSystemName];
|
|
52
72
|
|
|
53
73
|
// src/config.ts
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
// src/logger.ts
|
|
57
|
-
var import_logger = __toESM(require("@weapp-core/logger"), 1);
|
|
58
|
-
var logger_default = import_logger.default;
|
|
59
|
-
|
|
60
|
-
// src/config.ts
|
|
61
|
-
async function createCustomConfig(params) {
|
|
62
|
-
const isExisted = await import_fs_extra.default.exists(defaultCustomConfigDirPath);
|
|
63
|
-
if (!isExisted) {
|
|
64
|
-
await import_fs_extra.default.mkdir(defaultCustomConfigDirPath, { recursive: true });
|
|
65
|
-
}
|
|
66
|
-
await import_fs_extra.default.writeFile(
|
|
74
|
+
function createCustomConfig(params) {
|
|
75
|
+
return import_fs_extra.default.outputJSON(
|
|
67
76
|
defaultCustomConfigFilePath,
|
|
68
|
-
JSON.stringify(
|
|
69
|
-
{
|
|
70
|
-
cliPath: params.cliPath
|
|
71
|
-
},
|
|
72
|
-
null,
|
|
73
|
-
2
|
|
74
|
-
),
|
|
75
77
|
{
|
|
76
|
-
|
|
78
|
+
cliPath: params.cliPath
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
encoding: "utf8",
|
|
82
|
+
spaces: 2
|
|
77
83
|
}
|
|
78
84
|
);
|
|
79
85
|
}
|
|
@@ -152,19 +158,6 @@ function createPathCompat(option) {
|
|
|
152
158
|
};
|
|
153
159
|
}
|
|
154
160
|
|
|
155
|
-
// src/compose.ts
|
|
156
|
-
function compose(...funcs) {
|
|
157
|
-
if (funcs.length === 0) {
|
|
158
|
-
return (arg) => arg;
|
|
159
|
-
}
|
|
160
|
-
if (funcs.length === 1) {
|
|
161
|
-
return funcs[0];
|
|
162
|
-
}
|
|
163
|
-
return funcs.reduce(
|
|
164
|
-
(a, b) => (...args) => a(b(...args))
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
161
|
// src/parse.ts
|
|
169
162
|
var rl = import_node_readline.default.createInterface({
|
|
170
163
|
input: import_node_process2.default.stdin,
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -42,11 +42,6 @@ __export(src_exports, {
|
|
|
42
42
|
});
|
|
43
43
|
module.exports = __toCommonJS(src_exports);
|
|
44
44
|
|
|
45
|
-
// src/parse.ts
|
|
46
|
-
var import_node_readline = __toESM(require("readline"), 1);
|
|
47
|
-
var import_node_process2 = __toESM(require("process"), 1);
|
|
48
|
-
var import_fs_extra2 = __toESM(require("fs-extra"), 1);
|
|
49
|
-
|
|
50
45
|
// src/defaults.ts
|
|
51
46
|
var import_node_os = __toESM(require("os"), 1);
|
|
52
47
|
var import_pathe = __toESM(require("pathe"), 1);
|
|
@@ -67,6 +62,24 @@ var defaultCustomConfigFilePath = import_pathe.default.join(
|
|
|
67
62
|
);
|
|
68
63
|
var defaultPath = defaultPathMap[operatingSystemName];
|
|
69
64
|
|
|
65
|
+
// src/parse.ts
|
|
66
|
+
var import_node_process2 = __toESM(require("process"), 1);
|
|
67
|
+
var import_node_readline = __toESM(require("readline"), 1);
|
|
68
|
+
var import_fs_extra2 = __toESM(require("fs-extra"), 1);
|
|
69
|
+
|
|
70
|
+
// src/compose.ts
|
|
71
|
+
function compose(...funcs) {
|
|
72
|
+
if (funcs.length === 0) {
|
|
73
|
+
return (arg) => arg;
|
|
74
|
+
}
|
|
75
|
+
if (funcs.length === 1) {
|
|
76
|
+
return funcs[0];
|
|
77
|
+
}
|
|
78
|
+
return funcs.reduce(
|
|
79
|
+
(a, b) => (...args) => a(b(...args))
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
70
83
|
// src/config.ts
|
|
71
84
|
var import_fs_extra = __toESM(require("fs-extra"), 1);
|
|
72
85
|
|
|
@@ -75,22 +88,15 @@ var import_logger = __toESM(require("@weapp-core/logger"), 1);
|
|
|
75
88
|
var logger_default = import_logger.default;
|
|
76
89
|
|
|
77
90
|
// src/config.ts
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (!isExisted) {
|
|
81
|
-
await import_fs_extra.default.mkdir(defaultCustomConfigDirPath, { recursive: true });
|
|
82
|
-
}
|
|
83
|
-
await import_fs_extra.default.writeFile(
|
|
91
|
+
function createCustomConfig(params) {
|
|
92
|
+
return import_fs_extra.default.outputJSON(
|
|
84
93
|
defaultCustomConfigFilePath,
|
|
85
|
-
JSON.stringify(
|
|
86
|
-
{
|
|
87
|
-
cliPath: params.cliPath
|
|
88
|
-
},
|
|
89
|
-
null,
|
|
90
|
-
2
|
|
91
|
-
),
|
|
92
94
|
{
|
|
93
|
-
|
|
95
|
+
cliPath: params.cliPath
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
encoding: "utf8",
|
|
99
|
+
spaces: 2
|
|
94
100
|
}
|
|
95
101
|
);
|
|
96
102
|
}
|
|
@@ -169,19 +175,6 @@ function createPathCompat(option) {
|
|
|
169
175
|
};
|
|
170
176
|
}
|
|
171
177
|
|
|
172
|
-
// src/compose.ts
|
|
173
|
-
function compose(...funcs) {
|
|
174
|
-
if (funcs.length === 0) {
|
|
175
|
-
return (arg) => arg;
|
|
176
|
-
}
|
|
177
|
-
if (funcs.length === 1) {
|
|
178
|
-
return funcs[0];
|
|
179
|
-
}
|
|
180
|
-
return funcs.reduce(
|
|
181
|
-
(a, b) => (...args) => a(b(...args))
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
178
|
// src/parse.ts
|
|
186
179
|
var rl = import_node_readline.default.createInterface({
|
|
187
180
|
input: import_node_process2.default.stdin,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
declare const operatingSystemName: string;
|
|
2
|
+
declare const defaultCustomConfigDirPath: string;
|
|
3
|
+
declare const defaultCustomConfigFilePath: string;
|
|
4
|
+
declare const defaultPath: string;
|
|
5
|
+
|
|
6
|
+
declare function parse(argv: string[]): Promise<void>;
|
|
7
|
+
|
|
1
8
|
interface BaseConfig {
|
|
2
9
|
cliPath: string;
|
|
3
10
|
}
|
|
@@ -6,13 +13,6 @@ interface AliasEntry {
|
|
|
6
13
|
replacement: string;
|
|
7
14
|
}
|
|
8
15
|
|
|
9
|
-
declare function parse(argv: string[]): Promise<void>;
|
|
10
|
-
|
|
11
|
-
declare const operatingSystemName: string;
|
|
12
|
-
declare const defaultCustomConfigDirPath: string;
|
|
13
|
-
declare const defaultCustomConfigFilePath: string;
|
|
14
|
-
declare const defaultPath: string;
|
|
15
|
-
|
|
16
16
|
declare function execute(cliPath: string, argv: string[]): Promise<void>;
|
|
17
17
|
declare function resolvePath(filePath: string): string;
|
|
18
18
|
declare function createAlias(entry: AliasEntry): (argv: string[]) => string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
declare const operatingSystemName: string;
|
|
2
|
+
declare const defaultCustomConfigDirPath: string;
|
|
3
|
+
declare const defaultCustomConfigFilePath: string;
|
|
4
|
+
declare const defaultPath: string;
|
|
5
|
+
|
|
6
|
+
declare function parse(argv: string[]): Promise<void>;
|
|
7
|
+
|
|
1
8
|
interface BaseConfig {
|
|
2
9
|
cliPath: string;
|
|
3
10
|
}
|
|
@@ -6,13 +13,6 @@ interface AliasEntry {
|
|
|
6
13
|
replacement: string;
|
|
7
14
|
}
|
|
8
15
|
|
|
9
|
-
declare function parse(argv: string[]): Promise<void>;
|
|
10
|
-
|
|
11
|
-
declare const operatingSystemName: string;
|
|
12
|
-
declare const defaultCustomConfigDirPath: string;
|
|
13
|
-
declare const defaultCustomConfigFilePath: string;
|
|
14
|
-
declare const defaultPath: string;
|
|
15
|
-
|
|
16
16
|
declare function execute(cliPath: string, argv: string[]): Promise<void>;
|
|
17
17
|
declare function resolvePath(filePath: string): string;
|
|
18
18
|
declare function createAlias(entry: AliasEntry): (argv: string[]) => string[];
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-ide-cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.5",
|
|
5
5
|
"description": "让微信开发者工具,用起来更加方便!",
|
|
6
|
-
"author": "
|
|
6
|
+
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"homepage": "https://github.com/sonofmagic/weapp-tailwindcss",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/
|
|
11
|
+
"url": "git+https://github.com/weapp-vite/weapp-vite.git",
|
|
12
|
+
"directory": "packages/weapp-ide-cli"
|
|
12
13
|
},
|
|
13
14
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/
|
|
15
|
+
"url": "https://github.com/weapp-vite/weapp-vite/issues"
|
|
15
16
|
},
|
|
16
17
|
"keywords": [
|
|
17
18
|
"weapp",
|
|
@@ -48,7 +49,7 @@
|
|
|
48
49
|
"registry": "https://registry.npmjs.org/"
|
|
49
50
|
},
|
|
50
51
|
"dependencies": {
|
|
51
|
-
"execa": "9.
|
|
52
|
+
"execa": "9.4.0",
|
|
52
53
|
"fs-extra": "^11.2.0",
|
|
53
54
|
"pathe": "^1.1.2",
|
|
54
55
|
"@weapp-core/logger": "^1.0.1"
|