diff --git a/plugins/techdocs-node/api-report.md b/plugins/techdocs-node/api-report.md index 2aff8e82bb..314a46a405 100644 --- a/plugins/techdocs-node/api-report.md +++ b/plugins/techdocs-node/api-report.md @@ -97,7 +97,7 @@ export const getMkdocsYml: ( ) => Promise<{ path: string; content: string; - configExists: boolean; + configIsTemporary: boolean; }>; // @public diff --git a/plugins/techdocs-node/src/stages/generate/helpers.test.ts b/plugins/techdocs-node/src/stages/generate/helpers.test.ts index 186a685a90..aad7706ab1 100644 --- a/plugins/techdocs-node/src/stages/generate/helpers.test.ts +++ b/plugins/techdocs-node/src/stages/generate/helpers.test.ts @@ -529,12 +529,12 @@ describe('helpers', () => { const { path: mkdocsPath, content, - configExists, + configIsTemporary, } = await getMkdocsYml(inputDir, siteOptions); expect(mkdocsPath).toBe(key); expect(content).toBe(mkdocsYml.toString()); - expect(configExists).toBe(true); + expect(configIsTemporary).toBe(false); }); it('returns expected contents when .yaml file is present', async () => { @@ -543,11 +543,11 @@ describe('helpers', () => { const { path: mkdocsPath, content, - configExists, + configIsTemporary, } = await getMkdocsYml(inputDir, siteOptions); expect(mkdocsPath).toBe(key); expect(content).toBe(mkdocsYml.toString()); - expect(configExists).toBe(true); + expect(configIsTemporary).toBe(false); }); it('returns expected contents when default file is present', async () => { @@ -561,12 +561,12 @@ describe('helpers', () => { const { path: mkdocsPath, content, - configExists, + configIsTemporary, } = await getMkdocsYml(inputDir, defaultSiteOptions); expect(mkdocsPath).toBe(key); expect(content).toBe(mkdocsDefaultYml.toString()); - expect(configExists).toBe(false); + expect(configIsTemporary).toBe(true); }); it('throws when neither .yml nor .yaml nor default file is present', async () => { diff --git a/plugins/techdocs-node/src/stages/generate/helpers.ts b/plugins/techdocs-node/src/stages/generate/helpers.ts index c0a82da510..e16293f906 100644 --- a/plugins/techdocs-node/src/stages/generate/helpers.ts +++ b/plugins/techdocs-node/src/stages/generate/helpers.ts @@ -196,7 +196,7 @@ export const generateMkdocsYml = async ( export const getMkdocsYml = async ( inputDir: string, siteOptions?: { name?: string }, -): Promise<{ path: string; content: string; configExists: boolean }> => { +): Promise<{ path: string; content: string; configIsTemporary: boolean }> => { let mkdocsYmlPath: string; let mkdocsYmlFileString: string; try { @@ -206,7 +206,7 @@ export const getMkdocsYml = async ( return { path: mkdocsYmlPath, content: mkdocsYmlFileString, - configExists: true, + configIsTemporary: false, }; } @@ -216,7 +216,7 @@ export const getMkdocsYml = async ( return { path: mkdocsYmlPath, content: mkdocsYmlFileString, - configExists: true, + configIsTemporary: false, }; } @@ -233,7 +233,7 @@ export const getMkdocsYml = async ( return { path: mkdocsYmlPath, content: mkdocsYmlFileString, - configExists: false, + configIsTemporary: true, }; };