From 2906d535a126f4fe2cfe6dffda46e5fe841056da Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 4 Sep 2023 02:34:51 +0200 Subject: [PATCH] fix(cli): prioritize correctly content file to resolve for ts types --- cli/script.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/script.ts b/cli/script.ts index 723e25bf25..cd593a81a5 100644 --- a/cli/script.ts +++ b/cli/script.ts @@ -180,6 +180,8 @@ export async function handleFile( export async function findContentFile(filePath: string) { const candidates = filePath.endsWith("script.json") ? [ + filePath.replace(".script.json", ".fetch.ts"), + filePath.replace(".script.json", ".bun.ts"), filePath.replace(".script.json", ".ts"), filePath.replace(".script.json", ".py"), filePath.replace(".script.json", ".go"), @@ -188,12 +190,12 @@ export async function findContentFile(filePath: string) { filePath.replace(".script.json", "my.sql"), filePath.replace(".script.json", "bq.sql"), filePath.replace(".script.json", "sf.sql"), - filePath.replace(".script.json", ".fetch.ts"), - filePath.replace(".script.json", ".bun.ts"), filePath.replace(".script.json", ".gql"), filePath.replace(".script.json", ".ps1"), ] : [ + filePath.replace(".script.yaml", ".fetch.ts"), + filePath.replace(".script.yaml", ".bun.ts"), filePath.replace(".script.yaml", ".ts"), filePath.replace(".script.yaml", ".py"), filePath.replace(".script.yaml", ".go"), @@ -201,8 +203,6 @@ export async function findContentFile(filePath: string) { filePath.replace(".script.yaml", "pg.sql"), filePath.replace(".script.yaml", "bq.sql"), filePath.replace(".script.yaml", "sf.sql"), - filePath.replace(".script.yaml", ".fetch.ts"), - filePath.replace(".script.yaml", ".bun.ts"), filePath.replace(".script.yaml", ".gql"), filePath.replace(".script.yaml", ".ps1"), ];