node-firebird-native-api 3.1.2 → 3.1.3
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/README.md +1 -1
- package/dist/generate-files/index.js +2 -1
- package/dist/generate-files/index.js.map +1 -1
- package/dist/generate-files/patch.js +30 -92
- package/dist/generate-files/patch.js.map +1 -1
- package/dist/lib/cloop-gen.js +8 -4
- package/dist/lib/cloop-gen.js.map +1 -1
- package/dist/lib/index.js +1 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/test/test.js +12 -16
- package/dist/test/test.js.map +1 -1
- package/package.json +8 -7
- package/src/generate-files/firebird.cloop.json +10436 -7796
- package/src/generate-files/index.ts +5 -5
- package/src/generate-files/patch.ts +148 -221
- package/src/lib/cloop-gen.ts +1494 -925
- package/src/lib/index.ts +13 -13
- package/src/test/test.ts +537 -542
- package/tsconfig.json +7 -13
- package/tslint.json +0 -6
package/src/lib/index.ts
CHANGED
|
@@ -2,29 +2,29 @@ import { Attachment, EventCallback, Master } from './cloop-gen';
|
|
|
2
2
|
|
|
3
3
|
import * as os from 'os';
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
/** Gets the default platform Firebird client library filename. */
|
|
7
6
|
export function getDefaultLibraryFilename(): string {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
switch (os.platform()) {
|
|
8
|
+
case 'win32':
|
|
9
|
+
return 'fbclient.dll';
|
|
10
|
+
case 'darwin':
|
|
11
|
+
return '/Library/Frameworks/Firebird.framework/Libraries/libfbclient.dylib';
|
|
12
|
+
default:
|
|
13
|
+
return 'libfbclient.so';
|
|
14
|
+
}
|
|
16
15
|
}
|
|
17
16
|
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
18
18
|
const native = require('bindings')('addon');
|
|
19
19
|
|
|
20
20
|
export const getMaster: (library: string) => Master = native.getMaster;
|
|
21
21
|
export const disposeMaster: (master: Master) => boolean = native.disposeMaster;
|
|
22
22
|
|
|
23
23
|
export const queueEvent: (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
client: Master,
|
|
25
|
+
attachment: Attachment,
|
|
26
|
+
names: string[],
|
|
27
|
+
callBack: (counters: [string, number][]) => Promise<void>,
|
|
28
28
|
) => Promise<EventCallback> = native.queueEvent;
|
|
29
29
|
|
|
30
30
|
export const cancelEvent: (eventCallback: EventCallback) => Promise<void> = native.cancelEvent;
|