1 | 'use strict';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | var ol = require('common-tags').oneLine;
|
20 |
|
21 | module.exports = {
|
22 | 'unable-to-get-rootdir': `Unable to get the root directory of your web app.`,
|
23 | 'no-extension': ol`Unable to detect a usable extension for a file in your web
|
24 | app directory.`,
|
25 | 'invalid-file-manifest-name': ol`The File Manifest Name must have at least one
|
26 | character.`,
|
27 | 'unable-to-get-file-manifest-name': 'Unable to get a file manifest name.',
|
28 | 'invalid-sw-dest': `The 'swDest' value must be a valid path.`,
|
29 | 'unable-to-get-sw-name': 'Unable to get a service worker file name.',
|
30 | 'unable-to-get-save-config': ol`An error occurred when asking to save details
|
31 | in a config file.`,
|
32 | 'unable-to-get-file-hash': ol`An error occurred when attempting to create a
|
33 | file hash.`,
|
34 | 'unable-to-get-file-size': ol`An error occurred when attempting to get a file
|
35 | size.`,
|
36 | 'unable-to-glob-files': 'An error occurred when globbing for files.',
|
37 | 'unable-to-make-manifest-directory': ol`Unable to make output directory for
|
38 | file manifest.`,
|
39 | 'read-manifest-template-failure': 'Unable to read template for file manifest',
|
40 | 'populating-manifest-tmpl-failed': ol`An error occurred when populating the
|
41 | file manifest template.`,
|
42 | 'manifest-file-write-failure': 'Unable to write the file manifest.',
|
43 | 'unable-to-make-sw-directory': ol`Unable to make the directories to output
|
44 | the service worker path.`,
|
45 | 'read-sw-template-failure': ol`Unable to read the service worker template
|
46 | file.`,
|
47 | 'sw-write-failure': 'Unable to write the service worker file.',
|
48 | 'sw-write-failure-directory': ol`Unable to write the service worker file;
|
49 | 'swDest' should be a full path to the file, not a path to a directory.`,
|
50 | 'unable-to-copy-workbox-libraries': ol`One or more of the Workbox libraries
|
51 | could not be copied over to the destination directory: `,
|
52 | 'invalid-generate-sw-input': ol`The input to generateSW() must be an object.`,
|
53 | 'invalid-glob-directory': ol`The supplied globDirectory must be a path as a
|
54 | string.`,
|
55 | 'invalid-dont-cache-bust': ol`The supplied 'dontCacheBustUrlsMatching'
|
56 | parameter must be a RegExp.`,
|
57 | 'invalid-exclude-files': 'The excluded files should be an array of strings.',
|
58 | 'invalid-get-manifest-entries-input': ol`The input to
|
59 | 'getFileManifestEntries()' must be an object.`,
|
60 | 'invalid-manifest-path': ol`The supplied manifest path is not a string with
|
61 | at least one character.`,
|
62 | 'invalid-manifest-entries': ol`The manifest entries must be an array of
|
63 | strings or JavaScript objects containing a url parameter.`,
|
64 | 'invalid-manifest-format': ol`The value of the 'format' option passed to
|
65 | generateFileManifest() must be either 'iife' (the default) or 'es'.`,
|
66 | 'invalid-static-file-globs': ol`The 'globPatterns' value must be an array
|
67 | of strings.`,
|
68 | 'invalid-templated-urls': ol`The 'templatedUrls' value should be an object
|
69 | that maps URLs to either a string, or to an array of glob patterns.`,
|
70 | 'templated-url-matches-glob': ol`One of the 'templatedUrls' URLs is already
|
71 | being tracked via 'globPatterns': `,
|
72 | 'invalid-glob-ignores': ol`The 'globIgnores' parameter must be an array of
|
73 | glob pattern strings.`,
|
74 | 'manifest-entry-bad-url': ol`The generated manifest contains an entry without
|
75 | a URL string. This is likely an error with workbox-build.`,
|
76 | 'modify-url-prefix-bad-prefixes': ol`The 'modifyUrlPrefix' parameter must be
|
77 | an object with string key value pairs.`,
|
78 | 'invalid-inject-manifest-arg': ol`The input to 'injectManifest()' must be an
|
79 | object.`,
|
80 | 'injection-point-not-found': ol`Unable to find a place to inject the manifest.
|
81 | Please ensure that your service worker file contains the following: `,
|
82 | 'multiple-injection-points': ol`Please ensure that your 'swSrc' file contains
|
83 | only one match for the RegExp:`,
|
84 | 'populating-sw-tmpl-failed': ol`Unable to generate service worker from
|
85 | template.`,
|
86 | 'useless-glob-pattern': ol`One of the glob patterns doesn't match any files.
|
87 | Please remove or fix the following: `,
|
88 | 'bad-template-urls-asset': ol`There was an issue using one of the provided
|
89 | 'templatedUrls'.`,
|
90 | 'invalid-runtime-caching': ol`The 'runtimeCaching' parameter must an an
|
91 | array of objects with at least a 'urlPattern' and 'handler'.`,
|
92 | 'static-file-globs-deprecated': ol`'staticFileGlobs' is deprecated.
|
93 | Please use 'globPatterns' instead.`,
|
94 | 'dynamic-url-deprecated': ol`'dynamicUrlToDependencies' is deprecated.
|
95 | Please use 'templatedUrls' instead.`,
|
96 | 'urlPattern-is-required': ol`The 'urlPattern' option is required when using
|
97 | 'runtimeCaching'.`,
|
98 | 'handler-is-required': ol`The 'handler' option is required when using
|
99 | runtimeCaching.`,
|
100 | 'invalid-generate-file-manifest-arg': ol`The input to generateFileManifest()
|
101 | must be an Object.`,
|
102 | 'invalid-sw-src': `The 'swSrc' file can't be read.`,
|
103 | 'same-src-and-dest': ol`'swSrc' and 'swDest' should not be set to the same ` + `file. Please use a different file path for 'swDest'.`,
|
104 | 'only-regexp-routes-supported': ol`Please use a regular expression object as
|
105 | the urlPattern parameter. (Express-style routes are not currently
|
106 | supported.)`,
|
107 | 'bad-runtime-caching-config': ol`An unknown configuration option was used
|
108 | with runtimeCaching:`,
|
109 | 'invalid-network-timeout-seconds': ol`When using networkTimeoutSeconds, you
|
110 | must set the handler to 'networkFirst'.`,
|
111 | 'no-module-name': ol`You must provide a moduleName parameter when calling
|
112 | getModuleUrl().`
|
113 | }; |
\ | No newline at end of file |