@oro.ad/nuxt-claude-devtools-bc 1.0.0 → 1.0.5
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/dist/client/200.html +1 -1
- package/dist/client/404.html +1 -1
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/fd164695-d282-4c32-9e59-a55c11a33182.json +1 -0
- package/dist/client/index.html +1 -1
- package/dist/module.d.mts +97 -19
- package/dist/module.json +1 -1
- package/dist/module.mjs +11 -4
- package/dist/types.d.mts +2 -2
- package/package.json +8 -1
- package/dist/client/_nuxt/builds/meta/b0257768-6ba6-4f04-9da1-ec8a65a9539b.json +0 -1
package/dist/client/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__claude-devtools-bc/_nuxt/entry.DbfI69ZY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__claude-devtools-bc/_nuxt/N02BnA5h.js"><script type="module" src="/__claude-devtools-bc/_nuxt/N02BnA5h.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__claude-devtools-bc",buildId:"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__claude-devtools-bc/_nuxt/entry.DbfI69ZY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__claude-devtools-bc/_nuxt/N02BnA5h.js"><script type="module" src="/__claude-devtools-bc/_nuxt/N02BnA5h.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__claude-devtools-bc",buildId:"fd164695-d282-4c32-9e59-a55c11a33182",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1768520592158,false]</script></body></html>
|
package/dist/client/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__claude-devtools-bc/_nuxt/entry.DbfI69ZY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__claude-devtools-bc/_nuxt/N02BnA5h.js"><script type="module" src="/__claude-devtools-bc/_nuxt/N02BnA5h.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__claude-devtools-bc",buildId:"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__claude-devtools-bc/_nuxt/entry.DbfI69ZY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__claude-devtools-bc/_nuxt/N02BnA5h.js"><script type="module" src="/__claude-devtools-bc/_nuxt/N02BnA5h.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__claude-devtools-bc",buildId:"fd164695-d282-4c32-9e59-a55c11a33182",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1768520592159,false]</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"id":"
|
|
1
|
+
{"id":"fd164695-d282-4c32-9e59-a55c11a33182","timestamp":1768520588106}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"id":"fd164695-d282-4c32-9e59-a55c11a33182","timestamp":1768520588106,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|
package/dist/client/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__claude-devtools-bc/_nuxt/entry.DbfI69ZY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__claude-devtools-bc/_nuxt/N02BnA5h.js"><script type="module" src="/__claude-devtools-bc/_nuxt/N02BnA5h.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__claude-devtools-bc",buildId:"
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__claude-devtools-bc/_nuxt/entry.DbfI69ZY.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__claude-devtools-bc/_nuxt/N02BnA5h.js"><script type="module" src="/__claude-devtools-bc/_nuxt/N02BnA5h.js" crossorigin></script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__claude-devtools-bc",buildId:"fd164695-d282-4c32-9e59-a55c11a33182",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1768520592159,false]</script></body></html>
|
package/dist/module.d.mts
CHANGED
|
@@ -1,6 +1,53 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Tunnel configuration utilities
|
|
5
|
+
* Can be used by other modules to detect and configure tunnel settings
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* // In another Nuxt module
|
|
10
|
+
* import { getTunnelConfig } from '@oro.ad/nuxt-claude-devtools-bc/tunnel'
|
|
11
|
+
*
|
|
12
|
+
* export default defineNuxtModule({
|
|
13
|
+
* setup(options, nuxt) {
|
|
14
|
+
* const tunnel = getTunnelConfig()
|
|
15
|
+
* if (tunnel) {
|
|
16
|
+
* console.log('Tunnel active:', tunnel.origin)
|
|
17
|
+
* }
|
|
18
|
+
* }
|
|
19
|
+
* })
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
3
22
|
interface TunnelConfig {
|
|
23
|
+
/**
|
|
24
|
+
* Tunnel host (without protocol)
|
|
25
|
+
* @example 'my-app.trycloudflare.com'
|
|
26
|
+
*/
|
|
27
|
+
host: string;
|
|
28
|
+
/**
|
|
29
|
+
* Protocol for tunnel connection
|
|
30
|
+
*/
|
|
31
|
+
protocol: 'http' | 'https';
|
|
32
|
+
/**
|
|
33
|
+
* Port for WebSocket connections (HMR, Socket.io, etc.)
|
|
34
|
+
*/
|
|
35
|
+
port: number;
|
|
36
|
+
/**
|
|
37
|
+
* WebSocket protocol
|
|
38
|
+
*/
|
|
39
|
+
wsProtocol: 'ws' | 'wss';
|
|
40
|
+
/**
|
|
41
|
+
* Full origin URL
|
|
42
|
+
* @example 'https://my-app.trycloudflare.com'
|
|
43
|
+
*/
|
|
44
|
+
origin: string;
|
|
45
|
+
/**
|
|
46
|
+
* List of allowed hosts for Vite server
|
|
47
|
+
*/
|
|
48
|
+
allowedHosts: string[];
|
|
49
|
+
}
|
|
50
|
+
interface TunnelOptions {
|
|
4
51
|
/**
|
|
5
52
|
* Tunnel host (without protocol)
|
|
6
53
|
* @default process.env.DEV_TUNNEL_HOST
|
|
@@ -8,12 +55,12 @@ interface TunnelConfig {
|
|
|
8
55
|
host?: string;
|
|
9
56
|
/**
|
|
10
57
|
* Protocol for tunnel connection
|
|
11
|
-
* @default 'https'
|
|
58
|
+
* @default process.env.DEV_TUNNEL_PROTOCOL || 'https'
|
|
12
59
|
*/
|
|
13
60
|
protocol?: 'http' | 'https';
|
|
14
61
|
/**
|
|
15
|
-
* Port for
|
|
16
|
-
* @default 443
|
|
62
|
+
* Port for WebSocket connections
|
|
63
|
+
* @default process.env.DEV_TUNNEL_PORT || 443 (https) / 80 (http)
|
|
17
64
|
*/
|
|
18
65
|
port?: number;
|
|
19
66
|
/**
|
|
@@ -21,17 +68,56 @@ interface TunnelConfig {
|
|
|
21
68
|
* @default []
|
|
22
69
|
*/
|
|
23
70
|
additionalHosts?: string[];
|
|
24
|
-
/**
|
|
25
|
-
* Enable/disable tunnel configuration
|
|
26
|
-
* @default true (but only applies config if host is set)
|
|
27
|
-
*/
|
|
28
|
-
enabled?: boolean;
|
|
29
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Resolve tunnel configuration from options and environment variables
|
|
74
|
+
*
|
|
75
|
+
* Priority:
|
|
76
|
+
* 1. Explicit options
|
|
77
|
+
* 2. Environment variables (DEV_TUNNEL_HOST, DEV_TUNNEL_PROTOCOL, DEV_TUNNEL_PORT)
|
|
78
|
+
* 3. Defaults
|
|
79
|
+
*
|
|
80
|
+
* @param options - Optional tunnel configuration overrides
|
|
81
|
+
* @returns Resolved tunnel config or null if no tunnel host is configured
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* // Auto-detect from environment
|
|
86
|
+
* const tunnel = getTunnelConfig()
|
|
87
|
+
*
|
|
88
|
+
* // With explicit options
|
|
89
|
+
* const tunnel = getTunnelConfig({ host: 'my-tunnel.com' })
|
|
90
|
+
*
|
|
91
|
+
* // Use in Socket.io configuration
|
|
92
|
+
* if (tunnel) {
|
|
93
|
+
* const io = new Server(server, {
|
|
94
|
+
* cors: { origin: [tunnel.origin, 'http://localhost:3000'] }
|
|
95
|
+
* })
|
|
96
|
+
* }
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
declare function getTunnelConfig(options?: TunnelOptions): TunnelConfig | null;
|
|
100
|
+
/**
|
|
101
|
+
* Check if tunnel is currently active (DEV_TUNNEL_HOST is set)
|
|
102
|
+
*/
|
|
103
|
+
declare function isTunnelActive(): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Get tunnel origin URL or null
|
|
106
|
+
* Shorthand for getTunnelConfig()?.origin
|
|
107
|
+
*/
|
|
108
|
+
declare function getTunnelOrigin(): string | null;
|
|
109
|
+
|
|
30
110
|
interface ModuleOptions {
|
|
31
111
|
/**
|
|
32
112
|
* Tunnel configuration for dev server
|
|
33
113
|
*/
|
|
34
|
-
tunnel?:
|
|
114
|
+
tunnel?: TunnelOptions & {
|
|
115
|
+
/**
|
|
116
|
+
* Enable/disable tunnel configuration
|
|
117
|
+
* @default true (but only applies config if host is set)
|
|
118
|
+
*/
|
|
119
|
+
enabled?: boolean;
|
|
120
|
+
};
|
|
35
121
|
/**
|
|
36
122
|
* Enable Nuxt Devtools integration
|
|
37
123
|
* @default true
|
|
@@ -44,14 +130,6 @@ interface ModuleOptions {
|
|
|
44
130
|
*/
|
|
45
131
|
disableDevtoolsAuth?: boolean;
|
|
46
132
|
}
|
|
47
|
-
interface ResolvedTunnelConfig {
|
|
48
|
-
host: string;
|
|
49
|
-
protocol: 'http' | 'https';
|
|
50
|
-
port: number;
|
|
51
|
-
wsProtocol: 'ws' | 'wss';
|
|
52
|
-
origin: string;
|
|
53
|
-
allowedHosts: string[];
|
|
54
|
-
}
|
|
55
133
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
56
134
|
|
|
57
135
|
declare module '@nuxt/schema' {
|
|
@@ -73,5 +151,5 @@ declare module '@nuxt/schema' {
|
|
|
73
151
|
}
|
|
74
152
|
}
|
|
75
153
|
|
|
76
|
-
export { _default as default };
|
|
77
|
-
export type { ModuleOptions,
|
|
154
|
+
export { _default as default, getTunnelConfig, getTunnelOrigin, isTunnelActive };
|
|
155
|
+
export type { ModuleOptions, TunnelConfig, TunnelOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -41,8 +41,7 @@ function setupDevToolsUI(nuxt, resolver, tunnelConfig) {
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
function resolveTunnelConfig(options = {}) {
|
|
44
|
+
function getTunnelConfig(options = {}) {
|
|
46
45
|
const host = options.host || process.env.DEV_TUNNEL_HOST;
|
|
47
46
|
if (!host) {
|
|
48
47
|
return null;
|
|
@@ -64,6 +63,14 @@ function resolveTunnelConfig(options = {}) {
|
|
|
64
63
|
allowedHosts
|
|
65
64
|
};
|
|
66
65
|
}
|
|
66
|
+
function isTunnelActive() {
|
|
67
|
+
return !!process.env.DEV_TUNNEL_HOST;
|
|
68
|
+
}
|
|
69
|
+
function getTunnelOrigin() {
|
|
70
|
+
return getTunnelConfig()?.origin ?? null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const logger = useLogger("@oro.ad/nuxt-claude-devtools-bc");
|
|
67
74
|
const module$1 = defineNuxtModule({
|
|
68
75
|
meta: {
|
|
69
76
|
name: "@oro.ad/nuxt-claude-devtools-bc",
|
|
@@ -86,7 +93,7 @@ const module$1 = defineNuxtModule({
|
|
|
86
93
|
let resolvedTunnel = null;
|
|
87
94
|
if (nuxt.options.dev) {
|
|
88
95
|
if (options.tunnel?.enabled !== false) {
|
|
89
|
-
resolvedTunnel =
|
|
96
|
+
resolvedTunnel = getTunnelConfig(options.tunnel);
|
|
90
97
|
if (resolvedTunnel) {
|
|
91
98
|
logger.info(`Configuring for tunnel: ${resolvedTunnel.origin}`);
|
|
92
99
|
nuxt.options.vite = defu(nuxt.options.vite, {
|
|
@@ -141,4 +148,4 @@ const module$1 = defineNuxtModule({
|
|
|
141
148
|
}
|
|
142
149
|
});
|
|
143
150
|
|
|
144
|
-
export { module$1 as default };
|
|
151
|
+
export { module$1 as default, getTunnelConfig, getTunnelOrigin, isTunnelActive };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default } from './module.mjs'
|
|
1
|
+
export { default, type getTunnelConfig, type getTunnelOrigin, type isTunnelActive } from './module.mjs'
|
|
2
2
|
|
|
3
|
-
export { type ModuleOptions, type
|
|
3
|
+
export { type ModuleOptions, type TunnelConfig, type TunnelOptions } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oro.ad/nuxt-claude-devtools-bc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Nuxt module for automatic Vite dev server configuration with tunnels (Cloudflare, ngrok, etc.) and DevTools integration",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"type": "module",
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
".": {
|
|
9
9
|
"types": "./dist/types.d.mts",
|
|
10
10
|
"import": "./dist/module.mjs"
|
|
11
|
+
},
|
|
12
|
+
"./tunnel": {
|
|
13
|
+
"types": "./dist/types.d.mts",
|
|
14
|
+
"import": "./dist/module.mjs"
|
|
11
15
|
}
|
|
12
16
|
},
|
|
13
17
|
"repository": {
|
|
@@ -19,6 +23,9 @@
|
|
|
19
23
|
"*": {
|
|
20
24
|
".": [
|
|
21
25
|
"./dist/types.d.mts"
|
|
26
|
+
],
|
|
27
|
+
"tunnel": [
|
|
28
|
+
"./dist/types.d.mts"
|
|
22
29
|
]
|
|
23
30
|
}
|
|
24
31
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"b0257768-6ba6-4f04-9da1-ec8a65a9539b","timestamp":1768513748059,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
|