Got rid of the last brace-typed and hyphen-less params etc
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -86,9 +86,9 @@ export const runCommand = async ({
|
||||
* Return the source url for MkDocs based on the backstage.io/techdocs-ref annotation.
|
||||
* Depending on the type of target, it can either return a repo_url, an edit_uri, both, or none.
|
||||
*
|
||||
* @param {ParsedLocationAnnotation} parsedLocationAnnotation Object with location url and type
|
||||
* @param {ScmIntegrationRegistry} scmIntegrations the scmIntegration to do url transformations
|
||||
* @param {string} docsFolder the configured docs folder in the mkdocs.yml (defaults to 'docs')
|
||||
* @param parsedLocationAnnotation - Object with location url and type
|
||||
* @param scmIntegrations - the scmIntegration to do url transformations
|
||||
* @param docsFolder - the configured docs folder in the mkdocs.yml (defaults to 'docs')
|
||||
* @returns the settings for the mkdocs.yml
|
||||
*/
|
||||
export const getRepoUrlFromLocationAnnotation = (
|
||||
@@ -140,7 +140,7 @@ const MKDOCS_SCHEMA = DEFAULT_SCHEMA.extend([
|
||||
* Finds and loads the contents of either an mkdocs.yml or mkdocs.yaml file,
|
||||
* depending on which is present (MkDocs supports both as of v1.2.2).
|
||||
*
|
||||
* @param {string} inputDir base dir to be searched for either an mkdocs.yml or
|
||||
* @param inputDir - base dir to be searched for either an mkdocs.yml or
|
||||
* mkdocs.yaml file.
|
||||
*/
|
||||
export const getMkdocsYml = async (
|
||||
@@ -173,8 +173,8 @@ export const getMkdocsYml = async (
|
||||
* Validating mkdocs config file for incorrect/insecure values
|
||||
* Throws on invalid configs
|
||||
*
|
||||
* @param {string} inputDir base dir to be used as a docs_dir path validity check
|
||||
* @param {string} mkdocsYmlFileString The string contents of the loaded
|
||||
* @param inputDir - base dir to be used as a docs_dir path validity check
|
||||
* @param mkdocsYmlFileString - The string contents of the loaded
|
||||
* mkdocs.yml or equivalent of a docs site
|
||||
* @returns the parsed docs_dir or undefined
|
||||
*/
|
||||
@@ -215,10 +215,10 @@ export const validateMkdocsYaml = async (
|
||||
* This function will not throw an error since this is not critical to the whole TechDocs pipeline.
|
||||
* Instead it will log warnings if there are any errors in reading, parsing or writing YAML.
|
||||
*
|
||||
* @param {string} mkdocsYmlPath Absolute path to mkdocs.yml or equivalent of a docs site
|
||||
* @param {Logger} logger
|
||||
* @param {ParsedLocationAnnotation} parsedLocationAnnotation Object with location url and type
|
||||
* @param {ScmIntegrationRegistry} scmIntegrations the scmIntegration to do url transformations
|
||||
* @param mkdocsYmlPath - Absolute path to mkdocs.yml or equivalent of a docs site
|
||||
* @param logger - A logger instance
|
||||
* @param parsedLocationAnnotation - Object with location url and type
|
||||
* @param scmIntegrations - the scmIntegration to do url transformations
|
||||
*/
|
||||
export const patchMkdocsYmlPreBuild = async (
|
||||
mkdocsYmlPath: string,
|
||||
@@ -349,7 +349,7 @@ export const patchIndexPreBuild = async ({
|
||||
* - The build_timestamp (now)
|
||||
* - The list of files generated
|
||||
*
|
||||
* @param {string} techdocsMetadataPath File path to techdocs_metadata.json
|
||||
* @param techdocsMetadataPath - File path to techdocs_metadata.json
|
||||
*/
|
||||
export const createOrUpdateMetadata = async (
|
||||
techdocsMetadataPath: string,
|
||||
@@ -400,8 +400,8 @@ export const createOrUpdateMetadata = async (
|
||||
* This is helpful to check if a TechDocs site in storage has gone outdated, without maintaining an in-memory build info
|
||||
* per Backstage instance.
|
||||
*
|
||||
* @param {string} techdocsMetadataPath File path to techdocs_metadata.json
|
||||
* @param {string} etag
|
||||
* @param techdocsMetadataPath - File path to techdocs_metadata.json
|
||||
* @param etag - The ETag to use
|
||||
*/
|
||||
export const storeEtagMetadata = async (
|
||||
techdocsMetadataPath: string,
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import type { Entity } from '@backstage/catalog-model';
|
||||
import { Logger } from 'winston';
|
||||
|
||||
@@ -22,7 +23,7 @@ export type PreparerResponse = {
|
||||
*/
|
||||
preparedDir: string;
|
||||
/**
|
||||
* A unique identifer of the tree blob, usually the commit SHA or etag from the target.
|
||||
* A unique identifier of the tree blob, usually the commit SHA or etag from the target.
|
||||
*/
|
||||
etag: string;
|
||||
};
|
||||
@@ -32,10 +33,10 @@ export type PreparerBase = {
|
||||
* Given an Entity definition from the Software Catalog, go and prepare a directory
|
||||
* with contents from the location in temporary storage and return the path.
|
||||
*
|
||||
* @param entity The entity from the Software Catalog
|
||||
* @param options.etag (Optional) If etag is provider, it will be used to check if the target has
|
||||
* updated since the last build.
|
||||
* @throws {NotModifiedError} when the prepared directory has not been changed since the last build.
|
||||
* @param entity - The entity from the Software Catalog
|
||||
* @param options - If etag is provided, it will be used to check if the target has
|
||||
* updated since the last build.
|
||||
* @throws `NotModifiedError` when the prepared directory has not been changed since the last build.
|
||||
*/
|
||||
prepare(
|
||||
entity: Entity,
|
||||
|
||||
@@ -42,7 +42,7 @@ export type responseHeadersType = {
|
||||
/**
|
||||
* Some files need special headers to be used correctly by the frontend. This function
|
||||
* generates headers in the response to those file requests.
|
||||
* @param {string} fileExtension .html, .css, .js, .png etc.
|
||||
* @param fileExtension - .html, .css, .js, .png etc.
|
||||
*/
|
||||
export const getHeadersForFileExtension = (
|
||||
fileExtension: string,
|
||||
@@ -74,7 +74,7 @@ export const getHeadersForFileExtension = (
|
||||
* '/User/username/my_dir/dirB/file2',
|
||||
* '/User/username/my_dir/file3'
|
||||
* ]
|
||||
* @param rootDirPath Absolute path to the root directory.
|
||||
* @param rootDirPath - Absolute path to the root directory.
|
||||
*/
|
||||
export const getFileTreeRecursively = async (
|
||||
rootDirPath: string,
|
||||
|
||||
@@ -127,10 +127,10 @@ export interface PublisherBase {
|
||||
/**
|
||||
* Migrates documentation objects with case sensitive entity triplets to
|
||||
* lowercase entity triplets. This was (will be) a change introduced in
|
||||
* techdocs-cli v{0.x.y} and techdocs-backend v{0.x.y}.
|
||||
* `techdocs-cli` version `{0.x.y}` and `techdocs-backend` version `{0.x.y}`.
|
||||
*
|
||||
* Implementation of this method is unnecessary in publishers introduced
|
||||
* after v{0.x.y} of techdocs-common.
|
||||
* after version `{0.x.y}` of `techdocs-common`.
|
||||
*/
|
||||
migrateDocsCase?(migrateRequest: MigrateRequest): Promise<void>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user