@saptools/cf-inspector 0.4.5 → 0.4.7
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/cli.js +8 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -399,6 +399,7 @@ import { startDebugger } from "@saptools/cf-debugger";
|
|
|
399
399
|
async function openCfTunnel(target) {
|
|
400
400
|
const opts = {
|
|
401
401
|
region: target.region,
|
|
402
|
+
...target.apiEndpoint === void 0 ? {} : { apiEndpoint: target.apiEndpoint },
|
|
402
403
|
org: target.org,
|
|
403
404
|
space: target.space,
|
|
404
405
|
app: target.app,
|
|
@@ -892,10 +893,11 @@ async function resolveTargetWithCurrentCfTarget(opts) {
|
|
|
892
893
|
}
|
|
893
894
|
const cfTimeoutSec = parsePositiveInt(opts.cfTimeout, "--cf-timeout") ?? DEFAULT_CF_TIMEOUT_SEC;
|
|
894
895
|
const region = optionalText(opts.region);
|
|
896
|
+
const apiEndpoint = optionalText(opts.apiEndpoint);
|
|
895
897
|
const org = optionalText(opts.org);
|
|
896
898
|
const space = optionalText(opts.space);
|
|
897
899
|
if (region !== void 0 && org !== void 0 && space !== void 0) {
|
|
898
|
-
return buildCfTarget(region, org, space, app, cfTimeoutSec);
|
|
900
|
+
return buildCfTarget(region, apiEndpoint, org, space, app, cfTimeoutSec);
|
|
899
901
|
}
|
|
900
902
|
const current = await readCurrentTarget();
|
|
901
903
|
if (current === void 0) {
|
|
@@ -906,16 +908,18 @@ async function resolveTargetWithCurrentCfTarget(opts) {
|
|
|
906
908
|
}
|
|
907
909
|
return buildCfTarget(
|
|
908
910
|
region ?? currentRegion(current),
|
|
911
|
+
apiEndpoint ?? current.apiEndpoint,
|
|
909
912
|
org ?? current.org,
|
|
910
913
|
space ?? current.space,
|
|
911
914
|
app,
|
|
912
915
|
cfTimeoutSec
|
|
913
916
|
);
|
|
914
917
|
}
|
|
915
|
-
function buildCfTarget(region, org, space, app, cfTimeoutSec) {
|
|
918
|
+
function buildCfTarget(region, apiEndpoint, org, space, app, cfTimeoutSec) {
|
|
916
919
|
return {
|
|
917
920
|
kind: "cf",
|
|
918
921
|
region,
|
|
922
|
+
...apiEndpoint === void 0 ? {} : { apiEndpoint },
|
|
919
923
|
org,
|
|
920
924
|
space,
|
|
921
925
|
app,
|
|
@@ -985,6 +989,7 @@ async function openTarget(target, reportProgress) {
|
|
|
985
989
|
reportProgress?.(formatCfTunnelStatus("starting"));
|
|
986
990
|
const tunnel = await openCfTunnel({
|
|
987
991
|
region: target.region,
|
|
992
|
+
...target.apiEndpoint === void 0 ? {} : { apiEndpoint: target.apiEndpoint },
|
|
988
993
|
org: target.org,
|
|
989
994
|
space: target.space,
|
|
990
995
|
app: target.app,
|
|
@@ -2874,7 +2879,7 @@ function writeWatchSummary(reason, emitted, json) {
|
|
|
2874
2879
|
|
|
2875
2880
|
// src/cli/program.ts
|
|
2876
2881
|
function applyTargetOptions(cmd) {
|
|
2877
|
-
return cmd.option("--port <number>", "Local port the inspector or tunnel listens on").option("--host <host>", "Hostname (default: 127.0.0.1)", "127.0.0.1").option("--region <key>", "CF region key (default: current cf target)").option("--org <name>", "CF org name (default: current cf target)").option("--space <name>", "CF space name (default: current cf target)").option("--app <name>", "CF app name when not using --port").option("--cf-timeout <seconds>", "Timeout for CF tunnel readiness in seconds (default: 180)");
|
|
2882
|
+
return cmd.option("--port <number>", "Local port the inspector or tunnel listens on").option("--host <host>", "Hostname (default: 127.0.0.1)", "127.0.0.1").option("--region <key>", "CF region key (default: current cf target)").option("--api-endpoint <url>", "CF API endpoint override for --region").option("--org <name>", "CF org name (default: current cf target)").option("--space <name>", "CF space name (default: current cf target)").option("--app <name>", "CF app name when not using --port").option("--cf-timeout <seconds>", "Timeout for CF tunnel readiness in seconds (default: 180)");
|
|
2878
2883
|
}
|
|
2879
2884
|
var collectStrings = (value, prev = []) => [
|
|
2880
2885
|
...prev,
|