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:
4
dist/auth/guards/authenticated.guard.d.ts
vendored
Normal file
4
dist/auth/guards/authenticated.guard.d.ts
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { CanActivate, ExecutionContext } from '@nestjs/common';
|
||||
export declare class AuthenticatedGuard implements CanActivate {
|
||||
canActivate(context: ExecutionContext): Promise<any>;
|
||||
}
|
||||
21
dist/auth/guards/authenticated.guard.js
vendored
Normal file
21
dist/auth/guards/authenticated.guard.js
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
"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.AuthenticatedGuard = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
let AuthenticatedGuard = class AuthenticatedGuard {
|
||||
async canActivate(context) {
|
||||
const request = context.switchToHttp().getRequest();
|
||||
return request.isAuthenticated();
|
||||
}
|
||||
};
|
||||
exports.AuthenticatedGuard = AuthenticatedGuard;
|
||||
exports.AuthenticatedGuard = AuthenticatedGuard = __decorate([
|
||||
(0, common_1.Injectable)()
|
||||
], AuthenticatedGuard);
|
||||
//# sourceMappingURL=authenticated.guard.js.map
|
||||
1
dist/auth/guards/authenticated.guard.js.map
vendored
Normal file
1
dist/auth/guards/authenticated.guard.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"authenticated.guard.js","sourceRoot":"","sources":["../../../src/auth/guards/authenticated.guard.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA2E;AAGpE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,KAAK,CAAC,WAAW,CAAC,OAAyB;QACzC,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;QACpD,OAAO,OAAO,CAAC,eAAe,EAAE,CAAC;IACnC,CAAC;CACF,CAAA;AALY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;GACA,kBAAkB,CAK9B"}
|
||||
6
dist/auth/guards/local-auth.guard.d.ts
vendored
Normal file
6
dist/auth/guards/local-auth.guard.d.ts
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { ExecutionContext } from '@nestjs/common';
|
||||
declare const LocalAuthGuard_base: import("@nestjs/passport").Type<import("@nestjs/passport").IAuthGuard>;
|
||||
export declare class LocalAuthGuard extends LocalAuthGuard_base {
|
||||
canActivate(context: ExecutionContext): Promise<boolean>;
|
||||
}
|
||||
export {};
|
||||
24
dist/auth/guards/local-auth.guard.js
vendored
Normal file
24
dist/auth/guards/local-auth.guard.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"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.LocalAuthGuard = void 0;
|
||||
const common_1 = require("@nestjs/common");
|
||||
const passport_1 = require("@nestjs/passport");
|
||||
let LocalAuthGuard = class LocalAuthGuard extends (0, passport_1.AuthGuard)('local') {
|
||||
async canActivate(context) {
|
||||
const result = (await super.canActivate(context));
|
||||
const request = context.switchToHttp().getRequest();
|
||||
await super.logIn(request);
|
||||
return result;
|
||||
}
|
||||
};
|
||||
exports.LocalAuthGuard = LocalAuthGuard;
|
||||
exports.LocalAuthGuard = LocalAuthGuard = __decorate([
|
||||
(0, common_1.Injectable)()
|
||||
], LocalAuthGuard);
|
||||
//# sourceMappingURL=local-auth.guard.js.map
|
||||
1
dist/auth/guards/local-auth.guard.js.map
vendored
Normal file
1
dist/auth/guards/local-auth.guard.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"local-auth.guard.js","sourceRoot":"","sources":["../../../src/auth/guards/local-auth.guard.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA8D;AAC9D,+CAA6C;AAGtC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,IAAA,oBAAS,EAAC,OAAO,CAAC;IACpD,KAAK,CAAC,WAAW,CAAC,OAAyB;QACzC,MAAM,MAAM,GAAG,CAAC,MAAM,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAY,CAAC;QAC7D,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,CAAC;QACpD,MAAM,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3B,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AAPY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;GACA,cAAc,CAO1B"}
|
||||
Reference in New Issue
Block a user