@nestia/migrate 14.0.1 → 14.0.2
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/lib/NestiaMigrateApplication.d.ts +111 -0
- package/lib/NestiaMigrateApplication.js +148 -9
- package/lib/NestiaMigrateApplication.js.map +1 -1
- package/lib/NestiaMigrateApplication.mjs +147 -5
- package/lib/analyzers/NestiaMigrateControllerAnalyzer.d.ts +45 -0
- package/lib/analyzers/NestiaMigrateControllerAnalyzer.js +59 -3
- package/lib/analyzers/NestiaMigrateControllerAnalyzer.js.map +1 -1
- package/lib/analyzers/NestiaMigrateControllerAnalyzer.mjs +9 -3
- package/lib/archivers/NestiaMigrateFileArchiver.d.ts +34 -0
- package/lib/archivers/NestiaMigrateFileArchiver.js +34 -0
- package/lib/archivers/NestiaMigrateFileArchiver.js.map +1 -1
- package/lib/bundles/NEST_TEMPLATE.js +1 -1
- package/lib/bundles/NEST_TEMPLATE.mjs +1 -1
- package/lib/bundles/SDK_TEMPLATE.js +1 -1
- package/lib/bundles/SDK_TEMPLATE.mjs +1 -1
- package/lib/executable/NestiaMigrateCommander.d.ts +36 -0
- package/lib/executable/NestiaMigrateCommander.js +38 -0
- package/lib/executable/NestiaMigrateCommander.js.map +1 -1
- package/lib/executable/NestiaMigrateCommander.mjs +3 -1
- package/lib/executable/NestiaMigrateInquirer.d.ts +29 -0
- package/lib/executable/NestiaMigrateInquirer.js +20 -0
- package/lib/executable/NestiaMigrateInquirer.js.map +1 -1
- package/lib/factories/ExpressionFactory.d.ts +14 -0
- package/lib/factories/ExpressionFactory.js +14 -0
- package/lib/factories/ExpressionFactory.js.map +1 -1
- package/lib/factories/IdentifierFactory.d.ts +20 -0
- package/lib/factories/IdentifierFactory.js +20 -0
- package/lib/factories/IdentifierFactory.js.map +1 -1
- package/lib/factories/LiteralFactory.d.ts +18 -2
- package/lib/factories/LiteralFactory.js +18 -2
- package/lib/factories/LiteralFactory.js.map +1 -1
- package/lib/factories/StatementFactory.d.ts +26 -1
- package/lib/factories/StatementFactory.js +26 -1
- package/lib/factories/StatementFactory.js.map +1 -1
- package/lib/factories/SupportedStringFormats.d.ts +6 -0
- package/lib/factories/SupportedStringFormats.js +33 -0
- package/lib/factories/SupportedStringFormats.js.map +1 -0
- package/lib/factories/SupportedStringFormats.mjs +34 -0
- package/lib/factories/SupportedStringFormats.mjs.map +1 -0
- package/lib/factories/TypeFactory.d.ts +21 -0
- package/lib/factories/TypeFactory.js +13 -0
- package/lib/factories/TypeFactory.js.map +1 -1
- package/lib/factories/TypeLiteralFactory.d.ts +18 -0
- package/lib/factories/TypeLiteralFactory.js +18 -0
- package/lib/factories/TypeLiteralFactory.js.map +1 -1
- package/lib/internal/ts.d.ts +153 -0
- package/lib/internal/ts.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiFileProgrammer.d.ts +31 -0
- package/lib/programmers/NestiaMigrateApiFileProgrammer.js +17 -0
- package/lib/programmers/NestiaMigrateApiFileProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer.d.ts +40 -0
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer.js +27 -0
- package/lib/programmers/NestiaMigrateApiFunctionProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.d.ts +39 -0
- package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.js +26 -0
- package/lib/programmers/NestiaMigrateApiNamespaceProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiProgrammer.d.ts +18 -0
- package/lib/programmers/NestiaMigrateApiProgrammer.js +18 -0
- package/lib/programmers/NestiaMigrateApiProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiProgrammer.mjs +1 -1
- package/lib/programmers/NestiaMigrateApiSimulationProgrammer.d.ts +40 -0
- package/lib/programmers/NestiaMigrateApiSimulationProgrammer.js +27 -0
- package/lib/programmers/NestiaMigrateApiSimulationProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiStartProgrammer.d.ts +17 -0
- package/lib/programmers/NestiaMigrateApiStartProgrammer.js +19 -8
- package/lib/programmers/NestiaMigrateApiStartProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateApiStartProgrammer.mjs +1 -6
- package/lib/programmers/NestiaMigrateDtoProgrammer.d.ts +30 -0
- package/lib/programmers/NestiaMigrateDtoProgrammer.js +17 -0
- package/lib/programmers/NestiaMigrateDtoProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateE2eFileProgrammer.d.ts +39 -0
- package/lib/programmers/NestiaMigrateE2eFileProgrammer.js +26 -0
- package/lib/programmers/NestiaMigrateE2eFileProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateE2eProgrammer.d.ts +16 -0
- package/lib/programmers/NestiaMigrateE2eProgrammer.js +16 -0
- package/lib/programmers/NestiaMigrateE2eProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateImportProgrammer.d.ts +75 -0
- package/lib/programmers/NestiaMigrateImportProgrammer.js +58 -3
- package/lib/programmers/NestiaMigrateImportProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateImportProgrammer.mjs +58 -3
- package/lib/programmers/NestiaMigrateNestControllerProgrammer.d.ts +28 -0
- package/lib/programmers/NestiaMigrateNestControllerProgrammer.js +16 -0
- package/lib/programmers/NestiaMigrateNestControllerProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateNestMethodProgrammer.d.ts +30 -0
- package/lib/programmers/NestiaMigrateNestMethodProgrammer.js +16 -0
- package/lib/programmers/NestiaMigrateNestMethodProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateNestModuleProgrammer.d.ts +16 -0
- package/lib/programmers/NestiaMigrateNestModuleProgrammer.js +16 -0
- package/lib/programmers/NestiaMigrateNestModuleProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateNestProgrammer.d.ts +17 -0
- package/lib/programmers/NestiaMigrateNestProgrammer.js +17 -0
- package/lib/programmers/NestiaMigrateNestProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateSchemaProgrammer.d.ts +16 -0
- package/lib/programmers/NestiaMigrateSchemaProgrammer.js +20 -5
- package/lib/programmers/NestiaMigrateSchemaProgrammer.js.map +1 -1
- package/lib/programmers/NestiaMigrateSchemaProgrammer.mjs +4 -4
- package/lib/structures/INestiaMigrateConfig.d.ts +21 -0
- package/lib/structures/INestiaMigrateContext.d.ts +15 -0
- package/lib/structures/INestiaMigrateController.d.ts +13 -0
- package/lib/structures/INestiaMigrateFile.d.ts +11 -0
- package/lib/utils/FilePrinter.d.ts +33 -0
- package/lib/utils/FilePrinter.js +33 -0
- package/lib/utils/FilePrinter.js.map +1 -1
- package/lib/utils/MapUtil.d.ts +17 -0
- package/lib/utils/MapUtil.js +19 -3
- package/lib/utils/MapUtil.js.map +1 -1
- package/lib/utils/MapUtil.mjs +1 -2
- package/lib/utils/PathTemplate.d.ts +23 -1
- package/lib/utils/PathTemplate.js +15 -1
- package/lib/utils/PathTemplate.js.map +1 -1
- package/lib/utils/RequestBody.d.ts +13 -0
- package/lib/utils/RequestBody.js +13 -0
- package/lib/utils/RequestBody.js.map +1 -1
- package/lib/utils/StringUtil.d.ts +55 -0
- package/lib/utils/StringUtil.js +93 -8
- package/lib/utils/StringUtil.js.map +1 -1
- package/lib/utils/StringUtil.mjs +30 -8
- package/lib/utils/SuccessStatus.d.ts +21 -1
- package/lib/utils/SuccessStatus.js +21 -1
- package/lib/utils/SuccessStatus.js.map +1 -1
- package/package.json +4 -3
- package/src/NestiaMigrateApplication.ts +151 -13
- package/src/analyzers/NestiaMigrateControllerAnalyzer.ts +59 -4
- package/src/archivers/NestiaMigrateFileArchiver.ts +34 -0
- package/src/bundles/NEST_TEMPLATE.ts +1 -1
- package/src/bundles/SDK_TEMPLATE.ts +1 -1
- package/src/executable/NestiaMigrateCommander.ts +40 -0
- package/src/executable/NestiaMigrateInquirer.ts +29 -0
- package/src/factories/ExpressionFactory.ts +14 -0
- package/src/factories/IdentifierFactory.ts +20 -0
- package/src/factories/LiteralFactory.ts +18 -2
- package/src/factories/StatementFactory.ts +26 -1
- package/src/factories/SupportedStringFormats.ts +29 -0
- package/src/factories/TypeFactory.ts +21 -0
- package/src/factories/TypeLiteralFactory.ts +18 -0
- package/src/internal/ts.ts +153 -0
- package/src/programmers/NestiaMigrateApiFileProgrammer.ts +35 -0
- package/src/programmers/NestiaMigrateApiFunctionProgrammer.ts +43 -0
- package/src/programmers/NestiaMigrateApiNamespaceProgrammer.ts +42 -0
- package/src/programmers/NestiaMigrateApiProgrammer.ts +18 -0
- package/src/programmers/NestiaMigrateApiSimulationProgrammer.ts +43 -0
- package/src/programmers/NestiaMigrateApiStartProgrammer.ts +19 -10
- package/src/programmers/NestiaMigrateDtoProgrammer.ts +33 -0
- package/src/programmers/NestiaMigrateE2eFileProgrammer.ts +42 -0
- package/src/programmers/NestiaMigrateE2eProgrammer.ts +16 -0
- package/src/programmers/NestiaMigrateImportProgrammer.ts +86 -5
- package/src/programmers/NestiaMigrateNestControllerProgrammer.ts +30 -0
- package/src/programmers/NestiaMigrateNestMethodProgrammer.ts +34 -0
- package/src/programmers/NestiaMigrateNestModuleProgrammer.ts +16 -0
- package/src/programmers/NestiaMigrateNestProgrammer.ts +17 -0
- package/src/programmers/NestiaMigrateSchemaProgrammer.ts +25 -8
- package/src/structures/INestiaMigrateConfig.ts +26 -0
- package/src/structures/INestiaMigrateContext.ts +17 -0
- package/src/structures/INestiaMigrateController.ts +16 -0
- package/src/structures/INestiaMigrateFile.ts +13 -0
- package/src/utils/FilePrinter.ts +33 -0
- package/src/utils/MapUtil.ts +18 -2
- package/src/utils/PathTemplate.ts +23 -1
- package/src/utils/RequestBody.ts +13 -0
- package/src/utils/StringUtil.ts +101 -9
- package/src/utils/SuccessStatus.ts +21 -1
- package/lib/factories/FormatCheatSheet.d.ts +0 -25
- package/lib/factories/FormatCheatSheet.js +0 -34
- package/lib/factories/FormatCheatSheet.js.map +0 -1
- package/lib/factories/FormatCheatSheet.mjs +0 -31
- package/lib/factories/FormatCheatSheet.mjs.map +0 -1
- package/src/factories/FormatCheatSheet.ts +0 -71
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateApiProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateApiProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAA+D;AAC/D,+BAAqC;AAIrC,sDAAmD;AACnD,qFAAkF;AAClF,6EAA0E;AAC1E,mFAAgF;AAEhF,IAAiB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"NestiaMigrateApiProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateApiProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAA+D;AAC/D,+BAAqC;AAIrC,sDAAmD;AACnD,qFAAkF;AAClF,6EAA0E;AAC1E,mFAAgF;AAEhF;;;;;;;;GAQG;AACH,IAAiB,0BAA0B,CAiH1C;AAjHD,WAAiB,0BAA0B;IACzC;;;;;;;;OAQG;IACU,gCAAK,GAAG,CAAC,GAA0B,EAA0B,EAAE;QAC1E,MAAM,IAAI,GACR,IAAI,cAAO,CACT,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,WAAI,EAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EACxB,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAC/D,CAAC;QACJ,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;YACnB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,UAAU,EAAE,GAAG,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,UAAU;YACjD,SAAS,EAAE,EAAE;YACb,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,IA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0B,GAA1B,0BAA0B,QAiH1C"}
|
|
@@ -2,8 +2,8 @@ import { FilePrinter } from "../utils/FilePrinter.mjs";
|
|
|
2
2
|
import { NestiaMigrateImportProgrammer } from "./NestiaMigrateImportProgrammer.mjs";
|
|
3
3
|
import { NestiaMigrateApiFileProgrammer } from "./NestiaMigrateApiFileProgrammer.mjs";
|
|
4
4
|
import { NestiaMigrateDtoProgrammer } from "./NestiaMigrateDtoProgrammer.mjs";
|
|
5
|
-
import { NodeFlags, SyntaxKind, factory } from "@ttsc/factory";
|
|
6
5
|
import { HashMap, hash } from "tstl";
|
|
6
|
+
import { NodeFlags, SyntaxKind, factory } from "@ttsc/factory";
|
|
7
7
|
//#region src/programmers/NestiaMigrateApiProgrammer.ts
|
|
8
8
|
let NestiaMigrateApiProgrammer;
|
|
9
9
|
(function(_NestiaMigrateApiProgrammer) {
|
|
@@ -3,13 +3,53 @@ import { OpenApi } from "typia";
|
|
|
3
3
|
import ts from "../internal/ts";
|
|
4
4
|
import { INestiaMigrateConfig } from "../structures/INestiaMigrateConfig";
|
|
5
5
|
import { NestiaMigrateImportProgrammer } from "./NestiaMigrateImportProgrammer";
|
|
6
|
+
/**
|
|
7
|
+
* Generates the mockup simulator members of a route: a random response and a
|
|
8
|
+
* simulate function that validates the request first.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation The random member calls `typia.random` for the response type, and the simulate function validates the parameters, query, body, and headers with `typia.assert` through the fetcher's simulator, so an invalid simulated request throws the error the real server answers.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design Two public functions and one private assertion writer.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The simulation follows the schemas of the route.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
14
|
+
*/
|
|
6
15
|
export declare namespace NestiaMigrateApiSimulationProgrammer {
|
|
16
|
+
/**
|
|
17
|
+
* The input of the simulation members: the configuration, the components, the
|
|
18
|
+
* importer, and the route.
|
|
19
|
+
*
|
|
20
|
+
* @evidence contracts/common.md#principled-implementation The record holds exactly what the generation needs.
|
|
21
|
+
* @evidence contracts/common.md#clear-and-simple-design A flat record.
|
|
22
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
23
|
+
* @evidence contracts/common.md#meaningful-documentation The comment lists the fields.
|
|
24
|
+
*/
|
|
7
25
|
interface IContext {
|
|
26
|
+
/** Calling convention and optional generated features for this operation. */
|
|
8
27
|
config: INestiaMigrateConfig;
|
|
28
|
+
/** Component schemas used to resolve DTO references. */
|
|
9
29
|
components: OpenApi.IComponents;
|
|
30
|
+
/** File-local import collector shared with the surrounding file writer. */
|
|
10
31
|
importer: NestiaMigrateImportProgrammer;
|
|
32
|
+
/** Analyzed operation, with the accessor chosen for this generation. */
|
|
11
33
|
route: IHttpMigrateRoute;
|
|
12
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Returns the `random` constant: a function that returns a random value of
|
|
37
|
+
* the response type.
|
|
38
|
+
*
|
|
39
|
+
* @evidence contracts/common.md#principled-implementation The response schema is written as a type and given to `typia.random`, and a route without a response uses `void`.
|
|
40
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression.
|
|
41
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The value is produced by typia at run time.
|
|
42
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
43
|
+
*/
|
|
13
44
|
const random: (ctx: IContext) => import("@ttsc/factory").VariableStatement;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the `simulate` constant: a function with the route's parameters
|
|
47
|
+
* that validates the request and returns a random response.
|
|
48
|
+
*
|
|
49
|
+
* @evidence contracts/common.md#principled-implementation The parameters are those of the real function, the assertions run first, and an unused connection is renamed so the compiler does not report it.
|
|
50
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression over the shared parameter builder.
|
|
51
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The validation is generated from the same schemas as the real function's types.
|
|
52
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
53
|
+
*/
|
|
14
54
|
const simulate: (ctx: IContext) => ts.VariableStatement;
|
|
15
55
|
}
|
|
@@ -8,8 +8,26 @@ const TypeFactory_1 = require("../factories/TypeFactory");
|
|
|
8
8
|
const NestiaMigrateApiFunctionProgrammer_1 = require("./NestiaMigrateApiFunctionProgrammer");
|
|
9
9
|
const NestiaMigrateApiNamespaceProgrammer_1 = require("./NestiaMigrateApiNamespaceProgrammer");
|
|
10
10
|
const NestiaMigrateSchemaProgrammer_1 = require("./NestiaMigrateSchemaProgrammer");
|
|
11
|
+
/**
|
|
12
|
+
* Generates the mockup simulator members of a route: a random response and a
|
|
13
|
+
* simulate function that validates the request first.
|
|
14
|
+
*
|
|
15
|
+
* @evidence contracts/common.md#principled-implementation The random member calls `typia.random` for the response type, and the simulate function validates the parameters, query, body, and headers with `typia.assert` through the fetcher's simulator, so an invalid simulated request throws the error the real server answers.
|
|
16
|
+
* @evidence contracts/common.md#clear-and-simple-design Two public functions and one private assertion writer.
|
|
17
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The simulation follows the schemas of the route.
|
|
18
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
19
|
+
*/
|
|
11
20
|
var NestiaMigrateApiSimulationProgrammer;
|
|
12
21
|
(function (NestiaMigrateApiSimulationProgrammer) {
|
|
22
|
+
/**
|
|
23
|
+
* Returns the `random` constant: a function that returns a random value of
|
|
24
|
+
* the response type.
|
|
25
|
+
*
|
|
26
|
+
* @evidence contracts/common.md#principled-implementation The response schema is written as a type and given to `typia.random`, and a route without a response uses `void`.
|
|
27
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression.
|
|
28
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The value is produced by typia at run time.
|
|
29
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
30
|
+
*/
|
|
13
31
|
NestiaMigrateApiSimulationProgrammer.random = (ctx) => {
|
|
14
32
|
const output = ctx.route.success
|
|
15
33
|
? NestiaMigrateSchemaProgrammer_1.NestiaMigrateSchemaProgrammer.write({
|
|
@@ -24,6 +42,15 @@ var NestiaMigrateApiSimulationProgrammer;
|
|
|
24
42
|
name: "typia",
|
|
25
43
|
})), "random"), [output], undefined)));
|
|
26
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Returns the `simulate` constant: a function with the route's parameters
|
|
47
|
+
* that validates the request and returns a random response.
|
|
48
|
+
*
|
|
49
|
+
* @evidence contracts/common.md#principled-implementation The parameters are those of the real function, the assertions run first, and an unused connection is renamed so the compiler does not report it.
|
|
50
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression over the shared parameter builder.
|
|
51
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The validation is generated from the same schemas as the real function's types.
|
|
52
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
53
|
+
*/
|
|
27
54
|
NestiaMigrateApiSimulationProgrammer.simulate = (ctx) => {
|
|
28
55
|
const caller = () => factory_1.factory.createCallExpression(factory_1.factory.createIdentifier("random"), undefined, undefined);
|
|
29
56
|
return constant("simulate", factory_1.factory.createArrowFunction(undefined, undefined, NestiaMigrateApiFunctionProgrammer_1.NestiaMigrateApiFunctionProgrammer.writeParameterDeclarations(ctx, ctx.route.parameters.length === 0 &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateApiSimulationProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateApiSimulationProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAA+D;AAI/D,sEAAmE;AACnE,oEAAiE;AACjE,0DAAuD;AAGvD,6FAA0F;AAC1F,+FAA4F;AAE5F,mFAAgF;AAEhF,IAAiB,oCAAoC,
|
|
1
|
+
{"version":3,"file":"NestiaMigrateApiSimulationProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateApiSimulationProgrammer.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,QAAQ,GAAG,CAAC,IAAY,EAAE,UAAyB,EAAE,EAAE,CAC3D,iBAAO,CAAC,uBAAuB,CAC7B,CAAC,iBAAO,CAAC,cAAc,CAAC,oBAAU,CAAC,aAAa,CAAC,CAAC,EAClD,iBAAO,CAAC,6BAA6B,CACnC;IACE,iBAAO,CAAC,yBAAyB,CAC/B,iBAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAC9B,SAAS,EACT,SAAS,EACT,UAAU,CACX;CACF,EACD,mBAAS,CAAC,KAAK,CAChB,CACF,CAAC"}
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
import { INestiaMigrateContext } from "../structures/INestiaMigrateContext";
|
|
2
|
+
/**
|
|
3
|
+
* Generates the `test/start.ts` of an SDK project: a small program that calls
|
|
4
|
+
* one API function.
|
|
5
|
+
*
|
|
6
|
+
* @evidence contracts/common.md#principled-implementation The program builds a connection from the global test settings and the first server of the document, adds the simulate flag when requested, and calls the first route the way the generated e2e tests do, so one command can check that the SDK and a server agree.
|
|
7
|
+
* @evidence contracts/common.md#clear-and-simple-design One entry function and private helpers for the connection, the main function, and the starter.
|
|
8
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The route is the first one, so the same document always generates the same file.
|
|
9
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
10
|
+
*/
|
|
2
11
|
export declare namespace NestiaMigrateApiStartProgrammer {
|
|
12
|
+
/**
|
|
13
|
+
* Returns the `test/start.ts` file of an SDK project.
|
|
14
|
+
*
|
|
15
|
+
* @evidence contracts/common.md#principled-implementation The file imports what the body uses, defines `main`, and starts it, exiting with a failure status when it rejects.
|
|
16
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
17
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The content derives from the document.
|
|
18
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
19
|
+
*/
|
|
3
20
|
const write: (context: INestiaMigrateContext) => Record<string, string>;
|
|
4
21
|
}
|
|
@@ -7,11 +7,29 @@ const StatementFactory_1 = require("../factories/StatementFactory");
|
|
|
7
7
|
const FilePrinter_1 = require("../utils/FilePrinter");
|
|
8
8
|
const NestiaMigrateE2eFileProgrammer_1 = require("./NestiaMigrateE2eFileProgrammer");
|
|
9
9
|
const NestiaMigrateImportProgrammer_1 = require("./NestiaMigrateImportProgrammer");
|
|
10
|
+
/**
|
|
11
|
+
* Generates the `test/start.ts` of an SDK project: a small program that calls
|
|
12
|
+
* one API function.
|
|
13
|
+
*
|
|
14
|
+
* @evidence contracts/common.md#principled-implementation The program builds a connection from the global test settings and the first server of the document, adds the simulate flag when requested, and calls the first route the way the generated e2e tests do, so one command can check that the SDK and a server agree.
|
|
15
|
+
* @evidence contracts/common.md#clear-and-simple-design One entry function and private helpers for the connection, the main function, and the starter.
|
|
16
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The route is the first one, so the same document always generates the same file.
|
|
17
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
18
|
+
*/
|
|
10
19
|
var NestiaMigrateApiStartProgrammer;
|
|
11
20
|
(function (NestiaMigrateApiStartProgrammer) {
|
|
21
|
+
/**
|
|
22
|
+
* Returns the `test/start.ts` file of an SDK project.
|
|
23
|
+
*
|
|
24
|
+
* @evidence contracts/common.md#principled-implementation The file imports what the body uses, defines `main`, and starts it, exiting with a failure status when it rejects.
|
|
25
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
26
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The content derives from the document.
|
|
27
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
28
|
+
*/
|
|
12
29
|
NestiaMigrateApiStartProgrammer.write = (context) => {
|
|
13
30
|
const importer = new NestiaMigrateImportProgrammer_1.NestiaMigrateImportProgrammer();
|
|
14
|
-
|
|
31
|
+
// the first route, so the same document always generates the same file
|
|
32
|
+
const route = context.application.routes[0];
|
|
15
33
|
const main = writeMain(context, importer, route);
|
|
16
34
|
const statements = [
|
|
17
35
|
...importer.toStatements((name) => `@ORGANIZATION/PROJECT-api/lib/structures/${name}`),
|
|
@@ -75,11 +93,4 @@ var NestiaMigrateApiStartProgrammer;
|
|
|
75
93
|
], true)),
|
|
76
94
|
]);
|
|
77
95
|
})(NestiaMigrateApiStartProgrammer || (exports.NestiaMigrateApiStartProgrammer = NestiaMigrateApiStartProgrammer = {}));
|
|
78
|
-
const pick = (array) => {
|
|
79
|
-
if (array.length === 0)
|
|
80
|
-
return undefined;
|
|
81
|
-
const rand = Math.random() * array.length;
|
|
82
|
-
const index = Math.min(array.length - 1, Math.floor(rand));
|
|
83
|
-
return array[index];
|
|
84
|
-
};
|
|
85
96
|
//# sourceMappingURL=NestiaMigrateApiStartProgrammer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateApiStartProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateApiStartProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAA+D;AAG/D,sEAAmE;AACnE,oEAAiE;AAGjE,sDAAmD;AACnD,qFAAsF;AACtF,mFAAgF;AAEhF,IAAiB,+BAA+B,
|
|
1
|
+
{"version":3,"file":"NestiaMigrateApiStartProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateApiStartProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAA+D;AAG/D,sEAAmE;AACnE,oEAAiE;AAGjE,sDAAmD;AACnD,qFAAsF;AACtF,mFAAgF;AAEhF;;;;;;;;GAQG;AACH,IAAiB,+BAA+B,CAkM/C;AAlMD,WAAiB,+BAA+B;IAC9C;;;;;;;OAOG;IACU,qCAAK,GAAG,CACnB,OAA8B,EACN,EAAE;QAC1B,MAAM,QAAQ,GACZ,IAAI,6DAA6B,EAAE,CAAC;QACtC,uEAAuE;QACvE,MAAM,KAAK,GAAkC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC3E,MAA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,CAAC;AACN,CAAC,EAlMgB,+BAA+B,aAA/B,+BAA+B,GAA/B,+BAA+B,QAkM/C"}
|
|
@@ -9,7 +9,7 @@ let NestiaMigrateApiStartProgrammer;
|
|
|
9
9
|
(function(_NestiaMigrateApiStartProgrammer) {
|
|
10
10
|
_NestiaMigrateApiStartProgrammer.write = (context) => {
|
|
11
11
|
const importer = new NestiaMigrateImportProgrammer();
|
|
12
|
-
const route =
|
|
12
|
+
const route = context.application.routes[0];
|
|
13
13
|
const main = writeMain(context, importer, route);
|
|
14
14
|
const statements = [
|
|
15
15
|
...importer.toStatements((name) => `@ORGANIZATION/PROJECT-api/lib/structures/${name}`),
|
|
@@ -40,11 +40,6 @@ let NestiaMigrateApiStartProgrammer;
|
|
|
40
40
|
], true))], NodeFlags.Const));
|
|
41
41
|
const writeStarter = () => factory.createCallExpression(factory.createPropertyAccessExpression(factory.createCallExpression(factory.createIdentifier("main"), void 0, void 0), "catch"), void 0, [factory.createArrowFunction(void 0, void 0, [IdentifierFactory.parameter("exp")], void 0, void 0, factory.createBlock([factory.createExpressionStatement(factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("console"), "log"), void 0, [factory.createIdentifier("exp")])), factory.createExpressionStatement(factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("process"), "exit"), void 0, [factory.createPrefixMinus(factory.createNumericLiteral("1"))]))], true))]);
|
|
42
42
|
})(NestiaMigrateApiStartProgrammer || (NestiaMigrateApiStartProgrammer = {}));
|
|
43
|
-
const pick = (array) => {
|
|
44
|
-
if (array.length === 0) return void 0;
|
|
45
|
-
const rand = Math.random() * array.length;
|
|
46
|
-
return array[Math.min(array.length - 1, Math.floor(rand))];
|
|
47
|
-
};
|
|
48
43
|
//#endregion
|
|
49
44
|
export { NestiaMigrateApiStartProgrammer };
|
|
50
45
|
|
|
@@ -2,14 +2,44 @@ import { OpenApi } from "@typia/interface";
|
|
|
2
2
|
import ts from "../internal/ts";
|
|
3
3
|
import { INestiaMigrateConfig } from "../structures/INestiaMigrateConfig";
|
|
4
4
|
import { NestiaMigrateImportProgrammer } from "./NestiaMigrateImportProgrammer";
|
|
5
|
+
/**
|
|
6
|
+
* Generates the DTO type aliases from the component schemas.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/common.md#principled-implementation Each component name is normalized into a valid dotted name, the dots become nested namespaces, and each schema becomes an exported type alias with its description and its tags as a comment.
|
|
9
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function and private builders for the module tree and the alias.
|
|
10
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The names derive from the schema names.
|
|
11
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
12
|
+
*/
|
|
5
13
|
export declare namespace NestiaMigrateDtoProgrammer {
|
|
14
|
+
/**
|
|
15
|
+
* A node of the DTO namespace tree: its name, its children, and the writer of
|
|
16
|
+
* its alias, or `null` for a namespace without a type of its own.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/common.md#principled-implementation The tree mirrors the dotted names of the schemas, so a namespace exists exactly when a name passes through it.
|
|
19
|
+
* @evidence contracts/common.md#clear-and-simple-design A three-member record.
|
|
20
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
21
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the meaning of each member.
|
|
22
|
+
*/
|
|
6
23
|
interface IModule {
|
|
7
24
|
name: string;
|
|
25
|
+
/** Child segments of qualified schema names, preserving insertion order. */
|
|
8
26
|
children: Map<string, IModule>;
|
|
27
|
+
/** Alias writer for a schema at this node, or null for a namespace alone. */
|
|
9
28
|
programmer: null | ((importer: NestiaMigrateImportProgrammer) => ts.TypeAliasDeclaration);
|
|
10
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns the root of the DTO tree: a map from the first name segment to its
|
|
32
|
+
* module.
|
|
33
|
+
*
|
|
34
|
+
* @evidence contracts/common.md#principled-implementation Each schema key is split on slashes, its segments are escaped into valid identifiers and joined, and the result is inserted along its dotted path.
|
|
35
|
+
* @evidence contracts/common.md#clear-and-simple-design One function over one insertion helper.
|
|
36
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The names come from the document.
|
|
37
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
38
|
+
*/
|
|
11
39
|
const compose: (props: {
|
|
40
|
+
/** Calling convention and optional generated features for this operation. */
|
|
12
41
|
config: INestiaMigrateConfig;
|
|
42
|
+
/** Component schemas used to resolve DTO references. */
|
|
13
43
|
components: OpenApi.IComponents;
|
|
14
44
|
}) => Map<string, IModule>;
|
|
15
45
|
}
|
|
@@ -6,8 +6,25 @@ const FilePrinter_1 = require("../utils/FilePrinter");
|
|
|
6
6
|
const MapUtil_1 = require("../utils/MapUtil");
|
|
7
7
|
const StringUtil_1 = require("../utils/StringUtil");
|
|
8
8
|
const NestiaMigrateSchemaProgrammer_1 = require("./NestiaMigrateSchemaProgrammer");
|
|
9
|
+
/**
|
|
10
|
+
* Generates the DTO type aliases from the component schemas.
|
|
11
|
+
*
|
|
12
|
+
* @evidence contracts/common.md#principled-implementation Each component name is normalized into a valid dotted name, the dots become nested namespaces, and each schema becomes an exported type alias with its description and its tags as a comment.
|
|
13
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function and private builders for the module tree and the alias.
|
|
14
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The names derive from the schema names.
|
|
15
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
16
|
+
*/
|
|
9
17
|
var NestiaMigrateDtoProgrammer;
|
|
10
18
|
(function (NestiaMigrateDtoProgrammer) {
|
|
19
|
+
/**
|
|
20
|
+
* Returns the root of the DTO tree: a map from the first name segment to its
|
|
21
|
+
* module.
|
|
22
|
+
*
|
|
23
|
+
* @evidence contracts/common.md#principled-implementation Each schema key is split on slashes, its segments are escaped into valid identifiers and joined, and the result is inserted along its dotted path.
|
|
24
|
+
* @evidence contracts/common.md#clear-and-simple-design One function over one insertion helper.
|
|
25
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The names come from the document.
|
|
26
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
27
|
+
*/
|
|
11
28
|
NestiaMigrateDtoProgrammer.compose = (props) => {
|
|
12
29
|
var _a;
|
|
13
30
|
const dict = new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateDtoProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateDtoProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAAoD;AAMpD,sDAAmD;AACnD,8CAA2C;AAC3C,oDAAiD;AAEjD,mFAAgF;AAEhF,IAAiB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"NestiaMigrateDtoProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateDtoProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAAoD;AAMpD,sDAAmD;AACnD,8CAA2C;AAC3C,oDAAiD;AAEjD,mFAAgF;AAEhF;;;;;;;GAOG;AACH,IAAiB,0BAA0B,CA6F1C;AA7FD,WAAiB,0BAA0B;IAsBzC;;;;;;;;OAQG;IACU,kCAAO,GAAG,CAAC,KAMvB,EAAwB,EAAE;;QACzB,MAAM,IAAI,GAAyB,IAAI,GAAG,EAAE,CAAC;QAC7C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,OAAC,KAAK,CAAC,UAAU,CAAC,OAAO,mCAAI,EAAE,CAAC,EAAE,CAAC;YAC1E,MAAM,UAAU,GAAW,GAAG;iBAC3B,KAAK,CAAC,GAAG,CAAC;iBACV,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC;iBACjC,GAAG,CAAC,uBAAU,CAAC,iBAAiB,CAAC;iBACjC,IAAI,CAAC,EAAE,CAAC,CAAC;YACZ,OAAO,CAAC,IAAI,CAAC,CAA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CAAC,CAAC,EAAE,CAAC;YACN,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,GAAG,CAAC,MAAM,CAAC,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtD,GAAG,OAAO;QACV,GAAG,CAAC,GAAG;YACL,CAAC,CAAC;gBACE,IAAI,MAAA,MAAA,MAAM,CAAC,MAAM,0CAAE,GAAG,mCAAI,QAAQ,IAAI,MAAA,MAAA,MAAM,CAAC,MAAM,0CAAE,KAAK,mCAAI,yDAAyD,EAAE;aAC1H;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC,CAAC;AAEJ,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAsC,EAAE,CAC9E,OAAO,KAAK,KAAK,SAAS;IAC1B,OAAO,KAAK,KAAK,QAAQ;IACzB,OAAO,KAAK,KAAK,QAAQ,CAAC"}
|
|
@@ -3,13 +3,52 @@ import { OpenApi } from "typia";
|
|
|
3
3
|
import ts from "../internal/ts";
|
|
4
4
|
import { INestiaMigrateConfig } from "../structures/INestiaMigrateConfig";
|
|
5
5
|
import { NestiaMigrateImportProgrammer } from "./NestiaMigrateImportProgrammer";
|
|
6
|
+
/**
|
|
7
|
+
* Generates the e2e test function of one route.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/common.md#principled-implementation The function calls the route through the SDK with random arguments made by `typia.random`, including generated headers, and asserts the response with `typia.assert`, so the test checks that the server's answer matches the declared type.
|
|
10
|
+
* @evidence contracts/common.md#clear-and-simple-design One entry function, one public body writer shared with the start programmer, and a private call writer.
|
|
11
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The arguments are drawn at run time, and no route is special-cased.
|
|
12
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
13
|
+
*/
|
|
6
14
|
export declare namespace NestiaMigrateE2eFunctionProgrammer {
|
|
15
|
+
/**
|
|
16
|
+
* The input of one test function: the configuration, the components, the
|
|
17
|
+
* importer, and the route.
|
|
18
|
+
*
|
|
19
|
+
* @evidence contracts/common.md#principled-implementation The record holds exactly what the generation needs.
|
|
20
|
+
* @evidence contracts/common.md#clear-and-simple-design A flat record.
|
|
21
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts It is a type and adds no runtime behavior.
|
|
22
|
+
* @evidence contracts/common.md#meaningful-documentation The comment lists the fields.
|
|
23
|
+
*/
|
|
7
24
|
interface IContext {
|
|
25
|
+
/** Calling convention and optional generated features for this operation. */
|
|
8
26
|
config: INestiaMigrateConfig;
|
|
27
|
+
/** Component schemas used to resolve DTO references. */
|
|
9
28
|
components: OpenApi.IComponents;
|
|
29
|
+
/** File-local import collector shared with the surrounding file writer. */
|
|
10
30
|
importer: NestiaMigrateImportProgrammer;
|
|
31
|
+
/** Analyzed operation, with the accessor chosen for this generation. */
|
|
11
32
|
route: IHttpMigrateRoute;
|
|
12
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Returns the exported async test function of a route, named `test_api_`
|
|
36
|
+
* followed by its accessor.
|
|
37
|
+
*
|
|
38
|
+
* @evidence contracts/common.md#principled-implementation The name joins `test`, `api`, and the accessor with underscores, so it is unique for a route and matches the prefix that the e2e executor discovers.
|
|
39
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression.
|
|
40
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The name derives from the accessor.
|
|
41
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the naming rule.
|
|
42
|
+
*/
|
|
13
43
|
const write: (ctx: IContext) => ts.FunctionDeclaration;
|
|
44
|
+
/**
|
|
45
|
+
* Returns the statements of the test body: the call with random arguments and
|
|
46
|
+
* the type assertion of its output.
|
|
47
|
+
*
|
|
48
|
+
* @evidence contracts/common.md#principled-implementation The call expression follows the parameter mode of the configuration, and the output is typed by the response schema when there is one.
|
|
49
|
+
* @evidence contracts/common.md#clear-and-simple-design One function shared with the start programmer.
|
|
50
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The body follows the route.
|
|
51
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
52
|
+
*/
|
|
14
53
|
const writeBody: (ctx: IContext) => ts.Statement[];
|
|
15
54
|
}
|
|
@@ -5,8 +5,25 @@ const factory_1 = require("@ttsc/factory");
|
|
|
5
5
|
const IdentifierFactory_1 = require("../factories/IdentifierFactory");
|
|
6
6
|
const LiteralFactory_1 = require("../factories/LiteralFactory");
|
|
7
7
|
const NestiaMigrateSchemaProgrammer_1 = require("./NestiaMigrateSchemaProgrammer");
|
|
8
|
+
/**
|
|
9
|
+
* Generates the e2e test function of one route.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/common.md#principled-implementation The function calls the route through the SDK with random arguments made by `typia.random`, including generated headers, and asserts the response with `typia.assert`, so the test checks that the server's answer matches the declared type.
|
|
12
|
+
* @evidence contracts/common.md#clear-and-simple-design One entry function, one public body writer shared with the start programmer, and a private call writer.
|
|
13
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The arguments are drawn at run time, and no route is special-cased.
|
|
14
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
15
|
+
*/
|
|
8
16
|
var NestiaMigrateE2eFunctionProgrammer;
|
|
9
17
|
(function (NestiaMigrateE2eFunctionProgrammer) {
|
|
18
|
+
/**
|
|
19
|
+
* Returns the exported async test function of a route, named `test_api_`
|
|
20
|
+
* followed by its accessor.
|
|
21
|
+
*
|
|
22
|
+
* @evidence contracts/common.md#principled-implementation The name joins `test`, `api`, and the accessor with underscores, so it is unique for a route and matches the prefix that the e2e executor discovers.
|
|
23
|
+
* @evidence contracts/common.md#clear-and-simple-design One expression.
|
|
24
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The name derives from the accessor.
|
|
25
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the naming rule.
|
|
26
|
+
*/
|
|
10
27
|
NestiaMigrateE2eFunctionProgrammer.write = (ctx) => factory_1.factory.createFunctionDeclaration([
|
|
11
28
|
factory_1.factory.createModifier(factory_1.SyntaxKind.ExportKeyword),
|
|
12
29
|
factory_1.factory.createModifier(factory_1.SyntaxKind.AsyncKeyword),
|
|
@@ -17,6 +34,15 @@ var NestiaMigrateE2eFunctionProgrammer;
|
|
|
17
34
|
name: "api",
|
|
18
35
|
})), factory_1.factory.createIdentifier("IConnection")))),
|
|
19
36
|
], undefined, factory_1.factory.createBlock(NestiaMigrateE2eFunctionProgrammer.writeBody(ctx), true));
|
|
37
|
+
/**
|
|
38
|
+
* Returns the statements of the test body: the call with random arguments and
|
|
39
|
+
* the type assertion of its output.
|
|
40
|
+
*
|
|
41
|
+
* @evidence contracts/common.md#principled-implementation The call expression follows the parameter mode of the configuration, and the output is typed by the response schema when there is one.
|
|
42
|
+
* @evidence contracts/common.md#clear-and-simple-design One function shared with the start programmer.
|
|
43
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The body follows the route.
|
|
44
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
45
|
+
*/
|
|
20
46
|
NestiaMigrateE2eFunctionProgrammer.writeBody = (ctx) => [
|
|
21
47
|
factory_1.factory.createVariableStatement([], factory_1.factory.createVariableDeclarationList([
|
|
22
48
|
factory_1.factory.createVariableDeclaration("output", undefined, ctx.route.success
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateE2eFileProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateE2eFileProgrammer.ts"],"names":[],"mappings":";;;AAAA,2CAA+D;AAI/D,sEAAmE;AACnE,gEAA6D;AAI7D,mFAAgF;AAEhF,IAAiB,kCAAkC,
|
|
1
|
+
{"version":3,"file":"NestiaMig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IAAI,CAAC;qBACvD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC;qBACzB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;oBAC/B,GAAG;oBACH,iBAAO,CAAC,oBAAoB,CAC1B,MAAM,EACN;wBACE,6DAA6B,CAAC,KAAK,CAAC;4BAClC,UAAU,EAAE,GAAG,CAAC,UAAU;4BAC1B,QAAQ,EAAE,GAAG,CAAC,QAAQ;4BACtB,MAAM,EAAE,KAAK;yBACd,CAAC;qBACH,EACD,SAAS,CACV;iBACF,CAAC,CACL,CACF;aACF,CAAC,CAAC;QACL,OAAO,iBAAO,CAAC,oBAAoB,CAAC,KAAK,EAAE,SAAS,EAAE;YACpD,UAAU;YACV,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;iBAC1D,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;iBAClB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACT,iBAAO,CAAC,oBAAoB,CAC1B,MAAM,EACN;gBACE,6DAA6B,CAAC,KAAK,CAAC;oBAClC,UAAU,EAAE,GAAG,CAAC,UAAU;oBAC1B,QAAQ,EAAE,GAAG,CAAC,QAAQ;oBACtB,MAAM,EAAE,CAAC,CAAC,MAAM;iBACjB,CAAC;aACH,EACD,SAAS,CACV,CACF;SACJ,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC,EAlNgB,kCAAkC,aAAlC,kCAAkC,GAAlC,kCAAkC,QAkNlD"}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import { INestiaMigrateContext } from "../structures/INestiaMigrateContext";
|
|
2
|
+
/**
|
|
3
|
+
* Generates the e2e test files, one per route.
|
|
4
|
+
*
|
|
5
|
+
* @evidence contracts/common.md#principled-implementation Each route becomes a file whose path depends on the mode and whose imports are resolved through the package name for a monorepo and through the built library path otherwise.
|
|
6
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function and one private file writer.
|
|
7
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The layout follows the accessors.
|
|
8
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
9
|
+
*/
|
|
2
10
|
export declare namespace NestiaMigrateE2eProgrammer {
|
|
11
|
+
/**
|
|
12
|
+
* Returns the map from file path to content of the e2e tests.
|
|
13
|
+
*
|
|
14
|
+
* @evidence contracts/common.md#principled-implementation The file name is `test_api_` plus the accessor, so each route has exactly one file.
|
|
15
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
16
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The names follow the accessors.
|
|
17
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
18
|
+
*/
|
|
3
19
|
const write: (ctx: INestiaMigrateContext) => Record<string, string>;
|
|
4
20
|
}
|
|
@@ -4,8 +4,24 @@ exports.NestiaMigrateE2eProgrammer = void 0;
|
|
|
4
4
|
const FilePrinter_1 = require("../utils/FilePrinter");
|
|
5
5
|
const NestiaMigrateE2eFileProgrammer_1 = require("./NestiaMigrateE2eFileProgrammer");
|
|
6
6
|
const NestiaMigrateImportProgrammer_1 = require("./NestiaMigrateImportProgrammer");
|
|
7
|
+
/**
|
|
8
|
+
* Generates the e2e test files, one per route.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/common.md#principled-implementation Each route becomes a file whose path depends on the mode and whose imports are resolved through the package name for a monorepo and through the built library path otherwise.
|
|
11
|
+
* @evidence contracts/common.md#clear-and-simple-design One public function and one private file writer.
|
|
12
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The layout follows the accessors.
|
|
13
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states what is generated.
|
|
14
|
+
*/
|
|
7
15
|
var NestiaMigrateE2eProgrammer;
|
|
8
16
|
(function (NestiaMigrateE2eProgrammer) {
|
|
17
|
+
/**
|
|
18
|
+
* Returns the map from file path to content of the e2e tests.
|
|
19
|
+
*
|
|
20
|
+
* @evidence contracts/common.md#principled-implementation The file name is `test_api_` plus the accessor, so each route has exactly one file.
|
|
21
|
+
* @evidence contracts/common.md#clear-and-simple-design One function.
|
|
22
|
+
* @evidence contracts/common.md#prohibited-implementation-shortcuts The names follow the accessors.
|
|
23
|
+
* @evidence contracts/common.md#meaningful-documentation The comment states the result.
|
|
24
|
+
*/
|
|
9
25
|
NestiaMigrateE2eProgrammer.write = (ctx) => Object.fromEntries(ctx.application.routes
|
|
10
26
|
.map((r) => writeFile(ctx.mode, ctx.config, ctx.application.document().components, r))
|
|
11
27
|
.map((r) => [`${r.location}/${r.file}`, r.content]));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaMigrateE2eProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateE2eProgrammer.ts"],"names":[],"mappings":";;;AAMA,sDAAmD;AACnD,qFAAsF;AACtF,mFAAgF;AAEhF,IAAiB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"NestiaMigrateE2eProgrammer.js","sourceRoot":"","sources":["../../src/programmers/NestiaMigrateE2eProgrammer.ts"],"names":[],"mappings":";;;AAMA,sDAAmD;AACnD,qFAAsF;AACtF,mFAAgF;AAEhF;;;;;;;GAOG;AACH,IAAiB,0BAA0B,CA2D1C;AA3DD,WAAiB,0BAA0B;IACzC;;;;;;;OAOG;IACU,gCAAK,GAAG,CAAC,GAA0B,EAA0B,EAAE,CAC1E,MAAM,CAAC,WAAW,CAChB,GAAG,CAAC,WAAW,CAAC,MAAM;SACnB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CACT,SAAS,CACP,GAAG,CAAC,IAAI,EACR,GAAG,CAAC,MAAM,EACV,GAAG,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,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