Persist apiVersion when editing resources in monaco (#4406)

* Persist apiVersion when editing resources in monaco

- Use a new custom k8slens prefixed label

- Means that users aren't surprised when they use lens to update a
  resource to a new apiVersionWithGroup

- Doesn't touch the versions in the stores

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix lint

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* fix: Fix lint issues

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* chore: make lint not bail on failure

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* chore: Run lint:fix on all files

Signed-off-by: Sebastian Malton <sebastian@malton.name>

---------

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2023-04-05 10:56:23 -04:00
1 parent 058494bc73
commit 807f98ed1b
57 files changed
+295 -400

No files matched your search

@@ -13,9 +13,7 @@ const startApplicationInjectable = getInjectable({
instantiate: (di): StartApplication => {
const runManyAsync = runManyFor(di);
const beforeApplicationIsLoading = runManyAsync(
timeSlots.beforeApplicationIsLoadingInjectionToken,
);
const beforeApplicationIsLoading = runManyAsync(timeSlots.beforeApplicationIsLoadingInjectionToken);
const onLoadOfApplication = runManyAsync(timeSlots.onLoadOfApplicationInjectionToken);
const afterApplicationIsLoaded = runManyAsync(timeSlots.afterApplicationIsLoadedInjectionToken);
@@ -1,9 +1,4 @@
import {
DiContainer,
getInjectable,
instantiationDecoratorToken,
lifecycleEnum,
} from "@ogre-tools/injectable";
import { DiContainer, getInjectable, instantiationDecoratorToken, lifecycleEnum } from "@ogre-tools/injectable";
import { startApplicationInjectionToken } from "@k8slens/application";
import whenAppIsReadyInjectable from "./when-app-is-ready.injectable";
import { beforeAnythingInjectionToken, beforeElectronIsReadyInjectionToken } from "./time-slots";
@@ -1,10 +1,7 @@
import { createContainer, DiContainer, getInjectable } from "@ogre-tools/injectable";
import { registerFeature } from "@k8slens/feature-core";
import { applicationFeatureForElectronMain } from "./feature";
import {
beforeApplicationIsLoadingInjectionToken,
startApplicationInjectionToken,
} from "@k8slens/application";
import { beforeApplicationIsLoadingInjectionToken, startApplicationInjectionToken } from "@k8slens/application";
import asyncFn, { AsyncFnMock } from "@async-fn/jest";
import whenAppIsReadyInjectable from "./start-application/when-app-is-ready.injectable";
import * as timeSlots from "./start-application/time-slots";