@tomflow/proflow-dev-tunnel 0.1.21 → 0.1.22
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/CHANGELOG.md
CHANGED
|
@@ -28,7 +28,7 @@ export declare function createDevTunnelBehaviorAdapter(dependencies?: {
|
|
|
28
28
|
readonly ok: true;
|
|
29
29
|
readonly status: "SUCCEEDED";
|
|
30
30
|
readonly moduleRef: "dev-tunnel";
|
|
31
|
-
readonly moduleVersion: "0.1.
|
|
31
|
+
readonly moduleVersion: "0.1.22";
|
|
32
32
|
};
|
|
33
33
|
observedEffects: never[];
|
|
34
34
|
}>;
|
|
@@ -38,14 +38,14 @@ export declare function createDevTunnelBehaviorAdapter(dependencies?: {
|
|
|
38
38
|
readonly ok: true;
|
|
39
39
|
readonly status: "SUCCEEDED";
|
|
40
40
|
readonly moduleRef: "dev-tunnel";
|
|
41
|
-
readonly moduleVersion: "0.1.
|
|
41
|
+
readonly moduleVersion: "0.1.22";
|
|
42
42
|
};
|
|
43
43
|
observedEffects: string[];
|
|
44
44
|
} | {
|
|
45
45
|
result: {
|
|
46
46
|
contract: "deployment.result.v1";
|
|
47
47
|
moduleRef: "dev-tunnel";
|
|
48
|
-
moduleVersion: "0.1.
|
|
48
|
+
moduleVersion: "0.1.22";
|
|
49
49
|
ok: false;
|
|
50
50
|
status: "FAILED";
|
|
51
51
|
error: {
|
|
@@ -62,7 +62,7 @@ export declare function createDevTunnelBehaviorAdapter(dependencies?: {
|
|
|
62
62
|
ok: true;
|
|
63
63
|
status: "SUCCEEDED";
|
|
64
64
|
moduleRef: "dev-tunnel";
|
|
65
|
-
moduleVersion: "0.1.
|
|
65
|
+
moduleVersion: "0.1.22";
|
|
66
66
|
data: {
|
|
67
67
|
setupStatus: "ACTION_REQUIRED" | "READY";
|
|
68
68
|
runtimeStatus: "FAILED" | "RUNNING" | "STOPPED";
|
|
@@ -89,7 +89,7 @@ export declare function createDevTunnelBehaviorAdapter(dependencies?: {
|
|
|
89
89
|
ok: true;
|
|
90
90
|
status: "SUCCEEDED";
|
|
91
91
|
moduleRef: "dev-tunnel";
|
|
92
|
-
moduleVersion: "0.1.
|
|
92
|
+
moduleVersion: "0.1.22";
|
|
93
93
|
data: {
|
|
94
94
|
docs: string;
|
|
95
95
|
};
|
|
@@ -100,7 +100,7 @@ export declare function createDevTunnelBehaviorAdapter(dependencies?: {
|
|
|
100
100
|
result: {
|
|
101
101
|
contract: "deployment.result.v1";
|
|
102
102
|
moduleRef: "dev-tunnel";
|
|
103
|
-
moduleVersion: "0.1.
|
|
103
|
+
moduleVersion: "0.1.22";
|
|
104
104
|
ok: false;
|
|
105
105
|
status: "FAILED";
|
|
106
106
|
error: {
|
|
@@ -116,7 +116,7 @@ export declare function createDevTunnelBehaviorAdapter(dependencies?: {
|
|
|
116
116
|
ok: true;
|
|
117
117
|
status: "SUCCEEDED";
|
|
118
118
|
moduleRef: "dev-tunnel";
|
|
119
|
-
moduleVersion: "0.1.
|
|
119
|
+
moduleVersion: "0.1.22";
|
|
120
120
|
data: import("../src/resource-adapter.ts").DevTunnelObservation;
|
|
121
121
|
};
|
|
122
122
|
observedEffects: string[];
|
|
@@ -127,14 +127,14 @@ export declare function createDevTunnelBehaviorAdapter(dependencies?: {
|
|
|
127
127
|
readonly ok: true;
|
|
128
128
|
readonly status: "SUCCEEDED";
|
|
129
129
|
readonly moduleRef: "dev-tunnel";
|
|
130
|
-
readonly moduleVersion: "0.1.
|
|
130
|
+
readonly moduleVersion: "0.1.22";
|
|
131
131
|
};
|
|
132
132
|
observedEffects: string[];
|
|
133
133
|
} | {
|
|
134
134
|
result: {
|
|
135
135
|
contract: "deployment.result.v1";
|
|
136
136
|
moduleRef: "dev-tunnel";
|
|
137
|
-
moduleVersion: "0.1.
|
|
137
|
+
moduleVersion: "0.1.22";
|
|
138
138
|
ok: false;
|
|
139
139
|
status: "FAILED";
|
|
140
140
|
error: {
|
|
@@ -149,7 +149,7 @@ export declare function createDevTunnelBehaviorAdapter(dependencies?: {
|
|
|
149
149
|
result: {
|
|
150
150
|
contract: "deployment.result.v1";
|
|
151
151
|
moduleRef: "dev-tunnel";
|
|
152
|
-
moduleVersion: "0.1.
|
|
152
|
+
moduleVersion: "0.1.22";
|
|
153
153
|
ok: false;
|
|
154
154
|
status: "FAILED";
|
|
155
155
|
error: {
|
|
@@ -165,7 +165,7 @@ export declare function createDevTunnelBehaviorAdapter(dependencies?: {
|
|
|
165
165
|
ok: true;
|
|
166
166
|
status: "SUCCEEDED";
|
|
167
167
|
moduleRef: "dev-tunnel";
|
|
168
|
-
moduleVersion: "0.1.
|
|
168
|
+
moduleVersion: "0.1.22";
|
|
169
169
|
data: SetupState;
|
|
170
170
|
};
|
|
171
171
|
observedEffects: string[];
|
|
@@ -178,7 +178,7 @@ export declare const behaviorAdapter: {
|
|
|
178
178
|
readonly ok: true;
|
|
179
179
|
readonly status: "SUCCEEDED";
|
|
180
180
|
readonly moduleRef: "dev-tunnel";
|
|
181
|
-
readonly moduleVersion: "0.1.
|
|
181
|
+
readonly moduleVersion: "0.1.22";
|
|
182
182
|
};
|
|
183
183
|
observedEffects: never[];
|
|
184
184
|
}>;
|
|
@@ -188,14 +188,14 @@ export declare const behaviorAdapter: {
|
|
|
188
188
|
readonly ok: true;
|
|
189
189
|
readonly status: "SUCCEEDED";
|
|
190
190
|
readonly moduleRef: "dev-tunnel";
|
|
191
|
-
readonly moduleVersion: "0.1.
|
|
191
|
+
readonly moduleVersion: "0.1.22";
|
|
192
192
|
};
|
|
193
193
|
observedEffects: string[];
|
|
194
194
|
} | {
|
|
195
195
|
result: {
|
|
196
196
|
contract: "deployment.result.v1";
|
|
197
197
|
moduleRef: "dev-tunnel";
|
|
198
|
-
moduleVersion: "0.1.
|
|
198
|
+
moduleVersion: "0.1.22";
|
|
199
199
|
ok: false;
|
|
200
200
|
status: "FAILED";
|
|
201
201
|
error: {
|
|
@@ -212,7 +212,7 @@ export declare const behaviorAdapter: {
|
|
|
212
212
|
ok: true;
|
|
213
213
|
status: "SUCCEEDED";
|
|
214
214
|
moduleRef: "dev-tunnel";
|
|
215
|
-
moduleVersion: "0.1.
|
|
215
|
+
moduleVersion: "0.1.22";
|
|
216
216
|
data: {
|
|
217
217
|
setupStatus: "ACTION_REQUIRED" | "READY";
|
|
218
218
|
runtimeStatus: "FAILED" | "RUNNING" | "STOPPED";
|
|
@@ -239,7 +239,7 @@ export declare const behaviorAdapter: {
|
|
|
239
239
|
ok: true;
|
|
240
240
|
status: "SUCCEEDED";
|
|
241
241
|
moduleRef: "dev-tunnel";
|
|
242
|
-
moduleVersion: "0.1.
|
|
242
|
+
moduleVersion: "0.1.22";
|
|
243
243
|
data: {
|
|
244
244
|
docs: string;
|
|
245
245
|
};
|
|
@@ -250,7 +250,7 @@ export declare const behaviorAdapter: {
|
|
|
250
250
|
result: {
|
|
251
251
|
contract: "deployment.result.v1";
|
|
252
252
|
moduleRef: "dev-tunnel";
|
|
253
|
-
moduleVersion: "0.1.
|
|
253
|
+
moduleVersion: "0.1.22";
|
|
254
254
|
ok: false;
|
|
255
255
|
status: "FAILED";
|
|
256
256
|
error: {
|
|
@@ -266,7 +266,7 @@ export declare const behaviorAdapter: {
|
|
|
266
266
|
ok: true;
|
|
267
267
|
status: "SUCCEEDED";
|
|
268
268
|
moduleRef: "dev-tunnel";
|
|
269
|
-
moduleVersion: "0.1.
|
|
269
|
+
moduleVersion: "0.1.22";
|
|
270
270
|
data: import("../src/resource-adapter.ts").DevTunnelObservation;
|
|
271
271
|
};
|
|
272
272
|
observedEffects: string[];
|
|
@@ -277,14 +277,14 @@ export declare const behaviorAdapter: {
|
|
|
277
277
|
readonly ok: true;
|
|
278
278
|
readonly status: "SUCCEEDED";
|
|
279
279
|
readonly moduleRef: "dev-tunnel";
|
|
280
|
-
readonly moduleVersion: "0.1.
|
|
280
|
+
readonly moduleVersion: "0.1.22";
|
|
281
281
|
};
|
|
282
282
|
observedEffects: string[];
|
|
283
283
|
} | {
|
|
284
284
|
result: {
|
|
285
285
|
contract: "deployment.result.v1";
|
|
286
286
|
moduleRef: "dev-tunnel";
|
|
287
|
-
moduleVersion: "0.1.
|
|
287
|
+
moduleVersion: "0.1.22";
|
|
288
288
|
ok: false;
|
|
289
289
|
status: "FAILED";
|
|
290
290
|
error: {
|
|
@@ -299,7 +299,7 @@ export declare const behaviorAdapter: {
|
|
|
299
299
|
result: {
|
|
300
300
|
contract: "deployment.result.v1";
|
|
301
301
|
moduleRef: "dev-tunnel";
|
|
302
|
-
moduleVersion: "0.1.
|
|
302
|
+
moduleVersion: "0.1.22";
|
|
303
303
|
ok: false;
|
|
304
304
|
status: "FAILED";
|
|
305
305
|
error: {
|
|
@@ -315,7 +315,7 @@ export declare const behaviorAdapter: {
|
|
|
315
315
|
ok: true;
|
|
316
316
|
status: "SUCCEEDED";
|
|
317
317
|
moduleRef: "dev-tunnel";
|
|
318
|
-
moduleVersion: "0.1.
|
|
318
|
+
moduleVersion: "0.1.22";
|
|
319
319
|
data: SetupState;
|
|
320
320
|
};
|
|
321
321
|
observedEffects: string[];
|
|
@@ -3,7 +3,7 @@ export declare const descriptor: {
|
|
|
3
3
|
readonly contractVersion: "1.0.0";
|
|
4
4
|
readonly moduleRef: "dev-tunnel";
|
|
5
5
|
readonly packageName: "@tomflow/proflow-dev-tunnel";
|
|
6
|
-
readonly moduleVersion: "0.1.
|
|
6
|
+
readonly moduleVersion: "0.1.22";
|
|
7
7
|
readonly kind: "external-resource";
|
|
8
8
|
readonly templateVersion: "1.0.0";
|
|
9
9
|
readonly platformCompatibility: ">=1.0.0 <2.0.0";
|
|
@@ -3,7 +3,7 @@ export const descriptor = {
|
|
|
3
3
|
contractVersion: "1.0.0",
|
|
4
4
|
moduleRef: "dev-tunnel",
|
|
5
5
|
packageName: "@tomflow/proflow-dev-tunnel",
|
|
6
|
-
moduleVersion: "0.1.
|
|
6
|
+
moduleVersion: "0.1.22",
|
|
7
7
|
kind: "external-resource",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
|
@@ -94,6 +94,14 @@ function parseTunnel(input) {
|
|
|
94
94
|
return z.object({ tunnel: tunnelPayloadSchema }).passthrough().parse(input)
|
|
95
95
|
.tunnel;
|
|
96
96
|
}
|
|
97
|
+
function sameTunnelIdentity(requested, observed) {
|
|
98
|
+
if (observed === requested)
|
|
99
|
+
return true;
|
|
100
|
+
if (requested.includes("."))
|
|
101
|
+
return false;
|
|
102
|
+
const prefix = `${requested}.`;
|
|
103
|
+
return observed.startsWith(prefix) && !observed.slice(prefix.length).includes(".");
|
|
104
|
+
}
|
|
97
105
|
function parseJson(text, label) {
|
|
98
106
|
try {
|
|
99
107
|
return JSON.parse(text);
|
|
@@ -225,7 +233,7 @@ export function createDevTunnelAutomation(input) {
|
|
|
225
233
|
}
|
|
226
234
|
try {
|
|
227
235
|
const tunnel = parseTunnel(parseJson(result.stdout, "devtunnel show --json"));
|
|
228
|
-
if (tunnel.tunnelId
|
|
236
|
+
if (!sameTunnelIdentity(tunnelId, tunnel.tunnelId))
|
|
229
237
|
return { state: "UNKNOWN", hostState: "UNKNOWN" };
|
|
230
238
|
const hostState = tunnel.hostConnections !== undefined
|
|
231
239
|
? tunnel.hostConnections > 0
|
|
@@ -246,9 +254,9 @@ export function createDevTunnelAutomation(input) {
|
|
|
246
254
|
const result = await run(command, ["create", tunnelId, "--allow-anonymous", "--json"], { timeoutMs: REMOTE_COMMAND_TIMEOUT_MS });
|
|
247
255
|
assertCommandSucceeded(result, "devtunnel create --json");
|
|
248
256
|
const tunnel = parseTunnel(parseJson(result.stdout, "devtunnel create --json"));
|
|
249
|
-
if (tunnel.tunnelId
|
|
257
|
+
if (!sameTunnelIdentity(tunnelId, tunnel.tunnelId))
|
|
250
258
|
throw new Error("devtunnel create returned an unexpected tunnelId");
|
|
251
|
-
return
|
|
259
|
+
return tunnelId;
|
|
252
260
|
},
|
|
253
261
|
async ensurePort(tunnelId, port) {
|
|
254
262
|
const listed = await runRemoteQuery(["port", "list", tunnelId, "--json"]);
|
package/package.json
CHANGED
package/proflow.module.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"contractVersion": "1.0.0",
|
|
4
4
|
"moduleRef": "dev-tunnel",
|
|
5
5
|
"packageName": "@tomflow/proflow-dev-tunnel",
|
|
6
|
-
"moduleVersion": "0.1.
|
|
6
|
+
"moduleVersion": "0.1.22",
|
|
7
7
|
"kind": "external-resource",
|
|
8
8
|
"templateVersion": "1.0.0",
|
|
9
9
|
"platformCompatibility": ">=1.0.0 <2.0.0",
|