evergreen-trace-runtime 0.1.0 → 0.1.2
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 +19 -7
- package/package.json +3 -4
package/cli.js
CHANGED
|
@@ -13,20 +13,32 @@ 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) {
|
|
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", "--watch", "src/server.ts"]
|
|
34
|
+
const [cmd, ...nodeArgs] = argv;
|
|
35
|
+
if (cmd !== "run" || nodeArgs.length === 0) {
|
|
21
36
|
printUsage();
|
|
22
37
|
process.exit(1);
|
|
23
38
|
}
|
|
24
|
-
|
|
25
|
-
const entryPath = path.resolve(process.cwd(), entry);
|
|
26
|
-
|
|
27
39
|
const child = spawn(
|
|
28
40
|
process.execPath,
|
|
29
|
-
["--require", "evergreen-trace-runtime/register",
|
|
41
|
+
["--require", "evergreen-trace-runtime/register", ...nodeArgs],
|
|
30
42
|
{ stdio: "inherit" },
|
|
31
43
|
);
|
|
32
44
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evergreen-trace-runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Evergreen Trace runtime loader and CLI",
|
|
5
5
|
"main": "register.js",
|
|
6
6
|
"bin": {
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@babel/core": "^7.23.0",
|
|
14
14
|
"micromatch": "^4.0.0",
|
|
15
|
-
"evergreen-babel-plugin": "
|
|
16
|
-
"evergreen-sdk": "
|
|
15
|
+
"evergreen-babel-plugin": "1.0.0",
|
|
16
|
+
"evergreen-sdk": "1.0.0"
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
|