58ca4e68db
- Go backend API with full CRUD for all modules (CRM, Sales, Finance, HR, Legal, Marketing, Support, Purchase, Inventory, Projects, Automation, Analytics) - Rust analytics service with parallel report generation - C runtime with POSIX shared memory IPC - PostgreSQL schema with 30+ tables, full migrations - Redis cache, sessions, pub/sub - Kafka event streaming with Zookeeper - WebSocket hub for real-time updates - Automation engine with cron jobs, workflows, event triggers - JWT authentication, multi-tenant from start - Docker Compose with all services - Nginx reverse proxy with rate limiting - Integration tests passing - Feature gap analysis against Fortnox/Odoo/Visma Refs: BOC-001
83 lines
2.4 KiB
Markdown
83 lines
2.4 KiB
Markdown
# simple-update-notifier [](https://github.com/alexbrazier/simple-update-notifier/stargazers)
|
|
|
|
[](https://github.com/alexbrazier/simple-update-notifier/actions)
|
|
[](https://www.npmjs.com/package/simple-update-notifier?activeTab=dependencies)
|
|
[](https://www.npmjs.com/package/simple-update-notifier)
|
|
[](https://bundlephobia.com/result?p=simple-update-notifier)
|
|
[](https://www.npmjs.com/package/simple-update-notifier)
|
|
[](./LICENSE)
|
|
|
|
Simple update notifier to check for npm updates for cli applications.
|
|
|
|
<img src="./.github/demo.png" alt="Demo in terminal showing an update is required">
|
|
|
|
Checks for updates for an npm module and outputs to the command line if there is one available. The result is cached for the specified time so it doesn't check every time the app runs.
|
|
|
|
## Install
|
|
|
|
```bash
|
|
npm install simple-update-notifier
|
|
OR
|
|
yarn add simple-update-notifier
|
|
```
|
|
|
|
## Usage
|
|
|
|
```js
|
|
import updateNotifier from 'simple-update-notifier';
|
|
import packageJson from './package.json' assert { type: 'json' };
|
|
|
|
updateNotifier({ pkg: packageJson });
|
|
```
|
|
|
|
### Options
|
|
|
|
#### pkg
|
|
|
|
Type: `object`
|
|
|
|
##### name
|
|
|
|
_Required_\
|
|
Type: `string`
|
|
|
|
##### version
|
|
|
|
_Required_\
|
|
Type: `string`
|
|
|
|
#### updateCheckInterval
|
|
|
|
Type: `number`\
|
|
Default: `1000 * 60 * 60 * 24` _(1 day)_
|
|
|
|
How often to check for updates.
|
|
|
|
#### shouldNotifyInNpmScript
|
|
|
|
Type: `boolean`\
|
|
Default: `false`
|
|
|
|
Allows notification to be shown when running as an npm script.
|
|
|
|
#### distTag
|
|
|
|
Type: `string`\
|
|
Default: `'latest'`
|
|
|
|
Which [dist-tag](https://docs.npmjs.com/adding-dist-tags-to-packages) to use to find the latest version.
|
|
|
|
#### alwaysRun
|
|
|
|
Type: `boolean`\
|
|
Default: `false`
|
|
|
|
When set, `updateCheckInterval` will not be respected and a check for an update will always be performed.
|
|
|
|
#### debug
|
|
|
|
Type: `boolean`\
|
|
Default: `false`
|
|
|
|
When set, logs explaining the decision will be output to `stderr` whenever the module opts to not print an update notification
|