@dbcube/core 1.0.61 → 1.0.62
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/index.cjs +2 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +2 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -12,16 +12,14 @@ declare class Engine {
|
|
|
12
12
|
private arguments;
|
|
13
13
|
private binary;
|
|
14
14
|
private timeout;
|
|
15
|
-
private static instances;
|
|
16
15
|
constructor(name: string, timeout?: number);
|
|
17
|
-
static getInstance(name: string, timeout?: number): Engine;
|
|
18
16
|
initializeBinary(): Promise<void>;
|
|
19
17
|
setArguments(): any[];
|
|
20
18
|
setConfig(name: string): {
|
|
21
19
|
[x: string]: any;
|
|
22
20
|
} | null;
|
|
23
21
|
getConfig(): any;
|
|
24
|
-
run(binary: string, args:
|
|
22
|
+
run(binary: string, args: []): Promise<ResponseEngine>;
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
interface SystemInfo {
|
package/dist/index.d.ts
CHANGED
|
@@ -12,16 +12,14 @@ declare class Engine {
|
|
|
12
12
|
private arguments;
|
|
13
13
|
private binary;
|
|
14
14
|
private timeout;
|
|
15
|
-
private static instances;
|
|
16
15
|
constructor(name: string, timeout?: number);
|
|
17
|
-
static getInstance(name: string, timeout?: number): Engine;
|
|
18
16
|
initializeBinary(): Promise<void>;
|
|
19
17
|
setArguments(): any[];
|
|
20
18
|
setConfig(name: string): {
|
|
21
19
|
[x: string]: any;
|
|
22
20
|
} | null;
|
|
23
21
|
getConfig(): any;
|
|
24
|
-
run(binary: string, args:
|
|
22
|
+
run(binary: string, args: []): Promise<ResponseEngine>;
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
interface SystemInfo {
|
package/dist/index.js
CHANGED
|
@@ -550,28 +550,17 @@ var Config = class {
|
|
|
550
550
|
// src/lib/Engine.ts
|
|
551
551
|
import { spawn } from "child_process";
|
|
552
552
|
import { createRequire } from "module";
|
|
553
|
-
var Engine = class
|
|
553
|
+
var Engine = class {
|
|
554
554
|
name;
|
|
555
555
|
config;
|
|
556
556
|
arguments;
|
|
557
557
|
binary = null;
|
|
558
558
|
timeout;
|
|
559
|
-
static instances = /* @__PURE__ */ new Map();
|
|
560
559
|
constructor(name, timeout = 3e4) {
|
|
561
|
-
if (_Engine.instances.has(name)) {
|
|
562
|
-
return _Engine.instances.get(name);
|
|
563
|
-
}
|
|
564
560
|
this.name = name;
|
|
565
|
-
this.timeout = timeout;
|
|
566
561
|
this.config = this.setConfig(name);
|
|
567
562
|
this.arguments = this.setArguments();
|
|
568
|
-
|
|
569
|
-
}
|
|
570
|
-
static getInstance(name, timeout = 3e4) {
|
|
571
|
-
if (_Engine.instances.has(name)) {
|
|
572
|
-
return _Engine.instances.get(name);
|
|
573
|
-
}
|
|
574
|
-
return new _Engine(name, timeout);
|
|
563
|
+
this.timeout = timeout;
|
|
575
564
|
}
|
|
576
565
|
async initializeBinary() {
|
|
577
566
|
if (!this.binary) {
|
|
@@ -664,7 +653,6 @@ var Engine = class _Engine {
|
|
|
664
653
|
};
|
|
665
654
|
child.stdout.on("data", (data) => {
|
|
666
655
|
stdoutBuffer += data.toString();
|
|
667
|
-
console.log(stdoutBuffer);
|
|
668
656
|
const match = stdoutBuffer.match(/PROCESS_RESPONSE:(\{.*\})/);
|
|
669
657
|
if (match) {
|
|
670
658
|
try {
|
|
@@ -685,7 +673,6 @@ var Engine = class _Engine {
|
|
|
685
673
|
});
|
|
686
674
|
child.stderr.on("data", (data) => {
|
|
687
675
|
stderrBuffer += data.toString();
|
|
688
|
-
console.log(stderrBuffer);
|
|
689
676
|
const match = stderrBuffer.match(/PROCESS_RESPONSE:(\{.*\})/);
|
|
690
677
|
if (match) {
|
|
691
678
|
try {
|