build: add TypeScript configuration and generate declaration files
- Add tsconfig.json for TypeScript compilation with declaration and source map generation - Generate .d.ts declaration files for all modules, services, controllers, and models - Update package.json with NestJS dependencies and TypeScript development tools - Include database files in the distribution output for persistence
This commit is contained in:
5
dist/common/middleware/locals.middleware.d.ts
vendored
Normal file
5
dist/common/middleware/locals.middleware.d.ts
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { NestMiddleware } from '@nestjs/common';
|
||||
import { Request, Response, NextFunction } from 'express';
|
||||
export declare class LocalsMiddleware implements NestMiddleware {
|
||||
use(req: Request, res: Response, next: NextFunction): void;
|
||||
}
|
||||
26
dist/common/middleware/locals.middleware.js
vendored
Normal file
26
dist/common/middleware/locals.middleware.js
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.LocalsMiddleware = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
let LocalsMiddleware = class LocalsMiddleware {
|
||||
use(req, res, next) {
|
||||
const reqAny = req;
|
||||
res.locals.current_user = reqAny.user;
|
||||
res.locals.success_msg = reqAny.flash('success_msg');
|
||||
res.locals.error_msg = reqAny.flash('error_msg');
|
||||
res.locals.error = reqAny.flash('error');
|
||||
res.locals.path = req.path;
|
||||
next();
|
||||
}
|
||||
};
|
||||
exports.LocalsMiddleware = LocalsMiddleware;
|
||||
exports.LocalsMiddleware = LocalsMiddleware = __decorate([
|
||||
(0, common_1.Injectable)()
|
||||
], LocalsMiddleware);
|
||||
//# sourceMappingURL=locals.middleware.js.map
|
||||
1
dist/common/middleware/locals.middleware.js.map
vendored
Normal file
1
dist/common/middleware/locals.middleware.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"locals.middleware.js","sourceRoot":"","sources":["../../../src/common/middleware/locals.middleware.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4D;AAIrD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,GAAG,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB;QACjD,MAAM,MAAM,GAAG,GAAU,CAAC;QAC1B,GAAG,CAAC,MAAM,CAAC,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC;QACtC,GAAG,CAAC,MAAM,CAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACrD,GAAG,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACjD,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACzC,GAAG,CAAC,MAAM,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QAC3B,IAAI,EAAE,CAAC;IACT,CAAC;CACF,CAAA;AAVY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;GACA,gBAAgB,CAU5B"}
|
||||
Reference in New Issue
Block a user