@serwist/nuxt 9.0.0-preview.2 → 9.0.0-preview.21

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 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 RequiredFields<T, U extends keyof T> = T & Required<Pick<T, U>>;
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 OptionalFields<T, U extends keyof T> = Omit<T, U> & Partial<Pick<T, U>>;
35
+ type Optional<T, U extends keyof T> = Omit<T, U> & Partial<Pick<T, U>>;
36
36
 
37
37
  interface ClientOptions {
38
38
  /**
@@ -40,7 +40,7 @@ interface ClientOptions {
40
40
  */
41
41
  registerPlugin?: boolean;
42
42
  }
43
- interface ModuleOptions extends OptionalFields<PluginOptions, "swSrc" | "swDest" | "globDirectory"> {
43
+ interface ModuleOptions extends Optional<PluginOptions, "swSrc" | "swDest" | "globDirectory"> {
44
44
  manifest?: string;
45
45
  /**
46
46
  * Options for plugin.
@@ -48,7 +48,7 @@ interface ModuleOptions extends OptionalFields<PluginOptions, "swSrc" | "swDest"
48
48
  client?: ClientOptions;
49
49
  }
50
50
 
51
- declare const _default: _nuxt_schema.NuxtModule<RequiredFields<ModuleOptions, "swUrl" | "swSrc" | "swDest" | "globDirectory" | "injectionPoint">>;
51
+ declare const _default: _nuxt_schema.NuxtModule<Require<ModuleOptions, "swUrl" | "swSrc" | "swDest" | "globDirectory" | "injectionPoint">>;
52
52
 
53
53
  declare module "@nuxt/schema" {
54
54
  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 RequiredFields<T, U extends keyof T> = T & Required<Pick<T, U>>;
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 OptionalFields<T, U extends keyof T> = Omit<T, U> & Partial<Pick<T, U>>;
35
+ type Optional<T, U extends keyof T> = Omit<T, U> & Partial<Pick<T, U>>;
36
36
 
37
37
  interface ClientOptions {
38
38
  /**
@@ -40,7 +40,7 @@ interface ClientOptions {
40
40
  */
41
41
  registerPlugin?: boolean;
42
42
  }
43
- interface ModuleOptions extends OptionalFields<PluginOptions, "swSrc" | "swDest" | "globDirectory"> {
43
+ interface ModuleOptions extends Optional<PluginOptions, "swSrc" | "swDest" | "globDirectory"> {
44
44
  manifest?: string;
45
45
  /**
46
46
  * Options for plugin.
@@ -48,7 +48,7 @@ interface ModuleOptions extends OptionalFields<PluginOptions, "swSrc" | "swDest"
48
48
  client?: ClientOptions;
49
49
  }
50
50
 
51
- declare const _default: _nuxt_schema.NuxtModule<RequiredFields<ModuleOptions, "swUrl" | "swSrc" | "swDest" | "globDirectory" | "injectionPoint">>;
51
+ declare const _default: _nuxt_schema.NuxtModule<Require<ModuleOptions, "swUrl" | "swSrc" | "swDest" | "globDirectory" | "injectionPoint">>;
52
52
 
53
53
  declare module "@nuxt/schema" {
54
54
  interface NuxtConfig {
package/dist/module.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "nuxt": "^3.8.0",
6
6
  "bridge": false
7
7
  },
8
- "version": "9.0.0-preview.2"
8
+ "version": "9.0.0-preview.20"
9
9
  }
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.0-preview.2";
9
+ const version = "9.0.0-preview.20";
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
  },
@@ -133,7 +132,7 @@ const module = defineNuxtModule({
133
132
  nuxt.hook("vite:extend", ({ config }) => {
134
133
  const plugin = config.plugins?.find((p) => p && typeof p === "object" && "name" in p && p.name === "@serwist/vite");
135
134
  if (plugin) {
136
- throw new Error("Remove @serwist/vite from your Vite configuration! Do not use it alongside @serwist/nuxt.");
135
+ throw new Error("Remove '@serwist/vite' from your Vite configuration! Do not use it alongside '@serwist/nuxt'.");
137
136
  }
138
137
  });
139
138
  nuxt.hook("vite:extendConfig", async (viteInlineConfig, { isClient }) => {
@@ -142,7 +141,7 @@ const module = defineNuxtModule({
142
141
  }
143
142
  const plugin = viteInlineConfig.plugins.find((p) => p && typeof p === "object" && "name" in p && p.name === "@serwist/vite");
144
143
  if (plugin) {
145
- throw new Error("Remove @serwist/vite from your Vite conoptionsfiguration! Do not use it alongside @serwist/nuxt.");
144
+ throw new Error("Remove '@serwist/vite' from your Vite configuration! Do not use it alongside '@serwist/nuxt'.");
146
145
  }
147
146
  if (isClient) {
148
147
  const configuration = "virtual:serwist-nuxt-configuration";
@@ -170,7 +169,7 @@ const module = defineNuxtModule({
170
169
  viteInlineConfig.plugins.push(plugins);
171
170
  });
172
171
  extendWebpackConfig(() => {
173
- throw new Error("Webpack is not supported: @serwist/nuxt can only be used with Vite!");
172
+ throw new Error("Webpack is not supported: '@serwist/nuxt' can only be used with Vite!");
174
173
  });
175
174
  if (!nuxt.options.dev) {
176
175
  nuxt.hook("nitro:build:public-assets", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serwist/nuxt",
3
- "version": "9.0.0-preview.2",
3
+ "version": "9.0.0-preview.21",
4
4
  "type": "module",
5
5
  "description": "A Nuxt module that integrates Serwist into your application.",
6
6
  "files": [
@@ -23,8 +23,8 @@
23
23
  "engines": {
24
24
  "node": ">=18.0.0"
25
25
  },
26
- "repository": "serwist/serwist",
27
- "bugs": "https://github.com/serwist/serwist/issues",
26
+ "repository": "https://gitlab.com/serwist/serwist",
27
+ "bugs": "https://gitlab.com/serwist/serwist/issues",
28
28
  "homepage": "https://serwist.pages.dev",
29
29
  "main": "./dist/module.mjs",
30
30
  "types": "./dist/types.d.ts",
@@ -53,30 +53,30 @@
53
53
  ]
54
54
  },
55
55
  "dependencies": {
56
- "@nuxt/kit": "3.10.1",
56
+ "@nuxt/kit": "3.11.1",
57
57
  "fast-json-stable-stringify": "2.1.0",
58
58
  "pathe": "1.1.2",
59
- "ufo": "1.3.2",
60
- "@serwist/build": "9.0.0-preview.2",
61
- "@serwist/vite": "9.0.0-preview.2",
62
- "@serwist/window": "9.0.0-preview.2"
59
+ "ufo": "1.5.3",
60
+ "@serwist/build": "9.0.0-preview.21",
61
+ "@serwist/vite": "9.0.0-preview.21",
62
+ "@serwist/window": "9.0.0-preview.21"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@nuxt/module-builder": "0.5.5",
66
- "@nuxt/schema": "3.10.1",
67
- "@nuxt/test-utils": "3.11.0",
68
- "@playwright/test": "1.41.2",
69
- "@types/node": "20.11.16",
70
- "eslint": "8.56.0",
71
- "nuxt": "3.10.1",
66
+ "@nuxt/schema": "3.11.1",
67
+ "@nuxt/test-utils": "3.12.0",
68
+ "@playwright/test": "1.42.1",
69
+ "@types/node": "20.11.30",
70
+ "eslint": "8.57.0",
71
+ "nuxt": "3.11.1",
72
72
  "publint": "0.2.7",
73
73
  "rimraf": "5.0.5",
74
74
  "serve": "14.2.1",
75
- "typescript": "5.4.0-dev.20240206",
76
- "vite": "5.0.12",
77
- "vitest": "1.2.2",
78
- "vue-tsc": "1.8.27",
79
- "@serwist/constants": "9.0.0-preview.2"
75
+ "typescript": "5.5.0-dev.20240323",
76
+ "vite": "5.2.4",
77
+ "vitest": "1.4.0",
78
+ "vue-tsc": "2.0.7",
79
+ "@serwist/constants": "9.0.0-preview.21"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "typescript": ">=5.0.0",