nuxtseo-layer-devtools 0.5.1 → 5.0.1
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { onClickOutside } from '@vueuse/core'
|
|
3
3
|
import { computed, ref } from 'vue'
|
|
4
|
-
import {
|
|
4
|
+
import { getSetupChecklist } from '../composables/checklist'
|
|
5
5
|
import { fetchInstalledModules, findModuleByName, showModuleSplash } from '../composables/modules'
|
|
6
6
|
import { colorMode } from '../composables/rpc'
|
|
7
7
|
import { hasProductionUrl, isConnected, isProductionMode, isStandalone, path, previewSource, productionUrl, standaloneUrl } from '../composables/state'
|
|
@@ -94,7 +94,7 @@ const standaloneHostname = computed(() => {
|
|
|
94
94
|
|
|
95
95
|
const showStandaloneSetup = computed(() => !isConnected.value && !isStandalone.value)
|
|
96
96
|
|
|
97
|
-
const { evaluated, getModuleResultByName } =
|
|
97
|
+
const { evaluated, getModuleResultByName } = getSetupChecklist()
|
|
98
98
|
const moduleChecklistResult = computed(() => {
|
|
99
99
|
if (!evaluated.value || !moduleName)
|
|
100
100
|
return undefined
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { TabsItem } from '@nuxt/ui'
|
|
3
3
|
import { onClickOutside, useClipboard } from '@vueuse/core'
|
|
4
4
|
import { computed, ref, watch } from 'vue'
|
|
5
|
-
import {
|
|
5
|
+
import { getSetupChecklist } from '../composables/checklist'
|
|
6
6
|
import { moduleCatalog, showModuleSplash, switchToModule } from '../composables/modules'
|
|
7
7
|
import { isConnected } from '../composables/state'
|
|
8
8
|
|
|
@@ -29,7 +29,7 @@ const installCommand = computed(() => {
|
|
|
29
29
|
|
|
30
30
|
const { copy, copied } = useClipboard({ source: installCommand })
|
|
31
31
|
|
|
32
|
-
const { summary, evaluated, evaluate, getModuleResultByName } =
|
|
32
|
+
const { summary, evaluated, evaluate, getModuleResultByName } = getSetupChecklist()
|
|
33
33
|
|
|
34
34
|
// Evaluate checklist on first splash open
|
|
35
35
|
const hasEvaluated = ref(false)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { getSetupChecklist } from '../composables/checklist'
|
|
3
3
|
|
|
4
4
|
const { currentModule } = defineProps<{
|
|
5
5
|
currentModule?: string
|
|
6
6
|
}>()
|
|
7
7
|
|
|
8
|
-
const { results, loading, evaluated, evaluate } =
|
|
8
|
+
const { results, loading, evaluated, evaluate } = getSetupChecklist()
|
|
9
9
|
|
|
10
10
|
// Evaluate on mount if not already done
|
|
11
11
|
if (!evaluated.value)
|
package/composables/checklist.ts
CHANGED
|
@@ -443,7 +443,10 @@ const results = computed<ModuleChecklistResult[]>(() => {
|
|
|
443
443
|
})
|
|
444
444
|
|
|
445
445
|
const summary = computed<ChecklistSummary>(() => {
|
|
446
|
-
let total = 0
|
|
446
|
+
let total = 0
|
|
447
|
+
let passed = 0
|
|
448
|
+
let requiredPending = 0
|
|
449
|
+
let recommendedPending = 0
|
|
447
450
|
for (const r of results.value) {
|
|
448
451
|
total += r.items.length
|
|
449
452
|
passed += r.items.filter(i => i.passed).length
|
|
@@ -473,7 +476,8 @@ export async function evaluate(): Promise<void> {
|
|
|
473
476
|
loading.value = false
|
|
474
477
|
}
|
|
475
478
|
|
|
476
|
-
|
|
479
|
+
// eslint-disable-next-line ts/explicit-function-return-type
|
|
480
|
+
export function getSetupChecklist() {
|
|
477
481
|
return {
|
|
478
482
|
results,
|
|
479
483
|
summary,
|
|
@@ -11,7 +11,7 @@ const PM_COMMANDS: Record<PackageManager, { run: string, exec: string, update: s
|
|
|
11
11
|
npm: { run: 'npm', exec: 'npx', update: 'npm update', dedupe: 'npm dedupe' },
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export function pmCommands() {
|
|
14
|
+
export function pmCommands(): { run: string, exec: string, update: string, dedupe: string } {
|
|
15
15
|
return PM_COMMANDS[packageManager.value]
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -23,7 +23,7 @@ const LOCK_FILES: [string, PackageManager][] = [
|
|
|
23
23
|
]
|
|
24
24
|
|
|
25
25
|
let detected = false
|
|
26
|
-
export function detectPackageManager() {
|
|
26
|
+
export function detectPackageManager(): void {
|
|
27
27
|
if (detected)
|
|
28
28
|
return
|
|
29
29
|
detected = true
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxtseo-layer-devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "5.0.1",
|
|
5
5
|
"description": "Shared Nuxt layer for Nuxt SEO devtools clients.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -9,6 +9,16 @@
|
|
|
9
9
|
"url": "https://harlanzw.com/"
|
|
10
10
|
},
|
|
11
11
|
"license": "MIT",
|
|
12
|
+
"funding": "https://github.com/sponsors/harlan-zw",
|
|
13
|
+
"homepage": "https://nuxtseo.com/",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/harlan-zw/nuxt-seo.git",
|
|
17
|
+
"directory": "packages/devtools-layer"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/harlan-zw/nuxt-seo/issues"
|
|
21
|
+
},
|
|
12
22
|
"exports": {
|
|
13
23
|
".": "./nuxt.config.ts",
|
|
14
24
|
"./composables/shiki": "./composables/shiki.ts",
|
|
@@ -37,7 +47,7 @@
|
|
|
37
47
|
"ofetch": "^1.5.1",
|
|
38
48
|
"shiki": "^4.0.2",
|
|
39
49
|
"ufo": "^1.6.3",
|
|
40
|
-
"nuxtseo-shared": "0.
|
|
50
|
+
"nuxtseo-shared": "5.0.1"
|
|
41
51
|
},
|
|
42
52
|
"devDependencies": {
|
|
43
53
|
"nuxt": "^4.4.2",
|