@workflow/utils 4.0.1-beta.4 → 4.0.1-beta.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/dist/get-port.d.ts +18 -0
- package/dist/get-port.d.ts.map +1 -1
- package/dist/get-port.js +265 -44
- package/dist/get-port.js.map +1 -1
- package/package.json +1 -2
package/dist/get-port.d.ts
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets all listening ports for the current process.
|
|
3
|
+
* @returns Array of port numbers the process is listening on, in deterministic order.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getAllPorts(): Promise<number[]>;
|
|
1
6
|
/**
|
|
2
7
|
* Gets the port number that the process is listening on.
|
|
3
8
|
* @returns The port number that the process is listening on, or undefined if the process is not listening on any port.
|
|
4
9
|
*/
|
|
5
10
|
export declare function getPort(): Promise<number | undefined>;
|
|
11
|
+
export interface ProbeOptions {
|
|
12
|
+
endpoint?: string;
|
|
13
|
+
timeout?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Gets the workflow server port by probing all listening ports.
|
|
17
|
+
* This is more reliable than getPort() when other services (like Node.js inspector)
|
|
18
|
+
* may also be listening on ports.
|
|
19
|
+
*
|
|
20
|
+
* @param options - Optional configuration for probing
|
|
21
|
+
* @returns The port number of the workflow server, or undefined if not found
|
|
22
|
+
*/
|
|
23
|
+
export declare function getWorkflowPort(options?: ProbeOptions): Promise<number | undefined>;
|
|
6
24
|
//# sourceMappingURL=get-port.d.ts.map
|
package/dist/get-port.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-port.d.ts","sourceRoot":"","sources":["../src/get-port.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-port.d.ts","sourceRoot":"","sources":["../src/get-port.ts"],"names":[],"mappings":"AA0MA;;;GAGG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAoBrD;AAED;;;GAGG;AACH,wBAAsB,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAG3D;AAMD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAmCD;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,OAAO,CAAC,EAAE,YAAY,GACrB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAqC7B"}
|
package/dist/get-port.js
CHANGED
|
@@ -1,61 +1,282 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { readdir, readFile, readlink } from 'node:fs/promises';
|
|
2
|
+
import { promisify } from 'node:util';
|
|
3
|
+
import { execFile } from 'node:child_process';
|
|
4
|
+
const execFileAsync = promisify(execFile);
|
|
2
5
|
/**
|
|
3
|
-
*
|
|
4
|
-
* @returns The port number that the process is listening on, or undefined if the process is not listening on any port.
|
|
6
|
+
* Parses a port string and returns it if valid (0-65535), otherwise undefined.
|
|
5
7
|
*/
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
8
|
+
function parsePort(value, radix = 10) {
|
|
9
|
+
const port = parseInt(value, radix);
|
|
10
|
+
if (!Number.isNaN(port) && port >= 0 && port <= 65535) {
|
|
11
|
+
return port;
|
|
12
|
+
}
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
// NOTE: We build /proc paths dynamically to prevent @vercel/nft from tracing them.
|
|
16
|
+
// NFT's static analysis tries to bundle any file path literal it finds (e.g., '/proc/net/tcp').
|
|
17
|
+
// Since /proc is a virtual Linux filesystem, this causes build failures in @sveltejs/adapter-vercel.
|
|
18
|
+
const join = (arr, sep) => arr.join(sep);
|
|
19
|
+
const PROC_ROOT = join(['', 'proc'], '/');
|
|
20
|
+
/**
|
|
21
|
+
* Gets ALL listening ports for the current process on Linux by reading /proc filesystem.
|
|
22
|
+
* Returns ports in order of file descriptor (deterministic ordering).
|
|
23
|
+
*/
|
|
24
|
+
async function getLinuxPorts(pid) {
|
|
25
|
+
const listenState = '0A'; // TCP LISTEN state in /proc/net/tcp
|
|
26
|
+
const tcpFiles = [`${PROC_ROOT}/net/tcp`, `${PROC_ROOT}/net/tcp6`];
|
|
27
|
+
// Step 1: Get socket inodes from /proc/<pid>/fd/ in order
|
|
28
|
+
// We preserve order to maintain deterministic behavior
|
|
29
|
+
// Use both array (for order) and Set (for O(1) lookup)
|
|
30
|
+
const socketInodes = [];
|
|
31
|
+
const socketInodesSet = new Set();
|
|
32
|
+
const fdPath = `${PROC_ROOT}/${pid}/fd`;
|
|
9
33
|
try {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
34
|
+
const fds = await readdir(fdPath);
|
|
35
|
+
// Sort FDs numerically to ensure deterministic order (FDs are always numeric strings)
|
|
36
|
+
const sortedFds = fds.sort((a, b) => {
|
|
37
|
+
const numA = Number.parseInt(a, 10);
|
|
38
|
+
const numB = Number.parseInt(b, 10);
|
|
39
|
+
return numA - numB;
|
|
40
|
+
});
|
|
41
|
+
const results = await Promise.allSettled(sortedFds.map(async (fd) => {
|
|
42
|
+
const link = await readlink(`${fdPath}/${fd}`);
|
|
43
|
+
// Socket links look like: socket:[12345]
|
|
44
|
+
const match = link.match(/^socket:\[(\d+)\]$/);
|
|
45
|
+
return match?.[1] ?? null;
|
|
46
|
+
}));
|
|
47
|
+
for (const result of results) {
|
|
48
|
+
if (result.status === 'fulfilled' && result.value) {
|
|
49
|
+
socketInodes.push(result.value);
|
|
50
|
+
socketInodesSet.add(result.value);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
// Process might not exist or no permission
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
if (socketInodes.length === 0) {
|
|
59
|
+
return [];
|
|
60
|
+
}
|
|
61
|
+
// Step 2: Read /proc/net/tcp and /proc/net/tcp6 to find listening sockets
|
|
62
|
+
// Format: sl local_address rem_address st ... inode
|
|
63
|
+
// local_address is hex IP:port, st=0A means LISTEN
|
|
64
|
+
const inodeToPort = new Map();
|
|
65
|
+
for (const tcpFile of tcpFiles) {
|
|
66
|
+
try {
|
|
67
|
+
const content = await readFile(tcpFile, 'utf8');
|
|
68
|
+
const lines = content.split('\n').slice(1); // Skip header
|
|
69
|
+
for (const line of lines) {
|
|
70
|
+
if (!line.trim())
|
|
71
|
+
continue; // Skip empty lines
|
|
72
|
+
const parts = line.trim().split(/\s+/);
|
|
73
|
+
if (parts.length < 10)
|
|
74
|
+
continue;
|
|
75
|
+
const localAddr = parts[1]; // e.g., "00000000:0BB8" (0.0.0.0:3000)
|
|
76
|
+
const state = parts[3]; // "0A" = LISTEN
|
|
77
|
+
const inode = parts[9];
|
|
78
|
+
if (!localAddr || state !== listenState || !inode)
|
|
79
|
+
continue;
|
|
80
|
+
if (!socketInodesSet.has(inode))
|
|
81
|
+
continue;
|
|
82
|
+
// Extract port from hex format (e.g., "0BB8" -> 3000)
|
|
83
|
+
const colonIndex = localAddr.indexOf(':');
|
|
84
|
+
if (colonIndex === -1)
|
|
85
|
+
continue;
|
|
86
|
+
const portHex = localAddr.slice(colonIndex + 1);
|
|
87
|
+
if (!portHex)
|
|
88
|
+
continue;
|
|
89
|
+
const port = parsePort(portHex, 16);
|
|
90
|
+
if (port !== undefined) {
|
|
91
|
+
inodeToPort.set(inode, port);
|
|
92
|
+
}
|
|
26
93
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
// File might not exist (e.g., no IPv6 support) - continue to next file
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
// Return all ports in socket inode order (deterministic)
|
|
101
|
+
const ports = [];
|
|
102
|
+
for (const inode of socketInodes) {
|
|
103
|
+
const port = inodeToPort.get(inode);
|
|
104
|
+
if (port !== undefined) {
|
|
105
|
+
ports.push(port);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return ports;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Gets ALL listening ports for the current process on macOS using lsof.
|
|
112
|
+
* Returns ports in the order they appear in lsof output.
|
|
113
|
+
*/
|
|
114
|
+
async function getDarwinPorts(pid) {
|
|
115
|
+
try {
|
|
116
|
+
const { stdout } = await execFileAsync('lsof', [
|
|
117
|
+
'-a',
|
|
118
|
+
'-i',
|
|
119
|
+
'-P',
|
|
120
|
+
'-n',
|
|
121
|
+
'-p',
|
|
122
|
+
pid.toString(),
|
|
123
|
+
]);
|
|
124
|
+
const ports = [];
|
|
125
|
+
const lines = stdout.split('\n');
|
|
126
|
+
for (const line of lines) {
|
|
127
|
+
if (line.includes('LISTEN')) {
|
|
128
|
+
// Column 9 (0-indexed: 8) contains the address like "*:3000" or "127.0.0.1:3000"
|
|
129
|
+
const parts = line.trim().split(/\s+/);
|
|
130
|
+
const addr = parts[8];
|
|
131
|
+
if (addr) {
|
|
132
|
+
const colonIndex = addr.lastIndexOf(':');
|
|
133
|
+
if (colonIndex !== -1) {
|
|
134
|
+
const port = parsePort(addr.slice(colonIndex + 1));
|
|
135
|
+
if (port !== undefined) {
|
|
136
|
+
ports.push(port);
|
|
45
137
|
}
|
|
46
138
|
}
|
|
47
139
|
}
|
|
48
|
-
break;
|
|
49
140
|
}
|
|
50
141
|
}
|
|
142
|
+
return ports;
|
|
143
|
+
}
|
|
144
|
+
catch {
|
|
145
|
+
return [];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Gets ALL listening ports for the current process on Windows using netstat.
|
|
150
|
+
* Returns ports in the order they appear in netstat output.
|
|
151
|
+
*/
|
|
152
|
+
async function getWindowsPorts(pid) {
|
|
153
|
+
try {
|
|
154
|
+
const { stdout } = await execFileAsync('cmd', [
|
|
155
|
+
'/c',
|
|
156
|
+
`netstat -ano | findstr ${pid} | findstr LISTENING`,
|
|
157
|
+
]);
|
|
158
|
+
const ports = [];
|
|
159
|
+
const trimmedOutput = stdout.trim();
|
|
160
|
+
if (trimmedOutput) {
|
|
161
|
+
const lines = trimmedOutput.split('\n');
|
|
162
|
+
for (const line of lines) {
|
|
163
|
+
// Extract port from the local address column
|
|
164
|
+
// Matches both IPv4 (e.g., "127.0.0.1:3000") and IPv6 bracket notation (e.g., "[::1]:3000")
|
|
165
|
+
const match = line
|
|
166
|
+
.trim()
|
|
167
|
+
.match(/^\s*TCP\s+(?:\[[\da-f:]+\]|[\d.]+):(\d+)\s+/i);
|
|
168
|
+
if (match) {
|
|
169
|
+
const port = parsePort(match[1]);
|
|
170
|
+
if (port !== undefined) {
|
|
171
|
+
ports.push(port);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return ports;
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
return [];
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Gets all listening ports for the current process.
|
|
184
|
+
* @returns Array of port numbers the process is listening on, in deterministic order.
|
|
185
|
+
*/
|
|
186
|
+
export async function getAllPorts() {
|
|
187
|
+
const { pid, platform } = process;
|
|
188
|
+
try {
|
|
189
|
+
switch (platform) {
|
|
190
|
+
case 'linux':
|
|
191
|
+
return await getLinuxPorts(pid);
|
|
192
|
+
case 'darwin':
|
|
193
|
+
return await getDarwinPorts(pid);
|
|
194
|
+
case 'win32':
|
|
195
|
+
return await getWindowsPorts(pid);
|
|
196
|
+
default:
|
|
197
|
+
return [];
|
|
198
|
+
}
|
|
51
199
|
}
|
|
52
200
|
catch (error) {
|
|
53
|
-
// In dev, it's helpful to know why detection failed
|
|
54
201
|
if (process.env.NODE_ENV === 'development') {
|
|
55
|
-
console.debug('[
|
|
202
|
+
console.debug('[getAllPorts] Detection failed:', error);
|
|
56
203
|
}
|
|
204
|
+
return [];
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Gets the port number that the process is listening on.
|
|
209
|
+
* @returns The port number that the process is listening on, or undefined if the process is not listening on any port.
|
|
210
|
+
*/
|
|
211
|
+
export async function getPort() {
|
|
212
|
+
const ports = await getAllPorts();
|
|
213
|
+
return ports[0];
|
|
214
|
+
}
|
|
215
|
+
// Configuration for HTTP probing
|
|
216
|
+
const PROBE_TIMEOUT_MS = 1000;
|
|
217
|
+
const PROBE_ENDPOINT = '/.well-known/workflow/v1/flow';
|
|
218
|
+
/**
|
|
219
|
+
* Probes a port to check if it's serving the workflow HTTP server.
|
|
220
|
+
* Uses HEAD request to minimize overhead.
|
|
221
|
+
*
|
|
222
|
+
* @returns true if the port responds as a workflow server (non-404 response)
|
|
223
|
+
*/
|
|
224
|
+
async function probePort(port, options = {}) {
|
|
225
|
+
const { endpoint = PROBE_ENDPOINT, timeout = PROBE_TIMEOUT_MS } = options;
|
|
226
|
+
const controller = new AbortController();
|
|
227
|
+
const timeoutId = setTimeout(() => controller.abort(), timeout);
|
|
228
|
+
try {
|
|
229
|
+
const response = await fetch(`http://localhost:${port}${endpoint}`, {
|
|
230
|
+
method: 'HEAD',
|
|
231
|
+
signal: controller.signal,
|
|
232
|
+
});
|
|
233
|
+
// The workflow endpoints return 400 for missing headers, not 404
|
|
234
|
+
// A 400/405/200 indicates the endpoint exists (workflow server)
|
|
235
|
+
// A 404 indicates wrong port (endpoint doesn't exist)
|
|
236
|
+
return response.status !== 404;
|
|
237
|
+
}
|
|
238
|
+
catch {
|
|
239
|
+
// Connection refused, timeout, or other error
|
|
240
|
+
return false;
|
|
241
|
+
}
|
|
242
|
+
finally {
|
|
243
|
+
clearTimeout(timeoutId);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Gets the workflow server port by probing all listening ports.
|
|
248
|
+
* This is more reliable than getPort() when other services (like Node.js inspector)
|
|
249
|
+
* may also be listening on ports.
|
|
250
|
+
*
|
|
251
|
+
* @param options - Optional configuration for probing
|
|
252
|
+
* @returns The port number of the workflow server, or undefined if not found
|
|
253
|
+
*/
|
|
254
|
+
export async function getWorkflowPort(options) {
|
|
255
|
+
const ports = await getAllPorts();
|
|
256
|
+
if (ports.length === 0) {
|
|
57
257
|
return undefined;
|
|
58
258
|
}
|
|
59
|
-
|
|
259
|
+
if (ports.length === 1) {
|
|
260
|
+
// Only one port, no need to probe
|
|
261
|
+
return ports[0];
|
|
262
|
+
}
|
|
263
|
+
// Probe all ports in parallel
|
|
264
|
+
const probeResults = await Promise.all(ports.map(async (port) => ({
|
|
265
|
+
port,
|
|
266
|
+
isWorkflow: await probePort(port, options),
|
|
267
|
+
})));
|
|
268
|
+
// Return first port that responded as workflow server
|
|
269
|
+
const workflowPort = probeResults.find((r) => r.isWorkflow);
|
|
270
|
+
if (workflowPort) {
|
|
271
|
+
return workflowPort.port;
|
|
272
|
+
}
|
|
273
|
+
// Fallback to first port if probing doesn't identify workflow server
|
|
274
|
+
// This handles cases where:
|
|
275
|
+
// - Server hasn't started workflow routes yet
|
|
276
|
+
// - Network issues during probing
|
|
277
|
+
if (process.env.NODE_ENV === 'development') {
|
|
278
|
+
console.debug('[getWorkflowPort] Probing failed, falling back to first port:', ports[0]);
|
|
279
|
+
}
|
|
280
|
+
return ports[0];
|
|
60
281
|
}
|
|
61
282
|
//# sourceMappingURL=get-port.js.map
|
package/dist/get-port.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-port.js","sourceRoot":"","sources":["../src/get-port.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"get-port.js","sourceRoot":"","sources":["../src/get-port.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C;;GAEG;AACH,SAAS,SAAS,CAAC,KAAa,EAAE,KAAK,GAAG,EAAE;IAC1C,MAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACpC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,mFAAmF;AACnF,gGAAgG;AAChG,qGAAqG;AACrG,MAAM,IAAI,GAAG,CAAC,GAAa,EAAE,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,CAAC;AAE1C;;;GAGG;AACH,KAAK,UAAU,aAAa,CAAC,GAAW;IACtC,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,oCAAoC;IAC9D,MAAM,QAAQ,GAAG,CAAC,GAAG,SAAS,UAAU,EAAE,GAAG,SAAS,WAAW,CAAU,CAAC;IAE5E,0DAA0D;IAC1D,uDAAuD;IACvD,uDAAuD;IACvD,MAAM,YAAY,GAAa,EA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AAC,UAAU,CAAC,CAAC;IAC5D,IAAI,YAAY,EAAE,CAAC;QACjB,OAAO,YAAY,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED,qEAAqE;IACrE,4BAA4B;IAC5B,8CAA8C;IAC9C,kCAAkC;IAClC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE,CAAC;QAC3C,OAAO,CAAC,KAAK,CACX,+DAA+D,EAC/D,KAAK,CAAC,CAAC,CAAC,CACT,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workflow/utils",
|
|
3
3
|
"description": "Utility functions for Workflow DevKit",
|
|
4
|
-
"version": "4.0.1-beta.
|
|
4
|
+
"version": "4.0.1-beta.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"files": [
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"@workflow/tsconfig": "4.0.1-beta.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"execa": "9.6.0",
|
|
37
36
|
"ms": "2.1.3"
|
|
38
37
|
},
|
|
39
38
|
"scripts": {
|