binary-collections 2.0.5 → 2.0.6

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 (104) hide show
  1. package/bin/bash-dummy +7 -2
  2. package/bin/clean-nodemodule +7 -2
  3. package/bin/clean-nodemodules +7 -2
  4. package/bin/dev +7 -2
  5. package/bin/empty +7 -2
  6. package/bin/git-fix-encoding +7 -2
  7. package/bin/git-reduce-size +7 -2
  8. package/bin/kill-process +7 -2
  9. package/bin/nodekill +7 -2
  10. package/bin/prod +7 -2
  11. package/bin/rmfind +7 -2
  12. package/bin/rmpath +7 -2
  13. package/bin/rmx +9 -3
  14. package/bin/submodule +13 -2
  15. package/bin/submodule-install +7 -2
  16. package/bin/submodule-remove +7 -2
  17. package/eslint.config.cjs +97 -0
  18. package/lib/chunk-7MSZ52XC.mjs +14 -0
  19. package/lib/chunk-AVDT32AY.mjs +20 -0
  20. package/lib/chunk-E75HJFJO.mjs +20 -0
  21. package/lib/chunk-GA4DDV65.mjs +202 -0
  22. package/lib/chunk-LPLPQBYP.mjs +53 -0
  23. package/lib/chunk-M4IBUK4H.mjs +173 -0
  24. package/lib/chunk-S4SJ7SDW.mjs +625 -0
  25. package/lib/del-gradle.cjs +72 -0
  26. package/lib/del-gradle.d.mts +2 -0
  27. package/lib/del-gradle.d.ts +2 -0
  28. package/lib/del-gradle.js +72 -0
  29. package/lib/del-gradle.mjs +28 -0
  30. package/lib/del-node-modules.cjs +72 -0
  31. package/lib/del-node-modules.d.mts +2 -0
  32. package/lib/del-node-modules.d.ts +2 -0
  33. package/lib/del-node-modules.js +63 -10
  34. package/lib/del-node-modules.mjs +28 -0
  35. package/lib/del-ps.cjs +706 -0
  36. package/lib/del-ps.d.mts +2 -0
  37. package/lib/del-ps.d.ts +2 -0
  38. package/lib/del-ps.js +706 -0
  39. package/lib/del-ps.mjs +46 -0
  40. package/lib/del-yarn-caches.cjs +65 -0
  41. package/lib/del-yarn-caches.d.mts +2 -0
  42. package/lib/del-yarn-caches.d.ts +2 -0
  43. package/lib/del-yarn-caches.js +60 -6
  44. package/lib/del-yarn-caches.mjs +21 -0
  45. package/lib/find-node-modules.cjs +12 -0
  46. package/lib/find-node-modules.d.mts +2 -0
  47. package/lib/find-node-modules.d.ts +2 -0
  48. package/lib/find-node-modules.js +6 -7
  49. package/lib/find-node-modules.mjs +21 -0
  50. package/lib/git-purge.cjs +704 -0
  51. package/lib/git-purge.d.mts +2 -0
  52. package/lib/git-purge.d.ts +2 -0
  53. package/lib/git-purge.js +704 -0
  54. package/lib/git-purge.mjs +50 -0
  55. package/lib/index.cjs +2 -0
  56. package/lib/index.d.mts +2 -0
  57. package/lib/index.d.ts +2 -0
  58. package/{index.js → lib/index.js} +1 -0
  59. package/lib/index.mjs +9 -0
  60. package/lib/npm-run-series.cjs +61 -0
  61. package/lib/npm-run-series.d.mts +1 -0
  62. package/lib/npm-run-series.d.ts +1 -0
  63. package/lib/npm-run-series.js +37 -20
  64. package/lib/npm-run-series.mjs +47 -0
  65. package/lib/package-resolutions.cjs +28 -0
  66. package/lib/package-resolutions.d.mts +25 -0
  67. package/lib/package-resolutions.d.ts +25 -0
  68. package/lib/package-resolutions.js +28 -0
  69. package/lib/package-resolutions.mjs +31 -0
  70. package/lib/ps/connected-domain.cjs +156 -0
  71. package/lib/ps/connected-domain.d.mts +3 -0
  72. package/lib/ps/connected-domain.d.ts +3 -0
  73. package/lib/ps/connected-domain.js +156 -0
  74. package/lib/ps/connected-domain.mjs +7 -0
  75. package/lib/ps/index.cjs +555 -0
  76. package/lib/ps/index.d.cjs +17 -0
  77. package/lib/ps/index.d.d.mts +26 -0
  78. package/lib/ps/index.d.d.ts +26 -0
  79. package/lib/ps/index.d.js +17 -0
  80. package/lib/ps/index.d.mjs +8 -0
  81. package/lib/ps/index.d.mts +26 -0
  82. package/lib/ps/index.d.ts +26 -0
  83. package/lib/ps/index.js +555 -0
  84. package/lib/ps/index.mjs +203 -0
  85. package/lib/ps/isWin.cjs +3 -0
  86. package/lib/ps/isWin.d.mts +3 -0
  87. package/lib/ps/isWin.d.ts +3 -0
  88. package/lib/ps/isWin.js +3 -0
  89. package/lib/ps/isWin.mjs +7 -0
  90. package/lib/ps/table-parser.cjs +359 -0
  91. package/lib/ps/table-parser.d.mts +3 -0
  92. package/lib/ps/table-parser.d.ts +3 -0
  93. package/lib/ps/table-parser.js +359 -0
  94. package/lib/ps/table-parser.mjs +8 -0
  95. package/lib/utils.cjs +35 -0
  96. package/lib/utils.d.mts +20 -0
  97. package/lib/utils.d.ts +20 -0
  98. package/lib/utils.js +22 -23
  99. package/lib/utils.mjs +7 -0
  100. package/package.json +76 -32
  101. package/readme.md +23 -0
  102. package/src/ps/index.js +285 -0
  103. package/test/package.json +19 -0
  104. package/lib/package-resolutions.json +0 -22
@@ -0,0 +1,50 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ require_dist
4
+ } from "./chunk-S4SJ7SDW.mjs";
5
+ import {
6
+ require_utils
7
+ } from "./chunk-LPLPQBYP.mjs";
8
+ import {
9
+ init_esm_shims
10
+ } from "./chunk-7MSZ52XC.mjs";
11
+ import {
12
+ __require
13
+ } from "./chunk-AVDT32AY.mjs";
14
+
15
+ // src/git-purge.js
16
+ init_esm_shims();
17
+ var { spawnAsync } = require_dist();
18
+ var glob = __require("glob");
19
+ var path = __require("path");
20
+ var { delay } = require_utils();
21
+ var dirs = [];
22
+ var fetchDirs = (pattern, callback) => {
23
+ const globStream = new glob.Glob(pattern, {
24
+ withFileTypes: false,
25
+ cwd: process.cwd(),
26
+ ignore: ["**/node_modules/**", "**/vendor/**"]
27
+ });
28
+ globStream.stream().on("data", (result) => {
29
+ const fullPath = path.resolve(process.cwd(), result);
30
+ if (typeof callback == "function") callback(fullPath);
31
+ const base = path.dirname(fullPath);
32
+ if (!dirs.includes(base)) dirs.push(base);
33
+ start();
34
+ });
35
+ };
36
+ var running = false;
37
+ async function start() {
38
+ if (running) return;
39
+ while (dirs.length > 0) {
40
+ running = true;
41
+ const cwd = dirs.shift();
42
+ console.log("pruning reflog", cwd);
43
+ await spawnAsync("git", ["reflog", "expire", "--expire=all", "--all"], { cwd, stdio: "pipe", shell: true }).catch(
44
+ (e) => console.log("failed prune reflog", e.message)
45
+ );
46
+ await delay(3);
47
+ running = false;
48
+ }
49
+ }
50
+ fetchDirs("**/.git");
package/lib/index.cjs ADDED
@@ -0,0 +1,2 @@
1
+ // src/index.ts
2
+ console.log("binary-collections main script :P");
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/lib/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -1 +1,2 @@
1
+ // src/index.ts
1
2
  console.log("binary-collections main script :P");
package/lib/index.mjs ADDED
@@ -0,0 +1,9 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ init_esm_shims
4
+ } from "./chunk-7MSZ52XC.mjs";
5
+ import "./chunk-AVDT32AY.mjs";
6
+
7
+ // src/index.ts
8
+ init_esm_shims();
9
+ console.log("binary-collections main script :P");
@@ -0,0 +1,61 @@
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;
15
+ };
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
+ });
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ })();
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
@@ -1,25 +1,42 @@
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;
15
+ };
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
+ ));
2
24
 
3
- const fs = require('fs');
4
- const path = require('path');
5
- const { Minimatch } = require('minimatch');
6
-
7
- const args = require('minimist')(process.argv.slice(2));
8
- const cwd = process.cwd();
9
- const packagejson = path.join(cwd, 'package.json');
10
- const verbose = args['v'] || args['verbose'];
11
- const usingYarn = args['yarn'];
12
-
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"];
13
34
  (async function npmRunSeries() {
14
- const { execa } = await import('execa');
35
+ const { execa } = await import("execa");
15
36
  if (fs.existsSync(packagejson)) {
16
- /**
17
- * @type {import('../package.json')}
18
- */
19
- const parse = JSON.parse(fs.readFileSync(packagejson, 'utf-8'));
20
-
21
- if (parse !== null && typeof parse === 'object') {
22
- if ('scripts' in parse) {
37
+ const parse = JSON.parse(fs.readFileSync(packagejson, "utf-8"));
38
+ if (parse !== null && typeof parse === "object") {
39
+ if ("scripts" in parse) {
23
40
  const patterns = args._;
24
41
  const scripts = parse.scripts;
25
42
  const scriptNames = Object.keys(scripts);
@@ -31,9 +48,9 @@ const usingYarn = args['yarn'];
31
48
  const match = matcher.match(scriptName);
32
49
  if (verbose) console.log({ pattern, scriptName, match });
33
50
  if (match === true) {
34
- await execa(usingYarn ? 'yarn' : 'npm', ['run', scriptName], {
51
+ await execa(usingYarn ? "yarn" : "npm", ["run", scriptName], {
35
52
  cwd,
36
- stdio: 'inherit'
53
+ stdio: "inherit"
37
54
  });
38
55
  }
39
56
  }
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
3
+ import {
4
+ init_esm_shims
5
+ } from "./chunk-7MSZ52XC.mjs";
6
+ import {
7
+ __require
8
+ } from "./chunk-AVDT32AY.mjs";
9
+
10
+ // src/npm-run-series.js
11
+ init_esm_shims();
12
+ var fs = __require("fs");
13
+ var path = __require("path");
14
+ var { Minimatch } = __require("minimatch");
15
+ var args = __require("minimist")(process.argv.slice(2));
16
+ var cwd = process.cwd();
17
+ var packagejson = path.join(cwd, "package.json");
18
+ var verbose = args["v"] || args["verbose"];
19
+ var usingYarn = args["yarn"];
20
+ (async function npmRunSeries() {
21
+ const { execa } = await import("execa");
22
+ if (fs.existsSync(packagejson)) {
23
+ const parse = JSON.parse(fs.readFileSync(packagejson, "utf-8"));
24
+ if (parse !== null && typeof parse === "object") {
25
+ if ("scripts" in parse) {
26
+ const patterns = args._;
27
+ const scripts = parse.scripts;
28
+ const scriptNames = Object.keys(scripts);
29
+ for (let i = 0; i < patterns.length; i++) {
30
+ const pattern = patterns[i];
31
+ const matcher = new Minimatch(pattern, { nonegate: true });
32
+ for (let ii = 0; ii < scriptNames.length; ii++) {
33
+ const scriptName = scriptNames[ii];
34
+ const match = matcher.match(scriptName);
35
+ if (verbose) console.log({ pattern, scriptName, match });
36
+ if (match === true) {
37
+ await execa(usingYarn ? "yarn" : "npm", ["run", scriptName], {
38
+ cwd,
39
+ stdio: "inherit"
40
+ });
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ })();
@@ -0,0 +1,28 @@
1
+ // src/package-resolutions.json
2
+ var resolutions = {
3
+ "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/private/release/cross-spawn.tgz",
4
+ safelinkify: "https://github.com/dimaslanjaka/safelink/raw/monorepo/release/safelinkify.tgz",
5
+ "sbg-api": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-api/release/sbg-api.tgz",
6
+ "sbg-cli": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-cli/release/sbg-cli.tgz",
7
+ "sbg-server": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-server/release/sbg-server.tgz",
8
+ "sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-utility/release/sbg-utility.tgz",
9
+ "sitemap-crawler": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sitemap-crawler/release/sitemap-crawler.tgz",
10
+ "static-blog-generator": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/static-blog-generator/release/static-blog-generator.tgz",
11
+ "hexo-blogger-xml": "https://github.com/dimaslanjaka/hexo-blogger-xml/raw/monorepo/release/hexo-blogger-xml.tgz",
12
+ "hexo-post-parser": "https://github.com/dimaslanjaka/hexo-post-parser/raw/monorepo/release/hexo-post-parser.tgz",
13
+ "hexo-asset-link": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-asset-link.tgz",
14
+ "hexo-front-matter": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-front-matter.tgz",
15
+ hexo: "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo.tgz",
16
+ "hexo-log": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-log.tgz",
17
+ "hexo-util": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-util.tgz",
18
+ warehouse: "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/warehouse.tgz",
19
+ "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/monorepo/release/git-command-helper.tgz",
20
+ "instant-indexing": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/instant-indexing/release/instant-indexing.tgz"
21
+ };
22
+ var package_resolutions_default = {
23
+ resolutions
24
+ };
25
+ // Annotate the CommonJS export names for ESM import in node:
26
+ 0 && (module.exports = {
27
+ resolutions
28
+ });
@@ -0,0 +1,25 @@
1
+ var resolutions = {
2
+ "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/private/release/cross-spawn.tgz",
3
+ safelinkify: "https://github.com/dimaslanjaka/safelink/raw/monorepo/release/safelinkify.tgz",
4
+ "sbg-api": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-api/release/sbg-api.tgz",
5
+ "sbg-cli": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-cli/release/sbg-cli.tgz",
6
+ "sbg-server": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-server/release/sbg-server.tgz",
7
+ "sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-utility/release/sbg-utility.tgz",
8
+ "sitemap-crawler": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sitemap-crawler/release/sitemap-crawler.tgz",
9
+ "static-blog-generator": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/static-blog-generator/release/static-blog-generator.tgz",
10
+ "hexo-blogger-xml": "https://github.com/dimaslanjaka/hexo-blogger-xml/raw/monorepo/release/hexo-blogger-xml.tgz",
11
+ "hexo-post-parser": "https://github.com/dimaslanjaka/hexo-post-parser/raw/monorepo/release/hexo-post-parser.tgz",
12
+ "hexo-asset-link": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-asset-link.tgz",
13
+ "hexo-front-matter": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-front-matter.tgz",
14
+ hexo: "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo.tgz",
15
+ "hexo-log": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-log.tgz",
16
+ "hexo-util": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-util.tgz",
17
+ warehouse: "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/warehouse.tgz",
18
+ "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/monorepo/release/git-command-helper.tgz",
19
+ "instant-indexing": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/instant-indexing/release/instant-indexing.tgz"
20
+ };
21
+ var packageResolutions = {
22
+ resolutions: resolutions
23
+ };
24
+
25
+ export { packageResolutions as default, resolutions };
@@ -0,0 +1,25 @@
1
+ var resolutions = {
2
+ "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/private/release/cross-spawn.tgz",
3
+ safelinkify: "https://github.com/dimaslanjaka/safelink/raw/monorepo/release/safelinkify.tgz",
4
+ "sbg-api": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-api/release/sbg-api.tgz",
5
+ "sbg-cli": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-cli/release/sbg-cli.tgz",
6
+ "sbg-server": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-server/release/sbg-server.tgz",
7
+ "sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-utility/release/sbg-utility.tgz",
8
+ "sitemap-crawler": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sitemap-crawler/release/sitemap-crawler.tgz",
9
+ "static-blog-generator": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/static-blog-generator/release/static-blog-generator.tgz",
10
+ "hexo-blogger-xml": "https://github.com/dimaslanjaka/hexo-blogger-xml/raw/monorepo/release/hexo-blogger-xml.tgz",
11
+ "hexo-post-parser": "https://github.com/dimaslanjaka/hexo-post-parser/raw/monorepo/release/hexo-post-parser.tgz",
12
+ "hexo-asset-link": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-asset-link.tgz",
13
+ "hexo-front-matter": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-front-matter.tgz",
14
+ hexo: "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo.tgz",
15
+ "hexo-log": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-log.tgz",
16
+ "hexo-util": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-util.tgz",
17
+ warehouse: "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/warehouse.tgz",
18
+ "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/monorepo/release/git-command-helper.tgz",
19
+ "instant-indexing": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/instant-indexing/release/instant-indexing.tgz"
20
+ };
21
+ var packageResolutions = {
22
+ resolutions: resolutions
23
+ };
24
+
25
+ export { packageResolutions as default, resolutions };
@@ -0,0 +1,28 @@
1
+ // src/package-resolutions.json
2
+ var resolutions = {
3
+ "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/private/release/cross-spawn.tgz",
4
+ safelinkify: "https://github.com/dimaslanjaka/safelink/raw/monorepo/release/safelinkify.tgz",
5
+ "sbg-api": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-api/release/sbg-api.tgz",
6
+ "sbg-cli": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-cli/release/sbg-cli.tgz",
7
+ "sbg-server": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-server/release/sbg-server.tgz",
8
+ "sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-utility/release/sbg-utility.tgz",
9
+ "sitemap-crawler": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sitemap-crawler/release/sitemap-crawler.tgz",
10
+ "static-blog-generator": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/static-blog-generator/release/static-blog-generator.tgz",
11
+ "hexo-blogger-xml": "https://github.com/dimaslanjaka/hexo-blogger-xml/raw/monorepo/release/hexo-blogger-xml.tgz",
12
+ "hexo-post-parser": "https://github.com/dimaslanjaka/hexo-post-parser/raw/monorepo/release/hexo-post-parser.tgz",
13
+ "hexo-asset-link": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-asset-link.tgz",
14
+ "hexo-front-matter": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-front-matter.tgz",
15
+ hexo: "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo.tgz",
16
+ "hexo-log": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-log.tgz",
17
+ "hexo-util": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-util.tgz",
18
+ warehouse: "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/warehouse.tgz",
19
+ "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/monorepo/release/git-command-helper.tgz",
20
+ "instant-indexing": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/instant-indexing/release/instant-indexing.tgz"
21
+ };
22
+ var package_resolutions_default = {
23
+ resolutions
24
+ };
25
+ // Annotate the CommonJS export names for ESM import in node:
26
+ 0 && (module.exports = {
27
+ resolutions
28
+ });
@@ -0,0 +1,31 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import "./chunk-AVDT32AY.mjs";
3
+
4
+ // src/package-resolutions.json
5
+ var resolutions = {
6
+ "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/private/release/cross-spawn.tgz",
7
+ safelinkify: "https://github.com/dimaslanjaka/safelink/raw/monorepo/release/safelinkify.tgz",
8
+ "sbg-api": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-api/release/sbg-api.tgz",
9
+ "sbg-cli": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-cli/release/sbg-cli.tgz",
10
+ "sbg-server": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-server/release/sbg-server.tgz",
11
+ "sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sbg-utility/release/sbg-utility.tgz",
12
+ "sitemap-crawler": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/sitemap-crawler/release/sitemap-crawler.tgz",
13
+ "static-blog-generator": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/static-blog-generator/release/static-blog-generator.tgz",
14
+ "hexo-blogger-xml": "https://github.com/dimaslanjaka/hexo-blogger-xml/raw/monorepo/release/hexo-blogger-xml.tgz",
15
+ "hexo-post-parser": "https://github.com/dimaslanjaka/hexo-post-parser/raw/monorepo/release/hexo-post-parser.tgz",
16
+ "hexo-asset-link": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-asset-link.tgz",
17
+ "hexo-front-matter": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-front-matter.tgz",
18
+ hexo: "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo.tgz",
19
+ "hexo-log": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-log.tgz",
20
+ "hexo-util": "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/hexo-util.tgz",
21
+ warehouse: "https://github.com/dimaslanjaka/hexo/raw/monorepo-v7/releases/warehouse.tgz",
22
+ "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/monorepo/release/git-command-helper.tgz",
23
+ "instant-indexing": "https://github.com/dimaslanjaka/static-blog-generator/raw/beta/packages/instant-indexing/release/instant-indexing.tgz"
24
+ };
25
+ var package_resolutions_default = {
26
+ resolutions
27
+ };
28
+ export {
29
+ package_resolutions_default as default,
30
+ resolutions
31
+ };
@@ -0,0 +1,156 @@
1
+ // src/ps/connected-domain.js
2
+ module.exports = function(tdArray, indicator, hardlink) {
3
+ hardlink = hardlink || false;
4
+ if (!tdArray) {
5
+ throw new Error("tdArray must be provided");
6
+ }
7
+ if (!indicator) {
8
+ throw new Error("indicator must be provided");
9
+ }
10
+ tdArray = JSON.parse(JSON.stringify(tdArray));
11
+ var domains = {};
12
+ var domainUUID = 0;
13
+ var pointsHash = {};
14
+ tdArray.forEach(function(row, y) {
15
+ row.forEach(function(colItem, x) {
16
+ var identifier2 = indicator(colItem, x, y);
17
+ var neighbours = [];
18
+ if (tdArray[y - 1] && tdArray[y - 1][x] !== void 0) {
19
+ neighbours.push(pointsHash[x + "_" + (y - 1)]);
20
+ }
21
+ if (row[x - 1] !== void 0) {
22
+ neighbours.push(pointsHash[x - 1 + "_" + y]);
23
+ }
24
+ if (!hardlink) {
25
+ if (tdArray[y - 1] && tdArray[y - 1][x - 1] !== void 0) {
26
+ neighbours.push(pointsHash[x - 1 + "_" + (y - 1)]);
27
+ }
28
+ if (tdArray[y - 1] && tdArray[y - 1][x + 1] !== void 0) {
29
+ neighbours.push(pointsHash[x + 1 + "_" + (y - 1)]);
30
+ }
31
+ }
32
+ if (neighbours.length) {
33
+ var matched = false;
34
+ neighbours.forEach(function(neighbour) {
35
+ if (neighbour.identifier == identifier2) {
36
+ if (!matched) {
37
+ addPointToDomain(colItem, x, y, neighbour.domainId);
38
+ matched = true;
39
+ } else {
40
+ var colItemPoint = pointsHash[x + "_" + y];
41
+ if (neighbour.domainId != colItemPoint.domainId) {
42
+ mergeDomains(neighbour.domainId, colItemPoint.domainId);
43
+ }
44
+ }
45
+ }
46
+ });
47
+ if (!matched) {
48
+ addNewDomain(colItem, x, y, identifier2);
49
+ }
50
+ } else {
51
+ addNewDomain(colItem, x, y, identifier2);
52
+ }
53
+ });
54
+ });
55
+ var result = {
56
+ domains: [],
57
+ totalDomains: 0,
58
+ groupByIdentifier: {},
59
+ totalIdentifiers: 0
60
+ };
61
+ var domainId = null;
62
+ var identifier = null;
63
+ var domain = null;
64
+ for (domainId in domains) {
65
+ domain = domains[domainId];
66
+ domain.bounding = calculateBounding(domain.points);
67
+ identifier = domain.identifier;
68
+ result.domains.push(domain);
69
+ result.totalDomains++;
70
+ if (!(identifier in result.groupByIdentifier)) {
71
+ result.groupByIdentifier[identifier] = [];
72
+ result.totalIdentifiers++;
73
+ }
74
+ result.groupByIdentifier[identifier].push(domain);
75
+ }
76
+ function calculateBounding(points) {
77
+ var minX = null;
78
+ var minY = null;
79
+ var maxX = null;
80
+ var maxY = null;
81
+ points.forEach(function(point) {
82
+ if (minX === null || point.x < minX) {
83
+ minX = point.x;
84
+ }
85
+ if (minY === null || point.y < minY) {
86
+ minY = point.y;
87
+ }
88
+ if (maxX === null || point.x > maxX) {
89
+ maxX = point.x;
90
+ }
91
+ if (maxY === null || point.y > maxY) {
92
+ maxY = point.y;
93
+ }
94
+ });
95
+ var w = maxX - minX;
96
+ var h = maxY - minY;
97
+ return {
98
+ x: minX,
99
+ y: minY,
100
+ w,
101
+ h
102
+ };
103
+ }
104
+ function addNewDomain(point, x, y, identifier2) {
105
+ var newDomain = {
106
+ identifier: identifier2,
107
+ domainId: ++domainUUID,
108
+ bounding: {},
109
+ points: []
110
+ };
111
+ var newPoint = {
112
+ value: point,
113
+ x,
114
+ y,
115
+ identifier: identifier2,
116
+ domainId: newDomain.domainId
117
+ };
118
+ pointsHash[x + "_" + y] = {
119
+ value: point,
120
+ identifier: identifier2,
121
+ domainId: newDomain.domainId
122
+ };
123
+ newDomain.points.push(newPoint);
124
+ domains[newDomain.domainId] = newDomain;
125
+ }
126
+ function addPointToDomain(point, x, y, domainId2) {
127
+ var domain2 = domains[domainId2];
128
+ var newPoint = {
129
+ value: point,
130
+ x,
131
+ y,
132
+ identifier: domain2.identifier,
133
+ domainId: domainId2
134
+ };
135
+ pointsHash[x + "_" + y] = {
136
+ value: point,
137
+ identifier: domain2.identifier,
138
+ domainId: domainId2
139
+ };
140
+ domain2.points.push(newPoint);
141
+ }
142
+ function mergeDomains(domainAId, domainBId) {
143
+ var domainA = domains[domainAId];
144
+ var domainB = domains[domainBId];
145
+ if (domainA.identifier == domainB.identifier) {
146
+ domainB.domainId = domainA.domainId;
147
+ domainB.points.forEach(function(point) {
148
+ point.domainId = domainA.domainId;
149
+ pointsHash[point.x + "_" + point.y].domainId = domainA.domainId;
150
+ });
151
+ domainA.points = domainA.points.concat(domainB.points);
152
+ delete domains[domainBId];
153
+ }
154
+ }
155
+ return result;
156
+ };
@@ -0,0 +1,3 @@
1
+ declare function _exports(tdArray: any[], indicator: Function, hardlink: boolean): any;
2
+
3
+ export { _exports as default };
@@ -0,0 +1,3 @@
1
+ declare function _exports(tdArray: any[], indicator: Function, hardlink: boolean): any;
2
+
3
+ export { _exports as default };