@pi-r/atlas 0.9.3 → 0.10.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.
Files changed (2) hide show
  1. package/client/index.js +2 -3
  2. package/package.json +7 -7
package/client/index.js CHANGED
@@ -20,9 +20,8 @@ function sanitizeCredentials(credential) {
20
20
  }
21
21
  }
22
22
  function validateDatabase(credential, data) {
23
- const auth = credential.auth;
24
23
  if (data.table && Cloud.isURL(data.uri)) {
25
- if (auth?.username || credential.username || (0, util_1.hasBasicAuth)(data.uri)) {
24
+ if (credential.auth?.username || credential.username || (0, util_1.hasBasicAuth)(data.uri)) {
26
25
  return true;
27
26
  }
28
27
  const setAuthSource = () => credential.authSource ||= '$external';
@@ -83,7 +82,7 @@ async function executeBatchQuery(credential, batch, sessionKey) {
83
82
  limit = 1;
84
83
  }
85
84
  const options = item.options ? length === 1 ? Object.assign(item.options, credential) : { ...item.options, ...credential } : length === 1 ? credential : { ...credential };
86
- let rows, queryString = caching && ignoreCache !== true ? (name || '') + '_' + table + '_' + limit + Cloud.asString(options, true) + (sort ? Cloud.asString(sort, true) : '') + (client ? Cloud.asString(client, true) : '') : '', auth, pipeline;
85
+ let rows, queryString = caching && ignoreCache !== true ? (name || '') + '_' + table + '_' + (limit > 0 ? limit.toString() : '0') + Cloud.asString(options, true) + (sort ? Cloud.asString(sort, true) : '') + (client ? Cloud.asString(client, true) : '') : '', auth, pipeline;
87
86
  if (queryString) {
88
87
  sanitizeCredentials(options);
89
88
  auth = { uri: item.uri, options };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-r/atlas",
3
- "version": "0.9.3",
3
+ "version": "0.10.0",
4
4
  "description": "MongoDB Atlas cloud functions for E-mc.",
5
5
  "main": "client/index.js",
6
6
  "publishConfig": {
@@ -19,11 +19,11 @@
19
19
  "license": "MIT",
20
20
  "homepage": "https://github.com/anpham6/pi-r#readme",
21
21
  "dependencies": {
22
- "@e-mc/cloud": "^0.11.4",
23
- "@e-mc/db": "^0.11.4",
24
- "@e-mc/module": "^0.11.4",
25
- "@e-mc/types": "^0.11.4",
26
- "@pi-r/mongodb": "^0.9.3",
27
- "mongodb": "^6.15.0"
22
+ "@e-mc/cloud": "^0.12.0",
23
+ "@e-mc/db": "^0.12.0",
24
+ "@e-mc/module": "^0.12.0",
25
+ "@e-mc/types": "^0.12.0",
26
+ "@pi-r/mongodb": "^0.10.0",
27
+ "mongodb": "^6.16.0"
28
28
  }
29
29
  }