@varius.io/framework 13.12.3 → 13.12.4

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.
@@ -2,7 +2,9 @@
2
2
 
3
3
  import { spawn } from "child_process";
4
4
  import fsp from "node:fs/promises";
5
- import { format } from "node:util";
5
+ import { format, debuglog } from "node:util";
6
+
7
+ const debug = debuglog("vatom-vault-env");
6
8
 
7
9
  const vaultApiBase = process.env.VAULT_ENV_VAULT_API_BASE;
8
10
 
@@ -56,6 +58,8 @@ async function fetchSecret(secretPath) {
56
58
  );
57
59
  }
58
60
 
61
+ debug("fetched secret, secretPath=%j", secretPath);
62
+
59
63
  const resBody = await res.json();
60
64
  return resBody.data;
61
65
  }
@@ -100,6 +104,13 @@ function spawnChildProcess() {
100
104
 
101
105
  const childCommand = process.argv.shift();
102
106
 
107
+ debug(
108
+ "spawning child process, command=%j, argv=%j, cwd=%j",
109
+ childCommand,
110
+ process.argv,
111
+ process.cwd()
112
+ );
113
+
103
114
  const child = spawn(childCommand, process.argv, {
104
115
  cwd: process.cwd(),
105
116
  env: process.env,
@@ -112,11 +123,14 @@ function spawnChildProcess() {
112
123
  }
113
124
 
114
125
  async function main() {
126
+ debug("starting");
127
+
115
128
  // need to temporarily allow self-signed certs
116
129
  const oldRejectUnauthorized = process.env.NODE_TLS_REJECT_UNAUTHORIZED;
117
130
  process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
118
131
 
119
132
  const resolvedEnv = await resolveEnv();
133
+ debug("resolved env vars, names=%j", Object.keys(resolvedEnv).join(" "));
120
134
 
121
135
  // reset self-signed cert permission, for the child process
122
136
  process.env.NODE_TLS_REJECT_UNAUTHORIZED = oldRejectUnauthorized;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varius.io/framework",
3
- "version": "13.12.3",
3
+ "version": "13.12.4",
4
4
  "main": "./build/index.js",
5
5
  "type": "./build/index.d.ts",
6
6
  "scripts": {