@lark-apaas/fullstack-cli 1.1.34 → 1.1.35
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.js +18 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7368,6 +7368,7 @@ import * as fs25 from "fs";
|
|
|
7368
7368
|
import * as os2 from "os";
|
|
7369
7369
|
import * as path21 from "path";
|
|
7370
7370
|
import { execFileSync } from "child_process";
|
|
7371
|
+
import { HttpError } from "@lark-apaas/http-client";
|
|
7371
7372
|
function readCredentialsFromEnv() {
|
|
7372
7373
|
const uploadPrefix = process.env.STATIC_UPLOAD_PREFIX;
|
|
7373
7374
|
const uploadID = process.env.STATIC_UPLOAD_ID;
|
|
@@ -7455,7 +7456,23 @@ async function uploadStatic(options) {
|
|
|
7455
7456
|
} catch (error) {
|
|
7456
7457
|
const message = error instanceof Error ? error.message : String(error);
|
|
7457
7458
|
console.error(`${LOG_PREFIX} Error: ${message}`);
|
|
7458
|
-
|
|
7459
|
+
if (error instanceof HttpError && error.response) {
|
|
7460
|
+
const logId = error.response.headers.get("x-tt-logid") || error.response.headers.get("X-Tt-Logid");
|
|
7461
|
+
if (logId) {
|
|
7462
|
+
console.error(`${LOG_PREFIX} logid: ${logId}`);
|
|
7463
|
+
}
|
|
7464
|
+
try {
|
|
7465
|
+
const responseText = await error.response.text();
|
|
7466
|
+
if (responseText) {
|
|
7467
|
+
console.error(`${LOG_PREFIX} response: ${responseText}`);
|
|
7468
|
+
}
|
|
7469
|
+
} catch {
|
|
7470
|
+
}
|
|
7471
|
+
if (error.config?.url) {
|
|
7472
|
+
console.error(`${LOG_PREFIX} request url: ${error.config.url}`);
|
|
7473
|
+
}
|
|
7474
|
+
}
|
|
7475
|
+
process.exitCode = 1;
|
|
7459
7476
|
}
|
|
7460
7477
|
}
|
|
7461
7478
|
function resolveTosutilPath(tosutilPath) {
|