@compforge/harness-toolbox 0.4.8 → 0.5.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/README.md +41 -9
- package/dist/{chunk-1ts7pswj.js → chunk-0d8vs5q8.js} +33 -2
- package/dist/{chunk-h8fwx0k7.js → chunk-18gcp0ck.js} +32 -7
- package/dist/{chunk-35cjec9z.js → chunk-3b877a0y.js} +6 -6
- package/dist/{chunk-gm4swndx.js → chunk-43mcyrh4.js} +14 -24
- package/dist/chunk-56fev9np.js +142 -0
- package/dist/{chunk-zp1s833x.js → chunk-7m95c7pn.js} +26 -13
- package/dist/{chunk-f3vq900j.js → chunk-92aacbwh.js} +1 -1
- package/dist/{chunk-x4ntb898.js → chunk-c2b2jwm4.js} +18 -18
- package/dist/chunk-ehmx0yhp.js +52 -0
- package/dist/{chunk-t4hrnaj0.js → chunk-ex429qjt.js} +22 -20
- package/dist/{chunk-m391jmpw.js → chunk-hbhbragw.js} +9 -9
- package/dist/{chunk-fqrknvr8.js → chunk-kap6ka3n.js} +27 -12
- package/dist/{chunk-vymm4g9h.js → chunk-kxpecgy7.js} +106 -37
- package/dist/{chunk-nftzckdy.js → chunk-mvkxs8d0.js} +17 -2
- package/dist/{chunk-f98qrpx1.js → chunk-njs48b51.js} +28 -27
- package/dist/chunk-sb5qzv37.js +62 -0
- package/dist/{chunk-dx6yvj81.js → chunk-xhfbark7.js} +1 -1
- package/dist/chunk-z8e1ckkq.js +16 -0
- package/dist/connection/acquire.d.ts +3 -4
- package/dist/connection/acquire.js +2 -4
- package/dist/datasource.d.ts +0 -6
- package/dist/file/client.js +2 -2
- package/dist/file/index.js +4 -4
- package/dist/file/local.js +3 -3
- package/dist/file/pod.js +3 -3
- package/dist/http/client.d.ts +15 -0
- package/dist/http/client.js +21 -0
- package/dist/http/handler.d.ts +10 -0
- package/dist/http/handler.js +6 -0
- package/dist/http/index.d.ts +2 -0
- package/dist/http/index.js +21 -0
- package/dist/http/types.d.ts +34 -0
- package/dist/http/types.js +0 -0
- package/dist/kubernetes/client.js +9 -9
- package/dist/kubernetes/environment.js +9 -9
- package/dist/kubernetes/exec-transport.js +2 -2
- package/dist/kubernetes/pod-log-datasource.js +1 -1
- package/dist/kubernetes/port-forward.d.ts +4 -0
- package/dist/kubernetes/port-forward.js +1 -1
- package/dist/kubernetes/resource-transport.js +2 -2
- package/dist/kubernetes/service-port-forward.d.ts +3 -2
- package/dist/kubernetes/service-port-forward.js +2 -2
- package/dist/mysql/client.d.ts +7 -7
- package/dist/mysql/client.js +12 -7
- package/dist/mysql/index.js +16 -11
- package/dist/opensearch/client.d.ts +14 -4
- package/dist/opensearch/client.js +15 -8
- package/dist/opensearch/index.js +15 -8
- package/dist/redis/client.d.ts +7 -6
- package/dist/redis/client.js +12 -7
- package/dist/redis/index.js +16 -11
- package/dist/s3/client.d.ts +5 -3
- package/dist/s3/client.js +16 -2
- package/dist/s3/datasource.js +15 -8
- package/dist/s3/handler.d.ts +2 -3
- package/dist/s3/handler.js +2 -1
- package/dist/s3/index.js +15 -8
- package/dist/transport/index.d.ts +18 -8
- package/dist/transport/index.js +17 -4
- package/dist/transport/lifecycle.d.ts +22 -0
- package/dist/transport/lifecycle.js +8 -0
- package/dist/transport/pod-relay.d.ts +7 -4
- package/dist/transport/pod-relay.js +6 -3
- package/dist/transport/service-port-forward.d.ts +30 -0
- package/dist/transport/service-port-forward.js +15 -0
- package/package.json +9 -3
- package/dist/{chunk-x0yhfg29.js → chunk-5w85c7cs.js} +3 -3
- package/dist/{chunk-ww11q58v.js → chunk-rncagjbc.js} +3 -3
- package/dist/{chunk-r3rnsvwv.js → chunk-xeft7af0.js} +3 -3
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PodRelayTransport
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import"../chunk-
|
|
3
|
+
} from "../chunk-kap6ka3n.js";
|
|
4
|
+
import"../chunk-ssj93brx.js";
|
|
5
|
+
import"../chunk-mvkxs8d0.js";
|
|
5
6
|
import"../chunk-rq5fc007.js";
|
|
6
7
|
import"../chunk-9shz0bw1.js";
|
|
7
|
-
import"../chunk-
|
|
8
|
+
import"../chunk-sb5qzv37.js";
|
|
9
|
+
import"../chunk-43mcyrh4.js";
|
|
10
|
+
import"../chunk-rkt41za2.js";
|
|
8
11
|
export {
|
|
9
12
|
PodRelayTransport
|
|
10
13
|
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Transport } from "./lifecycle";
|
|
2
|
+
import type { Endpoint, TcpTransport, TransportPath } from "./index";
|
|
3
|
+
import type { ConnectionAttempt } from "../connection/acquire";
|
|
4
|
+
import { type Executor, type KubectlOptions } from "../kubernetes/executor";
|
|
5
|
+
import type { StartPortForward } from "../kubernetes/port-forward";
|
|
6
|
+
/**
|
|
7
|
+
* @spec One manager-owned transport shares forwards across protocol clients in the same namespace.
|
|
8
|
+
* @rule Cancelling a borrower does not stop a shared forward; root disposal releases it.
|
|
9
|
+
* @see {@link component://docs/toolbox.md}
|
|
10
|
+
*/
|
|
11
|
+
export declare class ServicePortForwardTransport extends Transport implements TcpTransport {
|
|
12
|
+
#private;
|
|
13
|
+
private readonly options;
|
|
14
|
+
private readonly dependencies?;
|
|
15
|
+
readonly kind = "tcp";
|
|
16
|
+
readonly name = "port-forward";
|
|
17
|
+
constructor(options: KubectlOptions & {
|
|
18
|
+
namespace: string;
|
|
19
|
+
signal?: AbortSignal;
|
|
20
|
+
onDiagnostic?: (line: string) => void;
|
|
21
|
+
}, dependencies?: {
|
|
22
|
+
executor?: Executor;
|
|
23
|
+
startForward?: StartPortForward;
|
|
24
|
+
} | undefined);
|
|
25
|
+
protected paths(): readonly TransportPath[];
|
|
26
|
+
initialize(): Promise<void>;
|
|
27
|
+
get activeForwards(): readonly import("../kubernetes/port-forward").PortForward[];
|
|
28
|
+
connect(endpoint: Endpoint, attempt?: ConnectionAttempt): Promise<Endpoint>;
|
|
29
|
+
protected close(): Promise<void>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ServicePortForwardTransport
|
|
3
|
+
} from "../chunk-ehmx0yhp.js";
|
|
4
|
+
import"../chunk-0d8vs5q8.js";
|
|
5
|
+
import"../chunk-xgnz10sr.js";
|
|
6
|
+
import"../chunk-6fnhzhdb.js";
|
|
7
|
+
import"../chunk-mvkxs8d0.js";
|
|
8
|
+
import"../chunk-rq5fc007.js";
|
|
9
|
+
import"../chunk-9shz0bw1.js";
|
|
10
|
+
import"../chunk-sb5qzv37.js";
|
|
11
|
+
import"../chunk-43mcyrh4.js";
|
|
12
|
+
import"../chunk-rkt41za2.js";
|
|
13
|
+
export {
|
|
14
|
+
ServicePortForwardTransport
|
|
15
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compforge/harness-toolbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Shared infrastructure clients, transports and bounded data capture",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -92,6 +92,10 @@
|
|
|
92
92
|
"./file": {
|
|
93
93
|
"types": "./dist/file/index.d.ts",
|
|
94
94
|
"import": "./dist/file/index.js"
|
|
95
|
+
},
|
|
96
|
+
"./http": {
|
|
97
|
+
"types": "./dist/http/index.d.ts",
|
|
98
|
+
"import": "./dist/http/index.js"
|
|
95
99
|
}
|
|
96
100
|
},
|
|
97
101
|
"files": [
|
|
@@ -99,15 +103,17 @@
|
|
|
99
103
|
"README.md"
|
|
100
104
|
],
|
|
101
105
|
"dependencies": {
|
|
102
|
-
"@compforge/harness-common": "0.5.4",
|
|
103
106
|
"@aws-sdk/client-s3": "3.1133.0",
|
|
107
|
+
"@compforge/harness-common": "0.5.10",
|
|
104
108
|
"@kubernetes/client-node": "1.4.0",
|
|
105
109
|
"@opensearch-project/opensearch": "3.6.0",
|
|
106
110
|
"@redis/client": "6.1.0",
|
|
107
111
|
"@smithy/node-http-handler": "4.12.1",
|
|
108
112
|
"mysql2": "3.23.1",
|
|
109
113
|
"node-fetch": "2.7.0",
|
|
110
|
-
"
|
|
114
|
+
"race-signal": "2.0.2",
|
|
115
|
+
"ws": "8.21.3",
|
|
116
|
+
"@smithy/core": "3.34.1"
|
|
111
117
|
},
|
|
112
118
|
"devDependencies": {
|
|
113
119
|
"@types/bun": "latest",
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
clientKey
|
|
6
6
|
} from "./chunk-a9htb6cr.js";
|
|
7
|
+
import {
|
|
8
|
+
ConcurrencyPool
|
|
9
|
+
} from "./chunk-v3hxvnrc.js";
|
|
7
10
|
import {
|
|
8
11
|
KubernetesError,
|
|
9
12
|
ToolboxError,
|
|
10
13
|
kubernetesHttpError
|
|
11
14
|
} from "./chunk-rkt41za2.js";
|
|
12
|
-
import {
|
|
13
|
-
ConcurrencyPool
|
|
14
|
-
} from "./chunk-v3hxvnrc.js";
|
|
15
15
|
|
|
16
16
|
// src/kubernetes/resource-transport.ts
|
|
17
17
|
import { KubeConfig } from "@kubernetes/client-node";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ConcurrencyPool
|
|
3
|
+
} from "./chunk-v3hxvnrc.js";
|
|
1
4
|
import {
|
|
2
5
|
FileError,
|
|
3
6
|
ToolboxError
|
|
4
7
|
} from "./chunk-rkt41za2.js";
|
|
5
|
-
import {
|
|
6
|
-
ConcurrencyPool
|
|
7
|
-
} from "./chunk-v3hxvnrc.js";
|
|
8
8
|
|
|
9
9
|
// src/file/client.ts
|
|
10
10
|
function fileClientOptions(options) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ConcurrencyPool
|
|
3
|
+
} from "./chunk-v3hxvnrc.js";
|
|
1
4
|
import {
|
|
2
5
|
KubernetesError,
|
|
3
6
|
kubernetesHttpError
|
|
4
7
|
} from "./chunk-rkt41za2.js";
|
|
5
|
-
import {
|
|
6
|
-
ConcurrencyPool
|
|
7
|
-
} from "./chunk-v3hxvnrc.js";
|
|
8
8
|
|
|
9
9
|
// src/kubernetes/exec-transport.ts
|
|
10
10
|
import { KubeConfig } from "@kubernetes/client-node";
|