@elysiumjs/plugin-sentry 0.1.0 → 0.1.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/.turbo/turbo-build.log +8 -0
- package/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +2 -0
- package/package.json +17 -12
- package/{index.ts → src/index.ts} +14 -0
- package/tsconfig.json +12 -0
package/CHANGELOG.md
ADDED
package/README.md
CHANGED
|
@@ -33,4 +33,4 @@ This plugin forwards all options to the Sentry initialization method. You can fi
|
|
|
33
33
|
|
|
34
34
|
## License
|
|
35
35
|
|
|
36
|
-
This project is licensed under the terms of the [Apache License 2.0](LICENSE).
|
|
36
|
+
This project is licensed under the terms of the [Apache License 2.0](../../LICENSE).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ElysiumPlugin } from '@elysiumjs/core';
|
|
2
|
+
import * as Sentry from '@sentry/bun';
|
|
3
|
+
/**
|
|
4
|
+
* Elysium plugin for Sentry integration.
|
|
5
|
+
* @author Axel Nana <axel.nana@workbud.com>
|
|
6
|
+
* @param options Plugin options.
|
|
7
|
+
*/
|
|
8
|
+
export declare const plugin: (options?: Sentry.BunOptions) => ElysiumPlugin;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{opentelemetry as A}from"@elysiajs/opentelemetry";import{Env as w}from"@elysiumjs/core";import*as f from"@sentry/bun";import{Elysia as B}from"elysia";var R=(g)=>{return async(C)=>{let h=g?.dsn??w.get("SENTRY_DSN");if(!h)throw Error("Must provide a DSN");let z=g?.environment??w.get("SENTRY_ENVIRONMENT");return f.init({dsn:h,environment:z,tracesSampleRate:1,integrations:[f.bunServerIntegration(),f.onUnhandledRejectionIntegration({mode:"warn"}),f.onUncaughtExceptionIntegration()],...g}),new B({name:"@elysiumjs/plugin-sentry"}).decorate("Sentry",f).use(A({serviceName:g?.serverName})).onError({as:"global"},({error:k,Sentry:q})=>{q.captureException(k)}).onAfterResponse({as:"global"},function({body:q,cookie:D,params:F,request:G,response:H,route:I,server:J,store:K,headers:L,path:M,query:N}){})}};export{R as plugin};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elysiumjs/plugin-sentry",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Sentry error reporting plugin for the Elysium.js framework.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Axel Nana",
|
|
@@ -10,11 +10,17 @@
|
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "https://github.com/
|
|
13
|
+
"url": "https://github.com/workbud/elysium"
|
|
14
14
|
},
|
|
15
|
-
"homepage": "https://github.com/
|
|
15
|
+
"homepage": "https://github.com/workbud/elysium",
|
|
16
16
|
"scripts": {
|
|
17
|
-
"format": "prettier --write \"./src/**/*.ts\""
|
|
17
|
+
"format": "prettier --write \"./src/**/*.ts\"",
|
|
18
|
+
"clean": "rimraf dist",
|
|
19
|
+
"build:js": "bun build ./src/index.ts --outdir ./dist --target bun --packages external --root ./src --minify",
|
|
20
|
+
"build:ts": "tsc",
|
|
21
|
+
"build": "bun run clean && bun run build:js && bun run build:ts",
|
|
22
|
+
"typecheck": "tsc --noEmit",
|
|
23
|
+
"prepublishOnly": "bun run build"
|
|
18
24
|
},
|
|
19
25
|
"keywords": [
|
|
20
26
|
"elysium",
|
|
@@ -27,17 +33,16 @@
|
|
|
27
33
|
"reporting"
|
|
28
34
|
],
|
|
29
35
|
"type": "module",
|
|
30
|
-
"module": "index.
|
|
36
|
+
"module": "dist/index.js",
|
|
37
|
+
"types": "dist/index.d.ts",
|
|
31
38
|
"devDependencies": {
|
|
32
|
-
"@
|
|
33
|
-
"@types/bun": "latest"
|
|
39
|
+
"@elysiumjs/core": "workspace:*"
|
|
34
40
|
},
|
|
35
41
|
"peerDependencies": {
|
|
36
|
-
"@elysiumjs/core": "
|
|
37
|
-
"typescript": "^5.8.3"
|
|
42
|
+
"@elysiumjs/core": "workspace:^"
|
|
38
43
|
},
|
|
39
44
|
"dependencies": {
|
|
40
|
-
"@elysiajs/opentelemetry": "^1.
|
|
41
|
-
"@sentry/bun": "^
|
|
45
|
+
"@elysiajs/opentelemetry": "^1.4.0",
|
|
46
|
+
"@sentry/bun": "^10.17.0"
|
|
42
47
|
}
|
|
43
48
|
}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
// Copyright (c) 2025-present Workbud Technologies Inc. All rights reserved.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
1
15
|
import type { Application, ElysiumPlugin } from '@elysiumjs/core';
|
|
2
16
|
|
|
3
17
|
import { opentelemetry } from '@elysiajs/opentelemetry';
|
package/tsconfig.json
ADDED