@feedthrough/nuxt 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Henrik Enquist
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # @feedthrough/nuxt
2
+
3
+ [feedthrough.dev](https://feedthrough.dev) · [npm](https://www.npmjs.com/package/@feedthrough/nuxt) · [GitHub](https://github.com/feedthrough/feedthrough)
4
+
5
+ Nuxt 3 module for [Feedthrough](https://feedthrough.dev). Registers the Vite plugin when running in dev mode.
6
+ Production builds (`nuxt build`) are unaffected.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install --save-dev @feedthrough/nuxt
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```ts
17
+ // nuxt.config.ts
18
+ export default defineNuxtConfig({
19
+ modules: [
20
+ // Dev only — no-op in production builds.
21
+ "@feedthrough/nuxt",
22
+ ],
23
+ });
24
+ ```
25
+
26
+ ## Options
27
+
28
+ Pass options via the `feedthrough` config key:
29
+
30
+ ```ts
31
+ export default defineNuxtConfig({
32
+ modules: ["@feedthrough/nuxt"],
33
+ feedthrough: {
34
+ serverUrl: "ws://localhost:8765", // default
35
+ reconnectDelay: 2000, // ms, default
36
+ },
37
+ });
38
+ ```
39
+
40
+ ## How it works
41
+
42
+ The module calls `nuxt.options.dev` and exits early when building for production. In dev mode
43
+ it calls `addVitePlugin(() => feedthrough(options))`, which registers the `@feedthrough/vite`
44
+ plugin — the same plugin used in standalone Vite projects.
45
+
46
+ ## Running alongside the MCP server
47
+
48
+ ```bash
49
+ # Terminal 1 — app
50
+ nuxt dev
51
+
52
+ # Terminal 2 — MCP server
53
+ node node_modules/@feedthrough/mcp/dist/index.js
54
+ ```
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Nuxt module that injects the Feedthrough bridge in dev mode.
3
+ *
4
+ * @example
5
+ * // nuxt.config.ts
6
+ * export default defineNuxtConfig({
7
+ * modules: ["@feedthrough/nuxt"],
8
+ * });
9
+ *
10
+ * // With custom options:
11
+ * export default defineNuxtConfig({
12
+ * modules: ["@feedthrough/nuxt"],
13
+ * feedthrough: { serverUrl: "ws://localhost:9000" },
14
+ * });
15
+ */
16
+ declare const _default: import("nuxt/schema").NuxtModule<BridgeOptions, BridgeOptions, false>;
17
+ export default _default;
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;;AACH,wBAWG"}
package/dist/index.js ADDED
@@ -0,0 +1,31 @@
1
+ import { defineNuxtModule, addVitePlugin } from "@nuxt/kit";
2
+ import { feedthrough } from "@feedthrough/vite";
3
+ /**
4
+ * Nuxt module that injects the Feedthrough bridge in dev mode.
5
+ *
6
+ * @example
7
+ * // nuxt.config.ts
8
+ * export default defineNuxtConfig({
9
+ * modules: ["@feedthrough/nuxt"],
10
+ * });
11
+ *
12
+ * // With custom options:
13
+ * export default defineNuxtConfig({
14
+ * modules: ["@feedthrough/nuxt"],
15
+ * feedthrough: { serverUrl: "ws://localhost:9000" },
16
+ * });
17
+ */
18
+ export default defineNuxtModule({
19
+ meta: {
20
+ name: "@feedthrough/nuxt",
21
+ configKey: "feedthrough",
22
+ },
23
+ defaults: {},
24
+ setup(options, nuxt) {
25
+ if (!nuxt.options.dev)
26
+ return;
27
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
+ addVitePlugin(() => feedthrough(options));
29
+ },
30
+ });
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD;;;;;;;;;;;;;;GAcG;AACH,eAAe,gBAAgB,CAAgB;IAC7C,IAAI,EAAE;QACJ,IAAI,EAAE,mBAAmB;QACzB,SAAS,EAAE,aAAa;KACzB;IACD,QAAQ,EAAE,EAAE;IACZ,KAAK,CAAC,OAAO,EAAE,IAAI;QACjB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG;YAAE,OAAO;QAC9B,8DAA8D;QAC9D,aAAa,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,CAAQ,CAAC,CAAC;IACnD,CAAC;CACF,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "@feedthrough/nuxt",
3
+ "version": "0.1.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "engines": {
9
+ "node": ">=22"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "README.md"
14
+ ],
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "dependencies": {
19
+ "@nuxt/kit": "^3.17.3",
20
+ "@feedthrough/core": "0.1.0",
21
+ "@feedthrough/vite": "0.1.0"
22
+ },
23
+ "devDependencies": {
24
+ "@types/node": "^22.15.21",
25
+ "nuxt": "^3.17.3",
26
+ "typescript": "^5.8.3"
27
+ },
28
+ "peerDependencies": {
29
+ "nuxt": ">=3"
30
+ },
31
+ "scripts": {
32
+ "build": "tsc",
33
+ "typecheck": "tsc --noEmit"
34
+ }
35
+ }