@hahnfeld/msrelay-provider 0.1.5 → 0.1.6
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/plugin.js +8 -17
- package/package.json +1 -1
package/dist/plugin.js
CHANGED
|
@@ -85,7 +85,7 @@ export function createRelayPlugin() {
|
|
|
85
85
|
let provider = null;
|
|
86
86
|
return {
|
|
87
87
|
name: "@hahnfeld/msrelay-provider",
|
|
88
|
-
version: "0.1.
|
|
88
|
+
version: "0.1.6",
|
|
89
89
|
description: "Azure Relay Hybrid Connections tunnel provider — private HTTP tunneling via Azure backbone",
|
|
90
90
|
essential: false,
|
|
91
91
|
permissions: [
|
|
@@ -133,7 +133,7 @@ export function createRelayPlugin() {
|
|
|
133
133
|
}
|
|
134
134
|
const connectionName = await terminal.text({
|
|
135
135
|
message: "Hybrid Connection name:",
|
|
136
|
-
defaultValue: existing.hybridConnectionName ??
|
|
136
|
+
defaultValue: existing.hybridConnectionName ?? `${nsName}-hybrid`,
|
|
137
137
|
validate: (v) => {
|
|
138
138
|
const trimmed = v.trim();
|
|
139
139
|
if (!trimmed)
|
|
@@ -146,7 +146,7 @@ export function createRelayPlugin() {
|
|
|
146
146
|
const hc = connectionName.trim();
|
|
147
147
|
const keyName = await terminal.text({
|
|
148
148
|
message: "SAS policy name (listen-only auth rule):",
|
|
149
|
-
defaultValue: existing.sasKeyName ??
|
|
149
|
+
defaultValue: existing.sasKeyName ?? `${nsName}-hybrid-policy`,
|
|
150
150
|
validate: (v) => {
|
|
151
151
|
if (!v.trim())
|
|
152
152
|
return "Policy name is required";
|
|
@@ -156,21 +156,15 @@ export function createRelayPlugin() {
|
|
|
156
156
|
const sasName = keyName.trim();
|
|
157
157
|
// ── Step 2: Show the public URL and exact az commands ──
|
|
158
158
|
terminal.log.step("Your public endpoint will be:");
|
|
159
|
-
terminal.log.info(`
|
|
159
|
+
terminal.log.info(`https://${ns}/${hc}/api/messages`);
|
|
160
160
|
terminal.log.info("");
|
|
161
161
|
terminal.log.step("Run these commands to create the Azure resources:");
|
|
162
162
|
terminal.log.info("");
|
|
163
|
-
terminal.log.info(`az relay namespace create
|
|
164
|
-
terminal.log.info(` --resource-group ${rg} --name ${nsName} --location westus2`);
|
|
163
|
+
terminal.log.info(`az relay namespace create --resource-group ${rg} --name ${nsName} --location westus2`);
|
|
165
164
|
terminal.log.info("");
|
|
166
|
-
terminal.log.info(`az relay hyco create
|
|
167
|
-
terminal.log.info(` --resource-group ${rg} --namespace-name ${nsName} \\`);
|
|
168
|
-
terminal.log.info(` --name ${hc} --requires-client-authorization false`);
|
|
165
|
+
terminal.log.info(`az relay hyco create --resource-group ${rg} --namespace-name ${nsName} --name ${hc} --requires-client-authorization false`);
|
|
169
166
|
terminal.log.info("");
|
|
170
|
-
terminal.log.info(`az relay hyco authorization-rule create
|
|
171
|
-
terminal.log.info(` --resource-group ${rg} --namespace-name ${nsName} \\`);
|
|
172
|
-
terminal.log.info(` --hybrid-connection-name ${hc} \\`);
|
|
173
|
-
terminal.log.info(` --name ${sasName} --rights Listen`);
|
|
167
|
+
terminal.log.info(`az relay hyco authorization-rule create --resource-group ${rg} --namespace-name ${nsName} --hybrid-connection-name ${hc} --name ${sasName} --rights Listen`);
|
|
174
168
|
terminal.log.info("");
|
|
175
169
|
terminal.log.warning("--requires-client-authorization cannot be changed after creation.");
|
|
176
170
|
terminal.log.warning("If you need to change it, delete and recreate the connection.");
|
|
@@ -178,10 +172,7 @@ export function createRelayPlugin() {
|
|
|
178
172
|
// ── Step 3: SAS Key ──
|
|
179
173
|
terminal.log.step("Retrieve the SAS key:");
|
|
180
174
|
terminal.log.info("");
|
|
181
|
-
terminal.log.info(`az relay hyco authorization-rule keys list
|
|
182
|
-
terminal.log.info(` --resource-group ${rg} --namespace-name ${nsName} \\`);
|
|
183
|
-
terminal.log.info(` --hybrid-connection-name ${hc} --name ${sasName} \\`);
|
|
184
|
-
terminal.log.info(` --query primaryKey -o tsv`);
|
|
175
|
+
terminal.log.info(`az relay hyco authorization-rule keys list --resource-group ${rg} --namespace-name ${nsName} --hybrid-connection-name ${hc} --name ${sasName} --query primaryKey -o tsv`);
|
|
185
176
|
terminal.log.info("");
|
|
186
177
|
const hasExistingKey = !!(existing.sasKeyValue);
|
|
187
178
|
let keyValue = await terminal.password({
|