@tmlmobilidade/databases 20260710.2205.51 → 20260710.2240.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clients/pcgi-raw.js +2 -2
- package/package.json +1 -1
package/dist/clients/pcgi-raw.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { Logger } from '@tmlmobilidade/logger';
|
|
3
|
-
import {
|
|
3
|
+
import { goSshTunnel } from '@tmlmobilidade/ssh';
|
|
4
4
|
import { MongoClient } from 'mongodb';
|
|
5
5
|
/* * */
|
|
6
6
|
export class PCGIRawClient {
|
|
@@ -105,7 +105,7 @@ export class PCGIRawClient {
|
|
|
105
105
|
}
|
|
106
106
|
//
|
|
107
107
|
// Setup SSH Tunnel
|
|
108
|
-
this.tunnel =
|
|
108
|
+
this.tunnel = goSshTunnel({ dstAddr: process.env.PCGI_RAW_HOST_1, dstPort: Number(process.env.PCGI_RAW_PORT_1) });
|
|
109
109
|
if (!this.tunnel) {
|
|
110
110
|
return `mongodb://${process.env.PCGI_RAW_USER}:${process.env.PCGI_RAW_PASSWORD}@${process.env.PCGI_RAW_HOST_1}:${process.env.PCGI_RAW_PORT_1},${process.env.PCGI_RAW_HOST_2}:${process.env.PCGI_RAW_PORT_2},${process.env.PCGI_RAW_HOST_3}:${process.env.PCGI_RAW_PORT_3}/`;
|
|
111
111
|
}
|