@vellumai/cli 0.10.1-dev.202606240206.7c2bca6 → 0.10.1-staging.1
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/package.json +1 -1
- package/src/commands/client.ts +4 -17
- package/src/lib/confirm-action.ts +0 -4
package/package.json
CHANGED
package/src/commands/client.ts
CHANGED
|
@@ -895,27 +895,14 @@ async function runWebInterface(
|
|
|
895
895
|
headers.delete("Origin");
|
|
896
896
|
headers.delete("Referer");
|
|
897
897
|
|
|
898
|
-
//
|
|
899
|
-
//
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
// Authenticate with the loopback session token the SPA registered. Only
|
|
898
|
+
// Authenticate with the loopback session token the SPA registered. The
|
|
899
|
+
// platform expects it both as the Django session cookie and as
|
|
900
|
+
// X-Session-Token (for DRF views that accept header-based auth). Only
|
|
903
901
|
// same-origin SPA traffic gets the credential — never a cross-site caller.
|
|
904
902
|
const sessionToken = isSameOriginRequest(req)
|
|
905
903
|
? currentPlatformToken()
|
|
906
904
|
: null;
|
|
907
|
-
if (
|
|
908
|
-
// Header-only auth for the DRF API. Sending a `sessionid` cookie would
|
|
909
|
-
// engage Django's SessionAuthentication, which enforces CSRF — and the
|
|
910
|
-
// proxy strips Origin/Referer above, so the CSRF Referer check would
|
|
911
|
-
// reject every unsafe (POST/PUT/PATCH) request. Drop any browser cookie
|
|
912
|
-
// (localhost jar) so it can't re-engage that path.
|
|
913
|
-
headers.delete("Cookie");
|
|
914
|
-
if (sessionToken) {
|
|
915
|
-
headers.set("X-Session-Token", sessionToken);
|
|
916
|
-
}
|
|
917
|
-
} else if (sessionToken) {
|
|
918
|
-
// allauth / accounts: the platform expects the Django session cookie.
|
|
905
|
+
if (sessionToken) {
|
|
919
906
|
headers.set(
|
|
920
907
|
"Cookie",
|
|
921
908
|
`sessionid=${sessionToken}; __Secure-sessionid=${sessionToken}`,
|
|
@@ -18,9 +18,6 @@ export function canPromptForConfirmation(): boolean {
|
|
|
18
18
|
* Show `prompt` and resolve true on Enter, false on Esc/q/Ctrl-C. Restores the
|
|
19
19
|
* prior stdin raw/paused state on exit. Caller must gate on
|
|
20
20
|
* {@link canPromptForConfirmation} first.
|
|
21
|
-
*
|
|
22
|
-
* `unref()`s stdin on cleanup so the resumed handle doesn't keep the process
|
|
23
|
-
* alive after the prompt resolves.
|
|
24
21
|
*/
|
|
25
22
|
export async function confirmAction(prompt: string): Promise<boolean> {
|
|
26
23
|
const stdin = process.stdin;
|
|
@@ -39,7 +36,6 @@ export async function confirmAction(prompt: string): Promise<boolean> {
|
|
|
39
36
|
if (wasPaused) {
|
|
40
37
|
stdin.pause();
|
|
41
38
|
}
|
|
42
|
-
stdin.unref?.();
|
|
43
39
|
stdout.write("\n");
|
|
44
40
|
};
|
|
45
41
|
|