UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

1 lines 731 B
import{parseArgs}from"node:util";import{ROLLDOWN_STANDARD_CONDITION_NAMES}from"#internal/bundler/nitro-rolldown.js";function authoredModuleConditions(e=process.execArgv,t=process.env.NODE_OPTIONS??``){let{values:n}=parseArgs({args:[...splitNodeOptions(t),...e],allowPositionals:!0,strict:!1,options:{conditions:{type:`string`,multiple:!0,short:`C`}}});return[...new Set([`eve-source`,...n.conditions??[]])].filter(e=>typeof e==`string`&&!ROLLDOWN_STANDARD_CONDITION_NAMES.has(e))}function splitNodeOptions(e){let t=[],n=``,r=!1;for(let i=0;i<e.length;i++){let a=e[i];a===`\\`&&r&&i+1<e.length?n+=e[++i]:a===`"`?r=!r:/\s/.test(a)&&!r?(n.length>0&&t.push(n),n=``):n+=a}return n.length>0&&t.push(n),t}export{authoredModuleConditions};