From 37a0cd73bc6076484ed6e9c156e6e7f256e4b645 Mon Sep 17 00:00:00 2001 From: orosmatthew Date: Mon, 11 Mar 2024 20:36:45 -0400 Subject: [PATCH] [Sandbox] Fix shared importing --- sandbox/package-lock.json | 17 +++++++++++++++++ sandbox/package.json | 1 + sandbox/src/index.ts | 8 ++++---- sandbox/tsconfig.json | 5 +---- shared/submission-runner/package.json | 5 +---- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/sandbox/package-lock.json b/sandbox/package-lock.json index 6d0085f..0ea5ace 100644 --- a/sandbox/package-lock.json +++ b/sandbox/package-lock.json @@ -13,6 +13,7 @@ "fs-extra": "^11.2.0", "rollup": "^4.12.1", "simple-git": "^3.22.0", + "submission-runner": "file:../shared/submission-runner", "tree-kill": "^1.2.2", "url-join": "^5.0.0", "zod": "^3.22.4" @@ -32,6 +33,18 @@ "typescript": "^5.4.2" } }, + "../shared/submission-runner": { + "dependencies": { + "fs-extra": "^11.2.0", + "tree-kill": "^1.2.2", + "typescript": "^5.4.2", + "zod": "^3.22.4" + }, + "devDependencies": { + "@types/fs-extra": "^11.0.4", + "@types/node": "20.x" + } + }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", @@ -2680,6 +2693,10 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/submission-runner": { + "resolved": "../shared/submission-runner", + "link": true + }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", diff --git a/sandbox/package.json b/sandbox/package.json index 1492cbc..866a9a7 100644 --- a/sandbox/package.json +++ b/sandbox/package.json @@ -32,6 +32,7 @@ "fs-extra": "^11.2.0", "rollup": "^4.12.1", "simple-git": "^3.22.0", + "submission-runner": "file:../shared/submission-runner", "tree-kill": "^1.2.2", "url-join": "^5.0.0", "zod": "^3.22.4" diff --git a/sandbox/src/index.ts b/sandbox/src/index.ts index 187d4e7..62d9f74 100644 --- a/sandbox/src/index.ts +++ b/sandbox/src/index.ts @@ -4,10 +4,10 @@ import urlJoin from 'url-join'; import os, { EOL } from 'os'; import { join } from 'path'; import { simpleGit, SimpleGit } from 'simple-git'; -import { runJava } from '@submissionRunner/java.cjs'; -import { runCSharp } from '@submissionRunner/csharp.cjs'; -import { runCpp } from '@submissionRunner/cpp.cjs'; -import { RunResult, RunResultZod } from '@submissionRunner/types.cjs'; +import { runJava } from 'submission-runner/java.cjs'; +import { runCSharp } from 'submission-runner/csharp.cjs'; +import { runCpp } from 'submission-runner/cpp.cjs'; +import { RunResult, RunResultZod } from 'submission-runner/types.cjs'; import { z } from 'zod'; const submissionPostData = z diff --git a/sandbox/tsconfig.json b/sandbox/tsconfig.json index 1965264..0a6b16a 100644 --- a/sandbox/tsconfig.json +++ b/sandbox/tsconfig.json @@ -5,9 +5,6 @@ "outDir": "./build", "esModuleInterop": true, "strict": true, - "paths": { - "@submissionRunner/*": ["../shared/submissionRunner/*"] - } }, - "references": [{ "path": "../shared/submissionRunner" }] + "include": ["src/**/*.ts"] } diff --git a/shared/submission-runner/package.json b/shared/submission-runner/package.json index a8f6189..36dab5d 100644 --- a/shared/submission-runner/package.json +++ b/shared/submission-runner/package.json @@ -5,10 +5,7 @@ }, "devDependencies": { "@types/node": "20.x", - "@types/fs-extra": "^11.0.4" - }, - "dependencies": { - "typescript": "^5.4.2", + "@types/fs-extra": "^11.0.4", "zod": "^3.22.4", "tree-kill": "^1.2.2", "fs-extra": "^11.2.0"