sentinelayer-cli 0.3.0 → 0.4.5

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 CHANGED
@@ -863,7 +863,7 @@ Ledger contract:
863
863
 
864
864
  ## Requirements
865
865
 
866
- - Node `>=18.17`
866
+ - Node `>=20.0`
867
867
  - network access to Sentinelayer API/web
868
868
  - optional: GitHub CLI (`gh`) authenticated for secret injection
869
869
 
@@ -884,15 +884,17 @@ Build provenance attestations are enforced by `.github/workflows/attestations.ym
884
884
  Prerequisites:
885
885
 
886
886
  - npm package name is available (`sentinelayer-cli`)
887
- - repository secret `NPM_TOKEN` is set with publish access
887
+ - one publish auth path is configured:
888
+ - repository secret `NPM_TOKEN` with publish access, or
889
+ - npm trusted publishing for this repository/tag workflow
888
890
 
889
891
  Release options:
890
892
 
891
893
  1. Merge to `main` and let `Release Please` open/update the release PR and tag.
892
894
  2. Push a tag like `v0.1.1` to publish automatically (or via release-please tag creation).
893
- 3. Run `Release` manually in verify-only mode (`publish=false`, default) to validate and upload tarball artifact.
894
- 4. Run `Release` manually with `publish=true` to publish from Actions.
895
- 5. If `NPM_TOKEN` is not configured, publish is skipped with an explicit workflow message (verification + tarball still succeed).
895
+ 3. Run `Release` manually (`workflow_dispatch`) to validate gates and rollback readiness without publishing.
896
+ 4. Tag-triggered publish resolves auth mode at runtime (`NPM_TOKEN` first, otherwise trusted publishing OIDC).
897
+ 5. If neither auth mode is available, publish fails closed with an explicit workflow error.
896
898
 
897
899
  Release publish now enforces tarball checksum-manifest validation and attestation verification bound to `.github/workflows/release.yml` before `npm publish`.
898
900
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sentinelayer-cli",
3
- "version": "0.3.0",
3
+ "version": "0.4.5",
4
4
  "description": "Scaffold Sentinelayer spec/prompt/guide artifacts with secure browser auth and token bootstrap.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -23,7 +23,7 @@
23
23
  "README.md"
24
24
  ],
25
25
  "engines": {
26
- "node": ">=18.17.0"
26
+ "node": ">=20.0.0"
27
27
  },
28
28
  "keywords": [
29
29
  "sentinelayer",
@@ -57,6 +57,7 @@
57
57
  "keytar": "7.9.0"
58
58
  },
59
59
  "devDependencies": {
60
- "c8": "10.1.3"
60
+ "c8": "10.1.3",
61
+ "license-checker-rseidelsohn": "4.4.2"
61
62
  }
62
63
  }
@@ -264,12 +264,11 @@ async function sendSlackWebhook(webhookUrl, alert) {
264
264
  ],
265
265
  });
266
266
 
267
- const response = await fetch(webhookUrl, {
267
+ const response = await fetchWithTimeout(webhookUrl, {
268
268
  method: "POST",
269
269
  headers: { "Content-Type": "application/json" },
270
270
  body: payload,
271
- signal: AbortSignal.timeout(10000),
272
- });
271
+ }, 10000);
273
272
 
274
273
  if (!response.ok) {
275
274
  throw new Error("Slack webhook failed: " + response.status);
@@ -285,12 +284,11 @@ async function sendTelegramMessage(botToken, chatId, alert) {
285
284
  disable_web_page_preview: true,
286
285
  });
287
286
 
288
- const response = await fetch(url, {
287
+ const response = await fetchWithTimeout(url, {
289
288
  method: "POST",
290
289
  headers: { "Content-Type": "application/json" },
291
290
  body: payload,
292
- signal: AbortSignal.timeout(10000),
293
- });
291
+ }, 10000);
294
292
 
295
293
  if (!response.ok) {
296
294
  throw new Error("Telegram send failed: " + response.status);
@@ -316,4 +314,14 @@ function resolveAlertChannels() {
316
314
  return channels;
317
315
  }
318
316
 
317
+ async function fetchWithTimeout(url, options, timeoutMs) {
318
+ const controller = new AbortController();
319
+ const timeoutHandle = setTimeout(() => controller.abort(), timeoutMs);
320
+ try {
321
+ return await fetch(url, { ...options, signal: controller.signal });
322
+ } finally {
323
+ clearTimeout(timeoutHandle);
324
+ }
325
+ }
326
+
319
327
  export { STUCK_THRESHOLDS };