@8ms/helpers 2.3.19 → 2.3.20

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.
Binary file
@@ -1,3 +1,4 @@
1
+ import { isObject } from "../../../lodash/index.mjs";
1
2
  import { BaseNamespace } from "../../../_class/index.mjs";
2
3
  import { onePasswordClient } from "../../../onePassword/server/index.mjs";
3
4
  import { getConfig } from "../../server/index.mjs";
@@ -52,9 +53,14 @@ var GoogleCloudBigqueryNamespace = class extends BaseNamespace {
52
53
  };
53
54
  query = async (props) => {
54
55
  await this.ensureInit();
55
- let queryString = "string" === typeof props ? props : props.query;
56
- let options = "string" === typeof props ? {} : props?.params;
57
- return await this.client.query(queryString, options);
56
+ let options = { query: "" };
57
+ if ("string" === props) options.query = props;
58
+ else if (isObject(props)) {
59
+ options.query = props.query;
60
+ if (props?.location) options["location"] = props.location;
61
+ if (props?.params) options["params"] = props.params;
62
+ }
63
+ return await this.client.query(options);
58
64
  };
59
65
  /**
60
66
  * Create a Table if it doesn't already exist.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
3
  "license": "UNLICENSED",
4
- "version": "2.3.19",
4
+ "version": "2.3.20",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"