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.
- package/.puppeterrc.cjs +25 -0
- package/binaries/binary-executor.cjs +138 -3
- package/binaries/clean-nodemodule.cjs +138 -3
- package/binaries/clean-nodemodules.cjs +138 -3
- package/binaries/dev.cjs +138 -3
- package/binaries/empty.cjs +138 -3
- package/binaries/git-reduce-size.cjs +138 -3
- package/binaries/javakill.cjs +138 -3
- package/binaries/kill-night-crows.bat +7 -0
- package/binaries/kill-night-crows.ps1 +172 -0
- package/binaries/kill-process.cjs +138 -3
- package/binaries/nodekill.cjs +138 -3
- package/binaries/prod.cjs +138 -3
- package/binaries/py +111 -0
- package/binaries/py.cjs +178 -0
- package/binaries/py.cmd +49 -0
- package/binaries/rmfind.cjs +138 -3
- package/binaries/rmx.cjs +138 -3
- package/binaries/submodule-token.cjs +138 -3
- package/binaries/test-cjs +10 -0
- package/binaries/test-cjs.cjs +178 -0
- package/binaries/test-cjs.cmd +11 -0
- package/binaries/yarn-clean +32 -0
- package/binaries/yarn-clean.cjs +178 -0
- package/binaries/yarn-clean.cmd +30 -0
- package/binaries/yarn-clean.py +148 -0
- package/lib/binary-collections-config.cjs +1 -1
- package/lib/binary-collections-config.mjs +1 -1
- package/lib/binary-collections.cjs +167 -106
- package/lib/binary-collections.mjs +108 -94
- package/lib/changelog.cjs +61 -13
- package/lib/changelog.mjs +1 -1
- package/lib/{chunk-AI4CVPJ7.mjs → chunk-2CBJCW7E.mjs} +4 -4
- package/lib/chunk-34IQDTLZ.mjs +27 -0
- package/lib/chunk-3HFFECCI.mjs +27 -0
- package/lib/{chunk-SBNDSKG5.mjs → chunk-4UHL4WVN.mjs} +1 -1
- package/lib/chunk-7XTEJHOE.mjs +193 -0
- package/lib/chunk-AJDD5DZM.mjs +109 -0
- package/lib/chunk-BZWVHODJ.mjs +62 -0
- package/lib/{chunk-BEZKJ25G.mjs → chunk-FCDQGYBF.mjs} +5 -9
- package/lib/chunk-GEYA2USY.mjs +207 -0
- package/lib/chunk-ID2WBTE2.mjs +80 -0
- package/lib/chunk-JXFOHKDM.mjs +239 -0
- package/lib/{chunk-DI5MDPSN.mjs → chunk-N436BNBK.mjs} +192 -64
- package/lib/chunk-NCXAP7AA.mjs +31 -0
- package/lib/chunk-PDN26I7O.mjs +188 -0
- package/lib/{chunk-E6FDDAOO.mjs → chunk-RWLXRTYP.mjs} +1 -1
- package/lib/{chunk-BDCHCWHD.mjs → chunk-TOIVAQF7.mjs} +4 -4
- package/lib/chunk-V5SKYJUB.mjs +136 -0
- package/lib/{chunk-HMRMTYZM.mjs → chunk-WSRETQCA.mjs} +21 -2
- package/lib/chunk-XA3SNBPA.mjs +184 -0
- package/lib/chunk-YYLIQQKF.mjs +31 -0
- package/lib/{chunk-V3N3JEUF.mjs → chunk-Z6JLYU2J.mjs} +60 -13
- package/lib/{chunk-O6SWBEOQ.mjs → chunk-ZDMWBSYF.mjs} +2 -2
- package/lib/clean-github-actions-caches.cjs +63 -15
- package/lib/clean-github-actions-caches.mjs +3 -3
- package/lib/del-gradle.cjs +61 -13
- package/lib/del-gradle.js +1 -0
- package/lib/del-gradle.mjs +1 -1
- package/lib/del-node-modules.cjs +143 -148
- package/lib/del-node-modules.js +210 -14
- package/lib/del-node-modules.mjs +148 -17
- package/lib/del-ps.cjs +61 -13
- package/lib/del-ps.js +1 -0
- package/lib/del-ps.mjs +1 -1
- package/lib/del-yarn-caches.cjs +61 -13
- package/lib/del-yarn-caches.mjs +1 -1
- package/lib/find-node-modules-cli.js +1 -0
- package/lib/free-chatgpt.cjs +253 -47
- package/lib/free-chatgpt.mjs +2 -2
- package/lib/git/gitattributes.cjs +1 -0
- package/lib/git/gitattributes.d.cts +7 -2
- package/lib/git/gitattributes.mjs +1 -1
- package/lib/git/line-endings.cjs +2 -1
- package/lib/git/line-endings.mjs +2 -2
- package/lib/git/undo-commit-cli.cjs +110 -0
- package/lib/git/undo-commit-cli.d.ts +1 -0
- package/lib/git/undo-commit-cli.js +4 -0
- package/lib/git/undo-commit-cli.mjs +14 -0
- package/lib/git/undo-commit.cjs +81 -0
- package/lib/git/undo-commit.d.cts +1 -0
- package/lib/git/undo-commit.mjs +7 -0
- package/lib/git/undo-staged-cli.cjs +110 -0
- package/lib/git/undo-staged-cli.d.ts +1 -0
- package/lib/git/undo-staged-cli.js +4 -0
- package/lib/git/undo-staged-cli.mjs +14 -0
- package/lib/git/undo-staged.cjs +81 -0
- package/lib/git/undo-staged.d.cts +1 -0
- package/lib/git/undo-staged.mjs +7 -0
- package/lib/git/user-config.cjs +61 -14
- package/lib/git/user-config.mjs +2 -2
- package/lib/git-diff-cli.cjs +255 -49
- package/lib/git-diff-cli.d.ts +1 -0
- package/lib/git-diff-cli.js +1 -0
- package/lib/git-diff-cli.mjs +5 -4
- package/lib/git-diff.cjs +254 -49
- package/lib/git-diff.mjs +4 -4
- package/lib/git-fix.cjs +64 -16
- package/lib/git-fix.mjs +10 -10
- package/lib/git-purge.cjs +61 -13
- package/lib/git-purge.mjs +1 -1
- package/lib/kill-night-crows.cjs +87 -0
- package/lib/kill-night-crows.d.mts +1 -0
- package/lib/kill-night-crows.mjs +65 -0
- package/lib/npm-run-series.cjs +60 -13
- package/lib/npm-run-series.mjs +1 -1
- package/lib/package-resolutions-updater-cli.cjs +560 -0
- package/lib/package-resolutions-updater-cli.d.mts +1 -0
- package/lib/package-resolutions-updater-cli.mjs +124 -0
- package/lib/package-resolutions-updater.cjs +174 -154
- package/lib/package-resolutions-updater.d.mts +32 -1
- package/lib/package-resolutions-updater.mjs +16 -294
- package/lib/php-cs-fixer-staged.cjs +105 -0
- package/lib/php-cs-fixer-staged.d.cts +2 -0
- package/lib/php-cs-fixer-staged.mjs +117 -0
- package/lib/print-directory-tree.cjs +62 -14
- package/lib/print-directory-tree.mjs +2 -2
- package/lib/ps/connected-domain.d.ts +1 -1
- package/lib/ps/index.js +1 -0
- package/lib/remove-module.cjs +61 -13
- package/lib/remove-module.mjs +1 -1
- package/lib/rmpath.cjs +63 -15
- package/lib/rmpath.mjs +2 -2
- package/lib/submodule-install.cjs +62 -15
- package/lib/submodule-install.mjs +3 -3
- package/lib/submodule-remove-cli.cjs +5 -1
- package/lib/submodule-remove-cli.mjs +1 -1
- package/lib/submodule-remove.cjs +4 -1
- package/lib/submodule-remove.mjs +1 -1
- package/lib/utils/chatgpt.cjs +192 -34
- package/lib/utils/chatgpt.js +210 -43
- package/lib/utils/chatgpt.mjs +1 -1
- package/lib/utils/findEnvFiles.cjs +107 -0
- package/lib/utils/findEnvFiles.d.ts +8 -0
- package/lib/utils/findEnvFiles.js +121 -0
- package/lib/utils/findEnvFiles.mjs +8 -0
- package/lib/utils/findWorkspaceRoot.cjs +70 -0
- package/lib/utils/findWorkspaceRoot.d.ts +9 -0
- package/lib/utils/findWorkspaceRoot.js +57 -0
- package/lib/utils/findWorkspaceRoot.mjs +40 -0
- package/lib/utils/index.cjs +60 -13
- package/lib/utils/index.mjs +1 -1
- package/lib/utils/isGithubTokenValid.cjs +64 -0
- package/lib/utils/isGithubTokenValid.d.ts +7 -0
- package/lib/utils/isGithubTokenValid.js +48 -0
- package/lib/utils/isGithubTokenValid.mjs +36 -0
- package/lib/yarn-reinstall.cjs +61 -13
- package/lib/yarn-reinstall.mjs +1 -1
- package/package.json +107 -93
- package/readme.md +33 -34
- package/releases/readme.md +1 -1
- package/requirements.txt +1 -0
- package/lib/chunk-4EWQC6GZ.mjs +0 -382
- package/lib/chunk-4ZI7BQKQ.mjs +0 -381
- package/lib/chunk-5J2BEPY5.mjs +0 -83
- package/lib/chunk-AGZYRDC2.mjs +0 -323
- package/lib/chunk-HN52G2YL.mjs +0 -305
- package/lib/chunk-HO6GHCOB.mjs +0 -385
- package/lib/chunk-LEM5OMRP.mjs +0 -384
- package/lib/chunk-RCP7DHVY.mjs +0 -190
- package/lib/chunk-U6SO4QEV.mjs +0 -320
- package/lib/chunk-XD6BJK6Q.mjs +0 -351
- package/lib/chunk-YXSFGA2D.mjs +0 -383
- package/lib/git/gitattributes.d.ts +0 -33
- package/lib/git/gitattributes.js +0 -223
package/lib/remove-module.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;
|
|
@@ -88,31 +89,78 @@ var require_utils = __commonJS({
|
|
|
88
89
|
}
|
|
89
90
|
module2.exports.getArgs = getArgs2;
|
|
90
91
|
function del(fullPath) {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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.
|
|
123
|
+
fs2.unlinkSync(fullPath);
|
|
99
124
|
console.log("deleted", fullPath);
|
|
100
|
-
} catch (
|
|
101
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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;
|
package/lib/remove-module.mjs
CHANGED
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
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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.
|
|
131
|
+
fs2.unlinkSync(fullPath);
|
|
107
132
|
console.log("deleted", fullPath);
|
|
108
|
-
} catch (
|
|
109
|
-
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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-
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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.
|
|
102
|
+
fs2.unlinkSync(fullPath);
|
|
79
103
|
console.log("deleted", fullPath);
|
|
80
|
-
} catch (
|
|
81
|
-
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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-
|
|
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
|
-
|
|
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" });
|
package/lib/submodule-remove.cjs
CHANGED
|
@@ -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
|
-
|
|
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" });
|
package/lib/submodule-remove.mjs
CHANGED
|
@@ -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-
|
|
4
|
+
} from "./chunk-BZWVHODJ.mjs";
|
|
5
5
|
import "./chunk-QQ4A6DLD.mjs";
|
|
6
6
|
export default require_submodule_remove();
|