@base44-preview/cli 0.0.38-pr.370.a181654 → 0.0.38-pr.370.cac524d
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/cli/index.js +25 -6
- package/dist/cli/index.js.map +6 -6
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -225313,6 +225313,9 @@ var UserInfoSchema = exports_external.object({
|
|
|
225313
225313
|
name: exports_external.string()
|
|
225314
225314
|
});
|
|
225315
225315
|
|
|
225316
|
+
// src/core/clients/base44-client.ts
|
|
225317
|
+
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
225318
|
+
|
|
225316
225319
|
// node_modules/ky/distribution/errors/HTTPError.js
|
|
225317
225320
|
class HTTPError extends Error {
|
|
225318
225321
|
response;
|
|
@@ -234451,8 +234454,12 @@ async function handleUnauthorized(request, _options, response) {
|
|
|
234451
234454
|
return;
|
|
234452
234455
|
}
|
|
234453
234456
|
retriedRequests.add(request);
|
|
234457
|
+
const requestId = request.headers.get("X-Request-ID");
|
|
234454
234458
|
return distribution_default(request.clone(), {
|
|
234455
|
-
headers: {
|
|
234459
|
+
headers: {
|
|
234460
|
+
...requestId && { "X-Request-ID": requestId },
|
|
234461
|
+
Authorization: `Bearer ${newAccessToken}`
|
|
234462
|
+
}
|
|
234456
234463
|
});
|
|
234457
234464
|
}
|
|
234458
234465
|
var base44Client = distribution_default.create({
|
|
@@ -234462,6 +234469,9 @@ var base44Client = distribution_default.create({
|
|
|
234462
234469
|
},
|
|
234463
234470
|
hooks: {
|
|
234464
234471
|
beforeRequest: [
|
|
234472
|
+
(request) => {
|
|
234473
|
+
request.headers.set("X-Request-ID", randomUUID2());
|
|
234474
|
+
},
|
|
234465
234475
|
captureRequestBody,
|
|
234466
234476
|
async (request) => {
|
|
234467
234477
|
try {
|
|
@@ -234487,10 +234497,18 @@ function getAppClient() {
|
|
|
234487
234497
|
});
|
|
234488
234498
|
}
|
|
234489
234499
|
// src/core/clients/oauth-client.ts
|
|
234500
|
+
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
234490
234501
|
var oauthClient = distribution_default.create({
|
|
234491
234502
|
prefixUrl: getBase44ApiUrl(),
|
|
234492
234503
|
headers: {
|
|
234493
234504
|
"User-Agent": "Base44 CLI"
|
|
234505
|
+
},
|
|
234506
|
+
hooks: {
|
|
234507
|
+
beforeRequest: [
|
|
234508
|
+
(request) => {
|
|
234509
|
+
request.headers.set("X-Request-ID", randomUUID3());
|
|
234510
|
+
}
|
|
234511
|
+
]
|
|
234494
234512
|
}
|
|
234495
234513
|
});
|
|
234496
234514
|
// src/core/auth/api.ts
|
|
@@ -234635,7 +234653,8 @@ async function deleteSecret(name2) {
|
|
|
234635
234653
|
let response;
|
|
234636
234654
|
try {
|
|
234637
234655
|
response = await appClient.delete("secrets", {
|
|
234638
|
-
searchParams: { secret_name: name2 }
|
|
234656
|
+
searchParams: { secret_name: name2 },
|
|
234657
|
+
timeout: false
|
|
234639
234658
|
});
|
|
234640
234659
|
} catch (error48) {
|
|
234641
234660
|
throw await ApiError.fromHttpError(error48, "deleting secret");
|
|
@@ -244607,7 +244626,7 @@ function createEntityRoutes(db2, logger, remoteProxy, broadcast) {
|
|
|
244607
244626
|
// src/cli/dev/dev-server/routes/integrations.ts
|
|
244608
244627
|
var import_express3 = __toESM(require_express(), 1);
|
|
244609
244628
|
var import_multer = __toESM(require_multer(), 1);
|
|
244610
|
-
import { randomUUID as
|
|
244629
|
+
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
244611
244630
|
import fs28 from "node:fs";
|
|
244612
244631
|
import path18 from "node:path";
|
|
244613
244632
|
function createIntegrationRoutes(mediaFilesDir, baseUrl, remoteProxy, logger) {
|
|
@@ -244618,7 +244637,7 @@ function createIntegrationRoutes(mediaFilesDir, baseUrl, remoteProxy, logger) {
|
|
|
244618
244637
|
destination: mediaFilesDir,
|
|
244619
244638
|
filename: (_req, file2, cb2) => {
|
|
244620
244639
|
const ext = path18.extname(file2.originalname);
|
|
244621
|
-
cb2(null, `${
|
|
244640
|
+
cb2(null, `${randomUUID4()}${ext}`);
|
|
244622
244641
|
}
|
|
244623
244642
|
});
|
|
244624
244643
|
const MAX_FILE_SIZE = 50 * 1024 * 1024;
|
|
@@ -244645,7 +244664,7 @@ function createIntegrationRoutes(mediaFilesDir, baseUrl, remoteProxy, logger) {
|
|
|
244645
244664
|
res.status(400).json({ error: "file_uri is required" });
|
|
244646
244665
|
return;
|
|
244647
244666
|
}
|
|
244648
|
-
const signature =
|
|
244667
|
+
const signature = randomUUID4();
|
|
244649
244668
|
const signed_url = `${baseUrl}/media/${file_uri}?signature=${signature}`;
|
|
244650
244669
|
res.json({ signed_url });
|
|
244651
244670
|
});
|
|
@@ -250859,4 +250878,4 @@ export {
|
|
|
250859
250878
|
CLIExitError
|
|
250860
250879
|
};
|
|
250861
250880
|
|
|
250862
|
-
//# debugId=
|
|
250881
|
+
//# debugId=29B3A9446AA5803764756E2164756E21
|