@nestjs/schematics
Advanced tools
Comparing version 10.0.3 to 10.1.0
@@ -25,12 +25,12 @@ { | ||
"@nestjs/testing": "^10.0.0", | ||
"@babel/core": "7.23.2", | ||
"@babel/core": "7.23.7", | ||
"@babel/node": "7.22.19", | ||
"@babel/plugin-proposal-decorators": "7.23.2", | ||
"@babel/plugin-transform-runtime": "7.23.2", | ||
"@babel/preset-env": "7.23.2", | ||
"@babel/register": "7.22.15", | ||
"@babel/runtime": "7.23.2", | ||
"@babel/plugin-proposal-decorators": "7.23.7", | ||
"@babel/plugin-transform-runtime": "7.23.7", | ||
"@babel/preset-env": "7.23.7", | ||
"@babel/register": "7.23.7", | ||
"@babel/runtime": "7.23.7", | ||
"jest": "29.7.0", | ||
"nodemon": "3.0.1", | ||
"prettier": "3.0.3", | ||
"nodemon": "3.0.2", | ||
"prettier": "3.1.1", | ||
"supertest": "6.3.3" | ||
@@ -37,0 +37,0 @@ }, |
@@ -36,3 +36,3 @@ { | ||
"@types/node": "^20.3.1", | ||
"@types/supertest": "^2.0.12", | ||
"@types/supertest": "^6.0.0", | ||
"@typescript-eslint/eslint-plugin": "^6.0.0", | ||
@@ -39,0 +39,0 @@ "@typescript-eslint/parser": "^6.0.0", |
@@ -9,2 +9,3 @@ "use strict"; | ||
const defaults_1 = require("../defaults"); | ||
const readers_1 = require("../readers"); | ||
function main(options) { | ||
@@ -21,2 +22,20 @@ options = transform(options); | ||
exports.main = main; | ||
function getDefaultLibraryPrefix(defaultLibraryPrefix = '@app') { | ||
const fileSystemReader = new readers_1.FileSystemReader(process.cwd()); | ||
const content = fileSystemReader.readSyncAnyOf([ | ||
'nest-cli.json', | ||
'.nestcli.json', | ||
'.nest-cli.json', | ||
'nest.json', | ||
]); | ||
try { | ||
const nestJson = JSON.parse(content || '{}'); | ||
if (nestJson.hasOwnProperty('defaultLibraryPrefix')) { | ||
return nestJson['defaultLibraryPrefix']; | ||
} | ||
} | ||
catch (e) { | ||
} | ||
return defaultLibraryPrefix; | ||
} | ||
function transform(options) { | ||
@@ -34,3 +53,3 @@ const target = Object.assign({}, options); | ||
: (0, core_1.normalize)(defaultSourceRoot); | ||
target.prefix = target.prefix || '@app'; | ||
target.prefix = target.prefix || getDefaultLibraryPrefix(); | ||
return target; | ||
@@ -37,0 +56,0 @@ } |
@@ -19,3 +19,3 @@ { | ||
"description": "The prefix of the library.", | ||
"x-prompt": "What prefix would you like to use for the library (default: @app)?" | ||
"x-prompt": "What prefix would you like to use for the library (default: @app or 'defaultLibraryPrefix' setting value)?" | ||
}, | ||
@@ -22,0 +22,0 @@ "language": { |
{ | ||
"name": "@nestjs/schematics", | ||
"version": "10.0.3", | ||
"version": "10.1.0", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@schematics)", | ||
@@ -44,4 +44,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@angular-devkit/core": "16.2.8", | ||
"@angular-devkit/schematics": "16.2.8", | ||
"@angular-devkit/core": "17.0.9", | ||
"@angular-devkit/schematics": "17.0.9", | ||
"comment-json": "4.2.3", | ||
@@ -52,12 +52,12 @@ "jsonc-parser": "3.2.0", | ||
"devDependencies": { | ||
"@commitlint/cli": "18.2.0", | ||
"@commitlint/config-angular": "18.1.0", | ||
"@types/jest": "29.5.6", | ||
"@types/node": "20.8.9", | ||
"@typescript-eslint/eslint-plugin": "6.9.0", | ||
"@typescript-eslint/parser": "6.9.0", | ||
"@commitlint/cli": "18.4.4", | ||
"@commitlint/config-angular": "18.4.4", | ||
"@types/jest": "29.5.11", | ||
"@types/node": "20.10.7", | ||
"@typescript-eslint/eslint-plugin": "6.18.0", | ||
"@typescript-eslint/parser": "6.18.0", | ||
"cpx": "1.5.0", | ||
"eslint": "8.52.0", | ||
"eslint-config-prettier": "9.0.0", | ||
"eslint-plugin-import": "2.29.0", | ||
"eslint": "8.56.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-import": "2.29.1", | ||
"gulp": "4.0.2", | ||
@@ -68,6 +68,6 @@ "gulp-clean": "0.4.0", | ||
"nyc": "15.1.0", | ||
"release-it": "16.2.1", | ||
"release-it": "17.0.1", | ||
"ts-jest": "29.1.1", | ||
"ts-node": "10.9.1", | ||
"typescript": "5.2.2" | ||
"ts-node": "10.9.2", | ||
"typescript": "5.3.3" | ||
}, | ||
@@ -74,0 +74,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
189733
234
4758
3
+ Added@angular-devkit/core@17.0.9(transitive)
+ Added@angular-devkit/schematics@17.0.9(transitive)
+ Addedmagic-string@0.30.5(transitive)
+ Addedpicomatch@3.0.1(transitive)
- Removed@angular-devkit/core@16.2.8(transitive)
- Removed@angular-devkit/schematics@16.2.8(transitive)
- Removedmagic-string@0.30.1(transitive)
- Removedpicomatch@2.3.1(transitive)
Updated@angular-devkit/core@17.0.9