diff --git a/ide/packages/extension/package.json b/ide/packages/extension/package.json index 834b6ed..b7c9f03 100644 --- a/ide/packages/extension/package.json +++ b/ide/packages/extension/package.json @@ -15,8 +15,12 @@ "url": "https://github.com/cognitive-engineering-lab/argus", "type": "git" }, - "categories": ["Programming Languages"], - "activationEvents": ["onLanguage:rust"], + "categories": [ + "Programming Languages" + ], + "activationEvents": [ + "onLanguage:rust" + ], "contributes": { "commands": [ { @@ -25,7 +29,9 @@ } ] }, - "files": ["dist"], + "files": [ + "dist" + ], "main": "./dist/argus.js", "exports": { ".": { @@ -49,7 +55,6 @@ "build": "depot build", "vscode:prepublish": "depot build" }, - "dependencies": {}, "devDependencies": { "@argus/common": "workspace:*", "@argus/panoptes": "workspace:*", @@ -69,6 +74,7 @@ "react-dom": "^18.0.0", "toml": "^3.0.0", "typescript": "^5.1.3", - "vite": "^4.4.9" + "vite": "^4.4.9", + "vite-plugin-static-copy": "^1.0.1" } } diff --git a/ide/packages/extension/src/view.ts b/ide/packages/extension/src/view.ts index d027867..dc102b5 100644 --- a/ide/packages/extension/src/view.ts +++ b/ide/packages/extension/src/view.ts @@ -214,8 +214,7 @@ export class View { ) { const panoptesDir = vscode.Uri.joinPath( this.extensionUri, - "node_modules", - "@argus", + "dist", "panoptes" ); diff --git a/ide/packages/extension/vite.config.ts b/ide/packages/extension/vite.config.mts similarity index 77% rename from ide/packages/extension/vite.config.ts rename to ide/packages/extension/vite.config.mts index 5e01af8..630f9ae 100644 --- a/ide/packages/extension/vite.config.ts +++ b/ide/packages/extension/vite.config.mts @@ -1,14 +1,26 @@ import fs from "fs"; import { builtinModules } from "module"; import { resolve } from "path"; +import path from "path"; import toml from "toml"; import { defineConfig } from "vite"; +import { viteStaticCopy } from "vite-plugin-static-copy"; const manifest = JSON.parse(fs.readFileSync("package.json", "utf-8")); const rustToolchain = toml.parse( fs.readFileSync("../../../rust-toolchain.toml", "utf-8") ); export default defineConfig(({ mode }) => ({ + plugins: [ + viteStaticCopy({ + targets: [ + { + src: path.resolve(__dirname, "./node_modules/@argus") + "/[!.]*", + dest: "./", + }, + ], + }), + ], build: { target: "node16", lib: { diff --git a/ide/pnpm-lock.yaml b/ide/pnpm-lock.yaml index 251162e..46f2938 100644 --- a/ide/pnpm-lock.yaml +++ b/ide/pnpm-lock.yaml @@ -34,7 +34,7 @@ importers: version: 5.2.2 vite: specifier: ^4.4.9 - version: 4.4.9(@types/node@20.2.5) + version: 4.4.9(@types/node@20.8.0) vitest: specifier: ^0.34.6 version: 0.34.6 @@ -104,6 +104,9 @@ importers: vite: specifier: ^4.4.9 version: 4.4.9(@types/node@20.2.5) + vite-plugin-static-copy: + specifier: ^1.0.1 + version: 1.0.1(vite@4.4.9) packages/panoptes: devDependencies: @@ -187,7 +190,7 @@ importers: version: 1.21.3(@types/react@18.2.14)(react-dom@18.0.0)(react@18.0.0) vite: specifier: ^4.4.9 - version: 4.4.9(@types/node@20.2.5) + version: 4.4.9(@types/node@20.8.0) packages: @@ -1412,6 +1415,14 @@ packages: engines: {node: '>=10'} dev: true + /anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + dev: true + /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true @@ -1441,6 +1452,11 @@ packages: resolution: {integrity: sha512-pNdYkNPiJUnEhnfXV56+sQy8+AaPcG3POZAUnwr4EeqCUZFz4u2PePbo3e5Gj4ziYPCWGUZT9RHisvJKnwFuBQ==} dev: true + /binary-extensions@2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: true + /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -1526,6 +1542,21 @@ packages: get-func-name: 2.0.2 dev: true + /chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /classnames@2.3.2: resolution: {integrity: sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==} dev: true @@ -2312,6 +2343,15 @@ packages: mime-types: 2.1.35 dev: true + /fs-extra@11.2.0: + resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + dev: true + /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true @@ -2393,6 +2433,10 @@ packages: slash: 3.0.0 dev: true + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true + /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true @@ -2501,6 +2545,13 @@ packages: engines: {node: '>=12'} dev: true + /is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: true + /is-docker@2.2.1: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} @@ -2629,6 +2680,14 @@ packages: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: true + /jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + dev: true + /jszip@3.10.1: resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==} dependencies: @@ -2860,6 +2919,11 @@ packages: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} dev: true + /normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + /nwsapi@2.2.7: resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} dev: true @@ -3168,6 +3232,13 @@ packages: util-deprecate: 1.0.2 dev: true + /readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.1 + dev: true + /regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} dev: true @@ -3473,6 +3544,11 @@ packages: engines: {node: '>= 4.0.0'} dev: true + /universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + dev: true + /update-browserslist-db@1.0.13(browserslist@4.23.0): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true @@ -3576,6 +3652,19 @@ packages: - terser dev: true + /vite-plugin-static-copy@1.0.1(vite@4.4.9): + resolution: {integrity: sha512-3eGL4mdZoPJMDBT68pv/XKIHR4MgVolStIxxv1gIBP4R8TpHn9C9EnaU0hesqlseJ4ycLGUxckFTu/jpuJXQlA==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + vite: ^5.0.0 + dependencies: + chokidar: 3.6.0 + fast-glob: 3.3.1 + fs-extra: 11.2.0 + picocolors: 1.0.0 + vite: 4.4.9(@types/node@20.2.5) + dev: true + /vite@4.4.9: resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} engines: {node: ^14.18.0 || >=16.0.0}