mirror of https://github.com/keeweb/keeweb.git
moved isDev to utils
This commit is contained in:
parent
9377a849f6
commit
ef573336d8
|
@ -10,6 +10,7 @@ const path = require('path');
|
|||
const fs = require('fs');
|
||||
const url = require('url');
|
||||
const { Logger } = require('./scripts/logger');
|
||||
const { isDev } = require('./scripts/util/app-info');
|
||||
|
||||
perfTimestamps?.push({ name: 'loading app requires', ts: process.hrtime() });
|
||||
|
||||
|
@ -28,8 +29,6 @@ let mainWindowMaximized = false;
|
|||
const windowPositionFileName = 'window-position.json';
|
||||
const portableConfigFileName = 'keeweb-portable.json';
|
||||
|
||||
const isDev = !__dirname.endsWith('.asar');
|
||||
|
||||
const startupLogging =
|
||||
process.argv.some((arg) => arg.startsWith('--startup-logging')) ||
|
||||
process.env.KEEWEB_STARTUP_LOGGING === '1';
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const { ipcMain } = require('electron');
|
||||
const { readXoredValue, makeXoredValue } = require('../util/byte-utils');
|
||||
const { reqNative } = require('../util/req-native');
|
||||
const { isDev } = require('../util/app-info');
|
||||
|
||||
ipcMain.handle('hardwareCryptoDeleteKey', hardwareCryptoDeleteKey);
|
||||
ipcMain.handle('hardwareEncrypt', hardwareEncrypt);
|
||||
|
@ -40,7 +41,6 @@ async function hardwareCrypto(value, encrypt, touchIdPrompt) {
|
|||
const data = readXoredValue(value);
|
||||
|
||||
let res;
|
||||
const isDev = !__dirname.includes('.asar');
|
||||
if (isDev && process.env.KEEWEB_EMULATE_HARDWARE_ENCRYPTION) {
|
||||
const crypto = require('crypto');
|
||||
if (!testCipherParams) {
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export const isDev = !__dirname.includes('.asar');
|
Loading…
Reference in New Issue