diff --git a/src/commands/build.ts b/src/commands/build.ts index 7b33eca..d43b8a0 100644 --- a/src/commands/build.ts +++ b/src/commands/build.ts @@ -137,8 +137,8 @@ export async function build(options: Record) { 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) { ...(buildConfig.define ?? {}), __DEV__: `${buildConfig.mode === 'development'}`, __PROD__: `${buildConfig.mode === 'production'}`, + __VERSION__: `${buildConfig.defineVersion ? `${defVersion()}` : 'undefined'}` } satisfies Record; - buildConfig.defineVersion && Object.assign(define, { __VERSION__: defVersion() }); - await Preprocessor.writeTsConfig(buildConfig.format!, sernTsConfigPath, writeFile); await Preprocessor.writeAmbientFile(ambientFilePath, define, writeFile);