@depup/nestjs__common 11.2.1-depup.0 → 11.2.2-depup.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/nestjs__common
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [@nestjs/common](https://www.npmjs.com/package/@nestjs/common) @ 11.2.1 |
17
- | Processed | 2026-08-15 |
16
+ | Original | [@nestjs/common](https://www.npmjs.com/package/@nestjs/common) @ 11.2.2 |
17
+ | Processed | 2026-08-25 |
18
18
  | Smoke test | passed |
19
19
  | Deps updated | 1 |
20
20
 
@@ -22,7 +22,7 @@ npm install @depup/nestjs__common
22
22
 
23
23
  | Dependency | From | To |
24
24
  |------------|------|-----|
25
- | file-type | 21.3.4 | ^22.0.1 |
25
+ | file-type | 21.3.4 | ^22.0.2 |
26
26
 
27
27
  ---
28
28
 
package/changes.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "bumped": {
3
3
  "file-type": {
4
4
  "from": "21.3.4",
5
- "to": "^22.0.1"
5
+ "to": "^22.0.2"
6
6
  }
7
7
  },
8
- "timestamp": "2026-08-15T00:16:29.469Z",
8
+ "timestamp": "2026-08-25T08:15:22.093Z",
9
9
  "totalUpdated": 1
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depup/nestjs__common",
3
- "version": "11.2.1-depup.0",
3
+ "version": "11.2.2-depup.0",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@common) (with updated dependencies)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "homepage": "https://nestjs.com",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "license": "MIT",
17
17
  "dependencies": {
18
- "file-type": "^22.0.1",
18
+ "file-type": "^22.0.2",
19
19
  "iterare": "1.2.1",
20
20
  "load-esm": "1.0.3",
21
21
  "tslib": "2.8.1",
@@ -35,7 +35,7 @@
35
35
  "optional": true
36
36
  }
37
37
  },
38
- "gitHead": "4535f43b4890c9c69c57c5a5a8b49f62c83d1ed6",
38
+ "gitHead": "7e65752ba4e396adbe8387b21eeaeeea27f467b1",
39
39
  "keywords": [
40
40
  "@nestjs/common",
41
41
  "depup",
@@ -48,13 +48,13 @@
48
48
  "changes": {
49
49
  "file-type": {
50
50
  "from": "21.3.4",
51
- "to": "^22.0.1"
51
+ "to": "^22.0.2"
52
52
  }
53
53
  },
54
54
  "depsUpdated": 1,
55
55
  "originalPackage": "@nestjs/common",
56
- "originalVersion": "11.2.1",
57
- "processedAt": "2026-08-15T00:16:32.505Z",
56
+ "originalVersion": "11.2.2",
57
+ "processedAt": "2026-08-25T08:15:26.408Z",
58
58
  "smokeTest": "passed"
59
59
  }
60
60
  }
@@ -1,22 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- import { ExecutionContext } from '../features/execution-context.interface.js';
3
- /**
4
- * Interface describing a global preRequest hook for microservices.
5
- *
6
- * Hooks are executed before guards, allowing setup of context (e.g. AsyncLocalStorage)
7
- * that is available to all downstream enhancers.
8
- *
9
- * @example
10
- * ```typescript
11
- * const als = new AsyncLocalStorage();
12
- * app.registerPreRequestHook((context, next) => {
13
- * als.enterWith({ correlationId: uuid() });
14
- * return next();
15
- * });
16
- * ```
17
- *
18
- * @publicApi
19
- */
20
- export interface PreRequestHook {
21
- (context: ExecutionContext, next: () => Observable<unknown>): Observable<unknown>;
22
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * Interface describing the shape of a transport server.
3
- * Used as the return type of `getTransportServer()` to provide
4
- * autocomplete without creating circular dependencies.
5
- *
6
- * @publicApi
7
- */
8
- export interface ITransportServer {
9
- /**
10
- * Starts the transport server.
11
- * @param callback Function to be called upon initialization
12
- */
13
- listen(callback: (...optionalParams: unknown[]) => any): any;
14
- /**
15
- * Closes the transport server (stops listening on port/connection).
16
- */
17
- close(): any;
18
- }
@@ -1,28 +0,0 @@
1
- /**
2
- * Severity level applied to a single kind of route conflict detected at
3
- * bootstrap.
4
- *
5
- * @publicApi
6
- */
7
- export type RouteConflictPolicyLevel = 'off' | 'warn' | 'error';
8
- /**
9
- * Per-kind policy for overlapping routes detected at bootstrap.
10
- * `duplicate` covers identical (method, path, host, version) registrations.
11
- * `shadow` covers patterns that can match the same request (for example
12
- * `/users/me` vs `/users/:id`). Each kind defaults to `'off'`.
13
- *
14
- * @publicApi
15
- */
16
- export interface RouteConflictPolicy {
17
- duplicate?: RouteConflictPolicyLevel;
18
- shadow?: RouteConflictPolicyLevel;
19
- }
20
- /**
21
- * Order in which routes are registered on the underlying HTTP adapter.
22
- * `'specificity'` registers literal segments before parametric and
23
- * wildcard ones on order-sensitive adapters (such as Express). Defaults
24
- * to `'declaration'`.
25
- *
26
- * @publicApi
27
- */
28
- export type RouteResolutionStrategy = 'declaration' | 'specificity';
@@ -1 +0,0 @@
1
- export {};
package/internal.d.ts DELETED
@@ -1,31 +0,0 @@
1
- /**
2
- * Internal module - not part of the public API.
3
- * These exports are used by sibling @nestjs packages.
4
- * Do not depend on these in your application code.
5
- * @internal
6
- * @module
7
- */
8
- export * from './constants.js';
9
- export { RouteParamtypes } from './enums/route-paramtypes.enum.js';
10
- export * from './utils/shared.utils.js';
11
- export * from './utils/parameter-decorator-options.util.js';
12
- export * from './utils/load-package.util.js';
13
- export * from './utils/cli-colors.util.js';
14
- export * from './utils/random-string-generator.util.js';
15
- export * from './utils/select-exception-filter-metadata.util.js';
16
- export type { Controller, Injectable } from './interfaces/index.js';
17
- export type { NestApplicationContextOptions } from './interfaces/nest-application-context-options.interface.js';
18
- export type { NestMicroserviceOptions } from './interfaces/microservices/nest-microservice-options.interface.js';
19
- export type { CorsOptions, CorsOptionsDelegate, CustomOrigin, } from './interfaces/external/cors-options.interface.js';
20
- export type { ExceptionFilterMetadata } from './interfaces/exceptions/exception-filter-metadata.interface.js';
21
- export type { RpcExceptionFilterMetadata } from './interfaces/exceptions/rpc-exception-filter-metadata.interface.js';
22
- export type { VersionValue } from './interfaces/version-options.interface.js';
23
- export type { GlobalPrefixOptions } from './interfaces/global-prefix-options.interface.js';
24
- export type { MiddlewareConfiguration, RouteInfo, } from './interfaces/middleware/middleware-configuration.interface.js';
25
- export type { MiddlewareConfigProxy } from './interfaces/middleware/middleware-config-proxy.interface.js';
26
- export type { ModuleMetadata } from './interfaces/modules/module-metadata.interface.js';
27
- export type { HttpArgumentsHost, RpcArgumentsHost, WsArgumentsHost, } from './interfaces/features/arguments-host.interface.js';
28
- export type { RequestHandler } from './interfaces/http/http-server.interface.js';
29
- export type { GetOrResolveOptions, SelectOptions, } from './interfaces/nest-application-context.interface.js';
30
- export type { ShutdownHooksOptions } from './interfaces/shutdown-hooks-options.interface.js';
31
- export { assignMetadata } from './decorators/http/route-params.decorator.js';
package/internal.js DELETED
@@ -1,20 +0,0 @@
1
- /**
2
- * Internal module - not part of the public API.
3
- * These exports are used by sibling @nestjs packages.
4
- * Do not depend on these in your application code.
5
- * @internal
6
- * @module
7
- */
8
- // Constants
9
- export * from './constants.js';
10
- // Enums (internal)
11
- export { RouteParamtypes } from './enums/route-paramtypes.enum.js';
12
- // Utils
13
- export * from './utils/shared.utils.js';
14
- export * from './utils/parameter-decorator-options.util.js';
15
- export * from './utils/load-package.util.js';
16
- export * from './utils/cli-colors.util.js';
17
- export * from './utils/random-string-generator.util.js';
18
- export * from './utils/select-exception-filter-metadata.util.js';
19
- // Decorators (internal)
20
- export { assignMetadata } from './decorators/http/route-params.decorator.js';
@@ -1,91 +0,0 @@
1
- import type { StandardSchemaV1 } from '@standard-schema/spec';
2
- import { ArgumentMetadata, PipeTransform } from '../interfaces/features/pipe-transform.interface.js';
3
- import { ErrorHttpStatusCode } from '../utils/http-error-by-code.util.js';
4
- /**
5
- * @publicApi
6
- */
7
- export interface StandardSchemaValidationPipeOptions {
8
- /**
9
- * If true, the pipe will return the value produced by the schema
10
- * (which may differ from the input if the schema coerces/transforms values).
11
- * If false, the original input value is returned after successful validation.
12
- * @default true
13
- */
14
- transform?: boolean;
15
- /**
16
- * If true, the pipe will also validate parameters decorated with custom decorators
17
- * (created with `createParamDecorator`). When false, custom parameters are skipped.
18
- * @default false
19
- */
20
- validateCustomDecorators?: boolean;
21
- /**
22
- * Options to pass to the standard schema `validate` function.
23
- * These options are forwarded as the second argument to the schema's `~standard.validate` method.
24
- */
25
- validateOptions?: Record<string, unknown>;
26
- /**
27
- * The HTTP status code to be used in the response when the validation fails.
28
- * @default HttpStatus.BAD_REQUEST
29
- */
30
- errorHttpStatusCode?: ErrorHttpStatusCode;
31
- /**
32
- * A factory function that returns an exception object to be thrown
33
- * if validation fails.
34
- * @param issues The issues returned by the standard schema validation
35
- * @returns The exception object
36
- */
37
- exceptionFactory?: (issues: readonly StandardSchemaV1.Issue[]) => any;
38
- }
39
- /**
40
- * Defines the built-in StandardSchemaValidation Pipe.
41
- *
42
- * Uses a standard schema object (conforming to the Standard Schema spec)
43
- * attached to the parameter metadata to validate incoming values.
44
- *
45
- * @see [Standard Schema](https://github.com/standard-schema/standard-schema)
46
- *
47
- * @publicApi
48
- */
49
- export declare class StandardSchemaValidationPipe implements PipeTransform {
50
- protected readonly options?: StandardSchemaValidationPipeOptions | undefined;
51
- protected isTransformEnabled: boolean;
52
- protected validateCustomDecorators: boolean;
53
- protected validateOptions: Record<string, unknown> | undefined;
54
- protected exceptionFactory: (issues: readonly StandardSchemaV1.Issue[]) => any;
55
- constructor(options?: StandardSchemaValidationPipeOptions | undefined);
56
- /**
57
- * Formats Standard Schema validation issues into a flat list of error messages.
58
- * When an issue includes a path, the path is prefixed to the message.
59
- */
60
- protected formatIssueMessages(issues: readonly StandardSchemaV1.Issue[]): string[];
61
- /**
62
- * Method that validates the incoming value against the standard schema
63
- * provided in the parameter metadata.
64
- *
65
- * @param value currently processed route argument
66
- * @param metadata contains metadata about the currently processed route argument
67
- */
68
- transform<T = any>(value: T, metadata: ArgumentMetadata): Promise<T>;
69
- /**
70
- * Determines whether validation should be performed for the given metadata.
71
- * Skips validation for custom decorators unless `validateCustomDecorators` is enabled.
72
- *
73
- * @param metadata contains metadata about the currently processed route argument
74
- * @returns `true` if validation should be performed
75
- */
76
- protected toValidate(metadata: ArgumentMetadata): boolean;
77
- /**
78
- * Validates a value against a standard schema.
79
- * Can be overridden to customize validation behavior.
80
- *
81
- * @param value The value to validate
82
- * @param schema The standard schema to validate against
83
- * @param options Optional options forwarded to the schema's validate method
84
- * @returns The validation result
85
- */
86
- protected validate<T = unknown>(value: unknown, schema: StandardSchemaV1, options?: Record<string, unknown>): Promise<StandardSchemaV1.Result<T>> | StandardSchemaV1.Result<T>;
87
- /**
88
- * Strips dangerous prototype pollution keys from an object.
89
- */
90
- protected stripProtoKeys(value: any): void;
91
- }
@@ -1,132 +0,0 @@
1
- import { __decorate, __metadata, __param } from "tslib";
2
- import { types } from 'util';
3
- import { Injectable } from '../decorators/core/injectable.decorator.js';
4
- import { Optional } from '../decorators/core/optional.decorator.js';
5
- import { HttpStatus } from '../enums/http-status.enum.js';
6
- import { HttpErrorByCode, } from '../utils/http-error-by-code.util.js';
7
- /**
8
- * Built-in JavaScript types that should be excluded from prototype stripping
9
- * to avoid conflicts with test frameworks like Jest's useFakeTimers
10
- */
11
- const BUILT_IN_TYPES = [Date, RegExp, Error, Map, Set, WeakMap, WeakSet];
12
- /**
13
- * Defines the built-in StandardSchemaValidation Pipe.
14
- *
15
- * Uses a standard schema object (conforming to the Standard Schema spec)
16
- * attached to the parameter metadata to validate incoming values.
17
- *
18
- * @see [Standard Schema](https://github.com/standard-schema/standard-schema)
19
- *
20
- * @publicApi
21
- */
22
- let StandardSchemaValidationPipe = class StandardSchemaValidationPipe {
23
- options;
24
- isTransformEnabled;
25
- validateCustomDecorators;
26
- validateOptions;
27
- exceptionFactory;
28
- constructor(options) {
29
- this.options = options;
30
- const { transform = true, validateCustomDecorators = false, validateOptions, exceptionFactory, errorHttpStatusCode = HttpStatus.BAD_REQUEST, } = options || {};
31
- this.isTransformEnabled = transform;
32
- this.validateCustomDecorators = validateCustomDecorators;
33
- this.validateOptions = validateOptions;
34
- this.exceptionFactory =
35
- exceptionFactory ||
36
- (issues => {
37
- const messages = this.formatIssueMessages(issues);
38
- return new HttpErrorByCode[errorHttpStatusCode](messages);
39
- });
40
- }
41
- /**
42
- * Formats Standard Schema validation issues into a flat list of error messages.
43
- * When an issue includes a path, the path is prefixed to the message.
44
- */
45
- formatIssueMessages(issues) {
46
- return issues.map(issue => {
47
- if (issue.path?.length) {
48
- return `${issue.path.map(String).join('.')}: ${issue.message}`;
49
- }
50
- return issue.message;
51
- });
52
- }
53
- /**
54
- * Method that validates the incoming value against the standard schema
55
- * provided in the parameter metadata.
56
- *
57
- * @param value currently processed route argument
58
- * @param metadata contains metadata about the currently processed route argument
59
- */
60
- async transform(value, metadata) {
61
- const schema = metadata.schema;
62
- if (!schema || !this.toValidate(metadata)) {
63
- return value;
64
- }
65
- this.stripProtoKeys(value);
66
- const result = await this.validate(value, schema, this.validateOptions);
67
- if (result.issues) {
68
- throw this.exceptionFactory(result.issues);
69
- }
70
- return this.isTransformEnabled ? result.value : value;
71
- }
72
- /**
73
- * Determines whether validation should be performed for the given metadata.
74
- * Skips validation for custom decorators unless `validateCustomDecorators` is enabled.
75
- *
76
- * @param metadata contains metadata about the currently processed route argument
77
- * @returns `true` if validation should be performed
78
- */
79
- toValidate(metadata) {
80
- const { type } = metadata;
81
- if (type === 'custom' && !this.validateCustomDecorators) {
82
- return false;
83
- }
84
- return true;
85
- }
86
- /**
87
- * Validates a value against a standard schema.
88
- * Can be overridden to customize validation behavior.
89
- *
90
- * @param value The value to validate
91
- * @param schema The standard schema to validate against
92
- * @param options Optional options forwarded to the schema's validate method
93
- * @returns The validation result
94
- */
95
- validate(value, schema, options) {
96
- return schema['~standard'].validate(value, options);
97
- }
98
- /**
99
- * Strips dangerous prototype pollution keys from an object.
100
- */
101
- stripProtoKeys(value) {
102
- if (value == null ||
103
- typeof value !== 'object' ||
104
- types.isTypedArray(value)) {
105
- return;
106
- }
107
- if (BUILT_IN_TYPES.some(type => value instanceof type)) {
108
- return;
109
- }
110
- if (Array.isArray(value)) {
111
- for (const v of value) {
112
- this.stripProtoKeys(v);
113
- }
114
- return;
115
- }
116
- delete value.__proto__;
117
- delete value.prototype;
118
- const constructorType = value?.constructor;
119
- if (constructorType && !BUILT_IN_TYPES.includes(constructorType)) {
120
- delete value.constructor;
121
- }
122
- for (const key in value) {
123
- this.stripProtoKeys(value[key]);
124
- }
125
- }
126
- };
127
- StandardSchemaValidationPipe = __decorate([
128
- Injectable(),
129
- __param(0, Optional()),
130
- __metadata("design:paramtypes", [Object])
131
- ], StandardSchemaValidationPipe);
132
- export { StandardSchemaValidationPipe };
@@ -1,50 +0,0 @@
1
- import type { StandardSchemaV1 } from '@standard-schema/spec';
2
- import { Observable } from 'rxjs';
3
- import { CallHandler, ExecutionContext, NestInterceptor } from '../interfaces/index.js';
4
- import { StandardSchemaSerializerContextOptions } from './standard-schema-serializer.interfaces.js';
5
- interface PlainLiteralObject {
6
- [key: string]: any;
7
- }
8
- /**
9
- * @publicApi
10
- */
11
- export interface StandardSchemaSerializerInterceptorOptions {
12
- /**
13
- * A default standard schema to use for serialization when no schema
14
- * is provided via `@SerializeOptions()`.
15
- */
16
- schema?: StandardSchemaV1;
17
- /**
18
- * Default options forwarded to the schema's `~standard.validate()` call.
19
- * Can be overridden per-handler via `@SerializeOptions({ validateOptions })`.
20
- */
21
- validateOptions?: StandardSchemaV1.Options;
22
- }
23
- /**
24
- * An interceptor that serializes outgoing responses using a Standard Schema.
25
- *
26
- * The schema can be provided either:
27
- * - As a default option in the interceptor constructor
28
- * - Per-handler or per-class via `@SerializeOptions({ schema })` decorator
29
- *
30
- * When a schema is present, the interceptor validates/transforms the response
31
- * through the schema's `~standard.validate()` method. If validation fails,
32
- * the issues are thrown as an error.
33
- *
34
- * @see [Standard Schema](https://github.com/standard-schema/standard-schema)
35
- *
36
- * @publicApi
37
- */
38
- export declare class StandardSchemaSerializerInterceptor implements NestInterceptor {
39
- protected readonly reflector: any;
40
- protected readonly defaultOptions: StandardSchemaSerializerInterceptorOptions;
41
- constructor(reflector: any, defaultOptions?: StandardSchemaSerializerInterceptorOptions);
42
- intercept(context: ExecutionContext, next: CallHandler): Observable<any>;
43
- /**
44
- * Serializes responses that are non-null objects nor streamable files.
45
- */
46
- serialize(response: PlainLiteralObject | Array<PlainLiteralObject>, schema: StandardSchemaV1 | undefined, validateOptions?: StandardSchemaV1.Options): PlainLiteralObject | Array<PlainLiteralObject> | Promise<PlainLiteralObject | Array<PlainLiteralObject>>;
47
- transformToPlain(plainOrClass: any, schema: StandardSchemaV1, validateOptions?: StandardSchemaV1.Options): Promise<PlainLiteralObject>;
48
- protected getContextOptions(context: ExecutionContext): StandardSchemaSerializerContextOptions | undefined;
49
- }
50
- export {};
@@ -1,75 +0,0 @@
1
- import { __decorate, __metadata, __param } from "tslib";
2
- import { concatMap } from 'rxjs/operators';
3
- import { Inject, Injectable, Optional } from '../decorators/core/index.js';
4
- import { StreamableFile } from '../file-stream/index.js';
5
- import { isObject } from '../utils/shared.utils.js';
6
- import { CLASS_SERIALIZER_OPTIONS } from './class-serializer.constants.js';
7
- // NOTE (external)
8
- // We need to deduplicate them here due to the circular dependency
9
- // between core and common packages
10
- const REFLECTOR = 'Reflector';
11
- /**
12
- * An interceptor that serializes outgoing responses using a Standard Schema.
13
- *
14
- * The schema can be provided either:
15
- * - As a default option in the interceptor constructor
16
- * - Per-handler or per-class via `@SerializeOptions({ schema })` decorator
17
- *
18
- * When a schema is present, the interceptor validates/transforms the response
19
- * through the schema's `~standard.validate()` method. If validation fails,
20
- * the issues are thrown as an error.
21
- *
22
- * @see [Standard Schema](https://github.com/standard-schema/standard-schema)
23
- *
24
- * @publicApi
25
- */
26
- let StandardSchemaSerializerInterceptor = class StandardSchemaSerializerInterceptor {
27
- reflector;
28
- defaultOptions;
29
- constructor(reflector, defaultOptions = {}) {
30
- this.reflector = reflector;
31
- this.defaultOptions = defaultOptions;
32
- }
33
- intercept(context, next) {
34
- const contextOptions = this.getContextOptions(context);
35
- const schema = contextOptions?.schema ?? this.defaultOptions.schema;
36
- const validateOptions = contextOptions?.validateOptions ?? this.defaultOptions.validateOptions;
37
- return next
38
- .handle()
39
- .pipe(concatMap(async (res) => this.serialize(res, schema, validateOptions)));
40
- }
41
- /**
42
- * Serializes responses that are non-null objects nor streamable files.
43
- */
44
- serialize(response, schema, validateOptions) {
45
- if (!schema || !isObject(response) || response instanceof StreamableFile) {
46
- return response;
47
- }
48
- return Array.isArray(response)
49
- ? Promise.all(response.map(item => this.transformToPlain(item, schema, validateOptions)))
50
- : this.transformToPlain(response, schema, validateOptions);
51
- }
52
- async transformToPlain(plainOrClass, schema, validateOptions) {
53
- if (!plainOrClass) {
54
- return plainOrClass;
55
- }
56
- const result = await schema['~standard'].validate(plainOrClass, validateOptions);
57
- if (result.issues) {
58
- throw new Error(`Serialization failed: ${result.issues.map(i => i.message).join(', ')}`);
59
- }
60
- return result.value;
61
- }
62
- getContextOptions(context) {
63
- return this.reflector.getAllAndOverride(CLASS_SERIALIZER_OPTIONS, [
64
- context.getHandler(),
65
- context.getClass(),
66
- ]);
67
- }
68
- };
69
- StandardSchemaSerializerInterceptor = __decorate([
70
- Injectable(),
71
- __param(0, Inject(REFLECTOR)),
72
- __param(1, Optional()),
73
- __metadata("design:paramtypes", [Object, Object])
74
- ], StandardSchemaSerializerInterceptor);
75
- export { StandardSchemaSerializerInterceptor };
@@ -1,18 +0,0 @@
1
- import type { StandardSchemaV1 } from '@standard-schema/spec';
2
- /**
3
- * Options for the `StandardSchemaSerializerInterceptor`, passed via
4
- * `@SerializeOptions({ schema })`.
5
- *
6
- * @publicApi
7
- */
8
- export interface StandardSchemaSerializerContextOptions {
9
- /**
10
- * A standard schema to use for serialization.
11
- * Used by `StandardSchemaSerializerInterceptor` to validate/transform the response.
12
- */
13
- schema?: StandardSchemaV1;
14
- /**
15
- * Optional options forwarded to the schema's `~standard.validate()` call.
16
- */
17
- validateOptions?: StandardSchemaV1.Options;
18
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,13 +0,0 @@
1
- import type { ParameterDecoratorOptions } from '../decorators/http/route-params.decorator.js';
2
- /**
3
- * Determines whether a parameter-decorator argument is a
4
- * `ParameterDecoratorOptions` object rather than a pipe (instance or class).
5
- *
6
- * Kept in one place so every decorator (`@Query`, `@Body`, `@Param`,
7
- * `@RawBody`, `@Payload`, `@MessageBody`, custom decorators, ...) classifies
8
- * arguments identically: a pipe instance that happens to expose a `schema` or
9
- * `pipes` property must never be mistaken for an options object.
10
- *
11
- * @internal
12
- */
13
- export declare function isParameterDecoratorOptions(value: unknown): value is ParameterDecoratorOptions;
@@ -1,22 +0,0 @@
1
- import { isFunction } from './shared.utils.js';
2
- const isPipeLike = (value) => isFunction(value?.transform) ||
3
- (isFunction(value) &&
4
- value.prototype &&
5
- isFunction(value.prototype.transform));
6
- /**
7
- * Determines whether a parameter-decorator argument is a
8
- * `ParameterDecoratorOptions` object rather than a pipe (instance or class).
9
- *
10
- * Kept in one place so every decorator (`@Query`, `@Body`, `@Param`,
11
- * `@RawBody`, `@Payload`, `@MessageBody`, custom decorators, ...) classifies
12
- * arguments identically: a pipe instance that happens to expose a `schema` or
13
- * `pipes` property must never be mistaken for an options object.
14
- *
15
- * @internal
16
- */
17
- export function isParameterDecoratorOptions(value) {
18
- return (!!value &&
19
- typeof value === 'object' &&
20
- !isPipeLike(value) &&
21
- ('schema' in value || 'pipes' in value));
22
- }