@@ -104,28 +104,41 @@ const hosts = getLocalhostAddress();
104104console .log (hosts );
105105```
106106
107+ Build tsdown entries from a source directory:
108+
109+ ``` ts
110+ import { outputEntryBuilder } from " @unimolecule/utils/node/output-entry-builder" ;
111+
112+ export default {
113+ entry: outputEntryBuilder (" ./src" , {
114+ entries: " index" ,
115+ }),
116+ };
117+ ```
118+
107119## API
108120
109- | Export | Description |
110- | ---------------------------------------------- | ------------------------------------------------------------------------- |
111- | ` appExists(app, options?) ` | Async PATH probe for an executable app. |
112- | ` appExistsSync(app, options?) ` | Sync PATH probe for an executable app. |
113- | ` checkProcessDiskAccess(path?) ` | Verifies read/write access for a path, defaulting to ` process.cwd() ` . |
114- | ` executeCommand(command, args?, options?) ` | Runs a command and resolves exit details when it succeeds. |
115- | ` executeCommandSync(command, args?, options?) ` | Sync command runner with the same success/error behavior. |
116- | ` formatPath(path) ` | Converts backslash separators to ` / ` while leaving Unix paths unchanged. |
117- | ` createProcessGracefulExit(logger?) ` | Creates isolated process signal registration and shutdown helpers. |
118- | ` exitSignals ` | Supported graceful shutdown signals: ` SIGINT ` , ` SIGQUIT ` , ` SIGTERM ` . |
119- | ` getLocalhostAddress() ` | Returns non-internal IPv4 addresses plus ` [::] ` , with duplicates removed. |
120- | ` getPackages(cwd?) ` | Async export from ` @manypkg/get-packages ` . |
121- | ` getPackagesSync(cwd?) ` | Sync export from ` @manypkg/get-packages ` . |
122- | ` pathExists(path) ` | Async ` fs.access ` existence check. |
123- | ` pathExistsSync(path) ` | Sync ` fs.accessSync ` existence check. |
124- | ` require ` | ` createRequire(import.meta.url) ` for ESM modules that need Node require. |
125- | ` unifiedSpawn(command, args?, options?) ` | Cross-platform ` spawn ` wrapper. |
126- | ` unifiedSpawnAsync(command, args?, options?) ` | Promise wrapper resolving the child close code. |
127- | ` unifiedSpawnSync(command, args?, options?) ` | Cross-platform ` spawnSync ` wrapper. |
128- | ` userHome ` | Current ` os.homedir() ` value. |
121+ | Export | Description |
122+ | ---------------------------------------------- | ----------------------------------------------------------------------------------------- |
123+ | ` appExists(app, options?) ` | Async PATH probe for an executable app. |
124+ | ` appExistsSync(app, options?) ` | Sync PATH probe for an executable app. |
125+ | ` checkProcessDiskAccess(path?) ` | Verifies read/write access for a path, defaulting to ` process.cwd() ` . |
126+ | ` executeCommand(command, args?, options?) ` | Runs a command and resolves exit details when it succeeds. |
127+ | ` executeCommandSync(command, args?, options?) ` | Sync command runner with the same success/error behavior. |
128+ | ` formatPath(path) ` | Converts backslash separators to ` / ` while leaving Unix paths unchanged. |
129+ | ` createProcessGracefulExit(logger?) ` | Creates isolated process signal registration and shutdown helpers. |
130+ | ` exitSignals ` | Supported graceful shutdown signals: ` SIGINT ` , ` SIGQUIT ` , ` SIGTERM ` . |
131+ | ` getLocalhostAddress() ` | Returns non-internal IPv4 addresses plus ` [::] ` , with duplicates removed. |
132+ | ` getPackages(cwd?) ` | Async export from ` @manypkg/get-packages ` . |
133+ | ` getPackagesSync(cwd?) ` | Sync export from ` @manypkg/get-packages ` . |
134+ | ` outputEntryBuilder(rootDir, options?) ` | Builds tsdown entry objects by scanning files; ` entries: "index" ` keeps only index files. |
135+ | ` pathExists(path) ` | Async ` fs.access ` existence check. |
136+ | ` pathExistsSync(path) ` | Sync ` fs.accessSync ` existence check. |
137+ | ` require ` | ` createRequire(import.meta.url) ` for ESM modules that need Node require. |
138+ | ` unifiedSpawn(command, args?, options?) ` | Cross-platform ` spawn ` wrapper. |
139+ | ` unifiedSpawnAsync(command, args?, options?) ` | Promise wrapper resolving the child close code. |
140+ | ` unifiedSpawnSync(command, args?, options?) ` | Cross-platform ` spawnSync ` wrapper. |
141+ | ` userHome ` | Current ` os.homedir() ` value. |
129142
130143## Runtime Notes
131144
0 commit comments