diff --git a/nix/package.nix b/nix/package.nix index 112904e..0aa0397 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -9,7 +9,7 @@ }: stdenv.mkDerivation (finalAttrs: { pname = "troutbot"; - version = "0-unstable-2026-01-30"; + version = "0-unstable-2026-02-01"; src = lib.fileset.toSource { root = ../.; @@ -19,6 +19,7 @@ stdenv.mkDerivation (finalAttrs: { ../package.json ../pnpm-lock.yaml ../tsconfig.json + ../tsup.config.ts ]; }; diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 0000000..9a00182 --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,16 @@ +import { defineConfig } from 'tsup'; + +export default defineConfig({ + entry: ['src/index.ts'], + format: 'cjs', + dts: true, + clean: true, + + // Bundle all dependencies into the output so it works without node_modules + // Required for Nix packaging where node_modules are not available at runtime + noExternal: ['jiti', 'dotenv', 'express', 'express-rate-limit', '@octokit/rest', 'winston'], + + // Ensure all dependencies are resolved + platform: 'node', + target: 'node22', +});