Files
TREK/plugin-sdk/package.json
T
Maurice 648b4aab96 chore(plugin-sdk): make it npm-publishable so npx resolves for authors
The docs told authors to run `npx create-trek-plugin` / `npx trek-plugin`,
but nothing published under those names, so npx couldn't resolve them.

- Ship one package, `trek-plugin-sdk`, with a bin that matches the package
  name (`trek-plugin-sdk`) so `npx trek-plugin-sdk <command>` resolves with
  zero install. The dispatcher gained a `create` subcommand, so every step
  (create/validate/pack/entry/release) runs through that one entry point.
  The short `trek-plugin` / `create-trek-plugin` bins still work once
  installed.
- Package hardening for publish: repository+directory (monorepo subdir),
  homepage/bugs/author/engines, publishConfig public, a prepublishOnly that
  builds + tests, and a LICENSE file.
- A publish workflow: pushing a `plugin-sdk-v*` tag builds and publishes with
  the NPM_TOKEN repo secret.
- Docs (SDK README + the four wiki pages) now use `npx trek-plugin-sdk <cmd>`,
  the invocation that actually resolves.
2026-07-04 14:44:24 +02:00

38 lines
1.3 KiB
JSON

{
"name": "trek-plugin-sdk",
"version": "1.0.0",
"description": "SDK for building TREK plugins: types, definePlugin, a mock host, manifest validation, and the create-trek-plugin / trek-plugin CLIs.",
"type": "module",
"license": "MIT",
"author": "mauriceboe",
"homepage": "https://github.com/mauriceboe/TREK/wiki/Plugin-Development",
"repository": { "type": "git", "url": "git+https://github.com/mauriceboe/TREK.git", "directory": "plugin-sdk" },
"bugs": { "url": "https://github.com/mauriceboe/TREK/issues" },
"engines": { "node": ">=18" },
"publishConfig": { "access": "public" },
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" },
"./testing": { "types": "./dist/mock-host.d.ts", "import": "./dist/mock-host.js" }
},
"bin": {
"trek-plugin-sdk": "./dist/cli/trek-plugin.js",
"trek-plugin": "./dist/cli/trek-plugin.js",
"create-trek-plugin": "./dist/cli/create.js"
},
"files": ["dist"],
"scripts": {
"build": "tsc -p tsconfig.json",
"typecheck": "tsc -p tsconfig.json --noEmit",
"test": "vitest run",
"prepublishOnly": "npm run build && npm test"
},
"devDependencies": {
"@types/node": "^22.0.0",
"typescript": "^5.6.0",
"vitest": "^2.1.0"
},
"keywords": ["trek", "plugin", "sdk"]
}