episoda 0.2.43 → 0.2.44
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.
|
@@ -2682,7 +2682,7 @@ var require_package = __commonJS({
|
|
|
2682
2682
|
"package.json"(exports2, module2) {
|
|
2683
2683
|
module2.exports = {
|
|
2684
2684
|
name: "episoda",
|
|
2685
|
-
version: "0.2.
|
|
2685
|
+
version: "0.2.44",
|
|
2686
2686
|
description: "CLI tool for Episoda local development workflow orchestration",
|
|
2687
2687
|
main: "dist/index.js",
|
|
2688
2688
|
types: "dist/index.d.ts",
|
|
@@ -3977,7 +3977,7 @@ var os2 = __toESM(require("os"));
|
|
|
3977
3977
|
|
|
3978
3978
|
// src/tunnel/tunnel-api.ts
|
|
3979
3979
|
var import_core6 = __toESM(require_dist());
|
|
3980
|
-
async function provisionNamedTunnel(moduleId) {
|
|
3980
|
+
async function provisionNamedTunnel(moduleId, port = 3e3) {
|
|
3981
3981
|
const config = await (0, import_core6.loadConfig)();
|
|
3982
3982
|
if (!config?.access_token) {
|
|
3983
3983
|
return { success: false, error: "Not authenticated" };
|
|
@@ -3990,7 +3990,8 @@ async function provisionNamedTunnel(moduleId) {
|
|
|
3990
3990
|
"Authorization": `Bearer ${config.access_token}`,
|
|
3991
3991
|
"Content-Type": "application/json"
|
|
3992
3992
|
},
|
|
3993
|
-
|
|
3993
|
+
// EP1027: Include port for ingress configuration
|
|
3994
|
+
body: JSON.stringify({ module_id: moduleId, port })
|
|
3994
3995
|
});
|
|
3995
3996
|
const data = await response.json();
|
|
3996
3997
|
if (!response.ok) {
|
|
@@ -4011,7 +4012,7 @@ async function provisionNamedTunnel(moduleId) {
|
|
|
4011
4012
|
};
|
|
4012
4013
|
}
|
|
4013
4014
|
}
|
|
4014
|
-
async function provisionNamedTunnelByUid(moduleUid) {
|
|
4015
|
+
async function provisionNamedTunnelByUid(moduleUid, port = 3e3) {
|
|
4015
4016
|
const config = await (0, import_core6.loadConfig)();
|
|
4016
4017
|
if (!config?.access_token) {
|
|
4017
4018
|
return { success: false, error: "Not authenticated" };
|
|
@@ -4037,7 +4038,7 @@ async function provisionNamedTunnelByUid(moduleUid) {
|
|
|
4037
4038
|
error: `Module ${moduleUid} has no ID (response keys: ${JSON.stringify(Object.keys(moduleData))})`
|
|
4038
4039
|
};
|
|
4039
4040
|
}
|
|
4040
|
-
return provisionNamedTunnel(moduleId);
|
|
4041
|
+
return provisionNamedTunnel(moduleId, port);
|
|
4041
4042
|
} catch (error) {
|
|
4042
4043
|
return {
|
|
4043
4044
|
success: false,
|
|
@@ -4759,8 +4760,9 @@ var TunnelManager = class extends import_events.EventEmitter {
|
|
|
4759
4760
|
}
|
|
4760
4761
|
const mode = resolvedOptions.mode || "named";
|
|
4761
4762
|
if (mode === "named" && !resolvedOptions.tunnelToken && moduleUid !== "LOCAL") {
|
|
4762
|
-
|
|
4763
|
-
|
|
4763
|
+
const port2 = resolvedOptions.port || 3e3;
|
|
4764
|
+
console.log(`[Tunnel] EP948: Provisioning Named Tunnel for ${moduleUid} on port ${port2}...`);
|
|
4765
|
+
const provisionResult = await provisionNamedTunnelByUid(moduleUid, port2);
|
|
4764
4766
|
if (provisionResult.success && provisionResult.tunnel) {
|
|
4765
4767
|
console.log(`[Tunnel] EP948: Named Tunnel provisioned: ${provisionResult.tunnel.preview_url}`);
|
|
4766
4768
|
resolvedOptions = {
|