{"id":15255815,"url":"https://github.com/DSI-HUG/ngx-app-updater","last_synced_at":"2025-10-06T00:31:56.817Z","repository":{"id":38981967,"uuid":"383455697","full_name":"DSI-HUG/ngx-app-updater","owner":"DSI-HUG","description":"📣 Notify about Angular application's update","archived":false,"fork":false,"pushed_at":"2024-11-20T01:13:40.000Z","size":6421,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-01-17T07:03:18.686Z","etag":null,"topics":["404","angular","not-found","notification","progressive-web-app","pwa","service-worker"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DSI-HUG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-06T12:09:23.000Z","updated_at":"2024-12-12T14:42:54.000Z","dependencies_parsed_at":"2024-07-10T20:35:18.241Z","dependency_job_id":"8a472051-4aa0-4d1e-8644-736c7bd5616f","html_url":"https://github.com/DSI-HUG/ngx-app-updater","commit_stats":{"total_commits":25,"total_committers":1,"mean_commits":25.0,"dds":0.0,"last_synced_commit":"a4c7d02f63bdef21ebc67bc85439dcdcb944ff28"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-app-updater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-app-updater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-app-updater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-app-updater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DSI-HUG","download_url":"https://codeload.github.com/DSI-HUG/ngx-app-updater/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235469484,"owners_count":18995326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["404","angular","not-found","notification","progressive-web-app","pwa","service-worker"],"created_at":"2024-09-30T01:00:41.335Z","updated_at":"2025-10-06T00:31:51.395Z","avatar_url":"https://github.com/DSI-HUG.png","language":"TypeScript","funding_links":[],"categories":["Angular"],"sub_categories":["Updating Angular"],"readme":"\u003ch1 align=\"center\"\u003e\n    @hug/ngx-app-updater\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://www.hug.ch\"\u003e\n        \u003cimg src=\"https://cdn.hug.ch/svgs/hug/hug-logo-horizontal.svg\" alt=\"hug-logo\" height=\"54px\" /\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\u003cbr/\u003e\n    \u003ci\u003eNotify about Angular application's update\u003c/i\u003e\n    \u003cbr/\u003e\u003cbr/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@hug/ngx-app-updater\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/v/@hug/ngx-app-updater.svg?color=blue\u0026logo=npm\" alt=\"npm version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://npmcharts.com/compare/@hug/ngx-app-updater?minimal=true\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/dw/@hug/ngx-app-updater.svg?color=blue\u0026logo=npm\" alt=\"npm donwloads\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/dsi-hug/ngx-app-updater/blob/main/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/license-GPLv3-ff69b4.svg\" alt=\"license GPLv3\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/dsi-hug/ngx-app-updater/actions/workflows/ci_tests.yml\"\u003e\n        \u003cimg src=\"https://github.com/dsi-hug/ngx-app-updater/actions/workflows/ci_tests.yml/badge.svg\" alt=\"build status\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/dsi-hug/ngx-app-updater/blob/main/CONTRIBUTING.md#-submitting-a-pull-request-pr\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"PRs welcome\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003chr/\u003e\n\nThis library is a wrapper around the official [@angular/service-worker][angular-service-worker] library with extra functionalities.\n\nIt adds [Progressive Web App][pwa] supports and **updates notifications** to an Angular project.\n\n\u003chr/\u003e\n\n\n## Getting started\n\nTo set up or update an Angular project with this library use the Angular CLI's [schematic][schematics] commands:\n\n#### Installation\n\n```sh\nng add @hug/ngx-app-updater\n```\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003ci\u003eMore details\u003c/i\u003e\u003c/summary\u003e\n\n\u003e \u003cbr/\u003e\n\u003e\n\u003e The `ng add` command will ask you the following questions:\n\u003e\n\u003e 1.  **Allow user to cancel an update**: *whether a user can choose to cancel an update or not*\n\u003e\n\u003e And will also perform the following actions:\n\u003e\n\u003e -   Imports and registers the `service worker` in the application.\n\u003e -   Provide and initialize the `library`.\n\u003e -   Adds `icons` and `screenshots` files to support the installed PWA.\n\u003e -   Adds a `manifest.webmanifest` file.\n\u003e -   Adds a `ngsw-config.json` file.\n\u003e -   Updates the `index.html` to links the `manifest` and adds `theme-color` and `noscript` tags.\n\n\u003c/details\u003e\n\n\n#### Update\n\n```sh\nng update @hug/ngx-app-updater\n```\n\n\n## Features\n\n### 🚀 Progressive Web App\n\n* Adds `caching` and `offline` behaviors through `ngsw-config.json` file.\n* Adds `icons` and `screenshots` files to support the installed PWA.\n* Adds a `manifest.webmanifest` file.\n* Updates the `index.html` to links the `manifest` and adds `theme-color` and `noscript` tags.\n\n\n### 📣 Notification\n\nWhen a new version of your application is deployed, this library will trigger a user notification to inform them that updates are available.\n\nThis is particularly useful to ensure that users who rarely close or refresh their web browsers are always running the latest version.\n\nThey can choose to update immediately, delay the update until a later time, or be forced to update.\n\nBy default, updates are checked every minute, and users are prompted about updates every day.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"assets/notification-1.png\" width=\"30%\" /\u003e\n    \u003cimg src=\"assets/notification-2.png\" width=\"30%\" /\u003e\n\u003c/p\u003e\n\n#### Usage\n\nHave a look at the [Options](#options) section to discover what can be customized.\n\n\u003e TIP: in case `@angular/material` is installed, the dialog will be themed accordingly.\n\n\u003e TIP: you can provide your own dialog, following this [example][dialog-example] and using the `dialogOptions.component` option.\n\n\n### 4️⃣0️⃣4️⃣ Not found page\n\nIf a new route is to be released in a new version of your application, users that are still using an old version of the application will not be able to access that url on a first try.\n\nTo mitigate this behavior, this library provides a `404 page` that you could use to notify a user about a potential update.\n\nUsers will then be able to relaunch their application, apply the update and be presented with the new route.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"assets/not-found-1.png\" width=\"30%\" /\u003e\n    \u003cimg src=\"assets/not-found-2.png\" width=\"30%\" /\u003e\n    \u003cimg src=\"assets/not-found-3.png\" width=\"30%\" /\u003e\n\u003c/p\u003e\n\n#### Usage\n\nHave a look at the [Options](#options) section to discover what can be customized.\n\n\u003e TIP: in case `@angular/material` is installed, this page will be themed accordingly.\n\n\u003e TIP: you can design your own 404 page following this [example][404-example].\n\n```ts\nimport { Routes } from '@angular/router';\nimport { HomePage } from './home.component';\n\nexport const routes: Routes = [\n  { path: '', component: HomePage },\n  {\n    path: '**',\n    pathMatch: 'full',\n    loadComponent: () =\u003e import('@hug/ngx-app-updater/not-found').then(m =\u003e m.NgxAppUpdaterNotFoundPage)\n  }\n];\n```\n\n\n## Options\n\nYou shouldn't have to configure anything else but in case you wanted to, you can still do it.\n\nThe behavior of the library can be configured either in:\n\n* `main.ts` *(if the app is a standalone Angular application)*\n    ```ts\n    bootstrapApplication(AppComponent, {\n      providers: [\n        provideAppUpdater(options?: NgxAppUpdaterOptions)\n      ]\n    });\n    ```\n\n* `app.module.ts` *(if the app is **not** a standalone Angular application)*\n    ```ts\n    @NgModule({\n      imports: [\n        NgxAppUpdaterModule.forRoot(options?: NgxAppUpdaterOptions)\n      ]\n    })\n    export class AppModule { }\n    ```\n\n\n## Development\n\nSee the [developer docs][developer].\n\n\n## Contributing\n\n#### \u003e Want to Help?\n\nWant to file a bug, contribute some code or improve documentation? Excellent!\n\nBut please read up first on the guidelines for [contributing][contributing], and learn about submission process, coding rules and more.\n\n#### \u003e Code of Conduct\n\nPlease read and follow the [Code of Conduct][codeofconduct], and help us keep this project open and inclusive.\n\n\n## Credits\n\nCopyright (C) 2021 [HUG - Hôpitaux Universitaires Genève][dsi-hug]\n\n[![love@hug](https://img.shields.io/badge/@hug-%E2%9D%A4%EF%B8%8Flove-magenta)][dsi-hug]\n\n\n\n\n[pwa]: https://web.dev/progressive-web-apps/\n[angular-service-worker]: https://angular.io/guide/service-worker-intro\n[dialog-example]: https://github.com/DSI-HUG/ngx-app-updater/tree/main/projects/lib/core/dialog/content\n[404-example]: https://github.com/DSI-HUG/ngx-app-updater/tree/main/projects/lib/not-found\n[schematics]: https://angular.io/guide/schematics-for-libraries\n[developer]: https://github.com/dsi-hug/ngx-app-updater/blob/main/DEVELOPER.md\n[contributing]: https://github.com/dsi-hug/ngx-app-updater/blob/main/CONTRIBUTING.md\n[codeofconduct]: https://github.com/dsi-hug/ngx-app-updater/blob/main/CODE_OF_CONDUCT.md\n[dsi-hug]: https://github.com/dsi-hug\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDSI-HUG%2Fngx-app-updater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDSI-HUG%2Fngx-app-updater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDSI-HUG%2Fngx-app-updater/lists"}