Skip to content

Commit

Permalink
Merge pull request #1193 from samchon/feat/nestjs
Browse files Browse the repository at this point in the history
Respond to NestJS v11 update
  • Loading branch information
samchon authored Jan 20, 2025
2 parents 23538d0 + 2780391 commit 09234a4
Show file tree
Hide file tree
Showing 43 changed files with 49 additions and 999 deletions.
8 changes: 4 additions & 4 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"homepage": "https://nestia.io",
"dependencies": {
"@nestia/core": "workspace:^",
"@nestjs/common": "^10.3.7",
"@nestjs/core": "^10.3.7",
"@nestjs/platform-express": "^10.3.7",
"@nestjs/platform-fastify": "^10.3.7",
"@nestjs/common": "^11.0.2",
"@nestjs/core": "^11.0.2",
"@nestjs/platform-express": "^11.0.2",
"@nestjs/platform-fastify": "^11.0.2",
"autocannon": "^7.15.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@nestia/station",
"version": "4.6.0",
"version": "4.6.1",
"description": "Nestia station",
"scripts": {
"build": "node deploy build",
Expand Down
6 changes: 3 additions & 3 deletions packages/benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"@nestia/core": "workspace:^",
"@nestia/e2e": "workspace:^",
"@nestia/sdk": "workspace:^",
"@nestjs/common": "^10.3.10",
"@nestjs/core": "^10.3.10",
"@nestjs/platform-express": "^10.3.10",
"@nestjs/common": "^11.0.2",
"@nestjs/core": "^11.0.2",
"@nestjs/platform-express": "^11.0.2",
"@types/uuid": "^10.0.0",
"nestia": "workspace:^",
"ts-node": "^10.9.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/chat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
},
"devDependencies": {
"@eslint/js": "^9.13.0",
"@nestjs/common": "^10.4.13",
"@nestjs/core": "^10.4.13",
"@nestjs/platform-express": "^10.4.13",
"@nestjs/platform-fastify": "^10.4.13",
"@nestjs/common": "^11.0.2",
"@nestjs/core": "^11.0.2",
"@nestjs/platform-express": "^11.0.2",
"@nestjs/platform-fastify": "^11.0.2",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.1.1",
"@samchon/shopping-api": "^0.11.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/core",
"version": "4.5.0-dev.20241218-2",
"version": "4.6.1-dev.20250117",
"description": "Super-fast validation decorators of NestJS",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -52,16 +52,16 @@
"ws": "^7.5.3"
},
"peerDependencies": {
"@nestia/fetcher": ">=4.5.0-dev.20241218-2",
"@nestia/fetcher": ">=4.6.1-dev.20250117",
"@nestjs/common": ">=7.0.1",
"@nestjs/core": ">=7.0.1",
"reflect-metadata": ">=0.1.12",
"rxjs": ">=6.0.3",
"typia": ">=7.6.0 <8.0.0"
},
"devDependencies": {
"@nestjs/common": "^10.4.13",
"@nestjs/core": "^10.4.13",
"@nestjs/common": "^11.0.2",
"@nestjs/core": "^11.0.2",
"@types/express": "^4.17.15",
"@types/glob": "^7.2.0",
"@types/inquirer": "^9.0.3",
Expand Down
11 changes: 7 additions & 4 deletions packages/core/src/adaptors/WebSocketAdaptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const visitController = async (props: {
}): Promise<void> => {
if (
ArrayUtil.has(
Reflect.getMetadataKeys(props.controller.metatype),
Reflect.getMetadataKeys(props.controller.metatype as Function),
PATH_METADATA,
HOST_METADATA,
SCOPE_OPTIONS_METADATA,
Expand All @@ -187,20 +187,23 @@ const visitController = async (props: {
const controller: IController = {
name: props.controller.name,
instance: props.controller.instance,
constructor: props.controller.metatype,
constructor: props.controller.metatype as Function,
prototype: Object.getPrototypeOf(props.controller.instance),
prefixes: (() => {
const value: string | string[] = Reflect.getMetadata(
PATH_METADATA,
props.controller.metatype,
props.controller.metatype as object,
);
if (typeof value === "string") return [value];
else if (value.length === 0) return [""];
else return value;
})(),
versions: props.config.versioning
? VersioningStrategy.cast(
Reflect.getMetadata(VERSION_METADATA, props.controller.metatype),
Reflect.getMetadata(
VERSION_METADATA,
props.controller.metatype as Function,
),
)
: undefined,
modulePrefix: props.modulePrefix,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/DynamicModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export namespace DynamicModule {
path: string | string[] | { include: string[]; exclude?: string[] },
metadata: Omit<ModuleMetadata, "controllers"> = {},
isTsNode?: boolean,
): Promise<object> {
) {
// LOAD CONTROLLERS
const controllers: Creator<object>[] = await load_controllers(
path,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/EncryptedModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export namespace EncryptedModule {
password: IEncryptionPassword | IEncryptionPassword.Closure,
options: Omit<Parameters<typeof Module>[0], "controllers"> = {},
isTsNode?: boolean,
): Promise<object> {
) {
// LOAD CONTROLLERS
const controllers: Creator<object>[] = await load_controllers(
path,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/internal/route_error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function route_error(
error.path =
(request as express.Request).path ??
(request as FastifyRequest).routeOptions?.url ??
(request as FastifyRequest).routerPath;
(request as any).routerPath;
} catch {}

setTimeout(() => {
Expand Down
10 changes: 5 additions & 5 deletions packages/editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/editor",
"version": "4.4.0-dev.20241216-3",
"version": "4.6.1-dev.20250117",
"main": "lib/index.js",
"module": "lib/index.mjs",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -46,10 +46,10 @@
},
"devDependencies": {
"@eslint/js": "^9.13.0",
"@nestjs/common": "^10.4.13",
"@nestjs/core": "^10.4.13",
"@nestjs/platform-express": "^10.4.13",
"@nestjs/platform-fastify": "^10.4.13",
"@nestjs/common": "^11.0.2",
"@nestjs/core": "^11.0.2",
"@nestjs/platform-express": "^11.0.2",
"@nestjs/platform-fastify": "^11.0.2",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.1.1",
"@types/js-yaml": "^4.0.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/tsconfig.app.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"root":["./src/nestiaeditorapplication.tsx","./src/nestiaeditoriframe.tsx","./src/nestiaeditormodule.ts","./src/nestiaeditoruploader.tsx","./src/index.ts","./src/main.tsx","./src/vite-env.d.ts","./src/internal/nestiaeditorcomposer.ts","./src/internal/nestiaeditorfileuploader.tsx"],"version":"5.7.2"}
{"root":["./src/nestiaeditorapplication.tsx","./src/nestiaeditoriframe.tsx","./src/nestiaeditormodule.ts","./src/nestiaeditoruploader.tsx","./src/index.ts","./src/main.tsx","./src/vite-env.d.ts","./src/internal/nestiaeditorcomposer.ts","./src/internal/nestiaeditorfileuploader.tsx"],"version":"5.7.3"}
2 changes: 1 addition & 1 deletion packages/editor/tsconfig.node.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"root":["./vite.config.ts"],"version":"5.7.2"}
{"root":["./vite.config.ts"],"version":"5.7.3"}
2 changes: 1 addition & 1 deletion packages/fetcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/fetcher",
"version": "4.5.0-dev.20241218-2",
"version": "4.6.1-dev.20250117",
"description": "Fetcher library of Nestia SDK",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
10 changes: 5 additions & 5 deletions packages/migrate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/migrate",
"version": "4.4.0-dev.20241216-3",
"version": "4.6.1-dev.20250117",
"description": "Migration program from swagger to NestJS",
"typings": "lib/index.d.ts",
"main": "lib/index.js",
Expand Down Expand Up @@ -41,10 +41,10 @@
"@nestia/core": "workspace:^",
"@nestia/e2e": "workspace:^",
"@nestia/fetcher": "workspace:^",
"@nestjs/common": "^10.4.13",
"@nestjs/core": "^10.4.13",
"@nestjs/platform-express": "^10.3.8",
"@nestjs/platform-fastify": "^10.3.8",
"@nestjs/common": "^11.0.2",
"@nestjs/core": "^11.0.2",
"@nestjs/platform-express": "^11.0.2",
"@nestjs/platform-fastify": "^11.0.2",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.1.1",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
Expand Down
8 changes: 5 additions & 3 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/sdk",
"version": "4.5.0-dev.20241218-2",
"version": "4.6.1-dev.20250117",
"description": "Nestia SDK and Swagger generator",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -47,15 +47,17 @@
"typia": "^7.6.0"
},
"peerDependencies": {
"@nestia/core": ">=4.5.0-dev.20241218-2",
"@nestia/fetcher": ">=4.5.0-dev.20241218-2",
"@nestia/core": ">=4.6.1-dev.20250117",
"@nestia/fetcher": ">=4.6.1-dev.20250117",
"@nestjs/common": ">=7.0.1",
"@nestjs/core": ">=7.0.1",
"reflect-metadata": ">=0.1.12",
"ts-node": ">=10.6.0",
"typia": ">=7.6.0 <8.0.0"
},
"devDependencies": {
"@nestjs/common": "^11.0.2",
"@nestjs/core": "^11.0.2",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/cli": "^0.11.21",
"@types/express": "^4.17.15",
Expand Down

This file was deleted.

This file was deleted.

16 changes: 0 additions & 16 deletions test/features/multipart-form-data-fastify/nestia.config.ts

This file was deleted.

33 changes: 0 additions & 33 deletions test/features/multipart-form-data-fastify/src/Backend.ts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 09234a4

Please sign in to comment.