mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Adapt to changes in injectable
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
8a78c73e19
commit
6f0686e9a4
31 files changed
+237
-325
No files matched your search
+8
-12
@@ -18,21 +18,17 @@
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
import type { Injectable } from "@ogre-tools/injectable";
|
||||
import { lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { attemptInstalls, Dependencies } from "./attempt-installs";
|
||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||
import { attemptInstalls } from "./attempt-installs";
|
||||
import attemptInstallInjectable from "../attempt-install/attempt-install.injectable";
|
||||
|
||||
const attemptInstallsInjectable: Injectable<
|
||||
(filePaths: string[]) => Promise<void>,
|
||||
Dependencies
|
||||
> = {
|
||||
getDependencies: di => ({
|
||||
attemptInstall: di.inject(attemptInstallInjectable),
|
||||
}),
|
||||
const attemptInstallsInjectable = getInjectable({
|
||||
instantiate: (di) =>
|
||||
attemptInstalls({
|
||||
attemptInstall: di.inject(attemptInstallInjectable),
|
||||
}),
|
||||
|
||||
instantiate: attemptInstalls,
|
||||
lifecycle: lifecycleEnum.singleton,
|
||||
};
|
||||
});
|
||||
|
||||
export default attemptInstallsInjectable;
|
||||
Reference in new issue
Block a user