@pi-r/oci 0.6.6 → 0.6.7
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/client/index.js +4 -3
- package/package.json +6 -6
package/client/index.js
CHANGED
|
@@ -15,9 +15,10 @@ function validateDatabase(credential, data) {
|
|
|
15
15
|
}
|
|
16
16
|
exports.validateDatabase = validateDatabase;
|
|
17
17
|
function setStorageCredential(credential) {
|
|
18
|
+
var _a;
|
|
18
19
|
const { endpoint, namespace, region } = credential;
|
|
19
20
|
if (endpoint) {
|
|
20
|
-
credential.region || (credential.region = /([^.]+)\.oraclecloud\.com$/.exec(endpoint)
|
|
21
|
+
credential.region || (credential.region = (_a = /([^.]+)\.oraclecloud\.com$/.exec(endpoint)) === null || _a === void 0 ? void 0 : _a[1]);
|
|
21
22
|
}
|
|
22
23
|
else if (namespace && region) {
|
|
23
24
|
credential.endpoint || (credential.endpoint = `https://${namespace}.compat.objectstorage.${region}.oraclecloud.com`);
|
|
@@ -71,7 +72,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
|
|
|
71
72
|
const cacheValue = { value: this.valueOfKey(credential, 'cache'), sessionKey };
|
|
72
73
|
let client;
|
|
73
74
|
const createClient = async () => createDatabaseClient.call(this, credential);
|
|
74
|
-
const closeClient = async () => client
|
|
75
|
+
const closeClient = async () => client === null || client === void 0 ? void 0 : client.close();
|
|
75
76
|
for (let i = 0; i < length; ++i) {
|
|
76
77
|
const item = batch[i];
|
|
77
78
|
const { service, table = '', id, query, ignoreCache } = item;
|
|
@@ -184,7 +185,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
|
|
|
184
185
|
}
|
|
185
186
|
else {
|
|
186
187
|
const { params, options } = item;
|
|
187
|
-
if (options
|
|
188
|
+
if ((options === null || options === void 0 ? void 0 : options.maxRows) && isNaN(maxRows)) {
|
|
188
189
|
maxRows = options.maxRows;
|
|
189
190
|
}
|
|
190
191
|
if (queryString && (rows = getCache(queryString += query + Module.asString(params, true) + Module.asString(options, true) + (maxRows > 0 ? maxRows : '')))) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/oci",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "Oracle (OCI) cloud functions for E-mc.",
|
|
5
5
|
"main": "client/index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/cloud": "^0.8.
|
|
24
|
-
"@e-mc/module": "^0.8.
|
|
25
|
-
"@e-mc/types": "^0.8.
|
|
26
|
-
"@pi-r/aws": "^0.6.
|
|
27
|
-
"@pi-r/oracle": "^0.6.
|
|
23
|
+
"@e-mc/cloud": "^0.8.8",
|
|
24
|
+
"@e-mc/module": "^0.8.8",
|
|
25
|
+
"@e-mc/types": "^0.8.8",
|
|
26
|
+
"@pi-r/aws": "^0.6.7",
|
|
27
|
+
"@pi-r/oracle": "^0.6.7",
|
|
28
28
|
"aws-sdk": "^2.1591.0",
|
|
29
29
|
"oracledb": "^6.4.0"
|
|
30
30
|
}
|