option to always use proxy
This commit is contained in:
parent
e6d627c2e3
commit
908ecf30ab
2 changed files with 5 additions and 2 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue