@gscdump/nuxt 0.19.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/LICENSE +21 -0
- package/README.md +138 -0
- package/app/assets/css/main.css +2 -0
- package/app/components/GscAnalyzerPanel.vue +94 -0
- package/app/components/GscAnonymizationBanner.vue +46 -0
- package/app/components/GscBootProgress.vue +297 -0
- package/app/components/GscCommandPalette.vue +77 -0
- package/app/components/GscDashboardPage.vue +26 -0
- package/app/components/GscEngineBadge.vue +28 -0
- package/app/components/GscHero.vue +215 -0
- package/app/components/GscLazyTopResult.vue +45 -0
- package/app/components/GscPerformanceChart.vue +532 -0
- package/app/components/GscPositionDistributionChart.vue +63 -0
- package/app/components/GscQueryLabel.vue +63 -0
- package/app/components/GscSitePageHeader.vue +40 -0
- package/app/components/GscSourceDebugPanel.vue +195 -0
- package/app/components/GscSyncStatusCell.vue +54 -0
- package/app/components/GscTopRollupCard.vue +90 -0
- package/app/composables/_useGscBackfill.ts +111 -0
- package/app/composables/_useGscQueryDispatcher.ts +122 -0
- package/app/composables/_useGscResource.ts +114 -0
- package/app/composables/_useGscSharedSiteResource.ts +136 -0
- package/app/composables/useGscAnalytics.ts +197 -0
- package/app/composables/useGscAnalyticsClient.ts +9 -0
- package/app/composables/useGscAnalyticsConfig.ts +8 -0
- package/app/composables/useGscAnalyticsSourceInfo.ts +143 -0
- package/app/composables/useGscAnalyzer.ts +374 -0
- package/app/composables/useGscAnalyzerBatch.ts +106 -0
- package/app/composables/useGscAnalyzerDefs.ts +118 -0
- package/app/composables/useGscAuth.ts +115 -0
- package/app/composables/useGscConsoleUrl.ts +45 -0
- package/app/composables/useGscCountries.ts +47 -0
- package/app/composables/useGscCurrentSite.ts +15 -0
- package/app/composables/useGscEngine.ts +16 -0
- package/app/composables/useGscInspectionHistory.ts +42 -0
- package/app/composables/useGscInspections.ts +52 -0
- package/app/composables/useGscPanelContext.ts +24 -0
- package/app/composables/useGscParquetTable.ts +199 -0
- package/app/composables/useGscPeriod.ts +243 -0
- package/app/composables/useGscQuery.ts +290 -0
- package/app/composables/useGscQueryDispatcher.ts +122 -0
- package/app/composables/useGscRequestIndexingInspect.ts +20 -0
- package/app/composables/useGscResource.ts +114 -0
- package/app/composables/useGscRollup.ts +252 -0
- package/app/composables/useGscRollupTable.ts +78 -0
- package/app/composables/useGscRowQuery.ts +56 -0
- package/app/composables/useGscSearchAppearance.ts +47 -0
- package/app/composables/useGscSitemapHistory.ts +41 -0
- package/app/composables/useGscSitemaps.ts +45 -0
- package/app/composables/useGscTableState.ts +119 -0
- package/app/plugins/analytics.ts +57 -0
- package/app/utils/anonymization.ts +24 -0
- package/app/utils/country-names.ts +56 -0
- package/app/utils/gsc-constants.ts +10 -0
- package/app/utils/gsc-error.ts +58 -0
- package/app/utils/gsc-fetch.ts +94 -0
- package/app/utils/gsc-filters.ts +32 -0
- package/app/utils/gsc-rows.ts +72 -0
- package/app/utils/position.ts +7 -0
- package/app/utils/setup-gsc-fetch-auth.ts +62 -0
- package/module.ts +81 -0
- package/nuxt.config.ts +36 -0
- package/package.json +75 -0
- package/types.ts +114 -0
package/nuxt.config.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Layer-mode Nuxt config for @gscdump/nuxt.
|
|
2
|
+
//
|
|
3
|
+
// Consuming apps pull this in via `extends: ['@gscdump/nuxt']` in
|
|
4
|
+
// their own nuxt.config.ts. Anything declared here is a shared default; hosts
|
|
5
|
+
// can override in the normal Nuxt fashion (defu-merged, app config wins).
|
|
6
|
+
//
|
|
7
|
+
// Contract: the layer assumes every consumer is a Nuxt UI v4 app. We register
|
|
8
|
+
// `@nuxt/ui` here and ship the shared main.css so hosts don't have to
|
|
9
|
+
// rediscover the setup — components in this layer freely use UButton,
|
|
10
|
+
// UPopover, UIcon, etc.
|
|
11
|
+
|
|
12
|
+
import { fileURLToPath } from 'node:url'
|
|
13
|
+
|
|
14
|
+
export default defineNuxtConfig({
|
|
15
|
+
// Register the layer's module so hooks + runtime config land on host apps
|
|
16
|
+
// without them having to wire each module individually.
|
|
17
|
+
modules: [
|
|
18
|
+
fileURLToPath(new URL('./module.ts', import.meta.url)),
|
|
19
|
+
'@nuxt/ui',
|
|
20
|
+
'@vueuse/nuxt',
|
|
21
|
+
],
|
|
22
|
+
|
|
23
|
+
css: [
|
|
24
|
+
fileURLToPath(new URL('./app/assets/css/main.css', import.meta.url)),
|
|
25
|
+
],
|
|
26
|
+
|
|
27
|
+
// runtimeConfig defaults live in module.ts (single source of truth).
|
|
28
|
+
|
|
29
|
+
vite: {
|
|
30
|
+
optimizeDeps: {
|
|
31
|
+
// DuckDB-WASM workers use URL imports Vite's prebundler cannot resolve.
|
|
32
|
+
// Keep them outside optimizeDeps so they stream as-is.
|
|
33
|
+
exclude: ['@duckdb/duckdb-wasm'],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gscdump/nuxt",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.19.0",
|
|
5
|
+
"description": "Nuxt layer: GSC analytics UI + DuckDB-WASM integration. Frontend-only; server primitives live in @gscdump/analysis, @gscdump/engine-sqlite, @gscdump/cloudflare, and host apps.",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Harlan Wilton",
|
|
8
|
+
"email": "harlan@harlanzw.com",
|
|
9
|
+
"url": "https://harlanzw.com/"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/harlan-zw/gscdump.git",
|
|
15
|
+
"directory": "packages/nuxt"
|
|
16
|
+
},
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./types.ts",
|
|
21
|
+
"import": "./nuxt.config.ts",
|
|
22
|
+
"default": "./nuxt.config.ts"
|
|
23
|
+
},
|
|
24
|
+
"./types": {
|
|
25
|
+
"types": "./types.ts",
|
|
26
|
+
"import": "./types.ts",
|
|
27
|
+
"default": "./types.ts"
|
|
28
|
+
},
|
|
29
|
+
"./module": {
|
|
30
|
+
"types": "./module.ts",
|
|
31
|
+
"import": "./module.ts",
|
|
32
|
+
"default": "./module.ts"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"main": "./nuxt.config.ts",
|
|
36
|
+
"types": "./types.ts",
|
|
37
|
+
"files": [
|
|
38
|
+
"README.md",
|
|
39
|
+
"app",
|
|
40
|
+
"module.ts",
|
|
41
|
+
"nuxt.config.ts",
|
|
42
|
+
"types.ts"
|
|
43
|
+
],
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"nuxt": "^4.4.6",
|
|
46
|
+
"vue": "^3.5.34"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@duckdb/duckdb-wasm": "^1.32.0",
|
|
50
|
+
"@nuxt/ui": "^4.7.1",
|
|
51
|
+
"@unovis/ts": "^1.6.5",
|
|
52
|
+
"@unovis/vue": "^1.6.5",
|
|
53
|
+
"@vueuse/core": "^14.3.0",
|
|
54
|
+
"@vueuse/nuxt": "^14.3.0",
|
|
55
|
+
"defu": "^6.1.7",
|
|
56
|
+
"ofetch": "^1.5.1",
|
|
57
|
+
"tailwindcss": "^4.3.0",
|
|
58
|
+
"@gscdump/contracts": "0.19.0",
|
|
59
|
+
"@gscdump/analysis": "0.19.0",
|
|
60
|
+
"@gscdump/engine": "0.19.0",
|
|
61
|
+
"@gscdump/engine-duckdb-wasm": "0.19.0",
|
|
62
|
+
"@gscdump/sdk": "0.19.0",
|
|
63
|
+
"gscdump": "0.19.0"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@nuxt/kit": "^4.4.6",
|
|
67
|
+
"nuxt": "^4.4.6",
|
|
68
|
+
"typescript": "^6.0.3",
|
|
69
|
+
"vue": "^3.5.34"
|
|
70
|
+
},
|
|
71
|
+
"scripts": {
|
|
72
|
+
"build": "nuxt prepare",
|
|
73
|
+
"typecheck": "nuxt typecheck"
|
|
74
|
+
}
|
|
75
|
+
}
|
package/types.ts
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// Public API surface of @gscdump/nuxt.
|
|
2
|
+
// Anything not exported here is considered internal and may change without a major bump.
|
|
3
|
+
//
|
|
4
|
+
// This package is a frontend-only Nuxt layer. Server-side primitives (auth
|
|
5
|
+
// providers, query sources, GSC API helpers) live in their respective sibling
|
|
6
|
+
// packages: `@gscdump/analysis` (sources), `gscdump` (GSC API client), and
|
|
7
|
+
// host-specific Nitro server code in the consuming app.
|
|
8
|
+
|
|
9
|
+
import type { AnalyticsClient } from '@gscdump/sdk'
|
|
10
|
+
import type { $Fetch } from 'ofetch'
|
|
11
|
+
import type { GscQueryDispatcher } from './app/composables/_useGscQueryDispatcher'
|
|
12
|
+
import type { GscAnalyticsContext } from './app/composables/useGscAnalytics'
|
|
13
|
+
import type { GscAnalyzerDefinition } from './app/composables/useGscAnalyzerDefs'
|
|
14
|
+
|
|
15
|
+
export interface GscAnalyticsRuntimeConfig {
|
|
16
|
+
/**
|
|
17
|
+
* Base URL the client uses to reach the analytics API (`/api/__gsc/*`).
|
|
18
|
+
* Empty string = same-origin. Hosts running the layer as a portable client
|
|
19
|
+
* against a remote origin (e.g. an embedded dashboard pointing at
|
|
20
|
+
* https://gscdump.com) set this via `GSCDUMP_ANALYTICS_API_BASE`.
|
|
21
|
+
*/
|
|
22
|
+
apiBase: string
|
|
23
|
+
/** Base URL for DuckDB-WASM worker + bundle assets. Empty = layer default. */
|
|
24
|
+
duckdbBundleBase: string
|
|
25
|
+
/** IANA tz name; empty = browser default. */
|
|
26
|
+
timezone: string
|
|
27
|
+
/** When true, layer auto-toasts classified fetch errors via Nuxt UI. */
|
|
28
|
+
toastErrors: boolean
|
|
29
|
+
/** Default engine when caller doesn't pass `opts.engine`. */
|
|
30
|
+
defaultEngine: 'auto' | 'browser' | 'server'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare module '@nuxt/schema' {
|
|
34
|
+
interface PublicRuntimeConfig {
|
|
35
|
+
analytics: GscAnalyticsRuntimeConfig
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare module '#app' {
|
|
40
|
+
interface NuxtApp {
|
|
41
|
+
$gscAnalytics: GscAnalyticsContext
|
|
42
|
+
$gscQueryDispatcher: GscQueryDispatcher
|
|
43
|
+
$gscFetch: $Fetch
|
|
44
|
+
$gscAnalyticsClient: AnalyticsClient
|
|
45
|
+
$gscAnalyzers?: GscAnalyzerDefinition[]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export type {
|
|
50
|
+
GscAnalyzerBatchEntry,
|
|
51
|
+
GscAnalyzerBatchRunner,
|
|
52
|
+
GscAnalyzerBatchStatus,
|
|
53
|
+
UseGscAnalyzerBatchOptions,
|
|
54
|
+
} from './app/composables/useGscAnalyzerBatch'
|
|
55
|
+
export { defineGscAnalyzer } from './app/composables/useGscAnalyzerDefs'
|
|
56
|
+
export type {
|
|
57
|
+
GscAnalyzerAccent,
|
|
58
|
+
GscAnalyzerCapabilities,
|
|
59
|
+
GscAnalyzerCapability,
|
|
60
|
+
GscAnalyzerDefinition,
|
|
61
|
+
GscAnalyzerDefinitionWithCapability,
|
|
62
|
+
GscAnalyzerInsightCard,
|
|
63
|
+
GscAnalyzerKind,
|
|
64
|
+
GscAnalyzerPanelResult,
|
|
65
|
+
GscAnalyzerPanelSpec,
|
|
66
|
+
GscAnalyzerStatTile,
|
|
67
|
+
} from './app/composables/useGscAnalyzerDefs'
|
|
68
|
+
|
|
69
|
+
export { gscPanelRunnerKey, useGscPanelRunner } from './app/composables/useGscPanelContext'
|
|
70
|
+
|
|
71
|
+
export type { GscPanelRunnerContext } from './app/composables/useGscPanelContext'
|
|
72
|
+
export type {
|
|
73
|
+
UseGscParquetTableOptions,
|
|
74
|
+
UseGscParquetTableReturn,
|
|
75
|
+
} from './app/composables/useGscParquetTable'
|
|
76
|
+
|
|
77
|
+
export type {
|
|
78
|
+
GscBackfillRunner,
|
|
79
|
+
GscQueryDecision,
|
|
80
|
+
GscQueryDecisionReason,
|
|
81
|
+
GscQueryEngine,
|
|
82
|
+
GscQueryMeta,
|
|
83
|
+
GscQueryStatus,
|
|
84
|
+
UseGscQueryOptions,
|
|
85
|
+
UseGscQueryReturn,
|
|
86
|
+
} from './app/composables/useGscQuery'
|
|
87
|
+
|
|
88
|
+
export type { UseGscRollupTableOptions } from './app/composables/useGscRollupTable'
|
|
89
|
+
|
|
90
|
+
export type {
|
|
91
|
+
AnalysisSourcesResponse,
|
|
92
|
+
CountriesResponse,
|
|
93
|
+
CountryRow,
|
|
94
|
+
GscApiRange,
|
|
95
|
+
GscRowQueryMeta,
|
|
96
|
+
GscRowQueryResponse,
|
|
97
|
+
IndexingDiagnostics,
|
|
98
|
+
IndexingIssue,
|
|
99
|
+
IndexingIssueSeverity,
|
|
100
|
+
IndexingUrlRow,
|
|
101
|
+
IndexingUrlsResponse,
|
|
102
|
+
IndexingUrlStatus,
|
|
103
|
+
InspectionHistoryRecord,
|
|
104
|
+
InspectionHistoryResponse,
|
|
105
|
+
SearchAppearanceResponse,
|
|
106
|
+
SearchAppearanceRow,
|
|
107
|
+
SiteListItem,
|
|
108
|
+
SitemapAddedRow,
|
|
109
|
+
SitemapChangesResponse,
|
|
110
|
+
SitemapHistoryRecord,
|
|
111
|
+
SitemapHistoryResponse,
|
|
112
|
+
SitemapRemovedRow,
|
|
113
|
+
SourceInfoResponse,
|
|
114
|
+
} from '@gscdump/contracts'
|