committed by
Mert Can Bilgiç
parent
de313a1c94
commit
0d3f211a24
@@ -110,12 +110,10 @@ export class OpenStackSwiftPublish implements PublisherBase {
|
||||
* Directory structure used in the bucket is - entityNamespace/entityKind/entityName/index.html
|
||||
*/
|
||||
async publish({ entity, directory }: PublishRequest): Promise<void> {
|
||||
console.log(entity, directory, 'Publish hey');
|
||||
try {
|
||||
// Note: OpenStack Swift manages creation of parent directories if they do not exist.
|
||||
// So collecting path of only the files is good enough.
|
||||
const allFilesToUpload = await getFileTreeRecursively(directory);
|
||||
console.log(allFilesToUpload, entity, 'hey');
|
||||
const limiter = createLimiter(10);
|
||||
const uploadPromises: Array<Promise<unknown>> = [];
|
||||
for (const filePath of allFilesToUpload) {
|
||||
@@ -172,8 +170,6 @@ export class OpenStackSwiftPublish implements PublisherBase {
|
||||
async fetchTechDocsMetadata(
|
||||
entityName: EntityName,
|
||||
): Promise<TechDocsMetadata> {
|
||||
console.log(entityName, 'fetchTechDocsMetadata hey');
|
||||
|
||||
try {
|
||||
return await new Promise<TechDocsMetadata>(async (resolve, reject) => {
|
||||
const entityRootDir = `${entityName.namespace}/${entityName.kind}/${entityName.name}`;
|
||||
@@ -213,7 +209,6 @@ export class OpenStackSwiftPublish implements PublisherBase {
|
||||
return async (req, res) => {
|
||||
// Trim the leading forward slash
|
||||
// filePath example - /default/Component/documented-component/index.html
|
||||
console.log('docsRouter hey');
|
||||
|
||||
const filePath = req.path.replace(/^\//, '');
|
||||
|
||||
@@ -248,8 +243,6 @@ export class OpenStackSwiftPublish implements PublisherBase {
|
||||
*/
|
||||
async hasDocsBeenGenerated(entity: Entity): Promise<boolean> {
|
||||
try {
|
||||
console.log(entity, 'hasDocsBeenGenerated hey');
|
||||
|
||||
const entityRootDir = `${entity.metadata.namespace}/${entity.kind}/${entity.metadata.name}`;
|
||||
this.storageClient.getFile(
|
||||
this.containerName,
|
||||
|
||||
Reference in New Issue
Block a user