Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
startInCloneMode: (function (prim) {
return Testkit$1.startInCloneMode(prim);
})
};
startInCloneMode: localSite => {
return corvidLocalServerTestkit.startInCloneMode(
localSite[LOCAL_SITE_PATH]
);
}
};
startInEditMode: (function (prim) {
return Testkit$1.startInEditMode(prim);
}),
startInCloneMode: (function (prim) {
startInEditMode: localSite => {
return corvidLocalServerTestkit.startInEditMode(localSite[LOCAL_SITE_PATH]);
},
startInCloneMode: localSite => {
async function connectToLocalServer(serverMode, serverArgs, win) {
const server =
serverMode === "edit"
? startInEditMode(".", serverArgs)
: startInCloneMode(".", serverArgs);
const {
adminPort: localServerPort,
adminToken: token,
close: closeLocalServer
} = await server;
win.webContents.on("will-prevent-unload", async event => {
console.log(JSON.stringify({ event: "closingWithUnsavedChanges" }));
const choice = process.env.SKIP_UNSAVED_DIALOG
? 1
: await electron.dialog.showMessageBox(win, beforeCloseDialogParams);
const leave = choice === 0;
if (leave) {
event.preventDefault();
}
async function connectToLocalServer(serverMode, serverArgs, win) {
const server =
serverMode === "edit"
? startInEditMode(".", serverArgs)
: startInCloneMode(".", serverArgs);
const {
adminPort: localServerPort,
adminToken: token,
close: closeLocalServer
} = await server;
win.webContents.on("will-prevent-unload", async event => {
console.log(JSON.stringify({ event: "closingWithUnsavedChanges" }));
const choice = process.env.SKIP_UNSAVED_DIALOG
? 1
: await electron.dialog.showMessageBox(win, beforeCloseDialogParams);
const leave = choice === 0;
if (leave) {
event.preventDefault();