bellboy 8.3.0 → 8.4.0
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/lib/processors/firebird-processor.js +11 -13
- package/lib/types.d.ts +2 -0
- package/lib/utils.js +1 -1
- package/package.json +2 -1
|
@@ -48,12 +48,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
52
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
53
|
-
};
|
|
54
51
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
52
|
exports.FirebirdProcessor = void 0;
|
|
56
|
-
var node_firebird_1 = __importDefault(require("node-firebird"));
|
|
57
53
|
var stream_1 = require("stream");
|
|
58
54
|
var database_processor_1 = require("./base/database-processor");
|
|
59
55
|
var FirebirdProcessor = /** @class */ (function (_super) {
|
|
@@ -65,18 +61,20 @@ var FirebirdProcessor = /** @class */ (function (_super) {
|
|
|
65
61
|
}
|
|
66
62
|
FirebirdProcessor.prototype.process = function (processStream) {
|
|
67
63
|
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
-
var db, stream;
|
|
64
|
+
var Firebird, db, stream;
|
|
69
65
|
var _this = this;
|
|
70
66
|
return __generator(this, function (_a) {
|
|
71
67
|
switch (_a.label) {
|
|
72
|
-
case 0:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
case 0:
|
|
69
|
+
Firebird = this.connection.useClavizNodeFirebird ? require('claviz-node-firebird') : require('node-firebird');
|
|
70
|
+
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
|
71
|
+
Firebird.attach(_this.connection, function (err, db) {
|
|
72
|
+
if (err)
|
|
73
|
+
reject(err);
|
|
74
|
+
else
|
|
75
|
+
resolve(db);
|
|
76
|
+
});
|
|
77
|
+
})];
|
|
80
78
|
case 1:
|
|
81
79
|
db = _a.sent();
|
|
82
80
|
stream = new stream_1.Readable({
|
package/lib/types.d.ts
CHANGED
package/lib/utils.js
CHANGED
|
@@ -195,7 +195,7 @@ function getFirebirdDb(databaseConfig) {
|
|
|
195
195
|
return __generator(this, function (_a) {
|
|
196
196
|
switch (_a.label) {
|
|
197
197
|
case 0:
|
|
198
|
-
Firebird = require('node-firebird');
|
|
198
|
+
Firebird = databaseConfig.useClavizNodeFirebird ? require('claviz-node-firebird') : require('node-firebird');
|
|
199
199
|
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
|
200
200
|
Firebird.attach(databaseConfig, function (err, db) {
|
|
201
201
|
if (err)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bellboy",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.0",
|
|
4
4
|
"description": "Highly performant JavaScript data stream ETL engine.",
|
|
5
5
|
"main": "lib/index",
|
|
6
6
|
"types": "lib/index",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"async-mqtt": "^2.2.1",
|
|
55
55
|
"axios": "^0.21.1",
|
|
56
|
+
"claviz-node-firebird": "^2.0.1",
|
|
56
57
|
"csv": "^6.0.5",
|
|
57
58
|
"iconv-lite": "^0.6.3",
|
|
58
59
|
"mssql": "8.1.0",
|