-
Notifications
You must be signed in to change notification settings - Fork 5
New refactored version using lerna workspaces #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c54d375
28dcbbf
6c39bfe
4ed80f1
f6fee3e
2e30c8a
ee8550e
274fa1d
b648b12
9df9235
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| # Node.js Tools for Visual Studio | ||
| .ntvs_analysis.dat | ||
| node_modules/ | ||
| nestserver-*.exe | ||
| nestserver-* | ||
| .vscode | ||
| dist/ | ||
| yarn-error.log |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,5 +3,4 @@ | |
| node_modules/ | ||
| .vscode | ||
| dist/ | ||
| nestserver-linux-1.0.7 | ||
| nestserver-macos-1.0.7 | ||
| nestserver-* | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "packages": [ | ||
| "packages/*" | ||
| ], | ||
| "version": "0.0.0" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,64 +1,22 @@ | ||
| { | ||
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/ts-loader@4.5.01 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/unset-value@1.0.0CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/pkg@4.4.91 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/json-schema@0.2.3CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/jest@23.6.01 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/y18n@3.2.1CRITICAL Vulnerabilities (1)
The software does not properly protect an assumed-immutable element from being modified by an attacker.
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/nodemon@1.18.101 Critical, 1 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/npm-bundled@1.0.6CRITICAL Vulnerabilities (1)
SEVERE Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severe OSS Vulnerability: pkg:npm/jest@23.6.00 Critical, 1 Severe, 1 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/request@2.88.0SEVERE Vulnerabilities (1)
MODERATE Vulnerabilities (1)
The software stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/jest@23.6.08 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/handlebars@4.1.1CRITICAL Vulnerabilities (8)sonatype-2019-0253
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
sonatype-2019-0394
The product does not validate or incorrectly validates input that can affect the control flow or data flow of a program.
sonatype-2019-0058
sonatype-2021-0236
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
sonatype-2021-0449
sonatype-2019-0462
The software does not properly restrict the size or amount of resources that are requested or influenced by an actor, which can be used to consume more resources than intended.
sonatype-2019-0496
The product does not validate or incorrectly validates input that can affect the control flow or data flow of a program.
sonatype-2020-0293
The software does not properly restrict the size or amount of resources that are requested or influenced by an actor, which can be used to consume more resources than intended.
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/tslint@5.11.01 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/js-yaml@3.13.0CRITICAL Vulnerabilities (1)
The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/%40nestjs/core@5.7.45 Critical, 1 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/lodash@4.17.11CRITICAL Vulnerabilities (5)sonatype-2019-0500
The software does not properly protect an assumed-immutable element from being modified by an attacker.
sonatype-2020-0739
The software does not properly protect an assumed-immutable element from being modified by an attacker.
CVE-2019-10744
sonatype-2020-0292
The software does not properly protect an assumed-immutable element from being modified by an attacker.
CVE-2021-23337
SEVERE Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/ts-loader@4.5.01 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/kind-of@6.0.2CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation?
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
jan-vcapgemini marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/jest@27.5.11 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/fb-watchman@2.0.1CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/%40nestjs/platform-express@8.4.41 Critical, 1 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/express@4.17.3CRITICAL Vulnerabilities (1)
The software receives data from an upstream component, but does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.
SEVERE Vulnerabilities (1)
The software uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as .. that can resolve to a location that is outside of that directory.
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severe OSS Vulnerability: pkg:npm/%40nestjs/platform-express@8.4.40 Critical, 1 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/multer@1.4.4SEVERE Vulnerabilities (1)
The software does not properly restrict the size or amount of resources that are requested or influenced by an actor, which can be used to consume more resources than intended.
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/jest@27.5.11 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/fb-watchman@2.0.1CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/%40nestjs/platform-express@8.4.41 Critical, 1 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/express@4.17.3CRITICAL Vulnerabilities (1)
The software receives data from an upstream component, but does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.
SEVERE Vulnerabilities (1)
The software uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as .. that can resolve to a location that is outside of that directory.
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severe OSS Vulnerability: pkg:npm/%40nestjs/platform-express@8.4.40 Critical, 1 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/multer@1.4.4SEVERE Vulnerabilities (1)
The software does not properly restrict the size or amount of resources that are requested or influenced by an actor, which can be used to consume more resources than intended.
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/jest@27.5.11 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/fb-watchman@2.0.1CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/%40nestjs/platform-express@8.4.41 Critical, 1 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/express@4.17.3CRITICAL Vulnerabilities (1)
The software receives data from an upstream component, but does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.
SEVERE Vulnerabilities (1)
The software uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as .. that can resolve to a location that is outside of that directory.
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severe OSS Vulnerability: pkg:npm/%40nestjs/platform-express@8.4.40 Critical, 1 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/multer@1.4.4SEVERE Vulnerabilities (1)
The software does not properly restrict the size or amount of resources that are requested or influenced by an actor, which can be used to consume more resources than intended.
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/jest@27.5.11 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/fb-watchman@2.0.1CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/%40nestjs/platform-express@8.4.41 Critical, 1 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/express@4.17.3CRITICAL Vulnerabilities (1)
The software receives data from an upstream component, but does not neutralize or incorrectly neutralizes CR and LF characters before the data is included in outgoing HTTP headers.
SEVERE Vulnerabilities (1)
The software uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as .. that can resolve to a location that is outside of that directory.
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severe OSS Vulnerability: pkg:npm/%40nestjs/platform-express@8.4.40 Critical, 1 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 1 dependencies Componentspkg:npm/multer@1.4.4SEVERE Vulnerabilities (1)
The software does not properly restrict the size or amount of resources that are requested or influenced by an actor, which can be used to consume more resources than intended.
(at-me in a reply with Was this a good recommendation? |
||
| "name": "@devonfw/cobigen-nestserver", | ||
| "bin": "dist/main.js", | ||
| "version": "1.1.7", | ||
| "description": "Nestjs server to implement the input reader and merger for CobiGen", | ||
| "author": "CobiGen Team", | ||
| "license": "MIT", | ||
| "name": "cobigen-nest-server", | ||
| "private": true, | ||
| "workspaces": [ | ||
| "packages/*" | ||
| ], | ||
| "scripts": { | ||
| "build": "tsc -p tsconfig.build.json", | ||
| "format": "prettier --write \"src/**/*.ts\"", | ||
| "start": "ts-node -r tsconfig-paths/register src/main.ts", | ||
| "start:dev": "nodemon", | ||
| "start:debug": "nodemon --config nodemon-debug.json", | ||
| "prestart:prod": "rimraf dist && npm run build", | ||
| "start:prod": "node dist/main.js", | ||
| "lint": "tslint -p tsconfig.json -c tslint.json", | ||
| "test": "jest", | ||
| "test:watch": "jest --watch", | ||
| "test:cov": "jest --coverage", | ||
| "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", | ||
| "test:e2e": "jest --config ./test/jest-e2e.json" | ||
| "build": "npm run cleanup:root && npm run cleanup:packages && tsc -p tsconfig.build.json && npm run copy:rename && npm run compress", | ||
| "cleanup:root": "rimraf dist", | ||
| "cleanup:packages": "rimraf packages/*/dist/ && rimraf packages/*/nestserver-*", | ||
| "copy:rename": "npm run copy && npm run rename", | ||
| "copy": "copyfiles -f \"node_modules/@devonfw/ts-merger/dist/ts-merger.umd.js\" \"node_modules/@devonfw/ts-merger/build/\"", | ||
| "rename": "node -e \"require('fs').rename('node_modules/@devonfw/ts-merger/build/ts-merger.umd.js', 'node_modules/@devonfw/ts-merger/build/index.js', function(err) { if (err) console.log(err); console.log('File successfully renamed!') })\"", | ||
| "compress": "terser node_modules/@devonfw/ts-merger/build/index.js --compress --mangle --warn --output node_modules/@devonfw/ts-merger/build/index.js" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you programmed all this stuff here by hand. Why didn't you use webpack? https://webpack.js.org/guides/getting-started/
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| }, | ||
| "dependencies": { | ||
| "@devonfw/ts-merger": "^2.2.9", | ||
| "@nestjs/common": "^5.4.0", | ||
| "@nestjs/core": "^5.4.0", | ||
| "js-beautify": "^1.9.0", | ||
| "pkg": "^4.4.8", | ||
| "reflect-metadata": "^0.1.12", | ||
| "rimraf": "^2.6.2", | ||
| "rxjs": "^6.2.2", | ||
| "typescript": "^3.0.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@nestjs/testing": "^5.1.0", | ||
| "@types/express": "^4.16.0", | ||
| "@types/jest": "^23.3.1", | ||
| "@types/node": "^10.7.1", | ||
| "@types/supertest": "^2.0.5", | ||
| "jest": "^23.5.0", | ||
| "nodemon": "^1.18.3", | ||
| "prettier": "^1.14.2", | ||
| "supertest": "^3.1.0", | ||
| "ts-jest": "^23.1.3", | ||
| "ts-loader": "^4.4.2", | ||
| "ts-node": "^7.0.1", | ||
| "tsconfig-paths": "^3.5.0", | ||
| "tslint": "5.11.0" | ||
| }, | ||
| "jest": { | ||
| "moduleFileExtensions": [ | ||
| "js", | ||
| "json", | ||
| "ts" | ||
| ], | ||
| "rootDir": "src", | ||
| "testRegex": ".spec.ts$", | ||
| "transform": { | ||
| "^.+\\.(t|j)s$": "ts-jest" | ||
| }, | ||
| "coverageDirectory": "../coverage", | ||
| "testEnvironment": "node" | ||
| "copyfiles": "^2.4.1", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/copyfiles@2.4.14 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 4 dependencies Componentspkg:npm/ansi-regex@5.0.0CRITICAL Vulnerabilities (1)
pkg:npm/minimatch@3.0.4CRITICAL Vulnerabilities (1)
pkg:npm/ansi-regex@5.0.0CRITICAL Vulnerabilities (1)
pkg:npm/minimatch@3.0.4CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/copyfiles@2.4.12 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 2 dependencies Componentspkg:npm/ansi-regex@5.0.0CRITICAL Vulnerabilities (1)
pkg:npm/minimatch@3.0.4CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/copyfiles@2.4.12 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 2 dependencies Componentspkg:npm/ansi-regex@5.0.0CRITICAL Vulnerabilities (1)
pkg:npm/minimatch@3.0.4CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/copyfiles@2.4.12 Critical, 0 Severe, 0 Moderate, 0 Unknown vulnerabilities have been found across 2 dependencies Componentspkg:npm/ansi-regex@5.0.0CRITICAL Vulnerabilities (1)
pkg:npm/minimatch@3.0.4CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? |
||
| "lerna": "^4.0.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/lerna@4.0.01 Critical, 2 Severe, 1 Moderate, 0 Unknown vulnerabilities have been found across 3 dependencies Componentspkg:npm/request@2.88.2SEVERE Vulnerabilities (1)
MODERATE Vulnerabilities (1)
The software stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.
pkg:npm/hosted-git-info@2.8.9SEVERE Vulnerabilities (1)
pkg:npm/lodash.template@4.5.0CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/lerna@4.0.01 Critical, 2 Severe, 1 Moderate, 0 Unknown vulnerabilities have been found across 3 dependencies Componentspkg:npm/request@2.88.2SEVERE Vulnerabilities (1)
MODERATE Vulnerabilities (1)
The software stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.
pkg:npm/hosted-git-info@2.8.9SEVERE Vulnerabilities (1)
pkg:npm/lodash.template@4.5.0CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/lerna@4.0.01 Critical, 2 Severe, 1 Moderate, 0 Unknown vulnerabilities have been found across 3 dependencies Componentspkg:npm/request@2.88.2SEVERE Vulnerabilities (1)
MODERATE Vulnerabilities (1)
The software stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.
pkg:npm/hosted-git-info@2.8.9SEVERE Vulnerabilities (1)
pkg:npm/lodash.template@4.5.0CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical OSS Vulnerability: pkg:npm/lerna@4.0.01 Critical, 2 Severe, 1 Moderate, 0 Unknown vulnerabilities have been found across 3 dependencies Componentspkg:npm/request@2.88.2SEVERE Vulnerabilities (1)
MODERATE Vulnerabilities (1)
The software stores or transmits sensitive data using an encryption scheme that is theoretically sound, but is not strong enough for the level of protection required.
pkg:npm/hosted-git-info@2.8.9SEVERE Vulnerabilities (1)
pkg:npm/lodash.template@4.5.0CRITICAL Vulnerabilities (1)
(at-me in a reply with Was this a good recommendation? |
||
| "rimraf": "^3.0.2", | ||
| "terser": "^5.12.1" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| { | ||
| "name": "@devonfw/cobigen-nestserver-linux", | ||
| "bin": "dist/main.js", | ||
| "version": "1.1.10", | ||
| "description": "Nestjs server to implement the input reader and merger for CobiGen", | ||
| "author": "CobiGen Team", | ||
| "license": "MIT", | ||
| "scripts":{ | ||
| "build": "tsc -p tsconfig.build.json", | ||
| "format": "prettier --write \"src/**/*.ts\"", | ||
| "start": "ts-node -r tsconfig-paths/register src/main.ts", | ||
| "start:dev": "nodemon", | ||
| "start:debug": "nodemon --config nodemon-debug.json", | ||
| "prestart:prod": "rimraf dist && npm run build", | ||
| "start:prod": "node dist/main.js", | ||
| "lint": "tslint -p tsconfig.json -c tslint.json", | ||
| "test": "jest", | ||
| "test:watch": "jest --watch", | ||
| "test:cov": "jest --coverage", | ||
| "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", | ||
| "test:e2e": "jest --config ./test/jest-e2e.json", | ||
| "prepare": "npm run package", | ||
| "package": "pkg --targets latest-linux-x64 --output \"nestserver-linux-%npm_package_version%\" dist/main.js" | ||
| }, | ||
| "dependencies": { | ||
| "@devonfw/ts-merger": "^2.2.10", | ||
| "@nestjs/common": "^8.4.4", | ||
| "@nestjs/core": "^8.4.4", | ||
| "@nestjs/platform-express": "^8.4.4", | ||
| "js-beautify": "^1.14.3", | ||
| "pkg": "^5.6.0", | ||
| "reflect-metadata": "^0.1.13", | ||
| "rimraf": "^3.0.2", | ||
| "rxjs": "^7.5.5", | ||
| "typescript": "^4.6.3" | ||
| }, | ||
| "devDependencies": { | ||
| "@nestjs/testing": "^8.4.4", | ||
| "@types/express": "^4.17.13", | ||
| "@types/jest": "^27.4.1", | ||
| "@types/node": "^17.0.25", | ||
| "@types/supertest": "^2.0.12", | ||
| "express": "4.17.3", | ||
| "jest": "^27.5.1", | ||
| "nodemon": "^2.0.15", | ||
| "prettier": "^2.6.2", | ||
| "supertest": "^6.2.2", | ||
| "ts-jest": "^27.1.4", | ||
| "ts-loader": "^9.2.8", | ||
| "ts-node": "^10.7.0", | ||
| "tsconfig-paths": "^3.14.1", | ||
| "eslint": "8.13.0", | ||
| "webpack": "5.72.0" | ||
| }, | ||
| "jest": { | ||
| "moduleFileExtensions": [ | ||
| "js", | ||
| "json", | ||
| "ts" | ||
| ], | ||
| "rootDir": "src", | ||
| "testRegex": ".spec.ts$", | ||
| "transform": { | ||
| "^.+\\.(t|j)s$": "ts-jest" | ||
| }, | ||
| "coverageDirectory": "../coverage", | ||
| "testEnvironment": "node" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| import { NestFactory } from '@nestjs/core'; | ||
| import { AppModule } from './app.module'; | ||
| import { Request, Response } from 'express'; | ||
| import properties from './config/properties'; | ||
| import * as express from 'express'; | ||
|
|
||
| // We need these variables for resetting the timeout | ||
| let counter: number = 0; | ||
| let time: NodeJS.Timeout; | ||
| // Will hold the server | ||
| let server; | ||
|
|
||
| /** | ||
| * This function resets the current timeout. | ||
| * We don't want to close the server if we have just received a new request. | ||
| * @export | ||
| * @param {Request} req the current request | ||
| * @param {Response} res the result of the request | ||
| * @param {*} next to pass control to the next middleware function. Otherwise, the request will be left hanging. | ||
| */ | ||
| export function resetTimeout(req: Request, res: Response, next) { | ||
| counter++; | ||
|
|
||
| if (counter % 2 === 0) { | ||
| // We need to start again the timeout | ||
| time = setTimeout(() => { | ||
| if (server === undefined) { | ||
| // If no server is found, let's just exit | ||
| process.exit(); | ||
| } else { | ||
| // Gracefully close the server | ||
| server.close(); | ||
| } | ||
| }, properties.timeout); | ||
| // The request should be passed to the controller | ||
| next(); | ||
| } else { | ||
| // Let's clear the timeout and then set it again | ||
| clearTimeout(time); | ||
| resetTimeout(req, res, next); | ||
| } | ||
| } | ||
|
|
||
| async function bootstrap() { | ||
| const app = await NestFactory.create(AppModule); | ||
| // Port is passed as argument when creating the process | ||
| let port: string = process.argv[2]; | ||
| // We need to parse long JSON files on requests | ||
| app.use(express.json({ limit: '12mb' })); | ||
| app.use(express.urlencoded({ limit: '12mb', extended: true })); | ||
|
|
||
| if (port === undefined) { | ||
| // Default port when no parameter was passed | ||
| port = '5000'; | ||
| } | ||
|
|
||
| server = await app.listen(port); | ||
|
|
||
| // We set the timeout, so that the server gets closed after some time of inactivity | ||
| time = setTimeout(() => { | ||
| server.close(); | ||
| }, properties.timeout); | ||
| } | ||
| bootstrap(); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "exclude": ["node_modules", "test", "**/*spec.ts"] | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why are there two different ts configurations? |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "module": "commonjs", | ||
| "declaration": true, | ||
| "removeComments": true, | ||
| "emitDecoratorMetadata": true, | ||
| "experimentalDecorators": true, | ||
| "target": "es6", | ||
| "sourceMap": true, | ||
| "outDir": "./dist", | ||
| "baseUrl": "./" | ||
| }, | ||
| "exclude": ["node_modules"] | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can easily inherit from the parent's tsconfig to not duplicate all code https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-2.html#tsconfigjson-inheritance-via-nodejs-packages |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "singleQuote": true, | ||
| "trailingComma": "all" | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.