@serwist/nuxt 8.4.0
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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/module.cjs +5 -0
- package/dist/module.d.mts +62 -0
- package/dist/module.d.ts +62 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +185 -0
- package/dist/runtime/plugins/augmentation.d.ts +21 -0
- package/dist/runtime/plugins/client.d.ts +2 -0
- package/dist/runtime/plugins/client.mjs +11 -0
- package/dist/types.d.mts +16 -0
- package/dist/types.d.ts +16 -0
- package/package.json +91 -0
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2020-2023 Anthony Fu <https://github.com/antfu>, 2023 Serwist
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
This module's documentation is a work-in-progress.
|
package/dist/module.cjs
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
2
|
+
import { PluginOptions } from '@serwist/vite';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Make certain fields in a object type required
|
6
|
+
*
|
7
|
+
* @example
|
8
|
+
* interface A {
|
9
|
+
* a?: string;
|
10
|
+
* b?: string;
|
11
|
+
* c?: string;
|
12
|
+
* }
|
13
|
+
* type B = RequiredFields<A, "b" | "c">;
|
14
|
+
* const b: B = {
|
15
|
+
* b: "hehe",
|
16
|
+
* c: "hehe",
|
17
|
+
* }; //valid
|
18
|
+
* const b: B = { a: "hehe" }; //invalid
|
19
|
+
* const c: B = { a: "hehe", b: "hehe" }; //invalid
|
20
|
+
*/
|
21
|
+
type RequiredFields<T, U extends keyof T> = T & Required<Pick<T, U>>;
|
22
|
+
/**
|
23
|
+
* Make certain fields in a object type optional
|
24
|
+
*
|
25
|
+
* @example
|
26
|
+
* interface A {
|
27
|
+
* a: string;
|
28
|
+
* b: string;
|
29
|
+
* c: string;
|
30
|
+
* }
|
31
|
+
* type B = Optional<A, "b" | "c">;
|
32
|
+
* const b: B = { a: "hehe" }; //valid
|
33
|
+
* const b: B = {}; //invalid
|
34
|
+
*/
|
35
|
+
type OptionalFields<T, U extends keyof T> = Omit<T, U> & Partial<Pick<T, U>>;
|
36
|
+
|
37
|
+
interface ClientOptions {
|
38
|
+
/**
|
39
|
+
* Whether this plugin should be registered.
|
40
|
+
*/
|
41
|
+
registerPlugin?: boolean;
|
42
|
+
}
|
43
|
+
interface ModuleOptions extends OptionalFields<PluginOptions, "swSrc" | "swDest" | "globDirectory"> {
|
44
|
+
manifest?: string;
|
45
|
+
/**
|
46
|
+
* Options for plugin.
|
47
|
+
*/
|
48
|
+
client?: ClientOptions;
|
49
|
+
}
|
50
|
+
|
51
|
+
declare const _default: _nuxt_schema.NuxtModule<RequiredFields<ModuleOptions, "swUrl" | "swSrc" | "swDest" | "globDirectory" | "injectionPoint">>;
|
52
|
+
|
53
|
+
declare module "@nuxt/schema" {
|
54
|
+
interface NuxtConfig {
|
55
|
+
["serwist"]?: ModuleOptions;
|
56
|
+
}
|
57
|
+
interface NuxtOptions {
|
58
|
+
["serwist"]?: ModuleOptions;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
export { type ClientOptions, type ModuleOptions, _default as default };
|
package/dist/module.d.ts
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
2
|
+
import { PluginOptions } from '@serwist/vite';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Make certain fields in a object type required
|
6
|
+
*
|
7
|
+
* @example
|
8
|
+
* interface A {
|
9
|
+
* a?: string;
|
10
|
+
* b?: string;
|
11
|
+
* c?: string;
|
12
|
+
* }
|
13
|
+
* type B = RequiredFields<A, "b" | "c">;
|
14
|
+
* const b: B = {
|
15
|
+
* b: "hehe",
|
16
|
+
* c: "hehe",
|
17
|
+
* }; //valid
|
18
|
+
* const b: B = { a: "hehe" }; //invalid
|
19
|
+
* const c: B = { a: "hehe", b: "hehe" }; //invalid
|
20
|
+
*/
|
21
|
+
type RequiredFields<T, U extends keyof T> = T & Required<Pick<T, U>>;
|
22
|
+
/**
|
23
|
+
* Make certain fields in a object type optional
|
24
|
+
*
|
25
|
+
* @example
|
26
|
+
* interface A {
|
27
|
+
* a: string;
|
28
|
+
* b: string;
|
29
|
+
* c: string;
|
30
|
+
* }
|
31
|
+
* type B = Optional<A, "b" | "c">;
|
32
|
+
* const b: B = { a: "hehe" }; //valid
|
33
|
+
* const b: B = {}; //invalid
|
34
|
+
*/
|
35
|
+
type OptionalFields<T, U extends keyof T> = Omit<T, U> & Partial<Pick<T, U>>;
|
36
|
+
|
37
|
+
interface ClientOptions {
|
38
|
+
/**
|
39
|
+
* Whether this plugin should be registered.
|
40
|
+
*/
|
41
|
+
registerPlugin?: boolean;
|
42
|
+
}
|
43
|
+
interface ModuleOptions extends OptionalFields<PluginOptions, "swSrc" | "swDest" | "globDirectory"> {
|
44
|
+
manifest?: string;
|
45
|
+
/**
|
46
|
+
* Options for plugin.
|
47
|
+
*/
|
48
|
+
client?: ClientOptions;
|
49
|
+
}
|
50
|
+
|
51
|
+
declare const _default: _nuxt_schema.NuxtModule<RequiredFields<ModuleOptions, "swUrl" | "swSrc" | "swDest" | "globDirectory" | "injectionPoint">>;
|
52
|
+
|
53
|
+
declare module "@nuxt/schema" {
|
54
|
+
interface NuxtConfig {
|
55
|
+
["serwist"]?: ModuleOptions;
|
56
|
+
}
|
57
|
+
interface NuxtOptions {
|
58
|
+
["serwist"]?: ModuleOptions;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
export { type ClientOptions, type ModuleOptions, _default as default };
|
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
import path from 'node:path';
|
2
|
+
import { defineNuxtModule, createResolver, addPlugin, extendWebpackConfig } from '@nuxt/kit';
|
3
|
+
import { resolveEntry, createContext, createApi, main, dev } from '@serwist/vite';
|
4
|
+
import { createHash } from 'node:crypto';
|
5
|
+
import { createReadStream } from 'node:fs';
|
6
|
+
import fs from 'node:fs/promises';
|
7
|
+
import pathe from 'pathe';
|
8
|
+
|
9
|
+
const version = "8.4.0";
|
10
|
+
|
11
|
+
function configurePwaOptions(options, nuxt, nitroConfig) {
|
12
|
+
let buildAssetsDir = nuxt.options.app.buildAssetsDir ?? "_nuxt/";
|
13
|
+
if (buildAssetsDir[0] === "/")
|
14
|
+
buildAssetsDir = buildAssetsDir.slice(1);
|
15
|
+
if (buildAssetsDir[buildAssetsDir.length - 1] !== "/")
|
16
|
+
buildAssetsDir += "/";
|
17
|
+
if (!("dontCacheBustURLsMatching" in options)) {
|
18
|
+
options.dontCacheBustURLsMatching = new RegExp(buildAssetsDir);
|
19
|
+
}
|
20
|
+
if (nuxt.options.experimental.payloadExtraction) {
|
21
|
+
const enableGlobPatterns = nuxt.options._generate || !!nitroConfig.prerender?.routes?.length || Object.values(nitroConfig.routeRules ?? {}).some((r) => r.prerender);
|
22
|
+
if (enableGlobPatterns) {
|
23
|
+
options.globPatterns = options.globPatterns ?? [];
|
24
|
+
options.globPatterns.push("**/_payload.json");
|
25
|
+
}
|
26
|
+
}
|
27
|
+
let appManifestFolder;
|
28
|
+
if (nuxt.options.experimental.appManifest) {
|
29
|
+
options.globPatterns = options.globPatterns ?? [];
|
30
|
+
appManifestFolder = `${buildAssetsDir}builds/`;
|
31
|
+
options.globPatterns.push(`${appManifestFolder}**/*.json`);
|
32
|
+
}
|
33
|
+
const _public = nitroConfig.output?.publicDir ?? nuxt.options.nitro?.output?.publicDir;
|
34
|
+
const publicDir = _public ? pathe.resolve(_public) : pathe.resolve(nuxt.options.buildDir, "../.output/public");
|
35
|
+
if (!nuxt.options.dev && !options.manifestTransforms) {
|
36
|
+
options.manifestTransforms = [createManifestTransform(nuxt.options.app.baseURL ?? "/", publicDir, appManifestFolder)];
|
37
|
+
}
|
38
|
+
}
|
39
|
+
function createManifestTransform(base, publicFolder, appManifestFolder) {
|
40
|
+
return async (entries) => {
|
41
|
+
entries.filter((e) => e.url.endsWith(".html")).forEach((e) => {
|
42
|
+
const url = e.url.startsWith("/") ? e.url.slice(1) : e.url;
|
43
|
+
if (url === "index.html") {
|
44
|
+
e.url = base;
|
45
|
+
} else {
|
46
|
+
const parts = url.split("/");
|
47
|
+
parts[parts.length - 1] = parts[parts.length - 1].replace(/\.html$/, "");
|
48
|
+
e.url = parts.length > 1 ? parts.slice(0, parts.length - 1).join("/") : parts[0];
|
49
|
+
}
|
50
|
+
});
|
51
|
+
if (appManifestFolder) {
|
52
|
+
const regExp = /(\/)?[0-9a-f]{8}\b-[0-9a-f]{4}\b-[0-9a-f]{4}\b-[0-9a-f]{4}\b-[0-9a-f]{12}\.json$/i;
|
53
|
+
entries.filter((e) => e.url.startsWith(appManifestFolder) && regExp.test(e.url)).forEach((e) => {
|
54
|
+
e.revision = null;
|
55
|
+
});
|
56
|
+
const latest = `${appManifestFolder}latest.json`;
|
57
|
+
const latestJson = pathe.resolve(publicFolder, latest);
|
58
|
+
const data = await fs.lstat(latestJson).catch(() => void 0);
|
59
|
+
if (data?.isFile()) {
|
60
|
+
const revision = await new Promise((resolve, reject) => {
|
61
|
+
const cHash = createHash("MD5");
|
62
|
+
const stream = createReadStream(latestJson);
|
63
|
+
stream.on("error", (err) => {
|
64
|
+
reject(err);
|
65
|
+
});
|
66
|
+
stream.on("data", (chunk) => cHash.update(chunk));
|
67
|
+
stream.on("end", () => {
|
68
|
+
resolve(cHash.digest("hex"));
|
69
|
+
});
|
70
|
+
});
|
71
|
+
const latestEntry = entries.find((e) => e.url === latest);
|
72
|
+
if (latestEntry)
|
73
|
+
latestEntry.revision = revision;
|
74
|
+
else
|
75
|
+
entries.push({ url: latest, revision, size: data.size });
|
76
|
+
} else {
|
77
|
+
entries = entries.filter((e) => e.url !== latest);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
return { manifest: entries, warnings: [] };
|
81
|
+
};
|
82
|
+
}
|
83
|
+
|
84
|
+
const module = defineNuxtModule({
|
85
|
+
meta: {
|
86
|
+
name: "@serwist/nuxt",
|
87
|
+
configKey: "serwist",
|
88
|
+
compatibility: {
|
89
|
+
nuxt: "^3.8.0",
|
90
|
+
bridge: false
|
91
|
+
},
|
92
|
+
version
|
93
|
+
},
|
94
|
+
defaults(nuxt) {
|
95
|
+
const publicDir = nuxt.options.nitro?.output?.publicDir ? path.resolve(nuxt.options.nitro.output.publicDir) : path.resolve(nuxt.options.buildDir, "../.output/public");
|
96
|
+
return {
|
97
|
+
base: nuxt.options.app.baseURL,
|
98
|
+
scope: nuxt.options.app.baseURL,
|
99
|
+
injectRegister: false,
|
100
|
+
client: {
|
101
|
+
registerPlugin: true
|
102
|
+
},
|
103
|
+
// Try to find `service-worker.{ts,js}` or `service-worker/index.{ts,js}`. If not found,
|
104
|
+
// force the user to provide a `swSrc` themself.
|
105
|
+
swSrc: resolveEntry(path.resolve(nuxt.options.rootDir, "service-worker")) || void 0,
|
106
|
+
swDest: path.resolve(publicDir, "sw.js"),
|
107
|
+
swUrl: "/sw.js",
|
108
|
+
globDirectory: publicDir,
|
109
|
+
injectionPoint: "self.__SW_MANIFEST"
|
110
|
+
};
|
111
|
+
},
|
112
|
+
async setup(options, nuxt) {
|
113
|
+
const resolver = createResolver(import.meta.url);
|
114
|
+
let ctx, api;
|
115
|
+
const { manifest: manifestPath, client: _client, ...userOptions } = options;
|
116
|
+
const client = { registerPlugin: true, ..._client };
|
117
|
+
const runtimeDir = resolver.resolve("./runtime");
|
118
|
+
if (!nuxt.options.ssr)
|
119
|
+
nuxt.options.build.transpile.push(runtimeDir);
|
120
|
+
if (client.registerPlugin) {
|
121
|
+
addPlugin({
|
122
|
+
src: resolver.resolve(runtimeDir, "plugins/client"),
|
123
|
+
mode: "client"
|
124
|
+
});
|
125
|
+
}
|
126
|
+
nuxt.hook("prepare:types", ({ references }) => {
|
127
|
+
references.push({ path: resolver.resolve(runtimeDir, "plugins/augmentation") });
|
128
|
+
});
|
129
|
+
nuxt.hook("nitro:init", (nitro) => {
|
130
|
+
configurePwaOptions(options, nuxt, nitro.options);
|
131
|
+
});
|
132
|
+
nuxt.hook("vite:extend", ({ config }) => {
|
133
|
+
const plugin = config.plugins?.find((p) => p && typeof p === "object" && "name" in p && p.name === "@serwist/vite");
|
134
|
+
if (plugin) {
|
135
|
+
throw new Error("Remove @serwist/vite from your Vite configuration! Do not use it alongside @serwist/nuxt.");
|
136
|
+
}
|
137
|
+
});
|
138
|
+
nuxt.hook("vite:extendConfig", async (viteInlineConfig, { isClient }) => {
|
139
|
+
if (!viteInlineConfig.plugins) {
|
140
|
+
viteInlineConfig.plugins = [];
|
141
|
+
}
|
142
|
+
const plugin = viteInlineConfig.plugins.find((p) => p && typeof p === "object" && "name" in p && p.name === "@serwist/vite");
|
143
|
+
if (plugin) {
|
144
|
+
throw new Error("Remove @serwist/vite from your Vite conoptionsfiguration! Do not use it alongside @serwist/nuxt.");
|
145
|
+
}
|
146
|
+
if (isClient) {
|
147
|
+
const configuration = "virtual:serwist-nuxt-configuration";
|
148
|
+
const resolvedConfiguration = `\0${configuration}`;
|
149
|
+
viteInlineConfig.plugins.push({
|
150
|
+
name: "@serwist/nuxt:configuration",
|
151
|
+
enforce: "pre",
|
152
|
+
resolveId(id) {
|
153
|
+
if (id === configuration) {
|
154
|
+
return resolvedConfiguration;
|
155
|
+
}
|
156
|
+
return void 0;
|
157
|
+
},
|
158
|
+
async load(id) {
|
159
|
+
if (id === resolvedConfiguration) {
|
160
|
+
return `export const enabled = ${client.registerPlugin};`;
|
161
|
+
}
|
162
|
+
return void 0;
|
163
|
+
}
|
164
|
+
});
|
165
|
+
}
|
166
|
+
ctx = createContext(userOptions, "nuxt");
|
167
|
+
api = createApi(ctx);
|
168
|
+
const plugins = [main(ctx, api), dev(ctx, api)];
|
169
|
+
viteInlineConfig.plugins.push(plugins);
|
170
|
+
});
|
171
|
+
extendWebpackConfig(() => {
|
172
|
+
throw new Error("Webpack is not supported: @serwist/nuxt can only be used with Vite!");
|
173
|
+
});
|
174
|
+
if (!nuxt.options.dev) {
|
175
|
+
nuxt.hook("nitro:build:public-assets", () => {
|
176
|
+
if (!api || api.disabled) {
|
177
|
+
return;
|
178
|
+
}
|
179
|
+
void api.generateSW();
|
180
|
+
});
|
181
|
+
}
|
182
|
+
}
|
183
|
+
});
|
184
|
+
|
185
|
+
export { module as default };
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { Serwist } from "@serwist/window";
|
2
|
+
|
3
|
+
declare module "#app" {
|
4
|
+
interface NuxtApp {
|
5
|
+
$serwist: Serwist | undefined;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
declare module "vue" {
|
10
|
+
interface ComponentCustomProperties {
|
11
|
+
$serwist: Serwist | undefined;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
declare module "@vue/runtime-core" {
|
16
|
+
interface ComponentCustomProperties {
|
17
|
+
$serwist: Serwist | undefined;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
21
|
+
export {};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { getSerwist } from "@serwist/vite/browser";
|
2
|
+
import { defineNuxtPlugin } from "#imports";
|
3
|
+
const plugin = defineNuxtPlugin(async () => {
|
4
|
+
const serwist = await getSerwist();
|
5
|
+
return {
|
6
|
+
provide: {
|
7
|
+
serwist
|
8
|
+
}
|
9
|
+
};
|
10
|
+
});
|
11
|
+
export default plugin;
|
package/dist/types.d.mts
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
import type { ModuleOptions } from './module.js'
|
3
|
+
|
4
|
+
|
5
|
+
declare module '@nuxt/schema' {
|
6
|
+
interface NuxtConfig { ['serwist']?: Partial<ModuleOptions> }
|
7
|
+
interface NuxtOptions { ['serwist']?: ModuleOptions }
|
8
|
+
}
|
9
|
+
|
10
|
+
declare module 'nuxt/schema' {
|
11
|
+
interface NuxtConfig { ['serwist']?: Partial<ModuleOptions> }
|
12
|
+
interface NuxtOptions { ['serwist']?: ModuleOptions }
|
13
|
+
}
|
14
|
+
|
15
|
+
|
16
|
+
export type { ClientOptions, ModuleOptions, default } from './module.js'
|
package/dist/types.d.ts
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
import type { ModuleOptions } from './module'
|
3
|
+
|
4
|
+
|
5
|
+
declare module '@nuxt/schema' {
|
6
|
+
interface NuxtConfig { ['serwist']?: Partial<ModuleOptions> }
|
7
|
+
interface NuxtOptions { ['serwist']?: ModuleOptions }
|
8
|
+
}
|
9
|
+
|
10
|
+
declare module 'nuxt/schema' {
|
11
|
+
interface NuxtConfig { ['serwist']?: Partial<ModuleOptions> }
|
12
|
+
interface NuxtOptions { ['serwist']?: ModuleOptions }
|
13
|
+
}
|
14
|
+
|
15
|
+
|
16
|
+
export type { ClientOptions, ModuleOptions, default } from './module'
|
package/package.json
ADDED
@@ -0,0 +1,91 @@
|
|
1
|
+
{
|
2
|
+
"name": "@serwist/nuxt",
|
3
|
+
"version": "8.4.0",
|
4
|
+
"type": "module",
|
5
|
+
"description": "A Nuxt module that integrates Serwist into your application.",
|
6
|
+
"files": [
|
7
|
+
"dist"
|
8
|
+
],
|
9
|
+
"keywords": [
|
10
|
+
"nuxt",
|
11
|
+
"pwa",
|
12
|
+
"vite",
|
13
|
+
"vite-plugin",
|
14
|
+
"serwist",
|
15
|
+
"serwistjs",
|
16
|
+
"pwa",
|
17
|
+
"sw",
|
18
|
+
"service worker",
|
19
|
+
"web",
|
20
|
+
"service-worker",
|
21
|
+
"nuxt-module"
|
22
|
+
],
|
23
|
+
"repository": "serwist/serwist",
|
24
|
+
"bugs": "https://github.com/serwist/serwist/issues",
|
25
|
+
"homepage": "https://serwist.pages.dev",
|
26
|
+
"main": "./dist/module.mjs",
|
27
|
+
"types": "./dist/types.d.ts",
|
28
|
+
"exports": {
|
29
|
+
".": {
|
30
|
+
"types": "./dist/types.d.mts",
|
31
|
+
"default": "./dist/module.mjs"
|
32
|
+
}
|
33
|
+
},
|
34
|
+
"build": {
|
35
|
+
"externals": [
|
36
|
+
"node:child_process",
|
37
|
+
"node:fs",
|
38
|
+
"node:path",
|
39
|
+
"consola",
|
40
|
+
"esbuild",
|
41
|
+
"rollup",
|
42
|
+
"vite",
|
43
|
+
"@nuxt/kit",
|
44
|
+
"@serwist/build",
|
45
|
+
"@serwist/vite",
|
46
|
+
"pathe",
|
47
|
+
"ufo",
|
48
|
+
"virtual:serwist-nuxt-configuration"
|
49
|
+
]
|
50
|
+
},
|
51
|
+
"dependencies": {
|
52
|
+
"@nuxt/kit": "3.9.0",
|
53
|
+
"fast-json-stable-stringify": "2.1.0",
|
54
|
+
"pathe": "1.1.1",
|
55
|
+
"ufo": "1.3.2",
|
56
|
+
"@serwist/build": "8.4.0",
|
57
|
+
"@serwist/vite": "8.4.0",
|
58
|
+
"@serwist/window": "8.4.0"
|
59
|
+
},
|
60
|
+
"devDependencies": {
|
61
|
+
"@nuxt/module-builder": "0.5.5",
|
62
|
+
"@nuxt/schema": "3.9.0",
|
63
|
+
"@nuxt/test-utils": "3.9.0",
|
64
|
+
"@playwright/test": "1.40.1",
|
65
|
+
"@types/node": "20.10.5",
|
66
|
+
"eslint": "8.56.0",
|
67
|
+
"nuxt": "3.9.0",
|
68
|
+
"publint": "0.2.7",
|
69
|
+
"rimraf": "5.0.5",
|
70
|
+
"serve": "14.2.1",
|
71
|
+
"typescript": "5.3.3",
|
72
|
+
"vite": "5.0.10",
|
73
|
+
"vitest": "1.1.0",
|
74
|
+
"vue-tsc": "1.8.27",
|
75
|
+
"@serwist/constants": "8.4.0"
|
76
|
+
},
|
77
|
+
"peerDependencies": {
|
78
|
+
"vite": "^5.0.0"
|
79
|
+
},
|
80
|
+
"scripts": {
|
81
|
+
"build": "nuxt-module-build prepare && nuxt-module-build build",
|
82
|
+
"dev": "nuxi dev playground",
|
83
|
+
"dev:generate": "nuxi generate playground",
|
84
|
+
"dev:generate:netlify": "NITRO_PRESET=netlify nuxi generate playground",
|
85
|
+
"dev:generate:vercel": "NITRO_PRESET=vercel nuxi generate playground",
|
86
|
+
"dev:build": "nuxi build playground",
|
87
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
88
|
+
"dev:preview:build": "nr dev:build && node playground/.output/server/index.mjs",
|
89
|
+
"dev:preview:generate": "nr dev:generate && serve playground/dist"
|
90
|
+
}
|
91
|
+
}
|