@nuxt/kit 3.3.1 → 3.3.2
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/index.mjs +6 -5
- package/package.json +7 -6
package/dist/index.mjs
CHANGED
|
@@ -165,10 +165,11 @@ ${issues.toString()}`);
|
|
|
165
165
|
if (definition.hooks) {
|
|
166
166
|
nuxt.hooks.addHooks(definition.hooks);
|
|
167
167
|
}
|
|
168
|
-
const
|
|
168
|
+
const key = `nuxt:module:${uniqueKey || Math.round(Math.random() * 1e4)}`;
|
|
169
|
+
const mark = performance.mark(key);
|
|
169
170
|
const res = await definition.setup?.call(null, _options, nuxt) ?? {};
|
|
170
|
-
const perf = performance.measure(
|
|
171
|
-
const setupTime = Math.round(perf.duration * 100) / 100;
|
|
171
|
+
const perf = performance.measure(key, mark?.name);
|
|
172
|
+
const setupTime = perf ? Math.round(perf.duration * 100) / 100 : 0;
|
|
172
173
|
if (setupTime > 5e3) {
|
|
173
174
|
logger.warn(`Slow module \`${uniqueKey || "<no name>"}\` took \`${setupTime}ms\` to setup.`);
|
|
174
175
|
} else if (nuxt.options.debug) {
|
|
@@ -731,8 +732,8 @@ function normalizeTemplate(template) {
|
|
|
731
732
|
}
|
|
732
733
|
return template;
|
|
733
734
|
}
|
|
734
|
-
function updateTemplates(options) {
|
|
735
|
-
return
|
|
735
|
+
async function updateTemplates(options) {
|
|
736
|
+
return await tryUseNuxt()?.hooks.callHook("builder:generateApp", options);
|
|
736
737
|
}
|
|
737
738
|
|
|
738
739
|
function addLayout(template, name) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/kit",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"repository": "nuxt/nuxt",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.mjs"
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.mjs"
|
|
12
13
|
},
|
|
13
14
|
"./package.json": "./package.json"
|
|
14
15
|
},
|
|
@@ -16,14 +17,14 @@
|
|
|
16
17
|
"dist"
|
|
17
18
|
],
|
|
18
19
|
"dependencies": {
|
|
19
|
-
"@nuxt/schema": "3.3.
|
|
20
|
+
"@nuxt/schema": "3.3.2",
|
|
20
21
|
"c12": "^1.2.0",
|
|
21
22
|
"consola": "^2.15.3",
|
|
22
23
|
"defu": "^6.1.2",
|
|
23
24
|
"globby": "^13.1.3",
|
|
24
25
|
"hash-sum": "^2.0.0",
|
|
25
26
|
"ignore": "^5.2.4",
|
|
26
|
-
"jiti": "^1.
|
|
27
|
+
"jiti": "^1.18.2",
|
|
27
28
|
"knitwork": "^1.0.0",
|
|
28
29
|
"lodash.template": "^4.5.0",
|
|
29
30
|
"mlly": "^1.2.0",
|
|
@@ -32,11 +33,11 @@
|
|
|
32
33
|
"scule": "^1.0.0",
|
|
33
34
|
"semver": "^7.3.8",
|
|
34
35
|
"unctx": "^2.1.2",
|
|
35
|
-
"unimport": "^3.0.
|
|
36
|
+
"unimport": "^3.0.4",
|
|
36
37
|
"untyped": "^1.2.2"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
|
-
"@types/lodash.template": "^4",
|
|
40
|
+
"@types/lodash.template": "^4.5.1",
|
|
40
41
|
"@types/semver": "^7.3.13",
|
|
41
42
|
"unbuild": "latest"
|
|
42
43
|
},
|