@dbx-tools/tunnel 0.9.203 → 0.9.205
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 +88 -88
- package/index.ts +5 -5
- package/lib/index.d.ts +5 -5
- package/lib/index.js +4 -4
- package/lib/src/frp.d.ts +15 -13
- package/lib/src/frp.js +5 -1
- package/lib/src/generated/_login-client.d.ts +1 -1
- package/lib/src/generated/_login-client.js +2 -2
- package/lib/src/portr.d.ts +10 -8
- package/lib/src/portr.js +8 -1
- package/package.json +8 -8
- package/src/frp.ts +8 -14
- package/src/generated/_login-client.ts +1 -1
- package/src/portr.ts +11 -9
package/src/portr.ts
CHANGED
|
@@ -37,15 +37,6 @@ export interface PortrInstallOptions {
|
|
|
37
37
|
homeDir?: string;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
/** Resolved portr wiring, or `undefined` when no tunnel is configured. */
|
|
41
|
-
export interface PortrConfig {
|
|
42
|
-
subdomain: string;
|
|
43
|
-
server: string;
|
|
44
|
-
sshUrl: string;
|
|
45
|
-
token: string;
|
|
46
|
-
port: number;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
40
|
export const PortrOptionsSchema = z
|
|
50
41
|
.object({
|
|
51
42
|
publicDomain: z.string().trim().min(1).optional().describe("Public tunnel domain."),
|
|
@@ -59,6 +50,17 @@ export const PortrOptionsSchema = z
|
|
|
59
50
|
|
|
60
51
|
export type PortrOptions = z.input<typeof PortrOptionsSchema>;
|
|
61
52
|
|
|
53
|
+
/** Resolved control endpoint and credentials derived from Portr options. */
|
|
54
|
+
export const PortrConfigSchema = PortrOptionsSchema.omit({ publicDomain: true })
|
|
55
|
+
.required()
|
|
56
|
+
.extend({
|
|
57
|
+
server: PortrOptionsSchema.shape.publicDomain.unwrap().describe("Portr control host."),
|
|
58
|
+
})
|
|
59
|
+
.describe("Resolved Portr tunnel configuration.");
|
|
60
|
+
|
|
61
|
+
/** Resolved portr wiring, or `undefined` when no tunnel is configured. */
|
|
62
|
+
export type PortrConfig = z.output<typeof PortrConfigSchema>;
|
|
63
|
+
|
|
62
64
|
/**
|
|
63
65
|
* Resolve portr config from `TUNNEL_PUBLIC_DOMAIN` + `PORTR_TOKEN`, or an
|
|
64
66
|
* explicit `subdomain`. The domain is `<subdomain>.<server>` (e.g.
|