Skip to content

Commit

Permalink
[gh-#898] compile only the passed in sync
Browse files Browse the repository at this point in the history
  • Loading branch information
khaliqgant committed Aug 9, 2023
1 parent 645919d commit afe6d00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/cli/lib/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ export const dryRun = async (options: RunArgs, environment: string, debug = fals
lastSyncDate = new Date(suppliedLastSyncDate as string);
}

tsc(debug);
tsc(debug, syncName);

const syncRun = new syncRunService({
writeToDb: false,
Expand Down Expand Up @@ -648,7 +648,7 @@ export const dryRun = async (options: RunArgs, environment: string, debug = fals
}
};

export const tsc = (debug = false) => {
export const tsc = (debug = false, syncName?: string) => {
const tsconfig = fs.readFileSync(`${getNangoRootPath()}/tsconfig.dev.json`, 'utf8');

const distDir = './dist';
Expand All @@ -674,7 +674,7 @@ export const tsc = (debug = false) => {
printDebug(`Compiler options: ${JSON.stringify(JSON.parse(tsconfig).compilerOptions, null, 2)}`);
}

const integrationFiles = glob.sync(`./*.ts`);
const integrationFiles = syncName ? [`./${syncName}.ts`] : glob.sync(`./*.ts`);
for (const filePath of integrationFiles) {
try {
if (!nangoCallsAreAwaited(filePath)) {
Expand Down

0 comments on commit afe6d00

Please sign in to comment.