(name)
| 697 | } |
| 698 | |
| 699 | function parseJsonArrayEnv(name) { |
| 700 | const raw = process.env[name]; |
| 701 | if (!raw) { |
| 702 | return null; |
| 703 | } |
| 704 | try { |
| 705 | const value = JSON.parse(raw); |
| 706 | if ( |
| 707 | Array.isArray(value) && |
| 708 | value.every((item) => typeof item === "string") |
| 709 | ) { |
| 710 | return value; |
| 711 | } |
| 712 | } catch { |
| 713 | return null; |
| 714 | } |
| 715 | return null; |
| 716 | } |
| 717 | |
| 718 | function isMainModule() { |
| 719 | return import.meta.url === pathToFileURL(process.argv[1] || "").href; |
no test coverage detected