inviton-backduck 1.0.4 → 1.0.7
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/README.md +61 -71
- package/dist/apidoc/api-doc-generator.d.ts +5 -3
- package/dist/apidoc/api-doc-generator.d.ts.map +1 -1
- package/dist/apidoc/api-doc-generator.js +14 -9
- package/dist/apidoc/api-doc-generator.js.map +1 -1
- package/dist/apidoc/config.d.ts +186 -70
- package/dist/apidoc/config.d.ts.map +1 -1
- package/dist/apidoc/config.js +139 -196
- package/dist/apidoc/config.js.map +1 -1
- package/dist/apidoc/controller-parser.d.ts +13 -5
- package/dist/apidoc/controller-parser.d.ts.map +1 -1
- package/dist/apidoc/controller-parser.js +36 -17
- package/dist/apidoc/controller-parser.js.map +1 -1
- package/dist/apidoc/html-generator.d.ts +1 -1
- package/dist/apidoc/html-generator.js +20 -20
- package/dist/apidoc/html-generator.js.map +1 -1
- package/dist/apidoc/index.d.ts +2 -1
- package/dist/apidoc/index.d.ts.map +1 -1
- package/dist/apidoc/index.js +2 -0
- package/dist/apidoc/index.js.map +1 -1
- package/dist/apidoc/openapi-builder.d.ts.map +1 -1
- package/dist/apidoc/openapi-builder.js +22 -21
- package/dist/apidoc/openapi-builder.js.map +1 -1
- package/dist/apidoc/type-resolver.d.ts.map +1 -1
- package/dist/apidoc/type-resolver.js +53 -5
- package/dist/apidoc/type-resolver.js.map +1 -1
- package/dist/bun/bunRouter.js +4 -0
- package/dist/bun/bunRouter.js.map +1 -1
- package/dist/data-contracts.d.ts +6 -0
- package/dist/data-contracts.d.ts.map +1 -1
- package/dist/express/expressRouter.d.ts.map +1 -1
- package/dist/express/expressRouter.js +4 -0
- package/dist/express/expressRouter.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/router.js +1 -1
- package/dist/router.js.map +1 -1
- package/dist/server.d.ts +4 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +34 -1
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,11 +25,13 @@ npm install @inviton/backduck
|
|
|
25
25
|
Depending on your runtime, install the appropriate peer dependencies:
|
|
26
26
|
|
|
27
27
|
**For Node.js/Express:**
|
|
28
|
+
|
|
28
29
|
```bash
|
|
29
30
|
npm install express
|
|
30
31
|
```
|
|
31
32
|
|
|
32
33
|
**For Bun:**
|
|
34
|
+
|
|
33
35
|
```bash
|
|
34
36
|
# Bun automatically provides bun-types
|
|
35
37
|
```
|
|
@@ -39,14 +41,14 @@ npm install express
|
|
|
39
41
|
### 1. Define a Controller
|
|
40
42
|
|
|
41
43
|
```typescript
|
|
42
|
-
import { Route, ControllerBase } from
|
|
44
|
+
import { Route, ControllerBase } from "@inviton/backduck";
|
|
43
45
|
|
|
44
46
|
interface CreateProductArgs {
|
|
45
47
|
name: string;
|
|
46
48
|
price: number;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
@Route(
|
|
51
|
+
@Route("/products")
|
|
50
52
|
export class ProductController extends ControllerBase {
|
|
51
53
|
// GET /products
|
|
52
54
|
async getAll() {
|
|
@@ -55,7 +57,7 @@ export class ProductController extends ControllerBase {
|
|
|
55
57
|
|
|
56
58
|
// GET /products/:id
|
|
57
59
|
async get(args: { id: number }) {
|
|
58
|
-
return { id: args.id, name:
|
|
60
|
+
return { id: args.id, name: "Product" };
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
// POST /products
|
|
@@ -78,8 +80,8 @@ export class ProductController extends ControllerBase {
|
|
|
78
80
|
### 2. Create Router and Register Controllers
|
|
79
81
|
|
|
80
82
|
```typescript
|
|
81
|
-
import { createRouter } from
|
|
82
|
-
import { ProductController } from
|
|
83
|
+
import { createRouter } from "@inviton/backduck";
|
|
84
|
+
import { ProductController } from "./controllers/ProductController";
|
|
83
85
|
|
|
84
86
|
const router = createRouter();
|
|
85
87
|
router.registerController(ProductController);
|
|
@@ -88,13 +90,13 @@ router.registerController(ProductController);
|
|
|
88
90
|
### 3. Create and Start Server
|
|
89
91
|
|
|
90
92
|
```typescript
|
|
91
|
-
import { createServer } from
|
|
93
|
+
import { createServer } from "@inviton/backduck";
|
|
92
94
|
|
|
93
95
|
const server = createServer({
|
|
94
96
|
port: 3000,
|
|
95
97
|
apiRouters: {
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
+
"/api": router,
|
|
99
|
+
},
|
|
98
100
|
});
|
|
99
101
|
|
|
100
102
|
await server.start();
|
|
@@ -108,62 +110,50 @@ Generate OpenAPI/Swagger and HTML documentation from your TypeScript controllers
|
|
|
108
110
|
|
|
109
111
|
### 1. Create Configuration
|
|
110
112
|
|
|
113
|
+
Use `createApiDocConfig()` to build a configurable config (merge with defaults) or implement the `ApiDocConfig` interface:
|
|
114
|
+
|
|
111
115
|
```typescript
|
|
112
116
|
// apidoc-config.ts
|
|
113
|
-
import
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
getOutputPath: (serverDir, format) =>
|
|
126
|
-
path.join(serverDir, 'docs', format),
|
|
127
|
-
|
|
128
|
-
output: {
|
|
129
|
-
specFilename: 'openapi.json',
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
patterns: {
|
|
133
|
-
controllerFiles: /Controller\.ts$/,
|
|
117
|
+
import { createApiDocConfig } from "@inviton/backduck";
|
|
118
|
+
|
|
119
|
+
// Option A: Override only what you need (recommended)
|
|
120
|
+
export const ApiDocConfig = createApiDocConfig({
|
|
121
|
+
title: "My API",
|
|
122
|
+
version: "1.0.0",
|
|
123
|
+
description: "API documentation for my project",
|
|
124
|
+
contact: { name: "My Team", email: "dev@example.com" },
|
|
125
|
+
servers: {
|
|
126
|
+
development: { url: "http://localhost:3000", description: "Local dev" },
|
|
127
|
+
production: { url: "https://api.example.com", description: "Production" },
|
|
134
128
|
},
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
getAll: 'GET',
|
|
139
|
-
get: 'GET',
|
|
140
|
-
post: 'POST',
|
|
141
|
-
put: 'PUT',
|
|
142
|
-
patch: 'PATCH',
|
|
143
|
-
delete: 'DELETE',
|
|
144
|
-
};
|
|
145
|
-
return map[methodName] || 'GET';
|
|
129
|
+
apiInterfaces: {
|
|
130
|
+
shopApi: { sourceDir: "src/api/shop", basePath: "/api/shop" },
|
|
131
|
+
adminApi: { sourceDir: "src/api/admin", basePath: "/api/admin" },
|
|
146
132
|
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
};
|
|
133
|
+
output: { specFilename: "openapi.json" },
|
|
134
|
+
});
|
|
150
135
|
```
|
|
151
136
|
|
|
152
137
|
### 2. Generate Documentation
|
|
153
138
|
|
|
154
139
|
```typescript
|
|
155
|
-
import { ApiDocGenerator } from
|
|
156
|
-
import { ApiDocConfig } from
|
|
140
|
+
import { ApiDocGenerator } from "@inviton/backduck";
|
|
141
|
+
import { ApiDocConfig } from "./apidoc-config";
|
|
157
142
|
|
|
158
143
|
const result = await ApiDocGenerator.generate({
|
|
159
144
|
config: ApiDocConfig,
|
|
160
145
|
serverDir: __dirname,
|
|
146
|
+
apiType: "shopApi", // optional - defaults to first in apiInterfaces
|
|
161
147
|
verbose: true,
|
|
162
148
|
});
|
|
163
149
|
|
|
164
|
-
console.log(
|
|
150
|
+
console.log(
|
|
151
|
+
`Generated ${result.endpointsCount} endpoints from ${result.controllersCount} controllers`,
|
|
152
|
+
);
|
|
165
153
|
```
|
|
166
154
|
|
|
155
|
+
When using `generate()`, config is set via `ApiDocConfig.configure()` for the duration. You can also call `ApiDocConfig.configure(config)` upfront when using ControllerParser, TypeResolver, etc. directly.
|
|
156
|
+
|
|
167
157
|
## Decorators
|
|
168
158
|
|
|
169
159
|
### @Route(path: string)
|
|
@@ -171,7 +161,7 @@ console.log(`Generated ${result.endpointsCount} endpoints from ${result.controll
|
|
|
171
161
|
Define the base route path for a controller:
|
|
172
162
|
|
|
173
163
|
```typescript
|
|
174
|
-
@Route(
|
|
164
|
+
@Route("/users")
|
|
175
165
|
class UserController extends ControllerBase {
|
|
176
166
|
// Routes will be /users, /users/:id, etc.
|
|
177
167
|
}
|
|
@@ -182,7 +172,7 @@ class UserController extends ControllerBase {
|
|
|
182
172
|
Add middleware to a controller or method:
|
|
183
173
|
|
|
184
174
|
```typescript
|
|
185
|
-
@Route(
|
|
175
|
+
@Route("/admin")
|
|
186
176
|
@Middleware(authMiddleware)
|
|
187
177
|
class AdminController extends ControllerBase {
|
|
188
178
|
// All methods require authentication
|
|
@@ -199,7 +189,7 @@ class AdminController extends ControllerBase {
|
|
|
199
189
|
Custom request argument parsing:
|
|
200
190
|
|
|
201
191
|
```typescript
|
|
202
|
-
@Route(
|
|
192
|
+
@Route("/search")
|
|
203
193
|
class SearchController extends ControllerBase {
|
|
204
194
|
@ParseRequestArgs((req) => ({
|
|
205
195
|
query: req.query.q as string,
|
|
@@ -216,7 +206,7 @@ class SearchController extends ControllerBase {
|
|
|
216
206
|
Set maximum request body size:
|
|
217
207
|
|
|
218
208
|
```typescript
|
|
219
|
-
@Route(
|
|
209
|
+
@Route("/upload")
|
|
220
210
|
@RequestSize(50) // Allow up to 50MB
|
|
221
211
|
class UploadController extends ControllerBase {
|
|
222
212
|
async post(args: { file: Buffer }) {
|
|
@@ -230,13 +220,13 @@ class UploadController extends ControllerBase {
|
|
|
230
220
|
The `RuntimeUtils` class provides helper methods for request parsing:
|
|
231
221
|
|
|
232
222
|
```typescript
|
|
233
|
-
import { RuntimeUtils, type WebRequest } from
|
|
223
|
+
import { RuntimeUtils, type WebRequest } from "@inviton/backduck";
|
|
234
224
|
|
|
235
225
|
// Parse query parameters
|
|
236
|
-
const id = RuntimeUtils.parseQueryNumber(req,
|
|
237
|
-
const tags = RuntimeUtils.parseQueryStringArray(req,
|
|
238
|
-
const active = RuntimeUtils.parseQueryBoolean(req,
|
|
239
|
-
const filters = RuntimeUtils.parseQueryJSON(req,
|
|
226
|
+
const id = RuntimeUtils.parseQueryNumber(req, "id");
|
|
227
|
+
const tags = RuntimeUtils.parseQueryStringArray(req, "tags");
|
|
228
|
+
const active = RuntimeUtils.parseQueryBoolean(req, "active");
|
|
229
|
+
const filters = RuntimeUtils.parseQueryJSON(req, "filters");
|
|
240
230
|
|
|
241
231
|
// Get client IP (handles proxies)
|
|
242
232
|
const ip = RuntimeUtils.getIpAddress(req);
|
|
@@ -246,14 +236,14 @@ const ip = RuntimeUtils.getIpAddress(req);
|
|
|
246
236
|
|
|
247
237
|
Controller methods are automatically mapped to HTTP methods:
|
|
248
238
|
|
|
249
|
-
| Method Name
|
|
250
|
-
|
|
251
|
-
| `getAll()`
|
|
252
|
-
| `get(args)`
|
|
253
|
-
| `post(args)`
|
|
254
|
-
| `put(args)`
|
|
255
|
-
| `patch(args)`
|
|
256
|
-
| `delete(args)` | DELETE
|
|
239
|
+
| Method Name | HTTP Method | Route Pattern | Example |
|
|
240
|
+
| -------------- | ----------- | ------------- | ---------------------- |
|
|
241
|
+
| `getAll()` | GET | `/` | `GET /products` |
|
|
242
|
+
| `get(args)` | GET | `/:id` | `GET /products/123` |
|
|
243
|
+
| `post(args)` | POST | `/` | `POST /products` |
|
|
244
|
+
| `put(args)` | PUT | `/:id` | `PUT /products/123` |
|
|
245
|
+
| `patch(args)` | PATCH | `/:id` | `PATCH /products/123` |
|
|
246
|
+
| `delete(args)` | DELETE | `/:id` | `DELETE /products/123` |
|
|
257
247
|
|
|
258
248
|
Custom method names can be configured via the `ApiDocConfig.getHttpMethod()` function.
|
|
259
249
|
|
|
@@ -262,16 +252,16 @@ Custom method names can be configured via the `ApiDocConfig.getHttpMethod()` fun
|
|
|
262
252
|
Serve static files with automatic compression:
|
|
263
253
|
|
|
264
254
|
```typescript
|
|
265
|
-
import { createServer } from
|
|
255
|
+
import { createServer } from "@inviton/backduck";
|
|
266
256
|
|
|
267
257
|
const server = createServer({
|
|
268
258
|
port: 3000,
|
|
269
|
-
apiRouters: {
|
|
259
|
+
apiRouters: { "/api": router },
|
|
270
260
|
staticFiles: [
|
|
271
261
|
{
|
|
272
|
-
urlPath:
|
|
273
|
-
fsPath:
|
|
274
|
-
cacheControl:
|
|
262
|
+
urlPath: "/assets",
|
|
263
|
+
fsPath: "./public/assets",
|
|
264
|
+
cacheControl: "public, max-age=31536000", // 1 year
|
|
275
265
|
},
|
|
276
266
|
],
|
|
277
267
|
});
|
|
@@ -280,12 +270,12 @@ const server = createServer({
|
|
|
280
270
|
## Runtime Detection
|
|
281
271
|
|
|
282
272
|
```typescript
|
|
283
|
-
import { RUNTIME, IS_BUN } from
|
|
273
|
+
import { RUNTIME, IS_BUN } from "@inviton/backduck";
|
|
284
274
|
|
|
285
275
|
if (IS_BUN) {
|
|
286
|
-
console.log(
|
|
276
|
+
console.log("Running on Bun!");
|
|
287
277
|
} else {
|
|
288
|
-
console.log(
|
|
278
|
+
console.log("Running on Node.js with Express");
|
|
289
279
|
}
|
|
290
280
|
```
|
|
291
281
|
|
|
@@ -2,15 +2,17 @@
|
|
|
2
2
|
* API Documentation Generator
|
|
3
3
|
* Main class for generating OpenAPI and HTML documentation from TypeScript controllers
|
|
4
4
|
*/
|
|
5
|
-
import type {
|
|
5
|
+
import type { IApiDocConfig } from './config';
|
|
6
6
|
/**
|
|
7
7
|
* Options for API documentation generation
|
|
8
8
|
*/
|
|
9
9
|
export interface ApiDocGeneratorOptions {
|
|
10
|
-
/** Configuration
|
|
11
|
-
config:
|
|
10
|
+
/** Configuration - will be set via ApiDocConfig.configure() for the duration of generation */
|
|
11
|
+
config: IApiDocConfig;
|
|
12
12
|
/** Server root directory path */
|
|
13
13
|
serverDir: string;
|
|
14
|
+
/** API type to generate docs for - key from config.apiInterfaces (e.g. 'shopApi', 'adminApi'). Defaults to first available. */
|
|
15
|
+
apiType?: string;
|
|
14
16
|
/** Run in dry-run mode (don't write files) */
|
|
15
17
|
dryRun?: boolean;
|
|
16
18
|
/** Verbose output */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-doc-generator.d.ts","sourceRoot":"","sources":["../../src/apidoc/api-doc-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"api-doc-generator.d.ts","sourceRoot":"","sources":["../../src/apidoc/api-doc-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAc9C;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,8FAA8F;IAC9F,MAAM,EAAE,aAAa,CAAC;IACtB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,+HAA+H;IAC/H,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qBAAqB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iCAAiC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,sCAAsC;IACtC,gBAAgB,EAAE,MAAM,CAAC;IACzB,oCAAoC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,qBAAa,eAAe;IAC3B;;;;OAIG;WACU,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAmLvF,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAsBvC,OAAO,CAAC,MAAM,CAAC,4BAA4B;IAsB3C,OAAO,CAAC,MAAM,CAAC,SAAS;IAMxB,OAAO,CAAC,MAAM,CAAC,YAAY;CAY3B"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* API Documentation Generator
|
|
3
3
|
* Main class for generating OpenAPI and HTML documentation from TypeScript controllers
|
|
4
4
|
*/
|
|
5
|
+
import { ApiDocConfig } from './config';
|
|
5
6
|
import fs from 'node:fs';
|
|
6
7
|
import path from 'node:path';
|
|
7
8
|
import { performance } from 'node:perf_hooks';
|
|
@@ -21,8 +22,10 @@ export class ApiDocGenerator {
|
|
|
21
22
|
*/
|
|
22
23
|
static async generate(options) {
|
|
23
24
|
const startTime = performance.now();
|
|
24
|
-
const { config, serverDir, dryRun = false, verbose = false, openApiOnly = false, htmlOnly = false } = options;
|
|
25
|
-
//
|
|
25
|
+
const { config, serverDir, apiType, dryRun = false, verbose = false, openApiOnly = false, htmlOnly = false } = options;
|
|
26
|
+
// Set static config for all components
|
|
27
|
+
ApiDocConfig.configure(config);
|
|
28
|
+
// Initialize components (they read from ApiDocConfig.getConfig())
|
|
26
29
|
const controllerParser = new ControllerParser(serverDir);
|
|
27
30
|
const typeResolver = new TypeResolver(serverDir);
|
|
28
31
|
const openApiBuilder = new OpenApiBuilder();
|
|
@@ -49,8 +52,8 @@ export class ApiDocGenerator {
|
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
|
-
// Discover controllers
|
|
53
|
-
const controllers = controllerParser.parseAllControllers(
|
|
55
|
+
// Discover controllers (apiType defaults to first from config.apiInterfaces)
|
|
56
|
+
const controllers = controllerParser.parseAllControllers(apiType);
|
|
54
57
|
if (controllers.length === 0) {
|
|
55
58
|
throw new Error('No controllers found');
|
|
56
59
|
}
|
|
@@ -71,9 +74,10 @@ export class ApiDocGenerator {
|
|
|
71
74
|
const htmlEndpoints = [];
|
|
72
75
|
const processedTypes = new Set();
|
|
73
76
|
const typeCache = new Map();
|
|
77
|
+
const defaultBasePath = config.apiInterfaces[apiType ?? Object.keys(config.apiInterfaces)[0]]?.basePath ?? '/api';
|
|
74
78
|
for (const controller of controllers) {
|
|
75
|
-
const endpointInfo = controllerParser.parseEndpoint(controller.className,
|
|
76
|
-
const fullPath = endpointInfo?.fullPath ||
|
|
79
|
+
const endpointInfo = controllerParser.parseEndpoint(controller.className, apiType);
|
|
80
|
+
const fullPath = endpointInfo?.fullPath || `${defaultBasePath}${controller.routePath}`;
|
|
77
81
|
const controllerSourceFile = sourceFileCache.get(controller.filePath);
|
|
78
82
|
for (const method of controller.methods) {
|
|
79
83
|
// Resolve request type schema with caching
|
|
@@ -129,13 +133,14 @@ export class ApiDocGenerator {
|
|
|
129
133
|
}
|
|
130
134
|
// Write files if not dry-run
|
|
131
135
|
if (!dryRun) {
|
|
136
|
+
const cfg = ApiDocConfig.getConfig();
|
|
132
137
|
if (openApiSpec) {
|
|
133
|
-
const swaggerDir =
|
|
138
|
+
const swaggerDir = cfg.getOutputPath(serverDir, 'swagger');
|
|
134
139
|
this.ensureDir(swaggerDir);
|
|
135
|
-
fs.writeFileSync(path.join(swaggerDir,
|
|
140
|
+
fs.writeFileSync(path.join(swaggerDir, cfg.output.specFilename), JSON.stringify(openApiSpec, null, 2));
|
|
136
141
|
}
|
|
137
142
|
if (htmlDoc) {
|
|
138
|
-
const htmlDir =
|
|
143
|
+
const htmlDir = cfg.getOutputPath(serverDir, 'html');
|
|
139
144
|
this.ensureDir(htmlDir);
|
|
140
145
|
this.cleanHtmlDir(htmlDir);
|
|
141
146
|
fs.writeFileSync(path.join(htmlDir, 'index.html'), htmlDoc);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-doc-generator.js","sourceRoot":"","sources":["../../src/apidoc/api-doc-generator.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"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