@dashai/cli 0.2.4 → 0.2.5
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/bin.js +9 -4
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1571,13 +1571,18 @@ export async function GET(request: Request) {
|
|
|
1571
1571
|
`;
|
|
1572
1572
|
}
|
|
1573
1573
|
function appApiAuthSignOutTs() {
|
|
1574
|
-
return `// /api/auth/sign-out \u2014 best-effort backend revoke + cookie clear
|
|
1574
|
+
return `// /api/auth/sign-out \u2014 best-effort backend revoke + cookie clear,
|
|
1575
|
+
// then redirect to / so the browser actually navigates somewhere
|
|
1576
|
+
// after the form POST. A 204 here would leave the user staring at
|
|
1577
|
+
// /dashboard with stale-rendered HTML \u2014 the cookie WAS cleared but
|
|
1578
|
+
// they'd think nothing happened. 303 See Other forces the browser
|
|
1579
|
+
// to follow with GET (not re-POST), landing on the public '/' page.
|
|
1575
1580
|
import { NextResponse } from 'next/server';
|
|
1576
1581
|
import { signOut } from '@dashai/sdk/auth/server';
|
|
1577
1582
|
|
|
1578
|
-
export async function POST() {
|
|
1583
|
+
export async function POST(request: Request) {
|
|
1579
1584
|
await signOut();
|
|
1580
|
-
return new
|
|
1585
|
+
return NextResponse.redirect(new URL('/', request.url), 303);
|
|
1581
1586
|
}
|
|
1582
1587
|
`;
|
|
1583
1588
|
}
|
|
@@ -4495,7 +4500,7 @@ moduleCmd.command("action-log").description(
|
|
|
4495
4500
|
}
|
|
4496
4501
|
})();
|
|
4497
4502
|
function getVersion() {
|
|
4498
|
-
return "0.2.
|
|
4503
|
+
return "0.2.5";
|
|
4499
4504
|
}
|
|
4500
4505
|
function parseIntOption(value) {
|
|
4501
4506
|
const n = Number.parseInt(value, 10);
|