envpkt 0.10.1 → 0.10.2

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/dist/cli.js CHANGED
@@ -88,8 +88,11 @@ const computeAudit = (config, fnoxKeys, today, aliasTable) => {
88
88
  const nonAliasMetaKeys = new Set(nonAliasEntries.map(([k]) => k));
89
89
  const nonAliasHealth = nonAliasEntries.map(([key, meta]) => classifySecret(key, meta, keys, staleWarningDays, requireExpiration, requireService, now));
90
90
  const healthByKey = new Map(nonAliasHealth.map((h) => [h.key, h]));
91
+ const parseTargetKey = (from_key) => {
92
+ return /^secret\.(.+)$/.exec(from_key)?.[1];
93
+ };
91
94
  const aliasHealth = aliasEntries.map(([key, meta]) => {
92
- const targetKey = (aliasTable?.entries.get(`secret.${key}`))?.targetKey;
95
+ const targetKey = (aliasTable?.entries.get(`secret.${key}`))?.targetKey ?? (meta.from_key !== void 0 ? parseTargetKey(meta.from_key) : void 0);
93
96
  const targetHealth = targetKey !== void 0 ? healthByKey.get(targetKey) : void 0;
94
97
  const targetRef = meta.from_key ?? (targetKey !== void 0 ? `secret.${targetKey}` : "");
95
98
  if (!targetHealth) return {
@@ -547,12 +550,14 @@ const formatAuditJson = (audit) => JSON.stringify({
547
550
  missing: audit.missing,
548
551
  missing_metadata: audit.missing_metadata,
549
552
  orphaned: audit.orphaned,
553
+ aliases: audit.aliases,
550
554
  secrets: audit.secrets.map((s) => ({
551
555
  key: s.key,
552
556
  service: s.service.fold(() => null, (sv) => sv),
553
557
  status: s.status,
554
558
  days_remaining: s.days_remaining.fold(() => null, (d) => d),
555
559
  rotation_url: s.rotation_url.fold(() => null, (u) => u),
560
+ alias_of: s.alias_of.fold(() => null, (a) => a),
556
561
  purpose: s.purpose.fold(() => null, (p) => p),
557
562
  issues: s.issues.toArray()
558
563
  })).toArray()
package/dist/index.js CHANGED
@@ -650,8 +650,11 @@ const computeAudit = (config, fnoxKeys, today, aliasTable) => {
650
650
  const nonAliasMetaKeys = new Set(nonAliasEntries.map(([k]) => k));
651
651
  const nonAliasHealth = nonAliasEntries.map(([key, meta]) => classifySecret(key, meta, keys, staleWarningDays, requireExpiration, requireService, now));
652
652
  const healthByKey = new Map(nonAliasHealth.map((h) => [h.key, h]));
653
+ const parseTargetKey = (from_key) => {
654
+ return /^secret\.(.+)$/.exec(from_key)?.[1];
655
+ };
653
656
  const aliasHealth = aliasEntries.map(([key, meta]) => {
654
- const targetKey = (aliasTable?.entries.get(`secret.${key}`))?.targetKey;
657
+ const targetKey = (aliasTable?.entries.get(`secret.${key}`))?.targetKey ?? (meta.from_key !== void 0 ? parseTargetKey(meta.from_key) : void 0);
655
658
  const targetHealth = targetKey !== void 0 ? healthByKey.get(targetKey) : void 0;
656
659
  const targetRef = meta.from_key ?? (targetKey !== void 0 ? `secret.${targetKey}` : "");
657
660
  if (!targetHealth) return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "envpkt",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
4
4
  "description": "Credential lifecycle and fleet management for AI agents",
5
5
  "keywords": [
6
6
  "credentials",