()
| 13 | import { PostInstallCommand } from './commands/PostInstallCommand.js' |
| 14 | |
| 15 | export const run = async () => { |
| 16 | const [node, app, ...args] = process.argv |
| 17 | |
| 18 | const contentlayerVersion = await pipe( |
| 19 | getContentlayerVersion(), |
| 20 | provideDummyTracing, |
| 21 | T.provideSomeLayer(NodeFsLive), |
| 22 | T.runPromise, |
| 23 | ) |
| 24 | |
| 25 | const cli = new Cli({ |
| 26 | binaryLabel: `Contentlayer CLI`, |
| 27 | binaryName: process.env['CL_DEBUG'] ? `${node} ${app}` : 'contentlayer', |
| 28 | binaryVersion: contentlayerVersion, |
| 29 | }) |
| 30 | |
| 31 | cli.register(DefaultCommand) |
| 32 | cli.register(DevCommand) |
| 33 | cli.register(BuildCommand) |
| 34 | cli.register(PostInstallCommand) |
| 35 | cli.register(Builtins.HelpCommand) |
| 36 | cli.register(Builtins.VersionCommand) |
| 37 | |
| 38 | // Run the CLI |
| 39 | await cli.runExit(args, Cli.defaultContext) |
| 40 | } |
nothing calls this directly
no test coverage detected