Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add ProxyInfo type and return from startProxy
  • Loading branch information
mbg committed Feb 10, 2026
commit c4717c9c748f6b31c0eae0edf9f9d4b5227b9fa4
1 change: 1 addition & 0 deletions lib/start-proxy-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions src/start-proxy-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import {
getProxyBinaryPath,
getSafeErrorMessage,
parseLanguage,
ProxyInfo,
Registry,
sendFailedStatusReport,
sendSuccessStatusReport,
} from "./start-proxy";
Expand Down Expand Up @@ -188,7 +190,7 @@ async function startProxy(
config: ProxyConfig,
logFilePath: string,
logger: Logger,
) {
): Promise<ProxyInfo> {
const host = "127.0.0.1";
let port = 49152;
let subprocess: ChildProcess | undefined = undefined;
Expand Down Expand Up @@ -231,13 +233,15 @@ async function startProxy(
core.setOutput("proxy_port", port.toString());
core.setOutput("proxy_ca_certificate", config.ca.cert);

const registry_urls = config.all_credentials
const registry_urls: Registry[] = config.all_credentials
.filter((credential) => credential.url !== undefined)
.map((credential) => ({
type: credential.type,
url: credential.url,
}));
Comment thread
mbg marked this conversation as resolved.
core.setOutput("proxy_urls", JSON.stringify(registry_urls));

return { host, port, cert: config.ca.cert, registries: registry_urls };
}

void runWrapper();
7 changes: 7 additions & 0 deletions src/start-proxy/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ export interface Registry {
host?: string;
url?: string;
}

export interface ProxyInfo {
host: string;
port: number;
cert: string;
registries: Registry[];
}