({mode, includeVersion, additionalStampingScript}: Arguments<Options>)
| 45 | } |
| 46 | |
| 47 | async function handler({mode, includeVersion, additionalStampingScript}: Arguments<Options>) { |
| 48 | await printEnvStamp(mode, includeVersion); |
| 49 | |
| 50 | // Support for additional stamping. We import the script and call the default |
| 51 | // function while providing the stamping mode. |
| 52 | if (additionalStampingScript !== undefined) { |
| 53 | const scriptURL = url.pathToFileURL(path.resolve(additionalStampingScript)); |
| 54 | const stampingExports = (await import(scriptURL.toString())) as { |
| 55 | default: EnvStampCustomPrintFn; |
| 56 | }; |
| 57 | await stampingExports.default(mode); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | /** CLI command module for building the environment stamp. */ |
| 62 | export const BuildEnvStampCommand: CommandModule<{}, Options> = { |
nothing calls this directly
no test coverage detected