@rafay99/cvx 0.27.0 → 0.33.0
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 +34 -1
- package/{launcher.js → launcher.cjs} +2 -0
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -185,7 +185,7 @@ cvx completions zsh >> ~/.zshrc # tab-complete commands + account names
|
|
|
185
185
|
|
|
186
186
|
The vault is schema-versioned. The first time you run an interactive `cvx`
|
|
187
187
|
command after updating from an older release, cvx shows a one-time prompt and,
|
|
188
|
-
on confirmation, re-secures your tokens in the
|
|
188
|
+
on confirmation, re-secures your tokens in the file vault (chmod 600)
|
|
189
189
|
and upgrades the vault format. It's mandatory and runs once — you never see it
|
|
190
190
|
again. The cd-hook and scripts keep working throughout; the prompt only appears
|
|
191
191
|
in an interactive terminal. (Migration deliberately stays out of the OS keychain
|
|
@@ -212,6 +212,39 @@ man/cvx.1 man page (installed by Homebrew/npm → `man cvx`)
|
|
|
212
212
|
First run of a bare `cvx` shows a welcome screen; `cvx welcome` shows it again,
|
|
213
213
|
and `man cvx` opens the manual.
|
|
214
214
|
|
|
215
|
+
## Testing
|
|
216
|
+
|
|
217
|
+
```sh
|
|
218
|
+
bun test # full suite: parser + store units, and an e2e matrix that
|
|
219
|
+
# drives every command against a throwaway CVX_HOME
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
The suite runs in ~2s, needs no setup, and never touches your real vault —
|
|
223
|
+
CI (`.github/workflows/test.yml`) runs it on every PR. Three flows can't run
|
|
224
|
+
headless and stay manual (use the sandbox below): real `cvx login` (browser),
|
|
225
|
+
the interactive migration prompt (needs a PTY), and `cvx keychain enable`
|
|
226
|
+
(the OS keychain is per-user).
|
|
227
|
+
|
|
228
|
+
## Testing safely (sandbox)
|
|
229
|
+
|
|
230
|
+
Never test a build against your real vault. Everything cvx touches — the vault,
|
|
231
|
+
the global `~/.convex/config.json` it swaps, the rc files `hook --install`
|
|
232
|
+
edits — resolves from one base directory, and setting `CVX_HOME` relocates all
|
|
233
|
+
of it:
|
|
234
|
+
|
|
235
|
+
```sh
|
|
236
|
+
scripts/sandbox.sh # build + drop into a shell with an EMPTY sandbox vault
|
|
237
|
+
scripts/sandbox.sh --copy-vault # same, but seeded with a COPY of your real vault
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
Inside that shell `cvx` is the fresh build and every command — `link`,
|
|
241
|
+
`activate`, `rm`, even the migration prompt and `hook --install` — reads and
|
|
242
|
+
writes only the sandbox. `exit` to leave; your real setup is never touched.
|
|
243
|
+
Works without the script too: `CVX_HOME=/tmp/try cvx status`.
|
|
244
|
+
|
|
245
|
+
One exception can't be sandboxed: the OS keychain is per-user, so skip
|
|
246
|
+
`cvx keychain enable` in a sandbox (the default file backend is used anyway).
|
|
247
|
+
|
|
215
248
|
## Releasing
|
|
216
249
|
|
|
217
250
|
Pushing to `main` (touching `bin/**` or `package.json`) triggers
|
|
@@ -28,4 +28,6 @@ if (res.error) {
|
|
|
28
28
|
console.error(res.error.message);
|
|
29
29
|
process.exit(1);
|
|
30
30
|
}
|
|
31
|
+
// Propagate a signal death (Ctrl-C etc.) as a signal, not a generic failure.
|
|
32
|
+
if (res.signal) process.kill(process.pid, res.signal);
|
|
31
33
|
process.exit(res.status === null ? 1 : res.status);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rafay99/cvx",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Switch Convex accounts per project automatically — run many Convex accounts across projects at once, no login/logout churn, no deploy keys, no tokens in your repos",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"convex", "convex-dev", "convex-cli", "cli", "command-line",
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"bugs": "https://github.com/rafay99-epic/convex-switch/issues",
|
|
15
15
|
"repository": { "type": "git", "url": "git+https://github.com/rafay99-epic/convex-switch.git" },
|
|
16
16
|
"author": "Abdul Rafay",
|
|
17
|
-
"bin": { "cvx": "launcher.
|
|
17
|
+
"bin": { "cvx": "launcher.cjs" },
|
|
18
18
|
"man": ["cvx.1"],
|
|
19
|
-
"files": ["launcher.
|
|
19
|
+
"files": ["launcher.cjs", "cvx.1", "README.md", "LICENSE"],
|
|
20
20
|
"engines": { "node": ">=16" },
|
|
21
21
|
"optionalDependencies": {
|
|
22
|
-
"@rafay99/cvx-darwin-arm64": "0.
|
|
23
|
-
"@rafay99/cvx-darwin-x64": "0.
|
|
24
|
-
"@rafay99/cvx-linux-x64": "0.
|
|
25
|
-
"@rafay99/cvx-linux-arm64": "0.
|
|
26
|
-
"@rafay99/cvx-win32-x64": "0.
|
|
22
|
+
"@rafay99/cvx-darwin-arm64": "0.33.0",
|
|
23
|
+
"@rafay99/cvx-darwin-x64": "0.33.0",
|
|
24
|
+
"@rafay99/cvx-linux-x64": "0.33.0",
|
|
25
|
+
"@rafay99/cvx-linux-arm64": "0.33.0",
|
|
26
|
+
"@rafay99/cvx-win32-x64": "0.33.0"
|
|
27
27
|
}
|
|
28
28
|
}
|