Skip to content

Commit

Permalink
Merge pull request #176 from samchon/features/webpack
Browse files Browse the repository at this point in the history
리팩토링 실시
  • Loading branch information
samchon authored Nov 13, 2023
2 parents 7f97586 + b5a7f48 commit 4b94072
Show file tree
Hide file tree
Showing 208 changed files with 10,473 additions and 10,589 deletions.
16 changes: 6 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ updates:
interval: 'daily'
open-pull-requests-limit: 25
allow:
- dependency-name: "@nestia/core"
- dependency-name: "@nestia/e2e"
- dependency-name: "@nestia/sdk"
- dependency-name: "@nestia/*"
- dependency-name: "@nestjs/*"
- dependency-name: "nestia"
- dependency-name: "tstl"
- dependency-name: "typia"
Expand All @@ -18,9 +17,8 @@ updates:
interval: 'daily'
open-pull-requests-limit: 25
allow:
- dependency-name: "@nestia/core"
- dependency-name: "@nestia/e2e"
- dependency-name: "@nestia/sdk"
- dependency-name: "@nestia/*"
- dependency-name: "@nestjs/*"
- dependency-name: "nestia"
- dependency-name: "tstl"
- dependency-name: "typia"
Expand All @@ -30,10 +28,8 @@ updates:
interval: 'daily'
open-pull-requests-limit: 25
allow:
- dependency-name: "@nestia/core"
- dependency-name: "@nestia/e2e"
- dependency-name: "@nestia/sdk"
- dependency-name: "nestia"
- dependency-name: "@nestia/*"
- dependency-name: "@nestjs/*"
- dependency-name: "tstl"
- dependency-name: "typia"

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
bin/
dist/
lib/
migrations/
node_modules/
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ packages/*/src/api/utils
packages/*/src/api/*.ts

README.md
packages/*/tsconfig.json
tsconfig.json
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"editor.tabSize": 4,
"editor.tabSize": 2,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/fake-iamport-server/nestia.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { NestFactory } from "@nestjs/core";
import { FakeIamportModule } from "./src/FakeIamportModule";

const NESTIA_CONFIG: INestiaConfig = {
input: async () => NestFactory.create(await FakeIamportModule()),
input: () => NestFactory.create(FakeIamportModule),
output: "src/api",
simulate: true,
distribute: "../iamport-server-api",
Expand Down
17 changes: 9 additions & 8 deletions packages/fake-iamport-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fake-iamport-server",
"version": "5.0.6",
"version": "5.1.0",
"description": "Fake iamport server for testing",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand All @@ -15,7 +15,6 @@
"dev": "npm run build:test -- --watch",
"eslint": "eslint src && eslint --config .eslintrc.test.cjs test",
"eslint:fix": "eslint --fix src && eslint --fix --config .eslintrc.test.cjs test",
"prettier": "prettier src --write && prettier test --write",
"------------------------------------------------": "",
"package:api": "npm run build:swagger && npm run build:api && cd packages/api && npm publish",
"package:latest": "npm run build && npm run test && npm publish",
Expand All @@ -39,8 +38,7 @@
},
"homepage": "https://github.com/samchon/fake-iamport-server",
"devDependencies": {
"@nestia/sdk": "^2.3.4",
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
"@nestia/sdk": "^2.3.9",
"@types/atob": "^2.1.2",
"@types/btoa": "^1.2.3",
"@types/cli": "^0.11.19",
Expand All @@ -52,22 +50,25 @@
"copyfiles": "^2.4.1",
"nestia": "^5.0.1",
"pm2": "^4.5.6",
"prettier": "^2.6.2",
"rimraf": "^3.0.2",
"sloc": "^0.2.1",
"ts-node": "^10.9.1",
"ts-patch": "^3.0.2",
"typescript": "^5.2.2"
},
"dependencies": {
"@nestia/core": "^2.3.4",
"@nestia/core": "^2.3.9",
"@nestia/e2e": "^0.3.6",
"@nestia/fetcher": "^2.3.4",
"@nestia/fetcher": "^2.3.9",
"@nestjs/common": "^10.2.8",
"@nestjs/core": "^10.2.8",
"@nestjs/platform-fastify": "^10.2.8",
"fastify": "^4.24.3",
"serialize-error": "^4.1.0",
"source-map-support": "^0.5.19",
"tstl": "^2.5.13",
"typescript-transform-paths": "^3.4.6",
"typia": "^5.2.4",
"typia": "^5.2.6",
"uuid": "^9.0.0"
},
"keywords": [
Expand Down
90 changes: 45 additions & 45 deletions packages/fake-iamport-server/src/FakeIamportBackend.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NestFactory } from "@nestjs/core";
import {
FastifyAdapter,
NestFastifyApplication,
FastifyAdapter,
NestFastifyApplication,
} from "@nestjs/platform-fastify";

import { FakeIamportConfiguration } from "./FakeIamportConfiguration";
Expand All @@ -13,47 +13,47 @@ import { FakeIamportModule } from "./FakeIamportModule";
* @author Samchon
*/
export class FakeIamportBackend {
private application_?: NestFastifyApplication;

/**
* 서버 개설.
*/
public async open(): Promise<void> {
//----
// OPEN THE BACKEND SERVER
//----
// MOUNT CONTROLLERS
this.application_ = await NestFactory.create(
await FakeIamportModule(),
new FastifyAdapter(),
{ logger: false },
);

// DO OPEN
this.application_.enableCors();
await this.application_.listen(FakeIamportConfiguration.API_PORT);

//----
// POST-PROCESSES
//----
// INFORM TO THE PM2
if (process.send) process.send("ready");

// WHEN KILL COMMAND COMES
process.on("SIGINT", async () => {
await this.close();
process.exit(0);
});
}

/**
* 서버 폐쇄.
*/
public async close(): Promise<void> {
if (this.application_ === undefined) return;

// DO CLOSE
await this.application_.close();
delete this.application_;
}
private application_?: NestFastifyApplication;

/**
* 서버 개설.
*/
public async open(): Promise<void> {
//----
// OPEN THE BACKEND SERVER
//----
// MOUNT CONTROLLERS
this.application_ = await NestFactory.create(
FakeIamportModule,
new FastifyAdapter(),
{ logger: false },
);

// DO OPEN
this.application_.enableCors();
await this.application_.listen(FakeIamportConfiguration.API_PORT);

//----
// POST-PROCESSES
//----
// INFORM TO THE PM2
if (process.send) process.send("ready");

// WHEN KILL COMMAND COMES
process.on("SIGINT", async () => {
await this.close();
process.exit(0);
});
}

/**
* 서버 폐쇄.
*/
public async close(): Promise<void> {
if (this.application_ === undefined) return;

// DO CLOSE
await this.application_.close();
delete this.application_;
}
}
Loading

0 comments on commit 4b94072

Please sign in to comment.