File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -473,7 +473,7 @@ export async function loadFileToSpec(
473473) : Promise < void > {
474474 const jsonPath = getJsonPath ( fileMap , filePath )
475475 try {
476- const data = ( await deps . loadYaml ( filePath ) ) || { }
476+ const data = ( await deps . loadYaml ( filePath , { isRaw : fileMap . kind === 'AplTeamWorkloadValues' } ) ) || { }
477477 // ensure that local path does not include envDir and the leading slash
478478 const localFilePath = filePath . replace ( fileMap . envDir , '' ) . replace ( / ^ \/ + / , '' )
479479 // eslint-disable-next-line no-param-reassign
Original file line number Diff line number Diff line change @@ -65,12 +65,17 @@ export const flattenObject = (
6565 } , { } )
6666}
6767
68- export const loadYaml = async ( path : string , opts ?: { noError : boolean } ) : Promise < Record < string , any > | undefined > => {
68+ export const loadYaml = async (
69+ path : string ,
70+ opts ?: { noError ?: boolean ; isRaw ?: boolean } ,
71+ ) : Promise < Record < string , any > | undefined > => {
6972 if ( ! ( await pathExists ( path ) ) ) {
7073 if ( opts ?. noError ) return undefined
7174 throw new Error ( `${ path } does not exist` )
7275 }
73- return parse ( await readFile ( path , 'utf-8' ) ) as Record < string , any >
76+ const rawFile = await readFile ( path , 'utf-8' )
77+ if ( opts ?. isRaw ) return rawFile as any
78+ return parse ( rawFile ) as Record < string , any >
7479}
7580
7681const valuesSchemaEndpointUrl = `${ BASEURL } /apl/schema`
You can’t perform that action at this time.
0 commit comments