@todesktop/runtime
Advanced tools
Comparing version 1.1.3 to 1.2.0
import AutoUpdater from "./AutoUpdater"; | ||
import { LoggerInterface } from "./Logger"; | ||
declare type initParams = { | ||
autoUpdater?: boolean; | ||
customLogger?: LoggerInterface; | ||
}; | ||
declare class ToDesktop { | ||
autoUpdater: AutoUpdater; | ||
init({ autoUpdater, customLogger, }?: { | ||
autoUpdater?: boolean; | ||
customLogger?: LoggerInterface; | ||
}): void; | ||
_init({ autoUpdater, customLogger }?: initParams): void; | ||
init(params?: initParams): void; | ||
} | ||
declare const _default: ToDesktop; | ||
export = _default; |
@@ -5,5 +5,5 @@ "use strict"; | ||
const Logger_1 = require("./Logger"); | ||
const IS_SMOKE_TEST_MODE = Boolean(process.env.TODESKTOP_SMOKE_TEST); | ||
class ToDesktop { | ||
// This initializes everything. It must be called (at the top of their main script) | ||
init({ autoUpdater = true, customLogger, } = {}) { | ||
_init({ autoUpdater = true, customLogger } = {}) { | ||
const logger = new Logger_1.default(customLogger); | ||
@@ -25,2 +25,8 @@ if (autoUpdater) { | ||
} | ||
// This initializes everything. It must be called (at the top of their main script) | ||
init(params = {}) { | ||
if (!IS_SMOKE_TEST_MODE) { | ||
this._init(params); | ||
} | ||
} | ||
} | ||
@@ -35,2 +41,8 @@ let todesktop; | ||
} | ||
if (IS_SMOKE_TEST_MODE) { | ||
Promise.resolve().then(() => require("./initSmokeTest")).then(({ default: initSmokeTests }) => initSmokeTests(todesktop)) | ||
.catch(() => { | ||
// Ignore | ||
}); | ||
} | ||
module.exports = todesktop; |
@@ -1,1 +0,1 @@ | ||
export declare const CLIENT_VERSION = "1.1.3"; | ||
export declare const CLIENT_VERSION = "1.2.0"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CLIENT_VERSION = void 0; | ||
exports.CLIENT_VERSION = "1.1.3"; | ||
exports.CLIENT_VERSION = "1.2.0"; |
@@ -7,3 +7,3 @@ { | ||
"name": "@todesktop/runtime", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"license": "MIT", | ||
@@ -10,0 +10,0 @@ "author": "ToDesktop <hi@todesktop.com> (https://www.todesktop.com/)", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
57270
25
965
10