mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Leases view Signed-off-by: Piotr Roszatycki <piotr.roszatycki@gmail.com> * Renamed default exports Signed-off-by: Piotr Roszatycki <piotr.roszatycki@gmail.com>
23 lines
766 B
TypeScript
23 lines
766 B
TypeScript
/**
|
|
* 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";
|
|
|
|
const leaseApiInjectable = getInjectable({
|
|
id: "lease-api",
|
|
instantiate: (di) => {
|
|
assert(di.inject(storesAndApisCanBeCreatedInjectionToken), "leaseApi is only available in certain environments");
|
|
|
|
return new LeaseApi();
|
|
},
|
|
|
|
injectionToken: kubeApiInjectionToken,
|
|
});
|
|
|
|
export default leaseApiInjectable;
|