@lambdatest/smartui-cli 4.1.47 → 4.1.48
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.
- package/dist/index.cjs +23 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2825,7 +2825,7 @@ var authExec_default = (ctx) => {
|
|
|
2825
2825
|
};
|
|
2826
2826
|
|
|
2827
2827
|
// package.json
|
|
2828
|
-
var version = "4.1.
|
|
2828
|
+
var version = "4.1.48";
|
|
2829
2829
|
var package_default = {
|
|
2830
2830
|
name: "@lambdatest/smartui-cli",
|
|
2831
2831
|
version,
|
|
@@ -2970,10 +2970,10 @@ var httpClient = class {
|
|
|
2970
2970
|
request(config, log2) {
|
|
2971
2971
|
return __async(this, null, function* () {
|
|
2972
2972
|
log2.debug(`http request: ${config.method} ${config.url}`);
|
|
2973
|
-
if (config && config.data && !config.data.skipLogging && !config.data.name && !config.data.snapshot) {
|
|
2973
|
+
if (config && config.data && !config.data.skipLogging && !config.data.name && !config.data.snapshot && config.method !== "PUT") {
|
|
2974
2974
|
log2.debug(config.data);
|
|
2975
2975
|
}
|
|
2976
|
-
if (config && config.data && !config.data.skipLogging && config.data.snapshotUuid) {
|
|
2976
|
+
if (config && config.data && !config.data.skipLogging && config.data.snapshotUuid && config.method !== "PUT") {
|
|
2977
2977
|
log2.debug(config.data);
|
|
2978
2978
|
}
|
|
2979
2979
|
return this.axiosInstance.request(config).then((resp) => {
|
|
@@ -3161,7 +3161,8 @@ var httpClient = class {
|
|
|
3161
3161
|
git,
|
|
3162
3162
|
config,
|
|
3163
3163
|
isStartExec,
|
|
3164
|
-
baselineBuild
|
|
3164
|
+
baselineBuild,
|
|
3165
|
+
packageVersion: package_default.version
|
|
3165
3166
|
},
|
|
3166
3167
|
headers: {
|
|
3167
3168
|
projectToken: "",
|
|
@@ -3440,6 +3441,23 @@ var httpClient = class {
|
|
|
3440
3441
|
}, ctx.log);
|
|
3441
3442
|
}
|
|
3442
3443
|
uploadLogs(ctx, uploadURL) {
|
|
3444
|
+
const fileStream = fs6__default.default.createReadStream(constants_default.LOG_FILE_PATH);
|
|
3445
|
+
const { size } = fs6__default.default.statSync(constants_default.LOG_FILE_PATH);
|
|
3446
|
+
return this.request({
|
|
3447
|
+
url: uploadURL,
|
|
3448
|
+
method: "PUT",
|
|
3449
|
+
headers: {
|
|
3450
|
+
"Content-Type": "text/plain",
|
|
3451
|
+
"Content-Length": size
|
|
3452
|
+
},
|
|
3453
|
+
data: fileStream,
|
|
3454
|
+
maxBodyLength: Infinity,
|
|
3455
|
+
// prevent axios from limiting the body size
|
|
3456
|
+
maxContentLength: Infinity
|
|
3457
|
+
// prevent axios from limiting the content size
|
|
3458
|
+
}, ctx.log);
|
|
3459
|
+
}
|
|
3460
|
+
uploadLogsForCaps(ctx, uploadURL) {
|
|
3443
3461
|
const logContent = fs6__default.default.readFileSync(constants_default.LOG_FILE_PATH);
|
|
3444
3462
|
const { size } = fs6__default.default.statSync(constants_default.LOG_FILE_PATH);
|
|
3445
3463
|
return this.request({
|
|
@@ -4243,7 +4261,7 @@ var finalizeBuild_default = (ctx) => {
|
|
|
4243
4261
|
if (!uploadCLILogsToS3) {
|
|
4244
4262
|
ctx2.log.debug(`Log file to be uploaded`);
|
|
4245
4263
|
let resp = yield ctx2.client.getS3PreSignedURLForCaps(ctx2, buildId, projectToken);
|
|
4246
|
-
yield ctx2.client.
|
|
4264
|
+
yield ctx2.client.uploadLogsForCaps(ctx2, resp.data.url);
|
|
4247
4265
|
} else {
|
|
4248
4266
|
ctx2.log.debug(`Log file to be uploaded via LSRS`);
|
|
4249
4267
|
ctx2.client.sendCliLogsToLSRSForCaps(ctx2, buildId, projectToken);
|