Skip to content

Commit 33502e9

Browse files
kosmos2uhKostiantyn Khoroshailo
and
Kostiantyn Khoroshailo
authored
PERF-1401 Add warning message for too bif sync export (#515)
Co-authored-by: Kostiantyn Khoroshailo <kostiantyn.khoroshailo@lokalise.com>
1 parent 7ced42d commit 33502e9

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

dist/main.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lokalise/node-api",
3-
"version": "14.5.1",
3+
"version": "14.5.2",
44
"description": "Official Lokalise API 2.0 Node.js client",
55
"license": "BSD-3-Clause",
66
"repository": {

src/collections/files.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ export class Files extends BaseCollection<File, QueuedProcess> {
3838
json: Record<string, unknown> | Record<string, unknown>[],
3939
headers: Headers,
4040
): T {
41+
if (this.isResponseTooBig(headers)) {
42+
console.warn('\x1b[33m\x1b[1mWarning:\x1b[0m Project too big for sync export. Please use our async export lokaliseApi.files().async_download() method.');
43+
}
4144
return {
4245
...super.returnBareJSON<T>(json, headers),
4346
responseTooBig: this.isResponseTooBig(headers),

0 commit comments

Comments
 (0)