@utoo/pack-cli 1.1.14 → 1.1.16-alpha.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.
@@ -13,11 +13,13 @@ exports.commonFlags = {
13
13
  char: "p",
14
14
  description: "Set the project path",
15
15
  required: false,
16
+ aliases: ["projectPath"],
16
17
  }),
17
18
  root: core_1.Flags.string({
18
19
  char: "r",
19
20
  description: "Set the root path",
20
21
  required: false,
22
+ aliases: ["rootPath"],
21
23
  }),
22
24
  webpack: core_1.Flags.boolean({
23
25
  name: "webpack",
@@ -35,9 +37,19 @@ function resolveBuildOptions(flags) {
35
37
  projectOptions = { webpackMode: true };
36
38
  }
37
39
  else {
38
- projectOptions = JSON.parse(fs_1.default.readFileSync(path_1.default.resolve(cwd, project || "", "utoopack.json"), {
40
+ const rawOptions = JSON.parse(fs_1.default.readFileSync(path_1.default.resolve(cwd, project || "", "utoopack.json"), {
39
41
  encoding: "utf-8",
40
42
  }));
43
+ const { processEnv, defineEnv, watch, dev, buildId, packPath, rootPath: _rootPath, projectPath: _projectPath, ...config } = rawOptions;
44
+ projectOptions = {
45
+ config,
46
+ processEnv,
47
+ defineEnv,
48
+ watch,
49
+ dev,
50
+ buildId,
51
+ packPath,
52
+ };
41
53
  }
42
54
  return { projectPath, rootPath, projectOptions };
43
55
  }
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@utoo/pack-cli",
3
3
  "description": "Utoo pack cli",
4
- "version": "1.1.14",
4
+ "version": "1.1.16-alpha.0",
5
5
  "author": "xusd320",
6
6
  "bin": {
7
7
  "up": "./bin/run.js"
8
8
  },
9
9
  "dependencies": {
10
10
  "@oclif/core": "^4",
11
- "@utoo/pack": "1.1.14"
11
+ "@utoo/pack": "1.1.16-alpha.0"
12
12
  },
13
13
  "devDependencies": {
14
14
  "@types/node": "^20.3.0",