mirror of
https://github.com/nestjs/nest.git
synced 2026-02-22 23:41:40 +00:00
Compare commits
209 Commits
v7.5.3
...
miZyind-co
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b366ce38f | ||
|
|
dac16e65c7 | ||
|
|
51e6b81bc8 | ||
|
|
57b1425848 | ||
|
|
b14c78e4f1 | ||
|
|
9ee12da212 | ||
|
|
2a456eff23 | ||
|
|
c687fe98a4 | ||
|
|
46e2339fb2 | ||
|
|
41d46c0c07 | ||
|
|
d97799cd30 | ||
|
|
3f16a9c759 | ||
|
|
a042eee0db | ||
|
|
fabee8c985 | ||
|
|
dd0126d37e | ||
|
|
df3fdbd2b2 | ||
|
|
33e13467b0 | ||
|
|
ce48da086d | ||
|
|
3b4b6ba6d4 | ||
|
|
a371ce43aa | ||
|
|
e2a2c5de23 | ||
|
|
e5447c3211 | ||
|
|
32be557506 | ||
|
|
d433cd6869 | ||
|
|
59b9af9ad8 | ||
|
|
92e477950f | ||
|
|
3333676e8a | ||
|
|
51917ce535 | ||
|
|
d8be7989fd | ||
|
|
a0d0d8965e | ||
|
|
00fc0564ab | ||
|
|
fc9bc68ff4 | ||
|
|
2be97be12d | ||
|
|
873bd374bc | ||
|
|
0cee898087 | ||
|
|
e04803e9fa | ||
|
|
3044e1555f | ||
|
|
7c806d6e4d | ||
|
|
b6d6d2fc3f | ||
|
|
ed0588d707 | ||
|
|
9b3c628a05 | ||
|
|
7636b04f2f | ||
|
|
62eb22e507 | ||
|
|
4fd7e16444 | ||
|
|
ee53291960 | ||
|
|
5a1c58eaf1 | ||
|
|
0618737c69 | ||
|
|
b5bcc04298 | ||
|
|
eb7cd4757f | ||
|
|
e6fb4fe526 | ||
|
|
d47e811246 | ||
|
|
6012b0180a | ||
|
|
95292d72c8 | ||
|
|
fa953c2693 | ||
|
|
2f5e402614 | ||
|
|
b218d93856 | ||
|
|
134ffce1c9 | ||
|
|
f9ce94941c | ||
|
|
4e5c128a18 | ||
|
|
b98fbd6272 | ||
|
|
7ee8b71add | ||
|
|
3e44af2842 | ||
|
|
1bbba82333 | ||
|
|
7875091c86 | ||
|
|
3d33283e6b | ||
|
|
c69c24e63c | ||
|
|
bead1f4a57 | ||
|
|
3e616f9e84 | ||
|
|
f90af4911d | ||
|
|
3a97eecb60 | ||
|
|
48690903d2 | ||
|
|
50fe8c7285 | ||
|
|
f22283d9b2 | ||
|
|
6d108aee4f | ||
|
|
e8db6d3ddd | ||
|
|
2c1dc05966 | ||
|
|
087dffff53 | ||
|
|
ab40602f55 | ||
|
|
41db26a2cf | ||
|
|
33a9e23a1f | ||
|
|
5bb0cdb583 | ||
|
|
c734974484 | ||
|
|
514101187e | ||
|
|
5aeb40bdc7 | ||
|
|
d5ad6f3cfc | ||
|
|
3651f3e1b3 | ||
|
|
8e72722037 | ||
|
|
543432cce9 | ||
|
|
730f3c684e | ||
|
|
68225e5db7 | ||
|
|
4f6d6a6b74 | ||
|
|
afaf81d659 | ||
|
|
cbc15b843e | ||
|
|
9b30109f18 | ||
|
|
fabfa3b7c2 | ||
|
|
7df03aab45 | ||
|
|
f36cb0c729 | ||
|
|
34d1c45d9a | ||
|
|
be6adb406c | ||
|
|
7c070f3bf3 | ||
|
|
49bf3529f8 | ||
|
|
fbacade010 | ||
|
|
23616f92e5 | ||
|
|
57d7412f7d | ||
|
|
02dc0d2951 | ||
|
|
6864364fb7 | ||
|
|
36f081c693 | ||
|
|
3184b21a79 | ||
|
|
41693874a1 | ||
|
|
0c12373320 | ||
|
|
a0f68acbb3 | ||
|
|
baa413b2e5 | ||
|
|
44c2dc1c36 | ||
|
|
106ef742dd | ||
|
|
72920a39a9 | ||
|
|
fa4ffb7022 | ||
|
|
d5c39ce1fc | ||
|
|
2108a01898 | ||
|
|
eccefad9ba | ||
|
|
f52f859577 | ||
|
|
68617d6237 | ||
|
|
cf2fbb9a3b | ||
|
|
8a7b1325fb | ||
|
|
b6837fa462 | ||
|
|
49fc64809e | ||
|
|
9f70e430fa | ||
|
|
073a998711 | ||
|
|
66ddc35f3b | ||
|
|
405851b5f7 | ||
|
|
69d08f8ae0 | ||
|
|
64043196ee | ||
|
|
0c4abea0d3 | ||
|
|
89b421dc9d | ||
|
|
7c632d3059 | ||
|
|
d284ce295c | ||
|
|
fcae42d9f5 | ||
|
|
c824870843 | ||
|
|
fe7b878946 | ||
|
|
c39f1c7970 | ||
|
|
35c0a7f326 | ||
|
|
178b6062a6 | ||
|
|
65c611ed94 | ||
|
|
781bce0439 | ||
|
|
9a83e04f1b | ||
|
|
91ab18b895 | ||
|
|
2e45cbf779 | ||
|
|
3614db5eb9 | ||
|
|
3a1c4eab9e | ||
|
|
3632357078 | ||
|
|
90999592b3 | ||
|
|
b56a71c549 | ||
|
|
ec960a6262 | ||
|
|
56e9d963d9 | ||
|
|
72ad857cb3 | ||
|
|
143d213b2a | ||
|
|
2ecf431195 | ||
|
|
404f3f125f | ||
|
|
a40aeaa1ac | ||
|
|
06e256a45e | ||
|
|
9c58e8a838 | ||
|
|
0627dec2aa | ||
|
|
27d1e7a202 | ||
|
|
a77b1155d1 | ||
|
|
0b4682259e | ||
|
|
9acee58108 | ||
|
|
61e2ed9e18 | ||
|
|
3f57df3301 | ||
|
|
bc52688fde | ||
|
|
e5471817ed | ||
|
|
f68634f09e | ||
|
|
29f197f7bf | ||
|
|
a0720c1cc3 | ||
|
|
d94a6e8b40 | ||
|
|
cd950eebe1 | ||
|
|
486e11d59b | ||
|
|
c59e20f9b5 | ||
|
|
711232f878 | ||
|
|
d24c3ca435 | ||
|
|
1b16efab37 | ||
|
|
278c5e0121 | ||
|
|
d496fe8cde | ||
|
|
ac9d7ec15e | ||
|
|
8ee2ff6f98 | ||
|
|
d69222cca7 | ||
|
|
a1dce7deb7 | ||
|
|
42aecea37d | ||
|
|
5837cc7780 | ||
|
|
a29efd7b8e | ||
|
|
94a7675b9e | ||
|
|
b12b410935 | ||
|
|
c79b45ae84 | ||
|
|
7a303edc5f | ||
|
|
74659e966c | ||
|
|
4f782b9881 | ||
|
|
eaeef51003 | ||
|
|
604ee86064 | ||
|
|
01dc358aad | ||
|
|
7f912d7f12 | ||
|
|
55d7b0e890 | ||
|
|
840cef45a4 | ||
|
|
6bf4b0b24d | ||
|
|
ad179935f4 | ||
|
|
4f694e213c | ||
|
|
47f662bdf8 | ||
|
|
e3a1fc2c92 | ||
|
|
d59a06a42a | ||
|
|
c0195a0614 | ||
|
|
1417eeb0a6 | ||
|
|
47f4e2ec10 |
7
.github/dependabot.yml
vendored
Normal file
7
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
@@ -237,7 +237,7 @@ Samples: (even more [samples](https://github.com/nestjs/nest/commits/master))
|
||||
|
||||
```
|
||||
docs(changelog): update change log to beta.5
|
||||
bugfix(core): need to depend on latest rxjs and zone.js
|
||||
fix(core): need to depend on latest rxjs and zone.js
|
||||
```
|
||||
|
||||
### Revert
|
||||
@@ -249,14 +249,16 @@ If the commit reverts a previous commit, it should begin with `revert:`, followe
|
||||
Must be one of the following:
|
||||
|
||||
- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
|
||||
- **chore**: Updating tasks etc; no production code change
|
||||
- **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
|
||||
- **docs**: Documentation only changes
|
||||
- **feature**: A new feature
|
||||
- **feat**: A new feature
|
||||
- **fix**: A bug fix
|
||||
- **perf**: A code change that improves performance
|
||||
- **refactor**: A code change that neither fixes a bug nor adds a feature
|
||||
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
||||
- **test**: Adding missing tests or correcting existing tests
|
||||
- **sample**: A change to the samples
|
||||
|
||||
### Scope
|
||||
|
||||
|
||||
38
integration/nest-application/app-locals/e2e/express.spec.ts
Normal file
38
integration/nest-application/app-locals/e2e/express.spec.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { NestExpressApplication } from '@nestjs/platform-express';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { expect } from 'chai';
|
||||
import * as request from 'supertest';
|
||||
import { AppModule } from '../src/app.module';
|
||||
|
||||
describe('App-level globals (Express Application)', () => {
|
||||
let moduleFixture: TestingModule;
|
||||
let app: NestExpressApplication;
|
||||
|
||||
beforeEach(async () => {
|
||||
moduleFixture = await Test.createTestingModule({
|
||||
imports: [AppModule],
|
||||
}).compile();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
app = moduleFixture.createNestApplication<NestExpressApplication>();
|
||||
});
|
||||
|
||||
it('should get "title" from "app.locals"', async () => {
|
||||
app.setLocal('title', 'My Website');
|
||||
await app.init();
|
||||
const response = await request(app.getHttpServer()).get('/').expect(200);
|
||||
expect(response.body.title).to.equal('My Website');
|
||||
});
|
||||
|
||||
it('should get "email" from "app.locals"', async () => {
|
||||
app.setLocal('email', 'admin@example.com');
|
||||
await app.listen(4444);
|
||||
const response = await request(app.getHttpServer()).get('/').expect(200);
|
||||
expect(response.body.email).to.equal('admin@example.com');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await app.close();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,10 @@
|
||||
import { Controller, Get, Req } from '@nestjs/common';
|
||||
import { Request } from 'express';
|
||||
|
||||
@Controller()
|
||||
export class AppController {
|
||||
@Get()
|
||||
getGlobals(@Req() req: Request) {
|
||||
return req.app.locals;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { AppController } from './app.controller';
|
||||
|
||||
@Module({
|
||||
controllers: [AppController],
|
||||
})
|
||||
export class AppModule {}
|
||||
22
integration/nest-application/app-locals/tsconfig.json
Normal file
22
integration/nest-application/app-locals/tsconfig.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"declaration": false,
|
||||
"noImplicitAny": false,
|
||||
"removeComments": true,
|
||||
"noLib": false,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"target": "es6",
|
||||
"sourceMap": true,
|
||||
"allowJs": true,
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"e2e/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
@@ -37,6 +37,13 @@ describe('Get URL (Express Application)', () => {
|
||||
expect(await app.getUrl()).to.be.eql(`http://127.0.0.1:${port}`);
|
||||
await app.close();
|
||||
});
|
||||
it('should return 127.0.0.1 even in a callback', () => {
|
||||
const app = testModule.createNestApplication(new ExpressAdapter(express()));
|
||||
return app.listen(port, async () => {
|
||||
expect(await app.getUrl()).to.be.eql(`http://127.0.0.1:${port}`);
|
||||
await app.close();
|
||||
});
|
||||
});
|
||||
it('should throw an error for calling getUrl before listen', async () => {
|
||||
const app = testModule.createNestApplication(new ExpressAdapter(express()));
|
||||
try {
|
||||
|
||||
@@ -30,6 +30,13 @@ describe('Get URL (Fastify Application)', () => {
|
||||
expect(await app.getUrl()).to.be.eql(`http://127.0.0.1:${port}`);
|
||||
await app.close();
|
||||
});
|
||||
it('should return 127.0.0.1 even in a callback', () => {
|
||||
const app = testModule.createNestApplication(new FastifyAdapter());
|
||||
return app.listen(port, async () => {
|
||||
expect(await app.getUrl()).to.be.eql(`http://127.0.0.1:${port}`);
|
||||
await app.close();
|
||||
});
|
||||
});
|
||||
it('should throw an error for calling getUrl before listen', async () => {
|
||||
const app = testModule.createNestApplication(new FastifyAdapter());
|
||||
try {
|
||||
|
||||
@@ -28,5 +28,18 @@ describe('WebSocketGateway (ack)', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it(`should handle message with ack & without data (http)`, async () => {
|
||||
app = await createNestApp(AckGateway);
|
||||
await app.listenAsync(3000);
|
||||
|
||||
ws = io.connect('http://localhost:8080');
|
||||
await new Promise(resolve =>
|
||||
ws.emit('push', data => {
|
||||
expect(data).to.be.eql('pong');
|
||||
resolve();
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
afterEach(() => app.close());
|
||||
});
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"version": "7.5.3"
|
||||
"version": "7.5.5"
|
||||
}
|
||||
|
||||
3887
package-lock.json
generated
3887
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
82
package.json
82
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/core",
|
||||
"version": "7.4.0",
|
||||
"version": "7.5.3",
|
||||
"description": "Modern, fast, powerful node.js web framework",
|
||||
"homepage": "https://nestjs.com",
|
||||
"repository": {
|
||||
@@ -51,14 +51,14 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"@nuxtjs/opencollective": "0.3.2",
|
||||
"axios": "0.21.0",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"cli-color": "2.0.0",
|
||||
"cors": "2.8.5",
|
||||
"express": "4.17.1",
|
||||
"fast-json-stringify": "2.2.9",
|
||||
"fast-json-stringify": "2.2.10",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"iterare": "1.2.1",
|
||||
"object-hash": "2.0.3",
|
||||
@@ -74,27 +74,27 @@
|
||||
"@commitlint/cli": "11.0.0",
|
||||
"@commitlint/config-angular": "11.0.0",
|
||||
"@grpc/proto-loader": "0.5.5",
|
||||
"@nestjs/graphql": "7.7.0",
|
||||
"@nestjs/mongoose": "7.0.2",
|
||||
"@nestjs/typeorm": "7.1.4",
|
||||
"@nestjs/graphql": "7.9.1",
|
||||
"@nestjs/mongoose": "7.1.2",
|
||||
"@nestjs/typeorm": "7.1.5",
|
||||
"@types/amqplib": "0.5.16",
|
||||
"@types/bytes": "3.1.0",
|
||||
"@types/cache-manager": "2.10.3",
|
||||
"@types/chai": "4.2.14",
|
||||
"@types/chai-as-promised": "7.1.3",
|
||||
"@types/cors": "2.8.8",
|
||||
"@types/express": "4.17.8",
|
||||
"@types/express": "4.17.9",
|
||||
"@types/gulp": "4.0.7",
|
||||
"@types/mocha": "8.0.3",
|
||||
"@types/mongoose": "5.7.36",
|
||||
"@types/node": "10.17.3",
|
||||
"@types/mocha": "8.0.4",
|
||||
"@types/mongoose": "5.10.2",
|
||||
"@types/node": "14.14.10",
|
||||
"@types/redis": "2.8.28",
|
||||
"@types/reflect-metadata": "0.0.5",
|
||||
"@types/sinon": "9.0.8",
|
||||
"@types/socket.io": "2.1.11",
|
||||
"@types/ws": "7.2.9",
|
||||
"@typescript-eslint/eslint-plugin": "4.5.0",
|
||||
"@typescript-eslint/parser": "4.5.0",
|
||||
"@types/reflect-metadata": "0.1.0",
|
||||
"@types/sinon": "9.0.9",
|
||||
"@types/socket.io": "2.1.12",
|
||||
"@types/ws": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.9.1",
|
||||
"@typescript-eslint/parser": "4.9.0",
|
||||
"amqp-connection-manager": "3.2.1",
|
||||
"amqplib": "0.6.0",
|
||||
"apollo-server-express": "2.19.0",
|
||||
@@ -109,62 +109,62 @@
|
||||
"commitlint-circle": "1.0.0",
|
||||
"concurrently": "5.3.0",
|
||||
"conventional-changelog": "3.1.24",
|
||||
"core-js": "3.7.0",
|
||||
"core-js": "3.8.1",
|
||||
"coveralls": "3.1.0",
|
||||
"delete-empty": "3.0.0",
|
||||
"engine.io-client": "4.0.1",
|
||||
"eslint": "7.10.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"engine.io-client": "4.0.4",
|
||||
"eslint": "7.15.0",
|
||||
"eslint-config-prettier": "7.0.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"eventsource": "1.0.7",
|
||||
"fancy-log": "1.3.3",
|
||||
"fastify": "3.7.0",
|
||||
"fastify-cors": "4.1.0",
|
||||
"fastify": "3.9.1",
|
||||
"fastify-cors": "5.0.0",
|
||||
"fastify-formbody": "5.0.0",
|
||||
"fastify-multipart": "3.3.0",
|
||||
"fastify-static": "3.2.1",
|
||||
"graphql": "15.3.0",
|
||||
"graphql-tools": "6.2.4",
|
||||
"grpc": "1.24.3",
|
||||
"fastify-multipart": "3.3.1",
|
||||
"fastify-static": "3.3.0",
|
||||
"graphql": "15.4.0",
|
||||
"graphql-tools": "7.0.2",
|
||||
"grpc": "1.24.4",
|
||||
"gulp": "4.0.2",
|
||||
"gulp-clang-format": "1.0.27",
|
||||
"gulp-clean": "0.4.0",
|
||||
"gulp-sourcemaps": "2.6.5",
|
||||
"gulp-sourcemaps": "3.0.0",
|
||||
"gulp-typescript": "5.0.1",
|
||||
"gulp-watch": "5.0.1",
|
||||
"husky": "4.3.0",
|
||||
"husky": "4.3.5",
|
||||
"imports-loader": "1.2.0",
|
||||
"json-loader": "0.5.7",
|
||||
"kafkajs": "1.12.0",
|
||||
"lerna": "2.11.0",
|
||||
"light-my-request": "4.2.1",
|
||||
"lint-staged": "10.5.1",
|
||||
"light-my-request": "4.3.0",
|
||||
"lint-staged": "10.5.3",
|
||||
"markdown-table": "2.0.0",
|
||||
"merge-graphql-schemas": "1.7.8",
|
||||
"middie": "5.1.0",
|
||||
"middie": "5.2.0",
|
||||
"mocha": "8.2.1",
|
||||
"mongoose": "5.10.10",
|
||||
"mqtt": "4.2.1",
|
||||
"mongoose": "5.11.5",
|
||||
"mqtt": "4.2.6",
|
||||
"multer": "1.4.2",
|
||||
"mysql": "2.18.1",
|
||||
"nats": "1.4.12",
|
||||
"nodemon": "2.0.6",
|
||||
"nyc": "15.1.0",
|
||||
"point-of-view": "4.6.0",
|
||||
"prettier": "2.1.2",
|
||||
"point-of-view": "4.7.0",
|
||||
"prettier": "2.2.1",
|
||||
"redis": "3.0.2",
|
||||
"rxjs-compat": "6.6.3",
|
||||
"sinon": "9.2.1",
|
||||
"sinon-chai": "3.5.0",
|
||||
"socket.io-client": "2.3.1",
|
||||
"subscriptions-transport-ws": "0.9.18",
|
||||
"supertest": "5.0.0",
|
||||
"ts-morph": "8.1.2",
|
||||
"ts-node": "9.0.0",
|
||||
"typeorm": "0.2.28",
|
||||
"supertest": "6.0.1",
|
||||
"ts-morph": "9.1.0",
|
||||
"ts-node": "9.1.1",
|
||||
"typeorm": "0.2.29",
|
||||
"typescript": "4.0.3",
|
||||
"wrk": "1.2.1",
|
||||
"ws": "7.3.1"
|
||||
"ws": "7.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.13.0"
|
||||
|
||||
@@ -26,4 +26,5 @@ export const HTTP_CODE_METADATA = '__httpCode__';
|
||||
export const MODULE_PATH = '__module_path__';
|
||||
export const HEADERS_METADATA = '__headers__';
|
||||
export const REDIRECT_METADATA = '__redirect__';
|
||||
export const RESPONSE_PASSTHROUGH_METADATA = '__responsePassthrough__';
|
||||
export const SSE_METADATA = '__sse__';
|
||||
|
||||
@@ -3,8 +3,8 @@ import {
|
||||
PATH_METADATA,
|
||||
SCOPE_OPTIONS_METADATA,
|
||||
} from '../../constants';
|
||||
import { isString, isUndefined } from '../../utils/shared.utils';
|
||||
import { ScopeOptions } from '../../interfaces/scope-options.interface';
|
||||
import { isString, isUndefined } from '../../utils/shared.utils';
|
||||
|
||||
/**
|
||||
* Interface defining options that can be passed to `@Controller()` decorator
|
||||
@@ -18,7 +18,7 @@ export interface ControllerOptions extends ScopeOptions {
|
||||
*
|
||||
* @see [Routing](https://docs.nestjs.com/controllers#routing)
|
||||
*/
|
||||
path?: string;
|
||||
path?: string | string[];
|
||||
|
||||
/**
|
||||
* Specifies an optional HTTP Request host filter. When configured, methods
|
||||
@@ -65,7 +65,7 @@ export function Controller(): ClassDecorator;
|
||||
* It defines a class that provides a context for one or more message or event
|
||||
* handlers.
|
||||
*
|
||||
* @param {string} prefix string that defines a `route path prefix`. The prefix
|
||||
* @param {string, Array} prefix string that defines a `route path prefix`. The prefix
|
||||
* is pre-pended to the path specified in any request decorator in the class.
|
||||
*
|
||||
* @see [Routing](https://docs.nestjs.com/controllers#routing)
|
||||
@@ -74,7 +74,7 @@ export function Controller(): ClassDecorator;
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function Controller(prefix: string): ClassDecorator;
|
||||
export function Controller(prefix: string | string[]): ClassDecorator;
|
||||
|
||||
/**
|
||||
* Decorator that marks a class as a Nest controller that can receive inbound
|
||||
@@ -137,12 +137,13 @@ export function Controller(options: ControllerOptions): ClassDecorator;
|
||||
* @publicApi
|
||||
*/
|
||||
export function Controller(
|
||||
prefixOrOptions?: string | ControllerOptions,
|
||||
prefixOrOptions?: string | string[] | ControllerOptions,
|
||||
): ClassDecorator {
|
||||
const defaultPath = '/';
|
||||
|
||||
const [path, host, scopeOptions] = isUndefined(prefixOrOptions)
|
||||
? [defaultPath, undefined, undefined]
|
||||
: isString(prefixOrOptions)
|
||||
: isString(prefixOrOptions) || Array.isArray(prefixOrOptions)
|
||||
? [prefixOrOptions, undefined, undefined]
|
||||
: [
|
||||
prefixOrOptions.path || defaultPath,
|
||||
|
||||
@@ -1,9 +1,26 @@
|
||||
import { ROUTE_ARGS_METADATA } from '../../constants';
|
||||
import {
|
||||
RESPONSE_PASSTHROUGH_METADATA,
|
||||
ROUTE_ARGS_METADATA,
|
||||
} from '../../constants';
|
||||
import { RouteParamtypes } from '../../enums/route-paramtypes.enum';
|
||||
import { PipeTransform } from '../../index';
|
||||
import { Type } from '../../interfaces';
|
||||
import { isNil, isString } from '../../utils/shared.utils';
|
||||
|
||||
/**
|
||||
* The `@Response()`/`@Res` parameter decorator options.
|
||||
*/
|
||||
export interface ResponseDecoratorOptions {
|
||||
/**
|
||||
* Determines whether the response will be sent manually within the route handler,
|
||||
* with the use of native response handling methods exposed by the platform-specific response object,
|
||||
* or if it should passthrough Nest response processing pipeline.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
passthrough: boolean;
|
||||
}
|
||||
|
||||
export type ParamData = object | string | number;
|
||||
export interface RouteParamMetadata {
|
||||
index: number;
|
||||
@@ -85,21 +102,35 @@ export const Request: () => ParameterDecorator = createRouteParamDecorator(
|
||||
*
|
||||
* Example: `logout(@Response() res)`
|
||||
*
|
||||
* @see [Request object](https://docs.nestjs.com/controllers#request-object)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const Response: () => ParameterDecorator = createRouteParamDecorator(
|
||||
RouteParamtypes.RESPONSE,
|
||||
);
|
||||
export const Response: (
|
||||
options?: ResponseDecoratorOptions,
|
||||
) => ParameterDecorator = (options?: ResponseDecoratorOptions) => (
|
||||
target,
|
||||
key,
|
||||
index,
|
||||
) => {
|
||||
if (options?.passthrough) {
|
||||
Reflect.defineMetadata(
|
||||
RESPONSE_PASSTHROUGH_METADATA,
|
||||
options?.passthrough,
|
||||
target.constructor,
|
||||
key,
|
||||
);
|
||||
}
|
||||
return createRouteParamDecorator(RouteParamtypes.RESPONSE)()(
|
||||
target,
|
||||
key,
|
||||
index,
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts reference to the `Next` function
|
||||
* from the underlying platform and populates the decorated
|
||||
* parameter with the value of `Next`.
|
||||
*
|
||||
* @see [Request object](https://docs.nestjs.com/controllers#request-object)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const Next: () => ParameterDecorator = createRouteParamDecorator(
|
||||
|
||||
@@ -2,6 +2,7 @@ export enum HttpStatus {
|
||||
CONTINUE = 100,
|
||||
SWITCHING_PROTOCOLS = 101,
|
||||
PROCESSING = 102,
|
||||
EARLYHINTS = 103,
|
||||
OK = 200,
|
||||
CREATED = 201,
|
||||
ACCEPTED = 202,
|
||||
|
||||
@@ -6,7 +6,7 @@ export interface MiddlewareConfigProxy {
|
||||
/**
|
||||
* Excludes routes from the currently processed middleware.
|
||||
*
|
||||
* @param {} ...routes
|
||||
* @param {(string | RouteInfo)[]} routes
|
||||
* @returns {MiddlewareConfigProxy}
|
||||
*/
|
||||
exclude(...routes: (string | RouteInfo)[]): MiddlewareConfigProxy;
|
||||
@@ -15,7 +15,7 @@ export interface MiddlewareConfigProxy {
|
||||
* Attaches passed either routes or controllers to the currently configured middleware.
|
||||
* If you pass a class, Nest would attach middleware to every path defined within this controller.
|
||||
*
|
||||
* @param {} ...routes
|
||||
* @param {(string | Type | RouteInfo)[]} routes
|
||||
* @returns {MiddlewareConsumer}
|
||||
*/
|
||||
forRoutes(...routes: (string | Type<any> | RouteInfo)[]): MiddlewareConsumer;
|
||||
|
||||
@@ -10,7 +10,7 @@ import { MiddlewareConfigProxy } from './middleware-config-proxy.interface';
|
||||
*/
|
||||
export interface MiddlewareConsumer {
|
||||
/**
|
||||
* @param middleware middleware class/function or array of classes/functions
|
||||
* @param {...(Type | Function)} middleware middleware class/function or array of classes/functions
|
||||
* to be attached to the passed routes.
|
||||
*
|
||||
* @returns {MiddlewareConfigProxy}
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface DynamicModule extends ModuleMetadata {
|
||||
* in all modules. Thereafter, modules that wish to inject a service exported
|
||||
* from a global module do not need to import the provider module.
|
||||
*
|
||||
* Default: false
|
||||
* @default false
|
||||
*/
|
||||
global?: boolean;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface INestApplication extends INestApplicationContext {
|
||||
* A wrapper function around HTTP adapter method: `adapter.use()`.
|
||||
* Example `app.use(cors())`
|
||||
*
|
||||
* @returns {void}
|
||||
* @returns {this}
|
||||
*/
|
||||
use(...args: any[]): this;
|
||||
|
||||
@@ -35,10 +35,10 @@ export interface INestApplication extends INestApplicationContext {
|
||||
/**
|
||||
* Starts the application.
|
||||
*
|
||||
* @param {number} port
|
||||
* @param {string} hostname
|
||||
* @param {Function} callback Optional callback
|
||||
* @returns A Promise that, when resolved, is a reference to the underlying HttpServer.
|
||||
* @param {number|string} port
|
||||
* @param {string} [hostname]
|
||||
* @param {Function} [callback] Optional callback
|
||||
* @returns {Promise} A Promise that, when resolved, is a reference to the underlying HttpServer.
|
||||
*/
|
||||
listen(port: number | string, callback?: () => void): Promise<any>;
|
||||
listen(
|
||||
@@ -50,15 +50,15 @@ export interface INestApplication extends INestApplicationContext {
|
||||
/**
|
||||
* Returns the url the application is listening at, based on OS and IP version. Returns as an IP value either in IPv6 or IPv4
|
||||
*
|
||||
* @returns The IP where the server is listening
|
||||
* @returns {Promise<string>} The IP where the server is listening
|
||||
*/
|
||||
getUrl(): Promise<string>;
|
||||
|
||||
/**
|
||||
* Starts the application (can be awaited).
|
||||
*
|
||||
* @param {number} port
|
||||
* @param {string} hostname (optional)
|
||||
* @param {number|string} port
|
||||
* @param {string} [hostname]
|
||||
* @returns {Promise}
|
||||
*/
|
||||
listenAsync(port: number | string, hostname?: string): Promise<any>;
|
||||
@@ -66,17 +66,17 @@ export interface INestApplication extends INestApplicationContext {
|
||||
/**
|
||||
* Registers a prefix for every HTTP route path.
|
||||
*
|
||||
* @param {string} prefix The prefix for every HTTP route path (for example `/v1/api`)
|
||||
* @returns {void}
|
||||
* @param {string} prefix The prefix for every HTTP route path (for example `/v1/api`)
|
||||
* @returns {this}
|
||||
*/
|
||||
setGlobalPrefix(prefix: string): this;
|
||||
|
||||
/**
|
||||
* Setup Ws Adapter which will be used inside Gateways.
|
||||
* Register Ws Adapter which will be used inside Gateways.
|
||||
* Use when you want to override default `socket.io` library.
|
||||
*
|
||||
* @param {WebSocketAdapter} adapter
|
||||
* @returns {void}
|
||||
* @param {WebSocketAdapter} adapter
|
||||
* @returns {this}
|
||||
*/
|
||||
useWebSocketAdapter(adapter: WebSocketAdapter): this;
|
||||
|
||||
@@ -84,8 +84,9 @@ export interface INestApplication extends INestApplicationContext {
|
||||
* Connects microservice to the NestApplication instance. Transforms application
|
||||
* to a hybrid instance.
|
||||
*
|
||||
* @param {T} options Microservice options object
|
||||
* @param {NestHybridApplicationOptions} hybridOptions Hybrid options object
|
||||
* @template {object} T
|
||||
* @param {T} options Microservice options object
|
||||
* @param {NestHybridApplicationOptions} hybridOptions Hybrid options object
|
||||
* @returns {INestMicroservice}
|
||||
*/
|
||||
connectMicroservice<T extends object = any>(
|
||||
@@ -103,7 +104,7 @@ export interface INestApplication extends INestApplicationContext {
|
||||
/**
|
||||
* Returns the underlying native HTTP server.
|
||||
*
|
||||
* @returns {any}
|
||||
* @returns {*}
|
||||
*/
|
||||
getHttpServer(): any;
|
||||
|
||||
@@ -117,8 +118,8 @@ export interface INestApplication extends INestApplicationContext {
|
||||
/**
|
||||
* Starts all connected microservices asynchronously.
|
||||
*
|
||||
* @param {Function} callback Optional callback function
|
||||
* @returns {void}
|
||||
* @param {Function} [callback] Optional callback function
|
||||
* @returns {this}
|
||||
*/
|
||||
startAllMicroservices(callback?: () => void): this;
|
||||
|
||||
@@ -133,14 +134,14 @@ export interface INestApplication extends INestApplicationContext {
|
||||
* Registers exception filters as global filters (will be used within
|
||||
* every HTTP route handler)
|
||||
*
|
||||
* @param {ExceptionFilter[]} ...filters
|
||||
* @param {...ExceptionFilter} filters
|
||||
*/
|
||||
useGlobalFilters(...filters: ExceptionFilter[]): this;
|
||||
|
||||
/**
|
||||
* Registers pipes as global pipes (will be used within every HTTP route handler)
|
||||
*
|
||||
* @param {PipeTransform[]} ...pipes
|
||||
* @param {...PipeTransform} pipes
|
||||
*/
|
||||
useGlobalPipes(...pipes: PipeTransform<any>[]): this;
|
||||
|
||||
@@ -148,14 +149,14 @@ export interface INestApplication extends INestApplicationContext {
|
||||
* Registers interceptors as global interceptors (will be used within
|
||||
* every HTTP route handler)
|
||||
*
|
||||
* @param {NestInterceptor[]} ...interceptors
|
||||
* @param {...NestInterceptor} interceptors
|
||||
*/
|
||||
useGlobalInterceptors(...interceptors: NestInterceptor[]): this;
|
||||
|
||||
/**
|
||||
* Registers guards as global guards (will be used within every HTTP route handler)
|
||||
*
|
||||
* @param {CanActivate[]} ...guards
|
||||
* @param {...CanActivate} guards
|
||||
*/
|
||||
useGlobalGuards(...guards: CanActivate[]): this;
|
||||
|
||||
|
||||
@@ -14,11 +14,10 @@ export interface INestMicroservice extends INestApplicationContext {
|
||||
/**
|
||||
* Starts the microservice.
|
||||
*
|
||||
* @param {Function} callback
|
||||
* @returns {Promise}
|
||||
*
|
||||
* @param {Function} callback
|
||||
* @returns {void}
|
||||
*/
|
||||
listen(callback: () => void): any;
|
||||
listen(callback: () => void): void;
|
||||
|
||||
/**
|
||||
* Starts the microservice (can be awaited).
|
||||
@@ -29,38 +28,38 @@ export interface INestMicroservice extends INestApplicationContext {
|
||||
|
||||
/**
|
||||
* Register Ws Adapter which will be used inside Gateways.
|
||||
* Use, when you want to override default `socket.io` library.
|
||||
* Use when you want to override default `socket.io` library.
|
||||
*
|
||||
* @param {WebSocketAdapter} adapter
|
||||
* @returns {void}
|
||||
* @param {WebSocketAdapter} adapter
|
||||
* @returns {this}
|
||||
*/
|
||||
useWebSocketAdapter(adapter: WebSocketAdapter): this;
|
||||
|
||||
/**
|
||||
* Registers exception filters as a global filters (will be used within every message pattern handler)
|
||||
* Registers exception filters as global filters (will be used within every message pattern handler)
|
||||
*
|
||||
* @param {ExceptionFilter[]} ...filters
|
||||
* @param {...ExceptionFilter} filters
|
||||
*/
|
||||
useGlobalFilters(...filters: ExceptionFilter[]): this;
|
||||
|
||||
/**
|
||||
* Registers pipes as a global pipes (will be used within every message pattern handler)
|
||||
* Registers pipes as global pipes (will be used within every message pattern handler)
|
||||
*
|
||||
* @param {PipeTransform[]} ...pipes
|
||||
* @param {...PipeTransform} pipes
|
||||
*/
|
||||
useGlobalPipes(...pipes: PipeTransform<any>[]): this;
|
||||
|
||||
/**
|
||||
* Registers interceptors as a global interceptors (will be used within every message pattern handler)
|
||||
* Registers interceptors as global interceptors (will be used within every message pattern handler)
|
||||
*
|
||||
* @param {NestInterceptor[]} ...interceptors
|
||||
* @param {...NestInterceptor} interceptors
|
||||
*/
|
||||
useGlobalInterceptors(...interceptors: NestInterceptor[]): this;
|
||||
|
||||
/**
|
||||
* Registers guards as a global guards (will be used within every message pattern handler)
|
||||
* Registers guards as global guards (will be used within every message pattern handler)
|
||||
*
|
||||
* @param {CanActivate[]} ...guards
|
||||
* @param {...CanActivate} guards
|
||||
*/
|
||||
useGlobalGuards(...guards: CanActivate[]): this;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/common",
|
||||
"version": "7.5.3",
|
||||
"version": "7.5.5",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"homepage": "https://nestjs.com",
|
||||
|
||||
@@ -113,7 +113,7 @@ export class ValidationPipe implements PipeTransform<any> {
|
||||
|
||||
const errors = await classValidator.validate(entity, this.validatorOptions);
|
||||
if (errors.length > 0) {
|
||||
throw this.exceptionFactory(errors);
|
||||
throw await this.exceptionFactory(errors);
|
||||
}
|
||||
if (isPrimitive) {
|
||||
// if the value is a primitive value and the validation process has been successfully completed
|
||||
|
||||
@@ -25,7 +25,7 @@ export class Logger implements LoggerService {
|
||||
'verbose',
|
||||
];
|
||||
private static lastTimestamp?: number;
|
||||
private static instance?: typeof Logger | LoggerService = Logger;
|
||||
protected static instance?: typeof Logger | LoggerService = Logger;
|
||||
|
||||
constructor(
|
||||
@Optional() protected context?: string,
|
||||
@@ -61,6 +61,10 @@ export class Logger implements LoggerService {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
getTimestamp() {
|
||||
return Logger.getTimestamp();
|
||||
}
|
||||
|
||||
static overrideLogger(logger: LoggerService | LogLevel[] | boolean) {
|
||||
if (Array.isArray(logger)) {
|
||||
this.logLevels = logger;
|
||||
@@ -95,6 +99,18 @@ export class Logger implements LoggerService {
|
||||
this.printMessage(message, clc.cyanBright, context, isTimeDiffEnabled);
|
||||
}
|
||||
|
||||
static getTimestamp() {
|
||||
const localeStringOptions = {
|
||||
year: 'numeric',
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
second: 'numeric',
|
||||
day: '2-digit',
|
||||
month: '2-digit',
|
||||
};
|
||||
return new Date(Date.now()).toLocaleString(undefined, localeStringOptions);
|
||||
}
|
||||
|
||||
private callFunction(
|
||||
name: 'log' | 'warn' | 'debug' | 'verbose',
|
||||
message: any,
|
||||
@@ -114,7 +130,7 @@ export class Logger implements LoggerService {
|
||||
);
|
||||
}
|
||||
|
||||
private getInstance(): typeof Logger | LoggerService {
|
||||
protected getInstance(): typeof Logger | LoggerService {
|
||||
const { instance } = Logger;
|
||||
return instance === this ? Logger : instance;
|
||||
}
|
||||
@@ -133,25 +149,12 @@ export class Logger implements LoggerService {
|
||||
? `${color('Object:')}\n${JSON.stringify(message, null, 2)}\n`
|
||||
: color(message);
|
||||
|
||||
const localeStringOptions = {
|
||||
year: 'numeric',
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
second: 'numeric',
|
||||
day: '2-digit',
|
||||
month: '2-digit',
|
||||
};
|
||||
const timestamp = new Date(Date.now()).toLocaleString(
|
||||
undefined,
|
||||
localeStringOptions,
|
||||
);
|
||||
|
||||
const pidMessage = color(`[Nest] ${process.pid} - `);
|
||||
const contextMessage = context ? yellow(`[${context}] `) : '';
|
||||
const timestampDiff = this.updateAndGetTimestampDiff(isTimeDiffEnabled);
|
||||
|
||||
const instance = this.instance as typeof Logger;
|
||||
process.stdout.write(
|
||||
`${pidMessage}${timestamp} ${contextMessage}${output}${timestampDiff}\n`,
|
||||
`${pidMessage}${instance.getTimestamp()} ${contextMessage}${output}${timestampDiff}\n`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { expect } from 'chai';
|
||||
import {
|
||||
isUndefined,
|
||||
isFunction,
|
||||
isObject,
|
||||
isString,
|
||||
addLeadingSlash,
|
||||
isConstructor,
|
||||
validatePath,
|
||||
isNil,
|
||||
isEmpty,
|
||||
isFunction,
|
||||
isNil,
|
||||
isObject,
|
||||
isPlainObject,
|
||||
isString,
|
||||
isUndefined,
|
||||
} from '../../utils/shared.utils';
|
||||
|
||||
function Foo(a) {
|
||||
@@ -81,17 +81,17 @@ describe('Shared utils', () => {
|
||||
expect(isConstructor('nope')).to.be.false;
|
||||
});
|
||||
});
|
||||
describe('validatePath', () => {
|
||||
describe('addLeadingSlash', () => {
|
||||
it('should returns validated path ("add / if not exists")', () => {
|
||||
expect(validatePath('nope')).to.be.eql('/nope');
|
||||
expect(addLeadingSlash('nope')).to.be.eql('/nope');
|
||||
});
|
||||
it('should returns same path', () => {
|
||||
expect(validatePath('/nope')).to.be.eql('/nope');
|
||||
expect(addLeadingSlash('/nope')).to.be.eql('/nope');
|
||||
});
|
||||
it('should returns empty path', () => {
|
||||
expect(validatePath('')).to.be.eql('');
|
||||
expect(validatePath(null)).to.be.eql('');
|
||||
expect(validatePath(undefined)).to.be.eql('');
|
||||
expect(addLeadingSlash('')).to.be.eql('');
|
||||
expect(addLeadingSlash(null)).to.be.eql('');
|
||||
expect(addLeadingSlash(undefined)).to.be.eql('');
|
||||
});
|
||||
});
|
||||
describe('isNil', () => {
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
type ColorTextFn = (text: string) => string;
|
||||
|
||||
const isColorAllowed = () => !process.env.NO_COLOR;
|
||||
const colorIfAllowed = (colorFn: ColorTextFn) => (text: string) =>
|
||||
isColorAllowed() ? colorFn(text) : text;
|
||||
|
||||
export const clc = {
|
||||
green: (text: string) => `\x1B[32m${text}\x1B[39m`,
|
||||
yellow: (text: string) => `\x1B[33m${text}\x1B[39m`,
|
||||
red: (text: string) => `\x1B[31m${text}\x1B[39m`,
|
||||
magentaBright: (text: string) => `\x1B[95m${text}\x1B[39m`,
|
||||
cyanBright: (text: string) => `\x1B[96m${text}\x1B[39m`,
|
||||
green: colorIfAllowed((text: string) => `\x1B[32m${text}\x1B[39m`),
|
||||
yellow: colorIfAllowed((text: string) => `\x1B[33m${text}\x1B[39m`),
|
||||
red: colorIfAllowed((text: string) => `\x1B[31m${text}\x1B[39m`),
|
||||
magentaBright: colorIfAllowed((text: string) => `\x1B[95m${text}\x1B[39m`),
|
||||
cyanBright: colorIfAllowed((text: string) => `\x1B[96m${text}\x1B[39m`),
|
||||
};
|
||||
export const yellow = (text: string) => `\x1B[38;5;3m${text}\x1B[39m`;
|
||||
export const yellow = colorIfAllowed(
|
||||
(text: string) => `\x1B[38;5;3m${text}\x1B[39m`,
|
||||
);
|
||||
|
||||
@@ -24,7 +24,7 @@ export const isPlainObject = (fn: any): fn is object => {
|
||||
);
|
||||
};
|
||||
|
||||
export const validatePath = (path?: string): string =>
|
||||
export const addLeadingSlash = (path?: string): string =>
|
||||
path ? (path.charAt(0) !== '/' ? '/' + path : path) : '';
|
||||
|
||||
export const isFunction = (fn: any): boolean => typeof fn === 'function';
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import { ParamData } from '@nestjs/common';
|
||||
import { PARAMTYPES_METADATA } from '@nestjs/common/constants';
|
||||
import {
|
||||
PARAMTYPES_METADATA,
|
||||
RESPONSE_PASSTHROUGH_METADATA,
|
||||
} from '@nestjs/common/constants';
|
||||
import {
|
||||
ContextType,
|
||||
Controller,
|
||||
@@ -38,6 +41,14 @@ export class ContextUtils {
|
||||
return Reflect.getMetadata(metadataKey, instance.constructor, methodName);
|
||||
}
|
||||
|
||||
public reflectPassthrough(instance: Controller, methodName: string): boolean {
|
||||
return Reflect.getMetadata(
|
||||
RESPONSE_PASSTHROUGH_METADATA,
|
||||
instance.constructor,
|
||||
methodName,
|
||||
);
|
||||
}
|
||||
|
||||
public getArgumentsLength<T>(keys: string[], metadata: T): number {
|
||||
return Math.max(...keys.map(key => metadata[key].index)) + 1;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,10 @@ import {
|
||||
} from '@nestjs/common/interfaces/middleware/middleware-configuration.interface';
|
||||
import { NestMiddleware } from '@nestjs/common/interfaces/middleware/nest-middleware.interface';
|
||||
import { NestModule } from '@nestjs/common/interfaces/modules/nest-module.interface';
|
||||
import { isUndefined, validatePath } from '@nestjs/common/utils/shared.utils';
|
||||
import {
|
||||
addLeadingSlash,
|
||||
isUndefined,
|
||||
} from '@nestjs/common/utils/shared.utils';
|
||||
import { ApplicationConfig } from '../application-config';
|
||||
import { InvalidMiddlewareException } from '../errors/exceptions/invalid-middleware.exception';
|
||||
import { RuntimeException } from '../errors/exceptions/runtime.exception';
|
||||
@@ -265,7 +268,7 @@ export class MiddlewareModule {
|
||||
) => void,
|
||||
) {
|
||||
const prefix = this.config.getGlobalPrefix();
|
||||
const basePath = validatePath(prefix);
|
||||
const basePath = addLeadingSlash(prefix);
|
||||
if (basePath && path === '/*') {
|
||||
// strip slash when a wildcard is being used
|
||||
// and global prefix has been set
|
||||
|
||||
@@ -2,9 +2,9 @@ import { RequestMethod } from '@nestjs/common';
|
||||
import { PATH_METADATA } from '@nestjs/common/constants';
|
||||
import { RouteInfo, Type } from '@nestjs/common/interfaces';
|
||||
import {
|
||||
addLeadingSlash,
|
||||
isString,
|
||||
isUndefined,
|
||||
validatePath,
|
||||
} from '@nestjs/common/utils/shared.utils';
|
||||
import { NestContainer } from '../injector/container';
|
||||
import { MetadataScanner } from '../metadata-scanner';
|
||||
@@ -64,11 +64,11 @@ export class RoutesMapper {
|
||||
}
|
||||
|
||||
private validateGlobalPath(path: string): string {
|
||||
const prefix = validatePath(path);
|
||||
const prefix = addLeadingSlash(path);
|
||||
return prefix === '/' ? '' : prefix;
|
||||
}
|
||||
|
||||
private validateRoutePath(path: string): string {
|
||||
return validatePath(path);
|
||||
return addLeadingSlash(path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ export class NestApplicationContext implements INestApplicationContext {
|
||||
}
|
||||
|
||||
public resolve<TInput = any, TResult = TInput>(
|
||||
typeOrToken: Type<TInput> | string | symbol,
|
||||
typeOrToken: Type<TInput> | Abstract<TInput> | string | symbol,
|
||||
contextId = createContextId(),
|
||||
options: { strict: boolean } = { strict: false },
|
||||
): Promise<TResult> {
|
||||
@@ -278,7 +278,7 @@ export class NestApplicationContext implements INestApplicationContext {
|
||||
}
|
||||
|
||||
protected async resolvePerContext<TInput = any, TResult = TInput>(
|
||||
typeOrToken: Type<TInput> | string | symbol,
|
||||
typeOrToken: Type<TInput> | Abstract<TInput> | string | symbol,
|
||||
contextModule: Module,
|
||||
contextId: ContextId,
|
||||
options?: { strict: boolean },
|
||||
|
||||
@@ -13,7 +13,7 @@ import { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.int
|
||||
import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-application-options.interface';
|
||||
import { Logger } from '@nestjs/common/services/logger.service';
|
||||
import { loadPackage } from '@nestjs/common/utils/load-package.util';
|
||||
import { isObject, validatePath } from '@nestjs/common/utils/shared.utils';
|
||||
import { addLeadingSlash, isObject } from '@nestjs/common/utils/shared.utils';
|
||||
import { iterate } from 'iterare';
|
||||
import { platform } from 'os';
|
||||
import { AbstractHttpAdapter } from './adapters';
|
||||
@@ -164,7 +164,7 @@ export class NestApplication
|
||||
await this.registerMiddleware(this.httpAdapter);
|
||||
|
||||
const prefix = this.config.getGlobalPrefix();
|
||||
const basePath = validatePath(prefix);
|
||||
const basePath = addLeadingSlash(prefix);
|
||||
this.routesResolver.resolve(this.httpAdapter, basePath);
|
||||
}
|
||||
|
||||
@@ -239,8 +239,8 @@ export class NestApplication
|
||||
): Promise<any>;
|
||||
public async listen(port: number | string, ...args: any[]): Promise<any> {
|
||||
!this.isInitialized && (await this.init());
|
||||
this.httpAdapter.listen(port, ...args);
|
||||
this.isListening = true;
|
||||
this.httpAdapter.listen(port, ...args);
|
||||
return this.httpServer;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/core",
|
||||
"version": "7.5.3",
|
||||
"version": "7.5.5",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"@nuxtjs/opencollective": "0.3.2",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"iterare": "1.2.1",
|
||||
"object-hash": "2.0.3",
|
||||
@@ -36,7 +36,7 @@
|
||||
"uuid": "8.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.5.3"
|
||||
"@nestjs/common": "7.5.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -215,9 +215,10 @@ export class RouterExecutionContext {
|
||||
);
|
||||
|
||||
const paramsMetadata = getParamsMetadata(moduleKey);
|
||||
const isResponseHandled = paramsMetadata.some(
|
||||
({ type }) =>
|
||||
type === RouteParamtypes.RESPONSE || type === RouteParamtypes.NEXT,
|
||||
const isResponseHandled = this.isResponseHandled(
|
||||
instance,
|
||||
methodName,
|
||||
paramsMetadata,
|
||||
);
|
||||
|
||||
const httpRedirectResponse = this.reflectRedirect(callback);
|
||||
@@ -444,4 +445,20 @@ export class RouterExecutionContext {
|
||||
(await this.responseController.apply(result, res, httpStatusCode));
|
||||
};
|
||||
}
|
||||
|
||||
private isResponseHandled(
|
||||
instance: Controller,
|
||||
methodName: string,
|
||||
paramsMetadata: ParamProperties[],
|
||||
): boolean {
|
||||
const hasResponseOrNextDecorator = paramsMetadata.some(
|
||||
({ type }) =>
|
||||
type === RouteParamtypes.RESPONSE || type === RouteParamtypes.NEXT,
|
||||
);
|
||||
const isPassthroughEnabled = this.contextUtils.reflectPassthrough(
|
||||
instance,
|
||||
methodName,
|
||||
);
|
||||
return hasResponseOrNextDecorator && !isPassthroughEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ import { Controller } from '@nestjs/common/interfaces/controllers/controller.int
|
||||
import { Type } from '@nestjs/common/interfaces/type.interface';
|
||||
import { Logger } from '@nestjs/common/services/logger.service';
|
||||
import {
|
||||
addLeadingSlash,
|
||||
isString,
|
||||
isUndefined,
|
||||
validatePath,
|
||||
} from '@nestjs/common/utils/shared.utils';
|
||||
import * as pathToRegexp from 'path-to-regexp';
|
||||
import { ApplicationConfig } from '../application-config';
|
||||
@@ -87,20 +87,20 @@ export class RouterExplorer {
|
||||
);
|
||||
}
|
||||
|
||||
public extractRouterPath(
|
||||
metatype: Type<Controller>,
|
||||
prefix?: string,
|
||||
): string {
|
||||
public extractRouterPath(metatype: Type<Controller>, prefix = ''): string[] {
|
||||
let path = Reflect.getMetadata(PATH_METADATA, metatype);
|
||||
if (prefix) path = prefix + this.validateRoutePath(path);
|
||||
return this.validateRoutePath(path);
|
||||
}
|
||||
|
||||
public validateRoutePath(path: string): string {
|
||||
if (isUndefined(path)) {
|
||||
throw new UnknownRequestMappingException();
|
||||
}
|
||||
return validatePath(path);
|
||||
|
||||
if (Array.isArray(path)) {
|
||||
path = path.map(p => prefix + addLeadingSlash(p));
|
||||
} else {
|
||||
path = [prefix + addLeadingSlash(path)];
|
||||
}
|
||||
|
||||
return path.map(p => addLeadingSlash(p));
|
||||
}
|
||||
|
||||
public scanForPaths(
|
||||
@@ -134,8 +134,8 @@ export class RouterExplorer {
|
||||
targetCallback,
|
||||
);
|
||||
const path = isString(routePath)
|
||||
? [this.validateRoutePath(routePath)]
|
||||
: routePath.map(p => this.validateRoutePath(p));
|
||||
? [addLeadingSlash(routePath)]
|
||||
: routePath.map(p => addLeadingSlash(p));
|
||||
return {
|
||||
path,
|
||||
requestMethod,
|
||||
|
||||
@@ -60,24 +60,27 @@ export class RoutesResolver implements Resolver {
|
||||
const { metatype } = instanceWrapper;
|
||||
|
||||
const host = this.getHostMetadata(metatype);
|
||||
const path = this.routerExplorer.extractRouterPath(
|
||||
const paths = this.routerExplorer.extractRouterPath(
|
||||
metatype as Type<any>,
|
||||
basePath,
|
||||
);
|
||||
const controllerName = metatype.name;
|
||||
this.logger.log(
|
||||
CONTROLLER_MAPPING_MESSAGE(
|
||||
controllerName,
|
||||
this.routerExplorer.stripEndSlash(path),
|
||||
),
|
||||
);
|
||||
this.routerExplorer.explore(
|
||||
instanceWrapper,
|
||||
moduleName,
|
||||
applicationRef,
|
||||
path,
|
||||
host,
|
||||
);
|
||||
|
||||
paths.forEach(path => {
|
||||
this.logger.log(
|
||||
CONTROLLER_MAPPING_MESSAGE(
|
||||
controllerName,
|
||||
this.routerExplorer.stripEndSlash(path),
|
||||
),
|
||||
);
|
||||
this.routerExplorer.explore(
|
||||
instanceWrapper,
|
||||
moduleName,
|
||||
applicationRef,
|
||||
path,
|
||||
host,
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ export class SseStream extends Transform {
|
||||
Connection: 'keep-alive',
|
||||
// Disable cache, even for old browsers and proxies
|
||||
'Cache-Control':
|
||||
'private, no-cache, no-store, must-revalidate, max-age=0',
|
||||
'private, no-cache, no-store, must-revalidate, max-age=0, no-transform',
|
||||
'Transfer-Encoding': 'identity',
|
||||
Pragma: 'no-cache',
|
||||
Expire: '0',
|
||||
|
||||
@@ -37,14 +37,14 @@ import { iterate } from 'iterare';
|
||||
import { ApplicationConfig } from './application-config';
|
||||
import { APP_FILTER, APP_GUARD, APP_INTERCEPTOR, APP_PIPE } from './constants';
|
||||
import { CircularDependencyException } from './errors/exceptions/circular-dependency.exception';
|
||||
import { InvalidModuleException } from './errors/exceptions/invalid-module.exception';
|
||||
import { UndefinedModuleException } from './errors/exceptions/undefined-module.exception';
|
||||
import { getClassScope } from './helpers/get-class-scope';
|
||||
import { ModulesContainer } from './injector';
|
||||
import { NestContainer } from './injector/container';
|
||||
import { InstanceWrapper } from './injector/instance-wrapper';
|
||||
import { Module } from './injector/module';
|
||||
import { MetadataScanner } from './metadata-scanner';
|
||||
import { InvalidModuleException } from './errors/exceptions/invalid-module.exception';
|
||||
import { UndefinedModuleException } from './errors/exceptions/undefined-module.exception';
|
||||
|
||||
interface ApplicationProviderWrapper {
|
||||
moduleKey: string;
|
||||
@@ -72,40 +72,53 @@ export class DependenciesScanner {
|
||||
}
|
||||
|
||||
public async scanForModules(
|
||||
module: ForwardReference | Type<unknown> | DynamicModule,
|
||||
moduleDefinition:
|
||||
| ForwardReference
|
||||
| Type<unknown>
|
||||
| DynamicModule
|
||||
| Promise<DynamicModule>,
|
||||
scope: Type<unknown>[] = [],
|
||||
ctxRegistry: (ForwardReference | DynamicModule | Type<unknown>)[] = [],
|
||||
): Promise<Module> {
|
||||
const moduleInstance = await this.insertModule(module, scope);
|
||||
ctxRegistry.push(module);
|
||||
const moduleInstance = await this.insertModule(moduleDefinition, scope);
|
||||
moduleDefinition =
|
||||
moduleDefinition instanceof Promise
|
||||
? await moduleDefinition
|
||||
: moduleDefinition;
|
||||
ctxRegistry.push(moduleDefinition);
|
||||
|
||||
if (this.isForwardReference(module)) {
|
||||
module = (module as ForwardReference).forwardRef();
|
||||
if (this.isForwardReference(moduleDefinition)) {
|
||||
moduleDefinition = (moduleDefinition as ForwardReference).forwardRef();
|
||||
}
|
||||
const modules = !this.isDynamicModule(module as Type<any> | DynamicModule)
|
||||
? this.reflectMetadata(module as Type<any>, MODULE_METADATA.IMPORTS)
|
||||
const modules = !this.isDynamicModule(
|
||||
moduleDefinition as Type<any> | DynamicModule,
|
||||
)
|
||||
? this.reflectMetadata(
|
||||
moduleDefinition as Type<any>,
|
||||
MODULE_METADATA.IMPORTS,
|
||||
)
|
||||
: [
|
||||
...this.reflectMetadata(
|
||||
(module as DynamicModule).module,
|
||||
(moduleDefinition as DynamicModule).module,
|
||||
MODULE_METADATA.IMPORTS,
|
||||
),
|
||||
...((module as DynamicModule).imports || []),
|
||||
...((moduleDefinition as DynamicModule).imports || []),
|
||||
];
|
||||
|
||||
for (const [index, innerModule] of modules.entries()) {
|
||||
// In case of a circular dependency (ES module system), JavaScript will resolve the type to `undefined`.
|
||||
if (innerModule === undefined) {
|
||||
throw new UndefinedModuleException(module, index, scope);
|
||||
throw new UndefinedModuleException(moduleDefinition, index, scope);
|
||||
}
|
||||
if (!innerModule) {
|
||||
throw new InvalidModuleException(module, index, scope);
|
||||
throw new InvalidModuleException(moduleDefinition, index, scope);
|
||||
}
|
||||
if (ctxRegistry.includes(innerModule)) {
|
||||
continue;
|
||||
}
|
||||
await this.scanForModules(
|
||||
innerModule,
|
||||
[].concat(scope, module),
|
||||
[].concat(scope, moduleDefinition),
|
||||
ctxRegistry,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ describe('InstanceWrapper', () => {
|
||||
expect(instance.scope).to.be.eql(partial.scope);
|
||||
expect(instance.metatype).to.be.eql(partial.metatype);
|
||||
});
|
||||
it('should set intance by context id', () => {
|
||||
it('should set instance by context id', () => {
|
||||
const instance = new InstanceWrapper(partial);
|
||||
|
||||
expect(
|
||||
|
||||
@@ -32,6 +32,21 @@ describe('RouterExplorer', () => {
|
||||
public getTestUsingArray() {}
|
||||
}
|
||||
|
||||
@Controller(['global', 'global-alias'])
|
||||
class TestRouteAlias {
|
||||
@Get('test')
|
||||
public getTest() {}
|
||||
|
||||
@Post('test')
|
||||
public postTest() {}
|
||||
|
||||
@All('another-test')
|
||||
public anotherTest() {}
|
||||
|
||||
@Get(['foo', 'bar'])
|
||||
public getTestUsingArray() {}
|
||||
}
|
||||
|
||||
let routerBuilder: RouterExplorer;
|
||||
let injector: Injector;
|
||||
let exceptionsFilter: RouterExceptionFilters;
|
||||
@@ -70,6 +85,22 @@ describe('RouterExplorer', () => {
|
||||
expect(paths[2].requestMethod).to.eql(RequestMethod.ALL);
|
||||
expect(paths[3].requestMethod).to.eql(RequestMethod.GET);
|
||||
});
|
||||
|
||||
it('should method return expected list of route paths alias', () => {
|
||||
const paths = routerBuilder.scanForPaths(new TestRouteAlias());
|
||||
|
||||
expect(paths).to.have.length(4);
|
||||
|
||||
expect(paths[0].path).to.eql(['/test']);
|
||||
expect(paths[1].path).to.eql(['/test']);
|
||||
expect(paths[2].path).to.eql(['/another-test']);
|
||||
expect(paths[3].path).to.eql(['/foo', '/bar']);
|
||||
|
||||
expect(paths[0].requestMethod).to.eql(RequestMethod.GET);
|
||||
expect(paths[1].requestMethod).to.eql(RequestMethod.POST);
|
||||
expect(paths[2].requestMethod).to.eql(RequestMethod.ALL);
|
||||
expect(paths[3].requestMethod).to.eql(RequestMethod.GET);
|
||||
});
|
||||
});
|
||||
|
||||
describe('exploreMethodMetadata', () => {
|
||||
@@ -87,6 +118,20 @@ describe('RouterExplorer', () => {
|
||||
expect(route.requestMethod).to.eql(RequestMethod.GET);
|
||||
});
|
||||
|
||||
it('should method return expected object which represent single route with alias', () => {
|
||||
const instance = new TestRouteAlias();
|
||||
const instanceProto = Object.getPrototypeOf(instance);
|
||||
|
||||
const route = routerBuilder.exploreMethodMetadata(
|
||||
new TestRouteAlias(),
|
||||
instanceProto,
|
||||
'getTest',
|
||||
);
|
||||
|
||||
expect(route.path).to.eql(['/test']);
|
||||
expect(route.requestMethod).to.eql(RequestMethod.GET);
|
||||
});
|
||||
|
||||
it('should method return expected object which represent multiple routes', () => {
|
||||
const instance = new TestRoute();
|
||||
const instanceProto = Object.getPrototypeOf(instance);
|
||||
@@ -100,6 +145,20 @@ describe('RouterExplorer', () => {
|
||||
expect(route.path).to.eql(['/foo', '/bar']);
|
||||
expect(route.requestMethod).to.eql(RequestMethod.GET);
|
||||
});
|
||||
|
||||
it('should method return expected object which represent multiple routes with alias', () => {
|
||||
const instance = new TestRouteAlias();
|
||||
const instanceProto = Object.getPrototypeOf(instance);
|
||||
|
||||
const route = routerBuilder.exploreMethodMetadata(
|
||||
new TestRouteAlias(),
|
||||
instanceProto,
|
||||
'getTestUsingArray',
|
||||
);
|
||||
|
||||
expect(route.path).to.eql(['/foo', '/bar']);
|
||||
expect(route.requestMethod).to.eql(RequestMethod.GET);
|
||||
});
|
||||
});
|
||||
|
||||
describe('applyPathsToRouterProxy', () => {
|
||||
@@ -130,14 +189,20 @@ describe('RouterExplorer', () => {
|
||||
|
||||
describe('extractRouterPath', () => {
|
||||
it('should return expected path', () => {
|
||||
expect(routerBuilder.extractRouterPath(TestRoute)).to.be.eql('/global');
|
||||
expect(routerBuilder.extractRouterPath(TestRoute, '/module')).to.be.eql(
|
||||
expect(routerBuilder.extractRouterPath(TestRoute)).to.be.eql(['/global']);
|
||||
expect(routerBuilder.extractRouterPath(TestRoute, '/module')).to.be.eql([
|
||||
'/module/global',
|
||||
);
|
||||
]);
|
||||
});
|
||||
|
||||
it('should throw it a there is a bad path expected path', () => {
|
||||
expect(() => routerBuilder.validateRoutePath(undefined)).to.throw();
|
||||
it('should return expected path with alias', () => {
|
||||
expect(routerBuilder.extractRouterPath(TestRouteAlias)).to.be.eql([
|
||||
'/global',
|
||||
'/global-alias',
|
||||
]);
|
||||
expect(
|
||||
routerBuilder.extractRouterPath(TestRouteAlias, '/module'),
|
||||
).to.be.eql(['/module/global', '/module/global-alias']);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ describe('RoutesResolver', () => {
|
||||
|
||||
sinon
|
||||
.stub((routesResolver as any).routerExplorer, 'extractRouterPath')
|
||||
.callsFake(() => '');
|
||||
.callsFake(() => ['']);
|
||||
routesResolver.registerRouters(routes, moduleName, '', appInstance);
|
||||
|
||||
expect(exploreSpy.called).to.be.true;
|
||||
@@ -114,7 +114,7 @@ describe('RoutesResolver', () => {
|
||||
|
||||
sinon
|
||||
.stub((routesResolver as any).routerExplorer, 'extractRouterPath')
|
||||
.callsFake(() => '');
|
||||
.callsFake(() => ['']);
|
||||
routesResolver.registerRouters(routes, moduleName, '', appInstance);
|
||||
|
||||
expect(exploreSpy.called).to.be.true;
|
||||
|
||||
@@ -114,6 +114,9 @@ export interface NatsOptions {
|
||||
queue?: string;
|
||||
serializer?: Serializer;
|
||||
deserializer?: Deserializer;
|
||||
userJWT?: string;
|
||||
nonceSigner?: any;
|
||||
userCreds?: any;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/microservices",
|
||||
"version": "7.5.3",
|
||||
"version": "7.5.5",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@microservices)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -22,8 +22,8 @@
|
||||
"tslib": "2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.5.3",
|
||||
"@nestjs/core": "7.5.3"
|
||||
"@nestjs/common": "7.5.5",
|
||||
"@nestjs/core": "7.5.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import { isString, isUndefined } from '@nestjs/common/utils/shared.utils';
|
||||
import {
|
||||
isNil,
|
||||
isString,
|
||||
isUndefined,
|
||||
} from '@nestjs/common/utils/shared.utils';
|
||||
import { Observable } from 'rxjs';
|
||||
import {
|
||||
CONNECT_EVENT,
|
||||
@@ -111,6 +115,9 @@ export class ServerRMQ extends Server implements CustomTransportStrategy {
|
||||
message: Record<string, any>,
|
||||
channel: any,
|
||||
): Promise<void> {
|
||||
if (isNil(message)) {
|
||||
return;
|
||||
}
|
||||
const { content, properties } = message;
|
||||
const rawMessage = JSON.parse(content.toString());
|
||||
const packet = this.deserializer.deserialize(rawMessage);
|
||||
|
||||
@@ -95,7 +95,9 @@ export abstract class Server {
|
||||
): Promise<any> {
|
||||
const handler = this.getHandlerByPattern(pattern);
|
||||
if (!handler) {
|
||||
return this.logger.error(NO_EVENT_HANDLER);
|
||||
return this.logger.error(
|
||||
`${NO_EVENT_HANDLER} Event pattern: ${JSON.stringify(pattern)}.`,
|
||||
);
|
||||
}
|
||||
const resultOrStream = await handler(packet.data, context);
|
||||
if (this.isObservable(resultOrStream)) {
|
||||
|
||||
@@ -142,6 +142,11 @@ export class ExpressAdapter extends AbstractHttpAdapter {
|
||||
.forEach(parserKey => this.use(parserMiddleware[parserKey]));
|
||||
}
|
||||
|
||||
public setLocal(key: string, value: any) {
|
||||
this.instance.locals[key] = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public getType(): string {
|
||||
return 'express';
|
||||
}
|
||||
|
||||
@@ -75,4 +75,16 @@ export interface NestExpressApplication extends INestApplication {
|
||||
* @returns {this}
|
||||
*/
|
||||
setViewEngine(engine: string): this;
|
||||
|
||||
/**
|
||||
* Sets app-level globals for view templates.
|
||||
*
|
||||
* @example
|
||||
* app.setLocal('title', 'My Site')
|
||||
*
|
||||
* @see https://expressjs.com/en/4x/api.html#app.locals
|
||||
*
|
||||
* @returns {this}
|
||||
*/
|
||||
setLocal(key: string, value: any): this;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-express",
|
||||
"version": "7.5.3",
|
||||
"version": "7.5.5",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-express)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -24,8 +24,8 @@
|
||||
"tslib": "2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.5.3",
|
||||
"@nestjs/core": "7.5.3"
|
||||
"@nestjs/common": "7.5.5",
|
||||
"@nestjs/core": "7.5.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -59,12 +59,8 @@ type FastifyHttpsOptions<
|
||||
|
||||
export class FastifyAdapter<
|
||||
TServer extends RawServerBase = RawServerDefault,
|
||||
TRawRequest extends RawRequestDefaultExpression<
|
||||
TServer
|
||||
> = RawRequestDefaultExpression<TServer>,
|
||||
TRawResponse extends RawReplyDefaultExpression<
|
||||
TServer
|
||||
> = RawReplyDefaultExpression<TServer>
|
||||
TRawRequest extends RawRequestDefaultExpression<TServer> = RawRequestDefaultExpression<TServer>,
|
||||
TRawResponse extends RawReplyDefaultExpression<TServer> = RawReplyDefaultExpression<TServer>
|
||||
> extends AbstractHttpAdapter<
|
||||
TServer,
|
||||
FastifyRequest<RequestGenericInterface, TServer, TRawRequest>,
|
||||
@@ -113,9 +109,6 @@ export class FastifyAdapter<
|
||||
callback?: () => void,
|
||||
): void;
|
||||
public listen(port: string | number, ...args: any[]): Promise<string> {
|
||||
if (typeof port === 'string') {
|
||||
port = parseInt(port);
|
||||
}
|
||||
return this.instance.listen(port, ...args);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,16 +55,16 @@ export interface NestFastifyApplication extends INestApplication {
|
||||
* @returns A Promise that, when resolved, is a reference to the underlying HttpServer.
|
||||
*/
|
||||
listen(
|
||||
port: number,
|
||||
port: number | string,
|
||||
callback?: (err: Error, address: string) => void,
|
||||
): Promise<any>;
|
||||
listen(
|
||||
port: number,
|
||||
port: number | string,
|
||||
address: string,
|
||||
callback?: (err: Error, address: string) => void,
|
||||
): Promise<any>;
|
||||
listen(
|
||||
port: number,
|
||||
port: number | string,
|
||||
address: string,
|
||||
backlog: number,
|
||||
callback?: (err: Error, address: string) => void,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-fastify",
|
||||
"version": "7.5.3",
|
||||
"version": "7.5.5",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -17,11 +17,11 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"fastify": "3.7.0",
|
||||
"fastify-cors": "4.1.0",
|
||||
"fastify": "3.9.1",
|
||||
"fastify-cors": "5.0.0",
|
||||
"fastify-formbody": "5.0.0",
|
||||
"light-my-request": "4.2.1",
|
||||
"middie": "5.1.0",
|
||||
"light-my-request": "4.3.0",
|
||||
"middie": "5.2.0",
|
||||
"path-to-regexp": "3.2.0",
|
||||
"tslib": "2.0.3"
|
||||
},
|
||||
|
||||
@@ -63,6 +63,9 @@ export class IoAdapter extends AbstractWsAdapter {
|
||||
|
||||
public mapPayload(payload: any): { data: any; ack?: Function } {
|
||||
if (!Array.isArray(payload)) {
|
||||
if (isFunction(payload)) {
|
||||
return { data: undefined, ack: payload };
|
||||
}
|
||||
return { data: payload };
|
||||
}
|
||||
const lastElement = payload[payload.length - 1];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-socket.io",
|
||||
"version": "7.5.3",
|
||||
"version": "7.5.5",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-socket.io)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-ws",
|
||||
"version": "7.5.3",
|
||||
"version": "7.5.5",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-ws)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "2.0.3",
|
||||
"ws": "7.3.1"
|
||||
"ws": "7.4.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/testing",
|
||||
"version": "7.5.3",
|
||||
"version": "7.5.5",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@testing)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/websockets",
|
||||
"version": "7.5.3",
|
||||
"version": "7.5.5",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@websockets)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -16,8 +16,8 @@
|
||||
"tslib": "2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.5.3",
|
||||
"@nestjs/core": "7.5.3"
|
||||
"@nestjs/common": "7.5.5",
|
||||
"@nestjs/core": "7.5.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { validatePath } from '@nestjs/common/utils/shared.utils';
|
||||
import { addLeadingSlash } from '@nestjs/common/utils/shared.utils';
|
||||
import { ApplicationConfig } from '@nestjs/core/application-config';
|
||||
import { isString } from 'util';
|
||||
import { GatewayMetadata } from './interfaces/gateway-metadata.interface';
|
||||
@@ -74,6 +74,6 @@ export class SocketServerProvider {
|
||||
if (!isString(namespace)) {
|
||||
return namespace;
|
||||
}
|
||||
return validatePath(namespace);
|
||||
return addLeadingSlash(namespace);
|
||||
}
|
||||
}
|
||||
|
||||
441
sample/09-babel-example/package-lock.json
generated
441
sample/09-babel-example/package-lock.json
generated
@@ -5,12 +5,12 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@babel/cli": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.12.1.tgz",
|
||||
"integrity": "sha512-eRJREyrfAJ2r42Iaxe8h3v6yyj1wu9OyosaUHW6UImjGf9ahGL9nsFNh7OCopvtcPL8WnEo7tp78wrZaZ6vG9g==",
|
||||
"version": "7.12.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.12.8.tgz",
|
||||
"integrity": "sha512-/6nQj11oaGhLmZiuRUfxsujiPDc9BBReemiXgIbxc+M5W+MIiFKYwvNDJvBfnGKNsJTKbUfEheKc9cwoPHAVQA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@nicolo-ribaudo/chokidar-2": "^2.1.8",
|
||||
"@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents",
|
||||
"chokidar": "^3.4.0",
|
||||
"commander": "^4.0.1",
|
||||
"convert-source-map": "^1.1.0",
|
||||
@@ -40,25 +40,25 @@
|
||||
}
|
||||
},
|
||||
"@babel/compat-data": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.1.tgz",
|
||||
"integrity": "sha512-725AQupWJZ8ba0jbKceeFblZTY90McUBWMwHhkFQ9q1zKPJ95GUktljFcgcsIVwRnTnRKlcYzfiNImg5G9m6ZQ==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.7.tgz",
|
||||
"integrity": "sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/core": {
|
||||
"version": "7.12.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz",
|
||||
"integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==",
|
||||
"version": "7.12.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz",
|
||||
"integrity": "sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/generator": "^7.12.1",
|
||||
"@babel/generator": "^7.12.5",
|
||||
"@babel/helper-module-transforms": "^7.12.1",
|
||||
"@babel/helpers": "^7.12.1",
|
||||
"@babel/parser": "^7.12.3",
|
||||
"@babel/template": "^7.10.4",
|
||||
"@babel/traverse": "^7.12.1",
|
||||
"@babel/types": "^7.12.1",
|
||||
"@babel/helpers": "^7.12.5",
|
||||
"@babel/parser": "^7.12.7",
|
||||
"@babel/template": "^7.12.7",
|
||||
"@babel/traverse": "^7.12.9",
|
||||
"@babel/types": "^7.12.7",
|
||||
"convert-source-map": "^1.7.0",
|
||||
"debug": "^4.1.0",
|
||||
"gensync": "^1.0.0-beta.1",
|
||||
@@ -70,43 +70,54 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/generator": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz",
|
||||
"integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==",
|
||||
"version": "7.12.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz",
|
||||
"integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.12.1",
|
||||
"@babel/types": "^7.12.5",
|
||||
"jsesc": "^2.5.1",
|
||||
"source-map": "^0.5.0"
|
||||
}
|
||||
},
|
||||
"@babel/parser": {
|
||||
"version": "7.12.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz",
|
||||
"integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz",
|
||||
"integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/traverse": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz",
|
||||
"integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==",
|
||||
"@babel/template": {
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz",
|
||||
"integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/generator": "^7.12.1",
|
||||
"@babel/parser": "^7.12.7",
|
||||
"@babel/types": "^7.12.7"
|
||||
}
|
||||
},
|
||||
"@babel/traverse": {
|
||||
"version": "7.12.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.9.tgz",
|
||||
"integrity": "sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/generator": "^7.12.5",
|
||||
"@babel/helper-function-name": "^7.10.4",
|
||||
"@babel/helper-split-export-declaration": "^7.11.0",
|
||||
"@babel/parser": "^7.12.1",
|
||||
"@babel/types": "^7.12.1",
|
||||
"@babel/parser": "^7.12.7",
|
||||
"@babel/types": "^7.12.7",
|
||||
"debug": "^4.1.0",
|
||||
"globals": "^11.1.0",
|
||||
"lodash": "^4.17.19"
|
||||
}
|
||||
},
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -171,9 +182,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -200,9 +211,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -219,14 +230,14 @@
|
||||
}
|
||||
},
|
||||
"@babel/helper-compilation-targets": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.1.tgz",
|
||||
"integrity": "sha512-jtBEif7jsPwP27GPHs06v4WBV0KrE8a/P7n0N0sSvHn2hwUCYnolP/CLmz51IzAW4NlN+HuoBtb9QcwnRo9F/g==",
|
||||
"version": "7.12.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz",
|
||||
"integrity": "sha512-+qH6NrscMolUlzOYngSBMIOQpKUGPPsc61Bu5W10mg84LxZ7cmvnBHzARKbDoFxVvqqAbj6Tg6N7bSrWSPXMyw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/compat-data": "^7.12.1",
|
||||
"@babel/compat-data": "^7.12.5",
|
||||
"@babel/helper-validator-option": "^7.12.1",
|
||||
"browserslist": "^4.12.0",
|
||||
"browserslist": "^4.14.5",
|
||||
"semver": "^5.5.0"
|
||||
}
|
||||
},
|
||||
@@ -244,13 +255,12 @@
|
||||
}
|
||||
},
|
||||
"@babel/helper-create-regexp-features-plugin": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.1.tgz",
|
||||
"integrity": "sha512-rsZ4LGvFTZnzdNZR5HZdmJVuXK8834R5QkF3WvcnBhrlVtF0HSIUC6zbreL9MgjTywhKokn8RIYRiq99+DLAxA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.7.tgz",
|
||||
"integrity": "sha512-idnutvQPdpbduutvi3JVfEgcVIHooQnhvhx0Nk9isOINOIGYkZea1Pk2JlJRiUnMefrlvr0vkByATBY/mB4vjQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-annotate-as-pure": "^7.10.4",
|
||||
"@babel/helper-regex": "^7.10.4",
|
||||
"regexpu-core": "^4.7.1"
|
||||
}
|
||||
},
|
||||
@@ -266,9 +276,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -294,9 +304,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -380,9 +390,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -472,43 +482,43 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/generator": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz",
|
||||
"integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==",
|
||||
"version": "7.12.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz",
|
||||
"integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.12.1",
|
||||
"@babel/types": "^7.12.5",
|
||||
"jsesc": "^2.5.1",
|
||||
"source-map": "^0.5.0"
|
||||
}
|
||||
},
|
||||
"@babel/parser": {
|
||||
"version": "7.12.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz",
|
||||
"integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz",
|
||||
"integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/traverse": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz",
|
||||
"integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.7.tgz",
|
||||
"integrity": "sha512-nMWaqsQEeSvMNypswUDzjqQ+0rR6pqCtoQpsqGJC4/Khm9cISwPTSpai57F6/jDaOoEGz8yE/WxcO3PV6tKSmQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/generator": "^7.12.1",
|
||||
"@babel/generator": "^7.12.5",
|
||||
"@babel/helper-function-name": "^7.10.4",
|
||||
"@babel/helper-split-export-declaration": "^7.11.0",
|
||||
"@babel/parser": "^7.12.1",
|
||||
"@babel/types": "^7.12.1",
|
||||
"@babel/parser": "^7.12.7",
|
||||
"@babel/types": "^7.12.7",
|
||||
"debug": "^4.1.0",
|
||||
"globals": "^11.1.0",
|
||||
"lodash": "^4.17.19"
|
||||
}
|
||||
},
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -558,23 +568,6 @@
|
||||
"integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/helper-regex": {
|
||||
"version": "7.10.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz",
|
||||
"integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lodash": "^4.17.19"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": {
|
||||
"version": "4.17.20",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
|
||||
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@babel/helper-remap-async-to-generator": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz",
|
||||
@@ -587,9 +580,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -680,9 +673,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -708,9 +701,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -779,9 +772,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -798,54 +791,54 @@
|
||||
}
|
||||
},
|
||||
"@babel/helpers": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.1.tgz",
|
||||
"integrity": "sha512-9JoDSBGoWtmbay98efmT2+mySkwjzeFeAL9BuWNoVQpkPFQF8SIIFUfY5os9u8wVzglzoiPRSW7cuJmBDUt43g==",
|
||||
"version": "7.12.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz",
|
||||
"integrity": "sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/template": "^7.10.4",
|
||||
"@babel/traverse": "^7.12.1",
|
||||
"@babel/types": "^7.12.1"
|
||||
"@babel/traverse": "^7.12.5",
|
||||
"@babel/types": "^7.12.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/generator": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz",
|
||||
"integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==",
|
||||
"version": "7.12.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz",
|
||||
"integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.12.1",
|
||||
"@babel/types": "^7.12.5",
|
||||
"jsesc": "^2.5.1",
|
||||
"source-map": "^0.5.0"
|
||||
}
|
||||
},
|
||||
"@babel/parser": {
|
||||
"version": "7.12.3",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz",
|
||||
"integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz",
|
||||
"integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/traverse": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz",
|
||||
"integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==",
|
||||
"version": "7.12.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.9.tgz",
|
||||
"integrity": "sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.10.4",
|
||||
"@babel/generator": "^7.12.1",
|
||||
"@babel/generator": "^7.12.5",
|
||||
"@babel/helper-function-name": "^7.10.4",
|
||||
"@babel/helper-split-export-declaration": "^7.11.0",
|
||||
"@babel/parser": "^7.12.1",
|
||||
"@babel/types": "^7.12.1",
|
||||
"@babel/parser": "^7.12.7",
|
||||
"@babel/types": "^7.12.7",
|
||||
"debug": "^4.1.0",
|
||||
"globals": "^11.1.0",
|
||||
"lodash": "^4.17.19"
|
||||
}
|
||||
},
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -1049,9 +1042,9 @@
|
||||
}
|
||||
},
|
||||
"@babel/plugin-proposal-numeric-separator": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.1.tgz",
|
||||
"integrity": "sha512-MR7Ok+Af3OhNTCxYVjJZHS0t97ydnJZt/DbR4WISO39iDnhiD8XHrY12xuSJ90FFEGjir0Fzyyn7g/zY6hxbxA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.7.tgz",
|
||||
"integrity": "sha512-8c+uy0qmnRTeukiGsjLGy6uVs/TFjJchGXUeBqlG4VWYOdJWkhhVPdQ3uHwbmalfJwv2JsV0qffXP4asRfL2SQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-plugin-utils": "^7.10.4",
|
||||
@@ -1104,9 +1097,9 @@
|
||||
}
|
||||
},
|
||||
"@babel/plugin-proposal-optional-chaining": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.1.tgz",
|
||||
"integrity": "sha512-c2uRpY6WzaVDzynVY9liyykS+kVU+WRZPMPYpkelXH8KBt1oXoI89kPbZKKG/jDT5UK92FTW2fZkZaJhdiBabw==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz",
|
||||
"integrity": "sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-plugin-utils": "^7.10.4",
|
||||
@@ -1829,13 +1822,12 @@
|
||||
}
|
||||
},
|
||||
"@babel/plugin-transform-sticky-regex": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.1.tgz",
|
||||
"integrity": "sha512-CiUgKQ3AGVk7kveIaPEET1jNDhZZEl1RPMWdTBE1799bdz++SwqDHStmxfCtDfBhQgCl38YRiSnrMuUMZIWSUQ==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.7.tgz",
|
||||
"integrity": "sha512-VEiqZL5N/QvDbdjfYQBhruN0HYjSPjC4XkeqW4ny/jNtH9gcbgaqBIXYEZCNnESMAGs0/K/R7oFGMhOyu/eIxg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-plugin-utils": "^7.10.4",
|
||||
"@babel/helper-regex": "^7.10.4"
|
||||
"@babel/helper-plugin-utils": "^7.10.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": {
|
||||
@@ -1916,14 +1908,14 @@
|
||||
}
|
||||
},
|
||||
"@babel/preset-env": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.1.tgz",
|
||||
"integrity": "sha512-H8kxXmtPaAGT7TyBvSSkoSTUK6RHh61So05SyEbpmr0MCZrsNYn7mGMzzeYoOUCdHzww61k8XBft2TaES+xPLg==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.7.tgz",
|
||||
"integrity": "sha512-OnNdfAr1FUQg7ksb7bmbKoby4qFOHw6DKWWUNB9KqnnCldxhxJlP+21dpyaWFmf2h0rTbOkXJtAGevY3XW1eew==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/compat-data": "^7.12.1",
|
||||
"@babel/helper-compilation-targets": "^7.12.1",
|
||||
"@babel/helper-module-imports": "^7.12.1",
|
||||
"@babel/compat-data": "^7.12.7",
|
||||
"@babel/helper-compilation-targets": "^7.12.5",
|
||||
"@babel/helper-module-imports": "^7.12.5",
|
||||
"@babel/helper-plugin-utils": "^7.10.4",
|
||||
"@babel/helper-validator-option": "^7.12.1",
|
||||
"@babel/plugin-proposal-async-generator-functions": "^7.12.1",
|
||||
@@ -1933,10 +1925,10 @@
|
||||
"@babel/plugin-proposal-json-strings": "^7.12.1",
|
||||
"@babel/plugin-proposal-logical-assignment-operators": "^7.12.1",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
|
||||
"@babel/plugin-proposal-numeric-separator": "^7.12.1",
|
||||
"@babel/plugin-proposal-numeric-separator": "^7.12.7",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
|
||||
"@babel/plugin-proposal-optional-catch-binding": "^7.12.1",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.12.1",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
|
||||
"@babel/plugin-proposal-private-methods": "^7.12.1",
|
||||
"@babel/plugin-proposal-unicode-property-regex": "^7.12.1",
|
||||
"@babel/plugin-syntax-async-generators": "^7.8.0",
|
||||
@@ -1978,36 +1970,36 @@
|
||||
"@babel/plugin-transform-reserved-words": "^7.12.1",
|
||||
"@babel/plugin-transform-shorthand-properties": "^7.12.1",
|
||||
"@babel/plugin-transform-spread": "^7.12.1",
|
||||
"@babel/plugin-transform-sticky-regex": "^7.12.1",
|
||||
"@babel/plugin-transform-sticky-regex": "^7.12.7",
|
||||
"@babel/plugin-transform-template-literals": "^7.12.1",
|
||||
"@babel/plugin-transform-typeof-symbol": "^7.12.1",
|
||||
"@babel/plugin-transform-unicode-escapes": "^7.12.1",
|
||||
"@babel/plugin-transform-unicode-regex": "^7.12.1",
|
||||
"@babel/preset-modules": "^0.1.3",
|
||||
"@babel/types": "^7.12.1",
|
||||
"core-js-compat": "^3.6.2",
|
||||
"@babel/types": "^7.12.7",
|
||||
"core-js-compat": "^3.7.0",
|
||||
"semver": "^5.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/helper-module-imports": {
|
||||
"version": "7.12.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz",
|
||||
"integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "^7.12.5"
|
||||
}
|
||||
},
|
||||
"@babel/helper-plugin-utils": {
|
||||
"version": "7.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
|
||||
"integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
|
||||
"dev": true
|
||||
},
|
||||
"@babel/plugin-syntax-class-properties": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz",
|
||||
"integrity": "sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-plugin-utils": "^7.10.4"
|
||||
}
|
||||
},
|
||||
"@babel/types": {
|
||||
"version": "7.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
|
||||
"integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
|
||||
"version": "7.12.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz",
|
||||
"integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-validator-identifier": "^7.10.4",
|
||||
@@ -2932,36 +2924,25 @@
|
||||
}
|
||||
},
|
||||
"@nicolo-ribaudo/chokidar-2": {
|
||||
"version": "2.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8.tgz",
|
||||
"integrity": "sha512-FohwULwAebCUKi/akMFyGi7jfc7JXTeMHzKxuP3umRd9mK/2Y7/SMBSI2jX+YLopPXi+PF9l307NmpfxTdCegA==",
|
||||
"version": "2.1.8-no-fsevents",
|
||||
"resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.tgz",
|
||||
"integrity": "sha512-+nb9vWloHNNMFHjGofEam3wopE3m1yuambrrd/fnPc+lFOMB9ROTqQlche9ByFWNkdNqfSgR/kkQtQ8DzEWt2w==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"chokidar": "2.1.8"
|
||||
"anymatch": "^2.0.0",
|
||||
"async-each": "^1.0.1",
|
||||
"braces": "^2.3.2",
|
||||
"glob-parent": "^3.1.0",
|
||||
"inherits": "^2.0.3",
|
||||
"is-binary-path": "^1.0.0",
|
||||
"is-glob": "^4.0.0",
|
||||
"normalize-path": "^3.0.0",
|
||||
"path-is-absolute": "^1.0.0",
|
||||
"readdirp": "^2.2.1",
|
||||
"upath": "^1.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"chokidar": {
|
||||
"version": "2.1.8",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
|
||||
"integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"anymatch": "^2.0.0",
|
||||
"async-each": "^1.0.1",
|
||||
"braces": "^2.3.2",
|
||||
"fsevents": "^1.2.7",
|
||||
"glob-parent": "^3.1.0",
|
||||
"inherits": "^2.0.3",
|
||||
"is-binary-path": "^1.0.0",
|
||||
"is-glob": "^4.0.0",
|
||||
"normalize-path": "^3.0.0",
|
||||
"path-is-absolute": "^1.0.0",
|
||||
"readdirp": "^2.2.1",
|
||||
"upath": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"normalize-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
@@ -3579,16 +3560,6 @@
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"bindings": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
},
|
||||
"body-parser": {
|
||||
"version": "1.19.0",
|
||||
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
|
||||
@@ -3729,15 +3700,16 @@
|
||||
"dev": true
|
||||
},
|
||||
"browserslist": {
|
||||
"version": "4.14.5",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.5.tgz",
|
||||
"integrity": "sha512-Z+vsCZIvCBvqLoYkBFTwEYH3v5MCQbsAjp50ERycpOjnPmolg1Gjy4+KaWWpm8QOJt9GHkhdqAl14NpCX73CWA==",
|
||||
"version": "4.14.7",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.7.tgz",
|
||||
"integrity": "sha512-BSVRLCeG3Xt/j/1cCGj1019Wbty0H+Yvu2AOuZSuoaUWn3RatbL33Cxk+Q4jRMRAbOm0p7SLravLjpnT6s0vzQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"caniuse-lite": "^1.0.30001135",
|
||||
"electron-to-chromium": "^1.3.571",
|
||||
"escalade": "^3.1.0",
|
||||
"node-releases": "^1.1.61"
|
||||
"caniuse-lite": "^1.0.30001157",
|
||||
"colorette": "^1.2.1",
|
||||
"electron-to-chromium": "^1.3.591",
|
||||
"escalade": "^3.1.1",
|
||||
"node-releases": "^1.1.66"
|
||||
}
|
||||
},
|
||||
"bser": {
|
||||
@@ -3838,9 +3810,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001153",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001153.tgz",
|
||||
"integrity": "sha512-qv14w7kWwm2IW7DBvAKWlCqGTmV2XxNtSejJBVplwRjhkohHuhRUpeSlPjtu9erru0+A12zCDUiSmvx/AcqVRA==",
|
||||
"version": "1.0.30001159",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001159.tgz",
|
||||
"integrity": "sha512-w9Ph56jOsS8RL20K9cLND3u/+5WASWdhC/PPrf+V3/HsM3uHOavWOR1Xzakbv4Puo/srmPHudkmCRWM7Aq+/UA==",
|
||||
"dev": true
|
||||
},
|
||||
"capture-exit": {
|
||||
@@ -3929,13 +3901,6 @@
|
||||
"to-regex-range": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
|
||||
"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"glob-parent": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
|
||||
@@ -4133,6 +4098,12 @@
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
|
||||
},
|
||||
"colorette": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz",
|
||||
"integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==",
|
||||
"dev": true
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
@@ -4293,12 +4264,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"core-js-compat": {
|
||||
"version": "3.6.5",
|
||||
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz",
|
||||
"integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==",
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.7.0.tgz",
|
||||
"integrity": "sha512-V8yBI3+ZLDVomoWICO6kq/CD28Y4r1M7CWeO4AGpMdMfseu8bkSubBmUPySMGKRTS+su4XQ07zUkAsiu9FCWTg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"browserslist": "^4.8.5",
|
||||
"browserslist": "^4.14.6",
|
||||
"semver": "7.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -4610,9 +4581,9 @@
|
||||
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
|
||||
},
|
||||
"electron-to-chromium": {
|
||||
"version": "1.3.584",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.584.tgz",
|
||||
"integrity": "sha512-NB3DzrTzJFhWkUp+nl2KtUtoFzrfGXTir2S+BU4tXGyXH9vlluPuFpE3pTKeH7+PY460tHLjKzh6K2+TWwW+Ww==",
|
||||
"version": "1.3.603",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.603.tgz",
|
||||
"integrity": "sha512-J8OHxOeJkoSLgBXfV9BHgKccgfLMHh+CoeRo6wJsi6m0k3otaxS/5vrHpMNSEYY4MISwewqanPOuhAtuE8riQQ==",
|
||||
"dev": true
|
||||
},
|
||||
"emittery": {
|
||||
@@ -5110,13 +5081,6 @@
|
||||
"bser": "2.1.1"
|
||||
}
|
||||
},
|
||||
"file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"fill-range": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
|
||||
@@ -5250,15 +5214,11 @@
|
||||
"dev": true
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
||||
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
|
||||
"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"bindings": "^1.5.0",
|
||||
"nan": "^2.12.1"
|
||||
}
|
||||
"optional": true
|
||||
},
|
||||
"function-bind": {
|
||||
"version": "1.1.1",
|
||||
@@ -7936,13 +7896,6 @@
|
||||
"xtend": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"nan": {
|
||||
"version": "2.14.2",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
|
||||
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"nanomatch": {
|
||||
"version": "1.2.13",
|
||||
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
|
||||
@@ -8066,9 +8019,9 @@
|
||||
}
|
||||
},
|
||||
"node-releases": {
|
||||
"version": "1.1.64",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.64.tgz",
|
||||
"integrity": "sha512-Iec8O9166/x2HRMJyLLLWkd0sFFLrFNy+Xf+JQfSQsdBJzPcHpNl3JQ9gD4j+aJxmCa25jNsIbM4bmACtSbkSg==",
|
||||
"version": "1.1.67",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz",
|
||||
"integrity": "sha512-V5QF9noGFl3EymEwUYzO+3NTDpGfQB4ve6Qfnzf3UNydMhjQRVPR1DZTuvWiLzaFJYw2fmDwAfnRNEVb64hSIg==",
|
||||
"dev": true
|
||||
},
|
||||
"nodemon": {
|
||||
@@ -8912,9 +8865,9 @@
|
||||
"integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
|
||||
},
|
||||
"regenerate": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz",
|
||||
"integrity": "sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==",
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
|
||||
"integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==",
|
||||
"dev": true
|
||||
},
|
||||
"regenerate-unicode-properties": {
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.12.1",
|
||||
"@babel/core": "7.12.3",
|
||||
"@babel/cli": "7.12.8",
|
||||
"@babel/core": "7.12.9",
|
||||
"@babel/node": "7.12.6",
|
||||
"@babel/plugin-proposal-decorators": "7.12.1",
|
||||
"@babel/plugin-transform-runtime": "7.12.1",
|
||||
"@babel/preset-env": "7.12.1",
|
||||
"@babel/preset-env": "7.12.7",
|
||||
"@babel/register": "7.12.1",
|
||||
"@babel/runtime": "7.12.5",
|
||||
"@nestjs/testing": "7.4.4",
|
||||
|
||||
Reference in New Issue
Block a user