Prepare 0.1.0: one dotenv grammar, path policy, redactor, and safer writes

- parseDotenv, validate, and every edit share the round-trip document parser
- Path policy helpers (isEnvFile, isSensitiveEnvFile, isEnvSitterPepperFile) used by envsitter-guard
- CLI file commands run through the library file operations
- EnvSitter#redactor() and the redact command replace secret-looking values in text
- Writes keep file permissions and go through symlinks; new files are 0600
- An existing pepper is never replaced; a new .envsitter/ gets a .gitignore
- set/add/copy into empty files write clean output
- Regexes with g/y flags no longer skip keys
- TypeScript 6, Node 22+ engines, prepack build, dist/test excluded from the package
This commit is contained in:
David Ibia
2026-10-20 15:10:13 +01:00
parent 33b4a72f2c
commit af471c9821
23 changed files with 790 additions and 261 deletions
+10 -4
View File
@@ -1,9 +1,10 @@
{
"name": "envsitter",
"version": "0.0.4",
"version": "0.1.0",
"private": false,
"type": "module",
"description": "Safely inspect and match .env secrets without exposing values",
"homepage": "https://boxpositron.github.io/envsitter/",
"repository": {
"type": "git",
"url": "git+https://github.com/boxpositron/envsitter.git"
@@ -23,6 +24,9 @@
"config"
],
"license": "MIT",
"engines": {
"node": ">=22"
},
"bin": {
"envsitter": "dist/cli.js"
},
@@ -33,17 +37,19 @@
}
},
"files": [
"dist"
"dist",
"!dist/test"
],
"scripts": {
"build": "tsc -p tsconfig.json",
"typecheck": "tsc -p tsconfig.json --noEmit",
"test": "npm run build && node scripts/run-tests.mjs",
"prepack": "npm run build",
"prepare": "husky"
},
"devDependencies": {
"@types/node": "^22.10.2",
"@types/node": "^22.20.5",
"husky": "^9.1.7",
"typescript": "^5.7.3"
"typescript": "^6.0.3"
}
}