1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Compare commits

..

145 Commits

Author SHA1 Message Date
gitstart
f1a960fd78 Add timestamps to the logger messages
Signed-off-by: gitstart <bot@gitstart.com>
Co-authored-by: LuisChiej <54555805+LuisChiej@users.noreply.github.com>
2023-08-09 12:01:42 -04:00
Dustin Feucht
452042f5c5 chore: Update link in CONTRIBUTING.md
The page the link is redirecting to does return a 404.
That's why a link to the most general sub-page is more ideal.

Signed-off-by: Dustin Feucht <code.nopjar@gmail.com>
2023-08-09 09:26:57 -04:00
John Daly
de5fc19240 Update packages/core/src/renderer/components/workloads-pods/container-metrics.injectable.ts
Signed-off-by: John Daly <john.daly2@gmail.com>
2023-08-09 09:26:38 -04:00
John Daly
6e8e58eaf9 Updating PodDetailsContainerMetrics to support fetching metrics for Pods that have multiple containers
Signed-off-by: John Daly <john.daly2@gmail.com>
2023-08-09 09:26:38 -04:00
Gabriel
4ab97d2372 chore: Extract @k8slens/spinner
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-06-02 13:08:18 +02:00
Gabriel
323b3759fc chore: resolve comments
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-06-01 23:38:14 +02:00
Gabriel
2547b19245 chore: update snapshots
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-06-01 23:38:14 +02:00
Gabriel
8b69c12ed4 chore: extract @k8slens/notifications
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-06-01 23:38:14 +02:00
Jari Kolehmainen
f602ce8f46 chore: extract prometheus from core
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2023-06-01 13:53:39 -04:00
Gabriel
7274cdde50 chore: include types with void operator for coverage
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-06-01 19:03:09 +02:00
Gabriel
34ca6509b8 chore: extract tokens
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-06-01 19:03:09 +02:00
Sebastian Malton
21914db35b chore: Fix unit tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-06-01 09:41:59 -04:00
Sebastian Malton
e7f32bce30 fix: Add registration of kubeApiSpecificsFeature
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-06-01 09:41:59 -04:00
Sebastian Malton
d144558c6d chore: Update lockfile
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-06-01 09:41:59 -04:00
Sebastian Malton
a546ae1000 chore: Extract specific KubeApi injectables to own package
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-06-01 09:41:59 -04:00
Sebastian Malton
84017b48db chore: Fix spelling mistake in KubeApi documentation
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-06-01 09:41:59 -04:00
Sebastian Malton
0dd833c00b chore!: Switch to using specific log functions in KubeApi dependencies
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-06-01 09:41:59 -04:00
Sebastian Malton
eee567b7f2 chore: Move storesAndApisCanBeCreatedInjectionToken to @k8slens/kube-api-specifics
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-06-01 09:41:59 -04:00
Sebastian Malton
2efa801838 chore: Fix typo in kube-api documentation
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-06-01 09:41:59 -04:00
Jan-Otto Kröpke
48a5e3c3be Update @electron/notarize
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
2023-06-01 08:42:27 -04:00
Gabriel
683ac4efcc chore: remove injectable from export
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-06-01 11:36:30 +02:00
Gabriel
58e4ebcdea chore: bump package.json
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-06-01 11:36:30 +02:00
Gabriel
86fa93ac8b chore: extract @k8slens/random
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-06-01 11:36:30 +02:00
Janne Savolainen
847f2b1b7b Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Bump ogre-tools to latest

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2023-06-01 11:09:58 +03:00
Janne Savolainen
fe77164311 Bump ogre-tools for linkable improvements
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2023-06-01 11:09:58 +03:00
Iku-turso
9a2d585e62 feat: Add support for lens-webpack-build --watch
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
2023-06-01 08:57:01 +03:00
Iku-turso
28c9eeec36 feat: Make lens-webpack-build cope long lasting processes, eg. watch
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
2023-06-01 08:57:01 +03:00
Iku-turso
0c2cc25b5b feat: Make webpack configuration trigger linkable-push
Previously this was done by lens-webpack-build, which is awkward for
build-scripts that watch.

Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
2023-06-01 08:57:01 +03:00
Sebastian Malton
0c1e822788 chore: Move files around to better places
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 16:21:35 -04:00
Sebastian Malton
34adfcd20b fix: Retrieve projectVersion from main for 'extensions-persistent-storage'
- Prevent the version being changed by the renderer

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 16:21:35 -04:00
Sebastian Malton
5511a2f461 chore: Update snapshots after rebase
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
f6cc1b00c2 chore: Fix lint after rebase
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
b3990b535e chore: Fixup dependency versions of @k8slens/cluster-sidebar
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
a0e38b2178 chore: Update @orge-tools/* deps
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
b1a988e133 chore: Move around Custom Resource and Custom Resource Definition files to simplify names
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
66a7615e9c chore: Factor out NavigateToCustomResources type
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
e641509e3d chore: Cleanup custom resource route definition
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
147be22db3 fix: The command pallet command for navigating to Custom Resource Definitions should navigate to the correct route
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
bedd7a25bb fix: Custom Resource Definitions sidebar item should navigate to the correct route
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
49db31a9aa fix: Custom Resource Definitions should be the first entry in the side bar
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
1ff2436240 chore: Fix tests after rebase
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
54b6375a7e chore: Fix integration tests failing due to helm testid's changing
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
eb78edb226 fix: Fix formatting of custom resource sidebar items
- The titles should better handle being line wrapped

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
d37a765ac2 chore: Improve title formatting for Horizontal/Vertical Pod Autoscalers
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
27a14714c3 chore: Fix IDs for some sidebar items
- Also cleanup formatting of the sidebar item titles

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
27aaa3623d chore: Fixup tests snapshots to match new testid behaviour
- Move order-of-sidebar-items to the new package
- Fix the extension sidebar item registrator

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
7924ab5504 chore: Convert sidebarItemInjectionToken to use InjectWithMetadata instead of duplicating the IDs
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
04273dcda2 chore: Rename sidebar item injectable files
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Sebastian Malton
500ac15703 chore: Extract sidebar item injection token into separate package
- Add unit tests to cover custom resources sidebar items

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-31 14:23:53 -04:00
Gabriel
d28da8e7ac chore: update package version
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-05-30 23:02:45 +02:00
Gabriel
da1d35d1de chore: extract @k8slens/animate
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-05-30 23:02:45 +02:00
Gabriel
ea1f85f224 extract @k8slens/icon
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-05-30 23:02:45 +02:00
Gabriel
9e751938bd chore: bump ogre-tools
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-05-30 21:35:33 +02:00
Gabriel
8ebe99ae54 chore: update snapshots
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-05-30 21:35:33 +02:00
Gabriel
3715a47067 chore: fix lint
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-05-30 21:35:33 +02:00
Gabriel
41798b718a extract @k8slens/icon
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-05-30 21:35:33 +02:00
Iku-turso
7a4f30ab61 chore: Add infra for linkable
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
2023-05-30 10:56:53 -04:00
Iku-turso
f02e09245b chore: Bump linkable to recover from yalc error
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
2023-05-30 10:56:53 -04:00
Jim Ehrismann
9f13931318
Temporary fix for extensions always disabled on startup (#7801)
Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
2023-05-30 10:24:27 -04:00
Sebastian Malton
5432259e05 fix: Fix build not working due to missing dependencies
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-29 09:38:24 -04:00
Sebastian Malton
8fd0b5fab4 chore: Move kubeApiInjectionToken into own package
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-29 09:38:24 -04:00
Sebastian Malton
711ad11bf1 chore: Revert kube-api-parse test changes
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-29 09:38:24 -04:00
Sami Tiilikainen
75beacfa7c Lint and dependency fix
Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>
2023-05-29 09:38:24 -04:00
Sami Tiilikainen
b7a636dd74 Add kube-object dependency to prevent duplicate instances
Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>
2023-05-29 09:38:24 -04:00
Sami Tiilikainen
d674680cbb Use lens-webpack-build to get linkable
Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>
2023-05-29 09:38:24 -04:00
Jari Kolehmainen
0298b36a9f chore: kube-api lint fixes
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2023-05-29 09:38:24 -04:00
Jari Kolehmainen
7b8bd1e758 chore: move kube-api related tests from core
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2023-05-29 09:38:24 -04:00
Jari Kolehmainen
e8be89eb51 chore: fix kube-api dependency to core
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2023-05-29 09:38:24 -04:00
Jari Kolehmainen
1ab5323f68 chore: extract kube-api from core
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2023-05-29 09:38:24 -04:00
Alex Andreev
a22229ba60 Linter fix
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2023-05-29 12:00:33 +03:00
Alex Andreev
26b8ed66da Reverting table injection tokens (7754)
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2023-05-29 12:00:33 +03:00
Sebastian Malton
79e4eaa394 Release 6.5.0
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-26 14:00:45 -04:00
Sebastian Malton
f9098bf639 feat: Support picking rebased PRs for patch releases
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-26 11:03:19 -04:00
Alex Andreev
1ffdb6c89f
Table component injection tokens (#7754)
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2023-05-26 13:32:25 +03:00
Sebastian Malton
4b63bc238e chore: Fix lens-webpack-build failing due to warnings
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-25 15:15:19 -04:00
Juho Heikka
208262a447 Fix helm chart rollback API address
Signed-off-by: Juho Heikka <juho.heikka@gmail.com>
2023-05-25 15:06:56 -04:00
Juho Heikka
6520f2d767 Add space to the Rollback dialog header
Signed-off-by: Juho Heikka <juho.heikka@gmail.com>
2023-05-25 15:06:56 -04:00
K8s Lens Bot
e493f982d2 Release 6.5.0-alpha.16
Signed-off-by: K8s Lens Bot <info@k8slens.dev>
2023-05-25 09:57:41 -04:00
Sebastian Malton
4e6b51e2ef chore: Rename KubeObject tests to better clarity
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-25 09:51:40 -04:00
Sebastian Malton
e7b030e2cd chore: Simplify KubeObject tests to use stub data
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-25 09:51:40 -04:00
Sebastian Malton
723e8452cf chore: Improve KubeObject tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-25 09:51:40 -04:00
Sebastian Malton
74cf677b1b chore: Fixup use of ServiceAccount to use getId
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-25 09:51:40 -04:00
Sebastian Malton
18b89d9a85 fix: Remove incorrect KubeObject validations
- Default to using the ensured selfLink for ID if UID is not present

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-25 09:51:40 -04:00
Sami Tiilikainen
90c449cc0d
fix: Handle log responses as text (#7776)
Signed-off-by: Sami Tiilikainen <97873007+samitiilikainen@users.noreply.github.com>
2023-05-25 09:23:18 -04:00
Janne Savolainen
738985c9b7 fix: Make application size not blow up by consolidating dependencies in core package to peerDependencies
"dependencies" are going to be added in the app.asar, which means that e.g. "electron" gets added.

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
2023-05-25 15:42:53 +03:00
Sebastian Malton
dd62e034b7 Release 6.5.0-alpha.15
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 15:33:41 -04:00
Sebastian Malton
597dd36580 fix: Fix setting milestone on new release PRs
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 15:20:19 -04:00
K8s Lens Bot
a8cf8e11f7 Release 6.5.0-alpha.14
Signed-off-by: K8s Lens Bot <info@k8slens.dev>
2023-05-23 14:52:41 -04:00
Gabriel
bffa39c5ba chore: rebuilt lock
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-05-23 14:17:18 -04:00
Gabriel
dbbb41eca7 chore: switch from latest to hat 9.6.7
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-05-23 14:17:18 -04:00
Gabriel
99b6af7246 chore: add engine hat
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-05-23 14:17:18 -04:00
Gabriel
6bf1544ddb chore: Support and switch to using ^9.6.7 version of NPM
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-05-23 14:17:18 -04:00
Sebastian Malton
84f6a6a5ac fix: Switch to using authenticated GitHub API to increase rate limit
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 13:21:07 -04:00
Sebastian Malton
ac0e384154 Release 6.5.0-alpha.14
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 11:34:49 -04:00
Sebastian Malton
8f4aa497cc Revert "chore: Extract sidebar item injection token into separate package"
This reverts commit 8ac66380ad.
2023-05-23 10:08:42 -04:00
Sebastian Malton
cb0e8764ac Revert "chore: Rename sidebar item injectable files"
This reverts commit 72a1e2aaa0.
2023-05-23 10:08:42 -04:00
Sebastian Malton
93bc41f9a3 Revert "chore: Convert sidebarItemInjectionToken to use InjectWithMetadata instead of duplicating the IDs"
This reverts commit 81293304a7.
2023-05-23 10:08:42 -04:00
Sebastian Malton
9276df0592 Revert "chore: Fixup tests snapshots to match new testid behaviour"
This reverts commit e6bef1a168.
2023-05-23 10:08:42 -04:00
Sebastian Malton
d90bdf6f14 Revert "chore: Fix lint"
This reverts commit 747f8cec94.
2023-05-23 10:08:42 -04:00
Sebastian Malton
813705fe90 Revert "chore: Fix more lint"
This reverts commit 83244ceefc.
2023-05-23 10:08:42 -04:00
Sebastian Malton
be1fbcf8c3 Revert "chore: Update integration tests to new testid format"
This reverts commit d2183cb975.
2023-05-23 10:08:42 -04:00
Sebastian Malton
753c8bfa85 Revert "chore: Fix IDs for some sidebar items"
This reverts commit a267c0ee7d.
2023-05-23 10:08:42 -04:00
Sebastian Malton
d4c12becfc Revert "chore: Improve title formatting for Horizontal/Vertical Pod Autoscalers"
This reverts commit d51ccb5dd5.
2023-05-23 10:08:42 -04:00
Sebastian Malton
5608a199be Revert "fix: Fix formatting of custom resource sidebar items"
This reverts commit 86dcbb10c0.
2023-05-23 10:08:42 -04:00
Sebastian Malton
96b7ecbadd Revert "chore: Fix integration tests failing due to helm testid's changing"
This reverts commit 6d4d331a41.
2023-05-23 10:08:42 -04:00
Sebastian Malton
1b43de50fe Revert "chore: Fix tests after rebase"
This reverts commit 58426370de.
2023-05-23 10:08:42 -04:00
Sebastian Malton
1099e65c52 Revert "fix: Custom Resource Definitions should be the first entry in the side bar"
This reverts commit a8ff6ce095.
2023-05-23 10:08:42 -04:00
Sebastian Malton
7d46cb845d Revert "fix: Custom Resource Definitions sidebar item should navigate to the correct route"
This reverts commit 897e289514.
2023-05-23 10:08:42 -04:00
Sebastian Malton
fda4b928d2 Revert "fix: The command pallet command for navigating to Custom Resource Definitions should navigate to the correct route"
This reverts commit 723cfe8ae8.
2023-05-23 10:08:42 -04:00
Sebastian Malton
40f1180579 Revert "chore: Cleanup custom resource route definition"
This reverts commit f65e5672b5.
2023-05-23 10:08:42 -04:00
Sebastian Malton
d3cf7088d6 Revert "chore: Factor out NavigateToCustomResources type"
This reverts commit 5ba2dbab81.
2023-05-23 10:08:42 -04:00
Sebastian Malton
5f4cdbc519 Revert "chore: Move around Custom Resource and Custom Resource Definition files to simplify names"
This reverts commit e0e2194b11.
2023-05-23 10:08:42 -04:00
Sebastian Malton
8960142342 Revert "chore: Update @orge-tools/* deps"
This reverts commit 015a585a84.
2023-05-23 10:08:42 -04:00
Jari Kolehmainen
ec9a68bf09 fix: wrong order of ids when sendToFrame is called
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2023-05-23 08:28:10 -04:00
Sebastian Malton
015a585a84 chore: Update @orge-tools/* deps
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
e0e2194b11 chore: Move around Custom Resource and Custom Resource Definition files to simplify names
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
5ba2dbab81 chore: Factor out NavigateToCustomResources type
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
f65e5672b5 chore: Cleanup custom resource route definition
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
723cfe8ae8 fix: The command pallet command for navigating to Custom Resource Definitions should navigate to the correct route
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
897e289514 fix: Custom Resource Definitions sidebar item should navigate to the correct route
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
a8ff6ce095 fix: Custom Resource Definitions should be the first entry in the side bar
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
58426370de chore: Fix tests after rebase
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
6d4d331a41 chore: Fix integration tests failing due to helm testid's changing
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
86dcbb10c0 fix: Fix formatting of custom resource sidebar items
- The titles should better handle being line wrapped

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
d51ccb5dd5 chore: Improve title formatting for Horizontal/Vertical Pod Autoscalers
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
a267c0ee7d chore: Fix IDs for some sidebar items
- Also cleanup formatting of the sidebar item titles

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
d2183cb975 chore: Update integration tests to new testid format
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
83244ceefc chore: Fix more lint
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
747f8cec94 chore: Fix lint
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
e6bef1a168 chore: Fixup tests snapshots to match new testid behaviour
- Move order-of-sidebar-items to the new package
- Fix the extension sidebar item registrator

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
81293304a7 chore: Convert sidebarItemInjectionToken to use InjectWithMetadata instead of duplicating the IDs
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
72a1e2aaa0 chore: Rename sidebar item injectable files
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
8ac66380ad chore: Extract sidebar item injection token into separate package
- Add unit tests to cover custom resources sidebar items

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:46:02 +02:00
Sebastian Malton
add1a0a39e chore: Remove previous daily alpha when trying to create a new one
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:29:13 +02:00
Sebastian Malton
99e6b77fc1 fix: Use correct path for node-shell shell PTY
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-23 10:19:49 +02:00
Sebastian Malton
a20a1eade1 chore: Bumps [electron](https://github.com/electron/electron) from 22.3.7 to 22.3.10
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](electron/electron@v22.3.7...v22.3.10)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-19 15:45:20 -04:00
Sebastian Malton
00f0b9fce4 fix: Remove erroneous prefixes when using loggerInjectable and prefixLoggerInjectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2023-05-19 14:19:50 -04:00
Gabriel
32a6179681 chore: switch back to arm64
Signed-off-by: Gabriel <gaccettola@mirantis.com>
2023-05-17 08:09:59 -04:00
Alex Andreev
2dfb5c00f7
Replace StatusBar bgcolor from --colorInfo to --primary (#7738)
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
2023-05-17 14:26:13 +03:00
Iku-turso
fc641b3838 chore: Update package-lock.json
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
2023-05-17 11:55:05 +03:00
Iku-turso
1b5145bac3 chore: Deprecate obsolete ways to log
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
2023-05-17 11:55:05 +03:00
Iku-turso
62a76d05ab chore: Consolidate to using a shared NPM-script
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
2023-05-17 11:55:05 +03:00
Iku-turso
f9e5f9bf43 feat: Implement automatic Feature-specific prefixing for logging
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
2023-05-17 11:55:05 +03:00
Iku-turso
2e4aba735f chore: Bump ogre-tools to permit Feature-specific logging prefixes
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
2023-05-17 11:55:05 +03:00
Iku-turso
f7b77c781d feat: Expose different ways to log as tokens, and add unit tests
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
2023-05-17 11:55:05 +03:00
1032 changed files with 33467 additions and 27697 deletions

View File

@ -23,7 +23,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install specific npm version
run: npm install -g npm@^9.6.5
run: npm install -g npm@^9.6.7
- name: Generate Extensions API Reference using typedocs
run: |

View File

@ -28,7 +28,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install specific npm version
run: npm install -g npm@^9.6.5
run: npm install -g npm@^9.6.7
- name: Get npm cache directory path
if: ${{ runner.os != 'Windows' }}

View File

@ -19,7 +19,7 @@ jobs:
registry-url: "https://npm.pkg.github.com"
- name: Install specific npm version
run: npm install -g npm@^9.6.5
run: npm install -g npm@^9.6.7
- name: Install deps
run: |

View File

@ -23,7 +23,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install specific npm version
run: npm install -g npm@^9.6.5
run: npm install -g npm@^9.6.7
- name: Install deps
run: npm install

View File

@ -36,7 +36,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install specific npm version
run: npm install -g npm@^9.6.5
run: npm install -g npm@^9.6.7
- name: Generate Extensions API Reference using typedocs
run: |

View File

@ -33,7 +33,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install specific npm version
run: npm install -g npm@^9.6.5
run: npm install -g npm@^9.6.7
- name: Generate Extensions API Reference using typedocs
run: |
@ -79,7 +79,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install specific npm version
run: npm install -g npm@^9.6.5
run: npm install -g npm@^9.6.7
- name: Generate Extensions API Reference using typedocs
run: |

View File

@ -31,7 +31,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install specific npm version
run: npm install -g npm@^9.6.5
run: npm install -g npm@^9.6.7
- name: Generate NPM packages
run: |

View File

@ -35,7 +35,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install specific npm version
run: npm install -g npm@^9.6.5
run: npm install -g npm@^9.6.7
- name: Get npm cache directory path
if: ${{ runner.os != 'Windows' }}
@ -105,7 +105,7 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Install specific npm version
run: npm install -g npm@^9.6.5
run: npm install -g npm@^9.6.7
- name: Get npm cache directory path
if: ${{ runner.os != 'Windows' }}

3
.gitignore vendored
View File

@ -9,3 +9,6 @@ lerna-debug.log
coverage
dist
node_modules
.linkable.json
yalc.lock
.yalc

View File

@ -1,3 +1,3 @@
# Contributing to Lens
See [Contributing to Lens](https://docs.k8slens.dev/contributing/) documentation.
See [Contributing to Lens](https://docs.k8slens.dev/contributing/contribute-to-lens/) documentation.

View File

@ -3,6 +3,188 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# 6.5.0 (2023-05-26)
# 6.5.0-alpha.16 (2023-05-25)
### Bug Fixes
* Make application size not blow up by consolidating dependencies in core package to peerDependencies ([738985c](https://github.com/lensapp/lens/commit/738985c9b7406ef0722c3994c560f0337e3c5b7c))
# 6.5.0-alpha.15 (2023-05-23)
# 6.5.0-alpha.14 (2023-05-23)
### Reverts
* Revert "chore: Extract sidebar item injection token into separate package" ([8f4aa49](https://github.com/lensapp/lens/commit/8f4aa497cc54655f83813d57c224f77dd1472141))
* Revert "chore: Update integration tests to new testid format" ([be1fbcf](https://github.com/lensapp/lens/commit/be1fbcf8c3642fbf5a5ee06c3b03ac1756e4b1dd))
* Revert "chore: Improve title formatting for Horizontal/Vertical Pod Autoscalers" ([d4c12be](https://github.com/lensapp/lens/commit/d4c12becfc9020009d64f48e4c8f9dd3b7725bb6))
* Revert "chore: Fix integration tests failing due to helm testid's changing" ([96b7ecb](https://github.com/lensapp/lens/commit/96b7ecbaddedd45cc667cc2d6c25fdc0813557ec))
# 6.5.0-alpha.13 (2023-05-16)
### Bug Fixes
* Copy fonts from @k8slens/core to open-lens correctly ([33a9f3e](https://github.com/lensapp/lens/commit/33a9f3ea3501c04738c8d74b82725bbe83e148bb))
# 6.5.0-alpha.12 (2023-05-16)
# 6.5.0-alpha.11 (2023-05-11)
### Bug Fixes
* Add missing styles to fix terminal resizing ([6902851](https://github.com/lensapp/lens/commit/6902851026e74428f515fc5f3e01e6dc8a4c2d50))
# 6.5.0-alpha.17 (2023-05-25)
### Bug Fixes
* Make application size not blow up by consolidating dependencies in core package to peerDependencies ([738985c](https://github.com/lensapp/lens/commit/738985c9b7406ef0722c3994c560f0337e3c5b7c))
# 6.5.0-alpha.15 (2023-05-23)
# 6.5.0-alpha.14 (2023-05-23)
### Reverts
* Revert "chore: Extract sidebar item injection token into separate package" ([8f4aa49](https://github.com/lensapp/lens/commit/8f4aa497cc54655f83813d57c224f77dd1472141))
* Revert "chore: Update integration tests to new testid format" ([be1fbcf](https://github.com/lensapp/lens/commit/be1fbcf8c3642fbf5a5ee06c3b03ac1756e4b1dd))
* Revert "chore: Improve title formatting for Horizontal/Vertical Pod Autoscalers" ([d4c12be](https://github.com/lensapp/lens/commit/d4c12becfc9020009d64f48e4c8f9dd3b7725bb6))
* Revert "chore: Fix integration tests failing due to helm testid's changing" ([96b7ecb](https://github.com/lensapp/lens/commit/96b7ecbaddedd45cc667cc2d6c25fdc0813557ec))
# 6.5.0-alpha.13 (2023-05-16)
### Bug Fixes
* Copy fonts from @k8slens/core to open-lens correctly ([33a9f3e](https://github.com/lensapp/lens/commit/33a9f3ea3501c04738c8d74b82725bbe83e148bb))
# 6.5.0-alpha.12 (2023-05-16)
# 6.5.0-alpha.11 (2023-05-11)
### Bug Fixes
* Add missing styles to fix terminal resizing ([6902851](https://github.com/lensapp/lens/commit/6902851026e74428f515fc5f3e01e6dc8a4c2d50))
# 6.5.0-alpha.16 (2023-05-23)
# 6.5.0-alpha.14 (2023-05-23)
### Reverts
* Revert "chore: Extract sidebar item injection token into separate package" ([8f4aa49](https://github.com/lensapp/lens/commit/8f4aa497cc54655f83813d57c224f77dd1472141))
* Revert "chore: Update integration tests to new testid format" ([be1fbcf](https://github.com/lensapp/lens/commit/be1fbcf8c3642fbf5a5ee06c3b03ac1756e4b1dd))
* Revert "chore: Improve title formatting for Horizontal/Vertical Pod Autoscalers" ([d4c12be](https://github.com/lensapp/lens/commit/d4c12becfc9020009d64f48e4c8f9dd3b7725bb6))
* Revert "chore: Fix integration tests failing due to helm testid's changing" ([96b7ecb](https://github.com/lensapp/lens/commit/96b7ecbaddedd45cc667cc2d6c25fdc0813557ec))
# 6.5.0-alpha.13 (2023-05-16)
### Bug Fixes
* Copy fonts from @k8slens/core to open-lens correctly ([33a9f3e](https://github.com/lensapp/lens/commit/33a9f3ea3501c04738c8d74b82725bbe83e148bb))
# 6.5.0-alpha.12 (2023-05-16)
# 6.5.0-alpha.11 (2023-05-11)
### Bug Fixes
* Add missing styles to fix terminal resizing ([6902851](https://github.com/lensapp/lens/commit/6902851026e74428f515fc5f3e01e6dc8a4c2d50))
# 6.5.0-alpha.15 (2023-05-23)
# 6.5.0-alpha.14 (2023-05-23)
### Reverts
* Revert "chore: Extract sidebar item injection token into separate package" ([8f4aa49](https://github.com/lensapp/lens/commit/8f4aa497cc54655f83813d57c224f77dd1472141))
* Revert "chore: Update integration tests to new testid format" ([be1fbcf](https://github.com/lensapp/lens/commit/be1fbcf8c3642fbf5a5ee06c3b03ac1756e4b1dd))
* Revert "chore: Improve title formatting for Horizontal/Vertical Pod Autoscalers" ([d4c12be](https://github.com/lensapp/lens/commit/d4c12becfc9020009d64f48e4c8f9dd3b7725bb6))
* Revert "chore: Fix integration tests failing due to helm testid's changing" ([96b7ecb](https://github.com/lensapp/lens/commit/96b7ecbaddedd45cc667cc2d6c25fdc0813557ec))
# 6.5.0-alpha.13 (2023-05-16)
### Bug Fixes
* Copy fonts from @k8slens/core to open-lens correctly ([33a9f3e](https://github.com/lensapp/lens/commit/33a9f3ea3501c04738c8d74b82725bbe83e148bb))
# 6.5.0-alpha.12 (2023-05-16)
# 6.5.0-alpha.11 (2023-05-11)
### Bug Fixes
* Add missing styles to fix terminal resizing ([6902851](https://github.com/lensapp/lens/commit/6902851026e74428f515fc5f3e01e6dc8a4c2d50))
# 6.5.0-alpha.13 (2023-05-16)

View File

@ -2,7 +2,7 @@
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
const { notarize } = require("electron-notarize");
const { notarize } = require("@electron/notarize");
exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
@ -22,6 +22,8 @@ exports.default = async function notarizing(context) {
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS,
ascProvider:process.env.ASCPROVIDER,
ascProvider: process.env.ASCPROVIDER,
teamId: process.env.APPLETEAMID,
tool: process.env.NOTARIZE_TOOL || "legacy",
});
};

View File

@ -172,219 +172,219 @@ const scenarios = [
{
expectedSelector: "div[data-testid='cluster-overview-page'] div.label",
parentSidebarItemTestId: null,
sidebarItemTestId: "sidebar-item-link-for-cluster-overview",
sidebarItemTestId: "link-for-sidebar-item-cluster-overview",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: null,
sidebarItemTestId: "sidebar-item-link-for-nodes",
sidebarItemTestId: "link-for-sidebar-item-nodes",
},
{
expectedSelector: 'h5 >> text="Overview"',
parentSidebarItemTestId: "sidebar-item-link-for-workloads",
sidebarItemTestId: "sidebar-item-link-for-overview",
parentSidebarItemTestId: "link-for-sidebar-item-workloads",
sidebarItemTestId: "link-for-sidebar-item-workloads-overview",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-workloads",
sidebarItemTestId: "sidebar-item-link-for-pods",
parentSidebarItemTestId: "link-for-sidebar-item-workloads",
sidebarItemTestId: "link-for-sidebar-item-pods",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-workloads",
sidebarItemTestId: "sidebar-item-link-for-deployments",
parentSidebarItemTestId: "link-for-sidebar-item-workloads",
sidebarItemTestId: "link-for-sidebar-item-deployments",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-workloads",
sidebarItemTestId: "sidebar-item-link-for-daemon-sets",
parentSidebarItemTestId: "link-for-sidebar-item-workloads",
sidebarItemTestId: "link-for-sidebar-item-daemon-sets",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-workloads",
sidebarItemTestId: "sidebar-item-link-for-stateful-sets",
parentSidebarItemTestId: "link-for-sidebar-item-workloads",
sidebarItemTestId: "link-for-sidebar-item-stateful-sets",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-workloads",
sidebarItemTestId: "sidebar-item-link-for-replica-sets",
parentSidebarItemTestId: "link-for-sidebar-item-workloads",
sidebarItemTestId: "link-for-sidebar-item-replica-sets",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-workloads",
sidebarItemTestId: "sidebar-item-link-for-jobs",
parentSidebarItemTestId: "link-for-sidebar-item-workloads",
sidebarItemTestId: "link-for-sidebar-item-jobs",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-workloads",
sidebarItemTestId: "sidebar-item-link-for-cron-jobs",
parentSidebarItemTestId: "link-for-sidebar-item-workloads",
sidebarItemTestId: "link-for-sidebar-item-cron-jobs",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-config",
sidebarItemTestId: "sidebar-item-link-for-config-maps",
parentSidebarItemTestId: "link-for-sidebar-item-config",
sidebarItemTestId: "link-for-sidebar-item-config-maps",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-config",
sidebarItemTestId: "sidebar-item-link-for-secrets",
parentSidebarItemTestId: "link-for-sidebar-item-config",
sidebarItemTestId: "link-for-sidebar-item-secrets",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-config",
sidebarItemTestId: "sidebar-item-link-for-resource-quotas",
parentSidebarItemTestId: "link-for-sidebar-item-config",
sidebarItemTestId: "link-for-sidebar-item-resource-quotas",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-config",
sidebarItemTestId: "sidebar-item-link-for-limit-ranges",
parentSidebarItemTestId: "link-for-sidebar-item-config",
sidebarItemTestId: "link-for-sidebar-item-limit-ranges",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-config",
sidebarItemTestId: "sidebar-item-link-for-horizontal-pod-auto-scalers",
parentSidebarItemTestId: "link-for-sidebar-item-config",
sidebarItemTestId: "link-for-sidebar-item-horizontal-pod-autoscalers",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-config",
sidebarItemTestId: "sidebar-item-link-for-pod-disruption-budgets",
parentSidebarItemTestId: "link-for-sidebar-item-config",
sidebarItemTestId: "link-for-sidebar-item-pod-disruption-budgets",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-network",
sidebarItemTestId: "sidebar-item-link-for-services",
parentSidebarItemTestId: "link-for-sidebar-item-network",
sidebarItemTestId: "link-for-sidebar-item-services",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-network",
sidebarItemTestId: "sidebar-item-link-for-endpoints",
parentSidebarItemTestId: "link-for-sidebar-item-network",
sidebarItemTestId: "link-for-sidebar-item-endpoints",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-network",
sidebarItemTestId: "sidebar-item-link-for-ingresses",
parentSidebarItemTestId: "link-for-sidebar-item-network",
sidebarItemTestId: "link-for-sidebar-item-ingresses",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-network",
sidebarItemTestId: "sidebar-item-link-for-network-policies",
parentSidebarItemTestId: "link-for-sidebar-item-network",
sidebarItemTestId: "link-for-sidebar-item-network-policies",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-storage",
sidebarItemTestId: "sidebar-item-link-for-persistent-volume-claims",
parentSidebarItemTestId: "link-for-sidebar-item-storage",
sidebarItemTestId: "link-for-sidebar-item-persistent-volume-claims",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-storage",
sidebarItemTestId: "sidebar-item-link-for-persistent-volumes",
parentSidebarItemTestId: "link-for-sidebar-item-storage",
sidebarItemTestId: "link-for-sidebar-item-persistent-volumes",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-storage",
sidebarItemTestId: "sidebar-item-link-for-storage-classes",
parentSidebarItemTestId: "link-for-sidebar-item-storage",
sidebarItemTestId: "link-for-sidebar-item-storage-classes",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: null,
sidebarItemTestId: "sidebar-item-link-for-namespaces",
sidebarItemTestId: "link-for-sidebar-item-namespaces",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: null,
sidebarItemTestId: "sidebar-item-link-for-events",
sidebarItemTestId: "link-for-sidebar-item-events",
},
{
expectedSelector: "div.HelmCharts input",
parentSidebarItemTestId: "sidebar-item-link-for-helm",
sidebarItemTestId: "sidebar-item-link-for-charts",
parentSidebarItemTestId: "link-for-sidebar-item-helm",
sidebarItemTestId: "link-for-sidebar-item-helm-charts",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-helm",
sidebarItemTestId: "sidebar-item-link-for-releases",
parentSidebarItemTestId: "link-for-sidebar-item-helm",
sidebarItemTestId: "link-for-sidebar-item-helm-releases",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-user-management",
sidebarItemTestId: "sidebar-item-link-for-service-accounts",
parentSidebarItemTestId: "link-for-sidebar-item-user-management",
sidebarItemTestId: "link-for-sidebar-item-service-accounts",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-user-management",
sidebarItemTestId: "sidebar-item-link-for-cluster-roles",
parentSidebarItemTestId: "link-for-sidebar-item-user-management",
sidebarItemTestId: "link-for-sidebar-item-cluster-roles",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-user-management",
sidebarItemTestId: "sidebar-item-link-for-roles",
parentSidebarItemTestId: "link-for-sidebar-item-user-management",
sidebarItemTestId: "link-for-sidebar-item-roles",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-user-management",
sidebarItemTestId: "sidebar-item-link-for-cluster-role-bindings",
parentSidebarItemTestId: "link-for-sidebar-item-user-management",
sidebarItemTestId: "link-for-sidebar-item-cluster-role-bindings",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-user-management",
sidebarItemTestId: "sidebar-item-link-for-role-bindings",
parentSidebarItemTestId: "link-for-sidebar-item-user-management",
sidebarItemTestId: "link-for-sidebar-item-role-bindings",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: null,
sidebarItemTestId: "sidebar-item-link-for-custom-resources",
sidebarItemTestId: "link-for-sidebar-item-custom-resources",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-config",
sidebarItemTestId: "sidebar-item-link-for-validating-webhook-configurations",
parentSidebarItemTestId: "link-for-sidebar-item-config",
sidebarItemTestId: "link-for-sidebar-item-validating-webhook-configurations",
},
{
expectedSelector: "h5.title",
parentSidebarItemTestId: "sidebar-item-link-for-config",
sidebarItemTestId: "sidebar-item-link-for-mutating-webhook-configurations",
parentSidebarItemTestId: "link-for-sidebar-item-config",
sidebarItemTestId: "link-for-sidebar-item-mutating-webhook-configurations",
},
];
const navigateToPods = async (frame: Frame) => {
await frame.click(`[data-testid="sidebar-item-link-for-workloads"]`);
await frame.click(`[data-testid="sidebar-item-link-for-pods"]`);
await frame.click(`[data-testid="link-for-sidebar-item-workloads"]`);
await frame.click(`[data-testid="link-for-sidebar-item-pods"]`);
};
const navigateToNamespaces = async (frame: Frame) => {
await frame.click(`[data-testid="sidebar-item-link-for-namespaces"]`);
await frame.click(`[data-testid="link-for-sidebar-item-namespaces"]`);
};

View File

@ -4,7 +4,7 @@
"productName": "OpenLens",
"description": "OpenLens - Open Source IDE for Kubernetes",
"homepage": "https://github.com/lensapp/lens",
"version": "6.5.0-alpha.13",
"version": "6.5.0",
"repository": {
"type": "git",
"url": "git+https://github.com/lensapp/lens.git"
@ -30,7 +30,7 @@
"dev:main": "cross-env NODE_ENV=development webpack --config webpack/main.ts --progress --watch",
"dev:renderer": "cross-env NODE_ENV=development ts-node ./webpack/dev-server.ts",
"test:integration": "jest -xyz --runInBand --modulePaths=[\"<rootDir>/integration/\"];",
"build:tray-icons": "npm run --workspace @k8slens/generate-tray-icons generate -- --output static/build/tray --input @k8slens/core/icons/logo-lens.svg --notice-icon @k8slens/core/icons/notice.svg --spinner-icon @k8slens/core/icons/arrow-spinner.svg",
"build:tray-icons": "npm run --workspace @k8slens/generate-tray-icons generate -- --output static/build/tray --input @k8slens/icon/icons/logo-lens.svg --notice-icon @k8slens/icon/icons/notice.svg --spinner-icon @k8slens/icon/icons/arrow-spinner.svg",
"download:binaries": "npm run --workspace @k8slens/ensure-binaries ensure -- --package package.json --base-dir binaries/client",
"postinstall": "electron-rebuild"
},
@ -177,39 +177,132 @@
}
},
"dependencies": {
"@k8slens/application": "^6.5.0-alpha.8",
"@k8slens/application-for-electron-main": "^6.5.0-alpha.7",
"@k8slens/core": "^6.5.0-alpha.13",
"@k8slens/ensure-binaries": "^6.5.0-alpha.6",
"@k8slens/event-emitter": "^1.0.0-alpha.5",
"@k8slens/feature-core": "^6.5.0-alpha.7",
"@k8slens/keyboard-shortcuts": "^1.0.0-alpha.7",
"@k8slens/kube-object": "^1.0.0-alpha.5",
"@k8slens/kubectl-versions": "^1.0.0-alpha.6",
"@k8slens/legacy-extension-example": "^1.0.0-alpha.11",
"@k8slens/legacy-extensions": "^1.0.0-alpha.7",
"@k8slens/legacy-global-di": "^1.0.0-alpha.4",
"@k8slens/logger": "^1.0.0-alpha.6",
"@k8slens/messaging": "^1.0.0-alpha.7",
"@k8slens/messaging-for-main": "^1.0.0-alpha.7",
"@k8slens/messaging-for-renderer": "^1.0.0-alpha.7",
"@k8slens/node-fetch": "^6.5.0-alpha.3",
"@k8slens/react-application": "^1.0.0-alpha.6",
"@k8slens/resizing-anchor": "^1.0.0-alpha.9",
"@k8slens/run-many": "^1.0.0-alpha.7",
"@k8slens/startable-stoppable": "^1.0.0-alpha.6",
"@k8slens/utilities": "^1.0.0-alpha.6",
"@ogre-tools/fp": "^15.8.1",
"@ogre-tools/injectable": "^15.8.1",
"@ogre-tools/injectable-extension-for-auto-registration": "^15.8.1",
"@ogre-tools/injectable-extension-for-mobx": "^15.8.1",
"@ogre-tools/injectable-react": "^15.8.1",
"mobx": "^6.9.0"
"@astronautlabs/jsonpath": "^1.1.0",
"@hapi/call": "^9.0.1",
"@hapi/subtext": "^7.1.0",
"@k8slens/application": "^6.5.0",
"@k8slens/application-for-electron-main": "^6.5.0",
"@k8slens/button": "^1.0.0",
"@k8slens/cluster-settings": "^6.5.0",
"@k8slens/cluster-sidebar": "^1.0.0",
"@k8slens/core": "^6.5.0",
"@k8slens/ensure-binaries": "^6.5.0",
"@k8slens/error-boundary": "^1.0.0",
"@k8slens/event-emitter": "^1.0.0",
"@k8slens/feature-core": "^6.5.0",
"@k8slens/json-api": "^1.0.0-alpha.3",
"@k8slens/keyboard-shortcuts": "^1.0.0",
"@k8slens/kube-api": "^1.0.0-alpha.1",
"@k8slens/kube-api-specifics": "^1.0.0",
"@k8slens/kube-object": "^1.0.0",
"@k8slens/kubectl-versions": "^1.0.0",
"@k8slens/legacy-extension-example": "^1.0.0",
"@k8slens/legacy-extensions": "^1.0.0",
"@k8slens/legacy-global-di": "^1.0.0",
"@k8slens/list-layout": "^1.0.0",
"@k8slens/logger": "^1.0.0",
"@k8slens/messaging": "^1.0.0",
"@k8slens/messaging-for-main": "^1.0.0",
"@k8slens/messaging-for-renderer": "^1.0.0",
"@k8slens/metrics": "^6.5.0",
"@k8slens/node-fetch": "^6.5.0",
"@k8slens/prometheus": "^1.0.0",
"@k8slens/random": "^1.0.0",
"@k8slens/react-application": "^1.0.0",
"@k8slens/resizing-anchor": "^1.0.0",
"@k8slens/resource-templates": "^1.0.0",
"@k8slens/routing": "^1.0.0",
"@k8slens/run-many": "^1.0.0",
"@k8slens/startable-stoppable": "^1.0.0",
"@k8slens/tooltip": "^1.0.0",
"@k8slens/utilities": "^1.0.0",
"@kubernetes/client-node": "^0.18.1",
"@material-ui/core": "^4.12.3",
"@material-ui/lab": "^4.0.0-alpha.60",
"@ogre-tools/fp": "^17.2.0",
"@ogre-tools/injectable": "^17.2.0",
"@ogre-tools/injectable-extension-for-auto-registration": "^17.2.0",
"@ogre-tools/injectable-extension-for-mobx": "^17.2.0",
"@ogre-tools/injectable-react": "^17.2.0",
"@sentry/electron": "^3.0.8",
"@sentry/integrations": "^6.19.3",
"ansi_up": "^5.2.1",
"auto-bind": "^4.0.0",
"await-lock": "^2.2.2",
"byline": "^5.0.0",
"chalk": "^4.1.2",
"chart.js": "^2.9.4",
"chokidar": "^3.5.3",
"color": "^3.2.1",
"conf": "^10.2.0",
"crypto-js": "^4.1.1",
"dompurify": "^2.4.4",
"electron-devtools-installer": "^3.2.0",
"electron-updater": "^4.6.5",
"electron-window-state": "^5.0.3",
"fs-extra": "^9.0.1",
"glob-to-regexp": "^0.4.1",
"grapheme-splitter": "^1.0.4",
"handlebars": "^4.7.7",
"history": "^4.10.1",
"hpagent": "^1.2.0",
"http-proxy": "^1.18.1",
"immer": "^9.0.21",
"joi": "^17.9.1",
"js-yaml": "^4.1.0",
"lodash": "^4.17.15",
"marked": "^4.2.12",
"mobx": "^6.9.0",
"mobx-observable-history": "^2.0.3",
"mobx-react": "^7.6.0",
"mobx-utils": "^6.0.4",
"moment": "^2.29.4",
"moment-timezone": "^0.5.40",
"monaco-editor": "^0.38.0",
"node-pty": "0.10.1",
"npm": "^9.6.7",
"p-limit": "^3.1.0",
"path-to-regexp": "^6.2.0",
"proper-lockfile": "^4.1.2",
"query-string": "^7.1.3",
"randomcolor": "^0.6.2",
"react": "^17.0.2",
"react-beautiful-dnd": "^13.1.1",
"react-dom": "^17.0.2",
"react-material-ui-carousel": "^2.3.11",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4",
"react-select": "^5.7.0",
"react-select-event": "^5.5.1",
"react-table": "^7.8.0",
"react-virtualized-auto-sizer": "^1.0.7",
"react-window": "^1.8.8",
"readable-stream": "^3.6.2",
"rfc6902": "^5.0.1",
"selfsigned": "^2.1.1",
"semver": "^7.3.8",
"stoppable": "^1.1.0",
"tar": "^6.1.13",
"tcp-port-used": "^1.0.2",
"tempy": "1.0.1",
"type-fest": "^2.14.0",
"typed-emitter": "^1.4.0",
"typed-regex": "^0.0.8",
"url-parse": "^1.5.10",
"uuid": "^8.3.2",
"win-ca": "^3.5.0",
"winston": "^3.8.2",
"winston-transport-browserconsole": "^1.0.5",
"ws": "^8.12.1",
"xterm": "^4.19.0",
"xterm-addon-fit": "^0.5.0",
"xterm-link-provider": "^1.3.1"
},
"devDependencies": {
"@electron/notarize": "^1.2.3",
"@electron/rebuild": "^3.2.10",
"@k8slens/generate-tray-icons": "^6.5.0-alpha.7",
"@k8slens/test-utils": "^1.0.0-alpha.7",
"@k8slens/generate-tray-icons": "^6.5.0",
"@k8slens/test-utils": "^1.0.0",
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
"@swc/cli": "^0.1.62",
"@swc/core": "^1.3.53",
@ -238,8 +331,8 @@
"copy-webpack-plugin": "^11.0.0",
"cross-env": "^7.0.3",
"css-loader": "^6.7.2",
"electron": "^22.3.10",
"electron-builder": "^23.6.0",
"electron-notarize": "^0.3.0",
"esbuild-loader": "^2.20.0",
"fork-ts-checker-webpack-plugin": "^7.3.0",
"html-webpack-plugin": "^5.5.1",

View File

@ -12,6 +12,9 @@ import { applicationFeature, startApplicationInjectionToken } from '@k8slens/app
import { applicationFeatureForElectronMain } from '@k8slens/application-for-electron-main'
import { messagingFeatureForMain } from "@k8slens/messaging-for-main";
import { loggerFeature } from "@k8slens/logger";
import { randomFeature } from "@k8slens/random";
import { kubeApiSpecificsFeature } from "@k8slens/kube-api-specifics";
import { prometheusFeature } from "@k8slens/prometheus";
const environment = "main";
@ -24,14 +27,15 @@ registerMobX(di);
runInAction(() => {
registerLensCore(di, environment);
registerFeature(di,
registerFeature(
di,
loggerFeature,
);
registerFeature(di,
prometheusFeature,
applicationFeature,
applicationFeatureForElectronMain,
messagingFeatureForMain,
randomFeature,
kubeApiSpecificsFeature,
);
try {

View File

@ -3,13 +3,17 @@ import "@k8slens/button/styles";
import "@k8slens/error-boundary/styles";
import "@k8slens/tooltip/styles";
import "@k8slens/resizing-anchor/styles";
import "@k8slens/icon/styles";
import "@k8slens/animate/styles";
import "@k8slens/notifications/styles";
import "@k8slens/spinner/styles";
import { runInAction } from "mobx";
import {
rendererExtensionApi as Renderer,
commonExtensionApi as Common,
registerLensCore,
metricsFeature
metricsFeature,
} from "@k8slens/core/renderer";
import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration";
import { registerFeature } from "@k8slens/feature-core";
@ -25,6 +29,11 @@ import { keyboardShortcutsFeature } from "@k8slens/keyboard-shortcuts";
import { reactApplicationFeature } from "@k8slens/react-application";
import { routingFeature } from "@k8slens/routing";
import { loggerFeature } from "@k8slens/logger";
import { animateFeature } from "@k8slens/animate";
import { clusterSidebarFeature } from "@k8slens/cluster-sidebar";
import { randomFeature } from "@k8slens/random";
import { kubeApiSpecificsFeature } from "@k8slens/kube-api-specifics";
import { notificationsFeature } from "@k8slens/notifications";
const environment = "renderer";
@ -49,7 +58,12 @@ runInAction(() => {
keyboardShortcutsFeature,
reactApplicationFeature,
routingFeature,
metricsFeature
metricsFeature,
animateFeature,
clusterSidebarFeature,
randomFeature,
kubeApiSpecificsFeature,
notificationsFeature,
);
autoRegister({

4980
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,13 @@
{
"name": "lens-monorepo",
"private": true,
"workspaces": [
"packages/**/*",
"open-lens"
],
"scripts": {
"all:reinstall": "npm run clean:node_modules && npm run all:install",
"all:install": "npx --yes --package npm@9.6.5 npm install",
"all:install": "npx --yes --package npm@^9.6.7 npm install",
"adr:create": "echo \"What is the title?\"; read title; adr new \"$title\"",
"adr:change-status": "echo \"Decision number?:\"; read decision; adr status $decision",
"adr:update-readme": "adr update",
@ -23,11 +21,13 @@
"postdev": "lerna watch -- lerna run build --stream --include-dependents --scope \\$LERNA_PACKAGE_NAME",
"prestart-dev": "cd ./open-lens && npm run build:tray-icons && npm run download:binaries",
"start-dev": "lerna run start",
"postinstall": "linkable",
"lint": "lerna run lint --stream --no-bail",
"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",
"mkdocs:verify": "docker build -t mkdocs-serve-local:latest mkdocs/ && docker run --rm -v ${PWD}:/docs mkdocs-serve-local:latest build --strict",
"test:unit": "lerna run --stream test:unit --no-bail",
"test:unit:updatesnapshot": "lerna run --stream test:unit --no-bail -- -u",
"test:unit:watch": "jest --watch",
"test:integration": "lerna run --stream test:integration --no-bail",
"bump-version": "lerna version --no-git-tag-version --no-push",
@ -40,13 +40,14 @@
"@types/react": "^17"
},
"devDependencies": {
"@ogre-tools/linkable": "^15.8.1",
"@ogre-tools/linkable": "^17.2.0",
"adr": "^1.4.3",
"cross-env": "^7.0.3",
"lerna": "^6.6.1",
"npm": "^9.6.7",
"rimraf": "^4.4.1"
},
"engines": {
"npm": "^9.6.5"
"npm": "^9.6.7"
}
}

View File

@ -3,6 +3,45 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# 1.0.0 (2023-05-26)
# 6.5.0-alpha.14 (2023-05-23)
# 6.5.0-alpha.13 (2023-05-16)
# 6.5.0-alpha.12 (2023-05-16)
### Bug Fixes
* Don't crash when hovering hotbar menu index ([9d51ef2](https://github.com/lensapp/lens/commit/9d51ef2aa69c6c9df0fd57281b25131a10efd27a))
# 6.5.0-alpha.11 (2023-05-11)
# 6.5.0-alpha.9 (2023-05-04)
# 6.5.0-alpha.5 (2023-04-12)
# 6.5.0-alpha.4 (2023-04-12)
# 1.0.0-alpha.7 (2023-05-16)

View File

@ -1,7 +1,7 @@
{
"name": "@k8slens/keyboard-shortcuts",
"private": false,
"version": "1.0.0-alpha.7",
"version": "1.0.0",
"description": "Keyboard shortcuts for Lens",
"type": "commonjs",
"files": [
@ -33,17 +33,17 @@
"peerDependencies": {
"@k8slens/feature-core": "^6.5.0-alpha.0",
"@k8slens/react-application": "^1.0.0-alpha.0",
"@ogre-tools/fp": "^15.8.1",
"@ogre-tools/injectable": "^15.8.1",
"@ogre-tools/injectable-extension-for-auto-registration": "^15.8.1",
"@ogre-tools/injectable-react": "^15.8.1",
"@ogre-tools/fp": "^17.2.0",
"@ogre-tools/injectable": "^17.2.0",
"@ogre-tools/injectable-extension-for-auto-registration": "^17.2.0",
"@ogre-tools/injectable-react": "^17.2.0",
"lodash": "^4.17.21",
"react": "^17 || ^18"
},
"devDependencies": {
"@async-fn/jest": "^1.6.4",
"@k8slens/eslint-config": "^6.5.0-alpha.3",
"@k8slens/react-testing-library-discovery": "^1.0.0-alpha.4",
"@k8slens/webpack": "^6.5.0-alpha.8"
"@k8slens/eslint-config": "^6.5.0",
"@k8slens/react-testing-library-discovery": "^1.0.0",
"@k8slens/webpack": "^6.5.0"
}
}

View File

@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# 6.5.0 (2023-05-26)
# 6.5.0-alpha.14 (2023-05-23)
# 6.5.0-alpha.13 (2023-05-16)
# 6.5.0-alpha.12 (2023-05-16)
# 6.5.0-alpha.11 (2023-05-11)
# 6.5.0-alpha.9 (2023-05-04)
### Features
* Compute the kubectl download version map at build time ([0bd7b1f](https://github.com/lensapp/lens/commit/0bd7b1fe92a173379c8a5a1ab7e13cf9e4f8223b))
# 6.5.0-alpha.4 (2023-04-12)
# 6.5.0-alpha.7 (2023-05-16)

View File

@ -1,6 +1,6 @@
{
"name": "@k8slens/cluster-settings",
"version": "6.5.0-alpha.7",
"version": "6.5.0",
"description": "Injection token exporter for cluster settings configuration",
"license": "MIT",
"type": "commonjs",
@ -19,10 +19,10 @@
"build": "lens-webpack-build"
},
"devDependencies": {
"@k8slens/webpack": "^6.5.0-alpha.8",
"@k8slens/webpack": "^6.5.0",
"rimraf": "^4.4.1"
},
"peerDependencies": {
"@ogre-tools/injectable": "^15.8.1"
"@ogre-tools/injectable": "^17.2.0"
}
}

View File

@ -0,0 +1,6 @@
module.exports = {
extends: "@k8slens/eslint-config/eslint",
parserOptions: {
project: "./tsconfig.json",
},
};

View File

@ -0,0 +1 @@
"@k8slens/eslint-config/prettier"

View File

@ -3,7 +3,6 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
export * from "./crd-list";
export * from "./crd-details";
export * from "./crd-resources";
export * from "./crd-resource-details";
export * from "./src/tokens";
export * from "./src/feature";
export { default as sidebarItemsInjectable } from "./src/sidebar-items.injectable";

View File

@ -0,0 +1 @@
module.exports = require("@k8slens/jest").monorepoPackageConfig(__dirname).configForReact;

View File

@ -0,0 +1,48 @@
{
"name": "@k8slens/cluster-sidebar",
"private": false,
"version": "1.0.0",
"description": "Injection tokens for adding new sidebar items within the Cluster View",
"type": "commonjs",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "git+https://github.com/lensapp/lens.git"
},
"main": "dist/index.js",
"types": "dist/index.d.ts",
"author": {
"name": "OpenLens Authors",
"email": "info@k8slens.dev"
},
"license": "MIT",
"homepage": "https://github.com/lensapp/lens",
"scripts": {
"build": "lens-webpack-build",
"clean": "rimraf dist/",
"test": "jest --coverage --runInBand",
"lint": "lens-lint",
"lint:fix": "lens-lint --fix"
},
"peerDependencies": {
"@k8slens/feature-core": "^6.5.0-alpha.4",
"@k8slens/utilities": "^1.0.0-alpha.3",
"@ogre-tools/injectable": "^17.2.0",
"@ogre-tools/injectable-extension-for-auto-registration": "^17.2.0",
"@ogre-tools/injectable-extension-for-mobx": "^17.2.0",
"mobx": "^6.9.0",
"react": "^17.0.2"
},
"devDependencies": {
"@k8slens/eslint-config": "^6.5.0-alpha.3",
"@k8slens/jest": "^6.5.0-alpha.5",
"@k8slens/typescript": "^6.5.0-alpha.2",
"@k8slens/webpack": "^6.5.0-alpha.5"
}
}

View File

@ -0,0 +1,14 @@
import { getFeature } from "@k8slens/feature-core";
import { autoRegister } from "@ogre-tools/injectable-extension-for-auto-registration";
export const clusterSidebarFeature = getFeature({
id: "cluster-side-feature",
register: (di) => {
autoRegister({
di,
targetModule: module,
getRequireContexts: () => [require.context("./", true, /\.injectable\.(ts|tsx)$/)],
});
},
});

View File

@ -0,0 +1,174 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { createContainer, DiContainer, getInjectable } from "@ogre-tools/injectable";
import { computed, IComputedValue } from "mobx";
import { noop } from "lodash/fp";
import sidebarItemsInjectable from "./sidebar-items.injectable";
import { SidebarItemDeclaration, sidebarItemInjectionToken } from "./tokens";
import { registerMobX } from "@ogre-tools/injectable-extension-for-mobx";
import { clusterSidebarFeature } from "./feature";
const someParentSidebarItemInjectable = getInjectable({
id: "sidebar-item-some-parent",
instantiate: () => ({
parentId: null,
title: "Some parent",
onClick: noop,
orderNumber: 42,
}),
injectionToken: sidebarItemInjectionToken,
});
const someOtherParentSidebarItemInjectable = getInjectable({
id: "sidebar-item-some-other-parent",
instantiate: () => ({
parentId: null,
title: "Some other parent",
onClick: noop,
orderNumber: 126,
}),
injectionToken: sidebarItemInjectionToken,
});
const someAnotherParentSidebarItemInjectable = getInjectable({
id: "sidebar-item-some-another-parent",
instantiate: () => ({
parentId: null,
title: "Some another parent",
onClick: noop,
orderNumber: 84,
}),
injectionToken: sidebarItemInjectionToken,
});
const someForthParentSidebarItemInjectable = getInjectable({
id: "sidebar-item-some-forth-parent",
instantiate: () => ({
parentId: null,
title: "Some another parent",
onClick: noop,
orderNumber: 84,
isVisible: computed(() => false),
isActive: computed(() => true),
}),
injectionToken: sidebarItemInjectionToken,
});
const someChildSidebarItemInjectable = getInjectable({
id: "sidebar-item-some-child",
instantiate: () => ({
parentId: someParentSidebarItemInjectable.id,
title: "Some child",
onClick: noop,
orderNumber: 168,
}),
injectionToken: sidebarItemInjectionToken,
});
const someOtherChildSidebarItemInjectable = getInjectable({
id: "sidebar-item-some-other-child",
instantiate: () => ({
parentId: someParentSidebarItemInjectable.id,
title: "Some other child",
onClick: noop,
orderNumber: 252,
}),
injectionToken: sidebarItemInjectionToken,
});
const someAnotherChildSidebarItemInjectable = getInjectable({
id: "sidebar-item-some-another-child",
instantiate: () => ({
parentId: someParentSidebarItemInjectable.id,
title: "Some another child",
onClick: noop,
orderNumber: 210,
}),
injectionToken: sidebarItemInjectionToken,
});
describe("order of sidebar items", () => {
let di: DiContainer;
let sidebarItems: IComputedValue<SidebarItemDeclaration[]>;
beforeEach(() => {
di = createContainer("test");
di.register(
someParentSidebarItemInjectable,
someOtherParentSidebarItemInjectable,
someAnotherParentSidebarItemInjectable,
someChildSidebarItemInjectable,
someOtherChildSidebarItemInjectable,
someAnotherChildSidebarItemInjectable,
someForthParentSidebarItemInjectable,
);
clusterSidebarFeature.register(di);
registerMobX(di);
sidebarItems = di.inject(sidebarItemsInjectable);
});
it("has parent items in order", () => {
const actual = sidebarItems.get().map((item) => item.id);
expect(actual).toEqual([
"sidebar-item-some-parent",
"sidebar-item-some-another-parent",
"sidebar-item-some-forth-parent",
"sidebar-item-some-other-parent",
]);
});
it("an item with no children and no isVisible configuration by default is visible", () => {
const item = sidebarItems.get().find((item) => item.id === someAnotherParentSidebarItemInjectable.id);
expect(item?.isVisible.get()).toBe(true);
});
it("an item with no children and an isVisible configuration is whatever the configuration specifies", () => {
const item = sidebarItems.get().find((item) => item.id === someForthParentSidebarItemInjectable.id);
expect(item?.isVisible.get()).toBe(false);
});
it("an item with children is visible if at least one of the children is visible", () => {
const item = sidebarItems.get().find((item) => item.id === "sidebar-item-some-parent");
expect(item?.isVisible.get()).toBe(true);
});
it("an item with no children and no isActive configuration by default is not active", () => {
const item = sidebarItems.get().find((item) => item.id === someAnotherParentSidebarItemInjectable.id);
expect(item?.isActive.get()).toBe(false);
});
it("an item with no children and an isActive configuration is whatever the configuration specifies", () => {
const item = sidebarItems.get().find((item) => item.id === someForthParentSidebarItemInjectable.id);
expect(item?.isActive.get()).toBe(true);
});
it("an item with children is active if at least one of the children is active", () => {
const item = sidebarItems.get().find((item) => item.id === "sidebar-item-some-parent");
expect(item?.isActive.get()).toBe(false);
});
it("has child items in order", () => {
const actual = sidebarItems
.get()
.find((item) => item.id === "sidebar-item-some-parent")
?.children.map((item) => item.id);
expect(actual).toEqual([
"sidebar-item-some-child",
"sidebar-item-some-another-child",
"sidebar-item-some-other-child",
]);
});
});

View File

@ -0,0 +1,60 @@
import { getInjectable, InjectionInstanceWithMeta } from "@ogre-tools/injectable";
import { computedInjectManyInjectable } from "@ogre-tools/injectable-extension-for-mobx";
import { SidebarItemDeclaration, sidebarItemInjectionToken, SidebarItemRegistration } from "./tokens";
import { computed } from "mobx";
import { byOrderNumber } from "@k8slens/utilities";
const getSidebarItemsHierarchy = (
registrations: InjectionInstanceWithMeta<SidebarItemRegistration>[],
parentId: string | null,
): SidebarItemDeclaration[] =>
registrations
.filter(({ instance }) => instance.parentId === parentId)
.map(({ instance: { isActive, isVisible, ...registration }, meta: { id } }) => {
const children = getSidebarItemsHierarchy(registrations, id);
return {
...registration,
id,
children,
isVisible: computed(() => {
if (children.length === 0) {
if (isVisible) {
return isVisible.get();
}
return true;
}
return children.some((child) => child.isVisible.get());
}),
isActive: computed(() => {
if (children.length === 0) {
if (isActive) {
return isActive.get();
}
return false;
}
return children.some((child) => child.isActive.get());
}),
};
})
.sort(byOrderNumber);
const sidebarItemsInjectable = getInjectable({
id: "sidebar-items",
instantiate: (di) => {
const computedInjectMany = di.inject(computedInjectManyInjectable);
const sidebarItemRegistrations = computedInjectMany(sidebarItemInjectionToken);
return computed(() => {
void sidebarItemRegistrations.get();
return getSidebarItemsHierarchy(di.injectManyWithMeta(sidebarItemInjectionToken), null);
});
},
});
export default sidebarItemsInjectable;

View File

@ -0,0 +1,34 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectionToken } from "@ogre-tools/injectable";
import type { IComputedValue } from "mobx";
import type { StrictReactNode } from "@k8slens/utilities";
export interface SidebarItemRegistration {
id?: undefined;
parentId: string | null;
title: StrictReactNode;
onClick: () => void;
getIcon?: () => StrictReactNode;
isActive?: IComputedValue<boolean>;
isVisible?: IComputedValue<boolean>;
orderNumber: number;
}
export interface SidebarItemDeclaration {
id: string;
parentId: string | null;
title: StrictReactNode;
onClick: () => void;
getIcon?: () => StrictReactNode;
isActive: IComputedValue<boolean>;
isVisible: IComputedValue<boolean>;
children: SidebarItemDeclaration[];
}
export const sidebarItemInjectionToken = getInjectionToken<SidebarItemRegistration>({
id: "sidebar-item-injection-token",
});

View File

@ -0,0 +1,4 @@
{
"extends": "@k8slens/typescript/config/base.json",
"include": ["**/*.ts"]
}

View File

@ -0,0 +1 @@
module.exports = require("@k8slens/webpack").configForReact;

View File

@ -3,6 +3,600 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# 6.5.0 (2023-05-26)
# 6.5.0-alpha.16 (2023-05-25)
### Bug Fixes
* Handle log responses as text ([#7776](https://github.com/lensapp/lens/issues/7776)) ([90c449c](https://github.com/lensapp/lens/commit/90c449cc0dd68ef46eb3c32bae170c3386238db9))
* Make application size not blow up by consolidating dependencies in core package to peerDependencies ([738985c](https://github.com/lensapp/lens/commit/738985c9b7406ef0722c3994c560f0337e3c5b7c))
# 6.5.0-alpha.15 (2023-05-23)
# 6.5.0-alpha.14 (2023-05-23)
### Bug Fixes
* Use correct path for node-shell shell PTY ([99e6b77](https://github.com/lensapp/lens/commit/99e6b77fc1c5a74cfef90981b8b0162b46ecfb43))
### Reverts
* Revert "chore: Extract sidebar item injection token into separate package" ([8f4aa49](https://github.com/lensapp/lens/commit/8f4aa497cc54655f83813d57c224f77dd1472141))
* Revert "chore: Rename sidebar item injectable files" ([cb0e876](https://github.com/lensapp/lens/commit/cb0e8764aca9e0d28e6e23c5ae87a5ab6d414065))
* Revert "chore: Convert sidebarItemInjectionToken to use InjectWithMetadata instead of duplicating the IDs" ([93bc41f](https://github.com/lensapp/lens/commit/93bc41f9a3f47f5c777c882c9241f4fd5e3f1952))
* Revert "chore: Fixup tests snapshots to match new testid behaviour" ([9276df0](https://github.com/lensapp/lens/commit/9276df05924794d30d7d97bc79cf701a6106e8ec))
* Revert "chore: Fix lint" ([d90bdf6](https://github.com/lensapp/lens/commit/d90bdf6f1497cb25f17788a4170feba31d366b74))
* Revert "chore: Fix more lint" ([813705f](https://github.com/lensapp/lens/commit/813705fe9097012cd7fc62a8d543d1f7bc2be2ed))
* Revert "chore: Fix IDs for some sidebar items" ([753c8bf](https://github.com/lensapp/lens/commit/753c8bfa85ccc74980553bb512b5038ff18767a2))
* Revert "chore: Improve title formatting for Horizontal/Vertical Pod Autoscalers" ([d4c12be](https://github.com/lensapp/lens/commit/d4c12becfc9020009d64f48e4c8f9dd3b7725bb6))
* Revert "fix: Fix formatting of custom resource sidebar items" ([5608a19](https://github.com/lensapp/lens/commit/5608a199be1067039403b85abe776fab928a956c))
* Revert "chore: Fix integration tests failing due to helm testid's changing" ([96b7ecb](https://github.com/lensapp/lens/commit/96b7ecbaddedd45cc667cc2d6c25fdc0813557ec))
* Revert "chore: Fix tests after rebase" ([1b43de5](https://github.com/lensapp/lens/commit/1b43de50fe6431367bf259799f5e0b42f6b38ad9))
* Revert "fix: Custom Resource Definitions should be the first entry in the side bar" ([1099e65](https://github.com/lensapp/lens/commit/1099e65c52c62153b3d28d0654fffaaa6f6715a7))
* Revert "fix: Custom Resource Definitions sidebar item should navigate to the correct route" ([7d46cb8](https://github.com/lensapp/lens/commit/7d46cb845d0f1748c0f83a8dc34bbe783270ca2c))
* Revert "chore: Cleanup custom resource route definition" ([40f1180](https://github.com/lensapp/lens/commit/40f118057925a3b946f5dcc60162bad7e8b12e58))
* Revert "chore: Factor out NavigateToCustomResources type" ([d3cf708](https://github.com/lensapp/lens/commit/d3cf7088d6c37860984ce0295a3d8a5c528c2a66))
* Revert "chore: Move around Custom Resource and Custom Resource Definition files to simplify names" ([5f4cdbc](https://github.com/lensapp/lens/commit/5f4cdbc51950c04804139e9b961cfe394ad4ae30))
# 6.5.0-alpha.13 (2023-05-16)
### Bug Fixes
* Switch to using IAsyncComputed to resolve bad setState error within ClusterOverview from react ([4f8e470](https://github.com/lensapp/lens/commit/4f8e4707f929eee04ff1345c9e93f00d50ac0a92))
# 6.5.0-alpha.12 (2023-05-16)
### Bug Fixes
* Don't crash when hovering hotbar menu index ([9d51ef2](https://github.com/lensapp/lens/commit/9d51ef2aa69c6c9df0fd57281b25131a10efd27a))
# 6.5.0-alpha.11 (2023-05-11)
### Bug Fixes
* Add test as repro, and fix bug about kube API details not opening ([bb400ae](https://github.com/lensapp/lens/commit/bb400ae66797fe160567e6b728d85d5e79caef4d))
* Bring back search filters for pods which were accidentally removed previously ([9c7be39](https://github.com/lensapp/lens/commit/9c7be39eb135b747945f76f61811695d2f96c761))
* Do not crash when opening details of a helm release ([40af0d3](https://github.com/lensapp/lens/commit/40af0d31c529e252a45c7370852755c4e63067a7))
* Kludge cluster settings not opening when extension introduces new settings without ID when title contains spaces ([e8491ca](https://github.com/lensapp/lens/commit/e8491ca2d39971d06842f6741eae042554fbc9a0))
# 6.5.0-alpha.10 (2023-05-09)
# 6.5.0-alpha.9 (2023-05-04)
### Bug Fixes
* Add checks to KubeObject constructor to ensure shape ([bf6af58](https://github.com/lensapp/lens/commit/bf6af58d80552a16be7a547f772902b138a12fbd))
* add routingFeature to getDiForUnitTesting ([b33a8b4](https://github.com/lensapp/lens/commit/b33a8b49607935450f70b1d5535431ba416fc22e))
* change class name behaviour to limit snapshot diffs ([bfb2b8e](https://github.com/lensapp/lens/commit/bfb2b8e6591891b529d5cf0f8757ff8b7080e004))
* **core:** hide update button if downloading of an update fails ([f697742](https://github.com/lensapp/lens/commit/f6977428daa3f61482e7066689ebf7092b0fb2b1))
* Fix selfLink being missing from requestKubeResource ([b90e04e](https://github.com/lensapp/lens/commit/b90e04e02dfd18896d5f08f1bc36f90179635797))
* lint:fix ([76c11aa](https://github.com/lensapp/lens/commit/76c11aa697e3ada81c876fe8a3ac6e33b4ce8cb9))
* observableHistoryInjectionToken and 1 revert for GlobalOverride ([8c0220c](https://github.com/lensapp/lens/commit/8c0220c353c9047a2a4df570b598c31868b5f7e2))
* Only show Update Channel preferences when applicable ([43cedae](https://github.com/lensapp/lens/commit/43cedae7b05eaa7f932f2718939f7b856a1b86c5))
* Remove incorrect timeout on standard info notifications ([bcf95a6](https://github.com/lensapp/lens/commit/bcf95a65f1d2be91fa613f0da9d0ae978faaef75))
* removed as-legacy-globals-for-extension-api ([f1f2634](https://github.com/lensapp/lens/commit/f1f26344900b99c70b2bed2f453ed27574d7b417))
* removed dependencies: [reactApplicationFeature], ([0dae159](https://github.com/lensapp/lens/commit/0dae1594baabbd06e798f9a1b4c132cee998bb65))
### Features
* Add deleting subNamespaces to contextMenu ([89cf491](https://github.com/lensapp/lens/commit/89cf491bc0aa80ee398f8b5dc39ec7c69d00c7bb))
* Add removing subNamespaces to Namespace route ([aa95002](https://github.com/lensapp/lens/commit/aa950026a3162abf6322afb4b5c5bf56f9f7e10f))
* Adjust container status colors to be distinguable with red/green filter ([#7621](https://github.com/lensapp/lens/issues/7621)) ([3532fc1](https://github.com/lensapp/lens/commit/3532fc1dab918190fa76199a9d7b04d6efe40c47))
* Compute the kubectl download version map at build time ([0bd7b1f](https://github.com/lensapp/lens/commit/0bd7b1fe92a173379c8a5a1ab7e13cf9e4f8223b))
* Improve formatting error messages from apiKube ([3439472](https://github.com/lensapp/lens/commit/3439472065e6b850e286f6a34bccc23b827b8e28))
* Introduce API for changing the status bar colour ([06a0dce](https://github.com/lensapp/lens/commit/06a0dce612b67084f8f36ba552ea23f8ac071201))
* Introduce injectables to remove subNamespaces ([c557225](https://github.com/lensapp/lens/commit/c5572257bd6a32a2f05fc78f54ece428f54389fe))
* Never auto-close error notifications ([561d8db](https://github.com/lensapp/lens/commit/561d8dbc09581ff21aa79e85f3903c45e99ac33b))
# 6.5.0-alpha.6 (2023-04-12)
# 6.5.0-alpha.5 (2023-04-12)
# 6.5.0-alpha.4 (2023-04-12)
### Bug Fixes
* Fix tests by recreating non-specific injection token ([c0ebe60](https://github.com/lensapp/lens/commit/c0ebe605c4d36c0d98454e25565818f75ffb1b69))
* Referencing apiManager should not throw ([#7468](https://github.com/lensapp/lens/issues/7468)) ([351f9d4](https://github.com/lensapp/lens/commit/351f9d492f6e52e9e97d17d71e2bbdbbde4ea2db))
* remove platform specific injectable file names ([9b0318b](https://github.com/lensapp/lens/commit/9b0318b493fe2e49a34b8a4cb3d0bef1600759b8))
### Features
* Allow built versions to specify an environment ([#7495](https://github.com/lensapp/lens/issues/7495)) ([128b05d](https://github.com/lensapp/lens/commit/128b05d4d46344a511398f654865c133c6e36514))
### Reverts
* Revert "Renderer file logging through IPC" (#7393) ([5409324](https://github.com/lensapp/lens/commit/54093242367717292312df01905d052b66017953)), closes [#7393](https://github.com/lensapp/lens/issues/7393)
# 6.5.0-alpha.3 (2023-03-15)
# 6.5.0-alpha.2 (2023-03-14)
# 6.5.0-alpha.1 (2023-03-14)
### Reverts
* Revert "Renderer file logging transport (#6795)" (#7245) ([ec81af4](https://github.com/lensapp/lens/commit/ec81af4e6c5f8d0c25469a56dfa602894f85734b)), closes [#6795](https://github.com/lensapp/lens/issues/6795) [#7245](https://github.com/lensapp/lens/issues/7245) [#544](https://github.com/lensapp/lens/issues/544)
# 6.4.0-beta.13 (2023-02-03)
# 6.4.0-beta.12 (2023-02-01)
# 6.4.0-beta.11 (2023-02-01)
# 6.4.0-beta.10 (2023-01-27)
# 6.4.0-beta.9 (2023-01-27)
# 6.4.0-beta.8 (2023-01-27)
# 6.4.0-beta.7 (2023-01-27)
# 6.4.0-beta.6 (2023-01-26)
# 6.4.0-beta.5 (2023-01-26)
# 6.4.0-beta.4 (2023-01-26)
# 6.4.0-beta.3 (2023-01-26)
# 6.5.0-alpha.16 (2023-05-25)
### Bug Fixes
* Handle log responses as text ([#7776](https://github.com/lensapp/lens/issues/7776)) ([90c449c](https://github.com/lensapp/lens/commit/90c449cc0dd68ef46eb3c32bae170c3386238db9))
* Make application size not blow up by consolidating dependencies in core package to peerDependencies ([738985c](https://github.com/lensapp/lens/commit/738985c9b7406ef0722c3994c560f0337e3c5b7c))
# 6.5.0-alpha.15 (2023-05-23)
# 6.5.0-alpha.14 (2023-05-23)
### Bug Fixes
* Use correct path for node-shell shell PTY ([99e6b77](https://github.com/lensapp/lens/commit/99e6b77fc1c5a74cfef90981b8b0162b46ecfb43))
### Reverts
* Revert "chore: Extract sidebar item injection token into separate package" ([8f4aa49](https://github.com/lensapp/lens/commit/8f4aa497cc54655f83813d57c224f77dd1472141))
* Revert "chore: Rename sidebar item injectable files" ([cb0e876](https://github.com/lensapp/lens/commit/cb0e8764aca9e0d28e6e23c5ae87a5ab6d414065))
* Revert "chore: Convert sidebarItemInjectionToken to use InjectWithMetadata instead of duplicating the IDs" ([93bc41f](https://github.com/lensapp/lens/commit/93bc41f9a3f47f5c777c882c9241f4fd5e3f1952))
* Revert "chore: Fixup tests snapshots to match new testid behaviour" ([9276df0](https://github.com/lensapp/lens/commit/9276df05924794d30d7d97bc79cf701a6106e8ec))
* Revert "chore: Fix lint" ([d90bdf6](https://github.com/lensapp/lens/commit/d90bdf6f1497cb25f17788a4170feba31d366b74))
* Revert "chore: Fix more lint" ([813705f](https://github.com/lensapp/lens/commit/813705fe9097012cd7fc62a8d543d1f7bc2be2ed))
* Revert "chore: Fix IDs for some sidebar items" ([753c8bf](https://github.com/lensapp/lens/commit/753c8bfa85ccc74980553bb512b5038ff18767a2))
* Revert "chore: Improve title formatting for Horizontal/Vertical Pod Autoscalers" ([d4c12be](https://github.com/lensapp/lens/commit/d4c12becfc9020009d64f48e4c8f9dd3b7725bb6))
* Revert "fix: Fix formatting of custom resource sidebar items" ([5608a19](https://github.com/lensapp/lens/commit/5608a199be1067039403b85abe776fab928a956c))
* Revert "chore: Fix integration tests failing due to helm testid's changing" ([96b7ecb](https://github.com/lensapp/lens/commit/96b7ecbaddedd45cc667cc2d6c25fdc0813557ec))
* Revert "chore: Fix tests after rebase" ([1b43de5](https://github.com/lensapp/lens/commit/1b43de50fe6431367bf259799f5e0b42f6b38ad9))
* Revert "fix: Custom Resource Definitions should be the first entry in the side bar" ([1099e65](https://github.com/lensapp/lens/commit/1099e65c52c62153b3d28d0654fffaaa6f6715a7))
* Revert "fix: Custom Resource Definitions sidebar item should navigate to the correct route" ([7d46cb8](https://github.com/lensapp/lens/commit/7d46cb845d0f1748c0f83a8dc34bbe783270ca2c))
* Revert "chore: Cleanup custom resource route definition" ([40f1180](https://github.com/lensapp/lens/commit/40f118057925a3b946f5dcc60162bad7e8b12e58))
* Revert "chore: Factor out NavigateToCustomResources type" ([d3cf708](https://github.com/lensapp/lens/commit/d3cf7088d6c37860984ce0295a3d8a5c528c2a66))
* Revert "chore: Move around Custom Resource and Custom Resource Definition files to simplify names" ([5f4cdbc](https://github.com/lensapp/lens/commit/5f4cdbc51950c04804139e9b961cfe394ad4ae30))
# 6.5.0-alpha.13 (2023-05-16)
### Bug Fixes
* Switch to using IAsyncComputed to resolve bad setState error within ClusterOverview from react ([4f8e470](https://github.com/lensapp/lens/commit/4f8e4707f929eee04ff1345c9e93f00d50ac0a92))
# 6.5.0-alpha.12 (2023-05-16)
### Bug Fixes
* Don't crash when hovering hotbar menu index ([9d51ef2](https://github.com/lensapp/lens/commit/9d51ef2aa69c6c9df0fd57281b25131a10efd27a))
# 6.5.0-alpha.11 (2023-05-11)
### Bug Fixes
* Add test as repro, and fix bug about kube API details not opening ([bb400ae](https://github.com/lensapp/lens/commit/bb400ae66797fe160567e6b728d85d5e79caef4d))
* Bring back search filters for pods which were accidentally removed previously ([9c7be39](https://github.com/lensapp/lens/commit/9c7be39eb135b747945f76f61811695d2f96c761))
* Do not crash when opening details of a helm release ([40af0d3](https://github.com/lensapp/lens/commit/40af0d31c529e252a45c7370852755c4e63067a7))
* Kludge cluster settings not opening when extension introduces new settings without ID when title contains spaces ([e8491ca](https://github.com/lensapp/lens/commit/e8491ca2d39971d06842f6741eae042554fbc9a0))
# 6.5.0-alpha.10 (2023-05-09)
# 6.5.0-alpha.9 (2023-05-04)
### Bug Fixes
* Add checks to KubeObject constructor to ensure shape ([bf6af58](https://github.com/lensapp/lens/commit/bf6af58d80552a16be7a547f772902b138a12fbd))
* add routingFeature to getDiForUnitTesting ([b33a8b4](https://github.com/lensapp/lens/commit/b33a8b49607935450f70b1d5535431ba416fc22e))
* change class name behaviour to limit snapshot diffs ([bfb2b8e](https://github.com/lensapp/lens/commit/bfb2b8e6591891b529d5cf0f8757ff8b7080e004))
* **core:** hide update button if downloading of an update fails ([f697742](https://github.com/lensapp/lens/commit/f6977428daa3f61482e7066689ebf7092b0fb2b1))
* Fix selfLink being missing from requestKubeResource ([b90e04e](https://github.com/lensapp/lens/commit/b90e04e02dfd18896d5f08f1bc36f90179635797))
* lint:fix ([76c11aa](https://github.com/lensapp/lens/commit/76c11aa697e3ada81c876fe8a3ac6e33b4ce8cb9))
* observableHistoryInjectionToken and 1 revert for GlobalOverride ([8c0220c](https://github.com/lensapp/lens/commit/8c0220c353c9047a2a4df570b598c31868b5f7e2))
* Only show Update Channel preferences when applicable ([43cedae](https://github.com/lensapp/lens/commit/43cedae7b05eaa7f932f2718939f7b856a1b86c5))
* Remove incorrect timeout on standard info notifications ([bcf95a6](https://github.com/lensapp/lens/commit/bcf95a65f1d2be91fa613f0da9d0ae978faaef75))
* removed as-legacy-globals-for-extension-api ([f1f2634](https://github.com/lensapp/lens/commit/f1f26344900b99c70b2bed2f453ed27574d7b417))
* removed dependencies: [reactApplicationFeature], ([0dae159](https://github.com/lensapp/lens/commit/0dae1594baabbd06e798f9a1b4c132cee998bb65))
### Features
* Add deleting subNamespaces to contextMenu ([89cf491](https://github.com/lensapp/lens/commit/89cf491bc0aa80ee398f8b5dc39ec7c69d00c7bb))
* Add removing subNamespaces to Namespace route ([aa95002](https://github.com/lensapp/lens/commit/aa950026a3162abf6322afb4b5c5bf56f9f7e10f))
* Adjust container status colors to be distinguable with red/green filter ([#7621](https://github.com/lensapp/lens/issues/7621)) ([3532fc1](https://github.com/lensapp/lens/commit/3532fc1dab918190fa76199a9d7b04d6efe40c47))
* Compute the kubectl download version map at build time ([0bd7b1f](https://github.com/lensapp/lens/commit/0bd7b1fe92a173379c8a5a1ab7e13cf9e4f8223b))
* Improve formatting error messages from apiKube ([3439472](https://github.com/lensapp/lens/commit/3439472065e6b850e286f6a34bccc23b827b8e28))
* Introduce API for changing the status bar colour ([06a0dce](https://github.com/lensapp/lens/commit/06a0dce612b67084f8f36ba552ea23f8ac071201))
* Introduce injectables to remove subNamespaces ([c557225](https://github.com/lensapp/lens/commit/c5572257bd6a32a2f05fc78f54ece428f54389fe))
* Never auto-close error notifications ([561d8db](https://github.com/lensapp/lens/commit/561d8dbc09581ff21aa79e85f3903c45e99ac33b))
# 6.5.0-alpha.6 (2023-04-12)
# 6.5.0-alpha.5 (2023-04-12)
# 6.5.0-alpha.4 (2023-04-12)
### Bug Fixes
* Fix tests by recreating non-specific injection token ([c0ebe60](https://github.com/lensapp/lens/commit/c0ebe605c4d36c0d98454e25565818f75ffb1b69))
* Referencing apiManager should not throw ([#7468](https://github.com/lensapp/lens/issues/7468)) ([351f9d4](https://github.com/lensapp/lens/commit/351f9d492f6e52e9e97d17d71e2bbdbbde4ea2db))
* remove platform specific injectable file names ([9b0318b](https://github.com/lensapp/lens/commit/9b0318b493fe2e49a34b8a4cb3d0bef1600759b8))
### Features
* Allow built versions to specify an environment ([#7495](https://github.com/lensapp/lens/issues/7495)) ([128b05d](https://github.com/lensapp/lens/commit/128b05d4d46344a511398f654865c133c6e36514))
### Reverts
* Revert "Renderer file logging through IPC" (#7393) ([5409324](https://github.com/lensapp/lens/commit/54093242367717292312df01905d052b66017953)), closes [#7393](https://github.com/lensapp/lens/issues/7393)
# 6.5.0-alpha.3 (2023-03-15)
# 6.5.0-alpha.2 (2023-03-14)
# 6.5.0-alpha.1 (2023-03-14)
### Reverts
* Revert "Renderer file logging transport (#6795)" (#7245) ([ec81af4](https://github.com/lensapp/lens/commit/ec81af4e6c5f8d0c25469a56dfa602894f85734b)), closes [#6795](https://github.com/lensapp/lens/issues/6795) [#7245](https://github.com/lensapp/lens/issues/7245) [#544](https://github.com/lensapp/lens/issues/544)
# 6.4.0-beta.13 (2023-02-03)
# 6.4.0-beta.12 (2023-02-01)
# 6.4.0-beta.11 (2023-02-01)
# 6.4.0-beta.10 (2023-01-27)
# 6.4.0-beta.9 (2023-01-27)
# 6.4.0-beta.8 (2023-01-27)
# 6.4.0-beta.7 (2023-01-27)
# 6.4.0-beta.6 (2023-01-26)
# 6.4.0-beta.5 (2023-01-26)
# 6.4.0-beta.4 (2023-01-26)
# 6.4.0-beta.3 (2023-01-26)
# 6.5.0-alpha.15 (2023-05-23)
# 6.5.0-alpha.14 (2023-05-23)
### Bug Fixes
* Use correct path for node-shell shell PTY ([99e6b77](https://github.com/lensapp/lens/commit/99e6b77fc1c5a74cfef90981b8b0162b46ecfb43))
### Reverts
* Revert "chore: Extract sidebar item injection token into separate package" ([8f4aa49](https://github.com/lensapp/lens/commit/8f4aa497cc54655f83813d57c224f77dd1472141))
* Revert "chore: Rename sidebar item injectable files" ([cb0e876](https://github.com/lensapp/lens/commit/cb0e8764aca9e0d28e6e23c5ae87a5ab6d414065))
* Revert "chore: Convert sidebarItemInjectionToken to use InjectWithMetadata instead of duplicating the IDs" ([93bc41f](https://github.com/lensapp/lens/commit/93bc41f9a3f47f5c777c882c9241f4fd5e3f1952))
* Revert "chore: Fixup tests snapshots to match new testid behaviour" ([9276df0](https://github.com/lensapp/lens/commit/9276df05924794d30d7d97bc79cf701a6106e8ec))
* Revert "chore: Fix lint" ([d90bdf6](https://github.com/lensapp/lens/commit/d90bdf6f1497cb25f17788a4170feba31d366b74))
* Revert "chore: Fix more lint" ([813705f](https://github.com/lensapp/lens/commit/813705fe9097012cd7fc62a8d543d1f7bc2be2ed))
* Revert "chore: Fix IDs for some sidebar items" ([753c8bf](https://github.com/lensapp/lens/commit/753c8bfa85ccc74980553bb512b5038ff18767a2))
* Revert "chore: Improve title formatting for Horizontal/Vertical Pod Autoscalers" ([d4c12be](https://github.com/lensapp/lens/commit/d4c12becfc9020009d64f48e4c8f9dd3b7725bb6))
* Revert "fix: Fix formatting of custom resource sidebar items" ([5608a19](https://github.com/lensapp/lens/commit/5608a199be1067039403b85abe776fab928a956c))
* Revert "chore: Fix integration tests failing due to helm testid's changing" ([96b7ecb](https://github.com/lensapp/lens/commit/96b7ecbaddedd45cc667cc2d6c25fdc0813557ec))
* Revert "chore: Fix tests after rebase" ([1b43de5](https://github.com/lensapp/lens/commit/1b43de50fe6431367bf259799f5e0b42f6b38ad9))
* Revert "fix: Custom Resource Definitions should be the first entry in the side bar" ([1099e65](https://github.com/lensapp/lens/commit/1099e65c52c62153b3d28d0654fffaaa6f6715a7))
* Revert "fix: Custom Resource Definitions sidebar item should navigate to the correct route" ([7d46cb8](https://github.com/lensapp/lens/commit/7d46cb845d0f1748c0f83a8dc34bbe783270ca2c))
* Revert "chore: Cleanup custom resource route definition" ([40f1180](https://github.com/lensapp/lens/commit/40f118057925a3b946f5dcc60162bad7e8b12e58))
* Revert "chore: Factor out NavigateToCustomResources type" ([d3cf708](https://github.com/lensapp/lens/commit/d3cf7088d6c37860984ce0295a3d8a5c528c2a66))
* Revert "chore: Move around Custom Resource and Custom Resource Definition files to simplify names" ([5f4cdbc](https://github.com/lensapp/lens/commit/5f4cdbc51950c04804139e9b961cfe394ad4ae30))
# 6.5.0-alpha.13 (2023-05-16)
### Bug Fixes
* Switch to using IAsyncComputed to resolve bad setState error within ClusterOverview from react ([4f8e470](https://github.com/lensapp/lens/commit/4f8e4707f929eee04ff1345c9e93f00d50ac0a92))
# 6.5.0-alpha.12 (2023-05-16)
### Bug Fixes
* Don't crash when hovering hotbar menu index ([9d51ef2](https://github.com/lensapp/lens/commit/9d51ef2aa69c6c9df0fd57281b25131a10efd27a))
# 6.5.0-alpha.11 (2023-05-11)
### Bug Fixes
* Add test as repro, and fix bug about kube API details not opening ([bb400ae](https://github.com/lensapp/lens/commit/bb400ae66797fe160567e6b728d85d5e79caef4d))
* Bring back search filters for pods which were accidentally removed previously ([9c7be39](https://github.com/lensapp/lens/commit/9c7be39eb135b747945f76f61811695d2f96c761))
* Do not crash when opening details of a helm release ([40af0d3](https://github.com/lensapp/lens/commit/40af0d31c529e252a45c7370852755c4e63067a7))
* Kludge cluster settings not opening when extension introduces new settings without ID when title contains spaces ([e8491ca](https://github.com/lensapp/lens/commit/e8491ca2d39971d06842f6741eae042554fbc9a0))
# 6.5.0-alpha.10 (2023-05-09)
# 6.5.0-alpha.9 (2023-05-04)
### Bug Fixes
* Add checks to KubeObject constructor to ensure shape ([bf6af58](https://github.com/lensapp/lens/commit/bf6af58d80552a16be7a547f772902b138a12fbd))
* add routingFeature to getDiForUnitTesting ([b33a8b4](https://github.com/lensapp/lens/commit/b33a8b49607935450f70b1d5535431ba416fc22e))
* change class name behaviour to limit snapshot diffs ([bfb2b8e](https://github.com/lensapp/lens/commit/bfb2b8e6591891b529d5cf0f8757ff8b7080e004))
* **core:** hide update button if downloading of an update fails ([f697742](https://github.com/lensapp/lens/commit/f6977428daa3f61482e7066689ebf7092b0fb2b1))
* Fix selfLink being missing from requestKubeResource ([b90e04e](https://github.com/lensapp/lens/commit/b90e04e02dfd18896d5f08f1bc36f90179635797))
* lint:fix ([76c11aa](https://github.com/lensapp/lens/commit/76c11aa697e3ada81c876fe8a3ac6e33b4ce8cb9))
* observableHistoryInjectionToken and 1 revert for GlobalOverride ([8c0220c](https://github.com/lensapp/lens/commit/8c0220c353c9047a2a4df570b598c31868b5f7e2))
* Only show Update Channel preferences when applicable ([43cedae](https://github.com/lensapp/lens/commit/43cedae7b05eaa7f932f2718939f7b856a1b86c5))
* Remove incorrect timeout on standard info notifications ([bcf95a6](https://github.com/lensapp/lens/commit/bcf95a65f1d2be91fa613f0da9d0ae978faaef75))
* removed as-legacy-globals-for-extension-api ([f1f2634](https://github.com/lensapp/lens/commit/f1f26344900b99c70b2bed2f453ed27574d7b417))
* removed dependencies: [reactApplicationFeature], ([0dae159](https://github.com/lensapp/lens/commit/0dae1594baabbd06e798f9a1b4c132cee998bb65))
### Features
* Add deleting subNamespaces to contextMenu ([89cf491](https://github.com/lensapp/lens/commit/89cf491bc0aa80ee398f8b5dc39ec7c69d00c7bb))
* Add removing subNamespaces to Namespace route ([aa95002](https://github.com/lensapp/lens/commit/aa950026a3162abf6322afb4b5c5bf56f9f7e10f))
* Adjust container status colors to be distinguable with red/green filter ([#7621](https://github.com/lensapp/lens/issues/7621)) ([3532fc1](https://github.com/lensapp/lens/commit/3532fc1dab918190fa76199a9d7b04d6efe40c47))
* Compute the kubectl download version map at build time ([0bd7b1f](https://github.com/lensapp/lens/commit/0bd7b1fe92a173379c8a5a1ab7e13cf9e4f8223b))
* Improve formatting error messages from apiKube ([3439472](https://github.com/lensapp/lens/commit/3439472065e6b850e286f6a34bccc23b827b8e28))
* Introduce API for changing the status bar colour ([06a0dce](https://github.com/lensapp/lens/commit/06a0dce612b67084f8f36ba552ea23f8ac071201))
* Introduce injectables to remove subNamespaces ([c557225](https://github.com/lensapp/lens/commit/c5572257bd6a32a2f05fc78f54ece428f54389fe))
* Never auto-close error notifications ([561d8db](https://github.com/lensapp/lens/commit/561d8dbc09581ff21aa79e85f3903c45e99ac33b))
# 6.5.0-alpha.6 (2023-04-12)
# 6.5.0-alpha.5 (2023-04-12)
# 6.5.0-alpha.4 (2023-04-12)
### Bug Fixes
* Fix tests by recreating non-specific injection token ([c0ebe60](https://github.com/lensapp/lens/commit/c0ebe605c4d36c0d98454e25565818f75ffb1b69))
* Referencing apiManager should not throw ([#7468](https://github.com/lensapp/lens/issues/7468)) ([351f9d4](https://github.com/lensapp/lens/commit/351f9d492f6e52e9e97d17d71e2bbdbbde4ea2db))
* remove platform specific injectable file names ([9b0318b](https://github.com/lensapp/lens/commit/9b0318b493fe2e49a34b8a4cb3d0bef1600759b8))
### Features
* Allow built versions to specify an environment ([#7495](https://github.com/lensapp/lens/issues/7495)) ([128b05d](https://github.com/lensapp/lens/commit/128b05d4d46344a511398f654865c133c6e36514))
### Reverts
* Revert "Renderer file logging through IPC" (#7393) ([5409324](https://github.com/lensapp/lens/commit/54093242367717292312df01905d052b66017953)), closes [#7393](https://github.com/lensapp/lens/issues/7393)
# 6.5.0-alpha.3 (2023-03-15)
# 6.5.0-alpha.2 (2023-03-14)
# 6.5.0-alpha.1 (2023-03-14)
### Reverts
* Revert "Renderer file logging transport (#6795)" (#7245) ([ec81af4](https://github.com/lensapp/lens/commit/ec81af4e6c5f8d0c25469a56dfa602894f85734b)), closes [#6795](https://github.com/lensapp/lens/issues/6795) [#7245](https://github.com/lensapp/lens/issues/7245) [#544](https://github.com/lensapp/lens/issues/544)
# 6.4.0-beta.13 (2023-02-03)
# 6.4.0-beta.12 (2023-02-01)
# 6.4.0-beta.11 (2023-02-01)
# 6.4.0-beta.10 (2023-01-27)
# 6.4.0-beta.9 (2023-01-27)
# 6.4.0-beta.8 (2023-01-27)
# 6.4.0-beta.7 (2023-01-27)
# 6.4.0-beta.6 (2023-01-26)
# 6.4.0-beta.5 (2023-01-26)
# 6.4.0-beta.4 (2023-01-26)
# 6.4.0-beta.3 (2023-01-26)
# 6.5.0-alpha.13 (2023-05-16)

View File

@ -3,7 +3,7 @@
"productName": "",
"description": "Lens Desktop Core",
"homepage": "https://github.com/lensapp/lens",
"version": "6.5.0-alpha.13",
"version": "6.5.0",
"repository": {
"type": "git",
"url": "git+https://github.com/lensapp/lens.git"
@ -24,8 +24,7 @@
"./styles": "./static/build/library/renderer.css",
"./template.html": "./src/renderer/template.html",
"./vars.scss": "./src/renderer/components/vars.scss",
"./fonts": "./static/build/library/fonts",
"./icons/*.svg": "./src/renderer/components/icon/*.svg"
"./fonts": "./static/build/library/fonts"
},
"typesVersions": {
"*": {
@ -44,7 +43,6 @@
"static/build/library/**/*",
"src/renderer/template.html",
"src/renderer/components/vars.scss",
"src/renderer/components/icon/*.svg",
"types/*",
"tsconfig.json"
],
@ -102,94 +100,14 @@
],
"runtime": "@side/jest-runtime"
},
"dependencies": {
"@astronautlabs/jsonpath": "^1.1.0",
"@hapi/call": "^9.0.1",
"@hapi/subtext": "^7.1.0",
"@kubernetes/client-node": "^0.18.1",
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.60",
"@material-ui/styles": "^4.11.5",
"@sentry/electron": "^3.0.8",
"@sentry/integrations": "^6.19.3",
"@side/jest-runtime": "^1.1.0",
"ansi_up": "^5.2.1",
"auto-bind": "^4.0.0",
"await-lock": "^2.2.2",
"byline": "^5.0.0",
"chalk": "^4.1.2",
"chart.js": "^2.9.4",
"chokidar": "^3.5.3",
"color": "^3.2.1",
"conf": "^10.2.0",
"crypto-js": "^4.1.1",
"dompurify": "^2.4.4",
"electron": "^22.3.7",
"electron-devtools-installer": "^3.2.0",
"electron-updater": "^4.6.5",
"electron-window-state": "^5.0.3",
"filehound": "^1.17.6",
"fs-extra": "^9.0.1",
"glob-to-regexp": "^0.4.1",
"grapheme-splitter": "^1.0.4",
"handlebars": "^4.7.7",
"history": "^4.10.1",
"hpagent": "^1.2.0",
"http-proxy": "^1.18.1",
"immer": "^9.0.21",
"joi": "^17.9.1",
"js-yaml": "^4.1.0",
"lodash": "^4.17.15",
"marked": "^4.2.12",
"md5-file": "^5.0.0",
"moment": "^2.29.4",
"moment-timezone": "^0.5.40",
"node-pty": "0.10.1",
"npm": "^9.6.5",
"p-limit": "^3.1.0",
"path-to-regexp": "^6.2.0",
"proper-lockfile": "^4.1.2",
"query-string": "^7.1.3",
"randomcolor": "^0.6.2",
"react": "^17.0.2",
"react-beautiful-dnd": "^13.1.1",
"react-dom": "^17.0.2",
"react-material-ui-carousel": "^2.3.11",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4",
"react-select": "^5.7.0",
"react-select-event": "^5.5.1",
"react-table": "^7.8.0",
"react-virtualized-auto-sizer": "^1.0.7",
"react-window": "^1.8.8",
"readable-stream": "^3.6.0",
"rfc6902": "^5.0.1",
"selfsigned": "^2.1.1",
"semver": "^7.3.8",
"stoppable": "^1.1.0",
"tar": "^6.1.13",
"tcp-port-used": "^1.0.2",
"tempy": "1.0.1",
"type-fest": "^2.14.0",
"typed-emitter": "^1.4.0",
"typed-regex": "^0.0.8",
"url-parse": "^1.5.10",
"uuid": "^8.3.2",
"win-ca": "^3.5.0",
"winston": "^3.8.2",
"winston-transport-browserconsole": "^1.0.5",
"ws": "^8.12.1",
"xterm": "^4.19.0",
"xterm-addon-fit": "^0.5.0",
"xterm-link-provider": "^1.3.1"
},
"devDependencies": {
"@async-fn/jest": "1.6.4",
"@k8slens/messaging-fake-bridge": "^1.0.0-alpha.7",
"@k8slens/react-testing-library-discovery": "^1.0.0-alpha.4",
"@ogre-tools/linkable": "^15.8.1",
"@k8slens/messaging-fake-bridge": "^1.0.0",
"@k8slens/react-testing-library-discovery": "^1.0.0",
"@k8slens/test-utils": "^1.0.0",
"@ogre-tools/linkable": "^17.2.0",
"@sentry/types": "^6.19.7",
"@side/jest-runtime": "^1.1.0",
"@swc/cli": "^0.1.62",
"@swc/core": "^1.3.53",
"@swc/jest": "^0.2.26",
@ -286,12 +204,21 @@
"webpack-node-externals": "^3.0.0"
},
"peerDependencies": {
"@hapi/call": "^9.0.1",
"@hapi/subtext": "^7.1.0",
"@k8slens/animate": "^1.0.0-alpha.0",
"@k8slens/notifications": "^1.0.0",
"@k8slens/application": "^6.5.0-alpha.0",
"@k8slens/application-for-electron-main": "^6.5.0-alpha.0",
"@k8slens/button": "^1.0.0-alpha.5",
"@k8slens/cluster-settings": "^6.5.0-alpha.1",
"@k8slens/cluster-sidebar": "^1.0.0",
"@k8slens/error-boundary": "^1.0.0-alpha.5",
"@k8slens/event-emitter": "^1.0.0-alpha.1",
"@k8slens/icon": "^1.0.0-alpha.7",
"@k8slens/kube-api": "^1.0.0-alpha.1",
"@k8slens/kube-api-specifics": "^1.0.0-alpha.1",
"@k8slens/kube-object": "^1.0.0-alpha.5",
"@k8slens/kubectl-versions": "^1.0.0-alpha.0",
"@k8slens/legacy-extensions": "^1.0.0-alpha.0",
"@k8slens/legacy-global-di": "^1.0.0-alpha.0",
@ -302,24 +229,96 @@
"@k8slens/messaging-for-renderer": "^1.0.0-alpha.1",
"@k8slens/metrics": "^6.5.0-alpha.7",
"@k8slens/node-fetch": "^6.5.0-alpha.3",
"@k8slens/prometheus": "^1.0.0",
"@k8slens/react-application": "^1.0.0-alpha.5",
"@k8slens/random": "^1.0.0",
"@k8slens/resizing-anchor": "^1.0.0-alpha.5",
"@k8slens/resource-templates": "^1.0.0-alpha.1",
"@k8slens/routing": "^1.0.0-alpha.5",
"@k8slens/run-many": "^1.0.0-alpha.1",
"@k8slens/spinner": "^1.0.0",
"@k8slens/startable-stoppable": "^1.0.0-alpha.1",
"@k8slens/test-utils": "^1.0.0-alpha.3",
"@k8slens/tooltip": "^1.0.0-alpha.5",
"@k8slens/utilities": "^1.0.0-alpha.1",
"@ogre-tools/fp": "^15.8.1",
"@ogre-tools/injectable": "^15.8.1",
"@ogre-tools/injectable-extension-for-auto-registration": "^15.8.1",
"@ogre-tools/injectable-extension-for-mobx": "^15.8.1",
"@ogre-tools/injectable-react": "^15.8.1",
"@kubernetes/client-node": "^0.18.1",
"@material-ui/core": "^4.12.3",
"@material-ui/lab": "^4.0.0-alpha.60",
"@ogre-tools/fp": "^17.2.0",
"@ogre-tools/injectable": "^17.2.0",
"@ogre-tools/injectable-extension-for-auto-registration": "^17.2.0",
"@ogre-tools/injectable-extension-for-mobx": "^17.2.0",
"@ogre-tools/injectable-react": "^17.2.0",
"@sentry/electron": "^3.0.8",
"@sentry/integrations": "^6.19.3",
"ansi_up": "^5.2.1",
"auto-bind": "^4.0.0",
"await-lock": "^2.2.2",
"byline": "^5.0.0",
"chalk": "^4.1.2",
"chart.js": "^2.9.4",
"chokidar": "^3.5.3",
"color": "^3.2.1",
"conf": "^10.2.0",
"crypto-js": "^4.1.1",
"dompurify": "^2.4.4",
"electron": "^22.3.10",
"electron-devtools-installer": "^3.2.0",
"electron-updater": "^4.6.5",
"electron-window-state": "^5.0.3",
"fs-extra": "^9.0.1",
"glob-to-regexp": "^0.4.1",
"grapheme-splitter": "^1.0.4",
"handlebars": "^4.7.7",
"history": "^4.10.1",
"hpagent": "^1.2.0",
"http-proxy": "^1.18.1",
"immer": "^9.0.21",
"joi": "^17.9.1",
"js-yaml": "^4.1.0",
"lodash": "^4.17.15",
"marked": "^4.2.12",
"mobx": "^6.9.0",
"mobx-observable-history": "^2.0.3",
"mobx-react": "^7.6.0",
"mobx-utils": "^6.0.4",
"monaco-editor": "^0.38.0"
"moment": "^2.29.4",
"moment-timezone": "^0.5.40",
"monaco-editor": "^0.38.0",
"node-pty": "0.10.1",
"npm": "^9.6.7",
"path-to-regexp": "^6.2.0",
"proper-lockfile": "^4.1.2",
"query-string": "^7.1.3",
"randomcolor": "^0.6.2",
"react": "^17.0.2",
"react-beautiful-dnd": "^13.1.1",
"react-dom": "^17.0.2",
"react-material-ui-carousel": "^2.3.11",
"react-router": "^5.3.4",
"react-router-dom": "^5.3.4",
"react-select": "^5.7.0",
"react-select-event": "^5.5.1",
"react-table": "^7.8.0",
"react-virtualized-auto-sizer": "^1.0.7",
"react-window": "^1.8.8",
"rfc6902": "^5.0.1",
"selfsigned": "^2.1.1",
"semver": "^7.3.8",
"stoppable": "^1.1.0",
"tar": "^6.1.13",
"tcp-port-used": "^1.0.2",
"tempy": "1.0.1",
"type-fest": "^2.14.0",
"typed-emitter": "^1.4.0",
"typed-regex": "^0.0.8",
"url-parse": "^1.5.10",
"uuid": "^8.3.2",
"win-ca": "^3.5.0",
"winston": "^3.8.2",
"winston-transport-browserconsole": "^1.0.5",
"ws": "^8.12.1",
"xterm": "^4.19.0",
"xterm-addon-fit": "^0.5.0",
"xterm-link-provider": "^1.3.1"
}
}

View File

@ -1,21 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
const crdListRouteInjectable = getInjectable({
id: "crd-list-route",
instantiate: () => ({
path: "/crd/definitions",
clusterFrame: true,
isEnabled: computed(() => true),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default crdListRouteInjectable;

View File

@ -0,0 +1,24 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { shouldShowResourceInjectionToken } from "../../../../../features/cluster/showing-kube-resources/common/allowed-resources-injection-token";
import { frontEndRouteInjectionToken } from "../../../front-end-route-injection-token";
const customResourceDefinitionsRouteInjectable = getInjectable({
id: "custom-resource-definitions-route",
instantiate: (di) => ({
path: "/crd/definitions",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
group: "apiextensions.k8s.io",
apiName: "customresourcedefinitions",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default customResourceDefinitionsRouteInjectable;

View File

@ -4,19 +4,19 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { computed } from "mobx";
import type { Route } from "../../../../front-end-route-injection-token";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
import type { Route } from "../../../front-end-route-injection-token";
import { frontEndRouteInjectionToken } from "../../../front-end-route-injection-token";
export interface CustomResourcesPathParameters {
group?: string;
name?: string;
group: string;
name: string;
}
const customResourcesRouteInjectable = getInjectable({
id: "custom-resources-route",
instantiate: (): Route<CustomResourcesPathParameters> => ({
path: "/crd/:group?/:name?",
path: "/crd/:group/:name",
clusterFrame: true,
isEnabled: computed(() => true),
}),

View File

@ -3,11 +3,11 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import crdListRouteInjectable from "./crd-list-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token";
import crdListRouteInjectable from "./custom-resource-definitions.injectable";
const navigateToCrdListInjectable = getInjectable({
id: "navigate-to-crd-list",
const navigateToCustomResourceDefinitionsInjectable = getInjectable({
id: "navigate-to-custom-resource-definitions",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
@ -17,4 +17,4 @@ const navigateToCrdListInjectable = getInjectable({
},
});
export default navigateToCrdListInjectable;
export default navigateToCustomResourceDefinitionsInjectable;

View File

@ -3,19 +3,20 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { navigateToRouteInjectionToken } from "../../../navigate-to-route-injection-token";
import type { CustomResourcesPathParameters } from "./custom-resources-route.injectable";
import customResourcesRouteInjectable from "./custom-resources-route.injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
export type NavigateToCustomResources = (parameters: CustomResourcesPathParameters) => void;
const navigateToCustomResourcesInjectable = getInjectable({
id: "navigate-to-custom-resources",
instantiate: (di) => {
instantiate: (di): NavigateToCustomResources => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(customResourcesRouteInjectable);
return (parameters?: CustomResourcesPathParameters) =>
navigateToRoute(route, { parameters });
return (parameters) => navigateToRoute(route, { parameters });
},
});

View File

@ -0,0 +1,24 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
import { shouldShowResourceInjectionToken } from "../../../../../../features/cluster/showing-kube-resources/common/allowed-resources-injection-token";
const ingressClassesRouteInjectable = getInjectable({
id: "ingress-classes-route",
instantiate: (di) => ({
path: "/ingress-classes",
clusterFrame: true,
isEnabled: di.inject(shouldShowResourceInjectionToken, {
apiName: "ingressclasses",
group: "networking.k8s.io",
}),
}),
injectionToken: frontEndRouteInjectionToken,
});
export default ingressClassesRouteInjectable;

View File

@ -1,30 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { frontEndRouteInjectionToken } from "../../../../front-end-route-injection-token";
import {
shouldShowResourceInjectionToken,
} from "../../../../../../features/cluster/showing-kube-resources/common/allowed-resources-injection-token";
const ingressClassesesRouteInjectable = getInjectable({
id: "ingress-classes-route",
instantiate: (di) => {
const isEnabled = di.inject(shouldShowResourceInjectionToken, {
apiName: "ingressclasses",
group: "networking.k8s.io",
});
return {
path: "/ingress-classes",
clusterFrame: true,
isEnabled,
};
},
injectionToken: frontEndRouteInjectionToken,
});
export default ingressClassesesRouteInjectable;

View File

@ -4,14 +4,14 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { navigateToRouteInjectionToken } from "../../../../navigate-to-route-injection-token";
import ingressClassesesRouteInjectable from "./ingress-classeses-route.injectable";
import ingressClassesRouteInjectable from "./ingress-classes-route.injectable";
const navigateToIngressesInjectable = getInjectable({
id: "navigate-to-ingress-classes",
instantiate: (di) => {
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
const route = di.inject(ingressClassesesRouteInjectable);
const route = di.inject(ingressClassesRouteInjectable);
return () => navigateToRoute(route);
},

View File

@ -26,12 +26,11 @@ export type ImplInitializableInjectionTokensArgs<T> = {
token: Initializable<T>;
init: (di: DiContainerForInjection) => T | Promise<T>;
} & (
{
| {
phase: InjectionToken<Runnable<void>, void>;
runAfter?: Injectable<Runnable<void>, Runnable<void>, void>[];
}
|
{
| {
runAfter: Injectable<Runnable<void>, Runnable<void>, void>;
phase?: undefined;
}

View File

@ -11,13 +11,12 @@ import { getDiForUnitTesting } from "../../../renderer/getDiForUnitTesting";
import storesAndApisCanBeCreatedInjectable from "../../../renderer/stores-apis-can-be-created.injectable";
import directoryForKubeConfigsInjectable from "../../app-paths/directory-for-kube-configs/directory-for-kube-configs.injectable";
import directoryForUserDataInjectable from "../../app-paths/directory-for-user-data/directory-for-user-data.injectable";
import { loggerInjectionToken } from "@k8slens/logger";
import { logErrorInjectionToken, loggerInjectionToken, logInfoInjectionToken, logWarningInjectionToken } from "@k8slens/logger";
import type { ApiManager } from "../api-manager";
import apiManagerInjectable from "../api-manager/manager.injectable";
import { KubeApi } from "../kube-api";
import { KubeApi } from "@k8slens/kube-api";
import { KubeObject } from "@k8slens/kube-object";
import { KubeObjectStore } from "../kube-object.store";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
// eslint-disable-next-line no-restricted-imports
import { KubeApi as ExternalKubeApi } from "../../../extensions/common-api/k8s-api";
@ -25,6 +24,7 @@ import { Cluster } from "../../cluster/cluster";
import { runInAction } from "mobx";
import { customResourceDefinitionApiInjectionToken } from "../api-manager/crd-api-token";
import assert from "assert";
import { maybeKubeApiInjectable } from "@k8slens/kube-api-specifics";
class TestApi extends KubeApi<KubeObject> {
protected checkPreferredVersion() {
@ -61,7 +61,9 @@ describe("ApiManager", () => {
const apiBase = "api/v1/foo";
const fallbackApiBase = "/apis/extensions/v1beta1/foo";
const kubeApi = new TestApi({
logger: di.inject(loggerInjectionToken),
logError: di.inject(logErrorInjectionToken),
logInfo: di.inject(logInfoInjectionToken),
logWarn: di.inject(logWarningInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
}, {
objectConstructor: KubeObject,
@ -136,7 +138,9 @@ describe("ApiManager", () => {
return Object.assign(
new KubeApi({
logger: di.inject(loggerInjectionToken),
logError: di.inject(logErrorInjectionToken),
logInfo: di.inject(logInfoInjectionToken),
logWarn: di.inject(logWarningInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
}, { objectConstructor }),
{

View File

@ -1,52 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getDiForUnitTesting } from "../../../renderer/getDiForUnitTesting";
import storesAndApisCanBeCreatedInjectable from "../../../renderer/stores-apis-can-be-created.injectable";
import apiKubeInjectable from "../../../renderer/k8s/api-kube.injectable";
import type { DeploymentApi } from "../endpoints/deployment.api";
import deploymentApiInjectable from "../endpoints/deployment.api.injectable";
import type { KubeJsonApi } from "../kube-json-api";
describe("DeploymentApi", () => {
let deploymentApi: DeploymentApi;
let kubeJsonApi: jest.Mocked<KubeJsonApi>;
beforeEach(() => {
const di = getDiForUnitTesting();
di.override(storesAndApisCanBeCreatedInjectable, () => true);
kubeJsonApi = {
getResponse: jest.fn(),
get: jest.fn(),
post: jest.fn(),
put: jest.fn(),
patch: jest.fn(),
del: jest.fn(),
} as never;
di.override(apiKubeInjectable, () => kubeJsonApi);
deploymentApi = di.inject(deploymentApiInjectable);
});
describe("scale", () => {
it("requests Kubernetes API with PATCH verb and correct amount of replicas", async () => {
await deploymentApi.scale({ namespace: "default", name: "deployment-1" }, 5);
expect(kubeJsonApi.patch).toHaveBeenCalledWith("/apis/apps/v1/namespaces/default/deployments/deployment-1/scale", {
data: {
spec: {
replicas: 5,
},
},
},
{
headers: {
"content-type": "application/merge-patch+json",
},
});
});
});
});

View File

@ -3,8 +3,8 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import type { ApiManager } from "../api-manager";
import type { IngressApi } from "../endpoints";
import { HorizontalPodAutoscalerApi } from "../endpoints";
import type { IngressApi } from "@k8slens/kube-api";
import { HorizontalPodAutoscalerApi } from "@k8slens/kube-api";
import { Ingress } from "@k8slens/kube-object";
import { getDiForUnitTesting } from "../../../renderer/getDiForUnitTesting";
import type { Fetch } from "../../fetch/fetch.injectable";
@ -20,9 +20,8 @@ import hostedClusterInjectable from "../../../renderer/cluster-frame-context/hos
import directoryForKubeConfigsInjectable from "../../app-paths/directory-for-kube-configs/directory-for-kube-configs.injectable";
import apiManagerInjectable from "../api-manager/manager.injectable";
import type { DiContainer } from "@ogre-tools/injectable";
import ingressApiInjectable from "../endpoints/ingress.api.injectable";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
import { ingressApiInjectable, maybeKubeApiInjectable } from "@k8slens/kube-api-specifics";
import { logErrorInjectionToken, logInfoInjectionToken, logWarningInjectionToken } from "@k8slens/logger";
import { Cluster } from "../../cluster/cluster";
describe("KubeApi", () => {
@ -710,7 +709,9 @@ describe("KubeApi", () => {
beforeEach(async () => {
horizontalPodAutoscalerApi = new HorizontalPodAutoscalerApi({
logger: di.inject(loggerInjectionToken),
logError: di.inject(logErrorInjectionToken),
logInfo: di.inject(logInfoInjectionToken),
logWarn: di.inject(logWarningInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
}, {
allowedUsableVersions: {

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
*/
import { noop } from "@k8slens/utilities";
import type { KubeApi } from "../kube-api";
import type { KubeApi } from "@k8slens/kube-api";
import { KubeObject } from "@k8slens/kube-object";
import type { KubeObjectStoreLoadingParams } from "../kube-object.store";
import { KubeObjectStore } from "../kube-object.store";

View File

@ -7,9 +7,9 @@ import type { KubeObjectStore } from "../kube-object.store";
import type { IComputedValue } from "mobx";
import { autorun, action, observable } from "mobx";
import type { KubeApi } from "../kube-api";
import type { KubeApi } from "@k8slens/kube-api";
import type { KubeObject, ObjectReference } from "@k8slens/kube-object";
import { parseKubeApi, createKubeApiURL } from "../kube-api-parse";
import { parseKubeApi, createKubeApiURL } from "@k8slens/kube-api";
import { getOrInsertWith, iter } from "@k8slens/utilities";
import type { CreateCustomResourceStore } from "./create-custom-resource-store.injectable";

View File

@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import EventEmitter from "events";
import type TypedEventEmitter from "typed-emitter";
import type { KubeApi } from "../kube-api";
import type { KubeApi } from "@k8slens/kube-api";
export interface LegacyAutoRegistration {
kubeApi: (api: KubeApi<any, any>) => void;

View File

@ -4,7 +4,7 @@
*/
import { getInjectionToken } from "@ogre-tools/injectable";
import type { KubeApi } from "../kube-api";
import type { KubeApi } from "@k8slens/kube-api";
export const customResourceDefinitionApiInjectionToken = getInjectionToken<KubeApi>({
id: "custom-resource-definition-api-token",

View File

@ -5,7 +5,7 @@
import { getInjectable } from "@ogre-tools/injectable";
import clusterFrameContextForNamespacedResourcesInjectable from "../../../renderer/cluster-frame-context/for-namespaced-resources.injectable";
import { loggerInjectionToken } from "@k8slens/logger";
import type { KubeApi } from "../kube-api";
import type { KubeApi } from "@k8slens/kube-api";
import type { KubeObject } from "@k8slens/kube-object";
import type { KubeObjectStoreDependencies } from "../kube-object.store";
import { CustomResourceStore } from "./resource.store";

View File

@ -3,11 +3,10 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { ApiManager } from "./api-manager";
import { computedInjectManyInjectable } from "@ogre-tools/injectable-extension-for-mobx";
import { kubeObjectStoreInjectionToken } from "./kube-object-store-token";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { kubeApiInjectionToken, storesAndApisCanBeCreatedInjectionToken } from "@k8slens/kube-api-specifics";
import { computed } from "mobx";
import { customResourceDefinitionApiInjectionToken } from "./crd-api-token";
import createCustomResourceStoreInjectable from "./create-custom-resource-store.injectable";

View File

@ -3,7 +3,7 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import type { KubeApi } from "../kube-api";
import type { KubeApi } from "@k8slens/kube-api";
import type { KubeObjectStoreDependencies } from "../kube-object.store";
import { KubeObjectStore } from "../kube-object.store";
import type { KubeObject } from "@k8slens/kube-object";

View File

@ -3,13 +3,13 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { loggerInjectionToken } from "@k8slens/logger";
import { logErrorInjectionToken, logInfoInjectionToken, logWarningInjectionToken } from "@k8slens/logger";
import { apiKubePrefix } from "../vars";
import isDevelopmentInjectable from "../vars/is-development.injectable";
import apiBaseInjectable from "./api-base.injectable";
import type { KubeApiConstructor } from "./create-kube-api-for-remote-cluster.injectable";
import createKubeJsonApiInjectable from "./create-kube-json-api.injectable";
import { KubeApi } from "./kube-api";
import { KubeApi } from "@k8slens/kube-api";
import type { KubeJsonApiDataFor, KubeObject, KubeObjectConstructor } from "@k8slens/kube-object";
export interface CreateKubeApiForLocalClusterConfig {
@ -37,7 +37,9 @@ const createKubeApiForClusterInjectable = getInjectable({
const apiBase = di.inject(apiBaseInjectable);
const isDevelopment = di.inject(isDevelopmentInjectable);
const createKubeJsonApi = di.inject(createKubeJsonApiInjectable);
const logger = di.inject(loggerInjectionToken);
const logError = di.inject(logErrorInjectionToken);
const logInfo = di.inject(logInfoInjectionToken);
const logWarn = di.inject(logWarningInjectionToken);
return (
cluster: CreateKubeApiForLocalClusterConfig,
@ -64,7 +66,9 @@ const createKubeApiForClusterInjectable = getInjectable({
return new KubeApi(
{
logger,
logError,
logInfo,
logWarn,
maybeKubeApi: undefined,
},
{

View File

@ -6,11 +6,11 @@ import { getInjectable } from "@ogre-tools/injectable";
import type { AgentOptions } from "https";
import { Agent } from "https";
import type { RequestInit } from "@k8slens/node-fetch";
import { loggerInjectionToken } from "@k8slens/logger";
import { logErrorInjectionToken, logInfoInjectionToken, logWarningInjectionToken } from "@k8slens/logger";
import isDevelopmentInjectable from "../vars/is-development.injectable";
import createKubeJsonApiInjectable from "./create-kube-json-api.injectable";
import type { KubeApiOptions } from "./kube-api";
import { KubeApi } from "./kube-api";
import type { KubeApiOptions } from "@k8slens/kube-api";
import { KubeApi } from "@k8slens/kube-api";
import type { KubeJsonApiDataFor, KubeObject, KubeObjectConstructor } from "@k8slens/kube-object";
export interface CreateKubeApiForRemoteClusterConfig {
@ -53,7 +53,9 @@ const createKubeApiForRemoteClusterInjectable = getInjectable({
instantiate: (di): CreateKubeApiForRemoteCluster => {
const isDevelopment = di.inject(isDevelopmentInjectable);
const createKubeJsonApi = di.inject(createKubeJsonApiInjectable);
const logger = di.inject(loggerInjectionToken);
const logError = di.inject(logErrorInjectionToken);
const logInfo = di.inject(logInfoInjectionToken);
const logWarn = di.inject(logWarningInjectionToken);
return (
config: CreateKubeApiForRemoteClusterConfig,
@ -110,7 +112,9 @@ const createKubeApiForRemoteClusterInjectable = getInjectable({
return new KubeApi(
{
logger,
logError,
logInfo,
logWarn,
maybeKubeApi: undefined,
},
{

View File

@ -3,9 +3,9 @@
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { loggerInjectionToken } from "@k8slens/logger";
import type { DerivedKubeApiOptions, KubeApiDependencies } from "./kube-api";
import maybeKubeApiInjectable from "./maybe-kube-api.injectable";
import { logErrorInjectionToken, logInfoInjectionToken, logWarningInjectionToken } from "@k8slens/logger";
import type { DerivedKubeApiOptions, KubeApiDependencies } from "@k8slens/kube-api";
import { maybeKubeApiInjectable } from "@k8slens/kube-api-specifics";
export interface CreateKubeApi {
<Api>(ctor: new (deps: KubeApiDependencies, opts: DerivedKubeApiOptions) => Api, opts?: DerivedKubeApiOptions): Api;
@ -15,7 +15,9 @@ const createKubeApiInjectable = getInjectable({
id: "create-kube-api",
instantiate: (di): CreateKubeApi => {
const deps: KubeApiDependencies = {
logger: di.inject(loggerInjectionToken),
logError: di.inject(logErrorInjectionToken),
logInfo: di.inject(logInfoInjectionToken),
logWarn: di.inject(logWarningInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
};

View File

@ -7,7 +7,7 @@ import { apiKubePrefix } from "../vars";
import isDebuggingInjectable from "../vars/is-debugging.injectable";
import { apiBaseHostHeaderInjectionToken, apiBaseServerAddressInjectionToken } from "./api-base-configs";
import createKubeJsonApiInjectable from "./create-kube-json-api.injectable";
import type { KubeJsonApi } from "./kube-json-api";
import type { KubeJsonApi } from "@k8slens/kube-api";
export type CreateKubeJsonApiForCluster = (clusterId: string) => KubeJsonApi;

View File

@ -9,7 +9,7 @@ import lensProxyCertificateInjectable from "../certificate/lens-proxy-certificat
import fetchInjectable from "../fetch/fetch.injectable";
import { loggerInjectionToken } from "@k8slens/logger";
import type { JsonApiConfig, JsonApiDependencies } from "@k8slens/json-api";
import { KubeJsonApi } from "./kube-json-api";
import { KubeJsonApi } from "@k8slens/kube-api";
export type CreateKubeJsonApi = (config: JsonApiConfig, reqInit?: RequestInit) => KubeJsonApi;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { ClusterRoleBindingApi } from "./cluster-role-binding.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const clusterRoleBindingApiInjectable = getInjectable({
id: "cluster-role-binding-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "clusterRoleBindingApi is only accessible in certain environments");
return new ClusterRoleBindingApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default clusterRoleBindingApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { ClusterRoleApi } from "./cluster-role.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const clusterRoleApiInjectable = getInjectable({
id: "cluster-role-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "clusterRoleApi is only available in certain environments");
return new ClusterRoleApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default clusterRoleApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { ClusterApi } from "./cluster.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const clusterApiInjectable = getInjectable({
id: "cluster-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "clusterApi is only available in certain environments");
return new ClusterApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default clusterApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { ComponentStatusApi } from "./component-status.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
import { loggerInjectionToken } from "@k8slens/logger";
const componentStatusApiInjectable = getInjectable({
id: "component-status-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "componentStatusApi is only available in certain environments");
return new ComponentStatusApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default componentStatusApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { ConfigMapApi } from "./config-map.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const configMapApiInjectable = getInjectable({
id: "config-map-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "configMapApi is only available in certain environments");
return new ConfigMapApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default configMapApiInjectable;

View File

@ -1,29 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { CronJobApi } from "./cron-job.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const cronJobApiInjectable = getInjectable({
id: "cron-job-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "cronJobApi is only available in certain environments");
return new CronJobApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
}, {
checkPreferredVersion: true,
});
},
injectionToken: kubeApiInjectionToken,
});
export default cronJobApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { CustomResourceDefinitionApi } from "./custom-resource-definition.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
import { loggerInjectionToken } from "@k8slens/logger";
const customResourceDefinitionApiInjectable = getInjectable({
id: "custom-resource-definition-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "customResourceDefinitionApi is only available in certain environments");
return new CustomResourceDefinitionApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default customResourceDefinitionApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { DaemonSetApi } from "./daemon-set.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const daemonSetApiInjectable = getInjectable({
id: "daemon-set-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "daemonSetApi is only available in certain environments");
return new DaemonSetApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default daemonSetApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { DeploymentApi } from "./deployment.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const deploymentApiInjectable = getInjectable({
id: "deployment-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "deploymentApi is only available in certain environments");
return new DeploymentApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default deploymentApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { EndpointsApi } from "./endpoint.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const endpointsApiInjectable = getInjectable({
id: "endpoints-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "endpointsApi is only available in certain environments");
return new EndpointsApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default endpointsApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { KubeEventApi } from "./events.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const kubeEventApiInjectable = getInjectable({
id: "kube-event-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "kubeEventApi is only available in certain environments");
return new KubeEventApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default kubeEventApiInjectable;

View File

@ -8,7 +8,7 @@ import apiBaseInjectable from "../../api-base.injectable";
export type RequestHelmReleaseRollback = (name: string, namespace: string, revision: number) => Promise<void>;
const requestRollbackEndpoint = urlBuilderFor("/v2/releases/:namespace/:name");
const requestRollbackEndpoint = urlBuilderFor("/v2/releases/:namespace/:name/rollback");
const requestHelmReleaseRollbackInjectable = getInjectable({
id: "request-helm-release-rollback",

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { HorizontalPodAutoscalerApi } from "./horizontal-pod-autoscaler.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const horizontalPodAutoscalerApiInjectable = getInjectable({
id: "horizontal-pod-autoscaler-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "horizontalPodAutoscalerApi is only available in certain environments");
return new HorizontalPodAutoscalerApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default horizontalPodAutoscalerApiInjectable;

View File

@ -1,21 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { IngressClassApi } from "./ingress-class.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const ingressClassApiInjectable = getInjectable({
id: "ingress-class-api",
instantiate: (di) => new IngressClassApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
}),
injectionToken: kubeApiInjectionToken,
});
export default ingressClassApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { IngressApi } from "./ingress.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const ingressApiInjectable = getInjectable({
id: "ingress-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "ingressApi is only available in certain environments");
return new IngressApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default ingressApiInjectable;

View File

@ -1,29 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { JobApi } from "./job.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const jobApiInjectable = getInjectable({
id: "job-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "jobApi is only available in certain environments");
return new JobApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
}, {
checkPreferredVersion: true,
});
},
injectionToken: kubeApiInjectionToken,
});
export default jobApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { LeaseApi } from "./lease.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const leaseApiInjectable = getInjectable({
id: "lease-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "leaseApi is only available in certain environments");
return new LeaseApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default leaseApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { LimitRangeApi } from "./limit-range.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const limitRangeApiInjectable = getInjectable({
id: "limit-range-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "limitRangeApi is only available in certain environments");
return new LimitRangeApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default limitRangeApiInjectable;

View File

@ -4,7 +4,7 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import type { MetricData } from "../metrics.api";
import type { Pod } from "@k8slens/kube-object";
import type { Pod, Container } from "@k8slens/kube-object";
import requestMetricsInjectable from "./request-metrics.injectable";
export interface PodMetricData {
@ -21,16 +21,16 @@ export interface PodMetricData {
memoryLimits: MetricData;
}
export type RequestPodMetrics = (pods: Pod[], namespace: string, selector?: string) => Promise<PodMetricData>;
export type RequestPodMetrics = (pods: Pod[], namespace: string, container?: Container, selector?: string) => Promise<PodMetricData>;
const requestPodMetricsInjectable = getInjectable({
id: "request-pod-metrics",
instantiate: (di): RequestPodMetrics => {
const requestMetrics = di.inject(requestMetricsInjectable);
return (pods, namespace, selector = "pod, namespace") => {
return (pods, namespace, container, selector = "pod, namespace") => {
const podSelector = pods.map(pod => pod.getName()).join("|");
const opts = { category: "pods", pods: podSelector, namespace, selector };
const opts = { category: "pods", pods: podSelector, container: container?.name, namespace, selector };
return requestMetrics({
cpuUsage: opts,

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
import { MutatingWebhookConfigurationApi } from "./mutating-webhook-configuration.api";
const mutatingWebhookConfigurationApiInjectable = getInjectable({
id: "mutating-webhook-configuration",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "mutatingWebhookApi is only available in certain environments");
return new MutatingWebhookConfigurationApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default mutatingWebhookConfigurationApiInjectable;

View File

@ -1,28 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { NamespaceApi } from "./namespace.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const namespaceApiInjectable = getInjectable({
id: "namespace-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "namespaceApi is only available in certain environments");
return new NamespaceApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default namespaceApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { NetworkPolicyApi } from "./network-policy.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const networkPolicyApiInjectable = getInjectable({
id: "network-policy-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "networkPolicyApi is only available in certain environments");
return new NetworkPolicyApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default networkPolicyApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { NodeApi } from "./node.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const nodeApiInjectable = getInjectable({
id: "node-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "nodeApi is only available in certain environments");
return new NodeApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default nodeApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { PersistentVolumeClaimApi } from "./persistent-volume-claim.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const persistentVolumeClaimApiInjectable = getInjectable({
id: "persistent-volume-claim-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "persistentVolumeClaimApi is only available in certain environments");
return new PersistentVolumeClaimApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default persistentVolumeClaimApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { PersistentVolumeApi } from "./persistent-volume.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const persistentVolumeApiInjectable = getInjectable({
id: "persistent-volume-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "persistentVolumeApi is only available in certain environments");
return new PersistentVolumeApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default persistentVolumeApiInjectable;

View File

@ -1,35 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { PodDisruptionBudgetApi } from "./pod-disruption-budget.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const podDisruptionBudgetApiInjectable = getInjectable({
id: "pod-disruption-budget-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "podDisruptionBudgetApi is only available in certain environments");
return new PodDisruptionBudgetApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
}, {
checkPreferredVersion: true,
allowedUsableVersions: {
policy: [
"v1",
"v1beta1",
],
},
});
},
injectionToken: kubeApiInjectionToken,
});
export default podDisruptionBudgetApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { PodMetricsApi } from "./pod-metrics.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const podMetricsApiInjectable = getInjectable({
id: "pod-metrics-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "podMetricsApi is only available in certain environments");
return new PodMetricsApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default podMetricsApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { PodSecurityPolicyApi } from "./pod-security-policy.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const podSecurityPolicyApiInjectable = getInjectable({
id: "pod-security-policy-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "podSecurityPolicyApi is only available in certain environments");
return new PodSecurityPolicyApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default podSecurityPolicyApiInjectable;

View File

@ -1,28 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { PodApi } from "./pod.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const podApiInjectable = getInjectable({
id: "pod-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "podApi is only available in certain environments");
return new PodApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default podApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { PriorityClassApi } from "./priority-class.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const priorityClassApiInjectable = getInjectable({
id: "priority-class-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "PriorityClassApi is only available in certain environments");
return new PriorityClassApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default priorityClassApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { ReplicaSetApi } from "./replica-set.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const replicaSetApiInjectable = getInjectable({
id: "replica-set-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "replicaSetApi is only available in certain environments");
return new ReplicaSetApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default replicaSetApiInjectable;

View File

@ -1,23 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
import { ReplicationControllerApi } from "./replication-controller.api";
const replicationControllerApiInjectable = getInjectable({
id: "replication-controller-api",
instantiate: (di) => {
return new ReplicationControllerApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default replicationControllerApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { ResourceQuotaApi } from "./resource-quota.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const resourceQuotaApiInjectable = getInjectable({
id: "resource-quota-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "resourceQuotaApi is only available in certain environments");
return new ResourceQuotaApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default resourceQuotaApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { RoleBindingApi } from "./role-binding.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const roleBindingApiInjectable = getInjectable({
id: "role-binding-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "roleBindingApi is only available in certain environments");
return new RoleBindingApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default roleBindingApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { RoleApi } from "./role.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const roleApiInjectable = getInjectable({
id: "role-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "roleApi is only available in certain environments");
return new RoleApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default roleApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { RuntimeClassApi } from "./runtime-class.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const runtimeClassApiInjectable = getInjectable({
id: "runtime-class-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "RuntimeClassApi is only available in certain environments");
return new RuntimeClassApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default runtimeClassApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { SecretApi } from "./secret.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const secretApiInjectable = getInjectable({
id: "secret-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "secretApi is only available in certain environments");
return new SecretApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default secretApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { SelfSubjectRulesReviewApi } from "./self-subject-rules-reviews.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const selfSubjectRulesReviewApiInjectable = getInjectable({
id: "self-subject-rules-review-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "selfSubjectRulesReviewApi is only available in certain environments");
return new SelfSubjectRulesReviewApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default selfSubjectRulesReviewApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { ServiceAccountApi } from "./service-account.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const serviceAccountApiInjectable = getInjectable({
id: "service-account-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "serviceAccountApi is only available in certain environments");
return new ServiceAccountApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default serviceAccountApiInjectable;

View File

@ -1,27 +0,0 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { getInjectable } from "@ogre-tools/injectable";
import assert from "assert";
import { storesAndApisCanBeCreatedInjectionToken } from "../stores-apis-can-be-created.token";
import { ServiceApi } from "./service.api";
import { kubeApiInjectionToken } from "../kube-api/kube-api-injection-token";
import { loggerInjectionToken } from "@k8slens/logger";
import maybeKubeApiInjectable from "../maybe-kube-api.injectable";
const serviceApiInjectable = getInjectable({
id: "service-api",
instantiate: (di) => {
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "serviceApi is only available in certain environments");
return new ServiceApi({
logger: di.inject(loggerInjectionToken),
maybeKubeApi: di.inject(maybeKubeApiInjectable),
});
},
injectionToken: kubeApiInjectionToken,
});
export default serviceApiInjectable;

Some files were not shown because too many files have changed in this diff Show More