@deveco/deveco-code 0.1.5 → 0.1.6-rc.1

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/CHANGELOG.md CHANGED
File without changes
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
package/bin/deveco CHANGED
@@ -70,7 +70,14 @@ let arch = archMap[os.arch()]
70
70
  if (!arch) {
71
71
  arch = os.arch()
72
72
  }
73
- const base = "@deveco/deveco-code-" + platform + "-" + arch
73
+ let mainPkg = {}
74
+ try {
75
+ mainPkg = JSON.parse(fs.readFileSync(path.join(scriptDir, "..", "package.json"), "utf8"))
76
+ } catch {
77
+ // dev mode or missing package.json
78
+ }
79
+ const scope = mainPkg.name && mainPkg.name.includes("/") ? mainPkg.name.split("/")[0] : "@deveco"
80
+ const base = scope + "/deveco-code-" + platform + "-" + arch
74
81
  const binary = platform === "windows" ? "deveco.exe" : "deveco"
75
82
 
76
83
  function supportsAvx2() {
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.1.5",
9
+ "version": "0.1.6-rc.1",
10
10
  "license": "MIT",
11
11
  "files": [
12
12
  "bin/**/*",
@@ -16,9 +16,9 @@
16
16
  "CHANGELOG.md"
17
17
  ],
18
18
  "optionalDependencies": {
19
- "@deveco/deveco-code-windows-x64": "0.1.5",
20
- "@deveco/deveco-code-darwin-x64": "0.1.5",
21
- "@deveco/deveco-code-darwin-arm64": "0.1.5",
22
- "@deveco/deveco-code-windows-x64-baseline": "0.1.5"
19
+ "@deveco/deveco-code-windows-x64": "0.1.6-rc.1",
20
+ "@deveco/deveco-code-windows-x64-baseline": "0.1.6-rc.1",
21
+ "@deveco/deveco-code-darwin-x64": "0.1.6-rc.1",
22
+ "@deveco/deveco-code-darwin-arm64": "0.1.6-rc.1"
23
23
  }
24
24
  }
package/postinstall.mjs CHANGED
@@ -24,7 +24,8 @@ const archMap = {
24
24
 
25
25
  const platform = platformMap[os.platform()] ?? os.platform()
26
26
  const arch = archMap[os.arch()] ?? os.arch()
27
- const base = `@deveco/deveco-code-${platform}-${arch}`
27
+ const scope = packageJson.name && packageJson.name.includes("/") ? packageJson.name.split("/")[0] : "@deveco"
28
+ const base = `${scope}/deveco-code-${platform}-${arch}`
28
29
  const sourceBinary = platform === "windows" ? "deveco.exe" : "deveco"
29
30
  const targetBinary = path.join(__dirname, "bin", "deveco.exe")
30
31