Open History to see the last commit
1// @effect-diagnostics nodeBuiltinImport:off -- Build configs read this before any Effect runtime.
2import * as NodeFS from "node:fs";
3import * as NodePath from "node:path";
4
5/** SEA assets for every module of the embedded CLI, keyed by file name for bin.ts to serve. */
6export function cliAssets(cliAssetDir: string): Record<string, string> {
7 return Object.fromEntries(
8 NodeFS.readdirSync(cliAssetDir)
9 .filter((name) => name.endsWith(".mjs"))
10 .map((name) => [name, NodePath.join(cliAssetDir, name)]),
11 );
12}