@mobb.ai/cli 1.4.49 → 1.4.51
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/README.md +12 -75
- package/lib/binary.js +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,84 +1,21 @@
|
|
|
1
1
|
# @mobb.ai/cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
that npm installs as a platform-specific optional dependency. No downloads
|
|
7
|
-
outside npm, no GitHub access, no checksum plumbing — registry + lockfile
|
|
8
|
-
integrity cover supply-chain verification.
|
|
9
|
-
|
|
10
|
-
Scoped under `@mobb.ai` so only the org can publish the launcher and platform
|
|
11
|
-
binaries (typosquat / fake-package resistance).
|
|
12
|
-
|
|
13
|
-
## Usage (customers)
|
|
3
|
+
[Mobb](https://mobb.ai) CLI (Bugsy) as a standalone binary — no Node.js runtime
|
|
4
|
+
required. Installing this package pulls exactly one platform binary
|
|
5
|
+
(`@mobb.ai/cli-<os>-<arch>`) and puts `mobbdev` on your PATH.
|
|
14
6
|
|
|
15
7
|
```bash
|
|
16
|
-
npm install @mobb.ai/cli
|
|
17
|
-
mobbdev
|
|
8
|
+
npm install -g @mobb.ai/cli
|
|
9
|
+
mobbdev --help
|
|
18
10
|
```
|
|
19
11
|
|
|
20
|
-
|
|
21
|
-
is not supported, the binary needs the glibc loader). The `macos-*` names are
|
|
22
|
-
reserved in the org but not built yet: postject invalidates the Mach-O
|
|
23
|
-
signature and macOS then refuses to exec the binary, so those targets need a
|
|
24
|
-
macOS build job. macOS and Alpine users install the `mobbdev` npm package.
|
|
25
|
-
|
|
26
|
-
Same CLI, commands, config, and login as the `mobbdev` package. Customers
|
|
27
|
-
choose:
|
|
28
|
-
|
|
29
|
-
| | `mobbdev` | `@mobb.ai/cli` |
|
|
30
|
-
| --- | --- | --- |
|
|
31
|
-
| What runs | JS on the customer's Node | standalone binary (Node 22 inside) |
|
|
32
|
-
| Node requirement | engines range of `mobbdev` | any Node >= 14 |
|
|
33
|
-
| Install size | ~380 MB (467 packages) | ~40 MB compressed / ~120 MB on disk (2 packages) |
|
|
34
|
-
|
|
35
|
-
## How it works
|
|
36
|
-
|
|
37
|
-
- `@mobb.ai/cli-<os>-<cpu>` packages each contain one compiled binary and
|
|
38
|
-
declare `os`/`cpu` (Node `process.platform` / `process.arch` values), so npm
|
|
39
|
-
installs only the matching one. Package *names* use `macos` / `win` slugs
|
|
40
|
-
(`@mobb.ai/cli-macos-arm64`, `@mobb.ai/cli-win-x64`, …).
|
|
41
|
-
- `@mobb.ai/cli` lists them as exact-version `optionalDependencies` and its
|
|
42
|
-
`mobbdev` bin resolves + spawns the installed binary, forwarding args and
|
|
43
|
-
exit code.
|
|
44
|
-
|
|
45
|
-
## Release flow
|
|
12
|
+
Supported platforms: Linux x64, Linux arm64, Windows x64.
|
|
46
13
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
that version. `clients/cli/scripts/increment-version.sh` bumps both when either
|
|
50
|
-
tree changes; `scripts/check_cli_version.sh` (CI), the version step in
|
|
51
|
-
`.github/workflows/cli-binary-tests.yml` and `sharedVersion()` in
|
|
52
|
-
`clients/scripts/targets.mjs` (used by the packaging step) all fail on mismatch.
|
|
14
|
+
On any other platform (macOS included, for now) use the Node.js package instead —
|
|
15
|
+
same CLI, same commands:
|
|
53
16
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
`scripts/publish_cli_binaries.sh` (Production deploy, after `publish_cli.sh`):
|
|
59
|
-
1. Skips if `@mobb.ai/cli@<version>` is already on npm.
|
|
60
|
-
2. `pnpm run build:binary:all` in `clients/cli` (Node SEA + postject).
|
|
61
|
-
3. **Gate:** `pnpm run test:binary` in `clients/cli` — binary smoke tests +
|
|
62
|
-
Verdaccio publish → install (platform packages first, then `@mobb.ai/cli`
|
|
63
|
-
with optionalDependency resolution) and exit-code passthrough. No publish
|
|
64
|
-
if it fails.
|
|
65
|
-
4. `scripts/prepare_publish.mjs` stages the artifacts, then publishes the
|
|
66
|
-
platform packages and `@mobb.ai/cli` last, so a published launcher can
|
|
67
|
-
always resolve its binaries.
|
|
68
|
-
|
|
69
|
-
Run the tests locally: `pnpm run build:binary` in `clients/cli` (the host
|
|
70
|
-
binary the e2e executes), then `pnpm run test:binary` there. On macOS use
|
|
71
|
-
`build:binary`, not `build:binary:all` — the release matrix has no mac target,
|
|
72
|
-
so `:all` leaves no host binary for the e2e to run.
|
|
73
|
-
|
|
74
|
-
The build/packaging logic is JS: `clients/scripts/targets.mjs` (target matrix,
|
|
75
|
-
platform↔slug mapping, shared version), `clients/cli/scripts/build_binary.mjs`
|
|
76
|
-
(SEA build), `scripts/prepare_publish.mjs` (npm artifacts),
|
|
77
|
-
`clients/cli/__e2e__/binary.mjs` (`node --test` e2e).
|
|
78
|
-
|
|
79
|
-
## Environment variables
|
|
17
|
+
```bash
|
|
18
|
+
npx mobbdev --help
|
|
19
|
+
```
|
|
80
20
|
|
|
81
|
-
|
|
82
|
-
| --- | --- | --- |
|
|
83
|
-
| `MOBBDEV_MODULE_ROOT` | the binary itself (`src/sea_assets.ts`) | Where SEA-embedded assets (`package.json`, `.env`, protos) were materialized; `getModuleRootDir()` reads it. Not meant to be set by hand. |
|
|
84
|
-
| `MOBB_SNYK_DOWNLOAD_BASE` | user | Mirror for Snyk's standalone CLI, default `https://downloads.snyk.io/cli`. Set it when that host is blocked — the binary has no bundled `snyk`, so `mobbdev scan --scanner snyk` downloads it (pinned version, checksum-verified, cached in `~/.mobb/tools/snyk/`). |
|
|
21
|
+
See [mobbdev](https://www.npmjs.com/package/mobbdev) for the full documentation.
|
package/lib/binary.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
const { spawnSync } = require('child_process')
|
|
13
13
|
|
|
14
14
|
// npm package slug uses macos/win (org convention); process.platform is
|
|
15
|
-
// darwin/win32. Keep in sync with scripts/
|
|
15
|
+
// darwin/win32. Keep in sync with clients/scripts/targets.mjs npmOs().
|
|
16
16
|
function npmOs() {
|
|
17
17
|
if (process.platform === 'darwin') return 'macos'
|
|
18
18
|
if (process.platform === 'win32') return 'win'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mobb.ai/cli",
|
|
3
|
-
"version": "1.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.4.51",
|
|
4
|
+
"description": "Automated secure code remediation tool — standalone binary, no Node.js required.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/mobb-dev/bugsy.git"
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"lib"
|
|
15
15
|
],
|
|
16
16
|
"optionalDependencies": {
|
|
17
|
-
"@mobb.ai/cli-linux-arm64": "1.4.
|
|
18
|
-
"@mobb.ai/cli-linux-x64": "1.4.
|
|
19
|
-
"@mobb.ai/cli-win-x64": "1.4.
|
|
17
|
+
"@mobb.ai/cli-linux-arm64": "1.4.51",
|
|
18
|
+
"@mobb.ai/cli-linux-x64": "1.4.51",
|
|
19
|
+
"@mobb.ai/cli-win-x64": "1.4.51"
|
|
20
20
|
},
|
|
21
21
|
"publishConfig": {
|
|
22
22
|
"access": "public"
|