diff --git a/packages/create-llama/e2e/tsconfig.json b/packages/create-llama/e2e/tsconfig.json deleted file mode 100644 index a9d7a67e605b2633bd227013ddab747e7cfebb59..0000000000000000000000000000000000000000 --- a/packages/create-llama/e2e/tsconfig.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "module": "ESNext", - "target": "ESNext", - "verbatimModuleSyntax": true - }, - "include": [ - "./**/*.ts" - ] -} diff --git a/packages/create-llama/e2e/utils.ts b/packages/create-llama/e2e/utils.ts index 75e2a6197b7f30792738628af0b24c7595ffcdf6..6e134495ea3d7276fc091153ba481b4dac4e976c 100644 --- a/packages/create-llama/e2e/utils.ts +++ b/packages/create-llama/e2e/utils.ts @@ -1,7 +1,7 @@ import { ChildProcess, exec, execSync } from "child_process"; import crypto from "node:crypto"; import { mkdir } from "node:fs/promises"; -import { fileURLToPath } from "node:url"; +import * as path from "path"; import waitPort from "wait-port"; export type AppType = "--frontend" | "--no-frontend" | ""; @@ -13,7 +13,7 @@ export async function runApp( appType: AppType, port: number, ): Promise<ChildProcess[]> { - const cps = []; + const cps: ChildProcess[] = []; try { switch (appType) { @@ -71,9 +71,7 @@ export function runCreateLlama( templateUI: string, appType: AppType, ) { - const createLlama = fileURLToPath( - new URL("../dist/index.js", import.meta.url), - ); + const createLlama = path.join(__dirname, "..", "dist", "index.js"); const name = [ templateType, @@ -110,9 +108,7 @@ export function runCreateLlama( return name; } export async function createTestDir() { - const cwd = fileURLToPath( - new URL(`.cache/${crypto.randomUUID()}`, import.meta.url), - ); + const cwd = path.join(__dirname, ".cache", crypto.randomUUID()); await mkdir(cwd, { recursive: true }); return cwd; } diff --git a/packages/create-llama/package.json b/packages/create-llama/package.json index 3d77e5f2a539c10e79df5bc7c0ba14e00ebf5d17..057f2e0c82fc10d33c5736f455fd46c6f713ffca 100644 --- a/packages/create-llama/package.json +++ b/packages/create-llama/package.json @@ -1,7 +1,6 @@ { "name": "create-llama", "version": "0.0.11", - "type": "module", "keywords": [ "rag", "llamaindex", diff --git a/packages/create-llama/tsconfig.json b/packages/create-llama/tsconfig.json index b8a4782f7db8d828af5d3113f9898100bf81b6c2..a653e907d965449ec6e9f82778b7a2e722f9bc02 100644 --- a/packages/create-llama/tsconfig.json +++ b/packages/create-llama/tsconfig.json @@ -7,10 +7,8 @@ "esModuleInterop": true, "skipLibCheck": false }, - "exclude": ["templates", "dist"], - "references": [ - { - "path": "./e2e/tsconfig.json" - } + "exclude": [ + "templates", + "dist" ] -} +} \ No newline at end of file