routesync 1.0.9 → 1.0.10
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 +2 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -8785,10 +8785,10 @@ var NextActionGenerator = class {
|
|
|
8785
8785
|
lines.push(`import { cookies } from 'next/headers'`);
|
|
8786
8786
|
lines.push(``);
|
|
8787
8787
|
lines.push(`// Helper to auto-inject token from cookies if available`);
|
|
8788
|
-
lines.push(`async function getAuthHeaders() {`);
|
|
8788
|
+
lines.push(`async function getAuthHeaders(): Promise<Record<string, string> | undefined> {`);
|
|
8789
8789
|
lines.push(` const cookieStore = await cookies()`);
|
|
8790
8790
|
lines.push(` const token = cookieStore.get('token')?.value`);
|
|
8791
|
-
lines.push(` return token ? { Authorization: \`Bearer \${token}\` } :
|
|
8791
|
+
lines.push(` return token ? { Authorization: \`Bearer \${token}\` } : undefined`);
|
|
8792
8792
|
lines.push(`}`);
|
|
8793
8793
|
lines.push(``);
|
|
8794
8794
|
const grouped = buildGeneratedRoutes(manifest.routes);
|