@wraps.dev/cli 2.17.16 → 2.17.17
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.js +10 -3
- package/dist/cli.js.map +1 -1
- package/dist/console/assets/{index-CNn3fWLq.js → index-41T2hONy.js} +45 -45
- package/dist/console/index.html +1 -1
- package/dist/lambda/event-processor/.bundled +1 -1
- package/dist/lambda/inbound-processor/.bundled +1 -1
- package/dist/lambda/sms-event-processor/.bundled +1 -1
- package/package.json +16 -4
package/dist/cli.js
CHANGED
|
@@ -28156,6 +28156,7 @@ import pc36 from "picocolors";
|
|
|
28156
28156
|
init_events();
|
|
28157
28157
|
init_aws();
|
|
28158
28158
|
init_config();
|
|
28159
|
+
init_errors();
|
|
28159
28160
|
init_fs();
|
|
28160
28161
|
init_json_output();
|
|
28161
28162
|
init_metadata();
|
|
@@ -28681,7 +28682,7 @@ You can try the manual flow: ${pc36.cyan("wraps auth logout")} then ${pc36.cyan(
|
|
|
28681
28682
|
const duration = Date.now() - startTime;
|
|
28682
28683
|
const errorCode = error instanceof Error ? error.name : "UNKNOWN_ERROR";
|
|
28683
28684
|
trackError(errorCode, "platform:connect", {
|
|
28684
|
-
message:
|
|
28685
|
+
message: sanitizeErrorMessage(error)
|
|
28685
28686
|
});
|
|
28686
28687
|
trackCommand("platform:connect", {
|
|
28687
28688
|
success: false,
|
|
@@ -28959,7 +28960,7 @@ ${pc36.bold("Next Steps:")}`);
|
|
|
28959
28960
|
const duration = Date.now() - startTime;
|
|
28960
28961
|
const errorCode = error instanceof Error ? error.name : "UNKNOWN_ERROR";
|
|
28961
28962
|
trackError(errorCode, "platform:connect", {
|
|
28962
|
-
message:
|
|
28963
|
+
message: sanitizeErrorMessage(error)
|
|
28963
28964
|
});
|
|
28964
28965
|
trackCommand("platform:connect", {
|
|
28965
28966
|
success: false,
|
|
@@ -29431,10 +29432,16 @@ import { createHttpTerminator } from "http-terminator";
|
|
|
29431
29432
|
|
|
29432
29433
|
// src/console/middleware/auth.ts
|
|
29433
29434
|
init_esm_shims();
|
|
29435
|
+
import { timingSafeEqual } from "crypto";
|
|
29434
29436
|
function authenticateToken(expectedToken) {
|
|
29435
29437
|
return (req, res, next) => {
|
|
29436
29438
|
const token = req.query.token || req.headers["x-auth-token"];
|
|
29437
|
-
if (!token
|
|
29439
|
+
if (!token) {
|
|
29440
|
+
return res.status(401).json({ error: "Unauthorized" });
|
|
29441
|
+
}
|
|
29442
|
+
const expectedBuf = Buffer.from(expectedToken);
|
|
29443
|
+
const tokenBuf = Buffer.from(token);
|
|
29444
|
+
if (expectedBuf.length !== tokenBuf.length || !timingSafeEqual(expectedBuf, tokenBuf)) {
|
|
29438
29445
|
return res.status(401).json({ error: "Unauthorized" });
|
|
29439
29446
|
}
|
|
29440
29447
|
next();
|