Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nestjs/schematics

Package Overview
Dependencies
Maintainers
3
Versions
131
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 7.2.10-next.1 to 7.3.0

2

dist/lib/resource/files/ts/dto/update-__name@singular__.dto.ts

@@ -1,2 +0,2 @@

import { PartialType } from '@nestjs/mapped-types';
<% if (isSwaggerInstalled) { %>import { PartialType } from '@nestjs/swagger';<% } else { %>import { PartialType } from '@nestjs/mapped-types';<% } %>
import { Create<%= singular(classify(name)) %>Dto } from './create-<%= singular(name) %>.dto';

@@ -3,0 +3,0 @@

@@ -9,3 +9,3 @@ import { Create<%= singular(classify(name)) %>Input } from './create-<%= singular(name) %>.input';<% if (type === 'graphql-code-first') { %>

}<% } else { %>
import { PartialType } from '@nestjs/graphql';
import { PartialType } from '@nestjs/mapped-types';

@@ -12,0 +12,0 @@ export class Update<%= singular(classify(name)) %>Input extends PartialType(Create<%= singular(classify(name)) %>Input) {

@@ -12,2 +12,3 @@ "use strict";

const dependencies_utils_1 = require("../../utils/dependencies.utils");
const tasks_1 = require("@angular-devkit/schematics/tasks");
function main(options) {

@@ -17,4 +18,4 @@ options = transform(options);

return schematics_1.branchAndMerge(schematics_1.chain([
addMappedTypesDependencyIfApplies(options),
source_root_helpers_1.mergeSourceRoot(options),
addMappedTypesDependencyIfApplies(options),
addDeclarationToModule(options),

@@ -27,2 +28,3 @@ schematics_1.mergeWith(generate(options)),

function transform(options) {
var _a;
const target = Object.assign({}, options);

@@ -43,2 +45,3 @@ if (!target.name) {

: core_1.join(target.path, target.name);
target.isSwaggerInstalled = (_a = options.isSwaggerInstalled) !== null && _a !== void 0 ? _a : false;
return target;

@@ -106,6 +109,5 @@ }

function addMappedTypesDependencyIfApplies(options) {
return (host) => {
return (host, context) => {
try {
if (options.type === 'graphql-code-first' ||
options.type === 'graphql-schema-first') {
if (options.type === 'graphql-code-first') {
return;

@@ -116,10 +118,15 @@ }

if (nodeDependencyRef) {
options.isSwaggerInstalled = true;
return;
}
}
dependencies_utils_1.addPackageJsonDependency(host, {
type: dependencies_utils_1.NodeDependencyType.Default,
name: '@nestjs/mapped-types',
version: '*',
});
const nodeDependencyRef = dependencies_utils_1.getPackageJsonDependency(host, '@nestjs/mapped-types');
if (!nodeDependencyRef) {
dependencies_utils_1.addPackageJsonDependency(host, {
type: dependencies_utils_1.NodeDependencyType.Default,
name: '@nestjs/mapped-types',
version: '*',
});
context.addTask(new tasks_1.NodePackageInstallTask());
}
}

@@ -126,0 +133,0 @@ catch (err) {

{
"name": "@nestjs/schematics",
"version": "7.2.10-next.1",
"version": "7.3.0",
"description": "Nest - modern, fast, powerful node.js web framework (@schematics)",

@@ -54,3 +54,3 @@ "main": "dist/index.js",

"@types/jest": "26.0.20",
"@types/node": "14.14.32",
"@types/node": "14.14.33",
"@typescript-eslint/eslint-plugin": "4.17.0",

@@ -57,0 +57,0 @@ "@typescript-eslint/parser": "4.17.0",

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