keymap-cli 0.1.3 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/dist/cli.js +23 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -15,6 +15,7 @@ npm i -g keymap-cli # or: npx keymap-cli
15
15
  cd your-project
16
16
  keymap init -s local:.env github:owner/repo railway:api/production
17
17
  # edit keymap.yaml: issuers, rotate_every, ignore list
18
+ # (init skips config-looking names such as APP_URL, UPLOAD_DIR, MERCHANT_ID; pass --all to include them)
18
19
  keymap audit # exit 1 on missing / drift / overdue / unmapped
19
20
  keymap mark OPENAI_API_KEY # you rotated it by hand today
20
21
  pbpaste | keymap rotate OPENAI_API_KEY # push a new key everywhere, hosts first, laptop last
package/dist/cli.js CHANGED
@@ -11175,8 +11175,14 @@ function checkFields(kind, fields, path) {
11175
11175
  return out;
11176
11176
  }
11177
11177
  var NOISE = /^(NODE_ENV|PORT|HOST|HOSTNAME|PATH|HOME|TZ|LANG|LC_|CI|DEBUG|LOG_LEVEL|NEXT_PUBLIC_|VITE_|PUBLIC_|RAILWAY_|VERCEL_)/;
11178
+ var CREDENTIAL = /(SECRET|KEY|TOKEN|PASSWORD|PASSWD|PRIVATE|CREDENTIAL|SIGNING|WEBHOOK|DATABASE|DIRECT_URL|SHADOW_URL|DSN|CONNECTION|REDIS|MONGO|POSTGRES|MYSQL)/;
11179
+ var CONFIG_SUFFIX = /(_URL|_URI|_HOST|_PORT|_DIR|_PATH|_FILE|_ID|_NAME|_FROM|_TO|_EMAIL|_PRICE|_AMOUNT|_LIMIT|_COUNT|_SIZE|_TIMEOUT|_INTERVAL|_REGION|_ZONE|_BUCKET|_VERSION|_MODE|_ENV|_FLAG|_ENABLED|_URL_PROD)$/;
11180
+ function looksLikeConfig(name) {
11181
+ if (CREDENTIAL.test(name)) return false;
11182
+ return CONFIG_SUFFIX.test(name);
11183
+ }
11178
11184
  function isIgnored(name, ignore = []) {
11179
- if (NOISE.test(name)) return true;
11185
+ if (NOISE.test(name) || looksLikeConfig(name)) return true;
11180
11186
  return ignore.some((g) => g.endsWith("*") ? name.startsWith(g.slice(0, -1)) : name === g);
11181
11187
  }
11182
11188
  function normaliseSink(raw, path) {
@@ -11376,6 +11382,9 @@ function guessIssuer(name) {
11376
11382
  if (n.includes("STRIPE")) return "stripe";
11377
11383
  if (n.includes("SUPABASE")) return "supabase";
11378
11384
  if (n.includes("CLOUDFLARE") || n.startsWith("CF_")) return "cloudflare";
11385
+ if (n.includes("RESEND")) return "resend";
11386
+ if (n.includes("TELEGRAM")) return "telegram";
11387
+ if (n.includes("GITHUB") || n.startsWith("GH_")) return "github";
11379
11388
  return "custom";
11380
11389
  }
11381
11390
  async function buildManifest(opts, ctx2) {
@@ -11463,6 +11472,19 @@ function manualChecklist(issuer, name) {
11463
11472
  return [
11464
11473
  "Delete the old key at https://openrouter.ai/settings/keys once traffic has moved (or set KEYMAP_OPENROUTER_MGMT_KEY to let keymap do this)."
11465
11474
  ];
11475
+ case "resend":
11476
+ return [
11477
+ `Open https://resend.com/api-keys and confirm the new ${name} is listed.`,
11478
+ "Delete the old key once every sink has the new one."
11479
+ ];
11480
+ case "telegram":
11481
+ return [
11482
+ `In Telegram, open @BotFather -> /revoke and pick the bot behind ${name}; the old token stops working at once, so push the new one everywhere first.`
11483
+ ];
11484
+ case "github":
11485
+ return [
11486
+ "GitHub -> Settings -> Developer settings -> tokens: delete the old token after every sink has the new one."
11487
+ ];
11466
11488
  case "custom":
11467
11489
  return [`Tell the service that consumes ${name} about the new value (its own config, or a peer app) and retire the old one.`];
11468
11490
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keymap-cli",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Values-free map of every secret you run, where it lives, and one command to rotate it everywhere.",
5
5
  "license": "MIT",
6
6
  "author": "Nekruz Kasimov",