evergreen-trace-runtime 0.1.3 → 0.1.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.
Files changed (2) hide show
  1. package/cli.js +4 -9
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -30,23 +30,18 @@ function run() {
30
30
  // { stdio: "inherit" },
31
31
  // );
32
32
 
33
- const argv = process.argv.slice(2); // ["run", "src/server.ts", ...]
34
- const [cmd, entry, ...rest] = argv;
35
- if (cmd !== "run" || !entry) {
33
+ const argv = process.argv.slice(2); // e.g. ["run", "node", "--import", "tsx", "src/server.ts", "--", "--port", "3000"]
34
+ const [cmd, ...nodeArgs] = argv;
35
+ if (cmd !== "run" || nodeArgs.length === 0) {
36
36
  printUsage();
37
37
  process.exit(1);
38
38
  }
39
- const entryPath = path.resolve(process.cwd(), entry);
40
39
  const child = spawn(
41
40
  process.execPath,
42
41
  [
43
- "--import",
44
- "tsx",
45
- "--watch",
46
42
  "--require",
47
43
  "evergreen-trace-runtime/register",
48
- entryPath,
49
- ...rest, // app-level args only
44
+ ...nodeArgs, // everything else comes from the caller
50
45
  ],
51
46
  { stdio: "inherit" },
52
47
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evergreen-trace-runtime",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Evergreen Trace runtime loader and CLI",
5
5
  "main": "register.js",
6
6
  "bin": {