@nexiq/cli 1.0.2 → 1.0.6
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/CHANGELOG.md +19 -0
- package/dist/cli.js +151 -31561
- package/dist/devtools-3T2XQNYQ.js +5 -0
- package/package.json +9 -3
- package/src/server-process.ts +2 -2
- package/src/ws.d.ts +9 -0
- package/tsup.config.ts +10 -6
- package/dist/devtools-Q4CVL4MR.js +0 -72
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
3
|
+
const require = __createRequire(import.meta.url);
|
|
4
|
+
|
|
5
|
+
import t from"ws";var e=global;e.WebSocket||(e.WebSocket=t);e.window||(e.window=global);e.self||(e.self=global);e.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__=[{type:1,value:7,isEnabled:!0},{type:2,value:"InternalApp",isEnabled:!0,isValid:!0},{type:2,value:"InternalAppContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdoutContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStderrContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalStdinContext",isEnabled:!0,isValid:!0},{type:2,value:"InternalFocusContext",isEnabled:!0,isValid:!0}];import l from"react-devtools-core";l.connectToDevTools();
|
package/package.json
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexiq/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "CLI for the nexiq React analysis server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"nexiq": "dist/cli.js"
|
|
8
8
|
},
|
|
9
9
|
"main": "dist/cli.js",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/Naputt1/nexiq.git",
|
|
13
|
+
"directory": "packages/cli"
|
|
14
|
+
},
|
|
10
15
|
"publishConfig": {
|
|
11
16
|
"registry": "https://registry.npmjs.org/",
|
|
12
|
-
"access": "public"
|
|
17
|
+
"access": "public",
|
|
18
|
+
"provenance": true
|
|
13
19
|
},
|
|
14
20
|
"dependencies": {
|
|
15
21
|
"ink": "^4.4.1",
|
|
@@ -17,7 +23,7 @@
|
|
|
17
23
|
"meow": "^13.2.0",
|
|
18
24
|
"react": "^18.3.1",
|
|
19
25
|
"ws": "^8.20.0",
|
|
20
|
-
"@nexiq/server": "1.0.
|
|
26
|
+
"@nexiq/server": "1.0.4"
|
|
21
27
|
},
|
|
22
28
|
"devDependencies": {
|
|
23
29
|
"@types/node": "^25.5.0",
|
package/src/server-process.ts
CHANGED
|
@@ -46,7 +46,7 @@ export function resolveServerDist(): string | null {
|
|
|
46
46
|
|
|
47
47
|
const siblingPath = path.resolve(
|
|
48
48
|
currentDir,
|
|
49
|
-
"../../..", // dist/cli.js -> dist ->
|
|
49
|
+
"../../..", // dist/cli.js -> dist -> cli -> packages -> nexiq root
|
|
50
50
|
"server",
|
|
51
51
|
"dist",
|
|
52
52
|
"index.js",
|
|
@@ -90,7 +90,7 @@ export async function isPortOpen(port: number, host = "127.0.0.1"): Promise<bool
|
|
|
90
90
|
|
|
91
91
|
export async function isServerAlive(port: number = BACKEND_PORT): Promise<boolean> {
|
|
92
92
|
return new Promise((resolve) => {
|
|
93
|
-
const ws = new WebSocket(`ws://
|
|
93
|
+
const ws = new WebSocket(`ws://127.0.0.1:${port}`);
|
|
94
94
|
const timeout = setTimeout(() => {
|
|
95
95
|
ws.terminate();
|
|
96
96
|
resolve(false);
|
package/src/ws.d.ts
ADDED
package/tsup.config.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { defineConfig } from "tsup";
|
|
2
2
|
|
|
3
|
-
export default defineConfig({
|
|
3
|
+
export default defineConfig((options) => ({
|
|
4
4
|
entry: ["src/cli.tsx"],
|
|
5
5
|
format: ["esm"],
|
|
6
6
|
target: "node18",
|
|
7
7
|
clean: true,
|
|
8
|
+
minify: true,
|
|
8
9
|
dts: false,
|
|
10
|
+
define: {
|
|
11
|
+
"process.env.MODE": JSON.stringify(options.env?.MODE || "production"),
|
|
12
|
+
},
|
|
9
13
|
banner: {
|
|
10
14
|
js: `#!/usr/bin/env node
|
|
11
15
|
import { createRequire as __createRequire } from 'node:module';
|
|
@@ -20,11 +24,11 @@ const require = __createRequire(import.meta.url);
|
|
|
20
24
|
"react-dom",
|
|
21
25
|
"react-reconciler",
|
|
22
26
|
"meow",
|
|
23
|
-
"signal-exit"
|
|
27
|
+
"signal-exit",
|
|
24
28
|
],
|
|
25
29
|
// Exclude node built-ins and problematic native/peer deps
|
|
26
30
|
external: [
|
|
27
|
-
"ws",
|
|
31
|
+
"ws",
|
|
28
32
|
"react-devtools-core",
|
|
29
33
|
"yoga-layout",
|
|
30
34
|
"yoga-wasm-web",
|
|
@@ -40,6 +44,6 @@ const require = __createRequire(import.meta.url);
|
|
|
40
44
|
"path",
|
|
41
45
|
"stream",
|
|
42
46
|
"url",
|
|
43
|
-
"util"
|
|
44
|
-
],
|
|
45
|
-
});
|
|
47
|
+
"util",
|
|
48
|
+
],
|
|
49
|
+
}));
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
3
|
-
const require = __createRequire(import.meta.url);
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@18.3.28_react@18.3.1/node_modules/ink/build/devtools-window-polyfill.js
|
|
7
|
-
import ws from "ws";
|
|
8
|
-
var customGlobal = global;
|
|
9
|
-
if (!customGlobal.WebSocket) {
|
|
10
|
-
customGlobal.WebSocket = ws;
|
|
11
|
-
}
|
|
12
|
-
if (!customGlobal.window) {
|
|
13
|
-
customGlobal.window = global;
|
|
14
|
-
}
|
|
15
|
-
if (!customGlobal.self) {
|
|
16
|
-
customGlobal.self = global;
|
|
17
|
-
}
|
|
18
|
-
customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [
|
|
19
|
-
{
|
|
20
|
-
// ComponentFilterElementType
|
|
21
|
-
type: 1,
|
|
22
|
-
// ElementTypeHostComponent
|
|
23
|
-
value: 7,
|
|
24
|
-
isEnabled: true
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
// ComponentFilterDisplayName
|
|
28
|
-
type: 2,
|
|
29
|
-
value: "InternalApp",
|
|
30
|
-
isEnabled: true,
|
|
31
|
-
isValid: true
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
// ComponentFilterDisplayName
|
|
35
|
-
type: 2,
|
|
36
|
-
value: "InternalAppContext",
|
|
37
|
-
isEnabled: true,
|
|
38
|
-
isValid: true
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
// ComponentFilterDisplayName
|
|
42
|
-
type: 2,
|
|
43
|
-
value: "InternalStdoutContext",
|
|
44
|
-
isEnabled: true,
|
|
45
|
-
isValid: true
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
// ComponentFilterDisplayName
|
|
49
|
-
type: 2,
|
|
50
|
-
value: "InternalStderrContext",
|
|
51
|
-
isEnabled: true,
|
|
52
|
-
isValid: true
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
// ComponentFilterDisplayName
|
|
56
|
-
type: 2,
|
|
57
|
-
value: "InternalStdinContext",
|
|
58
|
-
isEnabled: true,
|
|
59
|
-
isValid: true
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
// ComponentFilterDisplayName
|
|
63
|
-
type: 2,
|
|
64
|
-
value: "InternalFocusContext",
|
|
65
|
-
isEnabled: true,
|
|
66
|
-
isValid: true
|
|
67
|
-
}
|
|
68
|
-
];
|
|
69
|
-
|
|
70
|
-
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@18.3.28_react@18.3.1/node_modules/ink/build/devtools.js
|
|
71
|
-
import devtools from "react-devtools-core";
|
|
72
|
-
devtools.connectToDevTools();
|