@rezo-zero/nuxt-cache-control 0.1.6 → 0.1.7

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 CHANGED
@@ -3,6 +3,7 @@ import * as _nuxt_schema from '@nuxt/schema';
3
3
  interface ModuleOptions {
4
4
  noCacheCookies?: string[];
5
5
  }
6
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
6
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
7
7
 
8
- export { type ModuleOptions, _default as default };
8
+ export { _default as default };
9
+ export type { ModuleOptions };
package/dist/module.json CHANGED
@@ -2,7 +2,11 @@
2
2
  "name": "nuxt-cache-control",
3
3
  "configKey": "cacheControl",
4
4
  "compatibility": {
5
- "nuxt": "^3.10.0"
5
+ "nuxt": "^4.0.1"
6
6
  },
7
- "version": "0.1.6"
7
+ "version": "0.1.7",
8
+ "builder": {
9
+ "@nuxt/module-builder": "1.0.1",
10
+ "unbuild": "3.5.0"
11
+ }
8
12
  }
package/dist/module.mjs CHANGED
@@ -8,7 +8,7 @@ const module = defineNuxtModule({
8
8
  // Compatibility constraints
9
9
  compatibility: {
10
10
  // Semver version of supported nuxt versions
11
- nuxt: "^3.10.0"
11
+ nuxt: "^4.0.1"
12
12
  }
13
13
  },
14
14
  setup(options, nuxt) {
@@ -1,6 +1,6 @@
1
1
  import { getCurrentInstance, useSSRContext } from "vue";
2
2
  export function useCacheControl(cacheControl) {
3
- if (process.client) {
3
+ if (import.meta.client) {
4
4
  return;
5
5
  }
6
6
  if (!getCurrentInstance()) {
@@ -1,2 +1,3 @@
1
+ import type { NitroApp } from 'nitropack';
1
2
  declare const _default: (nitroApp: NitroApp) => void;
2
3
  export default _default;
package/dist/types.d.mts CHANGED
@@ -1,16 +1,3 @@
1
+ export { default } from './module.mjs'
1
2
 
2
- import type { ModuleOptions } from './module.js'
3
-
4
-
5
- declare module '@nuxt/schema' {
6
- interface NuxtConfig { ['cacheControl']?: Partial<ModuleOptions> }
7
- interface NuxtOptions { ['cacheControl']?: ModuleOptions }
8
- }
9
-
10
- declare module 'nuxt/schema' {
11
- interface NuxtConfig { ['cacheControl']?: Partial<ModuleOptions> }
12
- interface NuxtOptions { ['cacheControl']?: ModuleOptions }
13
- }
14
-
15
-
16
- export type { ModuleOptions, default } from './module.js'
3
+ export { type ModuleOptions } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rezo-zero/nuxt-cache-control",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Declare fine-grained cache control headers for your Nuxt application in each page",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -10,44 +10,47 @@
10
10
  },
11
11
  "exports": {
12
12
  ".": {
13
- "types": "./dist/types.d.ts",
14
- "import": "./dist/module.mjs",
15
- "require": "./dist/module.cjs"
13
+ "types": "./dist/types.d.mts",
14
+ "import": "./dist/module.mjs"
15
+ }
16
+ },
17
+ "main": "./dist/module.mjs",
18
+ "typesVersions": {
19
+ "*": {
20
+ ".": [
21
+ "./dist/types.d.mts"
22
+ ]
16
23
  }
17
24
  },
18
- "main": "./dist/module.cjs",
19
- "types": "./dist/types.d.ts",
20
25
  "files": [
21
26
  "dist"
22
27
  ],
23
28
  "scripts": {
24
29
  "prepack": "nuxt-module-build build",
25
- "dev": "nuxi dev playground",
30
+ "dev": "npm run dev:prepare && nuxi dev playground",
26
31
  "dev:build": "nuxi build playground",
27
32
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
28
- "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish --access=public && git push --follow-tags",
33
+ "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
29
34
  "lint": "eslint .",
30
35
  "test": "vitest run",
31
- "test:watch": "vitest watch"
36
+ "test:watch": "vitest watch",
37
+ "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
32
38
  },
33
39
  "dependencies": {
34
- "@nuxt/kit": "^3.11.1",
40
+ "@nuxt/kit": "^4.0.1",
35
41
  "defu": "^6.1.4"
36
42
  },
37
43
  "devDependencies": {
38
- "@nuxt/devtools": "latest",
39
- "@nuxt/eslint-config": "^0.2.0",
40
- "@nuxt/module-builder": "^0.5.5",
41
- "@nuxt/schema": "^3.11.1",
42
- "@nuxt/test-utils": "^3.12.0",
43
- "@types/node": "^20.11.29",
44
- "changelogen": "^0.5.5",
45
- "eslint": "^8.57.0",
46
- "eslint-config-prettier": "^9.1.0",
47
- "eslint-plugin-prettier": "^5.1.3",
48
- "nuxt": "^3.11.1",
49
- "prettier": "^3.2.5",
50
- "vitest": "^1.4.0"
44
+ "@nuxt/devtools": "^2.6.2",
45
+ "@nuxt/eslint-config": "^1.7.0",
46
+ "@nuxt/module-builder": "^1.0.1",
47
+ "@nuxt/schema": "^4.0.1",
48
+ "@nuxt/test-utils": "^3.19.2",
49
+ "@types/node": "^24.1.0",
50
+ "changelogen": "^0.6.2",
51
+ "eslint": "^9.31.0",
52
+ "nuxt": "^4.0.1",
53
+ "vitest": "^3.2.4"
51
54
  },
52
55
  "engines": {
53
56
  "node": "^20"
package/dist/module.cjs DELETED
@@ -1,5 +0,0 @@
1
- module.exports = function(...args) {
2
- return import('./module.mjs').then(m => m.default.call(this, ...args))
3
- }
4
- const _meta = module.exports.meta = require('./module.json')
5
- module.exports.getMeta = () => Promise.resolve(_meta)
package/dist/module.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import * as _nuxt_schema from '@nuxt/schema';
2
-
3
- interface ModuleOptions {
4
- noCacheCookies?: string[];
5
- }
6
- declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
7
-
8
- export { type ModuleOptions, _default as default };
package/dist/types.d.ts DELETED
@@ -1,16 +0,0 @@
1
-
2
- import type { ModuleOptions } from './module'
3
-
4
-
5
- declare module '@nuxt/schema' {
6
- interface NuxtConfig { ['cacheControl']?: Partial<ModuleOptions> }
7
- interface NuxtOptions { ['cacheControl']?: ModuleOptions }
8
- }
9
-
10
- declare module 'nuxt/schema' {
11
- interface NuxtConfig { ['cacheControl']?: Partial<ModuleOptions> }
12
- interface NuxtOptions { ['cacheControl']?: ModuleOptions }
13
- }
14
-
15
-
16
- export type { ModuleOptions, default } from './module'