mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-16 03:31:44 +01:00
Also include receipt bytes and the receipt file in reported artifact totals. Co-Authored-By: Paperclip <noreply@paperclip.ing>
9 lines
308 B
JavaScript
9 lines
308 B
JavaScript
import { realpath } from 'node:fs/promises';
|
|
import { pathToFileURL } from 'node:url';
|
|
|
|
export async function isEntrypoint(url, argument = process.argv[1]) {
|
|
if (!argument || argument === '-') return false;
|
|
try { return url === pathToFileURL(await realpath(argument)).href; }
|
|
catch { return false; }
|
|
}
|