node-firebird 1.1.3 → 1.1.5
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/.github/workflows/codeql.yml +76 -0
- package/.github/workflows/node.js.yml +17 -55
- package/README.md +4 -4
- package/lib/index.d.ts +2 -2
- package/lib/index.js +6 -6
- package/package.json +2 -2
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
+
# to commit it to your repository.
|
|
3
|
+
#
|
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
+
# or to provide custom queries or build logic.
|
|
6
|
+
#
|
|
7
|
+
# ******** NOTE ********
|
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
+
# supported CodeQL languages.
|
|
11
|
+
#
|
|
12
|
+
name: "CodeQL"
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches: [ "master" ]
|
|
17
|
+
pull_request:
|
|
18
|
+
# The branches below must be a subset of the branches above
|
|
19
|
+
branches: [ "master" ]
|
|
20
|
+
schedule:
|
|
21
|
+
- cron: '26 2 * * 3'
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
analyze:
|
|
25
|
+
name: Analyze
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
permissions:
|
|
28
|
+
actions: read
|
|
29
|
+
contents: read
|
|
30
|
+
security-events: write
|
|
31
|
+
|
|
32
|
+
strategy:
|
|
33
|
+
fail-fast: false
|
|
34
|
+
matrix:
|
|
35
|
+
language: [ 'javascript' ]
|
|
36
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
37
|
+
# Use only 'java' to analyze code written in Java, Kotlin or both
|
|
38
|
+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
|
39
|
+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
|
40
|
+
|
|
41
|
+
steps:
|
|
42
|
+
- name: Checkout repository
|
|
43
|
+
uses: actions/checkout@v3
|
|
44
|
+
|
|
45
|
+
# Initializes the CodeQL tools for scanning.
|
|
46
|
+
- name: Initialize CodeQL
|
|
47
|
+
uses: github/codeql-action/init@v2
|
|
48
|
+
with:
|
|
49
|
+
languages: ${{ matrix.language }}
|
|
50
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
51
|
+
# By default, queries listed here will override any specified in a config file.
|
|
52
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
53
|
+
|
|
54
|
+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
55
|
+
# queries: security-extended,security-and-quality
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
|
59
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
|
60
|
+
- name: Autobuild
|
|
61
|
+
uses: github/codeql-action/autobuild@v2
|
|
62
|
+
|
|
63
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
64
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
65
|
+
|
|
66
|
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
|
67
|
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
|
68
|
+
|
|
69
|
+
# - run: |
|
|
70
|
+
# echo "Run, Build Application using script"
|
|
71
|
+
# ./location_of_script_within_repo/buildscript.sh
|
|
72
|
+
|
|
73
|
+
- name: Perform CodeQL Analysis
|
|
74
|
+
uses: github/codeql-action/analyze@v2
|
|
75
|
+
with:
|
|
76
|
+
category: "/language:${{matrix.language}}"
|
|
@@ -4,75 +4,37 @@ on: [push, pull_request]
|
|
|
4
4
|
|
|
5
5
|
jobs:
|
|
6
6
|
build:
|
|
7
|
-
runs-on:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
8
|
|
|
9
9
|
strategy:
|
|
10
|
-
matrix:
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
matrix:
|
|
11
|
+
node: [14, 16]
|
|
12
|
+
firebird-version: ['v3']
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v3
|
|
16
16
|
with:
|
|
17
17
|
fetch-depth: 10
|
|
18
18
|
|
|
19
|
-
- name:
|
|
20
|
-
uses:
|
|
19
|
+
- name: Setup FirebirdSQL container
|
|
20
|
+
uses: juarezr/firebirdsql-github-action@v1.2.0
|
|
21
21
|
with:
|
|
22
|
-
|
|
22
|
+
version: ${{ matrix.firebird-version }}
|
|
23
|
+
isc_password: "masterkey"
|
|
24
|
+
enable_legacy_client_auth: "true"
|
|
23
25
|
|
|
24
|
-
- name:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
then
|
|
29
|
-
sudo apt-get install libtommath0
|
|
30
|
-
else
|
|
31
|
-
sudo apt-get install libtommath1
|
|
32
|
-
sudo ln -s /usr/lib/x86_64-linux-gnu/libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0
|
|
33
|
-
fi
|
|
34
|
-
wget -nv -O Firebird-3.0.7.33374-0.amd64.tar.gz "https://github.com/FirebirdSQL/firebird/releases/download/R3_0_7/Firebird-3.0.7.33374-0.amd64.tar.gz"
|
|
35
|
-
tar xzvf Firebird-3.0.7.33374-0.amd64.tar.gz
|
|
36
|
-
(cd Firebird-3.0.7.33374-0.amd64; sudo ./install.sh -silent)
|
|
37
|
-
sudo usermod -a -G firebird `whoami`
|
|
26
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
27
|
+
uses: actions/setup-node@v3
|
|
28
|
+
with:
|
|
29
|
+
node-version: ${{ matrix.node }}
|
|
38
30
|
|
|
39
|
-
- name: Firebird install (MacOS)
|
|
40
|
-
if: matrix.os == 'macos-10.15'
|
|
41
|
-
run: |
|
|
42
|
-
wget -nv -O Firebird-3.0.7-33374-x86_64.pkg "https://github.com/FirebirdSQL/firebird/releases/download/R3_0_7/Firebird-3.0.7-33374-x86_64.pkg"
|
|
43
|
-
sudo installer -verbose -pkg "Firebird-3.0.7-33374-x86_64.pkg" -target /
|
|
44
|
-
|
|
45
|
-
- name: Firebird install (Windows)
|
|
46
|
-
if: matrix.os == 'windows-2019'
|
|
47
|
-
shell: cmd
|
|
48
|
-
run: |
|
|
49
|
-
set FB_ZIP=Firebird-3.0.7.33374-1_x64.zip
|
|
50
|
-
powershell Invoke-WebRequest "https://github.com/FirebirdSQL/firebird/releases/download/R3_0_7/$env:FB_ZIP" -OutFile "$env:FB_ZIP"
|
|
51
|
-
7z x -oC:\Firebird %FB_ZIP%
|
|
52
31
|
|
|
53
32
|
- name: Build
|
|
54
33
|
shell: bash
|
|
55
34
|
run: |
|
|
56
35
|
npm ci
|
|
57
36
|
|
|
58
|
-
- name: Test (Linux)
|
|
59
|
-
if: matrix.os == 'ubuntu-16.04' || matrix.os == 'ubuntu-18.04'
|
|
60
|
-
run: |
|
|
61
|
-
sg firebird -c "npx nyc npm test"
|
|
62
|
-
|
|
63
|
-
- name: Test (MacOS)
|
|
64
|
-
if: matrix.os == 'macos-10.15'
|
|
65
|
-
run: |
|
|
66
|
-
sudo mkdir `pwd`/tmp-node-fb
|
|
67
|
-
sudo chmod 777 `pwd`/tmp-node-fb
|
|
68
|
-
export ISC_USER=sysdba
|
|
69
|
-
export ISC_PASSWORD=masterkey
|
|
70
|
-
export NODE_FB_TEST_TMP_DIR=`pwd`/tmp-node-fb
|
|
71
|
-
npx nyc npm test
|
|
72
|
-
|
|
73
|
-
- name: Test (Windows)
|
|
74
|
-
if: matrix.os == 'windows-2019'
|
|
75
|
-
shell: cmd
|
|
37
|
+
- name: Test (Linux)
|
|
76
38
|
run: |
|
|
77
|
-
|
|
78
|
-
|
|
39
|
+
export FIREBIRD_DATA=/firebird/data
|
|
40
|
+
npx nyc npm test
|
package/README.md
CHANGED
|
@@ -230,7 +230,7 @@ Firebird.attach(options, (err, db) => {
|
|
|
230
230
|
if (err)
|
|
231
231
|
throw err;
|
|
232
232
|
|
|
233
|
-
db.transaction(Firebird.
|
|
233
|
+
db.transaction(Firebird.ISOLATION_READ_COMMITTED, (err, transaction) => {
|
|
234
234
|
if (err) {
|
|
235
235
|
throw err;
|
|
236
236
|
}
|
|
@@ -318,10 +318,10 @@ Firebird.attach(options, function(err, db) {
|
|
|
318
318
|
__Transaction types:__
|
|
319
319
|
|
|
320
320
|
- `Firebird.ISOLATION_READ_UNCOMMITTED`
|
|
321
|
-
- `Firebird.
|
|
321
|
+
- `Firebird.ISOLATION_READ_COMMITTED`
|
|
322
322
|
- `Firebird.ISOLATION_REPEATABLE_READ`
|
|
323
323
|
- `Firebird.ISOLATION_SERIALIZABLE`
|
|
324
|
-
- `Firebird.
|
|
324
|
+
- `Firebird.ISOLATION_READ_COMMITTED_READ_ONLY`
|
|
325
325
|
|
|
326
326
|
```js
|
|
327
327
|
Firebird.attach(options, function(err, db) {
|
|
@@ -330,7 +330,7 @@ Firebird.attach(options, function(err, db) {
|
|
|
330
330
|
throw err;
|
|
331
331
|
|
|
332
332
|
// db = DATABASE
|
|
333
|
-
db.transaction(Firebird.
|
|
333
|
+
db.transaction(Firebird.ISOLATION_READ_COMMITTED, function(err, transaction) {
|
|
334
334
|
transaction.query('INSERT INTO users VALUE(?,?)', [1, 'Janko'], function(err, result) {
|
|
335
335
|
|
|
336
336
|
if (err) {
|
package/lib/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare module 'node-firebird' {
|
|
|
19
19
|
/** A transaction sees changes done by uncommitted transactions. */
|
|
20
20
|
export const ISOLATION_READ_UNCOMMITTED: number[];
|
|
21
21
|
/** A transaction sees only data committed before the statement has been executed. */
|
|
22
|
-
export const
|
|
22
|
+
export const ISOLATION_READ_COMMITTED: number[];
|
|
23
23
|
/** A transaction sees during its lifetime only data committed before the transaction has been started. */
|
|
24
24
|
export const ISOLATION_REPEATABLE_READ: number[];
|
|
25
25
|
/**
|
|
@@ -27,7 +27,7 @@ declare module 'node-firebird' {
|
|
|
27
27
|
* Data accessed in the context of a serializable transaction cannot be accessed by any other transaction.
|
|
28
28
|
*/
|
|
29
29
|
export const ISOLATION_SERIALIZABLE: number[];
|
|
30
|
-
export const
|
|
30
|
+
export const ISOLATION_READ_COMMITTED_READ_ONLY: number[];
|
|
31
31
|
|
|
32
32
|
export type Isolation = number[];
|
|
33
33
|
|
package/lib/index.js
CHANGED
|
@@ -810,10 +810,10 @@ const DESCRIBE = [
|
|
|
810
810
|
|
|
811
811
|
const
|
|
812
812
|
ISOLATION_READ_UNCOMMITTED = [isc_tpb_version3, isc_tpb_write, isc_tpb_wait, isc_tpb_read_committed, isc_tpb_rec_version],
|
|
813
|
-
|
|
813
|
+
ISOLATION_READ_COMMITTED = [isc_tpb_version3, isc_tpb_write, isc_tpb_wait, isc_tpb_read_committed, isc_tpb_no_rec_version],
|
|
814
814
|
ISOLATION_REPEATABLE_READ = [isc_tpb_version3, isc_tpb_write, isc_tpb_wait, isc_tpb_concurrency],
|
|
815
815
|
ISOLATION_SERIALIZABLE = [isc_tpb_version3, isc_tpb_write, isc_tpb_wait, isc_tpb_consistency],
|
|
816
|
-
|
|
816
|
+
ISOLATION_READ_COMMITTED_READ_ONLY = [isc_tpb_version3, isc_tpb_read, isc_tpb_wait, isc_tpb_read_committed, isc_tpb_no_rec_version];
|
|
817
817
|
|
|
818
818
|
const
|
|
819
819
|
DEFAULT_HOST = '127.0.0.1',
|
|
@@ -845,10 +845,10 @@ exports.WIRE_CRYPT_DISABLE = WIRE_CRYPT_DISABLE;
|
|
|
845
845
|
exports.WIRE_CRYPT_ENABLE = WIRE_CRYPT_ENABLE;
|
|
846
846
|
|
|
847
847
|
exports.ISOLATION_READ_UNCOMMITTED = ISOLATION_READ_UNCOMMITTED;
|
|
848
|
-
exports.
|
|
848
|
+
exports.ISOLATION_READ_COMMITTED = ISOLATION_READ_COMMITTED;
|
|
849
849
|
exports.ISOLATION_REPEATABLE_READ = ISOLATION_REPEATABLE_READ;
|
|
850
850
|
exports.ISOLATION_SERIALIZABLE = ISOLATION_SERIALIZABLE;
|
|
851
|
-
exports.
|
|
851
|
+
exports.ISOLATION_READ_COMMITTED_READ_ONLY = ISOLATION_READ_COMMITTED_READ_ONLY;
|
|
852
852
|
|
|
853
853
|
if (!String.prototype.padLeft) {
|
|
854
854
|
String.prototype.padLeft = function(max, c) {
|
|
@@ -2680,7 +2680,7 @@ ServiceManager.prototype.getFbserverInfos = function (infos, options, callback)
|
|
|
2680
2680
|
// if infos is empty all options are asked to the service
|
|
2681
2681
|
|
|
2682
2682
|
var tops = [], empty = isEmpty(infos);
|
|
2683
|
-
for (popts in opts)
|
|
2683
|
+
for (let popts in opts)
|
|
2684
2684
|
if (empty || infos[popts])
|
|
2685
2685
|
tops.push(opts[popts]);
|
|
2686
2686
|
|
|
@@ -3248,7 +3248,7 @@ function decodeResponse(data, callback, cnx, lowercase_keys, cb) {
|
|
|
3248
3248
|
data.readBuffer((4 - nullBitsLen) & 3, false); // Skip padding
|
|
3249
3249
|
}
|
|
3250
3250
|
|
|
3251
|
-
for (length = output.length; data.fcolumn < length; data.fcolumn++) {
|
|
3251
|
+
for (let length = output.length; data.fcolumn < length; data.fcolumn++) {
|
|
3252
3252
|
item = output[data.fcolumn];
|
|
3253
3253
|
|
|
3254
3254
|
if (!lowerV13 && nullBitSet.get(data.fcolumn)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-firebird",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"description": "Pure JavaScript and Asynchronous Firebird client for Node.js.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"firebird",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"coveralls": "^3.0.1",
|
|
41
|
-
"mocha": "^
|
|
41
|
+
"mocha": "^10.2.0",
|
|
42
42
|
"nyc": "^15.0.1"
|
|
43
43
|
}
|
|
44
44
|
}
|