@debugkit/sdk 0.0.0-stage → 0.2.0

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.
Files changed (57) hide show
  1. package/README.md +228 -2
  2. package/dist/chunk-3WRI3DI2.js +41 -0
  3. package/dist/chunk-3WRI3DI2.js.map +1 -0
  4. package/dist/chunk-5C7KJJNO.js +651 -0
  5. package/dist/chunk-5C7KJJNO.js.map +1 -0
  6. package/dist/chunk-EGCXLOFH.cjs +663 -0
  7. package/dist/chunk-EGCXLOFH.cjs.map +1 -0
  8. package/dist/chunk-HO3JW55K.js +79 -0
  9. package/dist/chunk-HO3JW55K.js.map +1 -0
  10. package/dist/chunk-NJ6DTUVX.cjs +83 -0
  11. package/dist/chunk-NJ6DTUVX.cjs.map +1 -0
  12. package/dist/chunk-YELZOB7J.cjs +45 -0
  13. package/dist/chunk-YELZOB7J.cjs.map +1 -0
  14. package/dist/client-ekzlpWIR.d.cts +220 -0
  15. package/dist/client-ekzlpWIR.d.ts +220 -0
  16. package/dist/expo-router.cjs +13 -0
  17. package/dist/expo-router.cjs.map +1 -0
  18. package/dist/expo-router.d.cts +10 -0
  19. package/dist/expo-router.d.ts +10 -0
  20. package/dist/expo-router.js +11 -0
  21. package/dist/expo-router.js.map +1 -0
  22. package/dist/expo.cjs +97 -0
  23. package/dist/expo.cjs.map +1 -0
  24. package/dist/expo.d.cts +14 -0
  25. package/dist/expo.d.ts +14 -0
  26. package/dist/expo.js +47 -0
  27. package/dist/expo.js.map +1 -0
  28. package/dist/index.cjs +40 -0
  29. package/dist/index.cjs.map +1 -0
  30. package/dist/index.d.cts +11 -0
  31. package/dist/index.d.ts +11 -0
  32. package/dist/index.js +3 -0
  33. package/dist/index.js.map +1 -0
  34. package/dist/node.cjs +140 -0
  35. package/dist/node.cjs.map +1 -0
  36. package/dist/node.d.cts +20 -0
  37. package/dist/node.d.ts +20 -0
  38. package/dist/node.js +100 -0
  39. package/dist/node.js.map +1 -0
  40. package/dist/react-native.cjs +38 -0
  41. package/dist/react-native.cjs.map +1 -0
  42. package/dist/react-native.d.cts +51 -0
  43. package/dist/react-native.d.ts +51 -0
  44. package/dist/react-native.js +5 -0
  45. package/dist/react-native.js.map +1 -0
  46. package/dist/react.cjs +25 -0
  47. package/dist/react.cjs.map +1 -0
  48. package/dist/react.d.cts +50 -0
  49. package/dist/react.d.ts +50 -0
  50. package/dist/react.js +4 -0
  51. package/dist/react.js.map +1 -0
  52. package/expo/package.json +6 -0
  53. package/expo-router/package.json +6 -0
  54. package/node/package.json +6 -0
  55. package/package.json +121 -3
  56. package/react/package.json +6 -0
  57. package/react-native/package.json +6 -0
package/dist/react.cjs ADDED
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ var chunkYELZOB7J_cjs = require('./chunk-YELZOB7J.cjs');
4
+ var chunkEGCXLOFH_cjs = require('./chunk-EGCXLOFH.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "DebugErrorBoundary", {
9
+ enumerable: true,
10
+ get: function () { return chunkYELZOB7J_cjs.DebugErrorBoundary; }
11
+ });
12
+ Object.defineProperty(exports, "trackTanStackRouter", {
13
+ enumerable: true,
14
+ get: function () { return chunkYELZOB7J_cjs.trackTanStackRouter; }
15
+ });
16
+ Object.defineProperty(exports, "useDebugNavigation", {
17
+ enumerable: true,
18
+ get: function () { return chunkYELZOB7J_cjs.useDebugNavigation; }
19
+ });
20
+ Object.defineProperty(exports, "deBug", {
21
+ enumerable: true,
22
+ get: function () { return chunkEGCXLOFH_cjs.deBug; }
23
+ });
24
+ //# sourceMappingURL=react.cjs.map
25
+ //# sourceMappingURL=react.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"react.cjs"}
@@ -0,0 +1,50 @@
1
+ import { Component, ReactNode, ErrorInfo } from 'react';
2
+ export { deBug } from './index.cjs';
3
+ import { D as DebugClient } from './client-ekzlpWIR.cjs';
4
+ import '@debugkit/schema/core';
5
+
6
+ interface DebugErrorBoundaryProps {
7
+ children?: ReactNode;
8
+ /** What to render after a crash. A function gets the error and a reset callback. */
9
+ fallback?: ReactNode | ((props: {
10
+ error: Error;
11
+ reset: () => void;
12
+ }) => ReactNode);
13
+ /** Part of the app this boundary protects, e.g. "checkout". */
14
+ flow?: string;
15
+ client?: DebugClient;
16
+ onError?: (error: Error, info: ErrorInfo) => void;
17
+ }
18
+ interface State {
19
+ error: Error | null;
20
+ }
21
+ /**
22
+ * Catches render errors that React would otherwise swallow (or turn into a white/red screen)
23
+ * and reports them. Works in React DOM and React Native.
24
+ */
25
+ declare class DebugErrorBoundary extends Component<DebugErrorBoundaryProps, State> {
26
+ state: State;
27
+ static getDerivedStateFromError(error: Error): State;
28
+ componentDidCatch(error: Error, info: ErrorInfo): void;
29
+ reset: () => void;
30
+ render(): ReactNode;
31
+ }
32
+ /** Adds a navigation breadcrumb whenever `path` changes. Works with any router. */
33
+ declare function useDebugNavigation(path: string | undefined, client?: DebugClient): void;
34
+ /** Minimal shape of a TanStack Router instance (avoids a hard dependency). */
35
+ interface RouterLike {
36
+ subscribe(event: "onResolved", fn: (e: {
37
+ toLocation: {
38
+ pathname: string;
39
+ href?: string;
40
+ };
41
+ }) => void): () => void;
42
+ }
43
+ /**
44
+ * Records a breadcrumb for every navigation in a TanStack Router app:
45
+ * const router = createRouter({ routeTree }); trackTanStackRouter(router);
46
+ * Returns an unsubscribe function.
47
+ */
48
+ declare function trackTanStackRouter(router: RouterLike, client?: DebugClient): () => void;
49
+
50
+ export { DebugErrorBoundary, type DebugErrorBoundaryProps, trackTanStackRouter, useDebugNavigation };
@@ -0,0 +1,50 @@
1
+ import { Component, ReactNode, ErrorInfo } from 'react';
2
+ export { deBug } from './index.js';
3
+ import { D as DebugClient } from './client-ekzlpWIR.js';
4
+ import '@debugkit/schema/core';
5
+
6
+ interface DebugErrorBoundaryProps {
7
+ children?: ReactNode;
8
+ /** What to render after a crash. A function gets the error and a reset callback. */
9
+ fallback?: ReactNode | ((props: {
10
+ error: Error;
11
+ reset: () => void;
12
+ }) => ReactNode);
13
+ /** Part of the app this boundary protects, e.g. "checkout". */
14
+ flow?: string;
15
+ client?: DebugClient;
16
+ onError?: (error: Error, info: ErrorInfo) => void;
17
+ }
18
+ interface State {
19
+ error: Error | null;
20
+ }
21
+ /**
22
+ * Catches render errors that React would otherwise swallow (or turn into a white/red screen)
23
+ * and reports them. Works in React DOM and React Native.
24
+ */
25
+ declare class DebugErrorBoundary extends Component<DebugErrorBoundaryProps, State> {
26
+ state: State;
27
+ static getDerivedStateFromError(error: Error): State;
28
+ componentDidCatch(error: Error, info: ErrorInfo): void;
29
+ reset: () => void;
30
+ render(): ReactNode;
31
+ }
32
+ /** Adds a navigation breadcrumb whenever `path` changes. Works with any router. */
33
+ declare function useDebugNavigation(path: string | undefined, client?: DebugClient): void;
34
+ /** Minimal shape of a TanStack Router instance (avoids a hard dependency). */
35
+ interface RouterLike {
36
+ subscribe(event: "onResolved", fn: (e: {
37
+ toLocation: {
38
+ pathname: string;
39
+ href?: string;
40
+ };
41
+ }) => void): () => void;
42
+ }
43
+ /**
44
+ * Records a breadcrumb for every navigation in a TanStack Router app:
45
+ * const router = createRouter({ routeTree }); trackTanStackRouter(router);
46
+ * Returns an unsubscribe function.
47
+ */
48
+ declare function trackTanStackRouter(router: RouterLike, client?: DebugClient): () => void;
49
+
50
+ export { DebugErrorBoundary, type DebugErrorBoundaryProps, trackTanStackRouter, useDebugNavigation };
package/dist/react.js ADDED
@@ -0,0 +1,4 @@
1
+ export { DebugErrorBoundary, trackTanStackRouter, useDebugNavigation } from './chunk-3WRI3DI2.js';
2
+ export { deBug } from './chunk-5C7KJJNO.js';
3
+ //# sourceMappingURL=react.js.map
4
+ //# sourceMappingURL=react.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"react.js"}
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "../dist/expo.cjs",
3
+ "module": "../dist/expo.js",
4
+ "react-native": "../dist/expo.js",
5
+ "types": "../dist/expo.d.ts"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "../dist/expo-router.cjs",
3
+ "module": "../dist/expo-router.js",
4
+ "react-native": "../dist/expo-router.js",
5
+ "types": "../dist/expo-router.d.ts"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "../dist/node.cjs",
3
+ "module": "../dist/node.js",
4
+ "react-native": "../dist/node.js",
5
+ "types": "../dist/node.d.ts"
6
+ }
package/package.json CHANGED
@@ -1,6 +1,124 @@
1
1
  {
2
2
  "name": "@debugkit/sdk",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.2.0",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": {
7
+ "types": {
8
+ "import": "./dist/index.d.ts",
9
+ "require": "./dist/index.d.cts"
10
+ },
11
+ "react-native": "./dist/index.js",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ },
15
+ "./react": {
16
+ "types": {
17
+ "import": "./dist/react.d.ts",
18
+ "require": "./dist/react.d.cts"
19
+ },
20
+ "react-native": "./dist/react.js",
21
+ "import": "./dist/react.js",
22
+ "require": "./dist/react.cjs"
23
+ },
24
+ "./react-native": {
25
+ "types": {
26
+ "import": "./dist/react-native.d.ts",
27
+ "require": "./dist/react-native.d.cts"
28
+ },
29
+ "react-native": "./dist/react-native.js",
30
+ "import": "./dist/react-native.js",
31
+ "require": "./dist/react-native.cjs"
32
+ },
33
+ "./expo": {
34
+ "types": {
35
+ "import": "./dist/expo.d.ts",
36
+ "require": "./dist/expo.d.cts"
37
+ },
38
+ "react-native": "./dist/expo.js",
39
+ "import": "./dist/expo.js",
40
+ "require": "./dist/expo.cjs"
41
+ },
42
+ "./expo-router": {
43
+ "types": {
44
+ "import": "./dist/expo-router.d.ts",
45
+ "require": "./dist/expo-router.d.cts"
46
+ },
47
+ "react-native": "./dist/expo-router.js",
48
+ "import": "./dist/expo-router.js",
49
+ "require": "./dist/expo-router.cjs"
50
+ },
51
+ "./node": {
52
+ "types": {
53
+ "import": "./dist/node.d.ts",
54
+ "require": "./dist/node.d.cts"
55
+ },
56
+ "react-native": "./dist/node.js",
57
+ "import": "./dist/node.js",
58
+ "require": "./dist/node.cjs"
59
+ },
60
+ "./package.json": "./package.json"
61
+ },
62
+ "dependencies": {
63
+ "@debugkit/schema": "^0.2.0"
64
+ },
65
+ "description": "deBug SDK: log errors and events from React, React Native, Expo and Node into your own cloud.",
66
+ "license": "MIT",
67
+ "repository": {
68
+ "type": "git",
69
+ "url": "git+https://github.com/Abantu-Digital/deBug.git",
70
+ "directory": "packages/sdk"
71
+ },
72
+ "sideEffects": false,
73
+ "files": [
74
+ "dist",
75
+ "react",
76
+ "react-native",
77
+ "expo",
78
+ "expo-router",
79
+ "node",
80
+ "README.md"
81
+ ],
82
+ "publishConfig": {
83
+ "access": "public"
84
+ },
85
+ "peerDependencies": {
86
+ "expo-application": "*",
87
+ "expo-device": "*",
88
+ "expo-router": "*",
89
+ "react": ">=17",
90
+ "react-native": ">=0.70"
91
+ },
92
+ "peerDependenciesMeta": {
93
+ "react": {
94
+ "optional": true
95
+ },
96
+ "react-native": {
97
+ "optional": true
98
+ },
99
+ "expo-device": {
100
+ "optional": true
101
+ },
102
+ "expo-application": {
103
+ "optional": true
104
+ },
105
+ "expo-router": {
106
+ "optional": true
107
+ }
108
+ },
109
+ "devDependencies": {
110
+ "@types/react": "^19.3.0",
111
+ "expo-application": "~7.0.8",
112
+ "expo-device": "~8.0.10",
113
+ "react": "19.2.0",
114
+ "react-native": "0.83.1",
115
+ "tsup": "^8.5.1"
116
+ },
117
+ "scripts": {
118
+ "typecheck": "tsc -p .",
119
+ "build": "tsup"
120
+ },
121
+ "main": "./dist/index.cjs",
122
+ "module": "./dist/index.js",
123
+ "types": "./dist/index.d.ts"
6
124
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "../dist/react.cjs",
3
+ "module": "../dist/react.js",
4
+ "react-native": "../dist/react.js",
5
+ "types": "../dist/react.d.ts"
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "../dist/react-native.cjs",
3
+ "module": "../dist/react-native.js",
4
+ "react-native": "../dist/react-native.js",
5
+ "types": "../dist/react-native.d.ts"
6
+ }