nestjs-infisical 1.0.10 → 1.0.11
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/infisical.loader.js +15 -1
- package/package.json +1 -1
package/dist/infisical.loader.js
CHANGED
|
@@ -15,7 +15,20 @@ async function loadInfisicalSecrets(options) {
|
|
|
15
15
|
try {
|
|
16
16
|
debugLog(options.debug, `Fetching secrets from Infisical`);
|
|
17
17
|
debugLog(options.debug, `baseUrl=${options.baseUrl}, projectId=${options.projectId}, environment=${options.environment}`);
|
|
18
|
-
const
|
|
18
|
+
const url = `${options.baseUrl}/api/v3/secrets/raw`;
|
|
19
|
+
debugLog(options.debug, JSON.stringify({
|
|
20
|
+
url,
|
|
21
|
+
timeout: 5000,
|
|
22
|
+
headers: {
|
|
23
|
+
Authorization: `Bearer ${options.token}`,
|
|
24
|
+
},
|
|
25
|
+
params: {
|
|
26
|
+
projectId: options.projectId,
|
|
27
|
+
environment: options.environment,
|
|
28
|
+
},
|
|
29
|
+
}));
|
|
30
|
+
const response = await axios_1.default.get(url, {
|
|
31
|
+
timeout: 5000,
|
|
19
32
|
headers: {
|
|
20
33
|
Authorization: `Bearer ${options.token}`,
|
|
21
34
|
},
|
|
@@ -24,6 +37,7 @@ async function loadInfisicalSecrets(options) {
|
|
|
24
37
|
environment: options.environment,
|
|
25
38
|
},
|
|
26
39
|
});
|
|
40
|
+
debugLog(options.debug, `Received response from Infisical with status ${response.status}`);
|
|
27
41
|
const secrets = response.data?.secrets ?? {};
|
|
28
42
|
debugLog(options.debug, `Fetched ${Object.keys(secrets).length} secrets from Infisical`);
|
|
29
43
|
debugLog(options.debug, `Secret keys fetched: ${Object.keys(secrets).join(', ')}`);
|