Socket
Socket
Sign inDemoInstall

@nestjs/schematics

Package Overview
Dependencies
Maintainers
3
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nestjs/schematics - npm Package Compare versions

Comparing version 0.0.0 to 1.0.0-rc.1

application/files/nestconfig.json

3

application/factory.js

@@ -7,5 +7,6 @@ "use strict";

return schematics_1.mergeWith(schematics_1.apply(schematics_1.url('./files'), [
schematics_1.template(Object.assign({ classify: core_1.classify }, options))
schematics_1.template(Object.assign({}, core_1.strings, options)),
schematics_1.move(options.path)
]));
}
exports.main = main;

@@ -15,4 +15,28 @@ {

"description": "Create a Nest controller."
},
"service": {
"factory": "./service/factory#main",
"description": "Create a Nest service."
},
"middleware": {
"factory": "./middleware/factory#main",
"description": "Create a Nest middleware."
},
"exception": {
"factory": "./exception/factory#main",
"description": "Create a Nest exception."
},
"pipe": {
"factory": "./pipe/factory#main",
"description": "Create a Nest pipe."
},
"guard": {
"factory": "./guard/factory#main",
"description": "Create a Nest guard."
},
"interceptor": {
"factory": "./interceptor/factory#main",
"description": "Create a Nest interceptor."
}
}
}

@@ -5,8 +5,9 @@ "use strict";

const schematics_1 = require("@angular-devkit/schematics");
const path = require("path");
function main(options) {
return schematics_1.mergeWith(schematics_1.apply(schematics_1.url('./files'), [
schematics_1.template(Object.assign({ classify: core_1.classify }, options)),
schematics_1.move(options.rootDir),
schematics_1.template(Object.assign({}, core_1.strings, options)),
schematics_1.move(path.join(options.rootDir, options.path))
]));
}
exports.main = main;

@@ -5,8 +5,9 @@ "use strict";

const schematics_1 = require("@angular-devkit/schematics");
const path = require("path");
function main(options) {
return schematics_1.mergeWith(schematics_1.apply(schematics_1.url('./files'), [
schematics_1.template(Object.assign({ classify: core_1.classify }, options)),
schematics_1.move(options.rootDir),
schematics_1.template(Object.assign({}, core_1.strings, options)),
schematics_1.move(path.join(options.rootDir, options.path))
]));
}
exports.main = main;
{
"name": "@nestjs/schematics",
"version": "0.0.0",
"version": "1.0.0-rc.1",
"description": "Nestjs schematics project for @nestjs/cli",

@@ -13,3 +13,3 @@ "main": "index.js",

"lint:test": "tslint --project test/tsconfig.json",
"test": "mocha test/**/*.ts --require ts-node/register"
"test": "nyc mocha test/**/*.ts --require ts-node/register"
},

@@ -26,7 +26,6 @@ "repository": {

"homepage": "https://github.com/ThomRick/nest-cli-schematics#readme",
"dependencies": {
"@angular-devkit/core": "0.0.29",
"@angular-devkit/schematics": "0.0.52"
},
"dependencies": {},
"devDependencies": {
"@angular-devkit/core": "^0.4.2",
"@angular-devkit/schematics": "^0.4.2",
"@types/chai": "^4.1.2",

@@ -37,6 +36,29 @@ "@types/mocha": "^2.2.48",

"mocha": "^5.0.0",
"nyc": "^11.4.1",
"ts-lint": "^4.5.1",
"ts-node": "^4.1.0",
"typescript": "^2.7.1"
},
"schematics": "./collection.json",
"nyc": {
"include": [
"src"
],
"exclude": [
"node_modules",
"test"
],
"extension": [
".ts"
],
"require": [
"ts-node/register"
],
"reporter": [
"text-summary",
"html"
],
"sourceMap": true,
"instrument": true
}
}
[![Build Status](https://travis-ci.org/nestjs/schematics.svg?branch=master)](https://travis-ci.org/nestjs/schematics)
# @nestjs/schematics
Nestjs project and architecture element generation based on @angular-dekit/schematics engine
Nestjs architecture element generation based on @angular-dekit/schematics engine
## Build :
- `git clone https://github.com/nestjs/schematics.git`
### Steps with Docker
in the schematics folder :
- `make prepare`
- `make build`
### Steps without Docker
in the schematics folder :
- `npm install`
- `rm -rf schematics && mkdir schematics`
- `npm run -s build`
- `cp -R src/* schematics`
- `find schematics/ -name '*.ts' -delete`
- `find src -name '*.js' -delete`
- `cp -R LICENSE package.json package-lock.json README.md .npmrc schematics`
## Usages:
### With @angular-devkit/schematics-cli
install @angular-devkit/schematics-cli globally.
run `schematics [path_to_nestjs_schematics]:<nestjs_schematic_name> [...options]`
## Schematics:
| Name | Usage |
|-------------|---------------------------------------------------------------------------------------------------------------|
| application | .:application --extension=[ts OR js] --path=[your_path] |
| controller | .:controller --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] |
| exception | .:exception --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] |
| guard | .:guard --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] |
| interceptor | .:interceptor --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] |
| middleware | .:middleware --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] |
| module | .:module --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] |
| pipe | .:pipe --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] |
| service | .:service --extension=[ts OR js] --name=[your_name] --path=[relative_to_rooDir] --rootDir=[your_root_dir] |
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