@serwist/nuxt 9.0.0-preview.9 → 9.0.1
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 +4 -5
- package/dist/module.d.ts +4 -5
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -4
- package/dist/runtime/plugins/client.mjs +1 -1
- package/package.json +17 -21
package/dist/module.d.mts
CHANGED
@@ -18,7 +18,7 @@ import { PluginOptions } from '@serwist/vite';
|
|
18
18
|
* const b: B = { a: "hehe" }; //invalid
|
19
19
|
* const c: B = { a: "hehe", b: "hehe" }; //invalid
|
20
20
|
*/
|
21
|
-
type
|
21
|
+
type Require<T, U extends keyof T> = T & Required<Pick<T, U>>;
|
22
22
|
/**
|
23
23
|
* Make certain fields in a object type optional
|
24
24
|
*
|
@@ -32,7 +32,7 @@ type RequiredFields<T, U extends keyof T> = T & Required<Pick<T, U>>;
|
|
32
32
|
* const b: B = { a: "hehe" }; //valid
|
33
33
|
* const b: B = {}; //invalid
|
34
34
|
*/
|
35
|
-
type
|
35
|
+
type Optional<T, U extends keyof T> = Omit<T, U> & Partial<Pick<T, U>>;
|
36
36
|
|
37
37
|
interface ClientOptions {
|
38
38
|
/**
|
@@ -40,15 +40,14 @@ interface ClientOptions {
|
|
40
40
|
*/
|
41
41
|
registerPlugin?: boolean;
|
42
42
|
}
|
43
|
-
interface ModuleOptions extends
|
44
|
-
manifest?: string;
|
43
|
+
interface ModuleOptions extends Optional<PluginOptions, "swSrc" | "swDest" | "globDirectory"> {
|
45
44
|
/**
|
46
45
|
* Options for plugin.
|
47
46
|
*/
|
48
47
|
client?: ClientOptions;
|
49
48
|
}
|
50
49
|
|
51
|
-
declare const _default: _nuxt_schema.NuxtModule<
|
50
|
+
declare const _default: _nuxt_schema.NuxtModule<Require<ModuleOptions, "swUrl" | "swSrc" | "swDest" | "globDirectory" | "injectionPoint">>;
|
52
51
|
|
53
52
|
declare module "@nuxt/schema" {
|
54
53
|
interface NuxtConfig {
|
package/dist/module.d.ts
CHANGED
@@ -18,7 +18,7 @@ import { PluginOptions } from '@serwist/vite';
|
|
18
18
|
* const b: B = { a: "hehe" }; //invalid
|
19
19
|
* const c: B = { a: "hehe", b: "hehe" }; //invalid
|
20
20
|
*/
|
21
|
-
type
|
21
|
+
type Require<T, U extends keyof T> = T & Required<Pick<T, U>>;
|
22
22
|
/**
|
23
23
|
* Make certain fields in a object type optional
|
24
24
|
*
|
@@ -32,7 +32,7 @@ type RequiredFields<T, U extends keyof T> = T & Required<Pick<T, U>>;
|
|
32
32
|
* const b: B = { a: "hehe" }; //valid
|
33
33
|
* const b: B = {}; //invalid
|
34
34
|
*/
|
35
|
-
type
|
35
|
+
type Optional<T, U extends keyof T> = Omit<T, U> & Partial<Pick<T, U>>;
|
36
36
|
|
37
37
|
interface ClientOptions {
|
38
38
|
/**
|
@@ -40,15 +40,14 @@ interface ClientOptions {
|
|
40
40
|
*/
|
41
41
|
registerPlugin?: boolean;
|
42
42
|
}
|
43
|
-
interface ModuleOptions extends
|
44
|
-
manifest?: string;
|
43
|
+
interface ModuleOptions extends Optional<PluginOptions, "swSrc" | "swDest" | "globDirectory"> {
|
45
44
|
/**
|
46
45
|
* Options for plugin.
|
47
46
|
*/
|
48
47
|
client?: ClientOptions;
|
49
48
|
}
|
50
49
|
|
51
|
-
declare const _default: _nuxt_schema.NuxtModule<
|
50
|
+
declare const _default: _nuxt_schema.NuxtModule<Require<ModuleOptions, "swUrl" | "swSrc" | "swDest" | "globDirectory" | "injectionPoint">>;
|
52
51
|
|
53
52
|
declare module "@nuxt/schema" {
|
54
53
|
interface NuxtConfig {
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
@@ -6,7 +6,7 @@ import { createReadStream } from 'node:fs';
|
|
6
6
|
import fs from 'node:fs/promises';
|
7
7
|
import pathe from 'pathe';
|
8
8
|
|
9
|
-
const version = "9.0.
|
9
|
+
const version = "9.0.1";
|
10
10
|
|
11
11
|
function configurePwaOptions(options, nuxt, nitroConfig) {
|
12
12
|
let buildAssetsDir = nuxt.options.app.buildAssetsDir ?? "_nuxt/";
|
@@ -96,7 +96,6 @@ const module = defineNuxtModule({
|
|
96
96
|
return {
|
97
97
|
base: nuxt.options.app.baseURL,
|
98
98
|
scope: nuxt.options.app.baseURL,
|
99
|
-
injectRegister: false,
|
100
99
|
client: {
|
101
100
|
registerPlugin: true
|
102
101
|
},
|
@@ -113,7 +112,7 @@ const module = defineNuxtModule({
|
|
113
112
|
const resolver = createResolver(import.meta.url);
|
114
113
|
let ctx;
|
115
114
|
let api;
|
116
|
-
const {
|
115
|
+
const { client: _client, ...userOptions } = options;
|
117
116
|
const client = { registerPlugin: true, ..._client };
|
118
117
|
const runtimeDir = resolver.resolve("./runtime");
|
119
118
|
if (!nuxt.options.ssr)
|
@@ -125,7 +124,7 @@ const module = defineNuxtModule({
|
|
125
124
|
});
|
126
125
|
}
|
127
126
|
nuxt.hook("prepare:types", ({ references }) => {
|
128
|
-
references.push({ path: resolver.resolve(runtimeDir, "plugins/augmentation") });
|
127
|
+
references.push({ path: resolver.resolve(runtimeDir, "plugins/augmentation.d.ts") });
|
129
128
|
});
|
130
129
|
nuxt.hook("nitro:init", (nitro) => {
|
131
130
|
configurePwaOptions(options, nuxt, nitro.options);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@serwist/nuxt",
|
3
|
-
"version": "9.0.
|
3
|
+
"version": "9.0.1",
|
4
4
|
"type": "module",
|
5
5
|
"description": "A Nuxt module that integrates Serwist into your application.",
|
6
6
|
"files": [
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"engines": {
|
24
24
|
"node": ">=18.0.0"
|
25
25
|
},
|
26
|
-
"repository": "serwist/serwist",
|
26
|
+
"repository": "https://github.com/serwist/serwist",
|
27
27
|
"bugs": "https://github.com/serwist/serwist/issues",
|
28
28
|
"homepage": "https://serwist.pages.dev",
|
29
29
|
"main": "./dist/module.mjs",
|
@@ -45,38 +45,34 @@
|
|
45
45
|
"vite",
|
46
46
|
"@nuxt/kit",
|
47
47
|
"@serwist/build",
|
48
|
-
"@serwist/core",
|
49
48
|
"@serwist/vite",
|
50
49
|
"pathe",
|
51
50
|
"ufo",
|
52
|
-
"virtual:serwist-nuxt-configuration"
|
51
|
+
"virtual:serwist-nuxt-configuration",
|
52
|
+
"virtual:serwist"
|
53
53
|
]
|
54
54
|
},
|
55
55
|
"dependencies": {
|
56
|
-
"@nuxt/kit": "3.
|
56
|
+
"@nuxt/kit": "3.11.2",
|
57
57
|
"fast-json-stable-stringify": "2.1.0",
|
58
58
|
"pathe": "1.1.2",
|
59
|
-
"ufo": "1.3
|
60
|
-
"@serwist/build": "9.0.
|
61
|
-
"@serwist/vite": "9.0.
|
62
|
-
"@serwist/window": "9.0.
|
59
|
+
"ufo": "1.5.3",
|
60
|
+
"@serwist/build": "9.0.1",
|
61
|
+
"@serwist/vite": "9.0.1",
|
62
|
+
"@serwist/window": "9.0.1"
|
63
63
|
},
|
64
64
|
"devDependencies": {
|
65
65
|
"@nuxt/module-builder": "0.5.5",
|
66
|
-
"@nuxt/schema": "3.
|
67
|
-
"@
|
68
|
-
"
|
69
|
-
"
|
70
|
-
"eslint": "8.56.0",
|
71
|
-
"nuxt": "3.10.1",
|
72
|
-
"publint": "0.2.7",
|
66
|
+
"@nuxt/schema": "3.11.2",
|
67
|
+
"@types/node": "20.12.7",
|
68
|
+
"eslint": "9.0.0",
|
69
|
+
"nuxt": "3.11.2",
|
73
70
|
"rimraf": "5.0.5",
|
74
71
|
"serve": "14.2.1",
|
75
|
-
"typescript": "5.
|
76
|
-
"vite": "5.
|
77
|
-
"
|
78
|
-
"
|
79
|
-
"@serwist/constants": "9.0.0-preview.9"
|
72
|
+
"typescript": "5.5.0-dev.20240415",
|
73
|
+
"vite": "5.2.8",
|
74
|
+
"vue-tsc": "2.0.13",
|
75
|
+
"@serwist/configs": "9.0.1"
|
80
76
|
},
|
81
77
|
"peerDependencies": {
|
82
78
|
"typescript": ">=5.0.0",
|