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