@qerexa/cli 0.1.0 → 0.1.1
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 +15 -8
- package/index.mjs +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
# Qerexa CLI (preview)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
`
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
Put a Qerexa check in front of your CI jobs, and manage short-lived secrets
|
|
4
|
+
from the terminal.
|
|
5
|
+
|
|
6
|
+
`qerexa-cli gate` exits 0 only when Qerexa gives a clear, current yes: an
|
|
7
|
+
`allowed` decision with its own ID and an expiry still in the future. Every
|
|
8
|
+
other outcome exits non-zero, so the pipeline step that depends on it simply
|
|
9
|
+
doesn't run. When a human review is needed, `--no-wait` exits with code 2 right
|
|
10
|
+
away instead of polling.
|
|
11
|
+
|
|
12
|
+
An approved review still exits non-zero. Approving a review isn't permission
|
|
13
|
+
to deploy or move money, so feed that decision into your own action-bound
|
|
14
|
+
execution step rather than treating it as a green light.
|
|
15
|
+
|
|
16
|
+
This is a preview, not a certified execution control. Redirects are never
|
|
17
|
+
followed, so your API key stays with the API host you configure.
|
|
11
18
|
|
|
12
19
|
## Install
|
|
13
20
|
|
package/index.mjs
CHANGED
|
@@ -86,7 +86,13 @@ async function resilientFetch(url, init, attempts = 3) {
|
|
|
86
86
|
let lastError;
|
|
87
87
|
for (let attempt = 0; attempt < attempts; attempt++) {
|
|
88
88
|
try {
|
|
89
|
-
|
|
89
|
+
// The API never redirects. Following one would send X-API-Key to another
|
|
90
|
+
// host (fetch drops only Authorization), and a 3xx is never an allow.
|
|
91
|
+
const response = await fetch(url, {
|
|
92
|
+
...init,
|
|
93
|
+
redirect: "manual",
|
|
94
|
+
signal: AbortSignal.timeout(10_000),
|
|
95
|
+
});
|
|
90
96
|
if (response.status !== 429 && response.status < 500) return response;
|
|
91
97
|
if (attempt === attempts - 1) return response;
|
|
92
98
|
} catch (error) {
|