@nestjs/schematics
Advanced tools
Comparing version 9.2.0 to 10.0.0
@@ -49,5 +49,8 @@ "use strict"; | ||
return (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [ | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(path), | ||
]); | ||
} |
@@ -17,5 +17,5 @@ { | ||
"dependencies": { | ||
"@nestjs/common": "^9.0.0", | ||
"@nestjs/core": "^9.0.0", | ||
"@nestjs/platform-express": "^9.0.0", | ||
"@nestjs/common": "^10.0.0", | ||
"@nestjs/core": "^10.0.0", | ||
"@nestjs/platform-express": "^10.0.0", | ||
"reflect-metadata": "^0.1.13", | ||
@@ -25,10 +25,10 @@ "rxjs": "^7.2.0" | ||
"devDependencies": { | ||
"@nestjs/testing": "^9.0.0", | ||
"@babel/core": "7.21.8", | ||
"@babel/node": "7.20.7", | ||
"@babel/plugin-proposal-decorators": "7.21.0", | ||
"@babel/plugin-transform-runtime": "7.21.4", | ||
"@babel/preset-env": "7.21.5", | ||
"@babel/register": "7.21.0", | ||
"@babel/runtime": "7.21.5", | ||
"@nestjs/testing": "^10.0.0", | ||
"@babel/core": "7.22.5", | ||
"@babel/node": "7.22.5", | ||
"@babel/plugin-proposal-decorators": "7.22.5", | ||
"@babel/plugin-transform-runtime": "7.22.5", | ||
"@babel/preset-env": "7.22.5", | ||
"@babel/register": "7.22.5", | ||
"@babel/runtime": "7.22.5", | ||
"jest": "29.5.0", | ||
@@ -35,0 +35,0 @@ "nodemon": "2.0.22", |
@@ -23,5 +23,5 @@ { | ||
"dependencies": { | ||
"@nestjs/common": "^9.0.0", | ||
"@nestjs/core": "^9.0.0", | ||
"@nestjs/platform-express": "^9.0.0", | ||
"@nestjs/common": "^10.0.0", | ||
"@nestjs/core": "^10.0.0", | ||
"@nestjs/platform-express": "^10.0.0", | ||
"reflect-metadata": "^0.1.13", | ||
@@ -31,8 +31,8 @@ "rxjs": "^7.2.0" | ||
"devDependencies": { | ||
"@nestjs/cli": "^9.0.0", | ||
"@nestjs/schematics": "^9.0.0", | ||
"@nestjs/testing": "^9.0.0", | ||
"@nestjs/cli": "^10.0.0", | ||
"@nestjs/schematics": "^10.0.0", | ||
"@nestjs/testing": "^10.0.0", | ||
"@types/express": "^4.17.13", | ||
"@types/jest": "29.5.1", | ||
"@types/node": "18.16.12", | ||
"@types/jest": "29.5.2", | ||
"@types/node": "18.16.18", | ||
"@types/supertest": "^2.0.11", | ||
@@ -39,0 +39,0 @@ "@typescript-eslint/eslint-plugin": "^5.0.0", |
@@ -9,3 +9,3 @@ { | ||
"allowSyntheticDefaultImports": true, | ||
"target": "es2017", | ||
"target": "ES2021", | ||
"sourceMap": true, | ||
@@ -12,0 +12,0 @@ "outDir": "./dist", |
@@ -46,5 +46,8 @@ "use strict"; | ||
}), | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
])(context); | ||
} |
@@ -37,3 +37,6 @@ "use strict"; | ||
return (context) => (0, schematics_1.apply)((0, schematics_1.url)('./files'), [ | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
@@ -69,3 +72,6 @@ ])(context); | ||
}; | ||
const declarationOptions = Object.assign(Object.assign({}, options), { staticOptions }); | ||
const declarationOptions = { | ||
...options, | ||
staticOptions, | ||
}; | ||
tree.overwrite(options.module, declarator.declare(content, declarationOptions)); | ||
@@ -72,0 +78,0 @@ return tree; |
@@ -21,5 +21,8 @@ "use strict"; | ||
return (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [ | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.project), | ||
]); | ||
} |
@@ -49,3 +49,6 @@ "use strict"; | ||
}), | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
@@ -52,0 +55,0 @@ ])(context); |
@@ -30,5 +30,8 @@ "use strict"; | ||
return (context) => (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [ | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
])(context); | ||
} |
@@ -38,5 +38,8 @@ "use strict"; | ||
}), | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
])(context); | ||
} |
@@ -49,3 +49,6 @@ "use strict"; | ||
}), | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
@@ -52,0 +55,0 @@ ])(context); |
@@ -38,5 +38,8 @@ "use strict"; | ||
}), | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
])(context); | ||
} |
@@ -39,5 +39,8 @@ "use strict"; | ||
}), | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
])(context); | ||
} |
@@ -29,5 +29,8 @@ "use strict"; | ||
return (context) => (0, schematics_1.apply)((0, schematics_1.url)('./files'), [ | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
])(context); | ||
} |
{ | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"target": "ES2021", | ||
"experimentalDecorators": true | ||
@@ -5,0 +5,0 @@ }, |
@@ -187,5 +187,8 @@ "use strict"; | ||
return (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [ | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(path), | ||
]); | ||
} |
@@ -38,5 +38,8 @@ "use strict"; | ||
}), | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
])(context); | ||
} |
@@ -37,3 +37,6 @@ "use strict"; | ||
return (context) => (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [ | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
@@ -40,0 +43,0 @@ ])(context); |
@@ -39,5 +39,8 @@ "use strict"; | ||
}), | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
])(context); | ||
} |
@@ -53,3 +53,6 @@ "use strict"; | ||
}), | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
@@ -56,0 +59,0 @@ ])(context); |
@@ -48,3 +48,6 @@ "use strict"; | ||
}), | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
@@ -51,0 +54,0 @@ ])(context); |
@@ -27,3 +27,2 @@ "use strict"; | ||
function transform(options) { | ||
var _a; | ||
const target = Object.assign({}, options); | ||
@@ -45,3 +44,3 @@ if (!target.name) { | ||
: (0, core_1.join)(target.path, target.name); | ||
target.isSwaggerInstalled = (_a = options.isSwaggerInstalled) !== null && _a !== void 0 ? _a : false; | ||
target.isSwaggerInstalled = options.isSwaggerInstalled ?? false; | ||
return target; | ||
@@ -88,6 +87,12 @@ } | ||
}), | ||
(0, schematics_1.template)(Object.assign(Object.assign(Object.assign({}, core_1.strings), options), { lowercased: (name) => { | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
lowercased: (name) => { | ||
const classifiedName = (0, strings_1.classify)(name); | ||
return (classifiedName.charAt(0).toLowerCase() + classifiedName.slice(1)); | ||
}, singular: (name) => pluralize.singular(name), ent: (name) => name + '.entity' })), | ||
}, | ||
singular: (name) => pluralize.singular(name), | ||
ent: (name) => name + '.entity', | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
@@ -110,3 +115,6 @@ ])(context); | ||
const declarator = new __1.ModuleDeclarator(); | ||
tree.overwrite(options.module, declarator.declare(content, Object.assign(Object.assign({}, options), { type: 'module' }))); | ||
tree.overwrite(options.module, declarator.declare(content, { | ||
...options, | ||
type: 'module', | ||
})); | ||
return tree; | ||
@@ -113,0 +121,0 @@ }; |
@@ -49,3 +49,6 @@ "use strict"; | ||
}), | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(options.path), | ||
@@ -52,0 +55,0 @@ ])(context); |
{ | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"target": "ES2021", | ||
"experimentalDecorators": true | ||
@@ -5,0 +5,0 @@ }, |
@@ -7,3 +7,3 @@ "use strict"; | ||
const fs_1 = require("fs"); | ||
const jsonc_parser_1 = require("jsonc-parser"); | ||
const comment_json_1 = require("comment-json"); | ||
const formatting_1 = require("../../utils/formatting"); | ||
@@ -41,3 +41,3 @@ const defaults_1 = require("../defaults"); | ||
} | ||
catch (_a) { | ||
catch { | ||
return defaults_1.DEFAULT_DIR_ENTRY_APP; | ||
@@ -78,3 +78,3 @@ } | ||
const sourceText = source.toString('utf-8'); | ||
const optionsObj = (0, jsonc_parser_1.parse)(sourceText); | ||
const optionsObj = (0, comment_json_1.parse)(sourceText); | ||
return !!optionsObj.monorepo; | ||
@@ -86,5 +86,5 @@ } | ||
const sourceText = source.toString('utf-8'); | ||
const json = (0, jsonc_parser_1.parse)(sourceText); | ||
const json = (0, comment_json_1.parse)(sourceText); | ||
callback(json); | ||
host.overwrite(path, JSON.stringify(json, null, 2)); | ||
host.overwrite(path, (0, comment_json_1.stringify)(json, null, 2)); | ||
} | ||
@@ -252,3 +252,7 @@ return host; | ||
return (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./workspace', options.language)), [ | ||
(0, schematics_1.template)(Object.assign(Object.assign(Object.assign({}, core_1.strings), options), { name: appName })), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
name: appName, | ||
}), | ||
(0, schematics_1.move)(path), | ||
@@ -260,5 +264,8 @@ ]); | ||
return (0, schematics_1.apply)((0, schematics_1.url)((0, core_1.join)('./files', options.language)), [ | ||
(0, schematics_1.template)(Object.assign(Object.assign({}, core_1.strings), options)), | ||
(0, schematics_1.template)({ | ||
...core_1.strings, | ||
...options, | ||
}), | ||
(0, schematics_1.move)(path), | ||
]); | ||
} |
{ | ||
"compilerOptions": { | ||
"target": "ES6", | ||
"target": "ES2021", | ||
"experimentalDecorators": true | ||
@@ -5,0 +5,0 @@ }, |
@@ -12,3 +12,3 @@ "use strict"; | ||
NodeDependencyType["Optional"] = "optionalDependencies"; | ||
})(NodeDependencyType = exports.NodeDependencyType || (exports.NodeDependencyType = {})); | ||
})(NodeDependencyType || (exports.NodeDependencyType = NodeDependencyType = {})); | ||
const ALL_DEPENDENCY_TYPE = [ | ||
@@ -15,0 +15,0 @@ NodeDependencyType.Default, |
@@ -5,3 +5,3 @@ import { DeclarationOptions } from './module.declarator'; | ||
constructor(content: string); | ||
insert(metadata: string, symbol: string, staticOptions?: DeclarationOptions['staticOptions']): string; | ||
insert(metadata: string, symbol: string, staticOptions?: DeclarationOptions['staticOptions']): string | undefined; | ||
private getDecoratorMetadata; | ||
@@ -8,0 +8,0 @@ private getSourceNodes; |
@@ -13,2 +13,5 @@ "use strict"; | ||
const node = decoratorNodes[0]; | ||
if (!node) { | ||
return; | ||
} | ||
const matchingProperties = node.properties | ||
@@ -15,0 +18,0 @@ .filter((prop) => prop.kind === typescript_1.SyntaxKind.PropertyAssignment) |
@@ -9,5 +9,5 @@ "use strict"; | ||
const inserted = manager.insert(options.metadata, options.symbol, options.staticOptions); | ||
return inserted; | ||
return inserted ?? content; | ||
} | ||
} | ||
exports.ModuleMetadataDeclarator = ModuleMetadataDeclarator; |
{ | ||
"name": "@nestjs/schematics", | ||
"version": "9.2.0", | ||
"version": "10.0.0", | ||
"description": "Nest - modern, fast, powerful node.js web framework (@schematics)", | ||
@@ -44,4 +44,5 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@angular-devkit/core": "16.0.1", | ||
"@angular-devkit/schematics": "16.0.1", | ||
"@angular-devkit/core": "16.1.0", | ||
"@angular-devkit/schematics": "16.1.0", | ||
"comment-json": "4.2.3", | ||
"jsonc-parser": "3.2.0", | ||
@@ -51,10 +52,10 @@ "pluralize": "8.0.0" | ||
"devDependencies": { | ||
"@commitlint/cli": "17.6.3", | ||
"@commitlint/config-angular": "17.6.3", | ||
"@types/jest": "29.5.1", | ||
"@types/node": "18.16.12", | ||
"@typescript-eslint/eslint-plugin": "5.59.6", | ||
"@typescript-eslint/parser": "5.59.6", | ||
"@commitlint/cli": "17.6.5", | ||
"@commitlint/config-angular": "17.6.5", | ||
"@types/jest": "29.5.2", | ||
"@types/node": "18.16.18", | ||
"@typescript-eslint/eslint-plugin": "5.59.11", | ||
"@typescript-eslint/parser": "5.59.11", | ||
"cpx": "1.5.0", | ||
"eslint": "8.40.0", | ||
"eslint": "8.42.0", | ||
"eslint-config-prettier": "8.8.0", | ||
@@ -67,9 +68,9 @@ "eslint-plugin-import": "2.27.5", | ||
"nyc": "15.1.0", | ||
"release-it": "15.10.3", | ||
"release-it": "15.11.0", | ||
"ts-jest": "29.1.0", | ||
"ts-node": "10.9.1", | ||
"typescript": "5.0.4" | ||
"typescript": "5.1.3" | ||
}, | ||
"peerDependencies": { | ||
"typescript": ">=4.3.5" | ||
"typescript": ">=4.8.2" | ||
}, | ||
@@ -76,0 +77,0 @@ "schematics": "./dist/collection.json", |
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
185189
4632
6
+ Addedcomment-json@4.2.3
+ Added@angular-devkit/core@16.1.0(transitive)
+ Added@angular-devkit/schematics@16.1.0(transitive)
+ Addedarray-timsort@1.0.3(transitive)
+ Addedcomment-json@4.2.3(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedhas-own-prop@2.0.0(transitive)
+ Addedrepeat-string@1.6.1(transitive)
- Removed@angular-devkit/core@16.0.1(transitive)
- Removed@angular-devkit/schematics@16.0.1(transitive)
Updated@angular-devkit/core@16.1.0