Skip to content

Commit

Permalink
Merge pull request #935 from samchon/features/ts-patch
Browse files Browse the repository at this point in the history
Upgrade `ts-patch@3.2.1` for `typescript@5.2.2`.
  • Loading branch information
samchon authored Jun 27, 2024
2 parents e049323 + c73a5db commit 8baf4eb
Show file tree
Hide file tree
Showing 28 changed files with 562 additions and 50 deletions.
6 changes: 3 additions & 3 deletions benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
"physical-cpu-count": "^2.0.0",
"randexp": "^0.5.3",
"reflect-metadata": "^0.2.2",
"tgrid": "^1.0.0",
"tgrid": "^1.0.2",
"tstl": "^3.0.0",
"typia": "^6.0.3"
"typia": "^6.3.1"
},
"devDependencies": {
"@types/autocannon": "^7.9.0",
Expand All @@ -51,7 +51,7 @@
"@types/physical-cpu-count": "^2.0.0",
"rimraf": "^5.0.1",
"ts-node": "^10.9.1",
"ts-patch": "^3.1.1",
"ts-patch": "^3.2.1",
"typescript": "^5.4.5"
}
}
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": "3.3.0-dev.20240624",
"version": "3.3.0",
"description": "Nestia station",
"scripts": {
"build": "node build/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@types/inquirer": "^9.0.3",
"@types/node": "^18.11.16",
"rimraf": "^3.0.2",
"typescript": "<5.5.0"
"typescript": "^5.5.2"
},
"files": [
"bin",
Expand Down
14 changes: 7 additions & 7 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/core",
"version": "3.3.0-dev.20240624",
"version": "3.3.0",
"description": "Super-fast validation decorators of NestJS",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -36,7 +36,7 @@
},
"homepage": "https://nestia.io",
"dependencies": {
"@nestia/fetcher": "^3.3.0-dev.20240624",
"@nestia/fetcher": "^3.3.0",
"@nestjs/common": ">=7.0.1",
"@nestjs/core": ">=7.0.1",
"@samchon/openapi": "^0.1.21",
Expand All @@ -49,16 +49,16 @@
"reflect-metadata": ">=0.1.12",
"rxjs": ">=6.0.3",
"tgrid": "^1.0.0",
"typia": "^6.0.3",
"typia": "^6.3.1",
"ws": "^7.5.3"
},
"peerDependencies": {
"@nestia/fetcher": ">=3.3.0-dev.20240624",
"@nestia/fetcher": ">=3.3.0",
"@nestjs/common": ">=7.0.1",
"@nestjs/core": ">=7.0.1",
"reflect-metadata": ">=0.1.12",
"rxjs": ">=6.0.3",
"typia": ">=6.0.3 <7.0.0"
"typia": ">=6.3.1 <7.0.0"
},
"devDependencies": {
"@fastify/multipart": "^8.1.0",
Expand All @@ -80,9 +80,9 @@
"inquirer": "^8.2.5",
"rimraf": "^3.0.2",
"ts-node": "^10.9.1",
"ts-patch": "^3.2.0",
"ts-patch": "^3.2.1",
"tstl": "^3.0.0",
"typescript": "<5.5.0",
"typescript": "^5.5.2",
"typescript-transform-paths": "^3.4.6"
},
"files": [
Expand Down
8 changes: 4 additions & 4 deletions packages/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
"@typescript-eslint/parser": "^5.57.0",
"rimraf": "^4.1.2",
"ts-node": "^10.9.1",
"ts-patch": "^3.1.0",
"typescript": "<5.5.0",
"typia": "^6.1.1"
"ts-patch": "^3.2.1",
"typescript": "^5.5.2",
"typia": "^6.3.1"
},
"dependencies": {
"@nestia/fetcher": "^3.2.2",
"chalk": "^4.1.2",
"cli": "^1.0.1",
"tgrid": "^1.0.1",
"tgrid": "^1.0.2",
"tstl": "^3.0.0"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/fetcher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/fetcher",
"version": "3.3.0-dev.20240624",
"version": "3.3.0",
"description": "Fetcher library of Nestia SDK",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -30,7 +30,7 @@
"@typescript-eslint/eslint-plugin": "^5.46.1",
"@typescript-eslint/parser": "^5.46.1",
"rimraf": "^3.0.2",
"typescript": "<5.5.0"
"typescript": "^5.5.2"
},
"peerDependencies": {
"typescript": ">= 4.8.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
"inquirer": "8.2.5",
"prettier": "^3.2.5",
"tstl": "^3.0.0",
"typescript": "<5.5.0",
"typia": "^6.2.1"
"typescript": "^5.5.2",
"typia": "^6.3.1"
},
"files": [
"lib",
Expand Down
16 changes: 8 additions & 8 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/sdk",
"version": "3.3.0-dev.20240624",
"version": "3.3.0",
"description": "Nestia SDK and Swagger generator",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -32,7 +32,7 @@
},
"homepage": "https://nestia.io",
"dependencies": {
"@nestia/fetcher": "^3.3.0-dev.20240624",
"@nestia/fetcher": "^3.3.0",
"@samchon/openapi": "^0.1.21",
"cli": "^1.0.1",
"get-function-location": "^2.0.0",
Expand All @@ -43,15 +43,15 @@
"tsconfck": "^2.0.1",
"tsconfig-paths": "^4.1.1",
"tstl": "^3.0.0",
"typia": "^6.0.3"
"typia": "^6.3.1"
},
"peerDependencies": {
"@nestia/fetcher": ">=3.3.0-dev.20240624",
"@nestia/fetcher": ">=3.3.0",
"@nestjs/common": ">=7.0.1",
"@nestjs/core": ">=7.0.1",
"reflect-metadata": ">=0.1.12",
"ts-node": ">=10.6.0",
"typia": ">=6.0.3 <7.0.0"
"typia": ">=6.3.1 <7.0.0"
},
"devDependencies": {
"@nestia/e2e": "^0.4.3",
Expand All @@ -67,9 +67,9 @@
"eslint": "^8.29.0",
"eslint-plugin-deprecation": "^1.4.1",
"rimraf": "^3.0.2",
"tgrid": "^1.0.0",
"ts-patch": "^3.2.0",
"typescript": "<5.5.0",
"tgrid": "^1.0.2",
"ts-patch": "^3.2.1",
"typescript": "^5.5.2",
"typescript-transform-paths": "^3.4.4",
"uuid": "^9.0.0"
},
Expand Down
1 change: 1 addition & 0 deletions test/features/all/src/api/HttpError.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { HttpError } from "@nestia/fetcher";
1 change: 1 addition & 0 deletions test/features/all/src/api/IConnection.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type { IConnection } from "@nestia/fetcher";
1 change: 1 addition & 0 deletions test/features/all/src/api/Primitive.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type { Primitive } from "@nestia/fetcher";
65 changes: 65 additions & 0 deletions test/features/all/src/api/functional/all/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/**
* @packageDocumentation
* @module api.functional.all
* @nestia Generated by Nestia - https://github.com/samchon/nestia
*/
//================================================================
import type { IConnection, Primitive } from "@nestia/fetcher";
import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher";

import type { IBbsArticle } from "../../structures/IBbsArticle";

/**
* Store an article.
*
* Create an article, and returns it.
*
* @param input Content to store
* @returns Newly archived article
* @author Samchon
* @warning This is an fake API
*
* @controller AllController.store
* @path POST /all
* @nestia Generated by Nestia - https://github.com/samchon/nestia
*/
export async function store(
connection: IConnection,
input: store.Input,
): Promise<store.Output> {
return PlainFetcher.fetch(
{
...connection,
headers: {
...connection.headers,
"Content-Type": "application/json",
},
},
{
...store.METADATA,
template: store.METADATA.path,
path: store.path(),
},
input,
);
}
export namespace store {
export type Input = Primitive<IBbsArticle.IStore>;
export type Output = Primitive<IBbsArticle>;

export const METADATA = {
method: "POST",
path: "/all",
request: {
type: "application/json",
encrypted: false,
},
response: {
type: "application/json",
encrypted: false,
},
status: null,
} as const;

export const path = () => "/all";
}
35 changes: 35 additions & 0 deletions test/features/all/src/api/functional/health/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* @packageDocumentation
* @module api.functional.health
* @nestia Generated by Nestia - https://github.com/samchon/nestia
*/
//================================================================
import type { IConnection } from "@nestia/fetcher";
import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher";

/**
* @controller HealthController.get
* @path GET /health
* @nestia Generated by Nestia - https://github.com/samchon/nestia
*/
export async function get(connection: IConnection): Promise<void> {
return PlainFetcher.fetch(connection, {
...get.METADATA,
template: get.METADATA.path,
path: get.path(),
});
}
export namespace get {
export const METADATA = {
method: "GET",
path: "/health",
request: null,
response: {
type: "application/json",
encrypted: false,
},
status: null,
} as const;

export const path = () => "/health";
}
9 changes: 9 additions & 0 deletions test/features/all/src/api/functional/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @packageDocumentation
* @module api.functional
* @nestia Generated by Nestia - https://github.com/samchon/nestia
*/
//================================================================
export * as all from "./all";
export * as health from "./health";
export * as performance from "./performance";
39 changes: 39 additions & 0 deletions test/features/all/src/api/functional/performance/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* @packageDocumentation
* @module api.functional.performance
* @nestia Generated by Nestia - https://github.com/samchon/nestia
*/
//================================================================
import type { IConnection, Primitive } from "@nestia/fetcher";
import { PlainFetcher } from "@nestia/fetcher/lib/PlainFetcher";

import type { IPerformance } from "../../structures/IPerformance";

/**
* @controller PerformanceController.get
* @path GET /performance
* @nestia Generated by Nestia - https://github.com/samchon/nestia
*/
export async function get(connection: IConnection): Promise<get.Output> {
return PlainFetcher.fetch(connection, {
...get.METADATA,
template: get.METADATA.path,
path: get.path(),
});
}
export namespace get {
export type Output = Primitive<IPerformance>;

export const METADATA = {
method: "GET",
path: "/performance",
request: null,
response: {
type: "application/json",
encrypted: false,
},
status: null,
} as const;

export const path = () => "/performance";
}
4 changes: 4 additions & 0 deletions test/features/all/src/api/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import * as api from "./module";

export * from "./module";
export default api;
5 changes: 5 additions & 0 deletions test/features/all/src/api/module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export type * from "./IConnection";
export type * from "./Primitive";
export * from "./HttpError";

export * as functional from "./functional";
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { Primitive } from "@nestia/fetcher";
import typia from "typia";

import api from "../../../../api";
import type { IBbsArticle } from "../../../../api/structures/IBbsArticle";

export const test_api_all_store = async (connection: api.IConnection) => {
const output: Primitive<IBbsArticle> = await api.functional.all.store(
connection,
typia.random<IBbsArticle.IStore>(),
);
typia.assert(output);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import typia from "typia";

import api from "../../../../api";

export const test_api_health_get = async (connection: api.IConnection) => {
const output = await api.functional.health.get(connection);
typia.assert(output);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { Primitive } from "@nestia/fetcher";
import typia from "typia";

import api from "../../../../api";
import type { IPerformance } from "../../../../api/structures/IPerformance";

export const test_api_performance_get = async (connection: api.IConnection) => {
const output: Primitive<IPerformance> =
await api.functional.performance.get(connection);
typia.assert(output);
};
Loading

0 comments on commit 8baf4eb

Please sign in to comment.