binary-collections 2.0.6 → 2.0.8

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 (183) hide show
  1. package/bin/dir-tree.cmd +7 -0
  2. package/bin/git-diff +4 -0
  3. package/bin/git-diff.cmd +7 -0
  4. package/bin/{git-fix-encoding → git-fix} +1 -4
  5. package/bin/git-fix.cmd +7 -0
  6. package/bin/nodekill +0 -0
  7. package/bin/nodekill.cmd +0 -0
  8. package/bin/{submodule-install → submodule-install.txt} +0 -0
  9. package/bin/{submodule → submodule.txt} +0 -0
  10. package/lib/binary-collections-config.cjs +14 -0
  11. package/lib/binary-collections-config.d.mts +18 -0
  12. package/lib/binary-collections-config.d.ts +16 -0
  13. package/lib/binary-collections-config.js +39 -0
  14. package/lib/binary-collections-config.mjs +6 -0
  15. package/lib/binary-collections.cjs +105 -0
  16. package/lib/binary-collections.d.cts +2 -0
  17. package/lib/binary-collections.d.mts +121 -0
  18. package/lib/binary-collections.d.ts +121 -0
  19. package/lib/binary-collections.mjs +108 -0
  20. package/lib/chunk-4BYBVEYC.mjs +30 -0
  21. package/lib/chunk-AASHBCRW.mjs +57 -0
  22. package/lib/chunk-APBWENF6.mjs +135 -0
  23. package/lib/{chunk-M4IBUK4H.mjs → chunk-DPKAJKFO.mjs} +2 -4
  24. package/lib/chunk-EGSSKVDH.mjs +66 -0
  25. package/lib/{chunk-GA4DDV65.mjs → chunk-G3THLIDT.mjs} +3 -5
  26. package/lib/chunk-JGR2NW6D.mjs +187 -0
  27. package/lib/chunk-ONIBBBQ3.mjs +108 -0
  28. package/lib/chunk-SH3L6HHV.mjs +27 -0
  29. package/lib/chunk-VVEZVNIV.mjs +81 -0
  30. package/lib/{chunk-E75HJFJO.mjs → chunk-W3ENOM53.mjs} +2 -4
  31. package/lib/chunk-YV7DO3YV.mjs +48 -0
  32. package/lib/chunk-YX5U7XDR.mjs +58 -0
  33. package/lib/chunk-ZYAQRPUL.mjs +28 -0
  34. package/lib/clean-github-actions-caches.cjs +162 -0
  35. package/lib/clean-github-actions-caches.d.cts +1 -0
  36. package/lib/clean-github-actions-caches.d.mts +169 -0
  37. package/lib/clean-github-actions-caches.d.ts +169 -0
  38. package/lib/clean-github-actions-caches.mjs +132 -0
  39. package/lib/del-gradle.cjs +99 -15
  40. package/lib/del-gradle.d.ts +1 -2
  41. package/lib/del-gradle.js +12 -69
  42. package/lib/del-gradle.mjs +4 -6
  43. package/lib/del-node-modules.cjs +98 -14
  44. package/lib/del-node-modules.d.ts +1 -2
  45. package/lib/del-node-modules.js +11 -68
  46. package/lib/del-node-modules.mjs +3 -5
  47. package/lib/del-ps.cjs +98 -627
  48. package/lib/del-ps.d.ts +1 -2
  49. package/lib/del-ps.js +27 -702
  50. package/lib/del-ps.mjs +7 -12
  51. package/lib/del-yarn-caches.cjs +98 -14
  52. package/lib/del-yarn-caches.d.ts +1 -2
  53. package/lib/del-yarn-caches.js +6 -63
  54. package/lib/del-yarn-caches.mjs +3 -5
  55. package/lib/find-node-modules-cli.cjs +67 -0
  56. package/lib/find-node-modules-cli.d.mts +1 -0
  57. package/lib/find-node-modules-cli.d.ts +2 -0
  58. package/lib/find-node-modules-cli.js +3 -0
  59. package/lib/find-node-modules-cli.mjs +13 -0
  60. package/lib/find-node-modules.cjs +39 -9
  61. package/lib/find-node-modules.d.mts +12 -1
  62. package/lib/find-node-modules.d.ts +12 -2
  63. package/lib/find-node-modules.js +53 -12
  64. package/lib/find-node-modules.mjs +4 -19
  65. package/lib/git/gitattributes.cjs +171 -0
  66. package/lib/git/gitattributes.d.mts +35 -0
  67. package/lib/git/gitattributes.d.ts +33 -0
  68. package/lib/git/gitattributes.js +223 -0
  69. package/lib/git/gitattributes.mjs +6 -0
  70. package/lib/git/line-endings.cjs +74 -0
  71. package/lib/git/line-endings.d.cts +7 -0
  72. package/lib/git/line-endings.d.mts +83 -0
  73. package/lib/git/line-endings.d.ts +83 -0
  74. package/lib/git/line-endings.mjs +8 -0
  75. package/lib/git/normalize.cjs +42 -0
  76. package/lib/git/normalize.d.cts +6 -0
  77. package/lib/git/normalize.d.mts +43 -0
  78. package/lib/git/normalize.d.ts +43 -0
  79. package/lib/git/normalize.mjs +6 -0
  80. package/lib/git/permissions.cjs +15 -0
  81. package/lib/git/permissions.d.cts +6 -0
  82. package/lib/git/permissions.d.mts +17 -0
  83. package/lib/git/permissions.d.ts +17 -0
  84. package/lib/git/permissions.mjs +7 -0
  85. package/lib/git/pull-strategy.cjs +13 -0
  86. package/lib/git/pull-strategy.d.cts +5 -0
  87. package/lib/git/pull-strategy.d.mts +15 -0
  88. package/lib/git/pull-strategy.d.ts +15 -0
  89. package/lib/git/pull-strategy.mjs +7 -0
  90. package/lib/git/user-config.cjs +100 -0
  91. package/lib/git/user-config.d.cts +10 -0
  92. package/lib/git/user-config.d.mts +105 -0
  93. package/lib/git/user-config.d.ts +105 -0
  94. package/lib/git/user-config.mjs +8 -0
  95. package/lib/git/utils.cjs +70 -0
  96. package/lib/git/utils.d.cts +20 -0
  97. package/lib/git/utils.d.mts +69 -0
  98. package/lib/git/utils.d.ts +69 -0
  99. package/lib/git/utils.mjs +6 -0
  100. package/lib/git-diff.cjs +73 -0
  101. package/lib/git-diff.d.cts +2 -0
  102. package/lib/git-diff.d.mts +84 -0
  103. package/lib/git-diff.d.ts +84 -0
  104. package/lib/git-diff.mjs +88 -0
  105. package/lib/git-fix.cjs +129 -0
  106. package/lib/git-fix.d.cts +2 -0
  107. package/lib/git-fix.d.mts +141 -0
  108. package/lib/git-fix.d.ts +141 -0
  109. package/lib/git-fix.mjs +151 -0
  110. package/lib/git-purge.cjs +92 -621
  111. package/lib/git-purge.d.ts +1 -2
  112. package/lib/git-purge.js +53 -698
  113. package/lib/git-purge.mjs +4 -9
  114. package/lib/index.cjs +99 -1
  115. package/lib/index.d.mts +1 -2
  116. package/lib/index.d.ts +2 -2
  117. package/lib/index.js +8 -2
  118. package/lib/index.mjs +10 -3
  119. package/lib/npm-run-series.cjs +140 -1
  120. package/lib/npm-run-series.d.ts +1 -0
  121. package/lib/npm-run-series.js +81 -56
  122. package/lib/npm-run-series.mjs +7 -5
  123. package/lib/package-resolutions-updater.cjs +274 -0
  124. package/lib/package-resolutions-updater.d.mts +1 -0
  125. package/lib/package-resolutions-updater.d.ts +326 -0
  126. package/lib/package-resolutions-updater.mjs +316 -0
  127. package/lib/print-directory-tree.cjs +241 -0
  128. package/lib/print-directory-tree.d.cts +1 -0
  129. package/lib/print-directory-tree.d.mts +234 -0
  130. package/lib/print-directory-tree.d.ts +234 -0
  131. package/lib/print-directory-tree.mjs +182 -0
  132. package/lib/ps/connected-domain.cjs +0 -0
  133. package/lib/ps/connected-domain.d.ts +1 -2
  134. package/lib/ps/connected-domain.js +196 -150
  135. package/lib/ps/connected-domain.mjs +2 -3
  136. package/lib/ps/index.cjs +3 -3
  137. package/lib/ps/index.d.mjs +1 -2
  138. package/lib/ps/index.d.ts +2 -26
  139. package/lib/ps/index.js +233 -535
  140. package/lib/ps/index.mjs +9 -11
  141. package/lib/ps/isWin.cjs +0 -0
  142. package/lib/ps/isWin.d.ts +1 -2
  143. package/lib/ps/isWin.js +1 -2
  144. package/lib/ps/isWin.mjs +2 -3
  145. package/lib/ps/table-parser.cjs +0 -0
  146. package/lib/ps/table-parser.d.ts +1 -3
  147. package/lib/ps/table-parser.js +254 -345
  148. package/lib/ps/table-parser.mjs +3 -4
  149. package/lib/submodule-install.cjs +100 -0
  150. package/lib/submodule-install.d.cts +2 -0
  151. package/lib/submodule-install.d.mts +121 -0
  152. package/lib/submodule-install.d.ts +121 -0
  153. package/lib/submodule-install.mjs +107 -0
  154. package/lib/utils.cjs +98 -14
  155. package/lib/utils.d.mts +29 -9
  156. package/lib/utils.d.ts +30 -14
  157. package/lib/utils.js +173 -27
  158. package/lib/utils.mjs +2 -3
  159. package/lib/yarn-reinstall.cjs +44 -0
  160. package/lib/yarn-reinstall.d.cts +1 -0
  161. package/lib/yarn-reinstall.d.mts +49 -0
  162. package/lib/yarn-reinstall.d.ts +49 -0
  163. package/lib/yarn-reinstall.mjs +54 -0
  164. package/package.json +126 -99
  165. package/readme.md +238 -50
  166. package/src/package-resolutions-updater.mjs +325 -0
  167. package/src/print-directory-tree.cjs +234 -0
  168. package/src/ps/index.js +4 -3
  169. package/src/yarn-reinstall.cjs +49 -0
  170. package/test-project/package.json +16 -0
  171. package/tmp/test-repo/package.json +7 -0
  172. package/bin/git-fix-encoding.cmd +0 -6
  173. package/eslint.config.cjs +0 -97
  174. package/lib/chunk-7MSZ52XC.mjs +0 -14
  175. package/lib/chunk-AVDT32AY.mjs +0 -20
  176. package/lib/chunk-LPLPQBYP.mjs +0 -53
  177. package/lib/chunk-S4SJ7SDW.mjs +0 -625
  178. package/lib/package-resolutions.cjs +0 -28
  179. package/lib/package-resolutions.d.mts +0 -25
  180. package/lib/package-resolutions.d.ts +0 -25
  181. package/lib/package-resolutions.js +0 -28
  182. package/lib/package-resolutions.mjs +0 -31
  183. package/lib/ps/index.d.js +0 -17
package/lib/git-purge.mjs CHANGED
@@ -1,20 +1,15 @@
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-APBWENF6.mjs";
8
5
  import {
6
+ __require,
9
7
  init_esm_shims
10
- } from "./chunk-7MSZ52XC.mjs";
11
- import {
12
- __require
13
- } from "./chunk-AVDT32AY.mjs";
8
+ } from "./chunk-AASHBCRW.mjs";
14
9
 
15
10
  // src/git-purge.js
16
11
  init_esm_shims();
17
- var { spawnAsync } = require_dist();
12
+ var { spawnAsync } = __require("cross-spawn");
18
13
  var glob = __require("glob");
19
14
  var path = __require("path");
20
15
  var { delay } = require_utils();
package/lib/index.cjs CHANGED
@@ -1,2 +1,100 @@
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
+ if (typeof module2 !== "undefined" && require.main === module2) {
78
+ findNodeModules2(null, console.log).then((dirs) => {
79
+ console.log(`Found ${dirs.length} node_modules directories.`);
80
+ }).catch((err) => {
81
+ console.error("Error finding node_modules directories:", err);
82
+ });
83
+ }
84
+ module2.exports = findNodeModules2;
85
+ module2.exports.default = findNodeModules2;
86
+ }
87
+ });
88
+
1
89
  // src/index.ts
2
- console.log("binary-collections main script :P");
90
+ var index_exports = {};
91
+ __export(index_exports, {
92
+ findNodeModules: () => import_find_node_modules.default
93
+ });
94
+ module.exports = __toCommonJS(index_exports);
95
+ init_cjs_shims();
96
+ var import_find_node_modules = __toESM(require_find_node_modules());
97
+ // Annotate the CommonJS export names for ESM import in node:
98
+ 0 && (module.exports = {
99
+ findNodeModules
100
+ });
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,16 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
2
  import {
3
+ require_find_node_modules
4
+ } from "./chunk-YX5U7XDR.mjs";
5
+ import {
6
+ __toESM,
3
7
  init_esm_shims
4
- } from "./chunk-7MSZ52XC.mjs";
5
- import "./chunk-AVDT32AY.mjs";
8
+ } from "./chunk-AASHBCRW.mjs";
6
9
 
7
10
  // src/index.ts
8
11
  init_esm_shims();
9
- console.log("binary-collections main script :P");
12
+ var import_find_node_modules = __toESM(require_find_node_modules());
13
+ var export_findNodeModules = import_find_node_modules.default;
14
+ export {
15
+ export_findNodeModules as findNodeModules
16
+ };
@@ -5,6 +5,12 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
11
+ var __commonJS = (cb, mod) => function __require() {
12
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
+ };
8
14
  var __copyProps = (to, from, except, desc) => {
9
15
  if (from && typeof from === "object" || typeof from === "function") {
10
16
  for (let key of __getOwnPropNames(from))
@@ -22,11 +28,144 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
22
28
  mod
23
29
  ));
24
30
 
31
+ // node_modules/tsup/assets/cjs_shims.js
32
+ var init_cjs_shims = __esm({
33
+ "node_modules/tsup/assets/cjs_shims.js"() {
34
+ }
35
+ });
36
+
37
+ // src/utils.js
38
+ var require_utils = __commonJS({
39
+ "src/utils.js"(exports2, module2) {
40
+ init_cjs_shims();
41
+ var fs2 = require("fs");
42
+ var path2 = require("upath");
43
+ var argv = require("minimist")(process.argv.slice(2));
44
+ var { exec } = require("child_process");
45
+ var { URL: URL2 } = require("url");
46
+ var { promisify } = require("util");
47
+ var execAsync = promisify(exec);
48
+ async function parseGitRemotes() {
49
+ try {
50
+ const { stdout } = await execAsync("git remote -v");
51
+ const lines = stdout.split("\n");
52
+ const remotes = {};
53
+ lines.forEach((line) => {
54
+ const [name, url] = line.split(" ");
55
+ if (name && url) {
56
+ const [repoUrl] = url.split(" ");
57
+ try {
58
+ const parsedUrl = new URL2(repoUrl);
59
+ const pathParts = parsedUrl.pathname.split("/").filter(Boolean);
60
+ if (parsedUrl.hostname === "github.com" && pathParts.length === 2) {
61
+ let repoPath = pathParts.join("/");
62
+ if (repoPath.endsWith(".git")) {
63
+ repoPath = repoPath.slice(0, -4);
64
+ }
65
+ remotes[name] = repoPath;
66
+ }
67
+ } catch (e) {
68
+ console.error("URL Parsing Error:", e.message);
69
+ }
70
+ }
71
+ });
72
+ return remotes;
73
+ } catch (error) {
74
+ console.error("Error:", error.message);
75
+ return {};
76
+ }
77
+ }
78
+ module2.exports.parseGitRemotes = parseGitRemotes;
79
+ function joinPathPreserveDriveLetter(...segments) {
80
+ let fullPath = require("path").join(...segments);
81
+ if (/^[a-z]:\\/.test(fullPath)) {
82
+ fullPath = fullPath.charAt(0).toUpperCase() + fullPath.slice(1);
83
+ }
84
+ return fullPath;
85
+ }
86
+ module2.exports.joinPathPreserveDriveLetter = joinPathPreserveDriveLetter;
87
+ function getArgs2() {
88
+ return argv;
89
+ }
90
+ module2.exports.getArgs = getArgs2;
91
+ function del(fullPath) {
92
+ if (fs2.statSync(fullPath).isDirectory()) {
93
+ const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
94
+ for (let i = 0; i < subdir.length; i++) {
95
+ del(subdir[i]);
96
+ }
97
+ } else {
98
+ try {
99
+ fs2.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
100
+ console.log("deleted", fullPath);
101
+ } catch (_) {
102
+ console.log("failed delete", fullPath);
103
+ }
104
+ }
105
+ }
106
+ module2.exports.del = del;
107
+ function delStream(globStream) {
108
+ globStream.stream().on("data", (result) => {
109
+ const fullPath = path2.resolve(process.cwd(), result);
110
+ if (fs2.statSync(fullPath).isDirectory()) {
111
+ const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
112
+ for (let i = 0; i < subdir.length; i++) {
113
+ del(subdir[i]);
114
+ }
115
+ }
116
+ del(fullPath);
117
+ });
118
+ }
119
+ module2.exports.delStream = delStream;
120
+ function getFileTreeString(hashArray) {
121
+ const tree = {};
122
+ const hashMap = {};
123
+ for (const entry of hashArray) {
124
+ const [filePath, hash] = entry.split(" ");
125
+ hashMap[filePath] = hash;
126
+ const parts = filePath.split("/");
127
+ let current = tree;
128
+ for (let i = 0; i < parts.length; i++) {
129
+ const part = parts[i];
130
+ if (i === parts.length - 1) {
131
+ current[part] = null;
132
+ } else {
133
+ current[part] = current[part] || {};
134
+ current = current[part];
135
+ }
136
+ }
137
+ }
138
+ function printNode(node, prefix = "", parentPath = "") {
139
+ const keys = Object.keys(node).sort();
140
+ let lines = [];
141
+ keys.forEach((key, idx) => {
142
+ const isLast = idx === keys.length - 1;
143
+ const branch = isLast ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
144
+ const currentPath = parentPath ? parentPath + "/" + key : key;
145
+ if (node[key] === null) {
146
+ lines.push(prefix + branch + key + " [" + (hashMap[currentPath] || "") + "]");
147
+ } else {
148
+ lines.push(prefix + branch + key + "/");
149
+ lines = lines.concat(printNode(node[key], prefix + (isLast ? " " : "\u2502 "), currentPath));
150
+ }
151
+ });
152
+ return lines;
153
+ }
154
+ return printNode(tree, "", "").join("\n");
155
+ }
156
+ module2.exports.getFileTreeString = getFileTreeString;
157
+ var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
158
+ module2.exports.delay = delay;
159
+ }
160
+ });
161
+
25
162
  // src/npm-run-series.js
163
+ init_cjs_shims();
26
164
  var fs = require("fs");
27
165
  var path = require("path");
28
166
  var { Minimatch } = require("minimatch");
29
- var args = require("minimist")(process.argv.slice(2));
167
+ var { getArgs } = require_utils();
168
+ var args = getArgs();
30
169
  var cwd = process.cwd();
31
170
  var packagejson = path.join(cwd, "package.json");
32
171
  var verbose = args["v"] || args["verbose"];
@@ -1 +1,2 @@
1
1
  #!/usr/bin/env node
2
+ export {};
@@ -1,61 +1,86 @@
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 { getArgs } = require("./utils.js");
48
+ const args = getArgs();
49
+ const cwd = process.cwd();
50
+ const packagejson = path.join(cwd, "package.json");
51
+ const verbose = args["v"] || args["verbose"];
52
+ const usingYarn = args["yarn"];
53
+ (function npmRunSeries() {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ const { execa } = yield Promise.resolve().then(() => __importStar(require("execa")));
56
+ if (fs.existsSync(packagejson)) {
57
+ /**
58
+ * @type {import('../package.json')}
59
+ */
60
+ const parse = JSON.parse(fs.readFileSync(packagejson, "utf-8"));
61
+ if (parse !== null && typeof parse === "object") {
62
+ if ("scripts" in parse) {
63
+ const patterns = args._;
64
+ const scripts = parse.scripts;
65
+ const scriptNames = Object.keys(scripts);
66
+ for (let i = 0; i < patterns.length; i++) {
67
+ const pattern = patterns[i];
68
+ const matcher = new Minimatch(pattern, { nonegate: true });
69
+ for (let ii = 0; ii < scriptNames.length; ii++) {
70
+ const scriptName = scriptNames[ii];
71
+ const match = matcher.match(scriptName);
72
+ if (verbose)
73
+ console.log({ pattern, scriptName, match });
74
+ if (match === true) {
75
+ yield execa(usingYarn ? "yarn" : "npm", ["run", scriptName], {
76
+ cwd,
77
+ stdio: "inherit"
78
+ });
79
+ }
80
+ }
81
+ }
82
+ }
55
83
  }
56
- }
57
84
  }
58
- }
59
- }
60
- }
85
+ });
61
86
  })();
@@ -1,18 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
3
3
  import {
4
- init_esm_shims
5
- } from "./chunk-7MSZ52XC.mjs";
4
+ require_utils
5
+ } from "./chunk-APBWENF6.mjs";
6
6
  import {
7
- __require
8
- } from "./chunk-AVDT32AY.mjs";
7
+ __require,
8
+ init_esm_shims
9
+ } from "./chunk-AASHBCRW.mjs";
9
10
 
10
11
  // src/npm-run-series.js
11
12
  init_esm_shims();
12
13
  var fs = __require("fs");
13
14
  var path = __require("path");
14
15
  var { Minimatch } = __require("minimatch");
15
- var args = __require("minimist")(process.argv.slice(2));
16
+ var { getArgs } = require_utils();
17
+ var args = getArgs();
16
18
  var cwd = process.cwd();
17
19
  var packagejson = path.join(cwd, "package.json");
18
20
  var verbose = args["v"] || args["verbose"];