pybao-xc-sdk 1.5.64 → 1.5.66
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/bin/pyb.js +11 -0
- package/install.cjs +1 -16
- package/package.json +11 -11
- package/bin/pyb.exe +0 -0
package/bin/pyb.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { runResolvedBinary } = require('../lib/runtime-resolver.cjs')
|
|
4
|
+
|
|
5
|
+
try {
|
|
6
|
+
const exitCode = runResolvedBinary()
|
|
7
|
+
process.exit(exitCode)
|
|
8
|
+
} catch (error) {
|
|
9
|
+
process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`)
|
|
10
|
+
process.exit(1)
|
|
11
|
+
}
|
package/install.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const fs = require('node:fs')
|
|
4
|
-
const path = require('node:path')
|
|
5
3
|
const { resolveRuntime } = require('./lib/runtime-resolver.cjs')
|
|
6
4
|
const { detectRuntimePlatform, getRuntimePackageName } = require('./lib/platform.cjs')
|
|
7
5
|
|
|
@@ -19,15 +17,6 @@ function safeWarn(line) {
|
|
|
19
17
|
safeWrite(process.stderr, line)
|
|
20
18
|
}
|
|
21
19
|
|
|
22
|
-
function installResolvedBinary(sourcePath, targetPath) {
|
|
23
|
-
fs.mkdirSync(path.dirname(targetPath), { recursive: true })
|
|
24
|
-
fs.rmSync(targetPath, { force: true })
|
|
25
|
-
fs.copyFileSync(sourcePath, targetPath)
|
|
26
|
-
if (process.platform !== 'win32') {
|
|
27
|
-
fs.chmodSync(targetPath, 0o755)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
20
|
function main() {
|
|
32
21
|
const packageRoot = __dirname
|
|
33
22
|
const platformSuffix = detectRuntimePlatform()
|
|
@@ -35,13 +24,9 @@ function main() {
|
|
|
35
24
|
safeWarn(`⚠️ Pyb: unsupported platform ${process.platform}-${process.arch}`)
|
|
36
25
|
return
|
|
37
26
|
}
|
|
38
|
-
|
|
39
|
-
const installedBinaryPath = path.join(packageRoot, 'bin', 'pyb.exe')
|
|
40
|
-
|
|
41
27
|
try {
|
|
42
28
|
const runtime = resolveRuntime(packageRoot)
|
|
43
|
-
|
|
44
|
-
safeLog(`✅ Pyb binary installed: ${installedBinaryPath}`)
|
|
29
|
+
safeLog(`✅ Pyb runtime resolved for ${platformSuffix}`)
|
|
45
30
|
safeLog(` runtime: ${runtime.packageName}`)
|
|
46
31
|
safeLog(` source: ${runtime.binaryPath}`)
|
|
47
32
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pybao-xc-sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.66",
|
|
4
4
|
"bin": {
|
|
5
|
-
"pyb": "bin/pyb.
|
|
5
|
+
"pyb": "bin/pyb.js",
|
|
6
6
|
"pyb-acp": "bin/pyb-acp.js"
|
|
7
7
|
},
|
|
8
8
|
"engines": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"url": "https://github.com/pyb-xc/pyb-ts/issues"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
|
-
"bin/pyb.
|
|
30
|
+
"bin/pyb.js",
|
|
31
31
|
"bin/pyb-acp.js",
|
|
32
32
|
"lib/**/*",
|
|
33
33
|
"install.cjs",
|
|
@@ -217,14 +217,14 @@
|
|
|
217
217
|
"parse5-htmlparser2-tree-adapter": "6.0.1"
|
|
218
218
|
},
|
|
219
219
|
"optionalDependencies": {
|
|
220
|
-
"pyb-runtime-darwin-arm64": "1.5.
|
|
221
|
-
"pyb-runtime-darwin-x64": "1.5.
|
|
222
|
-
"pyb-runtime-linux-arm64-gnu": "1.5.
|
|
223
|
-
"pyb-runtime-linux-armv7-gnueabihf": "1.5.
|
|
224
|
-
"pyb-runtime-linux-x64-gnu": "1.5.
|
|
225
|
-
"pyb-runtime-linux-x64-musl": "1.5.
|
|
226
|
-
"pyb-runtime-win32-arm64-msvc": "1.5.
|
|
227
|
-
"pyb-runtime-win32-x64-msvc": "1.5.
|
|
220
|
+
"pyb-runtime-darwin-arm64": "1.5.66",
|
|
221
|
+
"pyb-runtime-darwin-x64": "1.5.66",
|
|
222
|
+
"pyb-runtime-linux-arm64-gnu": "1.5.66",
|
|
223
|
+
"pyb-runtime-linux-armv7-gnueabihf": "1.5.66",
|
|
224
|
+
"pyb-runtime-linux-x64-gnu": "1.5.66",
|
|
225
|
+
"pyb-runtime-linux-x64-musl": "1.5.66",
|
|
226
|
+
"pyb-runtime-win32-arm64-msvc": "1.5.66",
|
|
227
|
+
"pyb-runtime-win32-x64-msvc": "1.5.66"
|
|
228
228
|
},
|
|
229
229
|
"pybRuntimePlatforms": [
|
|
230
230
|
"win32-x64-msvc",
|
package/bin/pyb.exe
DELETED
|
Binary file
|