diff --git a/package.json b/package.json index a9d2fe9fac..f88001ffb3 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "scripts": { "install": "pnpm -r exec genversion --es6 --semi src/version.ts", "install:clean": "pnpm clean && pnpm install", - "clean": "pnpm -r clean && pnpm clean:build && pnpm clean:npm", + "clean": "pnpm clean:build && pnpm clean:npm", "clean:npm": "pnpm -r exec rimraf node_modules && pnpm exec rimraf node_modules", "clean:build": "pnpm -r exec rimraf dist tmp .cache .turbo tsconfig.tsbuildinfo", "build": "turbo build --filter=!@equinor/fusion-framework-docs", diff --git a/packages/cli/bin/cli.mjs b/packages/cli/bin/cli.mjs index 2b73c3423a..3c22d7badb 100755 --- a/packages/cli/bin/cli.mjs +++ b/packages/cli/bin/cli.mjs @@ -1,2 +1,2 @@ #!/usr/bin/env node -import('../dist/bin/main.mjs'); +import('../dist/bin/main.js'); diff --git a/packages/cli/package.json b/packages/cli/package.json index 66c0973168..e36147e7de 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -36,13 +36,12 @@ } }, "scripts": { - "build": "pnpm build:lib && pnpm build:dev-proxy && pnpm build:bin", + "prebuild": "pnpm build:source", + "build": "pnpm build:source && pnpm build:dev-server", "build:clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo && pnpm build", - "build:lib": "tsc -b tsconfig.lib.json", - "build:bin": "rollup -c", - "build:dev-proxy": "vite build", - "prepack": "pnpm build", - "clean": "rimraf dist, tsconfig.tsbuildinfo, tsconfig.lib.tsbuildinfo" + "build:source": "tsc -b", + "build:dev-server": "vite build", + "prepack": "pnpm build" }, "dependencies": { "@vitejs/plugin-react": "^4.0.4", @@ -93,7 +92,6 @@ "@equinor/fusion-wc-chip": "^1.2.1", "@equinor/fusion-wc-person": "^3.0.1", "@material-ui/styles": "^4.11.5", - "@rollup/plugin-typescript": "^12.1.0", "@types/adm-zip": "^0.5.0", "@types/loader-utils": "^2.0.6", "@types/node": "^20.11.14", @@ -105,7 +103,6 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-router-dom": "^6.15.0", - "rimraf": "^6.0.0", "rollup": "^4.22.4", "rxjs": "^7.8.1", "styled-components": "^6.0.7", diff --git a/packages/cli/rollup.config.mjs b/packages/cli/rollup.config.mjs deleted file mode 100644 index 97adb2dceb..0000000000 --- a/packages/cli/rollup.config.mjs +++ /dev/null @@ -1,21 +0,0 @@ -import typescript from '@rollup/plugin-typescript'; - -export default [ - { - input: './src/bin/main.ts', - output: { - file: './dist/bin/main.mjs', - format: 'es' - }, - plugins: [typescript({ - outputToFilesystem: false, - compilerOptions: { - composite: false, - declaration: false, - outDir: './dist/bin', - declarationDir: './dist/bin', - sourceMap: false, - } - })] - }, -]; \ No newline at end of file diff --git a/packages/cli/src/bin/create-dev-serve.ts b/packages/cli/src/bin/create-dev-serve.ts index e750a0e89e..e8a91c8811 100644 --- a/packages/cli/src/bin/create-dev-serve.ts +++ b/packages/cli/src/bin/create-dev-serve.ts @@ -14,8 +14,8 @@ import portFinder from 'portfinder'; import deepmerge from 'deepmerge/index.js'; import ViteRestart from 'vite-plugin-restart'; -import { appProxyPlugin } from '@equinor/fusion-framework-cli/app-proxy-plugin.js'; -import { externalPublicPlugin } from '@equinor/fusion-framework-cli/external-public-plugin.js'; +import { appProxyPlugin } from '../lib/plugins/app-proxy/app-proxy-plugin.js'; +import { externalPublicPlugin } from '../lib/plugins/external-public/external-public-plugin.js'; import { supportedExt, type ConfigExecuterEnv } from '../lib/utils/config.js'; import { manifestConfigFilename } from '../lib/app-manifest.js'; diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index de5335be4f..befc0af60f 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -7,12 +7,7 @@ "declarationDir": "./dist/types", "baseUrl": ".", "jsx": "react-jsx", - "paths": { - "@equinor/fusion-framework-cli/*-plugin.js": [ - "./src/lib/plugins/*" - ], - } - }, + }, "references": [ { "path": "../utils/observable" diff --git a/packages/cli/tsconfig.lib.json b/packages/cli/tsconfig.lib.json deleted file mode 100644 index 4d46a0537b..0000000000 --- a/packages/cli/tsconfig.lib.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "dist/lib", - "rootDir": "src/lib", - "target": "ES6", - "declarationDir": "./dist/types", - "baseUrl": ".", - }, - "include": ["src/lib"], -} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 39be757a08..b946b80ea5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -782,9 +782,6 @@ importers: '@material-ui/styles': specifier: ^4.11.5 version: 4.11.5(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - '@rollup/plugin-typescript': - specifier: ^12.1.0 - version: 12.1.0(rollup@4.22.4)(tslib@2.7.0)(typescript@5.5.4) '@types/adm-zip': specifier: ^0.5.0 version: 0.5.5 @@ -818,9 +815,6 @@ importers: react-router-dom: specifier: ^6.15.0 version: 6.25.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - rimraf: - specifier: ^6.0.0 - version: 6.0.1 rollup: specifier: ^4.22.4 version: 4.22.4 @@ -3841,28 +3835,6 @@ packages: resolution: {integrity: sha512-L3jkqmqoSVBVKHfpGZmLrex0lxR5SucGA0sUfFzGctehw+S/ggL9L/0NnC5mw6P8HUWpFZ3nQw3cRApjjWx9Sw==} engines: {node: '>=14.0.0'} - '@rollup/plugin-typescript@12.1.0': - resolution: {integrity: sha512-Kzs8KGJofe7cfTRODsnG1jNGxSvU8gVoNNd7Z/QaY25AYwe2LSSUpx/kPxqF38NYkpR8de3m51r9uwJpDlz6dg==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.14.0||^3.0.0||^4.0.0 - tslib: '*' - typescript: '>=3.7.0' - peerDependenciesMeta: - rollup: - optional: true - tslib: - optional: true - - '@rollup/pluginutils@5.1.2': - resolution: {integrity: sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - '@rollup/rollup-android-arm-eabi@4.21.2': resolution: {integrity: sha512-fSuPrt0ZO8uXeS+xP3b+yYTCBUd05MoSp2N/MFOgjhhUhMmchXlpTQrTpI8T+YAwAQuK7MafsCOxW7VrPMrJcg==} cpu: [arm] @@ -11959,23 +11931,6 @@ snapshots: '@remix-run/router@1.18.0': {} - '@rollup/plugin-typescript@12.1.0(rollup@4.22.4)(tslib@2.7.0)(typescript@5.5.4)': - dependencies: - '@rollup/pluginutils': 5.1.2(rollup@4.22.4) - resolve: 1.22.8 - typescript: 5.5.4 - optionalDependencies: - rollup: 4.22.4 - tslib: 2.7.0 - - '@rollup/pluginutils@5.1.2(rollup@4.22.4)': - dependencies: - '@types/estree': 1.0.5 - estree-walker: 2.0.2 - picomatch: 2.3.1 - optionalDependencies: - rollup: 4.22.4 - '@rollup/rollup-android-arm-eabi@4.21.2': optional: true