binary-collections 2.0.12 → 2.0.13

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.
Files changed (231) hide show
  1. package/binaries/binary-executor.cjs +89 -13
  2. package/binaries/clean-nodemodule.cjs +89 -13
  3. package/binaries/clean-nodemodules.cjs +89 -13
  4. package/binaries/dev.cjs +89 -13
  5. package/binaries/empty.cjs +89 -13
  6. package/binaries/git-reduce-size.cjs +89 -13
  7. package/binaries/javakill.cjs +89 -13
  8. package/binaries/kill-process.cjs +89 -13
  9. package/binaries/nodekill.cjs +89 -13
  10. package/binaries/prod.cjs +89 -13
  11. package/binaries/py.cjs +89 -13
  12. package/binaries/rmfind.cjs +89 -13
  13. package/binaries/rmx.cjs +89 -13
  14. package/binaries/submodule-token.cjs +89 -13
  15. package/binaries/test-cjs.cjs +89 -13
  16. package/binaries/test-esm.cjs +89 -13
  17. package/binaries/yarn-clean.cjs +89 -13
  18. package/binaries/yc +22 -1
  19. package/binaries/yc.cjs +89 -13
  20. package/binaries/ycw +256 -0
  21. package/binaries/ycw.cjs +254 -0
  22. package/docs-src/binary-collections.md +34 -0
  23. package/docs-src/changelog.md +26 -0
  24. package/docs-src/clean-github-actions-caches.md +115 -0
  25. package/docs-src/copy-move-file.md +59 -0
  26. package/docs-src/del-gradle.md +17 -0
  27. package/docs-src/del-ps.md +28 -0
  28. package/docs-src/downloader.md +62 -0
  29. package/docs-src/env-helpers.md +29 -0
  30. package/docs-src/find-node-modules.md +17 -0
  31. package/docs-src/free-chatgpt.md +26 -0
  32. package/docs-src/git-diff.md +33 -0
  33. package/docs-src/git-fix.md +34 -0
  34. package/docs-src/git-purge.md +17 -0
  35. package/docs-src/git-reduce-size.md +17 -0
  36. package/docs-src/git-undo.md +21 -0
  37. package/docs-src/kill-night-crows.md +26 -0
  38. package/docs-src/node-cache-cleaner.md +182 -0
  39. package/docs-src/node-executor.md +50 -0
  40. package/docs-src/node-package-packer.md +48 -0
  41. package/docs-src/npm-run-series.md +43 -0
  42. package/docs-src/package-resolutions-updater.md +22 -0
  43. package/docs-src/php-cs-fixer-staged.md +19 -0
  44. package/docs-src/print-directory-tree.md +35 -0
  45. package/docs-src/print-tarball-tree.md +55 -0
  46. package/docs-src/py.md +19 -0
  47. package/docs-src/remove-module.md +32 -0
  48. package/docs-src/rmfind-rmx.md +21 -0
  49. package/docs-src/rmpath.md +38 -0
  50. package/docs-src/run-by-checksum.md +87 -0
  51. package/docs-src/submodule-install.md +31 -0
  52. package/docs-src/submodule-remove.md +22 -0
  53. package/docs-src/submodule-token.md +17 -0
  54. package/docs-src/test-runners.md +21 -0
  55. package/docs-src/yarn-install.md +31 -0
  56. package/docs-src/yarn-reinstall.md +27 -0
  57. package/lib/binary-collections/config.cjs +1 -1
  58. package/lib/binary-collections/config.mjs +1 -1
  59. package/lib/binary-collections/findScript.cjs +35 -10
  60. package/lib/binary-collections/findScript.mjs +2 -2
  61. package/lib/binary-collections/listScript.cjs +35 -10
  62. package/lib/binary-collections/listScript.mjs +2 -2
  63. package/lib/binary-collections.cjs +45 -25
  64. package/lib/binary-collections.mjs +11 -11
  65. package/lib/changelog.cjs +7 -12
  66. package/lib/changelog.mjs +2 -2
  67. package/lib/{chunk-SPTECFE5.mjs → chunk-2MN4VPV2.mjs} +86 -20
  68. package/lib/{chunk-V2IBPCEV.mjs → chunk-6C7KTYGZ.mjs} +3 -1
  69. package/lib/{chunk-5RTXZVCW.mjs → chunk-6RK5UCTP.mjs} +5 -10
  70. package/lib/{chunk-FB2WKVJD.mjs → chunk-CD3HF3LK.mjs} +67 -35
  71. package/lib/{chunk-6PU7BAHB.mjs → chunk-FLYSZFLW.mjs} +1 -1
  72. package/lib/chunk-KLKAIFKI.mjs +40 -0
  73. package/lib/chunk-LVSPEFU2.mjs +86 -0
  74. package/lib/{chunk-2LSRSEXF.mjs → chunk-MGPYPKIE.mjs} +2 -2
  75. package/lib/{chunk-ZOWVMII3.mjs → chunk-NQXUYO67.mjs} +35 -10
  76. package/lib/{chunk-C6D2TTYU.mjs → chunk-OBXLTXFJ.mjs} +4 -2
  77. package/lib/chunk-QD4T255Z.mjs +40 -0
  78. package/lib/{chunk-XPJGCDOD.mjs → chunk-QII2EKCS.mjs} +14 -2
  79. package/lib/chunk-RDGDLSPD.mjs +76 -0
  80. package/lib/{chunk-NCZPTKDV.mjs → chunk-RDN6HF5Z.mjs} +1 -1
  81. package/lib/chunk-RJKTSUAX.mjs +123 -0
  82. package/lib/{chunk-66KDU4TX.mjs → chunk-TBWXE7ST.mjs} +36 -61
  83. package/lib/{chunk-M3YIYRHT.mjs → chunk-UY5VUEA3.mjs} +1 -1
  84. package/lib/chunk-WSHVPGNM.mjs +44 -0
  85. package/lib/{chunk-G5UUEWUO.mjs → chunk-X2B3X7D4.mjs} +1 -1
  86. package/lib/clean-github-actions-caches-cli.cjs +255 -213
  87. package/lib/clean-github-actions-caches-cli.mjs +25 -7
  88. package/lib/clean-github-actions-caches.cjs +231 -35
  89. package/lib/clean-github-actions-caches.d.cts +39 -1
  90. package/lib/clean-github-actions-caches.mjs +2 -1
  91. package/lib/cross-env/command.cjs +2 -2
  92. package/lib/cross-env/command.js +2 -2
  93. package/lib/cross-env/command.mjs +2 -2
  94. package/lib/cross-env/index.cjs +2 -2
  95. package/lib/cross-env/index.mjs +3 -3
  96. package/lib/cross-env/variable.mjs +2 -2
  97. package/lib/del-gradle.cjs +6 -11
  98. package/lib/del-gradle.mjs +1 -1
  99. package/lib/del-node-modules.cjs +185 -3
  100. package/lib/del-node-modules.js +3 -3
  101. package/lib/del-node-modules.mjs +6 -3
  102. package/lib/{del-ps.cjs → del-ps-cli.cjs} +36 -41
  103. package/lib/del-ps-cli.mjs +44 -0
  104. package/lib/del-yarn-caches.cjs +6 -11
  105. package/lib/del-yarn-caches.mjs +1 -1
  106. package/lib/downloader-cli.cjs +256 -0
  107. package/lib/downloader-cli.d.cts +2 -0
  108. package/lib/downloader-cli.mjs +90 -0
  109. package/lib/file/copy-cli.cjs +183 -2
  110. package/lib/file/copy-cli.mjs +6 -2
  111. package/lib/file/move-cli.cjs +183 -2
  112. package/lib/file/move-cli.mjs +6 -2
  113. package/lib/find-node-modules-cli.cjs +1 -1
  114. package/lib/find-node-modules-cli.mjs +1 -1
  115. package/lib/find-node-modules.cjs +1 -1
  116. package/lib/find-node-modules.mjs +1 -1
  117. package/lib/free-chatgpt.cjs +6 -11
  118. package/lib/free-chatgpt.mjs +1 -1
  119. package/lib/git/user-config.cjs +7 -12
  120. package/lib/git/user-config.mjs +2 -2
  121. package/lib/git-diff-cli.cjs +91 -30
  122. package/lib/git-diff-cli.mjs +3 -3
  123. package/lib/git-diff.cjs +91 -30
  124. package/lib/git-diff.js +85 -28
  125. package/lib/git-diff.mjs +3 -3
  126. package/lib/git-fix.cjs +7 -12
  127. package/lib/git-fix.mjs +2 -2
  128. package/lib/git-purge.cjs +7 -12
  129. package/lib/git-purge.mjs +2 -2
  130. package/lib/index.cjs +1 -1
  131. package/lib/index.mjs +1 -1
  132. package/lib/node-cache-cleaner-cli.cjs +185 -2
  133. package/lib/node-cache-cleaner-cli.js +2 -5
  134. package/lib/node-cache-cleaner-cli.mjs +8 -4
  135. package/lib/node-executor.cjs +183 -2
  136. package/lib/node-executor.mjs +5 -2
  137. package/lib/node-package-packer/build-readme.cjs +150 -0
  138. package/lib/node-package-packer/build-readme.d.mts +10 -0
  139. package/lib/node-package-packer/build-readme.mjs +10 -0
  140. package/lib/node-package-packer/build-tarball.cjs +495 -0
  141. package/lib/node-package-packer/build-tarball.d.mts +33 -0
  142. package/lib/node-package-packer/build-tarball.mjs +175 -0
  143. package/lib/node-package-packer-cli.cjs +525 -0
  144. package/lib/node-package-packer-cli.d.mts +1 -0
  145. package/lib/node-package-packer-cli.mjs +34 -0
  146. package/lib/npm-run-series.cjs +7 -12
  147. package/lib/npm-run-series.mjs +2 -2
  148. package/lib/package-resolutions-updater-cli.cjs +73 -76
  149. package/lib/package-resolutions-updater-cli.mjs +4 -3
  150. package/lib/package-resolutions-updater.cjs +71 -74
  151. package/lib/package-resolutions-updater.d.mts +34 -0
  152. package/lib/package-resolutions-updater.mjs +3 -2
  153. package/lib/php-cs-fixer-staged.cjs +1 -1
  154. package/lib/php-cs-fixer-staged.mjs +1 -1
  155. package/lib/print-directory-tree.cjs +16 -18
  156. package/lib/print-directory-tree.mjs +11 -8
  157. package/lib/print-tarball-tree.cjs +262 -0
  158. package/lib/print-tarball-tree.d.mts +1 -0
  159. package/lib/print-tarball-tree.mjs +68 -0
  160. package/lib/ps/index.cjs +10 -10
  161. package/lib/ps/index.mjs +4 -4
  162. package/lib/ps/table-parser.d.ts +3 -4
  163. package/lib/ps/table-parser.js +9 -16
  164. package/lib/remove-module.cjs +17 -22
  165. package/lib/remove-module.mjs +2 -2
  166. package/lib/rm-node-module-cli.cjs +171 -4
  167. package/lib/rm-node-module-cli.mjs +7 -4
  168. package/lib/rmpath-cli.cjs +285 -0
  169. package/lib/rmpath-cli.d.mts +1 -0
  170. package/lib/rmpath-cli.mjs +23 -0
  171. package/lib/rmpath.cjs +6 -217
  172. package/lib/rmpath.mjs +5 -101
  173. package/lib/run-by-checksum/cache.cjs +69 -0
  174. package/lib/run-by-checksum/cache.d.ts +19 -0
  175. package/lib/run-by-checksum/cache.js +50 -0
  176. package/lib/run-by-checksum/cache.mjs +12 -0
  177. package/lib/run-by-checksum/hash.cjs +72 -0
  178. package/lib/run-by-checksum/hash.d.ts +14 -0
  179. package/lib/run-by-checksum/hash.js +85 -0
  180. package/lib/{ps/isWin.mjs → run-by-checksum/hash.mjs} +5 -5
  181. package/lib/run-by-checksum/run.cjs +169 -0
  182. package/lib/run-by-checksum/run.d.ts +22 -0
  183. package/lib/run-by-checksum/run.js +93 -0
  184. package/lib/run-by-checksum/run.mjs +10 -0
  185. package/lib/run-by-checksum-cli.cjs +382 -0
  186. package/lib/run-by-checksum-cli.d.ts +2 -0
  187. package/lib/run-by-checksum-cli.js +43 -0
  188. package/lib/run-by-checksum-cli.mjs +56 -0
  189. package/lib/submodule-install.cjs +8 -13
  190. package/lib/submodule-install.mjs +3 -3
  191. package/lib/submodule-remove-cli.cjs +169 -2
  192. package/lib/submodule-remove-cli.js +2 -2
  193. package/lib/submodule-remove-cli.mjs +5 -2
  194. package/lib/utils/fetchResponse.cjs +24 -0
  195. package/lib/utils/fetchResponse.d.cts +25 -0
  196. package/lib/utils/fetchResponse.mjs +6 -0
  197. package/lib/utils/index.cjs +5 -10
  198. package/lib/utils/index.d.cts +2 -9
  199. package/lib/utils/index.mjs +1 -1
  200. package/lib/utils/isWindows.mjs +3 -1
  201. package/lib/utils/runBash.cjs +1 -1
  202. package/lib/utils/runBash.mjs +1 -1
  203. package/lib/yarn-per-branch-lock-installer.cjs +202 -11
  204. package/lib/yarn-per-branch-lock-installer.mjs +24 -11
  205. package/lib/yarn-reinstall.cjs +6 -11
  206. package/lib/yarn-reinstall.mjs +1 -1
  207. package/package.json +35 -10
  208. package/readme.html +2 -2
  209. package/readme.md +5 -5
  210. package/releases/readme.md +6 -3
  211. package/tmp/test-repo-runChecksum/test-complex-glob/README.md +1 -0
  212. package/tmp/test-repo-runChecksum/test-mixed-args/README.md +1 -0
  213. package/.opencode/package.json +0 -5
  214. package/lib/chunk-6S4NXESK.mjs +0 -26
  215. package/lib/del-ps.js +0 -32
  216. package/lib/del-ps.mjs +0 -43
  217. package/lib/ps/isWin.cjs +0 -26
  218. package/lib/ps/isWin.d.ts +0 -2
  219. package/lib/ps/isWin.js +0 -4
  220. package/test/package.json +0 -20
  221. package/test-project/package.json +0 -22
  222. package/test-project/workspaces/workspace-a/package.json +0 -135
  223. package/test-project/workspaces/workspace-a/test/demo/package.json +0 -25
  224. package/test-project/workspaces/workspace-b/package.json +0 -139
  225. package/test-project/workspaces/workspace-b/test/sample-project/package.json +0 -7
  226. package/test-project/workspaces/workspace-b/themes/hexo-theme-flowbite/package.json +0 -96
  227. package/tmp/rm-node-modules-test-project/package.json +0 -17
  228. package/tmp/rm-node-modules-test-project/packages/workspace-a/package.json +0 -16
  229. package/tmp/rm-node-modules-test-project/packages/workspace-b/package.json +0 -16
  230. package/tmp/test-repo/package.json +0 -17
  231. /package/lib/{del-ps.d.ts → del-ps-cli.d.mts} +0 -0
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
3
+ import {
4
+ require_utils
5
+ } from "./chunk-6RK5UCTP.mjs";
3
6
  import {
4
7
  __commonJS,
5
8
  __require,
@@ -10,9 +13,10 @@ import {
10
13
  var require_yarn_per_branch_lock_installer = __commonJS({
11
14
  "src/yarn-per-branch-lock-installer.cjs"() {
12
15
  init_esm_shims();
13
- var { execSync, spawnSync } = __require("child_process");
16
+ var { execSync } = __require("child_process");
17
+ var spawn = __require("cross-spawn");
14
18
  var fs = __require("fs-extra");
15
- var minimist = __require("minimist");
19
+ var { getArgs } = require_utils();
16
20
  function run(cmd, opts = {}) {
17
21
  var _a;
18
22
  try {
@@ -32,6 +36,14 @@ var require_yarn_per_branch_lock_installer = __commonJS({
32
36
  function safeBranchName(name) {
33
37
  return name.replace(/[\\/]/g, "-");
34
38
  }
39
+ function findCorepack() {
40
+ try {
41
+ const paths = run(process.platform === "win32" ? "where corepack" : "which corepack").split(/\r?\n/).filter(Boolean);
42
+ return paths[0] || null;
43
+ } catch {
44
+ return null;
45
+ }
46
+ }
35
47
  function findYarn() {
36
48
  try {
37
49
  const paths = run(process.platform === "win32" ? "where yarn" : "which yarn").split(/\r?\n/).filter(Boolean);
@@ -43,10 +55,8 @@ var require_yarn_per_branch_lock_installer = __commonJS({
43
55
  return null;
44
56
  }
45
57
  }
46
- function runYarn(yarnPath, args) {
47
- const result = process.platform === "win32" ? spawnSync("cmd.exe", ["/d", "/s", "/c", yarnPath, ...args], {
48
- stdio: "inherit"
49
- }) : spawnSync(yarnPath, args, {
58
+ function runYarn(runner, args) {
59
+ const result = spawn.sync(runner.command, [...runner.args, ...args], {
50
60
  stdio: "inherit"
51
61
  });
52
62
  if (result.error) {
@@ -69,7 +79,7 @@ Examples:
69
79
  `);
70
80
  }
71
81
  function main() {
72
- const argv = minimist(process.argv.slice(2), {
82
+ const argv = getArgs({
73
83
  boolean: ["help"],
74
84
  alias: {
75
85
  h: "help"
@@ -83,9 +93,11 @@ Examples:
83
93
  const branch = safeBranchName(getBranchName());
84
94
  const yarnLock = "yarn.lock";
85
95
  const branchLock = `yarn.${branch}.lock`;
96
+ const corepackPath = findCorepack();
86
97
  const yarnPath = findYarn();
87
- if (!yarnPath) {
88
- console.error("Error: Yarn not found in PATH.");
98
+ const yarnRunner = corepackPath ? { command: corepackPath, args: ["yarn"] } : yarnPath ? { command: yarnPath, args: [] } : null;
99
+ if (!yarnRunner) {
100
+ console.error("Error: Corepack or Yarn not found in PATH.");
89
101
  process.exit(1);
90
102
  }
91
103
  if (fs.existsSync(branchLock)) {
@@ -96,8 +108,9 @@ Examples:
96
108
  fs.removeSync(yarnLock);
97
109
  }
98
110
  const args = packages.length ? ["up", ...packages] : ["install"];
99
- console.log(`Running: yarn ${args.join(" ")}`);
100
- runYarn(yarnPath, args);
111
+ const commandText = [yarnRunner.command, ...yarnRunner.args, ...args].join(" ");
112
+ console.log(`Running: ${commandText}`);
113
+ runYarn(yarnRunner, args);
101
114
  if (fs.existsSync(yarnLock)) {
102
115
  console.log(`Saving ${yarnLock} -> ${branchLock}`);
103
116
  fs.copyFileSync(yarnLock, branchLock);
@@ -19,9 +19,9 @@ var require_utils = __commonJS({
19
19
  init_cjs_shims();
20
20
  var fs = require("fs");
21
21
  var path = require("upath");
22
- var argv = require("minimist")(process.argv.slice(2));
22
+ var minimistLib = require("minimist");
23
+ var argv = minimistLib(process.argv.slice(2));
23
24
  var { exec } = require("child_process");
24
- var { URL: URL2 } = require("url");
25
25
  var { promisify } = require("util");
26
26
  var execAsync = promisify(exec);
27
27
  async function parseGitRemotes() {
@@ -34,7 +34,7 @@ var require_utils = __commonJS({
34
34
  if (name && url) {
35
35
  const [repoUrl] = url.split(" ");
36
36
  try {
37
- const parsedUrl = new URL2(repoUrl);
37
+ const parsedUrl = new URL(repoUrl);
38
38
  const pathParts = parsedUrl.pathname.split("/").filter(Boolean);
39
39
  if (parsedUrl.hostname === "github.com" && pathParts.length === 2) {
40
40
  let repoPath = pathParts.join("/");
@@ -55,15 +55,10 @@ var require_utils = __commonJS({
55
55
  }
56
56
  }
57
57
  module2.exports.parseGitRemotes = parseGitRemotes;
58
- function joinPathPreserveDriveLetter(...segments) {
59
- let fullPath = require("path").join(...segments);
60
- if (/^[a-z]:\\/.test(fullPath)) {
61
- fullPath = fullPath.charAt(0).toUpperCase() + fullPath.slice(1);
58
+ function getArgs2(opts) {
59
+ if (opts) {
60
+ return minimistLib(process.argv.slice(2), opts);
62
61
  }
63
- return fullPath;
64
- }
65
- module2.exports.joinPathPreserveDriveLetter = joinPathPreserveDriveLetter;
66
- function getArgs2() {
67
62
  return argv;
68
63
  }
69
64
  module2.exports.getArgs = getArgs2;
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  require_utils
4
- } from "./chunk-5RTXZVCW.mjs";
4
+ } from "./chunk-6RK5UCTP.mjs";
5
5
  import {
6
6
  __commonJS,
7
7
  __require,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "binary-collections",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "Utility to clean any programming caches and more",
5
5
  "keywords": [
6
6
  "cache",
@@ -36,19 +36,19 @@
36
36
  "files": [
37
37
  "binaries",
38
38
  "lib",
39
- "package.json",
39
+ "docs-src",
40
40
  "readme.md",
41
41
  ".puppeterrc.cjs",
42
42
  "requirements.txt"
43
43
  ],
44
44
  "scripts": {
45
45
  "build": "tsc -b tsconfig.build.json && npm run build-tsup && npm run build-exports",
46
- "build-exports": "node -r ts-node/register -r dotenv/config build.exports.mjs",
46
+ "build-exports": "node -r ts-node/register -r dotenv/config build.mjs",
47
47
  "build-packages": "yarn workspaces foreach --worktree --exclude=binary-collections --no-private run build",
48
48
  "build-rollup": "rollup -c rollup.config.js",
49
49
  "build-tsup": "node build.tsup.js",
50
50
  "clean": "rimraf lib tmp/dist binaries",
51
- "pack": "node packer.cjs --yarn --filename=bin",
51
+ "pack": "node package.cjs --yarn --filename=bin",
52
52
  "prepare": "husky",
53
53
  "puppeteer:browser": "npx -y puppeteer browsers install chrome",
54
54
  "test": "test-cjs",
@@ -68,6 +68,7 @@
68
68
  "ansi-colors": "^4.1.3",
69
69
  "axios": "^1.16.1",
70
70
  "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/78b09a1f799430fb251c1b438ec56ce7957674f4/release/cross-spawn.tgz",
71
+ "crypto-js": "^4.2.0",
71
72
  "dotenv": "^17.4.2",
72
73
  "fs-extra": "^11.3.5",
73
74
  "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/ed17f70eb7444d24bd8eb984a4afe9fd64652838/release/git-command-helper.tgz",
@@ -79,9 +80,12 @@
79
80
  "puppeteer-extra": "^3.3.6",
80
81
  "puppeteer-extra-plugin-stealth": "^2.11.2",
81
82
  "sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/44e5c7b79b4e60f8c2d34857c27b8ce677d7493e/packages/sbg-utility/release/sbg-utility.tgz",
83
+ "tar-stream": "^3.2.0",
82
84
  "upath": "^3.0.7",
85
+ "which": "^7.0.0",
83
86
  "yaml": "^2.9.0",
84
- "yarn": "^1.22.22"
87
+ "yarn": "^1.22.22",
88
+ "zlib": "^1.0.5"
85
89
  },
86
90
  "devDependencies": {
87
91
  "@babel/core": "^7.29.0",
@@ -95,12 +99,15 @@
95
99
  "@rollup/plugin-node-resolve": "^16.0.3",
96
100
  "@types/babel__core": "^7",
97
101
  "@types/babel__preset-env": "^7",
102
+ "@types/crypto-js": "^4",
98
103
  "@types/fs-extra": "^11",
99
104
  "@types/jest": "^30.0.0",
100
105
  "@types/minimist": "^1",
101
106
  "@types/mocha": "^10.0.10",
102
107
  "@types/node": "^25.9.1",
103
108
  "@types/ps-node": "^0",
109
+ "@types/tar-stream": "^3",
110
+ "@types/which": "^3.0.4",
104
111
  "babel-jest": "^30.4.1",
105
112
  "browser-sync": "^3.0.4",
106
113
  "cross-env": "^10.1.0",
@@ -128,13 +135,16 @@
128
135
  "resolutions": {
129
136
  "@types/through2": "https://github.com/dimaslanjaka/nodejs-package-types/raw/refs/heads/through2/release/types-through2.tgz",
130
137
  "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/78b09a1f799430fb251c1b438ec56ce7957674f4/release/cross-spawn.tgz",
131
- "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/ed17f70eb7444d24bd8eb984a4afe9fd64652838/release/git-command-helper.tgz",
138
+ "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/dd8c8ef596083f367c592f97a2439f9fc8ab33b2/release/git-command-helper.tgz",
132
139
  "sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/44e5c7b79b4e60f8c2d34857c27b8ce677d7493e/packages/sbg-utility/release/sbg-utility.tgz",
133
- "@dimaslanjaka/eslint-base-config": "https://github.com/dimaslanjaka/eslint-base-config/raw/69ca996fdeaac42c93dd590124996eff58b5d6c2/release/dimaslanjaka-eslint-base-config.tgz"
140
+ "@dimaslanjaka/eslint-base-config": "https://github.com/dimaslanjaka/eslint-base-config/raw/9741b4feac89f303ea585e3ecac2b0e768434135/release/dimaslanjaka-eslint-base-config.tgz"
134
141
  },
135
142
  "bin": {
136
143
  "binary-collections": "lib/binary-collections.cjs",
137
144
  "binary-executor": "binaries/binary-executor.cjs",
145
+ "build-package": "lib/node-package-packer-cli.cjs",
146
+ "build-package-tarball": "lib/node-package-packer-cli.cjs",
147
+ "build-tarball": "lib/node-package-packer-cli.cjs",
138
148
  "changelog": "lib/changelog.cjs",
139
149
  "chatgpt": "lib/free-chatgpt.cjs",
140
150
  "clean-github-actions-cache": "lib/clean-github-actions-caches-cli.cjs",
@@ -149,14 +159,19 @@
149
159
  "del-gradle": "lib/del-gradle.cjs",
150
160
  "del-node-modules": "lib/del-node-modules.cjs",
151
161
  "del-nodemodules": "lib/del-node-modules.cjs",
152
- "del-ps": "lib/del-ps.cjs",
162
+ "del-ps": "lib/del-ps-cli.cjs",
153
163
  "del-yarn-caches": "lib/del-yarn-caches.cjs",
154
164
  "del-yarncaches": "lib/del-yarn-caches.cjs",
155
165
  "dev": "binaries/dev.cjs",
156
166
  "dir-tree": "lib/print-directory-tree.cjs",
167
+ "download": "lib/downloader-cli.cjs",
168
+ "download-file": "lib/downloader-cli.cjs",
169
+ "downloader": "lib/downloader-cli.cjs",
157
170
  "empty": "binaries/empty.cjs",
158
171
  "exec-node": "lib/node-executor.cjs",
159
172
  "execute-node": "lib/node-executor.cjs",
173
+ "fetch-file": "lib/downloader-cli.cjs",
174
+ "file-downloader": "lib/downloader-cli.cjs",
160
175
  "find-node-modules": "lib/find-node-modules-cli.cjs",
161
176
  "free-chatgpt": "lib/free-chatgpt.cjs",
162
177
  "git-diff": "lib/git-diff-cli.cjs",
@@ -175,14 +190,18 @@
175
190
  "node-exec": "lib/node-executor.cjs",
176
191
  "node-executor": "lib/node-executor.cjs",
177
192
  "node-move": "lib/file/move-cli.cjs",
193
+ "node-package-packer": "lib/node-package-packer-cli.cjs",
178
194
  "nodekill": "binaries/nodekill.cjs",
179
195
  "npm-run-series": "lib/npm-run-series.cjs",
180
196
  "nrs": "lib/npm-run-series.cjs",
197
+ "pack-node-package": "lib/node-package-packer-cli.cjs",
198
+ "pack-tarball": "lib/node-package-packer-cli.cjs",
181
199
  "package-resolutions-updater": "lib/package-resolutions-updater-cli.cjs",
182
200
  "php-cs-fixer-staged": "lib/php-cs-fixer-staged.cjs",
183
201
  "pkg-res-updater": "lib/package-resolutions-updater-cli.cjs",
184
202
  "pkg-resolutions-updater": "lib/package-resolutions-updater-cli.cjs",
185
203
  "print-directory-tree": "lib/print-directory-tree.cjs",
204
+ "print-tarball-tree": "lib/print-tarball-tree.cjs",
186
205
  "print-tree": "lib/print-directory-tree.cjs",
187
206
  "prod": "binaries/prod.cjs",
188
207
  "py": "binaries/py.cjs",
@@ -192,13 +211,18 @@
192
211
  "rm-node-module": "lib/rm-node-module-cli.cjs",
193
212
  "rm-node-modules": "lib/rm-node-module-cli.cjs",
194
213
  "rmfind": "binaries/rmfind.cjs",
195
- "rmpath": "lib/rmpath.cjs",
214
+ "rmpath": "lib/rmpath-cli.cjs",
196
215
  "rmx": "binaries/rmx.cjs",
216
+ "run-by-checksum": "lib/run-by-checksum-cli.cjs",
217
+ "run-c": "lib/run-by-checksum-cli.cjs",
218
+ "run-checksum": "lib/run-by-checksum-cli.cjs",
197
219
  "run-s": "lib/npm-run-series.cjs",
198
220
  "run-series": "lib/npm-run-series.cjs",
199
221
  "submodule-install": "lib/submodule-install.cjs",
200
222
  "submodule-remove": "lib/submodule-remove-cli.cjs",
201
223
  "submodule-token": "binaries/submodule-token.cjs",
224
+ "tarball-packer": "lib/node-package-packer-cli.cjs",
225
+ "tarball-tree": "lib/print-tarball-tree.cjs",
202
226
  "test-cjs": "binaries/test-cjs.cjs",
203
227
  "test-esm": "binaries/test-esm.cjs",
204
228
  "undo-commit": "lib/git/undo-commit.cjs",
@@ -209,6 +233,7 @@
209
233
  "yarn-install": "lib/yarn-per-branch-lock-installer.cjs",
210
234
  "yarn-per-branch-lock-installer": "lib/yarn-per-branch-lock-installer.cjs",
211
235
  "yarn-reinstall": "lib/yarn-reinstall.cjs",
212
- "yc": "binaries/yc.cjs"
236
+ "yc": "binaries/yc.cjs",
237
+ "ycw": "binaries/ycw.cjs"
213
238
  }
214
239
  }
package/readme.html CHANGED
@@ -335,7 +335,7 @@ npm install binary-collections@https://github.com/dimaslanjaka/bin/raw/master/re
335
335
  yarn dlx binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz <command-name>
336
336
 
337
337
  # NPX
338
- npx -y binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz <command-name></code></pre>
338
+ npx --legacy-peer-deps -y binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz <command-name></code></pre>
339
339
  </section>
340
340
 
341
341
  <section id="vscode">
@@ -574,7 +574,7 @@ npm install binary-collections@https://github.com/dimaslanjaka/bin/raw/master/re
574
574
  yarn dlx binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz <command-name>
575
575
 
576
576
  # NPX
577
- npx -y binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz <command-name>
577
+ npx --legacy-peer-deps -y binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz <command-name>
578
578
  \`\`\`
579
579
 
580
580
  ## VSCode Setup
package/readme.md CHANGED
@@ -51,7 +51,7 @@ Run without installing using `npx` or `yarn dlx`.
51
51
  yarn dlx binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz <command-name>
52
52
 
53
53
  # Using NPX
54
- npx -y binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz <command-name>
54
+ npx --legacy-peer-deps -y binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz <command-name>
55
55
  ```
56
56
 
57
57
  ### Option 3: Clone Repository
@@ -139,13 +139,13 @@ binary-collections list
139
139
  | **Git** | `git-purge`, `git-diff`, `git-fix`, `git-reduce-size`, `git-undo` | Git repository management and optimization | [`git-purge.md`](./docs-src/git-purge.md), [`git-diff.md`](./docs-src/git-diff.md), [`git-fix.md`](./docs-src/git-fix.md), [`git-reduce-size.md`](./docs-src/git-reduce-size.md), [`git-undo.md`](./docs-src/git-undo.md) |
140
140
  | **Submodules** | `submodule`, `submodule-install`, `submodule-remove`, `submodule-token` | Git submodule operations | [`submodule-install.md`](./docs-src/submodule-install.md), [`submodule-remove.md`](./docs-src/submodule-remove.md), [`submodule-token.md`](./docs-src/submodule-token.md) |
141
141
  | **NPM Scripts** | `nrs`, `run-s`, `run-series`, `npm-run-series` | Run npm scripts in series with pattern matching | [`npm-run-series.md`](./docs-src/npm-run-series.md) |
142
- | **Package Mgmt** | `yarn-reinstall`, `pkg-resolutions-updater`, `pkg-res-updater`, `yarn-install`, `yarn-clean` | Yarn/package resolutions management utilities | [`yarn-reinstall.md`](./docs-src/yarn-reinstall.md), [`yarn-install.md`](./docs-src/yarn-install.md), [`yarn-clean.md`](./docs-src/yarn-clean.md), [`package-resolutions-updater.md`](./docs-src/package-resolutions-updater.md) |
142
+ | **Package Mgmt** | `yarn-reinstall`, `pkg-resolutions-updater`, `pkg-res-updater`, `yarn-install`, `yarn-clean` | Yarn/package resolutions management utilities | [`yarn-reinstall.md`](./docs-src/yarn-reinstall.md), [`yarn-install.md`](./docs-src/yarn-install.md), [`node-cache-cleaner.md`](./docs-src/node-cache-cleaner.md), [`package-resolutions-updater.md`](./docs-src/package-resolutions-updater.md) |
143
143
  | **Node.js Dev** | `find-node-modules`, `find-nodemodules`, `dev`, `prod`, `empty`, `node-cache-cleaner`, `node-executor`, `py` | Node.js development helpers | [`find-node-modules.md`](./docs-src/find-node-modules.md), [`env-helpers.md`](./docs-src/env-helpers.md), [`node-cache-cleaner.md`](./docs-src/node-cache-cleaner.md), [`node-executor.md`](./docs-src/node-executor.md), [`py.md`](./docs-src/py.md) |
144
144
  | **Process Mgmt** | `kill-process`, `nodekill`, `javakill`, `del-ps`, `kill-night-crows` | Process management and termination | [`del-ps.md`](./docs-src/del-ps.md), [`kill-night-crows.md`](./docs-src/kill-night-crows.md) |
145
- | **File System** | `rmfind`, `rmpath`, `rmx`, `print-tree`, `dir-tree`, `copy`, `move`, `remove-module`, `rm-node-modules` | File system operations | [`copy-move-file.md`](./docs-src/copy-move-file.md), [`rmpath.md`](./docs-src/rmpath.md), [`rmfind-rmx.md`](./docs-src/rmfind-rmx.md), [`print-directory-tree.md`](./docs-src/print-directory-tree.md), [`remove-module.md`](./docs-src/remove-module.md), [`rm-node-modules.md`](./docs-src/rm-node-modules.md) |
146
- | **Cleanup** | `del-nodemodules`, `del-yarncaches`, `del-gradle`, `del-yarn-caches`, `yarn-clean` | Cache and build directory cleanup | [`del-node-modules.md`](./docs-src/del-node-modules.md), [`del-yarn-caches.md`](./docs-src/del-yarn-caches.md), [`del-gradle.md`](./docs-src/del-gradle.md), [`yarn-clean.md`](./docs-src/yarn-clean.md) |
145
+ | **File System** | `rmfind`, `rmpath`, `rmx`, `print-tree`, `dir-tree`, `copy`, `move`, `remove-module` | File system operations | [`copy-move-file.md`](./docs-src/copy-move-file.md), [`rmpath.md`](./docs-src/rmpath.md), [`rmfind-rmx.md`](./docs-src/rmfind-rmx.md), [`print-directory-tree.md`](./docs-src/print-directory-tree.md), [`remove-module.md`](./docs-src/remove-module.md) |
146
+ | **Cleanup** | `del-nodemodules`, `del-yarncaches`, `del-gradle`, `del-yarn-caches`, `yarn-clean` | Cache and build directory cleanup | [`node-cache-cleaner.md`](./docs-src/node-cache-cleaner.md), [`del-gradle.md`](./docs-src/del-gradle.md) |
147
147
  | **GitHub Actions** | `clean-github-actions-caches`, `clean-github-actions-cache`, `clear-github-actions-cache`, `clear-github-actions-caches`, `clear-gh-caches` | Remove old GitHub Actions caches, keep only latest | [`clean-github-actions-caches.md`](./docs-src/clean-github-actions-caches.md) |
148
- | **Other** | `binary-collections`, `changelog`, `php-cs-fixer-staged`, `free-chatgpt`, `test-runners`, `package-resolutions-updater` | Miscellaneous utilities and documentation | [`binary-collections.md`](./docs-src/binary-collections.md), [`changelog.md`](./docs-src/changelog.md), [`php-cs-fixer-staged.md`](./docs-src/php-cs-fixer-staged.md), [`free-chatgpt.md`](./docs-src/free-chatgpt.md), [`test-runners.md`](./docs-src/test-runners.md), [`package-resolutions-updater.md`](./docs-src/package-resolutions-updater.md) |
148
+ | **Other** | `binary-collections`, `changelog`, `php-cs-fixer-staged`, `free-chatgpt`, `test-runners` | Miscellaneous utilities and documentation | [`binary-collections.md`](./docs-src/binary-collections.md), [`changelog.md`](./docs-src/changelog.md), [`php-cs-fixer-staged.md`](./docs-src/php-cs-fixer-staged.md), [`free-chatgpt.md`](./docs-src/free-chatgpt.md), [`test-runners.md`](./docs-src/test-runners.md) |
149
149
 
150
150
  ---
151
151
 
@@ -2,7 +2,7 @@
2
2
  ## Releases
3
3
  | version | tarball url |
4
4
  | :--- | :--- |
5
- | latest | https://github.com/dimaslanjaka/bin/raw/22ac0e3/releases/bin.tgz |
5
+ | latest | https://github.com/dimaslanjaka/bin/raw/f9d6d4b/releases/bin.tgz |
6
6
  | latest | https://github.com/dimaslanjaka/bin/raw/master/releases/bin.tgz |
7
7
 
8
8
  use this tarball with `resolutions`:
@@ -16,7 +16,9 @@ use this tarball with `resolutions`:
16
16
 
17
17
  ## Releases
18
18
 
19
- ## Get URL of `binary-collections` Release Tarball
19
+
20
+
21
+ ## Get URL of `binary-collections` Release Tarball
20
22
  - select tarball file
21
23
  ![gambar](https://user-images.githubusercontent.com/12471057/203216375-8af4b5d9-00c2-40fb-8d3d-d220beaabd46.png)
22
24
  - copy raw url
@@ -24,6 +26,7 @@ use this tarball with `resolutions`:
24
26
  - or copy download url
25
27
  ![gambar](https://user-images.githubusercontent.com/12471057/203216541-3807d2c3-5213-49f3-b93d-c626dbae3b2e.png)
26
28
  - then run installation from command line
29
+
27
30
  ```bash
28
31
  npm i https://....url-tgz
29
32
  ```
@@ -33,4 +36,4 @@ npm i https://github.com/dimaslanjaka/nodejs-package-types/raw/main/release/node
33
36
  ```
34
37
 
35
38
  ## URL Parts Explanations
36
- > https://github.com/github-username/github-repo-name/raw/github-branch-name/path-to-file-with-extension
39
+ > https://github.com/github-username/github-repo-name/raw/github-branch-name/path-to-file-with-extension
@@ -1,5 +0,0 @@
1
- {
2
- "dependencies": {
3
- "@opencode-ai/plugin": "1.15.10"
4
- }
5
- }
@@ -1,26 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import {
3
- __esm,
4
- __export,
5
- init_esm_shims
6
- } from "./chunk-QQ4A6DLD.mjs";
7
-
8
- // src/ps/isWin.js
9
- var isWin_exports = {};
10
- __export(isWin_exports, {
11
- default: () => isWin_default
12
- });
13
- var isWin, isWin_default;
14
- var init_isWin = __esm({
15
- "src/ps/isWin.js"() {
16
- init_esm_shims();
17
- isWin = process.platform === "win32";
18
- isWin_default = isWin;
19
- }
20
- });
21
-
22
- export {
23
- isWin_default,
24
- isWin_exports,
25
- init_isWin
26
- };
package/lib/del-ps.js DELETED
@@ -1,32 +0,0 @@
1
- "use strict";
2
- const crossSpawn = require('cross-spawn');
3
- const ps = require('ps-node');
4
- const isWin = require('./ps/isWin.js').default;
5
- const { getArgs } = require('./utils/index.cjs');
6
- getArgs()._.forEach((command) => {
7
- ps.lookup({
8
- command,
9
- psargs: 'ux'
10
- }, function (err, resultList) {
11
- if (err) {
12
- throw new Error(err);
13
- }
14
- resultList.forEach(function (process) {
15
- if (process) {
16
- // console.log('PID: %s, COMMAND: %s, ARGUMENTS: %s', process.pid, process.command, process.arguments);
17
- if (!isWin) {
18
- crossSpawn.spawnAsync('kill', ['-9', process.pid]).catch((e) => console.log(`kill failed ${e.message}`));
19
- crossSpawn
20
- .spawnAsync('killall', ['-9', process.pid])
21
- .catch((e) => console.log(`killall failed ${e.message}`));
22
- }
23
- else {
24
- // wmic process where "name like 'java.exe'" delete
25
- crossSpawn
26
- .spawnAsync('wmic', ['process', 'where', `"name like '${command}'" delete`])
27
- .catch((e) => console.log(`wmic failed ${e.message}`));
28
- }
29
- }
30
- });
31
- });
32
- });
package/lib/del-ps.mjs DELETED
@@ -1,43 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import {
3
- init_isWin,
4
- isWin_exports
5
- } from "./chunk-6S4NXESK.mjs";
6
- import {
7
- require_utils
8
- } from "./chunk-5RTXZVCW.mjs";
9
- import {
10
- __require,
11
- __toCommonJS,
12
- init_esm_shims
13
- } from "./chunk-QQ4A6DLD.mjs";
14
-
15
- // src/del-ps.js
16
- init_esm_shims();
17
- var crossSpawn = __require("cross-spawn");
18
- var ps = __require("ps-node");
19
- var isWin = (init_isWin(), __toCommonJS(isWin_exports)).default;
20
- var { getArgs } = require_utils();
21
- getArgs()._.forEach((command) => {
22
- ps.lookup(
23
- {
24
- command,
25
- psargs: "ux"
26
- },
27
- function(err, resultList) {
28
- if (err) {
29
- throw new Error(err);
30
- }
31
- resultList.forEach(function(process) {
32
- if (process) {
33
- if (!isWin) {
34
- crossSpawn.spawnAsync("kill", ["-9", process.pid]).catch((e) => console.log(`kill failed ${e.message}`));
35
- crossSpawn.spawnAsync("killall", ["-9", process.pid]).catch((e) => console.log(`killall failed ${e.message}`));
36
- } else {
37
- crossSpawn.spawnAsync("wmic", ["process", "where", `"name like '${command}'" delete`]).catch((e) => console.log(`wmic failed ${e.message}`));
38
- }
39
- }
40
- });
41
- }
42
- );
43
- });
package/lib/ps/isWin.cjs DELETED
@@ -1,26 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/ps/isWin.js
20
- var isWin_exports = {};
21
- __export(isWin_exports, {
22
- default: () => isWin_default
23
- });
24
- module.exports = __toCommonJS(isWin_exports);
25
- var isWin = process.platform === "win32";
26
- var isWin_default = isWin;
package/lib/ps/isWin.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export default isWin;
2
- declare const isWin: boolean;
package/lib/ps/isWin.js DELETED
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const isWin = process.platform === 'win32';
4
- exports.default = isWin;
package/test/package.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "name": "binary-collections-test",
3
- "private": true,
4
- "version": "1.0.0",
5
- "description": "",
6
- "main": "index.js",
7
- "scripts": {
8
- "build:a": "echo a",
9
- "build:b": "echo b",
10
- "build:c": "echo c",
11
- "test": "npm-run-series build:**",
12
- "install-deps": "npm i -D file:../"
13
- },
14
- "keywords": [],
15
- "author": "",
16
- "license": "ISC",
17
- "devDependencies": {
18
- "binary-collections": "./.."
19
- }
20
- }
@@ -1,22 +0,0 @@
1
- {
2
- "name": "test-binary-collections",
3
- "version": "1.0.0",
4
- "description": "Test project for binary-collections",
5
- "main": "index.js",
6
- "scripts": {
7
- "init-lock": "echo > yarn.lock",
8
- "init-workspace": "node init-workspace.cjs"
9
- },
10
- "keywords": [],
11
- "author": "dimaslanjaka@gmail.com",
12
- "license": "MIT",
13
- "workspaces": [
14
- "packages/*",
15
- "workspaces/*"
16
- ],
17
- "dependencies": {
18
- "binary-collections": "file:../releases/bin.tgz",
19
- "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/80999ac7a7031a81e11ddb5fab0f8ba433041c98/release/cross-spawn.tgz"
20
- },
21
- "packageManager": "yarn@4.9.2"
22
- }