@todesktop/runtime
Advanced tools
Comparing version 0.0.3 to 0.1.0-rc.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// eslint-disable-next-line | ||
// @ts-ignore | ||
const electron_1 = require("electron"); | ||
const electron_updater_1 = require("electron-updater"); | ||
const init = () => { | ||
electron_1.app.on("will-finish-launching", () => { | ||
electron_updater_1.autoUpdater.checkForUpdatesAndNotify(); | ||
}); | ||
}; | ||
module.exports = { init }; | ||
const electron = require("electron"); | ||
const AutoUpdater_1 = require("./AutoUpdater"); | ||
class ToDesktop { | ||
// This initializes everything. It must be called (at the top of their main script) | ||
init({ autoUpdater = true } = {}) { | ||
if (!electron.app.isPackaged) { | ||
// eslint-disable-next-line no-console | ||
console.log("@todesktop/runtime: skipping autoUpdater initialization because application is not packed. todesktop.autoUpdater.* methods will not exist"); | ||
return; | ||
} | ||
if (autoUpdater) { | ||
this.autoUpdater = new AutoUpdater_1.default(); | ||
} | ||
else { | ||
// Disables the default behaviour | ||
this.autoUpdater = new AutoUpdater_1.default({ | ||
autoCheckInterval: 0, | ||
shouldAutoCheckOnLaunch: false, | ||
shouldNotify: false, | ||
}); | ||
} | ||
} | ||
} | ||
module.exports = new ToDesktop(); |
{ | ||
"private": false, | ||
"name": "@todesktop/runtime", | ||
"version": "0.0.3", | ||
"version": "0.1.0-rc.0", | ||
"license": "MIT", | ||
@@ -14,5 +14,7 @@ "author": "Adam Lynch <contact@adamlynch.com> (http://adamlynch.com/)", | ||
"build": "tsc --skipLibCheck --declaration -p .", | ||
"clear-test-cache": "ava reset-cache", | ||
"lint": "tsc --noEmit --skipLibCheck && eslint . --ext .js,.ts,.tsx", | ||
"lint--fix": "tsc --noEmit --skipLibCheck && eslint . --ext .js,.ts,.tsx --fix", | ||
"release": "npm run lint && npm run build && npx np", | ||
"lint": "tslint -p .", | ||
"test": "echo 'No tests yet'" | ||
"test": "npm run build && ava" | ||
}, | ||
@@ -26,8 +28,58 @@ "files": [ | ||
"dependencies": { | ||
"electron-updater": "^4.2.2" | ||
"electron-updater": "^4.2.2", | ||
"eventemitter2": "^6.3.1", | ||
"lodash.once": "^4.1.1" | ||
}, | ||
"devDependencies": { | ||
"tslint": "^6.0.0", | ||
"typescript": "^3.8.3" | ||
"@ava/babel": "^1.0.1", | ||
"@ava/typescript": "^1.1.1", | ||
"@babel/core": "^7.9.0", | ||
"@babel/plugin-transform-runtime": "^7.9.0", | ||
"@babel/preset-env": "^7.9.5", | ||
"@babel/register": "^7.9.0", | ||
"@typescript-eslint/eslint-plugin": "^2.29.0", | ||
"@typescript-eslint/parser": "^2.29.0", | ||
"ava": "^3.7.1", | ||
"electron": "^8.2.3", | ||
"eslint": "^6.8.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-config-standard": "^14.1.1", | ||
"eslint-plugin-import": "^2.20.2", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^3.1.3", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"husky": "^4.2.5", | ||
"lint-staged": "^10.1.7", | ||
"prettier": "^2.0.5", | ||
"promise-polyfill": "^8.1.3", | ||
"proxyquire": "^2.1.3", | ||
"sinon": "^9.0.2", | ||
"typescript": "^3.8.3", | ||
"winston": "^3.2.1" | ||
}, | ||
"ava": { | ||
"babel": true, | ||
"files": [ | ||
"test/**/*.js", | ||
"!test/fixtures/**/*", | ||
"!test/utilities/**/*" | ||
], | ||
"require": [ | ||
"@babel/register" | ||
] | ||
}, | ||
"lint-staged": { | ||
"**/*.js": [ | ||
"eslint . --ext .js --fix" | ||
], | ||
"**/*.ts": [ | ||
"eslint . --ext .ts,.tsx --fix" | ||
] | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged && tsc --noEmit --skipLibCheck -p ." | ||
} | ||
} | ||
} |
@@ -47,1 +47,5 @@ # runtime | ||
Check out [todesktop-quick-start](https://github.com/ToDesktop/todesktop-quick-start) to see a minimal example project. | ||
## More documentation | ||
See https://docs.todesktop.com/cli/using-the-todesktop-cli |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
19469
11
379
1
51
3
26
3
1
+ Addedeventemitter2@^6.3.1
+ Addedlodash.once@^4.1.1
+ Addedeventemitter2@6.4.9(transitive)
+ Addedlodash.once@4.1.1(transitive)