Skip to content

Commit 3a00cdb

Browse files
committed
[Bug] Fix issue #2087: Handle multiple schema files in gen-schema-views script
1 parent 8266204 commit 3a00cdb

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

firestore-bigquery-export/scripts/gen-schema-view/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ async function parseConfig(): Promise<CliConfig> {
174174
program.outputHelp();
175175
process.exit(1);
176176
}
177+
177178
return {
178179
projectId: program.project,
179180
bigQueryProjectId: program.bigQueryProject,

firestore-bigquery-export/scripts/gen-schema-view/src/schema-loader-utils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ function resolveFilePath(filePath: string): string {
6363

6464
function expandGlobs(globs: string[]): string[] {
6565
let results = [];
66-
for (var i = 0; i < globs.length; i++) {
67-
const globResults = glob.sync(globs[i]);
66+
// Split any comma-separated globs into individual paths
67+
const expandedGlobs = globs.flatMap((g) => g.split(",").map((s) => s.trim()));
68+
for (const globPath of expandedGlobs) {
69+
const globResults = glob.sync(globPath);
6870
results = results.concat(globResults);
6971
}
7072
return results;

0 commit comments

Comments
 (0)