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.
- package/bin/git-diff.cmd +4 -0
- package/bin/git-fix-encoding.cmd +0 -0
- package/bin/nodekill.cmd +0 -0
- package/bin/nodekill.ps1 +0 -0
- package/bin/submodule-install +0 -0
- package/lib/{chunk-GA4DDV65.mjs → chunk-3LOB2P54.mjs} +3 -3
- package/lib/{chunk-M4IBUK4H.mjs → chunk-4LEXWIIF.mjs} +2 -2
- package/lib/chunk-BSD5CIRU.mjs +52 -0
- package/lib/chunk-FB6YIQYR.mjs +42 -0
- package/lib/{chunk-E75HJFJO.mjs → chunk-JL32QDSH.mjs} +2 -2
- package/lib/{chunk-LPLPQBYP.mjs → chunk-OKYLF2MU.mjs} +14 -14
- package/lib/chunk-VXZQNLPU.mjs +23 -0
- package/lib/del-gradle.cjs +12 -12
- package/lib/del-gradle.d.ts +1 -2
- package/lib/del-gradle.js +12 -69
- package/lib/del-gradle.mjs +3 -3
- package/lib/del-node-modules.cjs +12 -12
- package/lib/del-node-modules.d.ts +1 -2
- package/lib/del-node-modules.js +11 -68
- package/lib/del-node-modules.mjs +3 -3
- package/lib/del-ps.cjs +13 -626
- package/lib/del-ps.d.ts +1 -2
- package/lib/del-ps.js +27 -702
- package/lib/del-ps.mjs +5 -8
- package/lib/del-yarn-caches.cjs +12 -12
- package/lib/del-yarn-caches.d.ts +1 -2
- package/lib/del-yarn-caches.js +6 -63
- package/lib/del-yarn-caches.mjs +3 -3
- package/lib/find-node-modules-cli.cjs +59 -0
- package/lib/find-node-modules-cli.d.mts +1 -0
- package/lib/find-node-modules-cli.d.ts +2 -0
- package/lib/find-node-modules-cli.js +3 -0
- package/lib/find-node-modules-cli.mjs +14 -0
- package/lib/find-node-modules.cjs +31 -9
- package/lib/find-node-modules.d.mts +9 -1
- package/lib/find-node-modules.d.ts +9 -2
- package/lib/find-node-modules.js +41 -12
- package/lib/find-node-modules.mjs +5 -19
- package/lib/git-diff.cjs +74 -0
- package/lib/git-diff.d.cts +2 -0
- package/lib/git-diff.d.mts +87 -0
- package/lib/git-diff.d.ts +87 -0
- package/lib/git-diff.mjs +83 -0
- package/lib/git-purge.cjs +13 -626
- package/lib/git-purge.d.ts +1 -2
- package/lib/git-purge.js +53 -698
- package/lib/git-purge.mjs +4 -7
- package/lib/index.cjs +91 -1
- package/lib/index.d.mts +1 -2
- package/lib/index.d.ts +2 -2
- package/lib/index.js +8 -2
- package/lib/index.mjs +12 -3
- package/lib/npm-run-series.d.ts +1 -0
- package/lib/npm-run-series.js +80 -56
- package/lib/npm-run-series.mjs +2 -2
- package/lib/package-resolutions.mjs +1 -1
- package/lib/ps/connected-domain.cjs +0 -0
- package/lib/ps/connected-domain.d.ts +1 -2
- package/lib/ps/connected-domain.js +196 -150
- package/lib/ps/connected-domain.mjs +3 -3
- package/lib/ps/index.cjs +0 -0
- package/lib/ps/index.d.mjs +2 -2
- package/lib/ps/index.d.ts +2 -26
- package/lib/ps/index.js +230 -535
- package/lib/ps/index.mjs +5 -5
- package/lib/ps/isWin.cjs +0 -0
- package/lib/ps/isWin.d.ts +1 -2
- package/lib/ps/isWin.js +1 -2
- package/lib/ps/isWin.mjs +3 -3
- package/lib/ps/table-parser.cjs +0 -0
- package/lib/ps/table-parser.d.ts +1 -3
- package/lib/ps/table-parser.js +254 -345
- package/lib/ps/table-parser.mjs +4 -4
- package/lib/submodule-install.cjs +118 -0
- package/lib/submodule-install.d.cts +2 -0
- package/lib/submodule-install.d.mts +141 -0
- package/lib/submodule-install.d.ts +141 -0
- package/lib/submodule-install.mjs +116 -0
- package/lib/utils.cjs +12 -12
- package/lib/utils.d.ts +4 -8
- package/lib/utils.js +43 -28
- package/lib/utils.mjs +3 -3
- package/lib/yarn-reinstall.cjs +42 -0
- package/lib/yarn-reinstall.d.cts +1 -0
- package/lib/yarn-reinstall.d.mts +45 -0
- package/lib/yarn-reinstall.d.ts +45 -0
- package/lib/yarn-reinstall.mjs +50 -0
- package/package.json +37 -39
- package/readme.md +174 -49
- package/eslint.config.cjs +0 -97
- package/lib/chunk-7MSZ52XC.mjs +0 -14
- package/lib/chunk-AVDT32AY.mjs +0 -20
- package/lib/chunk-S4SJ7SDW.mjs +0 -625
- package/lib/package-resolutions.js +0 -28
- package/lib/ps/index.d.js +0 -17
package/bin/git-diff.cmd
ADDED
package/bin/git-fix-encoding.cmd
CHANGED
|
File without changes
|
package/bin/nodekill.cmd
CHANGED
|
File without changes
|
package/bin/nodekill.ps1
CHANGED
|
File without changes
|
package/bin/submodule-install
CHANGED
|
File without changes
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
require_connected_domain
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4LEXWIIF.mjs";
|
|
5
5
|
import {
|
|
6
6
|
init_esm_shims
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VXZQNLPU.mjs";
|
|
8
8
|
import {
|
|
9
9
|
__commonJS
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FB6YIQYR.mjs";
|
|
11
11
|
|
|
12
12
|
// src/ps/table-parser.js
|
|
13
13
|
var require_table_parser = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
init_esm_shims
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VXZQNLPU.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FB6YIQYR.mjs";
|
|
8
8
|
|
|
9
9
|
// src/ps/connected-domain.js
|
|
10
10
|
var require_connected_domain = __commonJS({
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
init_esm_shims
|
|
4
|
+
} from "./chunk-VXZQNLPU.mjs";
|
|
5
|
+
import {
|
|
6
|
+
__commonJS,
|
|
7
|
+
__require
|
|
8
|
+
} from "./chunk-FB6YIQYR.mjs";
|
|
9
|
+
|
|
10
|
+
// src/find-node-modules.js
|
|
11
|
+
var require_find_node_modules = __commonJS({
|
|
12
|
+
"src/find-node-modules.js"(exports, module) {
|
|
13
|
+
init_esm_shims();
|
|
14
|
+
var glob = __require("glob");
|
|
15
|
+
var path = __require("path");
|
|
16
|
+
function findNodeModules(dir = process.cwd(), callback = null) {
|
|
17
|
+
const finalDir = typeof dir === "string" ? dir : process.cwd();
|
|
18
|
+
return new Promise((resolve, reject) => {
|
|
19
|
+
const results = [];
|
|
20
|
+
const g3 = new glob.Glob("**/node_modules", {
|
|
21
|
+
withFileTypes: false,
|
|
22
|
+
cwd: finalDir,
|
|
23
|
+
ignore: ["**/.git*", "**/vendor/**"]
|
|
24
|
+
});
|
|
25
|
+
const stream = g3.stream();
|
|
26
|
+
stream.on("data", (result) => {
|
|
27
|
+
const fullPath = path.resolve(finalDir, result);
|
|
28
|
+
if (typeof callback === "function") {
|
|
29
|
+
try {
|
|
30
|
+
callback(fullPath);
|
|
31
|
+
} catch (err) {
|
|
32
|
+
console.error("findNodeModules callback error:", err);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
results.push(fullPath);
|
|
36
|
+
});
|
|
37
|
+
stream.on("error", (err) => reject(err));
|
|
38
|
+
stream.on("end", () => {
|
|
39
|
+
if (results.length === 0) {
|
|
40
|
+
console.log("No node_modules directories found.");
|
|
41
|
+
}
|
|
42
|
+
resolve(results);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
module.exports = findNodeModules;
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export {
|
|
51
|
+
require_find_node_modules
|
|
52
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
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 __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
9
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
+
}) : x)(function(x) {
|
|
11
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
+
});
|
|
14
|
+
var __esm = (fn, res) => function __init() {
|
|
15
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
16
|
+
};
|
|
17
|
+
var __commonJS = (cb, mod) => function __require2() {
|
|
18
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
__require,
|
|
39
|
+
__esm,
|
|
40
|
+
__commonJS,
|
|
41
|
+
__toESM
|
|
42
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
init_esm_shims
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VXZQNLPU.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FB6YIQYR.mjs";
|
|
8
8
|
|
|
9
9
|
// src/ps/isWin.js
|
|
10
10
|
var require_isWin = __commonJS({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
init_esm_shims
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VXZQNLPU.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FB6YIQYR.mjs";
|
|
9
9
|
|
|
10
10
|
// src/utils.js
|
|
11
11
|
var require_utils = __commonJS({
|
|
@@ -16,18 +16,6 @@ var require_utils = __commonJS({
|
|
|
16
16
|
function getArgs() {
|
|
17
17
|
return argv;
|
|
18
18
|
}
|
|
19
|
-
function delStream(globStream) {
|
|
20
|
-
globStream.stream().on("data", (result) => {
|
|
21
|
-
const fullPath = path.resolve(process.cwd(), result);
|
|
22
|
-
if (fs.statSync(fullPath).isDirectory()) {
|
|
23
|
-
const subdir = fs.readdirSync(fullPath).map((dirPath) => path.resolve(fullPath, dirPath));
|
|
24
|
-
for (let i = 0; i < subdir.length; i++) {
|
|
25
|
-
del(subdir[i]);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
del(fullPath);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
19
|
function del(fullPath) {
|
|
32
20
|
if (fs.statSync(fullPath).isDirectory()) {
|
|
33
21
|
const subdir = fs.readdirSync(fullPath).map((dirPath) => path.resolve(fullPath, dirPath));
|
|
@@ -43,6 +31,18 @@ var require_utils = __commonJS({
|
|
|
43
31
|
}
|
|
44
32
|
}
|
|
45
33
|
}
|
|
34
|
+
function delStream(globStream) {
|
|
35
|
+
globStream.stream().on("data", (result) => {
|
|
36
|
+
const fullPath = path.resolve(process.cwd(), result);
|
|
37
|
+
if (fs.statSync(fullPath).isDirectory()) {
|
|
38
|
+
const subdir = fs.readdirSync(fullPath).map((dirPath) => path.resolve(fullPath, dirPath));
|
|
39
|
+
for (let i = 0; i < subdir.length; i++) {
|
|
40
|
+
del(subdir[i]);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
del(fullPath);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
46
|
var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
47
47
|
module.exports = { del, delStream, getArgs, delay };
|
|
48
48
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
__esm
|
|
4
|
+
} from "./chunk-FB6YIQYR.mjs";
|
|
5
|
+
|
|
6
|
+
// node_modules/tsup/assets/esm_shims.js
|
|
7
|
+
import path from "path";
|
|
8
|
+
import { fileURLToPath } from "url";
|
|
9
|
+
var getFilename, getDirname, __dirname, __filename;
|
|
10
|
+
var init_esm_shims = __esm({
|
|
11
|
+
"node_modules/tsup/assets/esm_shims.js"() {
|
|
12
|
+
getFilename = () => fileURLToPath(import.meta.url);
|
|
13
|
+
getDirname = () => path.dirname(getFilename());
|
|
14
|
+
__dirname = /* @__PURE__ */ getDirname();
|
|
15
|
+
__filename = /* @__PURE__ */ getFilename();
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
__dirname,
|
|
21
|
+
__filename,
|
|
22
|
+
init_esm_shims
|
|
23
|
+
};
|
package/lib/del-gradle.cjs
CHANGED
|
@@ -21,18 +21,6 @@ var require_utils = __commonJS({
|
|
|
21
21
|
function getArgs() {
|
|
22
22
|
return argv;
|
|
23
23
|
}
|
|
24
|
-
function delStream(globStream2) {
|
|
25
|
-
globStream2.stream().on("data", (result) => {
|
|
26
|
-
const fullPath = path2.resolve(process.cwd(), result);
|
|
27
|
-
if (fs.statSync(fullPath).isDirectory()) {
|
|
28
|
-
const subdir = fs.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
|
|
29
|
-
for (let i = 0; i < subdir.length; i++) {
|
|
30
|
-
del2(subdir[i]);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
del2(fullPath);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
24
|
function del2(fullPath) {
|
|
37
25
|
if (fs.statSync(fullPath).isDirectory()) {
|
|
38
26
|
const subdir = fs.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
|
|
@@ -48,6 +36,18 @@ var require_utils = __commonJS({
|
|
|
48
36
|
}
|
|
49
37
|
}
|
|
50
38
|
}
|
|
39
|
+
function delStream(globStream2) {
|
|
40
|
+
globStream2.stream().on("data", (result) => {
|
|
41
|
+
const fullPath = path2.resolve(process.cwd(), result);
|
|
42
|
+
if (fs.statSync(fullPath).isDirectory()) {
|
|
43
|
+
const subdir = fs.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
|
|
44
|
+
for (let i = 0; i < subdir.length; i++) {
|
|
45
|
+
del2(subdir[i]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
del2(fullPath);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
51
|
var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
52
52
|
module2.exports = { del: del2, delStream, getArgs, delay };
|
|
53
53
|
}
|
package/lib/del-gradle.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { }
|
|
1
|
+
export {};
|
package/lib/del-gradle.js
CHANGED
|
@@ -1,72 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// node_modules/tsup/assets/cjs_shims.js
|
|
10
|
-
var init_cjs_shims = __esm({
|
|
11
|
-
"node_modules/tsup/assets/cjs_shims.js"() {
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
// src/utils.js
|
|
16
|
-
var require_utils = __commonJS({
|
|
17
|
-
"src/utils.js"(exports2, module2) {
|
|
18
|
-
init_cjs_shims();
|
|
19
|
-
var { fs, path: path2 } = require("sbg-utility");
|
|
20
|
-
var argv = require("minimist")(process.argv.slice(2));
|
|
21
|
-
function getArgs() {
|
|
22
|
-
return argv;
|
|
23
|
-
}
|
|
24
|
-
function delStream(globStream2) {
|
|
25
|
-
globStream2.stream().on("data", (result) => {
|
|
26
|
-
const fullPath = path2.resolve(process.cwd(), result);
|
|
27
|
-
if (fs.statSync(fullPath).isDirectory()) {
|
|
28
|
-
const subdir = fs.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
|
|
29
|
-
for (let i = 0; i < subdir.length; i++) {
|
|
30
|
-
del2(subdir[i]);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
del2(fullPath);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
function del2(fullPath) {
|
|
37
|
-
if (fs.statSync(fullPath).isDirectory()) {
|
|
38
|
-
const subdir = fs.readdirSync(fullPath).map((dirPath) => path2.resolve(fullPath, dirPath));
|
|
39
|
-
for (let i = 0; i < subdir.length; i++) {
|
|
40
|
-
del2(subdir[i]);
|
|
41
|
-
}
|
|
42
|
-
} else {
|
|
43
|
-
try {
|
|
44
|
-
fs.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
|
|
45
|
-
console.log("deleted", fullPath);
|
|
46
|
-
} catch (_) {
|
|
47
|
-
console.log("failed delete", fullPath);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
52
|
-
module2.exports = { del: del2, delStream, getArgs, delay };
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
// src/del-gradle.js
|
|
57
|
-
init_cjs_shims();
|
|
58
|
-
var glob = require("glob");
|
|
59
|
-
var { path } = require("sbg-utility");
|
|
60
|
-
var { del } = require_utils();
|
|
61
|
-
var globStream = new glob.Glob(["**/build.gradle"], {
|
|
62
|
-
withFileTypes: false,
|
|
63
|
-
cwd: process.cwd(),
|
|
64
|
-
ignore: ["**/node_modules/**", "**/vendor/**"]
|
|
1
|
+
const glob = require("glob");
|
|
2
|
+
const { path } = require("sbg-utility");
|
|
3
|
+
const { del } = require("./utils");
|
|
4
|
+
const globStream = new glob.Glob(["**/build.gradle"], {
|
|
5
|
+
withFileTypes: false,
|
|
6
|
+
cwd: process.cwd(),
|
|
7
|
+
ignore: ["**/node_modules/**", "**/vendor/**"]
|
|
65
8
|
});
|
|
66
9
|
globStream.stream().on("data", (result) => {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
10
|
+
const fullPath = path.resolve(process.cwd(), result);
|
|
11
|
+
const base = path.dirname(fullPath);
|
|
12
|
+
const buildFolder = path.join(base, "build");
|
|
13
|
+
console.log("delete build folder", buildFolder);
|
|
14
|
+
del(buildFolder);
|
|
72
15
|
});
|
package/lib/del-gradle.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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-OKYLF2MU.mjs";
|
|
5
5
|
import {
|
|
6
6
|
init_esm_shims
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VXZQNLPU.mjs";
|
|
8
8
|
import {
|
|
9
9
|
__require
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FB6YIQYR.mjs";
|
|
11
11
|
|
|
12
12
|
// src/del-gradle.js
|
|
13
13
|
init_esm_shims();
|
package/lib/del-node-modules.cjs
CHANGED
|
@@ -21,18 +21,6 @@ var require_utils = __commonJS({
|
|
|
21
21
|
function getArgs() {
|
|
22
22
|
return argv;
|
|
23
23
|
}
|
|
24
|
-
function delStream2(globStream) {
|
|
25
|
-
globStream.stream().on("data", (result) => {
|
|
26
|
-
const fullPath = path.resolve(process.cwd(), result);
|
|
27
|
-
if (fs.statSync(fullPath).isDirectory()) {
|
|
28
|
-
const subdir = fs.readdirSync(fullPath).map((dirPath) => path.resolve(fullPath, dirPath));
|
|
29
|
-
for (let i = 0; i < subdir.length; i++) {
|
|
30
|
-
del(subdir[i]);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
del(fullPath);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
24
|
function del(fullPath) {
|
|
37
25
|
if (fs.statSync(fullPath).isDirectory()) {
|
|
38
26
|
const subdir = fs.readdirSync(fullPath).map((dirPath) => path.resolve(fullPath, dirPath));
|
|
@@ -48,6 +36,18 @@ var require_utils = __commonJS({
|
|
|
48
36
|
}
|
|
49
37
|
}
|
|
50
38
|
}
|
|
39
|
+
function delStream2(globStream) {
|
|
40
|
+
globStream.stream().on("data", (result) => {
|
|
41
|
+
const fullPath = path.resolve(process.cwd(), result);
|
|
42
|
+
if (fs.statSync(fullPath).isDirectory()) {
|
|
43
|
+
const subdir = fs.readdirSync(fullPath).map((dirPath) => path.resolve(fullPath, dirPath));
|
|
44
|
+
for (let i = 0; i < subdir.length; i++) {
|
|
45
|
+
del(subdir[i]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
del(fullPath);
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
51
|
var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
52
52
|
module2.exports = { del, delStream: delStream2, getArgs, delay };
|
|
53
53
|
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { }
|
|
1
|
+
export {};
|
package/lib/del-node-modules.js
CHANGED
|
@@ -1,72 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// node_modules/tsup/assets/cjs_shims.js
|
|
10
|
-
var init_cjs_shims = __esm({
|
|
11
|
-
"node_modules/tsup/assets/cjs_shims.js"() {
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
// src/utils.js
|
|
16
|
-
var require_utils = __commonJS({
|
|
17
|
-
"src/utils.js"(exports2, module2) {
|
|
18
|
-
init_cjs_shims();
|
|
19
|
-
var { fs, path } = require("sbg-utility");
|
|
20
|
-
var argv = require("minimist")(process.argv.slice(2));
|
|
21
|
-
function getArgs() {
|
|
22
|
-
return argv;
|
|
23
|
-
}
|
|
24
|
-
function delStream2(globStream) {
|
|
25
|
-
globStream.stream().on("data", (result) => {
|
|
26
|
-
const fullPath = path.resolve(process.cwd(), result);
|
|
27
|
-
if (fs.statSync(fullPath).isDirectory()) {
|
|
28
|
-
const subdir = fs.readdirSync(fullPath).map((dirPath) => path.resolve(fullPath, dirPath));
|
|
29
|
-
for (let i = 0; i < subdir.length; i++) {
|
|
30
|
-
del(subdir[i]);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
del(fullPath);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
function del(fullPath) {
|
|
37
|
-
if (fs.statSync(fullPath).isDirectory()) {
|
|
38
|
-
const subdir = fs.readdirSync(fullPath).map((dirPath) => path.resolve(fullPath, dirPath));
|
|
39
|
-
for (let i = 0; i < subdir.length; i++) {
|
|
40
|
-
del(subdir[i]);
|
|
41
|
-
}
|
|
42
|
-
} else {
|
|
43
|
-
try {
|
|
44
|
-
fs.rmSync(fullPath, { recursive: true, force: true, retryDelay: 7e3 });
|
|
45
|
-
console.log("deleted", fullPath);
|
|
46
|
-
} catch (_) {
|
|
47
|
-
console.log("failed delete", fullPath);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
var delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
52
|
-
module2.exports = { del, delStream: delStream2, getArgs, delay };
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
// src/del-node-modules.js
|
|
57
|
-
init_cjs_shims();
|
|
58
|
-
var glob = require("glob");
|
|
59
|
-
var { delStream } = require_utils();
|
|
60
|
-
var globalIgnore = [
|
|
61
|
-
// ignore .git .github folder
|
|
62
|
-
"**/.git*",
|
|
63
|
-
// ignore composer folder
|
|
64
|
-
"**/vendor/**"
|
|
1
|
+
const glob = require("glob");
|
|
2
|
+
const { delStream } = require("./utils");
|
|
3
|
+
const globalIgnore = [
|
|
4
|
+
// ignore .git .github folder
|
|
5
|
+
"**/.git*",
|
|
6
|
+
// ignore composer folder
|
|
7
|
+
"**/vendor/**"
|
|
65
8
|
];
|
|
66
9
|
console.log("cleaning node_modules in", process.cwd());
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
10
|
+
const g3 = new glob.Glob("**/node_modules", {
|
|
11
|
+
withFileTypes: false,
|
|
12
|
+
cwd: process.cwd(),
|
|
13
|
+
ignore: globalIgnore
|
|
71
14
|
});
|
|
72
15
|
delStream(g3);
|
package/lib/del-node-modules.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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-OKYLF2MU.mjs";
|
|
5
5
|
import {
|
|
6
6
|
init_esm_shims
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VXZQNLPU.mjs";
|
|
8
8
|
import {
|
|
9
9
|
__require
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FB6YIQYR.mjs";
|
|
11
11
|
|
|
12
12
|
// src/del-node-modules.js
|
|
13
13
|
init_esm_shims();
|