securewithtrace 0.52.0 → 0.54.0
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/bin/bunfig.toml +2 -0
- package/bin/tracecli +14 -4
- package/dist/index.js +851 -197
- package/package.json +1 -1
package/bin/bunfig.toml
ADDED
package/bin/tracecli
CHANGED
|
@@ -21,10 +21,20 @@ const installMessage = [
|
|
|
21
21
|
|
|
22
22
|
const launcherPath = realpathSync(fileURLToPath(import.meta.url));
|
|
23
23
|
const bundledEntry = resolve(dirname(launcherPath), '../dist/index.js');
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
// Bun reads `.env` and `bunfig.toml` (which can preload code) from the
|
|
25
|
+
// directory the user runs in. A shared checkout must not be able to set the
|
|
26
|
+
// CLI's environment or run code inside it, so both are switched off; the empty
|
|
27
|
+
// config shipped beside this file replaces whatever the directory holds.
|
|
28
|
+
// `--no-env-file` needs Bun 1.3.3 or newer.
|
|
29
|
+
const emptyConfig = resolve(dirname(launcherPath), 'bunfig.toml');
|
|
30
|
+
const child = spawn(
|
|
31
|
+
'bun',
|
|
32
|
+
['--no-env-file', `--config=${emptyConfig}`, bundledEntry, ...process.argv.slice(2)],
|
|
33
|
+
{
|
|
34
|
+
stdio: 'inherit',
|
|
35
|
+
windowsHide: false,
|
|
36
|
+
}
|
|
37
|
+
);
|
|
28
38
|
|
|
29
39
|
child.on('error', (error) => {
|
|
30
40
|
if (error && 'code' in error && error.code === 'ENOENT') {
|