@ninhache/probe 0.1.2 → 0.3.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 +45 -10
- package/dist/chunk-M3ASEG5F.js +48 -0
- package/dist/chunk-ZCAUPLQS.js +305 -0
- package/dist/cli.js +365 -190
- package/dist/devtools-QAEP2P5I.js +90 -0
- package/dist/open-TQ6NPJ7V.js +20479 -0
- package/package.json +7 -3
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from "node:module";
|
|
2
|
+
const require = __createRequire(import.meta.url);
|
|
3
|
+
import "./chunk-M3ASEG5F.js";
|
|
4
|
+
|
|
5
|
+
// node_modules/.pnpm/ink@8.0.0_@types+react@19.3.0_react@19.3.1/node_modules/ink/build/devtools-window-polyfill.js
|
|
6
|
+
var customGlobal = globalThis;
|
|
7
|
+
customGlobal.window ||= globalThis;
|
|
8
|
+
customGlobal.self ||= globalThis;
|
|
9
|
+
customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [
|
|
10
|
+
{
|
|
11
|
+
// ComponentFilterElementType
|
|
12
|
+
type: 1,
|
|
13
|
+
// ElementTypeHostComponent
|
|
14
|
+
value: 7,
|
|
15
|
+
isEnabled: true
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
// ComponentFilterDisplayName
|
|
19
|
+
type: 2,
|
|
20
|
+
value: "InternalApp",
|
|
21
|
+
isEnabled: true,
|
|
22
|
+
isValid: true
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
// ComponentFilterDisplayName
|
|
26
|
+
type: 2,
|
|
27
|
+
value: "InternalAppContext",
|
|
28
|
+
isEnabled: true,
|
|
29
|
+
isValid: true
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
// ComponentFilterDisplayName
|
|
33
|
+
type: 2,
|
|
34
|
+
value: "InternalStdoutContext",
|
|
35
|
+
isEnabled: true,
|
|
36
|
+
isValid: true
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
// ComponentFilterDisplayName
|
|
40
|
+
type: 2,
|
|
41
|
+
value: "InternalStderrContext",
|
|
42
|
+
isEnabled: true,
|
|
43
|
+
isValid: true
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
// ComponentFilterDisplayName
|
|
47
|
+
type: 2,
|
|
48
|
+
value: "InternalStdinContext",
|
|
49
|
+
isEnabled: true,
|
|
50
|
+
isValid: true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
// ComponentFilterDisplayName
|
|
54
|
+
type: 2,
|
|
55
|
+
value: "InternalFocusContext",
|
|
56
|
+
isEnabled: true,
|
|
57
|
+
isValid: true
|
|
58
|
+
}
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
// node_modules/.pnpm/ink@8.0.0_@types+react@19.3.0_react@19.3.1/node_modules/ink/build/devtools.js
|
|
62
|
+
import devtools from "react-devtools-core";
|
|
63
|
+
|
|
64
|
+
// node_modules/.pnpm/ink@8.0.0_@types+react@19.3.0_react@19.3.1/node_modules/ink/build/is-devtools-reachable.js
|
|
65
|
+
var isDevToolsReachable = async (url = "ws://localhost:8097", timeoutMs = 2e3) => new Promise((resolve) => {
|
|
66
|
+
const socket = new WebSocket(url);
|
|
67
|
+
const timeout = setTimeout(() => {
|
|
68
|
+
resolve(false);
|
|
69
|
+
socket.close();
|
|
70
|
+
}, timeoutMs);
|
|
71
|
+
timeout.unref();
|
|
72
|
+
socket.addEventListener("open", () => {
|
|
73
|
+
clearTimeout(timeout);
|
|
74
|
+
socket.close();
|
|
75
|
+
resolve(true);
|
|
76
|
+
});
|
|
77
|
+
socket.addEventListener("error", () => {
|
|
78
|
+
clearTimeout(timeout);
|
|
79
|
+
resolve(false);
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
var is_devtools_reachable_default = isDevToolsReachable;
|
|
83
|
+
|
|
84
|
+
// node_modules/.pnpm/ink@8.0.0_@types+react@19.3.0_react@19.3.1/node_modules/ink/build/devtools.js
|
|
85
|
+
if (await is_devtools_reachable_default()) {
|
|
86
|
+
devtools.initialize();
|
|
87
|
+
devtools.connectToDevTools();
|
|
88
|
+
} else {
|
|
89
|
+
console.warn("DEV is set to true, but the React DevTools server is not running. Start it with:\n\n$ npx react-devtools\n");
|
|
90
|
+
}
|