bun-ui-tests 1.0.1 → 1.0.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.ts +2 -2
- package/package.json +1 -1
- package/ui-runner.ts +2 -2
package/cli.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
|
|
3
3
|
import { spawn } from "node:child_process";
|
|
4
|
-
import { readFile, access } from "node:fs/promises";
|
|
4
|
+
import { readFile, access, realpath } from "node:fs/promises";
|
|
5
5
|
import { join, dirname } from "node:path";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
|
|
8
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __filename = await realpath(fileURLToPath(import.meta.url));
|
|
9
9
|
const __dirname = dirname(__filename);
|
|
10
10
|
|
|
11
11
|
const COMMANDS = {
|
package/package.json
CHANGED
package/ui-runner.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { spawn } from "node:child_process";
|
|
|
15
15
|
import { readdir, readFile, stat } from "node:fs/promises";
|
|
16
16
|
import { join, relative, dirname } from "node:path";
|
|
17
17
|
import { fileURLToPath } from "node:url";
|
|
18
|
-
import { existsSync } from "node:fs";
|
|
18
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
19
19
|
|
|
20
20
|
// Determina o diretório do executável ou script
|
|
21
21
|
const getBaseDir = () => {
|
|
@@ -27,7 +27,7 @@ const getBaseDir = () => {
|
|
|
27
27
|
return dirname(process.execPath);
|
|
28
28
|
}
|
|
29
29
|
// Se rodando como script .ts em dev, usa o dirname do próprio arquivo
|
|
30
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
30
|
+
const __filename = realpathSync(fileURLToPath(import.meta.url));
|
|
31
31
|
return dirname(__filename);
|
|
32
32
|
};
|
|
33
33
|
|