binary-collections 2.0.6 → 2.0.7

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 (95) hide show
  1. package/bin/git-diff.cmd +4 -0
  2. package/bin/git-fix-encoding.cmd +0 -0
  3. package/bin/nodekill.cmd +0 -0
  4. package/bin/nodekill.ps1 +0 -0
  5. package/bin/submodule-install +0 -0
  6. package/lib/{chunk-GA4DDV65.mjs → chunk-3LOB2P54.mjs} +3 -3
  7. package/lib/{chunk-M4IBUK4H.mjs → chunk-4LEXWIIF.mjs} +2 -2
  8. package/lib/chunk-BSD5CIRU.mjs +52 -0
  9. package/lib/chunk-FB6YIQYR.mjs +42 -0
  10. package/lib/{chunk-E75HJFJO.mjs → chunk-JL32QDSH.mjs} +2 -2
  11. package/lib/{chunk-LPLPQBYP.mjs → chunk-OKYLF2MU.mjs} +14 -14
  12. package/lib/chunk-VXZQNLPU.mjs +23 -0
  13. package/lib/del-gradle.cjs +12 -12
  14. package/lib/del-gradle.d.ts +1 -2
  15. package/lib/del-gradle.js +12 -69
  16. package/lib/del-gradle.mjs +3 -3
  17. package/lib/del-node-modules.cjs +12 -12
  18. package/lib/del-node-modules.d.ts +1 -2
  19. package/lib/del-node-modules.js +11 -68
  20. package/lib/del-node-modules.mjs +3 -3
  21. package/lib/del-ps.cjs +13 -626
  22. package/lib/del-ps.d.ts +1 -2
  23. package/lib/del-ps.js +27 -702
  24. package/lib/del-ps.mjs +5 -8
  25. package/lib/del-yarn-caches.cjs +12 -12
  26. package/lib/del-yarn-caches.d.ts +1 -2
  27. package/lib/del-yarn-caches.js +6 -63
  28. package/lib/del-yarn-caches.mjs +3 -3
  29. package/lib/find-node-modules-cli.cjs +59 -0
  30. package/lib/find-node-modules-cli.d.mts +1 -0
  31. package/lib/find-node-modules-cli.d.ts +2 -0
  32. package/lib/find-node-modules-cli.js +3 -0
  33. package/lib/find-node-modules-cli.mjs +14 -0
  34. package/lib/find-node-modules.cjs +31 -9
  35. package/lib/find-node-modules.d.mts +9 -1
  36. package/lib/find-node-modules.d.ts +9 -2
  37. package/lib/find-node-modules.js +41 -12
  38. package/lib/find-node-modules.mjs +5 -19
  39. package/lib/git-diff.cjs +74 -0
  40. package/lib/git-diff.d.cts +2 -0
  41. package/lib/git-diff.d.mts +87 -0
  42. package/lib/git-diff.d.ts +87 -0
  43. package/lib/git-diff.mjs +83 -0
  44. package/lib/git-purge.cjs +13 -626
  45. package/lib/git-purge.d.ts +1 -2
  46. package/lib/git-purge.js +53 -698
  47. package/lib/git-purge.mjs +4 -7
  48. package/lib/index.cjs +91 -1
  49. package/lib/index.d.mts +1 -2
  50. package/lib/index.d.ts +2 -2
  51. package/lib/index.js +8 -2
  52. package/lib/index.mjs +12 -3
  53. package/lib/npm-run-series.d.ts +1 -0
  54. package/lib/npm-run-series.js +80 -56
  55. package/lib/npm-run-series.mjs +2 -2
  56. package/lib/package-resolutions.mjs +1 -1
  57. package/lib/ps/connected-domain.cjs +0 -0
  58. package/lib/ps/connected-domain.d.ts +1 -2
  59. package/lib/ps/connected-domain.js +196 -150
  60. package/lib/ps/connected-domain.mjs +3 -3
  61. package/lib/ps/index.cjs +0 -0
  62. package/lib/ps/index.d.mjs +2 -2
  63. package/lib/ps/index.d.ts +2 -26
  64. package/lib/ps/index.js +230 -535
  65. package/lib/ps/index.mjs +5 -5
  66. package/lib/ps/isWin.cjs +0 -0
  67. package/lib/ps/isWin.d.ts +1 -2
  68. package/lib/ps/isWin.js +1 -2
  69. package/lib/ps/isWin.mjs +3 -3
  70. package/lib/ps/table-parser.cjs +0 -0
  71. package/lib/ps/table-parser.d.ts +1 -3
  72. package/lib/ps/table-parser.js +254 -345
  73. package/lib/ps/table-parser.mjs +4 -4
  74. package/lib/submodule-install.cjs +118 -0
  75. package/lib/submodule-install.d.cts +2 -0
  76. package/lib/submodule-install.d.mts +141 -0
  77. package/lib/submodule-install.d.ts +141 -0
  78. package/lib/submodule-install.mjs +116 -0
  79. package/lib/utils.cjs +12 -12
  80. package/lib/utils.d.ts +4 -8
  81. package/lib/utils.js +43 -28
  82. package/lib/utils.mjs +3 -3
  83. package/lib/yarn-reinstall.cjs +42 -0
  84. package/lib/yarn-reinstall.d.cts +1 -0
  85. package/lib/yarn-reinstall.d.mts +45 -0
  86. package/lib/yarn-reinstall.d.ts +45 -0
  87. package/lib/yarn-reinstall.mjs +50 -0
  88. package/package.json +37 -39
  89. package/readme.md +174 -49
  90. package/eslint.config.cjs +0 -97
  91. package/lib/chunk-7MSZ52XC.mjs +0 -14
  92. package/lib/chunk-AVDT32AY.mjs +0 -20
  93. package/lib/chunk-S4SJ7SDW.mjs +0 -625
  94. package/lib/package-resolutions.js +0 -28
  95. package/lib/ps/index.d.js +0 -17
package/lib/git-purge.mjs CHANGED
@@ -1,20 +1,17 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import {
3
- require_dist
4
- } from "./chunk-S4SJ7SDW.mjs";
5
2
  import {
6
3
  require_utils
7
- } from "./chunk-LPLPQBYP.mjs";
4
+ } from "./chunk-OKYLF2MU.mjs";
8
5
  import {
9
6
  init_esm_shims
10
- } from "./chunk-7MSZ52XC.mjs";
7
+ } from "./chunk-VXZQNLPU.mjs";
11
8
  import {
12
9
  __require
13
- } from "./chunk-AVDT32AY.mjs";
10
+ } from "./chunk-FB6YIQYR.mjs";
14
11
 
15
12
  // src/git-purge.js
16
13
  init_esm_shims();
17
- var { spawnAsync } = require_dist();
14
+ var { spawnAsync } = __require("cross-spawn");
18
15
  var glob = __require("glob");
19
16
  var path = __require("path");
20
17
  var { delay } = require_utils();
package/lib/index.cjs CHANGED
@@ -1,2 +1,92 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __esm = (fn, res) => function __init() {
8
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
+ };
10
+ var __commonJS = (cb, mod) => function __require() {
11
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
+ };
13
+ var __export = (target, all) => {
14
+ for (var name in all)
15
+ __defProp(target, name, { get: all[name], enumerable: true });
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") {
19
+ for (let key of __getOwnPropNames(from))
20
+ if (!__hasOwnProp.call(to, key) && key !== except)
21
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
22
+ }
23
+ return to;
24
+ };
25
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
26
+ // If the importer is in node compatibility mode or this is not an ESM
27
+ // file that has been converted to a CommonJS file using a Babel-
28
+ // compatible transform (i.e. "__esModule" has not been set), then set
29
+ // "default" to the CommonJS "module.exports" for node compatibility.
30
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
31
+ mod
32
+ ));
33
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
+
35
+ // node_modules/tsup/assets/cjs_shims.js
36
+ var init_cjs_shims = __esm({
37
+ "node_modules/tsup/assets/cjs_shims.js"() {
38
+ }
39
+ });
40
+
41
+ // src/find-node-modules.js
42
+ var require_find_node_modules = __commonJS({
43
+ "src/find-node-modules.js"(exports2, module2) {
44
+ init_cjs_shims();
45
+ var glob = require("glob");
46
+ var path = require("path");
47
+ function findNodeModules2(dir = process.cwd(), callback = null) {
48
+ const finalDir = typeof dir === "string" ? dir : process.cwd();
49
+ return new Promise((resolve, reject) => {
50
+ const results = [];
51
+ const g3 = new glob.Glob("**/node_modules", {
52
+ withFileTypes: false,
53
+ cwd: finalDir,
54
+ ignore: ["**/.git*", "**/vendor/**"]
55
+ });
56
+ const stream = g3.stream();
57
+ stream.on("data", (result) => {
58
+ const fullPath = path.resolve(finalDir, result);
59
+ if (typeof callback === "function") {
60
+ try {
61
+ callback(fullPath);
62
+ } catch (err) {
63
+ console.error("findNodeModules callback error:", err);
64
+ }
65
+ }
66
+ results.push(fullPath);
67
+ });
68
+ stream.on("error", (err) => reject(err));
69
+ stream.on("end", () => {
70
+ if (results.length === 0) {
71
+ console.log("No node_modules directories found.");
72
+ }
73
+ resolve(results);
74
+ });
75
+ });
76
+ }
77
+ module2.exports = findNodeModules2;
78
+ }
79
+ });
80
+
1
81
  // src/index.ts
2
- console.log("binary-collections main script :P");
82
+ var index_exports = {};
83
+ __export(index_exports, {
84
+ findNodeModules: () => import_find_node_modules.default
85
+ });
86
+ module.exports = __toCommonJS(index_exports);
87
+ init_cjs_shims();
88
+ var import_find_node_modules = __toESM(require_find_node_modules());
89
+ // Annotate the CommonJS export names for ESM import in node:
90
+ 0 && (module.exports = {
91
+ findNodeModules
92
+ });
package/lib/index.d.mts CHANGED
@@ -1,2 +1 @@
1
-
2
- export { }
1
+ export { default as findNodeModules } from './find-node-modules.mjs';
package/lib/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
-
2
- export { }
1
+ import findNodeModules from "./find-node-modules";
2
+ export { findNodeModules };
package/lib/index.js CHANGED
@@ -1,2 +1,8 @@
1
- // src/index.ts
2
- console.log("binary-collections main script :P");
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.findNodeModules = void 0;
7
+ const find_node_modules_1 = __importDefault(require("./find-node-modules"));
8
+ exports.findNodeModules = find_node_modules_1.default;
package/lib/index.mjs CHANGED
@@ -1,9 +1,18 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ require_find_node_modules
4
+ } from "./chunk-BSD5CIRU.mjs";
2
5
  import {
3
6
  init_esm_shims
4
- } from "./chunk-7MSZ52XC.mjs";
5
- import "./chunk-AVDT32AY.mjs";
7
+ } from "./chunk-VXZQNLPU.mjs";
8
+ import {
9
+ __toESM
10
+ } from "./chunk-FB6YIQYR.mjs";
6
11
 
7
12
  // src/index.ts
8
13
  init_esm_shims();
9
- console.log("binary-collections main script :P");
14
+ var import_find_node_modules = __toESM(require_find_node_modules());
15
+ var export_findNodeModules = import_find_node_modules.default;
16
+ export {
17
+ export_findNodeModules as findNodeModules
18
+ };
@@ -1 +1,2 @@
1
1
  #!/usr/bin/env node
2
+ export {};
@@ -1,61 +1,85 @@
1
1
  #!/usr/bin/env node
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from === "object" || typeof from === "function") {
10
- for (let key of __getOwnPropNames(from))
11
- if (!__hasOwnProp.call(to, key) && key !== except)
12
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
- }
14
- return to;
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
15
43
  };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
- // If the importer is in node compatibility mode or this is not an ESM
18
- // file that has been converted to a CommonJS file using a Babel-
19
- // compatible transform (i.e. "__esModule" has not been set), then set
20
- // "default" to the CommonJS "module.exports" for node compatibility.
21
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
- mod
23
- ));
24
-
25
- // src/npm-run-series.js
26
- var fs = require("fs");
27
- var path = require("path");
28
- var { Minimatch } = require("minimatch");
29
- var args = require("minimist")(process.argv.slice(2));
30
- var cwd = process.cwd();
31
- var packagejson = path.join(cwd, "package.json");
32
- var verbose = args["v"] || args["verbose"];
33
- var usingYarn = args["yarn"];
34
- (async function npmRunSeries() {
35
- const { execa } = await import("execa");
36
- if (fs.existsSync(packagejson)) {
37
- const parse = JSON.parse(fs.readFileSync(packagejson, "utf-8"));
38
- if (parse !== null && typeof parse === "object") {
39
- if ("scripts" in parse) {
40
- const patterns = args._;
41
- const scripts = parse.scripts;
42
- const scriptNames = Object.keys(scripts);
43
- for (let i = 0; i < patterns.length; i++) {
44
- const pattern = patterns[i];
45
- const matcher = new Minimatch(pattern, { nonegate: true });
46
- for (let ii = 0; ii < scriptNames.length; ii++) {
47
- const scriptName = scriptNames[ii];
48
- const match = matcher.match(scriptName);
49
- if (verbose) console.log({ pattern, scriptName, match });
50
- if (match === true) {
51
- await execa(usingYarn ? "yarn" : "npm", ["run", scriptName], {
52
- cwd,
53
- stdio: "inherit"
54
- });
44
+ const fs = require("fs");
45
+ const path = require("path");
46
+ const { Minimatch } = require("minimatch");
47
+ const args = require("minimist")(process.argv.slice(2));
48
+ const cwd = process.cwd();
49
+ const packagejson = path.join(cwd, "package.json");
50
+ const verbose = args["v"] || args["verbose"];
51
+ const usingYarn = args["yarn"];
52
+ (function npmRunSeries() {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ const { execa } = yield Promise.resolve().then(() => __importStar(require("execa")));
55
+ if (fs.existsSync(packagejson)) {
56
+ /**
57
+ * @type {import('../package.json')}
58
+ */
59
+ const parse = JSON.parse(fs.readFileSync(packagejson, "utf-8"));
60
+ if (parse !== null && typeof parse === "object") {
61
+ if ("scripts" in parse) {
62
+ const patterns = args._;
63
+ const scripts = parse.scripts;
64
+ const scriptNames = Object.keys(scripts);
65
+ for (let i = 0; i < patterns.length; i++) {
66
+ const pattern = patterns[i];
67
+ const matcher = new Minimatch(pattern, { nonegate: true });
68
+ for (let ii = 0; ii < scriptNames.length; ii++) {
69
+ const scriptName = scriptNames[ii];
70
+ const match = matcher.match(scriptName);
71
+ if (verbose)
72
+ console.log({ pattern, scriptName, match });
73
+ if (match === true) {
74
+ yield execa(usingYarn ? "yarn" : "npm", ["run", scriptName], {
75
+ cwd,
76
+ stdio: "inherit"
77
+ });
78
+ }
79
+ }
80
+ }
81
+ }
55
82
  }
56
- }
57
83
  }
58
- }
59
- }
60
- }
84
+ });
61
85
  })();
@@ -2,10 +2,10 @@
2
2
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
3
3
  import {
4
4
  init_esm_shims
5
- } from "./chunk-7MSZ52XC.mjs";
5
+ } from "./chunk-VXZQNLPU.mjs";
6
6
  import {
7
7
  __require
8
- } from "./chunk-AVDT32AY.mjs";
8
+ } from "./chunk-FB6YIQYR.mjs";
9
9
 
10
10
  // src/npm-run-series.js
11
11
  init_esm_shims();
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- import "./chunk-AVDT32AY.mjs";
2
+ import "./chunk-FB6YIQYR.mjs";
3
3
 
4
4
  // src/package-resolutions.json
5
5
  var resolutions = {
File without changes
@@ -1,3 +1,2 @@
1
1
  declare function _exports(tdArray: any[], indicator: Function, hardlink: boolean): any;
2
-
3
- export { _exports as default };
2
+ export = _exports;