binary-collections 2.0.10 → 2.0.11

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 (165) hide show
  1. package/.puppeterrc.cjs +25 -0
  2. package/binaries/binary-executor.cjs +138 -3
  3. package/binaries/clean-nodemodule.cjs +138 -3
  4. package/binaries/clean-nodemodules.cjs +138 -3
  5. package/binaries/dev.cjs +138 -3
  6. package/binaries/empty.cjs +138 -3
  7. package/binaries/git-reduce-size.cjs +138 -3
  8. package/binaries/javakill.cjs +138 -3
  9. package/binaries/kill-night-crows.bat +7 -0
  10. package/binaries/kill-night-crows.ps1 +172 -0
  11. package/binaries/kill-process.cjs +138 -3
  12. package/binaries/nodekill.cjs +138 -3
  13. package/binaries/prod.cjs +138 -3
  14. package/binaries/py +111 -0
  15. package/binaries/py.cjs +178 -0
  16. package/binaries/py.cmd +49 -0
  17. package/binaries/rmfind.cjs +138 -3
  18. package/binaries/rmx.cjs +138 -3
  19. package/binaries/submodule-token.cjs +138 -3
  20. package/binaries/test-cjs +10 -0
  21. package/binaries/test-cjs.cjs +178 -0
  22. package/binaries/test-cjs.cmd +11 -0
  23. package/binaries/yarn-clean +32 -0
  24. package/binaries/yarn-clean.cjs +178 -0
  25. package/binaries/yarn-clean.cmd +30 -0
  26. package/binaries/yarn-clean.py +148 -0
  27. package/lib/binary-collections-config.cjs +1 -1
  28. package/lib/binary-collections-config.mjs +1 -1
  29. package/lib/binary-collections.cjs +167 -106
  30. package/lib/binary-collections.mjs +108 -94
  31. package/lib/changelog.cjs +61 -13
  32. package/lib/changelog.mjs +1 -1
  33. package/lib/{chunk-AI4CVPJ7.mjs → chunk-2CBJCW7E.mjs} +4 -4
  34. package/lib/chunk-34IQDTLZ.mjs +27 -0
  35. package/lib/chunk-3HFFECCI.mjs +27 -0
  36. package/lib/{chunk-SBNDSKG5.mjs → chunk-4UHL4WVN.mjs} +1 -1
  37. package/lib/chunk-7XTEJHOE.mjs +193 -0
  38. package/lib/chunk-AJDD5DZM.mjs +109 -0
  39. package/lib/chunk-BZWVHODJ.mjs +62 -0
  40. package/lib/{chunk-BEZKJ25G.mjs → chunk-FCDQGYBF.mjs} +5 -9
  41. package/lib/chunk-GEYA2USY.mjs +207 -0
  42. package/lib/chunk-ID2WBTE2.mjs +80 -0
  43. package/lib/chunk-JXFOHKDM.mjs +239 -0
  44. package/lib/{chunk-DI5MDPSN.mjs → chunk-N436BNBK.mjs} +192 -64
  45. package/lib/chunk-NCXAP7AA.mjs +31 -0
  46. package/lib/chunk-PDN26I7O.mjs +188 -0
  47. package/lib/{chunk-E6FDDAOO.mjs → chunk-RWLXRTYP.mjs} +1 -1
  48. package/lib/{chunk-BDCHCWHD.mjs → chunk-TOIVAQF7.mjs} +4 -4
  49. package/lib/chunk-V5SKYJUB.mjs +136 -0
  50. package/lib/{chunk-HMRMTYZM.mjs → chunk-WSRETQCA.mjs} +21 -2
  51. package/lib/chunk-XA3SNBPA.mjs +184 -0
  52. package/lib/chunk-YYLIQQKF.mjs +31 -0
  53. package/lib/{chunk-V3N3JEUF.mjs → chunk-Z6JLYU2J.mjs} +60 -13
  54. package/lib/{chunk-O6SWBEOQ.mjs → chunk-ZDMWBSYF.mjs} +2 -2
  55. package/lib/clean-github-actions-caches.cjs +63 -15
  56. package/lib/clean-github-actions-caches.mjs +3 -3
  57. package/lib/del-gradle.cjs +61 -13
  58. package/lib/del-gradle.js +1 -0
  59. package/lib/del-gradle.mjs +1 -1
  60. package/lib/del-node-modules.cjs +143 -148
  61. package/lib/del-node-modules.js +210 -14
  62. package/lib/del-node-modules.mjs +148 -17
  63. package/lib/del-ps.cjs +61 -13
  64. package/lib/del-ps.js +1 -0
  65. package/lib/del-ps.mjs +1 -1
  66. package/lib/del-yarn-caches.cjs +61 -13
  67. package/lib/del-yarn-caches.mjs +1 -1
  68. package/lib/find-node-modules-cli.js +1 -0
  69. package/lib/free-chatgpt.cjs +253 -47
  70. package/lib/free-chatgpt.mjs +2 -2
  71. package/lib/git/gitattributes.cjs +1 -0
  72. package/lib/git/gitattributes.d.cts +7 -2
  73. package/lib/git/gitattributes.mjs +1 -1
  74. package/lib/git/line-endings.cjs +2 -1
  75. package/lib/git/line-endings.mjs +2 -2
  76. package/lib/git/undo-commit-cli.cjs +110 -0
  77. package/lib/git/undo-commit-cli.d.ts +1 -0
  78. package/lib/git/undo-commit-cli.js +4 -0
  79. package/lib/git/undo-commit-cli.mjs +14 -0
  80. package/lib/git/undo-commit.cjs +81 -0
  81. package/lib/git/undo-commit.d.cts +1 -0
  82. package/lib/git/undo-commit.mjs +7 -0
  83. package/lib/git/undo-staged-cli.cjs +110 -0
  84. package/lib/git/undo-staged-cli.d.ts +1 -0
  85. package/lib/git/undo-staged-cli.js +4 -0
  86. package/lib/git/undo-staged-cli.mjs +14 -0
  87. package/lib/git/undo-staged.cjs +81 -0
  88. package/lib/git/undo-staged.d.cts +1 -0
  89. package/lib/git/undo-staged.mjs +7 -0
  90. package/lib/git/user-config.cjs +61 -14
  91. package/lib/git/user-config.mjs +2 -2
  92. package/lib/git-diff-cli.cjs +255 -49
  93. package/lib/git-diff-cli.d.ts +1 -0
  94. package/lib/git-diff-cli.js +1 -0
  95. package/lib/git-diff-cli.mjs +5 -4
  96. package/lib/git-diff.cjs +254 -49
  97. package/lib/git-diff.mjs +4 -4
  98. package/lib/git-fix.cjs +64 -16
  99. package/lib/git-fix.mjs +10 -10
  100. package/lib/git-purge.cjs +61 -13
  101. package/lib/git-purge.mjs +1 -1
  102. package/lib/kill-night-crows.cjs +87 -0
  103. package/lib/kill-night-crows.d.mts +1 -0
  104. package/lib/kill-night-crows.mjs +65 -0
  105. package/lib/npm-run-series.cjs +60 -13
  106. package/lib/npm-run-series.mjs +1 -1
  107. package/lib/package-resolutions-updater-cli.cjs +560 -0
  108. package/lib/package-resolutions-updater-cli.d.mts +1 -0
  109. package/lib/package-resolutions-updater-cli.mjs +124 -0
  110. package/lib/package-resolutions-updater.cjs +174 -154
  111. package/lib/package-resolutions-updater.d.mts +32 -1
  112. package/lib/package-resolutions-updater.mjs +16 -294
  113. package/lib/php-cs-fixer-staged.cjs +105 -0
  114. package/lib/php-cs-fixer-staged.d.cts +2 -0
  115. package/lib/php-cs-fixer-staged.mjs +117 -0
  116. package/lib/print-directory-tree.cjs +62 -14
  117. package/lib/print-directory-tree.mjs +2 -2
  118. package/lib/ps/connected-domain.d.ts +1 -1
  119. package/lib/ps/index.js +1 -0
  120. package/lib/remove-module.cjs +61 -13
  121. package/lib/remove-module.mjs +1 -1
  122. package/lib/rmpath.cjs +63 -15
  123. package/lib/rmpath.mjs +2 -2
  124. package/lib/submodule-install.cjs +62 -15
  125. package/lib/submodule-install.mjs +3 -3
  126. package/lib/submodule-remove-cli.cjs +5 -1
  127. package/lib/submodule-remove-cli.mjs +1 -1
  128. package/lib/submodule-remove.cjs +4 -1
  129. package/lib/submodule-remove.mjs +1 -1
  130. package/lib/utils/chatgpt.cjs +192 -34
  131. package/lib/utils/chatgpt.js +210 -43
  132. package/lib/utils/chatgpt.mjs +1 -1
  133. package/lib/utils/findEnvFiles.cjs +107 -0
  134. package/lib/utils/findEnvFiles.d.ts +8 -0
  135. package/lib/utils/findEnvFiles.js +121 -0
  136. package/lib/utils/findEnvFiles.mjs +8 -0
  137. package/lib/utils/findWorkspaceRoot.cjs +70 -0
  138. package/lib/utils/findWorkspaceRoot.d.ts +9 -0
  139. package/lib/utils/findWorkspaceRoot.js +57 -0
  140. package/lib/utils/findWorkspaceRoot.mjs +40 -0
  141. package/lib/utils/index.cjs +60 -13
  142. package/lib/utils/index.mjs +1 -1
  143. package/lib/utils/isGithubTokenValid.cjs +64 -0
  144. package/lib/utils/isGithubTokenValid.d.ts +7 -0
  145. package/lib/utils/isGithubTokenValid.js +48 -0
  146. package/lib/utils/isGithubTokenValid.mjs +36 -0
  147. package/lib/yarn-reinstall.cjs +61 -13
  148. package/lib/yarn-reinstall.mjs +1 -1
  149. package/package.json +107 -93
  150. package/readme.md +33 -34
  151. package/releases/readme.md +1 -1
  152. package/requirements.txt +1 -0
  153. package/lib/chunk-4EWQC6GZ.mjs +0 -382
  154. package/lib/chunk-4ZI7BQKQ.mjs +0 -381
  155. package/lib/chunk-5J2BEPY5.mjs +0 -83
  156. package/lib/chunk-AGZYRDC2.mjs +0 -323
  157. package/lib/chunk-HN52G2YL.mjs +0 -305
  158. package/lib/chunk-HO6GHCOB.mjs +0 -385
  159. package/lib/chunk-LEM5OMRP.mjs +0 -384
  160. package/lib/chunk-RCP7DHVY.mjs +0 -190
  161. package/lib/chunk-U6SO4QEV.mjs +0 -320
  162. package/lib/chunk-XD6BJK6Q.mjs +0 -351
  163. package/lib/chunk-YXSFGA2D.mjs +0 -383
  164. package/lib/git/gitattributes.d.ts +0 -33
  165. package/lib/git/gitattributes.js +0 -223
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -88,31 +89,78 @@ var require_utils = __commonJS({
88
89
  }
89
90
  module2.exports.getArgs = getArgs2;
90
91
  function del(fullPath) {
91
- if (fs2.statSync(fullPath).isDirectory()) {
92
- const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
93
- for (let i = 0; i < subdir.length; i++) {
94
- del(subdir[i]);
92
+ try {
93
+ if (!fs2.existsSync(fullPath)) return;
94
+ const stat = fs2.lstatSync(fullPath);
95
+ if (stat.isSymbolicLink()) {
96
+ try {
97
+ fs2.unlinkSync(fullPath);
98
+ console.log("deleted symlink", fullPath);
99
+ } catch (e) {
100
+ console.log("failed delete symlink", fullPath, e && e.message);
101
+ }
102
+ return;
103
+ }
104
+ if (stat.isDirectory()) {
105
+ const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
106
+ for (let i = 0; i < subdir.length; i++) {
107
+ del(subdir[i]);
108
+ }
109
+ try {
110
+ fs2.rmdirSync(fullPath);
111
+ console.log("deleted", fullPath);
112
+ } catch (e) {
113
+ try {
114
+ fs2.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
115
+ console.log("deleted", fullPath);
116
+ } catch (ee) {
117
+ console.log("failed delete", fullPath, ee && ee.message);
118
+ }
119
+ }
120
+ return;
95
121
  }
96
- } else {
97
122
  try {
98
- fs2.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
123
+ fs2.unlinkSync(fullPath);
99
124
  console.log("deleted", fullPath);
100
- } catch (_) {
101
- console.log("failed delete", fullPath);
125
+ } catch (e) {
126
+ try {
127
+ fs2.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
128
+ console.log("deleted", fullPath);
129
+ } catch (ee) {
130
+ console.log("failed delete", fullPath, ee && ee.message);
131
+ }
102
132
  }
133
+ } catch (err) {
134
+ console.log("failed delete", fullPath, err && err.message);
103
135
  }
104
136
  }
105
137
  module2.exports.del = del;
106
138
  function delStream(globStream) {
107
139
  globStream.stream().on("data", (result) => {
108
140
  const fullPath = path2.resolve(process.cwd(), result);
109
- if (fs2.statSync(fullPath).isDirectory()) {
110
- const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
111
- for (let i = 0; i < subdir.length; i++) {
112
- del(subdir[i]);
141
+ try {
142
+ if (fs2.existsSync(fullPath)) {
143
+ const stat = fs2.lstatSync(fullPath);
144
+ if (stat.isSymbolicLink()) {
145
+ try {
146
+ fs2.unlinkSync(fullPath);
147
+ console.log("deleted symlink", fullPath);
148
+ } catch (e) {
149
+ console.log("failed delete symlink", fullPath, e && e.message);
150
+ }
151
+ return;
152
+ }
153
+ if (stat.isDirectory()) {
154
+ const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
155
+ for (let i = 0; i < subdir.length; i++) {
156
+ del(subdir[i]);
157
+ }
158
+ }
113
159
  }
160
+ del(fullPath);
161
+ } catch (err) {
162
+ console.log("failed processing", fullPath, err && err.message);
114
163
  }
115
- del(fullPath);
116
164
  });
117
165
  }
118
166
  module2.exports.delStream = delStream;
@@ -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-V3N3JEUF.mjs";
4
+ } from "./chunk-Z6JLYU2J.mjs";
5
5
  import {
6
6
  __toESM,
7
7
  init_esm_shims
package/lib/rmpath.cjs CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -36,7 +37,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
36
37
  var getImportMetaUrl, importMetaUrl;
37
38
  var init_cjs_shims = __esm({
38
39
  "node_modules/tsup/assets/cjs_shims.js"() {
39
- getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
40
+ getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
40
41
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
41
42
  }
42
43
  });
@@ -96,31 +97,78 @@ var require_utils = __commonJS({
96
97
  }
97
98
  module2.exports.getArgs = getArgs2;
98
99
  function del(fullPath) {
99
- if (fs2.statSync(fullPath).isDirectory()) {
100
- const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
101
- for (let i = 0; i < subdir.length; i++) {
102
- del(subdir[i]);
100
+ try {
101
+ if (!fs2.existsSync(fullPath)) return;
102
+ const stat = fs2.lstatSync(fullPath);
103
+ if (stat.isSymbolicLink()) {
104
+ try {
105
+ fs2.unlinkSync(fullPath);
106
+ console.log("deleted symlink", fullPath);
107
+ } catch (e) {
108
+ console.log("failed delete symlink", fullPath, e && e.message);
109
+ }
110
+ return;
111
+ }
112
+ if (stat.isDirectory()) {
113
+ const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
114
+ for (let i = 0; i < subdir.length; i++) {
115
+ del(subdir[i]);
116
+ }
117
+ try {
118
+ fs2.rmdirSync(fullPath);
119
+ console.log("deleted", fullPath);
120
+ } catch (e) {
121
+ try {
122
+ fs2.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
123
+ console.log("deleted", fullPath);
124
+ } catch (ee) {
125
+ console.log("failed delete", fullPath, ee && ee.message);
126
+ }
127
+ }
128
+ return;
103
129
  }
104
- } else {
105
130
  try {
106
- fs2.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
131
+ fs2.unlinkSync(fullPath);
107
132
  console.log("deleted", fullPath);
108
- } catch (_) {
109
- console.log("failed delete", fullPath);
133
+ } catch (e) {
134
+ try {
135
+ fs2.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
136
+ console.log("deleted", fullPath);
137
+ } catch (ee) {
138
+ console.log("failed delete", fullPath, ee && ee.message);
139
+ }
110
140
  }
141
+ } catch (err) {
142
+ console.log("failed delete", fullPath, err && err.message);
111
143
  }
112
144
  }
113
145
  module2.exports.del = del;
114
146
  function delStream(globStream) {
115
147
  globStream.stream().on("data", (result) => {
116
148
  const fullPath = path2.resolve(process.cwd(), result);
117
- if (fs2.statSync(fullPath).isDirectory()) {
118
- const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
119
- for (let i = 0; i < subdir.length; i++) {
120
- del(subdir[i]);
149
+ try {
150
+ if (fs2.existsSync(fullPath)) {
151
+ const stat = fs2.lstatSync(fullPath);
152
+ if (stat.isSymbolicLink()) {
153
+ try {
154
+ fs2.unlinkSync(fullPath);
155
+ console.log("deleted symlink", fullPath);
156
+ } catch (e) {
157
+ console.log("failed delete symlink", fullPath, e && e.message);
158
+ }
159
+ return;
160
+ }
161
+ if (stat.isDirectory()) {
162
+ const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
163
+ for (let i = 0; i < subdir.length; i++) {
164
+ del(subdir[i]);
165
+ }
166
+ }
121
167
  }
168
+ del(fullPath);
169
+ } catch (err) {
170
+ console.log("failed processing", fullPath, err && err.message);
122
171
  }
123
- del(fullPath);
124
172
  });
125
173
  }
126
174
  module2.exports.delStream = delStream;
@@ -185,7 +233,7 @@ var __filename2 = (0, import_url.fileURLToPath)(importMetaUrl);
185
233
  var __dirname = import_upath.default.dirname(__filename2);
186
234
  var dotenvPath = import_upath.default.resolve(process.cwd(), ".env");
187
235
  if (import_fs_extra.default.existsSync(dotenvPath)) {
188
- import_dotenv.default.config({ path: dotenvPath });
236
+ import_dotenv.default.config({ path: dotenvPath, override: true, quiet: true });
189
237
  }
190
238
  var argv = (0, import_utils.getArgs)();
191
239
  var positional = argv._ || [];
package/lib/rmpath.mjs CHANGED
@@ -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-V3N3JEUF.mjs";
4
+ } from "./chunk-Z6JLYU2J.mjs";
5
5
  import {
6
6
  __require,
7
7
  __toESM,
@@ -20,7 +20,7 @@ var __filename = fileURLToPath(import.meta.url);
20
20
  var __dirname = path.dirname(__filename);
21
21
  var dotenvPath = path.resolve(process.cwd(), ".env");
22
22
  if (fs.existsSync(dotenvPath)) {
23
- dotenv.config({ path: dotenvPath });
23
+ dotenv.config({ path: dotenvPath, override: true, quiet: true });
24
24
  }
25
25
  var argv = (0, import_utils.getArgs)();
26
26
  var positional = argv._ || [];
@@ -68,31 +68,78 @@ var require_utils = __commonJS({
68
68
  }
69
69
  module2.exports.getArgs = getArgs2;
70
70
  function del(fullPath) {
71
- if (fs2.statSync(fullPath).isDirectory()) {
72
- const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
73
- for (let i = 0; i < subdir.length; i++) {
74
- del(subdir[i]);
71
+ try {
72
+ if (!fs2.existsSync(fullPath)) return;
73
+ const stat = fs2.lstatSync(fullPath);
74
+ if (stat.isSymbolicLink()) {
75
+ try {
76
+ fs2.unlinkSync(fullPath);
77
+ console.log("deleted symlink", fullPath);
78
+ } catch (e) {
79
+ console.log("failed delete symlink", fullPath, e && e.message);
80
+ }
81
+ return;
82
+ }
83
+ if (stat.isDirectory()) {
84
+ const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
85
+ for (let i = 0; i < subdir.length; i++) {
86
+ del(subdir[i]);
87
+ }
88
+ try {
89
+ fs2.rmdirSync(fullPath);
90
+ console.log("deleted", fullPath);
91
+ } catch (e) {
92
+ try {
93
+ fs2.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
94
+ console.log("deleted", fullPath);
95
+ } catch (ee) {
96
+ console.log("failed delete", fullPath, ee && ee.message);
97
+ }
98
+ }
99
+ return;
75
100
  }
76
- } else {
77
101
  try {
78
- fs2.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
102
+ fs2.unlinkSync(fullPath);
79
103
  console.log("deleted", fullPath);
80
- } catch (_) {
81
- console.log("failed delete", fullPath);
104
+ } catch (e) {
105
+ try {
106
+ fs2.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
107
+ console.log("deleted", fullPath);
108
+ } catch (ee) {
109
+ console.log("failed delete", fullPath, ee && ee.message);
110
+ }
82
111
  }
112
+ } catch (err) {
113
+ console.log("failed delete", fullPath, err && err.message);
83
114
  }
84
115
  }
85
116
  module2.exports.del = del;
86
117
  function delStream(globStream) {
87
118
  globStream.stream().on("data", (result) => {
88
119
  const fullPath = path2.resolve(process.cwd(), result);
89
- if (fs2.statSync(fullPath).isDirectory()) {
90
- const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
91
- for (let i = 0; i < subdir.length; i++) {
92
- del(subdir[i]);
120
+ try {
121
+ if (fs2.existsSync(fullPath)) {
122
+ const stat = fs2.lstatSync(fullPath);
123
+ if (stat.isSymbolicLink()) {
124
+ try {
125
+ fs2.unlinkSync(fullPath);
126
+ console.log("deleted symlink", fullPath);
127
+ } catch (e) {
128
+ console.log("failed delete symlink", fullPath, e && e.message);
129
+ }
130
+ return;
131
+ }
132
+ if (stat.isDirectory()) {
133
+ const subdir = fs2.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
134
+ for (let i = 0; i < subdir.length; i++) {
135
+ del(subdir[i]);
136
+ }
137
+ }
93
138
  }
139
+ del(fullPath);
140
+ } catch (err) {
141
+ console.log("failed processing", fullPath, err && err.message);
94
142
  }
95
- del(fullPath);
96
143
  });
97
144
  }
98
145
  module2.exports.delStream = delStream;
@@ -146,7 +193,7 @@ var fs = require("fs");
146
193
  var path = require("path");
147
194
  var dotenv = require("dotenv");
148
195
  var envPath = path.resolve(process.cwd(), ".env");
149
- if (fs.existsSync(envPath)) dotenv.config({ path: envPath });
196
+ if (fs.existsSync(envPath)) dotenv.config({ path: envPath, override: true, quiet: true });
150
197
  var { getArgs } = require_utils();
151
198
  var args = getArgs();
152
199
  var positional = args._ || [];
@@ -231,7 +278,7 @@ for (const line of submoduleList) {
231
278
  }
232
279
  const GIT_MODULES = path.join(RELATIVE_MODULE_PATH, ".gitmodules");
233
280
  if (ACCESS_TOKEN) {
234
- let URL_WITH_TOKEN = "";
281
+ let URL_WITH_TOKEN;
235
282
  let repoInfo;
236
283
  if (URL2.includes("github.com")) {
237
284
  repoInfo = URL2.replace("https://github.com/", "");
@@ -2,7 +2,7 @@
2
2
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
3
3
  import {
4
4
  require_utils
5
- } from "./chunk-V3N3JEUF.mjs";
5
+ } from "./chunk-Z6JLYU2J.mjs";
6
6
  import {
7
7
  __commonJS,
8
8
  __filename,
@@ -20,7 +20,7 @@ var require_submodule_install = __commonJS({
20
20
  var path = __require("path");
21
21
  var dotenv = __require("dotenv");
22
22
  var envPath = path.resolve(process.cwd(), ".env");
23
- if (fs.existsSync(envPath)) dotenv.config({ path: envPath });
23
+ if (fs.existsSync(envPath)) dotenv.config({ path: envPath, override: true, quiet: true });
24
24
  var { getArgs } = require_utils();
25
25
  var args = getArgs();
26
26
  var positional = args._ || [];
@@ -105,7 +105,7 @@ var require_submodule_install = __commonJS({
105
105
  }
106
106
  const GIT_MODULES = path.join(RELATIVE_MODULE_PATH, ".gitmodules");
107
107
  if (ACCESS_TOKEN) {
108
- let URL_WITH_TOKEN = "";
108
+ let URL_WITH_TOKEN;
109
109
  let repoInfo;
110
110
  if (URL.includes("github.com")) {
111
111
  repoInfo = URL.replace("https://github.com/", "");
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -41,7 +42,10 @@ var require_submodule_remove = __commonJS({
41
42
  var path2 = require("upath");
42
43
  var fs2 = require("fs-extra");
43
44
  var dotenv = require("dotenv");
44
- dotenv.config({ path: path2.resolve(process.cwd(), ".env") });
45
+ var envPath = path2.resolve(process.cwd(), ".env");
46
+ if (fs2.existsSync(envPath)) {
47
+ dotenv.config({ path: envPath, override: true, quiet: true });
48
+ }
45
49
  async function removeSubmodule2(submodulePath2) {
46
50
  try {
47
51
  await spawnAsync("git", ["submodule", "deinit", "-f", submodulePath2], { stdio: "inherit" });
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  require_submodule_remove
4
- } from "./chunk-6HHJRKFB.mjs";
4
+ } from "./chunk-BZWVHODJ.mjs";
5
5
  import {
6
6
  __toESM,
7
7
  init_esm_shims
@@ -3,7 +3,10 @@ var { spawnAsync } = require("cross-spawn");
3
3
  var path = require("upath");
4
4
  var fs = require("fs-extra");
5
5
  var dotenv = require("dotenv");
6
- dotenv.config({ path: path.resolve(process.cwd(), ".env") });
6
+ var envPath = path.resolve(process.cwd(), ".env");
7
+ if (fs.existsSync(envPath)) {
8
+ dotenv.config({ path: envPath, override: true, quiet: true });
9
+ }
7
10
  async function removeSubmodule(submodulePath) {
8
11
  try {
9
12
  await spawnAsync("git", ["submodule", "deinit", "-f", submodulePath], { stdio: "inherit" });
@@ -1,6 +1,6 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  require_submodule_remove
4
- } from "./chunk-6HHJRKFB.mjs";
4
+ } from "./chunk-BZWVHODJ.mjs";
5
5
  import "./chunk-QQ4A6DLD.mjs";
6
6
  export default require_submodule_remove();