@serwist/vite 9.0.0-preview.2 → 9.0.0-preview.20

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 (86) hide show
  1. package/dist/chunks/schema.js +56 -0
  2. package/dist/index.d.ts +8 -7
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +360 -11
  5. package/dist/index.schema.d.ts +3 -0
  6. package/dist/index.schema.d.ts.map +1 -0
  7. package/dist/index.schema.js +3 -0
  8. package/dist/index.worker.d.ts +6 -0
  9. package/dist/index.worker.d.ts.map +1 -1
  10. package/dist/index.worker.js +84 -65
  11. package/dist/lib/api.d.ts.map +1 -0
  12. package/dist/lib/constants.d.ts.map +1 -0
  13. package/dist/{context.d.ts → lib/context.d.ts} +3 -3
  14. package/dist/lib/context.d.ts.map +1 -0
  15. package/dist/lib/log.d.ts.map +1 -0
  16. package/dist/{modules.d.ts → lib/modules.d.ts} +1 -1
  17. package/dist/lib/modules.d.ts.map +1 -0
  18. package/dist/lib/options.d.ts +4 -0
  19. package/dist/lib/options.d.ts.map +1 -0
  20. package/dist/lib/schema.d.ts +359 -0
  21. package/dist/lib/schema.d.ts.map +1 -0
  22. package/dist/lib/types.d.ts +127 -0
  23. package/dist/lib/types.d.ts.map +1 -0
  24. package/dist/lib/utils.d.ts.map +1 -0
  25. package/dist/lib/validator.d.ts +3 -0
  26. package/dist/lib/validator.d.ts.map +1 -0
  27. package/dist/plugins/build.d.ts +2 -2
  28. package/dist/plugins/build.d.ts.map +1 -1
  29. package/dist/plugins/dev.d.ts +2 -2
  30. package/dist/plugins/dev.d.ts.map +1 -1
  31. package/dist/plugins/main.d.ts +2 -2
  32. package/dist/plugins/main.d.ts.map +1 -1
  33. package/package.json +22 -62
  34. package/src/index.schema.ts +3 -0
  35. package/src/index.ts +8 -7
  36. package/src/index.worker.ts +111 -85
  37. package/src/{context.ts → lib/context.ts} +3 -3
  38. package/src/{log.ts → lib/log.ts} +1 -1
  39. package/src/{modules.ts → lib/modules.ts} +5 -6
  40. package/src/lib/options.ts +76 -0
  41. package/src/lib/schema.ts +35 -0
  42. package/src/lib/types.ts +163 -0
  43. package/src/lib/validator.ts +10 -0
  44. package/src/plugins/build.ts +2 -2
  45. package/src/plugins/dev.ts +3 -3
  46. package/src/plugins/main.ts +5 -5
  47. package/src/rollup.js +3 -24
  48. package/dist/api.d.ts.map +0 -1
  49. package/dist/assets.d.ts +0 -4
  50. package/dist/assets.d.ts.map +0 -1
  51. package/dist/constants.d.ts.map +0 -1
  52. package/dist/context.d.ts.map +0 -1
  53. package/dist/integration/svelte/build.d.ts +0 -5
  54. package/dist/integration/svelte/build.d.ts.map +0 -1
  55. package/dist/integration/svelte/config.d.ts +0 -9
  56. package/dist/integration/svelte/config.d.ts.map +0 -1
  57. package/dist/integration/svelte/index.d.ts +0 -10
  58. package/dist/integration/svelte/index.d.ts.map +0 -1
  59. package/dist/integration/svelte/index.js +0 -145
  60. package/dist/integration/svelte/types.d.ts +0 -24
  61. package/dist/integration/svelte/types.d.ts.map +0 -1
  62. package/dist/log.d.ts.map +0 -1
  63. package/dist/main.js +0 -470
  64. package/dist/modules.d.ts.map +0 -1
  65. package/dist/options.d.ts +0 -4
  66. package/dist/options.d.ts.map +0 -1
  67. package/dist/types.d.ts +0 -191
  68. package/dist/types.d.ts.map +0 -1
  69. package/dist/utils-types.d.ts +0 -2
  70. package/dist/utils-types.d.ts.map +0 -1
  71. package/dist/utils.d.ts.map +0 -1
  72. package/src/assets.ts +0 -76
  73. package/src/integration/svelte/build.ts +0 -21
  74. package/src/integration/svelte/config.ts +0 -141
  75. package/src/integration/svelte/index.ts +0 -27
  76. package/src/integration/svelte/types.ts +0 -26
  77. package/src/options.ts +0 -90
  78. package/src/types.ts +0 -207
  79. package/src/utils-types.ts +0 -1
  80. /package/dist/{api.d.ts → lib/api.d.ts} +0 -0
  81. /package/dist/{constants.d.ts → lib/constants.d.ts} +0 -0
  82. /package/dist/{log.d.ts → lib/log.d.ts} +0 -0
  83. /package/dist/{utils.d.ts → lib/utils.d.ts} +0 -0
  84. /package/src/{api.ts → lib/api.ts} +0 -0
  85. /package/src/{constants.ts → lib/constants.ts} +0 -0
  86. /package/src/{utils.ts → lib/utils.ts} +0 -0
@@ -1,94 +1,113 @@
1
- const defaultCache = [
1
+ import { ExpirationPlugin } from '@serwist/sw/plugins';
2
+ import { CacheFirst, StaleWhileRevalidate, NetworkFirst } from '@serwist/sw/strategies';
3
+
4
+ const defaultCache = import.meta.env.DEV ? [] : [
2
5
  {
3
- urlPattern: /^https:\/\/fonts\.(?:googleapis|gstatic)\.com\/.*/i,
4
- handler: "CacheFirst",
5
- options: {
6
+ matcher: /^https:\/\/fonts\.(?:googleapis|gstatic)\.com\/.*/i,
7
+ handler: new CacheFirst({
6
8
  cacheName: "google-fonts",
7
- expiration: {
8
- maxEntries: 4,
9
- maxAgeSeconds: 365 * 24 * 60 * 60
10
- }
11
- }
9
+ plugins: [
10
+ new ExpirationPlugin({
11
+ maxEntries: 4,
12
+ maxAgeSeconds: 365 * 24 * 60 * 60,
13
+ maxAgeFrom: "last-used"
14
+ })
15
+ ]
16
+ })
12
17
  },
13
18
  {
14
- urlPattern: /\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,
15
- handler: "StaleWhileRevalidate",
16
- options: {
19
+ matcher: /\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,
20
+ handler: new StaleWhileRevalidate({
17
21
  cacheName: "static-font-assets",
18
- expiration: {
19
- maxEntries: 4,
20
- maxAgeSeconds: 7 * 24 * 60 * 60
21
- }
22
- }
22
+ plugins: [
23
+ new ExpirationPlugin({
24
+ maxEntries: 4,
25
+ maxAgeSeconds: 7 * 24 * 60 * 60,
26
+ maxAgeFrom: "last-used"
27
+ })
28
+ ]
29
+ })
23
30
  },
24
31
  {
25
- urlPattern: /\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,
26
- handler: "StaleWhileRevalidate",
27
- options: {
32
+ matcher: /\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,
33
+ handler: new StaleWhileRevalidate({
28
34
  cacheName: "static-image-assets",
29
- expiration: {
30
- maxEntries: 64,
31
- maxAgeSeconds: 24 * 60 * 60
32
- }
33
- }
35
+ plugins: [
36
+ new ExpirationPlugin({
37
+ maxEntries: 64,
38
+ maxAgeSeconds: 24 * 60 * 60,
39
+ maxAgeFrom: "last-used"
40
+ })
41
+ ]
42
+ })
34
43
  },
35
44
  {
36
- urlPattern: /\.(?:js)$/i,
37
- handler: "StaleWhileRevalidate",
38
- options: {
45
+ matcher: /\.(?:js)$/i,
46
+ handler: new StaleWhileRevalidate({
39
47
  cacheName: "static-js-assets",
40
- expiration: {
41
- maxEntries: 32,
42
- maxAgeSeconds: 24 * 60 * 60
43
- }
44
- }
48
+ plugins: [
49
+ new ExpirationPlugin({
50
+ maxEntries: 32,
51
+ maxAgeSeconds: 24 * 60 * 60,
52
+ maxAgeFrom: "last-used"
53
+ })
54
+ ]
55
+ })
45
56
  },
46
57
  {
47
- urlPattern: /\.(?:css|less)$/i,
48
- handler: "StaleWhileRevalidate",
49
- options: {
58
+ matcher: /\.(?:css|less)$/i,
59
+ handler: new StaleWhileRevalidate({
50
60
  cacheName: "static-style-assets",
51
- expiration: {
52
- maxEntries: 32,
53
- maxAgeSeconds: 24 * 60 * 60
54
- }
55
- }
61
+ plugins: [
62
+ new ExpirationPlugin({
63
+ maxEntries: 32,
64
+ maxAgeSeconds: 24 * 60 * 60,
65
+ maxAgeFrom: "last-used"
66
+ })
67
+ ]
68
+ })
56
69
  },
57
70
  {
58
- urlPattern: /\.(?:json|xml|csv)$/i,
59
- handler: "NetworkFirst",
60
- options: {
71
+ matcher: /\.(?:json|xml|csv)$/i,
72
+ handler: new NetworkFirst({
61
73
  cacheName: "static-data-assets",
62
- expiration: {
63
- maxEntries: 32,
64
- maxAgeSeconds: 24 * 60 * 60
65
- }
66
- }
74
+ plugins: [
75
+ new ExpirationPlugin({
76
+ maxEntries: 32,
77
+ maxAgeSeconds: 24 * 60 * 60,
78
+ maxAgeFrom: "last-used"
79
+ })
80
+ ]
81
+ })
67
82
  },
68
83
  {
69
- urlPattern: /\/api\/.*$/i,
70
- handler: "NetworkFirst",
84
+ matcher: /\/api\/.*$/i,
71
85
  method: "GET",
72
- options: {
86
+ handler: new NetworkFirst({
73
87
  cacheName: "apis",
74
- expiration: {
75
- maxEntries: 16,
76
- maxAgeSeconds: 24 * 60 * 60
77
- },
88
+ plugins: [
89
+ new ExpirationPlugin({
90
+ maxEntries: 16,
91
+ maxAgeSeconds: 24 * 60 * 60,
92
+ maxAgeFrom: "last-used"
93
+ })
94
+ ],
78
95
  networkTimeoutSeconds: 10
79
- }
96
+ })
80
97
  },
81
98
  {
82
- urlPattern: /.*/i,
83
- handler: "NetworkFirst",
84
- options: {
99
+ matcher: /.*/i,
100
+ handler: new NetworkFirst({
85
101
  cacheName: "others",
86
- expiration: {
87
- maxEntries: 32,
88
- maxAgeSeconds: 24 * 60 * 60
89
- },
102
+ plugins: [
103
+ new ExpirationPlugin({
104
+ maxEntries: 32,
105
+ maxAgeSeconds: 24 * 60 * 60,
106
+ maxAgeFrom: "last-used"
107
+ })
108
+ ],
90
109
  networkTimeoutSeconds: 10
91
- }
110
+ })
92
111
  }
93
112
  ];
94
113
 
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/lib/api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGvD,OAAO,KAAK,EAA6B,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5E,eAAO,MAAM,SAAS,QAAS,kBAAkB,KAAG,cA8BnD,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,eAAO,MAAM,iCAAiC,+BAAkC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { ResolvedConfig } from "vite";
2
- import type { PluginOptions, ResolvedPluginOptions } from "./types.js";
3
- export type SerwistViteFrameworks = "nuxt" | "sveltekit";
2
+ import type { PluginOptions, PluginOptionsComplete } from "./types.js";
3
+ export type SerwistViteFrameworks = "nuxt";
4
4
  export interface SerwistViteContext {
5
5
  /**
6
6
  * Resolved Vite config.
@@ -18,7 +18,7 @@ export interface SerwistViteContext {
18
18
  * Note: this is different from `userOptions` in that it has been parsed, whereas
19
19
  * `userOptions` is the raw configuration that the user provides us.
20
20
  */
21
- options: ResolvedPluginOptions;
21
+ options: PluginOptionsComplete;
22
22
  useImportRegister: boolean;
23
23
  /**
24
24
  * Is the plugin running on dev?
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/lib/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEvE,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,UAAU,EAAE,cAAc,CAAC;IAC3B;;OAEG;IACH,WAAW,EAAE,aAAa,CAAC;IAC3B;;;;;OAKG;IACH,OAAO,EAAE,qBAAqB,CAAC;IAC/B,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,8CAA8C;IAC9C,SAAS,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC9C;AAED,eAAO,MAAM,aAAa,gBAAiB,aAAa,aAAa,qBAAqB,GAAG,SAAS,KAAG,kBASxG,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/lib/log.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAI3C,eAAO,MAAM,gBAAgB,gBAAiB,KAAK,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,CAAC,eAAe,cAAc,SAkB1H,CAAC"}
@@ -4,7 +4,7 @@ export declare const loadSerwistBuild: () => Promise<typeof SerwistBuild>;
4
4
  interface BuildResult extends SerwistBuild.GetManifestResult {
5
5
  manifestString: string;
6
6
  }
7
- export declare const injectManifest: (config: SerwistBuild.ViteInjectManifestOptions) => Promise<BuildResult>;
7
+ export declare const injectManifest: (options: SerwistBuild.GetManifestOptionsComplete) => Promise<BuildResult>;
8
8
  export declare const generateServiceWorker: (ctx: SerwistViteContext) => Promise<BuildResult | undefined>;
9
9
  export {};
10
10
  //# sourceMappingURL=modules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/lib/modules.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAEpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,eAAO,MAAM,gBAAgB,QAAa,QAAQ,mBAAmB,CASpE,CAAC;AAEF,UAAU,WAAY,SAAQ,YAAY,CAAC,iBAAiB;IAC1D,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,YAAmB,aAAa,0BAA0B,KAAG,QAAQ,WAAW,CAW1G,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAe,kBAAkB,qCAwIlE,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ResolvedConfig } from "vite";
2
+ import type { PluginOptions, PluginOptionsComplete } from "./types.js";
3
+ export declare const resolveOptions: (options: PluginOptions, viteConfig: ResolvedConfig) => Promise<PluginOptionsComplete>;
4
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/lib/options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAwBvE,eAAO,MAAM,cAAc,YAAmB,aAAa,cAAc,cAAc,KAAG,QAAQ,qBAAqB,CA8CtH,CAAC"}
@@ -0,0 +1,359 @@
1
+ import { z } from "zod";
2
+ export declare const hooks: z.ZodObject<{
3
+ beforeBuildServiceWorker: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>>;
4
+ closeBundleOrder: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"pre">, z.ZodLiteral<"post">, z.ZodNull]>>;
5
+ configureOptions: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ beforeBuildServiceWorker?: ((args_0: any) => void | Promise<void>) | undefined;
8
+ closeBundleOrder?: "pre" | "post" | null | undefined;
9
+ configureOptions?: ((args_0: any, args_1: any) => void | Promise<void>) | undefined;
10
+ }, {
11
+ beforeBuildServiceWorker?: ((args_0: any) => void | Promise<void>) | undefined;
12
+ closeBundleOrder?: "pre" | "post" | null | undefined;
13
+ configureOptions?: ((args_0: any, args_1: any) => void | Promise<void>) | undefined;
14
+ }>;
15
+ export declare const devOptions: z.ZodObject<{
16
+ bundle: z.ZodDefault<z.ZodBoolean>;
17
+ minify: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"terser">, z.ZodLiteral<"esbuild">]>>;
18
+ }, "strip", z.ZodTypeAny, {
19
+ bundle: boolean;
20
+ minify: boolean | "terser" | "esbuild";
21
+ }, {
22
+ bundle?: boolean | undefined;
23
+ minify?: boolean | "terser" | "esbuild" | undefined;
24
+ }>;
25
+ export declare const injectManifestPartial: z.ZodObject<{
26
+ mode: z.ZodUnion<[z.ZodLiteral<"development">, z.ZodLiteral<"production">]>;
27
+ type: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"module">]>>;
28
+ scope: z.ZodString;
29
+ base: z.ZodString;
30
+ disable: z.ZodDefault<z.ZodBoolean>;
31
+ integration: z.ZodDefault<z.ZodObject<{
32
+ beforeBuildServiceWorker: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>>;
33
+ closeBundleOrder: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"pre">, z.ZodLiteral<"post">, z.ZodNull]>>;
34
+ configureOptions: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ beforeBuildServiceWorker?: ((args_0: any) => void | Promise<void>) | undefined;
37
+ closeBundleOrder?: "pre" | "post" | null | undefined;
38
+ configureOptions?: ((args_0: any, args_1: any) => void | Promise<void>) | undefined;
39
+ }, {
40
+ beforeBuildServiceWorker?: ((args_0: any) => void | Promise<void>) | undefined;
41
+ closeBundleOrder?: "pre" | "post" | null | undefined;
42
+ configureOptions?: ((args_0: any, args_1: any) => void | Promise<void>) | undefined;
43
+ }>>;
44
+ swUrl: z.ZodDefault<z.ZodString>;
45
+ plugins: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
46
+ rollupFormat: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"iife">]>>;
47
+ rollupOptions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
48
+ devOptions: z.ZodDefault<z.ZodObject<{
49
+ bundle: z.ZodDefault<z.ZodBoolean>;
50
+ minify: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"terser">, z.ZodLiteral<"esbuild">]>>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ bundle: boolean;
53
+ minify: boolean | "terser" | "esbuild";
54
+ }, {
55
+ bundle?: boolean | undefined;
56
+ minify?: boolean | "terser" | "esbuild" | undefined;
57
+ }>>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ scope: string;
60
+ type: "classic" | "module";
61
+ mode: "development" | "production";
62
+ base: string;
63
+ disable: boolean;
64
+ integration: {
65
+ beforeBuildServiceWorker?: ((args_0: any) => void | Promise<void>) | undefined;
66
+ closeBundleOrder?: "pre" | "post" | null | undefined;
67
+ configureOptions?: ((args_0: any, args_1: any) => void | Promise<void>) | undefined;
68
+ };
69
+ swUrl: string;
70
+ plugins: any[];
71
+ rollupFormat: "es" | "iife";
72
+ rollupOptions: Record<string, any>;
73
+ devOptions: {
74
+ bundle: boolean;
75
+ minify: boolean | "terser" | "esbuild";
76
+ };
77
+ }, {
78
+ scope: string;
79
+ mode: "development" | "production";
80
+ base: string;
81
+ type?: "classic" | "module" | undefined;
82
+ disable?: boolean | undefined;
83
+ integration?: {
84
+ beforeBuildServiceWorker?: ((args_0: any) => void | Promise<void>) | undefined;
85
+ closeBundleOrder?: "pre" | "post" | null | undefined;
86
+ configureOptions?: ((args_0: any, args_1: any) => void | Promise<void>) | undefined;
87
+ } | undefined;
88
+ swUrl?: string | undefined;
89
+ plugins?: any[] | undefined;
90
+ rollupFormat?: "es" | "iife" | undefined;
91
+ rollupOptions?: Record<string, any> | undefined;
92
+ devOptions?: {
93
+ bundle?: boolean | undefined;
94
+ minify?: boolean | "terser" | "esbuild" | undefined;
95
+ } | undefined;
96
+ }>;
97
+ export declare const injectManifestOptions: z.ZodObject<{
98
+ additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
99
+ integrity: z.ZodOptional<z.ZodString>;
100
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
+ url: z.ZodString;
102
+ }, "strict", z.ZodTypeAny, {
103
+ url: string;
104
+ integrity?: string | undefined;
105
+ revision?: string | null | undefined;
106
+ }, {
107
+ url: string;
108
+ integrity?: string | undefined;
109
+ revision?: string | null | undefined;
110
+ }>]>, "many">>;
111
+ disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
112
+ dontCacheBustURLsMatching: z.ZodOptional<z.ZodType<RegExp, z.ZodTypeDef, RegExp>>;
113
+ manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodFunction<z.ZodTuple<[z.ZodArray<z.ZodObject<{
114
+ integrity: z.ZodOptional<z.ZodString>;
115
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
116
+ url: z.ZodString;
117
+ size: z.ZodNumber;
118
+ }, "strip", z.ZodTypeAny, {
119
+ url: string;
120
+ size: number;
121
+ integrity?: string | undefined;
122
+ revision?: string | null | undefined;
123
+ }, {
124
+ url: string;
125
+ size: number;
126
+ integrity?: string | undefined;
127
+ revision?: string | null | undefined;
128
+ }>, "many">, z.ZodOptional<z.ZodUnknown>], null>, z.ZodUnion<[z.ZodPromise<z.ZodObject<{
129
+ manifest: z.ZodArray<z.ZodObject<{
130
+ integrity: z.ZodOptional<z.ZodString>;
131
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
+ url: z.ZodString;
133
+ size: z.ZodNumber;
134
+ }, "strip", z.ZodTypeAny, {
135
+ url: string;
136
+ size: number;
137
+ integrity?: string | undefined;
138
+ revision?: string | null | undefined;
139
+ }, {
140
+ url: string;
141
+ size: number;
142
+ integrity?: string | undefined;
143
+ revision?: string | null | undefined;
144
+ }>, "many">;
145
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
146
+ }, "strict", z.ZodTypeAny, {
147
+ manifest: {
148
+ url: string;
149
+ size: number;
150
+ integrity?: string | undefined;
151
+ revision?: string | null | undefined;
152
+ }[];
153
+ warnings?: string[] | undefined;
154
+ }, {
155
+ manifest: {
156
+ url: string;
157
+ size: number;
158
+ integrity?: string | undefined;
159
+ revision?: string | null | undefined;
160
+ }[];
161
+ warnings?: string[] | undefined;
162
+ }>>, z.ZodObject<{
163
+ manifest: z.ZodArray<z.ZodObject<{
164
+ integrity: z.ZodOptional<z.ZodString>;
165
+ revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
166
+ url: z.ZodString;
167
+ size: z.ZodNumber;
168
+ }, "strip", z.ZodTypeAny, {
169
+ url: string;
170
+ size: number;
171
+ integrity?: string | undefined;
172
+ revision?: string | null | undefined;
173
+ }, {
174
+ url: string;
175
+ size: number;
176
+ integrity?: string | undefined;
177
+ revision?: string | null | undefined;
178
+ }>, "many">;
179
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
180
+ }, "strict", z.ZodTypeAny, {
181
+ manifest: {
182
+ url: string;
183
+ size: number;
184
+ integrity?: string | undefined;
185
+ revision?: string | null | undefined;
186
+ }[];
187
+ warnings?: string[] | undefined;
188
+ }, {
189
+ manifest: {
190
+ url: string;
191
+ size: number;
192
+ integrity?: string | undefined;
193
+ revision?: string | null | undefined;
194
+ }[];
195
+ warnings?: string[] | undefined;
196
+ }>]>>, "many">>;
197
+ maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
198
+ modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
199
+ globFollow: z.ZodDefault<z.ZodBoolean>;
200
+ globIgnores: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
201
+ globPatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
202
+ globStrict: z.ZodDefault<z.ZodBoolean>;
203
+ templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
204
+ injectionPoint: z.ZodDefault<z.ZodString>;
205
+ swSrc: z.ZodString;
206
+ swDest: z.ZodString;
207
+ globDirectory: z.ZodString;
208
+ mode: z.ZodUnion<[z.ZodLiteral<"development">, z.ZodLiteral<"production">]>;
209
+ type: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"module">]>>;
210
+ scope: z.ZodString;
211
+ base: z.ZodString;
212
+ disable: z.ZodDefault<z.ZodBoolean>;
213
+ integration: z.ZodDefault<z.ZodObject<{
214
+ beforeBuildServiceWorker: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>>;
215
+ closeBundleOrder: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"pre">, z.ZodLiteral<"post">, z.ZodNull]>>;
216
+ configureOptions: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodUnion<[z.ZodPromise<z.ZodVoid>, z.ZodVoid]>>>;
217
+ }, "strip", z.ZodTypeAny, {
218
+ beforeBuildServiceWorker?: ((args_0: any) => void | Promise<void>) | undefined;
219
+ closeBundleOrder?: "pre" | "post" | null | undefined;
220
+ configureOptions?: ((args_0: any, args_1: any) => void | Promise<void>) | undefined;
221
+ }, {
222
+ beforeBuildServiceWorker?: ((args_0: any) => void | Promise<void>) | undefined;
223
+ closeBundleOrder?: "pre" | "post" | null | undefined;
224
+ configureOptions?: ((args_0: any, args_1: any) => void | Promise<void>) | undefined;
225
+ }>>;
226
+ swUrl: z.ZodDefault<z.ZodString>;
227
+ plugins: z.ZodDefault<z.ZodArray<z.ZodAny, "many">>;
228
+ rollupFormat: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"iife">]>>;
229
+ rollupOptions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
230
+ devOptions: z.ZodDefault<z.ZodObject<{
231
+ bundle: z.ZodDefault<z.ZodBoolean>;
232
+ minify: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"terser">, z.ZodLiteral<"esbuild">]>>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ bundle: boolean;
235
+ minify: boolean | "terser" | "esbuild";
236
+ }, {
237
+ bundle?: boolean | undefined;
238
+ minify?: boolean | "terser" | "esbuild" | undefined;
239
+ }>>;
240
+ }, "strict", z.ZodTypeAny, {
241
+ scope: string;
242
+ type: "classic" | "module";
243
+ mode: "development" | "production";
244
+ base: string;
245
+ disable: boolean;
246
+ integration: {
247
+ beforeBuildServiceWorker?: ((args_0: any) => void | Promise<void>) | undefined;
248
+ closeBundleOrder?: "pre" | "post" | null | undefined;
249
+ configureOptions?: ((args_0: any, args_1: any) => void | Promise<void>) | undefined;
250
+ };
251
+ swUrl: string;
252
+ plugins: any[];
253
+ rollupFormat: "es" | "iife";
254
+ rollupOptions: Record<string, any>;
255
+ devOptions: {
256
+ bundle: boolean;
257
+ minify: boolean | "terser" | "esbuild";
258
+ };
259
+ disablePrecacheManifest: boolean;
260
+ maximumFileSizeToCacheInBytes: number;
261
+ globFollow: boolean;
262
+ globIgnores: string[];
263
+ globPatterns: string[];
264
+ globStrict: boolean;
265
+ injectionPoint: string;
266
+ swSrc: string;
267
+ swDest: string;
268
+ globDirectory: string;
269
+ additionalPrecacheEntries?: (string | {
270
+ url: string;
271
+ integrity?: string | undefined;
272
+ revision?: string | null | undefined;
273
+ })[] | undefined;
274
+ dontCacheBustURLsMatching?: RegExp | undefined;
275
+ manifestTransforms?: ((args_0: {
276
+ url: string;
277
+ size: number;
278
+ integrity?: string | undefined;
279
+ revision?: string | null | undefined;
280
+ }[], args_1: unknown) => {
281
+ manifest: {
282
+ url: string;
283
+ size: number;
284
+ integrity?: string | undefined;
285
+ revision?: string | null | undefined;
286
+ }[];
287
+ warnings?: string[] | undefined;
288
+ } | Promise<{
289
+ manifest: {
290
+ url: string;
291
+ size: number;
292
+ integrity?: string | undefined;
293
+ revision?: string | null | undefined;
294
+ }[];
295
+ warnings?: string[] | undefined;
296
+ }>)[] | undefined;
297
+ modifyURLPrefix?: Record<string, string> | undefined;
298
+ templatedURLs?: Record<string, string | string[]> | undefined;
299
+ }, {
300
+ scope: string;
301
+ mode: "development" | "production";
302
+ base: string;
303
+ swSrc: string;
304
+ swDest: string;
305
+ globDirectory: string;
306
+ additionalPrecacheEntries?: (string | {
307
+ url: string;
308
+ integrity?: string | undefined;
309
+ revision?: string | null | undefined;
310
+ })[] | undefined;
311
+ disablePrecacheManifest?: boolean | undefined;
312
+ dontCacheBustURLsMatching?: RegExp | undefined;
313
+ manifestTransforms?: ((args_0: {
314
+ url: string;
315
+ size: number;
316
+ integrity?: string | undefined;
317
+ revision?: string | null | undefined;
318
+ }[], args_1: unknown) => {
319
+ manifest: {
320
+ url: string;
321
+ size: number;
322
+ integrity?: string | undefined;
323
+ revision?: string | null | undefined;
324
+ }[];
325
+ warnings?: string[] | undefined;
326
+ } | Promise<{
327
+ manifest: {
328
+ url: string;
329
+ size: number;
330
+ integrity?: string | undefined;
331
+ revision?: string | null | undefined;
332
+ }[];
333
+ warnings?: string[] | undefined;
334
+ }>)[] | undefined;
335
+ maximumFileSizeToCacheInBytes?: number | undefined;
336
+ modifyURLPrefix?: Record<string, string> | undefined;
337
+ globFollow?: boolean | undefined;
338
+ globIgnores?: string[] | undefined;
339
+ globPatterns?: string[] | undefined;
340
+ globStrict?: boolean | undefined;
341
+ templatedURLs?: Record<string, string | string[]> | undefined;
342
+ injectionPoint?: string | undefined;
343
+ type?: "classic" | "module" | undefined;
344
+ disable?: boolean | undefined;
345
+ integration?: {
346
+ beforeBuildServiceWorker?: ((args_0: any) => void | Promise<void>) | undefined;
347
+ closeBundleOrder?: "pre" | "post" | null | undefined;
348
+ configureOptions?: ((args_0: any, args_1: any) => void | Promise<void>) | undefined;
349
+ } | undefined;
350
+ swUrl?: string | undefined;
351
+ plugins?: any[] | undefined;
352
+ rollupFormat?: "es" | "iife" | undefined;
353
+ rollupOptions?: Record<string, any> | undefined;
354
+ devOptions?: {
355
+ bundle?: boolean | undefined;
356
+ minify?: boolean | "terser" | "esbuild" | undefined;
357
+ } | undefined;
358
+ }>;
359
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/lib/schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,KAAK;;;;;;;;;;;;EAIhB,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;EAGrB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMmC,CAAC"}