@suronai/sdk 0.1.15 → 0.1.17
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/package.json +1 -1
- package/src/vault.js +2 -5
package/package.json
CHANGED
package/src/vault.js
CHANGED
|
@@ -94,6 +94,7 @@ async function fetchKey(apiUrl, requestId) {
|
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
96
|
* Waits for Telegram approval, then decrypts .env into process.env.
|
|
97
|
+
* Runs silently — no stdout output under any circumstances.
|
|
97
98
|
* Must be awaited before any code that reads process.env.
|
|
98
99
|
* @param {VaultOptions} [options]
|
|
99
100
|
* @returns {Promise<void>}
|
|
@@ -113,14 +114,10 @@ export async function vault(options = {}) {
|
|
|
113
114
|
|
|
114
115
|
const requestId = await requestAccess(apiUrl, config.id);
|
|
115
116
|
|
|
116
|
-
process.stdout.write(`\n △ Suron — waiting for Telegram approval\n │ App: ${config.app}\n │ Tap ✅ Approve in Telegram to continue.\n\n`);
|
|
117
|
-
|
|
118
117
|
await pollUntilApproved(apiUrl, requestId, timeout, pollInterval);
|
|
119
118
|
|
|
120
119
|
const privateKey = await fetchKey(apiUrl, requestId);
|
|
121
120
|
decryptEnv(privateKey, configPath);
|
|
122
121
|
// Note: JS strings are immutable — there is no way to scrub the value from
|
|
123
|
-
// heap memory. The reference is dropped here and will be GC
|
|
124
|
-
|
|
125
|
-
process.stdout.write(` ✔ Suron — secrets loaded for “${config.app}”\n\n`);
|
|
122
|
+
// heap memory. The reference is dropped here and will be GC'd normally.
|
|
126
123
|
}
|