@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.
- package/README.md +228 -2
- package/dist/chunk-3WRI3DI2.js +41 -0
- package/dist/chunk-3WRI3DI2.js.map +1 -0
- package/dist/chunk-5C7KJJNO.js +651 -0
- package/dist/chunk-5C7KJJNO.js.map +1 -0
- package/dist/chunk-EGCXLOFH.cjs +663 -0
- package/dist/chunk-EGCXLOFH.cjs.map +1 -0
- package/dist/chunk-HO3JW55K.js +79 -0
- package/dist/chunk-HO3JW55K.js.map +1 -0
- package/dist/chunk-NJ6DTUVX.cjs +83 -0
- package/dist/chunk-NJ6DTUVX.cjs.map +1 -0
- package/dist/chunk-YELZOB7J.cjs +45 -0
- package/dist/chunk-YELZOB7J.cjs.map +1 -0
- package/dist/client-ekzlpWIR.d.cts +220 -0
- package/dist/client-ekzlpWIR.d.ts +220 -0
- package/dist/expo-router.cjs +13 -0
- package/dist/expo-router.cjs.map +1 -0
- package/dist/expo-router.d.cts +10 -0
- package/dist/expo-router.d.ts +10 -0
- package/dist/expo-router.js +11 -0
- package/dist/expo-router.js.map +1 -0
- package/dist/expo.cjs +97 -0
- package/dist/expo.cjs.map +1 -0
- package/dist/expo.d.cts +14 -0
- package/dist/expo.d.ts +14 -0
- package/dist/expo.js +47 -0
- package/dist/expo.js.map +1 -0
- package/dist/index.cjs +40 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/node.cjs +140 -0
- package/dist/node.cjs.map +1 -0
- package/dist/node.d.cts +20 -0
- package/dist/node.d.ts +20 -0
- package/dist/node.js +100 -0
- package/dist/node.js.map +1 -0
- package/dist/react-native.cjs +38 -0
- package/dist/react-native.cjs.map +1 -0
- package/dist/react-native.d.cts +51 -0
- package/dist/react-native.d.ts +51 -0
- package/dist/react-native.js +5 -0
- package/dist/react-native.js.map +1 -0
- package/dist/react.cjs +25 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +50 -0
- package/dist/react.d.ts +50 -0
- package/dist/react.js +4 -0
- package/dist/react.js.map +1 -0
- package/expo/package.json +6 -0
- package/expo-router/package.json +6 -0
- package/node/package.json +6 -0
- package/package.json +121 -3
- package/react/package.json +6 -0
- 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"}
|
package/dist/react.d.cts
ADDED
|
@@ -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 };
|
package/dist/react.d.ts
ADDED
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"react.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,124 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@debugkit/sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
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
|
}
|