@lowerdeck/sentry 1.0.0 → 1.0.2

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/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # `@lowerdeck/sentry`
2
+
3
+ Lightweight wrapper for managing Sentry instances across your application. Provides a global reference that can be configured and accessed throughout your codebase.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @lowerdeck/sentry
9
+ yarn add @lowerdeck/sentry
10
+ bun add @lowerdeck/sentry
11
+ pnpm add @lowerdeck/sentry
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```typescript
17
+ import { setSentry, getSentry } from '@lowerdeck/sentry';
18
+ import * as Sentry from '@sentry/node';
19
+
20
+ // Initialize Sentry in your application
21
+ Sentry.init({
22
+ dsn: 'your-dsn-here',
23
+ environment: 'production'
24
+ });
25
+
26
+ // Set the Sentry instance
27
+ setSentry(Sentry);
28
+
29
+ // Access Sentry from anywhere in your application
30
+ const sentry = getSentry();
31
+ sentry.captureException(new Error('Something went wrong'));
32
+
33
+ // In other modules
34
+ import { getSentry } from '@lowerdeck/sentry';
35
+
36
+ function logError(error: Error) {
37
+ const sentry = getSentry();
38
+ sentry.captureException(error);
39
+ }
40
+ ```
41
+
42
+ ## License
43
+
44
+ This project is licensed under the Apache License 2.0.
45
+
46
+ <div align="center">
47
+ <sub>Built with ❤️ by <a href="https://metorial.com">Metorial</a></sub>
48
+ </div>
package/package.json CHANGED
@@ -1,9 +1,15 @@
1
1
  {
2
2
  "name": "@lowerdeck/sentry",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
+ "files": [
8
+ "src/**",
9
+ "dist/**",
10
+ "README.md",
11
+ "package.json"
12
+ ],
7
13
  "author": "Tobias Herber",
8
14
  "license": "Apache 2",
9
15
  "type": "module",
@@ -21,10 +27,10 @@
21
27
  "scripts": {
22
28
  "test": "vitest run --passWithNoTests",
23
29
  "lint": "prettier src/**/*.ts --check",
24
- "build": "microbundle"
30
+ "build": "rm -rf ./dist && microbundle"
25
31
  },
26
32
  "devDependencies": {
27
- "@lowerdeck/tsconfig": "^1.0.0",
33
+ "@lowerdeck/tsconfig": "^1.0.1",
28
34
  "typescript": "5.8.2",
29
35
  "microbundle": "^0.15.1",
30
36
  "vitest": "^3.1.2"
@@ -1,11 +0,0 @@
1
-
2
- $ microbundle
3
- Build "@lowerdeck/redis" to dist:
4
- 12.8 kB: index.cjs.gz
5
- 11.2 kB: index.cjs.br
6
- 11.8 kB: index.module.js.gz
7
- 10.3 kB: index.module.js.br
8
- 12.8 kB: index.module.js.gz
9
- 11.2 kB: index.module.js.br
10
- 12.9 kB: index.umd.js.gz
11
- 11.3 kB: index.umd.js.br
@@ -1,23 +0,0 @@
1
-
2
- $ vitest run --passWithNoTests
3
- [?25l
4
-  RUN  v3.2.4 /Users/tobias/code/metorial/metorial-enterprise/oss/src/packages/backend/redis
5
-
6
- [?2026h
7
-  ❯ src/utils/parseRedisUrl.test.ts [queued]
8
-
9
-  Test Files 0 passed (1)
10
-  Tests 0 passed (0)
11
-  Start at 12:11:28
12
-  Duration 101ms
13
- [?2026l ✓ src/utils/parseRedisUrl.test.ts (3 tests) 2ms
14
- ✓ parseRedisUrl > should parse a valid Redis URL 1ms
15
- ✓ parseRedisUrl > should parse a Redis URL with password 0ms
16
- ✓ parseRedisUrl > should parse a Redis URL with a different database 0ms
17
-
18
-  Test Files  1 passed (1)
19
-  Tests  3 passed (3)
20
-  Start at  12:11:28
21
-  Duration  222ms (transform 31ms, setup 0ms, collect 28ms, tests 2ms, environment 0ms, prepare 41ms)
22
-
23
- [?25h