@jfrog-boost/boost 0.0.0 → 0.10.4
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/boost.js +20 -0
- package/lib/platform.js +39 -0
- package/package.json +35 -11
- package/README.md +0 -9
package/bin/boost.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { spawnSync } = require('child_process');
|
|
5
|
+
const { resolveBinaryPath } = require('../lib/platform');
|
|
6
|
+
|
|
7
|
+
let bin;
|
|
8
|
+
try {
|
|
9
|
+
bin = resolveBinaryPath();
|
|
10
|
+
} catch (err) {
|
|
11
|
+
console.error(err.message || err);
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' });
|
|
16
|
+
if (result.error) {
|
|
17
|
+
console.error(result.error.message || result.error);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
process.exit(result.status === null ? 1 : result.status);
|
package/lib/platform.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Maps Node's process.platform/arch to the @jfrog-boost/boost-* optionalDependency
|
|
4
|
+
// that carries the prebuilt Go binary for this host.
|
|
5
|
+
const PLATFORMS = {
|
|
6
|
+
'darwin-arm64': '@jfrog-boost/boost-darwin-arm64',
|
|
7
|
+
'darwin-x64': '@jfrog-boost/boost-darwin-x64',
|
|
8
|
+
'linux-arm64': '@jfrog-boost/boost-linux-arm64',
|
|
9
|
+
'linux-x64': '@jfrog-boost/boost-linux-x64',
|
|
10
|
+
'win32-x64': '@jfrog-boost/boost-win32-x64',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
function platformPackageName(platform = process.platform, arch = process.arch) {
|
|
14
|
+
return PLATFORMS[`${platform}-${arch}`] || null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function binaryName(platform = process.platform) {
|
|
18
|
+
return platform === 'win32' ? 'boost.exe' : 'boost';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function resolveBinaryPath() {
|
|
22
|
+
const pkg = platformPackageName();
|
|
23
|
+
if (!pkg) {
|
|
24
|
+
const supported = Object.keys(PLATFORMS).join(', ');
|
|
25
|
+
throw new Error(
|
|
26
|
+
`@jfrog-boost/boost: unsupported platform ${process.platform}-${process.arch} (supported: ${supported})`,
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
return require.resolve(`${pkg}/${binaryName()}`);
|
|
31
|
+
} catch (err) {
|
|
32
|
+
throw new Error(
|
|
33
|
+
`@jfrog-boost/boost: missing platform package ${pkg}. Reinstall with optional dependencies enabled.`,
|
|
34
|
+
{ cause: err },
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = { PLATFORMS, platformPackageName, binaryName, resolveBinaryPath };
|
package/package.json
CHANGED
|
@@ -1,18 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jfrog-boost/boost",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.10.4",
|
|
4
|
+
"description": "Boost CLI — compress agent/CI tool output (prebuilt binary wrapper)",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
-
"
|
|
7
|
-
"publishConfig": {
|
|
8
|
-
"access": "public",
|
|
9
|
-
"registry": "https://registry.npmjs.org/"
|
|
10
|
-
},
|
|
6
|
+
"homepage": "https://boost.jfrog.com",
|
|
11
7
|
"repository": {
|
|
12
8
|
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/jfrog/boost.git"
|
|
9
|
+
"url": "git+https://github.com/jfrog-fastci/boost-cli.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/jfrog/boost/issues"
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"boost": "bin/boost.js"
|
|
14
16
|
},
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
"files": [
|
|
18
|
+
"bin/",
|
|
19
|
+
"lib/"
|
|
20
|
+
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=18"
|
|
23
|
+
},
|
|
24
|
+
"optionalDependencies": {
|
|
25
|
+
"@jfrog-boost/boost-darwin-arm64": "0.10.4",
|
|
26
|
+
"@jfrog-boost/boost-darwin-x64": "0.10.4",
|
|
27
|
+
"@jfrog-boost/boost-linux-arm64": "0.10.4",
|
|
28
|
+
"@jfrog-boost/boost-linux-x64": "0.10.4",
|
|
29
|
+
"@jfrog-boost/boost-win32-x64": "0.10.4"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"boost",
|
|
33
|
+
"jfrog",
|
|
34
|
+
"cli",
|
|
35
|
+
"agents",
|
|
36
|
+
"tokens"
|
|
37
|
+
],
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public",
|
|
40
|
+
"provenance": false
|
|
41
|
+
}
|
|
18
42
|
}
|