@microsoft/dev-tunnels-contracts 1.0.8 → 1.0.7302

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.
Files changed (60) hide show
  1. package/README.md +2 -2
  2. package/clusterDetails.d.ts +19 -19
  3. package/clusterDetails.js +6 -6
  4. package/index.d.ts +17 -17
  5. package/index.js +21 -21
  6. package/localNetworkTunnelEndpoint.d.ts +20 -20
  7. package/localNetworkTunnelEndpoint.js +6 -6
  8. package/package.json +1 -1
  9. package/problemDetails.d.ts +24 -24
  10. package/problemDetails.js +6 -6
  11. package/rateStatus.d.ts +19 -20
  12. package/rateStatus.d.ts.map +1 -1
  13. package/rateStatus.js +6 -6
  14. package/resourceStatus.d.ts +17 -17
  15. package/resourceStatus.js +6 -6
  16. package/serviceVersionDetails.d.ts +26 -26
  17. package/serviceVersionDetails.js +6 -6
  18. package/tsbuildinfo.json +1 -1
  19. package/tunnel.d.ts +78 -78
  20. package/tunnel.js +6 -6
  21. package/tunnelAccessControl.d.ts +27 -27
  22. package/tunnelAccessControl.js +13 -13
  23. package/tunnelAccessControlEntry.d.ts +79 -79
  24. package/tunnelAccessControlEntry.js +39 -39
  25. package/tunnelAccessControlEntryType.d.ts +45 -45
  26. package/tunnelAccessControlEntryType.js +53 -53
  27. package/tunnelAccessControlStatics.d.ts +10 -10
  28. package/tunnelAccessControlStatics.js +46 -46
  29. package/tunnelAccessScopes.d.ts +38 -38
  30. package/tunnelAccessScopes.js +46 -46
  31. package/tunnelAccessSubject.d.ts +39 -39
  32. package/tunnelAccessSubject.js +6 -6
  33. package/tunnelAuthenticationSchemes.d.ts +17 -17
  34. package/tunnelAuthenticationSchemes.js +25 -25
  35. package/tunnelConnectionMode.d.ts +19 -19
  36. package/tunnelConnectionMode.js +27 -27
  37. package/tunnelConstraints.d.ts +53 -53
  38. package/tunnelConstraints.js +61 -61
  39. package/tunnelEndpoint.d.ts +72 -72
  40. package/tunnelEndpoint.js +20 -20
  41. package/tunnelEndpointStatics.d.ts +19 -19
  42. package/tunnelEndpointStatics.js +48 -48
  43. package/tunnelHeaderNames.d.ts +27 -27
  44. package/tunnelHeaderNames.js +35 -35
  45. package/tunnelOptions.d.ts +11 -11
  46. package/tunnelOptions.js +6 -6
  47. package/tunnelPort.d.ts +70 -70
  48. package/tunnelPort.js +6 -6
  49. package/tunnelPortStatus.d.ts +39 -39
  50. package/tunnelPortStatus.js +6 -6
  51. package/tunnelProtocol.d.ts +33 -33
  52. package/tunnelProtocol.js +41 -41
  53. package/tunnelRelayTunnelEndpoint.d.ts +14 -14
  54. package/tunnelRelayTunnelEndpoint.js +6 -6
  55. package/tunnelServiceProperties.d.ts +99 -99
  56. package/tunnelServiceProperties.js +77 -77
  57. package/tunnelServicePropertiesStatics.d.ts +17 -17
  58. package/tunnelServicePropertiesStatics.js +55 -55
  59. package/tunnelStatus.d.ts +66 -66
  60. package/tunnelStatus.js +6 -6
@@ -1,28 +1,28 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- // Generated from ../../../cs/src/Contracts/TunnelConnectionMode.cs
5
- /* eslint-disable */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.TunnelConnectionMode = void 0;
8
- /**
9
- * Specifies the connection protocol / implementation for a tunnel.
10
- *
11
- * Depending on the connection mode, hosts or clients might need to use different
12
- * authentication and connection protocols.
13
- */
14
- var TunnelConnectionMode;
15
- (function (TunnelConnectionMode) {
16
- /**
17
- * Connect directly to the host over the local network.
18
- *
19
- * While it's technically not "tunneling", this mode may be combined with others to
20
- * enable choosing the most efficient connection mode available.
21
- */
22
- TunnelConnectionMode["LocalNetwork"] = "LocalNetwork";
23
- /**
24
- * Use the tunnel service's integrated relay function.
25
- */
26
- TunnelConnectionMode["TunnelRelay"] = "TunnelRelay";
27
- })(TunnelConnectionMode = exports.TunnelConnectionMode || (exports.TunnelConnectionMode = {}));
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ // Generated from ../../../cs/src/Contracts/TunnelConnectionMode.cs
5
+ /* eslint-disable */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.TunnelConnectionMode = void 0;
8
+ /**
9
+ * Specifies the connection protocol / implementation for a tunnel.
10
+ *
11
+ * Depending on the connection mode, hosts or clients might need to use different
12
+ * authentication and connection protocols.
13
+ */
14
+ var TunnelConnectionMode;
15
+ (function (TunnelConnectionMode) {
16
+ /**
17
+ * Connect directly to the host over the local network.
18
+ *
19
+ * While it's technically not "tunneling", this mode may be combined with others to
20
+ * enable choosing the most efficient connection mode available.
21
+ */
22
+ TunnelConnectionMode["LocalNetwork"] = "LocalNetwork";
23
+ /**
24
+ * Use the tunnel service's integrated relay function.
25
+ */
26
+ TunnelConnectionMode["TunnelRelay"] = "TunnelRelay";
27
+ })(TunnelConnectionMode = exports.TunnelConnectionMode || (exports.TunnelConnectionMode = {}));
28
28
  //# sourceMappingURL=tunnelConnectionMode.js.map
@@ -1,54 +1,54 @@
1
- /**
2
- * Tunnel constraints.
3
- */
4
- declare namespace TunnelConstraints {
5
- /**
6
- * Min length of tunnel cluster ID.
7
- */
8
- const clusterIdMinLength: number;
9
- /**
10
- * Max length of tunnel cluster ID.
11
- */
12
- const clusterIdMaxLength: number;
13
- /**
14
- * Characters that are valid in tunnel id. Vowels and 'y' are excluded to avoid
15
- * accidentally generating any random words.
16
- */
17
- const tunnelIdChars: string;
18
- /**
19
- * Length of tunnel id.
20
- */
21
- const tunnelIdLength: number;
22
- /**
23
- * Min length of tunnel name.
24
- */
25
- const tunnelNameMinLength: number;
26
- /**
27
- * Max length of tunnel name.
28
- */
29
- const tunnelNameMaxLength: number;
30
- /**
31
- * Gets a regular expression that can match or validate tunnel cluster ID strings.
32
- *
33
- * Cluster IDs are alphanumeric; hyphens are not permitted.
34
- */
35
- const clusterIdRegex: RegExp;
36
- /**
37
- * Gets a regular expression that can match or validate tunnel ID strings.
38
- *
39
- * Tunnel IDs are fixed-length and have a limited character set of numbers and some
40
- * lowercase letters (minus vowels).
41
- */
42
- const tunnelIdRegex: RegExp;
43
- /**
44
- * Gets a regular expression that can match or validate tunnel names.
45
- *
46
- * Tunnel names are alphanumeric and may contain hyphens.
47
- */
48
- const tunnelNameRegex: RegExp;
49
- /**
50
- * Gets a regular expression that can match or validate tunnel names.
51
- */
52
- const tunnelTagRegex: RegExp;
53
- }
1
+ /**
2
+ * Tunnel constraints.
3
+ */
4
+ declare namespace TunnelConstraints {
5
+ /**
6
+ * Min length of tunnel cluster ID.
7
+ */
8
+ const clusterIdMinLength: number;
9
+ /**
10
+ * Max length of tunnel cluster ID.
11
+ */
12
+ const clusterIdMaxLength: number;
13
+ /**
14
+ * Characters that are valid in tunnel id. Vowels and 'y' are excluded to avoid
15
+ * accidentally generating any random words.
16
+ */
17
+ const tunnelIdChars: string;
18
+ /**
19
+ * Length of tunnel id.
20
+ */
21
+ const tunnelIdLength: number;
22
+ /**
23
+ * Min length of tunnel name.
24
+ */
25
+ const tunnelNameMinLength: number;
26
+ /**
27
+ * Max length of tunnel name.
28
+ */
29
+ const tunnelNameMaxLength: number;
30
+ /**
31
+ * Gets a regular expression that can match or validate tunnel cluster ID strings.
32
+ *
33
+ * Cluster IDs are alphanumeric; hyphens are not permitted.
34
+ */
35
+ const clusterIdRegex: RegExp;
36
+ /**
37
+ * Gets a regular expression that can match or validate tunnel ID strings.
38
+ *
39
+ * Tunnel IDs are fixed-length and have a limited character set of numbers and some
40
+ * lowercase letters (minus vowels).
41
+ */
42
+ const tunnelIdRegex: RegExp;
43
+ /**
44
+ * Gets a regular expression that can match or validate tunnel names.
45
+ *
46
+ * Tunnel names are alphanumeric and may contain hyphens.
47
+ */
48
+ const tunnelNameRegex: RegExp;
49
+ /**
50
+ * Gets a regular expression that can match or validate tunnel names.
51
+ */
52
+ const tunnelTagRegex: RegExp;
53
+ }
54
54
  //# sourceMappingURL=tunnelConstraints.d.ts.map
@@ -1,62 +1,62 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- // Generated from ../../../cs/src/Contracts/TunnelConstraints.cs
5
- /* eslint-disable */
6
- /**
7
- * Tunnel constraints.
8
- */
9
- var TunnelConstraints;
10
- (function (TunnelConstraints) {
11
- /**
12
- * Min length of tunnel cluster ID.
13
- */
14
- TunnelConstraints.clusterIdMinLength = 3;
15
- /**
16
- * Max length of tunnel cluster ID.
17
- */
18
- TunnelConstraints.clusterIdMaxLength = 12;
19
- /**
20
- * Characters that are valid in tunnel id. Vowels and 'y' are excluded to avoid
21
- * accidentally generating any random words.
22
- */
23
- TunnelConstraints.tunnelIdChars = '0123456789bcdfghjklmnpqrstvwxz';
24
- /**
25
- * Length of tunnel id.
26
- */
27
- TunnelConstraints.tunnelIdLength = 8;
28
- /**
29
- * Min length of tunnel name.
30
- */
31
- TunnelConstraints.tunnelNameMinLength = 3;
32
- /**
33
- * Max length of tunnel name.
34
- */
35
- TunnelConstraints.tunnelNameMaxLength = 60;
36
- /**
37
- * Gets a regular expression that can match or validate tunnel cluster ID strings.
38
- *
39
- * Cluster IDs are alphanumeric; hyphens are not permitted.
40
- */
41
- TunnelConstraints.clusterIdRegex = new RegExp('[a-z][a-z0-9]{' + (TunnelConstraints.clusterIdMinLength - 1) + ',' + (TunnelConstraints.clusterIdMaxLength - 1) + '}');
42
- /**
43
- * Gets a regular expression that can match or validate tunnel ID strings.
44
- *
45
- * Tunnel IDs are fixed-length and have a limited character set of numbers and some
46
- * lowercase letters (minus vowels).
47
- */
48
- TunnelConstraints.tunnelIdRegex = new RegExp('[' + TunnelConstraints.tunnelIdChars.replace('0123456789', '0-9') + ']{' + TunnelConstraints.tunnelIdLength + '}');
49
- /**
50
- * Gets a regular expression that can match or validate tunnel names.
51
- *
52
- * Tunnel names are alphanumeric and may contain hyphens.
53
- */
54
- TunnelConstraints.tunnelNameRegex = new RegExp('[a-z0-9][a-z0-9-]{' +
55
- (TunnelConstraints.tunnelNameMinLength - 2) + ',' + (TunnelConstraints.tunnelNameMaxLength - 2) +
56
- '}[a-z0-9]');
57
- /**
58
- * Gets a regular expression that can match or validate tunnel names.
59
- */
60
- TunnelConstraints.tunnelTagRegex = new RegExp('^[\\w-=]+$');
61
- })(TunnelConstraints || (TunnelConstraints = {}));
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ // Generated from ../../../cs/src/Contracts/TunnelConstraints.cs
5
+ /* eslint-disable */
6
+ /**
7
+ * Tunnel constraints.
8
+ */
9
+ var TunnelConstraints;
10
+ (function (TunnelConstraints) {
11
+ /**
12
+ * Min length of tunnel cluster ID.
13
+ */
14
+ TunnelConstraints.clusterIdMinLength = 3;
15
+ /**
16
+ * Max length of tunnel cluster ID.
17
+ */
18
+ TunnelConstraints.clusterIdMaxLength = 12;
19
+ /**
20
+ * Characters that are valid in tunnel id. Vowels and 'y' are excluded to avoid
21
+ * accidentally generating any random words.
22
+ */
23
+ TunnelConstraints.tunnelIdChars = '0123456789bcdfghjklmnpqrstvwxz';
24
+ /**
25
+ * Length of tunnel id.
26
+ */
27
+ TunnelConstraints.tunnelIdLength = 8;
28
+ /**
29
+ * Min length of tunnel name.
30
+ */
31
+ TunnelConstraints.tunnelNameMinLength = 3;
32
+ /**
33
+ * Max length of tunnel name.
34
+ */
35
+ TunnelConstraints.tunnelNameMaxLength = 60;
36
+ /**
37
+ * Gets a regular expression that can match or validate tunnel cluster ID strings.
38
+ *
39
+ * Cluster IDs are alphanumeric; hyphens are not permitted.
40
+ */
41
+ TunnelConstraints.clusterIdRegex = new RegExp('[a-z][a-z0-9]{' + (TunnelConstraints.clusterIdMinLength - 1) + ',' + (TunnelConstraints.clusterIdMaxLength - 1) + '}');
42
+ /**
43
+ * Gets a regular expression that can match or validate tunnel ID strings.
44
+ *
45
+ * Tunnel IDs are fixed-length and have a limited character set of numbers and some
46
+ * lowercase letters (minus vowels).
47
+ */
48
+ TunnelConstraints.tunnelIdRegex = new RegExp('[' + TunnelConstraints.tunnelIdChars.replace('0123456789', '0-9') + ']{' + TunnelConstraints.tunnelIdLength + '}');
49
+ /**
50
+ * Gets a regular expression that can match or validate tunnel names.
51
+ *
52
+ * Tunnel names are alphanumeric and may contain hyphens.
53
+ */
54
+ TunnelConstraints.tunnelNameRegex = new RegExp('[a-z0-9][a-z0-9-]{' +
55
+ (TunnelConstraints.tunnelNameMinLength - 2) + ',' + (TunnelConstraints.tunnelNameMaxLength - 2) +
56
+ '}[a-z0-9]');
57
+ /**
58
+ * Gets a regular expression that can match or validate tunnel names.
59
+ */
60
+ TunnelConstraints.tunnelTagRegex = new RegExp('^[\\w-=]+$');
61
+ })(TunnelConstraints || (TunnelConstraints = {}));
62
62
  //# sourceMappingURL=tunnelConstraints.js.map
@@ -1,73 +1,73 @@
1
- import { TunnelConnectionMode } from './tunnelConnectionMode';
2
- /**
3
- * Base class for tunnel connection parameters.
4
- *
5
- * A tunnel endpoint specifies how and where hosts and clients can connect to a tunnel.
6
- * There is a subclass for each connection mode, each having different connection
7
- * parameters. A tunnel may have multiple endpoints for one host (or multiple hosts), and
8
- * clients can select their preferred endpoint(s) from those depending on network
9
- * environment or client capabilities.
10
- */
11
- export interface TunnelEndpoint {
12
- /**
13
- * Gets or sets the connection mode of the endpoint.
14
- *
15
- * This property is required when creating or updating an endpoint. The subclass type
16
- * is also an indication of the connection mode, but this property is necessary to
17
- * determine the subclass type when deserializing.
18
- */
19
- connectionMode: TunnelConnectionMode;
20
- /**
21
- * Gets or sets the ID of the host that is listening on this endpoint.
22
- *
23
- * This property is required when creating or updating an endpoint. If the host
24
- * supports multiple connection modes, the host's ID is the same for all the endpoints
25
- * it supports. However different hosts may simultaneously accept connections at
26
- * different endpoints for the same tunnel, if enabled in tunnel options.
27
- */
28
- hostId: string;
29
- /**
30
- * Gets or sets an array of public keys, which can be used by clients to authenticate
31
- * the host.
32
- */
33
- hostPublicKeys?: string[];
34
- /**
35
- * Gets or sets a string used to format URIs where a web client can connect to ports
36
- * of the tunnel. The string includes a {@link TunnelEndpoint.portToken} that must be
37
- * replaced with the actual port number.
38
- */
39
- portUriFormat?: string;
40
- /**
41
- * Gets or sets the URI where a web client can connect to the default port of the
42
- * tunnel.
43
- */
44
- tunnelUri?: string;
45
- /**
46
- * Gets or sets a string used to format ssh command where ssh client can connect to
47
- * shared ssh port of the tunnel. The string includes a {@link
48
- * TunnelEndpoint.portToken} that must be replaced with the actual port number.
49
- */
50
- portSshCommandFormat?: string;
51
- /**
52
- * Gets or sets the Ssh command where the Ssh client can connect to the default ssh
53
- * port of the tunnel.
54
- */
55
- tunnelSshCommand?: string;
56
- /**
57
- * Gets or sets the Ssh gateway public key which should be added to the
58
- * authorized_keys file so that tunnel service can connect to the shared ssh server.
59
- */
60
- sshGatewayPublicKey?: string;
61
- }
62
- /**
63
- * Token included in {@link TunnelEndpoint.portUriFormat} and {@link
64
- * TunnelEndpoint.portSshCommandFormat} that is to be replaced by a specified port number.
65
- */
66
- export declare const portToken = "{port}";
67
- import { getPortUri, getPortSshCommand } from './tunnelEndpointStatics';
68
- export declare const TunnelEndpoint: {
69
- portToken: string;
70
- getPortUri: typeof getPortUri;
71
- getPortSshCommand: typeof getPortSshCommand;
72
- };
1
+ import { TunnelConnectionMode } from './tunnelConnectionMode';
2
+ /**
3
+ * Base class for tunnel connection parameters.
4
+ *
5
+ * A tunnel endpoint specifies how and where hosts and clients can connect to a tunnel.
6
+ * There is a subclass for each connection mode, each having different connection
7
+ * parameters. A tunnel may have multiple endpoints for one host (or multiple hosts), and
8
+ * clients can select their preferred endpoint(s) from those depending on network
9
+ * environment or client capabilities.
10
+ */
11
+ export interface TunnelEndpoint {
12
+ /**
13
+ * Gets or sets the connection mode of the endpoint.
14
+ *
15
+ * This property is required when creating or updating an endpoint. The subclass type
16
+ * is also an indication of the connection mode, but this property is necessary to
17
+ * determine the subclass type when deserializing.
18
+ */
19
+ connectionMode: TunnelConnectionMode;
20
+ /**
21
+ * Gets or sets the ID of the host that is listening on this endpoint.
22
+ *
23
+ * This property is required when creating or updating an endpoint. If the host
24
+ * supports multiple connection modes, the host's ID is the same for all the endpoints
25
+ * it supports. However different hosts may simultaneously accept connections at
26
+ * different endpoints for the same tunnel, if enabled in tunnel options.
27
+ */
28
+ hostId: string;
29
+ /**
30
+ * Gets or sets an array of public keys, which can be used by clients to authenticate
31
+ * the host.
32
+ */
33
+ hostPublicKeys?: string[];
34
+ /**
35
+ * Gets or sets a string used to format URIs where a web client can connect to ports
36
+ * of the tunnel. The string includes a {@link TunnelEndpoint.portToken} that must be
37
+ * replaced with the actual port number.
38
+ */
39
+ portUriFormat?: string;
40
+ /**
41
+ * Gets or sets the URI where a web client can connect to the default port of the
42
+ * tunnel.
43
+ */
44
+ tunnelUri?: string;
45
+ /**
46
+ * Gets or sets a string used to format ssh command where ssh client can connect to
47
+ * shared ssh port of the tunnel. The string includes a {@link
48
+ * TunnelEndpoint.portToken} that must be replaced with the actual port number.
49
+ */
50
+ portSshCommandFormat?: string;
51
+ /**
52
+ * Gets or sets the Ssh command where the Ssh client can connect to the default ssh
53
+ * port of the tunnel.
54
+ */
55
+ tunnelSshCommand?: string;
56
+ /**
57
+ * Gets or sets the Ssh gateway public key which should be added to the
58
+ * authorized_keys file so that tunnel service can connect to the shared ssh server.
59
+ */
60
+ sshGatewayPublicKey?: string;
61
+ }
62
+ /**
63
+ * Token included in {@link TunnelEndpoint.portUriFormat} and {@link
64
+ * TunnelEndpoint.portSshCommandFormat} that is to be replaced by a specified port number.
65
+ */
66
+ export declare const portToken = "{port}";
67
+ import { getPortUri, getPortSshCommand } from './tunnelEndpointStatics';
68
+ export declare const TunnelEndpoint: {
69
+ portToken: string;
70
+ getPortUri: typeof getPortUri;
71
+ getPortSshCommand: typeof getPortSshCommand;
72
+ };
73
73
  //# sourceMappingURL=tunnelEndpoint.d.ts.map
package/tunnelEndpoint.js CHANGED
@@ -1,21 +1,21 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- // Generated from ../../../cs/src/Contracts/TunnelEndpoint.cs
5
- /* eslint-disable */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.TunnelEndpoint = exports.portToken = void 0;
8
- /**
9
- * Token included in {@link TunnelEndpoint.portUriFormat} and {@link
10
- * TunnelEndpoint.portSshCommandFormat} that is to be replaced by a specified port number.
11
- */
12
- exports.portToken = '{port}';
13
- // Import static members from a non-generated file,
14
- // and re-export them as an object with the same name as the interface.
15
- const tunnelEndpointStatics_1 = require("./tunnelEndpointStatics");
16
- exports.TunnelEndpoint = {
17
- portToken: exports.portToken,
18
- getPortUri: tunnelEndpointStatics_1.getPortUri,
19
- getPortSshCommand: tunnelEndpointStatics_1.getPortSshCommand,
20
- };
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ // Generated from ../../../cs/src/Contracts/TunnelEndpoint.cs
5
+ /* eslint-disable */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.TunnelEndpoint = exports.portToken = void 0;
8
+ /**
9
+ * Token included in {@link TunnelEndpoint.portUriFormat} and {@link
10
+ * TunnelEndpoint.portSshCommandFormat} that is to be replaced by a specified port number.
11
+ */
12
+ exports.portToken = '{port}';
13
+ // Import static members from a non-generated file,
14
+ // and re-export them as an object with the same name as the interface.
15
+ const tunnelEndpointStatics_1 = require("./tunnelEndpointStatics");
16
+ exports.TunnelEndpoint = {
17
+ portToken: exports.portToken,
18
+ getPortUri: tunnelEndpointStatics_1.getPortUri,
19
+ getPortSshCommand: tunnelEndpointStatics_1.getPortSshCommand,
20
+ };
21
21
  //# sourceMappingURL=tunnelEndpoint.js.map
@@ -1,20 +1,20 @@
1
- import { TunnelEndpoint as ITunnelEndpoint } from './tunnelEndpoint';
2
- /**
3
- * Gets a URI where a web client can connect to a tunnel port.
4
- *
5
- * Requests to the URI may result in HTTP 307 redirections, so the client may need to
6
- * follow the redirection in order to connect to the port.
7
- *
8
- * If the port is not currently shared via the tunnel, or if a host is not currently
9
- * connected to the tunnel, then requests to the port URI may result in a 502 Bad Gateway
10
- * response.
11
- *
12
- * @param endpoint The tunnel endpoint containing connection information.
13
- * @param portNumber The port number to connect to; the port is assumed to be
14
- * separately shared by a tunnel host.
15
- * @returns URI for the requested port, or `undefined` if the endpoint does not support
16
- * web client connections.
17
- */
18
- export declare function getPortUri(endpoint: ITunnelEndpoint, portNumber?: number): string | undefined;
19
- export declare function getPortSshCommand(endpoint: ITunnelEndpoint, portNumber?: number): string | undefined;
1
+ import { TunnelEndpoint as ITunnelEndpoint } from './tunnelEndpoint';
2
+ /**
3
+ * Gets a URI where a web client can connect to a tunnel port.
4
+ *
5
+ * Requests to the URI may result in HTTP 307 redirections, so the client may need to
6
+ * follow the redirection in order to connect to the port.
7
+ *
8
+ * If the port is not currently shared via the tunnel, or if a host is not currently
9
+ * connected to the tunnel, then requests to the port URI may result in a 502 Bad Gateway
10
+ * response.
11
+ *
12
+ * @param endpoint The tunnel endpoint containing connection information.
13
+ * @param portNumber The port number to connect to; the port is assumed to be
14
+ * separately shared by a tunnel host.
15
+ * @returns URI for the requested port, or `undefined` if the endpoint does not support
16
+ * web client connections.
17
+ */
18
+ export declare function getPortUri(endpoint: ITunnelEndpoint, portNumber?: number): string | undefined;
19
+ export declare function getPortSshCommand(endpoint: ITunnelEndpoint, portNumber?: number): string | undefined;
20
20
  //# sourceMappingURL=tunnelEndpointStatics.d.ts.map
@@ -1,49 +1,49 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT license.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.getPortSshCommand = exports.getPortUri = void 0;
6
- const tunnelEndpoint_1 = require("./tunnelEndpoint");
7
- /**
8
- * Gets a URI where a web client can connect to a tunnel port.
9
- *
10
- * Requests to the URI may result in HTTP 307 redirections, so the client may need to
11
- * follow the redirection in order to connect to the port.
12
- *
13
- * If the port is not currently shared via the tunnel, or if a host is not currently
14
- * connected to the tunnel, then requests to the port URI may result in a 502 Bad Gateway
15
- * response.
16
- *
17
- * @param endpoint The tunnel endpoint containing connection information.
18
- * @param portNumber The port number to connect to; the port is assumed to be
19
- * separately shared by a tunnel host.
20
- * @returns URI for the requested port, or `undefined` if the endpoint does not support
21
- * web client connections.
22
- */
23
- function getPortUri(endpoint, portNumber) {
24
- if (!endpoint) {
25
- throw new TypeError('A tunnel endpoint is required.');
26
- }
27
- if (typeof portNumber !== 'number' && !endpoint.tunnelUri) {
28
- return endpoint.tunnelUri;
29
- }
30
- if (typeof portNumber !== 'number' || !endpoint.portUriFormat) {
31
- return undefined;
32
- }
33
- return endpoint.portUriFormat.replace(tunnelEndpoint_1.portToken, portNumber.toString());
34
- }
35
- exports.getPortUri = getPortUri;
36
- function getPortSshCommand(endpoint, portNumber) {
37
- if (!endpoint) {
38
- throw new TypeError('A tunnel endpoint is required.');
39
- }
40
- if (typeof portNumber !== 'number' && !endpoint.tunnelSshCommand) {
41
- return endpoint.tunnelSshCommand;
42
- }
43
- if (typeof portNumber !== 'number' || !endpoint.portSshCommandFormat) {
44
- return undefined;
45
- }
46
- return endpoint.portSshCommandFormat.replace(tunnelEndpoint_1.portToken, portNumber.toString());
47
- }
48
- exports.getPortSshCommand = getPortSshCommand;
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.getPortSshCommand = exports.getPortUri = void 0;
6
+ const tunnelEndpoint_1 = require("./tunnelEndpoint");
7
+ /**
8
+ * Gets a URI where a web client can connect to a tunnel port.
9
+ *
10
+ * Requests to the URI may result in HTTP 307 redirections, so the client may need to
11
+ * follow the redirection in order to connect to the port.
12
+ *
13
+ * If the port is not currently shared via the tunnel, or if a host is not currently
14
+ * connected to the tunnel, then requests to the port URI may result in a 502 Bad Gateway
15
+ * response.
16
+ *
17
+ * @param endpoint The tunnel endpoint containing connection information.
18
+ * @param portNumber The port number to connect to; the port is assumed to be
19
+ * separately shared by a tunnel host.
20
+ * @returns URI for the requested port, or `undefined` if the endpoint does not support
21
+ * web client connections.
22
+ */
23
+ function getPortUri(endpoint, portNumber) {
24
+ if (!endpoint) {
25
+ throw new TypeError('A tunnel endpoint is required.');
26
+ }
27
+ if (typeof portNumber !== 'number' && !endpoint.tunnelUri) {
28
+ return endpoint.tunnelUri;
29
+ }
30
+ if (typeof portNumber !== 'number' || !endpoint.portUriFormat) {
31
+ return undefined;
32
+ }
33
+ return endpoint.portUriFormat.replace(tunnelEndpoint_1.portToken, portNumber.toString());
34
+ }
35
+ exports.getPortUri = getPortUri;
36
+ function getPortSshCommand(endpoint, portNumber) {
37
+ if (!endpoint) {
38
+ throw new TypeError('A tunnel endpoint is required.');
39
+ }
40
+ if (typeof portNumber !== 'number' && !endpoint.tunnelSshCommand) {
41
+ return endpoint.tunnelSshCommand;
42
+ }
43
+ if (typeof portNumber !== 'number' || !endpoint.portSshCommandFormat) {
44
+ return undefined;
45
+ }
46
+ return endpoint.portSshCommandFormat.replace(tunnelEndpoint_1.portToken, portNumber.toString());
47
+ }
48
+ exports.getPortSshCommand = getPortSshCommand;
49
49
  //# sourceMappingURL=tunnelEndpointStatics.js.map