@nestia/sdk 2.0.0-dev.20230903 → 2.0.0-dev.20230904-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.
Files changed (48) hide show
  1. package/lib/INestiaConfig.d.ts +30 -45
  2. package/lib/NestiaSdkApplication.d.ts +6 -5
  3. package/lib/NestiaSdkApplication.js +27 -84
  4. package/lib/NestiaSdkApplication.js.map +1 -1
  5. package/lib/analyses/ControllerAnalyzer.js +1 -1
  6. package/lib/analyses/ControllerAnalyzer.js.map +1 -1
  7. package/lib/executable/internal/NestiaConfigLoader.d.ts +7 -0
  8. package/lib/executable/internal/NestiaConfigLoader.js +574 -0
  9. package/lib/executable/internal/NestiaConfigLoader.js.map +1 -0
  10. package/lib/executable/internal/NestiaProjectGetter.d.ts +3 -0
  11. package/lib/executable/internal/NestiaProjectGetter.js +28 -0
  12. package/lib/executable/internal/NestiaProjectGetter.js.map +1 -0
  13. package/lib/executable/internal/NestiaSdkCommand.d.ts +3 -3
  14. package/lib/executable/internal/NestiaSdkCommand.js +13 -104
  15. package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
  16. package/lib/executable/internal/{nestia.config.getter.js → nestia.project.getter.js} +3 -3
  17. package/lib/executable/internal/nestia.project.getter.js.map +1 -0
  18. package/lib/executable/sdk.js +3 -3
  19. package/lib/executable/sdk.js.map +1 -1
  20. package/lib/generates/SwaggerGenerator.js +3 -2
  21. package/lib/generates/SwaggerGenerator.js.map +1 -1
  22. package/lib/generates/internal/SwaggerSchemaGenerator.d.ts +1 -1
  23. package/lib/generates/internal/SwaggerSchemaGenerator.js +57 -69
  24. package/lib/generates/internal/SwaggerSchemaGenerator.js.map +1 -1
  25. package/lib/generates/internal/SwaggerSchemaValidator.js +0 -4
  26. package/lib/generates/internal/SwaggerSchemaValidator.js.map +1 -1
  27. package/package.json +3 -3
  28. package/src/INestiaConfig.ts +32 -48
  29. package/src/NestiaSdkApplication.ts +36 -77
  30. package/src/analyses/ControllerAnalyzer.ts +1 -1
  31. package/src/executable/internal/NestiaConfigLoader.ts +82 -0
  32. package/src/executable/internal/NestiaProjectGetter.ts +11 -0
  33. package/src/executable/internal/NestiaSdkCommand.ts +23 -146
  34. package/src/executable/internal/{nestia.config.getter.ts → nestia.project.getter.ts} +2 -2
  35. package/src/executable/sdk.ts +3 -3
  36. package/src/generates/SwaggerGenerator.ts +5 -4
  37. package/src/generates/internal/SwaggerSchemaGenerator.ts +83 -86
  38. package/src/generates/internal/SwaggerSchemaValidator.ts +0 -6
  39. package/lib/executable/internal/NestiaConfigCompilerOptions.d.ts +0 -12
  40. package/lib/executable/internal/NestiaConfigCompilerOptions.js +0 -18
  41. package/lib/executable/internal/NestiaConfigCompilerOptions.js.map +0 -1
  42. package/lib/executable/internal/NestiaSdkConfig.d.ts +0 -4
  43. package/lib/executable/internal/NestiaSdkConfig.js +0 -1019
  44. package/lib/executable/internal/NestiaSdkConfig.js.map +0 -1
  45. package/lib/executable/internal/nestia.config.getter.js.map +0 -1
  46. package/src/executable/internal/NestiaConfigCompilerOptions.ts +0 -19
  47. package/src/executable/internal/NestiaSdkConfig.ts +0 -36
  48. /package/lib/executable/internal/{nestia.config.getter.d.ts → nestia.project.getter.d.ts} +0 -0
@@ -0,0 +1,574 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __rest = (this && this.__rest) || function (s, e) {
35
+ var t = {};
36
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
37
+ t[p] = s[p];
38
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
39
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
40
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
41
+ t[p[i]] = s[p[i]];
42
+ }
43
+ return t;
44
+ };
45
+ var __importDefault = (this && this.__importDefault) || function (mod) {
46
+ return (mod && mod.__esModule) ? mod : { "default": mod };
47
+ };
48
+ Object.defineProperty(exports, "__esModule", { value: true });
49
+ exports.NestiaConfigLoader = void 0;
50
+ const fs_1 = __importDefault(require("fs"));
51
+ const path_1 = __importDefault(require("path"));
52
+ const WorkerConnector_1 = require("tgrid/protocols/workers/WorkerConnector");
53
+ const ts_node_1 = require("ts-node");
54
+ const tsconfck_1 = require("tsconfck");
55
+ const typescript_1 = __importDefault(require("typescript"));
56
+ const typia_1 = __importDefault(require("typia"));
57
+ var NestiaConfigLoader;
58
+ (function (NestiaConfigLoader) {
59
+ NestiaConfigLoader.compilerOptions = (project) => __awaiter(this, void 0, void 0, function* () {
60
+ const configFileName = typescript_1.default.findConfigFile(process.cwd(), typescript_1.default.sys.fileExists, project);
61
+ if (!configFileName)
62
+ throw new Error(`unable to find "tsconfig.json" file.`);
63
+ const { tsconfig } = yield (0, tsconfck_1.parseNative)(configFileName);
64
+ const configFileText = JSON.stringify(tsconfig);
65
+ const { config } = typescript_1.default.parseConfigFileTextToJson(configFileName, configFileText);
66
+ const configParseResult = typescript_1.default.parseJsonConfigFileContent(config, typescript_1.default.sys, path_1.default.dirname(configFileName));
67
+ const _a = configParseResult.raw.compilerOptions, { moduleResolution } = _a, result = __rest(_a, ["moduleResolution"]);
68
+ return result;
69
+ });
70
+ NestiaConfigLoader.config = (options) => __awaiter(this, void 0, void 0, function* () {
71
+ if (fs_1.default.existsSync(path_1.default.resolve("nestia.config.ts")) === false)
72
+ throw new Error(`unable to find "nestia.config.ts" file.`);
73
+ (0, ts_node_1.register)({
74
+ emit: false,
75
+ compilerOptions: options,
76
+ require: options.baseUrl ? ["tsconfig-paths/register"] : undefined,
77
+ });
78
+ const loaded = yield Promise.resolve(`${path_1.default.resolve("nestia.config.ts")}`).then(s => __importStar(require(s)));
79
+ const config = typeof (loaded === null || loaded === void 0 ? void 0 : loaded.default) === "object" && loaded.default !== null
80
+ ? loaded.default
81
+ : loaded;
82
+ try {
83
+ return (input => {
84
+ const __is = input => {
85
+ const $io0 = input => (undefined === input.swagger || "object" === typeof input.swagger && null !== input.swagger && $io1(input.swagger)) && (null !== input.input && undefined !== input.input && ("string" === typeof input.input || (Array.isArray(input.input) && input.input.every(elem => "string" === typeof elem) || "object" === typeof input.input && null !== input.input && $io17(input.input)))) && (undefined === input.output || "string" === typeof input.output) && (undefined === input.distribute || "string" === typeof input.distribute) && (undefined === input.e2e || "string" === typeof input.e2e) && (undefined === input.primitive || "boolean" === typeof input.primitive) && (undefined === input.simulate || "boolean" === typeof input.simulate) && (undefined === input.project || "string" === typeof input.project) && (undefined === input.assert || "boolean" === typeof input.assert) && (undefined === input.json || "boolean" === typeof input.json);
86
+ const $io1 = input => "string" === typeof input.output && (undefined === input.info || "object" === typeof input.info && null !== input.info && false === Array.isArray(input.info) && $io2(input.info)) && (undefined === input.servers || Array.isArray(input.servers) && input.servers.every(elem => "object" === typeof elem && null !== elem && $io5(elem))) && (undefined === input.security || "object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) && $io6(input.security)) && (undefined === input.decompose || "boolean" === typeof input.decompose);
87
+ const $io2 = input => (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.termsOfService || "string" === typeof input.termsOfService && /^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.termsOfService)) && (undefined === input.contact || "object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) && $io3(input.contact)) && (undefined === input.license || "object" === typeof input.license && null !== input.license && $io4(input.license)) && (undefined === input.version || "string" === typeof input.version);
88
+ const $io3 = input => (undefined === input.name || "string" === typeof input.name) && (undefined === input.url || "string" === typeof input.url && /^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.url)) && (undefined === input.email || "string" === typeof input.email && /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(input.email));
89
+ const $io4 = input => "string" === typeof input.name && (undefined === input.url || "string" === typeof input.url && /^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.url));
90
+ const $io5 = input => "string" === typeof input.url && /^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.url) && (undefined === input.description || "string" === typeof input.description);
91
+ const $io6 = input => Object.keys(input).every(key => {
92
+ const value = input[key];
93
+ if (undefined === value)
94
+ return true;
95
+ if (RegExp(/(.*)/).test(key))
96
+ return "object" === typeof value && null !== value && $iu0(value);
97
+ return true;
98
+ });
99
+ const $io7 = input => "http" === input.type && "basic" === input.scheme;
100
+ const $io8 = input => "http" === input.type && "bearer" === input.scheme && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat);
101
+ const $io9 = input => "apiKey" === input.type && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"]) && (undefined === input.name || "string" === typeof input.name);
102
+ const $io10 = input => "openIdConnect" === input.type && "string" === typeof input.openIdConnectUrl;
103
+ const $io11 = input => "oauth2" === input.type && ("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) && $io12(input.flows)) && (undefined === input.description || "string" === typeof input.description);
104
+ const $io12 = input => (undefined === input.authorizationCode || "object" === typeof input.authorizationCode && null !== input.authorizationCode && $io13(input.authorizationCode)) && (undefined === input.implicit || "object" === typeof input.implicit && null !== input.implicit && $io15(input.implicit)) && (undefined === input.password || "object" === typeof input.password && null !== input.password && $io16(input.password)) && (undefined === input.clientCredentials || "object" === typeof input.clientCredentials && null !== input.clientCredentials && $io16(input.clientCredentials));
105
+ const $io13 = input => "string" === typeof input.authorizationUrl && "string" === typeof input.tokenUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io14(input.scopes));
106
+ const $io14 = input => Object.keys(input).every(key => {
107
+ const value = input[key];
108
+ if (undefined === value)
109
+ return true;
110
+ if (RegExp(/(.*)/).test(key))
111
+ return "string" === typeof value;
112
+ return true;
113
+ });
114
+ const $io15 = input => "string" === typeof input.authorizationUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io14(input.scopes));
115
+ const $io16 = input => "string" === typeof input.tokenUrl && "string" === typeof input.refreshUrl && (undefined === input.scopes || "object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) && $io14(input.scopes));
116
+ const $io17 = input => Array.isArray(input.include) && input.include.every(elem => "string" === typeof elem) && (undefined === input.exclude || Array.isArray(input.exclude) && input.exclude.every(elem => "string" === typeof elem));
117
+ const $iu0 = input => (() => {
118
+ if ("basic" === input.scheme)
119
+ return $io7(input);
120
+ else if ("bearer" === input.scheme)
121
+ return $io8(input);
122
+ else if ("apiKey" === input.type)
123
+ return $io9(input);
124
+ else if ("openIdConnect" === input.type)
125
+ return $io10(input);
126
+ else if ("oauth2" === input.type)
127
+ return $io11(input);
128
+ else
129
+ return false;
130
+ })();
131
+ return "object" === typeof input && null !== input && $io0(input);
132
+ };
133
+ if (false === __is(input))
134
+ ((input, _path, _exceptionable = true) => {
135
+ const $guard = typia_1.default.assert.guard;
136
+ const $join = typia_1.default.assert.join;
137
+ const $ao0 = (input, _path, _exceptionable = true) => (undefined === input.swagger || ("object" === typeof input.swagger && null !== input.swagger || $guard(_exceptionable, {
138
+ path: _path + ".swagger",
139
+ expected: "(INestiaConfig.ISwaggerConfig | undefined)",
140
+ value: input.swagger
141
+ })) && $ao1(input.swagger, _path + ".swagger", true && _exceptionable) || $guard(_exceptionable, {
142
+ path: _path + ".swagger",
143
+ expected: "(INestiaConfig.ISwaggerConfig | undefined)",
144
+ value: input.swagger
145
+ })) && ((null !== input.input || $guard(_exceptionable, {
146
+ path: _path + ".input",
147
+ expected: "(Array<string> | INestiaConfig.IInput | string)",
148
+ value: input.input
149
+ })) && (undefined !== input.input || $guard(_exceptionable, {
150
+ path: _path + ".input",
151
+ expected: "(Array<string> | INestiaConfig.IInput | string)",
152
+ value: input.input
153
+ })) && ("string" === typeof input.input || (Array.isArray(input.input) && input.input.every((elem, _index1) => "string" === typeof elem || $guard(_exceptionable, {
154
+ path: _path + ".input[" + _index1 + "]",
155
+ expected: "string",
156
+ value: elem
157
+ })) || "object" === typeof input.input && null !== input.input && $ao17(input.input, _path + ".input", true && _exceptionable) || $guard(_exceptionable, {
158
+ path: _path + ".input",
159
+ expected: "(Array<string> | INestiaConfig.IInput | string)",
160
+ value: input.input
161
+ })) || $guard(_exceptionable, {
162
+ path: _path + ".input",
163
+ expected: "(Array<string> | INestiaConfig.IInput | string)",
164
+ value: input.input
165
+ }))) && (undefined === input.output || "string" === typeof input.output || $guard(_exceptionable, {
166
+ path: _path + ".output",
167
+ expected: "(string | undefined)",
168
+ value: input.output
169
+ })) && (undefined === input.distribute || "string" === typeof input.distribute || $guard(_exceptionable, {
170
+ path: _path + ".distribute",
171
+ expected: "(string | undefined)",
172
+ value: input.distribute
173
+ })) && (undefined === input.e2e || "string" === typeof input.e2e || $guard(_exceptionable, {
174
+ path: _path + ".e2e",
175
+ expected: "(string | undefined)",
176
+ value: input.e2e
177
+ })) && (undefined === input.primitive || "boolean" === typeof input.primitive || $guard(_exceptionable, {
178
+ path: _path + ".primitive",
179
+ expected: "(boolean | undefined)",
180
+ value: input.primitive
181
+ })) && (undefined === input.simulate || "boolean" === typeof input.simulate || $guard(_exceptionable, {
182
+ path: _path + ".simulate",
183
+ expected: "(boolean | undefined)",
184
+ value: input.simulate
185
+ })) && (undefined === input.project || "string" === typeof input.project || $guard(_exceptionable, {
186
+ path: _path + ".project",
187
+ expected: "(string | undefined)",
188
+ value: input.project
189
+ })) && (undefined === input.assert || "boolean" === typeof input.assert || $guard(_exceptionable, {
190
+ path: _path + ".assert",
191
+ expected: "(boolean | undefined)",
192
+ value: input.assert
193
+ })) && (undefined === input.json || "boolean" === typeof input.json || $guard(_exceptionable, {
194
+ path: _path + ".json",
195
+ expected: "(boolean | undefined)",
196
+ value: input.json
197
+ }));
198
+ const $ao1 = (input, _path, _exceptionable = true) => ("string" === typeof input.output || $guard(_exceptionable, {
199
+ path: _path + ".output",
200
+ expected: "string",
201
+ value: input.output
202
+ })) && (undefined === input.info || ("object" === typeof input.info && null !== input.info && false === Array.isArray(input.info) || $guard(_exceptionable, {
203
+ path: _path + ".info",
204
+ expected: "(Partial<ISwaggerInfo> | undefined)",
205
+ value: input.info
206
+ })) && $ao2(input.info, _path + ".info", true && _exceptionable) || $guard(_exceptionable, {
207
+ path: _path + ".info",
208
+ expected: "(Partial<ISwaggerInfo> | undefined)",
209
+ value: input.info
210
+ })) && (undefined === input.servers || (Array.isArray(input.servers) || $guard(_exceptionable, {
211
+ path: _path + ".servers",
212
+ expected: "(Array<ISwagger.IServer> | undefined)",
213
+ value: input.servers
214
+ })) && input.servers.every((elem, _index2) => ("object" === typeof elem && null !== elem || $guard(_exceptionable, {
215
+ path: _path + ".servers[" + _index2 + "]",
216
+ expected: "ISwagger.IServer",
217
+ value: elem
218
+ })) && $ao5(elem, _path + ".servers[" + _index2 + "]", true && _exceptionable) || $guard(_exceptionable, {
219
+ path: _path + ".servers[" + _index2 + "]",
220
+ expected: "ISwagger.IServer",
221
+ value: elem
222
+ })) || $guard(_exceptionable, {
223
+ path: _path + ".servers",
224
+ expected: "(Array<ISwagger.IServer> | undefined)",
225
+ value: input.servers
226
+ })) && (undefined === input.security || ("object" === typeof input.security && null !== input.security && false === Array.isArray(input.security) || $guard(_exceptionable, {
227
+ path: _path + ".security",
228
+ expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
229
+ value: input.security
230
+ })) && $ao6(input.security, _path + ".security", true && _exceptionable) || $guard(_exceptionable, {
231
+ path: _path + ".security",
232
+ expected: "(Record<string, ISwaggerSecurityScheme> | undefined)",
233
+ value: input.security
234
+ })) && (undefined === input.decompose || "boolean" === typeof input.decompose || $guard(_exceptionable, {
235
+ path: _path + ".decompose",
236
+ expected: "(boolean | undefined)",
237
+ value: input.decompose
238
+ }));
239
+ const $ao2 = (input, _path, _exceptionable = true) => (undefined === input.title || "string" === typeof input.title || $guard(_exceptionable, {
240
+ path: _path + ".title",
241
+ expected: "(string | undefined)",
242
+ value: input.title
243
+ })) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
244
+ path: _path + ".description",
245
+ expected: "(string | undefined)",
246
+ value: input.description
247
+ })) && (undefined === input.termsOfService || "string" === typeof input.termsOfService && (/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.termsOfService) || $guard(_exceptionable, {
248
+ path: _path + ".termsOfService",
249
+ expected: "string & Format<url>",
250
+ value: input.termsOfService
251
+ })) || $guard(_exceptionable, {
252
+ path: _path + ".termsOfService",
253
+ expected: "((string & Format<url>) | undefined)",
254
+ value: input.termsOfService
255
+ })) && (undefined === input.contact || ("object" === typeof input.contact && null !== input.contact && false === Array.isArray(input.contact) || $guard(_exceptionable, {
256
+ path: _path + ".contact",
257
+ expected: "(ISwaggerInfo.IContact | undefined)",
258
+ value: input.contact
259
+ })) && $ao3(input.contact, _path + ".contact", true && _exceptionable) || $guard(_exceptionable, {
260
+ path: _path + ".contact",
261
+ expected: "(ISwaggerInfo.IContact | undefined)",
262
+ value: input.contact
263
+ })) && (undefined === input.license || ("object" === typeof input.license && null !== input.license || $guard(_exceptionable, {
264
+ path: _path + ".license",
265
+ expected: "(ISwaggerInfo.ILicense | undefined)",
266
+ value: input.license
267
+ })) && $ao4(input.license, _path + ".license", true && _exceptionable) || $guard(_exceptionable, {
268
+ path: _path + ".license",
269
+ expected: "(ISwaggerInfo.ILicense | undefined)",
270
+ value: input.license
271
+ })) && (undefined === input.version || "string" === typeof input.version || $guard(_exceptionable, {
272
+ path: _path + ".version",
273
+ expected: "(string | undefined)",
274
+ value: input.version
275
+ }));
276
+ const $ao3 = (input, _path, _exceptionable = true) => (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
277
+ path: _path + ".name",
278
+ expected: "(string | undefined)",
279
+ value: input.name
280
+ })) && (undefined === input.url || "string" === typeof input.url && (/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.url) || $guard(_exceptionable, {
281
+ path: _path + ".url",
282
+ expected: "string & Format<url>",
283
+ value: input.url
284
+ })) || $guard(_exceptionable, {
285
+ path: _path + ".url",
286
+ expected: "((string & Format<url>) | undefined)",
287
+ value: input.url
288
+ })) && (undefined === input.email || "string" === typeof input.email && (/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(input.email) || $guard(_exceptionable, {
289
+ path: _path + ".email",
290
+ expected: "string & Format<email>",
291
+ value: input.email
292
+ })) || $guard(_exceptionable, {
293
+ path: _path + ".email",
294
+ expected: "((string & Format<email>) | undefined)",
295
+ value: input.email
296
+ }));
297
+ const $ao4 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || $guard(_exceptionable, {
298
+ path: _path + ".name",
299
+ expected: "string",
300
+ value: input.name
301
+ })) && (undefined === input.url || "string" === typeof input.url && (/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.url) || $guard(_exceptionable, {
302
+ path: _path + ".url",
303
+ expected: "string & Format<url>",
304
+ value: input.url
305
+ })) || $guard(_exceptionable, {
306
+ path: _path + ".url",
307
+ expected: "((string & Format<url>) | undefined)",
308
+ value: input.url
309
+ }));
310
+ const $ao5 = (input, _path, _exceptionable = true) => ("string" === typeof input.url && (/^[a-zA-Z0-9]+:\/\/(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/.test(input.url) || $guard(_exceptionable, {
311
+ path: _path + ".url",
312
+ expected: "string & Format<url>",
313
+ value: input.url
314
+ })) || $guard(_exceptionable, {
315
+ path: _path + ".url",
316
+ expected: "(string & Format<url>)",
317
+ value: input.url
318
+ })) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
319
+ path: _path + ".description",
320
+ expected: "(string | undefined)",
321
+ value: input.description
322
+ }));
323
+ const $ao6 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
324
+ const value = input[key];
325
+ if (undefined === value)
326
+ return true;
327
+ if (RegExp(/(.*)/).test(key))
328
+ return ("object" === typeof value && null !== value || $guard(_exceptionable, {
329
+ path: _path + $join(key),
330
+ expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
331
+ value: value
332
+ })) && $au0(value, _path + $join(key), true && _exceptionable) || $guard(_exceptionable, {
333
+ path: _path + $join(key),
334
+ expected: "(ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IOAuth2 | ISwaggerSecurityScheme.IOpenId)",
335
+ value: value
336
+ });
337
+ return true;
338
+ });
339
+ const $ao7 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
340
+ path: _path + ".type",
341
+ expected: "\"http\"",
342
+ value: input.type
343
+ })) && ("basic" === input.scheme || $guard(_exceptionable, {
344
+ path: _path + ".scheme",
345
+ expected: "\"basic\"",
346
+ value: input.scheme
347
+ }));
348
+ const $ao8 = (input, _path, _exceptionable = true) => ("http" === input.type || $guard(_exceptionable, {
349
+ path: _path + ".type",
350
+ expected: "\"http\"",
351
+ value: input.type
352
+ })) && ("bearer" === input.scheme || $guard(_exceptionable, {
353
+ path: _path + ".scheme",
354
+ expected: "\"bearer\"",
355
+ value: input.scheme
356
+ })) && (undefined === input.bearerFormat || "string" === typeof input.bearerFormat || $guard(_exceptionable, {
357
+ path: _path + ".bearerFormat",
358
+ expected: "(string | undefined)",
359
+ value: input.bearerFormat
360
+ }));
361
+ const $ao9 = (input, _path, _exceptionable = true) => ("apiKey" === input.type || $guard(_exceptionable, {
362
+ path: _path + ".type",
363
+ expected: "\"apiKey\"",
364
+ value: input.type
365
+ })) && (undefined === input["in"] || "header" === input["in"] || "query" === input["in"] || "cookie" === input["in"] || $guard(_exceptionable, {
366
+ path: _path + "[\"in\"]",
367
+ expected: "(\"cookie\" | \"header\" | \"query\" | undefined)",
368
+ value: input["in"]
369
+ })) && (undefined === input.name || "string" === typeof input.name || $guard(_exceptionable, {
370
+ path: _path + ".name",
371
+ expected: "(string | undefined)",
372
+ value: input.name
373
+ }));
374
+ const $ao10 = (input, _path, _exceptionable = true) => ("openIdConnect" === input.type || $guard(_exceptionable, {
375
+ path: _path + ".type",
376
+ expected: "\"openIdConnect\"",
377
+ value: input.type
378
+ })) && ("string" === typeof input.openIdConnectUrl || $guard(_exceptionable, {
379
+ path: _path + ".openIdConnectUrl",
380
+ expected: "string",
381
+ value: input.openIdConnectUrl
382
+ }));
383
+ const $ao11 = (input, _path, _exceptionable = true) => ("oauth2" === input.type || $guard(_exceptionable, {
384
+ path: _path + ".type",
385
+ expected: "\"oauth2\"",
386
+ value: input.type
387
+ })) && (("object" === typeof input.flows && null !== input.flows && false === Array.isArray(input.flows) || $guard(_exceptionable, {
388
+ path: _path + ".flows",
389
+ expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
390
+ value: input.flows
391
+ })) && $ao12(input.flows, _path + ".flows", true && _exceptionable) || $guard(_exceptionable, {
392
+ path: _path + ".flows",
393
+ expected: "ISwaggerSecurityScheme.IOAuth2.IFlowSet",
394
+ value: input.flows
395
+ })) && (undefined === input.description || "string" === typeof input.description || $guard(_exceptionable, {
396
+ path: _path + ".description",
397
+ expected: "(string | undefined)",
398
+ value: input.description
399
+ }));
400
+ const $ao12 = (input, _path, _exceptionable = true) => (undefined === input.authorizationCode || ("object" === typeof input.authorizationCode && null !== input.authorizationCode || $guard(_exceptionable, {
401
+ path: _path + ".authorizationCode",
402
+ expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
403
+ value: input.authorizationCode
404
+ })) && $ao13(input.authorizationCode, _path + ".authorizationCode", true && _exceptionable) || $guard(_exceptionable, {
405
+ path: _path + ".authorizationCode",
406
+ expected: "(ISwaggerSecurityScheme.IOAuth2.IFlow | undefined)",
407
+ value: input.authorizationCode
408
+ })) && (undefined === input.implicit || ("object" === typeof input.implicit && null !== input.implicit || $guard(_exceptionable, {
409
+ path: _path + ".implicit",
410
+ expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
411
+ value: input.implicit
412
+ })) && $ao15(input.implicit, _path + ".implicit", true && _exceptionable) || $guard(_exceptionable, {
413
+ path: _path + ".implicit",
414
+ expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"tokenUrl\"> | undefined)",
415
+ value: input.implicit
416
+ })) && (undefined === input.password || ("object" === typeof input.password && null !== input.password || $guard(_exceptionable, {
417
+ path: _path + ".password",
418
+ expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
419
+ value: input.password
420
+ })) && $ao16(input.password, _path + ".password", true && _exceptionable) || $guard(_exceptionable, {
421
+ path: _path + ".password",
422
+ expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
423
+ value: input.password
424
+ })) && (undefined === input.clientCredentials || ("object" === typeof input.clientCredentials && null !== input.clientCredentials || $guard(_exceptionable, {
425
+ path: _path + ".clientCredentials",
426
+ expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
427
+ value: input.clientCredentials
428
+ })) && $ao16(input.clientCredentials, _path + ".clientCredentials", true && _exceptionable) || $guard(_exceptionable, {
429
+ path: _path + ".clientCredentials",
430
+ expected: "(Omit<ISwaggerSecurityScheme.IOAuth2.IFlow, \"authorizationUrl\"> | undefined)",
431
+ value: input.clientCredentials
432
+ }));
433
+ const $ao13 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
434
+ path: _path + ".authorizationUrl",
435
+ expected: "string",
436
+ value: input.authorizationUrl
437
+ })) && ("string" === typeof input.tokenUrl || $guard(_exceptionable, {
438
+ path: _path + ".tokenUrl",
439
+ expected: "string",
440
+ value: input.tokenUrl
441
+ })) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
442
+ path: _path + ".refreshUrl",
443
+ expected: "string",
444
+ value: input.refreshUrl
445
+ })) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
446
+ path: _path + ".scopes",
447
+ expected: "(Record<string, string> | undefined)",
448
+ value: input.scopes
449
+ })) && $ao14(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
450
+ path: _path + ".scopes",
451
+ expected: "(Record<string, string> | undefined)",
452
+ value: input.scopes
453
+ }));
454
+ const $ao14 = (input, _path, _exceptionable = true) => false === _exceptionable || Object.keys(input).every(key => {
455
+ const value = input[key];
456
+ if (undefined === value)
457
+ return true;
458
+ if (RegExp(/(.*)/).test(key))
459
+ return "string" === typeof value || $guard(_exceptionable, {
460
+ path: _path + $join(key),
461
+ expected: "string",
462
+ value: value
463
+ });
464
+ return true;
465
+ });
466
+ const $ao15 = (input, _path, _exceptionable = true) => ("string" === typeof input.authorizationUrl || $guard(_exceptionable, {
467
+ path: _path + ".authorizationUrl",
468
+ expected: "string",
469
+ value: input.authorizationUrl
470
+ })) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
471
+ path: _path + ".refreshUrl",
472
+ expected: "string",
473
+ value: input.refreshUrl
474
+ })) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
475
+ path: _path + ".scopes",
476
+ expected: "(Record<string, string> | undefined)",
477
+ value: input.scopes
478
+ })) && $ao14(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
479
+ path: _path + ".scopes",
480
+ expected: "(Record<string, string> | undefined)",
481
+ value: input.scopes
482
+ }));
483
+ const $ao16 = (input, _path, _exceptionable = true) => ("string" === typeof input.tokenUrl || $guard(_exceptionable, {
484
+ path: _path + ".tokenUrl",
485
+ expected: "string",
486
+ value: input.tokenUrl
487
+ })) && ("string" === typeof input.refreshUrl || $guard(_exceptionable, {
488
+ path: _path + ".refreshUrl",
489
+ expected: "string",
490
+ value: input.refreshUrl
491
+ })) && (undefined === input.scopes || ("object" === typeof input.scopes && null !== input.scopes && false === Array.isArray(input.scopes) || $guard(_exceptionable, {
492
+ path: _path + ".scopes",
493
+ expected: "(Record<string, string> | undefined)",
494
+ value: input.scopes
495
+ })) && $ao14(input.scopes, _path + ".scopes", true && _exceptionable) || $guard(_exceptionable, {
496
+ path: _path + ".scopes",
497
+ expected: "(Record<string, string> | undefined)",
498
+ value: input.scopes
499
+ }));
500
+ const $ao17 = (input, _path, _exceptionable = true) => ((Array.isArray(input.include) || $guard(_exceptionable, {
501
+ path: _path + ".include",
502
+ expected: "Array<string>",
503
+ value: input.include
504
+ })) && input.include.every((elem, _index3) => "string" === typeof elem || $guard(_exceptionable, {
505
+ path: _path + ".include[" + _index3 + "]",
506
+ expected: "string",
507
+ value: elem
508
+ })) || $guard(_exceptionable, {
509
+ path: _path + ".include",
510
+ expected: "Array<string>",
511
+ value: input.include
512
+ })) && (undefined === input.exclude || (Array.isArray(input.exclude) || $guard(_exceptionable, {
513
+ path: _path + ".exclude",
514
+ expected: "(Array<string> | undefined)",
515
+ value: input.exclude
516
+ })) && input.exclude.every((elem, _index4) => "string" === typeof elem || $guard(_exceptionable, {
517
+ path: _path + ".exclude[" + _index4 + "]",
518
+ expected: "string",
519
+ value: elem
520
+ })) || $guard(_exceptionable, {
521
+ path: _path + ".exclude",
522
+ expected: "(Array<string> | undefined)",
523
+ value: input.exclude
524
+ }));
525
+ const $au0 = (input, _path, _exceptionable = true) => (() => {
526
+ if ("basic" === input.scheme)
527
+ return $ao7(input, _path, true && _exceptionable);
528
+ else if ("bearer" === input.scheme)
529
+ return $ao8(input, _path, true && _exceptionable);
530
+ else if ("apiKey" === input.type)
531
+ return $ao9(input, _path, true && _exceptionable);
532
+ else if ("openIdConnect" === input.type)
533
+ return $ao10(input, _path, true && _exceptionable);
534
+ else if ("oauth2" === input.type)
535
+ return $ao11(input, _path, true && _exceptionable);
536
+ else
537
+ return $guard(_exceptionable, {
538
+ path: _path,
539
+ expected: "(ISwaggerSecurityScheme.IHttpBasic | ISwaggerSecurityScheme.IHttpBearer | ISwaggerSecurityScheme.IApiKey | ISwaggerSecurityScheme.IOpenId | ISwaggerSecurityScheme.IOAuth2)",
540
+ value: input
541
+ });
542
+ })();
543
+ return ("object" === typeof input && null !== input || $guard(true, {
544
+ path: _path + "",
545
+ expected: "INestiaConfig",
546
+ value: input
547
+ })) && $ao0(input, _path + "", true) || $guard(true, {
548
+ path: _path + "",
549
+ expected: "INestiaConfig",
550
+ value: input
551
+ });
552
+ })(input, "$input", true);
553
+ return input;
554
+ })(config);
555
+ }
556
+ catch (exp) {
557
+ if ((input => {
558
+ const $io0 = input => "string" === typeof input.method && (undefined === input.path || "string" === typeof input.path) && "string" === typeof input.expected && true && "string" === typeof input.name && "string" === typeof input.message && (undefined === input.stack || "string" === typeof input.stack);
559
+ return "object" === typeof input && null !== input && $io0(input);
560
+ })(exp))
561
+ exp.message = `invalid "nestia.config.ts" data.`;
562
+ throw exp;
563
+ }
564
+ });
565
+ NestiaConfigLoader.project = () => __awaiter(this, void 0, void 0, function* () {
566
+ const connector = new WorkerConnector_1.WorkerConnector(null, null, "process");
567
+ yield connector.connect(`${__dirname}/nestia.project.getter.${__filename.substr(-2)}`);
568
+ const driver = yield connector.getDriver();
569
+ const project = yield driver.get();
570
+ yield connector.close();
571
+ return project;
572
+ });
573
+ })(NestiaConfigLoader || (exports.NestiaConfigLoader = NestiaConfigLoader = {}));
574
+ //# sourceMappingURL=NestiaConfigLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NestiaConfigLoader.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaConfigLoader.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ export declare namespace NestiaProjectGetter {
2
+ function get(): Promise<string>;
3
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.NestiaProjectGetter = void 0;
13
+ const NestiaConfigLoader_1 = require("./NestiaConfigLoader");
14
+ var NestiaProjectGetter;
15
+ (function (NestiaProjectGetter) {
16
+ function get() {
17
+ var _a;
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ const config = yield NestiaConfigLoader_1.NestiaConfigLoader.config({
20
+ module: "CommonJS",
21
+ noEmit: true,
22
+ });
23
+ return (_a = config.project) !== null && _a !== void 0 ? _a : "tsconfig.json";
24
+ });
25
+ }
26
+ NestiaProjectGetter.get = get;
27
+ })(NestiaProjectGetter || (exports.NestiaProjectGetter = NestiaProjectGetter = {}));
28
+ //# sourceMappingURL=NestiaProjectGetter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NestiaProjectGetter.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaProjectGetter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAA0D;AAE1D,IAAiB,mBAAmB,CAQnC;AARD,WAAiB,mBAAmB;IAChC,SAAsB,GAAG;;;YACrB,MAAM,MAAM,GAAG,MAAM,uCAAkB,CAAC,MAAM,CAAC;gBAC3C,MAAM,EAAE,UAAiB;gBACzB,MAAM,EAAE,IAAI;aACf,CAAC,CAAC;YACH,OAAO,MAAA,MAAM,CAAC,OAAO,mCAAI,eAAe,CAAC;;KAC5C;IANqB,uBAAG,MAMxB,CAAA;AACL,CAAC,EARgB,mBAAmB,mCAAnB,mBAAmB,QAQnC"}