@altafusion/fugue-content 0.6.3 → 0.6.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @altafusion/fugue-content
2
2
 
3
+ ## 0.6.4
4
+
5
+ ### Patch Changes
6
+
7
+ - fbc4be2: Fix the Studio Drafts section never showing to a signed-in editor in production. The access rule compared the `studio-session-check` cookie to the string `'true'`, but `useCookie` parses that value into the boolean `true`, so it was always false. The rule is now `canUsePrivilegedDevTools`, which compares as text like the rest of `fugue-content`, with tests for both forms.
8
+ - @altafusion/fugue-simple-auth@0.6.4
9
+ - @altafusion/fugue-theme@0.6.4
10
+ - @altafusion/nuxt-base@0.6.4
11
+ - @altafusion/shell@0.6.4
12
+
3
13
  ## 0.6.3
4
14
 
5
15
  ### Patch Changes
@@ -1,5 +1,6 @@
1
1
  import type { Component } from 'vue'
2
2
  import { createQeTools } from '../../lib/qe-tools'
3
+ import { canUsePrivilegedDevTools } from '../../lib/qe-tools/access'
3
4
  import FugueContentQeToolsDrafts from '../components/FugueContentQeToolsDrafts.vue'
4
5
 
5
6
  const QE_TOOLS_URL_PARAM = 'qetools'
@@ -45,7 +46,7 @@ export default defineNuxtPlugin({
45
46
  nuxtApp.hook('app:created', () => {
46
47
  const devtools = (nuxtApp as unknown as { $fugueDevtools?: DevToolsRegistrar }).$fugueDevtools
47
48
  if (devtools) {
48
- devtools.setAccessResolver(() => import.meta.dev || sessionCheck.value === 'true')
49
+ devtools.setAccessResolver(() => canUsePrivilegedDevTools(import.meta.dev, sessionCheck.value))
49
50
  devtools.registerSection({
50
51
  id: 'studio-drafts',
51
52
  label: 'Studio Drafts',
@@ -0,0 +1,10 @@
1
+ import { isFugueContentStudioSessionCheck } from '../studio-session'
2
+
3
+ /**
4
+ * Who sees the privileged dev tools sections (the Studio Drafts): everyone in development, and in production a signed-in
5
+ * Studio editor. `sessionCheck` is the `studio-session-check` cookie as `useCookie` returns it: Nuxt parses the cookie value
6
+ * `true` into the boolean `true`, so it is compared as text, never with `=== 'true'`.
7
+ */
8
+ export function canUsePrivilegedDevTools(isDev: boolean, sessionCheck: unknown): boolean {
9
+ return isDev || isFugueContentStudioSessionCheck(sessionCheck)
10
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@altafusion/fugue-content",
3
3
  "type": "module",
4
- "version": "0.6.3",
4
+ "version": "0.6.4",
5
5
  "description": "Nuxt layer for Fugue Content sites — editorial pages, Studio, and MDC, composed with shell.",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/altafusion/fugue/tree/main/packages-consumer/fugue-content#readme",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "main": "./nuxt.config.ts",
28
28
  "peerDependencies": {
29
- "@altafusion/fugue-theme": "0.6.3",
29
+ "@altafusion/fugue-theme": "0.6.4",
30
30
  "better-sqlite3": "^12.11.1",
31
31
  "h3": "^1.15.0",
32
32
  "nuxt": "^4.7.0",
@@ -34,9 +34,9 @@
34
34
  "vue-router": "^5.5.3"
35
35
  },
36
36
  "dependencies": {
37
- "@altafusion/fugue-simple-auth": "0.6.3",
38
- "@altafusion/nuxt-base": "0.6.3",
39
- "@altafusion/shell": "0.6.3",
37
+ "@altafusion/fugue-simple-auth": "0.6.4",
38
+ "@altafusion/nuxt-base": "0.6.4",
39
+ "@altafusion/shell": "0.6.4",
40
40
  "@nuxt/content": "^3.17.0",
41
41
  "@nuxt/kit": "^4.7.0",
42
42
  "@nuxtjs/i18n": "^10.7.0",
@@ -45,8 +45,8 @@
45
45
  "ufo": "^1.6.4"
46
46
  },
47
47
  "devDependencies": {
48
- "@altafusion/eslint-config": "0.6.3",
49
- "@altafusion/fugue-theme": "0.6.3",
48
+ "@altafusion/eslint-config": "0.6.4",
49
+ "@altafusion/fugue-theme": "0.6.4",
50
50
  "@iconify-json/lucide": "^1.2.160",
51
51
  "@types/node": "^26.6.11",
52
52
  "better-sqlite3": "^12.11.1",