@tekibo/feedpulse-sdk 0.6.0 → 0.6.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/README.md +4 -4
- package/package.json +1 -1
- package/templates/nextjs-proxy.ts +6 -3
package/README.md
CHANGED
|
@@ -63,10 +63,10 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
|
|
63
63
|
|
|
64
64
|
```ts
|
|
65
65
|
type FeedPulseConfig = {
|
|
66
|
-
proxyEndpoint?: string
|
|
67
|
-
batchInterval?: number
|
|
68
|
-
debug?: boolean
|
|
69
|
-
}
|
|
66
|
+
proxyEndpoint?: string;
|
|
67
|
+
batchInterval?: number;
|
|
68
|
+
debug?: boolean;
|
|
69
|
+
};
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
## What is tracked
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { NextRequest
|
|
1
|
+
import type { NextRequest } from "next/server";
|
|
2
|
+
|
|
3
|
+
import { NextResponse } from "next/server";
|
|
2
4
|
|
|
3
5
|
export async function POST(request: NextRequest) {
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
+
const env = (globalThis as { process?: { env?: Record<string, string | undefined> } }).process?.env ?? {};
|
|
7
|
+
const apiKey = env.FEEDPULSE_API_KEY;
|
|
8
|
+
const workerUrl = env.FEEDPULSE_WORKER_URL || "https://feedpulse-workers.tekibohelp.workers.dev/ingest";
|
|
6
9
|
|
|
7
10
|
if (!apiKey) {
|
|
8
11
|
return NextResponse.json(
|