diff --git a/nx.json b/nx.json index 460182e190..df0ecb2792 100644 --- a/nx.json +++ b/nx.json @@ -24,7 +24,7 @@ }, "dev": { "dependsOn": [ - "prepare:dev" + "^dev" ] }, "lint": { diff --git a/package-lock.json b/package-lock.json index c06df90bc6..c99f99c2a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34314,7 +34314,8 @@ "@swc/core": "^1.3.37", "@types/node": "^16.18.11", "@types/semver": "^7.3.13", - "rimraf": "^4.1.2" + "rimraf": "^4.1.2", + "run-script-os": "^1.1.6" } }, "packages/bump-version-for-cron/node_modules/@types/node": { @@ -34350,8 +34351,6 @@ "@astronautlabs/jsonpath": "^1.1.0", "@hapi/call": "^9.0.1", "@hapi/subtext": "^7.1.0", - "@k8slens/cluster-settings": "^6.5.0-alpha.1", - "@k8slens/node-fetch": "^6.5.0-alpha.1", "@kubernetes/client-node": "^0.18.1", "@material-ui/styles": "^4.11.5", "@ogre-tools/fp": "^15.1.2", @@ -34555,6 +34554,7 @@ "peerDependencies": { "@k8slens/application": "^6.5.0-alpha.0", "@k8slens/application-for-electron-main": "^6.5.0-alpha.0", + "@k8slens/cluster-settings": "^6.5.0-alpha.1", "@k8slens/legacy-extensions": "^1.0.0-alpha.0", "@k8slens/messaging": "^1.0.0-alpha.1", "@k8slens/messaging-for-main": "^1.0.0-alpha.1", @@ -35544,7 +35544,8 @@ "@types/node": "^16.18.11", "@types/semver": "^7.3.13", "@types/tar-stream": "^2.2.2", - "rimraf": "^4.1.2" + "rimraf": "^4.1.2", + "run-script-os": "^1.1.6" } }, "packages/ensure-binaries/node_modules/@types/node": { @@ -35814,7 +35815,8 @@ "@types/jsdom": "^20.0.1", "@types/node": "^18.11.18", "@types/sharp": "^0.31.1", - "rimraf": "^4.1.2" + "rimraf": "^4.1.2", + "run-script-os": "^1.1.6" } }, "packages/generate-tray-icons/node_modules/color": { @@ -37552,6 +37554,7 @@ "dependencies": { "@k8slens/application": "^6.5.0-alpha.2", "@k8slens/application-for-electron-main": "^6.5.0-alpha.1", + "@k8slens/cluster-settings": "^6.5.0-alpha.1", "@k8slens/core": "^6.5.0-alpha.3", "@k8slens/ensure-binaries": "^6.5.0-alpha.1", "@k8slens/feature-core": "^6.5.0-alpha.1", @@ -37561,6 +37564,7 @@ "@k8slens/messaging": "^1.0.0-alpha.1", "@k8slens/messaging-for-main": "^1.0.0-alpha.1", "@k8slens/messaging-for-renderer": "^1.0.0-alpha.1", + "@k8slens/node-fetch": "^6.5.0-alpha.1", "@k8slens/run-many": "^1.0.0-alpha.1", "@k8slens/startable-stoppable": "^1.0.0-alpha.1", "@k8slens/test-utils": "^1.0.0-alpha.1", @@ -37575,7 +37579,6 @@ }, "devDependencies": { "@electron/rebuild": "^3.2.10", - "@k8slens/node-fetch": "^6.5.0-alpha.1", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", "@swc/cli": "^0.1.61", "@swc/core": "^1.3.37", @@ -38671,7 +38674,8 @@ "@types/inquirer": "^9.0.3", "@types/node": "^16.18.11", "@types/semver": "^7.3.13", - "rimraf": "^4.1.2" + "rimraf": "^4.1.2", + "run-script-os": "^1.1.6" } }, "packages/release-tool/node_modules/@types/node": { diff --git a/package.json b/package.json index 0a9f693adb..e7a34ccbbf 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,10 @@ "build:docs": "lerna run --stream build:docs", "clean": "lerna run clean --stream", "clean:node_modules": "lerna clean -y && rimraf node_modules", - "dev": "lerna run dev --stream --skip-nx-cache", + "build-pre-dev-packages": "lerna run build --scope @k8slens/ensure-binaries --scope @k8slens/generate-tray-icons", + "before-dev-actions": "cd packages/open-lens && rimraf static/build/ && npm run build:tray-icons && npm run download:binaries", + "predev": "npm run build-pre-dev-packages && npm run before-dev-actions", + "dev": "lerna watch -- lerna run dev --verbose --stream --since", "lint": "lerna run lint --stream", "lint:fix": "lerna run lint:fix --stream", "mkdocs:serve-local": "docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -it -p 8000:8000 -v ${PWD}:/docs mkdocs-serve-local:latest", diff --git a/packages/bump-version-for-cron/package.json b/packages/bump-version-for-cron/package.json index cba08964d2..e158aca6dc 100644 --- a/packages/bump-version-for-cron/package.json +++ b/packages/bump-version-for-cron/package.json @@ -5,7 +5,9 @@ "license": "MIT", "scripts": { "clean": "rimraf dist/", - "build": "swc ./src/index.ts -d ./dist" + "build": "swc ./src/index.ts -d ./dist", + "postbuild": "run-script-os", + "postbuild:nix": "chmod u+x ./dist/index.js" }, "type": "module", "bin": "./dist/index.js", @@ -26,6 +28,7 @@ "@swc/core": "^1.3.37", "@types/node": "^16.18.11", "@types/semver": "^7.3.13", - "rimraf": "^4.1.2" + "rimraf": "^4.1.2", + "run-script-os": "^1.1.6" } } diff --git a/packages/cluster-settings/package.json b/packages/cluster-settings/package.json index f71236a0df..b4f71e6c7a 100644 --- a/packages/cluster-settings/package.json +++ b/packages/cluster-settings/package.json @@ -19,7 +19,7 @@ "generate-types": "tsc --d --declarationDir ./dist --declarationMap --emitDeclarationOnly", "build": "npm run generate-types && swc ./src/index.ts -d ./dist", "prepare": "npm run build", - "prepare:dev": "npm run build", + "dev": "npm run build", "prepare:test": "npm run build" }, "devDependencies": { diff --git a/packages/core/package.json b/packages/core/package.json index b608493c38..698a08dfe6 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -48,8 +48,7 @@ "scripts": { "build": "cross-env NODE_ENV=production webpack --config webpack/library-bundle.ts --progress", "clean": "rimraf dist static/build", - "prepare:dev": "cross-env NODE_ENV=development webpack --config webpack/library-bundle.ts --progress", - "dev": "cross-env NODE_ENV=development webpack --config webpack/library-bundle.ts --watch", + "dev": "cross-env NODE_ENV=development webpack --config webpack/library-bundle.ts --progress", "test:unit": "jest --testPathIgnorePatterns integration", "test:watch": "func() { jest ${1} --watch --testPathIgnorePatterns integration; }; func", "lint": "PROD=true eslint --ext js,ts,tsx --max-warnings=0 .", @@ -98,7 +97,6 @@ ], "runtime": "@side/jest-runtime" }, - "build": {}, "nx": { "targets": { "build": { @@ -120,8 +118,6 @@ "@astronautlabs/jsonpath": "^1.1.0", "@hapi/call": "^9.0.1", "@hapi/subtext": "^7.1.0", - "@k8slens/cluster-settings": "^6.5.0-alpha.1", - "@k8slens/node-fetch": "^6.5.0-alpha.1", "@kubernetes/client-node": "^0.18.1", "@material-ui/styles": "^4.11.5", "@ogre-tools/fp": "^15.1.2", @@ -322,6 +318,7 @@ "peerDependencies": { "@k8slens/application": "^6.5.0-alpha.0", "@k8slens/application-for-electron-main": "^6.5.0-alpha.0", + "@k8slens/cluster-settings": "^6.5.0-alpha.1", "@k8slens/legacy-extensions": "^1.0.0-alpha.0", "@k8slens/messaging": "^1.0.0-alpha.1", "@k8slens/messaging-for-main": "^1.0.0-alpha.1", diff --git a/packages/core/src/main/k8s/api-base-server-address.injectable.ts b/packages/core/src/main/k8s/api-base-server-address.injectable.ts index 8d3a960ed4..b967b7fd6a 100644 --- a/packages/core/src/main/k8s/api-base-server-address.injectable.ts +++ b/packages/core/src/main/k8s/api-base-server-address.injectable.ts @@ -11,6 +11,8 @@ const apiBaseServerAddressInjectable = getInjectable({ instantiate: (di) => { const lensProxyPort = di.inject(lensProxyPortInjectable); + console.log("hello"); + return `https://127.0.0.1:${lensProxyPort.get()}`; }, injectionToken: apiBaseServerAddressInjectionToken, diff --git a/packages/ensure-binaries/package.json b/packages/ensure-binaries/package.json index af8c7b12f3..ecf8272ac2 100644 --- a/packages/ensure-binaries/package.json +++ b/packages/ensure-binaries/package.json @@ -7,7 +7,9 @@ "scripts": { "clean": "rimraf dist/", "build": "swc ./src/index.ts -d ./dist/", - "prepare:dev": "npm run build", + "postbuild": "run-script-os", + "postbuild:nix": "chmod u+x ./dist/index.js", + "dev": "npm run build", "prepare": "npm run build" }, "bin": { @@ -38,6 +40,7 @@ "@types/node": "^16.18.11", "@types/semver": "^7.3.13", "@types/tar-stream": "^2.2.2", - "rimraf": "^4.1.2" + "rimraf": "^4.1.2", + "run-script-os": "^1.1.6" } } diff --git a/packages/extension-api/package.json b/packages/extension-api/package.json index a1b17c96e9..31c10e03dc 100644 --- a/packages/extension-api/package.json +++ b/packages/extension-api/package.json @@ -20,10 +20,10 @@ "registry": "https://registry.npmjs.org/" }, "scripts": { - "build": "webpack --config webpack/extensions.ts", + "build": "webpack --config webpack/extensions.ts --progress", "build:docs": "typedoc", "clean": "rimraf dist/", - "prepare:dev": "npm run build" + "dev": "npm run build" }, "dependencies": { "@k8slens/core": "^6.5.0-alpha.3" diff --git a/packages/generate-tray-icons/package.json b/packages/generate-tray-icons/package.json index f659fabcf1..948e2aa441 100644 --- a/packages/generate-tray-icons/package.json +++ b/packages/generate-tray-icons/package.json @@ -6,7 +6,9 @@ "scripts": { "clean": "rimraf dist/", "build": "swc ./src/index.ts -d ./dist/", - "prepare:dev": "npm run build", + "postbuild": "run-script-os", + "postbuild:nix": "chmod u+x ./dist/index.js", + "dev": "npm run build", "prepare": "npm run build" }, "bin": { @@ -27,7 +29,8 @@ "@types/jsdom": "^20.0.1", "@types/node": "^18.11.18", "@types/sharp": "^0.31.1", - "rimraf": "^4.1.2" + "rimraf": "^4.1.2", + "run-script-os": "^1.1.6" }, "dependencies": { "arg": "^5.0.2", diff --git a/packages/legacy-extension-example/package.json b/packages/legacy-extension-example/package.json index e175eeb1f1..428b863b0d 100644 --- a/packages/legacy-extension-example/package.json +++ b/packages/legacy-extension-example/package.json @@ -31,8 +31,8 @@ "homepage": "https://github.com/lensapp/lens", "scripts": { "clean": "rimraf dist/", - "build": "webpack --config webpack.ts", - "dev": "webpack --mode=development --watch --config webpack.ts", + "build": "webpack --config webpack.ts --progress", + "dev": "webpack --mode=development --config webpack.ts", "lint": "lens-lint", "lint:fix": "lens-lint --fix" }, diff --git a/packages/node-fetch/package.json b/packages/node-fetch/package.json index df4f9f579a..6b3ad2aa93 100644 --- a/packages/node-fetch/package.json +++ b/packages/node-fetch/package.json @@ -15,10 +15,9 @@ ], "scripts": { "clean": "rimraf dist/", - "build": "webpack --config webpack.ts", + "dev": "webpack --mode=development --config webpack.ts --progress", + "build": "webpack --config webpack.ts --progress", "lint": "exit 0", - "prepare": "npm run build", - "prepare:dev": "npm run build", "prepare:test": "npm run build" }, "dependencies": { diff --git a/packages/open-lens/package.json b/packages/open-lens/package.json index fb4fbc6616..82c0e609f5 100644 --- a/packages/open-lens/package.json +++ b/packages/open-lens/package.json @@ -28,7 +28,6 @@ "build:dir": "npm run compile && electron-builder --dir", "compile": "cross-env NODE_ENV=production webpack --config webpack/webpack.ts --progress", "postcompile": "npm run build:tray-icons && npm run download:binaries", - "predev": "rimraf static/build/ && npm run build:tray-icons && npm run download:binaries", "dev": "concurrently -i -k \"npm run dev-run -C\" npm:dev:*", "dev-run": "nodemon --watch ./static/build/main.js --exec \"electron --remote-debugging-port=9223 --inspect .\"", "dev:main": "cross-env NODE_ENV=development webpack --config webpack/main.ts --progress --watch", @@ -71,9 +70,6 @@ ] }, "dev": { - "dependsOn": [ - "^prepare:dev" - ], "outputs": [ "{workspaceRoot}/binaries/", "{workspaceRoot}/static/build/" @@ -197,6 +193,7 @@ "dependencies": { "@k8slens/application": "^6.5.0-alpha.2", "@k8slens/application-for-electron-main": "^6.5.0-alpha.1", + "@k8slens/cluster-settings": "^6.5.0-alpha.1", "@k8slens/core": "^6.5.0-alpha.3", "@k8slens/ensure-binaries": "^6.5.0-alpha.1", "@k8slens/feature-core": "^6.5.0-alpha.1", @@ -206,6 +203,7 @@ "@k8slens/messaging": "^1.0.0-alpha.1", "@k8slens/messaging-for-main": "^1.0.0-alpha.1", "@k8slens/messaging-for-renderer": "^1.0.0-alpha.1", + "@k8slens/node-fetch": "^6.5.0-alpha.1", "@k8slens/run-many": "^1.0.0-alpha.1", "@k8slens/startable-stoppable": "^1.0.0-alpha.1", "@k8slens/test-utils": "^1.0.0-alpha.1", @@ -220,7 +218,6 @@ }, "devDependencies": { "@electron/rebuild": "^3.2.10", - "@k8slens/node-fetch": "^6.5.0-alpha.1", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", "@swc/cli": "^0.1.61", "@swc/core": "^1.3.37", diff --git a/packages/release-tool/package.json b/packages/release-tool/package.json index b98aa84153..2e116f5fe3 100644 --- a/packages/release-tool/package.json +++ b/packages/release-tool/package.json @@ -7,7 +7,9 @@ "private": true, "scripts": { "clean": "rimraf dist/", - "build": "swc ./src/index.ts -d ./dist" + "build": "swc ./src/index.ts -d ./dist", + "postbuild": "run-script-os", + "postbuild:nix": "chmod u+x ./dist/index.js" }, "bin": { "create-release-pr": "./dist/index.js" @@ -19,7 +21,8 @@ "@types/inquirer": "^9.0.3", "@types/node": "^16.18.11", "@types/semver": "^7.3.13", - "rimraf": "^4.1.2" + "rimraf": "^4.1.2", + "run-script-os": "^1.1.6" }, "dependencies": { "chalk": "^5.2.0", diff --git a/packages/technical-features/application/agnostic/package.json b/packages/technical-features/application/agnostic/package.json index ab869a87c0..d66af445e5 100644 --- a/packages/technical-features/application/agnostic/package.json +++ b/packages/technical-features/application/agnostic/package.json @@ -24,8 +24,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch", + "build": "webpack --progress", + "dev": "webpack --mode=development --progress", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/technical-features/application/electron-main/package.json b/packages/technical-features/application/electron-main/package.json index 96d649a362..881b4d492d 100644 --- a/packages/technical-features/application/electron-main/package.json +++ b/packages/technical-features/application/electron-main/package.json @@ -24,8 +24,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch", + "build": "webpack --progress", + "dev": "webpack --mode=development --progress", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/technical-features/application/legacy-extensions/package.json b/packages/technical-features/application/legacy-extensions/package.json index 6e92ca7c02..9d9c7906c5 100644 --- a/packages/technical-features/application/legacy-extensions/package.json +++ b/packages/technical-features/application/legacy-extensions/package.json @@ -24,8 +24,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch", + "build": "webpack --progress", + "dev": "webpack --mode=development --progress", "lint": "lens-lint", "lint:fix": "lens-lint --fix" }, diff --git a/packages/technical-features/feature-core/package.json b/packages/technical-features/feature-core/package.json index cabb6e17a0..e0972b73ad 100644 --- a/packages/technical-features/feature-core/package.json +++ b/packages/technical-features/feature-core/package.json @@ -24,8 +24,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch", + "build": "webpack --progress", + "dev": "webpack --mode=development --progress", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/technical-features/messaging/agnostic/package.json b/packages/technical-features/messaging/agnostic/package.json index 085304d4e0..c17aaeddec 100644 --- a/packages/technical-features/messaging/agnostic/package.json +++ b/packages/technical-features/messaging/agnostic/package.json @@ -26,8 +26,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch", + "build": "webpack --progress", + "dev": "webpack --mode=development --progress", "test:unit": "jest --coverage --runInBand", "lint:fix": "lens-lint --fix", "lint": "lens-lint" diff --git a/packages/technical-features/messaging/computed-channel/package.json b/packages/technical-features/messaging/computed-channel/package.json index 81c4f80013..ca41860ff4 100644 --- a/packages/technical-features/messaging/computed-channel/package.json +++ b/packages/technical-features/messaging/computed-channel/package.json @@ -26,8 +26,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch", + "build": "webpack --progress", + "dev": "webpack --mode=development --progress", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/technical-features/messaging/electron/main/package.json b/packages/technical-features/messaging/electron/main/package.json index ff1a76a7d3..f472e3e67b 100644 --- a/packages/technical-features/messaging/electron/main/package.json +++ b/packages/technical-features/messaging/electron/main/package.json @@ -26,8 +26,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch", + "build": "webpack --progress", + "dev": "webpack --mode=development --progress", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/technical-features/messaging/electron/renderer/package.json b/packages/technical-features/messaging/electron/renderer/package.json index 75fcb8e38f..dc7de27c36 100644 --- a/packages/technical-features/messaging/electron/renderer/package.json +++ b/packages/technical-features/messaging/electron/renderer/package.json @@ -26,8 +26,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch", + "build": "webpack --progress", + "dev": "webpack --mode=development --progress", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/technical-features/messaging/message-bridge-fake/package.json b/packages/technical-features/messaging/message-bridge-fake/package.json index 6837504a0e..6a7ec96e7d 100644 --- a/packages/technical-features/messaging/message-bridge-fake/package.json +++ b/packages/technical-features/messaging/message-bridge-fake/package.json @@ -26,8 +26,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch", + "build": "webpack --progress", + "dev": "webpack --mode=development --progress", "test:unit": "jest --coverage --runInBand", "lint:fix": "lens-lint --fix", "lint": "lens-lint" diff --git a/packages/utility-features/run-many/package.json b/packages/utility-features/run-many/package.json index 1fa8af2ba1..0d9f2420a6 100644 --- a/packages/utility-features/run-many/package.json +++ b/packages/utility-features/run-many/package.json @@ -20,8 +20,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch", + "build": "webpack --progress", + "dev": "webpack --mode=development --progress", "test:unit": "jest --coverage --runInBand" }, "peerDependencies": { diff --git a/packages/utility-features/startable-stoppable/package.json b/packages/utility-features/startable-stoppable/package.json index 940e1e91b2..de6f7ed79e 100644 --- a/packages/utility-features/startable-stoppable/package.json +++ b/packages/utility-features/startable-stoppable/package.json @@ -26,8 +26,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch", + "build": "webpack --progress", + "dev": "webpack --mode=development --progress", "test:unit": "jest --coverage --runInBand", "lint": "lens-lint", "lint:fix": "lens-lint --fix" diff --git a/packages/utility-features/test-utils/package.json b/packages/utility-features/test-utils/package.json index 4336c0682b..616d4532df 100644 --- a/packages/utility-features/test-utils/package.json +++ b/packages/utility-features/test-utils/package.json @@ -20,8 +20,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch" + "build": "webpack --progress", + "dev": "webpack --mode=development --progress" }, "peerDependencies": { "@ogre-tools/injectable": "^15.1.2", diff --git a/packages/utility-features/utilities/package.json b/packages/utility-features/utilities/package.json index 777907d851..56f2a1b971 100644 --- a/packages/utility-features/utilities/package.json +++ b/packages/utility-features/utilities/package.json @@ -20,8 +20,8 @@ "license": "MIT", "homepage": "https://github.com/lensapp/lens", "scripts": { - "build": "webpack", - "dev": "webpack --mode=development --watch", + "build": "webpack --progress", + "dev": "webpack --mode=development --progress", "test:unit": "jest --coverage --runInBand" }, "peerDependencies": { diff --git a/packages/utility-features/utilities/webpack.config.js b/packages/utility-features/utilities/webpack.config.js index 3183f30179..8f35c37857 100644 --- a/packages/utility-features/utilities/webpack.config.js +++ b/packages/utility-features/utilities/webpack.config.js @@ -1 +1,12 @@ -module.exports = require("@k8slens/webpack").configForNode; +const { + configForNode: { performance, ...configForNode } +} = require("@k8slens/webpack"); + +module.exports = { + ...configForNode, + performance: { + ...performance, + maxEntrypointSize: 512000, + maxAssetSize: 512000 + } +}