From 639b22781ba52acab14350163978795afe1d4352 Mon Sep 17 00:00:00 2001 From: taskylizard <75871323+taskylizard@users.noreply.github.com> Date: Fri, 27 Jun 2025 23:01:52 +0000 Subject: [PATCH] more stuf --- api/README.md | 2 +- api/middleware/cors.ts | 16 ----- api/middleware/ratelimit.ts | 17 +---- api/routes/feedback.post.ts | 21 +----- api/routes/index.ts | 15 ---- api/routes/single-page.ts | 15 ---- api/worker-configuration.d.ts | 15 ---- nitro.config.ts | 16 ----- unocss.config.ts | 16 ----- website/theme/components/Feedback.vue | 91 ++++++++----------------- website/{types/Feedback.ts => types.ts} | 0 11 files changed, 31 insertions(+), 193 deletions(-) rename website/{types/Feedback.ts => types.ts} (100%) diff --git a/api/README.md b/api/README.md index eb28136e6..b0bc93172 100644 --- a/api/README.md +++ b/api/README.md @@ -1,3 +1,3 @@ This is the API for the website and other related services. -Licensed under the Apache License v2.0, see [LICENSE](../docs/.vitepress/LICENSE) for more information. +Copyright (c) 2025 taskylizard. All Rights Reserved. diff --git a/api/middleware/cors.ts b/api/middleware/cors.ts index 801fb83cb..4e8af9dd1 100644 --- a/api/middleware/cors.ts +++ b/api/middleware/cors.ts @@ -1,19 +1,3 @@ -/** - * Copyright (c) 2025 taskylizard. Apache License 2.0. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { corsEventHandler } from 'nitro-cors' export default corsEventHandler( diff --git a/api/middleware/ratelimit.ts b/api/middleware/ratelimit.ts index 6b6628d9c..ffbbe1b7a 100644 --- a/api/middleware/ratelimit.ts +++ b/api/middleware/ratelimit.ts @@ -1,18 +1,3 @@ -/** - * Copyright (c) 2025 taskylizard. Apache License 2.0. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ export default defineEventHandler(async (event) => { const { cloudflare } = event.context @@ -21,7 +6,7 @@ export default defineEventHandler(async (event) => { // or when using privacy-enabling proxies const ipAddress = getHeader(event, 'CF-Connecting-IP') ?? '' - const { success } = await // KILL YOURSELF + const { success } = await // im gonna kms (cloudflare.env as unknown as Env).RATE_LIMITER.limit({ key: ipAddress }) diff --git a/api/routes/feedback.post.ts b/api/routes/feedback.post.ts index 34b78218f..c1e93eca5 100644 --- a/api/routes/feedback.post.ts +++ b/api/routes/feedback.post.ts @@ -1,24 +1,5 @@ -/** - * Copyright (c) 2025 taskylizard. Apache License 2.0. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { fetcher } from 'itty-fetcher' -import { - FeedbackSchema, - getFeedbackOption -} from '../../docs/.vitepress/types/Feedback' +import { FeedbackSchema, getFeedbackOption } from '../../website/types' export default defineEventHandler(async (event) => { const { message, page, type, heading } = await readValidatedBody( diff --git a/api/routes/index.ts b/api/routes/index.ts index 4d2c0440a..cb36c7c7a 100644 --- a/api/routes/index.ts +++ b/api/routes/index.ts @@ -1,18 +1,3 @@ -/** - * Copyright (c) 2025 taskylizard. Apache License 2.0. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ export default eventHandler(() => { return { nitro: 'works' } }) diff --git a/api/routes/single-page.ts b/api/routes/single-page.ts index 8561406bc..f26067271 100644 --- a/api/routes/single-page.ts +++ b/api/routes/single-page.ts @@ -1,18 +1,3 @@ -/** - * Copyright (c) 2025 taskylizard. Apache License 2.0. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ const files = ( [ 'adblockvpnguide.md', diff --git a/api/worker-configuration.d.ts b/api/worker-configuration.d.ts index a4ffc8a3a..15f3cccf9 100644 --- a/api/worker-configuration.d.ts +++ b/api/worker-configuration.d.ts @@ -1,18 +1,3 @@ -/** - * Copyright (c) 2025 taskylizard. Apache License 2.0. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ // Generated by Wrangler by running `wrangler types api/worker-configuration.d.ts` interface Env { diff --git a/nitro.config.ts b/nitro.config.ts index e3af5e45d..4fe8674ef 100644 --- a/nitro.config.ts +++ b/nitro.config.ts @@ -1,19 +1,3 @@ -/** - * Copyright (c) 2025 taskylizard. Apache License 2.0. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import nitroCloudflareBindings from 'nitro-cloudflare-dev' import { defineNitroConfig } from 'nitropack/config' diff --git a/unocss.config.ts b/unocss.config.ts index 5c15a2253..e95968e22 100644 --- a/unocss.config.ts +++ b/unocss.config.ts @@ -1,19 +1,3 @@ -/** - * Copyright (c) 2025 taskylizard. Apache License 2.0. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import type { Rule } from 'unocss' import { colors, shortcuts } from '@fmhy/colors' import { diff --git a/website/theme/components/Feedback.vue b/website/theme/components/Feedback.vue index cd4f93d7d..6c2e1e911 100644 --- a/website/theme/components/Feedback.vue +++ b/website/theme/components/Feedback.vue @@ -1,8 +1,8 @@