evergreen-trace-runtime 0.1.4 → 0.1.5

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/cli.js CHANGED
@@ -13,36 +13,20 @@ function printUsage() {
13
13
  }
14
14
 
15
15
  function run() {
16
- // const argv = process.argv.slice(2); // drop node + script
16
+ const argv = process.argv.slice(2); // drop node + script
17
17
 
18
- // const [cmd, entry, ...rest] = argv;
18
+ const [cmd, entry, ...rest] = argv;
19
19
 
20
- // if (cmd !== "run" || !entry) {
21
- // printUsage();
22
- // process.exit(1);
23
- // }
24
-
25
- // const entryPath = path.resolve(process.cwd(), entry);
26
-
27
- // const child = spawn(
28
- // process.execPath,
29
- // ["--require", "evergreen-trace-runtime/register", entryPath, ...rest],
30
- // { stdio: "inherit" },
31
- // );
32
-
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) {
20
+ if (cmd !== "run" || !entry) {
36
21
  printUsage();
37
22
  process.exit(1);
38
23
  }
24
+
25
+ const entryPath = path.resolve(process.cwd(), entry);
26
+
39
27
  const child = spawn(
40
28
  process.execPath,
41
- [
42
- "--require",
43
- "evergreen-trace-runtime/register",
44
- ...nodeArgs, // everything else comes from the caller
45
- ],
29
+ ["--require", "evergreen-trace-runtime/register", entryPath, ...rest],
46
30
  { stdio: "inherit" },
47
31
  );
48
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evergreen-trace-runtime",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Evergreen Trace runtime loader and CLI",
5
5
  "main": "register.js",
6
6
  "bin": {
Binary file