-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #935 from samchon/features/ts-patch
Upgrade `ts-patch@3.2.1` for `typescript@5.2.2`.
- Loading branch information
Showing
28 changed files
with
562 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { HttpError } from "@nestia/fetcher"; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type { IConnection } from "@nestia/fetcher"; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type { Primitive } from "@nestia/fetcher"; |
This file contains 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
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"; | ||
} |
This file contains 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
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"; | ||
} |
This file contains 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
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"; |
This file contains 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
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"; | ||
} |
This file contains 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
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; |
This file contains 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
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"; |
13 changes: 13 additions & 0 deletions
13
test/features/all/src/test/features/api/automated/test_api_all_store.ts
This file contains 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
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); | ||
}; |
8 changes: 8 additions & 0 deletions
8
test/features/all/src/test/features/api/automated/test_api_health_get.ts
This file contains 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
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); | ||
}; |
11 changes: 11 additions & 0 deletions
11
test/features/all/src/test/features/api/automated/test_api_performance_get.ts
This file contains 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
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); | ||
}; |
Oops, something went wrong.