Skip to content

Commit 3d10744

Browse files
07souravkundafrancisf
authored andcommitted
add warn log to constants
1 parent 8da32de commit 3d10744

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

bin/helpers/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const userMessages = {
2121
ZIP_UPLOADER_NOT_REACHABLE: "Could not reach BrowserStack APIs. Please check your network or see if you need to whitelist *.browserstack.com",
2222
ZIP_UPLOAD_FAILED: "Zip Upload failed.",
2323
ZIP_UPLOAD_LIMIT_EXCEEDED: "The directory size which contains the cypress config file is more than 200 MB. For more info, check out https://www.browserstack.com/docs/automate/cypress/exclude-files",
24+
NODE_MODULES_LIMIT_EXCEEDED: "node_modules upload failed as the size %SIZE% MB is not supported. Dependencies will be installed in runtime. This will have a negative impact on build performance. Reach out to us at browserstack.com/support if you see this warning.",
2425
CONFIG_FILE_CREATED: "BrowserStack Config File created, you can now run browserstack-cypress --config-file run",
2526
CONFIG_FILE_EXISTS: "File already exists, delete the browserstack.json file manually. skipping...",
2627
DIR_NOT_FOUND: "Given path does not exist. Failed to create browserstack.json in %s",

bin/helpers/zipUpload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const uploadSuits = (bsConfig, filePath, opts, obj) => {
7171
if (!opts.propogateError){
7272
purgeUploadBar(obj);
7373
if (resp.statusCode == 413) {
74-
return resolve({warn: `node_modules upload failed as the size ${(size / 1000000).toFixed(2)} MB is not supported. Dependencies will be installed in runtime. This will have a negative impact on build performance. Reach out to us at browserstack.com/support if you see this warning.`});
74+
return resolve({warn: Constants.userMessages.NODE_MODULES_LIMIT_EXCEEDED.replace("%SIZE%", (size / 1000000).toFixed(2))});
7575
}
7676
return resolve({})
7777
}

0 commit comments

Comments
 (0)