chore: esm import
This commit is contained in:
parent
f3060f290e
commit
7715cd1bd9
@ -4,7 +4,7 @@ import { ModuleManager } from "../managers/module";
|
||||
import { join, extname } from "path";
|
||||
import { PluginManager } from "../managers/plugin";
|
||||
import { WindowManager } from "../managers/window";
|
||||
const pacote = require("pacote");
|
||||
import { manifest, tarball } from "pacote";
|
||||
|
||||
export function handlePluginIPCs() {
|
||||
/**
|
||||
@ -107,10 +107,9 @@ export function handlePluginIPCs() {
|
||||
app.getPath("userData"),
|
||||
pluginName.replace(/^@.*\//, "") + ".tgz"
|
||||
);
|
||||
return pacote
|
||||
.manifest(pluginName)
|
||||
return manifest(pluginName)
|
||||
.then(async (manifest: any) => {
|
||||
await pacote.tarball(manifest._resolved).then((data: Buffer) => {
|
||||
await tarball(manifest._resolved).then((data: Buffer) => {
|
||||
writeFileSync(destination, data);
|
||||
});
|
||||
})
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { app, dialog } from "electron";
|
||||
import { WindowManager } from "../managers/window";
|
||||
|
||||
const { autoUpdater } = require("electron-updater");
|
||||
import { autoUpdater } from "electron-updater";
|
||||
|
||||
export function handleAppUpdates() {
|
||||
/* Should not check for update during development */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user