@serwist/vite 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 (53) hide show
  1. package/dist/chunks/schema-CF26pDQI.js +77 -0
  2. package/dist/chunks/schema-CF26pDQI.js.map +1 -0
  3. package/dist/index.d.mts +228 -0
  4. package/dist/index.d.mts.map +1 -0
  5. package/dist/index.mjs +393 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/dist/index.schema.d.mts +126 -0
  8. package/dist/index.schema.d.mts.map +1 -0
  9. package/dist/index.schema.mjs +2 -0
  10. package/dist/index.worker.d.mts +13 -0
  11. package/dist/index.worker.d.mts.map +1 -0
  12. package/dist/index.worker.mjs +108 -0
  13. package/dist/index.worker.mjs.map +1 -0
  14. package/package.json +30 -26
  15. package/src/lib/modules.ts +1 -0
  16. package/dist/chunks/schema.js +0 -80
  17. package/dist/index.d.ts +0 -19
  18. package/dist/index.d.ts.map +0 -1
  19. package/dist/index.js +0 -400
  20. package/dist/index.schema.d.ts +0 -3
  21. package/dist/index.schema.d.ts.map +0 -1
  22. package/dist/index.schema.js +0 -3
  23. package/dist/index.worker.d.ts +0 -9
  24. package/dist/index.worker.d.ts.map +0 -1
  25. package/dist/index.worker.js +0 -118
  26. package/dist/lib/api.d.ts +0 -4
  27. package/dist/lib/api.d.ts.map +0 -1
  28. package/dist/lib/constants.d.ts +0 -3
  29. package/dist/lib/constants.d.ts.map +0 -1
  30. package/dist/lib/context.d.ts +0 -33
  31. package/dist/lib/context.d.ts.map +0 -1
  32. package/dist/lib/log.d.ts +0 -4
  33. package/dist/lib/log.d.ts.map +0 -1
  34. package/dist/lib/modules.d.ts +0 -10
  35. package/dist/lib/modules.d.ts.map +0 -1
  36. package/dist/lib/options.d.ts +0 -4
  37. package/dist/lib/options.d.ts.map +0 -1
  38. package/dist/lib/schema.d.ts +0 -122
  39. package/dist/lib/schema.d.ts.map +0 -1
  40. package/dist/lib/types.d.ts +0 -130
  41. package/dist/lib/types.d.ts.map +0 -1
  42. package/dist/lib/utils.d.ts +0 -24
  43. package/dist/lib/utils.d.ts.map +0 -1
  44. package/dist/lib/validator.d.ts +0 -3
  45. package/dist/lib/validator.d.ts.map +0 -1
  46. package/dist/plugins/build.d.ts +0 -12
  47. package/dist/plugins/build.d.ts.map +0 -1
  48. package/dist/plugins/dev.d.ts +0 -12
  49. package/dist/plugins/dev.d.ts.map +0 -1
  50. package/dist/plugins/main.d.ts +0 -12
  51. package/dist/plugins/main.d.ts.map +0 -1
  52. package/src/rollup.js +0 -23
  53. /package/{typings.d.ts → typings.d.mts} +0 -0
@@ -1,122 +0,0 @@
1
- import { z } from "zod";
2
- export declare const hooks: z.ZodObject<{
3
- beforeBuildServiceWorker: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>>, z.ZodTransform<(args_0: any) => void, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>>>, z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>>, z.ZodTransform<z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>>>]>>;
4
- closeBundleOrder: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"pre">, z.ZodLiteral<"post">, z.ZodNull]>>;
5
- configureOptions: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>>, z.ZodTransform<(args_0: any, args_1: any) => void, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>>>, z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>>, z.ZodTransform<z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>>>]>>;
6
- }, z.core.$strip>;
7
- export declare const devOptions: z.ZodObject<{
8
- bundle: z.ZodDefault<z.ZodBoolean>;
9
- minify: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"terser">, z.ZodLiteral<"esbuild">]>>;
10
- }, z.core.$strip>;
11
- export declare const injectManifestPartial: z.ZodObject<{
12
- mode: z.ZodUnion<readonly [z.ZodLiteral<"development">, z.ZodLiteral<"production">]>;
13
- type: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"classic">, z.ZodLiteral<"module">]>>;
14
- scope: z.ZodString;
15
- base: z.ZodString;
16
- disable: z.ZodDefault<z.ZodBoolean>;
17
- integration: z.ZodDefault<z.ZodObject<{
18
- beforeBuildServiceWorker: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>>, z.ZodTransform<(args_0: any) => void, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>>>, z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>>, z.ZodTransform<z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>>>]>>;
19
- closeBundleOrder: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"pre">, z.ZodLiteral<"post">, z.ZodNull]>>;
20
- configureOptions: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>>, z.ZodTransform<(args_0: any, args_1: any) => void, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>>>, z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>>, z.ZodTransform<z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>>>]>>;
21
- }, z.core.$strip>>;
22
- swUrl: z.ZodDefault<z.ZodString>;
23
- plugins: z.ZodDefault<z.ZodArray<z.ZodAny>>;
24
- rollupFormat: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"es">, z.ZodLiteral<"iife">]>>;
25
- rollupOptions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
26
- devOptions: z.ZodPrefault<z.ZodObject<{
27
- bundle: z.ZodDefault<z.ZodBoolean>;
28
- minify: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"terser">, z.ZodLiteral<"esbuild">]>>;
29
- }, z.core.$strip>>;
30
- }, z.core.$strip>;
31
- export declare const injectManifestOptions: z.ZodObject<{
32
- mode: z.ZodUnion<readonly [z.ZodLiteral<"development">, z.ZodLiteral<"production">]>;
33
- type: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"classic">, z.ZodLiteral<"module">]>>;
34
- scope: z.ZodString;
35
- base: z.ZodString;
36
- disable: z.ZodDefault<z.ZodBoolean>;
37
- integration: z.ZodDefault<z.ZodObject<{
38
- beforeBuildServiceWorker: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>>, z.ZodTransform<(args_0: any) => void, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>>>, z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>>, z.ZodTransform<z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny], null>, z.ZodVoid>>>]>>;
39
- closeBundleOrder: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"pre">, z.ZodLiteral<"post">, z.ZodNull]>>;
40
- configureOptions: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>>, z.ZodTransform<(args_0: any, args_1: any) => void, z.core.$InferInnerFunctionType<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>>>, z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>>, z.ZodTransform<z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodVoid>>>]>>;
41
- }, z.core.$strip>>;
42
- swUrl: z.ZodDefault<z.ZodString>;
43
- plugins: z.ZodDefault<z.ZodArray<z.ZodAny>>;
44
- rollupFormat: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"es">, z.ZodLiteral<"iife">]>>;
45
- rollupOptions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
46
- devOptions: z.ZodPrefault<z.ZodObject<{
47
- bundle: z.ZodDefault<z.ZodBoolean>;
48
- minify: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodLiteral<"terser">, z.ZodLiteral<"esbuild">]>>;
49
- }, z.core.$strip>>;
50
- globDirectory: z.ZodString;
51
- swDest: z.ZodString;
52
- injectionPoint: z.ZodDefault<z.ZodString>;
53
- swSrc: z.ZodString;
54
- globFollow: z.ZodDefault<z.ZodBoolean>;
55
- globIgnores: z.ZodDefault<z.ZodArray<z.ZodString>>;
56
- globPatterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
57
- globStrict: z.ZodDefault<z.ZodBoolean>;
58
- templatedURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>>;
59
- additionalPrecacheEntries: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
60
- integrity: z.ZodOptional<z.ZodString>;
61
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
- url: z.ZodString;
63
- }, z.core.$strict>]>>>;
64
- disablePrecacheManifest: z.ZodDefault<z.ZodBoolean>;
65
- dontCacheBustURLsMatching: z.ZodOptional<z.ZodCustom<RegExp, RegExp>>;
66
- manifestTransforms: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodCustom<z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
67
- size: z.ZodNumber;
68
- integrity: z.ZodOptional<z.ZodString>;
69
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
- url: z.ZodString;
71
- }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
72
- manifest: z.ZodArray<z.ZodObject<{
73
- size: z.ZodNumber;
74
- integrity: z.ZodOptional<z.ZodString>;
75
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
- url: z.ZodString;
77
- }, z.core.$strip>>;
78
- warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
79
- }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
80
- size: z.ZodNumber;
81
- integrity: z.ZodOptional<z.ZodString>;
82
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
- url: z.ZodString;
84
- }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
85
- manifest: z.ZodArray<z.ZodObject<{
86
- size: z.ZodNumber;
87
- integrity: z.ZodOptional<z.ZodString>;
88
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
- url: z.ZodString;
90
- }, z.core.$strip>>;
91
- warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
92
- }, z.core.$strict>>>, z.ZodTransform<z.core.$InferOuterFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
93
- size: z.ZodNumber;
94
- integrity: z.ZodOptional<z.ZodString>;
95
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
- url: z.ZodString;
97
- }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
98
- manifest: z.ZodArray<z.ZodObject<{
99
- size: z.ZodNumber;
100
- integrity: z.ZodOptional<z.ZodString>;
101
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
- url: z.ZodString;
103
- }, z.core.$strip>>;
104
- warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
105
- }, z.core.$strict>>, z.core.$InferInnerFunctionTypeAsync<z.ZodTuple<[z.ZodArray<z.ZodObject<{
106
- size: z.ZodNumber;
107
- integrity: z.ZodOptional<z.ZodString>;
108
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
109
- url: z.ZodString;
110
- }, z.core.$strip>>, z.ZodOptional<z.ZodUnknown>], null>, z.ZodObject<{
111
- manifest: z.ZodArray<z.ZodObject<{
112
- size: z.ZodNumber;
113
- integrity: z.ZodOptional<z.ZodString>;
114
- revision: z.ZodOptional<z.ZodNullable<z.ZodString>>;
115
- url: z.ZodString;
116
- }, z.core.$strip>>;
117
- warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
118
- }, z.core.$strict>>>>>>;
119
- maximumFileSizeToCacheInBytes: z.ZodDefault<z.ZodNumber>;
120
- modifyURLPrefix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
121
- }, z.core.$strict>;
122
- //# sourceMappingURL=schema.d.ts.map
@@ -1 +0,0 @@
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;;;;iBA0BhB,CAAC;AAEH,eAAO,MAAM,UAAU;;;iBAGrB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;iBAYhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAOhC,CAAC"}
@@ -1,130 +0,0 @@
1
- import type { InjectPartial as BaseInjectPartial, InjectResolved as BaseInjectResolved, BasePartial, BaseResolved, GlobPartial, GlobResolved, ManifestEntry, RequiredGlobDirectoryPartial, RequiredGlobDirectoryResolved, RequiredSwDestPartial, RequiredSwDestResolved } from "@serwist/build";
2
- import type { Require } from "@serwist/utils";
3
- import type { RollupOptions } from "rollup";
4
- import type { BuildOptions, Plugin, ResolvedConfig } from "vite";
5
- export interface InjectPartial {
6
- /**
7
- * The mode in which your service worker should be built.
8
- *
9
- * @default
10
- * process.env.NODE_ENV // or "production" if undefined
11
- */
12
- mode?: "development" | "production";
13
- /**
14
- * The module type with which the service worker should be registered. Usually used alongside
15
- * `rollupFormat`.
16
- *
17
- * @default "classic"
18
- * @see https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register#type
19
- */
20
- type?: WorkerType;
21
- /**
22
- * The service worker's URL scope. Set to `"/foo/"` so that paths under "/foo/"
23
- * are under the service worker's control while others are not.
24
- *
25
- * @default viteOptions.base
26
- * @see https://vitejs.dev/config/shared-options.html#base
27
- * @see https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register#scope
28
- */
29
- scope?: string;
30
- /**
31
- * The base from which Serwist resolves URLs.
32
- *
33
- * @default viteOptions.base
34
- * @see https://vitejs.dev/config/shared-options.html#base
35
- */
36
- base?: string;
37
- /**
38
- * Whether Serwist should be disabled.
39
- *
40
- * @default false
41
- */
42
- disable?: boolean;
43
- /**
44
- * Hooks of the build lifecycle.
45
- */
46
- integration?: Hooks;
47
- /**
48
- * The URL to the service worker.
49
- *
50
- * @default "/sw.js"
51
- */
52
- swUrl?: string;
53
- /**
54
- * Rollup/Vite plugins used to build the service worker.
55
- */
56
- plugins?: Plugin[];
57
- /**
58
- * The format used to build the service worker.
59
- *
60
- * @default "es"
61
- */
62
- rollupFormat?: "es" | "iife";
63
- /**
64
- * Custom Rollup options used to build the service worker.
65
- */
66
- rollupOptions?: Omit<RollupOptions, "plugins" | "output">;
67
- /**
68
- * Development-specific options.
69
- */
70
- devOptions?: DevOptions;
71
- }
72
- export interface InjectResolved extends Require<InjectPartial, "mode" | "type" | "scope" | "base" | "disable" | "swUrl" | "rollupFormat"> {
73
- devOptions: Required<DevOptions>;
74
- }
75
- export interface InjectManifestOptions extends Omit<BasePartial, "disablePrecacheManifest">, GlobPartial, BaseInjectPartial, RequiredSwDestPartial, RequiredGlobDirectoryPartial, InjectPartial {
76
- }
77
- export interface InjectManifestOptionsComplete extends BaseResolved, GlobResolved, BaseInjectResolved, RequiredSwDestResolved, RequiredGlobDirectoryResolved, InjectResolved {
78
- }
79
- export interface Hooks {
80
- /**
81
- * Allows you to run some logic before the service worker is built.
82
- * @param options
83
- * @returns
84
- */
85
- beforeBuildServiceWorker?: (options: PluginOptionsComplete) => void | Promise<void>;
86
- /**
87
- * Adjusts the application order of `@serwist/vite`'s `closeBundle` hook.
88
- */
89
- closeBundleOrder?: "pre" | "post" | null;
90
- /**
91
- * Allows you to configure the options of Serwist and Vite. Useful when there is a dependency between the two.
92
- * @param viteOptions
93
- * @param options
94
- * @returns
95
- */
96
- configureOptions?: (viteOptions: ResolvedConfig, options: PluginOptions) => void | Promise<void>;
97
- }
98
- export interface DevOptions {
99
- /**
100
- * Whether the service worker should be bundled in development mode.
101
- *
102
- * @default true
103
- */
104
- bundle?: boolean;
105
- /**
106
- * Whether the service worker should be minified in development mode.
107
- *
108
- * @default false
109
- */
110
- minify?: BuildOptions["minify"];
111
- }
112
- export interface PluginOptions extends InjectManifestOptions {
113
- }
114
- export interface PluginOptionsComplete extends InjectResolved {
115
- injectManifest: Omit<InjectManifestOptionsComplete, keyof InjectResolved>;
116
- }
117
- export interface SerwistViteApi {
118
- /**
119
- * Whether the plugin is disabled.
120
- */
121
- disabled: boolean;
122
- /**
123
- * Extends the precache manifest.
124
- * @param fn
125
- */
126
- extendManifestEntries(fn: ExtendManifestEntriesHook): void;
127
- generateSW(): Promise<void>;
128
- }
129
- export type ExtendManifestEntriesHook = (manifestEntries: (string | ManifestEntry)[]) => (string | ManifestEntry)[] | undefined;
130
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"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"}
@@ -1,24 +0,0 @@
1
- export declare const slash: (str: string) => string;
2
- export declare const resolveBasePath: (base: string) => string;
3
- export declare const isAbsolute: (url: string) => RegExpMatchArray | null;
4
- export declare const normalizePath: (path: string) => string;
5
- /**
6
- * Internal function used by `@serwist/vite`.
7
- * Resolves a file path without extension. Also handles `/index` if the path
8
- * actually points to a directory.
9
- * @internal
10
- * @param ctx
11
- * @param api
12
- * @returns
13
- */
14
- export declare const resolveEntry: (entry: string) => string | null;
15
- /**
16
- * Internal function used by `@serwist/vite`.
17
- * Converts a filesystem path to a Vite `@fs` URL.
18
- * @internal
19
- * @param ctx
20
- * @param api
21
- * @returns
22
- */
23
- export declare const toFs: (str: string) => string;
24
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK,GAAI,KAAK,MAAM,WAEhC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,WAG3C,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,4BAErC,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,WAEzC,CAAC;AAIF;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MAAM,GAAG,IAqBrD,CAAC;AAIF;;;;;;;GAOG;AACH,eAAO,MAAM,IAAI,GAAI,KAAK,MAAM,WAI/B,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { InjectManifestOptionsComplete } from "./types.js";
2
- export declare const validateInjectManifestOptions: (input: unknown) => Promise<InjectManifestOptionsComplete>;
3
- //# sourceMappingURL=validator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/lib/validator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAEhE,eAAO,MAAM,6BAA6B,GAAU,OAAO,OAAO,KAAG,OAAO,CAAC,6BAA6B,CAMzG,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { Plugin } from "vite";
2
- import type { SerwistViteContext } from "../lib/context.js";
3
- import type { SerwistViteApi } from "../lib/types.js";
4
- /**
5
- * Internal build plugin used by `@serwist/vite`.
6
- * @internal
7
- * @param ctx
8
- * @param api
9
- * @returns
10
- */
11
- export declare const buildPlugin: (ctx: SerwistViteContext, api: SerwistViteApi) => Plugin;
12
- //# sourceMappingURL=build.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/plugins/build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,kBAAkB,EAAE,KAAK,cAAc,KAC9D,MAiBT,CAAC"}
@@ -1,12 +0,0 @@
1
- import { type Plugin } from "vite";
2
- import type { SerwistViteContext } from "../lib/context.js";
3
- import type { SerwistViteApi } from "../lib/types.js";
4
- /**
5
- * Internal dev plugin used by `@serwist/vite`.
6
- * @internal
7
- * @param ctx
8
- * @param api
9
- * @returns
10
- */
11
- export declare const devPlugin: (ctx: SerwistViteContext, api: SerwistViteApi) => Plugin;
12
- //# sourceMappingURL=dev.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/plugins/dev.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,MAAM,CAAC;AAElD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAStD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,kBAAkB,EAAE,KAAK,cAAc,KAAG,MAsCxE,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { Plugin } from "vite";
2
- import type { SerwistViteContext } from "../lib/context.js";
3
- import type { SerwistViteApi } from "../lib/types.js";
4
- /**
5
- * Internal plugin used by `@serwist/vite`.
6
- * @internal
7
- * @param ctx
8
- * @param api
9
- * @returns
10
- */
11
- export declare const mainPlugin: (ctx: SerwistViteContext, api: SerwistViteApi) => Plugin;
12
- //# sourceMappingURL=main.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/plugins/main.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,MAAM,CAAC;AAG/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,KAAK,kBAAkB,EAAE,KAAK,cAAc,KAC7D,MAqCT,CAAC"}
package/src/rollup.js DELETED
@@ -1,23 +0,0 @@
1
- // @ts-check
2
- import { getRollupOptions } from "@serwist/configs/rollup";
3
-
4
- import packageJson from "../package.json" with { type: "json" };
5
-
6
- export default getRollupOptions({
7
- packageJson,
8
- jsFiles: [
9
- {
10
- input: {
11
- index: "src/index.ts",
12
- "index.worker": "src/index.worker.ts",
13
- "index.schema": "src/index.schema.ts",
14
- },
15
- output: {
16
- dir: "dist",
17
- entryFileNames: "[name].js",
18
- chunkFileNames: "chunks/[name].js",
19
- format: "esm",
20
- },
21
- },
22
- ],
23
- });
File without changes