viberadar 0.3.163 → 0.3.165

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAO7B,OAAO,EAAE,UAAU,EAA4H,MAAM,YAAY,CAAC;AAGlK,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;CACrB;AAuhED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CA8jF1G"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAO7B,OAAO,EAAE,UAAU,EAA4H,MAAM,YAAY,CAAC;AAGlK,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;CACrB;AAuhED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAukF1G"}
@@ -4660,7 +4660,16 @@ a{color:var(--blue)}
4660
4660
  broadcast('load-started', { config: cfg });
4661
4661
  res.writeHead(200, jsonH);
4662
4662
  res.end(JSON.stringify({ ok: true }));
4663
- loadProc = (0, child_process_1.spawn)('k6', ['run', '--out', `json=${jsonOutPath}`, scriptPath], {
4663
+ // Build --env flags from cfg.envVars (e.g. { TOKEN: 'abc', BASE_URL: '...' })
4664
+ const envVars = (typeof cfg.envVars === 'object' && cfg.envVars !== null)
4665
+ ? cfg.envVars
4666
+ : {};
4667
+ const envFlags = [];
4668
+ for (const [k, v] of Object.entries(envVars)) {
4669
+ if (k && v !== undefined && v !== '')
4670
+ envFlags.push('--env', `${k}=${v}`);
4671
+ }
4672
+ loadProc = (0, child_process_1.spawn)('k6', ['run', ...envFlags, '--out', `json=${jsonOutPath}`, scriptPath], {
4664
4673
  cwd: projectRoot, env: { ...process.env }, shell: WIN, stdio: 'pipe',
4665
4674
  });
4666
4675
  const addLog = (line) => {