@pi-r/oci 0.5.3 → 0.5.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/LICENSE +1 -1
- package/README.md +1 -1
- package/client/index.js +3 -2
- package/download/index.js +1 -6
- package/package.json +7 -7
- package/upload/index.js +1 -6
package/LICENSE
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright
|
|
1
|
+
Copyright 2024 An Pham
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
package/README.md
CHANGED
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`);
|
|
@@ -70,7 +71,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
|
|
|
70
71
|
const cacheValue = { value: this.valueOfKey(credential, 'cache'), sessionKey };
|
|
71
72
|
let client;
|
|
72
73
|
const createClient = () => createDatabaseClient.call(this, length === 1 ? credential : { ...credential });
|
|
73
|
-
const closeClient = () => client
|
|
74
|
+
const closeClient = () => client === null || client === void 0 ? void 0 : client.close();
|
|
74
75
|
for (let i = 0; i < length; ++i) {
|
|
75
76
|
const item = batch[i];
|
|
76
77
|
const { service, table, id, query, ignoreCache } = item;
|
package/download/index.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
const client_1 = require("@pi-r/oci");
|
|
4
3
|
function download(credential, service = 'oci') {
|
|
5
4
|
(0, client_1.setStorageCredential)(credential);
|
|
6
5
|
return require("@pi-r/aws/download").call(this, credential, service);
|
|
7
6
|
}
|
|
8
|
-
exports.default = download;
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
module.exports = exports.default;
|
|
12
|
-
module.exports.default = exports.default;
|
|
13
|
-
}
|
|
8
|
+
module.exports = download;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/oci",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
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.7.
|
|
24
|
-
"@e-mc/module": "^0.7.
|
|
25
|
-
"@e-mc/types": "^0.7.
|
|
26
|
-
"@pi-r/aws": "^0.5.
|
|
27
|
-
"aws-sdk": "^2.
|
|
28
|
-
"oracledb": "^6.
|
|
23
|
+
"@e-mc/cloud": "^0.7.10",
|
|
24
|
+
"@e-mc/module": "^0.7.10",
|
|
25
|
+
"@e-mc/types": "^0.7.10",
|
|
26
|
+
"@pi-r/aws": "^0.5.5",
|
|
27
|
+
"aws-sdk": "^2.1659.0",
|
|
28
|
+
"oracledb": "^6.5.0"
|
|
29
29
|
}
|
|
30
30
|
}
|
package/upload/index.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
const client_1 = require("@pi-r/oci");
|
|
4
3
|
function upload(credential, service = 'oci') {
|
|
5
4
|
(0, client_1.setStorageCredential)(credential);
|
|
6
5
|
return require("@pi-r/aws/upload").call(this, credential, service);
|
|
7
6
|
}
|
|
8
|
-
exports.default = upload;
|
|
9
7
|
|
|
10
|
-
|
|
11
|
-
module.exports = exports.default;
|
|
12
|
-
module.exports.default = exports.default;
|
|
13
|
-
}
|
|
8
|
+
module.exports = upload;
|