@pi-r/oci 0.6.5 → 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 CHANGED
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
2
  exports.executeBatchQuery = exports.executeQuery = exports.deleteObjectsV2 = exports.deleteObjects = exports.setBucketWebsite = exports.setBucketPolicy = exports.createBucketV2 = exports.createBucket = exports.createDatabaseClient = exports.setStorageCredential = exports.validateDatabase = exports.validateStorage = void 0;
4
3
  const oracledb = require("oracledb");
5
4
  const types_1 = require("@e-mc/types");
@@ -16,9 +15,10 @@ function validateDatabase(credential, data) {
16
15
  }
17
16
  exports.validateDatabase = validateDatabase;
18
17
  function setStorageCredential(credential) {
18
+ var _a;
19
19
  const { endpoint, namespace, region } = credential;
20
20
  if (endpoint) {
21
- credential.region || (credential.region = /([^.]+)\.oraclecloud\.com$/.exec(endpoint)?.[1]);
21
+ credential.region || (credential.region = (_a = /([^.]+)\.oraclecloud\.com$/.exec(endpoint)) === null || _a === void 0 ? void 0 : _a[1]);
22
22
  }
23
23
  else if (namespace && region) {
24
24
  credential.endpoint || (credential.endpoint = `https://${namespace}.compat.objectstorage.${region}.oraclecloud.com`);
@@ -72,7 +72,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
72
72
  const cacheValue = { value: this.valueOfKey(credential, 'cache'), sessionKey };
73
73
  let client;
74
74
  const createClient = async () => createDatabaseClient.call(this, credential);
75
- const closeClient = async () => client?.close();
75
+ const closeClient = async () => client === null || client === void 0 ? void 0 : client.close();
76
76
  for (let i = 0; i < length; ++i) {
77
77
  const item = batch[i];
78
78
  const { service, table = '', id, query, ignoreCache } = item;
@@ -185,7 +185,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
185
185
  }
186
186
  else {
187
187
  const { params, options } = item;
188
- if (options?.maxRows && isNaN(maxRows)) {
188
+ if ((options === null || options === void 0 ? void 0 : options.maxRows) && isNaN(maxRows)) {
189
189
  maxRows = options.maxRows;
190
190
  }
191
191
  if (queryString && (rows = getCache(queryString += query + Module.asString(params, true) + Module.asString(options, true) + (maxRows > 0 ? maxRows : '')))) {
package/download/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  const client_1 = require("@pi-r/oci");
3
- function download(credential, service = 'oci') {
3
+ module.exports = function download(credential, service = 'oci') {
4
4
  (0, client_1.setStorageCredential)(credential);
5
5
  return require("@pi-r/aws/download").call(this, credential, service);
6
- }
7
-
8
- module.exports = download;
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/oci",
3
- "version": "0.6.5",
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,12 +20,12 @@
20
20
  "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/pi-r#readme",
22
22
  "dependencies": {
23
- "@e-mc/cloud": "^0.8.6",
24
- "@e-mc/module": "^0.8.6",
25
- "@e-mc/types": "^0.8.6",
26
- "@pi-r/aws": "^0.6.5",
27
- "@pi-r/oracle": "^0.6.5",
28
- "aws-sdk": "^2.1570.0",
29
- "oracledb": "^6.3.0"
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
+ "aws-sdk": "^2.1591.0",
29
+ "oracledb": "^6.4.0"
30
30
  }
31
31
  }
package/upload/index.js CHANGED
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  const client_1 = require("@pi-r/oci");
3
- function upload(credential, service = 'oci') {
3
+ module.exports = function upload(credential, service = 'oci') {
4
4
  (0, client_1.setStorageCredential)(credential);
5
5
  return require("@pi-r/aws/upload").call(this, credential, service);
6
- }
7
-
8
- module.exports = upload;
6
+ };