binary-collections 2.0.5 → 2.0.6

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 (104) hide show
  1. package/bin/bash-dummy +7 -2
  2. package/bin/clean-nodemodule +7 -2
  3. package/bin/clean-nodemodules +7 -2
  4. package/bin/dev +7 -2
  5. package/bin/empty +7 -2
  6. package/bin/git-fix-encoding +7 -2
  7. package/bin/git-reduce-size +7 -2
  8. package/bin/kill-process +7 -2
  9. package/bin/nodekill +7 -2
  10. package/bin/prod +7 -2
  11. package/bin/rmfind +7 -2
  12. package/bin/rmpath +7 -2
  13. package/bin/rmx +9 -3
  14. package/bin/submodule +13 -2
  15. package/bin/submodule-install +7 -2
  16. package/bin/submodule-remove +7 -2
  17. package/eslint.config.cjs +97 -0
  18. package/lib/chunk-7MSZ52XC.mjs +14 -0
  19. package/lib/chunk-AVDT32AY.mjs +20 -0
  20. package/lib/chunk-E75HJFJO.mjs +20 -0
  21. package/lib/chunk-GA4DDV65.mjs +202 -0
  22. package/lib/chunk-LPLPQBYP.mjs +53 -0
  23. package/lib/chunk-M4IBUK4H.mjs +173 -0
  24. package/lib/chunk-S4SJ7SDW.mjs +625 -0
  25. package/lib/del-gradle.cjs +72 -0
  26. package/lib/del-gradle.d.mts +2 -0
  27. package/lib/del-gradle.d.ts +2 -0
  28. package/lib/del-gradle.js +72 -0
  29. package/lib/del-gradle.mjs +28 -0
  30. package/lib/del-node-modules.cjs +72 -0
  31. package/lib/del-node-modules.d.mts +2 -0
  32. package/lib/del-node-modules.d.ts +2 -0
  33. package/lib/del-node-modules.js +63 -10
  34. package/lib/del-node-modules.mjs +28 -0
  35. package/lib/del-ps.cjs +706 -0
  36. package/lib/del-ps.d.mts +2 -0
  37. package/lib/del-ps.d.ts +2 -0
  38. package/lib/del-ps.js +706 -0
  39. package/lib/del-ps.mjs +46 -0
  40. package/lib/del-yarn-caches.cjs +65 -0
  41. package/lib/del-yarn-caches.d.mts +2 -0
  42. package/lib/del-yarn-caches.d.ts +2 -0
  43. package/lib/del-yarn-caches.js +60 -6
  44. package/lib/del-yarn-caches.mjs +21 -0
  45. package/lib/find-node-modules.cjs +12 -0
  46. package/lib/find-node-modules.d.mts +2 -0
  47. package/lib/find-node-modules.d.ts +2 -0
  48. package/lib/find-node-modules.js +6 -7
  49. package/lib/find-node-modules.mjs +21 -0
  50. package/lib/git-purge.cjs +704 -0
  51. package/lib/git-purge.d.mts +2 -0
  52. package/lib/git-purge.d.ts +2 -0
  53. package/lib/git-purge.js +704 -0
  54. package/lib/git-purge.mjs +50 -0
  55. package/lib/index.cjs +2 -0
  56. package/lib/index.d.mts +2 -0
  57. package/lib/index.d.ts +2 -0
  58. package/{index.js → lib/index.js} +1 -0
  59. package/lib/index.mjs +9 -0
  60. package/lib/npm-run-series.cjs +61 -0
  61. package/lib/npm-run-series.d.mts +1 -0
  62. package/lib/npm-run-series.d.ts +1 -0
  63. package/lib/npm-run-series.js +37 -20
  64. package/lib/npm-run-series.mjs +47 -0
  65. package/lib/package-resolutions.cjs +28 -0
  66. package/lib/package-resolutions.d.mts +25 -0
  67. package/lib/package-resolutions.d.ts +25 -0
  68. package/lib/package-resolutions.js +28 -0
  69. package/lib/package-resolutions.mjs +31 -0
  70. package/lib/ps/connected-domain.cjs +156 -0
  71. package/lib/ps/connected-domain.d.mts +3 -0
  72. package/lib/ps/connected-domain.d.ts +3 -0
  73. package/lib/ps/connected-domain.js +156 -0
  74. package/lib/ps/connected-domain.mjs +7 -0
  75. package/lib/ps/index.cjs +555 -0
  76. package/lib/ps/index.d.cjs +17 -0
  77. package/lib/ps/index.d.d.mts +26 -0
  78. package/lib/ps/index.d.d.ts +26 -0
  79. package/lib/ps/index.d.js +17 -0
  80. package/lib/ps/index.d.mjs +8 -0
  81. package/lib/ps/index.d.mts +26 -0
  82. package/lib/ps/index.d.ts +26 -0
  83. package/lib/ps/index.js +555 -0
  84. package/lib/ps/index.mjs +203 -0
  85. package/lib/ps/isWin.cjs +3 -0
  86. package/lib/ps/isWin.d.mts +3 -0
  87. package/lib/ps/isWin.d.ts +3 -0
  88. package/lib/ps/isWin.js +3 -0
  89. package/lib/ps/isWin.mjs +7 -0
  90. package/lib/ps/table-parser.cjs +359 -0
  91. package/lib/ps/table-parser.d.mts +3 -0
  92. package/lib/ps/table-parser.d.ts +3 -0
  93. package/lib/ps/table-parser.js +359 -0
  94. package/lib/ps/table-parser.mjs +8 -0
  95. package/lib/utils.cjs +35 -0
  96. package/lib/utils.d.mts +20 -0
  97. package/lib/utils.d.ts +20 -0
  98. package/lib/utils.js +22 -23
  99. package/lib/utils.mjs +7 -0
  100. package/package.json +76 -32
  101. package/readme.md +23 -0
  102. package/src/ps/index.js +285 -0
  103. package/test/package.json +19 -0
  104. package/lib/package-resolutions.json +0 -22
package/lib/del-ps.mjs ADDED
@@ -0,0 +1,46 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ require_isWin
4
+ } from "./chunk-E75HJFJO.mjs";
5
+ import {
6
+ require_dist
7
+ } from "./chunk-S4SJ7SDW.mjs";
8
+ import {
9
+ require_utils
10
+ } from "./chunk-LPLPQBYP.mjs";
11
+ import {
12
+ init_esm_shims
13
+ } from "./chunk-7MSZ52XC.mjs";
14
+ import {
15
+ __require
16
+ } from "./chunk-AVDT32AY.mjs";
17
+
18
+ // src/del-ps.js
19
+ init_esm_shims();
20
+ var crossSpawn = require_dist();
21
+ var ps = __require("ps-node");
22
+ var isWin = require_isWin();
23
+ var utils = require_utils();
24
+ utils.getArgs()._.forEach((command) => {
25
+ ps.lookup(
26
+ {
27
+ command,
28
+ psargs: "ux"
29
+ },
30
+ function(err, resultList) {
31
+ if (err) {
32
+ throw new Error(err);
33
+ }
34
+ resultList.forEach(function(process) {
35
+ if (process) {
36
+ if (!isWin) {
37
+ crossSpawn.spawnAsync("kill", ["-9", process.pid]).catch((e) => console.log(`kill failed ${e.message}`));
38
+ crossSpawn.spawnAsync("killall", ["-9", process.pid]).catch((e) => console.log(`killall failed ${e.message}`));
39
+ } else {
40
+ crossSpawn.spawnAsync("wmic", ["process", "where", `"name like '${command}'" delete`]).catch((e) => console.log(`wmic failed ${e.message}`));
41
+ }
42
+ }
43
+ });
44
+ }
45
+ );
46
+ });
@@ -0,0 +1,65 @@
1
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
+ var __esm = (fn, res) => function __init() {
3
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
4
+ };
5
+ var __commonJS = (cb, mod) => function __require() {
6
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
7
+ };
8
+
9
+ // node_modules/tsup/assets/cjs_shims.js
10
+ var init_cjs_shims = __esm({
11
+ "node_modules/tsup/assets/cjs_shims.js"() {
12
+ }
13
+ });
14
+
15
+ // src/utils.js
16
+ var require_utils = __commonJS({
17
+ "src/utils.js"(exports2, module2) {
18
+ init_cjs_shims();
19
+ var { fs, path } = require("sbg-utility");
20
+ var argv = require("minimist")(process.argv.slice(2));
21
+ function getArgs() {
22
+ return argv;
23
+ }
24
+ function delStream2(globStream) {
25
+ globStream.stream().on("data", (result) => {
26
+ const fullPath = path.resolve(process.cwd(), result);
27
+ if (fs.statSync(fullPath).isDirectory()) {
28
+ const subdir = fs.readdirSync(fullPath).map((dirPath) => path.resolve(fullPath, dirPath));
29
+ for (let i = 0; i < subdir.length; i++) {
30
+ del(subdir[i]);
31
+ }
32
+ }
33
+ del(fullPath);
34
+ });
35
+ }
36
+ function del(fullPath) {
37
+ if (fs.statSync(fullPath).isDirectory()) {
38
+ const subdir = fs.readdirSync(fullPath).map((dirPath) => path.resolve(fullPath, dirPath));
39
+ for (let i = 0; i < subdir.length; i++) {
40
+ del(subdir[i]);
41
+ }
42
+ } else {
43
+ try {
44
+ fs.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
45
+ console.log("deleted", fullPath);
46
+ } catch (_) {
47
+ console.log("failed delete", fullPath);
48
+ }
49
+ }
50
+ }
51
+ var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
52
+ module2.exports = { del, delStream: delStream2, getArgs, delay };
53
+ }
54
+ });
55
+
56
+ // src/del-yarn-caches.js
57
+ init_cjs_shims();
58
+ var glob = require("glob");
59
+ var { delStream } = require_utils();
60
+ var g3 = new glob.Glob(["**/.yarn/cache*", "**/.yarn/*.gz"], {
61
+ withFileTypes: false,
62
+ cwd: process.cwd(),
63
+ ignore: ["**/.git*", "**/vendor/**"]
64
+ });
65
+ delStream(g3);
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -1,11 +1,65 @@
1
- const glob = require('glob');
2
- const { delStream } = require('./utils');
3
- // const path = require('path');
4
- // process.cwd = () => path.resolve(__dirname + '/../../../Repositories');
1
+ var __getOwnPropNames = Object.getOwnPropertyNames;
2
+ var __esm = (fn, res) => function __init() {
3
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
4
+ };
5
+ var __commonJS = (cb, mod) => function __require() {
6
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
7
+ };
5
8
 
6
- const g3 = new glob.Glob(['**/.yarn/cache*', '**/.yarn/*.gz'], {
9
+ // node_modules/tsup/assets/cjs_shims.js
10
+ var init_cjs_shims = __esm({
11
+ "node_modules/tsup/assets/cjs_shims.js"() {
12
+ }
13
+ });
14
+
15
+ // src/utils.js
16
+ var require_utils = __commonJS({
17
+ "src/utils.js"(exports2, module2) {
18
+ init_cjs_shims();
19
+ var { fs, path } = require("sbg-utility");
20
+ var argv = require("minimist")(process.argv.slice(2));
21
+ function getArgs() {
22
+ return argv;
23
+ }
24
+ function delStream2(globStream) {
25
+ globStream.stream().on("data", (result) => {
26
+ const fullPath = path.resolve(process.cwd(), result);
27
+ if (fs.statSync(fullPath).isDirectory()) {
28
+ const subdir = fs.readdirSync(fullPath).map((dirPath) => path.resolve(fullPath, dirPath));
29
+ for (let i = 0; i < subdir.length; i++) {
30
+ del(subdir[i]);
31
+ }
32
+ }
33
+ del(fullPath);
34
+ });
35
+ }
36
+ function del(fullPath) {
37
+ if (fs.statSync(fullPath).isDirectory()) {
38
+ const subdir = fs.readdirSync(fullPath).map((dirPath) => path.resolve(fullPath, dirPath));
39
+ for (let i = 0; i < subdir.length; i++) {
40
+ del(subdir[i]);
41
+ }
42
+ } else {
43
+ try {
44
+ fs.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
45
+ console.log("deleted", fullPath);
46
+ } catch (_) {
47
+ console.log("failed delete", fullPath);
48
+ }
49
+ }
50
+ }
51
+ var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
52
+ module2.exports = { del, delStream: delStream2, getArgs, delay };
53
+ }
54
+ });
55
+
56
+ // src/del-yarn-caches.js
57
+ init_cjs_shims();
58
+ var glob = require("glob");
59
+ var { delStream } = require_utils();
60
+ var g3 = new glob.Glob(["**/.yarn/cache*", "**/.yarn/*.gz"], {
7
61
  withFileTypes: false,
8
62
  cwd: process.cwd(),
9
- ignore: ['**/.git*', '**/vendor/**']
63
+ ignore: ["**/.git*", "**/vendor/**"]
10
64
  });
11
65
  delStream(g3);
@@ -0,0 +1,21 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ require_utils
4
+ } from "./chunk-LPLPQBYP.mjs";
5
+ import {
6
+ init_esm_shims
7
+ } from "./chunk-7MSZ52XC.mjs";
8
+ import {
9
+ __require
10
+ } from "./chunk-AVDT32AY.mjs";
11
+
12
+ // src/del-yarn-caches.js
13
+ init_esm_shims();
14
+ var glob = __require("glob");
15
+ var { delStream } = require_utils();
16
+ var g3 = new glob.Glob(["**/.yarn/cache*", "**/.yarn/*.gz"], {
17
+ withFileTypes: false,
18
+ cwd: process.cwd(),
19
+ ignore: ["**/.git*", "**/vendor/**"]
20
+ });
21
+ delStream(g3);
@@ -0,0 +1,12 @@
1
+ // src/find-node-modules.js
2
+ var glob = require("glob");
3
+ var path = require("path");
4
+ var g3 = new glob.Glob("**/node_modules", {
5
+ withFileTypes: false,
6
+ cwd: process.cwd(),
7
+ ignore: ["**/.git*", "**/vendor/**"]
8
+ });
9
+ g3.stream().on("data", (result) => {
10
+ const fullPath = path.resolve(process.cwd(), result);
11
+ console.log(fullPath);
12
+ });
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -1,13 +1,12 @@
1
- const glob = require('glob');
2
- const path = require('path');
3
- // process.cwd = () => path.resolve(__dirname + '/../../../Repositories');
4
-
5
- const g3 = new glob.Glob('**/node_modules', {
1
+ // src/find-node-modules.js
2
+ var glob = require("glob");
3
+ var path = require("path");
4
+ var g3 = new glob.Glob("**/node_modules", {
6
5
  withFileTypes: false,
7
6
  cwd: process.cwd(),
8
- ignore: ['**/.git*', '**/vendor/**']
7
+ ignore: ["**/.git*", "**/vendor/**"]
9
8
  });
10
- g3.stream().on('data', (result) => {
9
+ g3.stream().on("data", (result) => {
11
10
  const fullPath = path.resolve(process.cwd(), result);
12
11
  console.log(fullPath);
13
12
  });
@@ -0,0 +1,21 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ init_esm_shims
4
+ } from "./chunk-7MSZ52XC.mjs";
5
+ import {
6
+ __require
7
+ } from "./chunk-AVDT32AY.mjs";
8
+
9
+ // src/find-node-modules.js
10
+ init_esm_shims();
11
+ var glob = __require("glob");
12
+ var path = __require("path");
13
+ var g3 = new glob.Glob("**/node_modules", {
14
+ withFileTypes: false,
15
+ cwd: process.cwd(),
16
+ ignore: ["**/.git*", "**/vendor/**"]
17
+ });
18
+ g3.stream().on("data", (result) => {
19
+ const fullPath = path.resolve(process.cwd(), result);
20
+ console.log(fullPath);
21
+ });