option to always use proxy

This commit is contained in:
Nate 2025-04-04 12:00:53 -07:00
parent e6d627c2e3
commit 908ecf30ab
2 changed files with 5 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{
"name": "@continuedev/config-yaml",
"version": "1.0.71",
"version": "1.0.72",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View file

@ -146,6 +146,7 @@ function extractFQSNMap(
async function extractRenderedSecretsMap(
rawContent: string,
platformClient: PlatformClient,
alwaysUseProxy: boolean = false,
): Promise<Record<string, string>> {
// Get all template variables
const templateVars = getTemplateVariables(rawContent);
@ -165,7 +166,7 @@ async function extractRenderedSecretsMap(
}
// User secrets are rendered
if ("value" in secretResult) {
if ("value" in secretResult && !alwaysUseProxy) {
map[encodeFQSN(secretResult.fqsn)] = secretResult.value;
} else {
// Other secrets are rendered as secret locations and then converted to proxy types later
@ -187,6 +188,7 @@ export interface RenderSecretsUnrollAssistantOptions {
currentUserSlug: string;
platformClient: PlatformClient;
onPremProxyUrl: string | null;
alwaysUseProxy?: boolean;
}
export type UnrollAssistantOptions =
@ -256,6 +258,7 @@ export async function unrollAssistantFromContent(
const secrets = await extractRenderedSecretsMap(
templatedYaml,
options.platformClient,
options.alwaysUseProxy,
);
const renderedYaml = renderTemplateData(templatedYaml, {
secrets,