@serwist/nuxt 9.0.12 → 9.0.13
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/dist/module.d.mts +2 -1
- package/dist/module.json +2 -2
- package/dist/module.mjs +7 -12
- package/dist/runtime/plugins/client.d.ts +5 -1
- package/dist/types.d.mts +3 -1
- package/package.json +13 -14
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -34
- package/dist/types.d.ts +0 -1
package/dist/module.d.mts
CHANGED
@@ -31,4 +31,5 @@ interface ModuleOptions extends Optional<PluginOptions, "swSrc" | "swDest" | "gl
|
|
31
31
|
|
32
32
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
33
33
|
|
34
|
-
export {
|
34
|
+
export { _default as default };
|
35
|
+
export type { ClientOptions, ModuleOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
@@ -1,18 +1,16 @@
|
|
1
1
|
import path from 'node:path';
|
2
2
|
import { defineNuxtModule, createResolver, addPlugin, extendWebpackConfig } from '@nuxt/kit';
|
3
|
-
import {
|
3
|
+
import { createContext, createApi, main, dev, resolveEntry } from '@serwist/vite';
|
4
4
|
import { createHash } from 'node:crypto';
|
5
5
|
import { createReadStream } from 'node:fs';
|
6
6
|
import fsp from 'node:fs/promises';
|
7
7
|
|
8
|
-
const version = "9.0.
|
8
|
+
const version = "9.0.13";
|
9
9
|
|
10
10
|
function configurePwaOptions(options, nuxt, nitroConfig) {
|
11
11
|
let buildAssetsDir = nuxt.options.app.buildAssetsDir ?? "_nuxt/";
|
12
|
-
if (buildAssetsDir[0] === "/")
|
13
|
-
|
14
|
-
if (buildAssetsDir[buildAssetsDir.length - 1] !== "/")
|
15
|
-
buildAssetsDir += "/";
|
12
|
+
if (buildAssetsDir[0] === "/") buildAssetsDir = buildAssetsDir.slice(1);
|
13
|
+
if (buildAssetsDir[buildAssetsDir.length - 1] !== "/") buildAssetsDir += "/";
|
16
14
|
if (!("dontCacheBustURLsMatching" in options)) {
|
17
15
|
options.dontCacheBustURLsMatching = new RegExp(buildAssetsDir);
|
18
16
|
}
|
@@ -68,10 +66,8 @@ function createManifestTransform(base, publicDir, appManifestFolder) {
|
|
68
66
|
});
|
69
67
|
});
|
70
68
|
const latestEntry = entries.find((e) => e.url === latest);
|
71
|
-
if (latestEntry)
|
72
|
-
|
73
|
-
else
|
74
|
-
entries.push({ url: latest, revision, size: data.size });
|
69
|
+
if (latestEntry) latestEntry.revision = revision;
|
70
|
+
else entries.push({ url: latest, revision, size: data.size });
|
75
71
|
} else {
|
76
72
|
entries = entries.filter((e) => e.url !== latest);
|
77
73
|
}
|
@@ -114,8 +110,7 @@ const module = defineNuxtModule({
|
|
114
110
|
const { client: _client, ...userOptions } = options;
|
115
111
|
const client = { registerPlugin: true, ..._client };
|
116
112
|
const runtimeDir = resolver.resolve("./runtime");
|
117
|
-
if (!nuxt.options.ssr)
|
118
|
-
nuxt.options.build.transpile.push(runtimeDir);
|
113
|
+
if (!nuxt.options.ssr) nuxt.options.build.transpile.push(runtimeDir);
|
119
114
|
if (client.registerPlugin) {
|
120
115
|
addPlugin({
|
121
116
|
src: resolver.resolve(runtimeDir, "plugins/client"),
|
package/dist/types.d.mts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@serwist/nuxt",
|
3
|
-
"version": "9.0.
|
3
|
+
"version": "9.0.13",
|
4
4
|
"type": "module",
|
5
5
|
"description": "A Nuxt module that integrates Serwist into your application.",
|
6
6
|
"files": [
|
@@ -27,7 +27,6 @@
|
|
27
27
|
"bugs": "https://github.com/serwist/serwist/issues",
|
28
28
|
"homepage": "https://serwist.pages.dev",
|
29
29
|
"main": "./dist/module.mjs",
|
30
|
-
"types": "./dist/types.d.ts",
|
31
30
|
"exports": {
|
32
31
|
".": {
|
33
32
|
"types": "./dist/types.d.mts",
|
@@ -51,23 +50,23 @@
|
|
51
50
|
]
|
52
51
|
},
|
53
52
|
"dependencies": {
|
54
|
-
"@nuxt/kit": "3.
|
55
|
-
"@serwist/build": "9.0.
|
56
|
-
"@serwist/vite": "9.0.
|
57
|
-
"@serwist/window": "9.0.
|
53
|
+
"@nuxt/kit": "3.16.2",
|
54
|
+
"@serwist/build": "9.0.13",
|
55
|
+
"@serwist/vite": "9.0.13",
|
56
|
+
"@serwist/window": "9.0.13"
|
58
57
|
},
|
59
58
|
"devDependencies": {
|
60
|
-
"@nuxt/module-builder": "0.
|
61
|
-
"@nuxt/schema": "3.
|
62
|
-
"@types/node": "22.
|
63
|
-
"eslint": "9.
|
64
|
-
"nuxt": "3.
|
59
|
+
"@nuxt/module-builder": "1.0.0",
|
60
|
+
"@nuxt/schema": "3.16.2",
|
61
|
+
"@types/node": "22.14.0",
|
62
|
+
"eslint": "9.24.0",
|
63
|
+
"nuxt": "3.16.2",
|
65
64
|
"rimraf": "5.0.9",
|
66
65
|
"serve": "14.2.4",
|
67
66
|
"typescript": "5.6.3",
|
68
|
-
"vite": "6.
|
69
|
-
"vue-tsc": "2.2.
|
70
|
-
"@serwist/configs": "9.0.
|
67
|
+
"vite": "6.2.5",
|
68
|
+
"vue-tsc": "2.2.8",
|
69
|
+
"@serwist/configs": "9.0.13"
|
71
70
|
},
|
72
71
|
"peerDependencies": {
|
73
72
|
"typescript": ">=5.0.0",
|
package/dist/module.cjs
DELETED
package/dist/module.d.ts
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
import * as _nuxt_schema from '@nuxt/schema';
|
2
|
-
import { PluginOptions } from '@serwist/vite';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* Make certain fields in a object type optional
|
6
|
-
*
|
7
|
-
* @example
|
8
|
-
* interface A {
|
9
|
-
* a: string;
|
10
|
-
* b: string;
|
11
|
-
* c: string;
|
12
|
-
* }
|
13
|
-
* type B = Optional<A, "b" | "c">;
|
14
|
-
* const b: B = { a: "hehe" }; //valid
|
15
|
-
* const b: B = {}; //invalid
|
16
|
-
*/
|
17
|
-
type Optional<T, U extends keyof T> = Omit<T, U> & Partial<Pick<T, U>>;
|
18
|
-
|
19
|
-
interface ClientOptions {
|
20
|
-
/**
|
21
|
-
* Whether this plugin should be registered.
|
22
|
-
*/
|
23
|
-
registerPlugin?: boolean;
|
24
|
-
}
|
25
|
-
interface ModuleOptions extends Optional<PluginOptions, "swSrc" | "swDest" | "globDirectory"> {
|
26
|
-
/**
|
27
|
-
* Options for plugin.
|
28
|
-
*/
|
29
|
-
client?: ClientOptions;
|
30
|
-
}
|
31
|
-
|
32
|
-
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
33
|
-
|
34
|
-
export { type ClientOptions, type ModuleOptions, _default as default };
|
package/dist/types.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export { type ClientOptions, type ModuleOptions, default } from './module'
|