binary-collections 2.0.14 → 2.0.15

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 (145) hide show
  1. package/.opencode/plugins/opencode-request-logger/README.md +44 -0
  2. package/.venv/Lib/site-packages/pyarrow/tests/data/orc/README.md +22 -0
  3. package/docs-src/install-opencode-plugins.md +86 -0
  4. package/docs-src/opencode-cli.md +38 -10
  5. package/lib/binary-collections/config-types.cjs +17 -0
  6. package/lib/binary-collections/config-types.d.ts +12 -0
  7. package/lib/binary-collections/config-types.js +2 -0
  8. package/lib/binary-collections/config-types.mjs +7 -0
  9. package/lib/binary-collections/config.cjs +16 -8
  10. package/lib/binary-collections/config.d.cts +18 -10
  11. package/lib/binary-collections/config.mjs +1 -1
  12. package/lib/binary-collections/findScript.cjs +8 -6
  13. package/lib/binary-collections/findScript.mjs +2 -2
  14. package/lib/binary-collections/listScript.cjs +8 -6
  15. package/lib/binary-collections/listScript.mjs +2 -2
  16. package/lib/binary-collections.cjs +8 -6
  17. package/lib/binary-collections.mjs +3 -3
  18. package/lib/changelog.cjs +142 -4
  19. package/lib/changelog.mjs +9 -5
  20. package/lib/{chunk-SARIXFHP.mjs → chunk-3T6AMFI3.mjs} +16 -8
  21. package/lib/{chunk-3F6EIHYG.mjs → chunk-3ZF2QMDK.mjs} +3 -3
  22. package/lib/chunk-B77D3SR4.mjs +28 -0
  23. package/lib/chunk-BPED62FN.mjs +115 -0
  24. package/lib/{chunk-XI67TI46.mjs → chunk-DHFRWM2W.mjs} +1 -1
  25. package/lib/{chunk-2SJKVOTN.mjs → chunk-DPEE3FBB.mjs} +1 -1
  26. package/lib/{chunk-UYNBNLV5.mjs → chunk-H7AE4IO3.mjs} +1 -1
  27. package/lib/{chunk-YWSLMAQ7.mjs → chunk-KCJYREA2.mjs} +14 -12
  28. package/lib/{chunk-JK3MG2KF.mjs → chunk-NHD4HLSU.mjs} +1 -1
  29. package/lib/{chunk-I3O5ZRYU.mjs → chunk-OWNVMKAA.mjs} +1 -1
  30. package/lib/chunk-SKVF4TMD.mjs +59 -0
  31. package/lib/{chunk-SJYP66BO.mjs → chunk-TDUUOAQD.mjs} +1 -1
  32. package/lib/{chunk-D42YBRZW.mjs → chunk-UAEKSLAX.mjs} +1 -1
  33. package/lib/chunk-V6PTSDW5.mjs +82 -0
  34. package/lib/{chunk-AJ3OIYYP.mjs → chunk-WNUEY6VJ.mjs} +8 -6
  35. package/lib/{chunk-YLV4QATP.mjs → chunk-Z53IUBUN.mjs} +6 -5
  36. package/lib/{chunk-JMUFQSPE.mjs → chunk-Z7RM46Q4.mjs} +1 -1
  37. package/lib/cross-env/index.mjs +3 -3
  38. package/lib/git/git-diff-cli.cjs +16 -8
  39. package/lib/git/git-diff-cli.mjs +3 -3
  40. package/lib/git/git-diff.cjs +16 -8
  41. package/lib/git/git-diff.mjs +3 -3
  42. package/lib/git/git-fix.cjs +16 -8
  43. package/lib/git/git-fix.mjs +2 -2
  44. package/lib/git/user-config.cjs +16 -8
  45. package/lib/git/user-config.mjs +2 -2
  46. package/lib/github-workflows/clean-github-actions-caches-cli.cjs +16 -8
  47. package/lib/github-workflows/clean-github-actions-caches-cli.mjs +2 -2
  48. package/lib/github-workflows/clean-github-actions-caches.cjs +16 -8
  49. package/lib/github-workflows/clean-github-actions-caches.mjs +2 -2
  50. package/lib/github-workflows/get-latest-workflow-status-cli.cjs +16 -8
  51. package/lib/github-workflows/get-latest-workflow-status-cli.mjs +2 -2
  52. package/lib/github-workflows/utils.cjs +16 -8
  53. package/lib/github-workflows/utils.mjs +2 -2
  54. package/lib/github-workflows/workflow-badge-cli.cjs +16 -8
  55. package/lib/github-workflows/workflow-badge-cli.mjs +4 -4
  56. package/lib/node-cache-cleaner-cli.mjs +3 -3
  57. package/lib/opencode/cli/auth-rotate.cjs +343 -28
  58. package/lib/opencode/cli/auth-rotate.d.ts +3 -1
  59. package/lib/opencode/cli/auth-rotate.js +10 -15
  60. package/lib/opencode/cli/auth-rotate.mjs +6 -2
  61. package/lib/opencode/cli/auth-rotate.runner.cjs +454 -0
  62. package/lib/opencode/cli/auth-rotate.runner.d.ts +1 -0
  63. package/lib/opencode/cli/auth-rotate.runner.js +8 -0
  64. package/lib/opencode/cli/auth-rotate.runner.mjs +21 -0
  65. package/lib/opencode/install-opencode-plugins-cli.cjs +82 -0
  66. package/lib/opencode/install-opencode-plugins-cli.d.ts +1 -0
  67. package/lib/opencode/install-opencode-plugins-cli.js +78 -0
  68. package/lib/opencode/install-opencode-plugins-cli.mjs +65 -0
  69. package/lib/opencode/utils/check-api.cjs +332 -18
  70. package/lib/opencode/utils/check-api.d.ts +5 -1
  71. package/lib/opencode/utils/check-api.js +101 -15
  72. package/lib/opencode/utils/check-api.mjs +5 -1
  73. package/lib/opencode/utils/check-api.runner.cjs +0 -0
  74. package/lib/opencode/utils/check-api.runner.d.ts +0 -0
  75. package/lib/opencode/utils/check-api.runner.js +1 -0
  76. package/lib/opencode/utils/check-api.runner.mjs +7 -0
  77. package/lib/opencode-cli.cjs +352 -29
  78. package/lib/opencode-cli.js +3 -2
  79. package/lib/opencode-cli.mjs +11 -6
  80. package/lib/package-resolutions-updater-cli.cjs +16 -8
  81. package/lib/package-resolutions-updater-cli.mjs +2 -2
  82. package/lib/package-resolutions-updater.cjs +16 -8
  83. package/lib/package-resolutions-updater.mjs +2 -2
  84. package/lib/print-directory-tree.cjs +16 -8
  85. package/lib/print-directory-tree.mjs +1 -1
  86. package/lib/print-tarball-tree-cli.cjs +305 -0
  87. package/lib/print-tarball-tree-cli.d.mts +2 -0
  88. package/lib/print-tarball-tree-cli.mjs +54 -0
  89. package/lib/print-tarball-tree.cjs +43 -216
  90. package/lib/print-tarball-tree.d.mts +4 -1
  91. package/lib/print-tarball-tree.mjs +12 -66
  92. package/lib/rmpath-cli.cjs +16 -8
  93. package/lib/rmpath-cli.mjs +2 -2
  94. package/lib/rmpath.cjs +16 -8
  95. package/lib/rmpath.mjs +2 -2
  96. package/lib/run-by-checksum/hash.cjs +45 -67
  97. package/lib/run-by-checksum/{hash.d.ts → hash.d.cts} +9 -2
  98. package/lib/run-by-checksum/hash.mjs +3 -7
  99. package/lib/run-by-checksum/run.cjs +95 -58
  100. package/lib/run-by-checksum/run.js +3 -3
  101. package/lib/run-by-checksum/run.mjs +2 -2
  102. package/lib/run-by-checksum-cli.cjs +96 -74
  103. package/lib/run-by-checksum-cli.mjs +2 -2
  104. package/lib/submodule-install.cjs +16 -8
  105. package/lib/submodule-install.mjs +1 -1
  106. package/lib/submodule-remove-cli.cjs +16 -8
  107. package/lib/submodule-remove-cli.mjs +2 -2
  108. package/lib/submodule-remove.cjs +16 -8
  109. package/lib/submodule-remove.mjs +2 -2
  110. package/lib/utils/isDebug.cjs +13 -0
  111. package/lib/utils/isDebug.d.cts +9 -0
  112. package/lib/utils/isDebug.mjs +6 -0
  113. package/package.json +9 -7
  114. package/readme.md +63 -0
  115. package/releases/readme.md +1 -1
  116. package/lib/chunk-546KAIYT.mjs +0 -113
  117. package/lib/chunk-5WAOOOGZ.mjs +0 -77
  118. package/lib/chunk-72XTQ3CK.mjs +0 -45
  119. package/lib/chunk-7Q6YEUQF.mjs +0 -246
  120. package/lib/chunk-AQZ7LMFS.mjs +0 -100
  121. package/lib/chunk-BDCMTOZI.mjs +0 -246
  122. package/lib/chunk-BEUM4LH4.mjs +0 -184
  123. package/lib/chunk-BO4TZS4Q.mjs +0 -246
  124. package/lib/chunk-BZWVHODJ.mjs +0 -62
  125. package/lib/chunk-CM3IC5YC.mjs +0 -226
  126. package/lib/chunk-FR3DMHJC.mjs +0 -146
  127. package/lib/chunk-H44UWUFY.mjs +0 -105
  128. package/lib/chunk-JVMLKHD2.mjs +0 -62
  129. package/lib/chunk-KAT2JNLZ.mjs +0 -146
  130. package/lib/chunk-KRCPFWIF.mjs +0 -193
  131. package/lib/chunk-LVSPEFU2.mjs +0 -86
  132. package/lib/chunk-MCCMMZSM.mjs +0 -60
  133. package/lib/chunk-MGPYPKIE.mjs +0 -109
  134. package/lib/chunk-OA2RKEY3.mjs +0 -162
  135. package/lib/chunk-PAZH45HS.mjs +0 -41
  136. package/lib/chunk-QZMGBDSA.mjs +0 -32
  137. package/lib/chunk-RDGDLSPD.mjs +0 -76
  138. package/lib/chunk-RKPIBGKE.mjs +0 -61
  139. package/lib/chunk-SWUAEY4H.mjs +0 -44
  140. package/lib/chunk-UAIF5VIA.mjs +0 -89
  141. package/lib/chunk-UHPFLJXH.mjs +0 -227
  142. package/lib/chunk-WOC4FZ6F.mjs +0 -164
  143. package/lib/chunk-WSHVPGNM.mjs +0 -44
  144. package/lib/run-by-checksum/hash.js +0 -119
  145. package/readme.html +0 -784
@@ -0,0 +1,44 @@
1
+ # opencode-request-logger
2
+
3
+ An [OpenCode](https://opencode.ai) plugin that logs raw LLM request bodies to disk for debugging and analysis.
4
+
5
+ ## What it does
6
+
7
+ Intercepts outgoing fetch calls to LLM providers (Anthropic, OpenAI, Google, Bedrock, etc.) and writes each request body as a timestamped JSON file. Logs are organized by session ID.
8
+
9
+ **Log location:** `~/.config/opencode/logs/request-logger/<sessionId>/<timestamp>_<seq>.json`
10
+
11
+ Each file contains:
12
+
13
+ ```json
14
+ {
15
+ "timestamp": "2026-03-04T12:00:00.000Z",
16
+ "url": "https://api.anthropic.com/v1/messages",
17
+ "body": { "...raw request body..." }
18
+ }
19
+ ```
20
+
21
+ ## How it works
22
+
23
+ Two interception layers ensure coverage across all providers:
24
+
25
+ 1. **`globalThis.fetch` wrapper** -- catches most providers since the AI SDK routes through fetch
26
+ 2. **`chat.params` hook** -- wraps the per-request fetch passed to `streamText`, catching providers that bypass `globalThis.fetch` (e.g. AWS Bedrock)
27
+
28
+ Only requests with an AI-shaped body (containing `messages`, `input`, or `contents` arrays) are logged.
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ # From the plugin directory
34
+ bun install
35
+ bun run build
36
+ ```
37
+
38
+ Then add to your OpenCode config (`~/.config/opencode/opencode.jsonc`):
39
+
40
+ ```json
41
+ {
42
+ "plugin": [ "./plugin/opencode-request-logger" ]
43
+ }
44
+ ```
@@ -0,0 +1,22 @@
1
+ <!---
2
+ Licensed to the Apache Software Foundation (ASF) under one
3
+ or more contributor license agreements. See the NOTICE file
4
+ distributed with this work for additional information
5
+ regarding copyright ownership. The ASF licenses this file
6
+ to you under the Apache License, Version 2.0 (the
7
+ "License"); you may not use this file except in compliance
8
+ with the License. You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing,
13
+ software distributed under the License is distributed on an
14
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ KIND, either express or implied. See the License for the
16
+ specific language governing permissions and limitations
17
+ under the License.
18
+ -->
19
+
20
+ The ORC and JSON files come from the `examples` directory in the Apache ORC
21
+ source tree:
22
+ https://github.com/apache/orc/tree/main/examples
@@ -0,0 +1,86 @@
1
+ # Install OpenCode Plugins
2
+
3
+ CLI tool that automates the installation of recommended OpenCode plugins. Runs a series of `git clone` and `opencode plugin` commands sequentially to set up a collection of plugins in one invocation.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ install-opencode-plugins [options]
9
+ ```
10
+
11
+ ### Aliases
12
+
13
+ This command is available under several aliases (all invoke the same CLI):
14
+
15
+ - `install-opencode-plugins` (default)
16
+ - `install-opc-plugins`
17
+ - `opc-plugins`
18
+
19
+ ### What it installs
20
+
21
+ The tool runs the following commands in order:
22
+
23
+ 1. **opencode-request-logger** — Clones the request logger plugin into `.opencode/plugins/opencode-request-logger`:
24
+ ```bash
25
+ git clone https://github.com/Opencode-DCP/opencode-request-logger.git .opencode/plugins/opencode-request-logger
26
+ ```
27
+ *Note: Skipped if the folder already exists.*
28
+
29
+ 2. **Register local request-logger plugin** — Installs the cloned plugin from the local path:
30
+ ```bash
31
+ opencode plugin .opencode/plugins/opencode-request-logger
32
+ ```
33
+
34
+ 3. **opencode-agent-memory** — Installs the file memory plugin from a remote tarball:
35
+ ```bash
36
+ opencode plugin opencode-agent-memory@https://github.com/dimaslanjaka/opencode-file-memory/raw/refs/heads/main/release/opencode-agent-memory.tgz
37
+ ```
38
+
39
+ 4. **@tarquinen/opencode-smart-title** — Installs smart title generation:
40
+ ```bash
41
+ opencode plugin @tarquinen/opencode-smart-title@latest
42
+ ```
43
+
44
+ 5. **oh-my-opencode-slim** — Installs the slim OpenCode enhancement pack:
45
+ ```bash
46
+ opencode plugin oh-my-opencode-slim@latest
47
+ ```
48
+
49
+ 6. **@tarquinen/opencode-dcp** — Installs DCP (Deep Context Protocol) support:
50
+ ```bash
51
+ opencode plugin @tarquinen/opencode-dcp@latest
52
+ ```
53
+
54
+ 7. **envsitter-guard** — Installs the environment variable security guard:
55
+ ```bash
56
+ opencode plugin envsitter-guard@latest
57
+ ```
58
+
59
+ ### Options
60
+
61
+ | Flag | Description |
62
+ | :--- | :--- |
63
+ | `-h`, `--help` | Show help message |
64
+
65
+ ### Example
66
+
67
+ ```bash
68
+ install-opencode-plugins
69
+ ```
70
+
71
+ ### How it works
72
+
73
+ 1. The tool iterates through a predefined array of commands (git clone + opencode plugin installs).
74
+ 2. Each command runs **sequentially** using `cross-spawn` with `stdio: 'inherit'` (output visible in real time) and `shell: true` (resolves binaries via the user's shell PATH).
75
+ 3. If any command exits with a non-zero code, execution stops immediately and an error message is printed.
76
+ 4. On success, it prints "All commands executed successfully!".
77
+
78
+ ### Prerequisites
79
+
80
+ - `git` must be available on `PATH`.
81
+ - `opencode` CLI must be installed and available on `PATH`.
82
+ - The plugins are installed into the current working directory's `.opencode/plugins/` folder.
83
+
84
+ ## Source
85
+
86
+ See [`src/opencode/install-opencode-plugins-cli.ts`](../src/opencode/install-opencode-plugins-cli.ts).
@@ -67,11 +67,18 @@ Rotates the active OpenCode API key by picking the first working key from a loca
67
67
  opc auth rotate
68
68
  ```
69
69
 
70
+ Use `--proxy` to route API requests through a proxy server:
71
+
72
+ ```bash
73
+ opc auth rotate --proxy socks5://127.0.0.1:1080
74
+ ```
75
+
70
76
  ### Options
71
77
 
72
78
  | Flag | Description |
73
79
  | :--- | :--- |
74
80
  | `-h`, `--help` | Show help message |
81
+ | `-p`, `--proxy <url>` | Proxy URL for API requests. Supports `http://`, `https://`, `socks4://`, `socks5://` protocols. Format: `protocol://ip:port` or `protocol://user:pass@ip:port` |
75
82
 
76
83
  ### Examples
77
84
 
@@ -100,26 +107,47 @@ opc auth rotate
100
107
  # → Rotated OpenCode API key to: my-backup-key
101
108
  ```
102
109
 
110
+ Rotate through a SOCKS5 proxy:
111
+
112
+ ```bash
113
+ opc auth rotate --proxy socks5://127.0.0.1:1080
114
+ ```
115
+
103
116
  ### How it works
104
117
 
105
118
  1. **Database check**: On every command except `--help`, the tool first verifies the OpenCode database is accessible via `checkDatabase()`.
106
119
  2. **List**: Queries the `session` or `project` table and displays results in formatted tables with dynamic column widths.
107
120
  3. **Delete**: Uses recursive SQL (Common Table Expressions) to delete sessions and their descendants, or cascading deletes for project sessions.
108
- 4. **Auth rotate**: Reads `.opencode.keys.jsonc` (or `.opencode.keys.json` as fallback) from the current directory, filters out the currently active key, tests each remaining key via `checkOpenCodeApi()`, and sets the first one that responds successfully.
121
+ 4. **Auth rotate**: Reads `opencode.keys` from the project config (via `getConfig()`), filters out the currently active key, tests each remaining key via `checkOpenCodeApi()`, and sets the first one that responds successfully. If `--proxy` is provided, it's passed through to `checkOpenCodeApi()` which creates a `ProxyAgent` for the HTTP/SOCKS proxy.
109
122
 
110
123
  ### Requirements
111
124
 
112
- For `auth rotate`, create a `.opencode.keys.jsonc` file in your project root:
125
+ For `auth rotate`, add an `opencode.keys` array to your [project config](../readme.md#configuration). Create a `binary-collections.config.{js,cjs,mjs}` file:
126
+
127
+ ```js
128
+ // binary-collections.config.js (ESM) or .cjs (CJS)
129
+ export default {
130
+ opencode: {
131
+ keys: [
132
+ { name: 'primary', key: 'sk-xxxxxx' },
133
+ { name: 'backup', key: 'sk-yyyyyy' }
134
+ ]
135
+ }
136
+ };
137
+ ```
138
+
139
+ Or in `package.json`:
113
140
 
114
- ```jsonc
115
- [
116
- // Each key must have a unique name and the actual API key value.
117
- // Add this file to .gitignore to keep it private.
118
- {
119
- "name": "unique name for the key, e.g. email or username",
120
- "key": "the actual key, e.g. sk-xxxxxx"
141
+ ```json
142
+ {
143
+ "binary-collections": {
144
+ "opencode": {
145
+ "keys": [
146
+ { "name": "primary", "key": "sk-xxxxxx" }
147
+ ]
148
+ }
121
149
  }
122
- ]
150
+ }
123
151
  ```
124
152
 
125
153
  ## Source
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/binary-collections/config-types.ts
16
+ var config_types_exports = {};
17
+ module.exports = __toCommonJS(config_types_exports);
@@ -0,0 +1,12 @@
1
+ interface OpencodeKey {
2
+ name: string;
3
+ key: string;
4
+ }
5
+ export interface BinaryCollectionsConfig {
6
+ tempDir?: string;
7
+ githubToken?: string;
8
+ opencode?: {
9
+ keys: OpencodeKey[];
10
+ };
11
+ }
12
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
+ import {
3
+ init_esm_shims
4
+ } from "../chunk-QQ4A6DLD.mjs";
5
+
6
+ // src/binary-collections/config-types.ts
7
+ init_esm_shims();
@@ -116,23 +116,31 @@ var path = require("upath");
116
116
  var minimistLib = require("minimist");
117
117
  var { findEnvWithToken } = require_findEnvFiles();
118
118
  var dotenv = require("dotenv");
119
+ var { cosmiconfig } = require("cosmiconfig");
119
120
  var loadDotenv = (tokenKey = /ACCESS_TOKEN|GITHUB_TOKEN/) => dotenv.config({ path: findEnvWithToken(void 0, tokenKey), quiet: true, overwrite: true });
120
121
  loadDotenv();
121
122
  var cliArgv = minimistLib(process.argv.slice(2), {
122
123
  string: ["token"]
123
124
  });
124
125
  var GITHUB_ACCESS_TOKEN = cliArgv.token || process.env.ACCESS_TOKEN || process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
125
- function getTempDir() {
126
- return process.env.TEMP_DIR || path.join(process.cwd(), "tmp");
127
- }
128
126
  function getTempPath(...segments) {
129
- return path.join(getTempDir(), ...segments);
127
+ return path.join(process.env.TEMP_DIR || path.join(process.cwd(), "tmp"), ...segments);
128
+ }
129
+ async function getConfig(options = {}) {
130
+ const explorer = cosmiconfig("binary-collections", {
131
+ searchStrategy: "project",
132
+ stopDir: options.stopDir
133
+ });
134
+ try {
135
+ const result = await explorer.search(options.searchFrom);
136
+ return result ? result.config : null;
137
+ } catch {
138
+ return null;
139
+ }
130
140
  }
131
- var TEMP_BASE_DIR = getTempDir();
132
141
  module.exports = {
133
- getTempDir,
134
142
  getTempPath,
135
- TEMP_BASE_DIR,
136
143
  GITHUB_ACCESS_TOKEN,
137
- loadDotenv
144
+ loadDotenv,
145
+ getConfig
138
146
  };
@@ -1,19 +1,9 @@
1
- /**
2
- * Get the base temporary directory path
3
- * Can be overridden via TEMP_DIR environment variable
4
- * @returns {string} The base temporary directory path
5
- */
6
- export function getTempDir(): string;
7
1
  /**
8
2
  * Get a temporary file or directory path
9
3
  * @param {...string} segments - Path segments to join with the temp directory
10
4
  * @returns {string} The full temporary path
11
5
  */
12
6
  export function getTempPath(...segments: string[]): string;
13
- /**
14
- * Legacy aliases for backward compatibility
15
- */
16
- export const TEMP_BASE_DIR: string;
17
7
  export const GITHUB_ACCESS_TOKEN: any;
18
8
  /**
19
9
  * Load .env file containing a token variable.
@@ -24,3 +14,21 @@ export const GITHUB_ACCESS_TOKEN: any;
24
14
  * @returns {void}
25
15
  */
26
16
  export function loadDotenv(tokenKey?: string | RegExp): void;
17
+ /**
18
+ * Search for project configuration using cosmiconfig (async).
19
+ *
20
+ * Only `binary-collections.config.js` / `.cjs` / `.mjs` are supported (no `.rc`, JSON, or YAML).
21
+ *
22
+ * Looks for configuration in:
23
+ * - `binary-collections.config.js` / `.cjs` / `.mjs` (searched from project root upward)
24
+ * - A `binary-collections` property in `package.json`
25
+ *
26
+ * @param {object} [options] - Optional configuration overrides.
27
+ * @param {string} [options.searchFrom] - Directory to start searching from (default: process.cwd()).
28
+ * @param {string} [options.stopDir] - Directory to stop searching upwards (e.g., project root).
29
+ * @returns {Promise<import('./config-types').BinaryCollectionsConfig|null>} The parsed configuration object, or `null` if no config found.
30
+ */
31
+ export function getConfig(options?: {
32
+ searchFrom?: string;
33
+ stopDir?: string;
34
+ }): Promise<import("./config-types").BinaryCollectionsConfig | null>;
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  require_config
4
- } from "../chunk-SARIXFHP.mjs";
4
+ } from "../chunk-3T6AMFI3.mjs";
5
5
  import "../chunk-J4M5EL5P.mjs";
6
6
  import "../chunk-QQ4A6DLD.mjs";
7
7
  export default require_config();
@@ -8,7 +8,7 @@ var require_package = __commonJS({
8
8
  "package.json"(exports2, module2) {
9
9
  module2.exports = {
10
10
  name: "binary-collections",
11
- version: "2.0.14",
11
+ version: "2.0.15",
12
12
  description: "Utility to clean any programming caches and more",
13
13
  keywords: [
14
14
  "cache",
@@ -68,7 +68,8 @@ var require_package = __commonJS({
68
68
  "update:ncu": "npx npm-check-updates -u --enginesNode --root -x jest -x @types/jest -x babel-jest -x @babel/core -x @babel/preset-env -x @babel/preset-typescript -x ts-jest -x eslint -x @eslint/eslintrc -x @eslint/js -x @typescript-eslint/eslint-plugin -x @typescript-eslint/parser -x eslint-config-prettier -x eslint-plugin-prettier -x typescript-eslint -x prettier -x typescript -x ts-node -x @yarnpkg/core",
69
69
  "update:packer": "curl -L https://github.com/dimaslanjaka/nodejs-package-types/raw/main/packer.js > packer.cjs",
70
70
  serve: "php -S 0.0.0.0:8490",
71
- upload: "node scripts/upload-backend.mjs"
71
+ upload: "node scripts/upload-backend.mjs",
72
+ "mkdocs-serve": 'mkdocs serve -a "0.0.0.0:5173" --livereload'
72
73
  },
73
74
  repository: {
74
75
  type: "git",
@@ -79,6 +80,7 @@ var require_package = __commonJS({
79
80
  "ansi-colors": "^4.1.3",
80
81
  axios: "^1.16.1",
81
82
  "better-sqlite3": "^12.10.0",
83
+ cosmiconfig: "^9.0.1",
82
84
  "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/78b09a1f799430fb251c1b438ec56ce7957674f4/release/cross-spawn.tgz",
83
85
  "crypto-js": "^4.2.0",
84
86
  dotenv: "^17.4.2",
@@ -88,6 +90,7 @@ var require_package = __commonJS({
88
90
  minimatch: "^10.2.5",
89
91
  minimist: "^1.2.8",
90
92
  openai: "^6.41.0",
93
+ "proxy-agent": "^8.0.1",
91
94
  "ps-node": "^0.1.6",
92
95
  puppeteer: "^25.0.4",
93
96
  "puppeteer-extra": "^3.3.6",
@@ -97,8 +100,7 @@ var require_package = __commonJS({
97
100
  upath: "^3.0.7",
98
101
  which: "^7.0.0",
99
102
  yaml: "^2.9.0",
100
- yarn: "^1.22.22",
101
- zlib: "^1.0.5"
103
+ yarn: "^1.22.22"
102
104
  },
103
105
  devDependencies: {
104
106
  "@babel/core": "^7.29.0",
@@ -154,7 +156,7 @@ var require_package = __commonJS({
154
156
  "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/eb82c8e0e60ce425fdf6e89cd53f4391bb8c77cd/release/cross-spawn.tgz",
155
157
  "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/7a28dad83c17abfc4b6ccd2b7327c39ff67adfe5/release/git-command-helper.tgz",
156
158
  "sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/44e5c7b79b4e60f8c2d34857c27b8ce677d7493e/packages/sbg-utility/release/sbg-utility.tgz",
157
- "@dimaslanjaka/eslint-base-config": "https://github.com/dimaslanjaka/eslint-base-config/raw/9741b4feac89f303ea585e3ecac2b0e768434135/release/dimaslanjaka-eslint-base-config.tgz"
159
+ "@dimaslanjaka/eslint-base-config": "https://github.com/dimaslanjaka/eslint-base-config/raw/822b872f18985462f0da358579cd6493472a2ee0/release/dimaslanjaka-eslint-base-config.tgz"
158
160
  },
159
161
  bin: {
160
162
  "actions-badge": "lib/github-workflows/workflow-badge-cli.cjs",
@@ -227,7 +229,7 @@ var require_package = __commonJS({
227
229
  "pkg-res-updater": "lib/package-resolutions-updater-cli.cjs",
228
230
  "pkg-resolutions-updater": "lib/package-resolutions-updater-cli.cjs",
229
231
  "print-directory-tree": "lib/print-directory-tree.cjs",
230
- "print-tarball-tree": "lib/print-tarball-tree.cjs",
232
+ "print-tarball-tree": "lib/print-tarball-tree-cli.cjs",
231
233
  "print-tree": "lib/print-directory-tree.cjs",
232
234
  prod: "binaries/prod.cjs",
233
235
  py: "binaries/py.cjs",
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  require_findScript
4
- } from "../chunk-XI67TI46.mjs";
5
- import "../chunk-AJ3OIYYP.mjs";
4
+ } from "../chunk-DHFRWM2W.mjs";
5
+ import "../chunk-WNUEY6VJ.mjs";
6
6
  import "../chunk-QQ4A6DLD.mjs";
7
7
  export default require_findScript();
@@ -8,7 +8,7 @@ var require_package = __commonJS({
8
8
  "package.json"(exports2, module2) {
9
9
  module2.exports = {
10
10
  name: "binary-collections",
11
- version: "2.0.14",
11
+ version: "2.0.15",
12
12
  description: "Utility to clean any programming caches and more",
13
13
  keywords: [
14
14
  "cache",
@@ -68,7 +68,8 @@ var require_package = __commonJS({
68
68
  "update:ncu": "npx npm-check-updates -u --enginesNode --root -x jest -x @types/jest -x babel-jest -x @babel/core -x @babel/preset-env -x @babel/preset-typescript -x ts-jest -x eslint -x @eslint/eslintrc -x @eslint/js -x @typescript-eslint/eslint-plugin -x @typescript-eslint/parser -x eslint-config-prettier -x eslint-plugin-prettier -x typescript-eslint -x prettier -x typescript -x ts-node -x @yarnpkg/core",
69
69
  "update:packer": "curl -L https://github.com/dimaslanjaka/nodejs-package-types/raw/main/packer.js > packer.cjs",
70
70
  serve: "php -S 0.0.0.0:8490",
71
- upload: "node scripts/upload-backend.mjs"
71
+ upload: "node scripts/upload-backend.mjs",
72
+ "mkdocs-serve": 'mkdocs serve -a "0.0.0.0:5173" --livereload'
72
73
  },
73
74
  repository: {
74
75
  type: "git",
@@ -79,6 +80,7 @@ var require_package = __commonJS({
79
80
  "ansi-colors": "^4.1.3",
80
81
  axios: "^1.16.1",
81
82
  "better-sqlite3": "^12.10.0",
83
+ cosmiconfig: "^9.0.1",
82
84
  "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/78b09a1f799430fb251c1b438ec56ce7957674f4/release/cross-spawn.tgz",
83
85
  "crypto-js": "^4.2.0",
84
86
  dotenv: "^17.4.2",
@@ -88,6 +90,7 @@ var require_package = __commonJS({
88
90
  minimatch: "^10.2.5",
89
91
  minimist: "^1.2.8",
90
92
  openai: "^6.41.0",
93
+ "proxy-agent": "^8.0.1",
91
94
  "ps-node": "^0.1.6",
92
95
  puppeteer: "^25.0.4",
93
96
  "puppeteer-extra": "^3.3.6",
@@ -97,8 +100,7 @@ var require_package = __commonJS({
97
100
  upath: "^3.0.7",
98
101
  which: "^7.0.0",
99
102
  yaml: "^2.9.0",
100
- yarn: "^1.22.22",
101
- zlib: "^1.0.5"
103
+ yarn: "^1.22.22"
102
104
  },
103
105
  devDependencies: {
104
106
  "@babel/core": "^7.29.0",
@@ -154,7 +156,7 @@ var require_package = __commonJS({
154
156
  "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/eb82c8e0e60ce425fdf6e89cd53f4391bb8c77cd/release/cross-spawn.tgz",
155
157
  "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/7a28dad83c17abfc4b6ccd2b7327c39ff67adfe5/release/git-command-helper.tgz",
156
158
  "sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/44e5c7b79b4e60f8c2d34857c27b8ce677d7493e/packages/sbg-utility/release/sbg-utility.tgz",
157
- "@dimaslanjaka/eslint-base-config": "https://github.com/dimaslanjaka/eslint-base-config/raw/9741b4feac89f303ea585e3ecac2b0e768434135/release/dimaslanjaka-eslint-base-config.tgz"
159
+ "@dimaslanjaka/eslint-base-config": "https://github.com/dimaslanjaka/eslint-base-config/raw/822b872f18985462f0da358579cd6493472a2ee0/release/dimaslanjaka-eslint-base-config.tgz"
158
160
  },
159
161
  bin: {
160
162
  "actions-badge": "lib/github-workflows/workflow-badge-cli.cjs",
@@ -227,7 +229,7 @@ var require_package = __commonJS({
227
229
  "pkg-res-updater": "lib/package-resolutions-updater-cli.cjs",
228
230
  "pkg-resolutions-updater": "lib/package-resolutions-updater-cli.cjs",
229
231
  "print-directory-tree": "lib/print-directory-tree.cjs",
230
- "print-tarball-tree": "lib/print-tarball-tree.cjs",
232
+ "print-tarball-tree": "lib/print-tarball-tree-cli.cjs",
231
233
  "print-tree": "lib/print-directory-tree.cjs",
232
234
  prod: "binaries/prod.cjs",
233
235
  py: "binaries/py.cjs",
@@ -1,7 +1,7 @@
1
1
  import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
2
  import {
3
3
  require_listScript
4
- } from "../chunk-D42YBRZW.mjs";
5
- import "../chunk-AJ3OIYYP.mjs";
4
+ } from "../chunk-UAEKSLAX.mjs";
5
+ import "../chunk-WNUEY6VJ.mjs";
6
6
  import "../chunk-QQ4A6DLD.mjs";
7
7
  export default require_listScript();
@@ -185,7 +185,7 @@ var require_package = __commonJS({
185
185
  "package.json"(exports2, module2) {
186
186
  module2.exports = {
187
187
  name: "binary-collections",
188
- version: "2.0.14",
188
+ version: "2.0.15",
189
189
  description: "Utility to clean any programming caches and more",
190
190
  keywords: [
191
191
  "cache",
@@ -245,7 +245,8 @@ var require_package = __commonJS({
245
245
  "update:ncu": "npx npm-check-updates -u --enginesNode --root -x jest -x @types/jest -x babel-jest -x @babel/core -x @babel/preset-env -x @babel/preset-typescript -x ts-jest -x eslint -x @eslint/eslintrc -x @eslint/js -x @typescript-eslint/eslint-plugin -x @typescript-eslint/parser -x eslint-config-prettier -x eslint-plugin-prettier -x typescript-eslint -x prettier -x typescript -x ts-node -x @yarnpkg/core",
246
246
  "update:packer": "curl -L https://github.com/dimaslanjaka/nodejs-package-types/raw/main/packer.js > packer.cjs",
247
247
  serve: "php -S 0.0.0.0:8490",
248
- upload: "node scripts/upload-backend.mjs"
248
+ upload: "node scripts/upload-backend.mjs",
249
+ "mkdocs-serve": 'mkdocs serve -a "0.0.0.0:5173" --livereload'
249
250
  },
250
251
  repository: {
251
252
  type: "git",
@@ -256,6 +257,7 @@ var require_package = __commonJS({
256
257
  "ansi-colors": "^4.1.3",
257
258
  axios: "^1.16.1",
258
259
  "better-sqlite3": "^12.10.0",
260
+ cosmiconfig: "^9.0.1",
259
261
  "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/78b09a1f799430fb251c1b438ec56ce7957674f4/release/cross-spawn.tgz",
260
262
  "crypto-js": "^4.2.0",
261
263
  dotenv: "^17.4.2",
@@ -265,6 +267,7 @@ var require_package = __commonJS({
265
267
  minimatch: "^10.2.5",
266
268
  minimist: "^1.2.8",
267
269
  openai: "^6.41.0",
270
+ "proxy-agent": "^8.0.1",
268
271
  "ps-node": "^0.1.6",
269
272
  puppeteer: "^25.0.4",
270
273
  "puppeteer-extra": "^3.3.6",
@@ -274,8 +277,7 @@ var require_package = __commonJS({
274
277
  upath: "^3.0.7",
275
278
  which: "^7.0.0",
276
279
  yaml: "^2.9.0",
277
- yarn: "^1.22.22",
278
- zlib: "^1.0.5"
280
+ yarn: "^1.22.22"
279
281
  },
280
282
  devDependencies: {
281
283
  "@babel/core": "^7.29.0",
@@ -331,7 +333,7 @@ var require_package = __commonJS({
331
333
  "cross-spawn": "https://github.com/dimaslanjaka/node-cross-spawn/raw/eb82c8e0e60ce425fdf6e89cd53f4391bb8c77cd/release/cross-spawn.tgz",
332
334
  "git-command-helper": "https://github.com/dimaslanjaka/git-command-helper/raw/7a28dad83c17abfc4b6ccd2b7327c39ff67adfe5/release/git-command-helper.tgz",
333
335
  "sbg-utility": "https://github.com/dimaslanjaka/static-blog-generator/raw/44e5c7b79b4e60f8c2d34857c27b8ce677d7493e/packages/sbg-utility/release/sbg-utility.tgz",
334
- "@dimaslanjaka/eslint-base-config": "https://github.com/dimaslanjaka/eslint-base-config/raw/9741b4feac89f303ea585e3ecac2b0e768434135/release/dimaslanjaka-eslint-base-config.tgz"
336
+ "@dimaslanjaka/eslint-base-config": "https://github.com/dimaslanjaka/eslint-base-config/raw/822b872f18985462f0da358579cd6493472a2ee0/release/dimaslanjaka-eslint-base-config.tgz"
335
337
  },
336
338
  bin: {
337
339
  "actions-badge": "lib/github-workflows/workflow-badge-cli.cjs",
@@ -404,7 +406,7 @@ var require_package = __commonJS({
404
406
  "pkg-res-updater": "lib/package-resolutions-updater-cli.cjs",
405
407
  "pkg-resolutions-updater": "lib/package-resolutions-updater-cli.cjs",
406
408
  "print-directory-tree": "lib/print-directory-tree.cjs",
407
- "print-tarball-tree": "lib/print-tarball-tree.cjs",
409
+ "print-tarball-tree": "lib/print-tarball-tree-cli.cjs",
408
410
  "print-tree": "lib/print-directory-tree.cjs",
409
411
  prod: "binaries/prod.cjs",
410
412
  py: "binaries/py.cjs",
@@ -5,11 +5,11 @@ import {
5
5
  } from "./chunk-PXBMHE7O.mjs";
6
6
  import {
7
7
  require_findScript
8
- } from "./chunk-XI67TI46.mjs";
8
+ } from "./chunk-DHFRWM2W.mjs";
9
9
  import {
10
10
  require_listScript
11
- } from "./chunk-D42YBRZW.mjs";
12
- import "./chunk-AJ3OIYYP.mjs";
11
+ } from "./chunk-UAEKSLAX.mjs";
12
+ import "./chunk-WNUEY6VJ.mjs";
13
13
  import {
14
14
  require_utils
15
15
  } from "./chunk-6RK5UCTP.mjs";