bare-runtime 1.11.0 → 1.11.2
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/bare +6 -1
- package/index.js +5 -6
- package/lib/spawn.js +4 -2
- package/package.json +16 -15
package/bin/bare
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
require('../lib/spawn')(__filename, { stdio: 'inherit' }).on(
|
|
2
|
+
require('../lib/spawn')(__filename, { stdio: 'inherit' }).on(
|
|
3
|
+
'exit',
|
|
4
|
+
(exitCode) => {
|
|
5
|
+
process.exitCode = exitCode === null ? 1 : exitCode
|
|
6
|
+
}
|
|
7
|
+
)
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const os = require('os')
|
|
2
2
|
const path = require('path')
|
|
3
3
|
|
|
4
|
-
module.exports = function runtime
|
|
4
|
+
module.exports = function runtime(referrer, opts) {
|
|
5
5
|
if (typeof referrer === 'object' && referrer !== null) {
|
|
6
6
|
opts = referrer
|
|
7
7
|
referrer = 'bare'
|
|
@@ -11,10 +11,7 @@ module.exports = function runtime (referrer, opts) {
|
|
|
11
11
|
|
|
12
12
|
if (!opts) opts = {}
|
|
13
13
|
|
|
14
|
-
const {
|
|
15
|
-
platform = os.platform(),
|
|
16
|
-
arch = os.arch()
|
|
17
|
-
} = opts
|
|
14
|
+
const { platform = os.platform(), arch = os.arch() } = opts
|
|
18
15
|
|
|
19
16
|
const filename = path.basename(referrer)
|
|
20
17
|
|
|
@@ -30,7 +27,9 @@ module.exports = function runtime (referrer, opts) {
|
|
|
30
27
|
}
|
|
31
28
|
|
|
32
29
|
if (filename in mod === false) {
|
|
33
|
-
throw new Error(
|
|
30
|
+
throw new Error(
|
|
31
|
+
`No binary found for target '${platform}-${arch}' for referrer '${referrer}'`
|
|
32
|
+
)
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
return mod[filename]
|
package/lib/spawn.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const childProcess = require('child_process')
|
|
3
3
|
const runtime = require('..')
|
|
4
4
|
|
|
5
|
-
module.exports = function spawn
|
|
5
|
+
module.exports = function spawn(referrer, opts) {
|
|
6
6
|
if (typeof referrer === 'object' && referrer !== null) {
|
|
7
7
|
opts = referrer
|
|
8
8
|
referrer = 'ninja'
|
|
@@ -13,7 +13,9 @@ module.exports = function spawn (referrer, opts) {
|
|
|
13
13
|
if (!opts) opts = {}
|
|
14
14
|
|
|
15
15
|
const {
|
|
16
|
-
args = typeof Bare !== 'undefined'
|
|
16
|
+
args = typeof Bare !== 'undefined'
|
|
17
|
+
? Bare.argv.slice(2)
|
|
18
|
+
: process.argv.slice(2)
|
|
17
19
|
} = opts
|
|
18
20
|
|
|
19
21
|
return childProcess.spawn(runtime(referrer, opts), args, opts)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bare-runtime",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.2",
|
|
4
4
|
"description": "Prebuilt Bare binaries for macOS, iOS, Linux, Android, and Windows",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -52,21 +52,22 @@
|
|
|
52
52
|
"bare-subprocess": "^4.0.2"
|
|
53
53
|
},
|
|
54
54
|
"optionalDependencies": {
|
|
55
|
-
"bare-runtime-android-arm": "1.11.
|
|
56
|
-
"bare-runtime-android-arm64": "1.11.
|
|
57
|
-
"bare-runtime-android-ia32": "1.11.
|
|
58
|
-
"bare-runtime-android-x64": "1.11.
|
|
59
|
-
"bare-runtime-darwin-arm64": "1.11.
|
|
60
|
-
"bare-runtime-darwin-x64": "1.11.
|
|
61
|
-
"bare-runtime-ios-arm64": "1.11.
|
|
62
|
-
"bare-runtime-ios-arm64-simulator": "1.11.
|
|
63
|
-
"bare-runtime-ios-x64-simulator": "1.11.
|
|
64
|
-
"bare-runtime-linux-arm64": "1.11.
|
|
65
|
-
"bare-runtime-linux-x64": "1.11.
|
|
66
|
-
"bare-runtime-win32-arm64": "1.11.
|
|
67
|
-
"bare-runtime-win32-x64": "1.11.
|
|
55
|
+
"bare-runtime-android-arm": "1.11.2",
|
|
56
|
+
"bare-runtime-android-arm64": "1.11.2",
|
|
57
|
+
"bare-runtime-android-ia32": "1.11.2",
|
|
58
|
+
"bare-runtime-android-x64": "1.11.2",
|
|
59
|
+
"bare-runtime-darwin-arm64": "1.11.2",
|
|
60
|
+
"bare-runtime-darwin-x64": "1.11.2",
|
|
61
|
+
"bare-runtime-ios-arm64": "1.11.2",
|
|
62
|
+
"bare-runtime-ios-arm64-simulator": "1.11.2",
|
|
63
|
+
"bare-runtime-ios-x64-simulator": "1.11.2",
|
|
64
|
+
"bare-runtime-linux-arm64": "1.11.2",
|
|
65
|
+
"bare-runtime-linux-x64": "1.11.2",
|
|
66
|
+
"bare-runtime-win32-arm64": "1.11.2",
|
|
67
|
+
"bare-runtime-win32-x64": "1.11.2"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"
|
|
70
|
+
"prettier": "^3.3.3",
|
|
71
|
+
"prettier-config-standard": "^7.0.0"
|
|
71
72
|
}
|
|
72
73
|
}
|