@utoo/pack-cli 1.4.0-alpha.8 → 1.4.0
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/cjs/commands/build.d.ts +4 -0
- package/cjs/commands/build.js +4 -0
- package/cjs/commands/dev.d.ts +4 -0
- package/cjs/commands/dev.js +4 -0
- package/cjs/utils/common.d.ts +1 -0
- package/cjs/utils/common.js +3 -2
- package/package.json +2 -2
package/cjs/commands/build.d.ts
CHANGED
package/cjs/commands/build.js
CHANGED
|
@@ -56,6 +56,10 @@ exports.default = (0, citty_1.defineCommand)({
|
|
|
56
56
|
type: "boolean",
|
|
57
57
|
description: "Enable webpack mode",
|
|
58
58
|
},
|
|
59
|
+
tracing: {
|
|
60
|
+
type: "boolean",
|
|
61
|
+
description: "Enable default tracing logs (pass --no-tracing to disable)",
|
|
62
|
+
},
|
|
59
63
|
},
|
|
60
64
|
async run({ args }) {
|
|
61
65
|
const { projectOptions, projectPath, rootPath } = await (0, common_1.resolveBuildOptions)(args);
|
package/cjs/commands/dev.d.ts
CHANGED
package/cjs/commands/dev.js
CHANGED
|
@@ -56,6 +56,10 @@ exports.default = (0, citty_1.defineCommand)({
|
|
|
56
56
|
type: "boolean",
|
|
57
57
|
description: "Enable webpack mode",
|
|
58
58
|
},
|
|
59
|
+
tracing: {
|
|
60
|
+
type: "boolean",
|
|
61
|
+
description: "Enable default tracing logs (pass --no-tracing to disable)",
|
|
62
|
+
},
|
|
59
63
|
},
|
|
60
64
|
async run({ args }) {
|
|
61
65
|
const { projectOptions, projectPath, rootPath } = await (0, common_1.resolveBuildOptions)(args);
|
package/cjs/utils/common.d.ts
CHANGED
package/cjs/utils/common.js
CHANGED
|
@@ -74,7 +74,7 @@ async function resolveFromConfigFile(configDir) {
|
|
|
74
74
|
process.exit(1);
|
|
75
75
|
}
|
|
76
76
|
async function resolveBuildOptions(flags) {
|
|
77
|
-
const { project, root, webpack } = flags;
|
|
77
|
+
const { project, root, webpack, tracing: tracingFlag } = flags;
|
|
78
78
|
const cwd = process.cwd();
|
|
79
79
|
const configDir = path_1.default.resolve(cwd, project || "");
|
|
80
80
|
let projectPath = project ? path_1.default.resolve(cwd, project) : undefined;
|
|
@@ -85,7 +85,7 @@ async function resolveBuildOptions(flags) {
|
|
|
85
85
|
}
|
|
86
86
|
else {
|
|
87
87
|
const rawOptions = await resolveFromConfigFile(configDir);
|
|
88
|
-
const { processEnv, watch, dev, buildId, packPath, rootPath: configRootPath, projectPath: configProjectPath, ...config } = rawOptions;
|
|
88
|
+
const { processEnv, watch, dev, buildId, tracing: configTracing, packPath, rootPath: configRootPath, projectPath: configProjectPath, ...config } = rawOptions;
|
|
89
89
|
projectPath =
|
|
90
90
|
projectPath ??
|
|
91
91
|
resolveOptionalPath(configDir, configProjectPath) ??
|
|
@@ -97,6 +97,7 @@ async function resolveBuildOptions(flags) {
|
|
|
97
97
|
watch,
|
|
98
98
|
dev,
|
|
99
99
|
buildId,
|
|
100
|
+
tracing: tracingFlag ?? configTracing,
|
|
100
101
|
packPath,
|
|
101
102
|
};
|
|
102
103
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utoo/pack-cli",
|
|
3
3
|
"description": "Utoo pack cli",
|
|
4
|
-
"version": "1.4.0
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"author": "xusd320",
|
|
6
6
|
"bin": {
|
|
7
7
|
"up": "./bin/run.js"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@utoo/pack": "1.4.0
|
|
10
|
+
"@utoo/pack": "1.4.0",
|
|
11
11
|
"citty": "^0.1.6"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|