fix version gen

This commit is contained in:
jacob
2024-05-01 17:40:16 -05:00
parent 3ec56f951c
commit cc6affb0a1

View File

@@ -137,8 +137,8 @@ export async function build(options: Record<string, any>) {
const startFile =
'import { interactionHandler, __dependencies } from "@sern/handler/internal" \n'+
commandsImports.join('\n') + '\n' +
commandMapTemplate + "\n" +
"const [emitter, err, log, client] = __dependencies();\n"
commandMapTemplate + "\n"
console.log(entryPoints)
console.log(commandsImports)
@@ -148,10 +148,9 @@ export async function build(options: Record<string, any>) {
...(buildConfig.define ?? {}),
__DEV__: `${buildConfig.mode === 'development'}`,
__PROD__: `${buildConfig.mode === 'production'}`,
__VERSION__: `${buildConfig.defineVersion ? `${defVersion()}` : 'undefined'}`
} satisfies Record<string, string>;
buildConfig.defineVersion && Object.assign(define, { __VERSION__: defVersion() });
await Preprocessor.writeTsConfig(buildConfig.format!, sernTsConfigPath, writeFile);
await Preprocessor.writeAmbientFile(ambientFilePath, define, writeFile);