Socket
Socket
Sign inDemoInstall

nestia

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nestia - npm Package Compare versions

Comparing version 4.3.2 to 4.4.0-dev.20230607

8

package.json
{
"name": "nestia",
"version": "4.3.2",
"version": "4.4.0-dev.20230607",
"description": "Nestia CLI tool",

@@ -39,4 +39,4 @@ "main": "bin/index.js",

"devDependencies": {
"@nestia/core": "^1.3.0",
"@nestia/sdk": "^1.3.0",
"@nestia/core": "^1.6.1",
"@nestia/sdk": "^1.6.1",
"@trivago/prettier-plugin-sort-imports": "^4.1.1",

@@ -47,3 +47,3 @@ "@types/inquirer": "^9.0.3",

"rimraf": "^3.0.2",
"typescript": "^5.1.3"
"typescript": "^5.1.6"
},

@@ -50,0 +50,0 @@ "files": [

@@ -14,5 +14,7 @@ # Nestia

- `@nestia/sdk`:
- SDK generator for clients
- Swagger generator evolved than ever
- SDK library generator for clients
- Mockup Simulator for client applications
- Automatic E2E test functions generator
- `@nestia/migrate`: migration from Swagger to NestJS
- `nestia`: just CLI (command line interface) tool

@@ -23,9 +25,13 @@

> - **Only one line** required, with pure TypeScript type
> - Runtime validator is **20,000x faster** than `class-validator`
> - JSON serialization is **200x faster** than `class-transformer`
> - SDK is similar with [tRPC](https://trpc.io), but much advanced
> - Enhance performance **30x** up
> - Runtime validator is **20,000x faster** than `class-validator`
> - JSON serialization is **200x faster** than `class-transformer`
> - Software Development Kit
> - SDK is a collection of `fetch` functions with type definitions like [tRPC](https://trpc.io/)
> - Mockup simulator means embedded backend simulator in SDK
> - similar with [msw](https://mswjs.io/), but fully automated
![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)
> Left is server code, and right is client code utilizing SDK
> Left is NestJS server code, and right is client (frontend) code utilizing SDK

@@ -51,5 +57,5 @@

- [Setup](https://nestia.io/docs/setup/)
- [Pure TypeScript](https://nestia.io/docs/pure)
### 📖 Features
- [Pure TypeScript](https://nestia.io/docs/pure)
- Core Library

@@ -64,1 +70,7 @@ - [TypedRoute](https://nestia.io/docs/core/TypedRoute/)

- [E2E Functions](https://nestia.io/docs/sdk/e2e/)
- [Mockup Simulator](https://nestia.io/docs/sdk/simulator/)
- [Swagger to NestJS](https://nestia.io/docs/migrate/)
### 🔗 Appendix
- [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
- [⇲ `dev.to` Articles](https://dev.to/samchon/series/22751)

@@ -15,3 +15,3 @@ import commander from "commander";

// PREPARE ASSETS
commander.program.option("--manager [manager", "package manager");
commander.program.option("--manager [manager]", "package manager");
commander.program.option(

@@ -43,2 +43,3 @@ "--project [project]",

choices: Choice[],
filter?: (value: string) => Choice,
): Promise<Choice> => {

@@ -52,2 +53,3 @@ questioned.value = true;

choices: choices,
filter,
})

@@ -84,7 +86,10 @@ )[name];

return action(async (options) => {
options.manager ??= await select("manager")("Package Manager")([
"npm" as const,
"pnpm" as const,
"yarn" as const,
]);
options.manager ??= await select("manager")("Package Manager")(
[
"npm" as const,
"pnpm" as const,
"yarn (berry is not supported)" as "yarn",
],
(value) => value.split(" ")[0] as "yarn",
);
pack.manager = options.manager;

@@ -91,0 +96,0 @@ options.project ??= await configure();

@@ -23,3 +23,5 @@ import { ArgumentParser } from "./internal/ArgumentParser";

args.project ??= (() => {
CommandExecutor.run("npx tsc --init");
const runner: string =
pack.manager === "npm" ? "npx" : pack.manager;
CommandExecutor.run(`${runner} tsc --init`);
return (args.project = "tsconfig.json");

@@ -30,13 +32,25 @@ })();

await pack.save((data) => {
// COMPOSE POSTINSTALL COMMAND
data.scripts ??= {};
if (
typeof data.scripts.prepare === "string" &&
data.scripts.prepare.length
typeof data.scripts.postinstall === "string" &&
data.scripts.postinstall.trim().length
) {
if (data.scripts.prepare.indexOf("ts-patch install") === -1)
data.scripts.prepare =
"ts-patch install && " + data.scripts.prepare;
} else data.scripts.prepare = "ts-patch install";
if (data.scripts.postinstall.indexOf("ts-patch install") === -1)
data.scripts.postinstall =
"ts-patch install && " + data.scripts.postinstall;
} else data.scripts.postinstall = "ts-patch install";
// FOR OLDER VERSIONS
if (typeof data.scripts.prepare === "string") {
data.scripts.prepare = data.scripts.prepare
.split("&&")
.map((str) => str.trim())
.filter((str) => str.indexOf("ts-patch install") === -1)
.join(" && ");
if (data.scripts.prepare.length === 0)
delete data.scripts.prepare;
}
});
CommandExecutor.run("npm run prepare");
CommandExecutor.run(`${pack.manager} run postinstall`);

@@ -43,0 +57,0 @@ // INSTALL AND CONFIGURE TYPIA + NESTIA

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc