torch-it 2.5.0 → 2.5.1
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/README.md +18 -0
- package/dist/torch-it.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -183,6 +183,24 @@ Use `--test` to preview what `torch-it` would do without deleting directories, c
|
|
|
183
183
|
```bash
|
|
184
184
|
torch-it --test
|
|
185
185
|
```
|
|
186
|
+
|
|
187
|
+
### Configuration (`--config`)
|
|
188
|
+
|
|
189
|
+
Use `--config` to display the current torch-it configuration, including all files and directories that will be targeted for deletion during a torch-it run. This is useful for verifying your setup before performing actual cleanup operations.
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
torch-it --config
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The configuration display shows:
|
|
196
|
+
- Current settings from `torchrc.json` (if present) or defaults
|
|
197
|
+
- All built-in cleanup targets
|
|
198
|
+
- Custom paths that will be removed
|
|
199
|
+
- Protected paths that will be preserved
|
|
200
|
+
- Docker and rebuild operation settings
|
|
201
|
+
|
|
202
|
+
This helps you understand exactly what will be affected before running torch-it, making it easier to verify your configuration is correct.
|
|
203
|
+
|
|
186
204
|
---
|
|
187
205
|
## Customization
|
|
188
206
|
|
package/dist/torch-it.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var ue=Object.create;var W=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var ge=Object.getPrototypeOf,he=Object.prototype.hasOwnProperty;var ke=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var Ce=(e,n,t,c)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of me(n))!he.call(e,a)&&a!==t&&W(e,a,{get:()=>n[a],enumerable:!(c=pe(n,a))||c.enumerable});return e};var D=(e,n,t)=>(t=e!=null?ue(ge(e)):{},Ce(n||!e||!e.__esModule?W(t,"default",{value:e,enumerable:!0}):t,e));var fe=ke((to,De)=>{De.exports={name:"torch-it",version:"2.5.
|
|
2
|
+
"use strict";var ue=Object.create;var W=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var ge=Object.getPrototypeOf,he=Object.prototype.hasOwnProperty;var ke=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports);var Ce=(e,n,t,c)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of me(n))!he.call(e,a)&&a!==t&&W(e,a,{get:()=>n[a],enumerable:!(c=pe(n,a))||c.enumerable});return e};var D=(e,n,t)=>(t=e!=null?ue(ge(e)):{},Ce(n||!e||!e.__esModule?W(t,"default",{value:e,enumerable:!0}):t,e));var fe=ke((to,De)=>{De.exports={name:"torch-it",version:"2.5.1",description:"CLI to reset, clean, and rebuild Node.js project environments.",keywords:["cleanup","cli","docker","node"],homepage:"https://github.com/piyook/torch-it#readme",bugs:{url:"https://github.com/piyook/torch-it/issues"},license:"ISC",author:"",repository:{type:"git",url:"git+https://github.com/piyook/torch-it.git"},bin:{"torch-it":"dist/torch-it.js"},files:["dist","README.md"],type:"commonjs",main:"dist/torch-it.js",scripts:{build:'esbuild src/torch.ts --bundle --outfile=dist/torch-it.js --platform=node --format=cjs --minify --banner:js="#!/usr/bin/env node"',"torch-it":"npm run build && node dist/torch-it.js","torch-it:ts":"ts-node src/torch.ts",lint:"oxlint .","lint:fix":"oxlint . --fix",format:"prettier --check src/**/*.{ts,js,json} package.json package-lock.json .commitlintrc.json","format:write":"prettier --write src/**/*.{ts,js,json} package.json package-lock.json .commitlintrc.json",quality:"npm run lint && npm run format && npm test","validate-branch-name":"validate-branch-name",prepare:"husky",prepublishOnly:"npm run build",test:"tsc --noEmit && vitest run","test:watch":"vitest"},dependencies:{},devDependencies:{"@commitlint/cli":"^20.5.0","@commitlint/config-conventional":"^20.5.0","@types/node":"^25.6.0",esbuild:"^0.28.0",husky:"^9.1.7","lint-staged":"^16.4.0",oxlint:"^1.59.0",prettier:"^3.8.2","ts-node":"^10.9.2",typescript:"^6.0.2","validate-branch-name":"^1.3.2",vitest:"^4.1.4"},"lint-staged":{"*.{ts,tsx,js,jsx,mjs,cjs,json}":["oxlint --fix","prettier --write"]},"validate-branch-name":{pattern:"^(main|dev){1}$|^(feat|fix|hotfix|release|chore)/.+$",errorMsg:"INVALID BRANCH NAME: use format 'feat|fix|hotfix|release|core/your-branch-name'"}}});var j=D(require("fs"));var E=(e,n)=>t=>`\x1B[${e}m${t}\x1B[${n}m`,f={BOLD:E("1","22"),CYAN:E("36","39"),GREEN:E("32","39"),RED:E("31","39"),YELLOW:E("33","39"),PURPLE:E("35","39"),RESET:e=>`\x1B[0m${e}`},i={INFO:"\u{1F525}",SUCCESS:"\u2705",FAIL:"\u274C",EXCLAMATION:"\u2757",WARN:"\u26A0\uFE0F",ROCKET:"\u{1F525}",CLEAN:"\u{1F525}",PHOENIX:"\u{1F525}",BUILD:"\u{1F528}",TARGET:"\u{1F525}",CELEBRATE:"\u{1F525}",STARS:"\u2728",BOX:"\u{1F4E6}",CLIPBOARD:"\u{1F4CB}",DOCKER:"\u{1F433}"};var H=D(require("fs")),K=!0;function ye(e){let n=new RegExp("\x1B\\[[0-9;]*m","g");return e.replace(n,"")}var X=e=>{K=e},q=()=>{K&&H.default.writeFileSync("torch-it.log","")},x=e=>{if(!K)return;let n=ye(e).replace(/^\n/,""),t=new Date().toISOString();H.default.appendFileSync("torch-it.log",`[${t}] ${n}
|
|
3
3
|
`)};function o(e,n){let t;switch(n){case"info":t=`${f.CYAN(i.INFO)} ${f.BOLD(e)}${f.RESET("")}`;break;case"success":t=`${f.GREEN(i.SUCCESS)} ${e}${f.RESET("")}`;break;case"warn":t=`${f.YELLOW(i.WARN)} ${e}${f.RESET("")}`;break;case"fail":t=`${f.RED(i.FAIL)} ${e}${f.RESET("")}`;break;case"step":t=`
|
|
4
4
|
${f.PURPLE("\u25B6")} ${f.BOLD(e)}${f.RESET("")}`;break;default:t=e}console.log(t),x(t)}function z(){w([` ${i.TARGET} TORCH LIT ${i.ROCKET}`],f.PURPLE);let e=`
|
|
5
5
|
) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )
|