Skip to content

Commit be35f9c

Browse files
committed
Removed unnecessary console.log statements
1 parent c26ec77 commit be35f9c

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

rocket-chatter-ingestion-server/src/process/prepare/codebase.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class Codebase {
4343
private prepareFilesMetadata() {
4444
const extensions = ["ts", "tsx", "js", "jsx"]
4545

46-
console.log(`🕒 Preparing metadata for files: *.${extensions.join(", *.")}`)
46+
// console.log(`🕒 Preparing metadata for files: *.${extensions.join(", *.")}`)
4747
{
4848
const globPatterns = extensions.map((x) => `**/*.${x}`)
4949
for (const pattern of globPatterns) {
@@ -53,7 +53,7 @@ export class Codebase {
5353
this._files.push(...files)
5454
}
5555
}
56-
console.log(`✅ Prepared metadata for ${this._files.length} files\n`)
56+
// console.log(`✅ Prepared metadata for ${this._files.length} files\n`)
5757
}
5858

5959
private makeFilesBatches() {
@@ -93,15 +93,15 @@ export class Codebase {
9393
* @returns Promise<void>
9494
*/
9595
async process(): Promise<void> {
96-
console.log("🕒 Preparing Nodes\n")
96+
// console.log("🕒 Preparing Nodes\n")
9797

9898
let nodesProcessed = 0
9999
for (const [index, batch] of this._batches.entries()) {
100100
const [start, end] = batch
101101
nodesProcessed += await this.processFilesBatch(index, start, end)
102102
}
103103

104-
console.log(`✅ Prepared ${nodesProcessed} nodes`)
104+
// console.log(`✅ Prepared ${nodesProcessed} nodes`)
105105
}
106106

107107
private async processFilesBatch(
@@ -111,7 +111,7 @@ export class Codebase {
111111
): Promise<number> {
112112
let nNodesProcessed = 0
113113

114-
console.log(`🕒 Processing ${start}-${end} files`)
114+
// console.log(`🕒 Processing ${start}-${end} files`)
115115
{
116116
let nodes: Record<string, DBNode> = {}
117117

@@ -137,9 +137,9 @@ export class Codebase {
137137

138138
nNodesProcessed = Object.keys(nodes).length
139139
}
140-
console.log(
141-
`✅ Processed ${start}-${end} files (${nNodesProcessed} nodes)\n`
142-
)
140+
// console.log(
141+
// `✅ Processed ${start}-${end} files (${nNodesProcessed} nodes)\n`
142+
// )
143143

144144
return nNodesProcessed
145145
}

rocket-chatter-ingestion-server/src/process/prepare/processor/file.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,38 +5,40 @@ import { DBNode } from "../../../core/dbNode"
55
import { ISourceFile } from "../sourceFile.types"
66
import { IFileProcessor } from "./file.types"
77

8+
import { TreeNode } from "./core/treeNode"
9+
import { Classes } from "./syntax/classes"
810
import { Enums } from "./syntax/enums"
911
import { Functions } from "./syntax/functions"
1012
import { Interface } from "./syntax/interface"
1113
import { Namespaces } from "./syntax/namespaces"
1214
import { TypeAlias } from "./syntax/typeAlias"
1315

1416
export class FileProcessor implements IFileProcessor {
15-
private processNode(node: DBNode, nodesRef: Record<string, DBNode>): void {}
16-
1717
process(sourceFile: ISourceFile, nodesRef: Record<string, DBNode>): void {
1818
const fileContent = sourceFile.read()
19-
console.log(fileContent)
2019

2120
const ast = parse(fileContent)
2221

2322
for (const node of ast.body) {
23+
let treeNode: TreeNode | null = null
2424
if (namedTypes.FunctionDeclaration.check(node)) {
25-
Functions.Handle(node)
25+
treeNode = Functions.Handle(node)
2626
} else if (namedTypes.TSInterfaceDeclaration.check(node)) {
27-
Interface.Handle(node)
27+
treeNode = Interface.Handle(node)
2828
} else if (namedTypes.TSTypeAliasDeclaration.check(node)) {
29-
TypeAlias.Handle(node)
29+
treeNode = TypeAlias.Handle(node)
3030
} else if (namedTypes.TSEnumDeclaration.check(node)) {
31-
Enums.Handle(node)
31+
treeNode = Enums.Handle(node)
3232
} else if (
3333
namedTypes.TSModuleDeclaration.check(node) ||
3434
namedTypes.ExportNamedDeclaration.check(node)
3535
) {
36-
Namespaces.Handle(node)
36+
treeNode = Namespaces.Handle(node)
3737
} else if (namedTypes.ClassDeclaration.check(node)) {
38-
// Classes.Handle(node)
38+
treeNode = Classes.Handle(node)
3939
}
40+
41+
console.log(treeNode)
4042
}
4143

4244
// throw new Error("Method not implemented.")

rocket-chatter-ingestion-server/src/process/prepare/processor/syntax/namespaces.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ export namespace Namespaces {
3636
}
3737
}
3838

39-
console.log(node)
40-
4139
return node
4240
}
4341
}

0 commit comments

Comments
 (0)