awesome-node-checkout 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.1.0] - 2026-09-27
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Security**: Added `buildPaymentRequest` hook in `createCheckoutRouter` options to build payment requests securely server-side (preventing clients from tampering with amounts and order parameters). Resolves #3.
|
|
12
|
+
- **Security**: Added mount-time warning when `createCheckoutRouter` is used without `buildPaymentRequest`.
|
|
13
|
+
- **Validation**: Added input validation on `POST /:provider` when `buildPaymentRequest` is not configured (requires finite positive number `amount` and non-empty `currency`).
|
|
14
|
+
- **Gating**: Gated `POST /:provider/refund` behind `options.refund` (returns 404 unless explicitly configured with optional middleware).
|
|
15
|
+
- **Hooks**: Added `onBeforeExecute` and dedicated `middleware` support in `options.execute` for `POST /:provider/execute`.
|
|
16
|
+
- **Examples**: Added reference Express implementation under `examples/express` demonstrating SQLite store, Handlebars UI, and full checkout flow.
|
|
17
|
+
|
|
18
|
+
## [1.0.2] - 2026-04-23
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- Removed compiled `dist/` artifacts from git tracking.
|
|
22
|
+
- Added GitHub Actions publish workflow.
|
|
23
|
+
- Updated dependencies.
|
|
24
|
+
|
|
25
|
+
## [1.0.1] - 2026-04-13
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- Satispay provider warning at construction time when `webhookPublicKey` is not configured.
|
|
29
|
+
- PayPal refund implementation and security improvements.
|
|
30
|
+
|
|
31
|
+
## [1.0.0] - 2026-03-30
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
- Initial release of `awesome-node-checkout`.
|
|
35
|
+
- Framework-agnostic `CheckoutConfigurator`.
|
|
36
|
+
- PayPal, Nexi, and Satispay providers.
|
|
37
|
+
- Express adapter with `createCheckoutRouter`.
|
package/README.md
CHANGED
|
@@ -68,12 +68,40 @@ import { createCheckoutRouter } from 'awesome-node-checkout/express';
|
|
|
68
68
|
const app = express();
|
|
69
69
|
app.use(express.json());
|
|
70
70
|
|
|
71
|
-
//
|
|
72
|
-
app.use(
|
|
71
|
+
// Mount checkout routes with secure server-side request builder
|
|
72
|
+
app.use(
|
|
73
|
+
'/checkout',
|
|
74
|
+
createCheckoutRouter(checkout, {
|
|
75
|
+
// Recommended: verify order and compute amount on the server
|
|
76
|
+
buildPaymentRequest: async (req) => {
|
|
77
|
+
const order = await myOrderService.getOrder(req.body.orderId);
|
|
78
|
+
return {
|
|
79
|
+
amount: order.totalAmount,
|
|
80
|
+
currency: order.currency, // e.g. 'EUR'
|
|
81
|
+
orderId: order.id,
|
|
82
|
+
returnUrl: 'https://myapp.com/payment/success',
|
|
83
|
+
cancelUrl: 'https://myapp.com/payment/cancel',
|
|
84
|
+
description: `Order #${order.id}`,
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
// Opt-in: mount POST /:provider/refund protected by admin middleware
|
|
88
|
+
refund: {
|
|
89
|
+
middleware: [requireAdminAuth],
|
|
90
|
+
},
|
|
91
|
+
// Optional: guard execution before capturing payment
|
|
92
|
+
execute: {
|
|
93
|
+
onBeforeExecute: async (req, paymentId) => {
|
|
94
|
+
// Verify payment belongs to current session or user
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
}),
|
|
98
|
+
);
|
|
73
99
|
|
|
74
100
|
app.listen(3000);
|
|
75
101
|
```
|
|
76
102
|
|
|
103
|
+
> **Security Note**: Never trust client-sent amounts directly. Always define `buildPaymentRequest` so the payment amount and order parameters are derived server-side. If `buildPaymentRequest` is omitted, the router will issue a warning at mount time and validate that client bodies contain positive finite amounts and valid currencies.
|
|
104
|
+
|
|
77
105
|
### With Fastify (or any other framework)
|
|
78
106
|
|
|
79
107
|
Use the `CheckoutConfigurator` methods directly in your own routes:
|
|
@@ -92,16 +120,22 @@ fastify.post('/checkout/:provider/webhook', async (req, reply) => {
|
|
|
92
120
|
|
|
93
121
|
---
|
|
94
122
|
|
|
123
|
+
## Example Application
|
|
124
|
+
|
|
125
|
+
A full-featured reference implementation using Express 5, SQLite (`ITransactionStore`), and Handlebars is available in [examples/express](./examples/express).
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
95
129
|
## Routes (Express adapter)
|
|
96
130
|
|
|
97
|
-
| Method | Path | Description
|
|
98
|
-
|
|
99
|
-
| POST | `/:provider` | Create a payment
|
|
100
|
-
| POST | `/:provider/execute` | Execute/capture a payment
|
|
101
|
-
| GET | `/:provider/redirect` | Handle provider redirect callback|
|
|
102
|
-
| GET | `/:provider/:id` | Get payment details
|
|
103
|
-
| POST | `/:provider/refund` | Refund a payment
|
|
104
|
-
| POST | `/:provider/webhook` | Handle provider webhook
|
|
131
|
+
| Method | Path | Description |
|
|
132
|
+
|--------|-----------------------------|----------------------------------------------------------------|
|
|
133
|
+
| POST | `/:provider` | Create a payment (server-built or validated) |
|
|
134
|
+
| POST | `/:provider/execute` | Execute/capture a payment (supports `onBeforeExecute`) |
|
|
135
|
+
| GET | `/:provider/redirect` | Handle provider redirect callback |
|
|
136
|
+
| GET | `/:provider/:id` | Get payment details |
|
|
137
|
+
| POST | `/:provider/refund` | Refund a payment (*opt-in*: mounted only when `refund` option is set)|
|
|
138
|
+
| POST | `/:provider/webhook` | Handle provider webhook |
|
|
105
139
|
|
|
106
140
|
---
|
|
107
141
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Router, RequestHandler } from 'express';
|
|
1
|
+
import { Router, Request, RequestHandler } from 'express';
|
|
2
2
|
import { CheckoutConfigurator } from '../../checkout-configurator';
|
|
3
|
+
import { PaymentRequest } from '../../models/payment-request.model';
|
|
3
4
|
export interface ExpressCheckoutOptions {
|
|
4
5
|
/**
|
|
5
6
|
* Middleware applied to ALL checkout routes (e.g. API key auth).
|
|
@@ -11,6 +12,24 @@ export interface ExpressCheckoutOptions {
|
|
|
11
12
|
* Matched against the path suffix after the mount point.
|
|
12
13
|
*/
|
|
13
14
|
publicPaths?: string[];
|
|
15
|
+
/**
|
|
16
|
+
* Builds the PaymentRequest on the server (amount from your own order), ignoring the client body.
|
|
17
|
+
*/
|
|
18
|
+
buildPaymentRequest?: (req: Request) => PaymentRequest | Promise<PaymentRequest>;
|
|
19
|
+
/**
|
|
20
|
+
* Configuration for POST /:provider/refund.
|
|
21
|
+
* If omitted, the refund route is NOT mounted (returns 404).
|
|
22
|
+
*/
|
|
23
|
+
refund?: {
|
|
24
|
+
middleware?: RequestHandler[];
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Configuration for POST /:provider/execute.
|
|
28
|
+
*/
|
|
29
|
+
execute?: {
|
|
30
|
+
middleware?: RequestHandler[];
|
|
31
|
+
onBeforeExecute?: (req: Request, paymentId: string) => void | Promise<void>;
|
|
32
|
+
};
|
|
14
33
|
}
|
|
15
34
|
/**
|
|
16
35
|
* Creates an Express Router with all checkout endpoints pre-wired.
|
|
@@ -21,14 +40,25 @@ export interface ExpressCheckoutOptions {
|
|
|
21
40
|
* POST /:provider/execute → executePayment
|
|
22
41
|
* GET /:provider/redirect → handleRedirect (must come before /:provider/:id)
|
|
23
42
|
* GET /:provider/:id → getPaymentDetails
|
|
24
|
-
* POST /:provider/refund → refundPayment
|
|
43
|
+
* POST /:provider/refund → refundPayment (only if options.refund is configured)
|
|
25
44
|
* POST /:provider/webhook → handleWebhook
|
|
26
45
|
* ```
|
|
27
46
|
*
|
|
28
47
|
* Usage:
|
|
29
48
|
* ```typescript
|
|
30
49
|
* import { createCheckoutRouter } from 'awesome-node-checkout/express';
|
|
31
|
-
* app.use('/checkout', createCheckoutRouter(checkout
|
|
50
|
+
* app.use('/checkout', createCheckoutRouter(checkout, {
|
|
51
|
+
* buildPaymentRequest: async (req) => {
|
|
52
|
+
* const order = await getOrder(req.body.orderId);
|
|
53
|
+
* return {
|
|
54
|
+
* amount: order.total,
|
|
55
|
+
* currency: 'EUR',
|
|
56
|
+
* orderId: order.id,
|
|
57
|
+
* returnUrl: 'https://example.com/success',
|
|
58
|
+
* cancelUrl: 'https://example.com/cancel',
|
|
59
|
+
* };
|
|
60
|
+
* },
|
|
61
|
+
* }));
|
|
32
62
|
* ```
|
|
33
63
|
*/
|
|
34
64
|
export declare function createCheckoutRouter(checkout: CheckoutConfigurator, options?: ExpressCheckoutOptions): Router;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/express/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/express/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAY,cAAc,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEpE,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;IAE9B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAEvB;;OAEG;IACH,mBAAmB,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAEjF;;;OAGG;IACH,MAAM,CAAC,EAAE;QACP,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;KAC/B,CAAC;IAEF;;OAEG;IACH,OAAO,CAAC,EAAE;QACR,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;QAC9B,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KAC7E,CAAC;CACH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,GAAE,sBAA2B,GACnC,MAAM,CAsIR"}
|
|
@@ -12,18 +12,32 @@ const errors_1 = require("../../models/errors");
|
|
|
12
12
|
* POST /:provider/execute → executePayment
|
|
13
13
|
* GET /:provider/redirect → handleRedirect (must come before /:provider/:id)
|
|
14
14
|
* GET /:provider/:id → getPaymentDetails
|
|
15
|
-
* POST /:provider/refund → refundPayment
|
|
15
|
+
* POST /:provider/refund → refundPayment (only if options.refund is configured)
|
|
16
16
|
* POST /:provider/webhook → handleWebhook
|
|
17
17
|
* ```
|
|
18
18
|
*
|
|
19
19
|
* Usage:
|
|
20
20
|
* ```typescript
|
|
21
21
|
* import { createCheckoutRouter } from 'awesome-node-checkout/express';
|
|
22
|
-
* app.use('/checkout', createCheckoutRouter(checkout
|
|
22
|
+
* app.use('/checkout', createCheckoutRouter(checkout, {
|
|
23
|
+
* buildPaymentRequest: async (req) => {
|
|
24
|
+
* const order = await getOrder(req.body.orderId);
|
|
25
|
+
* return {
|
|
26
|
+
* amount: order.total,
|
|
27
|
+
* currency: 'EUR',
|
|
28
|
+
* orderId: order.id,
|
|
29
|
+
* returnUrl: 'https://example.com/success',
|
|
30
|
+
* cancelUrl: 'https://example.com/cancel',
|
|
31
|
+
* };
|
|
32
|
+
* },
|
|
33
|
+
* }));
|
|
23
34
|
* ```
|
|
24
35
|
*/
|
|
25
36
|
function createCheckoutRouter(checkout, options = {}) {
|
|
26
37
|
const router = (0, express_1.Router)();
|
|
38
|
+
if (!options.buildPaymentRequest) {
|
|
39
|
+
console.warn('[awesome-node-checkout] createCheckoutRouter: the client body decides the amount; set buildPaymentRequest');
|
|
40
|
+
}
|
|
27
41
|
// Apply shared middleware (skipping public paths)
|
|
28
42
|
if (options.middleware?.length) {
|
|
29
43
|
const publicPaths = options.publicPaths ?? [];
|
|
@@ -45,7 +59,27 @@ function createCheckoutRouter(checkout, options = {}) {
|
|
|
45
59
|
// ---- POST /:provider — create payment ------------------------------------
|
|
46
60
|
router.post('/:provider', async (req, res) => {
|
|
47
61
|
try {
|
|
48
|
-
|
|
62
|
+
let paymentRequest;
|
|
63
|
+
if (options.buildPaymentRequest) {
|
|
64
|
+
paymentRequest = await options.buildPaymentRequest(req);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
const body = req.body;
|
|
68
|
+
const amount = body?.amount;
|
|
69
|
+
const currency = body?.currency;
|
|
70
|
+
if (typeof amount !== 'number' ||
|
|
71
|
+
!Number.isFinite(amount) ||
|
|
72
|
+
amount <= 0 ||
|
|
73
|
+
typeof currency !== 'string' ||
|
|
74
|
+
currency.trim() === '') {
|
|
75
|
+
return res.status(400).json({
|
|
76
|
+
success: false,
|
|
77
|
+
error: 'Invalid payment request: amount must be a positive number and currency is required',
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
paymentRequest = body;
|
|
81
|
+
}
|
|
82
|
+
const result = await checkout.createPayment(String(req.params.provider), paymentRequest);
|
|
49
83
|
res.status(result.success ? 201 : 400).json(result);
|
|
50
84
|
}
|
|
51
85
|
catch (err) {
|
|
@@ -53,9 +87,16 @@ function createCheckoutRouter(checkout, options = {}) {
|
|
|
53
87
|
}
|
|
54
88
|
});
|
|
55
89
|
// ---- POST /:provider/execute — execute payment ---------------------------
|
|
56
|
-
|
|
90
|
+
const executeHandlers = [];
|
|
91
|
+
if (options.execute?.middleware?.length) {
|
|
92
|
+
executeHandlers.push(...options.execute.middleware);
|
|
93
|
+
}
|
|
94
|
+
router.post('/:provider/execute', ...executeHandlers, async (req, res) => {
|
|
57
95
|
try {
|
|
58
96
|
const { paymentId, data } = req.body;
|
|
97
|
+
if (options.execute?.onBeforeExecute) {
|
|
98
|
+
await options.execute.onBeforeExecute(req, paymentId);
|
|
99
|
+
}
|
|
59
100
|
const result = await checkout.executePayment(String(req.params.provider), paymentId, data);
|
|
60
101
|
res.status(result.success ? 200 : 400).json(result);
|
|
61
102
|
}
|
|
@@ -63,17 +104,23 @@ function createCheckoutRouter(checkout, options = {}) {
|
|
|
63
104
|
sendError(res, err);
|
|
64
105
|
}
|
|
65
106
|
});
|
|
66
|
-
// ---- POST /:provider/refund — refund payment
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
res.status(result.success ? 200 : 400).json(result);
|
|
72
|
-
}
|
|
73
|
-
catch (err) {
|
|
74
|
-
sendError(res, err);
|
|
107
|
+
// ---- POST /:provider/refund — refund payment (opt-in) --------------------
|
|
108
|
+
if (options.refund) {
|
|
109
|
+
const refundHandlers = [];
|
|
110
|
+
if (options.refund.middleware?.length) {
|
|
111
|
+
refundHandlers.push(...options.refund.middleware);
|
|
75
112
|
}
|
|
76
|
-
|
|
113
|
+
router.post('/:provider/refund', ...refundHandlers, async (req, res) => {
|
|
114
|
+
try {
|
|
115
|
+
const { paymentId, amount } = req.body;
|
|
116
|
+
const result = await checkout.refundPayment(String(req.params.provider), paymentId, amount);
|
|
117
|
+
res.status(result.success ? 200 : 400).json(result);
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
sendError(res, err);
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}
|
|
77
124
|
// ---- POST /:provider/webhook — handle webhook ----------------------------
|
|
78
125
|
router.post('/:provider/webhook', async (req, res) => {
|
|
79
126
|
try {
|
|
@@ -118,7 +165,7 @@ function sendError(res, err) {
|
|
|
118
165
|
WEBHOOK_NOT_SUPPORTED: 422,
|
|
119
166
|
REDIRECT_NOT_SUPPORTED: 422,
|
|
120
167
|
};
|
|
121
|
-
const status = statusMap[err.code] ??
|
|
168
|
+
const status = statusMap[err.code] ?? 400;
|
|
122
169
|
res.status(status).json({ success: false, error: err.message, code: err.code });
|
|
123
170
|
}
|
|
124
171
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/express/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/express/index.ts"],"names":[],"mappings":";;AAsEA,oDAyIC;AA/MD,qCAAoE;AAEpE,gDAAoD;AAsCpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,SAAgB,oBAAoB,CAClC,QAA8B,EAC9B,UAAkC,EAAE;IAEpC,MAAM,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;IAExB,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;QACjC,OAAO,CAAC,IAAI,CACV,2GAA2G,CAC5G,CAAC;IACJ,CAAC;IAED,kDAAkD;IAClD,IAAI,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;QAC/B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,EAAE,CAAC;QAC9C,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YAC5B,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;YACzD,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CACtC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CACjF,CAAC;YACF,IAAI,QAAQ;gBAAE,OAAO,IAAI,EAAE,CAAC;YAC5B,mCAAmC;YACnC,MAAM,QAAQ,G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AAM,CAAC,CAAC;QACtD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACtB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,SAAS,SAAS,CAAC,GAAa,EAAE,GAAY;IAC5C,IAAI,GAAG,YAAY,sBAAa,EAAE,CAAC;QACjC,MAAM,SAAS,GAA2B;YACxC,kBAAkB,EAAE,GAAG;YACvB,qBAAqB,EAAE,GAAG;YAC1B,sBAAsB,EAAE,GAAG;SAC5B,CAAC;QACF,MAAM,MAAM,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;QAC1C,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAClF,CAAC;SAAM,CAAC;QACN,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC;QAC7E,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "awesome-node-checkout",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Framework-agnostic payment checkout library for Node.js",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"files": [
|
|
19
19
|
"dist",
|
|
20
20
|
"README.md",
|
|
21
|
+
"CHANGELOG.md",
|
|
21
22
|
"LICENSE"
|
|
22
23
|
],
|
|
23
24
|
"keywords": [
|
|
@@ -31,7 +32,15 @@
|
|
|
31
32
|
"typescript",
|
|
32
33
|
"framework-agnostic"
|
|
33
34
|
],
|
|
34
|
-
"author": "",
|
|
35
|
+
"author": "Nicola Brecciaroli <nicola.brecciaroli@gmail.com>",
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/nik2208/awesome-node-checkout.git"
|
|
39
|
+
},
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/nik2208/awesome-node-checkout/issues"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/nik2208/awesome-node-checkout#readme",
|
|
35
44
|
"license": "MIT",
|
|
36
45
|
"devDependencies": {
|
|
37
46
|
"@types/express": "^5.0.0",
|