@8ms/helpers 1.40.2 → 1.40.3

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.
@@ -1,6 +1,6 @@
1
- import getClient from "./getClient.mjs";
1
+ import getClient from "../storage/getClient.mjs";
2
+ import getClient$1 from "./getClient.mjs";
2
3
  import isTableExists from "./IsTableExists.mjs";
3
- import getClient$1 from "../storage/getClient.mjs";
4
4
  //#region src/google/bigQuery/loadData.ts
5
5
  /**
6
6
  * Load data into a given table.
@@ -11,8 +11,8 @@ const loadData = async ({ file, table }) => {
11
11
  projectId: table.projectId,
12
12
  tableId: table.tableId
13
13
  })) {
14
- let bigqueryClient = getClient({ projectId: table.projectId });
15
- let storageClient = getClient$1({ projectId: file.projectId });
14
+ let bigqueryClient = getClient$1({ projectId: table.projectId });
15
+ let storageClient = getClient({ projectId: file.projectId });
16
16
  await bigqueryClient.dataset(table.datasetId).table(table.tableId).load(storageClient.bucket(file.bucket).file(file.key), file.metadata);
17
17
  }
18
18
  };
@@ -1,4 +1,5 @@
1
- import { chunk, flatten } from "lodash";
1
+ import chunk from "lodash/chunk.js";
2
+ import flatten from "lodash/flatten.js";
2
3
  //#region src/util/promiseChunks.ts
3
4
  /**
4
5
  * Chunk a queue of promises into controlled chunks to prevent overloading.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
3
  "license": "UNLICENSED",
4
- "version": "1.40.2",
4
+ "version": "1.40.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"