@veribenim/nuxt 1.0.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/module.cjs +5 -0
- package/dist/module.d.mts +29 -0
- package/dist/module.d.ts +29 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +41 -0
- package/dist/runtime/composables.d.ts +0 -0
- package/dist/runtime/composables.js +1 -0
- package/dist/runtime/plugin.d.ts +0 -0
- package/dist/runtime/plugin.js +6 -0
- package/dist/types.d.mts +7 -0
- package/dist/types.d.ts +7 -0
- package/package.json +47 -0
package/dist/module.cjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as nuxt_schema from 'nuxt/schema';
|
|
2
|
+
import { VeribenimConfig } from '@veribenim/core';
|
|
3
|
+
|
|
4
|
+
interface ModuleOptions extends Omit<VeribenimConfig, 'token'> {
|
|
5
|
+
/**
|
|
6
|
+
* Environment token — Veribenim panelinden alınır.
|
|
7
|
+
* Önerilen: process.env.NUXT_PUBLIC_VERIBENIM_TOKEN ile set edin
|
|
8
|
+
*/
|
|
9
|
+
token: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Veribenim Nuxt 3 Modülü
|
|
13
|
+
*
|
|
14
|
+
* @example nuxt.config.ts:
|
|
15
|
+
* export default defineNuxtConfig({
|
|
16
|
+
* modules: ['@veribenim/nuxt'],
|
|
17
|
+
* veribenim: {
|
|
18
|
+
* token: process.env.NUXT_PUBLIC_VERIBENIM_TOKEN,
|
|
19
|
+
* lang: 'tr',
|
|
20
|
+
* }
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* @example Composable (otomatik import):
|
|
24
|
+
* const { preferences, accept, decline } = useVeribenim();
|
|
25
|
+
*/
|
|
26
|
+
declare const _default: nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
27
|
+
|
|
28
|
+
export { _default as default };
|
|
29
|
+
export type { ModuleOptions };
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as nuxt_schema from 'nuxt/schema';
|
|
2
|
+
import { VeribenimConfig } from '@veribenim/core';
|
|
3
|
+
|
|
4
|
+
interface ModuleOptions extends Omit<VeribenimConfig, 'token'> {
|
|
5
|
+
/**
|
|
6
|
+
* Environment token — Veribenim panelinden alınır.
|
|
7
|
+
* Önerilen: process.env.NUXT_PUBLIC_VERIBENIM_TOKEN ile set edin
|
|
8
|
+
*/
|
|
9
|
+
token: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Veribenim Nuxt 3 Modülü
|
|
13
|
+
*
|
|
14
|
+
* @example nuxt.config.ts:
|
|
15
|
+
* export default defineNuxtConfig({
|
|
16
|
+
* modules: ['@veribenim/nuxt'],
|
|
17
|
+
* veribenim: {
|
|
18
|
+
* token: process.env.NUXT_PUBLIC_VERIBENIM_TOKEN,
|
|
19
|
+
* lang: 'tr',
|
|
20
|
+
* }
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* @example Composable (otomatik import):
|
|
24
|
+
* const { preferences, accept, decline } = useVeribenim();
|
|
25
|
+
*/
|
|
26
|
+
declare const _default: nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
27
|
+
|
|
28
|
+
export { _default as default };
|
|
29
|
+
export type { ModuleOptions };
|
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { defineNuxtModule, createResolver, addPlugin, addImports } from '@nuxt/kit';
|
|
2
|
+
|
|
3
|
+
const module = defineNuxtModule({
|
|
4
|
+
meta: {
|
|
5
|
+
name: "@veribenim/nuxt",
|
|
6
|
+
configKey: "veribenim",
|
|
7
|
+
compatibility: { nuxt: "^3.0.0" }
|
|
8
|
+
},
|
|
9
|
+
defaults: {
|
|
10
|
+
token: "",
|
|
11
|
+
lang: "tr",
|
|
12
|
+
autoLoad: true,
|
|
13
|
+
debug: false,
|
|
14
|
+
apiUrl: "https://api.veribenim.com",
|
|
15
|
+
scriptUrl: "https://bundles.veribenim.com/bundle.js"
|
|
16
|
+
},
|
|
17
|
+
setup(options, nuxt) {
|
|
18
|
+
if (!options.token) {
|
|
19
|
+
console.warn("[Veribenim] token ayarlanmam\u0131\u015F. nuxt.config.ts'de veribenim.token'\u0131 belirtin.");
|
|
20
|
+
}
|
|
21
|
+
nuxt.options.runtimeConfig.public.veribenim = {
|
|
22
|
+
token: options.token,
|
|
23
|
+
lang: options.lang,
|
|
24
|
+
apiUrl: options.apiUrl,
|
|
25
|
+
scriptUrl: options.scriptUrl,
|
|
26
|
+
autoLoad: options.autoLoad,
|
|
27
|
+
debug: options.debug
|
|
28
|
+
};
|
|
29
|
+
const resolver = createResolver(import.meta.url);
|
|
30
|
+
addPlugin({
|
|
31
|
+
src: resolver.resolve("./runtime/plugin"),
|
|
32
|
+
mode: "client"
|
|
33
|
+
});
|
|
34
|
+
addImports({
|
|
35
|
+
name: "useVeribenim",
|
|
36
|
+
from: resolver.resolve("./runtime/composables")
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export { module as default };
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useVeribenim } from "@veribenim/vue";
|
|
File without changes
|
package/dist/types.d.mts
ADDED
package/dist/types.d.ts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@veribenim/nuxt",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Veribenim KVKK/GDPR çerez onayı SDK - Nuxt 3 Modülü",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"kvkk",
|
|
7
|
+
"gdpr",
|
|
8
|
+
"cookie",
|
|
9
|
+
"consent",
|
|
10
|
+
"veribenim",
|
|
11
|
+
"nuxt",
|
|
12
|
+
"nuxt3"
|
|
13
|
+
],
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"main": "./dist/module.cjs",
|
|
16
|
+
"module": "./dist/module.mjs",
|
|
17
|
+
"types": "./dist/types.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"import": "./dist/module.mjs",
|
|
21
|
+
"require": "./dist/module.cjs"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@nuxt/kit": "^3.0.0",
|
|
29
|
+
"@veribenim/core": "1.0.0",
|
|
30
|
+
"@veribenim/vue": "1.0.0"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"nuxt": ">=3.0.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@nuxt/module-builder": "^0.8.0",
|
|
37
|
+
"nuxt": "^3.0.0",
|
|
38
|
+
"tsup": "^8.0.0",
|
|
39
|
+
"typescript": "^5.4.0"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "nuxt-module-build build",
|
|
43
|
+
"dev": "nuxt-module-build build --stub",
|
|
44
|
+
"lint": "tsc --noEmit",
|
|
45
|
+
"clean": "rm -rf dist"
|
|
46
|
+
}
|
|
47
|
+
}
|