@dword-design/base-config-nuxt 8.1.0 → 8.1.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/analyze.d.ts +6 -2
- package/dist/analyze.js +15 -1
- package/dist/get-eslint-config.js +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/nuxt.config.d.ts +4 -1
- package/dist/nuxt.config.js +7 -4
- package/package.json +17 -19
package/dist/analyze.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export default
|
|
1
|
+
import type { Base, PartialCommandOptions } from '@dword-design/base';
|
|
2
|
+
export default function (this: Base, options?: PartialCommandOptions): import("execa").ResultPromise<{
|
|
3
|
+
cwd: string;
|
|
4
|
+
stderr: any;
|
|
5
|
+
stdout?: "inherit" | undefined;
|
|
6
|
+
}>;
|
package/dist/analyze.js
CHANGED
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
import { execaCommand } from "execa";
|
|
2
|
-
export default
|
|
2
|
+
export default function (options = {}) {
|
|
3
|
+
options = {
|
|
4
|
+
env: {},
|
|
5
|
+
log: process.env.NODE_ENV !== "test",
|
|
6
|
+
stderr: "inherit",
|
|
7
|
+
...options
|
|
8
|
+
};
|
|
9
|
+
return execaCommand("nuxt build --analyze", {
|
|
10
|
+
...(options.log && {
|
|
11
|
+
stdout: "inherit"
|
|
12
|
+
}),
|
|
13
|
+
cwd: this.cwd,
|
|
14
|
+
stderr: options.stderr
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -8,8 +8,8 @@ export default ({
|
|
|
8
8
|
|
|
9
9
|
import withNuxt from './.nuxt/eslint.config.mjs';
|
|
10
10
|
|
|
11
|
-
export default withNuxt(
|
|
12
|
-
globalIgnores([${["eslint.config.ts", ...ignore].map(pattern => `'${pattern}'`).join(", ")}]),
|
|
11
|
+
export default await withNuxt(
|
|
12
|
+
globalIgnores([${["eslint.config.ts", "eslint.lint-staged.config.ts", ...ignore].map(pattern => `'${pattern}'`).join(", ")}]),
|
|
13
13
|
config,${virtualImports.length > 0 ? endent`
|
|
14
14
|
\n{
|
|
15
15
|
rules: {
|
|
@@ -23,5 +23,5 @@ export default ({
|
|
|
23
23
|
'unicorn/filename-case': 'off',
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
|
-
)
|
|
26
|
+
).toConfigs();\n
|
|
27
27
|
`;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Base, Config } from '@dword-design/base';
|
|
2
|
+
import analyze from './analyze';
|
|
2
3
|
import build from './build';
|
|
3
4
|
import dev from './dev';
|
|
4
5
|
import lint from './lint';
|
|
@@ -11,7 +12,7 @@ type ConfigNuxt = Config & {
|
|
|
11
12
|
declare const _default: (this: Base, config: ConfigNuxt) => {
|
|
12
13
|
allowedMatches: string[];
|
|
13
14
|
commands: {
|
|
14
|
-
analyze:
|
|
15
|
+
analyze: typeof analyze;
|
|
15
16
|
build: typeof build;
|
|
16
17
|
dev: typeof dev;
|
|
17
18
|
prepublishOnly: typeof prepublishOnly;
|
package/dist/nuxt.config.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
declare const basicAuthUser: string;
|
|
1
2
|
declare const _default: {
|
|
2
3
|
app: {
|
|
3
4
|
head: {
|
|
@@ -31,7 +32,9 @@ declare const _default: {
|
|
|
31
32
|
};
|
|
32
33
|
runtimeConfig: {
|
|
33
34
|
basicAuth?: {
|
|
34
|
-
pairs: {
|
|
35
|
+
pairs: {
|
|
36
|
+
[basicAuthUser]: string | undefined;
|
|
37
|
+
};
|
|
35
38
|
} | undefined;
|
|
36
39
|
};
|
|
37
40
|
typescript: {
|
package/dist/nuxt.config.js
CHANGED
|
@@ -3,7 +3,8 @@ import packageName from "depcheck-package-name";
|
|
|
3
3
|
import ts from "typescript";
|
|
4
4
|
import viteSvgLoader from "vite-svg-loader";
|
|
5
5
|
import config from "./config.js";
|
|
6
|
-
const
|
|
6
|
+
const basicAuthUser = process.env.BASIC_AUTH_USER;
|
|
7
|
+
const isBasicAuthEnabled = basicAuthUser && process.env.BASIC_AUTH_PASSWORD;
|
|
7
8
|
const {
|
|
8
9
|
config: typescriptConfig
|
|
9
10
|
} = ts.readConfigFile("tsconfig.json", ts.sys.readFile);
|
|
@@ -38,8 +39,10 @@ export default {
|
|
|
38
39
|
modules: [defineNuxtModule({
|
|
39
40
|
setup: (options, nuxt) => {
|
|
40
41
|
if (!config.userScalable) {
|
|
41
|
-
const viewportMeta = nuxt.options.app.head.meta
|
|
42
|
-
viewportMeta
|
|
42
|
+
const viewportMeta = nuxt.options.app.head.meta?.find?.(meta => meta.name === "viewport");
|
|
43
|
+
if (viewportMeta) {
|
|
44
|
+
viewportMeta.content += ", user-scalable=0";
|
|
45
|
+
}
|
|
43
46
|
}
|
|
44
47
|
}
|
|
45
48
|
}), [packageName`nuxt-basic-authentication-module`, {
|
|
@@ -66,7 +69,7 @@ export default {
|
|
|
66
69
|
...(isBasicAuthEnabled && {
|
|
67
70
|
basicAuth: {
|
|
68
71
|
pairs: {
|
|
69
|
-
[
|
|
72
|
+
[basicAuthUser]: process.env.BASIC_AUTH_PASSWORD
|
|
70
73
|
}
|
|
71
74
|
}
|
|
72
75
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dword-design/base-config-nuxt",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.1",
|
|
4
4
|
"repository": "dword-design/base-config-nuxt",
|
|
5
5
|
"funding": "https://github.com/sponsors/dword-design",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,10 +8,8 @@
|
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
"types": "./dist/index.d.ts"
|
|
14
|
-
}
|
|
11
|
+
"default": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
15
13
|
},
|
|
16
14
|
"./config": "./dist/config.js",
|
|
17
15
|
"./nuxt.config": "./dist/nuxt.config.js"
|
|
@@ -34,32 +32,33 @@
|
|
|
34
32
|
},
|
|
35
33
|
"dependencies": {
|
|
36
34
|
"@babel/core": "^7.28.0",
|
|
37
|
-
"@dword-design/base": "^15.
|
|
35
|
+
"@dword-design/base": "^15.3.5",
|
|
38
36
|
"@dword-design/depcheck-parser-sass": "^5.0.0",
|
|
39
37
|
"@dword-design/dotenv-json-extended": "^4.0.1",
|
|
40
38
|
"@dword-design/nuxt-i18n": "^1.0.1",
|
|
41
39
|
"@dword-design/nuxt-page-title": "^1.0.0",
|
|
42
40
|
"@dword-design/stylelint-config": "^4.1.0",
|
|
43
|
-
"@nuxt/eslint": "^1.
|
|
44
|
-
"@nuxt/kit": "^4.0.
|
|
41
|
+
"@nuxt/eslint": "^1.8.0",
|
|
42
|
+
"@nuxt/kit": "^4.0.3",
|
|
45
43
|
"@nuxtjs/stylelint-module": "^5.2.1",
|
|
46
44
|
"babel-plugin-add-import-extension": "^1.6.0",
|
|
47
45
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
48
46
|
"depcheck": "^1.4.7",
|
|
49
47
|
"depcheck-bin-name": "^2.0.0",
|
|
50
|
-
"depcheck-package-name": "^4.0.
|
|
48
|
+
"depcheck-package-name": "^4.0.1",
|
|
51
49
|
"endent": "npm:@dword-design/endent@^1.4.7",
|
|
52
50
|
"execa": "^9.6.0",
|
|
53
|
-
"fs-extra": "^11.3.
|
|
51
|
+
"fs-extra": "^11.3.1",
|
|
54
52
|
"globby": "^14.1.0",
|
|
55
|
-
"jiti": "^2.
|
|
53
|
+
"jiti": "^2.5.1",
|
|
56
54
|
"lodash-es": "^4.17.21",
|
|
57
|
-
"nuxt": "^3.
|
|
55
|
+
"nuxt": "^3.18.1",
|
|
58
56
|
"nuxt-basic-authentication-module": "^0.2.1",
|
|
59
57
|
"output-files": "^3.0.0",
|
|
60
58
|
"require-package-name": "^2.0.1",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
59
|
+
"sass": "^1.90.0",
|
|
60
|
+
"stylelint": "^16.23.0",
|
|
61
|
+
"typescript": "^5.9.2",
|
|
63
62
|
"vite-plugin-eslint2": "^5.0.4",
|
|
64
63
|
"vite-svg-loader": "^5.1.0"
|
|
65
64
|
},
|
|
@@ -67,16 +66,15 @@
|
|
|
67
66
|
"@dword-design/defu": "^1.0.3",
|
|
68
67
|
"@nuxtjs/sitemap": "^7.4.3",
|
|
69
68
|
"@nuxtjs/tailwindcss": "7.0.0-beta.0",
|
|
70
|
-
"@playwright/
|
|
69
|
+
"@playwright/browser-chromium": "^1.54.2",
|
|
70
|
+
"@playwright/test": "^1.54.2",
|
|
71
71
|
"@types/babel__core": "^7.20.5",
|
|
72
72
|
"@types/fs-extra": "^11.0.4",
|
|
73
73
|
"@types/lodash-es": "^4.17.12",
|
|
74
|
-
"axios": "^1.
|
|
74
|
+
"axios": "^1.11.0",
|
|
75
75
|
"delay": "^6.0.0",
|
|
76
76
|
"get-port": "^7.1.0",
|
|
77
|
-
"nuxt-dev-ready": "^5.0.
|
|
78
|
-
"playwright": "^1.54.1",
|
|
79
|
-
"playwright-chromium": "^1.54.1",
|
|
77
|
+
"nuxt-dev-ready": "^5.0.1",
|
|
80
78
|
"port-ready": "^0.1.0",
|
|
81
79
|
"tree-kill-promise": "^4.0.0",
|
|
82
80
|
"xml-formatter": "^3.6.6"
|