repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/repl/src/repl.ts
integration/repl/src/repl.ts
import { repl } from '@nestjs/core'; import { LongLivingAppModule } from './long-living-app.module'; async function bootstrap() { await repl(LongLivingAppModule); } bootstrap().catch(err => { console.error('Error during bootstrap:', err); process.exit(1); });
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/repl/src/users/users.service.ts
integration/repl/src/users/users.service.ts
import { Inject, Injectable } from '@nestjs/common'; import { CreateUserDto } from './dto/create-user.dto'; import { UpdateUserDto } from './dto/update-user.dto'; import { UsersRepository } from './users.repository'; @Injectable() export class UsersService { constructor( @Inject('UsersRepository') private re...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/repl/src/users/users.module.ts
integration/repl/src/users/users.module.ts
import { Module } from '@nestjs/common'; import { UsersController } from './users.controller'; import { UsersRepository } from './users.repository'; import { UsersService } from './users.service'; @Module({ controllers: [UsersController], providers: [ UsersService, { provide: UsersRepository.name, ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/repl/src/users/users.controller.ts
integration/repl/src/users/users.controller.ts
import { Controller, Get, Post, Body, Patch, Param, Delete, } from '@nestjs/common'; import { UsersService } from './users.service'; import { CreateUserDto } from './dto/create-user.dto'; import { UpdateUserDto } from './dto/update-user.dto'; @Controller('users') export class UsersController { construc...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/repl/src/users/users.repository.ts
integration/repl/src/users/users.repository.ts
import { Injectable } from '@nestjs/common'; @Injectable() export class UsersRepository { async find() { return [{ id: 1, email: 'test@nestjs.com' }]; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/repl/src/users/dto/create-user.dto.ts
integration/repl/src/users/dto/create-user.dto.ts
export class CreateUserDto {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/repl/src/users/dto/update-user.dto.ts
integration/repl/src/users/dto/update-user.dto.ts
import { PartialType } from '@nestjs/mapped-types'; import { CreateUserDto } from './create-user.dto'; export class UpdateUserDto extends PartialType(CreateUserDto) {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/repl/src/users/entities/user.entity.ts
integration/repl/src/users/entities/user.entity.ts
export class User {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/repl/src/database/database.module.ts
integration/repl/src/database/database.module.ts
import { DynamicModule, Module } from '@nestjs/common'; import { DatabaseConnection } from './database.connection'; @Module({}) export class DatabaseModule { static forRoot(): DynamicModule { const connectionProvider = { provide: DatabaseConnection, useFactory: () => { return DatabaseConnecti...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/repl/src/database/database.connection.ts
integration/repl/src/database/database.connection.ts
import { Injectable, OnModuleDestroy, OnModuleInit } from '@nestjs/common'; @Injectable() export class DatabaseConnection implements OnModuleDestroy { keepAlive = true; static connect(): DatabaseConnection { const connection = new DatabaseConnection(); connection.maintainConnection(); return connectio...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/repl/e2e/repl-process.spec.ts
integration/repl/e2e/repl-process.spec.ts
import { expect } from 'chai'; import { spawn } from 'child_process'; const PROMPT = '> '; describe('REPL process', function () { let replProcess: ReturnType<typeof spawn>; function waitForReplToStart( process: ReturnType<typeof spawn>, message, timeout = 10000, ): Promise<void> { return new Pr...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/repl/e2e/repl.spec.ts
integration/repl/e2e/repl.spec.ts
import { clc } from '@nestjs/common/utils/cli-colors.util'; import { repl } from '@nestjs/core'; import { DebugReplFn, GetReplFn, HelpReplFn, MethodsReplFn, ResolveReplFn, SelectReplFn, } from '@nestjs/core/repl/native-functions'; import { ReplContext } from '@nestjs/core/repl/repl-context'; import { expect...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/send-files/src/app.controller.ts
integration/send-files/src/app.controller.ts
import { Controller, Get, StreamableFile } from '@nestjs/common'; import { Observable } from 'rxjs'; import { AppService } from './app.service'; import { NonFile } from './non-file'; @Controller() export class AppController { constructor(private readonly appService: AppService) {} @Get('file/stream') getFile():...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/send-files/src/app.module.ts
integration/send-files/src/app.module.ts
import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; @Module({ controllers: [AppController], providers: [AppService], }) export class AppModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/send-files/src/app.service.ts
integration/send-files/src/app.service.ts
import { Injectable, StreamableFile } from '@nestjs/common'; import { randomBytes } from 'crypto'; import { createReadStream, readFileSync } from 'fs'; import { join } from 'path'; import { Observable, of } from 'rxjs'; import { Readable } from 'stream'; import { NonFile } from './non-file'; @Injectable() export class...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/send-files/src/non-file.ts
integration/send-files/src/non-file.ts
export class NonFile { constructor(private readonly value: string) {} pipe() { return this.value; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/send-files/e2e/utils.ts
integration/send-files/e2e/utils.ts
import { INestApplication } from '@nestjs/common'; import { IncomingMessage, request } from 'http'; import { URL } from 'url'; export const getHttpBaseOptions = async ( app: INestApplication, ): Promise<URL> => { const url = await app.getUrl(); return new URL(url); }; export const sendCanceledHttpRequest = asyn...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/send-files/e2e/express.spec.ts
integration/send-files/e2e/express.spec.ts
import { ExpressAdapter, NestExpressApplication, } from '@nestjs/platform-express'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { readFileSync } from 'fs'; import { join } from 'path'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; import { g...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/send-files/e2e/fastify.spec.ts
integration/send-files/e2e/fastify.spec.ts
import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import { readFileSync } from 'fs'; import { join } from 'path'; import { AppModule } from '../src/app.module'; const readme = readFileSync(join(process.cwd(), '...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/src/eager.module.ts
integration/lazy-modules/src/eager.module.ts
import { Module, Injectable } from '@nestjs/common'; import { GlobalService } from './global.module'; @Injectable() export class EagerService { private counter = 0; constructor(public globalService: GlobalService) {} sayHello() { this.counter++; return 'Hi! Counter is ' + this.counter; } } @Module({ ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/src/transient.service.ts
integration/lazy-modules/src/transient.service.ts
import { Injectable, Scope } from '@nestjs/common'; import { EagerService } from './eager.module'; @Injectable({ scope: Scope.TRANSIENT }) export class TransientService { constructor(private eagerService: EagerService) {} eager() { return this.eagerService.sayHello(); } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/src/request.module.ts
integration/lazy-modules/src/request.module.ts
import { Module } from '@nestjs/common'; import { EagerService } from './eager.module'; import { GlobalService } from './global.module'; import { RequestService } from './request.service'; @Module({ imports: [], providers: [RequestService, GlobalService, EagerService], exports: [RequestService], }) export class ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/src/transient.module.ts
integration/lazy-modules/src/transient.module.ts
import { Module } from '@nestjs/common'; import { GlobalService } from './global.module'; import { EagerService } from './eager.module'; import { TransientService } from './transient.service'; @Module({ imports: [], providers: [TransientService, GlobalService, EagerService], exports: [TransientService], }) expor...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/src/app.module.ts
integration/lazy-modules/src/app.module.ts
import { Module } from '@nestjs/common'; import { LazyModuleLoader } from '@nestjs/core'; import { EagerModule } from './eager.module'; import { GlobalModule } from './global.module'; import { LazyModule } from './lazy.module'; @Module({ imports: [GlobalModule, EagerModule], }) export class AppModule { constructor...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/src/lazy.controller.ts
integration/lazy-modules/src/lazy.controller.ts
import { Controller, Get } from '@nestjs/common'; import { LazyModuleLoader } from '@nestjs/core'; @Controller('lazy') export class LazyController { constructor(private lazyLoadModule: LazyModuleLoader) {} @Get('transient') async exec() { const { TransientLazyModule } = await import('./transient.module'); ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/src/request.service.ts
integration/lazy-modules/src/request.service.ts
import { Injectable, Scope } from '@nestjs/common'; import { EagerService } from './eager.module'; @Injectable({ scope: Scope.REQUEST }) export class RequestService { constructor(private eagerService: EagerService) {} eager() { return this.eagerService.sayHello(); } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/src/lazy.module.ts
integration/lazy-modules/src/lazy.module.ts
import { Module, Injectable } from '@nestjs/common'; import { GlobalService } from './global.module'; @Injectable() export class LazyService { constructor(public globalService: GlobalService) {} } @Module({ providers: [LazyService], }) export class LazyModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/src/main.ts
integration/lazy-modules/src/main.ts
import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); await app.listen(3000); } void bootstrap();
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/src/global.module.ts
integration/lazy-modules/src/global.module.ts
import { Module, Injectable, Global } from '@nestjs/common'; @Injectable() export class GlobalService { constructor() {} } @Global() @Module({ providers: [GlobalService], exports: [GlobalService], }) export class GlobalModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/e2e/lazy-import-global-modules.spec.ts
integration/lazy-modules/e2e/lazy-import-global-modules.spec.ts
import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as chai from 'chai'; import { expect } from 'chai'; import { AppModule } from '../src/app.module'; import chaiAsPromised = require('chai-as-promised'); chai.use(chaiAsPromised); describe('Lazy imports', () => { let ap...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/e2e/lazy-import-transient-providers.spec.ts
integration/lazy-modules/e2e/lazy-import-transient-providers.spec.ts
import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { TransientLazyModule } from '../src/transient.module'; import { LazyController } from '../src/lazy.controller'; import * as chai from 'chai'; import { expect } from 'chai'; import * as request from 'supertest'; describe(...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/lazy-modules/e2e/lazy-import-request-providers.spec.ts
integration/lazy-modules/e2e/lazy-import-request-providers.spec.ts
import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import * as request from 'supertest'; import { LazyController } from '../src/lazy.controller'; describe('Lazy Requested Scoped providers', () => { let app: INestApplication; beforeEach(async (...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/src/app.module.ts
integration/typeorm/src/app.module.ts
import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { Photo } from './photo/photo.entity'; import { PhotoModule } from './photo/photo.module'; @Module({ imports: [ TypeOrmModule.forRoot({ type: 'mysql', host: '127.0.0.1', port: 3306, username: ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/src/async-existing-options.module.ts
integration/typeorm/src/async-existing-options.module.ts
import { Module } from '@nestjs/common'; import { TypeOrmModule, TypeOrmModuleOptions, TypeOrmOptionsFactory, } from '@nestjs/typeorm'; import { Photo } from './photo/photo.entity'; import { PhotoModule } from './photo/photo.module'; class ConfigService implements TypeOrmOptionsFactory { createTypeOrmOptions()...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/src/async-class-options.module.ts
integration/typeorm/src/async-class-options.module.ts
import { Module } from '@nestjs/common'; import { TypeOrmModule, TypeOrmModuleOptions, TypeOrmOptionsFactory, } from '@nestjs/typeorm'; import { Photo } from './photo/photo.entity'; import { PhotoModule } from './photo/photo.module'; class ConfigService implements TypeOrmOptionsFactory { createTypeOrmOptions()...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/src/async-options.module.ts
integration/typeorm/src/async-options.module.ts
import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { Photo } from './photo/photo.entity'; import { PhotoModule } from './photo/photo.module'; @Module({ imports: [ TypeOrmModule.forRootAsync({ useFactory: () => ({ type: 'mysql', host: '127.0.0.1'...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/src/app-async.module.ts
integration/typeorm/src/app-async.module.ts
import { Module } from '@nestjs/common'; import { DatabaseModule } from './database.module'; import { PhotoModule } from './photo/photo.module'; @Module({ imports: [DatabaseModule.forRoot(), PhotoModule], }) export class AsyncApplicationModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/src/main.ts
integration/typeorm/src/main.ts
import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); await app.listen(3001); } void bootstrap();
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/src/database.module.ts
integration/typeorm/src/database.module.ts
import { DynamicModule, Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { Photo } from './photo/photo.entity'; @Module({}) export class DatabaseModule { static async forRoot(): Promise<DynamicModule> { await new Promise(resolve => setTimeout(resolve, 1000)); return { ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/src/photo/photo.controller.ts
integration/typeorm/src/photo/photo.controller.ts
import { Controller, Get, Post } from '@nestjs/common'; import { Photo } from './photo.entity'; import { PhotoService } from './photo.service'; @Controller('photo') export class PhotoController { constructor(private readonly photoService: PhotoService) {} @Get() findAll(): Promise<Photo[]> { return this.pho...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/src/photo/photo.service.ts
integration/typeorm/src/photo/photo.service.ts
import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; import { Photo } from './photo.entity'; @Injectable() export class PhotoService { constructor( @InjectRepository(Photo) private readonly photoRepository: Repository<Photo>, ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/src/photo/photo.entity.ts
integration/typeorm/src/photo/photo.entity.ts
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm'; @Entity() export class Photo { @PrimaryGeneratedColumn() id: number; @Column({ length: 500 }) name: string; @Column('text') description: string; @Column() filename: string; @Column('int') views: number; @Column() isPublished: boolean;...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/src/photo/photo.module.ts
integration/typeorm/src/photo/photo.module.ts
import { Module } from '@nestjs/common'; import { PhotoService } from './photo.service'; import { PhotoController } from './photo.controller'; import { TypeOrmModule } from '@nestjs/typeorm'; import { Photo } from './photo.entity'; @Module({ imports: [TypeOrmModule.forFeature([Photo])], providers: [PhotoService], ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/e2e/typeorm.spec.ts
integration/typeorm/e2e/typeorm.spec.ts
import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('TypeOrm', () => { let server; let app: INestApplication; beforeEach(async () => { const module = await Test.createTestingM...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/e2e/typeorm-async-class.spec.ts
integration/typeorm/e2e/typeorm-async-class.spec.ts
import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AsyncOptionsClassModule } from '../src/async-class-options.module'; describe('TypeOrm (async configuration)', () => { let server; let app: INestApplication; beforeEach(async ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/e2e/typeorm-async.spec.ts
integration/typeorm/e2e/typeorm-async.spec.ts
import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AsyncApplicationModule } from '../src/app-async.module'; describe('TypeOrm (async configuration)', () => { let server; let app: INestApplication; beforeEach(async () => { ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/e2e/typeorm-async-existing.spec.ts
integration/typeorm/e2e/typeorm-async-existing.spec.ts
import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AsyncOptionsExistingModule } from '../src/async-existing-options.module'; describe('TypeOrm (async configuration)', () => { let server; let app: INestApplication; beforeEach(...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/typeorm/e2e/typeorm-async-options.spec.ts
integration/typeorm/e2e/typeorm-async-options.spec.ts
import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AsyncOptionsFactoryModule } from '../src/async-options.module'; describe('TypeOrm (async configuration)', () => { let server; let app: INestApplication; beforeEach(async () =...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/src/app.module.ts
integration/versioning/src/app.module.ts
import { MiddlewareConsumer, Module } from '@nestjs/common'; import { AppV1Controller } from './app-v1.controller'; import { AppV2Controller } from './app-v2.controller'; import { MiddlewareController } from './middleware.controller'; import { MultipleMiddlewareVersionController } from './multiple-middleware.controller...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/src/neutral-middleware.controller.ts
integration/versioning/src/neutral-middleware.controller.ts
import { Controller, Get, VERSION_NEUTRAL } from '@nestjs/common'; @Controller({ path: 'middleware', version: VERSION_NEUTRAL, }) export class VersionNeutralMiddlewareController { @Get('/neutral') neutral() { return 'Neutral'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/src/middleware.controller.ts
integration/versioning/src/middleware.controller.ts
import { Controller, Get, Version } from '@nestjs/common'; @Controller({ path: 'middleware', version: '1', }) export class MiddlewareController { @Get('/') hello() { return 'Hello from "MiddlewareController"!'; } @Version('2') @Get('/override') hellov2() { return 'Hello from "MiddlewareControl...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/src/main.ts
integration/versioning/src/main.ts
import { VersioningType } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.enableVersioning({ type: VersioningType.MEDIA_TYPE, key: 'v=', }); await app.listen(3...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/src/multiple.controller.ts
integration/versioning/src/multiple.controller.ts
import { Controller, Get } from '@nestjs/common'; @Controller({ version: ['1', '2'], }) export class MultipleVersionController { @Get('/multiple') multiple() { return 'Multiple Versions 1 or 2'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/src/multiple-middleware.controller.ts
integration/versioning/src/multiple-middleware.controller.ts
import { Controller, Get } from '@nestjs/common'; @Controller({ version: ['1', '2'], path: 'middleware', }) export class MultipleMiddlewareVersionController { @Get('/multiple') multiple() { return 'Multiple Versions 1 or 2'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/src/neutral.controller.ts
integration/versioning/src/neutral.controller.ts
import { Controller, Get, VERSION_NEUTRAL } from '@nestjs/common'; @Controller({ version: VERSION_NEUTRAL, }) export class VersionNeutralController { @Get('/neutral') neutral() { return 'Neutral'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/src/override-partial.controller.ts
integration/versioning/src/override-partial.controller.ts
import { Controller, Get, Version } from '@nestjs/common'; @Controller({ version: '1', }) export class OverridePartialController { @Get('/override-partial') overridePartialV1() { return 'Override Partial Version 1'; } @Version('2') @Get('/override-partial') overridePartialV2() { return 'Override...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/src/app-v1.controller.ts
integration/versioning/src/app-v1.controller.ts
import { Controller, Get } from '@nestjs/common'; @Controller({ version: '1', }) export class AppV1Controller { @Get('/') helloWorldV1() { return 'Hello World V1!'; } @Get('/:param/hello') paramV1() { return 'Parameter V1!'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/src/no-versioning.controller.ts
integration/versioning/src/no-versioning.controller.ts
import { Controller, Get } from '@nestjs/common'; @Controller('foo') export class NoVersioningController { @Get('/bar') helloFoo() { return 'Hello FooBar!'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/src/app-v2.controller.ts
integration/versioning/src/app-v2.controller.ts
import { Controller, Get } from '@nestjs/common'; @Controller({ version: '2', }) export class AppV2Controller { @Get('/') helloWorldV2() { return 'Hello World V2!'; } @Get('/:param/hello') paramV1() { return 'Parameter V2!'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/src/override.controller.ts
integration/versioning/src/override.controller.ts
import { Controller, Get, Version } from '@nestjs/common'; @Controller() export class OverrideController { @Version('1') @Get('/override') overrideV1() { return 'Override Version 1'; } @Version('2') @Get('/override') overrideV2() { return 'Override Version 2'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/e2e/header-versioning-fastify.spec.ts
integration/versioning/e2e/header-versioning-fastify.spec.ts
import { INestApplication, VersioningType } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('Header Versioning (fastify)',...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/e2e/default-versioning.spec.ts
integration/versioning/e2e/default-versioning.spec.ts
import { INestApplication } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; /** * `.enableVersioning()` uses `VersioningType.URI` ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/e2e/media-type-versioning.spec.ts
integration/versioning/e2e/media-type-versioning.spec.ts
import { INestApplication, VersioningType } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('Media Type Versioning', () => { let app: INestApplication; // ==================================================...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/e2e/media-type-versioning-fastify.spec.ts
integration/versioning/e2e/media-type-versioning-fastify.spec.ts
import { INestApplication, VersioningType } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('Media Type Versioning (fastif...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/e2e/custom-versioning.spec.ts
integration/versioning/e2e/custom-versioning.spec.ts
import { INestApplication, VersioningType } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { Request } from 'express'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('Custom Versioning', () => { const extractor = (request: Request): string | strin...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/e2e/custom-versioning-fastify.spec.ts
integration/versioning/e2e/custom-versioning-fastify.spec.ts
import { INestApplication, VersioningType } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import { FastifyRequest } from 'fastify'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/e2e/uri-versioning-fastify.spec.ts
integration/versioning/e2e/uri-versioning-fastify.spec.ts
import { INestApplication, VersioningType } from '@nestjs/common'; import { FastifyAdapter, NestFastifyApplication, } from '@nestjs/platform-fastify'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('URI Versioning (fastify)', ()...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/e2e/header-versioning.spec.ts
integration/versioning/e2e/header-versioning.spec.ts
import { INestApplication, VersioningType } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('Header Versioning', () => { let app: INestApplication; // ======================================================...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/versioning/e2e/uri-versioning.spec.ts
integration/versioning/e2e/uri-versioning.spec.ts
import { INestApplication, VersioningType } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; import { AppModule } from '../src/app.module'; describe('URI Versioning', () => { let app: INestApplication; // =========================================================...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hooks/src/enable-shutdown-hooks-main.ts
integration/hooks/src/enable-shutdown-hooks-main.ts
import { BeforeApplicationShutdown, Injectable, Module, OnApplicationShutdown, } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; const SIGNAL = process.argv[2]; const SIGNAL_TO_LISTEN = process.argv[3]; const USE_GRACEFUL_EXIT = process.argv[4] === 'graceful'; @Injectable() class TestInjecta...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hooks/e2e/on-app-boostrap.spec.ts
integration/hooks/e2e/on-app-boostrap.spec.ts
import { Injectable, Module, OnApplicationBootstrap } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import * as Sinon from 'sinon'; @Injectable() class TestInjectable implements OnApplicationBootstrap { onApplicationBootstrap = Sinon.spy(); } describe('OnApplicationBo...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hooks/e2e/lifecycle-hook-order.spec.ts
integration/hooks/e2e/lifecycle-hook-order.spec.ts
import { Test } from '@nestjs/testing'; import * as Sinon from 'sinon'; import { Injectable, OnApplicationBootstrap, OnApplicationShutdown, OnModuleDestroy, OnModuleInit, BeforeApplicationShutdown, } from '@nestjs/common'; @Injectable() class TestInjectable implements OnApplicationBootstrap, OnMo...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hooks/e2e/before-app-shutdown.spec.ts
integration/hooks/e2e/before-app-shutdown.spec.ts
import { BeforeApplicationShutdown, Injectable, Module } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import * as Sinon from 'sinon'; @Injectable() class TestInjectable implements BeforeApplicationShutdown { beforeApplicationShutdown = Sinon.spy(); } describe('Before...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hooks/e2e/on-module-destroy.spec.ts
integration/hooks/e2e/on-module-destroy.spec.ts
import { Injectable, Module, OnModuleDestroy } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import * as Sinon from 'sinon'; @Injectable() class TestInjectable implements OnModuleDestroy { onModuleDestroy = Sinon.spy(); } describe('OnModuleDestroy', () => { it('shou...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hooks/e2e/enable-shutdown-hook.spec.ts
integration/hooks/e2e/enable-shutdown-hook.spec.ts
import { expect } from 'chai'; import { spawnSync } from 'child_process'; import { join } from 'path'; describe('enableShutdownHooks', () => { it('should call the correct hooks if any shutdown signal gets invoked', done => { const result = spawnSync('ts-node', [ join(__dirname, '../src/enable-shutdown-hook...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hooks/e2e/on-app-shutdown.spec.ts
integration/hooks/e2e/on-app-shutdown.spec.ts
import { Injectable, Module, OnApplicationShutdown } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import * as Sinon from 'sinon'; @Injectable() class TestInjectable implements OnApplicationShutdown { onApplicationShutdown = Sinon.spy(); } describe('OnApplicationShutd...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/hooks/e2e/on-module-init.spec.ts
integration/hooks/e2e/on-module-init.spec.ts
import { Injectable, Module, OnModuleInit } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import { expect } from 'chai'; import * as Sinon from 'sinon'; @Injectable() class TestInjectable implements OnModuleInit { onModuleInit = Sinon.spy(); } describe('OnModuleInit', () => { it('should call onMo...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/app.module.ts
integration/inspector/src/app.module.ts
import { Module, Scope } from '@nestjs/common'; import { AppV1Controller } from './app-v1.controller'; import { AppV2Controller } from './app-v2.controller'; import { CatsModule } from './cats/cats.module'; import { ChatModule } from './chat/chat.module'; import { HelloModule as CircularHelloModule } from './circular-h...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/app-v1.controller.ts
integration/inspector/src/app-v1.controller.ts
import { Controller, Get } from '@nestjs/common'; @Controller({ version: '1', }) export class AppV1Controller { @Get('/') helloWorldV1() { return 'Hello World V1!'; } @Get('/:param/hello') paramV1() { return 'Parameter V1!'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/app-v2.controller.ts
integration/inspector/src/app-v2.controller.ts
import { Controller, Get, Version } from '@nestjs/common'; @Controller({ version: '2', }) export class AppV2Controller { @Get('/') helloWorldV2() { return 'Hello World V2!'; } @Version('3') @Get('/:param/hello') paramV1() { return 'Parameter V2!'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/chat/chat.service.ts
integration/inspector/src/chat/chat.service.ts
import { Injectable } from '@nestjs/common'; import { CreateChatDto } from './dto/create-chat.dto'; import { UpdateChatDto } from './dto/update-chat.dto'; @Injectable() export class ChatService { create(createChatDto: CreateChatDto) { return 'This action adds a new chat'; } findAll() { return `This acti...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/chat/chat.module.ts
integration/inspector/src/chat/chat.module.ts
import { Module } from '@nestjs/common'; import { ChatService } from './chat.service'; import { ChatGateway } from './chat.gateway'; @Module({ providers: [ChatGateway, ChatService], }) export class ChatModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/chat/chat.gateway.ts
integration/inspector/src/chat/chat.gateway.ts
import { WebSocketGateway, SubscribeMessage, MessageBody, } from '@nestjs/websockets'; import { ChatService } from './chat.service'; import { CreateChatDto } from './dto/create-chat.dto'; import { UpdateChatDto } from './dto/update-chat.dto'; @WebSocketGateway() export class ChatGateway { constructor(private r...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/chat/dto/create-chat.dto.ts
integration/inspector/src/chat/dto/create-chat.dto.ts
export class CreateChatDto {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/chat/dto/update-chat.dto.ts
integration/inspector/src/chat/dto/update-chat.dto.ts
import { PartialType } from '@nestjs/mapped-types'; import { CreateChatDto } from './create-chat.dto'; export class UpdateChatDto extends PartialType(CreateChatDto) { id: number; }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/chat/entities/chat.entity.ts
integration/inspector/src/chat/entities/chat.entity.ts
export class Chat {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/circular-hello/hello.controller.ts
integration/inspector/src/circular-hello/hello.controller.ts
import { Controller, Get, Param, UseGuards, UseInterceptors, } from '@nestjs/common'; import { Guard } from './guards/request-scoped.guard'; import { HelloService } from './hello.service'; import { Interceptor } from './interceptors/logging.interceptor'; import { UserByIdPipe } from './users/user-by-id.pipe';...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/circular-hello/hello.service.ts
integration/inspector/src/circular-hello/hello.service.ts
import { Inject, Injectable, Scope } from '@nestjs/common'; @Injectable({ scope: Scope.REQUEST }) export class HelloService { static COUNTER = 0; constructor(@Inject('META') private readonly meta) { HelloService.COUNTER++; } greeting(): string { return 'Hello world!'; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/circular-hello/hello.module.ts
integration/inspector/src/circular-hello/hello.module.ts
import { DynamicModule, Inject, Module, Provider } from '@nestjs/common'; import { HelloController } from './hello.controller'; import { HelloService } from './hello.service'; import { UsersService } from './users/users.service'; @Module({ controllers: [HelloController], providers: [HelloService, UsersService], })...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/circular-hello/dto/test.dto.ts
integration/inspector/src/circular-hello/dto/test.dto.ts
import { IsString, IsNotEmpty, IsNumber } from 'class-validator'; export class TestDto { @IsString() @IsNotEmpty() string: string; @IsNumber() number: number; }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/circular-hello/guards/request-scoped.guard.ts
integration/inspector/src/circular-hello/guards/request-scoped.guard.ts
import { CanActivate, ExecutionContext, Injectable, Scope, } from '@nestjs/common'; import { Observable } from 'rxjs'; @Injectable({ scope: Scope.REQUEST }) export class Guard implements CanActivate { static COUNTER = 0; constructor() { Guard.COUNTER++; } canActivate( context: ExecutionContext...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/circular-hello/users/users.service.ts
integration/inspector/src/circular-hello/users/users.service.ts
import { Inject, Injectable, Scope } from '@nestjs/common'; @Injectable({ scope: Scope.REQUEST }) export class UsersService { static COUNTER = 0; constructor(@Inject('META') private readonly meta) { UsersService.COUNTER++; } findById(id: string) { return { id }; } }
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/circular-hello/users/user-by-id.pipe.ts
integration/inspector/src/circular-hello/users/user-by-id.pipe.ts
import { ArgumentMetadata, Injectable, PipeTransform } from '@nestjs/common'; import { UsersService } from './users.service'; @Injectable() export class UserByIdPipe implements PipeTransform<string> { static COUNTER = 0; constructor(private readonly usersService: UsersService) { UserByIdPipe.COUNTER++; } ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/circular-hello/interceptors/logging.interceptor.ts
integration/inspector/src/circular-hello/interceptors/logging.interceptor.ts
import { CallHandler, ExecutionContext, Injectable, NestInterceptor, Scope, } from '@nestjs/common'; import { Observable } from 'rxjs'; @Injectable({ scope: Scope.REQUEST }) export class Interceptor implements NestInterceptor { static COUNTER = 0; constructor() { Interceptor.COUNTER++; } intercep...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/durable/durable.module.ts
integration/inspector/src/durable/durable.module.ts
import { Module } from '@nestjs/common'; import { DurableController } from './durable.controller'; import { DurableService } from './durable.service'; @Module({ controllers: [DurableController], providers: [DurableService], }) export class DurableModule {}
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/durable/durable.service.ts
integration/inspector/src/durable/durable.service.ts
import { Inject, Injectable, Scope } from '@nestjs/common'; import { REQUEST } from '@nestjs/core'; @Injectable({ scope: Scope.REQUEST, durable: true }) export class DurableService { public instanceCounter = 0; constructor(@Inject(REQUEST) public readonly requestPayload: unknown) {} greeting() { ++this.ins...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/durable/durable-context-id.strategy.ts
integration/inspector/src/durable/durable-context-id.strategy.ts
import { ContextId, ContextIdStrategy, HostComponentInfo } from '@nestjs/core'; import { Request } from 'express'; const tenants = new Map<string, ContextId>(); export class DurableContextIdStrategy implements ContextIdStrategy { attach(contextId: ContextId, request: Request) { const tenantId = request.headers[...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/durable/durable.controller.ts
integration/inspector/src/durable/durable.controller.ts
import { Controller, Get } from '@nestjs/common'; import { DurableService } from './durable.service'; @Controller('durable') export class DurableController { constructor(private readonly durableService: DurableService) {} @Get() greeting(): string { return this.durableService.greeting(); } @Get('echo')...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/request-chain/request-chain.controller.ts
integration/inspector/src/request-chain/request-chain.controller.ts
import { Controller, Get, UseInterceptors } from '@nestjs/common'; import { LoggingInterceptor } from './interceptors/logging.interceptor'; import { RequestChainService } from './request-chain.service'; @Controller('hello') export class RequestChainController { constructor(private readonly chainService: RequestChain...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false
nestjs/nest
https://github.com/nestjs/nest/blob/4500f04525c4cdde6bf98507d3d21fa9ef68082b/integration/inspector/src/request-chain/request-chain.service.ts
integration/inspector/src/request-chain/request-chain.service.ts
import { Injectable } from '@nestjs/common'; import { HelperService } from './helper/helper.service'; @Injectable() export class RequestChainService { static COUNTER = 0; constructor(private readonly helperService: HelperService) { helperService.noop(); RequestChainService.COUNTER += 1; } call() { ...
typescript
MIT
4500f04525c4cdde6bf98507d3d21fa9ef68082b
2026-01-04T15:26:03.786460Z
false