nestia 3.0.8 → 3.0.9

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 CHANGED
@@ -34,7 +34,6 @@ Ensure type safety | ✅ | ❌ | ❌
34
34
  import api from "@samchon/shopping-api";
35
35
  import { IPage } from "@samchon/shopping-api/lib/structures/IPage";
36
36
  import { ISale } from "@samchon/shopping-api/lib/structures/ISale";
37
- import { ISaleArticleComment } from "@samchon/shopping-api/lib/structures/ISaleArticleComment";
38
37
  import { ISaleQuestion } from "@samchon/shopping-api/lib/structures/ISaleQuestion";
39
38
 
40
39
  export async function trace_sale_question_and_comment
@@ -69,25 +68,12 @@ export async function trace_sale_question_and_comment
69
68
  }
70
69
  );
71
70
  console.log("question", question);
72
-
73
- // WRITE A COMMENT
74
- const comment: ISaleArticleComment = await api.functional.shoppings.sales.comments.store
75
- (
76
- connection,
77
- "general",
78
- sale.id,
79
- question.id,
80
- {
81
- body: "p.s) Can you send me a detailed catalogue?",
82
- anonymous: false
83
- }
84
- );
85
- console.log("comment", comment);
86
71
  }
87
72
  ```
88
73
 
89
74
 
90
75
 
76
+
91
77
  ## Setup
92
78
  Just like any other package, you've got to install it before you can use it.
93
79
 
@@ -133,7 +119,7 @@ Unlike `@nestjs/swagger` which requires the DTO class with decorators, `nestia`
133
119
 
134
120
  Look at the code below, you may see the difference between `nestia` and `@nestjs/swagger`, and thereby catch the meaning of the pure DTO interface.
135
121
 
136
- - Simple [`ISaleArticleComment`](https://github.com/samchon/nestia/tree/master/demo/simple/src/api/structures/ISaleArticleComment.ts)
122
+ - Simple [`ISaleArticleComment`](https://github.com/samchon/nestia/tree/master/demo/safe/src/api/structures/ISaleArticleComment.ts)
137
123
  - Generic interfaces
138
124
  - grandparent interface, [`ISaleArticle<Content>`](https://github.com/samchon/nestia/tree/master/demo/generic/src/api/structures/ISaleArticle.ts)
139
125
  - parent interface, [`ISaleInquiry<Content>`](https://github.com/samchon/nestia/tree/master/demo/generic/src/api/structures/ISaleInquiry.ts)
@@ -141,77 +127,6 @@ Look at the code below, you may see the difference between `nestia` and `@nestjs
141
127
  - 2nd sub-type interface, [`ISaleReview`](https://github.com/samchon/nestia/tree/master/demo/generic/src/api/structures/ISaleReview.ts)
142
128
  - Union alias type [`ISaleEntireArticle`](https://github.com/samchon/nestia/tree/master/demo/union/src/api/structures/ISaleEntireArticle.ts)
143
129
 
144
- > The below example code would be shown by clicking the arrow button or text.
145
-
146
- <details>
147
- <summary>
148
- Traditional DTO class using <code>@nestjs/swagger</code>
149
- </summary>
150
-
151
- ```typescript
152
- export class SaleArticleComment
153
- {
154
- @ApiProperty({
155
- description:
156
- `Comment wrote on a sale related article.
157
-
158
- When an article of a sale has been enrolled, all of the participants like consumers and sellers can write a comment on that article. However, when the writer is a consumer, the consumer can hide its name through the annoymous option.
159
-
160
- Also, writing a reply comment for a specific comment is possible and in that case, the ISaleArticleComment.parent_id property would be activated.`
161
- })
162
- id: number;
163
-
164
- @ApiProperty({
165
- type: "number",
166
- nullable: true,
167
- description:
168
- `Parent comment ID.
169
-
170
- Only When this comment has been written as a reply.`
171
- })
172
- parent_id: number | null;
173
-
174
- @ApiProperty({
175
- type: "string",
176
- description: "Type of the writer."
177
- })
178
- writer_type: "seller" | "consumer";
179
-
180
- @ApiProperty({
181
- type: "string",
182
- nullable: true,
183
- description:
184
- `Name of the writer.
185
-
186
- When this is a type of anonymous comment, writer name would be hidden.`
187
- })
188
- writer_name: string | null;
189
-
190
- @ApiProperty({
191
- type: "array",
192
- items: {
193
- schema: { $ref: getSchemaPath(SaleArticleComment.Content) }
194
- },
195
- description:
196
- `Contents of the comments.
197
-
198
- When the comment writer tries to modify content, it would not modify the comment content but would be accumulated Therefore, all of the people can read how the content has been changed.`
199
- })
200
- contents: SaleArticleComment.Content[];
201
-
202
- @ApiProperty({
203
- description: "Creation time."
204
- })
205
- created_at: string;
206
- }
207
- ```
208
- </details>
209
-
210
- <details>
211
- <summary>
212
- Pure DTO interface using <code>nestia</code>
213
- </summary>
214
-
215
130
  ```typescript
216
131
  /**
217
132
  * Comment wrote on a sale related article.
@@ -265,148 +180,8 @@ export interface ISaleArticleComment
265
180
  */
266
181
  created_at: string;
267
182
  }
268
- export namespace ISaleArticleComment
269
- {
270
- /**
271
- * Store info.
272
- */
273
- export interface IStore
274
- {
275
- /**
276
- * Body of the content.
277
- */
278
- body: string;
279
-
280
- /**
281
- * Whether to hide the writer name or not.
282
- */
283
- annonymous: boolean;
284
- }
285
-
286
- /**
287
- * Content info.
288
- */
289
- export interface IContent
290
- {
291
- /**
292
- * Primary Key.
293
- */
294
- id: string;
295
-
296
- /**
297
- * Body of the content.
298
- */
299
- body: string;
300
-
301
- /**
302
- * Creation time.
303
- */
304
- created_at: string;
305
- }
306
- }
307
183
  ```
308
- </details>
309
184
 
310
- <details>
311
- <summary>
312
- Generic typed DTO using <code>nestia</code>
313
- </summary>
314
-
315
- ```typescript
316
- /**
317
- * Inquiry article.
318
- *
319
- * Sub-type of article and super-type of question and answer.
320
- *
321
- * - List of the sub-types
322
- * - {@link ISaleQuestion}
323
- * - {@link ISaleReview}
324
- *
325
- * @template Content Content type
326
- * @author Jeongho Nam - https://github.com/samchon
327
- */
328
- export interface ISaleInquiry<Content extends ISaleInquiry.IContent>
329
- extends ISaleArticle<Content>
330
- {
331
- /**
332
- * Primary Key.
333
- */
334
- id: number;
335
-
336
- /**
337
- * Name of the writer.
338
- */
339
- writer: string;
340
-
341
- /**
342
- * List of contents.
343
- *
344
- * When the article writer tries to modify content, it would not modify the article
345
- * content but would be accumulated. Therefore, all the people can read how
346
- * the content has been changed.
347
- */
348
- contents: Content[];
349
-
350
- /**
351
- * Creation time.
352
- */
353
- createdAat: string;
354
-
355
- /**
356
- * Formal answer from the seller.
357
- */
358
- answer: ISaleInquiryAnswer | null;
359
- }
360
- export namespace ISaleInquiry
361
- {
362
- /**
363
- * Content info.
364
- */
365
- export interface IContent
366
- {
367
- /**
368
- * Primary Key
369
- */
370
- id: string;
371
-
372
- /**
373
- * Title of the content.
374
- */
375
- title: string;
376
-
377
- /**
378
- * Body of the content.
379
- */
380
- body: string;
381
-
382
- /**
383
- * Attached files.
384
- */
385
- files: IAttachmentFile[];
386
-
387
- /**
388
- * Creation time.
389
- */
390
- createdAt: string;
391
- }
392
- }
393
- ```
394
- </details>
395
-
396
- <details>
397
- <summary>
398
- Union typed DTO using <code>nestia</code>
399
- </summary>
400
-
401
- ```typescript
402
- /**
403
- * Union type of the entire sub-type articles.
404
- *
405
- * @author Jeongho Nam - https://github.com/samchon
406
- */
407
- export type ISaleEntireArtcle = ISaleQuestion | ISaleReview;
408
- ```
409
- </details>
410
185
 
411
186
 
412
187
 
@@ -416,104 +191,57 @@ Controller also can use the generic arguments.
416
191
 
417
192
  In the previous [Pure DTO Interface](#pure-dto-interface) corner, we've learned that `nestia` can use the pure interface type as DTO. Also, we've learned that utilizing generic, union/intersection and even conditional typed interfaces are also possible.
418
193
 
419
- In the Controller case, it's same with the upper DTO story. With `nestia`, defining a generic typed controller class is also possible, too. By defining a generic typed controller class as a super-type class, you can reduce both duplicated code and description comments.
194
+ In the Controller case, it's same with the upper DTO story. With `nestia`, defining a generic typed controller class is also possible, too. By defining a generic typed controller class as a super-type class, you can reduce both duplicated code and description comments.
420
195
 
421
- Look at the below code and feel how powerful `nestia` is. It should be stated that, `@nestjs/swagger` cannot construct such generic or union typed controller class.
196
+ Look at the below code and feel how powerful `nestia` is.
422
197
 
423
- - Simple [`CustomerSaleArticleCommentsController`](https://github.com/samchon/nestia/blob/master/demo/simple/src/controllers/ConsumerSaleArticleCommentsController.ts)
198
+ - Simple [`CustomerSaleArticleCommentsController`](https://github.com/samchon/nestia/blob/master/demo/safe/src/controllers/ConsumerSaleArticleCommentsController.ts)
424
199
  - Generic controllers
425
200
  - abstract controller, [`SaleInquiriesController<Content, Store, Json>`](https://github.com/samchon/nestia/tree/master/demo/generic/src/controllers/SaleInquiriesController.ts)
426
201
  - 1st sub-type controller, [`ConsumerSaleQuestionsController`](https://github.com/samchon/nestia/tree/master/demo/generic/src/controllers/ConsumerSaleQuestionsController.ts)
427
202
  - 2nd sub-type controller, [`ConsumerSaleQuestionsController`](https://github.com/samchon/nestia/tree/master/demo/generic/src/controllers/ConsumerSaleQuestionsController.ts)
428
203
  - Union controller, [`ConsumerSaleEntireArticlesController`](https://github.com/samchon/nestia/tree/master/demo/union/src/controllers/ConsumerSaleEntireArticlesController.ts)
429
204
 
430
- > [typescript-json](https://github.com/samchon/typescript-json) can replace the class-validator with only one line.
431
- >
432
- > ```typescript
433
- > import * as nest from "@nestjs/common";
434
- > import { assert } from "typescript-json";
435
- >
436
- > @nest.Controller("consumers/:section/sales/:saleId/questions")
437
- > export class SaleQuestionsController
438
- > extends SaleInquiriesController<
439
- > ISaleQuestion,
440
- > ISaleQuestion.IContent,
441
- > ISaleQuestion.IStore>
442
- > {
443
- > public constructor()
444
- > {
445
- > super(input => assert(input));
446
- > }
447
- > }
448
- > ```
205
+ Also, you can validate request body data from client automatically, by using [nestia-helper](https://github.com/samchon/nestia-helper) and its `TypedBody()` decorator. Furthermore, `nestia-helper` boosts up JSON string conversion speed about 5x times faster through its `TypedRoute()` component.
449
206
 
450
- ```typescript
451
- import * as express from "express";
452
- import * as nest from "@nestjs/common";
453
- import helper from "nestia-helper";
207
+ ![typescript-json benchmark](https://user-images.githubusercontent.com/13158709/177259933-85a2f19e-01f3-4ac0-a035-a38e0ac38ef5.png)
454
208
 
455
- import { ISaleInquiry } from "@api/structures/ISaleInquiry";
209
+ ```typescript
210
+ import express from "express";
211
+ import { Controller, Param, Request } from "@nestjs/common";
212
+ import { TypedBody, TypedRoute } from "nestia-helper";
456
213
 
457
- export abstract class SaleInquiriesController<
458
- Content extends ISaleInquiry.IContent,
459
- Store extends ISaleInquiry.IStore,
460
- Json extends ISaleInquiry<Content>>
461
- {
462
- /**
463
- * Constructor with type assert function.
464
- */
465
- protected constructor(private readonly assert: (input: Store) => void);
214
+ import { ISaleArticleComment } from "../api/structures/ISaleArticleComment";
466
215
 
216
+ @Controller("consumers/:section/sales/:saleId/articles/:articleId/comments")
217
+ export class ConsumerSaleArticleCommentsController {
467
218
  /**
468
- * Store a new inquiry.
469
- *
470
- * Write a new article inquirying about a sale.
471
- *
472
- * @param request Instance of the Express.Request
473
- * @param section Code of the target section
474
- * @param saleId ID of the target sale
475
- * @param input Content to archive
476
- * @return Newly archived inquiry
477
- *
478
- * @throw 400 bad request error when type of the input data is not valid
479
- * @throw 401 unauthorized error when you've not logged in yet
480
- */
481
- @nest.Post()
482
- public store
483
- (
484
- @nest.Request() request: express.Request,
485
- @helper.TypedParam("section", "string") section: string,
486
- @helper.TypedParam("saleId", "string") saleId: string,
487
- @nest.Body() input: Store
488
- ): Promise<Json>;
489
-
490
- /**
491
- * Update an inquiry.
492
- *
493
- * Update ordinary inquiry article. However, it would not modify the content reocrd
494
- * {@link ISaleInquiry.IContent}, but be accumulated into the {@link ISaleInquiry.contents}.
495
- * Therefore, all of the poeple can read how the content has been changed.
496
- *
219
+ * Store a new comment.
220
+ *
221
+ * Write a comment on a sale article. If you configure the comment to be
222
+ * `anonymous`, only administrator, you and seller of the sale can read
223
+ * the content.
224
+ *
497
225
  * @param request Instance of the Express.Request
498
- * @param section Code of the target section
226
+ * @param sectionCode Code of the target section
499
227
  * @param saleId ID of the target sale
500
- * @param id ID of the target article to be updated
501
- * @param input New content to be overwritten
502
- * @return The newly created content record
503
- *
228
+ * @param articleId ID of the target article
229
+ * @param body Content to write
230
+ * @return Newly archived comment
231
+ *
504
232
  * @throw 400 bad request error when type of the input data is not valid
505
233
  * @throw 401 unauthorized error when you've not logged in yet
506
- * @throw 403 forbidden error when the article is not yours
234
+ * @throw 403 forbidden error when you're a seller and the sale is not yours
235
+ * @throw 404 not found error when unable to find the matched record
507
236
  */
508
- @nest.Put(":id")
509
- public update
510
- (
511
- @nest.Request() request: express.Request,
512
- @helper.TypedParam("section", "string") section: string,
513
- @helper.TypedParam("saleId", "string") saleId: string,
514
- @helper.TypedParam("id", "number") id: number,
515
- @nest.Body() input: Store
516
- ): Promise<Json>;
237
+ @TypedRoute.Post() // 5x faster JSON.stringify()
238
+ public async store(
239
+ @Request() request: express.Request,
240
+ @Param("section") sectionCode: string,
241
+ @Param("saleId") saleId: string,
242
+ @Param("articleId") articleId: string,
243
+ @TypedBody() body: ISaleArticleComment.IStore, // auto validation
244
+ ): Promise<ISaleArticleComment>;
517
245
  }
518
246
  ```
519
247
 
@@ -535,7 +263,7 @@ Route method, path and parameters are well-formed and DTO structures are correct
535
263
 
536
264
  Furthermore, there's not any problem even when a generic typed controller class comes. `nestia` will specialize the generic arguments exactly, by analyzing your `NestJS` server code, in the compilation level.
537
265
 
538
- - [simple/.../comments/index.ts](https://github.com/samchon/nestia/blob/master/demo/simple/src/api/functional/consumers/sales/articles/comments/index.ts)
266
+ - [simple/.../comments/index.ts](https://github.com/samchon/nestia/blob/master/demo/safe/src/api/functional/consumers/sales/articles/comments/index.ts)
539
267
  - [generic/.../questions/index.ts](https://github.com/samchon/nestia/tree/master/demo/generic/src/api/functional/consumers/sales/questions/index.ts)
540
268
  - [generic/.../reviews/index.ts](https://github.com/samchon/nestia/tree/master/demo/generic/src/api/functional/consumers/sales/reviews/index.ts)
541
269
  - [union/.../entire_articles/index.ts](https://github.com/samchon/nestia/tree/master/demo/union/src/api/functional/consumers/sales/entire_articles/index.ts)
@@ -867,22 +595,4 @@ I support template backend project using this `nestia` library, `samchon/backend
867
595
 
868
596
  Reading the README content of the backend template repository, you can find lots of example backend projects who've been generated from the backend. Furthermore, those example projects guide how to generate SDK library from `nestia` and how to distribute the SDK library thorugh the NPM module.
869
597
 
870
- Therefore, if you're planning to compose your own backend project using this `nestia`, I recommend you to create the repository and learn from the `samchon/backend` template project.
871
-
872
- ### Archidraw
873
- https://www.archisketch.com/
874
-
875
- I have special thanks to the Archidraw, where I'm working for.
876
-
877
- The Archidraw is a great IT company developing 3D interior editor and lots of solutions based on the 3D assets. Also, the Archidraw is the first company who had adopted this nestia on their commercial backend project, even this nestia was in the alpha level.
878
-
879
- > 저희 회사 "아키드로우" 에서, 삼촌과 함께 일할 프론트 개발자 분들을, 최고의 대우로 모십니다.
880
- >
881
- > "아키드로우" 는 3D (인테리어) 에디터 및 이에 관한 파생 솔루션들을 만드는 회사입니다. 다만 저희 회사의 주력 제품이 3D 에디터라 하여, 반드시 3D 내지 랜더링에 능숙해야 하는 것은 아니니, 일반적인 프론트 개발자 분들도 망설임없이 지원해주십시오.
882
- >
883
- > 그리고 저희 회사는 분위기가 다들 친하고 즐겁게 지내는 분위기입니다. 더하여 위 `nestia` 나 [typescript-json](https://github.com/samchon/typescript-json) 및 [payments](https://github.com/archidraw/payments) 등, 제법 합리적(?)이고 재미난 프로젝트들을 다양하게 체험해보실 수 있습니다.
884
- >
885
- > - 회사소개서: [archidraw.pdf](https://github.com/archidraw/payments/files/7696710/archidraw.pdf)
886
- > - 기술 스택: React + TypeScript
887
- > - 이력서: 자유 양식
888
- > - 지원처: samchon@archisketch.com
598
+ Therefore, if you're planning to compose your own backend project using this `nestia`, I recommend you to create the repository and learn from the `samchon/backend` template project.
@@ -1,4 +1,5 @@
1
1
  import ts from "typescript";
2
+ import type { StripEnums } from "./utils/StripEnums";
2
3
  /**
3
4
  * Definition for the `nestia.config.ts` file.
4
5
  *
@@ -35,7 +36,7 @@ export interface IConfiguration {
35
36
  * }
36
37
  * ```
37
38
  */
38
- compilerOptions?: ts.CompilerOptions;
39
+ compilerOptions?: StripEnums<ts.CompilerOptions>;
39
40
  /**
40
41
  * Whether to assert parameter types or not.
41
42
  *
@@ -8,14 +8,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
11
22
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
24
  };
14
25
  Object.defineProperty(exports, "__esModule", { value: true });
15
26
  exports.NestiaCommand = void 0;
16
27
  const cli_1 = __importDefault(require("cli"));
17
- const fs_1 = __importDefault(require("fs"));
18
- const jsonc_simple_parser_1 = __importDefault(require("jsonc-simple-parser"));
28
+ const path_1 = __importDefault(require("path"));
29
+ const tsconfck_1 = require("tsconfck");
30
+ const typescript_1 = __importDefault(require("typescript"));
19
31
  const WorkerConnector_1 = require("tgrid/protocols/workers/WorkerConnector");
20
32
  const NestiaApplication_1 = require("../../NestiaApplication");
21
33
  var NestiaCommand;
@@ -66,19 +78,28 @@ var NestiaCommand;
66
78
  function generate(task, include, command, output) {
67
79
  var _a;
68
80
  return __awaiter(this, void 0, void 0, function* () {
69
- // CONFIGRATION
81
+ // CONFIGURATION
70
82
  const config = (_a = (yield get_nestia_config(output.validate))) !== null && _a !== void 0 ? _a : parse_cli(include, command, output);
71
- // CONFIGURATION FROM THE TSCONFIG.JSON
72
- if (fs_1.default.existsSync("tsconfig.json") === true) {
73
- const content = yield fs_1.default.promises.readFile("tsconfig.json", "utf8");
74
- const options = jsonc_simple_parser_1.default.parse(content).compilerOptions;
75
- config.compilerOptions = Object.assign(Object.assign({}, options), (config.compilerOptions || {}));
76
- }
83
+ const options = yield get_typescript_options();
84
+ config.compilerOptions = Object.assign(Object.assign({}, options), (config.compilerOptions || {}));
77
85
  // CALL THE APP.GENERATE()
78
86
  const app = new NestiaApplication_1.NestiaApplication(config);
79
87
  yield task(app);
80
88
  });
81
89
  }
90
+ function get_typescript_options() {
91
+ return __awaiter(this, void 0, void 0, function* () {
92
+ const configFileName = typescript_1.default.findConfigFile(process.cwd(), typescript_1.default.sys.fileExists, "tsconfig.json");
93
+ if (!configFileName)
94
+ return null;
95
+ const { tsconfig } = yield (0, tsconfck_1.parseNative)(configFileName);
96
+ const configFileText = JSON.stringify(tsconfig);
97
+ const { config } = typescript_1.default.parseConfigFileTextToJson(configFileName, configFileText);
98
+ const configParseResult = typescript_1.default.parseJsonConfigFileContent(config, typescript_1.default.sys, path_1.default.dirname(configFileName));
99
+ const _a = configParseResult.raw.compilerOptions, { moduleResolution } = _a, result = __rest(_a, ["moduleResolution"]);
100
+ return result;
101
+ });
102
+ }
82
103
  function get_nestia_config(validate) {
83
104
  return __awaiter(this, void 0, void 0, function* () {
84
105
  const connector = new WorkerConnector_1.WorkerConnector(null, null, "process");
@@ -1 +1 @@
1
- {"version":3,"file":"NestiaCommand.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAAsB;AACtB,4CAAoB;AAEpB,8EAAwC;AACxC,6EAA0E;AAG1E,+DAA4D;AAc5D,IAAiB,aAAa,CAmI7B;AAnID,WAAiB,aAAa;IAC1B,SAAgB,GAAG,CACf,QAAkB,EAClB,OAAgB,IAAI;QAEpB,OAAO,IAAI,CACP,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,EAClB;YACI,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;YACpD,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM;YACrC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAO;SACvC,EACD,QAAQ,EACR,IAAI,CACP,CAAC;IACN,CAAC;IAde,iBAAG,MAclB,CAAA;IAED,SAAgB,OAAO,CACnB,QAAkB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,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QACnC,OAAO,MAAM,CAAC;IAClB,CAAC;AACL,CAAC,EAxJgB,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAwJ7B"}
@@ -54,6 +54,7 @@ var NestiaConfig;
54
54
  runner.register({
55
55
  emit: false,
56
56
  compilerOptions: {
57
+ module: "CommonJS",
57
58
  noEmit: true,
58
59
  },
59
60
  });
@@ -64,13 +65,29 @@ var NestiaConfig;
64
65
  return (input => { ((input, path = "$input") => {
65
66
  const $pred = typescript_json_1.assertType.predicate;
66
67
  const $ao = [
67
- (input, path, exceptionable) => null !== input.input && undefined !== input.input && ("string" === typeof input.input || Array.isArray(input.input) && input.input.every((elem, index5680140860841791) => "string" === typeof elem) || "object" === typeof input.input && null !== input.input && $ao[1](input.input, path + ".input", false && exceptionable)) && $pred(undefined === input.output || "string" === typeof input.output, exceptionable, () => ({
68
+ (input, path, exceptionable) => $pred(null !== input.input && undefined !== input.input && $pred("string" === typeof input.input || Array.isArray(input.input) && input.input.every((elem, index8905304311903555) => $pred("string" === typeof elem, exceptionable, () => ({
69
+ path: path + ".input[" + index8905304311903555 + "]",
70
+ expected: "string",
71
+ value: elem
72
+ }))) || "object" === typeof input.input && null !== input.input && $ao[1](input.input, path + ".input", true && exceptionable), exceptionable, () => ({
73
+ path: path + ".input",
74
+ expected: "(Array<string> | Resolve<IConfiguration.IInput> | string)",
75
+ value: input.input
76
+ })), exceptionable, () => ({
77
+ path: path + ".input",
78
+ expected: "(Array<string> | Resolve<IConfiguration.IInput> | string)",
79
+ value: input.input
80
+ })) && $pred(undefined === input.output || "string" === typeof input.output, exceptionable, () => ({
68
81
  path: path + ".output",
69
82
  expected: "(string | undefined)",
70
83
  value: input.output
71
- })) && $pred(null !== input.compilerOptions && (undefined === input.compilerOptions || "object" === typeof input.compilerOptions && null !== input.compilerOptions && !Array.isArray(input.compilerOptions) && $ao[2](input.compilerOptions, path + ".compilerOptions", true && exceptionable)), exceptionable, () => ({
84
+ })) && $pred(null !== input.compilerOptions && $pred(undefined === input.compilerOptions || "object" === typeof input.compilerOptions && null !== input.compilerOptions && $ao[2](input.compilerOptions, path + ".compilerOptions", true && exceptionable), exceptionable, () => ({
72
85
  path: path + ".compilerOptions",
73
- expected: "(Resolve<ts.CompilerOptions> | undefined)",
86
+ expected: "(Resolve<__type.o1> | undefined)",
87
+ value: input.compilerOptions
88
+ })), exceptionable, () => ({
89
+ path: path + ".compilerOptions",
90
+ expected: "(Resolve<__type.o1> | undefined)",
74
91
  value: input.compilerOptions
75
92
  })) && $pred(undefined === input.assert || "boolean" === typeof input.assert, exceptionable, () => ({
76
93
  path: path + ".assert",
@@ -80,21 +97,25 @@ var NestiaConfig;
80
97
  path: path + ".json",
81
98
  expected: "(boolean | undefined)",
82
99
  value: input.json
83
- })) && $pred(null !== input.swagger && (undefined === input.swagger || "object" === typeof input.swagger && null !== input.swagger && !Array.isArray(input.swagger) && $ao[4](input.swagger, path + ".swagger", true && exceptionable)), exceptionable, () => ({
100
+ })) && $pred(null !== input.swagger && $pred(undefined === input.swagger || "object" === typeof input.swagger && null !== input.swagger && $ao[4](input.swagger, path + ".swagger", true && exceptionable), exceptionable, () => ({
101
+ path: path + ".swagger",
102
+ expected: "(Resolve<IConfiguration.ISwagger> | undefined)",
103
+ value: input.swagger
104
+ })), exceptionable, () => ({
84
105
  path: path + ".swagger",
85
106
  expected: "(Resolve<IConfiguration.ISwagger> | undefined)",
86
107
  value: input.swagger
87
108
  })),
88
- (input, path, exceptionable) => $pred(Array.isArray(input.include) && input.include.every((elem, index5119158810441053) => $pred("string" === typeof elem, exceptionable, () => ({
89
- path: path + ".include[" + index5119158810441053 + "]",
109
+ (input, path, exceptionable) => $pred(Array.isArray(input.include) && input.include.every((elem, index7384897160724899) => $pred("string" === typeof elem, exceptionable, () => ({
110
+ path: path + ".include[" + index7384897160724899 + "]",
90
111
  expected: "string",
91
112
  value: elem
92
113
  }))), exceptionable, () => ({
93
114
  path: path + ".include",
94
115
  expected: "Array<string>",
95
116
  value: input.include
96
- })) && $pred(undefined === input.exclude || Array.isArray(input.exclude) && input.exclude.every((elem, index8252163832746422) => $pred("string" === typeof elem, exceptionable, () => ({
97
- path: path + ".exclude[" + index8252163832746422 + "]",
117
+ })) && $pred(undefined === input.exclude || Array.isArray(input.exclude) && input.exclude.every((elem, index4173984770585202) => $pred("string" === typeof elem, exceptionable, () => ({
118
+ path: path + ".exclude[" + index4173984770585202 + "]",
98
119
  expected: "string",
99
120
  value: elem
100
121
  }))), exceptionable, () => ({
@@ -198,7 +219,7 @@ var NestiaConfig;
198
219
  path: path + ".importHelpers",
199
220
  expected: "(boolean | undefined)",
200
221
  value: input.importHelpers
201
- })) && (undefined === input.importsNotUsedAsValues || 0 === input.importsNotUsedAsValues || 1 === input.importsNotUsedAsValues || 2 === input.importsNotUsedAsValues) && $pred(undefined === input.inlineSourceMap || "boolean" === typeof input.inlineSourceMap, exceptionable, () => ({
222
+ })) && true && $pred(undefined === input.inlineSourceMap || "boolean" === typeof input.inlineSourceMap, exceptionable, () => ({
202
223
  path: path + ".inlineSourceMap",
203
224
  expected: "(boolean | undefined)",
204
225
  value: input.inlineSourceMap
@@ -210,12 +231,12 @@ var NestiaConfig;
210
231
  path: path + ".isolatedModules",
211
232
  expected: "(boolean | undefined)",
212
233
  value: input.isolatedModules
213
- })) && (undefined === input.jsx || 0 === input.jsx || 1 === input.jsx || 2 === input.jsx || 3 === input.jsx || 4 === input.jsx || 5 === input.jsx) && $pred(undefined === input.keyofStringsOnly || "boolean" === typeof input.keyofStringsOnly, exceptionable, () => ({
234
+ })) && true && $pred(undefined === input.keyofStringsOnly || "boolean" === typeof input.keyofStringsOnly, exceptionable, () => ({
214
235
  path: path + ".keyofStringsOnly",
215
236
  expected: "(boolean | undefined)",
216
237
  value: input.keyofStringsOnly
217
- })) && $pred(undefined === input.lib || Array.isArray(input.lib) && input.lib.every((elem, index5582808100859848) => $pred("string" === typeof elem, exceptionable, () => ({
218
- path: path + ".lib[" + index5582808100859848 + "]",
238
+ })) && $pred(undefined === input.lib || Array.isArray(input.lib) && input.lib.every((elem, index5078390044343328) => $pred("string" === typeof elem, exceptionable, () => ({
239
+ path: path + ".lib[" + index5078390044343328 + "]",
219
240
  expected: "string",
220
241
  value: elem
221
242
  }))), exceptionable, () => ({
@@ -230,19 +251,15 @@ var NestiaConfig;
230
251
  path: path + ".mapRoot",
231
252
  expected: "(string | undefined)",
232
253
  value: input.mapRoot
233
- })) && $pred(undefined === input.maxNodeModuleJsDepth || "number" === typeof input.maxNodeModuleJsDepth && Number.isFinite(input.maxNodeModuleJsDepth) && !Number.isNaN(input.maxNodeModuleJsDepth), exceptionable, () => ({
234
- path: path + ".maxNodeModuleJsDepth",
235
- expected: "(number | undefined)",
236
- value: input.maxNodeModuleJsDepth
237
- })) && (undefined === input.module || 0 === input.module || 1 === input.module || 2 === input.module || 3 === input.module || 4 === input.module || 5 === input.module || 6 === input.module || 7 === input.module || 99 === input.module || 100 === input.module || 199 === input.module) && (undefined === input.moduleResolution || 1 === input.moduleResolution || 2 === input.moduleResolution || 3 === input.moduleResolution || 99 === input.moduleResolution) && $pred(undefined === input.moduleSuffixes || Array.isArray(input.moduleSuffixes) && input.moduleSuffixes.every((elem, index03615073343665909) => $pred("string" === typeof elem, exceptionable, () => ({
238
- path: path + ".moduleSuffixes[" + index03615073343665909 + "]",
254
+ })) && true && true && true && $pred(undefined === input.moduleSuffixes || Array.isArray(input.moduleSuffixes) && input.moduleSuffixes.every((elem, index03678189296966594) => $pred("string" === typeof elem, exceptionable, () => ({
255
+ path: path + ".moduleSuffixes[" + index03678189296966594 + "]",
239
256
  expected: "string",
240
257
  value: elem
241
258
  }))), exceptionable, () => ({
242
259
  path: path + ".moduleSuffixes",
243
260
  expected: "(Array<string> | undefined)",
244
261
  value: input.moduleSuffixes
245
- })) && (undefined === input.moduleDetection || 1 === input.moduleDetection || 2 === input.moduleDetection || 3 === input.moduleDetection) && (undefined === input.newLine || 0 === input.newLine || 1 === input.newLine) && $pred(undefined === input.noEmit || "boolean" === typeof input.noEmit, exceptionable, () => ({
262
+ })) && true && true && $pred(undefined === input.noEmit || "boolean" === typeof input.noEmit, exceptionable, () => ({
246
263
  path: path + ".noEmit",
247
264
  expected: "(boolean | undefined)",
248
265
  value: input.noEmit
@@ -322,7 +339,11 @@ var NestiaConfig;
322
339
  path: path + ".outFile",
323
340
  expected: "(string | undefined)",
324
341
  value: input.outFile
325
- })) && $pred(null !== input.paths && (undefined === input.paths || "object" === typeof input.paths && null !== input.paths && !Array.isArray(input.paths) && $ao[3](input.paths, path + ".paths", true && exceptionable)), exceptionable, () => ({
342
+ })) && $pred(null !== input.paths && $pred(undefined === input.paths || "object" === typeof input.paths && null !== input.paths && $ao[3](input.paths, path + ".paths", true && exceptionable), exceptionable, () => ({
343
+ path: path + ".paths",
344
+ expected: "(Resolve<ts.MapLike<Array<string>>> | undefined)",
345
+ value: input.paths
346
+ })), exceptionable, () => ({
326
347
  path: path + ".paths",
327
348
  expected: "(Resolve<ts.MapLike<Array<string>>> | undefined)",
328
349
  value: input.paths
@@ -382,8 +403,8 @@ var NestiaConfig;
382
403
  path: path + ".rootDir",
383
404
  expected: "(string | undefined)",
384
405
  value: input.rootDir
385
- })) && $pred(undefined === input.rootDirs || Array.isArray(input.rootDirs) && input.rootDirs.every((elem, index8341182852797457) => $pred("string" === typeof elem, exceptionable, () => ({
386
- path: path + ".rootDirs[" + index8341182852797457 + "]",
406
+ })) && $pred(undefined === input.rootDirs || Array.isArray(input.rootDirs) && input.rootDirs.every((elem, index12326295156772415) => $pred("string" === typeof elem, exceptionable, () => ({
407
+ path: path + ".rootDirs[" + index12326295156772415 + "]",
387
408
  expected: "string",
388
409
  value: elem
389
410
  }))), exceptionable, () => ({
@@ -438,7 +459,7 @@ var NestiaConfig;
438
459
  path: path + ".suppressImplicitAnyIndexErrors",
439
460
  expected: "(boolean | undefined)",
440
461
  value: input.suppressImplicitAnyIndexErrors
441
- })) && (undefined === input.target || 0 === input.target || 1 === input.target || 2 === input.target || 3 === input.target || 4 === input.target || 5 === input.target || 6 === input.target || 7 === input.target || 8 === input.target || 9 === input.target || 99 === input.target || 100 === input.target) && $pred(undefined === input.traceResolution || "boolean" === typeof input.traceResolution, exceptionable, () => ({
462
+ })) && true && $pred(undefined === input.traceResolution || "boolean" === typeof input.traceResolution, exceptionable, () => ({
442
463
  path: path + ".traceResolution",
443
464
  expected: "(boolean | undefined)",
444
465
  value: input.traceResolution
@@ -450,16 +471,16 @@ var NestiaConfig;
450
471
  path: path + ".resolveJsonModule",
451
472
  expected: "(boolean | undefined)",
452
473
  value: input.resolveJsonModule
453
- })) && $pred(undefined === input.types || Array.isArray(input.types) && input.types.every((elem, index11373910393653719) => $pred("string" === typeof elem, exceptionable, () => ({
454
- path: path + ".types[" + index11373910393653719 + "]",
474
+ })) && $pred(undefined === input.types || Array.isArray(input.types) && input.types.every((elem, index9597464666391768) => $pred("string" === typeof elem, exceptionable, () => ({
475
+ path: path + ".types[" + index9597464666391768 + "]",
455
476
  expected: "string",
456
477
  value: elem
457
478
  }))), exceptionable, () => ({
458
479
  path: path + ".types",
459
480
  expected: "(Array<string> | undefined)",
460
481
  value: input.types
461
- })) && $pred(undefined === input.typeRoots || Array.isArray(input.typeRoots) && input.typeRoots.every((elem, index7765679426293803) => $pred("string" === typeof elem, exceptionable, () => ({
462
- path: path + ".typeRoots[" + index7765679426293803 + "]",
482
+ })) && $pred(undefined === input.typeRoots || Array.isArray(input.typeRoots) && input.typeRoots.every((elem, index4853841767136293) => $pred("string" === typeof elem, exceptionable, () => ({
483
+ path: path + ".typeRoots[" + index4853841767136293 + "]",
463
484
  expected: "string",
464
485
  value: elem
465
486
  }))), exceptionable, () => ({
@@ -482,7 +503,7 @@ var NestiaConfig;
482
503
  value: input.output
483
504
  }))
484
505
  ];
485
- return $pred(null !== input && $pred("object" === typeof input && null !== input && !Array.isArray(input) && $ao[0](input, path + "", true), true, () => ({
506
+ return $pred(null !== input && $pred("object" === typeof input && null !== input && $ao[0](input, path + "", true), true, () => ({
486
507
  path: path + "",
487
508
  expected: "Resolve<__type>",
488
509
  value: input
@@ -1 +1 @@
1
- {"version":3,"file":"NestiaConfig.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,gDAAkC;AAClC,mDAA2C;AAC3C,qDAAkD;AAClD,qDAA6C;AAI7C,IAAiB,YAAY,CAyB5B;AAzBD,WAAiB,YAAY;IACzB,SAAgB,GAAG;QACf,OAAO,SAAS,CAAC,GAAG,EAAE,CAAC;IAC3B,CAAC;IAFe,gBAAG,MAElB,CAAA;IAED,MAAM,SAAS,GAAG,IAAI,qBAAS,CAAC,GAAS,EAAE;QACvC,IAAI,YAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,KAAK,KAAK;YAAE,OAAO,IAAI,CAAC;QAE7D,MAAM,CAAC,QAAQ,CAAC;YACZ,IAAI,EAAE,KAAK;YACX,eAAe,EAAE;gBACb,MAAM,EAAE,IAAI;aACf;SACJ,CAAC,CAAC;QAEH,MAAM,MAAM,GACR,wDAAa,cAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,GAAC,CAAC;QACnD,IAAI,OAAO,MAAM,KAAK,QAAQ;YAC1B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QAExE,MAAM,MAAM,GACR,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;QAEjE;0BAAO,4BAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAI,OAAO,MAAM,KAAK,QAAQ;YAC1B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QAExE,MAAM,MAAM,GACR,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;QAEjE;0BAAO,4BAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAAC,0BAAS,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;IAC/C,CAAC,CAAA,CAAC,CAAC;AACP,CAAC,EA1BgB,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QA0B5B"}
File without changes
@@ -0,0 +1,3 @@
1
+ export declare type StripEnums<T extends Record<string, any>> = {
2
+ [Key in keyof T]: T[Key] extends string | boolean | object | undefined | any[] ? T[Key] : any;
3
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=StripEnums.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StripEnums.js","sourceRoot":"","sources":["../../src/utils/StripEnums.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestia",
3
- "version": "3.0.8",
3
+ "version": "3.0.9",
4
4
  "description": "Automatic SDK and Document generator for the NestJS",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -12,7 +12,7 @@
12
12
  "dev": "npm run build -- --watch",
13
13
  "eslint": "eslint src",
14
14
  "eslint:fix": "eslint src --fix",
15
- "prettier": "prettier src --write",
15
+ "prettier": "prettier --write ./**/*.ts",
16
16
  "test": "node lib/test"
17
17
  },
18
18
  "repository": {
@@ -37,12 +37,11 @@
37
37
  "cli": "^1.0.1",
38
38
  "del": "^6.0.0",
39
39
  "glob": "^7.2.0",
40
- "jsonc-simple-parser": "^2.2.1",
41
40
  "nestia-fetcher": "^2.0.1",
42
41
  "tgrid": "^0.8.6",
43
- "ts-node": "10.8.x",
44
42
  "tsconfig-paths": "^4.0.0",
45
- "tstl": "^2.5.6"
43
+ "tsconfck": "^2.0.1",
44
+ "tstl": "^2.5.7"
46
45
  },
47
46
  "devDependencies": {
48
47
  "@types/cli": "^0.11.19",
@@ -52,12 +51,13 @@
52
51
  "@typescript-eslint/eslint-plugin": "^5.26.0",
53
52
  "@typescript-eslint/parser": "^5.26.0",
54
53
  "eslint": "^8.16.0",
55
- "nestia-helper": "^3.0.5",
54
+ "nestia-helper": "^3.0.7",
56
55
  "prettier": "^2.6.2",
57
56
  "rimraf": "^3.0.2",
58
- "ttypescript": "^1.5.",
57
+ "ts-node": "10.8.x",
58
+ "ttypescript": "^1.5.13",
59
59
  "typescript": "^4.7.4",
60
- "typescript-json": "^3.0.10",
60
+ "typescript-json": "^3.1.1",
61
61
  "typescript-transform-paths": "^3.3.1"
62
62
  }
63
63
  }