envpkt 0.6.0 → 0.6.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.
Files changed (2) hide show
  1. package/dist/cli.js +15 -8
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -2842,6 +2842,7 @@ const writeSealedToml = (configPath, sealedMeta) => {
2842
2842
  output.push(`encrypted_value = """`);
2843
2843
  output.push(pendingSeals.get(currentMetaKey));
2844
2844
  output.push(`"""`);
2845
+ output.push("");
2845
2846
  pendingSeals.delete(currentMetaKey);
2846
2847
  }
2847
2848
  currentMetaKey = metaMatch[1];
@@ -2855,6 +2856,7 @@ const writeSealedToml = (configPath, sealedMeta) => {
2855
2856
  output.push(`encrypted_value = """`);
2856
2857
  output.push(pendingSeals.get(currentMetaKey));
2857
2858
  output.push(`"""`);
2859
+ output.push("");
2858
2860
  pendingSeals.delete(currentMetaKey);
2859
2861
  }
2860
2862
  insideMetaBlock = false;
@@ -2864,19 +2866,24 @@ const writeSealedToml = (configPath, sealedMeta) => {
2864
2866
  }
2865
2867
  if (insideMetaBlock && encryptedValueRe.test(line)) {
2866
2868
  hasEncryptedValue = true;
2867
- if (currentMetaKey && pendingSeals.has(currentMetaKey)) {
2869
+ const replacing = !!(currentMetaKey && pendingSeals.has(currentMetaKey));
2870
+ if (replacing) {
2868
2871
  output.push(`encrypted_value = """`);
2869
2872
  output.push(pendingSeals.get(currentMetaKey));
2870
2873
  output.push(`"""`);
2874
+ output.push("");
2871
2875
  pendingSeals.delete(currentMetaKey);
2872
- if (line.includes("\"\"\"") && !line.endsWith("\"\"\"")) {
2873
- const afterEquals = line.slice(line.indexOf("=") + 1).trim();
2874
- if (afterEquals.startsWith("\"\"\"") && !afterEquals.slice(3).includes("\"\"\"")) {
2875
- while (i + 1 < lines.length && !lines[i + 1].includes("\"\"\"")) i++;
2876
- if (i + 1 < lines.length) i++;
2877
- }
2878
- }
2879
2876
  } else output.push(line);
2877
+ if (line.slice(line.indexOf("=") + 1).trim().includes("\"\"\"")) {
2878
+ while (i + 1 < lines.length && !lines[i + 1].includes("\"\"\"")) {
2879
+ if (!replacing) output.push(lines[i + 1]);
2880
+ i++;
2881
+ }
2882
+ if (i + 1 < lines.length) {
2883
+ if (!replacing) output.push(lines[i + 1]);
2884
+ i++;
2885
+ }
2886
+ }
2880
2887
  continue;
2881
2888
  }
2882
2889
  output.push(line);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "envpkt",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Credential lifecycle and fleet management for AI agents",
5
5
  "keywords": [
6
6
  "credentials",