flagdoctor 0.2.0 → 0.2.1
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/dist/index.js +12 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createRequire as __cr } from 'node:module'; const require = __cr(import
|
|
|
4
4
|
// packages/cli/dist/index.js
|
|
5
5
|
import { jsx as _jsx8 } from "react/jsx-runtime";
|
|
6
6
|
import { spawn as spawn2 } from "node:child_process";
|
|
7
|
-
import { readFileSync } from "node:fs";
|
|
7
|
+
import { readFileSync, realpathSync } from "node:fs";
|
|
8
8
|
import { access as access2, writeFile as writeFile4 } from "node:fs/promises";
|
|
9
9
|
import path4 from "node:path";
|
|
10
10
|
import { pathToFileURL } from "node:url";
|
|
@@ -4219,7 +4219,17 @@ ${formatTerminalReport(enriched)}
|
|
|
4219
4219
|
return 2;
|
|
4220
4220
|
}
|
|
4221
4221
|
}
|
|
4222
|
-
|
|
4222
|
+
function isEntryPoint() {
|
|
4223
|
+
const entry = process.argv[1];
|
|
4224
|
+
if (entry === void 0)
|
|
4225
|
+
return false;
|
|
4226
|
+
try {
|
|
4227
|
+
return import.meta.url === pathToFileURL(realpathSync(entry)).href;
|
|
4228
|
+
} catch {
|
|
4229
|
+
return import.meta.url === pathToFileURL(entry).href;
|
|
4230
|
+
}
|
|
4231
|
+
}
|
|
4232
|
+
var invokedDirectly = isEntryPoint();
|
|
4223
4233
|
if (invokedDirectly) {
|
|
4224
4234
|
runCli(process.argv.slice(2)).then((code) => {
|
|
4225
4235
|
process.exitCode = code;
|