@dargmuesli/nuxt-cookie-control 8.2.3 → 8.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/module.d.mts +6 -0
- package/dist/module.d.ts +6 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +8 -5
- package/dist/runtime/plugin.mjs +3 -2
- package/package.json +6 -5
package/dist/module.d.mts
CHANGED
package/dist/module.d.ts
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolve } from 'node:path';
|
|
2
2
|
import { pathToFileURL } from 'node:url';
|
|
3
3
|
import { createResolver, defineNuxtModule, addPlugin, addImports, addTypeTemplate, updateTemplates, extendWebpackConfig, extendViteConfig, resolvePath } from '@nuxt/kit';
|
|
4
|
+
import { defu } from 'defu';
|
|
4
5
|
|
|
5
6
|
const CONFIG_KEY = "cookieControl";
|
|
6
7
|
|
|
@@ -121,7 +122,7 @@ const DEFAULTS = {
|
|
|
121
122
|
};
|
|
122
123
|
|
|
123
124
|
const name = "@dargmuesli/nuxt-cookie-control";
|
|
124
|
-
const version = "8.2
|
|
125
|
+
const version = "8.3.2";
|
|
125
126
|
|
|
126
127
|
const resolver = createResolver(import.meta.url);
|
|
127
128
|
const runtimeDir = resolver.resolve("./runtime");
|
|
@@ -166,6 +167,12 @@ const module = defineNuxtModule({
|
|
|
166
167
|
});
|
|
167
168
|
}
|
|
168
169
|
});
|
|
170
|
+
nuxt.hook("modules:done", async () => {
|
|
171
|
+
nuxt.options.runtimeConfig.public.cookieControl = defu(
|
|
172
|
+
nuxt.options.runtimeConfig.public.cookieControl,
|
|
173
|
+
moduleOptions
|
|
174
|
+
);
|
|
175
|
+
});
|
|
169
176
|
}
|
|
170
177
|
});
|
|
171
178
|
const blockIframes = (moduleOptions) => {
|
|
@@ -210,10 +217,6 @@ const blockIframes = (moduleOptions) => {
|
|
|
210
217
|
};
|
|
211
218
|
const getTypeTemplate = (data) => `// Generated by ${name}
|
|
212
219
|
|
|
213
|
-
import type { ModuleOptions } from '#cookie-control/types'
|
|
214
|
-
|
|
215
|
-
export default ${JSON.stringify(data.options, void 0, 2)} as ModuleOptions
|
|
216
|
-
|
|
217
220
|
/**
|
|
218
221
|
* Union of the cookie ids specified in the Nuxt configuration.
|
|
219
222
|
*/
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ref } from "vue";
|
|
2
|
-
import moduleOptions from "#build/types/cookie-control.d";
|
|
3
2
|
import { COOKIE_ID_SEPARATOR } from "#cookie-control/constants";
|
|
4
3
|
import { getAllCookieIdsString } from "#cookie-control/methods";
|
|
5
|
-
import { defineNuxtPlugin, useCookie } from "#imports";
|
|
4
|
+
import { defineNuxtPlugin, useCookie, useRuntimeConfig } from "#imports";
|
|
6
5
|
export default defineNuxtPlugin((_nuxtApp) => {
|
|
6
|
+
const runtimeConfig = useRuntimeConfig();
|
|
7
|
+
const moduleOptions = runtimeConfig.public.cookieControl;
|
|
7
8
|
const cookieIsConsentGiven = useCookie(
|
|
8
9
|
moduleOptions.cookieNameIsConsentGiven,
|
|
9
10
|
moduleOptions.cookieOptions
|
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@nuxt/kit": "^3.8.0",
|
|
8
8
|
"css-vars-ponyfill": "^2.4.8",
|
|
9
|
+
"defu": "^6.1.4",
|
|
9
10
|
"string-replace-loader": "^3.1.0"
|
|
10
11
|
},
|
|
11
12
|
"description": "Nuxt Cookie Control Module",
|
|
@@ -13,14 +14,14 @@
|
|
|
13
14
|
"@commitlint/cli": "19.3.0",
|
|
14
15
|
"@commitlint/config-conventional": "19.2.2",
|
|
15
16
|
"@dargmuesli/nuxt-cookie-control": "link:",
|
|
16
|
-
"@nuxt/eslint-config": "0.3.
|
|
17
|
+
"@nuxt/eslint-config": "0.3.12",
|
|
17
18
|
"@nuxt/module-builder": "0.6.0",
|
|
18
19
|
"@nuxt/schema": "3.11.2",
|
|
19
20
|
"@semantic-release/changelog": "6.0.3",
|
|
20
21
|
"@semantic-release/commit-analyzer": "12.0.0",
|
|
21
22
|
"@semantic-release/git": "10.0.1",
|
|
22
23
|
"@semantic-release/github": "10.0.3",
|
|
23
|
-
"@semantic-release/npm": "12.0.
|
|
24
|
+
"@semantic-release/npm": "12.0.1",
|
|
24
25
|
"@semantic-release/release-notes-generator": "13.0.0",
|
|
25
26
|
"eslint": "9.2.0",
|
|
26
27
|
"eslint-config-prettier": "9.1.0",
|
|
@@ -29,11 +30,11 @@
|
|
|
29
30
|
"lint-staged": "15.2.2",
|
|
30
31
|
"nuxt": "3.11.2",
|
|
31
32
|
"prettier": "3.2.5",
|
|
32
|
-
"semantic-release": "23.
|
|
33
|
+
"semantic-release": "23.1.1",
|
|
33
34
|
"typescript": "5.4.5",
|
|
34
35
|
"vite": "5.2.11",
|
|
35
36
|
"vue": "3.4.27",
|
|
36
|
-
"vue-tsc": "2.0.
|
|
37
|
+
"vue-tsc": "2.0.17",
|
|
37
38
|
"webpack": "5.91.0"
|
|
38
39
|
},
|
|
39
40
|
"engines": {
|
|
@@ -89,5 +90,5 @@
|
|
|
89
90
|
},
|
|
90
91
|
"type": "module",
|
|
91
92
|
"types": "./dist/types.d.ts",
|
|
92
|
-
"version": "8.2
|
|
93
|
+
"version": "8.3.2"
|
|
93
94
|
}
|