Skip to content

Commit

Permalink
Disable 'source' metadata collection
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-rr committed Mar 12, 2024
1 parent 9f1be17 commit fcfe8ee
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { join, resolve } from 'path';
import { existsSync } from 'fs-extra';
import { promises as fPromises } from 'fs';
import { v4 as uuidv4 } from 'uuid';
import crypto from 'crypto';

const { readFile, writeFile } = fPromises;

Expand Down Expand Up @@ -45,7 +44,6 @@ export default abstract class extends Command {
const {document} = await this.parser.parse(rawDocument);
if (document !== undefined) {
metadata = MetadataFromDocument(document, metadata);
metadata['source'] = this.generateSHA256(document.info().title());
}
} catch (e: any) {
if (e instanceof Error) {
Expand Down Expand Up @@ -86,12 +84,6 @@ export default abstract class extends Command {
await this.recordActionFinished(this.id as string, this.metricsMetadata, this.specFile?.text());
}

generateSHA256(fileContent: string): string {
const hashSum = crypto.createHash('sha256');
hashSum.update(fileContent);
return hashSum.digest('hex');
}

async recorderFromEnv(prefix: string): Promise<Recorder> {
let sink: Sink = new DiscardSink();
const analyticsConfigFile = join(process.cwd(), '.asyncapi-analytics');
Expand Down

0 comments on commit fcfe8ee

Please sign in to comment.