wip nest course

This commit is contained in:
lenovo
2022-11-19 19:31:44 +01:00
parent ffbb3bf442
commit f0af98eb02
33 changed files with 15169 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
import { AppService } from './app.service';
export declare class AppController {
private readonly appService;
constructor(appService: AppService);
getHello(): string;
}

View File

@@ -0,0 +1,34 @@
"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;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppController = void 0;
const common_1 = require("@nestjs/common");
const app_service_1 = require("./app.service");
let AppController = class AppController {
constructor(appService) {
this.appService = appService;
}
getHello() {
return this.appService.getHello();
}
};
__decorate([
(0, common_1.Get)(),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", String)
], AppController.prototype, "getHello", null);
AppController = __decorate([
(0, common_1.Controller)(),
__metadata("design:paramtypes", [app_service_1.AppService])
], AppController);
exports.AppController = AppController;
//# sourceMappingURL=app.controller.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,+CAA2C;AAGpC,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAGvD,QAAQ;QACN,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;CACF,CAAA;AAJC;IAAC,IAAA,YAAG,GAAE;;;;6CAGL;AANU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAE8B,wBAAU;GADxC,aAAa,CAOzB;AAPY,sCAAa"}

View File

@@ -0,0 +1,2 @@
export declare class AppModule {
}

24
tests_hugo/nest_app/dist/app.module.js vendored Normal file
View 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.AppModule = void 0;
const common_1 = require("@nestjs/common");
const app_controller_1 = require("./app.controller");
const app_service_1 = require("./app.service");
const coffees_controller_1 = require("./coffees/coffees.controller");
let AppModule = class AppModule {
};
AppModule = __decorate([
(0, common_1.Module)({
imports: [],
controllers: [app_controller_1.AppController, coffees_controller_1.CoffeesController],
providers: [app_service_1.AppService],
})
], AppModule);
exports.AppModule = AppModule;
//# sourceMappingURL=app.module.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+CAA2C;AAC3C,qEAAiE;AAO1D,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,SAAS;IALrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,CAAC,8BAAa,EAAE,sCAAiB,CAAC;QAC/C,SAAS,EAAE,CAAC,wBAAU,CAAC;KACxB,CAAC;GACW,SAAS,CAAG;AAAZ,8BAAS"}

View File

@@ -0,0 +1,3 @@
export declare class AppService {
getHello(): string;
}

20
tests_hugo/nest_app/dist/app.service.js vendored Normal file
View File

@@ -0,0 +1,20 @@
"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.AppService = void 0;
const common_1 = require("@nestjs/common");
let AppService = class AppService {
getHello() {
return 'Hello nest!';
}
};
AppService = __decorate([
(0, common_1.Injectable)()
], AppService);
exports.AppService = AppService;
//# sourceMappingURL=app.service.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"app.service.js","sourceRoot":"","sources":["../src/app.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,QAAQ;QACN,OAAO,aAAa,CAAC;IACvB,CAAC;CACF,CAAA;AAJY,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CAItB;AAJY,gCAAU"}

View File

@@ -0,0 +1,8 @@
export declare class CoffeesController {
findAll(paginationQuery: any): string;
findFlavors(): string;
findOne(id: string): string;
create(body: any): any;
update(id: string, body: any): string;
remove(id: string): string;
}

View File

@@ -0,0 +1,88 @@
"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;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CoffeesController = void 0;
const common_1 = require("@nestjs/common");
let CoffeesController = class CoffeesController {
findAll(paginationQuery) {
const { limit, offset } = paginationQuery;
return `this action returns all the coffees.
limit: ${limit},
offset: ${offset}
`;
}
findFlavors() {
return 'this action returns the coffees flavors';
}
findOne(id) {
return `this action returns #${id} coffees`;
}
create(body) {
return body;
}
update(id, body) {
return `this action updates #${id} coffee`;
}
remove(id) {
return `this action removes #${id} coffee`;
}
};
__decorate([
(0, common_1.Get)(),
__param(0, (0, common_1.Query)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], CoffeesController.prototype, "findAll", null);
__decorate([
(0, common_1.Get)('flavors'),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], CoffeesController.prototype, "findFlavors", null);
__decorate([
(0, common_1.Get)(':id'),
__param(0, (0, common_1.Param)('id')),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", void 0)
], CoffeesController.prototype, "findOne", null);
__decorate([
(0, common_1.Post)(),
(0, common_1.HttpCode)(common_1.HttpStatus.GONE),
__param(0, (0, common_1.Body)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", void 0)
], CoffeesController.prototype, "create", null);
__decorate([
(0, common_1.Patch)(':id'),
__param(0, (0, common_1.Param)('id')),
__param(1, (0, common_1.Body)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String, Object]),
__metadata("design:returntype", void 0)
], CoffeesController.prototype, "update", null);
__decorate([
(0, common_1.Delete)(':id'),
__param(0, (0, common_1.Param)('id')),
__metadata("design:type", Function),
__metadata("design:paramtypes", [String]),
__metadata("design:returntype", void 0)
], CoffeesController.prototype, "remove", null);
CoffeesController = __decorate([
(0, common_1.Controller)('coffees')
], CoffeesController);
exports.CoffeesController = CoffeesController;
//# sourceMappingURL=coffees.controller.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"coffees.controller.js","sourceRoot":"","sources":["../../src/coffees/coffees.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAWwB;AAGjB,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAG7B,OAAO,CAAU,eAAe;QAC/B,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,eAAe,CAAC;QAC1C,OAAO;aACI,KAAK;cACJ,MAAM;GACjB,CAAC;IACH,CAAC;IAGD,WAAW;QACV,OAAO,yCAAyC,CAAC;IAClD,CAAC;IAGD,OAAO,CAAc,EAAU;QAC9B,OAAO,wBAAwB,EAAE,UAAU,CAAC;IAC7C,CAAC;IAID,MAAM,CAAS,IAAI;QAClB,OAAO,IAAI,CAAC;IACb,CAAC;IAGD,MAAM,CAAc,EAAU,EAAU,IAAI;QAC3C,OAAO,wBAAwB,EAAE,SAAS,CAAC;IAC5C,CAAC;IAGD,MAAM,CAAc,EAAU;QAC7B,OAAO,wBAAwB,EAAE,SAAS,CAAC;IAC5C,CAAC;CACD,CAAA;AAlCA;IAAC,IAAA,YAAG,GAAE;IACG,WAAA,IAAA,cAAK,GAAE,CAAA;;;;gDAMf;AAED;IAAC,IAAA,YAAG,EAAC,SAAS,CAAC;;;;oDAGd;AAED;IAAC,IAAA,YAAG,EAAC,KAAK,CAAC;IACF,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;gDAEnB;AAED;IAAC,IAAA,aAAI,GAAE;IACN,IAAA,iBAAQ,EAAC,mBAAU,CAAC,IAAI,CAAC;IAClB,WAAA,IAAA,aAAI,GAAE,CAAA;;;;+CAEb;AAED;IAAC,IAAA,cAAK,EAAC,KAAK,CAAC;IACL,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IAAc,WAAA,IAAA,aAAI,GAAE,CAAA;;;;+CAEtC;AAED;IAAC,IAAA,eAAM,EAAC,KAAK,CAAC;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;;;;+CAElB;AAnCW,iBAAiB;IAD7B,IAAA,mBAAU,EAAC,SAAS,CAAC;GACT,iBAAiB,CAoC7B;AApCY,8CAAiB"}

1
tests_hugo/nest_app/dist/main.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export {};

10
tests_hugo/nest_app/dist/main.js vendored Normal file
View File

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@nestjs/core");
const app_module_1 = require("./app.module");
async function bootstrap() {
const app = await core_1.NestFactory.create(app_module_1.AppModule);
await app.listen(3000);
}
bootstrap();
//# sourceMappingURL=main.js.map

1
tests_hugo/nest_app/dist/main.js.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAC3C,6CAAyC;AAEzC,KAAK,UAAU,SAAS;IACtB,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAC,sBAAS,CAAC,CAAC;IAChD,MAAM,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AACD,SAAS,EAAE,CAAC"}

File diff suppressed because one or more lines are too long