Socket
Socket
Sign inDemoInstall

@nestjs/cli

Package Overview
Dependencies
380
Maintainers
2
Versions
215
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.3.0 to 9.4.0

lib/compiler/helpers/manual-restart.d.ts

2

actions/start.action.d.ts

@@ -5,5 +5,5 @@ import { Input } from '../commands';

handle(inputs: Input[], options: Input[]): Promise<void>;
createOnSuccessHook(entryFile: string, sourceRoot: string, debugFlag: boolean | string | undefined, outDirName: string, binaryToRun?: string): () => void;
createOnSuccessHook(entryFile: string, sourceRoot: string, debugFlag: boolean | string | undefined, outDirName: string, binaryToRun: string): () => void;
private spawnChildProcess;
private isSourceMapSupportPkgAvailable;
}

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

handle(inputs, options) {
var _a, _b;
return __awaiter(this, void 0, void 0, function* () {

@@ -35,3 +34,2 @@ try {

const pathToTsconfig = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'compilerOptions.tsConfigPath', appName, 'path', options);
const binaryToRunOption = options.find((option) => option.name === 'exec');
const debugModeOption = options.find((option) => option.name === 'debug');

@@ -43,9 +41,7 @@ const watchModeOption = options.find((option) => option.name === 'watch');

const debugFlag = debugModeOption && debugModeOption.value;
const binaryToRun = binaryToRunOption && binaryToRunOption.value;
const binaryToRun = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'exec', appName, 'exec', options, defaults_1.defaultConfiguration.exec);
const { options: tsOptions } = this.tsConfigProvider.getByConfigFilename(pathToTsconfig);
const outDir = tsOptions.outDir || defaults_1.defaultOutDir;
const entryFile = ((_a = options.find((option) => option.name === 'entryFile')) === null || _a === void 0 ? void 0 : _a.value) ||
(0, get_value_or_default_1.getValueOrDefault)(configuration, 'entryFile', appName, undefined, undefined, defaults_1.defaultConfiguration.entryFile);
const sourceRoot = ((_b = options.find((option) => option.name === 'sourceRoot')) === null || _b === void 0 ? void 0 : _b.value) ||
(0, get_value_or_default_1.getValueOrDefault)(configuration, 'sourceRoot', appName, undefined, undefined, defaults_1.defaultConfiguration.sourceRoot);
const entryFile = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'entryFile', appName, 'entryFile', options, defaults_1.defaultConfiguration.entryFile);
const sourceRoot = (0, get_value_or_default_1.getValueOrDefault)(configuration, 'sourceRoot', appName, 'sourceRoot', options, defaults_1.defaultConfiguration.sourceRoot);
const onSuccess = this.createOnSuccessHook(entryFile, sourceRoot, debugFlag, outDir, binaryToRun);

@@ -64,3 +60,3 @@ yield this.runBuild(inputs, options, isWatchEnabled, isWatchAssetsEnabled, !!debugFlag, onSuccess);

}
createOnSuccessHook(entryFile, sourceRoot, debugFlag, outDirName, binaryToRun = 'node') {
createOnSuccessHook(entryFile, sourceRoot, debugFlag, outDirName, binaryToRun) {
let childProcessRef;

@@ -67,0 +63,0 @@ process.on('exit', () => childProcessRef && (0, tree_kill_1.treeKillSync)(childProcessRef.pid));

import { Input } from '../../../commands';
import { Configuration } from '../../configuration';
export declare function getValueOrDefault<T = any>(configuration: Required<Configuration>, propertyPath: string, appName: string, key?: 'path' | 'webpack' | 'webpackPath', options?: Input[], defaultValue?: T): T;
export declare function getValueOrDefault<T = any>(configuration: Required<Configuration>, propertyPath: string, appName: string, key?: 'path' | 'webpack' | 'webpackPath' | 'entryFile' | 'sourceRoot' | 'exec', options?: Input[], defaultValue?: T): T;
export declare function getValueOfPath<T = any>(object: Record<string, any>, propertyPath: string): T;

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

const get_value_or_default_1 = require("./helpers/get-value-or-default");
const manual_restart_1 = require("./helpers/manual-restart");
const tsconfig_paths_hook_1 = require("./hooks/tsconfig-paths.hook");

@@ -31,3 +32,6 @@ class WatchCompiler {

host, oldProgram) => {
const tsconfigPathsPlugin = options ? (0, tsconfig_paths_hook_1.tsconfigPathsBeforeHookFactory)(options) : null;
(0, manual_restart_1.displayManualRestartTip)();
const tsconfigPathsPlugin = options
? (0, tsconfig_paths_hook_1.tsconfigPathsBeforeHookFactory)(options)
: null;
const program = origCreateProgram(rootNames, options, host, oldProgram, undefined, projectReferences);

@@ -51,3 +55,7 @@ const origProgramEmit = program.emit;

};
tsBin.createWatchProgram(host);
const watchProgram = tsBin.createWatchProgram(host);
(0, manual_restart_1.listenForManualRestart)(() => {
watchProgram.close();
this.run(configuration, configFilename, appName, tsCompilerOptions, onSuccess);
});
}

@@ -54,0 +62,0 @@ createDiagnosticReporter(diagnosticReporter) {

@@ -37,2 +37,3 @@ export type Asset = 'string' | AssetEntry;

entryFile?: string;
exec?: string;
sourceRoot?: string;

@@ -47,2 +48,3 @@ compilerOptions?: CompilerOptions;

entryFile?: string;
exec?: string;
monorepo?: boolean;

@@ -49,0 +51,0 @@ compilerOptions?: CompilerOptions;

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

entryFile: 'main',
exec: 'node',
projects: {},

@@ -12,0 +13,0 @@ monorepo: false,

{
"name": "@nestjs/cli",
"version": "9.3.0",
"version": "9.4.0",
"description": "Nest - modern, fast, powerful node.js web framework (@cli)",

@@ -41,5 +41,5 @@ "publishConfig": {

"dependencies": {
"@angular-devkit/core": "15.2.4",
"@angular-devkit/schematics": "15.2.4",
"@angular-devkit/schematics-cli": "15.2.4",
"@angular-devkit/core": "15.2.6",
"@angular-devkit/schematics": "15.2.6",
"@angular-devkit/schematics-cli": "15.2.6",
"@nestjs/schematics": "^9.0.4",

@@ -55,26 +55,26 @@ "chalk": "4.1.2",

"os-name": "4.0.1",
"rimraf": "4.4.0",
"rimraf": "4.4.1",
"shelljs": "0.8.5",
"source-map-support": "0.5.21",
"tree-kill": "1.2.2",
"tsconfig-paths": "4.1.2",
"tsconfig-paths": "4.2.0",
"tsconfig-paths-webpack-plugin": "4.0.1",
"typescript": "4.9.5",
"webpack": "5.76.2",
"webpack": "5.79.0",
"webpack-node-externals": "3.0.0"
},
"devDependencies": {
"@commitlint/cli": "17.4.4",
"@commitlint/cli": "17.5.1",
"@commitlint/config-angular": "17.4.4",
"@types/inquirer": "8.2.6",
"@types/jest": "29.5.0",
"@types/node": "18.15.3",
"@types/node": "18.15.11",
"@types/node-emoji": "1.8.2",
"@types/shelljs": "0.8.11",
"@types/shelljs": "0.8.12",
"@types/webpack-node-externals": "3.0.0",
"@typescript-eslint/eslint-plugin": "5.55.0",
"@typescript-eslint/parser": "5.55.0",
"@typescript-eslint/eslint-plugin": "5.58.0",
"@typescript-eslint/parser": "5.58.0",
"delete-empty": "3.0.0",
"eslint": "8.36.0",
"eslint-config-prettier": "8.7.0",
"eslint": "8.38.0",
"eslint-config-prettier": "8.8.0",
"gulp": "4.0.2",

@@ -84,6 +84,6 @@ "gulp-clean": "0.4.0",

"jest": "29.5.0",
"lint-staged": "13.2.0",
"prettier": "2.8.4",
"release-it": "15.9.0",
"ts-jest": "29.0.5",
"lint-staged": "13.2.1",
"prettier": "2.8.7",
"release-it": "15.10.1",
"ts-jest": "29.1.0",
"ts-loader": "9.4.2"

@@ -90,0 +90,0 @@ },

@@ -10,4 +10,2 @@ <p align="center">

<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/cli.svg" alt="NPM Downloads" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>

@@ -46,2 +44,2 @@ <a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>

Nest is [MIT licensed](LICENSE).
Nest is [MIT licensed](LICENSE).

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc