mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
chore: address lint errors, and fix ci test errors
This commit is contained in:
@@ -3,7 +3,7 @@ import { forwardRef, Inject, Injectable } from '@nestjs/common';
|
||||
// Use a lazy reference to avoid ESM circular-import TDZ issues
|
||||
// with emitDecoratorMetadata.
|
||||
let InputServiceRef: any;
|
||||
import('./input.service.js').then(m => (InputServiceRef = m.InputService));
|
||||
void import('./input.service.js').then(m => (InputServiceRef = m.InputService));
|
||||
|
||||
@Injectable()
|
||||
export class CircularService {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Inject, Injectable, forwardRef } from '@nestjs/common';
|
||||
// with emitDecoratorMetadata. The class is imported asynchronously
|
||||
// and cached for forwardRef resolution.
|
||||
let CircularServiceRef: any;
|
||||
import('./circular.service.js').then(
|
||||
void import('./circular.service.js').then(
|
||||
m => (CircularServiceRef = m.CircularService),
|
||||
);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { forwardRef, Inject, Injectable } from '@nestjs/common';
|
||||
// Lazy reference to avoid ESM circular-import TDZ issues
|
||||
// with emitDecoratorMetadata.
|
||||
let InputServiceRef: any;
|
||||
import('./input.service.js').then(m => (InputServiceRef = m.InputService));
|
||||
void import('./input.service.js').then(m => (InputServiceRef = m.InputService));
|
||||
|
||||
@Injectable()
|
||||
export class CircularService {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { forwardRef, Inject, Injectable } from '@nestjs/common';
|
||||
// Lazy reference to avoid ESM circular-import TDZ issues
|
||||
// with emitDecoratorMetadata.
|
||||
let CircularServiceRef: any;
|
||||
import('./circular.service.js').then(
|
||||
void import('./circular.service.js').then(
|
||||
m => (CircularServiceRef = m.CircularService),
|
||||
);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { forwardRef, Inject, Injectable } from '@nestjs/common';
|
||||
// Lazy reference to avoid ESM circular-import TDZ issues
|
||||
// with emitDecoratorMetadata.
|
||||
let InputServiceRef: any;
|
||||
import('./input.service.js').then(m => (InputServiceRef = m.InputService));
|
||||
void import('./input.service.js').then(m => (InputServiceRef = m.InputService));
|
||||
|
||||
@Injectable()
|
||||
export class CircularService {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Inject, Injectable, forwardRef } from '@nestjs/common';
|
||||
// Lazy reference to avoid ESM circular-import TDZ issues
|
||||
// with emitDecoratorMetadata.
|
||||
let CircularServiceRef: any;
|
||||
import('./circular.service.js').then(
|
||||
void import('./circular.service.js').then(
|
||||
m => (CircularServiceRef = m.CircularService),
|
||||
);
|
||||
|
||||
|
||||
@@ -18,10 +18,12 @@ describe('Get URL (Express Application)', () => {
|
||||
port = await randomPort();
|
||||
});
|
||||
|
||||
it('should be able to get the IPv6 address', async () => {
|
||||
it('should be able to get a loopback address', async () => {
|
||||
const app = testModule.createNestApplication(new ExpressAdapter(express()));
|
||||
await app.listen(port);
|
||||
expect(await app.getUrl()).toEqual(`http://[::1]:${port}`);
|
||||
expect(await app.getUrl()).toMatch(
|
||||
new RegExp(`http://(\\[::1\\]|127\\.0\\.0\\.1):${port}`),
|
||||
);
|
||||
await app.close();
|
||||
});
|
||||
it('should be able to get the IPv4 address', async () => {
|
||||
@@ -36,10 +38,12 @@ describe('Get URL (Express Application)', () => {
|
||||
expect(await app.getUrl()).toEqual(`http://127.0.0.1:${port}`);
|
||||
await app.close();
|
||||
});
|
||||
it('should return [::1] in a callback (default bind)', () => {
|
||||
it('should return a loopback address in a callback (default bind)', () => {
|
||||
const app = testModule.createNestApplication(new ExpressAdapter(express()));
|
||||
return app.listen(port, async () => {
|
||||
expect(await app.getUrl()).toEqual(`http://[::1]:${port}`);
|
||||
expect(await app.getUrl()).toMatch(
|
||||
new RegExp(`http://(\\[::1\\]|127\\.0\\.0\\.1):${port}`),
|
||||
);
|
||||
await app.close();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -29,10 +29,12 @@ describe('Get URL (Fastify Application)', () => {
|
||||
expect(await app.getUrl()).toEqual(`http://127.0.0.1:${port}`);
|
||||
await app.close();
|
||||
});
|
||||
it('should return [::1] in a callback (default bind)', () => {
|
||||
it('should return a loopback address in a callback (default bind)', () => {
|
||||
const app = testModule.createNestApplication(new FastifyAdapter());
|
||||
return app.listen(port, async () => {
|
||||
expect(await app.getUrl()).toEqual(`http://[::1]:${port}`);
|
||||
expect(await app.getUrl()).toMatch(
|
||||
new RegExp(`http://(\\[::1\\]|127\\.0\\.0\\.1):${port}`),
|
||||
);
|
||||
await app.close();
|
||||
});
|
||||
});
|
||||
|
||||
458
package-lock.json
generated
458
package-lock.json
generated
@@ -39,7 +39,7 @@
|
||||
"@commitlint/cli": "20.4.1",
|
||||
"@commitlint/config-angular": "20.4.1",
|
||||
"@eslint/eslintrc": "3.3.3",
|
||||
"@eslint/js": "9.39.2",
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@fastify/cors": "11.2.0",
|
||||
"@fastify/formbody": "8.0.2",
|
||||
"@fastify/middie": "9.1.0",
|
||||
@@ -62,8 +62,8 @@
|
||||
"@types/node": "25.2.1",
|
||||
"@types/supertest": "6.0.3",
|
||||
"@types/ws": "8.18.1",
|
||||
"@typescript-eslint/eslint-plugin": "8.54.0",
|
||||
"@typescript-eslint/parser": "8.54.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.55.1-alpha.4",
|
||||
"@typescript-eslint/parser": "^8.55.1-alpha.4",
|
||||
"@vitest/coverage-istanbul": "^4.0.18",
|
||||
"@vitest/coverage-v8": "^4.0.18",
|
||||
"amqp-connection-manager": "5.0.0",
|
||||
@@ -74,7 +74,7 @@
|
||||
"conventional-changelog": "7.1.1",
|
||||
"coveralls": "3.1.1",
|
||||
"delete-empty": "3.0.0",
|
||||
"eslint": "9.39.2",
|
||||
"eslint": "^10.0.0",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"eslint-plugin-prettier": "5.5.5",
|
||||
"eventsource": "4.1.0",
|
||||
@@ -116,7 +116,7 @@
|
||||
"tsx": "4.19.2",
|
||||
"typeorm": "0.3.28",
|
||||
"typescript": "5.9.3",
|
||||
"typescript-eslint": "8.54.0",
|
||||
"typescript-eslint": "^8.55.1-alpha.4",
|
||||
"unplugin-swc": "^1.5.9",
|
||||
"vitest": "^4.0.18",
|
||||
"ws": "8.19.0"
|
||||
@@ -1700,18 +1700,54 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array": {
|
||||
"version": "0.21.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz",
|
||||
"integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==",
|
||||
"version": "0.23.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.1.tgz",
|
||||
"integrity": "sha512-uVSdg/V4dfQmTjJzR0szNczjOH/J+FyUMMjYtr07xFRXR7EDf9i1qdxrD0VusZH9knj1/ecxzCQQxyic5NzAiA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/object-schema": "^2.1.7",
|
||||
"@eslint/object-schema": "^3.0.1",
|
||||
"debug": "^4.3.1",
|
||||
"minimatch": "^3.1.2"
|
||||
"minimatch": "^10.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array/node_modules/@isaacs/cliui": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz",
|
||||
"integrity": "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array/node_modules/balanced-match": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.2.tgz",
|
||||
"integrity": "sha512-x0K50QvKQ97fdEz2kPehIerj+YTeptKF9hyYkKf6egnwmMWAkADiO0QCzSp0R5xN8FTZgYaBfSaue46Ej62nMg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"jackspeak": "^4.2.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array/node_modules/brace-expansion": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz",
|
||||
"integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array/node_modules/debug": {
|
||||
@@ -1732,6 +1768,38 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array/node_modules/jackspeak": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz",
|
||||
"integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"@isaacs/cliui": "^9.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array/node_modules/minimatch": {
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.0.tgz",
|
||||
"integrity": "sha512-ugkC31VaVg9cF0DFVoADH12k6061zNZkZON+aX8AWsR9GhPcErkcMBceb6znR8wLERM2AkkOxy2nWRLpT9Jq5w==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^5.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/config-array/node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
@@ -1740,29 +1808,29 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@eslint/config-helpers": {
|
||||
"version": "0.4.2",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz",
|
||||
"integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==",
|
||||
"version": "0.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.2.tgz",
|
||||
"integrity": "sha512-a5MxrdDXEvqnIq+LisyCX6tQMPF/dSJpCfBgBauY+pNZ28yCtSsTvyTYrMhaI+LK26bVyCJfJkT0u8KIj2i1dQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^0.17.0"
|
||||
"@eslint/core": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/core": {
|
||||
"version": "0.17.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz",
|
||||
"integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==",
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.1.0.tgz",
|
||||
"integrity": "sha512-/nr9K9wkr3P1EzFTdFdMoLuo1PmIxjmwvPozwoSodjNBdefGujXQUF93u1DDZpEaTuDvMsIQddsd35BwtrW9Xw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.15"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc": {
|
||||
@@ -1885,40 +1953,48 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/js": {
|
||||
"version": "9.39.2",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.2.tgz",
|
||||
"integrity": "sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==",
|
||||
"version": "10.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz",
|
||||
"integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://eslint.org/donate"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^10.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"eslint": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/object-schema": {
|
||||
"version": "2.1.7",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz",
|
||||
"integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==",
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.1.tgz",
|
||||
"integrity": "sha512-P9cq2dpr+LU8j3qbLygLcSZrl2/ds/pUpfnHNNuk5HW7mnngHs+6WSq5C9mO3rqRX8A1poxqLTC9cu0KOyJlBg==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint/plugin-kit": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz",
|
||||
"integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==",
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.6.0.tgz",
|
||||
"integrity": "sha512-bIZEUzOI1jkhviX2cp5vNyXQc6olzb2ohewQubuYlMXZ2Q/XjBO0x0XhGPvc9fjSIiUN0vw+0hq53BJ4eQSJKQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@eslint/core": "^0.17.0",
|
||||
"@eslint/core": "^1.1.0",
|
||||
"levn": "^0.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
}
|
||||
},
|
||||
"node_modules/@fastify/accept-negotiator": {
|
||||
@@ -6646,6 +6722,13 @@
|
||||
"@types/eslint": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/esrecurse": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz",
|
||||
"integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
|
||||
@@ -6962,17 +7045,17 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "8.54.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.54.0.tgz",
|
||||
"integrity": "sha512-hAAP5io/7csFStuOmR782YmTthKBJ9ND3WVL60hcOjvtGFb+HJxH4O5huAcmcZ9v9G8P+JETiZ/G1B8MALnWZQ==",
|
||||
"version": "8.55.1-alpha.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.55.1-alpha.4.tgz",
|
||||
"integrity": "sha512-F9LrvJ8tvQ1VxnQCDXUgS4D3lHX84FlmYiCENKEkgH6VCrkNNSfhbKZ2mDv4uJmqKfni9vgLLDqSrZPL/RSvYw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.12.2",
|
||||
"@typescript-eslint/scope-manager": "8.54.0",
|
||||
"@typescript-eslint/type-utils": "8.54.0",
|
||||
"@typescript-eslint/utils": "8.54.0",
|
||||
"@typescript-eslint/visitor-keys": "8.54.0",
|
||||
"@typescript-eslint/scope-manager": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/type-utils": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/utils": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/visitor-keys": "8.55.1-alpha.4",
|
||||
"ignore": "^7.0.5",
|
||||
"natural-compare": "^1.4.0",
|
||||
"ts-api-utils": "^2.4.0"
|
||||
@@ -6985,8 +7068,8 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^8.54.0",
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"@typescript-eslint/parser": "^8.55.1-alpha.4",
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
}
|
||||
},
|
||||
@@ -7001,16 +7084,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "8.54.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.54.0.tgz",
|
||||
"integrity": "sha512-BtE0k6cjwjLZoZixN0t5AKP0kSzlGu7FctRXYuPAm//aaiZhmfq1JwdYpYr1brzEspYyFeF+8XF5j2VK6oalrA==",
|
||||
"version": "8.55.1-alpha.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.55.1-alpha.4.tgz",
|
||||
"integrity": "sha512-3LXxuNb4EoH9aNv9czAi7K4dvYI2Ya80BtdytVGzs/CzcEzQICH6K+AYnXVE0Qw0Ih0iz35l5gLhB8QTZwS+6g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.54.0",
|
||||
"@typescript-eslint/types": "8.54.0",
|
||||
"@typescript-eslint/typescript-estree": "8.54.0",
|
||||
"@typescript-eslint/visitor-keys": "8.54.0",
|
||||
"@typescript-eslint/scope-manager": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/types": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/typescript-estree": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/visitor-keys": "8.55.1-alpha.4",
|
||||
"debug": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
@@ -7021,7 +7104,7 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
}
|
||||
},
|
||||
@@ -7051,14 +7134,14 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/project-service": {
|
||||
"version": "8.54.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.54.0.tgz",
|
||||
"integrity": "sha512-YPf+rvJ1s7MyiWM4uTRhE4DvBXrEV+d8oC3P9Y2eT7S+HBS0clybdMIPnhiATi9vZOYDc7OQ1L/i6ga6NFYK/g==",
|
||||
"version": "8.55.1-alpha.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.55.1-alpha.4.tgz",
|
||||
"integrity": "sha512-TbZsV55BkCsGKqaYWdMBz7gT8hYd7rNt4DhXglM5o8h4SUWbMEcd0J/kNxmUiAb+hvw1WmVGMGcJK+0V0h+xOw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/tsconfig-utils": "^8.54.0",
|
||||
"@typescript-eslint/types": "^8.54.0",
|
||||
"@typescript-eslint/tsconfig-utils": "^8.55.1-alpha.4",
|
||||
"@typescript-eslint/types": "^8.55.1-alpha.4",
|
||||
"debug": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
@@ -7098,14 +7181,14 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.54.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.54.0.tgz",
|
||||
"integrity": "sha512-27rYVQku26j/PbHYcVfRPonmOlVI6gihHtXFbTdB5sb6qA0wdAQAbyXFVarQ5t4HRojIz64IV90YtsjQSSGlQg==",
|
||||
"version": "8.55.1-alpha.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.55.1-alpha.4.tgz",
|
||||
"integrity": "sha512-oCv5Sxq/ZtBX6LmeBgupjlDpRMwRdyxPpdt31tzb7ju7w8fEyKqB4Uruof1KdGqvf+sxBn56/x63J3MZzRUDTw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.54.0",
|
||||
"@typescript-eslint/visitor-keys": "8.54.0"
|
||||
"@typescript-eslint/types": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/visitor-keys": "8.55.1-alpha.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -7116,9 +7199,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/tsconfig-utils": {
|
||||
"version": "8.54.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.54.0.tgz",
|
||||
"integrity": "sha512-dRgOyT2hPk/JwxNMZDsIXDgyl9axdJI3ogZ2XWhBPsnZUv+hPesa5iuhdYt2gzwA9t8RE5ytOJ6xB0moV0Ujvw==",
|
||||
"version": "8.55.1-alpha.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.55.1-alpha.4.tgz",
|
||||
"integrity": "sha512-8hUunIlWYnNUWL3Sq3oCo2KLVesMz/NheCoXj83DcUi+R3JV8mfQmjGCcjnhZ7MM2CGp4Cb83kioR//xxmj0TA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -7133,15 +7216,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "8.54.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.54.0.tgz",
|
||||
"integrity": "sha512-hiLguxJWHjjwL6xMBwD903ciAwd7DmK30Y9Axs/etOkftC3ZNN9K44IuRD/EB08amu+Zw6W37x9RecLkOo3pMA==",
|
||||
"version": "8.55.1-alpha.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.55.1-alpha.4.tgz",
|
||||
"integrity": "sha512-QYQG2u2sfJITOaxVkCU1IaT8N3TM1k8V+b3qyb8qHeGhqFx/Mjr82TbD0FBjvoB7GtMxIo+LjWf4BfkKRtHsog==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.54.0",
|
||||
"@typescript-eslint/typescript-estree": "8.54.0",
|
||||
"@typescript-eslint/utils": "8.54.0",
|
||||
"@typescript-eslint/types": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/typescript-estree": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/utils": "8.55.1-alpha.4",
|
||||
"debug": "^4.4.3",
|
||||
"ts-api-utils": "^2.4.0"
|
||||
},
|
||||
@@ -7153,7 +7236,7 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
}
|
||||
},
|
||||
@@ -7183,9 +7266,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "8.54.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.54.0.tgz",
|
||||
"integrity": "sha512-PDUI9R1BVjqu7AUDsRBbKMtwmjWcn4J3le+5LpcFgWULN3LvHC5rkc9gCVxbrsrGmO1jfPybN5s6h4Jy+OnkAA==",
|
||||
"version": "8.55.1-alpha.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.55.1-alpha.4.tgz",
|
||||
"integrity": "sha512-rRQOrve0R1RDmUM945ASreZ3WALAGIGP+58NO7IvoShGHmkFN/WjJiNGYHsrYz0G1eHWRsL7FQi9FXEK/hG4tQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -7197,16 +7280,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.54.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.54.0.tgz",
|
||||
"integrity": "sha512-BUwcskRaPvTk6fzVWgDPdUndLjB87KYDrN5EYGetnktoeAvPtO4ONHlAZDnj5VFnUANg0Sjm7j4usBlnoVMHwA==",
|
||||
"version": "8.55.1-alpha.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.55.1-alpha.4.tgz",
|
||||
"integrity": "sha512-MuOLdkbMla5S4PkyW8Bz9vKZJs8H2syrOXiK75ip8WwUKFwFwkaDFeLZNr4ICfaq6RJyjLxmkGHakYeS0lGCuA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/project-service": "8.54.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.54.0",
|
||||
"@typescript-eslint/types": "8.54.0",
|
||||
"@typescript-eslint/visitor-keys": "8.54.0",
|
||||
"@typescript-eslint/project-service": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/tsconfig-utils": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/types": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/visitor-keys": "8.55.1-alpha.4",
|
||||
"debug": "^4.4.3",
|
||||
"minimatch": "^9.0.5",
|
||||
"semver": "^7.7.3",
|
||||
@@ -7276,9 +7359,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree/node_modules/semver": {
|
||||
"version": "7.7.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
|
||||
"integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
|
||||
"version": "7.7.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
|
||||
"integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
@@ -7289,16 +7372,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "8.54.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.54.0.tgz",
|
||||
"integrity": "sha512-9Cnda8GS57AQakvRyG0PTejJNlA2xhvyNtEVIMlDWOOeEyBkYWhGPnfrIAnqxLMTSTo6q8g12XVjjev5l1NvMA==",
|
||||
"version": "8.55.1-alpha.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.55.1-alpha.4.tgz",
|
||||
"integrity": "sha512-z7Gb3VjWNuQ9xjphOQibIxPKRboMq57rzPNbcryTuvyGILC/mSrS5y3mMkrY8IdG19eJ4CAU6O6ZqvHFW/HY/w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.9.1",
|
||||
"@typescript-eslint/scope-manager": "8.54.0",
|
||||
"@typescript-eslint/types": "8.54.0",
|
||||
"@typescript-eslint/typescript-estree": "8.54.0"
|
||||
"@typescript-eslint/scope-manager": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/types": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/typescript-estree": "8.55.1-alpha.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -7308,19 +7391,19 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.54.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.54.0.tgz",
|
||||
"integrity": "sha512-VFlhGSl4opC0bprJiItPQ1RfUhGDIBokcPwaFH4yiBCaNPeld/9VeXbiPO1cLyorQi1G1vL+ecBk1x8o1axORA==",
|
||||
"version": "8.55.1-alpha.4",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.55.1-alpha.4.tgz",
|
||||
"integrity": "sha512-WH+b4XLJJqs9kOv2on5/EtjMqZVjHs0ZsplAd7kszjobL3La/nrA9iWWBf6Y8Gn24qOjsDcyPVlofS+4agVqkg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.54.0",
|
||||
"eslint-visitor-keys": "^4.2.1"
|
||||
"@typescript-eslint/types": "8.55.1-alpha.4",
|
||||
"eslint-visitor-keys": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -7330,6 +7413,19 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.0.tgz",
|
||||
"integrity": "sha512-A0XeIi7CXU7nPlfHS9loMYEKxUaONu/hTEzHTGba9Huu94Cq1hPivf+DE5erJozZOky0LfvXAyrV/tcswpLI0Q==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@vitest/coverage-istanbul": {
|
||||
"version": "4.0.18",
|
||||
"resolved": "https://registry.npmjs.org/@vitest/coverage-istanbul/-/coverage-istanbul-4.0.18.tgz",
|
||||
@@ -11907,33 +12003,30 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "9.39.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.2.tgz",
|
||||
"integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==",
|
||||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-10.0.0.tgz",
|
||||
"integrity": "sha512-O0piBKY36YSJhlFSG8p9VUdPV/SxxS4FYDWVpr/9GJuMaepzwlf4J8I4ov1b+ySQfDTPhc3DtLaxcT1fN0yqCg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.8.0",
|
||||
"@eslint-community/regexpp": "^4.12.1",
|
||||
"@eslint/config-array": "^0.21.1",
|
||||
"@eslint/config-helpers": "^0.4.2",
|
||||
"@eslint/core": "^0.17.0",
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@eslint/js": "9.39.2",
|
||||
"@eslint/plugin-kit": "^0.4.1",
|
||||
"@eslint-community/regexpp": "^4.12.2",
|
||||
"@eslint/config-array": "^0.23.0",
|
||||
"@eslint/config-helpers": "^0.5.2",
|
||||
"@eslint/core": "^1.1.0",
|
||||
"@eslint/plugin-kit": "^0.6.0",
|
||||
"@humanfs/node": "^0.16.6",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
"@humanwhocodes/retry": "^0.4.2",
|
||||
"@types/estree": "^1.0.6",
|
||||
"ajv": "^6.12.4",
|
||||
"chalk": "^4.0.0",
|
||||
"cross-spawn": "^7.0.6",
|
||||
"debug": "^4.3.2",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"eslint-scope": "^8.4.0",
|
||||
"eslint-visitor-keys": "^4.2.1",
|
||||
"espree": "^10.4.0",
|
||||
"esquery": "^1.5.0",
|
||||
"eslint-scope": "^9.1.0",
|
||||
"eslint-visitor-keys": "^5.0.0",
|
||||
"espree": "^11.1.0",
|
||||
"esquery": "^1.7.0",
|
||||
"esutils": "^2.0.2",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"file-entry-cache": "^8.0.0",
|
||||
@@ -11943,8 +12036,7 @@
|
||||
"imurmurhash": "^0.1.4",
|
||||
"is-glob": "^4.0.0",
|
||||
"json-stable-stringify-without-jsonify": "^1.0.1",
|
||||
"lodash.merge": "^4.6.2",
|
||||
"minimatch": "^3.1.2",
|
||||
"minimatch": "^10.1.1",
|
||||
"natural-compare": "^1.4.0",
|
||||
"optionator": "^0.9.3"
|
||||
},
|
||||
@@ -11952,7 +12044,7 @@
|
||||
"eslint": "bin/eslint.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://eslint.org/donate"
|
||||
@@ -12014,17 +12106,19 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-scope": {
|
||||
"version": "8.4.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz",
|
||||
"integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==",
|
||||
"version": "9.1.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.0.tgz",
|
||||
"integrity": "sha512-CkWE42hOJsNj9FJRaoMX9waUFYhqY4jmyLFdAdzZr6VaCg3ynLYx4WnOdkaIifGfH4gsUcBTn4OZbHXkpLD0FQ==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"@types/esrecurse": "^4.3.1",
|
||||
"@types/estree": "^1.0.8",
|
||||
"esrecurse": "^4.3.0",
|
||||
"estraverse": "^5.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint"
|
||||
@@ -12043,6 +12137,16 @@
|
||||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/@isaacs/cliui": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-9.0.0.tgz",
|
||||
"integrity": "sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/ajv": {
|
||||
"version": "6.12.6",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
|
||||
@@ -12060,6 +12164,32 @@
|
||||
"url": "https://github.com/sponsors/epoberezkin"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/balanced-match": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.2.tgz",
|
||||
"integrity": "sha512-x0K50QvKQ97fdEz2kPehIerj+YTeptKF9hyYkKf6egnwmMWAkADiO0QCzSp0R5xN8FTZgYaBfSaue46Ej62nMg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"jackspeak": "^4.2.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/brace-expansion": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.2.tgz",
|
||||
"integrity": "sha512-Pdk8c9poy+YhOgVWw1JNN22/HcivgKWwpxKq04M/jTmHyCZn12WPJebZxdjSa5TmBqISrUSgNYU3eRORljfCCw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"balanced-match": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/cross-spawn": {
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
||||
@@ -12106,6 +12236,37 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/eslint-visitor-keys": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.0.tgz",
|
||||
"integrity": "sha512-A0XeIi7CXU7nPlfHS9loMYEKxUaONu/hTEzHTGba9Huu94Cq1hPivf+DE5erJozZOky0LfvXAyrV/tcswpLI0Q==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/espree": {
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-11.1.0.tgz",
|
||||
"integrity": "sha512-WFWYhO1fV4iYkqOOvq8FbqIhr2pYfoDY0kCotMkDeNtGpiGGkZ1iov2u8ydjtgM8yF8rzK7oaTbw2NAzbAbehw==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"acorn": "^8.15.0",
|
||||
"acorn-jsx": "^5.3.2",
|
||||
"eslint-visitor-keys": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^20.19.0 || ^22.13.0 || >=24"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/find-up": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
|
||||
@@ -12136,6 +12297,22 @@
|
||||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/jackspeak": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.2.3.tgz",
|
||||
"integrity": "sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"@isaacs/cliui": "^9.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/json-schema-traverse": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
|
||||
@@ -12159,6 +12336,22 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/minimatch": {
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.0.tgz",
|
||||
"integrity": "sha512-ugkC31VaVg9cF0DFVoADH12k6061zNZkZON+aX8AWsR9GhPcErkcMBceb6znR8wLERM2AkkOxy2nWRLpT9Jq5w==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^5.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/isaacs"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint/node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
@@ -12317,10 +12510,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esquery": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz",
|
||||
"integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==",
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz",
|
||||
"integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==",
|
||||
"dev": true,
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"estraverse": "^5.1.0"
|
||||
},
|
||||
@@ -12333,6 +12527,7 @@
|
||||
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
|
||||
"integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": {
|
||||
"estraverse": "^5.2.0"
|
||||
},
|
||||
@@ -12345,6 +12540,7 @@
|
||||
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
|
||||
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
|
||||
"dev": true,
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
}
|
||||
@@ -19463,12 +19659,6 @@
|
||||
"lodash.isarray": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/lodash.merge": {
|
||||
"version": "4.6.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
|
||||
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/lodash.mergewith": {
|
||||
"version": "4.6.2",
|
||||
"resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz",
|
||||
@@ -26583,16 +26773,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript-eslint": {
|
||||
"version": "8.54.0",
|
||||
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.54.0.tgz",
|
||||
"integrity": "sha512-CKsJ+g53QpsNPqbzUsfKVgd3Lny4yKZ1pP4qN3jdMOg/sisIDLGyDMezycquXLE5JsEU0wp3dGNdzig0/fmSVQ==",
|
||||
"version": "8.55.1-alpha.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.55.1-alpha.4.tgz",
|
||||
"integrity": "sha512-MfGpXEz5KfX3wQrtZP7Vne+tCKmjrp8UJyLlbHtZoupp/QOpyphBOrvwP+ciAqLaQ+IjDGxGoQuYzjLCkqvTiw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "8.54.0",
|
||||
"@typescript-eslint/parser": "8.54.0",
|
||||
"@typescript-eslint/typescript-estree": "8.54.0",
|
||||
"@typescript-eslint/utils": "8.54.0"
|
||||
"@typescript-eslint/eslint-plugin": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/parser": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/typescript-estree": "8.55.1-alpha.4",
|
||||
"@typescript-eslint/utils": "8.55.1-alpha.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -26602,7 +26792,7 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0 || ^9.0.0",
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.0.0"
|
||||
}
|
||||
},
|
||||
|
||||
12
package.json
12
package.json
@@ -40,7 +40,7 @@
|
||||
"test:docker:down": "docker-compose -f integration/docker-compose.yml down",
|
||||
"lint": "concurrently 'npm run lint:packages' 'npm run lint:integration' 'npm run lint:spec'",
|
||||
"lint:fix": "concurrently 'npm run lint:packages -- --fix' 'npm run lint:integration -- --fix' 'npm run lint:spec -- --fix'",
|
||||
"lint:integration": "node --max-old-space-size=4096 ./node_modules/.bin/eslint 'integration/**/*.ts'",
|
||||
"lint:integration": "node --max-old-space-size=8192 ./node_modules/.bin/eslint 'integration/**/*.ts'",
|
||||
"lint:packages": "node --max-old-space-size=4096 ./node_modules/.bin/eslint 'packages/**/**.ts' --ignore-pattern 'packages/**/*.spec.ts'",
|
||||
"lint:spec": "node --max-old-space-size=4096 ./node_modules/.bin/eslint 'packages/**/**.spec.ts'",
|
||||
"lint:ci": "concurrently 'npm run lint:packages' 'npm run lint:spec'",
|
||||
@@ -88,7 +88,7 @@
|
||||
"@commitlint/cli": "20.4.1",
|
||||
"@commitlint/config-angular": "20.4.1",
|
||||
"@eslint/eslintrc": "3.3.3",
|
||||
"@eslint/js": "9.39.2",
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@fastify/cors": "11.2.0",
|
||||
"@fastify/formbody": "8.0.2",
|
||||
"@fastify/middie": "9.1.0",
|
||||
@@ -111,8 +111,8 @@
|
||||
"@types/node": "25.2.1",
|
||||
"@types/supertest": "6.0.3",
|
||||
"@types/ws": "8.18.1",
|
||||
"@typescript-eslint/eslint-plugin": "8.54.0",
|
||||
"@typescript-eslint/parser": "8.54.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.55.1-alpha.4",
|
||||
"@typescript-eslint/parser": "^8.55.1-alpha.4",
|
||||
"@vitest/coverage-istanbul": "^4.0.18",
|
||||
"@vitest/coverage-v8": "^4.0.18",
|
||||
"amqp-connection-manager": "5.0.0",
|
||||
@@ -123,7 +123,7 @@
|
||||
"conventional-changelog": "7.1.1",
|
||||
"coveralls": "3.1.1",
|
||||
"delete-empty": "3.0.0",
|
||||
"eslint": "9.39.2",
|
||||
"eslint": "^10.0.0",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"eslint-plugin-prettier": "5.5.5",
|
||||
"eventsource": "4.1.0",
|
||||
@@ -165,7 +165,7 @@
|
||||
"tsx": "4.19.2",
|
||||
"typeorm": "0.3.28",
|
||||
"typescript": "5.9.3",
|
||||
"typescript-eslint": "8.54.0",
|
||||
"typescript-eslint": "^8.55.1-alpha.4",
|
||||
"unplugin-swc": "^1.5.9",
|
||||
"vitest": "^4.0.18",
|
||||
"ws": "8.19.0"
|
||||
|
||||
@@ -491,10 +491,9 @@ export function Query(
|
||||
('schema' in property || 'pipes' in property);
|
||||
|
||||
if (isPropertyOptions) {
|
||||
const opts = property as ParameterDecoratorOptions;
|
||||
return createPipesRouteParamDecorator(RouteParamtypes.QUERY)({
|
||||
pipes: opts.pipes,
|
||||
schema: opts.schema,
|
||||
pipes: property.pipes,
|
||||
schema: property.schema,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -503,7 +502,7 @@ export function Query(
|
||||
typeof optionsOrPipe === 'object' &&
|
||||
('schema' in optionsOrPipe || 'pipes' in optionsOrPipe);
|
||||
const actualPipes = isOptions
|
||||
? (optionsOrPipe as ParameterDecoratorOptions).pipes
|
||||
? optionsOrPipe.pipes
|
||||
: ([optionsOrPipe, ...pipes].filter(Boolean) as (
|
||||
| Type<PipeTransform>
|
||||
| PipeTransform
|
||||
@@ -511,9 +510,7 @@ export function Query(
|
||||
return createPipesRouteParamDecorator(RouteParamtypes.QUERY)({
|
||||
data: property,
|
||||
pipes: actualPipes,
|
||||
schema: isOptions
|
||||
? (optionsOrPipe as ParameterDecoratorOptions).schema
|
||||
: undefined,
|
||||
schema: isOptions ? optionsOrPipe.schema : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -657,10 +654,9 @@ export function Body(
|
||||
('schema' in property || 'pipes' in property);
|
||||
|
||||
if (isPropertyOptions) {
|
||||
const opts = property as ParameterDecoratorOptions;
|
||||
return createPipesRouteParamDecorator(RouteParamtypes.BODY)({
|
||||
pipes: opts.pipes,
|
||||
schema: opts.schema,
|
||||
pipes: property.pipes,
|
||||
schema: property.schema,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -669,7 +665,7 @@ export function Body(
|
||||
typeof optionsOrPipe === 'object' &&
|
||||
('schema' in optionsOrPipe || 'pipes' in optionsOrPipe);
|
||||
const actualPipes = isOptions
|
||||
? (optionsOrPipe as ParameterDecoratorOptions).pipes
|
||||
? optionsOrPipe.pipes
|
||||
: ([optionsOrPipe, ...pipes].filter(Boolean) as (
|
||||
| Type<PipeTransform>
|
||||
| PipeTransform
|
||||
@@ -677,9 +673,7 @@ export function Body(
|
||||
return createPipesRouteParamDecorator(RouteParamtypes.BODY)({
|
||||
data: property,
|
||||
pipes: actualPipes,
|
||||
schema: isOptions
|
||||
? (optionsOrPipe as ParameterDecoratorOptions).schema
|
||||
: undefined,
|
||||
schema: isOptions ? optionsOrPipe.schema : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -780,16 +774,14 @@ export function RawBody(
|
||||
typeof optionsOrPipe === 'object' &&
|
||||
('schema' in optionsOrPipe || 'pipes' in optionsOrPipe);
|
||||
const actualPipes = isOptions
|
||||
? (optionsOrPipe as ParameterDecoratorOptions).pipes
|
||||
? optionsOrPipe.pipes
|
||||
: ([optionsOrPipe, ...pipes].filter(Boolean) as (
|
||||
| Type<PipeTransform>
|
||||
| PipeTransform
|
||||
)[]);
|
||||
return createPipesRouteParamDecorator(RouteParamtypes.RAW_BODY)({
|
||||
pipes: actualPipes,
|
||||
schema: isOptions
|
||||
? (optionsOrPipe as ParameterDecoratorOptions).schema
|
||||
: undefined,
|
||||
schema: isOptions ? optionsOrPipe.schema : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -957,10 +949,9 @@ export function Param(
|
||||
('schema' in property || 'pipes' in property);
|
||||
|
||||
if (isPropertyOptions) {
|
||||
const opts = property as ParameterDecoratorOptions;
|
||||
return createPipesRouteParamDecorator(RouteParamtypes.PARAM)({
|
||||
pipes: opts.pipes,
|
||||
schema: opts.schema,
|
||||
pipes: property.pipes,
|
||||
schema: property.schema,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -969,7 +960,7 @@ export function Param(
|
||||
typeof optionsOrPipe === 'object' &&
|
||||
('schema' in optionsOrPipe || 'pipes' in optionsOrPipe);
|
||||
const actualPipes = isOptions
|
||||
? (optionsOrPipe as ParameterDecoratorOptions).pipes
|
||||
? optionsOrPipe.pipes
|
||||
: ([optionsOrPipe, ...pipes].filter(Boolean) as (
|
||||
| Type<PipeTransform>
|
||||
| PipeTransform
|
||||
@@ -977,9 +968,7 @@ export function Param(
|
||||
return createPipesRouteParamDecorator(RouteParamtypes.PARAM)({
|
||||
data: property,
|
||||
pipes: actualPipes,
|
||||
schema: isOptions
|
||||
? (optionsOrPipe as ParameterDecoratorOptions).schema
|
||||
: undefined,
|
||||
schema: isOptions ? optionsOrPipe.schema : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -355,13 +355,15 @@ describe('ValidationPipe', () => {
|
||||
});
|
||||
});
|
||||
describe('when validation rejects', () => {
|
||||
it('should throw an error', () => {
|
||||
it('should throw an error', async () => {
|
||||
target = new ValidationPipe({
|
||||
forbidNonWhitelisted: true,
|
||||
whitelist: true,
|
||||
});
|
||||
const testObj = { prop1: 'value1', prop2: 'value2', prop3: 'value3' };
|
||||
expect(target.transform(testObj, metadata)).rejects.toBeDefined();
|
||||
await expect(
|
||||
target.transform(testObj, metadata),
|
||||
).rejects.toBeDefined();
|
||||
});
|
||||
});
|
||||
describe('when transformation is internal', () => {
|
||||
@@ -450,14 +452,16 @@ describe('ValidationPipe', () => {
|
||||
});
|
||||
});
|
||||
describe('when validation rejects', () => {
|
||||
it('should throw an error', () => {
|
||||
it('should throw an error', async () => {
|
||||
target = new ValidationPipe({
|
||||
transform: false,
|
||||
forbidNonWhitelisted: true,
|
||||
whitelist: true,
|
||||
});
|
||||
const testObj = { prop1: 'value1', prop2: 'value2', prop3: 'value3' };
|
||||
expect(target.transform(testObj, metadata)).rejects.toBeDefined();
|
||||
await expect(
|
||||
target.transform(testObj, metadata),
|
||||
).rejects.toBeDefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -469,10 +473,14 @@ describe('ValidationPipe', () => {
|
||||
{ prop1: 'value1', prop2: 'value2', prop3: 'value3' },
|
||||
];
|
||||
|
||||
expect(target.transform(testObj, metadata)).rejects.toBeDefined();
|
||||
expect(target.transform('string', metadata)).rejects.toBeDefined();
|
||||
expect(target.transform(true, metadata)).rejects.toBeDefined();
|
||||
expect(target.transform(3, metadata)).rejects.toBeDefined();
|
||||
await expect(
|
||||
target.transform(testObj, metadata),
|
||||
).rejects.toBeDefined();
|
||||
await expect(
|
||||
target.transform('string', metadata),
|
||||
).rejects.toBeDefined();
|
||||
await expect(target.transform(true, metadata)).rejects.toBeDefined();
|
||||
await expect(target.transform(3, metadata)).rejects.toBeDefined();
|
||||
});
|
||||
});
|
||||
describe('otherwise', () => {
|
||||
|
||||
@@ -102,7 +102,7 @@ describe('MiddlewareModule', () => {
|
||||
.getModules()
|
||||
.set('Test', new Module(TestModule, nestContainer));
|
||||
});
|
||||
it('should throw "RuntimeException" exception when middleware is not stored in container', () => {
|
||||
it('should throw "RuntimeException" exception when middleware is not stored in container', async () => {
|
||||
const route = { path: 'Test' };
|
||||
const configuration = {
|
||||
middleware: [TestMiddleware],
|
||||
@@ -113,7 +113,7 @@ describe('MiddlewareModule', () => {
|
||||
|
||||
middlewareModule['container'] = nestContainer;
|
||||
|
||||
expect(
|
||||
await expect(
|
||||
middlewareModule.registerRouteMiddleware(
|
||||
new MiddlewareContainer(nestContainer),
|
||||
route as any,
|
||||
@@ -124,7 +124,7 @@ describe('MiddlewareModule', () => {
|
||||
).rejects.toThrow(RuntimeException);
|
||||
});
|
||||
|
||||
it('should throw "InvalidMiddlewareException" exception when middleware does not have "use" method', () => {
|
||||
it('should throw "InvalidMiddlewareException" exception when middleware does not have "use" method', async () => {
|
||||
@Injectable()
|
||||
class InvalidMiddleware {}
|
||||
|
||||
@@ -149,7 +149,7 @@ describe('MiddlewareModule', () => {
|
||||
|
||||
middlewareModule['container'] = nestContainer;
|
||||
|
||||
expect(
|
||||
await expect(
|
||||
middlewareModule.registerRouteMiddleware(
|
||||
container,
|
||||
route as any,
|
||||
|
||||
@@ -17,7 +17,7 @@ describe('NestApplication', () => {
|
||||
'NestApplication tests',
|
||||
() => import('@nestjs/microservices'),
|
||||
);
|
||||
});
|
||||
}, 30_000);
|
||||
|
||||
describe('Hybrid Application', () => {
|
||||
class Interceptor {
|
||||
|
||||
@@ -389,24 +389,24 @@ describe('DependenciesScanner', () => {
|
||||
|
||||
expect(module.forwardRef).toHaveBeenCalled();
|
||||
});
|
||||
it('should throw "InvalidClassModuleException" exception when supplying a class annotated with `@Injectable()` decorator', () => {
|
||||
it('should throw "InvalidClassModuleException" exception when supplying a class annotated with `@Injectable()` decorator', async () => {
|
||||
vi.spyOn(container, 'addModule').mockReturnValue({} as any);
|
||||
|
||||
expect(scanner.insertModule(TestComponent, [])).rejects.toThrow(
|
||||
await expect(scanner.insertModule(TestComponent, [])).rejects.toThrow(
|
||||
InvalidClassModuleException,
|
||||
);
|
||||
});
|
||||
it('should throw "InvalidClassModuleException" exception when supplying a class annotated with `@Controller()` decorator', () => {
|
||||
it('should throw "InvalidClassModuleException" exception when supplying a class annotated with `@Controller()` decorator', async () => {
|
||||
vi.spyOn(container, 'addModule').mockReturnValue({} as any);
|
||||
|
||||
expect(scanner.insertModule(TestController, [])).rejects.toThrow(
|
||||
await expect(scanner.insertModule(TestController, [])).rejects.toThrow(
|
||||
InvalidClassModuleException,
|
||||
);
|
||||
});
|
||||
it('should throw "InvalidClassModuleException" exception when supplying a class annotated with (only) `@Catch()` decorator', () => {
|
||||
it('should throw "InvalidClassModuleException" exception when supplying a class annotated with (only) `@Catch()` decorator', async () => {
|
||||
vi.spyOn(container, 'addModule').mockReturnValue({} as any);
|
||||
|
||||
expect(
|
||||
await expect(
|
||||
scanner.insertModule(TestExceptionFilterWithoutInjectable, []),
|
||||
).rejects.toThrow(InvalidClassModuleException);
|
||||
});
|
||||
|
||||
@@ -235,7 +235,7 @@ export class ClientNats extends ClientProxy<NatsEvents, NatsStatus> {
|
||||
const channel = this.normalizePattern(partialPacket.pattern);
|
||||
const serializedPacket: NatsRecord = this.serializer.serialize(
|
||||
packet,
|
||||
) as any;
|
||||
) as NatsRecord;
|
||||
const inbox = natsPackage.createInbox(this.options.inboxPrefix);
|
||||
|
||||
const subscriptionHandler = this.createSubscriptionHandler(
|
||||
|
||||
@@ -163,8 +163,8 @@ export class ServerGrpc extends Server<never, never> {
|
||||
const service = {};
|
||||
|
||||
for (const methodName in grpcService.prototype) {
|
||||
let methodHandler: MessageHandler | null = null;
|
||||
let streamingType = GrpcMethodStreamingType.NO_STREAMING;
|
||||
let methodHandler: MessageHandler | null;
|
||||
let streamingType: GrpcMethodStreamingType;
|
||||
|
||||
const methodFunction = grpcService.prototype[methodName];
|
||||
const methodReqStreaming = methodFunction.requestStream;
|
||||
|
||||
@@ -64,7 +64,7 @@ describe('ClientGrpcProxy', () => {
|
||||
untypedClient.grpcClients[0] = {
|
||||
test: GrpcService,
|
||||
};
|
||||
await client.getService('test'); // should not throw
|
||||
client.getService('test'); // should not throw
|
||||
});
|
||||
|
||||
describe('when "grpcClient[name]" is not nil (multiple proto)', () => {
|
||||
@@ -73,8 +73,8 @@ describe('ClientGrpcProxy', () => {
|
||||
test: GrpcService,
|
||||
test2: GrpcService,
|
||||
};
|
||||
await clientMulti.getService('test'); // should not throw
|
||||
await clientMulti.getService('test2'); // should not throw
|
||||
clientMulti.getService('test'); // should not throw
|
||||
clientMulti.getService('test2'); // should not throw
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -189,28 +189,38 @@ describe('JsonSocket connection', () => {
|
||||
server.once('connection', socket => {
|
||||
const serverSocket = new JsonSocket(socket);
|
||||
|
||||
serverSocket.once('end', () => {
|
||||
setTimeout(() => {
|
||||
expect(serverSocket['isClosed']).toBe(true);
|
||||
expect(clientSocket['isClosed']).toBe(true);
|
||||
let serverClosed = false;
|
||||
let clientClosed = false;
|
||||
|
||||
clientSocket.on('connect', () => {
|
||||
setTimeout(() => {
|
||||
expect(clientSocket['isClosed']).toBe(false);
|
||||
const onBothClosed = () => {
|
||||
if (!serverClosed || !clientClosed) return;
|
||||
|
||||
clientSocket.end();
|
||||
server.close(done);
|
||||
}, 10);
|
||||
});
|
||||
expect(serverSocket['isClosed']).toBe(true);
|
||||
expect(clientSocket['isClosed']).toBe(true);
|
||||
|
||||
const address2 = server.address();
|
||||
if (!address2) {
|
||||
throw new Error('server.address() returned null');
|
||||
}
|
||||
const port2 = (address2 as AddressInfo).port;
|
||||
clientSocket.on('connect', () => {
|
||||
expect(clientSocket['isClosed']).toBe(false);
|
||||
|
||||
clientSocket.connect(port2, ip);
|
||||
}, 10);
|
||||
clientSocket.end();
|
||||
server.close(done);
|
||||
});
|
||||
|
||||
const address2 = server.address();
|
||||
if (!address2) {
|
||||
throw new Error('server.address() returned null');
|
||||
}
|
||||
const port2 = (address2 as AddressInfo).port;
|
||||
|
||||
clientSocket.connect(port2, ip);
|
||||
};
|
||||
|
||||
serverSocket.once('close', () => {
|
||||
serverClosed = true;
|
||||
onBothClosed();
|
||||
});
|
||||
clientSocket.once('close', () => {
|
||||
clientClosed = true;
|
||||
onBothClosed();
|
||||
});
|
||||
|
||||
clientSocket.end();
|
||||
|
||||
@@ -54,7 +54,7 @@ describe('ListenersController', () => {
|
||||
vi.fn(),
|
||||
]),
|
||||
),
|
||||
} as any as any;
|
||||
} as any;
|
||||
proxySpy = vi.fn();
|
||||
(rpcContextCreator as any).create.mockImplementation(() => proxySpy);
|
||||
|
||||
|
||||
@@ -10,59 +10,57 @@ describe('NatsRecordSerializer', () => {
|
||||
instance = new NatsRecordSerializer();
|
||||
});
|
||||
describe('serialize', () => {
|
||||
it('undefined', async () => {
|
||||
expect(await instance.serialize({ data: undefined })).toEqual({
|
||||
it('undefined', () => {
|
||||
expect(instance.serialize({ data: undefined })).toEqual({
|
||||
headers: undefined,
|
||||
data: jsonCodec.encode({ data: undefined }),
|
||||
});
|
||||
});
|
||||
|
||||
it('null', async () => {
|
||||
expect(await instance.serialize({ data: null })).toEqual({
|
||||
it('null', () => {
|
||||
expect(instance.serialize({ data: null })).toEqual({
|
||||
headers: undefined,
|
||||
data: jsonCodec.encode({ data: null }),
|
||||
});
|
||||
});
|
||||
|
||||
it('string', async () => {
|
||||
expect(await instance.serialize({ data: 'string' })).toEqual({
|
||||
it('string', () => {
|
||||
expect(instance.serialize({ data: 'string' })).toEqual({
|
||||
headers: undefined,
|
||||
data: jsonCodec.encode({ data: 'string' }),
|
||||
});
|
||||
});
|
||||
|
||||
it('number', async () => {
|
||||
expect(await instance.serialize({ data: 12345 })).toEqual({
|
||||
it('number', () => {
|
||||
expect(instance.serialize({ data: 12345 })).toEqual({
|
||||
headers: undefined,
|
||||
data: jsonCodec.encode({ data: 12345 }),
|
||||
});
|
||||
});
|
||||
|
||||
it('buffer', async () => {
|
||||
expect(await instance.serialize({ data: Buffer.from('buffer') })).toEqual(
|
||||
{
|
||||
headers: undefined,
|
||||
data: jsonCodec.encode({ data: Buffer.from('buffer') }),
|
||||
},
|
||||
);
|
||||
it('buffer', () => {
|
||||
expect(instance.serialize({ data: Buffer.from('buffer') })).toEqual({
|
||||
headers: undefined,
|
||||
data: jsonCodec.encode({ data: Buffer.from('buffer') }),
|
||||
});
|
||||
});
|
||||
|
||||
it('array', async () => {
|
||||
expect(await instance.serialize({ data: [1, 2, 3, 4, 5] })).toEqual({
|
||||
it('array', () => {
|
||||
expect(instance.serialize({ data: [1, 2, 3, 4, 5] })).toEqual({
|
||||
headers: undefined,
|
||||
data: jsonCodec.encode({ data: [1, 2, 3, 4, 5] }),
|
||||
});
|
||||
});
|
||||
|
||||
it('object', async () => {
|
||||
it('object', () => {
|
||||
const serObject = { prop: 'value' };
|
||||
expect(await instance.serialize({ data: serObject })).toEqual({
|
||||
expect(instance.serialize({ data: serObject })).toEqual({
|
||||
headers: undefined,
|
||||
data: jsonCodec.encode({ data: serObject }),
|
||||
});
|
||||
});
|
||||
|
||||
it('nats message with data and nats headers', async () => {
|
||||
it('nats message with data and nats headers', () => {
|
||||
const natsHeaders = nats.headers();
|
||||
natsHeaders.set('1', 'header_1');
|
||||
const natsMessage = new NatsRecordBuilder()
|
||||
@@ -70,7 +68,7 @@ describe('NatsRecordSerializer', () => {
|
||||
.setData({ value: 'string' })
|
||||
.build();
|
||||
expect(
|
||||
await instance.serialize({
|
||||
instance.serialize({
|
||||
data: natsMessage,
|
||||
}),
|
||||
).toEqual({
|
||||
|
||||
@@ -17,10 +17,10 @@ describe('ServerNats', () => {
|
||||
untypedServer = server as any;
|
||||
|
||||
// Eagerly init serializer/deserializer (loadPackage is async in ESM)
|
||||
if (typeof (untypedServer.serializer as any)?.init === 'function') {
|
||||
if (typeof untypedServer.serializer?.init === 'function') {
|
||||
await untypedServer.serializer.init();
|
||||
}
|
||||
if (typeof (untypedServer.deserializer as any)?.init === 'function') {
|
||||
if (typeof untypedServer.deserializer?.init === 'function') {
|
||||
await untypedServer.deserializer.init();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -70,7 +70,7 @@ export const createPipesRpcParamDecorator =
|
||||
|
||||
let paramPipes: (Type<PipeTransform> | PipeTransform)[];
|
||||
if (isOptions) {
|
||||
paramPipes = (optionsOrPipe as ParameterDecoratorOptions).pipes ?? [];
|
||||
paramPipes = optionsOrPipe.pipes ?? [];
|
||||
} else if (hasParamData) {
|
||||
paramPipes = [optionsOrPipe, ...pipes].filter(Boolean) as (
|
||||
| Type<PipeTransform>
|
||||
@@ -88,9 +88,7 @@ export const createPipesRpcParamDecorator =
|
||||
assignMetadata(args, paramtype, index, {
|
||||
data: paramData!,
|
||||
pipes: paramPipes,
|
||||
schema: isOptions
|
||||
? (optionsOrPipe as ParameterDecoratorOptions).schema
|
||||
: undefined,
|
||||
schema: isOptions ? optionsOrPipe.schema : undefined,
|
||||
}),
|
||||
target.constructor,
|
||||
key!,
|
||||
|
||||
3
packages/testing/test/tsconfig.json
Normal file
3
packages/testing/test/tsconfig.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "../../../tsconfig.spec.json"
|
||||
}
|
||||
@@ -59,7 +59,7 @@ describe('WebSocketsController', () => {
|
||||
instance = new WebSocketsController(
|
||||
provider,
|
||||
config,
|
||||
contextCreator as any,
|
||||
contextCreator,
|
||||
graphInspector,
|
||||
);
|
||||
untypedInstance = instance as any;
|
||||
@@ -146,7 +146,7 @@ describe('WebSocketsController', () => {
|
||||
server = { server: 'test' };
|
||||
|
||||
vi.spyOn(explorer, 'explore').mockReturnValue(handlers);
|
||||
vi.spyOn(provider, 'scanForSocketServer').mockReturnValue(server as any);
|
||||
vi.spyOn(provider, 'scanForSocketServer').mockReturnValue(server);
|
||||
|
||||
assignServerToProperties = vi.fn();
|
||||
subscribeEvents = vi.fn();
|
||||
@@ -559,7 +559,7 @@ describe('WebSocketsController', () => {
|
||||
const previewInstance = new WebSocketsController(
|
||||
previewProvider,
|
||||
previewConfig,
|
||||
contextCreator as any,
|
||||
contextCreator,
|
||||
graphInspector,
|
||||
{ preview: true },
|
||||
);
|
||||
|
||||
@@ -70,7 +70,7 @@ export const createPipesWsParamDecorator =
|
||||
|
||||
let paramPipes: (Type<PipeTransform> | PipeTransform)[];
|
||||
if (isOptions) {
|
||||
paramPipes = (optionsOrPipe as ParameterDecoratorOptions).pipes ?? [];
|
||||
paramPipes = optionsOrPipe.pipes ?? [];
|
||||
} else if (hasParamData) {
|
||||
paramPipes = [optionsOrPipe, ...pipes].filter(Boolean) as (
|
||||
| Type<PipeTransform>
|
||||
@@ -88,9 +88,7 @@ export const createPipesWsParamDecorator =
|
||||
assignMetadata(args, paramtype, index, {
|
||||
data: paramData!,
|
||||
pipes: paramPipes,
|
||||
schema: isOptions
|
||||
? (optionsOrPipe as ParameterDecoratorOptions).schema
|
||||
: undefined,
|
||||
schema: isOptions ? optionsOrPipe.schema : undefined,
|
||||
}),
|
||||
target.constructor,
|
||||
key!,
|
||||
|
||||
Reference in New Issue
Block a user