@serwist/build 9.5.6 → 9.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/chunks/constants-BLOVm9H2.js +6 -0
  2. package/dist/chunks/constants-BLOVm9H2.js.map +1 -0
  3. package/dist/chunks/error-Cl4d1Wf-.js +31 -0
  4. package/dist/chunks/error-Cl4d1Wf-.js.map +1 -0
  5. package/dist/chunks/get-manifest-De0D0LAJ.js +14 -0
  6. package/dist/chunks/get-manifest-De0D0LAJ.js.map +1 -0
  7. package/dist/chunks/glob-B4_meZ_o.js +67 -0
  8. package/dist/chunks/glob-B4_meZ_o.js.map +1 -0
  9. package/dist/chunks/inject-manifest-DNqDY-04.js +27 -0
  10. package/dist/chunks/inject-manifest-DNqDY-04.js.map +1 -0
  11. package/dist/chunks/manifest-transform-BCUeQ0-V.d.ts +75 -0
  12. package/dist/chunks/manifest-transform-BCUeQ0-V.d.ts.map +1 -0
  13. package/dist/chunks/rolldown-runtime-CzwdidQP.js +13 -0
  14. package/dist/index.d.mts +475 -0
  15. package/dist/index.d.mts.map +1 -0
  16. package/dist/index.mjs +594 -0
  17. package/dist/index.mjs.map +1 -0
  18. package/dist/index.schema.d.mts +278 -0
  19. package/dist/index.schema.d.mts.map +1 -0
  20. package/dist/index.schema.mjs +5 -0
  21. package/package.json +15 -16
  22. package/src/lib/replace-and-update-source-map.ts +0 -1
  23. package/dist/chunks/constants.js +0 -59
  24. package/dist/chunks/get-manifest.js +0 -11
  25. package/dist/chunks/glob.js +0 -75
  26. package/dist/chunks/inject-manifest.js +0 -29
  27. package/dist/get-manifest.d.ts +0 -19
  28. package/dist/get-manifest.d.ts.map +0 -1
  29. package/dist/index.d.ts +0 -24
  30. package/dist/index.d.ts.map +0 -1
  31. package/dist/index.js +0 -614
  32. package/dist/index.schema.d.ts +0 -13
  33. package/dist/index.schema.d.ts.map +0 -1
  34. package/dist/index.schema.js +0 -9
  35. package/dist/inject-manifest.d.ts +0 -29
  36. package/dist/inject-manifest.d.ts.map +0 -1
  37. package/dist/lib/additional-precache-entries-transform.d.ts +0 -12
  38. package/dist/lib/additional-precache-entries-transform.d.ts.map +0 -1
  39. package/dist/lib/constants.d.ts +0 -2
  40. package/dist/lib/constants.d.ts.map +0 -1
  41. package/dist/lib/errors.d.ts +0 -46
  42. package/dist/lib/errors.d.ts.map +0 -1
  43. package/dist/lib/escape-regexp.d.ts +0 -2
  44. package/dist/lib/escape-regexp.d.ts.map +0 -1
  45. package/dist/lib/get-composite-details.d.ts +0 -3
  46. package/dist/lib/get-composite-details.d.ts.map +0 -1
  47. package/dist/lib/get-file-details.d.ts +0 -9
  48. package/dist/lib/get-file-details.d.ts.map +0 -1
  49. package/dist/lib/get-file-hash.d.ts +0 -2
  50. package/dist/lib/get-file-hash.d.ts.map +0 -1
  51. package/dist/lib/get-file-manifest-entries.d.ts +0 -3
  52. package/dist/lib/get-file-manifest-entries.d.ts.map +0 -1
  53. package/dist/lib/get-file-size.d.ts +0 -2
  54. package/dist/lib/get-file-size.d.ts.map +0 -1
  55. package/dist/lib/get-source-map-url.d.ts +0 -2
  56. package/dist/lib/get-source-map-url.d.ts.map +0 -1
  57. package/dist/lib/get-string-details.d.ts +0 -3
  58. package/dist/lib/get-string-details.d.ts.map +0 -1
  59. package/dist/lib/get-string-hash.d.ts +0 -3
  60. package/dist/lib/get-string-hash.d.ts.map +0 -1
  61. package/dist/lib/maximum-size-transform.d.ts +0 -3
  62. package/dist/lib/maximum-size-transform.d.ts.map +0 -1
  63. package/dist/lib/modify-url-prefix-transform.d.ts +0 -5
  64. package/dist/lib/modify-url-prefix-transform.d.ts.map +0 -1
  65. package/dist/lib/no-revision-for-urls-matching-transform.d.ts +0 -3
  66. package/dist/lib/no-revision-for-urls-matching-transform.d.ts.map +0 -1
  67. package/dist/lib/rebase-path.d.ts +0 -5
  68. package/dist/lib/rebase-path.d.ts.map +0 -1
  69. package/dist/lib/replace-and-update-source-map.d.ts +0 -42
  70. package/dist/lib/replace-and-update-source-map.d.ts.map +0 -1
  71. package/dist/lib/transform-manifest.d.ts +0 -61
  72. package/dist/lib/transform-manifest.d.ts.map +0 -1
  73. package/dist/lib/translate-url-to-sourcemap-paths.d.ts +0 -6
  74. package/dist/lib/translate-url-to-sourcemap-paths.d.ts.map +0 -1
  75. package/dist/lib/validate-options.d.ts +0 -4
  76. package/dist/lib/validate-options.d.ts.map +0 -1
  77. package/dist/schema/assert-type.d.ts +0 -4
  78. package/dist/schema/assert-type.d.ts.map +0 -1
  79. package/dist/schema/base.d.ts +0 -66
  80. package/dist/schema/base.d.ts.map +0 -1
  81. package/dist/schema/error.d.ts +0 -9
  82. package/dist/schema/error.d.ts.map +0 -1
  83. package/dist/schema/get-manifest.d.ts +0 -72
  84. package/dist/schema/get-manifest.d.ts.map +0 -1
  85. package/dist/schema/glob.d.ts +0 -15
  86. package/dist/schema/glob.d.ts.map +0 -1
  87. package/dist/schema/inject-manifest.d.ts +0 -79
  88. package/dist/schema/inject-manifest.d.ts.map +0 -1
  89. package/dist/schema/manifest-entry.d.ts +0 -7
  90. package/dist/schema/manifest-entry.d.ts.map +0 -1
  91. package/dist/schema/manifest-transform.d.ts +0 -64
  92. package/dist/schema/manifest-transform.d.ts.map +0 -1
  93. package/dist/schema/sw-dest.d.ts +0 -8
  94. package/dist/schema/sw-dest.d.ts.map +0 -1
  95. package/dist/schema/utils.d.ts +0 -10
  96. package/dist/schema/utils.d.ts.map +0 -1
  97. package/dist/types.d.ts +0 -204
  98. package/dist/types.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/lib/errors.ts","../src/lib/get-composite-details.ts","../src/lib/get-string-hash.ts","../src/lib/get-file-hash.ts","../src/lib/get-file-size.ts","../src/lib/get-file-details.ts","../src/lib/get-string-details.ts","../src/lib/additional-precache-entries-transform.ts","../src/lib/maximum-size-transform.ts","../src/lib/escape-regexp.ts","../src/lib/modify-url-prefix-transform.ts","../src/lib/no-revision-for-urls-matching-transform.ts","../src/lib/transform-manifest.ts","../src/lib/get-file-manifest-entries.ts","../src/lib/validate-options.ts","../src/get-manifest.ts","../src/lib/get-source-map-url.ts","../src/lib/rebase-path.ts","../src/lib/replace-and-update-source-map.ts","../src/lib/translate-url-to-sourcemap-paths.ts","../src/inject-manifest.ts","../src/index.ts"],"sourcesContent":["/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport { oneLine as ol } from \"common-tags\";\n\nexport const errors = {\n \"unable-to-get-rootdir\": \"Unable to get the root directory of your web app.\",\n \"no-extension\": ol`Unable to detect a usable extension for a file in your web\n app directory.`,\n \"invalid-file-manifest-name\": ol`The File Manifest Name must have at least one\n character.`,\n \"unable-to-get-file-manifest-name\": \"Unable to get a file manifest name.\",\n \"invalid-sw-dest\": `The 'swDest' value must be a valid path.`,\n \"unable-to-get-sw-name\": \"Unable to get a service worker file name.\",\n \"unable-to-get-save-config\": ol`An error occurred when asking to save details\n in a config file.`,\n \"unable-to-get-file-hash\": ol`An error occurred when attempting to create a\n file hash.`,\n \"unable-to-get-file-size\": ol`An error occurred when attempting to get a file\n size.`,\n \"unable-to-glob-files\": \"An error occurred when globbing for files.\",\n \"unable-to-make-manifest-directory\": ol`Unable to make output directory for\n file manifest.`,\n \"read-manifest-template-failure\": \"Unable to read template for file manifest\",\n \"populating-manifest-tmpl-failed\": ol`An error occurred when populating the\n file manifest template.`,\n \"manifest-file-write-failure\": \"Unable to write the file manifest.\",\n \"unable-to-make-sw-directory\": ol`Unable to make the directories to output\n the service worker path.`,\n \"sw-write-failure\": \"Unable to write the service worker file.\",\n \"sw-write-failure-directory\": ol`Unable to write the service worker file;\n 'swDest' should be a full path to the file, not a path to a directory.`,\n \"unable-to-copy-serwist-libraries\": ol`One or more of the Serwist libraries\n could not be copied over to the destination directory: `,\n \"invalid-glob-directory\": ol`The supplied globDirectory must be a path as a\n string.`,\n \"invalid-dont-cache-bust\": ol`The supplied 'dontCacheBustURLsMatching'\n parameter must be a RegExp.`,\n \"invalid-exclude-files\": \"The excluded files should be an array of strings.\",\n \"invalid-get-manifest-entries-input\": ol`The input to\n 'getFileManifestEntries()' must be an object.`,\n \"invalid-manifest-path\": ol`The supplied manifest path is not a string with\n at least one character.`,\n \"invalid-manifest-entries\": ol`The manifest entries must be an array of\n strings or JavaScript objects containing a url parameter.`,\n \"invalid-manifest-format\": ol`The value of the 'format' option passed to\n generateFileManifest() must be either 'iife' (the default) or 'es'.`,\n \"invalid-static-file-globs\": ol`The 'globPatterns' value must be an array\n of strings.`,\n \"invalid-templated-urls\": ol`The 'templatedURLs' value should be an object\n that maps URLs to either a string, or to an array of glob patterns.`,\n \"templated-url-matches-glob\": ol`One of the 'templatedURLs' URLs is already\n being tracked via 'globPatterns': `,\n \"invalid-glob-ignores\": ol`The 'globIgnores' parameter must be an array of\n glob pattern strings.`,\n \"manifest-entry-bad-url\": ol`The generated manifest contains an entry without\n a URL string. This is likely an error with @serwist/build.`,\n \"modify-url-prefix-bad-prefixes\": ol`The 'modifyURLPrefix' parameter must be\n an object with string key value pairs.`,\n \"invalid-inject-manifest-arg\": ol`The input to 'injectManifest()' must be an\n object.`,\n \"injection-point-not-found\": ol`Unable to find a place to inject the manifest.\n Please ensure that your service worker file contains the following: `,\n \"multiple-injection-points\": ol`Please ensure that your 'swSrc' file contains\n only one match for the following: `,\n \"bad-template-urls-asset\": ol`There was an issue using one of the provided\n 'templatedURLs'.`,\n \"invalid-generate-file-manifest-arg\": ol`The input to generateFileManifest()\n must be an Object.`,\n \"invalid-sw-src\": `The 'swSrc' file can't be read.`,\n \"same-src-and-dest\": ol`Unable to find a place to inject the manifest. This is\n likely because swSrc and swDest are configured to the same file.\n Please ensure that your swSrc file contains the following:`,\n \"no-module-name\": ol`You must provide a moduleName parameter when calling\n getModuleURL().`,\n \"bad-manifest-transforms-return-value\": ol`The return value from a\n manifestTransform should be an object with 'manifest' and optionally\n 'warnings' properties.`,\n \"string-entry-warning\": ol`Some items were passed to additionalPrecacheEntries\n without revisioning info. This is generally NOT safe. Learn more at\n https://bit.ly/wb-precache.`,\n \"cant-find-sourcemap\": ol`The swSrc file refers to a sourcemap that can't be\n opened:`,\n \"manifest-transforms\": ol`When using manifestTransforms, you must provide\n an array of functions.`,\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport crypto from \"node:crypto\";\n\nimport type { FileDetails } from \"../types.js\";\n\nexport const getCompositeDetails = (compositeURL: string, dependencyDetails: FileDetails[]): FileDetails => {\n let totalSize = 0;\n let compositeHash = \"\";\n\n for (const fileDetails of dependencyDetails) {\n totalSize += fileDetails.size;\n compositeHash += fileDetails.hash === null ? \"\" : fileDetails.hash;\n }\n\n const md5 = crypto.createHash(\"md5\");\n md5.update(compositeHash);\n const hashOfHashes = md5.digest(\"hex\");\n\n return {\n file: compositeURL,\n hash: hashOfHashes,\n size: totalSize,\n };\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport crypto from \"node:crypto\";\n\nexport function getStringHash(input: crypto.BinaryLike): string {\n const md5 = crypto.createHash(\"md5\");\n md5.update(input);\n return md5.digest(\"hex\");\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport { readFileSync } from \"node:fs\";\n\nimport { errors } from \"./errors.js\";\nimport { getStringHash } from \"./get-string-hash.js\";\n\nexport const getFileHash = (file: string): string => {\n try {\n const buffer = readFileSync(file);\n return getStringHash(buffer);\n } catch (err) {\n throw new Error(`${errors[\"unable-to-get-file-hash\"]} '${err instanceof Error && err.message ? err.message : \"\"}'`);\n }\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport fs from \"node:fs\";\nimport { errors } from \"./errors.js\";\n\nexport const getFileSize = (file: string): number | null => {\n try {\n const stat = fs.statSync(file);\n if (!stat.isFile()) {\n return null;\n }\n return stat.size;\n } catch (err) {\n throw new Error(`${errors[\"unable-to-get-file-size\"]} '${err instanceof Error && err.message ? err.message : \"\"}'`);\n }\n};\n","/*\n Copyright 2021 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport path from \"node:path\";\nimport { globSync } from \"glob\";\nimport type { FileDetails, GlobPartial } from \"../types.js\";\nimport { errors } from \"./errors.js\";\nimport { getFileHash } from \"./get-file-hash.js\";\nimport { getFileSize } from \"./get-file-size.js\";\n\nexport const getFileDetails = ({\n globDirectory,\n globFollow,\n globIgnores,\n globPattern,\n}: Omit<GlobPartial, \"globDirectory\" | \"globPatterns\" | \"templatedURLs\"> & {\n // This will only be called when globDirectory is not undefined.\n globDirectory: string;\n globPattern: string;\n}): {\n globbedFileDetails: FileDetails[];\n warning: string;\n} => {\n let globbedFiles: string[];\n let warning = \"\";\n\n try {\n globbedFiles = globSync(globPattern, {\n cwd: globDirectory,\n follow: globFollow,\n ignore: globIgnores,\n });\n } catch (err) {\n throw new Error(`${errors[\"unable-to-glob-files\"]} '${err instanceof Error && err.message ? err.message : \"\"}'`);\n }\n\n const globbedFileDetails: FileDetails[] = [];\n for (const file of globbedFiles) {\n const fullPath = path.join(globDirectory, file);\n const fileSize = getFileSize(fullPath);\n if (fileSize !== null) {\n const fileHash = getFileHash(fullPath);\n globbedFileDetails.push({\n file: path.relative(globDirectory, fullPath),\n hash: fileHash,\n size: fileSize,\n });\n }\n }\n\n return { globbedFileDetails, warning };\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport type { FileDetails } from \"../types.js\";\nimport { getStringHash } from \"./get-string-hash.js\";\n\nexport const getStringDetails = (url: string, str: string): FileDetails => ({\n file: url,\n hash: getStringHash(str),\n size: str.length,\n});\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport type { ManifestEntry } from \"../types.js\";\nimport { errors } from \"./errors.js\";\n\ntype AdditionalManifestEntriesTransform = (manifest: (ManifestEntry & { size: number })[]) => {\n manifest: (ManifestEntry & { size: number })[];\n warnings: string[];\n};\n\nexport const additionalPrecacheEntriesTransform = (additionalPrecacheEntries: (ManifestEntry | string)[]): AdditionalManifestEntriesTransform => {\n return (manifest: (ManifestEntry & { size: number })[]) => {\n const warnings: string[] = [];\n const stringEntries = new Set<string>();\n\n for (const additionalEntry of additionalPrecacheEntries) {\n // Warn about either a string or an object that lacks a revision property.\n // (An object with a revision property set to null is okay.)\n if (typeof additionalEntry === \"string\") {\n stringEntries.add(additionalEntry);\n manifest.push({\n revision: null,\n size: 0,\n url: additionalEntry,\n });\n } else {\n if (additionalEntry && !additionalEntry.integrity && additionalEntry.revision === undefined) {\n stringEntries.add(additionalEntry.url);\n }\n manifest.push(Object.assign({ size: 0 }, additionalEntry));\n }\n }\n\n if (stringEntries.size > 0) {\n let urls = \"\\n\";\n for (const stringEntry of stringEntries) {\n urls += ` - ${stringEntry}\\n`;\n }\n\n warnings.push(errors[\"string-entry-warning\"] + urls);\n }\n\n return {\n manifest,\n warnings,\n };\n };\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport prettyBytes from \"pretty-bytes\";\n\nimport type { ManifestTransform } from \"../types.js\";\n\nexport function maximumSizeTransform(maximumFileSizeToCacheInBytes: number): ManifestTransform {\n return (originalManifest) => {\n const warnings: string[] = [];\n const manifest = originalManifest.filter((entry) => {\n if (entry.size <= maximumFileSizeToCacheInBytes) {\n return true;\n }\n\n warnings.push(\n `${entry.url} is ${prettyBytes(entry.size)}, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.`,\n );\n return false;\n });\n\n return { manifest, warnings };\n };\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\n// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\nexport const escapeRegExp = (str: string): string => {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport type { ManifestTransform } from \"../types.js\";\nimport { errors } from \"./errors.js\";\nimport { escapeRegExp } from \"./escape-regexp.js\";\n\nexport function modifyURLPrefixTransform(modifyURLPrefix: { [key: string]: string }): ManifestTransform {\n if (!modifyURLPrefix || typeof modifyURLPrefix !== \"object\" || Array.isArray(modifyURLPrefix)) {\n throw new Error(errors[\"modify-url-prefix-bad-prefixes\"]);\n }\n\n // If there are no entries in modifyURLPrefix, just return an identity\n // function as a shortcut.\n if (Object.keys(modifyURLPrefix).length === 0) {\n return (manifest) => {\n return { manifest };\n };\n }\n\n for (const key of Object.keys(modifyURLPrefix)) {\n if (typeof modifyURLPrefix[key] !== \"string\") {\n throw new Error(errors[\"modify-url-prefix-bad-prefixes\"]);\n }\n }\n\n // Escape the user input so it's safe to use in a regex.\n const safeModifyURLPrefixes = Object.keys(modifyURLPrefix).map(escapeRegExp);\n // Join all the `modifyURLPrefix` keys so a single regex can be used.\n const prefixMatchesStrings = safeModifyURLPrefixes.join(\"|\");\n // Add `^` to the front the prefix matches so it only matches the start of\n // a string.\n const modifyRegex = new RegExp(`^(${prefixMatchesStrings})`);\n\n return (originalManifest) => {\n const manifest = originalManifest.map((entry) => {\n if (typeof entry.url !== \"string\") {\n throw new Error(errors[\"manifest-entry-bad-url\"]);\n }\n\n entry.url = entry.url.replace(modifyRegex, (match) => {\n return modifyURLPrefix[match];\n });\n\n return entry;\n });\n\n return { manifest };\n };\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport type { ManifestTransform } from \"../types.js\";\nimport { errors } from \"./errors.js\";\n\nexport function noRevisionForURLsMatchingTransform(regexp: RegExp): ManifestTransform {\n if (!(regexp instanceof RegExp)) {\n throw new Error(errors[\"invalid-dont-cache-bust\"]);\n }\n\n return (originalManifest) => {\n const manifest = originalManifest.map((entry) => {\n if (typeof entry.url !== \"string\") {\n throw new Error(errors[\"manifest-entry-bad-url\"]);\n }\n\n if (entry.url.match(regexp)) {\n entry.revision = null;\n }\n\n return entry;\n });\n\n return { manifest };\n };\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport type { BaseResolved, FileDetails, ManifestEntry, ManifestTransform } from \"../types.js\";\nimport { additionalPrecacheEntriesTransform } from \"./additional-precache-entries-transform.js\";\nimport { errors } from \"./errors.js\";\nimport { maximumSizeTransform } from \"./maximum-size-transform.js\";\nimport { modifyURLPrefixTransform } from \"./modify-url-prefix-transform.js\";\nimport { noRevisionForURLsMatchingTransform } from \"./no-revision-for-urls-matching-transform.js\";\n\n/**\n * A `ManifestTransform` function can be used to modify the modify the `url` or\n * `revision` properties of some or all of the {@linkcode ManifestEntry} in the manifest.\n *\n * Deleting the `revision` property of an entry will cause\n * the corresponding `url` to be precached without cache-busting parameters\n * applied, which is to say, it implies that the URL itself contains\n * proper versioning info. If the `revision` property is present, it must be\n * set to a string.\n *\n * @example A transformation that prepended the origin of a CDN for any\n * URL starting with '/assets/' could be implemented as:\n *\n * const cdnTransform = async (manifestEntries) => {\n * const manifest = manifestEntries.map(entry => {\n * const cdnOrigin = 'https://example.com';\n * if (entry.url.startsWith('/assets/')) {\n * entry.url = cdnOrigin + entry.url;\n * }\n * return entry;\n * });\n * return {manifest, warnings: []};\n * };\n *\n * @example A transformation that nulls the revision field when the\n * URL contains an 8-character hash surrounded by '.', indicating that it\n * already contains revision information:\n *\n * const removeRevisionTransform = async (manifestEntries) => {\n * const manifest = manifestEntries.map(entry => {\n * const hashRegExp = /\\.\\w{8}\\./;\n * if (entry.url.match(hashRegExp)) {\n * entry.revision = null;\n * }\n * return entry;\n * });\n * return {manifest, warnings: []};\n * };\n *\n * @callback ManifestTransform\n * @param manifestEntries The full\n * array of entries, prior to the current transformation.\n * @param compilation When used in the webpack plugins, this param\n * will be set to the current `compilation`.\n * @returns The array of entries with the transformation applied,\n * and optionally, any warnings that should be reported back to the build tool.\n */\ninterface ManifestTransformResultWithWarnings {\n count: number;\n size: number;\n manifestEntries: ManifestEntry[] | undefined;\n warnings: string[];\n}\ninterface ManifestEntryWithSize extends ManifestEntry {\n size: number;\n}\ninterface TransformManifestOptions\n extends Pick<\n BaseResolved,\n | \"additionalPrecacheEntries\"\n | \"dontCacheBustURLsMatching\"\n | \"manifestTransforms\"\n | \"maximumFileSizeToCacheInBytes\"\n | \"modifyURLPrefix\"\n | \"disablePrecacheManifest\"\n > {\n fileDetails: FileDetails[];\n // When this is called by the webpack plugin, transformParam will be the\n // current webpack compilation.\n transformParam?: unknown;\n}\n\nexport async function transformManifest({\n additionalPrecacheEntries,\n dontCacheBustURLsMatching,\n fileDetails,\n manifestTransforms,\n maximumFileSizeToCacheInBytes,\n modifyURLPrefix,\n transformParam,\n disablePrecacheManifest,\n}: TransformManifestOptions): Promise<ManifestTransformResultWithWarnings> {\n if (disablePrecacheManifest) {\n return {\n count: 0,\n size: 0,\n manifestEntries: undefined,\n warnings: [],\n };\n }\n\n const allWarnings: string[] = [];\n\n // Take the array of fileDetail objects and convert it into an array of\n // {url, revision, size} objects, with \\ replaced with /.\n const normalizedManifest: ManifestEntryWithSize[] = fileDetails.map((fileDetails) => ({\n url: fileDetails.file.replace(/\\\\/g, \"/\"),\n revision: fileDetails.hash,\n size: fileDetails.size,\n }));\n\n const transformsToApply: ManifestTransform[] = [];\n\n if (maximumFileSizeToCacheInBytes) {\n transformsToApply.push(maximumSizeTransform(maximumFileSizeToCacheInBytes));\n }\n\n if (modifyURLPrefix) {\n transformsToApply.push(modifyURLPrefixTransform(modifyURLPrefix));\n }\n\n if (dontCacheBustURLsMatching) {\n transformsToApply.push(noRevisionForURLsMatchingTransform(dontCacheBustURLsMatching));\n }\n\n // Run any manifestTransforms functions second-to-last.\n if (manifestTransforms) {\n transformsToApply.push(...manifestTransforms);\n }\n\n // Run additionalPrecacheEntriesTransform last.\n if (additionalPrecacheEntries) {\n transformsToApply.push(additionalPrecacheEntriesTransform(additionalPrecacheEntries));\n }\n\n let transformedManifest: ManifestEntryWithSize[] = normalizedManifest;\n for (const transform of transformsToApply) {\n const result = await transform(transformedManifest, transformParam);\n if (!(\"manifest\" in result)) {\n throw new Error(errors[\"bad-manifest-transforms-return-value\"]);\n }\n\n transformedManifest = result.manifest;\n allWarnings.push(...(result.warnings || []));\n }\n\n // Generate some metadata about the manifest before we clear out the size\n // properties from each entry.\n const count = transformedManifest.length;\n let size = 0;\n for (const manifestEntry of transformedManifest as (ManifestEntry & { size?: number })[]) {\n size += manifestEntry.size || 0;\n delete manifestEntry.size;\n }\n\n return {\n count,\n size,\n manifestEntries: transformedManifest as ManifestEntry[],\n warnings: allWarnings,\n };\n}\n","/*\n Copyright 2021 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport assert from \"node:assert\";\n\nimport type { FileDetails, GetManifestOptionsComplete, GetManifestResult } from \"../types.js\";\nimport { errors } from \"./errors.js\";\nimport { getCompositeDetails } from \"./get-composite-details.js\";\nimport { getFileDetails } from \"./get-file-details.js\";\nimport { getStringDetails } from \"./get-string-details.js\";\nimport { transformManifest } from \"./transform-manifest.js\";\n\nexport const getFileManifestEntries = async ({\n additionalPrecacheEntries,\n dontCacheBustURLsMatching,\n globDirectory,\n globFollow,\n globIgnores,\n globPatterns = [],\n globStrict,\n manifestTransforms,\n maximumFileSizeToCacheInBytes,\n modifyURLPrefix,\n templatedURLs,\n disablePrecacheManifest,\n}: GetManifestOptionsComplete): Promise<GetManifestResult> => {\n if (disablePrecacheManifest) {\n return {\n count: 0,\n size: 0,\n manifestEntries: undefined,\n warnings: [],\n };\n }\n\n const warnings: string[] = [];\n const allFileDetails = new Map<string, FileDetails>();\n\n try {\n for (const globPattern of globPatterns) {\n const { globbedFileDetails, warning } = getFileDetails({\n globDirectory,\n globFollow,\n globIgnores,\n globPattern,\n globStrict,\n });\n\n if (warning) {\n warnings.push(warning);\n }\n\n for (const details of globbedFileDetails) {\n if (details && !allFileDetails.has(details.file)) {\n allFileDetails.set(details.file, details);\n }\n }\n }\n } catch (error) {\n // If there's an exception thrown while globbing, then report\n // it back as a warning, and don't consider it fatal.\n if (error instanceof Error && error.message) {\n warnings.push(error.message);\n }\n }\n\n if (templatedURLs) {\n for (const url of Object.keys(templatedURLs)) {\n assert(!allFileDetails.has(url), errors[\"templated-url-matches-glob\"]);\n\n const dependencies = templatedURLs[url];\n if (Array.isArray(dependencies)) {\n const details = dependencies.reduce<FileDetails[]>((previous, globPattern) => {\n try {\n const { globbedFileDetails, warning } = getFileDetails({\n globDirectory,\n globFollow,\n globIgnores,\n globPattern,\n globStrict,\n });\n\n if (warning) {\n warnings.push(warning);\n }\n\n return previous.concat(globbedFileDetails);\n } catch (error) {\n const debugObj: { [key: string]: string[] } = {};\n debugObj[url] = dependencies;\n throw new Error(\n `${errors[\"bad-template-urls-asset\"]} '${globPattern}' from '${JSON.stringify(debugObj)}':\\n${\n error instanceof Error ? error.toString() : \"\"\n }`,\n );\n }\n }, []);\n if (details.length === 0) {\n throw new Error(`${errors[\"bad-template-urls-asset\"]} The glob pattern '${dependencies.toString()}' did not match anything.`);\n }\n allFileDetails.set(url, getCompositeDetails(url, details));\n } else if (typeof dependencies === \"string\") {\n allFileDetails.set(url, getStringDetails(url, dependencies));\n }\n }\n }\n\n const transformedManifest = await transformManifest({\n additionalPrecacheEntries,\n dontCacheBustURLsMatching,\n manifestTransforms,\n maximumFileSizeToCacheInBytes,\n modifyURLPrefix,\n fileDetails: Array.from(allFileDetails.values()),\n disablePrecacheManifest,\n });\n\n transformedManifest.warnings.push(...warnings);\n\n return transformedManifest;\n};\n","import { z } from \"zod\";\n/*\n Copyright 2021 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { SerwistConfigError, validationErrorMap } from \"../schema/error.js\";\nimport type { GetManifestOptionsComplete, InjectManifestOptionsComplete } from \"../types.js\";\n\nexport const validateGetManifestOptions = async (input: unknown): Promise<GetManifestOptionsComplete> => {\n const result = await (await import(\"../schema/get-manifest.js\")).getManifestOptions.spa(input, { error: validationErrorMap });\n if (!result.success) {\n throw new SerwistConfigError({\n moduleName: \"@serwist/build\",\n message: z.prettifyError(result.error),\n });\n }\n return result.data;\n};\n\nexport const validateInjectManifestOptions = async (input: unknown): Promise<InjectManifestOptionsComplete> => {\n const result = await (await import(\"../schema/inject-manifest.js\")).injectManifestOptions.spa(input, { error: validationErrorMap });\n if (!result.success) {\n throw new SerwistConfigError({\n moduleName: \"@serwist/build\",\n message: z.prettifyError(result.error),\n });\n }\n return result.data;\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport { getFileManifestEntries } from \"./lib/get-file-manifest-entries.js\";\nimport { validateGetManifestOptions } from \"./lib/validate-options.js\";\nimport type { GetManifestOptions, GetManifestResult } from \"./types.js\";\n\n/**\n * This method returns a list of URLs to precache, referred to as a \"precache\n * manifest\", along with details about the number of entries and their size,\n * based on the options you provide.\n *\n * ```\n * // The following lists some common options; see the rest of the documentation\n * // for the full set of options and defaults.\n * const {count, manifestEntries, size, warnings} = await getManifest({\n * dontCacheBustURLsMatching: [new RegExp('...')],\n * globDirectory: '...',\n * globPatterns: ['...', '...'],\n * maximumFileSizeToCacheInBytes: ...,\n * });\n * ```\n */\nexport const getManifest = async (config: GetManifestOptions): Promise<GetManifestResult> => {\n const options = await validateGetManifestOptions(config);\n\n return await getFileManifestEntries(options);\n};\n","/*\n Copyright 2022 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\n// Adapted from https://github.com/lydell/source-map-url/blob/master/source-map-url.js\n// See https://github.com/GoogleChrome/workbox/issues/3019\nconst innerRegex = /[#@] sourceMappingURL=([^\\s'\"]*)/;\nconst regex = RegExp(`(?:/\\\\*(?:\\\\s*\\r?\\n(?://)?)?(?:${innerRegex.source})\\\\s*\\\\*/|//(?:${innerRegex.source}))\\\\s*`);\n\nexport function getSourceMapURL(srcContents: string): string | null {\n const match = srcContents.match(regex);\n return match ? match[1] || match[2] || \"\" : null;\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport path from \"node:path\";\nimport { toUnix } from \"@serwist/utils\";\n\nexport function rebasePath({ baseDirectory, file }: { baseDirectory: string; file: string }): string {\n // The initial path is relative to the current directory, so make it absolute.\n const absolutePath = path.resolve(file);\n\n // Convert the absolute path so that it's relative to the baseDirectory.\n const relativePath = path.relative(baseDirectory, absolutePath);\n\n // Remove any leading ./ as it won't work in a glob pattern.\n const normalizedPath = path.normalize(relativePath);\n\n return toUnix(normalizedPath);\n}\n","/*\n Copyright 2019 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\n\nimport type { RawSourceMap } from \"source-map\";\nimport { SourceMapConsumer, SourceMapGenerator } from \"source-map\";\n\ninterface ReplaceAndUpdateSourceMapOptions {\n /**\n * The name for the file whose contents\n * correspond to originalSource.\n */\n jsFilename: string;\n /**\n * The sourcemap for originalSource,\n * prior to any replacements.\n */\n originalMap: RawSourceMap;\n /**\n * The source code, prior to any\n * replacements.\n */\n originalSource: string;\n /**\n * A string to swap in for searchString.\n */\n replaceString: string;\n /**\n * A string in originalSource to replace.\n * Only the first occurrence will be replaced.\n */\n searchString: string;\n}\n\n/**\n * Adapted from https://github.com/nsams/sourcemap-aware-replace, with modern\n * JavaScript updates, along with additional properties copied from originalMap.\n *\n * @param options\n * @returns An object containing both\n * originalSource with the replacement applied, and the modified originalMap.\n * @private\n */\nexport async function replaceAndUpdateSourceMap({\n jsFilename,\n originalMap,\n originalSource,\n replaceString,\n searchString,\n}: ReplaceAndUpdateSourceMapOptions): Promise<{ map: string; source: string }> {\n const generator = new SourceMapGenerator({\n file: jsFilename,\n });\n\n const consumer = await new SourceMapConsumer(originalMap);\n\n let pos: number;\n let src = originalSource;\n const replacements: { line: number; column: number }[] = [];\n let lineNum = 0;\n let filePos = 0;\n\n const lines = src.split(\"\\n\");\n for (let line of lines) {\n lineNum++;\n let searchPos = 0;\n while ((pos = line.indexOf(searchString, searchPos)) !== -1) {\n src = src.substring(0, filePos + pos) + replaceString + src.substring(filePos + pos + searchString.length);\n line = line.substring(0, pos) + replaceString + line.substring(pos + searchString.length);\n replacements.push({ line: lineNum, column: pos });\n searchPos = pos + replaceString.length;\n }\n filePos += line.length + 1;\n }\n\n replacements.reverse();\n\n consumer.eachMapping((mapping) => {\n for (const replacement of replacements) {\n if (replacement.line === mapping.generatedLine && mapping.generatedColumn > replacement.column) {\n const offset = searchString.length - replaceString.length;\n mapping.generatedColumn -= offset;\n }\n }\n\n if (mapping.source) {\n const newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn,\n },\n original: {\n line: mapping.originalLine,\n column: mapping.originalColumn,\n },\n source: mapping.source,\n };\n return generator.addMapping(newMapping);\n }\n\n return mapping;\n });\n\n consumer.destroy();\n // JSON.parse returns any.\n const updatedSourceMap: RawSourceMap = Object.assign(JSON.parse(generator.toString()), {\n names: originalMap.names,\n sourceRoot: originalMap.sourceRoot,\n sources: originalMap.sources,\n sourcesContent: originalMap.sourcesContent,\n });\n\n return {\n map: JSON.stringify(updatedSourceMap),\n source: src,\n };\n}\n","/*\n Copyright 2021 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport { toUnix } from \"@serwist/utils\";\nimport { errors } from \"./errors.js\";\n\nexport function translateURLToSourcemapPaths(\n url: string | null,\n swSrc: string,\n swDest: string,\n): {\n destPath: string | undefined;\n srcPath: string | undefined;\n warning: string | undefined;\n} {\n let destPath: string | undefined;\n let srcPath: string | undefined;\n let warning: string | undefined;\n\n if (url && !url.startsWith(\"data:\")) {\n const possibleSrcPath = path.resolve(path.dirname(swSrc), url);\n if (fs.existsSync(possibleSrcPath)) {\n srcPath = toUnix(possibleSrcPath);\n destPath = toUnix(path.resolve(path.dirname(swDest), url));\n } else {\n warning = `${errors[\"cant-find-sourcemap\"]} ${possibleSrcPath}`;\n }\n }\n\n return { destPath, srcPath, warning };\n}\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport assert from \"node:assert\";\nimport fsp from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { toUnix } from \"@serwist/utils\";\nimport type { RawSourceMap } from \"source-map\";\nimport { errors } from \"./lib/errors.js\";\nimport { escapeRegExp } from \"./lib/escape-regexp.js\";\nimport { getFileManifestEntries } from \"./lib/get-file-manifest-entries.js\";\nimport { getSourceMapURL } from \"./lib/get-source-map-url.js\";\nimport { rebasePath } from \"./lib/rebase-path.js\";\nimport { replaceAndUpdateSourceMap } from \"./lib/replace-and-update-source-map.js\";\nimport { translateURLToSourcemapPaths } from \"./lib/translate-url-to-sourcemap-paths.js\";\nimport { validateInjectManifestOptions } from \"./lib/validate-options.js\";\nimport type { BuildResult, InjectManifestOptions } from \"./types.js\";\n\n/**\n * This method creates a list of URLs to precache, referred to as a \"precache\n * manifest\", based on the options you provide.\n *\n * The manifest is injected into the `swSrc` file, and the placeholder string\n * `injectionPoint` determines where in the file the manifest should go.\n *\n * The final service worker file, with the manifest injected, is written to\n * disk at `swDest`.\n *\n * This method will not compile or bundle your `swSrc` file; it just handles\n * injecting the manifest.\n *\n * ```\n * // The following lists some common options; see the rest of the documentation\n * // for the full set of options and defaults.\n * const {count, size, warnings} = await injectManifest({\n * dontCacheBustURLsMatching: [new RegExp('...')],\n * globDirectory: '...',\n * globPatterns: ['...', '...'],\n * maximumFileSizeToCacheInBytes: ...,\n * swDest: '...',\n * swSrc: '...',\n * });\n * ```\n */\nexport const injectManifest = async (config: InjectManifestOptions): Promise<BuildResult> => {\n const options = await validateInjectManifestOptions(config);\n\n // Make sure we leave swSrc and swDest out of the precache manifest.\n for (const file of [options.swSrc, options.swDest]) {\n options.globIgnores!.push(\n rebasePath({\n file,\n baseDirectory: options.globDirectory,\n }),\n );\n }\n\n const globalRegexp = new RegExp(escapeRegExp(options.injectionPoint!), \"g\");\n\n const { count, size, manifestEntries, warnings } = await getFileManifestEntries(options);\n let swFileContents: string;\n try {\n swFileContents = await fsp.readFile(options.swSrc, \"utf8\");\n } catch (error) {\n throw new Error(`${errors[\"invalid-sw-src\"]} ${error instanceof Error && error.message ? error.message : \"\"}`);\n }\n\n const injectionResults = swFileContents.match(globalRegexp);\n // See https://github.com/GoogleChrome/workbox/issues/2230\n const injectionPoint = options.injectionPoint ? options.injectionPoint : \"\";\n if (!injectionResults) {\n if (path.resolve(options.swSrc) === path.resolve(options.swDest)) {\n throw new Error(`${errors[\"same-src-and-dest\"]} ${injectionPoint}`);\n }\n throw new Error(`${errors[\"injection-point-not-found\"]} ${injectionPoint}`);\n }\n\n assert(injectionResults.length === 1, `${errors[\"multiple-injection-points\"]} ${injectionPoint}`);\n\n const manifestString = manifestEntries === undefined ? \"undefined\" : JSON.stringify(manifestEntries);\n\n const filesToWrite: { [key: string]: string } = {};\n\n const url = getSourceMapURL(swFileContents);\n // See https://github.com/GoogleChrome/workbox/issues/2957\n const { destPath, srcPath, warning } = translateURLToSourcemapPaths(url, options.swSrc, options.swDest);\n if (warning) {\n warnings.push(warning);\n }\n\n // If our swSrc file contains a sourcemap, we would invalidate that\n // mapping if we just replaced injectionPoint with the stringified manifest.\n // Instead, we need to update the swDest contents as well as the sourcemap\n // (assuming it's a real file, not a data: URL) at the same time.\n // See https://github.com/GoogleChrome/workbox/issues/2235\n // and https://github.com/GoogleChrome/workbox/issues/2648\n if (srcPath && destPath) {\n const originalMap = JSON.parse(await fsp.readFile(srcPath, \"utf-8\")) as RawSourceMap;\n\n const { map, source } = await replaceAndUpdateSourceMap({\n originalMap,\n jsFilename: toUnix(path.basename(options.swDest)),\n originalSource: swFileContents,\n replaceString: manifestString,\n searchString: options.injectionPoint!,\n });\n\n filesToWrite[options.swDest] = source;\n filesToWrite[destPath] = map;\n } else {\n // If there's no sourcemap associated with swSrc, a simple string\n // replacement will suffice.\n filesToWrite[options.swDest] = swFileContents.replace(globalRegexp, manifestString);\n }\n\n for (const [file, contents] of Object.entries(filesToWrite)) {\n try {\n await fsp.mkdir(path.dirname(file), { recursive: true });\n } catch (error: unknown) {\n throw new Error(`${errors[\"unable-to-make-sw-directory\"]} '${error instanceof Error && error.message ? error.message : \"\"}'`);\n }\n\n await fsp.writeFile(file, contents);\n }\n\n return {\n count,\n size,\n warnings,\n // Use path.resolve() to make all the paths absolute.\n filePaths: Object.keys(filesToWrite).map((f) => toUnix(path.resolve(f))),\n };\n};\n","/*\n Copyright 2018 Google LLC\n\n Use of this source code is governed by an MIT-style\n license that can be found in the LICENSE file or at\n https://opensource.org/licenses/MIT.\n*/\nimport { getManifest } from \"./get-manifest.js\";\nimport { injectManifest } from \"./inject-manifest.js\";\nimport { DEFAULT_GLOB_PATTERNS } from \"./lib/constants.js\";\nimport { errors } from \"./lib/errors.js\";\nimport { escapeRegExp } from \"./lib/escape-regexp.js\";\nimport { getFileManifestEntries } from \"./lib/get-file-manifest-entries.js\";\nimport { getSourceMapURL } from \"./lib/get-source-map-url.js\";\nimport { rebasePath } from \"./lib/rebase-path.js\";\nimport { replaceAndUpdateSourceMap } from \"./lib/replace-and-update-source-map.js\";\nimport { transformManifest } from \"./lib/transform-manifest.js\";\nimport { translateURLToSourcemapPaths } from \"./lib/translate-url-to-sourcemap-paths.js\";\nimport { validateGetManifestOptions, validateInjectManifestOptions } from \"./lib/validate-options.js\";\n\n// TODO: remove in v10.\n/**\n * Use `JSON.stringify` instead.\n *\n * @deprecated\n */\nconst stringify = JSON.stringify;\n\nexport {\n errors,\n DEFAULT_GLOB_PATTERNS,\n escapeRegExp,\n getFileManifestEntries,\n getManifest,\n getSourceMapURL,\n injectManifest,\n rebasePath,\n replaceAndUpdateSourceMap,\n stringify,\n transformManifest,\n translateURLToSourcemapPaths,\n validateGetManifestOptions,\n validateInjectManifestOptions,\n};\n\nexport type * from \"./types.js\";\n"],"mappings":";;;;;;;;;;;;;;AAUA,MAAa,SAAS;CACpB,yBAAyB;CACzB,gBAAgB,OAAE;;CAElB,8BAA8B,OAAE;;CAEhC,oCAAoC;CACpC,mBAAmB;CACnB,yBAAyB;CACzB,6BAA6B,OAAE;;CAE/B,2BAA2B,OAAE;;CAE7B,2BAA2B,OAAE;;CAE7B,wBAAwB;CACxB,qCAAqC,OAAE;;CAEvC,kCAAkC;CAClC,mCAAmC,OAAE;;CAErC,+BAA+B;CAC/B,+BAA+B,OAAE;;CAEjC,oBAAoB;CACpB,8BAA8B,OAAE;;CAEhC,oCAAoC,OAAE;;CAEtC,0BAA0B,OAAE;;CAE5B,2BAA2B,OAAE;;CAE7B,yBAAyB;CACzB,sCAAsC,OAAE;;CAExC,y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I;AACF,SAAM,IAAI,MAAM,KAAK,QAAQ,KAAK,EAAE,EAAE,WAAW,MAAM,CAAC;WACjD,OAAgB;AACvB,SAAM,IAAI,MAAM,GAAG,OAAO,+BAA+B,IAAI,iBAAiB,SAAS,MAAM,UAAU,MAAM,UAAU,GAAG,GAAG;;AAG/H,QAAM,IAAI,UAAU,MAAM,SAAS;;AAGrC,QAAO;EACL;EACA;EACA;EAEA,WAAW,OAAO,KAAK,aAAa,CAAC,KAAK,MAAM,OAAO,KAAK,QAAQ,EAAE,CAAC,CAAC;EACzE;;;;;;;;;AC7GH,MAAM,YAAY,KAAK"}
@@ -0,0 +1,278 @@
1
+ import { n as manifestTransformResult, r as manifestEntry, t as manifestTransform } from "./chunks/manifest-transform-BCUeQ0-V.js";
2
+ import { z } from "zod";
3
+
4
+ //#region src/schema/assert-type.d.ts
5
+ type Equals<T, S> = [T] extends [S] ? ([S] extends [T] ? true : false) : false;
6
+ type Assignable<T, U> = [U] extends [T] ? true : false;
7
+ declare function assertType<_T extends true>(): void;
8
+ //#endregion
9
+ //#region src/schema/base.d.ts
10
+ declare const basePartial: z.ZodObject<{
11
+ additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
12
+ integrity: z.ZodOptional<z.ZodString>;
13
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ url: z.ZodString;
15
+ }, z.core.$strict>]>>>;
16
+ disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
17
+ dontCacheBustURLsMatching: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
18
+ manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
19
+ size: z.ZodNumber;
20
+ integrity: z.ZodOptional<z.ZodString>;
21
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
22
+ url: z.ZodString;
23
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
24
+ manifest: z.ZodArray<z.ZodObject<{
25
+ size: z.ZodNumber;
26
+ integrity: z.ZodOptional<z.ZodString>;
27
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ url: z.ZodString;
29
+ }, z.core.$strip>>;
30
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
32
+ size: z.ZodNumber;
33
+ integrity: z.ZodOptional<z.ZodString>;
34
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
35
+ url: z.ZodString;
36
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
37
+ manifest: z.ZodArray<z.ZodObject<{
38
+ size: z.ZodNumber;
39
+ integrity: z.ZodOptional<z.ZodString>;
40
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
41
+ url: z.ZodString;
42
+ }, z.core.$strip>>;
43
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
44
+ }, z.core.$strict>>>, z.ZodTransform<z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
45
+ size: z.ZodNumber;
46
+ integrity: z.ZodOptional<z.ZodString>;
47
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
+ url: z.ZodString;
49
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
50
+ manifest: z.ZodArray<z.ZodObject<{
51
+ size: z.ZodNumber;
52
+ integrity: z.ZodOptional<z.ZodString>;
53
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ url: z.ZodString;
55
+ }, z.core.$strip>>;
56
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
57
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
58
+ size: z.ZodNumber;
59
+ integrity: z.ZodOptional<z.ZodString>;
60
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ url: z.ZodString;
62
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
63
+ manifest: z.ZodArray<z.ZodObject<{
64
+ size: z.ZodNumber;
65
+ integrity: z.ZodOptional<z.ZodString>;
66
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
+ url: z.ZodString;
68
+ }, z.core.$strip>>;
69
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
+ }, z.core.$strict>>>>>>;
71
+ maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
72
+ modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
73
+ }, z.core.$strict>;
74
+ //#endregion
75
+ //#region src/schema/error.d.ts
76
+ declare class SerwistConfigError extends Error {
77
+ constructor({
78
+ moduleName,
79
+ message
80
+ }: {
81
+ moduleName?: string;
82
+ message?: string;
83
+ });
84
+ }
85
+ declare const validationErrorMap: z.core.$ZodErrorMap;
86
+ //#endregion
87
+ //#region src/schema/get-manifest.d.ts
88
+ declare const getManifestOptions: z.ZodObject<{
89
+ globDirectory: z.ZodString;
90
+ globFollow: z.ZodDefault<z.ZodBoolean>;
91
+ globIgnores: z.ZodDefault<z.ZodArray<z.ZodString>>;
92
+ globPatterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
93
+ globStrict: z.ZodDefault<z.ZodBoolean>;
94
+ templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
95
+ additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
96
+ integrity: z.ZodOptional<z.ZodString>;
97
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ url: z.ZodString;
99
+ }, z.core.$strict>]>>>;
100
+ disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
101
+ dontCacheBustURLsMatching: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
102
+ manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
103
+ size: z.ZodNumber;
104
+ integrity: z.ZodOptional<z.ZodString>;
105
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
106
+ url: z.ZodString;
107
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
108
+ manifest: z.ZodArray<z.ZodObject<{
109
+ size: z.ZodNumber;
110
+ integrity: z.ZodOptional<z.ZodString>;
111
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
+ url: z.ZodString;
113
+ }, z.core.$strip>>;
114
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
115
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
116
+ size: z.ZodNumber;
117
+ integrity: z.ZodOptional<z.ZodString>;
118
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
+ url: z.ZodString;
120
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
121
+ manifest: z.ZodArray<z.ZodObject<{
122
+ size: z.ZodNumber;
123
+ integrity: z.ZodOptional<z.ZodString>;
124
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
+ url: z.ZodString;
126
+ }, z.core.$strip>>;
127
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
128
+ }, z.core.$strict>>>, z.ZodTransform<z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
129
+ size: z.ZodNumber;
130
+ integrity: z.ZodOptional<z.ZodString>;
131
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
+ url: z.ZodString;
133
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
134
+ manifest: z.ZodArray<z.ZodObject<{
135
+ size: z.ZodNumber;
136
+ integrity: z.ZodOptional<z.ZodString>;
137
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
138
+ url: z.ZodString;
139
+ }, z.core.$strip>>;
140
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
141
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
142
+ size: z.ZodNumber;
143
+ integrity: z.ZodOptional<z.ZodString>;
144
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
145
+ url: z.ZodString;
146
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
147
+ manifest: z.ZodArray<z.ZodObject<{
148
+ size: z.ZodNumber;
149
+ integrity: z.ZodOptional<z.ZodString>;
150
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
151
+ url: z.ZodString;
152
+ }, z.core.$strip>>;
153
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
154
+ }, z.core.$strict>>>>>>;
155
+ maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
156
+ modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
157
+ }, z.core.$strict>;
158
+ //#endregion
159
+ //#region src/schema/glob.d.ts
160
+ declare const globPartial: z.ZodObject<{
161
+ globFollow: z.ZodDefault<z.ZodBoolean>;
162
+ globIgnores: z.ZodDefault<z.ZodArray<z.ZodString>>;
163
+ globPatterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
164
+ globStrict: z.ZodDefault<z.ZodBoolean>;
165
+ templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
166
+ }, z.core.$strict>;
167
+ declare const optionalGlobDirectoryPartial: z.ZodObject<{
168
+ globDirectory: z.ZodOptional<z.ZodString>;
169
+ }, z.core.$strict>;
170
+ declare const requiredGlobDirectoryPartial: z.ZodObject<{
171
+ globDirectory: z.ZodString;
172
+ }, z.core.$strict>;
173
+ //#endregion
174
+ //#region src/schema/inject-manifest.d.ts
175
+ declare const baseInjectPartial: z.ZodObject<{
176
+ injectionPoint: z.ZodDefault<z.ZodString>;
177
+ swSrc: z.ZodString;
178
+ }, z.core.$strict>;
179
+ declare const injectManifestOptions: z.ZodObject<{
180
+ globDirectory: z.ZodString;
181
+ swDest: z.ZodString;
182
+ injectionPoint: z.ZodDefault<z.ZodString>;
183
+ swSrc: z.ZodString;
184
+ globFollow: z.ZodDefault<z.ZodBoolean>;
185
+ globIgnores: z.ZodDefault<z.ZodArray<z.ZodString>>;
186
+ globPatterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
187
+ globStrict: z.ZodDefault<z.ZodBoolean>;
188
+ templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
189
+ additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
190
+ integrity: z.ZodOptional<z.ZodString>;
191
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
192
+ url: z.ZodString;
193
+ }, z.core.$strict>]>>>;
194
+ disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
195
+ dontCacheBustURLsMatching: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
196
+ manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
197
+ size: z.ZodNumber;
198
+ integrity: z.ZodOptional<z.ZodString>;
199
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
200
+ url: z.ZodString;
201
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
202
+ manifest: z.ZodArray<z.ZodObject<{
203
+ size: z.ZodNumber;
204
+ integrity: z.ZodOptional<z.ZodString>;
205
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
206
+ url: z.ZodString;
207
+ }, z.core.$strip>>;
208
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
209
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
210
+ size: z.ZodNumber;
211
+ integrity: z.ZodOptional<z.ZodString>;
212
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
213
+ url: z.ZodString;
214
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
215
+ manifest: z.ZodArray<z.ZodObject<{
216
+ size: z.ZodNumber;
217
+ integrity: z.ZodOptional<z.ZodString>;
218
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
219
+ url: z.ZodString;
220
+ }, z.core.$strip>>;
221
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
222
+ }, z.core.$strict>>>, z.ZodTransform<z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
223
+ size: z.ZodNumber;
224
+ integrity: z.ZodOptional<z.ZodString>;
225
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
226
+ url: z.ZodString;
227
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
228
+ manifest: z.ZodArray<z.ZodObject<{
229
+ size: z.ZodNumber;
230
+ integrity: z.ZodOptional<z.ZodString>;
231
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
+ url: z.ZodString;
233
+ }, z.core.$strip>>;
234
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
235
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
236
+ size: z.ZodNumber;
237
+ integrity: z.ZodOptional<z.ZodString>;
238
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
239
+ url: z.ZodString;
240
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
241
+ manifest: z.ZodArray<z.ZodObject<{
242
+ size: z.ZodNumber;
243
+ integrity: z.ZodOptional<z.ZodString>;
244
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
+ url: z.ZodString;
246
+ }, z.core.$strip>>;
247
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
248
+ }, z.core.$strict>>>>>>;
249
+ maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
250
+ modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
251
+ }, z.core.$strict>;
252
+ //#endregion
253
+ //#region src/schema/sw-dest.d.ts
254
+ declare const optionalSwDestPartial: z.ZodObject<{
255
+ swDest: z.ZodOptional<z.ZodString>;
256
+ }, z.core.$strict>;
257
+ declare const requiredSwDestPartial: z.ZodObject<{
258
+ swDest: z.ZodString;
259
+ }, z.core.$strict>;
260
+ //#endregion
261
+ //#region src/schema/utils.d.ts
262
+ declare const fn: <TInput extends [z.ZodType, ...z.ZodType[]], TOutput extends z.ZodType>({
263
+ input,
264
+ output
265
+ }: {
266
+ input: TInput;
267
+ output: TOutput;
268
+ }) => z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<TInput, null>, TOutput>, z.core.$InferInnerFunctionType<z.ZodTuple<TInput, null>, TOutput>>, z.ZodTransform<(...args: TInput extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [...Prefix extends readonly [...infer Prefix extends z.core.SomeType[], infer Tail extends z.core.SomeType] ? Tail["_zod"]["optin"] extends "optional" ? [... /*elided*/any, (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]> } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]> } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]> } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]> } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]> } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]> } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]> } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]> } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]> } : [], (z.core.input<Tail> | undefined)?] : { [k in keyof Prefix]: z.core.input<Prefix[k]> } : [], (z.core.input<Tail> | undefined)?] : { [k_1 in keyof TInput]: z.core.input<TInput[k_1]> } : []) => z.core.input<TOutput> extends z.core.output<TOutput> ? z.core.output<TOutput> & z.core.input<TOutput> : z.core.output<TOutput>, z.core.$InferInnerFunctionType<z.ZodTuple<TInput, null>, TOutput>>>;
269
+ declare const asyncFn: <TInput extends [z.ZodType, ...z.ZodType[]], TOutput extends z.ZodType>({
270
+ input,
271
+ output
272
+ }: {
273
+ input: TInput;
274
+ output: TOutput;
275
+ }) => z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput>>, z.ZodTransform<Awaited<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput> extends infer T ? T extends z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput> ? T extends z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput> ? T : z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput> : never : never>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput>>>;
276
+ //#endregion
277
+ export { type Assignable, type Equals, SerwistConfigError, assertType, asyncFn, basePartial, fn, getManifestOptions, globPartial, injectManifestOptions, baseInjectPartial as injectPartial, manifestEntry, manifestTransform, manifestTransformResult, optionalGlobDirectoryPartial, optionalSwDestPartial, requiredGlobDirectoryPartial, requiredSwDestPartial, validationErrorMap };
278
+ //# sourceMappingURL=index.schema.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.schema.d.mts","names":[],"sources":["../src/schema/assert-type.ts","../src/schema/base.ts","../src/schema/error.ts","../src/schema/get-manifest.ts","../src/schema/glob.ts","../src/schema/inject-manifest.ts","../src/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CAAA,CAAA,QAAA,CAAA,MAAA,SAAA,OAAA,oBAAA,CAAA,CAAA,IAAA,CAAA,4BAAA,CAAA,CAAA,CAAA,QAAA,CAAA,MAAA,SAAA,OAAA"}
@@ -0,0 +1,5 @@
1
+ import { n as validationErrorMap, t as SerwistConfigError } from "./chunks/error-Cl4d1Wf-.js";
2
+ import { a as manifestTransform, c as fn, i as basePartial, l as manifestEntry, n as optionalGlobDirectoryPartial, o as manifestTransformResult, r as requiredGlobDirectoryPartial, s as asyncFn, t as globPartial, u as assertType } from "./chunks/glob-B4_meZ_o.js";
3
+ import { t as getManifestOptions } from "./chunks/get-manifest-De0D0LAJ.js";
4
+ import { a as requiredSwDestPartial, i as optionalSwDestPartial, n as injectManifestOptions, t as baseInjectPartial } from "./chunks/inject-manifest-DNqDY-04.js";
5
+ export { SerwistConfigError, assertType, asyncFn, basePartial, fn, getManifestOptions, globPartial, injectManifestOptions, baseInjectPartial as injectPartial, manifestEntry, manifestTransform, manifestTransformResult, optionalGlobDirectoryPartial, optionalSwDestPartial, requiredGlobDirectoryPartial, requiredSwDestPartial, validationErrorMap };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serwist/build",
3
- "version": "9.5.6",
3
+ "version": "9.5.8",
4
4
  "type": "module",
5
5
  "description": "A module that integrates into your build process, helping you generate a manifest of local files that should be precached.",
6
6
  "files": [
@@ -27,23 +27,23 @@
27
27
  "repository": "https://github.com/serwist/serwist",
28
28
  "bugs": "https://github.com/serwist/serwist/issues",
29
29
  "homepage": "https://serwist.pages.dev",
30
- "main": "./dist/index.js",
31
- "types": "./dist/index.d.ts",
30
+ "main": "./dist/index.mjs",
31
+ "types": "./dist/index.d.mts",
32
32
  "typesVersions": {
33
33
  "*": {
34
34
  "schema": [
35
- "./dist/index.schema.d.ts"
35
+ "./dist/index.schema.d.mts"
36
36
  ]
37
37
  }
38
38
  },
39
39
  "exports": {
40
40
  ".": {
41
- "types": "./dist/index.d.ts",
42
- "default": "./dist/index.js"
41
+ "types": "./dist/index.d.mts",
42
+ "default": "./dist/index.mjs"
43
43
  },
44
44
  "./schema": {
45
- "types": "./dist/index.schema.d.ts",
46
- "default": "./dist/index.schema.js"
45
+ "types": "./dist/index.schema.d.mts",
46
+ "default": "./dist/index.schema.mjs"
47
47
  },
48
48
  "./package.json": "./package.json"
49
49
  },
@@ -52,16 +52,15 @@
52
52
  "glob": "10.5.0",
53
53
  "pretty-bytes": "6.1.1",
54
54
  "source-map": "0.8.0-beta.0",
55
+ "type-fest": "5.6.0",
55
56
  "zod": "4.3.6",
56
- "@serwist/utils": "9.5.6"
57
+ "@serwist/utils": "9.5.8"
57
58
  },
58
59
  "devDependencies": {
59
60
  "@types/common-tags": "1.8.4",
60
- "@types/node": "25.1.0",
61
- "rollup": "4.57.0",
62
- "type-fest": "5.4.2",
63
- "typescript": "5.9.3",
64
- "@serwist/configs": "9.5.6"
61
+ "@types/node": "25.6.0",
62
+ "tsdown": "0.21.10",
63
+ "typescript": "6.0.3"
65
64
  },
66
65
  "peerDependencies": {
67
66
  "typescript": ">=5.0.0"
@@ -72,8 +71,8 @@
72
71
  }
73
72
  },
74
73
  "scripts": {
75
- "build": "rimraf dist && NODE_OPTIONS='--max-old-space-size=4096' NODE_ENV=production rollup --config rollup.config.js",
76
- "dev": "rollup --config rollup.config.js --watch",
74
+ "build": "rimraf dist && NODE_OPTIONS='--max-old-space-size=4096' NODE_ENV=production tsdown",
75
+ "dev": "tsdown --watch",
77
76
  "lint": "biome lint ./src",
78
77
  "typecheck": "tsc"
79
78
  }
@@ -107,7 +107,6 @@ export async function replaceAndUpdateSourceMap({
107
107
 
108
108
  consumer.destroy();
109
109
  // JSON.parse returns any.
110
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
111
110
  const updatedSourceMap: RawSourceMap = Object.assign(JSON.parse(generator.toString()), {
112
111
  names: originalMap.names,
113
112
  sourceRoot: originalMap.sourceRoot,
@@ -1,59 +0,0 @@
1
- class SerwistConfigError extends Error {
2
- constructor({ moduleName, message }){
3
- super(`Invalid ${moduleName ?? "Serwist"} configuration:\n${message}`);
4
- Object.setPrototypeOf(this, new.target.prototype);
5
- }
6
- }
7
- const parsedType = (data)=>{
8
- const t = typeof data;
9
- switch(t){
10
- case "number":
11
- {
12
- return Number.isNaN(data) ? "NaN" : "number";
13
- }
14
- case "object":
15
- {
16
- if (Array.isArray(data)) {
17
- return "array";
18
- }
19
- if (data === null) {
20
- return "null";
21
- }
22
- if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
23
- return data.constructor.name;
24
- }
25
- }
26
- }
27
- return t;
28
- };
29
- const validationErrorMap = (error)=>{
30
- switch(error.code){
31
- case "invalid_type":
32
- {
33
- return `${error.message ?? "Received invalid type"}: expected ${error.expected}, received ${parsedType(error.input)}.`;
34
- }
35
- case "invalid_value":
36
- {
37
- return `${error.message ?? "Received invalid value"}: expected ${error.expected}, received ${parsedType(error.input)}.`;
38
- }
39
- case "invalid_union":
40
- {
41
- return `${error.message ?? "Received invalid union"}:\n${error.errors.flatMap((err)=>err.map((e)=>` → ${e.message}`)).join("\n")}`;
42
- }
43
- case "unrecognized_keys":
44
- {
45
- return `${error.message ?? "Received unrecognized keys"}: ${error.keys.join(".")}`;
46
- }
47
- case "custom":
48
- {
49
- return error.message ?? undefined;
50
- }
51
- }
52
- return undefined;
53
- };
54
-
55
- const DEFAULT_GLOB_PATTERNS = [
56
- "**/*.{js,css,html}"
57
- ];
58
-
59
- export { DEFAULT_GLOB_PATTERNS as D, SerwistConfigError as S, validationErrorMap as v };
@@ -1,11 +0,0 @@
1
- import { z } from 'zod';
2
- import { r as requiredGlobDirectoryPartial, g as globPartial, b as basePartial } from './glob.js';
3
- import './constants.js';
4
-
5
- const getManifestOptions = z.strictObject({
6
- ...basePartial.shape,
7
- ...globPartial.shape,
8
- ...requiredGlobDirectoryPartial.shape
9
- });
10
-
11
- export { getManifestOptions };