3export const buildEpScopesSection = ({actionNames, actionsH, callingScript}: { 4 actionNames: string[], actionsH: ActionsH, callingScript: string, 6 const scopeCmds: string[] = [] 7 for (const actionName of actionNames) { 8 const fnc = actionsH[actionName] 9 if ((fnc?.cliDescript as Record<string, unknown>)?.cliSupportsEpScopes) { 10 scopeCmds.push(actionName) 14 if (scopeCmds.length === 0) return null 16 const appNameMatch = callingScript.match(/^([^/]+)\//) 17 const appName = appNameMatch ? appNameMatch[1] : 'app' 18 const examplePath = `${appName}/server/lib/exampleF.mjs` 20 return {scopeCmds, examplePath}