@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,6 @@
1
+ //#region src/lib/constants.ts
2
+ const DEFAULT_GLOB_PATTERNS = ["**/*.{js,css,html}"];
3
+ //#endregion
4
+ export { DEFAULT_GLOB_PATTERNS as t };
5
+
6
+ //# sourceMappingURL=constants-BLOVm9H2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants-BLOVm9H2.js","names":[],"sources":["../../src/lib/constants.ts"],"sourcesContent":["export const DEFAULT_GLOB_PATTERNS = [\"**/*.{js,css,html}\"];\n"],"mappings":";AAAA,MAAa,wBAAwB,CAAC,qBAAqB"}
@@ -0,0 +1,31 @@
1
+ //#region src/schema/error.ts
2
+ var SerwistConfigError = class extends Error {
3
+ constructor({ moduleName, message }) {
4
+ super(`Invalid ${moduleName ?? "Serwist"} configuration:\n${message}`);
5
+ Object.setPrototypeOf(this, new.target.prototype);
6
+ }
7
+ };
8
+ const parsedType = (data) => {
9
+ const t = typeof data;
10
+ switch (t) {
11
+ case "number": return Number.isNaN(data) ? "NaN" : "number";
12
+ case "object":
13
+ if (Array.isArray(data)) return "array";
14
+ if (data === null) return "null";
15
+ if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) return data.constructor.name;
16
+ }
17
+ return t;
18
+ };
19
+ const validationErrorMap = (error) => {
20
+ switch (error.code) {
21
+ case "invalid_type": return `${error.message ?? "Received invalid type"}: expected ${error.expected}, received ${parsedType(error.input)}.`;
22
+ case "invalid_value": return `${error.message ?? "Received invalid value"}: expected ${error.expected}, received ${parsedType(error.input)}.`;
23
+ case "invalid_union": return `${error.message ?? "Received invalid union"}:\n${error.errors.flatMap((err) => err.map((e) => ` → ${e.message}`)).join("\n")}`;
24
+ case "unrecognized_keys": return `${error.message ?? "Received unrecognized keys"}: ${error.keys.join(".")}`;
25
+ case "custom": return error.message ?? void 0;
26
+ }
27
+ };
28
+ //#endregion
29
+ export { validationErrorMap as n, SerwistConfigError as t };
30
+
31
+ //# sourceMappingURL=error-Cl4d1Wf-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-Cl4d1Wf-.js","names":[],"sources":["../../src/schema/error.ts"],"sourcesContent":["import type { z } from \"zod\";\n\nexport class SerwistConfigError extends Error {\n constructor({ moduleName, message }: { moduleName?: string; message?: string }) {\n super(`Invalid ${moduleName ?? \"Serwist\"} configuration:\\n${message}`);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\nconst parsedType = (data: any): string => {\n const t = typeof data;\n\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"NaN\" : \"number\";\n }\n case \"object\": {\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n\n if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {\n return data.constructor.name;\n }\n }\n }\n return t;\n};\n\nexport const validationErrorMap: z.core.$ZodErrorMap = (error) => {\n /* This is where you override the various error codes */\n switch (error.code) {\n case \"invalid_type\": {\n return `${error.message ?? \"Received invalid type\"}: expected ${error.expected}, received ${parsedType(error.input)}.`;\n }\n case \"invalid_value\": {\n return `${error.message ?? \"Received invalid value\"}: expected ${error.expected}, received ${parsedType(error.input)}.`;\n }\n case \"invalid_union\": {\n return `${error.message ?? \"Received invalid union\"}:\\n${error.errors.flatMap((err) => err.map((e) => ` → ${e.message}`)).join(\"\\n\")}`;\n }\n case \"unrecognized_keys\": {\n return `${error.message ?? \"Received unrecognized keys\"}: ${error.keys.join(\".\")}`;\n }\n case \"custom\": {\n return error.message ?? undefined;\n }\n }\n return undefined;\n};\n"],"mappings":";AAEA,IAAa,qBAAb,cAAwC,MAAM;CAC5C,YAAY,EAAE,YAAY,WAAsD;AAC9E,QAAM,WAAW,cAAc,UAAU,mBAAmB,UAAU;AACtE,SAAO,eAAe,MAAM,IAAI,OAAO,UAAU;;;AAIrD,MAAM,cAAc,SAAsB;CACxC,MAAM,IAAI,OAAO;AAEjB,SAAQ,GAAR;EACE,KAAK,SACH,QAAO,OAAO,MAAM,KAAK,GAAG,QAAQ;EAEtC,KAAK;AACH,OAAI,MAAM,QAAQ,KAAK,CACrB,QAAO;AAET,OAAI,SAAS,KACX,QAAO;AAGT,OAAI,OAAO,eAAe,KAAK,KAAK,OAAO,aAAa,KAAK,YAC3D,QAAO,KAAK,YAAY;;AAI9B,QAAO;;AAGT,MAAa,sBAA2C,UAAU;AAEhE,SAAQ,MAAM,MAAd;EACE,KAAK,eACH,QAAO,GAAG,MAAM,WAAW,wBAAwB,aAAa,MAAM,SAAS,aAAa,WAAW,MAAM,MAAM,CAAC;EAEtH,KAAK,gBACH,QAAO,GAAG,MAAM,WAAW,yBAAyB,aAAa,MAAM,SAAS,aAAa,WAAW,MAAM,MAAM,CAAC;EAEvH,KAAK,gBACH,QAAO,GAAG,MAAM,WAAW,yBAAyB,KAAK,MAAM,OAAO,SAAS,QAAQ,IAAI,KAAK,MAAM,OAAO,EAAE,UAAU,CAAC,CAAC,KAAK,KAAK;EAEvI,KAAK,oBACH,QAAO,GAAG,MAAM,WAAW,6BAA6B,IAAI,MAAM,KAAK,KAAK,IAAI;EAElF,KAAK,SACH,QAAO,MAAM,WAAW,KAAA"}
@@ -0,0 +1,14 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-CzwdidQP.js";
2
+ import { i as basePartial, r as requiredGlobDirectoryPartial, t as globPartial } from "./glob-B4_meZ_o.js";
3
+ import { z } from "zod";
4
+ //#region src/schema/get-manifest.ts
5
+ var get_manifest_exports = /* @__PURE__ */ __exportAll({ getManifestOptions: () => getManifestOptions });
6
+ const getManifestOptions = z.strictObject({
7
+ ...basePartial.shape,
8
+ ...globPartial.shape,
9
+ ...requiredGlobDirectoryPartial.shape
10
+ });
11
+ //#endregion
12
+ export { get_manifest_exports as n, getManifestOptions as t };
13
+
14
+ //# sourceMappingURL=get-manifest-De0D0LAJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-manifest-De0D0LAJ.js","names":[],"sources":["../../src/schema/get-manifest.ts"],"sourcesContent":["import { z } from \"zod\";\nimport type { GetManifestOptions, GetManifestOptionsComplete } from \"../types.js\";\nimport { assertType, type Equals } from \"./assert-type.js\";\nimport { basePartial } from \"./base.js\";\nimport { globPartial, requiredGlobDirectoryPartial } from \"./glob.js\";\n\nexport const getManifestOptions = z.strictObject({\n ...basePartial.shape,\n ...globPartial.shape,\n ...requiredGlobDirectoryPartial.shape,\n});\n\nassertType<Equals<GetManifestOptions, z.input<typeof getManifestOptions>>>();\nassertType<Equals<GetManifestOptionsComplete, z.output<typeof getManifestOptions>>>();\n"],"mappings":";;;;;AAMA,MAAa,qBAAqB,EAAE,aAAa;CAC/C,GAAG,YAAY;CACf,GAAG,YAAY;CACf,GAAG,6BAA6B;CACjC,CAAC"}
@@ -0,0 +1,67 @@
1
+ import { t as DEFAULT_GLOB_PATTERNS } from "./constants-BLOVm9H2.js";
2
+ import { z } from "zod";
3
+ //#region src/schema/assert-type.ts
4
+ function assertType() {}
5
+ //#endregion
6
+ //#region src/schema/manifest-entry.ts
7
+ const manifestEntry = z.strictObject({
8
+ integrity: z.string().optional(),
9
+ revision: z.string().nullable().optional(),
10
+ url: z.string()
11
+ });
12
+ //#endregion
13
+ //#region src/schema/utils.ts
14
+ const fn = ({ input, output }) => {
15
+ const schema = z.function({
16
+ input: z.tuple(input),
17
+ output
18
+ });
19
+ return z.custom((arg) => typeof arg === "function").transform((arg) => schema.implement(arg));
20
+ };
21
+ const asyncFn = ({ input, output }) => {
22
+ const schema = z.function({
23
+ input: z.tuple(input),
24
+ output
25
+ });
26
+ return z.custom((arg) => typeof arg === "function").transform((arg) => schema.implementAsync(arg));
27
+ };
28
+ //#endregion
29
+ //#region src/schema/manifest-transform.ts
30
+ const sizeObject = z.object({ size: z.number() });
31
+ const manifestEntryWithSize = z.object({
32
+ ...manifestEntry.shape,
33
+ ...sizeObject.shape
34
+ });
35
+ const manifestTransformResult = z.strictObject({
36
+ manifest: z.array(manifestEntryWithSize),
37
+ warnings: z.array(z.string()).optional()
38
+ });
39
+ const manifestTransform = asyncFn({
40
+ input: [z.array(manifestEntryWithSize), z.unknown().optional()],
41
+ output: manifestTransformResult
42
+ });
43
+ //#endregion
44
+ //#region src/schema/base.ts
45
+ const basePartial = z.strictObject({
46
+ additionalPrecacheEntries: z.array(z.union([z.string(), manifestEntry])).optional(),
47
+ disablePrecacheManifest: z.boolean().default(false),
48
+ dontCacheBustURLsMatching: z.instanceof(RegExp).optional(),
49
+ manifestTransforms: z.array(manifestTransform).optional(),
50
+ maximumFileSizeToCacheInBytes: z.number().default(2097152),
51
+ modifyURLPrefix: z.record(z.string(), z.string()).optional()
52
+ });
53
+ //#endregion
54
+ //#region src/schema/glob.ts
55
+ const globPartial = z.strictObject({
56
+ globFollow: z.boolean().default(true),
57
+ globIgnores: z.array(z.string()).default(["**/node_modules/**/*"]),
58
+ globPatterns: z.array(z.string()).default(DEFAULT_GLOB_PATTERNS),
59
+ globStrict: z.boolean().default(true),
60
+ templatedURLs: z.record(z.string(), z.union([z.string(), z.array(z.string())])).optional()
61
+ });
62
+ const optionalGlobDirectoryPartial = z.strictObject({ globDirectory: z.string().optional() });
63
+ const requiredGlobDirectoryPartial = z.strictObject({ globDirectory: z.string() });
64
+ //#endregion
65
+ export { manifestTransform as a, fn as c, basePartial as i, manifestEntry as l, optionalGlobDirectoryPartial as n, manifestTransformResult as o, requiredGlobDirectoryPartial as r, asyncFn as s, globPartial as t, assertType as u };
66
+
67
+ //# sourceMappingURL=glob-B4_meZ_o.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glob-B4_meZ_o.js","names":[],"sources":["../../src/schema/assert-type.ts","../../src/schema/manifest-entry.ts","../../src/schema/utils.ts","../../src/schema/manifest-transform.ts","../../src/schema/base.ts","../../src/schema/glob.ts"],"sourcesContent":["export type Equals<T, S> = [T] extends [S] ? ([S] extends [T] ? true : false) : false;\n\nexport type Assignable<T, U> = [U] extends [T] ? true : false;\n\nexport function assertType<_T extends true>() {\n // Do nothing\n}\n","import { z } from \"zod\";\n\nexport const manifestEntry = z.strictObject({\n integrity: z.string().optional(),\n revision: z.string().nullable().optional(),\n url: z.string(),\n});\n","import { z } from \"zod\";\n\nexport const fn = <TInput extends [z.ZodType, ...z.ZodType[]], TOutput extends z.ZodType>({ input, output }: { input: TInput; output: TOutput }) => {\n const schema = z.function({\n input: z.tuple(input),\n output,\n });\n return z\n .custom<z.core.$InferInnerFunctionType<z.ZodTuple<TInput, null>, TOutput>>((arg) => typeof arg === \"function\")\n .transform((arg) => schema.implement(arg));\n};\n\nexport const asyncFn = <TInput extends [z.ZodType, ...z.ZodType[]], TOutput extends z.ZodType>({\n input,\n output,\n}: {\n input: TInput;\n output: TOutput;\n}) => {\n const schema = z.function({\n input: z.tuple(input),\n output,\n });\n return z\n .custom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<TInput, null>, TOutput>>((arg) => typeof arg === \"function\")\n .transform((arg) => schema.implementAsync(arg));\n};\n","import { z } from \"zod\";\nimport { manifestEntry } from \"./manifest-entry.js\";\nimport { asyncFn } from \"./utils.js\";\n\nconst sizeObject = z.object({ size: z.number() });\n\nconst manifestEntryWithSize = z.object({ ...manifestEntry.shape, ...sizeObject.shape });\n\nexport const manifestTransformResult = z.strictObject({\n manifest: z.array(manifestEntryWithSize),\n warnings: z.array(z.string()).optional(),\n});\n\nexport const manifestTransform = asyncFn({\n input: [z.array(manifestEntryWithSize), z.unknown().optional()],\n output: manifestTransformResult,\n});\n","import { z } from \"zod\";\n\nimport type { BasePartial, BaseResolved } from \"../types.js\";\nimport { assertType, type Equals } from \"./assert-type.js\";\nimport { manifestEntry } from \"./manifest-entry.js\";\nimport { manifestTransform } from \"./manifest-transform.js\";\n\nexport const basePartial = z.strictObject({\n additionalPrecacheEntries: z.array(z.union([z.string(), manifestEntry])).optional(),\n disablePrecacheManifest: z.boolean().default(false),\n dontCacheBustURLsMatching: z.instanceof(RegExp).optional(),\n manifestTransforms: z.array(manifestTransform).optional(),\n maximumFileSizeToCacheInBytes: z.number().default(2097152),\n modifyURLPrefix: z.record(z.string(), z.string()).optional(),\n});\n\nassertType<Equals<BasePartial, z.input<typeof basePartial>>>();\nassertType<Equals<BaseResolved, z.output<typeof basePartial>>>();\n","import { z } from \"zod\";\nimport { DEFAULT_GLOB_PATTERNS } from \"../lib/constants.js\";\nimport type {\n GlobPartial,\n GlobResolved,\n OptionalGlobDirectoryPartial,\n OptionalGlobDirectoryResolved,\n RequiredGlobDirectoryPartial,\n RequiredGlobDirectoryResolved,\n} from \"../types.js\";\nimport { assertType, type Equals } from \"./assert-type.js\";\n\nexport const globPartial = z.strictObject({\n globFollow: z.boolean().default(true),\n globIgnores: z.array(z.string()).default([\"**/node_modules/**/*\"]),\n globPatterns: z.array(z.string()).default(DEFAULT_GLOB_PATTERNS),\n globStrict: z.boolean().default(true),\n templatedURLs: z.record(z.string(), z.union([z.string(), z.array(z.string())])).optional(),\n});\n\nexport const optionalGlobDirectoryPartial = z.strictObject({\n globDirectory: z.string().optional(),\n});\n\n// This needs to be set when using GetManifest or InjectManifest. This is\n// enforced via runtime validation, and needs to be documented.\nexport const requiredGlobDirectoryPartial = z.strictObject({\n globDirectory: z.string(),\n});\n\nassertType<Equals<GlobPartial, z.input<typeof globPartial>>>();\nassertType<Equals<GlobResolved, z.output<typeof globPartial>>>();\nassertType<Equals<OptionalGlobDirectoryPartial, z.input<typeof optionalGlobDirectoryPartial>>>();\nassertType<Equals<OptionalGlobDirectoryResolved, z.output<typeof optionalGlobDirectoryPartial>>>();\nassertType<Equals<RequiredGlobDirectoryPartial, z.input<typeof requiredGlobDirectoryPartial>>>();\nassertType<Equals<RequiredGlobDirectoryResolved, z.output<typeof requiredGlobDirectoryPartial>>>();\n"],"mappings":";;;AAIA,SAAgB,aAA8B;;;ACF9C,MAAa,gBAAgB,EAAE,aAAa;CAC1C,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,UAAU,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU;CAC1C,KAAK,EAAE,QAAQ;CAChB,CAAC;;;ACJF,MAAa,MAA6E,EAAE,OAAO,aAAiD;CAClJ,MAAM,SAAS,EAAE,SAAS;EACxB,OAAO,EAAE,MAAM,MAAM;EACrB;EACD,CAAC;AACF,QAAO,EACJ,QAA2E,QAAQ,OAAO,QAAQ,WAAW,CAC7G,WAAW,QAAQ,OAAO,UAAU,IAAI,CAAC;;AAG9C,MAAa,WAAkF,EAC7F,OACA,aAII;CACJ,MAAM,SAAS,EAAE,SAAS;EACxB,OAAO,EAAE,MAAM,MAAM;EACrB;EACD,CAAC;AACF,QAAO,EACJ,QAAgF,QAAQ,OAAO,QAAQ,WAAW,CAClH,WAAW,QAAQ,OAAO,eAAe,IAAI,CAAC;;;;ACrBnD,MAAM,aAAa,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAEjD,MAAM,wBAAwB,EAAE,OAAO;CAAE,GAAG,cAAc;CAAO,GAAG,WAAW;CAAO,CAAC;AAEvF,MAAa,0BAA0B,EAAE,aAAa;CACpD,UAAU,EAAE,MAAM,sBAAsB;CACxC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,UAAU;CACzC,CAAC;AAEF,MAAa,oBAAoB,QAAQ;CACvC,OAAO,CAAC,EAAE,MAAM,sBAAsB,EAAE,EAAE,SAAS,CAAC,UAAU,CAAC;CAC/D,QAAQ;CACT,CAAC;;;ACTF,MAAa,cAAc,EAAE,aAAa;CACxC,2BAA2B,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,UAAU;CACnF,yBAAyB,EAAE,SAAS,CAAC,QAAQ,MAAM;CACnD,2BAA2B,EAAE,WAAW,OAAO,CAAC,UAAU;CAC1D,oBAAoB,EAAE,MAAM,kBAAkB,CAAC,UAAU;CACzD,+BAA+B,EAAE,QAAQ,CAAC,QAAQ,QAAQ;CAC1D,iBAAiB,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,CAAC,UAAU;CAC7D,CAAC;;;ACFF,MAAa,cAAc,EAAE,aAAa;CACxC,YAAY,EAAE,SAAS,CAAC,QAAQ,KAAK;CACrC,aAAa,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,uBAAuB,CAAC;CAClE,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,QAAQ,sBAAsB;CAChE,YAAY,EAAE,SAAS,CAAC,QAAQ,KAAK;CACrC,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU;CAC3F,CAAC;AAEF,MAAa,+BAA+B,EAAE,aAAa,EACzD,eAAe,EAAE,QAAQ,CAAC,UAAU,EACrC,CAAC;AAIF,MAAa,+BAA+B,EAAE,aAAa,EACzD,eAAe,EAAE,QAAQ,EAC1B,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-CzwdidQP.js";
2
+ import { i as basePartial, r as requiredGlobDirectoryPartial, t as globPartial } from "./glob-B4_meZ_o.js";
3
+ import { z } from "zod";
4
+ //#region src/schema/sw-dest.ts
5
+ const optionalSwDestPartial = z.strictObject({ swDest: z.string().optional() });
6
+ const requiredSwDestPartial = z.strictObject({ swDest: z.string() });
7
+ //#endregion
8
+ //#region src/schema/inject-manifest.ts
9
+ var inject_manifest_exports = /* @__PURE__ */ __exportAll({
10
+ baseInjectPartial: () => baseInjectPartial,
11
+ injectManifestOptions: () => injectManifestOptions
12
+ });
13
+ const baseInjectPartial = z.strictObject({
14
+ injectionPoint: z.string().default("self.__SW_MANIFEST"),
15
+ swSrc: z.string()
16
+ });
17
+ const injectManifestOptions = z.strictObject({
18
+ ...basePartial.shape,
19
+ ...globPartial.shape,
20
+ ...baseInjectPartial.shape,
21
+ ...requiredSwDestPartial.shape,
22
+ ...requiredGlobDirectoryPartial.shape
23
+ });
24
+ //#endregion
25
+ export { requiredSwDestPartial as a, optionalSwDestPartial as i, injectManifestOptions as n, inject_manifest_exports as r, baseInjectPartial as t };
26
+
27
+ //# sourceMappingURL=inject-manifest-DNqDY-04.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inject-manifest-DNqDY-04.js","names":[],"sources":["../../src/schema/sw-dest.ts","../../src/schema/inject-manifest.ts"],"sourcesContent":["import { z } from \"zod\";\nimport type { OptionalSwDestPartial, OptionalSwDestResolved, RequiredSwDestPartial, RequiredSwDestResolved } from \"../types.js\";\nimport { assertType, type Equals } from \"./assert-type.js\";\n\nexport const optionalSwDestPartial = z.strictObject({\n swDest: z.string().optional(),\n});\n\nexport const requiredSwDestPartial = z.strictObject({\n swDest: z.string(),\n});\n\nassertType<Equals<OptionalSwDestPartial, z.input<typeof optionalSwDestPartial>>>();\nassertType<Equals<OptionalSwDestResolved, z.output<typeof optionalSwDestPartial>>>();\nassertType<Equals<RequiredSwDestPartial, z.input<typeof requiredSwDestPartial>>>();\nassertType<Equals<RequiredSwDestResolved, z.output<typeof requiredSwDestPartial>>>();\n","import { z } from \"zod\";\nimport type { InjectManifestOptions, InjectManifestOptionsComplete, InjectPartial, InjectResolved } from \"../types.js\";\nimport { assertType, type Equals } from \"./assert-type.js\";\nimport { basePartial } from \"./base.js\";\nimport { globPartial, requiredGlobDirectoryPartial } from \"./glob.js\";\nimport { requiredSwDestPartial } from \"./sw-dest.js\";\n\nexport const baseInjectPartial = z.strictObject({\n injectionPoint: z.string().default(\"self.__SW_MANIFEST\"),\n swSrc: z.string(),\n});\n\nexport const injectManifestOptions = z.strictObject({\n ...basePartial.shape,\n ...globPartial.shape,\n ...baseInjectPartial.shape,\n ...requiredSwDestPartial.shape,\n ...requiredGlobDirectoryPartial.shape,\n});\n\nassertType<Equals<InjectPartial, z.input<typeof baseInjectPartial>>>();\nassertType<Equals<InjectResolved, z.output<typeof baseInjectPartial>>>();\nassertType<Equals<InjectManifestOptions, z.input<typeof injectManifestOptions>>>();\nassertType<Equals<InjectManifestOptionsComplete, z.output<typeof injectManifestOptions>>>();\n"],"mappings":";;;;AAIA,MAAa,wBAAwB,EAAE,aAAa,EAClD,QAAQ,EAAE,QAAQ,CAAC,UAAU,EAC9B,CAAC;AAEF,MAAa,wBAAwB,EAAE,aAAa,EAClD,QAAQ,EAAE,QAAQ,EACnB,CAAC;;;;;;;ACHF,MAAa,oBAAoB,EAAE,aAAa;CAC9C,gBAAgB,EAAE,QAAQ,CAAC,QAAQ,qBAAqB;CACxD,OAAO,EAAE,QAAQ;CAClB,CAAC;AAEF,MAAa,wBAAwB,EAAE,aAAa;CAClD,GAAG,YAAY;CACf,GAAG,YAAY;CACf,GAAG,kBAAkB;CACrB,GAAG,sBAAsB;CACzB,GAAG,6BAA6B;CACjC,CAAC"}
@@ -0,0 +1,75 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/schema/manifest-entry.d.ts
4
+ declare const manifestEntry: z.ZodObject<{
5
+ integrity: z.ZodOptional<z.ZodString>;
6
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ url: z.ZodString;
8
+ }, z.core.$strict>;
9
+ //#endregion
10
+ //#region src/schema/manifest-transform.d.ts
11
+ declare const manifestTransformResult: z.ZodObject<{
12
+ manifest: z.ZodArray<z.ZodObject<{
13
+ size: z.ZodNumber;
14
+ integrity: z.ZodOptional<z.ZodString>;
15
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ url: z.ZodString;
17
+ }, z.core.$strip>>;
18
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
19
+ }, z.core.$strict>;
20
+ declare const manifestTransform: z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
21
+ size: z.ZodNumber;
22
+ integrity: z.ZodOptional<z.ZodString>;
23
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ url: z.ZodString;
25
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
26
+ manifest: z.ZodArray<z.ZodObject<{
27
+ size: z.ZodNumber;
28
+ integrity: z.ZodOptional<z.ZodString>;
29
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
+ url: z.ZodString;
31
+ }, z.core.$strip>>;
32
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
33
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
34
+ size: z.ZodNumber;
35
+ integrity: z.ZodOptional<z.ZodString>;
36
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
+ url: z.ZodString;
38
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
39
+ manifest: z.ZodArray<z.ZodObject<{
40
+ size: z.ZodNumber;
41
+ integrity: z.ZodOptional<z.ZodString>;
42
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
+ url: z.ZodString;
44
+ }, z.core.$strip>>;
45
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
46
+ }, z.core.$strict>>>, z.ZodTransform<z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
47
+ size: z.ZodNumber;
48
+ integrity: z.ZodOptional<z.ZodString>;
49
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ url: z.ZodString;
51
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
52
+ manifest: z.ZodArray<z.ZodObject<{
53
+ size: z.ZodNumber;
54
+ integrity: z.ZodOptional<z.ZodString>;
55
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
+ url: z.ZodString;
57
+ }, z.core.$strip>>;
58
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
+ }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
60
+ size: z.ZodNumber;
61
+ integrity: z.ZodOptional<z.ZodString>;
62
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
+ url: z.ZodString;
64
+ }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
65
+ manifest: z.ZodArray<z.ZodObject<{
66
+ size: z.ZodNumber;
67
+ integrity: z.ZodOptional<z.ZodString>;
68
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
+ url: z.ZodString;
70
+ }, z.core.$strip>>;
71
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
+ }, z.core.$strict>>>>;
73
+ //#endregion
74
+ export { manifestTransformResult as n, manifestEntry as r, manifestTransform as t };
75
+ //# sourceMappingURL=manifest-transform-BCUeQ0-V.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest-transform-BCUeQ0-V.d.ts","names":[],"sources":["../../src/schema/manifest-entry.ts","../../src/schema/manifest-transform.ts"],"mappings":";;;cAEa,aAAA,EAAa,CAAA,CAAA,SAAA;;;;;;;cCMb,uBAAA,EAAuB,CAAA,CAAA,SAAA;;;;;;;;;cAKvB,iBAAA,EAAiB,CAAA,CAAA,OAAA,CAAA,CAAA,CAAA,SAAA,CAAA,CAAA,CAAA,IAAA,CAAA,4BAAA,CAAA,CAAA,CAAA,QAAA,EAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,SAAA"}
@@ -0,0 +1,13 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll as t };