nuxt-og-image 6.3.0 → 6.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.
Files changed (29) hide show
  1. package/dist/chunks/tw4.cjs +1 -1
  2. package/dist/chunks/tw4.mjs +1 -1
  3. package/dist/chunks/uno.cjs +1 -1
  4. package/dist/chunks/uno.mjs +1 -1
  5. package/dist/cli.cjs +6 -14
  6. package/dist/cli.mjs +6 -14
  7. package/dist/devtools/200.html +1 -1
  8. package/dist/devtools/404.html +1 -1
  9. package/dist/devtools/_nuxt/{D1nfKtji.js → CD0R49mQ.js} +1 -1
  10. package/dist/devtools/_nuxt/{Bpmn-wMY.js → CaQt7uvw.js} +1 -1
  11. package/dist/devtools/_nuxt/{BSxwzHhf.js → D0q6HvYk.js} +21 -21
  12. package/dist/devtools/_nuxt/{Cw6IxO5j.js → DGG_4uof.js} +1 -1
  13. package/dist/devtools/_nuxt/DevtoolsSnippet.CHln_zRX.css +1 -0
  14. package/dist/devtools/_nuxt/builds/latest.json +1 -1
  15. package/dist/devtools/_nuxt/builds/meta/9d408b39-cc9a-4751-be86-2f2ab3ba2395.json +1 -0
  16. package/dist/devtools/_nuxt/{entry.DgipzMgL.css → entry.BPMZ_Jol.css} +1 -1
  17. package/dist/devtools/_nuxt/{pages.DyP4FhjX.css → pages.CPczdJu3.css} +1 -1
  18. package/dist/devtools/debug/index.html +1 -1
  19. package/dist/devtools/docs/index.html +1 -1
  20. package/dist/devtools/index.html +1 -1
  21. package/dist/devtools/templates/index.html +1 -1
  22. package/dist/module.cjs +1 -1
  23. package/dist/module.json +1 -1
  24. package/dist/module.mjs +1 -1
  25. package/dist/shared/{nuxt-og-image.D8duo3Ar.mjs → nuxt-og-image.CYm-mAcA.mjs} +7 -6
  26. package/dist/shared/{nuxt-og-image.DBQcjcr6.cjs → nuxt-og-image.PUNoqZDW.cjs} +8 -7
  27. package/package.json +8 -8
  28. package/dist/devtools/_nuxt/DevtoolsSnippet.BaNDy_jv.css +0 -1
  29. package/dist/devtools/_nuxt/builds/meta/20c4a6d7-a8d9-4f9c-a8e8-bb611f6dfcfb.json +0 -1
@@ -4143,7 +4143,7 @@ const module$1 = kit.defineNuxtModule({
4143
4143
  await onUpgrade(nuxt, options, previousVersion);
4144
4144
  },
4145
4145
  async setup(config, nuxt) {
4146
- const _resolver = kit.createResolver((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/nuxt-og-image.DBQcjcr6.cjs', document.baseURI).href)));
4146
+ const _resolver = kit.createResolver((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/nuxt-og-image.PUNoqZDW.cjs', document.baseURI).href)));
4147
4147
  const fixSharedPath = (p) => {
4148
4148
  if (p.includes("/shared/runtime/"))
4149
4149
  return p.replace("/shared/runtime/", "/runtime/");
@@ -4176,15 +4176,16 @@ const module$1 = kit.defineNuxtModule({
4176
4176
  if (config.debug && !nuxt.options.dev) {
4177
4177
  logger_js.logger.warn("`ogImage.debug` is enabled in production. This exposes the `/_og/debug.json` endpoint and should not be enabled in production. Disable it before deploying.");
4178
4178
  }
4179
- if (config.security?.strict && !config.security?.secret) {
4180
- throw new Error("[nuxt-og-image] `security.strict` requires `security.secret` to be set. Generate one with: npx nuxt-og-image generate-secret");
4179
+ const hasSecret = !!(config.security?.secret || process.env.NUXT_OG_IMAGE_SECRET);
4180
+ if (config.security?.strict && !hasSecret) {
4181
+ throw new Error("[nuxt-og-image] `security.strict` requires a signing secret. Generate one with: npx nuxt-og-image generate-secret");
4181
4182
  }
4182
- if (nuxt.options.dev && !config.zeroRuntime && !config.security?.secret) {
4183
+ if (nuxt.options.dev && !config.zeroRuntime && !hasSecret) {
4183
4184
  logger_js.logger.warn([
4184
4185
  "OG image URLs are not signed. Anyone can craft arbitrary image generation requests.",
4185
4186
  "",
4186
- "Either set a signing secret:",
4187
- " ogImage: { security: { secret: process.env.OG_IMAGE_SECRET } }",
4187
+ "Set a signing secret via env variable:",
4188
+ " NUXT_OG_IMAGE_SECRET=<secret>",
4188
4189
  "",
4189
4190
  " Generate one with: npx nuxt-og-image generate-secret",
4190
4191
  "",
@@ -5040,7 +5041,7 @@ export const rootDir = ${JSON.stringify(nuxt.options.rootDir)}`;
5040
5041
  renderTimeout: config.security?.renderTimeout ?? 15e3,
5041
5042
  maxQueryParamSize: config.security?.maxQueryParamSize ?? (config.security?.strict ? 2048 : null),
5042
5043
  restrictRuntimeImagesToOrigin: config.security?.restrictRuntimeImagesToOrigin === true || config.security?.strict && config.security?.restrictRuntimeImagesToOrigin == null ? [] : config.security?.restrictRuntimeImagesToOrigin || false,
5043
- secret: config.security?.secret || ""
5044
+ secret: config.security?.secret || process.env.NUXT_OG_IMAGE_SECRET || ""
5044
5045
  }
5045
5046
  };
5046
5047
  if (nuxt.options.dev) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-og-image",
3
3
  "type": "module",
4
- "version": "6.3.0",
4
+ "version": "6.3.2",
5
5
  "description": "Enlightened OG Image generation for Nuxt.",
6
6
  "author": {
7
7
  "website": "https://harlanzw.com",
@@ -109,8 +109,8 @@
109
109
  "magicast": "^0.5.2",
110
110
  "mocked-exports": "^0.1.1",
111
111
  "nuxt-site-config": "^4.0.7",
112
- "nuxtseo-layer-devtools": "^5.0.1",
113
- "nuxtseo-shared": "^5.0.1",
112
+ "nuxtseo-layer-devtools": "^5.0.2",
113
+ "nuxtseo-shared": "^5.0.2",
114
114
  "nypm": "^0.6.5",
115
115
  "ofetch": "^1.5.1",
116
116
  "ohash": "^2.0.11",
@@ -131,10 +131,10 @@
131
131
  "devDependencies": {
132
132
  "@antfu/eslint-config": "^7.7.3",
133
133
  "@iconify-json/carbon": "^1.2.20",
134
- "@iconify-json/logos": "^1.2.10",
134
+ "@iconify-json/logos": "^1.2.11",
135
135
  "@iconify-json/noto": "^1.2.7",
136
136
  "@iconify-json/ri": "^1.2.10",
137
- "@iconify-json/tabler": "^1.2.32",
137
+ "@iconify-json/tabler": "^1.2.33",
138
138
  "@img/sharp-linux-x64": "^0.34.5",
139
139
  "@nuxt/content": "^3.12.0",
140
140
  "@nuxt/devtools": "^3.2.4",
@@ -164,8 +164,8 @@
164
164
  "eslint-plugin-harlanzw": "^0.12.0",
165
165
  "fontless": "^0.2.1",
166
166
  "get-image-colors": "^4.0.1",
167
- "globby": "^16.1.1",
168
- "happy-dom": "^20.8.8",
167
+ "globby": "^16.2.0",
168
+ "happy-dom": "^20.8.9",
169
169
  "jest-image-snapshot": "^6.5.2",
170
170
  "lightningcss": "^1.32.0",
171
171
  "nuxt": "^4.4.2",
@@ -180,7 +180,7 @@
180
180
  "unocss": "^66.6.7",
181
181
  "vitest": "^4.1.2",
182
182
  "vue-tsc": "^3.2.6",
183
- "wrangler": "^4.77.0",
183
+ "wrangler": "^4.78.0",
184
184
  "yoga-wasm-web": "^0.3.3"
185
185
  },
186
186
  "scripts": {
@@ -1 +0,0 @@
1
- .devtools-snippet[data-v-bd254481]{margin:.5rem .75rem}.devtools-snippet-header[data-v-bd254481]{justify-content:space-between;align-items:center;margin-bottom:.375rem;display:flex}.devtools-snippet-label[data-v-bd254481]{color:var(--color-text-muted);font-family:var(--font-mono);letter-spacing:-.01em;font-size:.6875rem;font-weight:500}.devtools-snippet-block[data-v-bd254481]{border-radius:var(--radius-sm);max-height:300px;font-size:.6875rem;line-height:1.6;overflow-y:auto;padding:.5rem .625rem!important}
@@ -1 +0,0 @@
1
- {"id":"20c4a6d7-a8d9-4f9c-a8e8-bb611f6dfcfb","timestamp":1774750921650,"prerendered":[]}