Skip to content

Commit 4d0c924

Browse files
Merge branch 'main' into github_sponsors
Signed-off-by: Brian Muenzenmeyer <[email protected]>
2 parents dfdf2ab + 9f2faa6 commit 4d0c924

92 files changed

Lines changed: 1601 additions & 2227 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/request-codeowner-review.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/sync-orama.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/tmp-cloudflare-open-next-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ jobs:
6666
env:
6767
CF_WORKERS_SCRIPTS_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
6868
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
69-
CLOUDFLARE_ACCOUNT_ID: fb4a2d0f103c6ff38854ac69eb709272
69+
CLOUDFLARE_ACCOUNT_ID: 07be8d2fbc940503ca1be344714cb0d1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ package-lock.json
1212
apps/site/.next
1313
apps/site/build
1414
apps/site/public/blog-data.json
15+
apps/site/next-env.d.ts
1516

1617
# Test Runner
1718
junit.xml

apps/site/app/robots.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { BASE_URL } from '#site/next.constants.mjs';
2+
13
import type { MetadataRoute } from 'next';
24

35
// This allows us to generate a `robots.txt` file dynamically based on the needs of the Node.js Website
@@ -10,6 +12,7 @@ const robots = (): MetadataRoute.Robots => ({
1012
allow: ['/dist/latest/', '/dist/latest/docs/api/', '/api/'],
1113
},
1214
],
15+
sitemap: [`${BASE_URL}/sitemap.xml`, `${BASE_URL}/learn/sitemap.xml`],
1316
});
1417

1518
export default robots;
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Note: this custom worker-entrypoint is used so that the worker can include sentry support
2+
// and it has been written by following:
3+
// - the official open-next docs: https://opennext.js.org/cloudflare/howtos/custom-worker
4+
// - the official sentry docs: https://docs.sentry.io/platforms/javascript/guides/cloudflare
5+
6+
import { setTags, withSentry } from '@sentry/cloudflare';
7+
8+
import type {
9+
ExecutionContext,
10+
Iso3166Alpha2Code,
11+
Request,
12+
} from '@cloudflare/workers-types';
13+
14+
import { default as handler } from '../.open-next/worker.js';
15+
16+
export default withSentry(
17+
(env: {
18+
/**
19+
* Sentry DSN, used for error monitoring
20+
* If missing, Sentry isn't used
21+
*/
22+
SENTRY_DSN?: string;
23+
}) => ({
24+
dsn: env.SENTRY_DSN,
25+
// Enable logs to be sent to Sentry
26+
enableLogs: true,
27+
// Set tracesSampleRate to 0.05 to capture 5% of spans for tracing.
28+
// Learn more at
29+
// https://docs.sentry.io/platforms/javascript/guides/cloudflare/configuration/options/#tracesSampleRate
30+
tracesSampleRate: 0.05,
31+
}),
32+
{
33+
async fetch(
34+
request: Request,
35+
env: Record<string, unknown>,
36+
ctx: ExecutionContext
37+
) {
38+
setTags({
39+
request_id: crypto.randomUUID(),
40+
user_agent: request.headers.get('user-agent'),
41+
ray_id: request.headers.get('cf-ray'),
42+
43+
// Type casts needed to keep lsp happy
44+
ip_country: request.cf?.country as Iso3166Alpha2Code | undefined,
45+
colo: request.cf?.colo as string | undefined,
46+
});
47+
48+
return handler.fetch(request, env, ctx);
49+
},
50+
}
51+
);
52+
53+
export { DOQueueHandler } from '../.open-next/worker.js';

apps/site/components/Common/Searchbox/ChatInteractions/index.module.css

Lines changed: 0 additions & 65 deletions
This file was deleted.

apps/site/components/Common/Searchbox/ChatInteractions/index.tsx

Lines changed: 0 additions & 48 deletions
This file was deleted.

apps/site/components/Common/Searchbox/ChatMessage/index.module.css

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)