diff --git a/.changeset/include-skills-in-publish.md b/.changeset/include-skills-in-publish.md new file mode 100644 index 00000000..85af7ffb --- /dev/null +++ b/.changeset/include-skills-in-publish.md @@ -0,0 +1,8 @@ +--- +'@tanstack/devtools': patch +'@tanstack/devtools-event-client': patch +'@tanstack/devtools-vite': patch +'@tanstack/devtools-utils': patch +--- + +Include skills/ directory in npm publish so `npx @tanstack/intent install` can discover them diff --git a/packages/devtools-utils/bin/intent.js b/packages/devtools-utils/bin/intent.js new file mode 100644 index 00000000..2cf2efab --- /dev/null +++ b/packages/devtools-utils/bin/intent.js @@ -0,0 +1,20 @@ +#!/usr/bin/env node +// Auto-generated by @tanstack/intent setup +// Exposes the intent end-user CLI for consumers of this library. +// Commit this file, then add to your package.json: +// "bin": { "intent": "./bin/intent.js" } +try { + await import('@tanstack/intent/intent-library') +} catch (e) { + if (e?.code === 'ERR_MODULE_NOT_FOUND' || e?.code === 'MODULE_NOT_FOUND') { + console.error('@tanstack/intent is not installed.') + console.error('') + console.error('Install it as a dev dependency:') + console.error(' npm add -D @tanstack/intent') + console.error('') + console.error('Or run directly:') + console.error(' npx @tanstack/intent@latest list') + process.exit(1) + } + throw e +} diff --git a/packages/devtools-utils/package.json b/packages/devtools-utils/package.json index 8f1ebd38..6519f7d7 100644 --- a/packages/devtools-utils/package.json +++ b/packages/devtools-utils/package.json @@ -65,6 +65,9 @@ }, "./package.json": "./package.json" }, + "bin": { + "intent": "./bin/intent.js" + }, "sideEffects": false, "engines": { "node": ">=18" @@ -98,7 +101,9 @@ }, "files": [ "dist/", - "src" + "src", + "skills", + "bin" ], "scripts": { "clean": "premove ./build ./dist", diff --git a/packages/devtools-vite/bin/intent.js b/packages/devtools-vite/bin/intent.js new file mode 100644 index 00000000..2cf2efab --- /dev/null +++ b/packages/devtools-vite/bin/intent.js @@ -0,0 +1,20 @@ +#!/usr/bin/env node +// Auto-generated by @tanstack/intent setup +// Exposes the intent end-user CLI for consumers of this library. +// Commit this file, then add to your package.json: +// "bin": { "intent": "./bin/intent.js" } +try { + await import('@tanstack/intent/intent-library') +} catch (e) { + if (e?.code === 'ERR_MODULE_NOT_FOUND' || e?.code === 'MODULE_NOT_FOUND') { + console.error('@tanstack/intent is not installed.') + console.error('') + console.error('Install it as a dev dependency:') + console.error(' npm add -D @tanstack/intent') + console.error('') + console.error('Or run directly:') + console.error(' npx @tanstack/intent@latest list') + process.exit(1) + } + throw e +} diff --git a/packages/devtools-vite/package.json b/packages/devtools-vite/package.json index 99d34679..1747c8a8 100644 --- a/packages/devtools-vite/package.json +++ b/packages/devtools-vite/package.json @@ -29,13 +29,18 @@ }, "./package.json": "./package.json" }, + "bin": { + "intent": "./bin/intent.js" + }, "sideEffects": false, "engines": { "node": ">=18" }, "files": [ "dist/", - "src" + "src", + "skills", + "bin" ], "scripts": { "clean": "premove ./build ./dist", diff --git a/packages/devtools/bin/intent.js b/packages/devtools/bin/intent.js new file mode 100644 index 00000000..2cf2efab --- /dev/null +++ b/packages/devtools/bin/intent.js @@ -0,0 +1,20 @@ +#!/usr/bin/env node +// Auto-generated by @tanstack/intent setup +// Exposes the intent end-user CLI for consumers of this library. +// Commit this file, then add to your package.json: +// "bin": { "intent": "./bin/intent.js" } +try { + await import('@tanstack/intent/intent-library') +} catch (e) { + if (e?.code === 'ERR_MODULE_NOT_FOUND' || e?.code === 'MODULE_NOT_FOUND') { + console.error('@tanstack/intent is not installed.') + console.error('') + console.error('Install it as a dev dependency:') + console.error(' npm add -D @tanstack/intent') + console.error('') + console.error('Or run directly:') + console.error(' npx @tanstack/intent@latest list') + process.exit(1) + } + throw e +} diff --git a/packages/devtools/package.json b/packages/devtools/package.json index 1daa41ef..faf64294 100644 --- a/packages/devtools/package.json +++ b/packages/devtools/package.json @@ -40,13 +40,18 @@ "types": "./dist/index.d.ts", "import": "./dist/index.js" }, + "bin": { + "intent": "./bin/intent.js" + }, "sideEffects": false, "engines": { "node": ">=18" }, "files": [ "dist/", - "src" + "src", + "skills", + "bin" ], "scripts": { "clean": "premove ./build ./dist", diff --git a/packages/event-bus-client/bin/intent.js b/packages/event-bus-client/bin/intent.js new file mode 100644 index 00000000..2cf2efab --- /dev/null +++ b/packages/event-bus-client/bin/intent.js @@ -0,0 +1,20 @@ +#!/usr/bin/env node +// Auto-generated by @tanstack/intent setup +// Exposes the intent end-user CLI for consumers of this library. +// Commit this file, then add to your package.json: +// "bin": { "intent": "./bin/intent.js" } +try { + await import('@tanstack/intent/intent-library') +} catch (e) { + if (e?.code === 'ERR_MODULE_NOT_FOUND' || e?.code === 'MODULE_NOT_FOUND') { + console.error('@tanstack/intent is not installed.') + console.error('') + console.error('Install it as a dev dependency:') + console.error(' npm add -D @tanstack/intent') + console.error('') + console.error('Or run directly:') + console.error(' npx @tanstack/intent@latest list') + process.exit(1) + } + throw e +} diff --git a/packages/event-bus-client/package.json b/packages/event-bus-client/package.json index 5dbaa399..2e3e350e 100644 --- a/packages/event-bus-client/package.json +++ b/packages/event-bus-client/package.json @@ -34,13 +34,18 @@ }, "./package.json": "./package.json" }, + "bin": { + "intent": "./bin/intent.js" + }, "sideEffects": false, "engines": { "node": ">=18" }, "files": [ "dist/", - "src" + "src", + "skills", + "bin" ], "scripts": { "clean": "premove ./build ./dist",