{"version":3,"sources":["jsdelivr-header.js","/npm/rewards@1.1.1/dist/main.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,MAAM,SAAW,QAAQ,kBACnB,OAAS,QAAQ,gBACjB,gBAAkB,QAAQ,yBAC1B,mBAAqB,QAAQ,4BAC7B,UAAY,QAAQ,mBACpB,OAAS,QAAQ,UACjB,OAAS,QAAQ,QACjB,aAAe,QAAQ,gBACvB,4BAA8B,QAAQ,uCACtC,QAAU,QAAQ,WAExB,SAAS,sBACL,MAA6B,gBAAzB,QAAQ,IAAI,SACL,6CACJ,oBAAoB,QAAQ,IAAI,MAAQ,KACnD,CACA,eAAe,YACX,MAAM,QAAY,OAAO,YAAY,OAAO,aAAa,UAAW,IAAI,mBAAmB,gBAC3F,EAAI,oBAAoB,CACpB,UAAW,gBAAgB,UAAU,KACrC,QAAS,CACL,QAAS,UACT,UAAW,OAAO,KAAK,UAAW,cAClC,IAAK,QAAQ,IAAI,WAAa,yBAGhC,EAAI,6BACV,MAAM,GAAU,IAAI,UAAU,iBACzB,SAAS,WACT,eAAe,+DACf,WAAW,OACX,OAAO,WACP,cAAc,CAAE,KAAM,OAAQ,OAAQ,SAAU,aAAc,QAC9D,UAAU,uBACV,QACC,EAAW,UAAU,cAAc,eAAe,EAAK,GAC7D,UAAU,cAAc,MAAM,MAAO,EAAK,GAC1C,EAAI,eAAe,IAAI,SAAS,eAAe,CAC3C,WAAW,KAEf,EAAI,sBAAsB,IAAI,4BAA4B,yBAAyB,IAAI,QAAQ,CAC3F,YAAa,QAAQ,IAAI,cACzB,iBAAiB,EACjB,4BAA4B,MAEhC,EAAI,aACJ,MAAM,EAAO,OAAO,QAAQ,IAAI,OAAS,UACnC,EAAI,OAAO,EACrB,CAtCA,OAAO,SAuCP","file":"/npm/rewards@1.1.1/dist/main.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/rewards@1.1.1/dist/main.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst common_1 = require(\"@nestjs/common\");\nconst core_1 = require(\"@nestjs/core\");\nconst microservices_1 = require(\"@nestjs/microservices\");\nconst platform_fastify_1 = require(\"@nestjs/platform-fastify\");\nconst swagger_1 = require(\"@nestjs/swagger\");\nconst dotenv = require(\"dotenv\");\nconst path_1 = require(\"path\");\nconst app_module_1 = require(\"./app.module\");\nconst errorTracking_interceptor_1 = require(\"./filters/errorTracking.interceptor\");\nconst Rollbar = require(\"rollbar\");\ndotenv.config();\nfunction getSwaggerServerUrl() {\n    if (process.env.NODE_ENV === 'development')\n        return 'https://cpdev.clubpetro.com/api/v2/rewards';\n    return `http://localhost:${process.env.PORT || 3000}`;\n}\nasync function bootstrap() {\n    const app = await core_1.NestFactory.create(app_module_1.AppModule, new platform_fastify_1.FastifyAdapter());\n    app.connectMicroservice({\n        transport: microservices_1.Transport.GRPC,\n        options: {\n            package: 'rewards',\n            protoPath: path_1.join(__dirname, 'main.proto'),\n            url: process.env.GRPC_HOST || '0.0.0.0:50051',\n        },\n    });\n    await app.startAllMicroservicesAsync();\n    const options = new swagger_1.DocumentBuilder()\n        .setTitle('Rewards')\n        .setDescription('Serviço responsável por controlar os resgates na plataforma')\n        .setVersion('1.0')\n        .addTag('Rewards')\n        .addBearerAuth({ type: 'http', scheme: 'bearer', bearerFormat: 'JWT' })\n        .addServer(getSwaggerServerUrl())\n        .build();\n    const document = swagger_1.SwaggerModule.createDocument(app, options);\n    swagger_1.SwaggerModule.setup('api', app, document);\n    app.useGlobalPipes(new common_1.ValidationPipe({\n        transform: true,\n    }));\n    app.useGlobalInterceptors(new errorTracking_interceptor_1.ErrorTrackingInterceptor(new Rollbar({\n        accessToken: process.env.ROLLBAR_TOKEN,\n        captureUncaught: true,\n        captureUnhandledRejections: true,\n    })));\n    app.enableCors();\n    const PORT = Number(process.env.PORT) || 3000;\n    await app.listen(PORT);\n}\nbootstrap();\n"]}