@eclipse-docks/extension-pwa 0.7.91 → 0.7.92

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-docks/extension-pwa",
3
- "version": "0.7.91",
3
+ "version": "0.7.92",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "exports": {
@@ -9,7 +9,8 @@
9
9
  "import": "./dist/index.js"
10
10
  },
11
11
  "./vite": {
12
- "import": "./src/vite-pwa-plugin.ts"
12
+ "types": "./src/vite-pwa-plugin.d.ts",
13
+ "import": "./src/vite-pwa-plugin.js"
13
14
  },
14
15
  "./sw": {
15
16
  "import": "./src/sw.ts"
@@ -29,7 +30,8 @@
29
30
  "files": [
30
31
  "dist",
31
32
  "src/sw.ts",
32
- "src/vite-pwa-plugin.ts"
33
+ "src/vite-pwa-plugin.js",
34
+ "src/vite-pwa-plugin.d.ts"
33
35
  ],
34
36
  "scripts": {
35
37
  "build": "vite build"
@@ -0,0 +1,13 @@
1
+ import type { PluginOption } from 'vite';
2
+
3
+ export type CreateDocksPwaPluginOptions = {
4
+ basePath: string;
5
+ appName: string;
6
+ appDescription: string;
7
+ maximumFileSizeToCacheInBytes: number;
8
+ shortName?: string;
9
+ };
10
+
11
+ export declare function createDocksPwaPlugin(
12
+ options: CreateDocksPwaPluginOptions,
13
+ ): PluginOption;
@@ -1,16 +1,7 @@
1
1
  import { fileURLToPath } from 'url';
2
2
  import path from 'path';
3
- import type { PluginOption } from 'vite';
4
3
  import { VitePWA } from 'vite-plugin-pwa';
5
4
 
6
- type CreateDocksPwaPluginOptions = {
7
- basePath: string;
8
- appName: string;
9
- appDescription: string;
10
- maximumFileSizeToCacheInBytes: number;
11
- shortName?: string;
12
- };
13
-
14
5
  const DEFAULT_GLOB_PATTERNS = ['**/*.{js,css,html,ico,png,svg,webp,woff2,woff,ttf,wasm}'];
15
6
  const DEFAULT_ASSETS = ['favicon.svg', 'logo.svg', 'logo-loading.svg'];
16
7
  const pwaSwPath = fileURLToPath(new URL('./sw.ts', import.meta.url));
@@ -23,7 +14,7 @@ export function createDocksPwaPlugin({
23
14
  appDescription,
24
15
  maximumFileSizeToCacheInBytes,
25
16
  shortName = appName,
26
- }: CreateDocksPwaPluginOptions): PluginOption {
17
+ }) {
27
18
  return VitePWA({
28
19
  registerType: 'autoUpdate',
29
20
  injectRegister: 'inline',
@@ -1,11 +0,0 @@
1
- import { PluginOption } from 'vite';
2
- type CreateDocksPwaPluginOptions = {
3
- basePath: string;
4
- appName: string;
5
- appDescription: string;
6
- maximumFileSizeToCacheInBytes: number;
7
- shortName?: string;
8
- };
9
- export declare function createDocksPwaPlugin({ basePath, appName, appDescription, maximumFileSizeToCacheInBytes, shortName, }: CreateDocksPwaPluginOptions): PluginOption;
10
- export {};
11
- //# sourceMappingURL=vite-pwa-plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vite-pwa-plugin.d.ts","sourceRoot":"","sources":["../src/vite-pwa-plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAGzC,KAAK,2BAA2B,GAAG;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,6BAA6B,EAAE,MAAM,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAQF,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,cAAc,EACd,6BAA6B,EAC7B,SAAmB,GACpB,EAAE,2BAA2B,GAAG,YAAY,CAwC5C"}