@scaffoldly/rowdy 0.0.2-1-beta.20251011182751.ccfebc8 → 0.0.2-1-beta.20251013150919.561ca79
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/index.d.ts +11 -7
- package/dist/index.js +59 -35
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,13 @@ interface ILoggable {
|
|
|
5
5
|
repr(): string;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
type
|
|
8
|
+
type Status = 'ok' | 'error' | 'timeout' | 'unknown';
|
|
9
|
+
type Latency = `${number}ms`;
|
|
10
|
+
type CheckResult = {
|
|
11
|
+
status: Status;
|
|
12
|
+
latency?: Latency;
|
|
13
|
+
reason?: string | undefined;
|
|
14
|
+
};
|
|
9
15
|
|
|
10
16
|
type RoutesApiVersion = 'rowdy.run/v1alpha1';
|
|
11
17
|
type RoutePaths = {
|
|
@@ -30,10 +36,7 @@ interface IRoutes {
|
|
|
30
36
|
readonly version: RoutesApiVersion;
|
|
31
37
|
readonly rules: Array<RouteRule>;
|
|
32
38
|
}
|
|
33
|
-
type URIHealth =
|
|
34
|
-
healthy: boolean;
|
|
35
|
-
latency: CheckResult;
|
|
36
|
-
};
|
|
39
|
+
type URIHealth = CheckResult;
|
|
37
40
|
type Search = {
|
|
38
41
|
key: string;
|
|
39
42
|
value: string;
|
|
@@ -41,9 +44,10 @@ type Search = {
|
|
|
41
44
|
declare class URI extends URL implements ILoggable {
|
|
42
45
|
readonly insecure: boolean;
|
|
43
46
|
protected static awaits: Map<string, Observable<URI>>;
|
|
44
|
-
static
|
|
47
|
+
static ERROR: string;
|
|
45
48
|
protected constructor(url: URL, insecure?: boolean);
|
|
46
|
-
get
|
|
49
|
+
get server(): string;
|
|
50
|
+
get error(): string | undefined;
|
|
47
51
|
withSearch(search: Search, value?: string): this;
|
|
48
52
|
static from(uri: string): URI;
|
|
49
53
|
static fromError(error: Error, code?: number): URI;
|