Skip to content

Commit

Permalink
Publish v1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Apr 26, 2023
1 parent 064aa17 commit 0d984d6
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 29 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nestia",
"version": "4.1.0-dev.20230413",
"version": "4.1.0",
"description": "Nestia CLI tool",
"main": "bin/index.js",
"bin": {
Expand Down Expand Up @@ -35,8 +35,8 @@
"inquirer": "^8.2.5"
},
"devDependencies": {
"@nestia/core": "^1.0.17",
"@nestia/sdk": "^1.0.16",
"@nestia/core": "^1.1.0",
"@nestia/sdk": "^1.1.0",
"@types/inquirer": "^9.0.3",
"@types/node": "^18.11.16",
"prettier": "^2.8.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/core",
"version": "1.1.0-dev.20230427-2",
"version": "1.1.0",
"description": "Super-fast validation decorators of NestJS",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand Down
10 changes: 5 additions & 5 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestia/sdk",
"version": "1.1.0-dev.20230420",
"version": "1.1.0",
"description": "Nestia SDK and Swagger generator",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
Expand All @@ -9,7 +9,7 @@
},
"scripts": {
"build": "rimraf lib && tsc",
"dev": "rimraf lib &&ttsc --watch",
"dev": "rimraf lib && tsc --watch",
"eslint": "eslint ./**/*.ts",
"package:latest": "npm run build && npm run test && npm publish --access public",
"package:next": "npm run package:latest -- --tag next",
Expand Down Expand Up @@ -43,7 +43,7 @@
"tsconfck": "^2.0.1",
"tsconfig-paths": "^4.1.1",
"tstl": "^2.5.13",
"typia": "^3.8.0-dev.20230420-3"
"typia": "^3.8.1"
},
"peerDependencies": {
"@nestjs/common": ">= 7.0.1",
Expand All @@ -53,8 +53,8 @@
"typescript": ">= 4.5.2"
},
"devDependencies": {
"@nestia/core": "^1.1.0-dev.20230420",
"@nestia/fetcher": "^1.1.0-dev.20230420-2",
"@nestia/core": "^1.1.0",
"@nestia/fetcher": "^1.1.2",
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
"@types/cli": "^0.11.21",
"@types/express": "^4.17.15",
Expand Down
30 changes: 22 additions & 8 deletions src/NestiaSetupWizard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,37 @@ export namespace NestiaSetupWizard {
console.log(" Nestia Setup Wizard");
console.log("----------------------------------------");

// LOAD PACKAGE.JSON INFO
// PREPARE ASSETS
const pack: PackageManager = await PackageManager.mount();

// TAKE ARGUMENTS
const args: ArgumentParser.IArguments = await ArgumentParser.parse(
pack,
);

// INSTALL TYPESCRIPT
pack.install({ dev: true, modulo: "typescript", version: "latest" });
// INSTALL TYPESCRIPT COMPILERS
pack.install({ dev: true, modulo: "ts-patch", version: "latest" });
pack.install({ dev: true, modulo: "ts-node", version: "latest" });
pack.install({
dev: true,
modulo: "typescript",
version: (() => {
const version: string = (() => {
try {
return require("ts-patch/package.json")?.version ?? "";
} catch {
return "";
}
})();
return Number(version.split(".")[0] ?? "") >= 3
? "latest"
: "4.9.5";
})(),
});
args.project ??= (() => {
CommandExecutor.run("npx tsc --init");
return (args.project = "tsconfig.json");
})();
pack.install({ dev: true, modulo: "ts-node", version: "latest" });

// INSTALL COMPILER
// SETUP TRANSFORMER
await pack.save((data) => {
data.scripts ??= {};
if (
Expand All @@ -39,7 +53,7 @@ export namespace NestiaSetupWizard {
});
CommandExecutor.run("npm run prepare");

// INSTALL AND CONFIGURE TYPIA
// INSTALL AND CONFIGURE TYPIA + NESTIA
pack.install({ dev: false, modulo: "typia", version: "latest" });
pack.install({ dev: false, modulo: "@nestia/core", version: "latest" });
pack.install({ dev: true, modulo: "@nestia/sdk", version: "latest" });
Expand Down
12 changes: 0 additions & 12 deletions src/internal/ArgumentParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export namespace ArgumentParser {

export async function parse(pack: PackageManager): Promise<IArguments> {
// PREPARE ASSETS
commander.program.option("--compiler [compiler]", "compiler type");
commander.program.option("--manager [manager", "package manager");
commander.program.option(
"--project [project]",
Expand Down Expand Up @@ -92,14 +91,3 @@ export namespace ArgumentParser {
});
}
}

// const COMPILER_DESCRIPTION = [
// `About compiler, if you adapt "ttypescript", you should use "ttsc" instead.`,
// ``,
// `Otherwise, you choose "ts-patch", you can use the original "tsc" command.`,
// `However, the "ts-patch" hacks "node_modules/typescript" source code.`,
// `Also, whenever update "typescript", you've to run "npm run prepare" command.`,
// ``,
// `By the way, when using "@nest/cli", you must just choose "ts-patch".`,
// ``,
// ].join("\n");
3 changes: 3 additions & 0 deletions src/internal/PluginConfigurator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export namespace PluginConfigurator {

// DO CONFIGURE
compilerOptions.strict = true;
compilerOptions.experimentalDecorators = true;
compilerOptions.emitDecoratorMetadata = true;

if (core === undefined)
plugins.push(
comments.parse(`{
Expand Down

0 comments on commit 0d984d6

Please sign in to comment.