@canvas-medical/heads-up
Advanced tools
Comparing version 1.3.0 to 2.0.0
@@ -8,3 +8,3 @@ #!/usr/bin/env node | ||
// disable warnings while importing to avoid the ExperimentalWarning for fs.promises | ||
process.emitWarning = () => {}; | ||
process.emitWarning = () => { }; | ||
@@ -23,4 +23,4 @@ const fs = require('fs').promises; | ||
const tmp = require('tmp-promise'); | ||
const updateCheck = require('update-check'); | ||
const { spawn } = require('child-process-promise'); | ||
const { checkForUpdate, FIREWORKS } = require('./utils') | ||
@@ -36,4 +36,2 @@ const CACHE_FILE = path.join(os.homedir(), '.canvas-heads-up-cache.json'); | ||
const pkg = require('./package.json'); | ||
process.emitWarning = originalEmitWarning; | ||
@@ -46,17 +44,2 @@ | ||
const FIREWORKS = ` | ||
.''. | ||
.''. *''* :_\\/_: . | ||
:_\\/_: . .:.*_\\/_* : /\\ : .'.:.'. | ||
.''.: /\\ : _\\(/_ ':'* /\\ * : '..'. -=:o:=- | ||
:_\\/_:'.:::. /)\\*''* .|.* '.\\'/.'_\\(/_'.':'.' | ||
: /\\ : ::::: '*_\\/_* | | -= o =- /)\\ ' * | ||
'..' ':::' * /\\ * |'| .'/.\\'. '._____ | ||
* __*..* | | : |. |' .---"| | ||
_* .-' '-. | | .--'| || | _| | | ||
.-'| _.| | || '-__ | | | || | | ||
|' | |. | || | | | | || | | ||
___| '-' ' "" '-' '-.' '\` |____ | ||
jgs~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`; | ||
const editor = process.env.EDITOR || DEFAULT_EDITOR; | ||
@@ -66,18 +49,2 @@ | ||
async function checkForUpdate() { | ||
let update; | ||
try { | ||
update = await updateCheck(pkg); | ||
} catch (err) { | ||
console.error(`Failed to check for updates: ${err}`); | ||
} | ||
if (update) { | ||
console.log( | ||
`The latest version is ${update.latest}. Please update with \`npm install -g ${pkg.name}\`.` | ||
); | ||
} | ||
} | ||
async function updateLastSave() { | ||
@@ -84,0 +51,0 @@ await cache.set('last-save', moment().format('MM/DD/YYYY')); |
{ | ||
"name": "@canvas-medical/heads-up", | ||
"version": "1.3.0", | ||
"version": "2.0.0", | ||
"description": "", | ||
"main": "heads-up.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"preinstall": "npx npm-force-resolutions" | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
@@ -13,6 +12,8 @@ "author": "Beau Gunderson <beau@beaugunderson.com> (https://beaugunderson.com/)", | ||
"bin": { | ||
"hu": "./heads-up.js" | ||
"hu": "./heads-up.js", | ||
"hutd": "./heads-up-todoist.js" | ||
}, | ||
"dependencies": { | ||
"@octokit/rest": "^16.34.1", | ||
"@slack/web-api": "^5.7.0", | ||
"child-process-promise": "^2.2.1", | ||
@@ -25,8 +26,7 @@ "commander": "^2.20.3", | ||
"opn": "^5.5.0", | ||
"request": "^2.88.0", | ||
"request-promise": "^4.2.5", | ||
"tmp-promise": "^1.1.0", | ||
"update-check": "^1.5.3" | ||
}, | ||
"resolutions": { | ||
"sleep": "^6.1.0" | ||
}, | ||
"devDependencies": { | ||
@@ -33,0 +33,0 @@ "babel-eslint": "^10.0.3", |
@@ -5,2 +5,25 @@ # heads-up-cli | ||
## Heads up via terminal | ||
Run `hu` from command line for documentation | ||
## Heads up from Todoist | ||
Run `hutd` to sync your daily tasks marked with a `headsup` label to the Slack channel. | ||
Tasks will only appear if the task: | ||
- Has a due date for today | ||
- Has a `headsup` label (create labels with `@`) | ||
### Tokens | ||
First time running the command follow the prompts to setup the configuration. | ||
#### Slack token | ||
Can be found in 1password under the `Heads Up Slack OAuth Token` entry. | ||
#### Todoist token | ||
Can be found in Todoist settings under the Integrations sub menu. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
13473
7
377
29
0
13
4
+ Added@slack/web-api@^5.7.0
+ Addedrequest@^2.88.0
+ Addedrequest-promise@^4.2.5
+ Added@slack/logger@2.0.0(transitive)
+ Added@slack/types@1.10.0(transitive)
+ Added@slack/web-api@5.15.0(transitive)
+ Added@types/is-stream@1.1.0(transitive)
+ Added@types/retry@0.12.0(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedasn1@0.2.6(transitive)
+ Addedassert-plus@1.0.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedaws4@1.13.2(transitive)
+ Addedaxios@0.21.4(transitive)
+ Addedbcrypt-pbkdf@1.0.2(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addeddashdash@1.14.1(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedecc-jsbn@0.1.2(transitive)
+ Addedeventemitter3@3.1.24.0.7(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedextsprintf@1.3.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedfollow-redirects@1.15.9(transitive)
+ Addedforever-agent@0.6.1(transitive)
+ Addedform-data@2.3.32.5.2(transitive)
+ Addedgetpass@0.1.7(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedisstream@0.1.2(transitive)
+ Addedjsbn@0.1.1(transitive)
+ Addedjson-schema@0.4.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedjson-stringify-safe@5.0.1(transitive)
+ Addedjsprim@1.4.2(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedp-queue@6.6.2(transitive)
+ Addedp-retry@4.6.2(transitive)
+ Addedp-timeout@3.2.0(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedpsl@1.15.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedrequest-promise@4.2.6(transitive)
+ Addedrequest-promise-core@1.1.4(transitive)
+ Addedretry@0.13.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsshpk@1.18.0(transitive)
+ Addedstealthy-require@1.1.1(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedtweetnacl@0.14.5(transitive)
+ Addeduri-js@4.4.1(transitive)
+ Addeduuid@3.4.0(transitive)
+ Addedverror@1.10.0(transitive)