@gachlab/devup 0.8.0 → 0.8.1
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 +14 -0
- package/dist/index.js +30 -2
- package/dist/index.js.map +1 -1
- package/dist/process/health.d.ts +17 -0
- package/dist/process/health.d.ts.map +1 -1
- package/dist/process/spawner.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/process/health.d.ts
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
import type { HealthStatus } from './types.js';
|
|
2
2
|
import type { HealthCheckConfig } from '../config/types.js';
|
|
3
|
+
/** "Is something accepting connections at port?" — connect-based test.
|
|
4
|
+
* Use this for health checks and waitForPort, where "occupied" means
|
|
5
|
+
* "the service is up". Do NOT use this to decide whether to spawn — use
|
|
6
|
+
* `isPortBindable` instead (a bound but pre-accept server would slip
|
|
7
|
+
* through this check). */
|
|
3
8
|
export declare function checkPort(port: number, host?: string, timeoutMs?: number): Promise<boolean>;
|
|
9
|
+
/** "Can I bind to this port right now?" — bind-based test. Returns true
|
|
10
|
+
* if a server could listen on the port on every wildcard address. Used as
|
|
11
|
+
* the pre-flight before spawning a service: catches every case that would
|
|
12
|
+
* cause the spawned process to die with EADDRINUSE, including bound-but-
|
|
13
|
+
* not-yet-accepting states that `checkPort` misses.
|
|
14
|
+
*
|
|
15
|
+
* Implementation detail: tests both IPv4 (`0.0.0.0`) and IPv6 (`::`)
|
|
16
|
+
* wildcards. On Linux these usually share an address space (IPV6_V6ONLY=0),
|
|
17
|
+
* so a single test suffices; on Windows the defaults isolate the stacks,
|
|
18
|
+
* so a one-stack test can miss a conflicting bind on the other. We require
|
|
19
|
+
* both stacks to be free to call the port bindable. */
|
|
20
|
+
export declare function isPortBindable(port: number): Promise<boolean>;
|
|
4
21
|
export declare function checkHttp(port: number, opts?: {
|
|
5
22
|
path?: string;
|
|
6
23
|
expect?: number | number[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../src/process/health.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAc,EAAE,SAAS,SAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAS9F;AAED,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAC1F,OAAO,CAAC,OAAO,CAAC,CAkBlB;AAED,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAOlF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAa9G;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,YAAY,CAI/E"}
|
|
1
|
+
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../src/process/health.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;;2BAI2B;AAC3B,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAc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