@deveco-test/deveco-code 0.2.0-3.3 → 0.2.0-3.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.
Files changed (2) hide show
  1. package/package.json +6 -6
  2. package/postinstall.mjs +3 -1
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "scripts": {
7
7
  "postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
8
8
  },
9
- "version": "0.2.0-3.3",
9
+ "version": "0.2.0-3.5",
10
10
  "license": "MIT",
11
11
  "files": [
12
12
  "bin/**/*",
@@ -16,12 +16,12 @@
16
16
  "CHANGELOG.md"
17
17
  ],
18
18
  "optionalDependencies": {
19
- "@deveco-test/deveco-code-windows-x64": "0.2.0-3.3",
20
- "@deveco-test/deveco-code-windows-x64-baseline": "0.2.0-3.3",
21
- "@deveco-test/deveco-code-darwin-x64": "0.2.0-3.3",
22
- "@deveco-test/deveco-code-darwin-arm64": "0.2.0-3.3"
19
+ "@deveco-test/deveco-code-darwin-x64": "0.2.0-3.5",
20
+ "@deveco-test/deveco-code-darwin-arm64": "0.2.0-3.5",
21
+ "@deveco-test/deveco-code-windows-x64-baseline": "0.2.0-3.5",
22
+ "@deveco-test/deveco-code-windows-x64": "0.2.0-3.5"
23
23
  },
24
24
  "dependencies": {
25
- "@deveco/deveco-cli": "1.3.2"
25
+ "@deveco/deveco-cli": "1.3.7"
26
26
  }
27
27
  }
package/postinstall.mjs CHANGED
@@ -32,7 +32,9 @@ const devecoCliPackageName = "@deveco/deveco-cli"
32
32
 
33
33
  function resolveLocalDevecoCliEntry() {
34
34
  const packageJsonPath = require.resolve(`${devecoCliPackageName}/package.json`)
35
- const entry = path.join(path.dirname(packageJsonPath), "dist", "cli.js")
35
+ const root = path.dirname(packageJsonPath)
36
+ const pkg = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"))
37
+ const entry = path.join(root, pkg.bin?.devecocli ?? "dist/cli.js")
36
38
  if (fs.existsSync(entry)) return entry
37
39
  throw new Error(`Local dependency "${devecoCliPackageName}" has no CLI entry at ${entry}.`)
38
40
  }