@deveco-test/deveco-cli 0.1.3 → 0.1.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/cli.js +11 -1
- package/package.json +3 -3
package/cli.js
CHANGED
|
@@ -4,10 +4,20 @@
|
|
|
4
4
|
// Command parsing, error handling, and exit code are all owned by the impl pkg.
|
|
5
5
|
import { spawnSync } from 'node:child_process';
|
|
6
6
|
import { createRequire } from 'node:module';
|
|
7
|
+
import { readFileSync } from 'node:fs';
|
|
7
8
|
|
|
9
|
+
// Pass wrapper identity to the impl process so `devecocli update` installs
|
|
10
|
+
// THIS package (the one the user installed), not the nested impl dependency.
|
|
11
|
+
// These env names are NOT in tsup's `env` map, so they survive as runtime
|
|
12
|
+
// process.env reads in the built impl bundle.
|
|
13
|
+
const wrapperPkg = JSON.parse(
|
|
14
|
+
readFileSync(new URL('./package.json', import.meta.url), 'utf8'),
|
|
15
|
+
);
|
|
16
|
+
process.env.DEVECO_CLI_WRAPPER_NAME = wrapperPkg.name;
|
|
17
|
+
process.env.DEVECO_CLI_WRAPPER_VERSION = wrapperPkg.version;
|
|
8
18
|
|
|
9
19
|
const IMPL_PKG = process.platform === 'openharmony'
|
|
10
|
-
? '@deveco-test/deveco-cli-openharmony-arm64'
|
|
20
|
+
? '@deveco-test/deveco-cli-openharmony-arm64'
|
|
11
21
|
: '@deveco-test/deveco-cli-common';
|
|
12
22
|
|
|
13
23
|
let cliPath;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deveco-test/deveco-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "HarmonyOS application development command line tool",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"openharmony"
|
|
21
21
|
],
|
|
22
22
|
"optionalDependencies": {
|
|
23
|
-
"@deveco-test/deveco-cli-openharmony-arm64": "0.1.
|
|
24
|
-
"@deveco-test/deveco-cli-common": "0.1.
|
|
23
|
+
"@deveco-test/deveco-cli-openharmony-arm64": "0.1.5",
|
|
24
|
+
"@deveco-test/deveco-cli-common": "0.1.5"
|
|
25
25
|
}
|
|
26
26
|
}
|