chore: run app directly with bun src/main.ts — eliminate nest build#3016
Draft
PooyaRaki wants to merge 18 commits into
Draft
chore: run app directly with bun src/main.ts — eliminate nest build#3016PooyaRaki wants to merge 18 commits into
PooyaRaki wants to merge 18 commits into
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix bullmq getJob() returning undefined instead of null - Handle Express 5 params type (string | string[]) - Use jest as direct command to avoid Bun CJS/ESM issue Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NestJS CLI's tsconfig-paths hook doesn't rewrite @/ imports when nest build runs under Bun. Add tsc-alias as a post-build step and copy tsconfig.json into the production Docker container. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Pin oven-sh/setup-bun to commit SHA for supply-chain security - Pin tsc-alias to exact version (1.8.16) matching project convention - Remove unnecessary tsconfig from production Docker stage - Use bunx for nest CLI invocations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bunx checks global installs before local node_modules, which could cause version mismatches. Using bare nest relies on bun run adding node_modules/.bin to PATH, same as the jest script. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Single source of truth for the Bun version: - CI reads from .bun-version via bun-version-file parameter - Dockerfile uses ARG with default from .bun-version Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract @module classes from 6 interface files into dedicated module files - Extract shared types (RedisClientType, FetchClient, JwtClient, QueueConsumer) from module files - Extract EventType enum and signature constants to break schema/entity cycles - Add z.lazy() for Zod schema circular references (wallet, notification-subscription) - Inline Parameters<> types in repository interfaces to remove reverse deps Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use import type + require() for TypeORM bidirectional entity relations to prevent emitDecoratorMetadata TDZ errors in Bun's ESM - Add explicit enum option to @ApiProperty() for enum-typed DTO properties because Bun emits enum objects as design:type metadata instead of String/Number - Add z.lazy() to notification-type schema circular reference Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Eliminates the
nest build && tsc-aliascompilation step by running TypeScript directly withbun src/main.ts. This removestsc-aliasandtsconfig-pathsas dependencies, simplifies the Dockerfile, and makes dev/prod startup identical.Changes
buildnow only generates ABIs;start/start:dev/start:debug/start:prodall usebun src/main.tsdirectly;typeormCLI points to.tssource instead of compiled.jstsc-alias,tsconfig-pathssrc/andtsconfig*.jsoninstead ofdist/, runsbun src/main.tsimport type/ inlinetypekeywords required by Bun's per-file transpilation (likeisolatedModules)@Moduleclasses from 6 interface files into dedicated*.module.tsfilesRedisClientType,FetchClient,JwtClient,QueueConsumer) from module files into*.types.tsfilesEventTypeenum and signature constants to break schema/entity cyclesz.lazy()for Zod schema circular referencesParameters<>types in repository interfacesimport type+require()in decorator callbacks to preventemitDecoratorMetadataTDZ errors in Bun's ESMenumoption to@ApiProperty()for enum-typed properties (Bun emits enum objects asdesign:typeinstead ofString/Number)FeeCostbuilder, fixedwallets.entity.db.builderproperty names (created_at→createdAt)