Skip to content

Commit 8896f0a

Browse files
committed
- This example for Workers Observability serves as a template for other Cloudflare services to deploy their own mcp servers with.
- Authenticates users through Cloudflare oauth
1 parent d11c245 commit 8896f0a

File tree

102 files changed

+13149
-20125
lines changed

Some content is hidden

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

102 files changed

+13149
-20125
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = tab
8+
indent_size = 2
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
14+
[*.{yml,yaml,mdx}]
15+
indent_style = space

.eslintrc.cjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// This configuration only applies to the package manager root.
2+
/** @type {import("eslint").Linter.Config} */
3+
module.exports = {
4+
ignorePatterns: [
5+
'apps/**',
6+
'packages/**',
7+
],
8+
extends: ['@repo/eslint-config/default.cjs']
9+
}

.gitignore

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,50 @@
1-
node_modules/
2-
.windsurfrules
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
# Wrangler
3+
.wrangler
4+
.dev.vars
5+
6+
# Astro generated types
7+
.astro/
8+
9+
# Dependencies
10+
node_modules
11+
.pnp
12+
.pnp.js
13+
14+
.eslintcache
15+
16+
# Local env files
317
.env
18+
.env.local
19+
.env.development.local
20+
.env.test.local
21+
.env.production.local
22+
.secret
423
*.env
5-
dist/
6-
*.log
24+
25+
# Testing
26+
coverage
27+
28+
# Turbo
29+
.turbo
30+
31+
# Vercel
32+
.vercel
33+
34+
# Build Outputs
35+
.next/
36+
out/
37+
dist
38+
dist2
39+
40+
# Debug
41+
npm-debug.log*
42+
yarn-debug.log*
43+
yarn-error.log*
44+
45+
# Misc
746
.DS_Store
8-
*.backup
9-
/tmp
47+
*.pem
48+
.sentryclirc.lock/
49+
tmp.json
50+
tmp.ts

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
auto-install-peers=true
2+
public-hoist-pattern[]=*eslint*
3+
public-hoist-pattern[]=*prettier*

.prettierignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
*.md
2-
*.yaml
1+
.changeset
2+
pnpm-lock.yaml
3+
vitest.config.ts.timestamp*
4+
vite.config.ts.timestamp*
5+
worker-configuration.d.ts
6+
**/dist/**

.prettierrc

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

.prettierrc.cjs

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// @ts-check
2+
3+
const codeImports = [
4+
// Groups
5+
'<BUILTIN_MODULES>',
6+
'<THIRD_PARTY_MODULES>',
7+
'',
8+
'^(@repo)(/.*)$', // Workspace imports
9+
'',
10+
// Local (relative) imports
11+
'^[.]{2}$', // ..
12+
'^[.]{2}/', // ../
13+
'^[.]/(?!index)', // ./foo (but not ./index)
14+
'^[.]$', // .
15+
'^[.]/index$', // ./index
16+
'',
17+
]
18+
19+
// Type imports are ordered the same way, but without separators.
20+
// We also need a catch-all <TYPES> here to prevent prettier from failing.
21+
const typeImports = ['<TYPES>'].concat(
22+
codeImports.filter((i) => i !== '').map((i) => `<TYPES>${i}`)
23+
)
24+
25+
/** @type {import("prettier").Config} */
26+
const config = {
27+
trailingComma: 'es5',
28+
tabWidth: 2,
29+
useTabs: true,
30+
semi: false,
31+
singleQuote: true,
32+
printWidth: 100,
33+
plugins: [
34+
'@ianvs/prettier-plugin-sort-imports',
35+
'prettier-plugin-packagejson',
36+
'prettier-plugin-astro',
37+
'prettier-plugin-tailwindcss',
38+
],
39+
importOrder: [...codeImports, ...typeImports],
40+
importOrderTypeScriptVersion: '5.5.4',
41+
overrides: [
42+
{
43+
files: '*.mdx',
44+
options: {
45+
parser: 'mdx',
46+
},
47+
},
48+
{
49+
files: ['*.jsonc', '*.code-workspace'],
50+
options: {
51+
trailingComma: 'none',
52+
},
53+
},
54+
],
55+
}
56+
57+
module.exports = config

.syncpackrc.cjs

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// @ts-check
2+
/** @type {import("syncpack").RcFile} */
3+
const config = {
4+
indent: '\t',
5+
lintFormatting: false, // handled by prettier
6+
versionGroups: [
7+
{
8+
label: 'local packages',
9+
packages: ['**'],
10+
dependencies: ['@repo/*'],
11+
dependencyTypes: ['!local'], // Exclude the local package itself
12+
pinVersion: 'workspace:*',
13+
},
14+
{
15+
label: 'Sentry types that are compatible with toucan-js',
16+
dependencies: ['@sentry/types', '@sentry/tracing'],
17+
pinVersion: '7.76.0',
18+
},
19+
{
20+
label: 'toucan-js that is compatible with pinned sentry types',
21+
dependencies: ['toucan-js'],
22+
pinVersion: '3.3.1',
23+
},
24+
{
25+
label: 'pin vitest compatible with @cloudflare/vitest-pool-workers',
26+
dependencies: ['vitest', '@vitest/ui'],
27+
pinVersion: '3.0.9',
28+
},
29+
{
30+
label: 'pin typescript for eslint',
31+
dependencies: ['typescript'],
32+
pinVersion: '5.5.4',
33+
},
34+
{
35+
label: `pin eslint and all it's plugins for eslint v8`,
36+
dependencies: [
37+
'eslint',
38+
'@types/eslint',
39+
'eslint-config-prettier',
40+
'eslint-plugin-react-hooks',
41+
'eslint-plugin-unused-imports',
42+
'@typescript-eslint/eslint-plugin',
43+
'@typescript-eslint/parser',
44+
],
45+
// snapTo removes it from syncpack update list, which is the main goal
46+
snapTo: ['@repo/eslint-config'],
47+
},
48+
],
49+
semverGroups: [
50+
{
51+
label: 'pin all deps',
52+
range: '',
53+
dependencies: ['**'],
54+
packages: ['**'],
55+
},
56+
],
57+
}
58+
59+
module.exports = config

0 commit comments

Comments
 (0)