chore: prepare npm package for publish

This commit is contained in:
David Ibia
2026-01-12 14:04:23 +01:00
parent 97598af472
commit 6020518fc7
4 changed files with 42 additions and 11 deletions

1
.gitignore vendored
View File

@@ -7,6 +7,7 @@ node_modules/
!.env.example
# build artifacts
/dist/
/dist-test/
# misc

View File

@@ -135,7 +135,7 @@ npm ci
npm run typecheck
```
There are currently no lint or test scripts in this repo.
There are currently no lint scripts in this repo. Run tests with `npm test`.
## License

View File

@@ -1,21 +1,40 @@
{
"name": "envsitter-guard",
"version": "0.0.1",
"private": true,
"description": "OpenCode plugin that prevents agents/tools from reading or editing sensitive .env* files, while still allowing safe inspection via EnvSitter.",
"license": "MIT",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist/",
"README.md",
"LICENSE"
],
"scripts": {
"build": "tsc -p tsconfig.build.json",
"typecheck": "tsc -p tsconfig.json",
"build:test": "tsc -p tsconfig.test.json",
"test": "npm run build:test && node --test dist-test/test/*.test.js",
"prepack": "npm run build",
"prepublishOnly": "npm run typecheck && npm test && npm run build"
},
"dependencies": {
"@opencode-ai/plugin": "^1.1.14",
"envsitter": "^0.0.1"
},
"devDependencies": {
"@opencode-ai/plugin": "*",
"@types/node": "*",
"husky": "^9.1.7",
"typescript": "*"
},
"dependencies": {
"envsitter": "*"
},
"scripts": {
"typecheck": "tsc -p tsconfig.json",
"build:test": "tsc -p tsconfig.test.json",
"test": "npm run build:test && node --test dist-test/test/*.test.js",
"prepare": "husky"
"publishConfig": {
"access": "public"
}
}

11
tsconfig.build.json Normal file
View File

@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false,
"outDir": "./dist",
"declaration": true,
"declarationMap": true,
"sourceMap": true
},
"include": ["index.ts"]
}