mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-30 08:04:18 +00:00
chore: temporarily remove logsnag (#91)
This commit is contained in:
@@ -23,21 +23,6 @@ async function copyToClipboardWithMeta(
|
||||
meta?: Record<string, unknown>
|
||||
) {
|
||||
navigator.clipboard.writeText(value)
|
||||
|
||||
if (meta) {
|
||||
await fetch("/api/log", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({
|
||||
event: "copy_primitive",
|
||||
data: {
|
||||
primitive: meta?.component,
|
||||
},
|
||||
}),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export function CopyButton({
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
"clsx": "^1.2.1",
|
||||
"cmdk": "^0.1.21",
|
||||
"contentlayer": "^0.3.0",
|
||||
"logsnag": "^0.1.6",
|
||||
"lucide-react": "0.105.0-alpha.4",
|
||||
"next": "^13.1.6",
|
||||
"next-contentlayer": "^0.3.0",
|
||||
|
||||
0
apps/www/pages/api/.gitkeep
Normal file
0
apps/www/pages/api/.gitkeep
Normal file
@@ -1,35 +0,0 @@
|
||||
import { NextApiRequest, NextApiResponse } from "next"
|
||||
import LogSnag from "logsnag"
|
||||
|
||||
import { logSchema } from "@/lib/validations/log"
|
||||
|
||||
const logsnag = new LogSnag({
|
||||
token: process.env.LOGSNAG_TOKEN || "",
|
||||
project: "ui",
|
||||
})
|
||||
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse
|
||||
) {
|
||||
if (req.method !== "POST") {
|
||||
return res.status(405).end()
|
||||
}
|
||||
|
||||
try {
|
||||
const log = logSchema.parse(req.body)
|
||||
|
||||
await logsnag.publish({
|
||||
channel: "copy-code",
|
||||
event: log.event,
|
||||
tags: {
|
||||
...log.data,
|
||||
},
|
||||
})
|
||||
|
||||
return res.end()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
return res.status(400).end()
|
||||
}
|
||||
}
|
||||
71
pnpm-lock.yaml
generated
71
pnpm-lock.yaml
generated
@@ -94,7 +94,6 @@ importers:
|
||||
contentlayer: ^0.3.0
|
||||
esbuild: ^0.17.3
|
||||
eslint: 7.32.0
|
||||
logsnag: ^0.1.6
|
||||
lucide-react: 0.105.0-alpha.4
|
||||
mdast-util-toc: ^6.1.0
|
||||
next: ^13.1.6
|
||||
@@ -155,7 +154,6 @@ importers:
|
||||
clsx: 1.2.1
|
||||
cmdk: 0.1.21_ib3m5ricvtkl2cll7qpr2f6lvq
|
||||
contentlayer: 0.3.0_esbuild@0.17.3
|
||||
logsnag: 0.1.6
|
||||
lucide-react: 0.105.0-alpha.4_react@18.2.0
|
||||
next: 13.1.6_biqbaboplfbrettd7655fr4n2y
|
||||
next-contentlayer: 0.3.0_as22kstmd5fdgoopsr5hyah3ym
|
||||
@@ -6852,18 +6850,6 @@ packages:
|
||||
integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==,
|
||||
}
|
||||
|
||||
/isomorphic-fetch/3.0.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-qvUtwJ3j6qwsF3jLxkZ72qCgjMysPzDfeV240JHiGZsANBYd+EEuu35v7dfrJ9Up0Ak07D7GGSkGhCHTqg/5wA==,
|
||||
}
|
||||
dependencies:
|
||||
node-fetch: 2.6.8
|
||||
whatwg-fetch: 3.6.2
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: false
|
||||
|
||||
/javascript-natural-sort/0.7.1:
|
||||
resolution:
|
||||
{
|
||||
@@ -7160,17 +7146,6 @@ packages:
|
||||
}
|
||||
dev: true
|
||||
|
||||
/logsnag/0.1.6:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-87n8OiVNSNIJfg/HiIfpu2X5gM55XWKMbpa/aGNbjOxblZqZTQjCWfpce6HXGpDcC7svD0j4tEIzZe+l7YtPsg==,
|
||||
}
|
||||
dependencies:
|
||||
isomorphic-fetch: 3.0.0
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: false
|
||||
|
||||
/long/4.0.0:
|
||||
resolution:
|
||||
{
|
||||
@@ -8300,21 +8275,6 @@ packages:
|
||||
engines: { node: ">=10.5.0" }
|
||||
dev: false
|
||||
|
||||
/node-fetch/2.6.8:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==,
|
||||
}
|
||||
engines: { node: 4.x || >=6.0.0 }
|
||||
peerDependencies:
|
||||
encoding: ^0.1.0
|
||||
peerDependenciesMeta:
|
||||
encoding:
|
||||
optional: true
|
||||
dependencies:
|
||||
whatwg-url: 5.0.0
|
||||
dev: false
|
||||
|
||||
/node-fetch/3.3.0:
|
||||
resolution:
|
||||
{
|
||||
@@ -10177,13 +10137,6 @@ packages:
|
||||
}
|
||||
dev: false
|
||||
|
||||
/tr46/0.0.3:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==,
|
||||
}
|
||||
dev: false
|
||||
|
||||
/trim-lines/3.0.1:
|
||||
resolution:
|
||||
{
|
||||
@@ -10822,30 +10775,6 @@ packages:
|
||||
engines: { node: ">= 8" }
|
||||
dev: false
|
||||
|
||||
/webidl-conversions/3.0.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==,
|
||||
}
|
||||
dev: false
|
||||
|
||||
/whatwg-fetch/3.6.2:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==,
|
||||
}
|
||||
dev: false
|
||||
|
||||
/whatwg-url/5.0.0:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==,
|
||||
}
|
||||
dependencies:
|
||||
tr46: 0.0.3
|
||||
webidl-conversions: 3.0.1
|
||||
dev: false
|
||||
|
||||
/which-boxed-primitive/1.0.2:
|
||||
resolution:
|
||||
{
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
"env": [
|
||||
"NEXT_PUBLIC_APP_URL",
|
||||
"UPSTASH_REDIS_REST_URL",
|
||||
"UPSTASH_REDIS_REST_TOKEN",
|
||||
"LOGSNAG_TOKEN"
|
||||
"UPSTASH_REDIS_REST_TOKEN"
|
||||
],
|
||||
"outputs": ["dist/**", ".next/**"]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user