InjectManifestOptions.json 29.8 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773
{
    "additionalProperties": false,
    "type": "object",
    "properties": {
        "additionalManifestEntries": {
            "description": "A list of entries to be precached, in addition to any entries that are\ngenerated as part of the build configuration.",
            "type": "array",
            "items": {
                "anyOf": [
                    {
                        "$ref": "#/definitions/ManifestEntry"
                    },
                    {
                        "type": "string"
                    }
                ]
            }
        },
        "dontCacheBustURLsMatching": {
            "description": "Assets that match this will be assumed to be uniquely versioned via their\nURL, and exempted from the normal HTTP cache-busting that's done when\npopulating the precache. While not required, it's recommended that if your\nexisting build process already inserts a `[hash]` value into each filename,\nyou provide a RegExp that will detect that, as it will reduce the bandwidth\nconsumed when precaching.",
            "$ref": "#/definitions/RegExp"
        },
        "manifestTransforms": {
            "description": "One or more functions which will be applied sequentially against the\ngenerated manifest. If `modifyURLPrefix` or `dontCacheBustURLsMatching` are\nalso specified, their corresponding transformations will be applied first.",
            "type": "array",
            "items": {}
        },
        "maximumFileSizeToCacheInBytes": {
            "description": "This value can be used to determine the maximum size of files that will be\nprecached. This prevents you from inadvertently precaching very large files\nthat might have accidentally matched one of your patterns.",
            "default": 2097152,
            "type": "number"
        },
        "modifyURLPrefix": {
            "description": "An object mapping string prefixes to replacement string values. This can be\nused to, e.g., remove or add a path prefix from a manifest entry if your\nweb hosting setup doesn't match your local filesystem setup. As an\nalternative with more flexibility, you can use the `manifestTransforms`\noption and provide a function that modifies the entries in the manifest\nusing whatever logic you provide.\n\nExample usage:\n\n```\n// Replace a '/dist/' prefix with '/', and also prepend\n// '/static' to every URL.\nmodifyURLPrefix: {\n  '/dist/': '/',\n  '': '/static',\n}\n```",
            "type": "object",
            "additionalProperties": {
                "type": "string"
            }
        },
        "globFollow": {
            "description": "Determines whether or not symlinks are followed when generating the\nprecache manifest. For more information, see the definition of `follow` in\nthe `glob` [documentation](https://github.com/isaacs/node-glob#options).",
            "default": true,
            "type": "boolean"
        },
        "globIgnores": {
            "description": "A set of patterns matching files to always exclude when generating the\nprecache manifest. For more information, see the definition of `ignore` in\nthe `glob` [documentation](https://github.com/isaacs/node-glob#options).",
            "default": [
                "**/node_modules/**/*"
            ],
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "globPatterns": {
            "description": "Files matching any of these patterns will be included in the precache\nmanifest. For more information, see the\n[`glob` primer](https://github.com/isaacs/node-glob#glob-primer).",
            "default": [
                "**/*.{js,css,html}"
            ],
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "globStrict": {
            "description": "If true, an error reading a directory when generating a precache manifest\nwill cause the build to fail. If false, the problematic directory will be\nskipped. For more information, see the definition of `strict` in the `glob`\n[documentation](https://github.com/isaacs/node-glob#options).",
            "default": true,
            "type": "boolean"
        },
        "templatedURLs": {
            "description": "If a URL is rendered based on some server-side logic, its contents may\ndepend on multiple files or on some other unique string value. The keys in\nthis object are server-rendered URLs. If the values are an array of\nstrings, they will be interpreted as `glob` patterns, and the contents of\nany files matching the patterns will be used to uniquely version the URL.\nIf used with a single string, it will be interpreted as unique versioning\ninformation that you've generated for a given URL.",
            "type": "object",
            "additionalProperties": {
                "anyOf": [
                    {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    {
                        "type": "string"
                    }
                ]
            }
        },
        "injectionPoint": {
            "description": "The string to find inside of the `swSrc` file. Once found, it will be\nreplaced by the generated precache manifest.",
            "default": "self.__WB_MANIFEST",
            "type": "string"
        },
        "swSrc": {
            "description": "The path and filename of the service worker file that will be read during\nthe build process, relative to the current working directory.",
            "type": "string"
        },
        "swDest": {
            "description": "The path and filename of the service worker file that will be created by\nthe build process, relative to the current working directory. It must end\nin '.js'.",
            "type": "string"
        },
        "globDirectory": {
            "description": "The local directory you wish to match `globPatterns` against. The path is\nrelative to the current directory.",
            "type": "string"
        }
    },
    "required": [
        "globDirectory",
        "swDest",
        "swSrc"
    ],
    "definitions": {
        "ManifestEntry": {
            "type": "object",
            "properties": {
                "integrity": {
                    "type": "string"
                },
                "revision": {
                    "type": [
                        "null",
                        "string"
                    ]
                },
                "url": {
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "revision",
                "url"
            ]
        },
        "RegExp": {
            "type": "object",
            "properties": {
                "source": {
                    "type": "string"
                },
                "global": {
                    "type": "boolean"
                },
                "ignoreCase": {
                    "type": "boolean"
                },
                "multiline": {
                    "type": "boolean"
                },
                "lastIndex": {
                    "type": "number"
                },
                "flags": {
                    "type": "string"
                },
                "sticky": {
                    "type": "boolean"
                },
                "unicode": {
                    "type": "boolean"
                },
                "dotAll": {
                    "type": "boolean"
                }
            },
            "additionalProperties": false,
            "required": [
                "dotAll",
                "flags",
                "global",
                "ignoreCase",
                "lastIndex",
                "multiline",
                "source",
                "sticky",
                "unicode"
            ]
        },
        "GoogleAnalyticsInitializeOptions": {
            "type": "object",
            "properties": {
                "cacheName": {
                    "type": "string"
                },
                "parameterOverrides": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                },
                "hitFilter": {
                    "type": "object",
                    "additionalProperties": false
                }
            },
            "additionalProperties": false
        },
        "RuntimeCaching": {
            "type": "object",
            "properties": {
                "handler": {
                    "description": "This determines how the runtime route will generate a response.\nTo use one of the built-in {@link workbox-strategies}, provide its name,\nlike `'NetworkFirst'`.\nAlternatively, this can be a {@link workbox-core.RouteHandler} callback\nfunction with custom response logic.",
                    "anyOf": [
                        {
                            "$ref": "#/definitions/RouteHandlerCallback"
                        },
                        {
                            "$ref": "#/definitions/RouteHandlerObject"
                        },
                        {
                            "enum": [
                                "CacheFirst",
                                "CacheOnly",
                                "NetworkFirst",
                                "NetworkOnly",
                                "StaleWhileRevalidate"
                            ],
                            "type": "string"
                        }
                    ]
                },
                "method": {
                    "description": "The HTTP method to match against. The default value of `'GET'` is normally\nsufficient, unless you explicitly need to match `'POST'`, `'PUT'`, or\nanother type of request.",
                    "default": "GET",
                    "enum": [
                        "DELETE",
                        "GET",
                        "HEAD",
                        "PATCH",
                        "POST",
                        "PUT"
                    ],
                    "type": "string"
                },
                "options": {
                    "type": "object",
                    "properties": {
                        "backgroundSync": {
                            "description": "Configuring this will add a\n{@link workbox-background-sync.BackgroundSyncPlugin} instance to the\n{@link workbox-strategies} configured in `handler`.",
                            "type": "object",
                            "properties": {
                                "name": {
                                    "type": "string"
                                },
                                "options": {
                                    "$ref": "#/definitions/QueueOptions"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "name"
                            ]
                        },
                        "broadcastUpdate": {
                            "description": "Configuring this will add a\n{@link workbox-broadcast-update.BroadcastUpdatePlugin} instance to the\n{@link workbox-strategies} configured in `handler`.",
                            "type": "object",
                            "properties": {
                                "channelName": {
                                    "type": "string"
                                },
                                "options": {
                                    "$ref": "#/definitions/BroadcastCacheUpdateOptions"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "options"
                            ]
                        },
                        "cacheableResponse": {
                            "description": "Configuring this will add a\n{@link workbox-cacheable-response.CacheableResponsePlugin} instance to\nthe {@link workbox-strategies} configured in `handler`.",
                            "$ref": "#/definitions/CacheableResponseOptions"
                        },
                        "cacheName": {
                            "description": "If provided, this will set the `cacheName` property of the\n{@link workbox-strategies} configured in `handler`.",
                            "type": [
                                "null",
                                "string"
                            ]
                        },
                        "expiration": {
                            "description": "Configuring this will add a\n{@link workbox-expiration.ExpirationPlugin} instance to\nthe {@link workbox-strategies} configured in `handler`.",
                            "$ref": "#/definitions/ExpirationPluginOptions"
                        },
                        "networkTimeoutSeconds": {
                            "description": "If provided, this will set the `networkTimeoutSeconds` property of the\n{@link workbox-strategies} configured in `handler`. Note that only\n`'NetworkFirst'` and `'NetworkOnly'` support `networkTimeoutSeconds`.",
                            "type": "number"
                        },
                        "plugins": {
                            "description": "Configuring this allows the use of one or more Workbox plugins that\ndon't have \"shortcut\" options (like `expiration` for\n{@link workbox-expiration.ExpirationPlugin}). The plugins provided here\nwill be added to the {@link workbox-strategies} configured in `handler`.",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/WorkboxPlugin"
                            }
                        },
                        "precacheFallback": {
                            "description": "Configuring this will add a\n{@link workbox-precaching.PrecacheFallbackPlugin} instance to\nthe {@link workbox-strategies} configured in `handler`.",
                            "type": "object",
                            "properties": {
                                "fallbackURL": {
                                    "type": "string"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "fallbackURL"
                            ]
                        },
                        "rangeRequests": {
                            "description": "Enabling this will add a\n{@link workbox-range-requests.RangeRequestsPlugin} instance to\nthe {@link workbox-strategies} configured in `handler`.",
                            "type": "boolean"
                        },
                        "fetchOptions": {
                            "description": "Configuring this will pass along the `fetchOptions` value to\nthe {@link workbox-strategies} configured in `handler`.",
                            "$ref": "#/definitions/RequestInit"
                        },
                        "matchOptions": {
                            "description": "Configuring this will pass along the `matchOptions` value to\nthe {@link workbox-strategies} configured in `handler`.",
                            "$ref": "#/definitions/CacheQueryOptions"
                        }
                    },
                    "additionalProperties": false
                },
                "urlPattern": {
                    "description": "This match criteria determines whether the configured handler will\ngenerate a response for any requests that don't match one of the precached\nURLs. If multiple `RuntimeCaching` routes are defined, then the first one\nwhose `urlPattern` matches will be the one that responds.\n\nThis value directly maps to the first parameter passed to\n{@link workbox-routing.registerRoute}. It's recommended to use a\n{@link workbox-core.RouteMatchCallback} function for greatest flexibility.",
                    "anyOf": [
                        {
                            "$ref": "#/definitions/RegExp"
                        },
                        {
                            "$ref": "#/definitions/RouteMatchCallback"
                        },
                        {
                            "type": "string"
                        }
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "handler",
                "urlPattern"
            ]
        },
        "RouteHandlerCallback": {},
        "RouteHandlerObject": {
            "description": "An object with a `handle` method of type `RouteHandlerCallback`.\n\nA `Route` object can be created with either an `RouteHandlerCallback`\nfunction or this `RouteHandler` object. The benefit of the `RouteHandler`\nis it can be extended (as is done by the `workbox-strategies` package).",
            "type": "object",
            "properties": {
                "handle": {
                    "$ref": "#/definitions/RouteHandlerCallback"
                }
            },
            "additionalProperties": false,
            "required": [
                "handle"
            ]
        },
        "QueueOptions": {
            "type": "object",
            "properties": {
                "forceSyncFallback": {
                    "type": "boolean"
                },
                "maxRetentionTime": {
                    "type": "number"
                },
                "onSync": {
                    "$ref": "#/definitions/OnSyncCallback"
                }
            },
            "additionalProperties": false
        },
        "OnSyncCallback": {},
        "BroadcastCacheUpdateOptions": {
            "type": "object",
            "properties": {
                "headersToCheck": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "generatePayload": {
                    "type": "object",
                    "additionalProperties": false
                },
                "notifyAllClients": {
                    "type": "boolean"
                }
            },
            "additionalProperties": false
        },
        "CacheableResponseOptions": {
            "type": "object",
            "properties": {
                "statuses": {
                    "type": "array",
                    "items": {
                        "type": "number"
                    }
                },
                "headers": {
                    "type": "object",
                    "additionalProperties": {
                        "type": "string"
                    }
                }
            },
            "additionalProperties": false
        },
        "ExpirationPluginOptions": {
            "type": "object",
            "properties": {
                "maxEntries": {
                    "type": "number"
                },
                "maxAgeSeconds": {
                    "type": "number"
                },
                "matchOptions": {
                    "$ref": "#/definitions/CacheQueryOptions"
                },
                "purgeOnQuotaError": {
                    "type": "boolean"
                }
            },
            "additionalProperties": false
        },
        "CacheQueryOptions": {
            "type": "object",
            "properties": {
                "ignoreMethod": {
                    "type": "boolean"
                },
                "ignoreSearch": {
                    "type": "boolean"
                },
                "ignoreVary": {
                    "type": "boolean"
                }
            },
            "additionalProperties": false
        },
        "WorkboxPlugin": {
            "description": "An object with optional lifecycle callback properties for the fetch and\ncache operations.",
            "type": "object",
            "properties": {
                "cacheDidUpdate": {},
                "cachedResponseWillBeUsed": {},
                "cacheKeyWillBeUsed": {},
                "cacheWillUpdate": {},
                "fetchDidFail": {},
                "fetchDidSucceed": {},
                "handlerDidComplete": {},
                "handlerDidError": {},
                "handlerDidRespond": {},
                "handlerWillRespond": {},
                "handlerWillStart": {},
                "requestWillFetch": {}
            },
            "additionalProperties": false
        },
        "CacheDidUpdateCallback": {
            "type": "object",
            "additionalProperties": false
        },
        "CachedResponseWillBeUsedCallback": {
            "type": "object",
            "additionalProperties": false
        },
        "CacheKeyWillBeUsedCallback": {
            "type": "object",
            "additionalProperties": false
        },
        "CacheWillUpdateCallback": {
            "type": "object",
            "additionalProperties": false
        },
        "FetchDidFailCallback": {
            "type": "object",
            "additionalProperties": false
        },
        "FetchDidSucceedCallback": {
            "type": "object",
            "additionalProperties": false
        },
        "HandlerDidCompleteCallback": {
            "type": "object",
            "additionalProperties": false
        },
        "HandlerDidErrorCallback": {
            "type": "object",
            "additionalProperties": false
        },
        "HandlerDidRespondCallback": {
            "type": "object",
            "additionalProperties": false
        },
        "HandlerWillRespondCallback": {
            "type": "object",
            "additionalProperties": false
        },
        "HandlerWillStartCallback": {
            "type": "object",
            "additionalProperties": false
        },
        "RequestWillFetchCallback": {
            "type": "object",
            "additionalProperties": false
        },
        "RequestInit": {
            "type": "object",
            "properties": {
                "body": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/ArrayBuffer"
                        },
                        {
                            "$ref": "#/definitions/ArrayBufferView"
                        },
                        {
                            "$ref": "#/definitions/Blob"
                        },
                        {
                            "$ref": "#/definitions/FormData"
                        },
                        {
                            "$ref": "#/definitions/URLSearchParams"
                        },
                        {
                            "$ref": "#/definitions/ReadableStream<Uint8Array>"
                        },
                        {
                            "type": [
                                "null",
                                "string"
                            ]
                        }
                    ]
                },
                "cache": {
                    "enum": [
                        "default",
                        "force-cache",
                        "no-cache",
                        "no-store",
                        "only-if-cached",
                        "reload"
                    ],
                    "type": "string"
                },
                "credentials": {
                    "enum": [
                        "include",
                        "omit",
                        "same-origin"
                    ],
                    "type": "string"
                },
                "headers": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/Headers"
                        },
                        {
                            "type": "array",
                            "items": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                }
                            }
                        },
                        {
                            "$ref": "#/definitions/Record<string,string>"
                        }
                    ]
                },
                "integrity": {
                    "type": "string"
                },
                "keepalive": {
                    "type": "boolean"
                },
                "method": {
                    "type": "string"
                },
                "mode": {
                    "enum": [
                        "cors",
                        "navigate",
                        "no-cors",
                        "same-origin"
                    ],
                    "type": "string"
                },
                "redirect": {
                    "enum": [
                        "error",
                        "follow",
                        "manual"
                    ],
                    "type": "string"
                },
                "referrer": {
                    "type": "string"
                },
                "referrerPolicy": {
                    "enum": [
                        "",
                        "no-referrer",
                        "no-referrer-when-downgrade",
                        "origin",
                        "origin-when-cross-origin",
                        "same-origin",
                        "strict-origin",
                        "strict-origin-when-cross-origin",
                        "unsafe-url"
                    ],
                    "type": "string"
                },
                "signal": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/AbortSignal"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "window": {}
            },
            "additionalProperties": false
        },
        "ArrayBuffer": {
            "type": "object",
            "properties": {
                "byteLength": {
                    "type": "number"
                },
                "__@toStringTag": {
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "__@toStringTag",
                "byteLength"
            ]
        },
        "ArrayBufferView": {
            "type": "object",
            "properties": {
                "buffer": {
                    "anyOf": [
                        {
                            "$ref": "#/definitions/ArrayBuffer"
                        },
                        {
                            "$ref": "#/definitions/SharedArrayBuffer"
                        }
                    ]
                },
                "byteLength": {
                    "type": "number"
                },
                "byteOffset": {
                    "type": "number"
                }
            },
            "additionalProperties": false,
            "required": [
                "buffer",
                "byteLength",
                "byteOffset"
            ]
        },
        "SharedArrayBuffer": {
            "type": "object",
            "properties": {
                "byteLength": {
                    "type": "number"
                },
                "__@species": {
                    "$ref": "#/definitions/SharedArrayBuffer"
                },
                "__@toStringTag": {
                    "type": "string",
                    "enum": [
                        "SharedArrayBuffer"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "__@species",
                "__@toStringTag",
                "byteLength"
            ]
        },
        "Blob": {
            "type": "object",
            "properties": {
                "size": {
                    "type": "number"
                },
                "type": {
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "size",
                "type"
            ]
        },
        "FormData": {
            "type": "object",
            "additionalProperties": false
        },
        "URLSearchParams": {
            "type": "object",
            "additionalProperties": false
        },
        "ReadableStream<Uint8Array>": {
            "type": "object",
            "properties": {
                "locked": {
                    "type": "boolean"
                }
            },
            "additionalProperties": false,
            "required": [
                "locked"
            ]
        },
        "Headers": {
            "type": "object",
            "additionalProperties": false
        },
        "Record<string,string>": {
            "type": "object",
            "additionalProperties": false
        },
        "AbortSignal": {
            "type": "object",
            "properties": {
                "aborted": {
                    "type": "boolean"
                },
                "onabort": {
                    "anyOf": [
                        {
                            "type": "object",
                            "additionalProperties": false
                        },
                        {
                            "type": "null"
                        }
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "aborted",
                "onabort"
            ]
        },
        "RouteMatchCallback": {}
    },
    "$schema": "http://json-schema.org/draft-07/schema#"
}