envpkt 0.6.3 → 0.6.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.
Files changed (2) hide show
  1. package/dist/cli.js +9 -6
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -2974,7 +2974,6 @@ const writeSealedToml = (configPath, sealedMeta) => {
2974
2974
  output.push(`encrypted_value = """`);
2975
2975
  output.push(pendingSeals.get(currentMetaKey));
2976
2976
  output.push(`"""`);
2977
- output.push("");
2978
2977
  pendingSeals.delete(currentMetaKey);
2979
2978
  } else output.push(line);
2980
2979
  if (line.slice(line.indexOf("=") + 1).trim().includes("\"\"\"")) {
@@ -3055,13 +3054,17 @@ const runSeal = async (options) => {
3055
3054
  console.log("");
3056
3055
  const values = await (async () => {
3057
3056
  if (options.reseal && alreadySealed.length > 0) {
3058
- const identityPath = config.identity?.key_file ? resolve(configDir, expandPath(config.identity.key_file)) : void 0;
3057
+ const identityPath = config.identity?.key_file ? resolve(configDir, expandPath(config.identity.key_file)) : (() => {
3058
+ const defaultPath = resolveKeyPath();
3059
+ return existsSync(defaultPath) ? defaultPath : void 0;
3060
+ })();
3059
3061
  if (!identityPath) {
3060
- console.error(`${RED}Error:${RESET} identity.key_file is required for --reseal (needed to decrypt existing secrets)`);
3062
+ console.error(`${RED}Error:${RESET} No identity key found for --reseal (needed to decrypt existing secrets)`);
3061
3063
  console.error("");
3062
- console.error(`${DIM}Add to your envpkt.toml:${RESET}`);
3063
- console.error(`${DIM} [identity]${RESET}`);
3064
- console.error(`${DIM} key_file = "path/to/identity.txt"${RESET}`);
3064
+ console.error(`${DIM}Looked in:${RESET}`);
3065
+ console.error(`${DIM} 1. identity.key_file in envpkt.toml${RESET}`);
3066
+ console.error(`${DIM} 2. ENVPKT_AGE_KEY_FILE env var${RESET}`);
3067
+ console.error(`${DIM} 3. ~/.envpkt/age-key.txt${RESET}`);
3065
3068
  process.exit(2);
3066
3069
  }
3067
3070
  const decrypted = unsealSecrets(Object.fromEntries(alreadySealed.map((k) => [k, allSecretEntries[k]])), identityPath).fold((err) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "envpkt",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "description": "Credential lifecycle and fleet management for AI agents",
5
5
  "keywords": [
6
6
  "credentials",