mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-23 15:39:08 +00:00
Code artifact and Get Connectors Tags
This commit is contained in:
+5
-2
@@ -3,9 +3,12 @@ WORKDIR /packages
|
||||
ARG NPM_TOKEN
|
||||
COPY package.json .
|
||||
COPY package-lock.json .
|
||||
COPY .npmrc .
|
||||
|
||||
RUN apk update
|
||||
RUN apk add --no-cache aws-cli
|
||||
RUN aws codeartifact login --tool npm --repository dadosfera-npm --domain dadosfera --domain-owner 611330257153 --region us-east-1
|
||||
|
||||
RUN npm install
|
||||
RUN rm -f ./.npmrc
|
||||
|
||||
FROM node:14.15.4-alpine3.12
|
||||
WORKDIR /app
|
||||
|
||||
Generated
+36
-57
@@ -21,8 +21,6 @@
|
||||
"@nestjs/platform-express": "^8.4.7",
|
||||
"@nestjs/schedule": "^1.1.0",
|
||||
"@nestjs/swagger": "^5.2.1",
|
||||
"@victorradael/protospack": "2.5.0",
|
||||
"@victorradael/protospack-v2": "1.1.1",
|
||||
"axios": "^0.25.0",
|
||||
"cron-parser": "^4.4.0",
|
||||
"dotenv": "^14.3.2",
|
||||
@@ -35,6 +33,8 @@
|
||||
"passport-google-oauth20": "^2.0.0",
|
||||
"passport-hubspot-oauth2": "^1.0.3",
|
||||
"passport-mailchimp": "^1.1.0",
|
||||
"protospack": "2.5.2",
|
||||
"protospack-v2": "2.6.3",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rimraf": "^3.0.2",
|
||||
"rxjs": "^7.5.5",
|
||||
@@ -3364,23 +3364,6 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
}
|
||||
},
|
||||
"node_modules/@victorradael/protospack": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-2.5.0.tgz",
|
||||
"integrity": "sha512-DORlm3uHAYVH9dlcmwyOxjA4rk1UZWFyYUpD02k0bFfrH+uzSWe8qiPtTgZym9P8U9D8bXYRWeLlroasBj2Rdw==",
|
||||
"dependencies": {
|
||||
"rxjs": "^7.5.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@victorradael/protospack-v2": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@victorradael/protospack-v2/-/protospack-v2-1.1.1.tgz",
|
||||
"integrity": "sha512-K9SuHcCGa7wynbzTG1aVnODksajTKfr9+tDHw6qfFfPwBruJXv5HsbMMylizAg+HTgEr/D6h/L1PO05rygDJCw==",
|
||||
"dependencies": {
|
||||
"rxjs": "^7.5.5",
|
||||
"ts-proto": "^1.112.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/ast": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
|
||||
@@ -5747,20 +5730,6 @@
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
||||
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
@@ -8604,6 +8573,23 @@
|
||||
"pbts": "bin/pbts"
|
||||
}
|
||||
},
|
||||
"node_modules/protospack": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/protospack/-/protospack-2.5.2.tgz",
|
||||
"integrity": "sha512-t7NyWE4WDuAVixjL10SDUXHu8iW4H0azndTC3n/w335D/IodPgN47ebm3iMXbvoQTlQcCbjjc+HblaRa9oR8bA==",
|
||||
"dependencies": {
|
||||
"rxjs": "^7.5.5"
|
||||
}
|
||||
},
|
||||
"node_modules/protospack-v2": {
|
||||
"version": "2.6.3",
|
||||
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/protospack-v2/-/protospack-v2-2.6.3.tgz",
|
||||
"integrity": "sha512-9mIEON2bUAVKoIysODlmaJqEjBhpN/exUyTM9snZBqO4ajB2yLIyAv1MTRB8ZepH7k9ZHKx8afrTJoLadz20pQ==",
|
||||
"dependencies": {
|
||||
"rxjs": "^7.5.5",
|
||||
"ts-proto": "^1.112.2"
|
||||
}
|
||||
},
|
||||
"node_modules/proxy-addr": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
||||
@@ -13040,23 +13026,6 @@
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
}
|
||||
},
|
||||
"@victorradael/protospack": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@victorradael/protospack/-/protospack-2.5.0.tgz",
|
||||
"integrity": "sha512-DORlm3uHAYVH9dlcmwyOxjA4rk1UZWFyYUpD02k0bFfrH+uzSWe8qiPtTgZym9P8U9D8bXYRWeLlroasBj2Rdw==",
|
||||
"requires": {
|
||||
"rxjs": "^7.5.5"
|
||||
}
|
||||
},
|
||||
"@victorradael/protospack-v2": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@victorradael/protospack-v2/-/protospack-v2-1.1.1.tgz",
|
||||
"integrity": "sha512-K9SuHcCGa7wynbzTG1aVnODksajTKfr9+tDHw6qfFfPwBruJXv5HsbMMylizAg+HTgEr/D6h/L1PO05rygDJCw==",
|
||||
"requires": {
|
||||
"rxjs": "^7.5.5",
|
||||
"ts-proto": "^1.112.2"
|
||||
}
|
||||
},
|
||||
"@webassemblyjs/ast": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
|
||||
@@ -14894,13 +14863,6 @@
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
||||
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
@@ -17055,6 +17017,23 @@
|
||||
"long": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"protospack": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/protospack/-/protospack-2.5.2.tgz",
|
||||
"integrity": "sha512-t7NyWE4WDuAVixjL10SDUXHu8iW4H0azndTC3n/w335D/IodPgN47ebm3iMXbvoQTlQcCbjjc+HblaRa9oR8bA==",
|
||||
"requires": {
|
||||
"rxjs": "^7.5.5"
|
||||
}
|
||||
},
|
||||
"protospack-v2": {
|
||||
"version": "2.6.3",
|
||||
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com:443/npm/dadosfera-npm/protospack-v2/-/protospack-v2-2.6.3.tgz",
|
||||
"integrity": "sha512-9mIEON2bUAVKoIysODlmaJqEjBhpN/exUyTM9snZBqO4ajB2yLIyAv1MTRB8ZepH7k9ZHKx8afrTJoLadz20pQ==",
|
||||
"requires": {
|
||||
"rxjs": "^7.5.5",
|
||||
"ts-proto": "^1.112.2"
|
||||
}
|
||||
},
|
||||
"proxy-addr": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
||||
|
||||
+2
-2
@@ -36,8 +36,8 @@
|
||||
"@nestjs/platform-express": "^8.4.7",
|
||||
"@nestjs/schedule": "^1.1.0",
|
||||
"@nestjs/swagger": "^5.2.1",
|
||||
"@victorradael/protospack": "2.5.0",
|
||||
"@victorradael/protospack-v2": "1.1.1",
|
||||
"protospack": "2.5.2",
|
||||
"protospack-v2": "2.6.3",
|
||||
"axios": "^0.25.0",
|
||||
"cron-parser": "^4.4.0",
|
||||
"dotenv": "^14.3.2",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Logger, OnModuleInit, Inject } from '@nestjs/common';
|
||||
import { ClientGrpc } from '@nestjs/microservices';
|
||||
|
||||
import { ProtoServices } from '@victorradael/protospack-v2/dist/lib/Duc';
|
||||
import { AuthProtoService as AuthServiceInterface } from '@victorradael/protospack-v2/dist/lib/Duc/interfaces/write-service';
|
||||
import { ProtoServices } from 'protospack-v2/dist/lib/Duc';
|
||||
import { AuthProtoService as AuthServiceInterface } from 'protospack-v2/dist/lib/Duc/interfaces/write-service';
|
||||
import {
|
||||
AuthGetPublicKeysResponse,
|
||||
AuthSignInRequest,
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
AuthVerifyResetPasswordCodeResponse,
|
||||
AuthConfirmResetPasswordRequest,
|
||||
AuthConfirmResetPasswordResponse,
|
||||
} from '@victorradael/protospack-v2/dist/lib/Duc/interfaces/messages';
|
||||
} from 'protospack-v2/dist/lib/Duc/interfaces/messages';
|
||||
|
||||
import grpcHandler from '../../utils/grpcHandler';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { credentials } from '@grpc/grpc-js';
|
||||
import { ClientOptions, Transport } from '@nestjs/microservices';
|
||||
import { ConnectorManager } from '@victorradael/protospack-v2';
|
||||
import { ConnectorManager } from 'protospack-v2';
|
||||
|
||||
export class ConnectorClientConfiguration {
|
||||
config(): ClientOptions {
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
HttpStatus,
|
||||
} from '@nestjs/common';
|
||||
import { ClientGrpc } from '@nestjs/microservices';
|
||||
import { ConnectorManager } from '@victorradael/protospack-v2';
|
||||
import { ConnectorManager } from 'protospack-v2';
|
||||
import { from } from 'rxjs';
|
||||
|
||||
export class ConnectorClientService implements OnModuleInit {
|
||||
@@ -200,6 +200,33 @@ export class ConnectorClientService implements OnModuleInit {
|
||||
return result;
|
||||
}
|
||||
|
||||
async getConnectorsTags() {
|
||||
const observable = from(this.connectorServiceRead.GetConnectorsTags({}));
|
||||
const result = await new Promise((resolve, reject) => {
|
||||
observable.subscribe({
|
||||
next(x) {
|
||||
resolve(x);
|
||||
},
|
||||
error(err) {
|
||||
console.log('Observable Error');
|
||||
reject(err);
|
||||
},
|
||||
complete() {
|
||||
console.log('done');
|
||||
},
|
||||
});
|
||||
}).catch((err) => {
|
||||
throw new HttpException(
|
||||
err.details,
|
||||
err.code === 6 ? HttpStatus.CONFLICT : 400,
|
||||
);
|
||||
});
|
||||
|
||||
console.log('ConnectorClientService', 'getAllConnectors');
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
async deleteConnector(plugin: string, version: string) {
|
||||
const observable = from(
|
||||
this.connectorServiceWrite.DeleteConnector({
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import { credentials } from '@grpc/grpc-js';
|
||||
import { ClientOptions, Transport } from '@nestjs/microservices';
|
||||
import {
|
||||
ProtoPackages,
|
||||
ProtoPaths,
|
||||
} from '@victorradael/protospack-v2/dist/lib/Duc';
|
||||
import { ProtoPackages, ProtoPaths } from 'protospack-v2/dist/lib/Duc';
|
||||
|
||||
export class DucClient {
|
||||
config(): ClientOptions {
|
||||
@@ -12,9 +9,10 @@ export class DucClient {
|
||||
options: {
|
||||
url: process.env.DUC_URL,
|
||||
package: ProtoPackages.WritePackage,
|
||||
credentials: process.env.LOCAL_ENV
|
||||
? undefined
|
||||
: credentials.createSsl(),
|
||||
credentials:
|
||||
process.env.LOCAL_ENV === 'local'
|
||||
? undefined
|
||||
: credentials.createSsl(),
|
||||
protoPath: ProtoPaths.WriteFilePath,
|
||||
loader: {
|
||||
keepCase: true,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { credentials } from '@grpc/grpc-js';
|
||||
import { ClientOptions, Transport } from '@nestjs/microservices';
|
||||
|
||||
import { InputPackages, InputProtoFilePath } from '@victorradael/protospack';
|
||||
import { InputPackages, InputProtoFilePath } from 'protospack';
|
||||
|
||||
export class InputsClientConfiguration {
|
||||
config(): ClientOptions {
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
InputService,
|
||||
TestConnectionGetColumnsRequest,
|
||||
TestConnectionRequest,
|
||||
} from '@victorradael/protospack';
|
||||
} from 'protospack';
|
||||
import axios, { AxiosRequestConfig } from 'axios';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
import { InputModel } from 'src/modules/inputs/dtos/input.model';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OutputPackages, OutputProtoFilePath } from '@victorradael/protospack';
|
||||
import { OutputPackages, OutputProtoFilePath } from 'protospack';
|
||||
import { ClientOptions, Transport } from '@nestjs/microservices';
|
||||
import { credentials } from '@grpc/grpc-js';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ClientGrpc, Payload } from '@nestjs/microservices';
|
||||
import {
|
||||
OutputServicesNames,
|
||||
OutputsServiceInterface,
|
||||
} from '@victorradael/protospack';
|
||||
} from 'protospack';
|
||||
import {
|
||||
objectCamelToSnake,
|
||||
objectSnakeToCamel,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Logger, OnModuleInit, Inject } from '@nestjs/common';
|
||||
import { ClientGrpc } from '@nestjs/microservices';
|
||||
|
||||
import { ProtoServices } from '@victorradael/protospack-v2/dist/lib/Duc';
|
||||
import { PermissionsProtoService as PermissionsServiceInterface } from '@victorradael/protospack-v2/dist/lib/Duc/interfaces/write-service';
|
||||
import { ProtoServices } from 'protospack-v2/dist/lib/Duc';
|
||||
import { PermissionsProtoService as PermissionsServiceInterface } from 'protospack-v2/dist/lib/Duc/interfaces/write-service';
|
||||
import {
|
||||
Empty,
|
||||
InjectPermissionsRequest,
|
||||
} from '@victorradael/protospack-v2/dist/lib/Duc/interfaces/messages';
|
||||
} from 'protospack-v2/dist/lib/Duc/interfaces/messages';
|
||||
|
||||
import grpcHandler from '../../utils/grpcHandler';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ClientOptions, Transport } from '@nestjs/microservices';
|
||||
import {
|
||||
PipelinePackages,
|
||||
PipelineProtoFilePath,
|
||||
} from '@victorradael/protospack';
|
||||
} from 'protospack';
|
||||
import { credentials } from '@grpc/grpc-js';
|
||||
|
||||
export class PipelinesClientConfiguration {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { ClientGrpc, Payload } from '@nestjs/microservices';
|
||||
import {
|
||||
PipelineServicesNames,
|
||||
PipelinesServiceInterface,
|
||||
} from '@victorradael/protospack';
|
||||
} from 'protospack';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
import {
|
||||
objectCamelToSnake,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ClientOptions, Transport } from '@nestjs/microservices';
|
||||
import {
|
||||
TransformationPackages,
|
||||
TransformationProtoFilePath,
|
||||
} from '@victorradael/protospack';
|
||||
} from 'protospack';
|
||||
import { credentials } from '@grpc/grpc-js';
|
||||
|
||||
export class TransformationsClientConfiguration {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Controller, Inject, OnModuleInit, Post } from '@nestjs/common';
|
||||
import { ClientGrpc } from '@nestjs/microservices';
|
||||
import { TransformationsServiceInterface } from '@victorradael/protospack';
|
||||
import { TransformationsServiceInterface } from 'protospack';
|
||||
import {
|
||||
objectCamelToSnake,
|
||||
objectSnakeToCamel,
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
AuthEnableTotpMfaRequest,
|
||||
AuthDisableTotpMfaRequest,
|
||||
AuthVerifyTotpMfaRequest,
|
||||
} from '@victorradael/protospack-v2/dist/lib/Duc/interfaces/messages';
|
||||
} from 'protospack-v2/dist/lib/Duc/interfaces/messages';
|
||||
|
||||
import { AuthClientService } from '../../clients/auth/client.service';
|
||||
import { PermissionsClientService } from '../../clients/permissions/client.service';
|
||||
|
||||
@@ -78,6 +78,11 @@ export class ConnectorController {
|
||||
};
|
||||
}
|
||||
|
||||
@Get('/tags')
|
||||
async getConnectorsTags() {
|
||||
return await this.connectorClientService.getConnectorsTags();
|
||||
}
|
||||
|
||||
@Get('/:plugin')
|
||||
async getConnector(
|
||||
@Param('plugin') plugin: string,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Body, HttpException, HttpStatus, Injectable } from '@nestjs/common';
|
||||
import { Timeout } from '@nestjs/schedule';
|
||||
import { DecodeGrpcStruct } from '@victorradael/protospack';
|
||||
import { DecodeGrpcStruct } from 'protospack';
|
||||
import CronParser, { CronExpression } from 'cron-parser';
|
||||
import { InputsClientService } from 'src/clients/inputs/client.service';
|
||||
import { IIdRequest, Info } from 'src/clients/inputs/interfaces';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
|
||||
import { DecodeGrpcStruct } from '@victorradael/protospack';
|
||||
import { DecodeGrpcStruct } from 'protospack';
|
||||
import { PipelinesClientService } from 'src/clients/pipelines/client.service';
|
||||
import { IIdRequest, Info } from 'src/clients/pipelines/interfaces';
|
||||
import { objectCamelToSnake } from 'src/utils/CaseConverter';
|
||||
|
||||
Reference in New Issue
Block a user