@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.
@@ -0,0 +1,8 @@
1
+ $ bun run clean && bun run build:js && bun run build:ts
2
+ $ rimraf dist
3
+ $ bun build ./src/index.ts --outdir ./dist --target bun --packages external --root ./src --minify
4
+ Bundled 1 module in 6ms
5
+
6
+ index.js 0.83 KB (entry point)
7
+
8
+ $ tsc
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @elysiumjs/plugin-sentry
2
+
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Move plugin entry point to `src/` directory for consistent project structure.
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).
@@ -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.0",
3
+ "version": "0.1.1",
4
4
  "license": "Apache-2.0",
5
- "description": "The CLI tool for the Elysium framework.",
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/Workerly/elysium"
13
+ "url": "https://github.com/workbud/elysium"
14
14
  },
15
- "homepage": "https://github.com/Workerly/elysium",
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.ts",
36
+ "module": "dist/index.js",
37
+ "types": "dist/index.d.ts",
31
38
  "devDependencies": {
32
- "@ianvs/prettier-plugin-sort-imports": "^4.4.1",
33
- "@types/bun": "latest"
39
+ "@elysiumjs/core": "workspace:*"
34
40
  },
35
41
  "peerDependencies": {
36
- "@elysiumjs/core": "latest",
37
- "typescript": "^5.8.3"
42
+ "@elysiumjs/core": "workspace:^"
38
43
  },
39
44
  "dependencies": {
40
- "@elysiajs/opentelemetry": "^1.2.0",
41
- "@sentry/bun": "^9.14.0"
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
@@ -0,0 +1,12 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist",
5
+ "declaration": true,
6
+ "emitDeclarationOnly": true,
7
+ "declarationMap": false,
8
+ "declarationDir": "dist",
9
+ "rootDir": "src"
10
+ },
11
+ "include": ["src"]
12
+ }