oracledb 6.8.0 → 6.9.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/README.md +39 -3
- package/build/Release/oracledb-6.9.0-darwin-arm64.node +0 -0
- package/build/Release/oracledb-6.9.0-darwin-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.9.0-darwin-x64.node +0 -0
- package/build/Release/oracledb-6.9.0-darwin-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.9.0-js-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.9.0-linux-arm64.node +0 -0
- package/build/Release/oracledb-6.9.0-linux-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.9.0-linux-x64.node +0 -0
- package/build/Release/oracledb-6.9.0-linux-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.9.0-win32-x64.node +0 -0
- package/build/Release/oracledb-6.9.0-win32-x64.node-buildinfo.txt +1 -0
- package/lib/aqMessage.js +10 -1
- package/lib/configProviders/file.js +72 -0
- package/lib/connection.js +87 -2
- package/lib/dbObject.js +9 -0
- package/lib/errors.js +56 -31
- package/lib/impl/connection.js +9 -0
- package/lib/impl/pool.js +10 -1
- package/lib/impl/resultset.js +5 -4
- package/lib/lob.js +9 -1
- package/lib/oracledb.js +129 -16
- package/lib/pool.js +12 -1
- package/lib/poolStatistics.js +3 -1
- package/lib/thin/connection.js +117 -10
- package/lib/thin/dbObject.js +8 -6
- package/lib/thin/lob.js +2 -3
- package/lib/thin/pool.js +105 -28
- package/lib/thin/protocol/capabilities.js +7 -3
- package/lib/thin/protocol/constants.js +29 -1
- package/lib/thin/protocol/messages/auth.js +13 -0
- package/lib/thin/protocol/messages/base.js +98 -9
- package/lib/thin/protocol/messages/dataType.js +2 -1
- package/lib/thin/protocol/messages/execute.js +46 -4
- package/lib/thin/protocol/messages/lobOp.js +5 -22
- package/lib/thin/protocol/messages/logOff.js +0 -1
- package/lib/thin/protocol/messages/sessionRelease.js +0 -1
- package/lib/thin/protocol/messages/transactionSwitch.js +12 -4
- package/lib/thin/protocol/protocol.js +2 -1
- package/lib/thin/sqlnet/connStrategy.js +2 -1
- package/lib/thin/sqlnet/navNodes.js +1 -1
- package/lib/thin/sqlnet/networkSession.js +9 -3
- package/lib/thin/sqlnet/packet.js +2 -1
- package/lib/thin/sqlnet/sessionAtts.js +2 -3
- package/lib/types.js +0 -5
- package/lib/util.js +76 -2
- package/lib/version.js +1 -1
- package/package/install.js +3 -3
- package/package/prunebinaries.js +6 -12
- package/package.json +2 -2
- package/{lib/configProviders/azure.js → plugins/configProviders/azure/index.js} +70 -63
- package/plugins/configProviders/azurevault/index.js +84 -0
- package/{lib → plugins}/configProviders/base.js +13 -3
- package/{lib/configProviders/ociobject.js → plugins/configProviders/ociobject/index.js} +43 -78
- package/plugins/configProviders/ocivault/index.js +100 -0
- package/plugins/token/extensionOci/index.js +71 -35
- package/build/Release/oracledb-6.8.0-darwin-arm64.node +0 -0
- package/build/Release/oracledb-6.8.0-darwin-arm64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.8.0-darwin-x64.node +0 -0
- package/build/Release/oracledb-6.8.0-darwin-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.8.0-js-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.8.0-linux-arm64.node +0 -0
- package/build/Release/oracledb-6.8.0-linux-arm64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.8.0-linux-x64.node +0 -0
- package/build/Release/oracledb-6.8.0-linux-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.8.0-win32-x64.node +0 -0
- package/build/Release/oracledb-6.8.0-win32-x64.node-buildinfo.txt +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2022,
|
|
1
|
+
// Copyright (c) 2022, 2025, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -45,10 +45,6 @@ class LobOpMessage extends Message {
|
|
|
45
45
|
*/
|
|
46
46
|
this.sourceLobImpl = options.sourceLobImpl || null;
|
|
47
47
|
this.operation = options.operation;
|
|
48
|
-
/*
|
|
49
|
-
* Destination LOB locator. For copy, append operations,...
|
|
50
|
-
*/
|
|
51
|
-
this.destLobImpl = options.destLobImpl || null;
|
|
52
48
|
/*
|
|
53
49
|
* Offset from where sourceLob operation to start
|
|
54
50
|
*/
|
|
@@ -64,6 +60,7 @@ class LobOpMessage extends Message {
|
|
|
64
60
|
this.functionCode = constants.TNS_FUNC_LOB_OP;
|
|
65
61
|
this.sendAmount = options.sendAmount;
|
|
66
62
|
this.amount = options.amount || 0; // LOB length
|
|
63
|
+
this.destLength = options.destLength || 0;
|
|
67
64
|
}
|
|
68
65
|
|
|
69
66
|
encode(buf) {
|
|
@@ -75,13 +72,8 @@ class LobOpMessage extends Message {
|
|
|
75
72
|
buf.writeUInt8(1);
|
|
76
73
|
buf.writeUB4(this.sourceLobImpl._locator.length);
|
|
77
74
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
buf.writeUB4(0);
|
|
81
|
-
} else {
|
|
82
|
-
buf.writeUInt8(1);
|
|
83
|
-
buf.writeUB4(this.destLobImpl._locator.length);
|
|
84
|
-
}
|
|
75
|
+
buf.writeUInt8(0);
|
|
76
|
+
buf.writeUB4(this.destLength);
|
|
85
77
|
buf.writeUB4(0);
|
|
86
78
|
buf.writeUB4(0);
|
|
87
79
|
if (this.operation === constants.TNS_LOB_OP_CREATE_TEMP) {
|
|
@@ -117,9 +109,6 @@ class LobOpMessage extends Message {
|
|
|
117
109
|
if (this.sourceLobImpl) {
|
|
118
110
|
buf.writeBytes(this.sourceLobImpl._locator);
|
|
119
111
|
}
|
|
120
|
-
if (this.destLobImpl) {
|
|
121
|
-
buf.writeBytes(this.destLobImpl._locator);
|
|
122
|
-
}
|
|
123
112
|
if (this.operation === constants.TNS_LOB_OP_CREATE_TEMP) {
|
|
124
113
|
if (this.sourceLobImpl.dbType._csfrm === constants.CSFRM_NCHAR) {
|
|
125
114
|
buf.caps.checkNCharsetId();
|
|
@@ -185,15 +174,9 @@ class LobOpMessage extends Message {
|
|
|
185
174
|
locator = lobArray.slice(0, numBytes);
|
|
186
175
|
locator.copy(this.sourceLobImpl._locator);
|
|
187
176
|
}
|
|
188
|
-
if (this.destLobImpl !== null) {
|
|
189
|
-
numBytes = this.destLobImpl._locator.length;
|
|
190
|
-
lobArray = buf.readBytes(numBytes);
|
|
191
|
-
locator = lobArray.slice(0, numBytes);
|
|
192
|
-
locator.copy(this.destLobImpl._locator);
|
|
193
|
-
}
|
|
194
177
|
if (this.operation === constants.TNS_LOB_OP_CREATE_TEMP) {
|
|
195
178
|
buf.skipUB2(); // skip character set
|
|
196
|
-
buf.
|
|
179
|
+
buf.skipUB1(); // skip trailing flags
|
|
197
180
|
} else if (this.sendAmount) {
|
|
198
181
|
this.amount = buf.readSB8();
|
|
199
182
|
}
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
const Message = require("./base.js");
|
|
30
30
|
const constants = require("../constants.js");
|
|
31
|
+
const errors = require("../../../errors.js");
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* Used for two-phase commit (TPC) transaction start, attach and detach.
|
|
@@ -61,18 +62,25 @@ class TransactionSwitchMessage extends Message {
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
encode(buf) {
|
|
65
|
+
// We unset the pending flag in writePiggybacks just before encode is
|
|
66
|
+
// called to ensure message is written
|
|
67
|
+
if (this.connection._sessionlessData?.pending)
|
|
68
|
+
errors.throwErr(errors.ERR_SESSIONLESS_ALREADY_ACTIVE);
|
|
69
|
+
|
|
64
70
|
// writes the message to the database
|
|
65
71
|
// acquire data to send to the server
|
|
66
72
|
let xidBytes;
|
|
67
73
|
if (this.xid) {
|
|
68
74
|
xidBytes = Buffer.alloc(128);
|
|
69
75
|
this.xid.globalTransactionId.copy(xidBytes);
|
|
70
|
-
this.xid.branchQualifier
|
|
71
|
-
this.xid.
|
|
76
|
+
if (this.xid.branchQualifier)
|
|
77
|
+
this.xid.branchQualifier.copy(xidBytes,
|
|
78
|
+
this.xid.globalTransactionId.length);
|
|
72
79
|
}
|
|
73
80
|
|
|
74
|
-
// write message
|
|
75
81
|
this.writeFunctionHeader(buf);
|
|
82
|
+
|
|
83
|
+
|
|
76
84
|
buf.writeUB4(this.operation);
|
|
77
85
|
if (this.context) {
|
|
78
86
|
buf.writeUInt8(1); // pointer (transaction context)
|
|
@@ -97,7 +105,7 @@ class TransactionSwitchMessage extends Message {
|
|
|
97
105
|
}
|
|
98
106
|
|
|
99
107
|
buf.writeUB4(this.flags);
|
|
100
|
-
buf.writeUB4(this.timeout);
|
|
108
|
+
buf.writeUB4(this.timeout ? this.timeout : 0);
|
|
101
109
|
buf.writeUInt8(1); // pointer (application value)
|
|
102
110
|
buf.writeUInt8(1); // pointer (return context)
|
|
103
111
|
buf.writeUInt8(1); // pointer (return context length)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2022,
|
|
1
|
+
// Copyright (c) 2022, 2025, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -204,6 +204,7 @@ class Protocol {
|
|
|
204
204
|
let err = new Error(message.errorInfo.message);
|
|
205
205
|
err.offset = message.errorInfo.pos;
|
|
206
206
|
err.errorNum = message.errorInfo.num;
|
|
207
|
+
err.isRecoverable = message.errorInfo.isRecoverable;
|
|
207
208
|
err = errors.transformErr(err);
|
|
208
209
|
if (err.code === errors.ERR_CONNECTION_CLOSED_CODE) {
|
|
209
210
|
this.nsi.disconnect();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2022,
|
|
1
|
+
// Copyright (c) 2022, 2025, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -194,6 +194,7 @@ async function createNode(str, userConfig) {
|
|
|
194
194
|
cs.terminal = userConfig.terminal;
|
|
195
195
|
cs.osUser = userConfig.osUser;
|
|
196
196
|
cs.program = userConfig.program;
|
|
197
|
+
cs.httpsProxy = userConfig.httpsProxy;
|
|
197
198
|
await navobj.navigate(cs);
|
|
198
199
|
return cs;
|
|
199
200
|
}
|
|
@@ -500,7 +500,7 @@ class NavAddress extends Address {
|
|
|
500
500
|
cs.newConnectionDescription();
|
|
501
501
|
needToCloseDescription = true;
|
|
502
502
|
}
|
|
503
|
-
if (!net.isIP(this.host)) {
|
|
503
|
+
if (!net.isIP(this.host) && !(cs.httpsProxy || this.httpsProxy)) {
|
|
504
504
|
try {
|
|
505
505
|
addresses = await dnsPromises.lookup(this.host, options);
|
|
506
506
|
for (const addr of addresses) {
|
|
@@ -374,9 +374,9 @@ class NetworkSession {
|
|
|
374
374
|
const buffertoDeCompress = packet.buf.subarray(constants.NSPDADAT, size);
|
|
375
375
|
let deCompressedDataBuffer;
|
|
376
376
|
try {
|
|
377
|
-
if (this.sAtts.
|
|
377
|
+
if (this.sAtts.firstRecvCompressedPacket) {
|
|
378
378
|
deCompressedDataBuffer = zlib.inflateSync(buffertoDeCompress, {finishFlush: zlib.constants.Z_SYNC_FLUSH});
|
|
379
|
-
this.sAtts.
|
|
379
|
+
this.sAtts.firstRecvCompressedPacket = 0;
|
|
380
380
|
} else {
|
|
381
381
|
deCompressedDataBuffer = zlib.inflateRawSync(buffertoDeCompress, {finishFlush: zlib.constants.Z_SYNC_FLUSH});
|
|
382
382
|
}
|
|
@@ -457,7 +457,13 @@ class NetworkSession {
|
|
|
457
457
|
const bufferHeader = buf.subarray(0, constants.NSPDADAT);
|
|
458
458
|
let compressedDataBuffer;
|
|
459
459
|
try {
|
|
460
|
-
|
|
460
|
+
if (this.sAtts.firstSendCompressedPacket) {
|
|
461
|
+
compressedDataBuffer = zlib.deflateSync(buffertoCompress, {finishFlush: zlib.
|
|
462
|
+
constants.Z_SYNC_FLUSH});
|
|
463
|
+
this.sAtts.firstSendCompressedPacket = 0;
|
|
464
|
+
} else {
|
|
465
|
+
compressedDataBuffer = zlib.deflateRawSync(buffertoCompress, {finishFlush: zlib.constants.Z_SYNC_FLUSH});
|
|
466
|
+
}
|
|
461
467
|
} catch (err) {
|
|
462
468
|
errors.throwErr(errors.ERR_DATA_COMPRESSION, err.message);
|
|
463
469
|
}
|
|
@@ -258,7 +258,8 @@ function AcceptPacket(packet, sAtts) {
|
|
|
258
258
|
if ((this.cflag & constants.NSPACCFON) != 0) { // compression ON
|
|
259
259
|
sAtts.negotiatedNetworkCompressionScheme = (this.cflag & 0x3c) >> 2; // 0x3c
|
|
260
260
|
sAtts.networkCompressionEnabled = true;
|
|
261
|
-
sAtts.
|
|
261
|
+
sAtts.firstRecvCompressedPacket = true;
|
|
262
|
+
sAtts.firstSendCompressedPacket = true;
|
|
262
263
|
} else {
|
|
263
264
|
sAtts.networkCompressionEnabled = false;
|
|
264
265
|
}
|
|
@@ -62,6 +62,7 @@ class SessionAtts {
|
|
|
62
62
|
this.nt.sslServerDNMatch = true;
|
|
63
63
|
this.nt.sslAllowWeakDNMatch = false;
|
|
64
64
|
this.nt.useSNI = false;
|
|
65
|
+
this.networkCompressionThreshold = 1024;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
/**
|
|
@@ -85,9 +86,7 @@ class SessionAtts {
|
|
|
85
86
|
}
|
|
86
87
|
if (params.networkCompressionThreshold >= 200) {
|
|
87
88
|
this.networkCompressionThreshold = parseInt(params.networkCompressionThreshold);
|
|
88
|
-
}
|
|
89
|
-
this.networkCompressionThreshold = 1024;
|
|
90
|
-
|
|
89
|
+
}
|
|
91
90
|
|
|
92
91
|
if (typeof params.walletLocation === 'string') {
|
|
93
92
|
this.nt.walletFile = path.join(params.walletLocation, constants.PEM_WALLET_FILE_NAME);
|
package/lib/types.js
CHANGED
|
@@ -322,14 +322,9 @@ const DB_TYPE_FETCH_TYPE_MAP = new Map([
|
|
|
322
322
|
]);
|
|
323
323
|
|
|
324
324
|
// additional aliases for types by column type name
|
|
325
|
-
dbTypeByColumnTypeName.set("DOUBLE PRECISION", DB_TYPE_NUMBER);
|
|
326
|
-
dbTypeByColumnTypeName.set("FLOAT", DB_TYPE_NUMBER);
|
|
327
|
-
dbTypeByColumnTypeName.set("INTEGER", DB_TYPE_NUMBER);
|
|
328
325
|
dbTypeByColumnTypeName.set("PL/SQL BOOLEAN", DB_TYPE_BOOLEAN);
|
|
329
326
|
dbTypeByColumnTypeName.set("PL/SQL BINARY INTEGER", DB_TYPE_BINARY_INTEGER);
|
|
330
327
|
dbTypeByColumnTypeName.set("PL/SQL PLS INTEGER", DB_TYPE_BINARY_INTEGER);
|
|
331
|
-
dbTypeByColumnTypeName.set("REAL", DB_TYPE_NUMBER);
|
|
332
|
-
dbTypeByColumnTypeName.set("SMALLINT", DB_TYPE_NUMBER);
|
|
333
328
|
dbTypeByColumnTypeName.set("TIMESTAMP WITH LOCAL TZ", DB_TYPE_TIMESTAMP_LTZ);
|
|
334
329
|
dbTypeByColumnTypeName.set("TIMESTAMP WITH TZ", DB_TYPE_TIMESTAMP_TZ);
|
|
335
330
|
|
package/lib/util.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2016,
|
|
1
|
+
// Copyright (c) 2016, 2025, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -33,6 +33,26 @@ const util = require('util');
|
|
|
33
33
|
const types = require('./types.js');
|
|
34
34
|
const constants = require('./constants.js');
|
|
35
35
|
const traceHandler = require('./traceHandler.js');
|
|
36
|
+
const crypto = require("crypto");
|
|
37
|
+
|
|
38
|
+
const pemHeaders = [
|
|
39
|
+
'-----BEGIN CERTIFICATE-----',
|
|
40
|
+
'-----BEGIN PUBLIC KEY-----',
|
|
41
|
+
'-----BEGIN PRIVATE KEY-----',
|
|
42
|
+
'-----BEGIN RSA PRIVATE KEY-----',
|
|
43
|
+
'-----BEGIN DSA PRIVATE KEY-----',
|
|
44
|
+
'-----BEGIN EC PRIVATE KEY-----',
|
|
45
|
+
'-----BEGIN ENCRYPTED PRIVATE KEY-----'
|
|
46
|
+
];
|
|
47
|
+
const pemFooters = [
|
|
48
|
+
'-----END CERTIFICATE-----',
|
|
49
|
+
'-----END PUBLIC KEY-----',
|
|
50
|
+
'-----END PRIVATE KEY-----',
|
|
51
|
+
'-----END RSA PRIVATE KEY-----',
|
|
52
|
+
'-----END DSA PRIVATE KEY-----',
|
|
53
|
+
'-----END EC PRIVATE KEY-----',
|
|
54
|
+
'-----END ENCRYPTED PRIVATE KEY-----'
|
|
55
|
+
];
|
|
36
56
|
|
|
37
57
|
// set of valid network characters
|
|
38
58
|
const validNetworkCharacterSet = new Set(['A', 'B', 'C', 'D', 'E', 'F', 'G',
|
|
@@ -80,6 +100,13 @@ function getInstallURL() {
|
|
|
80
100
|
return ('Node-oracledb installation instructions: https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html');
|
|
81
101
|
}
|
|
82
102
|
|
|
103
|
+
// check if a file has contents of a .pem file
|
|
104
|
+
function isPemFile(content) {
|
|
105
|
+
//remove any line breaks at the end of the content
|
|
106
|
+
content = content.trim();
|
|
107
|
+
return pemHeaders.some(header => content.includes(header)) &&
|
|
108
|
+
pemFooters.some(footer => content.endsWith(footer));
|
|
109
|
+
}
|
|
83
110
|
|
|
84
111
|
// getInstallHelp returns a string with installation usage tips that may be helpful
|
|
85
112
|
function getInstallHelp() {
|
|
@@ -372,6 +399,21 @@ function isShardingKey(value) {
|
|
|
372
399
|
return true;
|
|
373
400
|
}
|
|
374
401
|
|
|
402
|
+
function isAppContext(value) {
|
|
403
|
+
if (!Array.isArray(value))
|
|
404
|
+
return false;
|
|
405
|
+
for (let i = 0; i < value.length; i++) {
|
|
406
|
+
const element = value[i];
|
|
407
|
+
if (!Array.isArray(element) || element.length !== 3)
|
|
408
|
+
return false;
|
|
409
|
+
for (let j = 0; j < 3; j++) {
|
|
410
|
+
if (typeof element[j] !== 'string')
|
|
411
|
+
return false;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
return true;
|
|
415
|
+
}
|
|
416
|
+
|
|
375
417
|
function isSodaDocument(value) {
|
|
376
418
|
return (value != null && value._sodaDocumentMarker);
|
|
377
419
|
}
|
|
@@ -414,6 +456,34 @@ function normalizeXid(value) {
|
|
|
414
456
|
return normalizedXid;
|
|
415
457
|
}
|
|
416
458
|
|
|
459
|
+
//---------------------------------------------------------------------------
|
|
460
|
+
// isTransactionId()
|
|
461
|
+
//
|
|
462
|
+
// Validates if the given value is a sessionless transactionId
|
|
463
|
+
//---------------------------------------------------------------------------
|
|
464
|
+
function isTransactionId(value) {
|
|
465
|
+
return Buffer.isBuffer(value) || (typeof value === 'string');
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
//---------------------------------------------------------------------------
|
|
469
|
+
// normalizeTransactionId()
|
|
470
|
+
//
|
|
471
|
+
// Returns the normalized value of a sessionless transactionId as a buffer
|
|
472
|
+
// In case the value is null a random 36-byte UUID buffer is returned
|
|
473
|
+
//---------------------------------------------------------------------------
|
|
474
|
+
function normalizeTransactionId(value) {
|
|
475
|
+
let normalizedTransactionId = value;
|
|
476
|
+
if (normalizedTransactionId === undefined)
|
|
477
|
+
normalizedTransactionId = crypto.randomUUID();
|
|
478
|
+
if (typeof normalizedTransactionId === 'string') {
|
|
479
|
+
normalizedTransactionId = Buffer.from(normalizedTransactionId);
|
|
480
|
+
const len = normalizedTransactionId.length;
|
|
481
|
+
if ((len === 0) || (len > 64))
|
|
482
|
+
errors.throwErr(errors.ERR_INVALID_TRANSACTION_SIZE, len);
|
|
483
|
+
}
|
|
484
|
+
return normalizedTransactionId;
|
|
485
|
+
}
|
|
486
|
+
|
|
417
487
|
function verifySodaDoc(content) {
|
|
418
488
|
if (isSodaDocument(content))
|
|
419
489
|
return content._impl;
|
|
@@ -573,15 +643,19 @@ module.exports = {
|
|
|
573
643
|
isObjectOrArray,
|
|
574
644
|
isPrivilege,
|
|
575
645
|
isShardingKey,
|
|
646
|
+
isAppContext,
|
|
576
647
|
isSodaDocument,
|
|
577
648
|
isTokenExpired,
|
|
578
649
|
isTokenValid,
|
|
650
|
+
isTransactionId,
|
|
579
651
|
isVectorValue,
|
|
580
652
|
isXid,
|
|
653
|
+
normalizeTransactionId,
|
|
581
654
|
normalizeXid,
|
|
582
655
|
makeDate,
|
|
583
656
|
sanitize,
|
|
584
657
|
verifySodaDoc,
|
|
585
658
|
wrapFn,
|
|
586
|
-
wrapFns
|
|
659
|
+
wrapFns,
|
|
660
|
+
isPemFile
|
|
587
661
|
};
|
package/lib/version.js
CHANGED
package/package/install.js
CHANGED
|
@@ -68,7 +68,7 @@ function warn(message) { // eslint-disable-line
|
|
|
68
68
|
console.error.apply(console, args);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
// This version of node-oracledb works with Node.js 14.
|
|
71
|
+
// This version of node-oracledb works with Node.js 14.17 or later.
|
|
72
72
|
// Note: the checked version is the minimum required for Node-API
|
|
73
73
|
// compatibility. When new Node.js versions are released, older Node.js
|
|
74
74
|
// versions are dropped from the node-oracledb test plan.
|
|
@@ -76,8 +76,8 @@ function warn(message) { // eslint-disable-line
|
|
|
76
76
|
// Keep this code in sync with lib/oracledb.js
|
|
77
77
|
function checkVersion() {
|
|
78
78
|
const vs = process.version.substring(1).split(".").map(Number);
|
|
79
|
-
errors.assert(vs[0] > 14 || (vs[0] === 14 && vs[1] >=
|
|
80
|
-
errors.ERR_NODE_TOO_OLD, nodbUtil.PACKAGE_JSON_VERSION, "14.
|
|
79
|
+
errors.assert(vs[0] > 14 || (vs[0] === 14 && vs[1] >= 17),
|
|
80
|
+
errors.ERR_NODE_TOO_OLD, nodbUtil.PACKAGE_JSON_VERSION, "14.17");
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
// Check for the binary node-oracledb module needed for "Thick mode".
|
package/package/prunebinaries.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Copyright (c) 2019,
|
|
1
|
+
/* Copyright (c) 2019, 2025, Oracle and/or its affiliates. */
|
|
2
2
|
|
|
3
3
|
/******************************************************************************
|
|
4
4
|
*
|
|
@@ -47,11 +47,11 @@ const nodbUtil = require('../lib/util.js');
|
|
|
47
47
|
|
|
48
48
|
const dir = nodbUtil.RELEASE_DIR; // contains the binaries
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
const re = new RegExp(nodbUtil.BINARY_FILE);
|
|
51
51
|
|
|
52
52
|
try {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
const f = fs.readdirSync(dir);
|
|
54
|
+
const opt = process.argv[2];
|
|
55
55
|
|
|
56
56
|
if (opt) {
|
|
57
57
|
// 'npm run prune <option>' is called
|
|
@@ -76,18 +76,12 @@ try {
|
|
|
76
76
|
console.error(err.message);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
function removeFileorDir(fileOrDirPath) {
|
|
80
80
|
try {
|
|
81
81
|
const isDir = fs.statSync(fileOrDirPath).isDirectory();
|
|
82
82
|
if (isDir) {
|
|
83
83
|
// Remove the directory and its files recursively
|
|
84
|
-
|
|
85
|
-
// which do not support fs.rmSync()
|
|
86
|
-
const vs = process.version.substring(1).split(".").map(Number);
|
|
87
|
-
if (vs[0] > 14 || (vs[0] === 14 && vs[1] >= 14))
|
|
88
|
-
fs.rmSync(fileOrDirPath, { recursive: true, force: true });
|
|
89
|
-
else
|
|
90
|
-
await fs.promises.rmdir(fileOrDirPath, { recursive: true, force: true });
|
|
84
|
+
fs.rmSync(fileOrDirPath, { recursive: true, force: true });
|
|
91
85
|
} else {
|
|
92
86
|
// Remove the file or the symlink synchronously
|
|
93
87
|
fs.unlinkSync(fileOrDirPath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oracledb",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.0",
|
|
4
4
|
"description": "A Node.js module for Oracle Database access from JavaScript and TypeScript",
|
|
5
5
|
"license": "(Apache-2.0 OR UPL-1.0)",
|
|
6
6
|
"homepage": "http://oracle.github.io/node-oracledb/",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"prune": "node package/prunebinaries.js"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
|
-
"node": ">=14.
|
|
37
|
+
"node": ">=14.17"
|
|
38
38
|
},
|
|
39
39
|
"maintainers": [
|
|
40
40
|
{
|