From ff3dd9c02b7796daae1ca5974c001f59c3422f45 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Sat, 5 Dec 2020 11:13:27 +0100 Subject: [PATCH] create-app: Add new techdocs default configs --- .../create-app/templates/default-app/app-config.yaml.hbs | 5 ++++- packages/techdocs-common/src/stages/publish/googleStorage.ts | 2 +- plugins/techdocs-backend/src/service/router.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/create-app/templates/default-app/app-config.yaml.hbs b/packages/create-app/templates/default-app/app-config.yaml.hbs index 595812dec3..7b70a2192c 100644 --- a/packages/create-app/templates/default-app/app-config.yaml.hbs +++ b/packages/create-app/templates/default-app/app-config.yaml.hbs @@ -57,10 +57,13 @@ proxy: changeOrigin: true techdocs: - storageUrl: http://localhost:7000/api/techdocs/static/docs requestUrl: http://localhost:7000/api/techdocs + storageUrl: http://localhost:7000/api/techdocs/static/docs + builder: 'local' generators: techdocs: 'docker' + publisher: + type: 'local' lighthouse: baseUrl: http://localhost:3003 diff --git a/packages/techdocs-common/src/stages/publish/googleStorage.ts b/packages/techdocs-common/src/stages/publish/googleStorage.ts index f21928a824..5df4f2d886 100644 --- a/packages/techdocs-common/src/stages/publish/googleStorage.ts +++ b/packages/techdocs-common/src/stages/publish/googleStorage.ts @@ -108,7 +108,7 @@ export class GoogleGCSPublish implements PublisherBase { // 'end' event happens when all the files have been read. const entityRootDir = `${entity.metadata.namespace}/${entity.kind}/${entity.metadata.name}`; allFilesToUpload.forEach(filePath => { - const source = path.join(directory, filePath); // Local file absolutely path + const source = path.join(directory, filePath); // Local file absolute path const destination = `${entityRootDir}/${filePath}`; // GCS Bucket file relative path this.storageClient .bucket(this.bucketName) diff --git a/plugins/techdocs-backend/src/service/router.ts b/plugins/techdocs-backend/src/service/router.ts index ea6ae51c97..97a950d8f2 100644 --- a/plugins/techdocs-backend/src/service/router.ts +++ b/plugins/techdocs-backend/src/service/router.ts @@ -162,7 +162,7 @@ export async function createRouter({ res .status(408) .send( - 'Sorry! It is taking longer for the generated docs to show up up in storage. Check back later.', + 'Sorry! It is taking longer for the generated docs to show up in storage. Check back later.', ); return; }