/
integrations.ts
161 lines (137 loc) · 3.06 KB
/
integrations.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
import type { RouteRecordNormalized } from 'vue-router'
import type { Import, UnimportMeta } from 'unimport'
export interface HookInfo {
name: string
start: number
end?: number
duration?: number
listeners: number
executions: number[]
}
export interface ImageMeta {
width: number
height: number
orientation?: number
type?: string
mimeType?: string
}
export interface PackageUpdateInfo {
name: string
current: string
latest: string
needsUpdate: boolean
}
export type PackageManagerName = 'npm' | 'yarn' | 'pnpm'
export type NpmCommandType = 'install' | 'uninstall' | 'update'
export interface NpmCommandOptions {
dev?: boolean
global?: boolean
}
export interface AutoImportsWithMetadata {
imports: Import[]
metadata?: UnimportMeta
dirs: string[]
}
export interface RouteInfo extends Pick<RouteRecordNormalized, 'name' | 'path' | 'meta' | 'props' | 'children'> {
file?: string
}
export interface ServerRouteInfo {
route: string
filepath: string
path: string
method?: string
type: 'api' | 'route'
}
export interface Payload {
url: string
time: number
data?: Record<string, any>
state?: Record<string, any>
functions?: Record<string, any>
}
export interface PluginInfoWithMetic {
src: string
mode?: 'client' | 'server' | 'all'
ssr?: boolean
metric?: PluginMetric
}
export interface PluginMetric {
src: string
start: number
end: number
duration: number
}
export interface BasicModuleInfo {
entryPath?: string
meta?: {
name?: string
}
}
export interface ModuleStaticInfo {
name: string
description: string
repo: string
npm: string
icon?: string
github: string
website: string
learn_more: string
category: string
type: ModuleType
maintainers: MaintainerInfo[]
contributors: GitHubContributor[]
compatibility: ModuleCompatibility
}
export interface ModuleCompatibility {
nuxt: string
requires: { bridge?: boolean | 'optional' }
}
export type CompatibilityStatus = 'working' | 'wip' | 'unknown' | 'not-working'
export type ModuleType = 'community' | 'official' | '3rd-party'
export interface MaintainerInfo {
name: string
github: string
twitter?: string
}
export interface GitHubContributor {
login: string
name?: string
avatar_url?: string
}
export interface VueInspectorClient {
enabled: boolean
position: {
x: number
y: number
}
linkParams: {
file: string
line: number
column: number
}
enable: () => void
disable: () => void
toggleEnabled: () => void
openInEditor: (baseUrl: string, file: string, line: number, column: number) => void
onUpdated: () => void
}
export type VueInspectorData = VueInspectorClient['linkParams'] & VueInspectorClient['position']
export type AssetType = 'image' | 'font' | 'video' | 'audio' | 'text' | 'json' | 'other'
export interface AssetInfo {
path: string
type: AssetType
publicPath: string
filePath: string
size: number
mtime: number
}
export interface CodeSnippet {
code: string
lang: string
name: string
docs?: string
}
export interface ComponentRelationship {
id: string
deps: string[]
}