├── README.md
├── angular-push-notification.png
├── client
├── .editorconfig
├── .gitignore
├── README.md
├── angular.json
├── e2e
│ ├── protractor.conf.js
│ ├── src
│ │ ├── app.e2e-spec.ts
│ │ └── app.po.ts
│ └── tsconfig.e2e.json
├── ngsw-config.json
├── package.json
├── server.js
├── src
│ ├── app
│ │ ├── app.component.css
│ │ ├── app.component.html
│ │ ├── app.component.ts
│ │ ├── app.module.ts
│ │ └── pushNotification.service.ts
│ ├── assets
│ │ ├── .gitkeep
│ │ └── icons
│ │ │ ├── icon-128x128.png
│ │ │ ├── icon-144x144.png
│ │ │ ├── icon-152x152.png
│ │ │ ├── icon-192x192.png
│ │ │ ├── icon-384x384.png
│ │ │ ├── icon-512x512.png
│ │ │ ├── icon-72x72.png
│ │ │ └── icon-96x96.png
│ ├── browserslist
│ ├── environments
│ │ ├── environment.prod.ts
│ │ └── environment.ts
│ ├── favicon.ico
│ ├── index.html
│ ├── karma.conf.js
│ ├── main.ts
│ ├── manifest.json
│ ├── polyfills.ts
│ ├── styles.css
│ ├── test.ts
│ ├── tsconfig.app.json
│ ├── tsconfig.spec.json
│ └── tslint.json
├── tsconfig.json
├── tslint.json
└── yarn.lock
└── server
├── .gitignore
├── package.json
├── server.js
└── yarn.lock
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # Angular Push Notifications
4 |
5 | In this tutorial, we are going to take a look at how to display push notifications using angular.
6 |
7 | These push notifications will be the same as the native notifications you get on your smartphone or your computer.
8 |
9 | Also the user does not have to be on your site to receive the notification because of service workers.
10 |
11 | Doesn't that sound great?
12 |
13 | Native app like feature in the browser!
14 |
15 | Reading this, you will learn how to use the angular service worker to subscribe to push notifications.
16 |
17 | Also, you will discover how to build your own node.js express server to send the notifications. No previous backend-knowledge required!
18 |
19 | Ready?
20 |
21 | Let's get started!
22 |
23 | [Read the full tutorial at malcoded.com](https://malcoded.com/posts/angular-push-notifications)
24 |
--------------------------------------------------------------------------------
/angular-push-notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/angular-push-notification.png
--------------------------------------------------------------------------------
/client/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/client/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | yarn-error.log
34 | testem.log
35 | /typings
36 |
37 | # System Files
38 | .DS_Store
39 | Thumbs.db
40 |
--------------------------------------------------------------------------------
/client/README.md:
--------------------------------------------------------------------------------
1 | # AngularPushNotifications
2 |
3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.1.2.
4 |
5 | ## Development server
6 |
7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8 |
9 | ## Code scaffolding
10 |
11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12 |
13 | ## Build
14 |
15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
16 |
17 | ## Running unit tests
18 |
19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20 |
21 | ## Running end-to-end tests
22 |
23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24 |
25 | ## Further help
26 |
27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
28 |
--------------------------------------------------------------------------------
/client/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "newProjectRoot": "projects",
5 | "projects": {
6 | "angular-push-notifications": {
7 | "root": "",
8 | "sourceRoot": "src",
9 | "projectType": "application",
10 | "prefix": "app",
11 | "schematics": {},
12 | "architect": {
13 | "build": {
14 | "builder": "@angular-devkit/build-angular:browser",
15 | "options": {
16 | "outputPath": "dist/angular-push-notifications",
17 | "index": "src/index.html",
18 | "main": "src/main.ts",
19 | "polyfills": "src/polyfills.ts",
20 | "tsConfig": "src/tsconfig.app.json",
21 | "assets": [
22 | "src/favicon.ico",
23 | "src/assets",
24 | "src/manifest.json"
25 | ],
26 | "styles": [
27 | "src/styles.css"
28 | ],
29 | "scripts": []
30 | },
31 | "configurations": {
32 | "production": {
33 | "fileReplacements": [
34 | {
35 | "replace": "src/environments/environment.ts",
36 | "with": "src/environments/environment.prod.ts"
37 | }
38 | ],
39 | "optimization": true,
40 | "outputHashing": "all",
41 | "sourceMap": false,
42 | "extractCss": true,
43 | "namedChunks": false,
44 | "aot": true,
45 | "extractLicenses": true,
46 | "vendorChunk": false,
47 | "buildOptimizer": true,
48 | "serviceWorker": true
49 | }
50 | }
51 | },
52 | "serve": {
53 | "builder": "@angular-devkit/build-angular:dev-server",
54 | "options": {
55 | "browserTarget": "angular-push-notifications:build"
56 | },
57 | "configurations": {
58 | "production": {
59 | "browserTarget": "angular-push-notifications:build:production"
60 | }
61 | }
62 | },
63 | "extract-i18n": {
64 | "builder": "@angular-devkit/build-angular:extract-i18n",
65 | "options": {
66 | "browserTarget": "angular-push-notifications:build"
67 | }
68 | },
69 | "test": {
70 | "builder": "@angular-devkit/build-angular:karma",
71 | "options": {
72 | "main": "src/test.ts",
73 | "polyfills": "src/polyfills.ts",
74 | "tsConfig": "src/tsconfig.spec.json",
75 | "karmaConfig": "src/karma.conf.js",
76 | "styles": [
77 | "src/styles.css"
78 | ],
79 | "scripts": [],
80 | "assets": [
81 | "src/favicon.ico",
82 | "src/assets",
83 | "src/manifest.json"
84 | ]
85 | }
86 | },
87 | "lint": {
88 | "builder": "@angular-devkit/build-angular:tslint",
89 | "options": {
90 | "tsConfig": [
91 | "src/tsconfig.app.json",
92 | "src/tsconfig.spec.json"
93 | ],
94 | "exclude": [
95 | "**/node_modules/**"
96 | ]
97 | }
98 | }
99 | }
100 | },
101 | "angular-push-notifications-e2e": {
102 | "root": "e2e/",
103 | "projectType": "application",
104 | "architect": {
105 | "e2e": {
106 | "builder": "@angular-devkit/build-angular:protractor",
107 | "options": {
108 | "protractorConfig": "e2e/protractor.conf.js",
109 | "devServerTarget": "angular-push-notifications:serve"
110 | },
111 | "configurations": {
112 | "production": {
113 | "devServerTarget": "angular-push-notifications:serve:production"
114 | }
115 | }
116 | },
117 | "lint": {
118 | "builder": "@angular-devkit/build-angular:tslint",
119 | "options": {
120 | "tsConfig": "e2e/tsconfig.e2e.json",
121 | "exclude": [
122 | "**/node_modules/**"
123 | ]
124 | }
125 | }
126 | }
127 | }
128 | },
129 | "defaultProject": "angular-push-notifications"
130 | }
--------------------------------------------------------------------------------
/client/e2e/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './src/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: require('path').join(__dirname, './tsconfig.e2e.json')
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
--------------------------------------------------------------------------------
/client/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { AppPage } from './app.po';
2 |
3 | describe('workspace-project App', () => {
4 | let page: AppPage;
5 |
6 | beforeEach(() => {
7 | page = new AppPage();
8 | });
9 |
10 | it('should display welcome message', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('Welcome to angular-push-notifications!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/client/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class AppPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/client/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "jasminewd2",
10 | "node"
11 | ]
12 | }
13 | }
--------------------------------------------------------------------------------
/client/ngsw-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "index": "/index.html",
3 | "assetGroups": [{
4 | "name": "app",
5 | "installMode": "prefetch",
6 | "resources": {
7 | "files": [
8 | "/favicon.ico",
9 | "/index.html",
10 | "/*.css",
11 | "/*.js"
12 | ]
13 | }
14 | }, {
15 | "name": "assets",
16 | "installMode": "lazy",
17 | "updateMode": "prefetch",
18 | "resources": {
19 | "files": [
20 | "/assets/**"
21 | ]
22 | }
23 | }]
24 | }
--------------------------------------------------------------------------------
/client/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-push-notifications",
3 | "version": "0.0.0",
4 | "scripts": {
5 | "ng": "ng",
6 | "start": "ng serve",
7 | "build": "ng build",
8 | "test": "ng test",
9 | "lint": "ng lint",
10 | "e2e": "ng e2e"
11 | },
12 | "private": true,
13 | "dependencies": {
14 | "@angular/animations": "^6.1.0",
15 | "@angular/common": "^6.1.0",
16 | "@angular/compiler": "^6.1.0",
17 | "@angular/core": "^6.1.0",
18 | "@angular/forms": "^6.1.0",
19 | "@angular/http": "^6.1.0",
20 | "@angular/platform-browser": "^6.1.0",
21 | "@angular/platform-browser-dynamic": "^6.1.0",
22 | "@angular/pwa": "0.6.8",
23 | "@angular/router": "^6.1.0",
24 | "@angular/service-worker": "^6.1.0",
25 | "core-js": "^2.5.4",
26 | "rxjs": "^6.0.0",
27 | "zone.js": "~0.8.26"
28 | },
29 | "devDependencies": {
30 | "@angular-devkit/build-angular": "~0.7.0",
31 | "@angular/cli": "6.0.8",
32 | "@angular/compiler-cli": "^6.1.0",
33 | "@angular/language-service": "^6.1.0",
34 | "@types/jasmine": "~2.8.6",
35 | "@types/jasminewd2": "~2.0.3",
36 | "@types/node": "~8.9.4",
37 | "codelyzer": "~4.2.1",
38 | "http-server": "^0.11.1",
39 | "jasmine-core": "~2.99.1",
40 | "jasmine-spec-reporter": "~4.2.1",
41 | "karma": "~1.7.1",
42 | "karma-chrome-launcher": "~2.2.0",
43 | "karma-coverage-istanbul-reporter": "~2.0.0",
44 | "karma-jasmine": "~1.1.1",
45 | "karma-jasmine-html-reporter": "^0.2.2",
46 | "protractor": "~5.3.0",
47 | "ts-node": "~5.0.1",
48 | "tslint": "~5.9.1",
49 | "typescript": "~2.7.2"
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/client/server.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/client/server.js
--------------------------------------------------------------------------------
/client/src/app/app.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/client/src/app/app.component.css
--------------------------------------------------------------------------------
/client/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Welcome to {{ title }}!
5 |
6 |

7 |
8 | Here are some links to help you start:
9 |
10 | -
11 |
12 |
13 | -
14 |
15 |
16 | -
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/client/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 | import { SwPush } from '@angular/service-worker';
3 | import { PushNotificationService } from './pushNotification.service';
4 |
5 | const VAPID_PUBLIC = 'BNOJyTgwrEwK9lbetRcougxkRgLpPs1DX0YCfA5ZzXu4z9p_Et5EnvMja7MGfCqyFCY4FnFnJVICM4bMUcnrxWg';
6 |
7 | @Component({
8 | selector: 'app-root',
9 | templateUrl: './app.component.html',
10 | styleUrls: ['./app.component.css']
11 | })
12 | export class AppComponent {
13 | title = 'angular-push-notifications';
14 |
15 | constructor(swPush: SwPush, pushService: PushNotificationService) {
16 | if (swPush.isEnabled) {
17 | swPush
18 | .requestSubscription({
19 | serverPublicKey: VAPID_PUBLIC
20 | })
21 | .then(subscription => {
22 | pushService.sendSubscriptionToTheServer(subscription).subscribe();
23 | })
24 | .catch(console.error);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/client/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { NgModule } from '@angular/core';
3 |
4 | import { AppComponent } from './app.component';
5 | import { ServiceWorkerModule } from '@angular/service-worker';
6 | import { environment } from '../environments/environment';
7 | import { PushNotificationService } from './pushNotification.service';
8 | import { HttpClientModule } from '@angular/common/http';
9 |
10 | @NgModule({
11 | declarations: [AppComponent],
12 | imports: [BrowserModule, HttpClientModule, ServiceWorkerModule.register('/ngsw-worker.js', { enabled: environment.production })],
13 | providers: [PushNotificationService],
14 | bootstrap: [AppComponent]
15 | })
16 | export class AppModule {}
17 |
--------------------------------------------------------------------------------
/client/src/app/pushNotification.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { HttpClient } from '@angular/common/http';
3 |
4 | const SERVER_URL = 'http://localhost:3000/subscription';
5 |
6 | @Injectable()
7 | export class PushNotificationService {
8 | constructor(private http: HttpClient) {}
9 |
10 | public sendSubscriptionToTheServer(subscription: PushSubscription) {
11 | return this.http.post(SERVER_URL, subscription);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/client/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/client/src/assets/.gitkeep
--------------------------------------------------------------------------------
/client/src/assets/icons/icon-128x128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/client/src/assets/icons/icon-128x128.png
--------------------------------------------------------------------------------
/client/src/assets/icons/icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/client/src/assets/icons/icon-144x144.png
--------------------------------------------------------------------------------
/client/src/assets/icons/icon-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/client/src/assets/icons/icon-152x152.png
--------------------------------------------------------------------------------
/client/src/assets/icons/icon-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/client/src/assets/icons/icon-192x192.png
--------------------------------------------------------------------------------
/client/src/assets/icons/icon-384x384.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/client/src/assets/icons/icon-384x384.png
--------------------------------------------------------------------------------
/client/src/assets/icons/icon-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/client/src/assets/icons/icon-512x512.png
--------------------------------------------------------------------------------
/client/src/assets/icons/icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/client/src/assets/icons/icon-72x72.png
--------------------------------------------------------------------------------
/client/src/assets/icons/icon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/client/src/assets/icons/icon-96x96.png
--------------------------------------------------------------------------------
/client/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/client/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/client/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * In development mode, to ignore zone related error stack frames such as
11 | * `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
12 | * import the following file, but please comment it out in production mode
13 | * because it will have performance impact when throw error
14 | */
15 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
16 |
--------------------------------------------------------------------------------
/client/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LukasMarx/angular-push-notifications/8e90ba0d70a1bd9e39fdc6048cc4d90e3fa175ea/client/src/favicon.ico
--------------------------------------------------------------------------------
/client/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | AngularPushNotifications
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/client/src/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/1.0/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage-istanbul-reporter'),
13 | require('@angular-devkit/build-angular/plugins/karma')
14 | ],
15 | client: {
16 | clearContext: false // leave Jasmine Spec Runner output visible in browser
17 | },
18 | coverageIstanbulReporter: {
19 | dir: require('path').join(__dirname, '../coverage'),
20 | reports: ['html', 'lcovonly'],
21 | fixWebpackSourcePaths: true
22 | },
23 | reporters: ['progress', 'kjhtml'],
24 | port: 9876,
25 | colors: true,
26 | logLevel: config.LOG_INFO,
27 | autoWatch: true,
28 | browsers: ['Chrome'],
29 | singleRun: false
30 | });
31 | };
--------------------------------------------------------------------------------
/client/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/client/src/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "angular-push-notifications",
3 | "short_name": "angular-push-notifications",
4 | "theme_color": "#1976d2",
5 | "background_color": "#fafafa",
6 | "display": "standalone",
7 | "scope": "/",
8 | "start_url": "/",
9 | "icons": [
10 | {
11 | "src": "assets/icons/icon-72x72.png",
12 | "sizes": "72x72",
13 | "type": "image/png"
14 | },
15 | {
16 | "src": "assets/icons/icon-96x96.png",
17 | "sizes": "96x96",
18 | "type": "image/png"
19 | },
20 | {
21 | "src": "assets/icons/icon-128x128.png",
22 | "sizes": "128x128",
23 | "type": "image/png"
24 | },
25 | {
26 | "src": "assets/icons/icon-144x144.png",
27 | "sizes": "144x144",
28 | "type": "image/png"
29 | },
30 | {
31 | "src": "assets/icons/icon-152x152.png",
32 | "sizes": "152x152",
33 | "type": "image/png"
34 | },
35 | {
36 | "src": "assets/icons/icon-192x192.png",
37 | "sizes": "192x192",
38 | "type": "image/png"
39 | },
40 | {
41 | "src": "assets/icons/icon-384x384.png",
42 | "sizes": "384x384",
43 | "type": "image/png"
44 | },
45 | {
46 | "src": "assets/icons/icon-512x512.png",
47 | "sizes": "512x512",
48 | "type": "image/png"
49 | }
50 | ]
51 | }
--------------------------------------------------------------------------------
/client/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * This file includes polyfills needed by Angular and is loaded before the app.
3 | * You can add your own extra polyfills to this file.
4 | *
5 | * This file is divided into 2 sections:
6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8 | * file.
9 | *
10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13 | *
14 | * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15 | */
16 |
17 | /***************************************************************************************************
18 | * BROWSER POLYFILLS
19 | */
20 |
21 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/
22 | // import 'core-js/es6/symbol';
23 | // import 'core-js/es6/object';
24 | // import 'core-js/es6/function';
25 | // import 'core-js/es6/parse-int';
26 | // import 'core-js/es6/parse-float';
27 | // import 'core-js/es6/number';
28 | // import 'core-js/es6/math';
29 | // import 'core-js/es6/string';
30 | // import 'core-js/es6/date';
31 | // import 'core-js/es6/array';
32 | // import 'core-js/es6/regexp';
33 | // import 'core-js/es6/map';
34 | // import 'core-js/es6/weak-map';
35 | // import 'core-js/es6/set';
36 |
37 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */
38 | // import 'classlist.js'; // Run `npm install --save classlist.js`.
39 |
40 | /** IE10 and IE11 requires the following for the Reflect API. */
41 | // import 'core-js/es6/reflect';
42 |
43 |
44 | /** Evergreen browsers require these. **/
45 | // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
46 | import 'core-js/es7/reflect';
47 |
48 |
49 | /**
50 | * Web Animations `@angular/platform-browser/animations`
51 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
52 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
53 | **/
54 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
55 |
56 | /**
57 | * By default, zone.js will patch all possible macroTask and DomEvents
58 | * user can disable parts of macroTask/DomEvents patch by setting following flags
59 | */
60 |
61 | // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
62 | // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
63 | // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
64 |
65 | /*
66 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
67 | * with the following flag, it will bypass `zone.js` patch for IE/Edge
68 | */
69 | // (window as any).__Zone_enable_cross_context_check = true;
70 |
71 | /***************************************************************************************************
72 | * Zone JS is required by default for Angular itself.
73 | */
74 | import 'zone.js/dist/zone'; // Included with Angular CLI.
75 |
76 |
77 |
78 | /***************************************************************************************************
79 | * APPLICATION IMPORTS
80 | */
81 |
--------------------------------------------------------------------------------
/client/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/client/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------
/client/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "types": []
6 | },
7 | "exclude": [
8 | "src/test.ts",
9 | "**/*.spec.ts"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/client/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "test.ts",
12 | "polyfills.ts"
13 | ],
14 | "include": [
15 | "**/*.spec.ts",
16 | "**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/client/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/client/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "module": "es2015",
9 | "moduleResolution": "node",
10 | "emitDecoratorMetadata": true,
11 | "experimentalDecorators": true,
12 | "target": "es5",
13 | "typeRoots": [
14 | "node_modules/@types"
15 | ],
16 | "lib": [
17 | "es2017",
18 | "dom"
19 | ]
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/client/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rulesDirectory": [
3 | "node_modules/codelyzer"
4 | ],
5 | "rules": {
6 | "arrow-return-shorthand": true,
7 | "callable-types": true,
8 | "class-name": true,
9 | "comment-format": [
10 | true,
11 | "check-space"
12 | ],
13 | "curly": true,
14 | "deprecation": {
15 | "severity": "warn"
16 | },
17 | "eofline": true,
18 | "forin": true,
19 | "import-blacklist": [
20 | true,
21 | "rxjs/Rx"
22 | ],
23 | "import-spacing": true,
24 | "indent": [
25 | true,
26 | "spaces"
27 | ],
28 | "interface-over-type-literal": true,
29 | "label-position": true,
30 | "max-line-length": [
31 | true,
32 | 140
33 | ],
34 | "member-access": false,
35 | "member-ordering": [
36 | true,
37 | {
38 | "order": [
39 | "static-field",
40 | "instance-field",
41 | "static-method",
42 | "instance-method"
43 | ]
44 | }
45 | ],
46 | "no-arg": true,
47 | "no-bitwise": true,
48 | "no-console": [
49 | true,
50 | "debug",
51 | "info",
52 | "time",
53 | "timeEnd",
54 | "trace"
55 | ],
56 | "no-construct": true,
57 | "no-debugger": true,
58 | "no-duplicate-super": true,
59 | "no-empty": false,
60 | "no-empty-interface": true,
61 | "no-eval": true,
62 | "no-inferrable-types": [
63 | true,
64 | "ignore-params"
65 | ],
66 | "no-misused-new": true,
67 | "no-non-null-assertion": true,
68 | "no-shadowed-variable": true,
69 | "no-string-literal": false,
70 | "no-string-throw": true,
71 | "no-switch-case-fall-through": true,
72 | "no-trailing-whitespace": true,
73 | "no-unnecessary-initializer": true,
74 | "no-unused-expression": true,
75 | "no-use-before-declare": true,
76 | "no-var-keyword": true,
77 | "object-literal-sort-keys": false,
78 | "one-line": [
79 | true,
80 | "check-open-brace",
81 | "check-catch",
82 | "check-else",
83 | "check-whitespace"
84 | ],
85 | "prefer-const": true,
86 | "quotemark": [
87 | true,
88 | "single"
89 | ],
90 | "radix": true,
91 | "semicolon": [
92 | true,
93 | "always"
94 | ],
95 | "triple-equals": [
96 | true,
97 | "allow-null-check"
98 | ],
99 | "typedef-whitespace": [
100 | true,
101 | {
102 | "call-signature": "nospace",
103 | "index-signature": "nospace",
104 | "parameter": "nospace",
105 | "property-declaration": "nospace",
106 | "variable-declaration": "nospace"
107 | }
108 | ],
109 | "unified-signatures": true,
110 | "variable-name": false,
111 | "whitespace": [
112 | true,
113 | "check-branch",
114 | "check-decl",
115 | "check-operator",
116 | "check-separator",
117 | "check-type"
118 | ],
119 | "no-output-on-prefix": true,
120 | "use-input-property-decorator": true,
121 | "use-output-property-decorator": true,
122 | "use-host-property-decorator": true,
123 | "no-input-rename": true,
124 | "no-output-rename": true,
125 | "use-life-cycle-interface": true,
126 | "use-pipe-transform-interface": true,
127 | "component-class-suffix": true,
128 | "directive-class-suffix": true
129 | }
130 | }
131 |
--------------------------------------------------------------------------------
/server/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "server.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1",
8 | "start": "node server.js"
9 | },
10 | "author": "Lukas Marx",
11 | "license": "MIT",
12 | "dependencies": {
13 | "body-parser": "^1.18.3",
14 | "cors": "^2.8.4",
15 | "express": "^4.16.3",
16 | "web-push": "^3.3.2"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/server/server.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const webpush = require('web-push');
3 | const cors = require('cors');
4 | const bodyParser = require('body-parser');
5 |
6 | const PUBLIC_VAPID = 'BNOJyTgwrEwK9lbetRcougxkRgLpPs1DX0YCfA5ZzXu4z9p_Et5EnvMja7MGfCqyFCY4FnFnJVICM4bMUcnrxWg';
7 | const PRIVATE_VAPID = '_kRzHiscHBIGftfA7IehH9EA3RvBl8SBYhXBAMz6GrI';
8 |
9 | const fakeDatabase = [];
10 |
11 | const app = express();
12 |
13 | app.use(cors());
14 | app.use(bodyParser.json());
15 |
16 | webpush.setVapidDetails('mailto:you@domain.com', PUBLIC_VAPID, PRIVATE_VAPID);
17 |
18 | app.post('/subscription', (req, res) => {
19 | const subscription = req.body;
20 | fakeDatabase.push(subscription);
21 | });
22 |
23 | app.post('/sendNotification', (req, res) => {
24 | const notificationPayload = {
25 | notification: {
26 | title: 'New Notification',
27 | body: 'This is the body of the notification',
28 | icon: 'assets/icons/icon-512x512.png'
29 | }
30 | };
31 |
32 | const promises = [];
33 | fakeDatabase.forEach(subscription => {
34 | promises.push(webpush.sendNotification(subscription, JSON.stringify(notificationPayload)));
35 | });
36 | Promise.all(promises).then(() => res.sendStatus(200));
37 | });
38 |
39 | app.listen(3000, () => {
40 | console.log('Server started on port 3000');
41 | });
42 |
--------------------------------------------------------------------------------
/server/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | accepts@~1.3.5:
6 | version "1.3.5"
7 | resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2"
8 | dependencies:
9 | mime-types "~2.1.18"
10 | negotiator "0.6.1"
11 |
12 | agent-base@^4.1.0:
13 | version "4.2.1"
14 | resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9"
15 | dependencies:
16 | es6-promisify "^5.0.0"
17 |
18 | array-flatten@1.1.1:
19 | version "1.1.1"
20 | resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
21 |
22 | asn1.js@^5.0.0:
23 | version "5.0.1"
24 | resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.0.1.tgz#7668b56416953f0ce3421adbb3893ace59c96f59"
25 | dependencies:
26 | bn.js "^4.0.0"
27 | inherits "^2.0.1"
28 | minimalistic-assert "^1.0.0"
29 |
30 | bn.js@^4.0.0:
31 | version "4.11.8"
32 | resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
33 |
34 | body-parser@1.18.2:
35 | version "1.18.2"
36 | resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454"
37 | dependencies:
38 | bytes "3.0.0"
39 | content-type "~1.0.4"
40 | debug "2.6.9"
41 | depd "~1.1.1"
42 | http-errors "~1.6.2"
43 | iconv-lite "0.4.19"
44 | on-finished "~2.3.0"
45 | qs "6.5.1"
46 | raw-body "2.3.2"
47 | type-is "~1.6.15"
48 |
49 | body-parser@^1.18.3:
50 | version "1.18.3"
51 | resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4"
52 | dependencies:
53 | bytes "3.0.0"
54 | content-type "~1.0.4"
55 | debug "2.6.9"
56 | depd "~1.1.2"
57 | http-errors "~1.6.3"
58 | iconv-lite "0.4.23"
59 | on-finished "~2.3.0"
60 | qs "6.5.2"
61 | raw-body "2.3.3"
62 | type-is "~1.6.16"
63 |
64 | buffer-equal-constant-time@1.0.1:
65 | version "1.0.1"
66 | resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"
67 |
68 | bytes@3.0.0:
69 | version "3.0.0"
70 | resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
71 |
72 | content-disposition@0.5.2:
73 | version "0.5.2"
74 | resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4"
75 |
76 | content-type@~1.0.4:
77 | version "1.0.4"
78 | resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
79 |
80 | cookie-signature@1.0.6:
81 | version "1.0.6"
82 | resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
83 |
84 | cookie@0.3.1:
85 | version "0.3.1"
86 | resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
87 |
88 | cors@^2.8.4:
89 | version "2.8.4"
90 | resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.4.tgz#2bd381f2eb201020105cd50ea59da63090694686"
91 | dependencies:
92 | object-assign "^4"
93 | vary "^1"
94 |
95 | debug@2.6.9:
96 | version "2.6.9"
97 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
98 | dependencies:
99 | ms "2.0.0"
100 |
101 | debug@^3.1.0:
102 | version "3.1.0"
103 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
104 | dependencies:
105 | ms "2.0.0"
106 |
107 | depd@1.1.1:
108 | version "1.1.1"
109 | resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.1.tgz#5783b4e1c459f06fa5ca27f991f3d06e7a310359"
110 |
111 | depd@~1.1.1, depd@~1.1.2:
112 | version "1.1.2"
113 | resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
114 |
115 | destroy@~1.0.4:
116 | version "1.0.4"
117 | resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
118 |
119 | ecdsa-sig-formatter@1.0.10:
120 | version "1.0.10"
121 | resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz#1c595000f04a8897dfb85000892a0f4c33af86c3"
122 | dependencies:
123 | safe-buffer "^5.0.1"
124 |
125 | ee-first@1.1.1:
126 | version "1.1.1"
127 | resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
128 |
129 | encodeurl@~1.0.2:
130 | version "1.0.2"
131 | resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
132 |
133 | es6-promise@^4.0.3:
134 | version "4.2.4"
135 | resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29"
136 |
137 | es6-promisify@^5.0.0:
138 | version "5.0.0"
139 | resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
140 | dependencies:
141 | es6-promise "^4.0.3"
142 |
143 | escape-html@~1.0.3:
144 | version "1.0.3"
145 | resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
146 |
147 | etag@~1.8.1:
148 | version "1.8.1"
149 | resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
150 |
151 | express@^4.16.3:
152 | version "4.16.3"
153 | resolved "https://registry.yarnpkg.com/express/-/express-4.16.3.tgz#6af8a502350db3246ecc4becf6b5a34d22f7ed53"
154 | dependencies:
155 | accepts "~1.3.5"
156 | array-flatten "1.1.1"
157 | body-parser "1.18.2"
158 | content-disposition "0.5.2"
159 | content-type "~1.0.4"
160 | cookie "0.3.1"
161 | cookie-signature "1.0.6"
162 | debug "2.6.9"
163 | depd "~1.1.2"
164 | encodeurl "~1.0.2"
165 | escape-html "~1.0.3"
166 | etag "~1.8.1"
167 | finalhandler "1.1.1"
168 | fresh "0.5.2"
169 | merge-descriptors "1.0.1"
170 | methods "~1.1.2"
171 | on-finished "~2.3.0"
172 | parseurl "~1.3.2"
173 | path-to-regexp "0.1.7"
174 | proxy-addr "~2.0.3"
175 | qs "6.5.1"
176 | range-parser "~1.2.0"
177 | safe-buffer "5.1.1"
178 | send "0.16.2"
179 | serve-static "1.13.2"
180 | setprototypeof "1.1.0"
181 | statuses "~1.4.0"
182 | type-is "~1.6.16"
183 | utils-merge "1.0.1"
184 | vary "~1.1.2"
185 |
186 | finalhandler@1.1.1:
187 | version "1.1.1"
188 | resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105"
189 | dependencies:
190 | debug "2.6.9"
191 | encodeurl "~1.0.2"
192 | escape-html "~1.0.3"
193 | on-finished "~2.3.0"
194 | parseurl "~1.3.2"
195 | statuses "~1.4.0"
196 | unpipe "~1.0.0"
197 |
198 | forwarded@~0.1.2:
199 | version "0.1.2"
200 | resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
201 |
202 | fresh@0.5.2:
203 | version "0.5.2"
204 | resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
205 |
206 | http-errors@1.6.2:
207 | version "1.6.2"
208 | resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736"
209 | dependencies:
210 | depd "1.1.1"
211 | inherits "2.0.3"
212 | setprototypeof "1.0.3"
213 | statuses ">= 1.3.1 < 2"
214 |
215 | http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3:
216 | version "1.6.3"
217 | resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d"
218 | dependencies:
219 | depd "~1.1.2"
220 | inherits "2.0.3"
221 | setprototypeof "1.1.0"
222 | statuses ">= 1.4.0 < 2"
223 |
224 | http_ece@1.0.5:
225 | version "1.0.5"
226 | resolved "https://registry.yarnpkg.com/http_ece/-/http_ece-1.0.5.tgz#b60660faaf14215102d1493ea720dcd92b53372f"
227 | dependencies:
228 | urlsafe-base64 "~1.0.0"
229 |
230 | https-proxy-agent@^2.2.1:
231 | version "2.2.1"
232 | resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0"
233 | dependencies:
234 | agent-base "^4.1.0"
235 | debug "^3.1.0"
236 |
237 | iconv-lite@0.4.19:
238 | version "0.4.19"
239 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
240 |
241 | iconv-lite@0.4.23:
242 | version "0.4.23"
243 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63"
244 | dependencies:
245 | safer-buffer ">= 2.1.2 < 3"
246 |
247 | inherits@2.0.3, inherits@^2.0.1:
248 | version "2.0.3"
249 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
250 |
251 | ipaddr.js@1.8.0:
252 | version "1.8.0"
253 | resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e"
254 |
255 | jwa@^1.1.5:
256 | version "1.1.6"
257 | resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.6.tgz#87240e76c9808dbde18783cf2264ef4929ee50e6"
258 | dependencies:
259 | buffer-equal-constant-time "1.0.1"
260 | ecdsa-sig-formatter "1.0.10"
261 | safe-buffer "^5.0.1"
262 |
263 | jws@^3.1.3:
264 | version "3.1.5"
265 | resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.5.tgz#80d12d05b293d1e841e7cb8b4e69e561adcf834f"
266 | dependencies:
267 | jwa "^1.1.5"
268 | safe-buffer "^5.0.1"
269 |
270 | media-typer@0.3.0:
271 | version "0.3.0"
272 | resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
273 |
274 | merge-descriptors@1.0.1:
275 | version "1.0.1"
276 | resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
277 |
278 | methods@~1.1.2:
279 | version "1.1.2"
280 | resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
281 |
282 | mime-db@~1.35.0:
283 | version "1.35.0"
284 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47"
285 |
286 | mime-types@~2.1.18:
287 | version "2.1.19"
288 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.19.tgz#71e464537a7ef81c15f2db9d97e913fc0ff606f0"
289 | dependencies:
290 | mime-db "~1.35.0"
291 |
292 | mime@1.4.1:
293 | version "1.4.1"
294 | resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
295 |
296 | minimalistic-assert@^1.0.0:
297 | version "1.0.1"
298 | resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
299 |
300 | minimist@^1.2.0:
301 | version "1.2.0"
302 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
303 |
304 | ms@2.0.0:
305 | version "2.0.0"
306 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
307 |
308 | negotiator@0.6.1:
309 | version "0.6.1"
310 | resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
311 |
312 | object-assign@^4:
313 | version "4.1.1"
314 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
315 |
316 | on-finished@~2.3.0:
317 | version "2.3.0"
318 | resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
319 | dependencies:
320 | ee-first "1.1.1"
321 |
322 | parseurl@~1.3.2:
323 | version "1.3.2"
324 | resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3"
325 |
326 | path-to-regexp@0.1.7:
327 | version "0.1.7"
328 | resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
329 |
330 | proxy-addr@~2.0.3:
331 | version "2.0.4"
332 | resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93"
333 | dependencies:
334 | forwarded "~0.1.2"
335 | ipaddr.js "1.8.0"
336 |
337 | qs@6.5.1:
338 | version "6.5.1"
339 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
340 |
341 | qs@6.5.2:
342 | version "6.5.2"
343 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
344 |
345 | range-parser@~1.2.0:
346 | version "1.2.0"
347 | resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e"
348 |
349 | raw-body@2.3.2:
350 | version "2.3.2"
351 | resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.2.tgz#bcd60c77d3eb93cde0050295c3f379389bc88f89"
352 | dependencies:
353 | bytes "3.0.0"
354 | http-errors "1.6.2"
355 | iconv-lite "0.4.19"
356 | unpipe "1.0.0"
357 |
358 | raw-body@2.3.3:
359 | version "2.3.3"
360 | resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3"
361 | dependencies:
362 | bytes "3.0.0"
363 | http-errors "1.6.3"
364 | iconv-lite "0.4.23"
365 | unpipe "1.0.0"
366 |
367 | safe-buffer@5.1.1:
368 | version "5.1.1"
369 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
370 |
371 | safe-buffer@^5.0.1:
372 | version "5.1.2"
373 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
374 |
375 | "safer-buffer@>= 2.1.2 < 3":
376 | version "2.1.2"
377 | resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
378 |
379 | send@0.16.2:
380 | version "0.16.2"
381 | resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1"
382 | dependencies:
383 | debug "2.6.9"
384 | depd "~1.1.2"
385 | destroy "~1.0.4"
386 | encodeurl "~1.0.2"
387 | escape-html "~1.0.3"
388 | etag "~1.8.1"
389 | fresh "0.5.2"
390 | http-errors "~1.6.2"
391 | mime "1.4.1"
392 | ms "2.0.0"
393 | on-finished "~2.3.0"
394 | range-parser "~1.2.0"
395 | statuses "~1.4.0"
396 |
397 | serve-static@1.13.2:
398 | version "1.13.2"
399 | resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1"
400 | dependencies:
401 | encodeurl "~1.0.2"
402 | escape-html "~1.0.3"
403 | parseurl "~1.3.2"
404 | send "0.16.2"
405 |
406 | setprototypeof@1.0.3:
407 | version "1.0.3"
408 | resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04"
409 |
410 | setprototypeof@1.1.0:
411 | version "1.1.0"
412 | resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656"
413 |
414 | "statuses@>= 1.3.1 < 2", "statuses@>= 1.4.0 < 2":
415 | version "1.5.0"
416 | resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
417 |
418 | statuses@~1.4.0:
419 | version "1.4.0"
420 | resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087"
421 |
422 | type-is@~1.6.15, type-is@~1.6.16:
423 | version "1.6.16"
424 | resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194"
425 | dependencies:
426 | media-typer "0.3.0"
427 | mime-types "~2.1.18"
428 |
429 | unpipe@1.0.0, unpipe@~1.0.0:
430 | version "1.0.0"
431 | resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
432 |
433 | urlsafe-base64@^1.0.0, urlsafe-base64@~1.0.0:
434 | version "1.0.0"
435 | resolved "https://registry.yarnpkg.com/urlsafe-base64/-/urlsafe-base64-1.0.0.tgz#23f89069a6c62f46cf3a1d3b00169cefb90be0c6"
436 |
437 | utils-merge@1.0.1:
438 | version "1.0.1"
439 | resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
440 |
441 | vary@^1, vary@~1.1.2:
442 | version "1.1.2"
443 | resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
444 |
445 | web-push@^3.3.2:
446 | version "3.3.2"
447 | resolved "https://registry.yarnpkg.com/web-push/-/web-push-3.3.2.tgz#7a8f8b77c8cb1875b02a53e45d7bc277a3d05368"
448 | dependencies:
449 | asn1.js "^5.0.0"
450 | http_ece "1.0.5"
451 | https-proxy-agent "^2.2.1"
452 | jws "^3.1.3"
453 | minimist "^1.2.0"
454 | urlsafe-base64 "^1.0.0"
455 |
--------------------------------------------------------------------------------