Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support testing mode execution in payment-backend #172

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 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.2",
"version": "5.0.3",
"description": "Fake iamport server for testing",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/fake-toss-payments-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fake-toss-payments-server",
"version": "5.0.2",
"version": "5.0.3",
"description": "Fake toss-payments server for testing",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/iamport-server-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iamport-server-api",
"version": "5.0.2",
"version": "5.0.3",
"description": "API for Iamport Server",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/iamport-server-api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"info": {
"title": "Iamport API",
"description": "Built by [fake-iamport-server](https://github.com/samchon/payments/tree/master/packages/fake-iamport-server) with [nestia](https://github.com/samchon/nestia)",
"version": "5.0.2",
"version": "5.0.3",
"license": {
"name": "MIT"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/payment-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@samchon/payment-api",
"version": "5.0.2",
"version": "5.0.3",
"description": "API for Payment Backend",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -35,8 +35,8 @@
},
"dependencies": {
"@nestia/fetcher": "^2.3.4",
"iamport-server-api": "^5.0.2",
"toss-payments-server-api": "^5.0.2",
"iamport-server-api": "^5.0.3",
"toss-payments-server-api": "^5.0.3",
"typia": "^5.2.4"
}
}
2 changes: 1 addition & 1 deletion packages/payment-api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}
],
"info": {
"version": "5.0.2-dev.20231103",
"version": "5.0.3",
"title": "@samchon/payment-backend",
"description": "Payment Backend Server",
"license": {
Expand Down
10 changes: 5 additions & 5 deletions packages/payment-backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@samchon/payment-backend",
"version": "5.0.2",
"version": "5.0.3",
"description": "Payment Backend Server",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down Expand Up @@ -65,14 +65,14 @@
"@typescript-eslint/parser": "^5.26.0",
"cli": "^1.0.1",
"copyfiles": "^2.4.1",
"iamport-server-api": "^5.0.2",
"iamport-server-api": "^5.0.3",
"nestia": "^5.0.1",
"pm2": "^4.5.6",
"prettier": "^2.6.2",
"prisma-markdown": "^1.0.5",
"rimraf": "^3.0.2",
"sloc": "^0.2.1",
"toss-payments-server-api": "^5.0.2",
"toss-payments-server-api": "^5.0.3",
"ts-node": "^10.9.1",
"ts-patch": "^3.0.2",
"typescript": "^5.2.2",
Expand All @@ -84,8 +84,8 @@
"bcryptjs": "^2.4.3",
"dotenv": "^16.3.1",
"dotenv-expand": "^10.0.0",
"fake-iamport-server": "^5.0.2",
"fake-toss-payments-server": "^5.0.2",
"fake-iamport-server": "^5.0.3",
"fake-toss-payments-server": "^5.0.3",
"git-last-commit": "^1.0.0",
"inquirer": "^8.2.5",
"mutex-server": "^0.3.1",
Expand Down
6 changes: 6 additions & 0 deletions packages/payment-backend/src/executable/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ async function handle_error(exp: any): Promise<void> {
}

async function main(): Promise<void> {
if (
PaymentGlobal.mode === "local" &&
process.argv.some((str) => str === "testing")
)
PaymentGlobal.testing = true;

// BACKEND SEVER LATER
const backend: PaymentBackend = new PaymentBackend();
await backend.open();
Expand Down
2 changes: 1 addition & 1 deletion packages/toss-payments-server-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "toss-payments-server-api",
"version": "5.0.2",
"version": "5.0.3",
"description": "API for Toss Payments Server",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/toss-payments-server-api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"info": {
"title": "Toss Payments API",
"description": "Built by [fake-toss-payments-server](https://github.com/samchon/payments/tree/master/packages/toss-payments-server-api) with [nestia](https://github.com/samchon/nestia)",
"version": "5.0.2",
"version": "5.0.3",
"license": {
"name": "MIT"
}
Expand Down
Loading