@minihog/nuxt 0.0.0-stage → 0.1.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/CHANGELOG.md +9 -0
- package/LICENSE +21 -0
- package/README.md +127 -2
- package/dist/module.d.ts +5 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +92 -0
- package/dist/module.js.map +1 -0
- package/dist/runtime/composable.d.ts +4 -0
- package/dist/runtime/composable.d.ts.map +1 -0
- package/dist/runtime/composable.js +6 -0
- package/dist/runtime/composable.js.map +1 -0
- package/dist/runtime/controller.d.ts +6 -0
- package/dist/runtime/controller.d.ts.map +1 -0
- package/dist/runtime/controller.js +52 -0
- package/dist/runtime/controller.js.map +1 -0
- package/dist/runtime/plugin.d.ts +7 -0
- package/dist/runtime/plugin.d.ts.map +1 -0
- package/dist/runtime/plugin.js +20 -0
- package/dist/runtime/plugin.js.map +1 -0
- package/dist/runtime/server/body.d.ts +4 -0
- package/dist/runtime/server/body.d.ts.map +1 -0
- package/dist/runtime/server/body.js +28 -0
- package/dist/runtime/server/body.js.map +1 -0
- package/dist/runtime/server/proxy.d.ts +3 -0
- package/dist/runtime/server/proxy.d.ts.map +1 -0
- package/dist/runtime/server/proxy.js +62 -0
- package/dist/runtime/server/proxy.js.map +1 -0
- package/dist/runtime/server/routing.d.ts +4 -0
- package/dist/runtime/server/routing.d.ts.map +1 -0
- package/dist/runtime/server/routing.js +18 -0
- package/dist/runtime/server/routing.js.map +1 -0
- package/dist/templates.d.ts +4 -0
- package/dist/templates.d.ts.map +1 -0
- package/dist/templates.js +88 -0
- package/dist/templates.js.map +1 -0
- package/dist/types.d.ts +46 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +76 -3
- package/src/module.ts +99 -0
- package/src/runtime/composable.ts +7 -0
- package/src/runtime/controller.ts +54 -0
- package/src/runtime/plugin.ts +23 -0
- package/src/runtime/server/body.ts +26 -0
- package/src/runtime/server/proxy.ts +63 -0
- package/src/runtime/server/routing.ts +15 -0
- package/src/shims.d.ts +9 -0
- package/src/templates.ts +91 -0
- package/src/types.ts +59 -0
package/src/types.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { MiniHog, MiniHogOptions } from '@minihog/core';
|
|
2
|
+
import type { BrowserOptions } from '@minihog/core/browser';
|
|
3
|
+
|
|
4
|
+
export interface ModuleOptions {
|
|
5
|
+
key?: string;
|
|
6
|
+
host?: string;
|
|
7
|
+
assetsHost?: string;
|
|
8
|
+
proxyPath?: string;
|
|
9
|
+
start?: 'ready' | 'idle' | 'manual';
|
|
10
|
+
browser?: false | BrowserOptions;
|
|
11
|
+
webVitals?: boolean;
|
|
12
|
+
heatmaps?: boolean;
|
|
13
|
+
replay?: boolean;
|
|
14
|
+
consoleRecording?: boolean;
|
|
15
|
+
networkTiming?: boolean;
|
|
16
|
+
errorCapture?: boolean;
|
|
17
|
+
/** Only serializable client options belong in runtime configuration. */
|
|
18
|
+
client?: Pick<
|
|
19
|
+
MiniHogOptions,
|
|
20
|
+
| 'personProfiles'
|
|
21
|
+
| 'persistence'
|
|
22
|
+
| 'migratePostHog'
|
|
23
|
+
| 'optOutByDefault'
|
|
24
|
+
| 'respectDnt'
|
|
25
|
+
| 'sessionTimeoutMs'
|
|
26
|
+
| 'flushIntervalMs'
|
|
27
|
+
>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface PublicOptions {
|
|
31
|
+
key: string;
|
|
32
|
+
proxyPath: string;
|
|
33
|
+
start: 'ready' | 'idle' | 'manual';
|
|
34
|
+
client: NonNullable<ModuleOptions['client']>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ProxyOptions {
|
|
38
|
+
host: string;
|
|
39
|
+
assetsHost: string;
|
|
40
|
+
path: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface MiniHogController {
|
|
44
|
+
/** Concurrent calls share one initialization. An empty key performs no imports. */
|
|
45
|
+
start(): Promise<MiniHog | undefined>;
|
|
46
|
+
getClient(): MiniHog | undefined;
|
|
47
|
+
stop(): Promise<void>;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare module '#app' {
|
|
51
|
+
interface NuxtApp {
|
|
52
|
+
$minihog: MiniHogController;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
declare module 'vue' {
|
|
56
|
+
interface ComponentCustomProperties {
|
|
57
|
+
$minihog: MiniHogController;
|
|
58
|
+
}
|
|
59
|
+
}
|