@vizejs/nuxt 0.315.1 → 0.318.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/dist/nuxt2-entry.cjs +57 -0
- package/package.json +11 -8
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const moduleMeta = { name: "@vizejs/nuxt", configKey: "vize" };
|
|
4
|
+
const moduleDefaults = {
|
|
5
|
+
checker: false,
|
|
6
|
+
lint: true,
|
|
7
|
+
musea: false,
|
|
8
|
+
nuxtMusea: { route: { path: "/" } },
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
let modulePromise;
|
|
12
|
+
|
|
13
|
+
function loadNuxtModule() {
|
|
14
|
+
modulePromise ||= import("./index.mjs").then((loaded) => loaded.default);
|
|
15
|
+
return modulePromise;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function isPlainRecord(value) {
|
|
19
|
+
return value != null && typeof value === "object" && !Array.isArray(value);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function mergePlainRecords(...values) {
|
|
23
|
+
const result = {};
|
|
24
|
+
|
|
25
|
+
for (const value of values) {
|
|
26
|
+
if (!value) continue;
|
|
27
|
+
for (const [key, nextValue] of Object.entries(value)) {
|
|
28
|
+
const currentValue = result[key];
|
|
29
|
+
result[key] =
|
|
30
|
+
isPlainRecord(currentValue) && isPlainRecord(nextValue)
|
|
31
|
+
? mergePlainRecords(currentValue, nextValue)
|
|
32
|
+
: nextValue;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function resolveModuleOptions(inlineOptions = {}, nuxt) {
|
|
40
|
+
return mergePlainRecords(moduleDefaults, nuxt?.options?.vize, inlineOptions);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const vizeNuxtModule = Object.assign(
|
|
44
|
+
async function vizeNuxtModule(inlineOptions = {}, nuxtArg) {
|
|
45
|
+
const loaded = await loadNuxtModule();
|
|
46
|
+
return loaded.call(this, inlineOptions, nuxtArg);
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
getMeta: () => moduleMeta,
|
|
50
|
+
getOptions: resolveModuleOptions,
|
|
51
|
+
meta: moduleMeta,
|
|
52
|
+
defaults: moduleDefaults,
|
|
53
|
+
},
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
module.exports = vizeNuxtModule;
|
|
57
|
+
module.exports.default = vizeNuxtModule;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/nuxt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.318.0",
|
|
4
4
|
"description": "Nuxt module for Vize - compiler, musea gallery, linter, and type checker",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -28,12 +28,14 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"type": "module",
|
|
31
|
-
"main": "./dist/
|
|
31
|
+
"main": "./dist/nuxt2-entry.cjs",
|
|
32
|
+
"module": "./dist/index.mjs",
|
|
32
33
|
"types": "./dist/index.d.mts",
|
|
33
34
|
"exports": {
|
|
34
35
|
".": {
|
|
35
36
|
"types": "./dist/index.d.mts",
|
|
36
37
|
"import": "./dist/index.mjs",
|
|
38
|
+
"require": "./dist/nuxt2-entry.cjs",
|
|
37
39
|
"default": "./dist/index.mjs"
|
|
38
40
|
},
|
|
39
41
|
"./lint": {
|
|
@@ -47,14 +49,15 @@
|
|
|
47
49
|
},
|
|
48
50
|
"dependencies": {
|
|
49
51
|
"@nuxt/kit": "3.11.2",
|
|
50
|
-
"@vizejs/native": "0.
|
|
51
|
-
"@vizejs/nuxt-lint-config": "0.
|
|
52
|
-
"@vizejs/vite-plugin": "0.
|
|
53
|
-
"@vizejs/vite-plugin-musea": "0.
|
|
54
|
-
"oxlint-plugin-vize": "0.
|
|
55
|
-
"vize": "0.
|
|
52
|
+
"@vizejs/native": "0.318.0",
|
|
53
|
+
"@vizejs/nuxt-lint-config": "0.318.0",
|
|
54
|
+
"@vizejs/vite-plugin": "0.318.0",
|
|
55
|
+
"@vizejs/vite-plugin-musea": "0.318.0",
|
|
56
|
+
"oxlint-plugin-vize": "0.318.0",
|
|
57
|
+
"vize": "0.318.0"
|
|
56
58
|
},
|
|
57
59
|
"devDependencies": {
|
|
60
|
+
"jiti-nuxt2": "npm:jiti@1.21.7",
|
|
58
61
|
"typescript": "6.0.3",
|
|
59
62
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.21",
|
|
60
63
|
"vite-plus": "0.1.21",
|