Initial commit - Event Planner application
This commit is contained in:
4
node_modules/@nestjs/core/router/utils/exclude-route.util.d.ts
generated
vendored
Normal file
4
node_modules/@nestjs/core/router/utils/exclude-route.util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { RequestMethod } from '@nestjs/common';
|
||||
import { ExcludeRouteMetadata } from '../interfaces/exclude-route-metadata.interface';
|
||||
export declare const isRequestMethodAll: (method: RequestMethod) => boolean;
|
||||
export declare function isRouteExcluded(excludedRoutes: ExcludeRouteMetadata[], path: string, requestMethod?: RequestMethod): boolean;
|
||||
19
node_modules/@nestjs/core/router/utils/exclude-route.util.js
generated
vendored
Normal file
19
node_modules/@nestjs/core/router/utils/exclude-route.util.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isRequestMethodAll = void 0;
|
||||
exports.isRouteExcluded = isRouteExcluded;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
|
||||
const isRequestMethodAll = (method) => {
|
||||
return common_1.RequestMethod.ALL === method || method === -1;
|
||||
};
|
||||
exports.isRequestMethodAll = isRequestMethodAll;
|
||||
function isRouteExcluded(excludedRoutes, path, requestMethod) {
|
||||
return excludedRoutes.some(route => {
|
||||
if ((0, exports.isRequestMethodAll)(route.requestMethod) ||
|
||||
route.requestMethod === requestMethod) {
|
||||
return route.pathRegex.exec((0, shared_utils_1.addLeadingSlash)(path));
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
6
node_modules/@nestjs/core/router/utils/flatten-route-paths.util.d.ts
generated
vendored
Normal file
6
node_modules/@nestjs/core/router/utils/flatten-route-paths.util.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { Type } from '@nestjs/common';
|
||||
import { Routes } from '../interfaces/routes.interface';
|
||||
export declare function flattenRoutePaths(routes: Routes): {
|
||||
module: Type;
|
||||
path: string;
|
||||
}[];
|
||||
25
node_modules/@nestjs/core/router/utils/flatten-route-paths.util.js
generated
vendored
Normal file
25
node_modules/@nestjs/core/router/utils/flatten-route-paths.util.js
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.flattenRoutePaths = flattenRoutePaths;
|
||||
const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
|
||||
function flattenRoutePaths(routes) {
|
||||
const result = [];
|
||||
routes.forEach(item => {
|
||||
if (item.module && item.path) {
|
||||
result.push({ module: item.module, path: item.path });
|
||||
}
|
||||
if (item.children) {
|
||||
const childrenRef = item.children;
|
||||
childrenRef.forEach(child => {
|
||||
if (!(0, shared_utils_1.isString)(child) && (0, shared_utils_1.isString)(child.path)) {
|
||||
child.path = (0, shared_utils_1.normalizePath)((0, shared_utils_1.normalizePath)(item.path) + (0, shared_utils_1.normalizePath)(child.path));
|
||||
}
|
||||
else {
|
||||
result.push({ path: item.path, module: child });
|
||||
}
|
||||
});
|
||||
result.push(...flattenRoutePaths(childrenRef));
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
2
node_modules/@nestjs/core/router/utils/index.d.ts
generated
vendored
Normal file
2
node_modules/@nestjs/core/router/utils/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './exclude-route.util';
|
||||
export * from './flatten-route-paths.util';
|
||||
5
node_modules/@nestjs/core/router/utils/index.js
generated
vendored
Normal file
5
node_modules/@nestjs/core/router/utils/index.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./exclude-route.util"), exports);
|
||||
tslib_1.__exportStar(require("./flatten-route-paths.util"), exports);
|
||||
Reference in New Issue
Block a user