@deveco-test/deveco-code 0.1.0-TD.24.test3 → 0.1.0-TD.26
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/package.json +5 -5
- package/postinstall.mjs +5 -11
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"postinstall": "node ./postinstall.mjs"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.1.0-TD.
|
|
9
|
+
"version": "0.1.0-TD.26",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"os": [
|
|
12
12
|
"darwin",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"assets/**/*"
|
|
26
26
|
],
|
|
27
27
|
"optionalDependencies": {
|
|
28
|
-
"@deveco-test/deveco-code-windows-x64": "0.1.0-TD.
|
|
29
|
-
"@deveco-test/deveco-code-darwin-x64": "0.1.0-TD.
|
|
30
|
-
"@deveco-test/deveco-code-darwin-arm64": "0.1.0-TD.
|
|
28
|
+
"@deveco-test/deveco-code-windows-x64": "0.1.0-TD.26",
|
|
29
|
+
"@deveco-test/deveco-code-darwin-x64": "0.1.0-TD.26",
|
|
30
|
+
"@deveco-test/deveco-code-darwin-arm64": "0.1.0-TD.26"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@deveco/deveco-cli": "1.2.
|
|
33
|
+
"@deveco/deveco-cli": "1.2.2"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/postinstall.mjs
CHANGED
|
@@ -28,19 +28,13 @@ const base = `@deveco-test/deveco-code-${platform}-${arch}`
|
|
|
28
28
|
const sourceBinary = platform === "windows" ? "deveco.exe" : "deveco"
|
|
29
29
|
const targetBinary = path.join(__dirname, "bin", "deveco.exe")
|
|
30
30
|
const devecoCliEntryMarker = path.join(__dirname, "vendor", ".deveco-cli-entry")
|
|
31
|
+
const devecoCliPackageName = "@deveco/deveco-cli"
|
|
31
32
|
|
|
32
33
|
function resolveLocalDevecoCliEntry() {
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
for (const root of roots) {
|
|
38
|
-
const entry = path.join(root, "dist", "cli.js")
|
|
39
|
-
if (fs.existsSync(entry)) return entry
|
|
40
|
-
}
|
|
41
|
-
throw new Error(
|
|
42
|
-
'Local dependency "@deveco/deveco-cli" was not installed. Reinstall @deveco/deveco-code without omitting dependencies.',
|
|
43
|
-
)
|
|
34
|
+
const packageJsonPath = require.resolve(`${devecoCliPackageName}/package.json`)
|
|
35
|
+
const entry = path.join(path.dirname(packageJsonPath), "dist", "cli.js")
|
|
36
|
+
if (fs.existsSync(entry)) return entry
|
|
37
|
+
throw new Error(`Local dependency "${devecoCliPackageName}" has no CLI entry at ${entry}.`)
|
|
44
38
|
}
|
|
45
39
|
|
|
46
40
|
function writeDevecoCliEntryMarker() {
|