@stupify/cli 0.0.4 → 0.0.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/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/stupify.js +2 -1
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/stupify.ts +2 -1
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
package/dist/stupify.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { realpathSync } from "node:fs";
|
|
2
3
|
import { fileURLToPath } from "node:url";
|
|
3
4
|
import { countPromptTokens, runSearch, searchRequest } from "./analysis.js";
|
|
4
5
|
import { searchChecks } from "./checks.js";
|
|
@@ -232,6 +233,6 @@ function pathKind(filePath) {
|
|
|
232
233
|
const ext = filePath.split(".").pop();
|
|
233
234
|
return ext && ext !== filePath ? ext : "unknown";
|
|
234
235
|
}
|
|
235
|
-
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
236
|
+
if (process.argv[1] && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
236
237
|
process.exitCode = await main();
|
|
237
238
|
}
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
package/src/stupify.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import { realpathSync } from "node:fs";
|
|
3
4
|
import { fileURLToPath } from "node:url";
|
|
4
5
|
import { countPromptTokens, runSearch, searchRequest } from "./analysis.ts";
|
|
5
6
|
import { searchChecks } from "./checks.ts";
|
|
@@ -280,6 +281,6 @@ function pathKind(filePath: string): string {
|
|
|
280
281
|
return ext && ext !== filePath ? ext : "unknown";
|
|
281
282
|
}
|
|
282
283
|
|
|
283
|
-
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
|
284
|
+
if (process.argv[1] && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
284
285
|
process.exitCode = await main();
|
|
285
286
|
}
|