├── .eslintrc ├── .github └── workflows │ └── test.yml ├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── app ├── .eslintrc ├── favicon.ico ├── images │ ├── badge.png │ └── icon.png ├── index.html ├── scripts │ └── main.js ├── styles │ └── index.css └── sw.js ├── completed ├── 01-register-sw │ ├── images │ │ ├── badge.png │ │ └── icon.png │ ├── index.html │ ├── scripts │ │ └── main.js │ ├── styles │ │ └── index.css │ └── sw.js ├── 02-subscription-state │ ├── images │ │ ├── badge.png │ │ └── icon.png │ ├── index.html │ ├── scripts │ │ └── main.js │ ├── styles │ │ └── index.css │ └── sw.js ├── 03-subscribe │ ├── images │ │ ├── badge.png │ │ └── icon.png │ ├── index.html │ ├── scripts │ │ └── main.js │ ├── styles │ │ └── index.css │ └── sw.js ├── 04-permission-denied │ ├── images │ │ ├── badge.png │ │ └── icon.png │ ├── index.html │ ├── scripts │ │ └── main.js │ ├── styles │ │ └── index.css │ └── sw.js ├── 05-push-event │ ├── images │ │ ├── badge.png │ │ └── icon.png │ ├── index.html │ ├── scripts │ │ └── main.js │ ├── styles │ │ └── index.css │ └── sw.js ├── 06-click │ ├── images │ │ ├── badge.png │ │ └── icon.png │ ├── index.html │ ├── scripts │ │ └── main.js │ ├── styles │ │ └── index.css │ └── sw.js ├── 07-unsubscribe │ ├── images │ │ ├── badge.png │ │ └── icon.png │ ├── index.html │ ├── scripts │ │ └── main.js │ ├── styles │ │ └── index.css │ └── sw.js └── 08-push-subscription-change │ ├── images │ ├── badge.png │ └── icon.png │ ├── index.html │ ├── scripts │ └── main.js │ ├── styles │ └── index.css │ └── sw.js ├── package-lock.json ├── package.json └── screenshots ├── 00-push-codelab.png ├── 01-push-codelab.png ├── 02-push-codelab.png ├── 04-push-codelab.png ├── 05-push-codelab.png ├── 06-push-codelab.png ├── 07-push-codelab.png ├── 08-push-codelab.png ├── 09-push-codelab.png ├── 10-push-codelab.png ├── 11-push-codelab.png ├── 12-push-codelab.png ├── 13-push-codelab.png └── 14-push-codelab.png /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["eslint:recommended", "google"], 3 | "rules": { 4 | "no-var": 2, 5 | "no-console": 0, 6 | "comma-dangle": 0, 7 | "require-jsdoc": 0, 8 | "no-useless-escape": 0, 9 | "indent": 0, 10 | "prefer-const": 0 11 | }, 12 | "parserOptions": { 13 | "ecmaVersion": 6 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | on: [push,pull_request] 2 | name: Test 3 | jobs: 4 | test: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v2 8 | - name: Use Node.js 9 | uses: actions/setup-node@v2 10 | - name: Install dependencies 11 | run: npm install 12 | - name: Run test 13 | run: npm test -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.pyc 3 | *.swp 4 | .idea 5 | build 6 | .DS_Store 7 | .sass-cache/ 8 | node_modules/ 9 | .ruby-gemset 10 | .rvmrc 11 | .grunt-gae-pid 12 | src/css/styles.css 13 | src/css/styles.min.css 14 | dist 15 | .tmp 16 | npm-debug.log 17 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | dist: trusty 3 | language: node_js 4 | cache: 5 | directories: 6 | - node_modules 7 | 8 | node_js: 9 | - 'stable' 10 | 11 | install: 12 | - npm install 13 | 14 | # Read more here: https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI 15 | before_script: 16 | - "export DISPLAY=:99.0" 17 | - "sh -e /etc/init.d/xvfb start || echo \"Unable to start virtual display.\"" 18 | - sleep 3 # give xvfb some time to start 19 | 20 | script: 21 | - npm run test 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Want to contribute? Great! First, read this page (including the small print at the end). 2 | 3 | ### Before you contribute 4 | Before we can use your code, you must sign the 5 | [Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual?csw=1) 6 | (CLA), which you can do online. The CLA is necessary mainly because you own the 7 | copyright to your changes, even after your contribution becomes part of our 8 | codebase, so we need your permission to use and distribute your code. We also 9 | need to be sure of various other things—for instance that you'll tell us if you 10 | know that your code infringes on other people's patents. You don't have to sign 11 | the CLA until after you've submitted your code for review and a member has 12 | approved it, but you must do it before we can put your code into our codebase. 13 | Before you start working on a larger contribution, you should get in touch with 14 | us first through the issue tracker with your idea so that we can help out and 15 | possibly guide you. Coordinating up front makes it much easier to avoid 16 | frustration later on. 17 | 18 | ### Code reviews 19 | All submissions, including submissions by project members, require review. We 20 | use Github pull requests for this purpose. 21 | 22 | ### The small print 23 | Contributions made by corporations are covered by a different agreement than 24 | the one above, the Software Grant and Corporate Contributor License Agreement. 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | All image and audio files (including *.png, *.jpg, *.svg, *.mp3, *.wav 2 | and *.ogg) are licensed under the CC-BY-NC license. All other files are 3 | licensed under the Apache 2 license. 4 | 5 | ======================================================================= 6 | 7 | 8 | Apache License 9 | -------------- 10 | 11 | Apache License 12 | Version 2.0, January 2004 13 | http://www.apache.org/licenses/ 14 | 15 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 16 | 17 | 1. Definitions. 18 | 19 | "License" shall mean the terms and conditions for use, reproduction, 20 | and distribution as defined by Sections 1 through 9 of this document. 21 | 22 | "Licensor" shall mean the copyright owner or entity authorized by 23 | the copyright owner that is granting the License. 24 | 25 | "Legal Entity" shall mean the union of the acting entity and all 26 | other entities that control, are controlled by, or are under common 27 | control with that entity. For the purposes of this definition, 28 | "control" means (i) the power, direct or indirect, to cause the 29 | direction or management of such entity, whether by contract or 30 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 31 | outstanding shares, or (iii) beneficial ownership of such entity. 32 | 33 | "You" (or "Your") shall mean an individual or Legal Entity 34 | exercising permissions granted by this License. 35 | 36 | "Source" form shall mean the preferred form for making modifications, 37 | including but not limited to software source code, documentation 38 | source, and configuration files. 39 | 40 | "Object" form shall mean any form resulting from mechanical 41 | transformation or translation of a Source form, including but 42 | not limited to compiled object code, generated documentation, 43 | and conversions to other media types. 44 | 45 | "Work" shall mean the work of authorship, whether in Source or 46 | Object form, made available under the License, as indicated by a 47 | copyright notice that is included in or attached to the work 48 | (an example is provided in the Appendix below). 49 | 50 | "Derivative Works" shall mean any work, whether in Source or Object 51 | form, that is based on (or derived from) the Work and for which the 52 | editorial revisions, annotations, elaborations, or other modifications 53 | represent, as a whole, an original work of authorship. For the purposes 54 | of this License, Derivative Works shall not include works that remain 55 | separable from, or merely link (or bind by name) to the interfaces of, 56 | the Work and Derivative Works thereof. 57 | 58 | "Contribution" shall mean any work of authorship, including 59 | the original version of the Work and any modifications or additions 60 | to that Work or Derivative Works thereof, that is intentionally 61 | submitted to Licensor for inclusion in the Work by the copyright owner 62 | or by an individual or Legal Entity authorized to submit on behalf of 63 | the copyright owner. For the purposes of this definition, "submitted" 64 | means any form of electronic, verbal, or written communication sent 65 | to the Licensor or its representatives, including but not limited to 66 | communication on electronic mailing lists, source code control systems, 67 | and issue tracking systems that are managed by, or on behalf of, the 68 | Licensor for the purpose of discussing and improving the Work, but 69 | excluding communication that is conspicuously marked or otherwise 70 | designated in writing by the copyright owner as "Not a Contribution." 71 | 72 | "Contributor" shall mean Licensor and any individual or Legal Entity 73 | on behalf of whom a Contribution has been received by Licensor and 74 | subsequently incorporated within the Work. 75 | 76 | 2. Grant of Copyright License. Subject to the terms and conditions of 77 | this License, each Contributor hereby grants to You a perpetual, 78 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 79 | copyright license to reproduce, prepare Derivative Works of, 80 | publicly display, publicly perform, sublicense, and distribute the 81 | Work and such Derivative Works in Source or Object form. 82 | 83 | 3. Grant of Patent License. Subject to the terms and conditions of 84 | this License, each Contributor hereby grants to You a perpetual, 85 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 86 | (except as stated in this section) patent license to make, have made, 87 | use, offer to sell, sell, import, and otherwise transfer the Work, 88 | where such license applies only to those patent claims licensable 89 | by such Contributor that are necessarily infringed by their 90 | Contribution(s) alone or by combination of their Contribution(s) 91 | with the Work to which such Contribution(s) was submitted. If You 92 | institute patent litigation against any entity (including a 93 | cross-claim or counterclaim in a lawsuit) alleging that the Work 94 | or a Contribution incorporated within the Work constitutes direct 95 | or contributory patent infringement, then any patent licenses 96 | granted to You under this License for that Work shall terminate 97 | as of the date such litigation is filed. 98 | 99 | 4. Redistribution. You may reproduce and distribute copies of the 100 | Work or Derivative Works thereof in any medium, with or without 101 | modifications, and in Source or Object form, provided that You 102 | meet the following conditions: 103 | 104 | (a) You must give any other recipients of the Work or 105 | Derivative Works a copy of this License; and 106 | 107 | (b) You must cause any modified files to carry prominent notices 108 | stating that You changed the files; and 109 | 110 | (c) You must retain, in the Source form of any Derivative Works 111 | that You distribute, all copyright, patent, trademark, and 112 | attribution notices from the Source form of the Work, 113 | excluding those notices that do not pertain to any part of 114 | the Derivative Works; and 115 | 116 | (d) If the Work includes a "NOTICE" text file as part of its 117 | distribution, then any Derivative Works that You distribute must 118 | include a readable copy of the attribution notices contained 119 | within such NOTICE file, excluding those notices that do not 120 | pertain to any part of the Derivative Works, in at least one 121 | of the following places: within a NOTICE text file distributed 122 | as part of the Derivative Works; within the Source form or 123 | documentation, if provided along with the Derivative Works; or, 124 | within a display generated by the Derivative Works, if and 125 | wherever such third-party notices normally appear. The contents 126 | of the NOTICE file are for informational purposes only and 127 | do not modify the License. You may add Your own attribution 128 | notices within Derivative Works that You distribute, alongside 129 | or as an addendum to the NOTICE text from the Work, provided 130 | that such additional attribution notices cannot be construed 131 | as modifying the License. 132 | 133 | You may add Your own copyright statement to Your modifications and 134 | may provide additional or different license terms and conditions 135 | for use, reproduction, or distribution of Your modifications, or 136 | for any such Derivative Works as a whole, provided Your use, 137 | reproduction, and distribution of the Work otherwise complies with 138 | the conditions stated in this License. 139 | 140 | 5. Submission of Contributions. Unless You explicitly state otherwise, 141 | any Contribution intentionally submitted for inclusion in the Work 142 | by You to the Licensor shall be under the terms and conditions of 143 | this License, without any additional terms or conditions. 144 | Notwithstanding the above, nothing herein shall supersede or modify 145 | the terms of any separate license agreement you may have executed 146 | with Licensor regarding such Contributions. 147 | 148 | 6. Trademarks. This License does not grant permission to use the trade 149 | names, trademarks, service marks, or product names of the Licensor, 150 | except as required for reasonable and customary use in describing the 151 | origin of the Work and reproducing the content of the NOTICE file. 152 | 153 | 7. Disclaimer of Warranty. Unless required by applicable law or 154 | agreed to in writing, Licensor provides the Work (and each 155 | Contributor provides its Contributions) on an "AS IS" BASIS, 156 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 157 | implied, including, without limitation, any warranties or conditions 158 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 159 | PARTICULAR PURPOSE. You are solely responsible for determining the 160 | appropriateness of using or redistributing the Work and assume any 161 | risks associated with Your exercise of permissions under this License. 162 | 163 | 8. Limitation of Liability. In no event and under no legal theory, 164 | whether in tort (including negligence), contract, or otherwise, 165 | unless required by applicable law (such as deliberate and grossly 166 | negligent acts) or agreed to in writing, shall any Contributor be 167 | liable to You for damages, including any direct, indirect, special, 168 | incidental, or consequential damages of any character arising as a 169 | result of this License or out of the use or inability to use the 170 | Work (including but not limited to damages for loss of goodwill, 171 | work stoppage, computer failure or malfunction, or any and all 172 | other commercial damages or losses), even if such Contributor 173 | has been advised of the possibility of such damages. 174 | 175 | 9. Accepting Warranty or Additional Liability. While redistributing 176 | the Work or Derivative Works thereof, You may choose to offer, 177 | and charge a fee for, acceptance of support, warranty, indemnity, 178 | or other liability obligations and/or rights consistent with this 179 | License. However, in accepting such obligations, You may act only 180 | on Your own behalf and on Your sole responsibility, not on behalf 181 | of any other Contributor, and only if You agree to indemnify, 182 | defend, and hold each Contributor harmless for any liability 183 | incurred by, or claims asserted against, such Contributor by reason 184 | of your accepting any such warranty or additional liability. 185 | 186 | END OF TERMS AND CONDITIONS 187 | 188 | All image and audio files (including *.png, *.jpg, *.svg, *.mp3, *.wav 189 | and *.ogg) are licensed under the CC-BY-NC license. All other files are 190 | licensed under the Apache 2 license. 191 | 192 | CC-BY-NC License 193 | ---------------- 194 | 195 | Attribution-NonCommercial-ShareAlike 4.0 International 196 | 197 | ======================================================================= 198 | 199 | Creative Commons Corporation ("Creative Commons") is not a law firm and 200 | does not provide legal services or legal advice. Distribution of 201 | Creative Commons public licenses does not create a lawyer-client or 202 | other relationship. Creative Commons makes its licenses and related 203 | information available on an "as-is" basis. Creative Commons gives no 204 | warranties regarding its licenses, any material licensed under their 205 | terms and conditions, or any related information. Creative Commons 206 | disclaims all liability for damages resulting from their use to the 207 | fullest extent possible. 208 | 209 | Using Creative Commons Public Licenses 210 | 211 | Creative Commons public licenses provide a standard set of terms and 212 | conditions that creators and other rights holders may use to share 213 | original works of authorship and other material subject to copyright 214 | and certain other rights specified in the public license below. The 215 | following considerations are for informational purposes only, are not 216 | exhaustive, and do not form part of our licenses. 217 | 218 | Considerations for licensors: Our public licenses are 219 | intended for use by those authorized to give the public 220 | permission to use material in ways otherwise restricted by 221 | copyright and certain other rights. Our licenses are 222 | irrevocable. Licensors should read and understand the terms 223 | and conditions of the license they choose before applying it. 224 | Licensors should also secure all rights necessary before 225 | applying our licenses so that the public can reuse the 226 | material as expected. Licensors should clearly mark any 227 | material not subject to the license. This includes other CC- 228 | licensed material, or material used under an exception or 229 | limitation to copyright. More considerations for licensors: 230 | wiki.creativecommons.org/Considerations_for_licensors 231 | 232 | Considerations for the public: By using one of our public 233 | licenses, a licensor grants the public permission to use the 234 | licensed material under specified terms and conditions. If 235 | the licensor's permission is not necessary for any reason--for 236 | example, because of any applicable exception or limitation to 237 | copyright--then that use is not regulated by the license. Our 238 | licenses grant only permissions under copyright and certain 239 | other rights that a licensor has authority to grant. Use of 240 | the licensed material may still be restricted for other 241 | reasons, including because others have copyright or other 242 | rights in the material. A licensor may make special requests, 243 | such as asking that all changes be marked or described. 244 | Although not required by our licenses, you are encouraged to 245 | respect those requests where reasonable. More_considerations 246 | for the public: 247 | wiki.creativecommons.org/Considerations_for_licensees 248 | 249 | ======================================================================= 250 | 251 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International 252 | Public License 253 | 254 | By exercising the Licensed Rights (defined below), You accept and agree 255 | to be bound by the terms and conditions of this Creative Commons 256 | Attribution-NonCommercial-ShareAlike 4.0 International Public License 257 | ("Public License"). To the extent this Public License may be 258 | interpreted as a contract, You are granted the Licensed Rights in 259 | consideration of Your acceptance of these terms and conditions, and the 260 | Licensor grants You such rights in consideration of benefits the 261 | Licensor receives from making the Licensed Material available under 262 | these terms and conditions. 263 | 264 | 265 | Section 1 -- Definitions. 266 | 267 | a. Adapted Material means material subject to Copyright and Similar 268 | Rights that is derived from or based upon the Licensed Material 269 | and in which the Licensed Material is translated, altered, 270 | arranged, transformed, or otherwise modified in a manner requiring 271 | permission under the Copyright and Similar Rights held by the 272 | Licensor. For purposes of this Public License, where the Licensed 273 | Material is a musical work, performance, or sound recording, 274 | Adapted Material is always produced where the Licensed Material is 275 | synched in timed relation with a moving image. 276 | 277 | b. Adapter's License means the license You apply to Your Copyright 278 | and Similar Rights in Your contributions to Adapted Material in 279 | accordance with the terms and conditions of this Public License. 280 | 281 | c. BY-NC-SA Compatible License means a license listed at 282 | creativecommons.org/compatiblelicenses, approved by Creative 283 | Commons as essentially the equivalent of this Public License. 284 | 285 | d. Copyright and Similar Rights means copyright and/or similar rights 286 | closely related to copyright including, without limitation, 287 | performance, broadcast, sound recording, and Sui Generis Database 288 | Rights, without regard to how the rights are labeled or 289 | categorized. For purposes of this Public License, the rights 290 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 291 | Rights. 292 | 293 | e. Effective Technological Measures means those measures that, in the 294 | absence of proper authority, may not be circumvented under laws 295 | fulfilling obligations under Article 11 of the WIPO Copyright 296 | Treaty adopted on December 20, 1996, and/or similar international 297 | agreements. 298 | 299 | f. Exceptions and Limitations means fair use, fair dealing, and/or 300 | any other exception or limitation to Copyright and Similar Rights 301 | that applies to Your use of the Licensed Material. 302 | 303 | g. License Elements means the license attributes listed in the name 304 | of a Creative Commons Public License. The License Elements of this 305 | Public License are Attribution, NonCommercial, and ShareAlike. 306 | 307 | h. Licensed Material means the artistic or literary work, database, 308 | or other material to which the Licensor applied this Public 309 | License. 310 | 311 | i. Licensed Rights means the rights granted to You subject to the 312 | terms and conditions of this Public License, which are limited to 313 | all Copyright and Similar Rights that apply to Your use of the 314 | Licensed Material and that the Licensor has authority to license. 315 | 316 | j. Licensor means the individual(s) or entity(ies) granting rights 317 | under this Public License. 318 | 319 | k. NonCommercial means not primarily intended for or directed towards 320 | commercial advantage or monetary compensation. For purposes of 321 | this Public License, the exchange of the Licensed Material for 322 | other material subject to Copyright and Similar Rights by digital 323 | file-sharing or similar means is NonCommercial provided there is 324 | no payment of monetary compensation in connection with the 325 | exchange. 326 | 327 | l. Share means to provide material to the public by any means or 328 | process that requires permission under the Licensed Rights, such 329 | as reproduction, public display, public performance, distribution, 330 | dissemination, communication, or importation, and to make material 331 | available to the public including in ways that members of the 332 | public may access the material from a place and at a time 333 | individually chosen by them. 334 | 335 | m. Sui Generis Database Rights means rights other than copyright 336 | resulting from Directive 96/9/EC of the European Parliament and of 337 | the Council of 11 March 1996 on the legal protection of databases, 338 | as amended and/or succeeded, as well as other essentially 339 | equivalent rights anywhere in the world. 340 | 341 | n. You means the individual or entity exercising the Licensed Rights 342 | under this Public License. Your has a corresponding meaning. 343 | 344 | 345 | Section 2 -- Scope. 346 | 347 | a. License grant. 348 | 349 | 1. Subject to the terms and conditions of this Public License, 350 | the Licensor hereby grants You a worldwide, royalty-free, 351 | non-sublicensable, non-exclusive, irrevocable license to 352 | exercise the Licensed Rights in the Licensed Material to: 353 | 354 | a. reproduce and Share the Licensed Material, in whole or 355 | in part, for NonCommercial purposes only; and 356 | 357 | b. produce, reproduce, and Share Adapted Material for 358 | NonCommercial purposes only. 359 | 360 | 2. Exceptions and Limitations. For the avoidance of doubt, where 361 | Exceptions and Limitations apply to Your use, this Public 362 | License does not apply, and You do not need to comply with 363 | its terms and conditions. 364 | 365 | 3. Term. The term of this Public License is specified in Section 366 | 6(a). 367 | 368 | 4. Media and formats; technical modifications allowed. The 369 | Licensor authorizes You to exercise the Licensed Rights in 370 | all media and formats whether now known or hereafter created, 371 | and to make technical modifications necessary to do so. The 372 | Licensor waives and/or agrees not to assert any right or 373 | authority to forbid You from making technical modifications 374 | necessary to exercise the Licensed Rights, including 375 | technical modifications necessary to circumvent Effective 376 | Technological Measures. For purposes of this Public License, 377 | simply making modifications authorized by this Section 2(a) 378 | (4) never produces Adapted Material. 379 | 380 | 5. Downstream recipients. 381 | 382 | a. Offer from the Licensor -- Licensed Material. Every 383 | recipient of the Licensed Material automatically 384 | receives an offer from the Licensor to exercise the 385 | Licensed Rights under the terms and conditions of this 386 | Public License. 387 | 388 | b. Additional offer from the Licensor -- Adapted Material. 389 | Every recipient of Adapted Material from You 390 | automatically receives an offer from the Licensor to 391 | exercise the Licensed Rights in the Adapted Material 392 | under the conditions of the Adapter's License You apply. 393 | 394 | c. No downstream restrictions. You may not offer or impose 395 | any additional or different terms or conditions on, or 396 | apply any Effective Technological Measures to, the 397 | Licensed Material if doing so restricts exercise of the 398 | Licensed Rights by any recipient of the Licensed 399 | Material. 400 | 401 | 6. No endorsement. Nothing in this Public License constitutes or 402 | may be construed as permission to assert or imply that You 403 | are, or that Your use of the Licensed Material is, connected 404 | with, or sponsored, endorsed, or granted official status by, 405 | the Licensor or others designated to receive attribution as 406 | provided in Section 3(a)(1)(A)(i). 407 | 408 | b. Other rights. 409 | 410 | 1. Moral rights, such as the right of integrity, are not 411 | licensed under this Public License, nor are publicity, 412 | privacy, and/or other similar personality rights; however, to 413 | the extent possible, the Licensor waives and/or agrees not to 414 | assert any such rights held by the Licensor to the limited 415 | extent necessary to allow You to exercise the Licensed 416 | Rights, but not otherwise. 417 | 418 | 2. Patent and trademark rights are not licensed under this 419 | Public License. 420 | 421 | 3. To the extent possible, the Licensor waives any right to 422 | collect royalties from You for the exercise of the Licensed 423 | Rights, whether directly or through a collecting society 424 | under any voluntary or waivable statutory or compulsory 425 | licensing scheme. In all other cases the Licensor expressly 426 | reserves any right to collect such royalties, including when 427 | the Licensed Material is used other than for NonCommercial 428 | purposes. 429 | 430 | 431 | Section 3 -- License Conditions. 432 | 433 | Your exercise of the Licensed Rights is expressly made subject to the 434 | following conditions. 435 | 436 | a. Attribution. 437 | 438 | 1. If You Share the Licensed Material (including in modified 439 | form), You must: 440 | 441 | a. retain the following if it is supplied by the Licensor 442 | with the Licensed Material: 443 | 444 | i. identification of the creator(s) of the Licensed 445 | Material and any others designated to receive 446 | attribution, in any reasonable manner requested by 447 | the Licensor (including by pseudonym if 448 | designated); 449 | 450 | ii. a copyright notice; 451 | 452 | iii. a notice that refers to this Public License; 453 | 454 | iv. a notice that refers to the disclaimer of 455 | warranties; 456 | 457 | v. a URI or hyperlink to the Licensed Material to the 458 | extent reasonably practicable; 459 | 460 | b. indicate if You modified the Licensed Material and 461 | retain an indication of any previous modifications; and 462 | 463 | c. indicate the Licensed Material is licensed under this 464 | Public License, and include the text of, or the URI or 465 | hyperlink to, this Public License. 466 | 467 | 2. You may satisfy the conditions in Section 3(a)(1) in any 468 | reasonable manner based on the medium, means, and context in 469 | which You Share the Licensed Material. For example, it may be 470 | reasonable to satisfy the conditions by providing a URI or 471 | hyperlink to a resource that includes the required 472 | information. 473 | 3. If requested by the Licensor, You must remove any of the 474 | information required by Section 3(a)(1)(A) to the extent 475 | reasonably practicable. 476 | 477 | b. ShareAlike. 478 | 479 | In addition to the conditions in Section 3(a), if You Share 480 | Adapted Material You produce, the following conditions also apply. 481 | 482 | 1. The Adapter's License You apply must be a Creative Commons 483 | license with the same License Elements, this version or 484 | later, or a BY-NC-SA Compatible License. 485 | 486 | 2. You must include the text of, or the URI or hyperlink to, the 487 | Adapter's License You apply. You may satisfy this condition 488 | in any reasonable manner based on the medium, means, and 489 | context in which You Share Adapted Material. 490 | 491 | 3. You may not offer or impose any additional or different terms 492 | or conditions on, or apply any Effective Technological 493 | Measures to, Adapted Material that restrict exercise of the 494 | rights granted under the Adapter's License You apply. 495 | 496 | 497 | Section 4 -- Sui Generis Database Rights. 498 | 499 | Where the Licensed Rights include Sui Generis Database Rights that 500 | apply to Your use of the Licensed Material: 501 | 502 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 503 | to extract, reuse, reproduce, and Share all or a substantial 504 | portion of the contents of the database for NonCommercial purposes 505 | only; 506 | 507 | b. if You include all or a substantial portion of the database 508 | contents in a database in which You have Sui Generis Database 509 | Rights, then the database in which You have Sui Generis Database 510 | Rights (but not its individual contents) is Adapted Material, 511 | including for purposes of Section 3(b); and 512 | 513 | c. You must comply with the conditions in Section 3(a) if You Share 514 | all or a substantial portion of the contents of the database. 515 | 516 | For the avoidance of doubt, this Section 4 supplements and does not 517 | replace Your obligations under this Public License where the Licensed 518 | Rights include other Copyright and Similar Rights. 519 | 520 | 521 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 522 | 523 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 524 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 525 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 526 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 527 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 528 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 529 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 530 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 531 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 532 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 533 | 534 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 535 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 536 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 537 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 538 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 539 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 540 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 541 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 542 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 543 | 544 | c. The disclaimer of warranties and limitation of liability provided 545 | above shall be interpreted in a manner that, to the extent 546 | possible, most closely approximates an absolute disclaimer and 547 | waiver of all liability. 548 | 549 | 550 | Section 6 -- Term and Termination. 551 | 552 | a. This Public License applies for the term of the Copyright and 553 | Similar Rights licensed here. However, if You fail to comply with 554 | this Public License, then Your rights under this Public License 555 | terminate automatically. 556 | 557 | b. Where Your right to use the Licensed Material has terminated under 558 | Section 6(a), it reinstates: 559 | 560 | 1. automatically as of the date the violation is cured, provided 561 | it is cured within 30 days of Your discovery of the 562 | violation; or 563 | 564 | 2. upon express reinstatement by the Licensor. 565 | 566 | For the avoidance of doubt, this Section 6(b) does not affect any 567 | right the Licensor may have to seek remedies for Your violations 568 | of this Public License. 569 | 570 | c. For the avoidance of doubt, the Licensor may also offer the 571 | Licensed Material under separate terms or conditions or stop 572 | distributing the Licensed Material at any time; however, doing so 573 | will not terminate this Public License. 574 | 575 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 576 | License. 577 | 578 | 579 | Section 7 -- Other Terms and Conditions. 580 | 581 | a. The Licensor shall not be bound by any additional or different 582 | terms or conditions communicated by You unless expressly agreed. 583 | 584 | b. Any arrangements, understandings, or agreements regarding the 585 | Licensed Material not stated herein are separate from and 586 | independent of the terms and conditions of this Public License. 587 | 588 | 589 | Section 8 -- Interpretation. 590 | 591 | a. For the avoidance of doubt, this Public License does not, and 592 | shall not be interpreted to, reduce, limit, restrict, or impose 593 | conditions on any use of the Licensed Material that could lawfully 594 | be made without permission under this Public License. 595 | 596 | b. To the extent possible, if any provision of this Public License is 597 | deemed unenforceable, it shall be automatically reformed to the 598 | minimum extent necessary to make it enforceable. If the provision 599 | cannot be reformed, it shall be severed from this Public License 600 | without affecting the enforceability of the remaining terms and 601 | conditions. 602 | 603 | c. No term or condition of this Public License will be waived and no 604 | failure to comply consented to unless expressly agreed to by the 605 | Licensor. 606 | 607 | d. Nothing in this Public License constitutes or may be interpreted 608 | as a limitation upon, or waiver of, any privileges and immunities 609 | that apply to the Licensor or You, including from the legal 610 | processes of any jurisdiction or authority. 611 | 612 | ======================================================================= 613 | 614 | Creative Commons is not a party to its public licenses. 615 | Notwithstanding, Creative Commons may elect to apply one of its public 616 | licenses to material it publishes and in those instances will be 617 | considered the "Licensor." Except for the limited purpose of indicating 618 | that material is shared under a Creative Commons public license or as 619 | otherwise permitted by the Creative Commons policies published at 620 | creativecommons.org/policies, Creative Commons does not authorize the 621 | use of the trademark "Creative Commons" or any other trademark or logo 622 | of Creative Commons without its prior written consent including, 623 | without limitation, in connection with any unauthorized modifications 624 | to any of its public licenses or any other arrangements, 625 | understandings, or agreements concerning use of licensed material. For 626 | the avoidance of doubt, this paragraph does not form part of the public 627 | licenses. 628 | 629 | Creative Commons may be contacted at creativecommons.org. 630 | 631 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Push Notifications codelab 2 | 3 | Code for the Web Fundamentals [Push Notifications codelab](https://codelabs.developers.google.com/codelabs/push-notifications/). 4 | 5 | In this codelab, you'll learn how to add Push Notifications to web applications. This will enable you to re-engage users with breaking news and information about 6 | new content. 7 | 8 | You'll also learn the basics of Service Workers. 9 | 10 | ## What you'll learn 11 | 12 | * Service Worker basics: installation and event handling 13 | * How to set up a Google Cloud Messaging (GCM) account 14 | * How to add a web manifest 15 | * Techniques for requesting GCM to send a notification to a web client 16 | * Notification display 17 | * Notification click handling 18 | 19 | Example code for each step of the codelab is available from the [completed](completed/) directory. 20 | 21 | ## License 22 | 23 | Copyright 2015 Google, Inc. 24 | 25 | Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at 26 | 27 | http://www.apache.org/licenses/LICENSE-2.0 28 | 29 | Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 30 | -------------------------------------------------------------------------------- /app/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-unused-vars": 0 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/app/favicon.ico -------------------------------------------------------------------------------- /app/images/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/app/images/badge.png -------------------------------------------------------------------------------- /app/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/app/images/icon.png -------------------------------------------------------------------------------- /app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Push Codelab 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |

Push Codelab

20 |
21 | 22 |
23 |

Welcome to the push messaging codelab. The button below needs to be 24 | fixed to support subscribing to push.

25 |

26 | 29 |

30 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /app/scripts/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, es6 */ 21 | 22 | 'use strict'; 23 | 24 | const applicationServerPublicKey = ''; 25 | 26 | const pushButton = document.querySelector('.js-push-btn'); 27 | 28 | let isSubscribed = false; 29 | let swRegistration = null; 30 | 31 | function urlB64ToUint8Array(base64String) { 32 | const padding = '='.repeat((4 - base64String.length % 4) % 4); 33 | const base64 = (base64String + padding) 34 | .replace(/\-/g, '+') 35 | .replace(/_/g, '/'); 36 | 37 | const rawData = window.atob(base64); 38 | const outputArray = new Uint8Array(rawData.length); 39 | 40 | for (let i = 0; i < rawData.length; ++i) { 41 | outputArray[i] = rawData.charCodeAt(i); 42 | } 43 | return outputArray; 44 | } 45 | -------------------------------------------------------------------------------- /app/styles/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | 5 | html, body { 6 | width: 100%; 7 | padding: 0; 8 | margin: 0; 9 | } 10 | 11 | body { 12 | min-height: auto; 13 | box-sizing: border-box; 14 | } 15 | 16 | header { 17 | padding: 115px 0 32px 0; 18 | background-color: #00bcd4; 19 | color: white; 20 | } 21 | 22 | main, header > h1 { 23 | padding: 0 16px; 24 | max-width: 760px; 25 | box-sizing: border-box; 26 | margin: 0 auto; 27 | } 28 | 29 | main { 30 | margin: 24px auto; 31 | box-sizing: border-box; 32 | } 33 | 34 | pre { 35 | white-space: pre-wrap; 36 | background-color: #EEEEEE; 37 | padding: 16px; 38 | } 39 | 40 | pre code { 41 | word-break: break-word; 42 | } 43 | 44 | .is-invisible { 45 | opacity: 0; 46 | } 47 | 48 | .subscription-details { 49 | transition: opacity 1s; 50 | } 51 | 52 | @media (max-width: 600px) { 53 | header > h1 { 54 | font-size: 36px; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /app/sw.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, serviceworker, es6 */ 21 | 22 | 'use strict'; 23 | -------------------------------------------------------------------------------- /completed/01-register-sw/images/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/01-register-sw/images/badge.png -------------------------------------------------------------------------------- /completed/01-register-sw/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/01-register-sw/images/icon.png -------------------------------------------------------------------------------- /completed/01-register-sw/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Push Codelab 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |

Push Codelab

20 |
21 | 22 |
23 |

Welcome to the push messaging codelab. The button below needs to be 24 | fixed to support subscribing to push.

25 |

26 | 29 |

30 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /completed/01-register-sw/scripts/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, es6 */ 21 | /* eslint-disable no-unused-vars */ 22 | 23 | 'use strict'; 24 | 25 | const applicationServerPublicKey = ''; 26 | 27 | const pushButton = document.querySelector('.js-push-btn'); 28 | 29 | let isSubscribed = false; 30 | let swRegistration = null; 31 | 32 | function urlB64ToUint8Array(base64String) { 33 | const padding = '='.repeat((4 - base64String.length % 4) % 4); 34 | const base64 = (base64String + padding) 35 | .replace(/\-/g, '+') 36 | .replace(/_/g, '/'); 37 | 38 | const rawData = window.atob(base64); 39 | const outputArray = new Uint8Array(rawData.length); 40 | 41 | for (let i = 0; i < rawData.length; ++i) { 42 | outputArray[i] = rawData.charCodeAt(i); 43 | } 44 | return outputArray; 45 | } 46 | 47 | if ('serviceWorker' in navigator && 'PushManager' in window) { 48 | console.log('Service Worker and Push is supported'); 49 | 50 | navigator.serviceWorker.register('sw.js') 51 | .then(function(swReg) { 52 | console.log('Service Worker is registered', swReg); 53 | 54 | swRegistration = swReg; 55 | }) 56 | .catch(function(error) { 57 | console.error('Service Worker Error', error); 58 | }); 59 | } else { 60 | console.warn('Push messaging is not supported'); 61 | pushButton.textContent = 'Push Not Supported'; 62 | } 63 | -------------------------------------------------------------------------------- /completed/01-register-sw/styles/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | 5 | html, body { 6 | width: 100%; 7 | padding: 0; 8 | margin: 0; 9 | } 10 | 11 | body { 12 | min-height: auto; 13 | box-sizing: border-box; 14 | } 15 | 16 | header { 17 | padding: 115px 0 32px 0; 18 | background-color: #00bcd4; 19 | color: white; 20 | } 21 | 22 | main, header > h1 { 23 | padding: 0 16px; 24 | max-width: 760px; 25 | box-sizing: border-box; 26 | margin: 0 auto; 27 | } 28 | 29 | main { 30 | margin: 24px auto; 31 | box-sizing: border-box; 32 | } 33 | 34 | pre { 35 | white-space: pre-wrap; 36 | background-color: #EEEEEE; 37 | padding: 16px; 38 | } 39 | 40 | pre code { 41 | word-break: break-word; 42 | } 43 | 44 | .is-invisible { 45 | opacity: 0; 46 | } 47 | 48 | .subscription-details { 49 | transition: opacity 1s; 50 | } 51 | 52 | @media (max-width: 600px) { 53 | header > h1 { 54 | font-size: 36px; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /completed/01-register-sw/sw.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, serviceworker, es6 */ 21 | 22 | 'use strict'; 23 | -------------------------------------------------------------------------------- /completed/02-subscription-state/images/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/02-subscription-state/images/badge.png -------------------------------------------------------------------------------- /completed/02-subscription-state/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/02-subscription-state/images/icon.png -------------------------------------------------------------------------------- /completed/02-subscription-state/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Push Codelab 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |

Push Codelab

20 |
21 | 22 |
23 |

Welcome to the push messaging codelab. The button below needs to be 24 | fixed to support subscribing to push.

25 |

26 | 29 |

30 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /completed/02-subscription-state/scripts/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, es6 */ 21 | /* eslint-disable no-unused-vars */ 22 | 23 | 'use strict'; 24 | 25 | const applicationServerPublicKey = 'BCW6JPG-T7Jx0bYKMhAbL6j3DL3VTTib7dwvBjQ' + 26 | 'C_496a12auzzKFnjgFjCsys_YtWkeMLhogfSlyM0CaIktx7o'; 27 | 28 | const pushButton = document.querySelector('.js-push-btn'); 29 | 30 | let isSubscribed = false; 31 | let swRegistration = null; 32 | 33 | function urlB64ToUint8Array(base64String) { 34 | const padding = '='.repeat((4 - base64String.length % 4) % 4); 35 | const base64 = (base64String + padding) 36 | .replace(/\-/g, '+') 37 | .replace(/_/g, '/'); 38 | 39 | const rawData = window.atob(base64); 40 | const outputArray = new Uint8Array(rawData.length); 41 | 42 | for (let i = 0; i < rawData.length; ++i) { 43 | outputArray[i] = rawData.charCodeAt(i); 44 | } 45 | return outputArray; 46 | } 47 | 48 | function updateBtn() { 49 | if (isSubscribed) { 50 | pushButton.textContent = 'Disable Push Messaging'; 51 | } else { 52 | pushButton.textContent = 'Enable Push Messaging'; 53 | } 54 | 55 | pushButton.disabled = false; 56 | } 57 | 58 | function initializeUI() { 59 | // Set the initial subscription value 60 | swRegistration.pushManager.getSubscription() 61 | .then(function(subscription) { 62 | isSubscribed = !(subscription === null); 63 | 64 | if (isSubscribed) { 65 | console.log('User IS subscribed.'); 66 | } else { 67 | console.log('User is NOT subscribed.'); 68 | } 69 | 70 | updateBtn(); 71 | }); 72 | } 73 | 74 | if ('serviceWorker' in navigator && 'PushManager' in window) { 75 | console.log('Service Worker and Push is supported'); 76 | 77 | navigator.serviceWorker.register('sw.js') 78 | .then(function(swReg) { 79 | console.log('Service Worker is registered', swReg); 80 | 81 | swRegistration = swReg; 82 | initializeUI(); 83 | }) 84 | .catch(function(error) { 85 | console.error('Service Worker Error', error); 86 | }); 87 | } else { 88 | console.warn('Push messaging is not supported'); 89 | pushButton.textContent = 'Push Not Supported'; 90 | } 91 | -------------------------------------------------------------------------------- /completed/02-subscription-state/styles/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | 5 | html, body { 6 | width: 100%; 7 | padding: 0; 8 | margin: 0; 9 | } 10 | 11 | body { 12 | min-height: auto; 13 | box-sizing: border-box; 14 | } 15 | 16 | header { 17 | padding: 115px 0 32px 0; 18 | background-color: #00bcd4; 19 | color: white; 20 | } 21 | 22 | main, header > h1 { 23 | padding: 0 16px; 24 | max-width: 760px; 25 | box-sizing: border-box; 26 | margin: 0 auto; 27 | } 28 | 29 | main { 30 | margin: 24px auto; 31 | box-sizing: border-box; 32 | } 33 | 34 | pre { 35 | white-space: pre-wrap; 36 | background-color: #EEEEEE; 37 | padding: 16px; 38 | } 39 | 40 | pre code { 41 | word-break: break-word; 42 | } 43 | 44 | .is-invisible { 45 | opacity: 0; 46 | } 47 | 48 | .subscription-details { 49 | transition: opacity 1s; 50 | } 51 | 52 | @media (max-width: 600px) { 53 | header > h1 { 54 | font-size: 36px; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /completed/02-subscription-state/sw.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, serviceworker, es6 */ 21 | 22 | 'use strict'; 23 | -------------------------------------------------------------------------------- /completed/03-subscribe/images/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/03-subscribe/images/badge.png -------------------------------------------------------------------------------- /completed/03-subscribe/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/03-subscribe/images/icon.png -------------------------------------------------------------------------------- /completed/03-subscribe/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Push Codelab 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |

Push Codelab

20 |
21 | 22 |
23 |

Welcome to the push messaging codelab. The button below needs to be 24 | fixed to support subscribing to push.

25 |

26 | 29 |

30 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /completed/03-subscribe/scripts/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, es6 */ 21 | 22 | 'use strict'; 23 | 24 | const applicationServerPublicKey = 'BCW6JPG-T7Jx0bYKMhAbL6j3DL3VTTib7dwvBjQ' + 25 | 'C_496a12auzzKFnjgFjCsys_YtWkeMLhogfSlyM0CaIktx7o'; 26 | 27 | const pushButton = document.querySelector('.js-push-btn'); 28 | 29 | let isSubscribed = false; 30 | let swRegistration = null; 31 | 32 | function urlB64ToUint8Array(base64String) { 33 | const padding = '='.repeat((4 - base64String.length % 4) % 4); 34 | const base64 = (base64String + padding) 35 | .replace(/\-/g, '+') 36 | .replace(/_/g, '/'); 37 | 38 | const rawData = window.atob(base64); 39 | const outputArray = new Uint8Array(rawData.length); 40 | 41 | for (let i = 0; i < rawData.length; ++i) { 42 | outputArray[i] = rawData.charCodeAt(i); 43 | } 44 | return outputArray; 45 | } 46 | 47 | function updateBtn() { 48 | if (isSubscribed) { 49 | pushButton.textContent = 'Disable Push Messaging'; 50 | } else { 51 | pushButton.textContent = 'Enable Push Messaging'; 52 | } 53 | 54 | pushButton.disabled = false; 55 | } 56 | 57 | function updateSubscriptionOnServer(subscription) { 58 | // TODO: Send subscription to application server 59 | 60 | const subscriptionJson = document.querySelector('.js-subscription-json'); 61 | const subscriptionDetails = 62 | document.querySelector('.js-subscription-details'); 63 | 64 | if (subscription) { 65 | subscriptionJson.textContent = JSON.stringify(subscription); 66 | subscriptionDetails.classList.remove('is-invisible'); 67 | } else { 68 | subscriptionDetails.classList.add('is-invisible'); 69 | } 70 | } 71 | 72 | function subscribeUser() { 73 | const applicationServerKey = urlB64ToUint8Array(applicationServerPublicKey); 74 | swRegistration.pushManager.subscribe({ 75 | userVisibleOnly: true, 76 | applicationServerKey: applicationServerKey 77 | }) 78 | .then(function(subscription) { 79 | console.log('User is subscribed'); 80 | 81 | updateSubscriptionOnServer(subscription); 82 | 83 | isSubscribed = true; 84 | 85 | updateBtn(); 86 | }) 87 | .catch(function(err) { 88 | console.log('Failed to subscribe the user: ', err); 89 | updateBtn(); 90 | }); 91 | } 92 | 93 | function initializeUI() { 94 | pushButton.addEventListener('click', function() { 95 | pushButton.disabled = true; 96 | if (isSubscribed) { 97 | // TODO: Unsubscribe user 98 | } else { 99 | subscribeUser(); 100 | } 101 | }); 102 | 103 | // Set the initial subscription value 104 | swRegistration.pushManager.getSubscription() 105 | .then(function(subscription) { 106 | isSubscribed = !(subscription === null); 107 | 108 | updateSubscriptionOnServer(subscription); 109 | 110 | if (isSubscribed) { 111 | console.log('User IS subscribed.'); 112 | } else { 113 | console.log('User is NOT subscribed.'); 114 | } 115 | 116 | updateBtn(); 117 | }); 118 | } 119 | 120 | if ('serviceWorker' in navigator && 'PushManager' in window) { 121 | console.log('Service Worker and Push is supported'); 122 | 123 | navigator.serviceWorker.register('sw.js') 124 | .then(function(swReg) { 125 | console.log('Service Worker is registered', swReg); 126 | 127 | swRegistration = swReg; 128 | initializeUI(); 129 | }) 130 | .catch(function(error) { 131 | console.error('Service Worker Error', error); 132 | }); 133 | } else { 134 | console.warn('Push messaging is not supported'); 135 | pushButton.textContent = 'Push Not Supported'; 136 | } 137 | -------------------------------------------------------------------------------- /completed/03-subscribe/styles/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | 5 | html, body { 6 | width: 100%; 7 | padding: 0; 8 | margin: 0; 9 | } 10 | 11 | body { 12 | min-height: auto; 13 | box-sizing: border-box; 14 | } 15 | 16 | header { 17 | padding: 115px 0 32px 0; 18 | background-color: #00bcd4; 19 | color: white; 20 | } 21 | 22 | main, header > h1 { 23 | padding: 0 16px; 24 | max-width: 760px; 25 | box-sizing: border-box; 26 | margin: 0 auto; 27 | } 28 | 29 | main { 30 | margin: 24px auto; 31 | box-sizing: border-box; 32 | } 33 | 34 | pre { 35 | white-space: pre-wrap; 36 | background-color: #EEEEEE; 37 | padding: 16px; 38 | } 39 | 40 | pre code { 41 | word-break: break-word; 42 | } 43 | 44 | .is-invisible { 45 | opacity: 0; 46 | } 47 | 48 | .subscription-details { 49 | transition: opacity 1s; 50 | } 51 | 52 | @media (max-width: 600px) { 53 | header > h1 { 54 | font-size: 36px; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /completed/03-subscribe/sw.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, serviceworker, es6 */ 21 | 22 | 'use strict'; 23 | -------------------------------------------------------------------------------- /completed/04-permission-denied/images/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/04-permission-denied/images/badge.png -------------------------------------------------------------------------------- /completed/04-permission-denied/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/04-permission-denied/images/icon.png -------------------------------------------------------------------------------- /completed/04-permission-denied/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Push Codelab 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |

Push Codelab

20 |
21 | 22 |
23 |

Welcome to the push messaging codelab. The button below needs to be 24 | fixed to support subscribing to push.

25 |

26 | 29 |

30 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /completed/04-permission-denied/scripts/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, es6 */ 21 | 22 | 'use strict'; 23 | 24 | const applicationServerPublicKey = 'BCW6JPG-T7Jx0bYKMhAbL6j3DL3VTTib7dwvBjQ' + 25 | 'C_496a12auzzKFnjgFjCsys_YtWkeMLhogfSlyM0CaIktx7o'; 26 | 27 | const pushButton = document.querySelector('.js-push-btn'); 28 | 29 | let isSubscribed = false; 30 | let swRegistration = null; 31 | 32 | function urlB64ToUint8Array(base64String) { 33 | const padding = '='.repeat((4 - base64String.length % 4) % 4); 34 | const base64 = (base64String + padding) 35 | .replace(/\-/g, '+') 36 | .replace(/_/g, '/'); 37 | 38 | const rawData = window.atob(base64); 39 | const outputArray = new Uint8Array(rawData.length); 40 | 41 | for (let i = 0; i < rawData.length; ++i) { 42 | outputArray[i] = rawData.charCodeAt(i); 43 | } 44 | return outputArray; 45 | } 46 | 47 | function updateBtn() { 48 | if (Notification.permission === 'denied') { 49 | pushButton.textContent = 'Push Messaging Blocked.'; 50 | pushButton.disabled = true; 51 | updateSubscriptionOnServer(null); 52 | return; 53 | } 54 | 55 | if (isSubscribed) { 56 | pushButton.textContent = 'Disable Push Messaging'; 57 | } else { 58 | pushButton.textContent = 'Enable Push Messaging'; 59 | } 60 | 61 | pushButton.disabled = false; 62 | } 63 | 64 | function updateSubscriptionOnServer(subscription) { 65 | // TODO: Send subscription to application server 66 | 67 | const subscriptionJson = document.querySelector('.js-subscription-json'); 68 | const subscriptionDetails = 69 | document.querySelector('.js-subscription-details'); 70 | 71 | if (subscription) { 72 | subscriptionJson.textContent = JSON.stringify(subscription); 73 | subscriptionDetails.classList.remove('is-invisible'); 74 | } else { 75 | subscriptionDetails.classList.add('is-invisible'); 76 | } 77 | } 78 | 79 | function subscribeUser() { 80 | const applicationServerKey = urlB64ToUint8Array(applicationServerPublicKey); 81 | swRegistration.pushManager.subscribe({ 82 | userVisibleOnly: true, 83 | applicationServerKey: applicationServerKey 84 | }) 85 | .then(function(subscription) { 86 | console.log('User is subscribed.'); 87 | 88 | updateSubscriptionOnServer(subscription); 89 | 90 | isSubscribed = true; 91 | 92 | updateBtn(); 93 | }) 94 | .catch(function(err) { 95 | console.log('Failed to subscribe the user: ', err); 96 | updateBtn(); 97 | }); 98 | } 99 | 100 | function initializeUI() { 101 | pushButton.addEventListener('click', function() { 102 | pushButton.disabled = true; 103 | if (isSubscribed) { 104 | // TODO: Unsubscribe user 105 | } else { 106 | subscribeUser(); 107 | } 108 | }); 109 | 110 | // Set the initial subscription value 111 | swRegistration.pushManager.getSubscription() 112 | .then(function(subscription) { 113 | isSubscribed = !(subscription === null); 114 | 115 | updateSubscriptionOnServer(subscription); 116 | 117 | if (isSubscribed) { 118 | console.log('User IS subscribed.'); 119 | } else { 120 | console.log('User is NOT subscribed.'); 121 | } 122 | 123 | updateBtn(); 124 | }); 125 | } 126 | 127 | if ('serviceWorker' in navigator && 'PushManager' in window) { 128 | console.log('Service Worker and Push is supported'); 129 | 130 | navigator.serviceWorker.register('sw.js') 131 | .then(function(swReg) { 132 | console.log('Service Worker is registered', swReg); 133 | 134 | swRegistration = swReg; 135 | initializeUI(); 136 | }) 137 | .catch(function(error) { 138 | console.error('Service Worker Error', error); 139 | }); 140 | } else { 141 | console.warn('Push messaging is not supported'); 142 | pushButton.textContent = 'Push Not Supported'; 143 | } 144 | -------------------------------------------------------------------------------- /completed/04-permission-denied/styles/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | 5 | html, body { 6 | width: 100%; 7 | padding: 0; 8 | margin: 0; 9 | } 10 | 11 | body { 12 | min-height: auto; 13 | box-sizing: border-box; 14 | } 15 | 16 | header { 17 | padding: 115px 0 32px 0; 18 | background-color: #00bcd4; 19 | color: white; 20 | } 21 | 22 | main, header > h1 { 23 | padding: 0 16px; 24 | max-width: 760px; 25 | box-sizing: border-box; 26 | margin: 0 auto; 27 | } 28 | 29 | main { 30 | margin: 24px auto; 31 | box-sizing: border-box; 32 | } 33 | 34 | pre { 35 | white-space: pre-wrap; 36 | background-color: #EEEEEE; 37 | padding: 16px; 38 | } 39 | 40 | pre code { 41 | word-break: break-word; 42 | } 43 | 44 | .is-invisible { 45 | opacity: 0; 46 | } 47 | 48 | .subscription-details { 49 | transition: opacity 1s; 50 | } 51 | 52 | @media (max-width: 600px) { 53 | header > h1 { 54 | font-size: 36px; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /completed/04-permission-denied/sw.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, serviceworker, es6 */ 21 | 22 | 'use strict'; 23 | -------------------------------------------------------------------------------- /completed/05-push-event/images/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/05-push-event/images/badge.png -------------------------------------------------------------------------------- /completed/05-push-event/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/05-push-event/images/icon.png -------------------------------------------------------------------------------- /completed/05-push-event/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Push Codelab 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |

Push Codelab

20 |
21 | 22 |
23 |

Welcome to the push messaging codelab. The button below needs to be 24 | fixed to support subscribing to push.

25 |

26 | 29 |

30 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /completed/05-push-event/scripts/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, es6 */ 21 | 22 | 'use strict'; 23 | 24 | const applicationServerPublicKey = 'BCW6JPG-T7Jx0bYKMhAbL6j3DL3VTTib7dwvBjQ' + 25 | 'C_496a12auzzKFnjgFjCsys_YtWkeMLhogfSlyM0CaIktx7o'; 26 | 27 | const pushButton = document.querySelector('.js-push-btn'); 28 | 29 | let isSubscribed = false; 30 | let swRegistration = null; 31 | 32 | function urlB64ToUint8Array(base64String) { 33 | const padding = '='.repeat((4 - base64String.length % 4) % 4); 34 | const base64 = (base64String + padding) 35 | .replace(/\-/g, '+') 36 | .replace(/_/g, '/'); 37 | 38 | const rawData = window.atob(base64); 39 | const outputArray = new Uint8Array(rawData.length); 40 | 41 | for (let i = 0; i < rawData.length; ++i) { 42 | outputArray[i] = rawData.charCodeAt(i); 43 | } 44 | return outputArray; 45 | } 46 | 47 | function updateBtn() { 48 | if (Notification.permission === 'denied') { 49 | pushButton.textContent = 'Push Messaging Blocked.'; 50 | pushButton.disabled = true; 51 | updateSubscriptionOnServer(null); 52 | return; 53 | } 54 | 55 | if (isSubscribed) { 56 | pushButton.textContent = 'Disable Push Messaging'; 57 | } else { 58 | pushButton.textContent = 'Enable Push Messaging'; 59 | } 60 | 61 | pushButton.disabled = false; 62 | } 63 | 64 | function updateSubscriptionOnServer(subscription) { 65 | // TODO: Send subscription to application server 66 | 67 | const subscriptionJson = document.querySelector('.js-subscription-json'); 68 | const subscriptionDetails = 69 | document.querySelector('.js-subscription-details'); 70 | 71 | if (subscription) { 72 | subscriptionJson.textContent = JSON.stringify(subscription); 73 | subscriptionDetails.classList.remove('is-invisible'); 74 | } else { 75 | subscriptionDetails.classList.add('is-invisible'); 76 | } 77 | } 78 | 79 | function subscribeUser() { 80 | const applicationServerKey = urlB64ToUint8Array(applicationServerPublicKey); 81 | swRegistration.pushManager.subscribe({ 82 | userVisibleOnly: true, 83 | applicationServerKey: applicationServerKey 84 | }) 85 | .then(function(subscription) { 86 | console.log('User is subscribed'); 87 | 88 | updateSubscriptionOnServer(subscription); 89 | 90 | isSubscribed = true; 91 | 92 | updateBtn(); 93 | }) 94 | .catch(function(err) { 95 | console.log('Failed to subscribe the user: ', err); 96 | updateBtn(); 97 | }); 98 | } 99 | 100 | function initializeUI() { 101 | pushButton.addEventListener('click', function() { 102 | pushButton.disabled = true; 103 | if (isSubscribed) { 104 | // TODO: Unsubscribe user 105 | } else { 106 | subscribeUser(); 107 | } 108 | }); 109 | 110 | // Set the initial subscription value 111 | swRegistration.pushManager.getSubscription() 112 | .then(function(subscription) { 113 | isSubscribed = !(subscription === null); 114 | 115 | updateSubscriptionOnServer(subscription); 116 | 117 | if (isSubscribed) { 118 | console.log('User IS subscribed.'); 119 | } else { 120 | console.log('User is NOT subscribed.'); 121 | } 122 | 123 | updateBtn(); 124 | }); 125 | } 126 | 127 | if ('serviceWorker' in navigator && 'PushManager' in window) { 128 | console.log('Service Worker and Push is supported'); 129 | 130 | navigator.serviceWorker.register('sw.js') 131 | .then(function(swReg) { 132 | console.log('Service Worker is registered', swReg); 133 | 134 | swRegistration = swReg; 135 | initializeUI(); 136 | }) 137 | .catch(function(error) { 138 | console.error('Service Worker Error', error); 139 | }); 140 | } else { 141 | console.warn('Push messaging is not supported'); 142 | pushButton.textContent = 'Push Not Supported'; 143 | } 144 | -------------------------------------------------------------------------------- /completed/05-push-event/styles/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | 5 | html, body { 6 | width: 100%; 7 | padding: 0; 8 | margin: 0; 9 | } 10 | 11 | body { 12 | min-height: auto; 13 | box-sizing: border-box; 14 | } 15 | 16 | header { 17 | padding: 115px 0 32px 0; 18 | background-color: #00bcd4; 19 | color: white; 20 | } 21 | 22 | main, header > h1 { 23 | padding: 0 16px; 24 | max-width: 760px; 25 | box-sizing: border-box; 26 | margin: 0 auto; 27 | } 28 | 29 | main { 30 | margin: 24px auto; 31 | box-sizing: border-box; 32 | } 33 | 34 | pre { 35 | white-space: pre-wrap; 36 | background-color: #EEEEEE; 37 | padding: 16px; 38 | } 39 | 40 | pre code { 41 | word-break: break-word; 42 | } 43 | 44 | .is-invisible { 45 | opacity: 0; 46 | } 47 | 48 | .subscription-details { 49 | transition: opacity 1s; 50 | } 51 | 52 | @media (max-width: 600px) { 53 | header > h1 { 54 | font-size: 36px; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /completed/05-push-event/sw.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, serviceworker, es6 */ 21 | 22 | 'use strict'; 23 | 24 | self.addEventListener('push', function(event) { 25 | console.log('[Service Worker] Push Received.'); 26 | console.log(`[Service Worker] Push had this data: "${event.data.text()}"`); 27 | 28 | const title = 'Push Codelab'; 29 | const options = { 30 | body: 'Yay it works.', 31 | icon: 'images/icon.png', 32 | badge: 'images/badge.png' 33 | }; 34 | 35 | event.waitUntil(self.registration.showNotification(title, options)); 36 | }); 37 | -------------------------------------------------------------------------------- /completed/06-click/images/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/06-click/images/badge.png -------------------------------------------------------------------------------- /completed/06-click/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/06-click/images/icon.png -------------------------------------------------------------------------------- /completed/06-click/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Push Codelab 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |

Push Codelab

20 |
21 | 22 |
23 |

Welcome to the push messaging codelab. The button below needs to be 24 | fixed to support subscribing to push.

25 |

26 | 29 |

30 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /completed/06-click/scripts/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, es6 */ 21 | 22 | 'use strict'; 23 | 24 | const applicationServerPublicKey = 'BCW6JPG-T7Jx0bYKMhAbL6j3DL3VTTib7dwvBjQ' + 25 | 'C_496a12auzzKFnjgFjCsys_YtWkeMLhogfSlyM0CaIktx7o'; 26 | 27 | const pushButton = document.querySelector('.js-push-btn'); 28 | 29 | let isSubscribed = false; 30 | let swRegistration = null; 31 | 32 | function urlB64ToUint8Array(base64String) { 33 | const padding = '='.repeat((4 - base64String.length % 4) % 4); 34 | const base64 = (base64String + padding) 35 | .replace(/\-/g, '+') 36 | .replace(/_/g, '/'); 37 | 38 | const rawData = window.atob(base64); 39 | const outputArray = new Uint8Array(rawData.length); 40 | 41 | for (let i = 0; i < rawData.length; ++i) { 42 | outputArray[i] = rawData.charCodeAt(i); 43 | } 44 | return outputArray; 45 | } 46 | 47 | function updateBtn() { 48 | if (Notification.permission === 'denied') { 49 | pushButton.textContent = 'Push Messaging Blocked.'; 50 | pushButton.disabled = true; 51 | updateSubscriptionOnServer(null); 52 | return; 53 | } 54 | 55 | if (isSubscribed) { 56 | pushButton.textContent = 'Disable Push Messaging'; 57 | } else { 58 | pushButton.textContent = 'Enable Push Messaging'; 59 | } 60 | 61 | pushButton.disabled = false; 62 | } 63 | 64 | function updateSubscriptionOnServer(subscription) { 65 | // TODO: Send subscription to application server 66 | 67 | const subscriptionJson = document.querySelector('.js-subscription-json'); 68 | const subscriptionDetails = 69 | document.querySelector('.js-subscription-details'); 70 | 71 | if (subscription) { 72 | subscriptionJson.textContent = JSON.stringify(subscription); 73 | subscriptionDetails.classList.remove('is-invisible'); 74 | } else { 75 | subscriptionDetails.classList.add('is-invisible'); 76 | } 77 | } 78 | 79 | function subscribeUser() { 80 | const applicationServerKey = urlB64ToUint8Array(applicationServerPublicKey); 81 | swRegistration.pushManager.subscribe({ 82 | userVisibleOnly: true, 83 | applicationServerKey: applicationServerKey 84 | }) 85 | .then(function(subscription) { 86 | console.log('User is subscribed.'); 87 | 88 | updateSubscriptionOnServer(subscription); 89 | 90 | isSubscribed = true; 91 | 92 | updateBtn(); 93 | }) 94 | .catch(function(err) { 95 | console.log('Failed to subscribe the user: ', err); 96 | updateBtn(); 97 | }); 98 | } 99 | 100 | function initializeUI() { 101 | pushButton.addEventListener('click', function() { 102 | pushButton.disabled = true; 103 | if (isSubscribed) { 104 | // TODO: Unsubscribe user 105 | } else { 106 | subscribeUser(); 107 | } 108 | }); 109 | 110 | // Set the initial subscription value 111 | swRegistration.pushManager.getSubscription() 112 | .then(function(subscription) { 113 | isSubscribed = !(subscription === null); 114 | 115 | updateSubscriptionOnServer(subscription); 116 | 117 | if (isSubscribed) { 118 | console.log('User IS subscribed.'); 119 | } else { 120 | console.log('User is NOT subscribed.'); 121 | } 122 | 123 | updateBtn(); 124 | }); 125 | } 126 | 127 | if ('serviceWorker' in navigator && 'PushManager' in window) { 128 | console.log('Service Worker and Push is supported'); 129 | 130 | navigator.serviceWorker.register('sw.js') 131 | .then(function(swReg) { 132 | console.log('Service Worker is registered', swReg); 133 | 134 | swRegistration = swReg; 135 | initializeUI(); 136 | }) 137 | .catch(function(error) { 138 | console.error('Service Worker Error', error); 139 | }); 140 | } else { 141 | console.warn('Push messaging is not supported'); 142 | pushButton.textContent = 'Push Not Supported'; 143 | } 144 | -------------------------------------------------------------------------------- /completed/06-click/styles/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | 5 | html, body { 6 | width: 100%; 7 | padding: 0; 8 | margin: 0; 9 | } 10 | 11 | body { 12 | min-height: auto; 13 | box-sizing: border-box; 14 | } 15 | 16 | header { 17 | padding: 115px 0 32px 0; 18 | background-color: #00bcd4; 19 | color: white; 20 | } 21 | 22 | main, header > h1 { 23 | padding: 0 16px; 24 | max-width: 760px; 25 | box-sizing: border-box; 26 | margin: 0 auto; 27 | } 28 | 29 | main { 30 | margin: 24px auto; 31 | box-sizing: border-box; 32 | } 33 | 34 | pre { 35 | white-space: pre-wrap; 36 | background-color: #EEEEEE; 37 | padding: 16px; 38 | } 39 | 40 | pre code { 41 | word-break: break-word; 42 | } 43 | 44 | .is-invisible { 45 | opacity: 0; 46 | } 47 | 48 | .subscription-details { 49 | transition: opacity 1s; 50 | } 51 | 52 | @media (max-width: 600px) { 53 | header > h1 { 54 | font-size: 36px; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /completed/06-click/sw.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, serviceworker, es6 */ 21 | 22 | 'use strict'; 23 | 24 | self.addEventListener('push', function(event) { 25 | console.log('[Service Worker] Push Received.'); 26 | console.log(`[Service Worker] Push had this data: "${event.data.text()}"`); 27 | 28 | const title = 'Push Codelab'; 29 | const options = { 30 | body: 'Yay it works.', 31 | icon: 'images/icon.png', 32 | badge: 'images/badge.png' 33 | }; 34 | 35 | event.waitUntil(self.registration.showNotification(title, options)); 36 | }); 37 | 38 | self.addEventListener('notificationclick', function(event) { 39 | console.log('[Service Worker] Notification click Received.'); 40 | 41 | event.notification.close(); 42 | 43 | event.waitUntil( 44 | clients.openWindow('https://developers.google.com/web/') 45 | ); 46 | }); 47 | -------------------------------------------------------------------------------- /completed/07-unsubscribe/images/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/07-unsubscribe/images/badge.png -------------------------------------------------------------------------------- /completed/07-unsubscribe/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/07-unsubscribe/images/icon.png -------------------------------------------------------------------------------- /completed/07-unsubscribe/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Push Codelab 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |

Push Codelab

20 |
21 | 22 |
23 |

Welcome to the push messaging codelab. The button below needs to be 24 | fixed to support subscribing to push.

25 |

26 | 29 |

30 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /completed/07-unsubscribe/scripts/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, es6 */ 21 | 22 | 'use strict'; 23 | 24 | const applicationServerPublicKey = 'BCW6JPG-T7Jx0bYKMhAbL6j3DL3VTTib7dwvBjQ' + 25 | 'C_496a12auzzKFnjgFjCsys_YtWkeMLhogfSlyM0CaIktx7o'; 26 | 27 | const pushButton = document.querySelector('.js-push-btn'); 28 | 29 | let isSubscribed = false; 30 | let swRegistration = null; 31 | 32 | function urlB64ToUint8Array(base64String) { 33 | const padding = '='.repeat((4 - base64String.length % 4) % 4); 34 | const base64 = (base64String + padding) 35 | .replace(/\-/g, '+') 36 | .replace(/_/g, '/'); 37 | 38 | const rawData = window.atob(base64); 39 | const outputArray = new Uint8Array(rawData.length); 40 | 41 | for (let i = 0; i < rawData.length; ++i) { 42 | outputArray[i] = rawData.charCodeAt(i); 43 | } 44 | return outputArray; 45 | } 46 | 47 | function updateBtn() { 48 | if (Notification.permission === 'denied') { 49 | pushButton.textContent = 'Push Messaging Blocked.'; 50 | pushButton.disabled = true; 51 | updateSubscriptionOnServer(null); 52 | return; 53 | } 54 | 55 | if (isSubscribed) { 56 | pushButton.textContent = 'Disable Push Messaging'; 57 | } else { 58 | pushButton.textContent = 'Enable Push Messaging'; 59 | } 60 | 61 | pushButton.disabled = false; 62 | } 63 | 64 | function updateSubscriptionOnServer(subscription) { 65 | // TODO: Send subscription to application server 66 | 67 | const subscriptionJson = document.querySelector('.js-subscription-json'); 68 | const subscriptionDetails = 69 | document.querySelector('.js-subscription-details'); 70 | 71 | if (subscription) { 72 | subscriptionJson.textContent = JSON.stringify(subscription); 73 | subscriptionDetails.classList.remove('is-invisible'); 74 | } else { 75 | subscriptionDetails.classList.add('is-invisible'); 76 | } 77 | } 78 | 79 | function subscribeUser() { 80 | const applicationServerKey = urlB64ToUint8Array(applicationServerPublicKey); 81 | swRegistration.pushManager.subscribe({ 82 | userVisibleOnly: true, 83 | applicationServerKey: applicationServerKey 84 | }) 85 | .then(function(subscription) { 86 | console.log('User is subscribed.'); 87 | 88 | updateSubscriptionOnServer(subscription); 89 | 90 | isSubscribed = true; 91 | 92 | updateBtn(); 93 | }) 94 | .catch(function(err) { 95 | console.log('Failed to subscribe the user: ', err); 96 | updateBtn(); 97 | }); 98 | } 99 | 100 | function unsubscribeUser() { 101 | swRegistration.pushManager.getSubscription() 102 | .then(function(subscription) { 103 | if (subscription) { 104 | return subscription.unsubscribe(); 105 | } 106 | }) 107 | .catch(function(error) { 108 | console.log('Error unsubscribing', error); 109 | }) 110 | .then(function() { 111 | updateSubscriptionOnServer(null); 112 | 113 | console.log('User is unsubscribed.'); 114 | isSubscribed = false; 115 | 116 | updateBtn(); 117 | }); 118 | } 119 | 120 | function initializeUI() { 121 | pushButton.addEventListener('click', function() { 122 | pushButton.disabled = true; 123 | if (isSubscribed) { 124 | unsubscribeUser(); 125 | } else { 126 | subscribeUser(); 127 | } 128 | }); 129 | 130 | // Set the initial subscription value 131 | swRegistration.pushManager.getSubscription() 132 | .then(function(subscription) { 133 | isSubscribed = !(subscription === null); 134 | 135 | updateSubscriptionOnServer(subscription); 136 | 137 | if (isSubscribed) { 138 | console.log('User IS subscribed.'); 139 | } else { 140 | console.log('User is NOT subscribed.'); 141 | } 142 | 143 | updateBtn(); 144 | }); 145 | } 146 | 147 | if ('serviceWorker' in navigator && 'PushManager' in window) { 148 | console.log('Service Worker and Push is supported'); 149 | 150 | navigator.serviceWorker.register('sw.js') 151 | .then(function(swReg) { 152 | console.log('Service Worker is registered', swReg); 153 | 154 | swRegistration = swReg; 155 | initializeUI(); 156 | }) 157 | .catch(function(error) { 158 | console.error('Service Worker Error', error); 159 | }); 160 | } else { 161 | console.warn('Push messaging is not supported'); 162 | pushButton.textContent = 'Push Not Supported'; 163 | } 164 | -------------------------------------------------------------------------------- /completed/07-unsubscribe/styles/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | 5 | html, body { 6 | width: 100%; 7 | padding: 0; 8 | margin: 0; 9 | } 10 | 11 | body { 12 | min-height: auto; 13 | box-sizing: border-box; 14 | } 15 | 16 | header { 17 | padding: 115px 0 32px 0; 18 | background-color: #00bcd4; 19 | color: white; 20 | } 21 | 22 | main, header > h1 { 23 | padding: 0 16px; 24 | max-width: 760px; 25 | box-sizing: border-box; 26 | margin: 0 auto; 27 | } 28 | 29 | main { 30 | margin: 24px auto; 31 | box-sizing: border-box; 32 | } 33 | 34 | pre { 35 | white-space: pre-wrap; 36 | background-color: #EEEEEE; 37 | padding: 16px; 38 | } 39 | 40 | pre code { 41 | word-break: break-word; 42 | } 43 | 44 | .is-invisible { 45 | opacity: 0; 46 | } 47 | 48 | .subscription-details { 49 | transition: opacity 1s; 50 | } 51 | 52 | @media (max-width: 600px) { 53 | header > h1 { 54 | font-size: 36px; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /completed/07-unsubscribe/sw.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, serviceworker, es6 */ 21 | 22 | 'use strict'; 23 | 24 | self.addEventListener('push', function(event) { 25 | console.log('[Service Worker] Push Received.'); 26 | console.log(`[Service Worker] Push had this data: "${event.data.text()}"`); 27 | 28 | const title = 'Push Codelab'; 29 | const options = { 30 | body: 'Yay it works.', 31 | icon: 'images/icon.png', 32 | badge: 'images/badge.png' 33 | }; 34 | 35 | event.waitUntil(self.registration.showNotification(title, options)); 36 | }); 37 | 38 | self.addEventListener('notificationclick', function(event) { 39 | console.log('[Service Worker] Notification click Received.'); 40 | 41 | event.notification.close(); 42 | 43 | event.waitUntil( 44 | clients.openWindow('https://developers.google.com/web/') 45 | ); 46 | }); 47 | -------------------------------------------------------------------------------- /completed/08-push-subscription-change/images/badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/08-push-subscription-change/images/badge.png -------------------------------------------------------------------------------- /completed/08-push-subscription-change/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/completed/08-push-subscription-change/images/icon.png -------------------------------------------------------------------------------- /completed/08-push-subscription-change/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Push Codelab 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |

Push Codelab

20 |
21 | 22 |
23 |

Welcome to the push messaging codelab. The button below needs to be 24 | fixed to support subscribing to push.

25 |

26 | 29 |

30 | 40 |
41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /completed/08-push-subscription-change/scripts/main.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, es6 */ 21 | 22 | 'use strict'; 23 | 24 | const applicationServerPublicKey = 'BHdd2PwLOsYaDQQOmqw_8KIIYOQYECWN' + 25 | 'lat0K8GScnytjV88e6Xifn0GMz7MbScAkxf_kVJhnp-0NrB_P4u6WHw'; 26 | 27 | const pushButton = document.querySelector('.js-push-btn'); 28 | 29 | let isSubscribed = false; 30 | let swRegistration = null; 31 | 32 | function urlB64ToUint8Array(base64String) { 33 | const padding = '='.repeat((4 - base64String.length % 4) % 4); 34 | const base64 = (base64String + padding) 35 | .replace(/\-/g, '+') 36 | .replace(/_/g, '/'); 37 | 38 | const rawData = window.atob(base64); 39 | const outputArray = new Uint8Array(rawData.length); 40 | 41 | for (let i = 0; i < rawData.length; ++i) { 42 | outputArray[i] = rawData.charCodeAt(i); 43 | } 44 | return outputArray; 45 | } 46 | 47 | function updateBtn() { 48 | if (Notification.permission === 'denied') { 49 | pushButton.textContent = 'Push Messaging Blocked.'; 50 | pushButton.disabled = true; 51 | updateSubscriptionOnServer(null); 52 | return; 53 | } 54 | 55 | if (isSubscribed) { 56 | pushButton.textContent = 'Disable Push Messaging'; 57 | } else { 58 | pushButton.textContent = 'Enable Push Messaging'; 59 | } 60 | 61 | pushButton.disabled = false; 62 | } 63 | 64 | function updateSubscriptionOnServer(subscription) { 65 | // TODO: Send subscription to application server 66 | 67 | const subscriptionJson = document.querySelector('.js-subscription-json'); 68 | const subscriptionDetails = 69 | document.querySelector('.js-subscription-details'); 70 | 71 | if (subscription) { 72 | subscriptionJson.textContent = JSON.stringify(subscription); 73 | subscriptionDetails.classList.remove('is-invisible'); 74 | } else { 75 | subscriptionDetails.classList.add('is-invisible'); 76 | } 77 | } 78 | 79 | function subscribeUser() { 80 | const applicationServerKey = urlB64ToUint8Array(applicationServerPublicKey); 81 | swRegistration.pushManager.subscribe({ 82 | userVisibleOnly: true, 83 | applicationServerKey: applicationServerKey 84 | }) 85 | .then(function(subscription) { 86 | console.log('User is subscribed.'); 87 | 88 | updateSubscriptionOnServer(subscription); 89 | 90 | isSubscribed = true; 91 | 92 | updateBtn(); 93 | }) 94 | .catch(function(err) { 95 | console.log('Failed to subscribe the user: ', err); 96 | updateBtn(); 97 | }); 98 | } 99 | 100 | function unsubscribeUser() { 101 | swRegistration.pushManager.getSubscription() 102 | .then(function(subscription) { 103 | if (subscription) { 104 | return subscription.unsubscribe(); 105 | } 106 | }) 107 | .catch(function(error) { 108 | console.log('Error unsubscribing', error); 109 | }) 110 | .then(function() { 111 | updateSubscriptionOnServer(null); 112 | 113 | console.log('User is unsubscribed.'); 114 | isSubscribed = false; 115 | 116 | updateBtn(); 117 | }); 118 | } 119 | 120 | function initializeUI() { 121 | pushButton.addEventListener('click', function() { 122 | pushButton.disabled = true; 123 | if (isSubscribed) { 124 | unsubscribeUser(); 125 | } else { 126 | subscribeUser(); 127 | } 128 | }); 129 | 130 | // Set the initial subscription value 131 | swRegistration.pushManager.getSubscription() 132 | .then(function(subscription) { 133 | isSubscribed = !(subscription === null); 134 | 135 | updateSubscriptionOnServer(subscription); 136 | 137 | if (isSubscribed) { 138 | console.log('User IS subscribed.'); 139 | } else { 140 | console.log('User is NOT subscribed.'); 141 | } 142 | 143 | updateBtn(); 144 | }); 145 | } 146 | 147 | if ('serviceWorker' in navigator && 'PushManager' in window) { 148 | console.log('Service Worker and Push is supported'); 149 | 150 | navigator.serviceWorker.register('sw.js') 151 | .then(function(swReg) { 152 | console.log('Service Worker is registered', swReg); 153 | 154 | swRegistration = swReg; 155 | initializeUI(); 156 | }) 157 | .catch(function(error) { 158 | console.error('Service Worker Error', error); 159 | }); 160 | } else { 161 | console.warn('Push messaging is not supported'); 162 | pushButton.textContent = 'Push Not Supported'; 163 | } 164 | -------------------------------------------------------------------------------- /completed/08-push-subscription-change/styles/index.css: -------------------------------------------------------------------------------- 1 | html { 2 | height: 100%; 3 | } 4 | 5 | html, body { 6 | width: 100%; 7 | padding: 0; 8 | margin: 0; 9 | } 10 | 11 | body { 12 | min-height: auto; 13 | box-sizing: border-box; 14 | } 15 | 16 | header { 17 | padding: 115px 0 32px 0; 18 | background-color: #00bcd4; 19 | color: white; 20 | } 21 | 22 | main, header > h1 { 23 | padding: 0 16px; 24 | max-width: 760px; 25 | box-sizing: border-box; 26 | margin: 0 auto; 27 | } 28 | 29 | main { 30 | margin: 24px auto; 31 | box-sizing: border-box; 32 | } 33 | 34 | pre { 35 | white-space: pre-wrap; 36 | background-color: #EEEEEE; 37 | padding: 16px; 38 | } 39 | 40 | pre code { 41 | word-break: break-word; 42 | } 43 | 44 | .is-invisible { 45 | opacity: 0; 46 | } 47 | 48 | .subscription-details { 49 | transition: opacity 1s; 50 | } 51 | 52 | @media (max-width: 600px) { 53 | header > h1 { 54 | font-size: 36px; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /completed/08-push-subscription-change/sw.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Push Notifications codelab 4 | * Copyright 2015 Google Inc. All rights reserved. 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * https://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License 17 | * 18 | */ 19 | 20 | /* eslint-env browser, serviceworker, es6 */ 21 | 22 | 'use strict'; 23 | 24 | /* eslint-disable max-len */ 25 | 26 | const applicationServerPublicKey = 'BH8-hIchXKMI6AKSee8gD0hhPThRqaEhIEtMJwcTjEQhiOKdG-_2tTIO-6hOAK4kwg5M9Saedjxp4hVE-khhWxY'; 27 | 28 | /* eslint-enable max-len */ 29 | 30 | function urlB64ToUint8Array(base64String) { 31 | const padding = '='.repeat((4 - base64String.length % 4) % 4); 32 | const base64 = (base64String + padding) 33 | .replace(/\-/g, '+') 34 | .replace(/_/g, '/'); 35 | 36 | const rawData = window.atob(base64); 37 | const outputArray = new Uint8Array(rawData.length); 38 | 39 | for (let i = 0; i < rawData.length; ++i) { 40 | outputArray[i] = rawData.charCodeAt(i); 41 | } 42 | return outputArray; 43 | } 44 | 45 | self.addEventListener('push', function(event) { 46 | console.log('[Service Worker] Push Received.'); 47 | console.log(`[Service Worker] Push had this data: "${event.data.text()}"`); 48 | 49 | const title = 'Push Codelab'; 50 | const options = { 51 | body: 'Yay it works.', 52 | icon: 'images/icon.png', 53 | badge: 'images/badge.png' 54 | }; 55 | 56 | event.waitUntil(self.registration.showNotification(title, options)); 57 | }); 58 | 59 | self.addEventListener('notificationclick', function(event) { 60 | console.log('[Service Worker] Notification click Received.'); 61 | 62 | event.notification.close(); 63 | 64 | event.waitUntil( 65 | clients.openWindow('https://developers.google.com/web/') 66 | ); 67 | }); 68 | 69 | self.addEventListener('pushsubscriptionchange', function(event) { 70 | console.log('[Service Worker]: \'pushsubscriptionchange\' event fired.'); 71 | const applicationServerKey = urlB64ToUint8Array(applicationServerPublicKey); 72 | event.waitUntil( 73 | self.registration.pushManager.subscribe({ 74 | userVisibleOnly: true, 75 | applicationServerKey: applicationServerKey 76 | }) 77 | .then(function(newSubscription) { 78 | // TODO: Send to application server 79 | console.log('[Service Worker] New subscription: ', newSubscription); 80 | }) 81 | ); 82 | }); 83 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "push-notifications", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "push-notifications", 9 | "version": "1.0.0", 10 | "license": "Apache 2", 11 | "devDependencies": { 12 | "eslint": "^6.0.1", 13 | "eslint-config-google": "^0.13.0" 14 | } 15 | }, 16 | "node_modules/@babel/code-frame": { 17 | "version": "7.14.5", 18 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", 19 | "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", 20 | "dev": true, 21 | "dependencies": { 22 | "@babel/highlight": "^7.14.5" 23 | }, 24 | "engines": { 25 | "node": ">=6.9.0" 26 | } 27 | }, 28 | "node_modules/@babel/helper-validator-identifier": { 29 | "version": "7.14.9", 30 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", 31 | "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", 32 | "dev": true, 33 | "engines": { 34 | "node": ">=6.9.0" 35 | } 36 | }, 37 | "node_modules/@babel/highlight": { 38 | "version": "7.14.5", 39 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", 40 | "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", 41 | "dev": true, 42 | "dependencies": { 43 | "@babel/helper-validator-identifier": "^7.14.5", 44 | "chalk": "^2.0.0", 45 | "js-tokens": "^4.0.0" 46 | }, 47 | "engines": { 48 | "node": ">=6.9.0" 49 | } 50 | }, 51 | "node_modules/acorn": { 52 | "version": "7.4.1", 53 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", 54 | "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", 55 | "dev": true, 56 | "bin": { 57 | "acorn": "bin/acorn" 58 | }, 59 | "engines": { 60 | "node": ">=0.4.0" 61 | } 62 | }, 63 | "node_modules/acorn-jsx": { 64 | "version": "5.3.2", 65 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", 66 | "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", 67 | "dev": true, 68 | "peerDependencies": { 69 | "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" 70 | } 71 | }, 72 | "node_modules/ajv": { 73 | "version": "6.12.6", 74 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 75 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 76 | "dev": true, 77 | "dependencies": { 78 | "fast-deep-equal": "^3.1.1", 79 | "fast-json-stable-stringify": "^2.0.0", 80 | "json-schema-traverse": "^0.4.1", 81 | "uri-js": "^4.2.2" 82 | }, 83 | "funding": { 84 | "type": "github", 85 | "url": "https://github.com/sponsors/epoberezkin" 86 | } 87 | }, 88 | "node_modules/ansi-escapes": { 89 | "version": "4.3.2", 90 | "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", 91 | "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", 92 | "dev": true, 93 | "dependencies": { 94 | "type-fest": "^0.21.3" 95 | }, 96 | "engines": { 97 | "node": ">=8" 98 | }, 99 | "funding": { 100 | "url": "https://github.com/sponsors/sindresorhus" 101 | } 102 | }, 103 | "node_modules/ansi-escapes/node_modules/type-fest": { 104 | "version": "0.21.3", 105 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", 106 | "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", 107 | "dev": true, 108 | "engines": { 109 | "node": ">=10" 110 | }, 111 | "funding": { 112 | "url": "https://github.com/sponsors/sindresorhus" 113 | } 114 | }, 115 | "node_modules/ansi-regex": { 116 | "version": "4.1.0", 117 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 118 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 119 | "dev": true, 120 | "engines": { 121 | "node": ">=6" 122 | } 123 | }, 124 | "node_modules/ansi-styles": { 125 | "version": "3.2.1", 126 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 127 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 128 | "dev": true, 129 | "dependencies": { 130 | "color-convert": "^1.9.0" 131 | }, 132 | "engines": { 133 | "node": ">=4" 134 | } 135 | }, 136 | "node_modules/argparse": { 137 | "version": "1.0.10", 138 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 139 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 140 | "dev": true, 141 | "dependencies": { 142 | "sprintf-js": "~1.0.2" 143 | } 144 | }, 145 | "node_modules/astral-regex": { 146 | "version": "1.0.0", 147 | "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", 148 | "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", 149 | "dev": true, 150 | "engines": { 151 | "node": ">=4" 152 | } 153 | }, 154 | "node_modules/balanced-match": { 155 | "version": "1.0.2", 156 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 157 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 158 | "dev": true 159 | }, 160 | "node_modules/brace-expansion": { 161 | "version": "1.1.11", 162 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 163 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 164 | "dev": true, 165 | "dependencies": { 166 | "balanced-match": "^1.0.0", 167 | "concat-map": "0.0.1" 168 | } 169 | }, 170 | "node_modules/callsites": { 171 | "version": "3.1.0", 172 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 173 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 174 | "dev": true, 175 | "engines": { 176 | "node": ">=6" 177 | } 178 | }, 179 | "node_modules/chalk": { 180 | "version": "2.4.2", 181 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 182 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 183 | "dev": true, 184 | "dependencies": { 185 | "ansi-styles": "^3.2.1", 186 | "escape-string-regexp": "^1.0.5", 187 | "supports-color": "^5.3.0" 188 | }, 189 | "engines": { 190 | "node": ">=4" 191 | } 192 | }, 193 | "node_modules/chardet": { 194 | "version": "0.7.0", 195 | "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", 196 | "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", 197 | "dev": true 198 | }, 199 | "node_modules/cli-cursor": { 200 | "version": "3.1.0", 201 | "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", 202 | "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", 203 | "dev": true, 204 | "dependencies": { 205 | "restore-cursor": "^3.1.0" 206 | }, 207 | "engines": { 208 | "node": ">=8" 209 | } 210 | }, 211 | "node_modules/cli-width": { 212 | "version": "3.0.0", 213 | "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", 214 | "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", 215 | "dev": true, 216 | "engines": { 217 | "node": ">= 10" 218 | } 219 | }, 220 | "node_modules/color-convert": { 221 | "version": "1.9.3", 222 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 223 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 224 | "dev": true, 225 | "dependencies": { 226 | "color-name": "1.1.3" 227 | } 228 | }, 229 | "node_modules/color-name": { 230 | "version": "1.1.3", 231 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 232 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 233 | "dev": true 234 | }, 235 | "node_modules/concat-map": { 236 | "version": "0.0.1", 237 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 238 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 239 | "dev": true 240 | }, 241 | "node_modules/cross-spawn": { 242 | "version": "6.0.5", 243 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", 244 | "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", 245 | "dev": true, 246 | "dependencies": { 247 | "nice-try": "^1.0.4", 248 | "path-key": "^2.0.1", 249 | "semver": "^5.5.0", 250 | "shebang-command": "^1.2.0", 251 | "which": "^1.2.9" 252 | }, 253 | "engines": { 254 | "node": ">=4.8" 255 | } 256 | }, 257 | "node_modules/cross-spawn/node_modules/semver": { 258 | "version": "5.7.1", 259 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 260 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 261 | "dev": true, 262 | "bin": { 263 | "semver": "bin/semver" 264 | } 265 | }, 266 | "node_modules/debug": { 267 | "version": "4.3.2", 268 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", 269 | "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", 270 | "dev": true, 271 | "dependencies": { 272 | "ms": "2.1.2" 273 | }, 274 | "engines": { 275 | "node": ">=6.0" 276 | }, 277 | "peerDependenciesMeta": { 278 | "supports-color": { 279 | "optional": true 280 | } 281 | } 282 | }, 283 | "node_modules/deep-is": { 284 | "version": "0.1.3", 285 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 286 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 287 | "dev": true 288 | }, 289 | "node_modules/doctrine": { 290 | "version": "3.0.0", 291 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", 292 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", 293 | "dev": true, 294 | "dependencies": { 295 | "esutils": "^2.0.2" 296 | }, 297 | "engines": { 298 | "node": ">=6.0.0" 299 | } 300 | }, 301 | "node_modules/emoji-regex": { 302 | "version": "8.0.0", 303 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 304 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 305 | "dev": true 306 | }, 307 | "node_modules/escape-string-regexp": { 308 | "version": "1.0.5", 309 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 310 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 311 | "dev": true, 312 | "engines": { 313 | "node": ">=0.8.0" 314 | } 315 | }, 316 | "node_modules/eslint": { 317 | "version": "6.8.0", 318 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", 319 | "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", 320 | "dev": true, 321 | "dependencies": { 322 | "@babel/code-frame": "^7.0.0", 323 | "ajv": "^6.10.0", 324 | "chalk": "^2.1.0", 325 | "cross-spawn": "^6.0.5", 326 | "debug": "^4.0.1", 327 | "doctrine": "^3.0.0", 328 | "eslint-scope": "^5.0.0", 329 | "eslint-utils": "^1.4.3", 330 | "eslint-visitor-keys": "^1.1.0", 331 | "espree": "^6.1.2", 332 | "esquery": "^1.0.1", 333 | "esutils": "^2.0.2", 334 | "file-entry-cache": "^5.0.1", 335 | "functional-red-black-tree": "^1.0.1", 336 | "glob-parent": "^5.0.0", 337 | "globals": "^12.1.0", 338 | "ignore": "^4.0.6", 339 | "import-fresh": "^3.0.0", 340 | "imurmurhash": "^0.1.4", 341 | "inquirer": "^7.0.0", 342 | "is-glob": "^4.0.0", 343 | "js-yaml": "^3.13.1", 344 | "json-stable-stringify-without-jsonify": "^1.0.1", 345 | "levn": "^0.3.0", 346 | "lodash": "^4.17.14", 347 | "minimatch": "^3.0.4", 348 | "mkdirp": "^0.5.1", 349 | "natural-compare": "^1.4.0", 350 | "optionator": "^0.8.3", 351 | "progress": "^2.0.0", 352 | "regexpp": "^2.0.1", 353 | "semver": "^6.1.2", 354 | "strip-ansi": "^5.2.0", 355 | "strip-json-comments": "^3.0.1", 356 | "table": "^5.2.3", 357 | "text-table": "^0.2.0", 358 | "v8-compile-cache": "^2.0.3" 359 | }, 360 | "bin": { 361 | "eslint": "bin/eslint.js" 362 | }, 363 | "engines": { 364 | "node": "^8.10.0 || ^10.13.0 || >=11.10.1" 365 | }, 366 | "funding": { 367 | "url": "https://opencollective.com/eslint" 368 | } 369 | }, 370 | "node_modules/eslint-config-google": { 371 | "version": "0.13.0", 372 | "resolved": "https://registry.npmjs.org/eslint-config-google/-/eslint-config-google-0.13.0.tgz", 373 | "integrity": "sha512-ELgMdOIpn0CFdsQS+FuxO+Ttu4p+aLaXHv9wA9yVnzqlUGV7oN/eRRnJekk7TCur6Cu2FXX0fqfIXRBaM14lpQ==", 374 | "dev": true, 375 | "engines": { 376 | "node": ">=0.10.0" 377 | }, 378 | "peerDependencies": { 379 | "eslint": ">=5.16.0" 380 | } 381 | }, 382 | "node_modules/eslint-scope": { 383 | "version": "5.1.1", 384 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", 385 | "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", 386 | "dev": true, 387 | "dependencies": { 388 | "esrecurse": "^4.3.0", 389 | "estraverse": "^4.1.1" 390 | }, 391 | "engines": { 392 | "node": ">=8.0.0" 393 | } 394 | }, 395 | "node_modules/eslint-utils": { 396 | "version": "1.4.3", 397 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", 398 | "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", 399 | "dev": true, 400 | "dependencies": { 401 | "eslint-visitor-keys": "^1.1.0" 402 | }, 403 | "engines": { 404 | "node": ">=6" 405 | } 406 | }, 407 | "node_modules/eslint-visitor-keys": { 408 | "version": "1.3.0", 409 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", 410 | "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", 411 | "dev": true, 412 | "engines": { 413 | "node": ">=4" 414 | } 415 | }, 416 | "node_modules/espree": { 417 | "version": "6.2.1", 418 | "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", 419 | "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", 420 | "dev": true, 421 | "dependencies": { 422 | "acorn": "^7.1.1", 423 | "acorn-jsx": "^5.2.0", 424 | "eslint-visitor-keys": "^1.1.0" 425 | }, 426 | "engines": { 427 | "node": ">=6.0.0" 428 | } 429 | }, 430 | "node_modules/esprima": { 431 | "version": "4.0.1", 432 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 433 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 434 | "dev": true, 435 | "bin": { 436 | "esparse": "bin/esparse.js", 437 | "esvalidate": "bin/esvalidate.js" 438 | }, 439 | "engines": { 440 | "node": ">=4" 441 | } 442 | }, 443 | "node_modules/esquery": { 444 | "version": "1.4.0", 445 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", 446 | "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", 447 | "dev": true, 448 | "dependencies": { 449 | "estraverse": "^5.1.0" 450 | }, 451 | "engines": { 452 | "node": ">=0.10" 453 | } 454 | }, 455 | "node_modules/esquery/node_modules/estraverse": { 456 | "version": "5.2.0", 457 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", 458 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", 459 | "dev": true, 460 | "engines": { 461 | "node": ">=4.0" 462 | } 463 | }, 464 | "node_modules/esrecurse": { 465 | "version": "4.3.0", 466 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", 467 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", 468 | "dev": true, 469 | "dependencies": { 470 | "estraverse": "^5.2.0" 471 | }, 472 | "engines": { 473 | "node": ">=4.0" 474 | } 475 | }, 476 | "node_modules/esrecurse/node_modules/estraverse": { 477 | "version": "5.2.0", 478 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", 479 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", 480 | "dev": true, 481 | "engines": { 482 | "node": ">=4.0" 483 | } 484 | }, 485 | "node_modules/estraverse": { 486 | "version": "4.3.0", 487 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", 488 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", 489 | "dev": true, 490 | "engines": { 491 | "node": ">=4.0" 492 | } 493 | }, 494 | "node_modules/esutils": { 495 | "version": "2.0.3", 496 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 497 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 498 | "dev": true, 499 | "engines": { 500 | "node": ">=0.10.0" 501 | } 502 | }, 503 | "node_modules/external-editor": { 504 | "version": "3.1.0", 505 | "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", 506 | "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", 507 | "dev": true, 508 | "dependencies": { 509 | "chardet": "^0.7.0", 510 | "iconv-lite": "^0.4.24", 511 | "tmp": "^0.0.33" 512 | }, 513 | "engines": { 514 | "node": ">=4" 515 | } 516 | }, 517 | "node_modules/fast-deep-equal": { 518 | "version": "3.1.3", 519 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 520 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 521 | "dev": true 522 | }, 523 | "node_modules/fast-json-stable-stringify": { 524 | "version": "2.1.0", 525 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 526 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 527 | "dev": true 528 | }, 529 | "node_modules/fast-levenshtein": { 530 | "version": "2.0.6", 531 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 532 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", 533 | "dev": true 534 | }, 535 | "node_modules/figures": { 536 | "version": "3.2.0", 537 | "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", 538 | "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", 539 | "dev": true, 540 | "dependencies": { 541 | "escape-string-regexp": "^1.0.5" 542 | }, 543 | "engines": { 544 | "node": ">=8" 545 | }, 546 | "funding": { 547 | "url": "https://github.com/sponsors/sindresorhus" 548 | } 549 | }, 550 | "node_modules/file-entry-cache": { 551 | "version": "5.0.1", 552 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", 553 | "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", 554 | "dev": true, 555 | "dependencies": { 556 | "flat-cache": "^2.0.1" 557 | }, 558 | "engines": { 559 | "node": ">=4" 560 | } 561 | }, 562 | "node_modules/flat-cache": { 563 | "version": "2.0.1", 564 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", 565 | "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", 566 | "dev": true, 567 | "dependencies": { 568 | "flatted": "^2.0.0", 569 | "rimraf": "2.6.3", 570 | "write": "1.0.3" 571 | }, 572 | "engines": { 573 | "node": ">=4" 574 | } 575 | }, 576 | "node_modules/flatted": { 577 | "version": "2.0.2", 578 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", 579 | "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", 580 | "dev": true 581 | }, 582 | "node_modules/fs.realpath": { 583 | "version": "1.0.0", 584 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 585 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 586 | "dev": true 587 | }, 588 | "node_modules/functional-red-black-tree": { 589 | "version": "1.0.1", 590 | "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", 591 | "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", 592 | "dev": true 593 | }, 594 | "node_modules/glob": { 595 | "version": "7.1.7", 596 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", 597 | "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", 598 | "dev": true, 599 | "dependencies": { 600 | "fs.realpath": "^1.0.0", 601 | "inflight": "^1.0.4", 602 | "inherits": "2", 603 | "minimatch": "^3.0.4", 604 | "once": "^1.3.0", 605 | "path-is-absolute": "^1.0.0" 606 | }, 607 | "engines": { 608 | "node": "*" 609 | }, 610 | "funding": { 611 | "url": "https://github.com/sponsors/isaacs" 612 | } 613 | }, 614 | "node_modules/glob-parent": { 615 | "version": "5.1.2", 616 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 617 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 618 | "dev": true, 619 | "dependencies": { 620 | "is-glob": "^4.0.1" 621 | }, 622 | "engines": { 623 | "node": ">= 6" 624 | } 625 | }, 626 | "node_modules/globals": { 627 | "version": "12.4.0", 628 | "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", 629 | "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", 630 | "dev": true, 631 | "dependencies": { 632 | "type-fest": "^0.8.1" 633 | }, 634 | "engines": { 635 | "node": ">=8" 636 | }, 637 | "funding": { 638 | "url": "https://github.com/sponsors/sindresorhus" 639 | } 640 | }, 641 | "node_modules/has-flag": { 642 | "version": "3.0.0", 643 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 644 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 645 | "dev": true, 646 | "engines": { 647 | "node": ">=4" 648 | } 649 | }, 650 | "node_modules/iconv-lite": { 651 | "version": "0.4.24", 652 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 653 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 654 | "dev": true, 655 | "dependencies": { 656 | "safer-buffer": ">= 2.1.2 < 3" 657 | }, 658 | "engines": { 659 | "node": ">=0.10.0" 660 | } 661 | }, 662 | "node_modules/ignore": { 663 | "version": "4.0.6", 664 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", 665 | "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", 666 | "dev": true, 667 | "engines": { 668 | "node": ">= 4" 669 | } 670 | }, 671 | "node_modules/import-fresh": { 672 | "version": "3.3.0", 673 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", 674 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", 675 | "dev": true, 676 | "dependencies": { 677 | "parent-module": "^1.0.0", 678 | "resolve-from": "^4.0.0" 679 | }, 680 | "engines": { 681 | "node": ">=6" 682 | }, 683 | "funding": { 684 | "url": "https://github.com/sponsors/sindresorhus" 685 | } 686 | }, 687 | "node_modules/imurmurhash": { 688 | "version": "0.1.4", 689 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 690 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 691 | "dev": true, 692 | "engines": { 693 | "node": ">=0.8.19" 694 | } 695 | }, 696 | "node_modules/inflight": { 697 | "version": "1.0.6", 698 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 699 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 700 | "dev": true, 701 | "dependencies": { 702 | "once": "^1.3.0", 703 | "wrappy": "1" 704 | } 705 | }, 706 | "node_modules/inherits": { 707 | "version": "2.0.4", 708 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 709 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 710 | "dev": true 711 | }, 712 | "node_modules/inquirer": { 713 | "version": "7.3.3", 714 | "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", 715 | "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", 716 | "dev": true, 717 | "dependencies": { 718 | "ansi-escapes": "^4.2.1", 719 | "chalk": "^4.1.0", 720 | "cli-cursor": "^3.1.0", 721 | "cli-width": "^3.0.0", 722 | "external-editor": "^3.0.3", 723 | "figures": "^3.0.0", 724 | "lodash": "^4.17.19", 725 | "mute-stream": "0.0.8", 726 | "run-async": "^2.4.0", 727 | "rxjs": "^6.6.0", 728 | "string-width": "^4.1.0", 729 | "strip-ansi": "^6.0.0", 730 | "through": "^2.3.6" 731 | }, 732 | "engines": { 733 | "node": ">=8.0.0" 734 | } 735 | }, 736 | "node_modules/inquirer/node_modules/ansi-regex": { 737 | "version": "5.0.0", 738 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 739 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 740 | "dev": true, 741 | "engines": { 742 | "node": ">=8" 743 | } 744 | }, 745 | "node_modules/inquirer/node_modules/ansi-styles": { 746 | "version": "4.3.0", 747 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 748 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 749 | "dev": true, 750 | "dependencies": { 751 | "color-convert": "^2.0.1" 752 | }, 753 | "engines": { 754 | "node": ">=8" 755 | }, 756 | "funding": { 757 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 758 | } 759 | }, 760 | "node_modules/inquirer/node_modules/chalk": { 761 | "version": "4.1.2", 762 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 763 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 764 | "dev": true, 765 | "dependencies": { 766 | "ansi-styles": "^4.1.0", 767 | "supports-color": "^7.1.0" 768 | }, 769 | "engines": { 770 | "node": ">=10" 771 | }, 772 | "funding": { 773 | "url": "https://github.com/chalk/chalk?sponsor=1" 774 | } 775 | }, 776 | "node_modules/inquirer/node_modules/color-convert": { 777 | "version": "2.0.1", 778 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 779 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 780 | "dev": true, 781 | "dependencies": { 782 | "color-name": "~1.1.4" 783 | }, 784 | "engines": { 785 | "node": ">=7.0.0" 786 | } 787 | }, 788 | "node_modules/inquirer/node_modules/color-name": { 789 | "version": "1.1.4", 790 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 791 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 792 | "dev": true 793 | }, 794 | "node_modules/inquirer/node_modules/has-flag": { 795 | "version": "4.0.0", 796 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 797 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 798 | "dev": true, 799 | "engines": { 800 | "node": ">=8" 801 | } 802 | }, 803 | "node_modules/inquirer/node_modules/strip-ansi": { 804 | "version": "6.0.0", 805 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 806 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 807 | "dev": true, 808 | "dependencies": { 809 | "ansi-regex": "^5.0.0" 810 | }, 811 | "engines": { 812 | "node": ">=8" 813 | } 814 | }, 815 | "node_modules/inquirer/node_modules/supports-color": { 816 | "version": "7.2.0", 817 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 818 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 819 | "dev": true, 820 | "dependencies": { 821 | "has-flag": "^4.0.0" 822 | }, 823 | "engines": { 824 | "node": ">=8" 825 | } 826 | }, 827 | "node_modules/is-extglob": { 828 | "version": "2.1.1", 829 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 830 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 831 | "dev": true, 832 | "engines": { 833 | "node": ">=0.10.0" 834 | } 835 | }, 836 | "node_modules/is-fullwidth-code-point": { 837 | "version": "3.0.0", 838 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 839 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 840 | "dev": true, 841 | "engines": { 842 | "node": ">=8" 843 | } 844 | }, 845 | "node_modules/is-glob": { 846 | "version": "4.0.1", 847 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 848 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 849 | "dev": true, 850 | "dependencies": { 851 | "is-extglob": "^2.1.1" 852 | }, 853 | "engines": { 854 | "node": ">=0.10.0" 855 | } 856 | }, 857 | "node_modules/isexe": { 858 | "version": "2.0.0", 859 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 860 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 861 | "dev": true 862 | }, 863 | "node_modules/js-tokens": { 864 | "version": "4.0.0", 865 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 866 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 867 | "dev": true 868 | }, 869 | "node_modules/js-yaml": { 870 | "version": "3.14.1", 871 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", 872 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 873 | "dev": true, 874 | "dependencies": { 875 | "argparse": "^1.0.7", 876 | "esprima": "^4.0.0" 877 | }, 878 | "bin": { 879 | "js-yaml": "bin/js-yaml.js" 880 | } 881 | }, 882 | "node_modules/json-schema-traverse": { 883 | "version": "0.4.1", 884 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 885 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 886 | "dev": true 887 | }, 888 | "node_modules/json-stable-stringify-without-jsonify": { 889 | "version": "1.0.1", 890 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 891 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", 892 | "dev": true 893 | }, 894 | "node_modules/levn": { 895 | "version": "0.3.0", 896 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", 897 | "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", 898 | "dev": true, 899 | "dependencies": { 900 | "prelude-ls": "~1.1.2", 901 | "type-check": "~0.3.2" 902 | }, 903 | "engines": { 904 | "node": ">= 0.8.0" 905 | } 906 | }, 907 | "node_modules/lodash": { 908 | "version": "4.17.21", 909 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 910 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 911 | "dev": true 912 | }, 913 | "node_modules/mimic-fn": { 914 | "version": "2.1.0", 915 | "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", 916 | "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", 917 | "dev": true, 918 | "engines": { 919 | "node": ">=6" 920 | } 921 | }, 922 | "node_modules/minimatch": { 923 | "version": "3.0.4", 924 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 925 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 926 | "dev": true, 927 | "dependencies": { 928 | "brace-expansion": "^1.1.7" 929 | }, 930 | "engines": { 931 | "node": "*" 932 | } 933 | }, 934 | "node_modules/minimist": { 935 | "version": "1.2.5", 936 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 937 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 938 | "dev": true 939 | }, 940 | "node_modules/mkdirp": { 941 | "version": "0.5.5", 942 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", 943 | "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", 944 | "dev": true, 945 | "dependencies": { 946 | "minimist": "^1.2.5" 947 | }, 948 | "bin": { 949 | "mkdirp": "bin/cmd.js" 950 | } 951 | }, 952 | "node_modules/ms": { 953 | "version": "2.1.2", 954 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 955 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 956 | "dev": true 957 | }, 958 | "node_modules/mute-stream": { 959 | "version": "0.0.8", 960 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", 961 | "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", 962 | "dev": true 963 | }, 964 | "node_modules/natural-compare": { 965 | "version": "1.4.0", 966 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 967 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", 968 | "dev": true 969 | }, 970 | "node_modules/nice-try": { 971 | "version": "1.0.5", 972 | "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", 973 | "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", 974 | "dev": true 975 | }, 976 | "node_modules/once": { 977 | "version": "1.4.0", 978 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 979 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 980 | "dev": true, 981 | "dependencies": { 982 | "wrappy": "1" 983 | } 984 | }, 985 | "node_modules/onetime": { 986 | "version": "5.1.2", 987 | "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", 988 | "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", 989 | "dev": true, 990 | "dependencies": { 991 | "mimic-fn": "^2.1.0" 992 | }, 993 | "engines": { 994 | "node": ">=6" 995 | }, 996 | "funding": { 997 | "url": "https://github.com/sponsors/sindresorhus" 998 | } 999 | }, 1000 | "node_modules/optionator": { 1001 | "version": "0.8.3", 1002 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", 1003 | "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", 1004 | "dev": true, 1005 | "dependencies": { 1006 | "deep-is": "~0.1.3", 1007 | "fast-levenshtein": "~2.0.6", 1008 | "levn": "~0.3.0", 1009 | "prelude-ls": "~1.1.2", 1010 | "type-check": "~0.3.2", 1011 | "word-wrap": "~1.2.3" 1012 | }, 1013 | "engines": { 1014 | "node": ">= 0.8.0" 1015 | } 1016 | }, 1017 | "node_modules/os-tmpdir": { 1018 | "version": "1.0.2", 1019 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", 1020 | "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", 1021 | "dev": true, 1022 | "engines": { 1023 | "node": ">=0.10.0" 1024 | } 1025 | }, 1026 | "node_modules/parent-module": { 1027 | "version": "1.0.1", 1028 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 1029 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 1030 | "dev": true, 1031 | "dependencies": { 1032 | "callsites": "^3.0.0" 1033 | }, 1034 | "engines": { 1035 | "node": ">=6" 1036 | } 1037 | }, 1038 | "node_modules/path-is-absolute": { 1039 | "version": "1.0.1", 1040 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1041 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 1042 | "dev": true, 1043 | "engines": { 1044 | "node": ">=0.10.0" 1045 | } 1046 | }, 1047 | "node_modules/path-key": { 1048 | "version": "2.0.1", 1049 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", 1050 | "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", 1051 | "dev": true, 1052 | "engines": { 1053 | "node": ">=4" 1054 | } 1055 | }, 1056 | "node_modules/prelude-ls": { 1057 | "version": "1.1.2", 1058 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", 1059 | "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", 1060 | "dev": true, 1061 | "engines": { 1062 | "node": ">= 0.8.0" 1063 | } 1064 | }, 1065 | "node_modules/progress": { 1066 | "version": "2.0.3", 1067 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", 1068 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", 1069 | "dev": true, 1070 | "engines": { 1071 | "node": ">=0.4.0" 1072 | } 1073 | }, 1074 | "node_modules/punycode": { 1075 | "version": "2.1.1", 1076 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 1077 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 1078 | "dev": true, 1079 | "engines": { 1080 | "node": ">=6" 1081 | } 1082 | }, 1083 | "node_modules/regexpp": { 1084 | "version": "2.0.1", 1085 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", 1086 | "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", 1087 | "dev": true, 1088 | "engines": { 1089 | "node": ">=6.5.0" 1090 | } 1091 | }, 1092 | "node_modules/resolve-from": { 1093 | "version": "4.0.0", 1094 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 1095 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 1096 | "dev": true, 1097 | "engines": { 1098 | "node": ">=4" 1099 | } 1100 | }, 1101 | "node_modules/restore-cursor": { 1102 | "version": "3.1.0", 1103 | "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", 1104 | "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", 1105 | "dev": true, 1106 | "dependencies": { 1107 | "onetime": "^5.1.0", 1108 | "signal-exit": "^3.0.2" 1109 | }, 1110 | "engines": { 1111 | "node": ">=8" 1112 | } 1113 | }, 1114 | "node_modules/rimraf": { 1115 | "version": "2.6.3", 1116 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", 1117 | "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", 1118 | "dev": true, 1119 | "dependencies": { 1120 | "glob": "^7.1.3" 1121 | }, 1122 | "bin": { 1123 | "rimraf": "bin.js" 1124 | } 1125 | }, 1126 | "node_modules/run-async": { 1127 | "version": "2.4.1", 1128 | "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", 1129 | "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", 1130 | "dev": true, 1131 | "engines": { 1132 | "node": ">=0.12.0" 1133 | } 1134 | }, 1135 | "node_modules/rxjs": { 1136 | "version": "6.6.7", 1137 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", 1138 | "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", 1139 | "dev": true, 1140 | "dependencies": { 1141 | "tslib": "^1.9.0" 1142 | }, 1143 | "engines": { 1144 | "npm": ">=2.0.0" 1145 | } 1146 | }, 1147 | "node_modules/safer-buffer": { 1148 | "version": "2.1.2", 1149 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1150 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 1151 | "dev": true 1152 | }, 1153 | "node_modules/semver": { 1154 | "version": "6.3.0", 1155 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 1156 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 1157 | "dev": true, 1158 | "bin": { 1159 | "semver": "bin/semver.js" 1160 | } 1161 | }, 1162 | "node_modules/shebang-command": { 1163 | "version": "1.2.0", 1164 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", 1165 | "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", 1166 | "dev": true, 1167 | "dependencies": { 1168 | "shebang-regex": "^1.0.0" 1169 | }, 1170 | "engines": { 1171 | "node": ">=0.10.0" 1172 | } 1173 | }, 1174 | "node_modules/shebang-regex": { 1175 | "version": "1.0.0", 1176 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", 1177 | "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", 1178 | "dev": true, 1179 | "engines": { 1180 | "node": ">=0.10.0" 1181 | } 1182 | }, 1183 | "node_modules/signal-exit": { 1184 | "version": "3.0.3", 1185 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 1186 | "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", 1187 | "dev": true 1188 | }, 1189 | "node_modules/slice-ansi": { 1190 | "version": "2.1.0", 1191 | "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", 1192 | "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", 1193 | "dev": true, 1194 | "dependencies": { 1195 | "ansi-styles": "^3.2.0", 1196 | "astral-regex": "^1.0.0", 1197 | "is-fullwidth-code-point": "^2.0.0" 1198 | }, 1199 | "engines": { 1200 | "node": ">=6" 1201 | } 1202 | }, 1203 | "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { 1204 | "version": "2.0.0", 1205 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 1206 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 1207 | "dev": true, 1208 | "engines": { 1209 | "node": ">=4" 1210 | } 1211 | }, 1212 | "node_modules/sprintf-js": { 1213 | "version": "1.0.3", 1214 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 1215 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 1216 | "dev": true 1217 | }, 1218 | "node_modules/string-width": { 1219 | "version": "4.2.2", 1220 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 1221 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 1222 | "dev": true, 1223 | "dependencies": { 1224 | "emoji-regex": "^8.0.0", 1225 | "is-fullwidth-code-point": "^3.0.0", 1226 | "strip-ansi": "^6.0.0" 1227 | }, 1228 | "engines": { 1229 | "node": ">=8" 1230 | } 1231 | }, 1232 | "node_modules/string-width/node_modules/ansi-regex": { 1233 | "version": "5.0.0", 1234 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 1235 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 1236 | "dev": true, 1237 | "engines": { 1238 | "node": ">=8" 1239 | } 1240 | }, 1241 | "node_modules/string-width/node_modules/strip-ansi": { 1242 | "version": "6.0.0", 1243 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 1244 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 1245 | "dev": true, 1246 | "dependencies": { 1247 | "ansi-regex": "^5.0.0" 1248 | }, 1249 | "engines": { 1250 | "node": ">=8" 1251 | } 1252 | }, 1253 | "node_modules/strip-ansi": { 1254 | "version": "5.2.0", 1255 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 1256 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 1257 | "dev": true, 1258 | "dependencies": { 1259 | "ansi-regex": "^4.1.0" 1260 | }, 1261 | "engines": { 1262 | "node": ">=6" 1263 | } 1264 | }, 1265 | "node_modules/strip-json-comments": { 1266 | "version": "3.1.1", 1267 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 1268 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 1269 | "dev": true, 1270 | "engines": { 1271 | "node": ">=8" 1272 | }, 1273 | "funding": { 1274 | "url": "https://github.com/sponsors/sindresorhus" 1275 | } 1276 | }, 1277 | "node_modules/supports-color": { 1278 | "version": "5.5.0", 1279 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 1280 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 1281 | "dev": true, 1282 | "dependencies": { 1283 | "has-flag": "^3.0.0" 1284 | }, 1285 | "engines": { 1286 | "node": ">=4" 1287 | } 1288 | }, 1289 | "node_modules/table": { 1290 | "version": "5.4.6", 1291 | "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", 1292 | "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", 1293 | "dev": true, 1294 | "dependencies": { 1295 | "ajv": "^6.10.2", 1296 | "lodash": "^4.17.14", 1297 | "slice-ansi": "^2.1.0", 1298 | "string-width": "^3.0.0" 1299 | }, 1300 | "engines": { 1301 | "node": ">=6.0.0" 1302 | } 1303 | }, 1304 | "node_modules/table/node_modules/emoji-regex": { 1305 | "version": "7.0.3", 1306 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", 1307 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", 1308 | "dev": true 1309 | }, 1310 | "node_modules/table/node_modules/is-fullwidth-code-point": { 1311 | "version": "2.0.0", 1312 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 1313 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 1314 | "dev": true, 1315 | "engines": { 1316 | "node": ">=4" 1317 | } 1318 | }, 1319 | "node_modules/table/node_modules/string-width": { 1320 | "version": "3.1.0", 1321 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 1322 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 1323 | "dev": true, 1324 | "dependencies": { 1325 | "emoji-regex": "^7.0.1", 1326 | "is-fullwidth-code-point": "^2.0.0", 1327 | "strip-ansi": "^5.1.0" 1328 | }, 1329 | "engines": { 1330 | "node": ">=6" 1331 | } 1332 | }, 1333 | "node_modules/text-table": { 1334 | "version": "0.2.0", 1335 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 1336 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", 1337 | "dev": true 1338 | }, 1339 | "node_modules/through": { 1340 | "version": "2.3.8", 1341 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 1342 | "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", 1343 | "dev": true 1344 | }, 1345 | "node_modules/tmp": { 1346 | "version": "0.0.33", 1347 | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", 1348 | "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", 1349 | "dev": true, 1350 | "dependencies": { 1351 | "os-tmpdir": "~1.0.2" 1352 | }, 1353 | "engines": { 1354 | "node": ">=0.6.0" 1355 | } 1356 | }, 1357 | "node_modules/tslib": { 1358 | "version": "1.14.1", 1359 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 1360 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", 1361 | "dev": true 1362 | }, 1363 | "node_modules/type-check": { 1364 | "version": "0.3.2", 1365 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", 1366 | "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", 1367 | "dev": true, 1368 | "dependencies": { 1369 | "prelude-ls": "~1.1.2" 1370 | }, 1371 | "engines": { 1372 | "node": ">= 0.8.0" 1373 | } 1374 | }, 1375 | "node_modules/type-fest": { 1376 | "version": "0.8.1", 1377 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", 1378 | "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", 1379 | "dev": true, 1380 | "engines": { 1381 | "node": ">=8" 1382 | } 1383 | }, 1384 | "node_modules/uri-js": { 1385 | "version": "4.4.1", 1386 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 1387 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 1388 | "dev": true, 1389 | "dependencies": { 1390 | "punycode": "^2.1.0" 1391 | } 1392 | }, 1393 | "node_modules/v8-compile-cache": { 1394 | "version": "2.3.0", 1395 | "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", 1396 | "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", 1397 | "dev": true 1398 | }, 1399 | "node_modules/which": { 1400 | "version": "1.3.1", 1401 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 1402 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 1403 | "dev": true, 1404 | "dependencies": { 1405 | "isexe": "^2.0.0" 1406 | }, 1407 | "bin": { 1408 | "which": "bin/which" 1409 | } 1410 | }, 1411 | "node_modules/word-wrap": { 1412 | "version": "1.2.3", 1413 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", 1414 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", 1415 | "dev": true, 1416 | "engines": { 1417 | "node": ">=0.10.0" 1418 | } 1419 | }, 1420 | "node_modules/wrappy": { 1421 | "version": "1.0.2", 1422 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1423 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1424 | "dev": true 1425 | }, 1426 | "node_modules/write": { 1427 | "version": "1.0.3", 1428 | "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", 1429 | "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", 1430 | "dev": true, 1431 | "dependencies": { 1432 | "mkdirp": "^0.5.1" 1433 | }, 1434 | "engines": { 1435 | "node": ">=4" 1436 | } 1437 | } 1438 | }, 1439 | "dependencies": { 1440 | "@babel/code-frame": { 1441 | "version": "7.14.5", 1442 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", 1443 | "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", 1444 | "dev": true, 1445 | "requires": { 1446 | "@babel/highlight": "^7.14.5" 1447 | } 1448 | }, 1449 | "@babel/helper-validator-identifier": { 1450 | "version": "7.14.9", 1451 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", 1452 | "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", 1453 | "dev": true 1454 | }, 1455 | "@babel/highlight": { 1456 | "version": "7.14.5", 1457 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", 1458 | "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", 1459 | "dev": true, 1460 | "requires": { 1461 | "@babel/helper-validator-identifier": "^7.14.5", 1462 | "chalk": "^2.0.0", 1463 | "js-tokens": "^4.0.0" 1464 | } 1465 | }, 1466 | "acorn": { 1467 | "version": "7.4.1", 1468 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", 1469 | "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", 1470 | "dev": true 1471 | }, 1472 | "acorn-jsx": { 1473 | "version": "5.3.2", 1474 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", 1475 | "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", 1476 | "dev": true, 1477 | "requires": {} 1478 | }, 1479 | "ajv": { 1480 | "version": "6.12.6", 1481 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", 1482 | "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", 1483 | "dev": true, 1484 | "requires": { 1485 | "fast-deep-equal": "^3.1.1", 1486 | "fast-json-stable-stringify": "^2.0.0", 1487 | "json-schema-traverse": "^0.4.1", 1488 | "uri-js": "^4.2.2" 1489 | } 1490 | }, 1491 | "ansi-escapes": { 1492 | "version": "4.3.2", 1493 | "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", 1494 | "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", 1495 | "dev": true, 1496 | "requires": { 1497 | "type-fest": "^0.21.3" 1498 | }, 1499 | "dependencies": { 1500 | "type-fest": { 1501 | "version": "0.21.3", 1502 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", 1503 | "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", 1504 | "dev": true 1505 | } 1506 | } 1507 | }, 1508 | "ansi-regex": { 1509 | "version": "4.1.0", 1510 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 1511 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 1512 | "dev": true 1513 | }, 1514 | "ansi-styles": { 1515 | "version": "3.2.1", 1516 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 1517 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 1518 | "dev": true, 1519 | "requires": { 1520 | "color-convert": "^1.9.0" 1521 | } 1522 | }, 1523 | "argparse": { 1524 | "version": "1.0.10", 1525 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 1526 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 1527 | "dev": true, 1528 | "requires": { 1529 | "sprintf-js": "~1.0.2" 1530 | } 1531 | }, 1532 | "astral-regex": { 1533 | "version": "1.0.0", 1534 | "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", 1535 | "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", 1536 | "dev": true 1537 | }, 1538 | "balanced-match": { 1539 | "version": "1.0.2", 1540 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 1541 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", 1542 | "dev": true 1543 | }, 1544 | "brace-expansion": { 1545 | "version": "1.1.11", 1546 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 1547 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 1548 | "dev": true, 1549 | "requires": { 1550 | "balanced-match": "^1.0.0", 1551 | "concat-map": "0.0.1" 1552 | } 1553 | }, 1554 | "callsites": { 1555 | "version": "3.1.0", 1556 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 1557 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 1558 | "dev": true 1559 | }, 1560 | "chalk": { 1561 | "version": "2.4.2", 1562 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 1563 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 1564 | "dev": true, 1565 | "requires": { 1566 | "ansi-styles": "^3.2.1", 1567 | "escape-string-regexp": "^1.0.5", 1568 | "supports-color": "^5.3.0" 1569 | } 1570 | }, 1571 | "chardet": { 1572 | "version": "0.7.0", 1573 | "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", 1574 | "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", 1575 | "dev": true 1576 | }, 1577 | "cli-cursor": { 1578 | "version": "3.1.0", 1579 | "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", 1580 | "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", 1581 | "dev": true, 1582 | "requires": { 1583 | "restore-cursor": "^3.1.0" 1584 | } 1585 | }, 1586 | "cli-width": { 1587 | "version": "3.0.0", 1588 | "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", 1589 | "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", 1590 | "dev": true 1591 | }, 1592 | "color-convert": { 1593 | "version": "1.9.3", 1594 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 1595 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 1596 | "dev": true, 1597 | "requires": { 1598 | "color-name": "1.1.3" 1599 | } 1600 | }, 1601 | "color-name": { 1602 | "version": "1.1.3", 1603 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 1604 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 1605 | "dev": true 1606 | }, 1607 | "concat-map": { 1608 | "version": "0.0.1", 1609 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 1610 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 1611 | "dev": true 1612 | }, 1613 | "cross-spawn": { 1614 | "version": "6.0.5", 1615 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", 1616 | "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", 1617 | "dev": true, 1618 | "requires": { 1619 | "nice-try": "^1.0.4", 1620 | "path-key": "^2.0.1", 1621 | "semver": "^5.5.0", 1622 | "shebang-command": "^1.2.0", 1623 | "which": "^1.2.9" 1624 | }, 1625 | "dependencies": { 1626 | "semver": { 1627 | "version": "5.7.1", 1628 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 1629 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 1630 | "dev": true 1631 | } 1632 | } 1633 | }, 1634 | "debug": { 1635 | "version": "4.3.2", 1636 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", 1637 | "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", 1638 | "dev": true, 1639 | "requires": { 1640 | "ms": "2.1.2" 1641 | } 1642 | }, 1643 | "deep-is": { 1644 | "version": "0.1.3", 1645 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 1646 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 1647 | "dev": true 1648 | }, 1649 | "doctrine": { 1650 | "version": "3.0.0", 1651 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", 1652 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", 1653 | "dev": true, 1654 | "requires": { 1655 | "esutils": "^2.0.2" 1656 | } 1657 | }, 1658 | "emoji-regex": { 1659 | "version": "8.0.0", 1660 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 1661 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 1662 | "dev": true 1663 | }, 1664 | "escape-string-regexp": { 1665 | "version": "1.0.5", 1666 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 1667 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 1668 | "dev": true 1669 | }, 1670 | "eslint": { 1671 | "version": "6.8.0", 1672 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", 1673 | "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", 1674 | "dev": true, 1675 | "requires": { 1676 | "@babel/code-frame": "^7.0.0", 1677 | "ajv": "^6.10.0", 1678 | "chalk": "^2.1.0", 1679 | "cross-spawn": "^6.0.5", 1680 | "debug": "^4.0.1", 1681 | "doctrine": "^3.0.0", 1682 | "eslint-scope": "^5.0.0", 1683 | "eslint-utils": "^1.4.3", 1684 | "eslint-visitor-keys": "^1.1.0", 1685 | "espree": "^6.1.2", 1686 | "esquery": "^1.0.1", 1687 | "esutils": "^2.0.2", 1688 | "file-entry-cache": "^5.0.1", 1689 | "functional-red-black-tree": "^1.0.1", 1690 | "glob-parent": "^5.0.0", 1691 | "globals": "^12.1.0", 1692 | "ignore": "^4.0.6", 1693 | "import-fresh": "^3.0.0", 1694 | "imurmurhash": "^0.1.4", 1695 | "inquirer": "^7.0.0", 1696 | "is-glob": "^4.0.0", 1697 | "js-yaml": "^3.13.1", 1698 | "json-stable-stringify-without-jsonify": "^1.0.1", 1699 | "levn": "^0.3.0", 1700 | "lodash": "^4.17.14", 1701 | "minimatch": "^3.0.4", 1702 | "mkdirp": "^0.5.1", 1703 | "natural-compare": "^1.4.0", 1704 | "optionator": "^0.8.3", 1705 | "progress": "^2.0.0", 1706 | "regexpp": "^2.0.1", 1707 | "semver": "^6.1.2", 1708 | "strip-ansi": "^5.2.0", 1709 | "strip-json-comments": "^3.0.1", 1710 | "table": "^5.2.3", 1711 | "text-table": "^0.2.0", 1712 | "v8-compile-cache": "^2.0.3" 1713 | } 1714 | }, 1715 | "eslint-config-google": { 1716 | "version": "0.13.0", 1717 | "resolved": "https://registry.npmjs.org/eslint-config-google/-/eslint-config-google-0.13.0.tgz", 1718 | "integrity": "sha512-ELgMdOIpn0CFdsQS+FuxO+Ttu4p+aLaXHv9wA9yVnzqlUGV7oN/eRRnJekk7TCur6Cu2FXX0fqfIXRBaM14lpQ==", 1719 | "dev": true, 1720 | "requires": {} 1721 | }, 1722 | "eslint-scope": { 1723 | "version": "5.1.1", 1724 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", 1725 | "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", 1726 | "dev": true, 1727 | "requires": { 1728 | "esrecurse": "^4.3.0", 1729 | "estraverse": "^4.1.1" 1730 | } 1731 | }, 1732 | "eslint-utils": { 1733 | "version": "1.4.3", 1734 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", 1735 | "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", 1736 | "dev": true, 1737 | "requires": { 1738 | "eslint-visitor-keys": "^1.1.0" 1739 | } 1740 | }, 1741 | "eslint-visitor-keys": { 1742 | "version": "1.3.0", 1743 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", 1744 | "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", 1745 | "dev": true 1746 | }, 1747 | "espree": { 1748 | "version": "6.2.1", 1749 | "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", 1750 | "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", 1751 | "dev": true, 1752 | "requires": { 1753 | "acorn": "^7.1.1", 1754 | "acorn-jsx": "^5.2.0", 1755 | "eslint-visitor-keys": "^1.1.0" 1756 | } 1757 | }, 1758 | "esprima": { 1759 | "version": "4.0.1", 1760 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 1761 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 1762 | "dev": true 1763 | }, 1764 | "esquery": { 1765 | "version": "1.4.0", 1766 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", 1767 | "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", 1768 | "dev": true, 1769 | "requires": { 1770 | "estraverse": "^5.1.0" 1771 | }, 1772 | "dependencies": { 1773 | "estraverse": { 1774 | "version": "5.2.0", 1775 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", 1776 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", 1777 | "dev": true 1778 | } 1779 | } 1780 | }, 1781 | "esrecurse": { 1782 | "version": "4.3.0", 1783 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", 1784 | "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", 1785 | "dev": true, 1786 | "requires": { 1787 | "estraverse": "^5.2.0" 1788 | }, 1789 | "dependencies": { 1790 | "estraverse": { 1791 | "version": "5.2.0", 1792 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", 1793 | "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", 1794 | "dev": true 1795 | } 1796 | } 1797 | }, 1798 | "estraverse": { 1799 | "version": "4.3.0", 1800 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", 1801 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", 1802 | "dev": true 1803 | }, 1804 | "esutils": { 1805 | "version": "2.0.3", 1806 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", 1807 | "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", 1808 | "dev": true 1809 | }, 1810 | "external-editor": { 1811 | "version": "3.1.0", 1812 | "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", 1813 | "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", 1814 | "dev": true, 1815 | "requires": { 1816 | "chardet": "^0.7.0", 1817 | "iconv-lite": "^0.4.24", 1818 | "tmp": "^0.0.33" 1819 | } 1820 | }, 1821 | "fast-deep-equal": { 1822 | "version": "3.1.3", 1823 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", 1824 | "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", 1825 | "dev": true 1826 | }, 1827 | "fast-json-stable-stringify": { 1828 | "version": "2.1.0", 1829 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", 1830 | "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", 1831 | "dev": true 1832 | }, 1833 | "fast-levenshtein": { 1834 | "version": "2.0.6", 1835 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 1836 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", 1837 | "dev": true 1838 | }, 1839 | "figures": { 1840 | "version": "3.2.0", 1841 | "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", 1842 | "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", 1843 | "dev": true, 1844 | "requires": { 1845 | "escape-string-regexp": "^1.0.5" 1846 | } 1847 | }, 1848 | "file-entry-cache": { 1849 | "version": "5.0.1", 1850 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", 1851 | "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", 1852 | "dev": true, 1853 | "requires": { 1854 | "flat-cache": "^2.0.1" 1855 | } 1856 | }, 1857 | "flat-cache": { 1858 | "version": "2.0.1", 1859 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", 1860 | "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", 1861 | "dev": true, 1862 | "requires": { 1863 | "flatted": "^2.0.0", 1864 | "rimraf": "2.6.3", 1865 | "write": "1.0.3" 1866 | } 1867 | }, 1868 | "flatted": { 1869 | "version": "2.0.2", 1870 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", 1871 | "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", 1872 | "dev": true 1873 | }, 1874 | "fs.realpath": { 1875 | "version": "1.0.0", 1876 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 1877 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 1878 | "dev": true 1879 | }, 1880 | "functional-red-black-tree": { 1881 | "version": "1.0.1", 1882 | "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", 1883 | "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", 1884 | "dev": true 1885 | }, 1886 | "glob": { 1887 | "version": "7.1.7", 1888 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", 1889 | "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", 1890 | "dev": true, 1891 | "requires": { 1892 | "fs.realpath": "^1.0.0", 1893 | "inflight": "^1.0.4", 1894 | "inherits": "2", 1895 | "minimatch": "^3.0.4", 1896 | "once": "^1.3.0", 1897 | "path-is-absolute": "^1.0.0" 1898 | } 1899 | }, 1900 | "glob-parent": { 1901 | "version": "5.1.2", 1902 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", 1903 | "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", 1904 | "dev": true, 1905 | "requires": { 1906 | "is-glob": "^4.0.1" 1907 | } 1908 | }, 1909 | "globals": { 1910 | "version": "12.4.0", 1911 | "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", 1912 | "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", 1913 | "dev": true, 1914 | "requires": { 1915 | "type-fest": "^0.8.1" 1916 | } 1917 | }, 1918 | "has-flag": { 1919 | "version": "3.0.0", 1920 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 1921 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 1922 | "dev": true 1923 | }, 1924 | "iconv-lite": { 1925 | "version": "0.4.24", 1926 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 1927 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 1928 | "dev": true, 1929 | "requires": { 1930 | "safer-buffer": ">= 2.1.2 < 3" 1931 | } 1932 | }, 1933 | "ignore": { 1934 | "version": "4.0.6", 1935 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", 1936 | "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", 1937 | "dev": true 1938 | }, 1939 | "import-fresh": { 1940 | "version": "3.3.0", 1941 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", 1942 | "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", 1943 | "dev": true, 1944 | "requires": { 1945 | "parent-module": "^1.0.0", 1946 | "resolve-from": "^4.0.0" 1947 | } 1948 | }, 1949 | "imurmurhash": { 1950 | "version": "0.1.4", 1951 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 1952 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 1953 | "dev": true 1954 | }, 1955 | "inflight": { 1956 | "version": "1.0.6", 1957 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 1958 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 1959 | "dev": true, 1960 | "requires": { 1961 | "once": "^1.3.0", 1962 | "wrappy": "1" 1963 | } 1964 | }, 1965 | "inherits": { 1966 | "version": "2.0.4", 1967 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", 1968 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", 1969 | "dev": true 1970 | }, 1971 | "inquirer": { 1972 | "version": "7.3.3", 1973 | "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", 1974 | "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", 1975 | "dev": true, 1976 | "requires": { 1977 | "ansi-escapes": "^4.2.1", 1978 | "chalk": "^4.1.0", 1979 | "cli-cursor": "^3.1.0", 1980 | "cli-width": "^3.0.0", 1981 | "external-editor": "^3.0.3", 1982 | "figures": "^3.0.0", 1983 | "lodash": "^4.17.19", 1984 | "mute-stream": "0.0.8", 1985 | "run-async": "^2.4.0", 1986 | "rxjs": "^6.6.0", 1987 | "string-width": "^4.1.0", 1988 | "strip-ansi": "^6.0.0", 1989 | "through": "^2.3.6" 1990 | }, 1991 | "dependencies": { 1992 | "ansi-regex": { 1993 | "version": "5.0.0", 1994 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 1995 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 1996 | "dev": true 1997 | }, 1998 | "ansi-styles": { 1999 | "version": "4.3.0", 2000 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 2001 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 2002 | "dev": true, 2003 | "requires": { 2004 | "color-convert": "^2.0.1" 2005 | } 2006 | }, 2007 | "chalk": { 2008 | "version": "4.1.2", 2009 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 2010 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 2011 | "dev": true, 2012 | "requires": { 2013 | "ansi-styles": "^4.1.0", 2014 | "supports-color": "^7.1.0" 2015 | } 2016 | }, 2017 | "color-convert": { 2018 | "version": "2.0.1", 2019 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 2020 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 2021 | "dev": true, 2022 | "requires": { 2023 | "color-name": "~1.1.4" 2024 | } 2025 | }, 2026 | "color-name": { 2027 | "version": "1.1.4", 2028 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 2029 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 2030 | "dev": true 2031 | }, 2032 | "has-flag": { 2033 | "version": "4.0.0", 2034 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 2035 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 2036 | "dev": true 2037 | }, 2038 | "strip-ansi": { 2039 | "version": "6.0.0", 2040 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 2041 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 2042 | "dev": true, 2043 | "requires": { 2044 | "ansi-regex": "^5.0.0" 2045 | } 2046 | }, 2047 | "supports-color": { 2048 | "version": "7.2.0", 2049 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 2050 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 2051 | "dev": true, 2052 | "requires": { 2053 | "has-flag": "^4.0.0" 2054 | } 2055 | } 2056 | } 2057 | }, 2058 | "is-extglob": { 2059 | "version": "2.1.1", 2060 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 2061 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 2062 | "dev": true 2063 | }, 2064 | "is-fullwidth-code-point": { 2065 | "version": "3.0.0", 2066 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 2067 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 2068 | "dev": true 2069 | }, 2070 | "is-glob": { 2071 | "version": "4.0.1", 2072 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 2073 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 2074 | "dev": true, 2075 | "requires": { 2076 | "is-extglob": "^2.1.1" 2077 | } 2078 | }, 2079 | "isexe": { 2080 | "version": "2.0.0", 2081 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 2082 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 2083 | "dev": true 2084 | }, 2085 | "js-tokens": { 2086 | "version": "4.0.0", 2087 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 2088 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 2089 | "dev": true 2090 | }, 2091 | "js-yaml": { 2092 | "version": "3.14.1", 2093 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", 2094 | "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", 2095 | "dev": true, 2096 | "requires": { 2097 | "argparse": "^1.0.7", 2098 | "esprima": "^4.0.0" 2099 | } 2100 | }, 2101 | "json-schema-traverse": { 2102 | "version": "0.4.1", 2103 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 2104 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", 2105 | "dev": true 2106 | }, 2107 | "json-stable-stringify-without-jsonify": { 2108 | "version": "1.0.1", 2109 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 2110 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", 2111 | "dev": true 2112 | }, 2113 | "levn": { 2114 | "version": "0.3.0", 2115 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", 2116 | "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", 2117 | "dev": true, 2118 | "requires": { 2119 | "prelude-ls": "~1.1.2", 2120 | "type-check": "~0.3.2" 2121 | } 2122 | }, 2123 | "lodash": { 2124 | "version": "4.17.21", 2125 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 2126 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 2127 | "dev": true 2128 | }, 2129 | "mimic-fn": { 2130 | "version": "2.1.0", 2131 | "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", 2132 | "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", 2133 | "dev": true 2134 | }, 2135 | "minimatch": { 2136 | "version": "3.0.4", 2137 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 2138 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 2139 | "dev": true, 2140 | "requires": { 2141 | "brace-expansion": "^1.1.7" 2142 | } 2143 | }, 2144 | "minimist": { 2145 | "version": "1.2.5", 2146 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 2147 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 2148 | "dev": true 2149 | }, 2150 | "mkdirp": { 2151 | "version": "0.5.5", 2152 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", 2153 | "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", 2154 | "dev": true, 2155 | "requires": { 2156 | "minimist": "^1.2.5" 2157 | } 2158 | }, 2159 | "ms": { 2160 | "version": "2.1.2", 2161 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 2162 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 2163 | "dev": true 2164 | }, 2165 | "mute-stream": { 2166 | "version": "0.0.8", 2167 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", 2168 | "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", 2169 | "dev": true 2170 | }, 2171 | "natural-compare": { 2172 | "version": "1.4.0", 2173 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 2174 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", 2175 | "dev": true 2176 | }, 2177 | "nice-try": { 2178 | "version": "1.0.5", 2179 | "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", 2180 | "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", 2181 | "dev": true 2182 | }, 2183 | "once": { 2184 | "version": "1.4.0", 2185 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 2186 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 2187 | "dev": true, 2188 | "requires": { 2189 | "wrappy": "1" 2190 | } 2191 | }, 2192 | "onetime": { 2193 | "version": "5.1.2", 2194 | "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", 2195 | "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", 2196 | "dev": true, 2197 | "requires": { 2198 | "mimic-fn": "^2.1.0" 2199 | } 2200 | }, 2201 | "optionator": { 2202 | "version": "0.8.3", 2203 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", 2204 | "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", 2205 | "dev": true, 2206 | "requires": { 2207 | "deep-is": "~0.1.3", 2208 | "fast-levenshtein": "~2.0.6", 2209 | "levn": "~0.3.0", 2210 | "prelude-ls": "~1.1.2", 2211 | "type-check": "~0.3.2", 2212 | "word-wrap": "~1.2.3" 2213 | } 2214 | }, 2215 | "os-tmpdir": { 2216 | "version": "1.0.2", 2217 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", 2218 | "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", 2219 | "dev": true 2220 | }, 2221 | "parent-module": { 2222 | "version": "1.0.1", 2223 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 2224 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 2225 | "dev": true, 2226 | "requires": { 2227 | "callsites": "^3.0.0" 2228 | } 2229 | }, 2230 | "path-is-absolute": { 2231 | "version": "1.0.1", 2232 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 2233 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 2234 | "dev": true 2235 | }, 2236 | "path-key": { 2237 | "version": "2.0.1", 2238 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", 2239 | "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", 2240 | "dev": true 2241 | }, 2242 | "prelude-ls": { 2243 | "version": "1.1.2", 2244 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", 2245 | "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", 2246 | "dev": true 2247 | }, 2248 | "progress": { 2249 | "version": "2.0.3", 2250 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", 2251 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", 2252 | "dev": true 2253 | }, 2254 | "punycode": { 2255 | "version": "2.1.1", 2256 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 2257 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", 2258 | "dev": true 2259 | }, 2260 | "regexpp": { 2261 | "version": "2.0.1", 2262 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", 2263 | "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", 2264 | "dev": true 2265 | }, 2266 | "resolve-from": { 2267 | "version": "4.0.0", 2268 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 2269 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 2270 | "dev": true 2271 | }, 2272 | "restore-cursor": { 2273 | "version": "3.1.0", 2274 | "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", 2275 | "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", 2276 | "dev": true, 2277 | "requires": { 2278 | "onetime": "^5.1.0", 2279 | "signal-exit": "^3.0.2" 2280 | } 2281 | }, 2282 | "rimraf": { 2283 | "version": "2.6.3", 2284 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", 2285 | "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", 2286 | "dev": true, 2287 | "requires": { 2288 | "glob": "^7.1.3" 2289 | } 2290 | }, 2291 | "run-async": { 2292 | "version": "2.4.1", 2293 | "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", 2294 | "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", 2295 | "dev": true 2296 | }, 2297 | "rxjs": { 2298 | "version": "6.6.7", 2299 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", 2300 | "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", 2301 | "dev": true, 2302 | "requires": { 2303 | "tslib": "^1.9.0" 2304 | } 2305 | }, 2306 | "safer-buffer": { 2307 | "version": "2.1.2", 2308 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 2309 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 2310 | "dev": true 2311 | }, 2312 | "semver": { 2313 | "version": "6.3.0", 2314 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 2315 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 2316 | "dev": true 2317 | }, 2318 | "shebang-command": { 2319 | "version": "1.2.0", 2320 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", 2321 | "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", 2322 | "dev": true, 2323 | "requires": { 2324 | "shebang-regex": "^1.0.0" 2325 | } 2326 | }, 2327 | "shebang-regex": { 2328 | "version": "1.0.0", 2329 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", 2330 | "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", 2331 | "dev": true 2332 | }, 2333 | "signal-exit": { 2334 | "version": "3.0.3", 2335 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 2336 | "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", 2337 | "dev": true 2338 | }, 2339 | "slice-ansi": { 2340 | "version": "2.1.0", 2341 | "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", 2342 | "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", 2343 | "dev": true, 2344 | "requires": { 2345 | "ansi-styles": "^3.2.0", 2346 | "astral-regex": "^1.0.0", 2347 | "is-fullwidth-code-point": "^2.0.0" 2348 | }, 2349 | "dependencies": { 2350 | "is-fullwidth-code-point": { 2351 | "version": "2.0.0", 2352 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 2353 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 2354 | "dev": true 2355 | } 2356 | } 2357 | }, 2358 | "sprintf-js": { 2359 | "version": "1.0.3", 2360 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 2361 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 2362 | "dev": true 2363 | }, 2364 | "string-width": { 2365 | "version": "4.2.2", 2366 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", 2367 | "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", 2368 | "dev": true, 2369 | "requires": { 2370 | "emoji-regex": "^8.0.0", 2371 | "is-fullwidth-code-point": "^3.0.0", 2372 | "strip-ansi": "^6.0.0" 2373 | }, 2374 | "dependencies": { 2375 | "ansi-regex": { 2376 | "version": "5.0.0", 2377 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 2378 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 2379 | "dev": true 2380 | }, 2381 | "strip-ansi": { 2382 | "version": "6.0.0", 2383 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 2384 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 2385 | "dev": true, 2386 | "requires": { 2387 | "ansi-regex": "^5.0.0" 2388 | } 2389 | } 2390 | } 2391 | }, 2392 | "strip-ansi": { 2393 | "version": "5.2.0", 2394 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 2395 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 2396 | "dev": true, 2397 | "requires": { 2398 | "ansi-regex": "^4.1.0" 2399 | } 2400 | }, 2401 | "strip-json-comments": { 2402 | "version": "3.1.1", 2403 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", 2404 | "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", 2405 | "dev": true 2406 | }, 2407 | "supports-color": { 2408 | "version": "5.5.0", 2409 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 2410 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 2411 | "dev": true, 2412 | "requires": { 2413 | "has-flag": "^3.0.0" 2414 | } 2415 | }, 2416 | "table": { 2417 | "version": "5.4.6", 2418 | "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", 2419 | "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", 2420 | "dev": true, 2421 | "requires": { 2422 | "ajv": "^6.10.2", 2423 | "lodash": "^4.17.14", 2424 | "slice-ansi": "^2.1.0", 2425 | "string-width": "^3.0.0" 2426 | }, 2427 | "dependencies": { 2428 | "emoji-regex": { 2429 | "version": "7.0.3", 2430 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", 2431 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", 2432 | "dev": true 2433 | }, 2434 | "is-fullwidth-code-point": { 2435 | "version": "2.0.0", 2436 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 2437 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 2438 | "dev": true 2439 | }, 2440 | "string-width": { 2441 | "version": "3.1.0", 2442 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 2443 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 2444 | "dev": true, 2445 | "requires": { 2446 | "emoji-regex": "^7.0.1", 2447 | "is-fullwidth-code-point": "^2.0.0", 2448 | "strip-ansi": "^5.1.0" 2449 | } 2450 | } 2451 | } 2452 | }, 2453 | "text-table": { 2454 | "version": "0.2.0", 2455 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 2456 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", 2457 | "dev": true 2458 | }, 2459 | "through": { 2460 | "version": "2.3.8", 2461 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 2462 | "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", 2463 | "dev": true 2464 | }, 2465 | "tmp": { 2466 | "version": "0.0.33", 2467 | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", 2468 | "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", 2469 | "dev": true, 2470 | "requires": { 2471 | "os-tmpdir": "~1.0.2" 2472 | } 2473 | }, 2474 | "tslib": { 2475 | "version": "1.14.1", 2476 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", 2477 | "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", 2478 | "dev": true 2479 | }, 2480 | "type-check": { 2481 | "version": "0.3.2", 2482 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", 2483 | "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", 2484 | "dev": true, 2485 | "requires": { 2486 | "prelude-ls": "~1.1.2" 2487 | } 2488 | }, 2489 | "type-fest": { 2490 | "version": "0.8.1", 2491 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", 2492 | "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", 2493 | "dev": true 2494 | }, 2495 | "uri-js": { 2496 | "version": "4.4.1", 2497 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", 2498 | "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", 2499 | "dev": true, 2500 | "requires": { 2501 | "punycode": "^2.1.0" 2502 | } 2503 | }, 2504 | "v8-compile-cache": { 2505 | "version": "2.3.0", 2506 | "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", 2507 | "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", 2508 | "dev": true 2509 | }, 2510 | "which": { 2511 | "version": "1.3.1", 2512 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 2513 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 2514 | "dev": true, 2515 | "requires": { 2516 | "isexe": "^2.0.0" 2517 | } 2518 | }, 2519 | "word-wrap": { 2520 | "version": "1.2.3", 2521 | "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", 2522 | "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", 2523 | "dev": true 2524 | }, 2525 | "wrappy": { 2526 | "version": "1.0.2", 2527 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2528 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 2529 | "dev": true 2530 | }, 2531 | "write": { 2532 | "version": "1.0.3", 2533 | "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", 2534 | "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", 2535 | "dev": true, 2536 | "requires": { 2537 | "mkdirp": "^0.5.1" 2538 | } 2539 | } 2540 | } 2541 | } 2542 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "push-notifications", 3 | "version": "1.0.0", 4 | "description": "Push notifications codelab.", 5 | "scripts": { 6 | "lint": "eslint \".\"", 7 | "test": "npm run lint" 8 | }, 9 | "devDependencies": { 10 | "eslint": "^6.0.1", 11 | "eslint-config-google": "^0.13.0" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/GoogleChrome/push-notifications.git" 16 | }, 17 | "license": "Apache 2", 18 | "bugs": { 19 | "url": "https://github.com/GoogleChrome/push-notifications/issues" 20 | }, 21 | "homepage": "https://github.com/GoogleChrome/push-notifications#readme" 22 | } 23 | -------------------------------------------------------------------------------- /screenshots/00-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/00-push-codelab.png -------------------------------------------------------------------------------- /screenshots/01-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/01-push-codelab.png -------------------------------------------------------------------------------- /screenshots/02-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/02-push-codelab.png -------------------------------------------------------------------------------- /screenshots/04-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/04-push-codelab.png -------------------------------------------------------------------------------- /screenshots/05-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/05-push-codelab.png -------------------------------------------------------------------------------- /screenshots/06-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/06-push-codelab.png -------------------------------------------------------------------------------- /screenshots/07-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/07-push-codelab.png -------------------------------------------------------------------------------- /screenshots/08-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/08-push-codelab.png -------------------------------------------------------------------------------- /screenshots/09-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/09-push-codelab.png -------------------------------------------------------------------------------- /screenshots/10-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/10-push-codelab.png -------------------------------------------------------------------------------- /screenshots/11-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/11-push-codelab.png -------------------------------------------------------------------------------- /screenshots/12-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/12-push-codelab.png -------------------------------------------------------------------------------- /screenshots/13-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/13-push-codelab.png -------------------------------------------------------------------------------- /screenshots/14-push-codelab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoogleChromeLabs/web-push-codelab/469a70b1eb195eeb27f5901ab58bd8452f015d9a/screenshots/14-push-codelab.png --------------------------------------------------------------------------------