@nestia/sdk 2.3.0 → 2.3.1-dev.20231019
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/executable/internal/NestiaConfigLoader.d.ts +0 -1
- package/lib/executable/internal/NestiaConfigLoader.js +1 -10
- package/lib/executable/internal/NestiaConfigLoader.js.map +1 -1
- package/lib/executable/internal/NestiaSdkCommand.js +15 -11
- package/lib/executable/internal/NestiaSdkCommand.js.map +1 -1
- package/package.json +3 -4
- package/src/executable/internal/NestiaConfigLoader.ts +1 -18
- package/src/executable/internal/NestiaSdkCommand.ts +23 -10
- package/lib/executable/internal/NestiaProjectGetter.d.ts +0 -3
- package/lib/executable/internal/NestiaProjectGetter.js +0 -28
- package/lib/executable/internal/NestiaProjectGetter.js.map +0 -1
- package/lib/executable/internal/nestia.project.getter.d.ts +0 -1
- package/lib/executable/internal/nestia.project.getter.js +0 -24
- package/lib/executable/internal/nestia.project.getter.js.map +0 -1
- package/src/executable/internal/NestiaProjectGetter.ts +0 -11
- package/src/executable/internal/nestia.project.getter.ts +0 -12
|
@@ -3,5 +3,4 @@ import { INestiaConfig } from "../../INestiaConfig";
|
|
|
3
3
|
export declare namespace NestiaConfigLoader {
|
|
4
4
|
const compilerOptions: (project: string) => Promise<ts.CompilerOptions>;
|
|
5
5
|
const config: (file: string, options: ts.CompilerOptions) => Promise<INestiaConfig>;
|
|
6
|
-
const project: (file: string) => Promise<string>;
|
|
7
6
|
}
|
|
@@ -49,7 +49,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
49
49
|
exports.NestiaConfigLoader = void 0;
|
|
50
50
|
const fs_1 = __importDefault(require("fs"));
|
|
51
51
|
const path_1 = __importDefault(require("path"));
|
|
52
|
-
const WorkerConnector_1 = require("tgrid/protocols/workers/WorkerConnector");
|
|
53
52
|
const ts_node_1 = require("ts-node");
|
|
54
53
|
const tsconfck_1 = require("tsconfck");
|
|
55
54
|
const typescript_1 = __importDefault(require("typescript"));
|
|
@@ -59,7 +58,7 @@ var NestiaConfigLoader;
|
|
|
59
58
|
NestiaConfigLoader.compilerOptions = (project) => __awaiter(this, void 0, void 0, function* () {
|
|
60
59
|
const configFileName = typescript_1.default.findConfigFile(process.cwd(), typescript_1.default.sys.fileExists, project);
|
|
61
60
|
if (!configFileName)
|
|
62
|
-
throw new Error(`unable to find "
|
|
61
|
+
throw new Error(`unable to find "${project}" file.`);
|
|
63
62
|
const { tsconfig } = yield (0, tsconfck_1.parseNative)(configFileName);
|
|
64
63
|
const configFileText = JSON.stringify(tsconfig);
|
|
65
64
|
const { config } = typescript_1.default.parseConfigFileTextToJson(configFileName, configFileText);
|
|
@@ -570,13 +569,5 @@ var NestiaConfigLoader;
|
|
|
570
569
|
throw exp;
|
|
571
570
|
}
|
|
572
571
|
});
|
|
573
|
-
NestiaConfigLoader.project = (file) => __awaiter(this, void 0, void 0, function* () {
|
|
574
|
-
const connector = new WorkerConnector_1.WorkerConnector(null, null, "process");
|
|
575
|
-
yield connector.connect(`${__dirname}/nestia.project.getter.${__filename.substring(__filename.length - 2)}`);
|
|
576
|
-
const driver = yield connector.getDriver();
|
|
577
|
-
const project = yield driver.get(file);
|
|
578
|
-
yield connector.close();
|
|
579
|
-
return project;
|
|
580
|
-
});
|
|
581
572
|
})(NestiaConfigLoader || (exports.NestiaConfigLoader = NestiaConfigLoader = {}));
|
|
582
573
|
//# sourceMappingURL=NestiaConfigLoader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaConfigLoader.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaConfigLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAoB;AACpB,gDAAwB;AACxB,
|
|
1
|
+
{"version":3,"file":"NestiaConfigLoader.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaConfigLoader.ts"],"names":[],"mappings":";;;;;;;;;;;;;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ACb;IACL,CAAC,CAAA,CAAC;AACN,CAAC,EAzDgB,kBAAkB,kCAAlB,kBAAkB,QAyDlC"}
|
|
@@ -21,28 +21,32 @@ var NestiaSdkCommand;
|
|
|
21
21
|
yield generate(task);
|
|
22
22
|
});
|
|
23
23
|
const generate = (task) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
var _a;
|
|
24
|
+
var _a, _b;
|
|
25
25
|
// LOAD CONFIG INFO
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
const compilerOptions = yield NestiaConfigLoader_1.NestiaConfigLoader.compilerOptions((_a = getFileArgument({
|
|
27
|
+
type: "project",
|
|
28
|
+
extension: "json",
|
|
29
|
+
})) !== null && _a !== void 0 ? _a : "tsconfig.json");
|
|
30
|
+
const config = yield NestiaConfigLoader_1.NestiaConfigLoader.config((_b = getFileArgument({
|
|
31
|
+
type: "config",
|
|
32
|
+
extension: "ts",
|
|
33
|
+
})) !== null && _b !== void 0 ? _b : "nestia.config.ts", compilerOptions);
|
|
30
34
|
// GENERATE
|
|
31
35
|
const app = new NestiaSdkApplication_1.NestiaSdkApplication(config, compilerOptions);
|
|
32
36
|
yield task(app);
|
|
33
37
|
});
|
|
34
|
-
const
|
|
38
|
+
const getFileArgument = (props) => {
|
|
35
39
|
const argv = process.argv.slice(3);
|
|
36
|
-
if (argv.length
|
|
40
|
+
if (argv.length === 0)
|
|
37
41
|
return null;
|
|
38
|
-
const index = argv.findIndex((str) => str ===
|
|
42
|
+
const index = argv.findIndex((str) => str === `--${props.type}`);
|
|
39
43
|
if (index === -1)
|
|
40
44
|
return null;
|
|
41
45
|
else if (argv.length === 1)
|
|
42
|
-
throw new Error(
|
|
46
|
+
throw new Error(`${props.type} file must be provided`);
|
|
43
47
|
const file = argv[index + 1];
|
|
44
|
-
if (file.endsWith(
|
|
45
|
-
throw new Error(
|
|
48
|
+
if (file.endsWith(props.extension) === false)
|
|
49
|
+
throw new Error(`${props.type} file must be ${props.extension} file`);
|
|
46
50
|
return file;
|
|
47
51
|
};
|
|
48
52
|
})(NestiaSdkCommand || (exports.NestiaSdkCommand = NestiaSdkCommand = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NestiaSdkCommand.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaSdkCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,qEAAkE;AAClE,6DAA0D;AAE1D,IAAiB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"NestiaSdkCommand.js","sourceRoot":"","sources":["../../../src/executable/internal/NestiaSdkCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,qEAAkE;AAClE,6DAA0D;AAE1D,IAAiB,gBAAgB,CAyDhC;AAzDD,WAAiB,gBAAgB;IAChB,oBAAG,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;IACrC,wBAAO,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAC7C,oBAAG,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;IAElD,MAAM,IAAI,GAAG,CAAO,IAAkD,EAAE,EAAE;QACtE,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC,CAAA,CAAC;IAEF,MAAM,QAAQ,GAAG,CACb,IAAkD,EACpD,EAAE;;QACA,mBAAmB;QACnB,MAAM,eAAe,GACjB,MAAM,uCAAkB,CAAC,eAAe,CACpC,MAAA,eAAe,CAAC;YACZ,IAAI,EAAE,SAAS;YACf,SAAS,EAAE,MAAM;SACpB,CAAC,mCAAI,eAAe,CACxB,CAAC;QACN,MAAM,MAAM,GAAkB,MAAM,uCAAkB,CAAC,MAAM,CACzD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"2.3.1-dev.20231019",
|
|
4
4
|
"description": "Nestia SDK and Swagger generator",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -35,20 +35,19 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://nestia.io",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@nestia/fetcher": "^2.3.
|
|
38
|
+
"@nestia/fetcher": "^2.3.1-dev.20231019",
|
|
39
39
|
"cli": "^1.0.1",
|
|
40
40
|
"get-function-location": "^2.0.0",
|
|
41
41
|
"glob": "^7.2.0",
|
|
42
42
|
"path-to-regexp": "^6.2.1",
|
|
43
43
|
"reflect-metadata": ">=0.1.12",
|
|
44
|
-
"tgrid": "^0.8.8",
|
|
45
44
|
"tsconfck": "^2.0.1",
|
|
46
45
|
"tsconfig-paths": "^4.1.1",
|
|
47
46
|
"tstl": "^2.5.13",
|
|
48
47
|
"typia": "^5.2.3"
|
|
49
48
|
},
|
|
50
49
|
"peerDependencies": {
|
|
51
|
-
"@nestia/fetcher": ">=2.3.
|
|
50
|
+
"@nestia/fetcher": ">=2.3.1-dev.20231019",
|
|
52
51
|
"@nestjs/common": ">=7.0.1",
|
|
53
52
|
"@nestjs/core": ">=7.0.1",
|
|
54
53
|
"reflect-metadata": ">=0.1.12",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
-
import { WorkerConnector } from "tgrid/protocols/workers/WorkerConnector";
|
|
4
3
|
import { register } from "ts-node";
|
|
5
4
|
import { parseNative } from "tsconfck";
|
|
6
5
|
import ts from "typescript";
|
|
@@ -8,7 +7,6 @@ import ts from "typescript";
|
|
|
8
7
|
import typia from "typia";
|
|
9
8
|
|
|
10
9
|
import { INestiaConfig } from "../../INestiaConfig";
|
|
11
|
-
import { NestiaProjectGetter } from "./NestiaProjectGetter";
|
|
12
10
|
|
|
13
11
|
export namespace NestiaConfigLoader {
|
|
14
12
|
export const compilerOptions = async (
|
|
@@ -20,7 +18,7 @@ export namespace NestiaConfigLoader {
|
|
|
20
18
|
project,
|
|
21
19
|
);
|
|
22
20
|
if (!configFileName)
|
|
23
|
-
throw new Error(`unable to find "
|
|
21
|
+
throw new Error(`unable to find "${project}" file.`);
|
|
24
22
|
|
|
25
23
|
const { tsconfig } = await parseNative(configFileName);
|
|
26
24
|
const configFileText = JSON.stringify(tsconfig);
|
|
@@ -67,19 +65,4 @@ export namespace NestiaConfigLoader {
|
|
|
67
65
|
throw exp;
|
|
68
66
|
}
|
|
69
67
|
};
|
|
70
|
-
|
|
71
|
-
export const project = async (file: string): Promise<string> => {
|
|
72
|
-
const connector = new WorkerConnector(null, null, "process");
|
|
73
|
-
await connector.connect(
|
|
74
|
-
`${__dirname}/nestia.project.getter.${__filename.substring(
|
|
75
|
-
__filename.length - 2,
|
|
76
|
-
)}`,
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
const driver = await connector.getDriver<typeof NestiaProjectGetter>();
|
|
80
|
-
const project: string = await driver.get(file);
|
|
81
|
-
await connector.close();
|
|
82
|
-
|
|
83
|
-
return project;
|
|
84
|
-
};
|
|
85
68
|
}
|
|
@@ -17,12 +17,18 @@ export namespace NestiaSdkCommand {
|
|
|
17
17
|
task: (app: NestiaSdkApplication) => Promise<void>,
|
|
18
18
|
) => {
|
|
19
19
|
// LOAD CONFIG INFO
|
|
20
|
-
const file: string = getConfigFile() ?? "nestia.config.ts";
|
|
21
|
-
const project: string = await NestiaConfigLoader.project(file);
|
|
22
20
|
const compilerOptions: ts.CompilerOptions =
|
|
23
|
-
await NestiaConfigLoader.compilerOptions(
|
|
21
|
+
await NestiaConfigLoader.compilerOptions(
|
|
22
|
+
getFileArgument({
|
|
23
|
+
type: "project",
|
|
24
|
+
extension: "json",
|
|
25
|
+
}) ?? "tsconfig.json",
|
|
26
|
+
);
|
|
24
27
|
const config: INestiaConfig = await NestiaConfigLoader.config(
|
|
25
|
-
|
|
28
|
+
getFileArgument({
|
|
29
|
+
type: "config",
|
|
30
|
+
extension: "ts",
|
|
31
|
+
}) ?? "nestia.config.ts",
|
|
26
32
|
compilerOptions,
|
|
27
33
|
);
|
|
28
34
|
|
|
@@ -34,18 +40,25 @@ export namespace NestiaSdkCommand {
|
|
|
34
40
|
await task(app);
|
|
35
41
|
};
|
|
36
42
|
|
|
37
|
-
const
|
|
43
|
+
const getFileArgument = (props: {
|
|
44
|
+
type: string;
|
|
45
|
+
extension: string;
|
|
46
|
+
}): string | null => {
|
|
38
47
|
const argv: string[] = process.argv.slice(3);
|
|
39
|
-
if (argv.length
|
|
48
|
+
if (argv.length === 0) return null;
|
|
40
49
|
|
|
41
|
-
const index: number = argv.findIndex(
|
|
50
|
+
const index: number = argv.findIndex(
|
|
51
|
+
(str) => str === `--${props.type}`,
|
|
52
|
+
);
|
|
42
53
|
if (index === -1) return null;
|
|
43
54
|
else if (argv.length === 1)
|
|
44
|
-
throw new Error(
|
|
55
|
+
throw new Error(`${props.type} file must be provided`);
|
|
45
56
|
|
|
46
57
|
const file: string = argv[index + 1];
|
|
47
|
-
if (file.endsWith(
|
|
48
|
-
throw new Error(
|
|
58
|
+
if (file.endsWith(props.extension) === false)
|
|
59
|
+
throw new Error(
|
|
60
|
+
`${props.type} file must be ${props.extension} file`,
|
|
61
|
+
);
|
|
49
62
|
return file;
|
|
50
63
|
};
|
|
51
64
|
}
|
|
@@ -1,28 +0,0 @@
|
|
|
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(file) {
|
|
17
|
-
var _a;
|
|
18
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
const config = yield NestiaConfigLoader_1.NestiaConfigLoader.config(file, {
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,CAAC,IAAY;;;YAClC,MAAM,MAAM,GAAG,MAAM,uCAAkB,CAAC,MAAM,CAAC,IAAI,EAAE;gBACjD,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
const WorkerServer_1 = require("tgrid/protocols/workers/WorkerServer");
|
|
13
|
-
const NestiaProjectGetter_1 = require("./NestiaProjectGetter");
|
|
14
|
-
function main() {
|
|
15
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
-
const worker = new WorkerServer_1.WorkerServer();
|
|
17
|
-
yield worker.open(NestiaProjectGetter_1.NestiaProjectGetter);
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
main().catch((exp) => {
|
|
21
|
-
console.log(exp);
|
|
22
|
-
process.exit(-1);
|
|
23
|
-
});
|
|
24
|
-
//# sourceMappingURL=nestia.project.getter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nestia.project.getter.js","sourceRoot":"","sources":["../../../src/executable/internal/nestia.project.getter.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uEAAoE;AAEpE,+DAA4D;AAE5D,SAAe,IAAI;;QACf,MAAM,MAAM,GAAG,IAAI,2BAAY,EAAE,CAAC;QAClC,MAAM,MAAM,CAAC,IAAI,CAAC,yCAAmB,CAAC,CAAC;IAC3C,CAAC;CAAA;AACD,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACjB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { NestiaConfigLoader } from "./NestiaConfigLoader";
|
|
2
|
-
|
|
3
|
-
export namespace NestiaProjectGetter {
|
|
4
|
-
export async function get(file: string): Promise<string> {
|
|
5
|
-
const config = await NestiaConfigLoader.config(file, {
|
|
6
|
-
module: "CommonJS" as any,
|
|
7
|
-
noEmit: true,
|
|
8
|
-
});
|
|
9
|
-
return config.project ?? "tsconfig.json";
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { WorkerServer } from "tgrid/protocols/workers/WorkerServer";
|
|
2
|
-
|
|
3
|
-
import { NestiaProjectGetter } from "./NestiaProjectGetter";
|
|
4
|
-
|
|
5
|
-
async function main(): Promise<void> {
|
|
6
|
-
const worker = new WorkerServer();
|
|
7
|
-
await worker.open(NestiaProjectGetter);
|
|
8
|
-
}
|
|
9
|
-
main().catch((exp) => {
|
|
10
|
-
console.log(exp);
|
|
11
|
-
process.exit(-1);
|
|
12
|
-
});
|