binary-collections 2.0.13 → 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.
- package/.opencode/plugins/opencode-request-logger/README.md +44 -0
- package/.venv/Lib/site-packages/pyarrow/tests/data/orc/README.md +22 -0
- package/binaries/binary-executor.cjs +307 -238
- package/binaries/clean-nodemodule.cjs +307 -238
- package/binaries/clean-nodemodules.cjs +307 -238
- package/binaries/composer.cjs +323 -0
- package/binaries/composer.cmd +2 -0
- package/binaries/composer.phar +0 -0
- package/binaries/dev.cjs +307 -238
- package/binaries/empty.cjs +307 -238
- package/binaries/git-reduce-size.cjs +307 -238
- package/binaries/javakill.cjs +307 -238
- package/binaries/kill-process.cjs +307 -238
- package/binaries/nodekill.cjs +307 -238
- package/binaries/prod.cjs +307 -238
- package/binaries/py.cjs +307 -238
- package/binaries/rmfind.cjs +307 -238
- package/binaries/rmx.cjs +307 -238
- package/binaries/submodule-token.cjs +307 -238
- package/binaries/test-cjs.cjs +307 -238
- package/binaries/test-esm.cjs +307 -238
- package/binaries/yarn-clean.cjs +307 -238
- package/binaries/yc.cjs +307 -238
- package/binaries/ycw.cjs +307 -238
- package/docs-src/binary-collections.md +1 -1
- package/docs-src/clean-github-actions-caches.md +1 -1
- package/docs-src/copy-move-file.md +1 -4
- package/docs-src/del-ps.md +1 -1
- package/docs-src/find-node-modules.md +1 -1
- package/docs-src/generate-test-ci.md +56 -0
- package/docs-src/get-latest-workflow-status.md +100 -0
- package/docs-src/git-diff.md +1 -1
- package/docs-src/git-fix.md +1 -1
- package/docs-src/git-purge.md +1 -1
- package/docs-src/install-opencode-plugins.md +86 -0
- package/docs-src/kill-night-crows.md +1 -1
- package/docs-src/node-cache-cleaner.md +2 -2
- package/docs-src/node-package-packer.md +1 -1
- package/docs-src/opencode-cli.md +155 -0
- package/docs-src/package-resolutions-updater.md +1 -1
- package/docs-src/rmpath.md +1 -1
- package/docs-src/run-by-checksum.md +1 -1
- package/docs-src/submodule-remove.md +1 -1
- package/docs-src/upload-backend.md +29 -0
- package/docs-src/vscode-cli.md +84 -0
- package/docs-src/workflow-badge.md +120 -0
- package/lib/binary-collections/config-types.cjs +17 -0
- package/lib/binary-collections/config-types.d.ts +12 -0
- package/lib/binary-collections/config-types.js +2 -0
- package/lib/binary-collections/config-types.mjs +7 -0
- package/lib/binary-collections/config.cjs +28 -8
- package/lib/binary-collections/config.d.cts +26 -8
- package/lib/binary-collections/config.mjs +2 -2
- package/lib/binary-collections/findScript.cjs +49 -25
- package/lib/binary-collections/findScript.mjs +2 -2
- package/lib/binary-collections/listScript.cjs +49 -25
- package/lib/binary-collections/listScript.mjs +2 -2
- package/lib/binary-collections.cjs +49 -25
- package/lib/binary-collections.mjs +6 -6
- package/lib/changelog.cjs +142 -4
- package/lib/changelog.mjs +9 -5
- package/lib/chunk-3T6AMFI3.mjs +52 -0
- package/lib/{chunk-2MN4VPV2.mjs → chunk-3ZF2QMDK.mjs} +4 -4
- package/lib/chunk-56BVU63B.mjs +86 -0
- package/lib/chunk-7N52Z4IJ.mjs +39 -0
- package/lib/chunk-B77D3SR4.mjs +28 -0
- package/lib/chunk-BPED62FN.mjs +115 -0
- package/lib/{chunk-RDN6HF5Z.mjs → chunk-DHFRWM2W.mjs} +1 -1
- package/lib/chunk-DPEE3FBB.mjs +146 -0
- package/lib/{chunk-MGPYPKIE.mjs → chunk-H7AE4IO3.mjs} +5 -1
- package/lib/{chunk-H44UWUFY.mjs → chunk-J4M5EL5P.mjs} +3 -0
- package/lib/chunk-KCJYREA2.mjs +67 -0
- package/lib/chunk-LACQTD5V.mjs +225 -0
- package/lib/{chunk-TBWXE7ST.mjs → chunk-NHD4HLSU.mjs} +24 -31
- package/lib/{chunk-RDGDLSPD.mjs → chunk-OWNVMKAA.mjs} +6 -5
- package/lib/chunk-SKVF4TMD.mjs +59 -0
- package/lib/{chunk-BZWVHODJ.mjs → chunk-TDUUOAQD.mjs} +5 -5
- package/lib/chunk-TP3O2JGW.mjs +88 -0
- package/lib/{chunk-FLYSZFLW.mjs → chunk-UAEKSLAX.mjs} +1 -1
- package/lib/chunk-UDZBVKXH.mjs +94 -0
- package/lib/chunk-UEOWRYAN.mjs +32 -0
- package/lib/chunk-V6PTSDW5.mjs +82 -0
- package/lib/{chunk-NQXUYO67.mjs → chunk-WNUEY6VJ.mjs} +49 -25
- package/lib/chunk-X7UVQ6ZC.mjs +183 -0
- package/lib/chunk-XW5NZAKI.mjs +82 -0
- package/lib/{chunk-LVSPEFU2.mjs → chunk-Z53IUBUN.mjs} +6 -5
- package/lib/{chunk-CD3HF3LK.mjs → chunk-Z7RM46Q4.mjs} +5 -11
- package/lib/chunk-ZB4IQ6VJ.mjs +46 -0
- package/lib/del-gradle.cjs +1 -1
- package/lib/del-gradle.mjs +22 -16
- package/lib/del-node-modules.cjs +1 -1
- package/lib/del-node-modules.mjs +148 -142
- package/lib/find-node-modules-cli.cjs +1 -1
- package/lib/find-node-modules-cli.mjs +10 -4
- package/lib/{git-diff-cli.cjs → git/git-diff-cli.cjs} +32 -12
- package/lib/{git-diff-cli.mjs → git/git-diff-cli.mjs} +7 -7
- package/lib/{git-diff.cjs → git/git-diff.cjs} +30 -10
- package/lib/{git-diff.js → git/git-diff.js} +3 -3
- package/lib/{git-diff.mjs → git/git-diff.mjs} +6 -6
- package/lib/{git-fix.cjs → git/git-fix.cjs} +142 -3
- package/lib/{git-fix.mjs → git/git-fix.mjs} +19 -14
- package/lib/{git-purge.cjs → git/git-purge.cjs} +1 -1
- package/lib/{git-purge.mjs → git/git-purge.mjs} +4 -4
- package/lib/git/user-config.cjs +139 -1
- package/lib/git/user-config.mjs +3 -1
- package/lib/{clean-github-actions-caches-cli.cjs → github-workflows/clean-github-actions-caches-cli.cjs} +46 -10
- package/lib/{clean-github-actions-caches-cli.mjs → github-workflows/clean-github-actions-caches-cli.mjs} +7 -6
- package/lib/{clean-github-actions-caches.cjs → github-workflows/clean-github-actions-caches.cjs} +46 -10
- package/lib/{clean-github-actions-caches.mjs → github-workflows/clean-github-actions-caches.mjs} +5 -4
- package/lib/github-workflows/generate-test-ci-step-cli.cjs +240 -0
- package/lib/github-workflows/generate-test-ci-step-cli.d.mts +2 -0
- package/lib/github-workflows/generate-test-ci-step-cli.mjs +132 -0
- package/lib/github-workflows/get-latest-workflow-status-cli.cjs +549 -0
- package/lib/github-workflows/get-latest-workflow-status-cli.d.mts +2 -0
- package/lib/github-workflows/get-latest-workflow-status-cli.mjs +61 -0
- package/lib/github-workflows/get-latest-workflow-status.cjs +56 -0
- package/lib/github-workflows/get-latest-workflow-status.d.mts +1 -0
- package/lib/github-workflows/get-latest-workflow-status.mjs +8 -0
- package/lib/github-workflows/utils.cjs +279 -0
- package/lib/github-workflows/utils.d.cts +76 -0
- package/lib/github-workflows/utils.mjs +8 -0
- package/lib/github-workflows/workflow-badge-cli.cjs +730 -0
- package/lib/github-workflows/workflow-badge-cli.d.mts +2 -0
- package/lib/github-workflows/workflow-badge-cli.mjs +98 -0
- package/lib/github-workflows/workflow-badge-generator.cjs +200 -0
- package/lib/github-workflows/workflow-badge-generator.d.mts +14 -0
- package/lib/github-workflows/workflow-badge-generator.mjs +8 -0
- package/lib/github-workflows/workflow-test-data.cjs +73 -0
- package/lib/github-workflows/workflow-test-data.d.cts +63 -0
- package/lib/github-workflows/workflow-test-data.mjs +6 -0
- package/lib/node-cache-cleaner-cli.mjs +3 -3
- package/lib/opencode/cli/auth-rotate.cjs +458 -0
- package/lib/opencode/cli/auth-rotate.d.ts +3 -0
- package/lib/opencode/cli/auth-rotate.js +65 -0
- package/lib/opencode/cli/auth-rotate.mjs +14 -0
- package/lib/opencode/cli/auth-rotate.runner.cjs +454 -0
- package/lib/opencode/cli/auth-rotate.runner.d.ts +1 -0
- package/lib/opencode/cli/auth-rotate.runner.js +8 -0
- package/lib/opencode/cli/auth-rotate.runner.mjs +21 -0
- package/lib/opencode/cli/list-projects.cjs +184 -0
- package/lib/opencode/cli/list-projects.d.ts +1 -0
- package/lib/opencode/cli/list-projects.js +32 -0
- package/lib/opencode/cli/list-projects.mjs +11 -0
- package/lib/opencode/cli/list-sessions.cjs +215 -0
- package/lib/opencode/cli/list-sessions.d.ts +1 -0
- package/lib/opencode/cli/list-sessions.js +45 -0
- package/lib/opencode/cli/list-sessions.mjs +11 -0
- package/lib/opencode/database.cjs +349 -0
- package/lib/opencode/database.d.ts +91 -0
- package/lib/opencode/database.js +252 -0
- package/lib/opencode/database.mjs +28 -0
- package/lib/opencode/database.runner.cjs +145 -0
- package/lib/opencode/database.runner.d.ts +1 -0
- package/lib/opencode/database.runner.js +56 -0
- package/lib/opencode/database.runner.mjs +37 -0
- package/lib/opencode/install-opencode-plugins-cli.cjs +82 -0
- package/lib/opencode/install-opencode-plugins-cli.d.ts +1 -0
- package/lib/opencode/install-opencode-plugins-cli.js +78 -0
- package/lib/opencode/install-opencode-plugins-cli.mjs +65 -0
- package/lib/opencode/opencode-zen.runner.cjs +48 -0
- package/lib/opencode/opencode-zen.runner.d.mts +1 -0
- package/lib/opencode/opencode-zen.runner.mjs +31 -0
- package/lib/opencode/sqlite.cjs +114 -0
- package/lib/opencode/sqlite.d.ts +18 -0
- package/lib/opencode/sqlite.js +82 -0
- package/lib/opencode/sqlite.mjs +10 -0
- package/lib/opencode/storage.cjs +124 -0
- package/lib/opencode/storage.d.ts +27 -0
- package/lib/opencode/storage.js +101 -0
- package/lib/opencode/storage.mjs +38 -0
- package/lib/opencode/storage.runner.cjs +50 -0
- package/lib/opencode/storage.runner.d.ts +1 -0
- package/lib/opencode/storage.runner.js +13 -0
- package/lib/opencode/storage.runner.mjs +29 -0
- package/lib/opencode/types.cjs +17 -0
- package/lib/opencode/types.d.ts +31 -0
- package/lib/opencode/types.js +2 -0
- package/lib/opencode/types.mjs +7 -0
- package/lib/opencode/utils/check-api.cjs +373 -0
- package/lib/opencode/utils/check-api.d.ts +16 -0
- package/lib/opencode/utils/check-api.js +132 -0
- package/lib/opencode/utils/check-api.mjs +12 -0
- package/lib/opencode/utils/check-api.runner.cjs +0 -0
- package/lib/opencode/utils/check-api.runner.d.ts +0 -0
- package/lib/opencode/utils/check-api.runner.js +1 -0
- package/lib/opencode/utils/check-api.runner.mjs +7 -0
- package/lib/opencode-cli.cjs +796 -0
- package/lib/opencode-cli.d.ts +2 -0
- package/lib/opencode-cli.js +116 -0
- package/lib/opencode-cli.mjs +116 -0
- package/lib/package-resolutions-updater-cli.cjs +189 -154
- package/lib/package-resolutions-updater-cli.mjs +3 -2
- package/lib/package-resolutions-updater.cjs +189 -154
- package/lib/package-resolutions-updater.d.mts +12 -3
- package/lib/package-resolutions-updater.mjs +3 -2
- package/lib/print-directory-tree.cjs +139 -3
- package/lib/print-directory-tree.mjs +6 -3
- package/lib/print-tarball-tree-cli.cjs +305 -0
- package/lib/print-tarball-tree-cli.d.mts +2 -0
- package/lib/print-tarball-tree-cli.mjs +54 -0
- package/lib/print-tarball-tree.cjs +43 -216
- package/lib/print-tarball-tree.d.mts +4 -1
- package/lib/print-tarball-tree.mjs +12 -66
- package/lib/rmpath-cli.cjs +139 -5
- package/lib/rmpath-cli.mjs +3 -1
- package/lib/rmpath.cjs +155 -11
- package/lib/rmpath.mjs +3 -1
- package/lib/run-by-checksum/hash.cjs +50 -56
- package/lib/run-by-checksum/hash.d.cts +24 -0
- package/lib/run-by-checksum/hash.mjs +3 -7
- package/lib/run-by-checksum/run.cjs +95 -42
- package/lib/run-by-checksum/run.js +3 -3
- package/lib/run-by-checksum/run.mjs +2 -2
- package/lib/run-by-checksum-cli.cjs +96 -58
- package/lib/run-by-checksum-cli.mjs +2 -2
- package/lib/submodule-install.cjs +138 -4
- package/lib/submodule-install.mjs +5 -4
- package/lib/submodule-remove-cli.cjs +139 -5
- package/lib/submodule-remove-cli.mjs +3 -1
- package/lib/submodule-remove.cjs +154 -5
- package/lib/submodule-remove.mjs +3 -1
- package/lib/utils/findEnvFiles.cjs +3 -0
- package/lib/utils/findEnvFiles.d.cts +2 -2
- package/lib/utils/findEnvFiles.mjs +1 -1
- package/lib/utils/isDebug.cjs +13 -0
- package/lib/utils/isDebug.d.cts +9 -0
- package/lib/utils/isDebug.mjs +6 -0
- package/lib/vscode/project.cjs +0 -0
- package/lib/vscode/project.d.ts +0 -0
- package/lib/vscode/project.js +1 -0
- package/lib/vscode/project.mjs +7 -0
- package/lib/vscode/storage.cjs +138 -0
- package/lib/vscode/storage.d.ts +51 -0
- package/lib/vscode/storage.js +169 -0
- package/lib/vscode/storage.mjs +42 -0
- package/lib/vscode/storage.runner.cjs +125 -0
- package/lib/vscode/storage.runner.d.ts +1 -0
- package/lib/vscode/storage.runner.js +47 -0
- package/lib/vscode/storage.runner.mjs +60 -0
- package/lib/vscode-cli.cjs +155 -0
- package/lib/vscode-cli.d.ts +2 -0
- package/lib/vscode-cli.js +80 -0
- package/lib/vscode-cli.mjs +71 -0
- package/package.json +50 -26
- package/readme.md +104 -8
- package/releases/readme.md +1 -1
- package/src/github-workflows/generate-test-ci-step-cli.mjs +126 -0
- package/vendor/clue/ndjson-react/README.md +365 -0
- package/vendor/composer/pcre/README.md +189 -0
- package/vendor/composer/semver/README.md +99 -0
- package/vendor/composer/xdebug-handler/README.md +305 -0
- package/vendor/ergebnis/agent-detector/README.md +107 -0
- package/vendor/evenement/evenement/README.md +64 -0
- package/vendor/fidry/cpu-core-counter/README.md +138 -0
- package/vendor/friendsofphp/php-cs-fixer/README.md +97 -0
- package/vendor/psr/container/README.md +13 -0
- package/vendor/psr/event-dispatcher/README.md +6 -0
- package/vendor/psr/log/README.md +58 -0
- package/vendor/react/cache/README.md +367 -0
- package/vendor/react/child-process/README.md +619 -0
- package/vendor/react/dns/README.md +453 -0
- package/vendor/react/event-loop/README.md +930 -0
- package/vendor/react/promise/README.md +722 -0
- package/vendor/react/socket/README.md +1564 -0
- package/vendor/react/stream/README.md +1249 -0
- package/vendor/sebastian/diff/README.md +151 -0
- package/vendor/symfony/console/README.md +30 -0
- package/vendor/symfony/deprecation-contracts/README.md +26 -0
- package/vendor/symfony/event-dispatcher/README.md +25 -0
- package/vendor/symfony/event-dispatcher-contracts/README.md +9 -0
- package/vendor/symfony/filesystem/README.md +23 -0
- package/vendor/symfony/finder/README.md +24 -0
- package/vendor/symfony/options-resolver/README.md +25 -0
- package/vendor/symfony/polyfill-ctype/README.md +12 -0
- package/vendor/symfony/polyfill-intl-grapheme/README.md +32 -0
- package/vendor/symfony/polyfill-intl-normalizer/README.md +14 -0
- package/vendor/symfony/polyfill-mbstring/README.md +13 -0
- package/vendor/symfony/polyfill-php80/README.md +25 -0
- package/vendor/symfony/polyfill-php81/README.md +18 -0
- package/vendor/symfony/polyfill-php84/README.md +23 -0
- package/vendor/symfony/polyfill-php85/README.md +20 -0
- package/vendor/symfony/process/README.md +23 -0
- package/vendor/symfony/service-contracts/README.md +9 -0
- package/vendor/symfony/stopwatch/README.md +52 -0
- package/vendor/symfony/string/README.md +24 -0
- package/lib/chunk-WSHVPGNM.mjs +0 -44
- package/lib/chunk-X2B3X7D4.mjs +0 -35
- package/lib/del-gradle.js +0 -16
- package/lib/del-node-modules.js +0 -211
- package/lib/find-node-modules-cli.js +0 -4
- package/lib/run-by-checksum/hash.d.ts +0 -14
- package/lib/run-by-checksum/hash.js +0 -85
- package/readme.html +0 -784
- /package/lib/{clean-github-actions-caches-cli.d.cts → del-gradle.d.cts} +0 -0
- /package/lib/{del-gradle.d.ts → del-node-modules.d.cts} +0 -0
- /package/lib/{find-node-modules-cli.d.ts → find-node-modules-cli.d.cts} +0 -0
- /package/lib/{git-diff-cli.d.ts → git/git-diff-cli.d.ts} +0 -0
- /package/lib/{git-diff-cli.js → git/git-diff-cli.js} +0 -0
- /package/lib/{git-diff.d.ts → git/git-diff.d.ts} +0 -0
- /package/lib/{git-fix.d.cts → git/git-fix.d.cts} +0 -0
- /package/lib/{git-purge.d.cts → git/git-purge.d.cts} +0 -0
- /package/lib/{del-node-modules.d.ts → github-workflows/clean-github-actions-caches-cli.d.cts} +0 -0
- /package/lib/{clean-github-actions-caches.d.cts → github-workflows/clean-github-actions-caches.d.cts} +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Get Latest Workflow Status
|
|
2
|
+
|
|
3
|
+
Fetches and displays the latest GitHub Actions workflow run from the repository — showing the run name, status, conclusion, branch, and a full job-by-job breakdown with each step's result. Useful for quickly checking CI status from the terminal without opening a browser.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
get-latest-workflow-status [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Aliases
|
|
12
|
+
|
|
13
|
+
This command is available under several names (all invoke the same CLI):
|
|
14
|
+
|
|
15
|
+
- `get-latest-workflow-status` (default)
|
|
16
|
+
- `get-latest-workflow`
|
|
17
|
+
- `latest-workflow`
|
|
18
|
+
- `wf-status`
|
|
19
|
+
|
|
20
|
+
### Options
|
|
21
|
+
|
|
22
|
+
| Flag | Type | Description |
|
|
23
|
+
| :--- | :--- | :--- |
|
|
24
|
+
| `--owner` | `string` | GitHub repository owner (default: auto-detect from git remote or `GH_OWNER` env) |
|
|
25
|
+
| `--repo` | `string` | GitHub repository name (default: auto-detect from git remote or `GH_REPO` env) |
|
|
26
|
+
| `--workflow` | `string` | Filter by workflow filename (e.g. `"test.yml"`) or numeric workflow ID |
|
|
27
|
+
| `--token` | `string` | GitHub access token (overrides `ACCESS_TOKEN` / `GITHUB_TOKEN` / `GH_TOKEN` env vars) |
|
|
28
|
+
| `-h`, `--help` | `boolean` | Show help message |
|
|
29
|
+
|
|
30
|
+
### Environment Variables
|
|
31
|
+
|
|
32
|
+
| Variable | Description |
|
|
33
|
+
| :------- | :---------- |
|
|
34
|
+
| `ACCESS_TOKEN` / `GITHUB_TOKEN` / `GH_TOKEN` | GitHub personal access token with `actions:read` scope (required) |
|
|
35
|
+
| `GH_OWNER` | Override repository owner (optional) |
|
|
36
|
+
| `GH_REPO` | Override repository name (optional) |
|
|
37
|
+
|
|
38
|
+
### Examples
|
|
39
|
+
|
|
40
|
+
Show the latest workflow run for the current repository:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
get-latest-workflow-status
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Show for a specific repository:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
get-latest-workflow-status --owner dimaslanjaka --repo bin
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Filter by a specific workflow YAML file:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
get-latest-workflow-status --workflow test.yml
|
|
56
|
+
get-latest-workflow-status --owner dimaslanjaka --repo bin --workflow deploy.yml
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Show help:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
get-latest-workflow-status --help
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Output Example
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
==============================
|
|
69
|
+
🚀 Latest Workflow Run
|
|
70
|
+
==============================
|
|
71
|
+
Name : Node.js Package Test
|
|
72
|
+
Status : in_progress
|
|
73
|
+
Conclusion: null
|
|
74
|
+
Branch : master
|
|
75
|
+
Run ID : 26797771514
|
|
76
|
+
URL : https://github.com/dimaslanjaka/bin/actions/runs/26797771514
|
|
77
|
+
|
|
78
|
+
==============================
|
|
79
|
+
🧩 Jobs & Steps
|
|
80
|
+
==============================
|
|
81
|
+
|
|
82
|
+
🧱 Job: 🔨 Build, Pack & Test
|
|
83
|
+
Status: in_progress | Conclusion: null
|
|
84
|
+
✅ Set up job -> success (completed)
|
|
85
|
+
✅ ⬇️ Checkout workflow repository -> success (completed)
|
|
86
|
+
✅ ⬇️ Setup CI Environment -> success (completed)
|
|
87
|
+
⚪ 🧪 Run tests in test/example.test.cjs -> null (in_progress)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### How it works
|
|
91
|
+
|
|
92
|
+
1. **Authenticate** — Uses `ACCESS_TOKEN` / `GITHUB_TOKEN` / `GH_TOKEN` to call the GitHub API.
|
|
93
|
+
2. **Detect repository** — Owner and repo are auto-detected from the `git remote.origin.url`, or can be overridden with `--owner`/`--repo` flags or `GH_OWNER`/`GH_REPO` environment variables.
|
|
94
|
+
3. **Fetch latest run** — Calls `GET /repos/{owner}/{repo}/actions/runs?per_page=1` to get the most recent workflow run. If `--workflow` is specified, appends `&workflow_id=<name>` to filter by workflow filename or ID.
|
|
95
|
+
4. **Fetch jobs** — Calls `GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs` to retrieve all jobs and their steps.
|
|
96
|
+
5. **Print report** — Renders a formatted terminal report with color-coded icons (✅ success, ❌ failure, ⏭️ skipped, ⚪ pending/in progress).
|
|
97
|
+
|
|
98
|
+
## Source
|
|
99
|
+
|
|
100
|
+
See [`src/github-workflows/get-latest-workflow-status-cli.mjs`](../src/github-workflows/get-latest-workflow-status-cli.mjs).
|
package/docs-src/git-diff.md
CHANGED
package/docs-src/git-fix.md
CHANGED
package/docs-src/git-purge.md
CHANGED
|
@@ -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).
|
|
@@ -23,4 +23,4 @@ kill-night-crows
|
|
|
23
23
|
|
|
24
24
|
### Source
|
|
25
25
|
|
|
26
|
-
See [`src/kill-night-crows.mjs`](../src/kill-night-crows.mjs) & [`bin/kill-night-crows.ps1`](../bin/kill-night-crows.ps1)
|
|
26
|
+
See [`src/kill-night-crows.mjs`](../src/kill-night-crows.mjs) & [`bin/kill-night-crows.ps1`](../bin/kill-night-crows.ps1).
|
|
@@ -24,7 +24,7 @@ node-cache-cleaner [options]
|
|
|
24
24
|
|
|
25
25
|
### Source
|
|
26
26
|
|
|
27
|
-
See [`src/node-cache-cleaner-cli.ts`](../src/node-cache-cleaner-cli.ts)
|
|
27
|
+
See [`src/node-cache-cleaner-cli.ts`](../src/node-cache-cleaner-cli.ts).
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
@@ -178,5 +178,5 @@ yarn run rm-node-modules
|
|
|
178
178
|
|
|
179
179
|
### Source
|
|
180
180
|
|
|
181
|
-
See [`src/rm-node-module-cli.cjs`](../src/rm-node-module-cli.cjs)
|
|
181
|
+
See [`src/rm-node-module-cli.cjs`](../src/rm-node-module-cli.cjs).
|
|
182
182
|
|
|
@@ -45,4 +45,4 @@ This command is available under the following aliases:
|
|
|
45
45
|
|
|
46
46
|
### Source
|
|
47
47
|
|
|
48
|
-
See [`src/node-package-packer-cli.mjs`](../src/node-package-packer-cli.mjs)
|
|
48
|
+
See [`src/node-package-packer-cli.mjs`](../src/node-package-packer-cli.mjs).
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# OpenCode CLI
|
|
2
|
+
|
|
3
|
+
CLI tool for inspecting and managing an OpenCode database. Connects to the local OpenCode SQLite database (`~/.local/share/opencode/opencode.db`) to list sessions and projects, and to delete sessions or projects. Also supports API key rotation from a local keys file.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
opc <command> [subcommand] [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Aliases
|
|
12
|
+
|
|
13
|
+
This command is available under several aliases (all invoke the same CLI):
|
|
14
|
+
|
|
15
|
+
- `opc` (default)
|
|
16
|
+
- `opencode-cli`
|
|
17
|
+
|
|
18
|
+
### Commands
|
|
19
|
+
|
|
20
|
+
#### `list session`
|
|
21
|
+
|
|
22
|
+
Lists all sessions in a table format showing slug, title, and version.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
opc list session
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
#### `list project`
|
|
29
|
+
|
|
30
|
+
Lists all projects in a table format showing truncated ID, name, and worktree path.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
opc list project
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### `delete session <id>`
|
|
37
|
+
|
|
38
|
+
Deletes a single session and all its descendant sessions by ID.
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
opc delete session <session-id>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### `delete sessions`
|
|
45
|
+
|
|
46
|
+
Deletes **all** sessions from the database (irreversible).
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
opc delete sessions
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### `delete project <id>`
|
|
53
|
+
|
|
54
|
+
Deletes a project's sessions and project record from the OpenCode database (not the real project folder on disk).
|
|
55
|
+
|
|
56
|
+
The `<id>` is the project UUID shown in the first column of `opc list project`. Run that command first to find the project ID you want to delete.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
opc delete project <project-id>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
#### `auth rotate`
|
|
63
|
+
|
|
64
|
+
Rotates the active OpenCode API key by picking the first working key from a local keys file. Iterates through available keys (excluding the current one) and tests each against the OpenCode API, selecting the first that returns a valid response.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
opc auth rotate
|
|
68
|
+
```
|
|
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
|
+
|
|
76
|
+
### Options
|
|
77
|
+
|
|
78
|
+
| Flag | Description |
|
|
79
|
+
| :--- | :--- |
|
|
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` |
|
|
82
|
+
|
|
83
|
+
### Examples
|
|
84
|
+
|
|
85
|
+
List all sessions:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
opc list session
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Delete a specific session:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
opc delete session abc123
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Delete a project's sessions and project record from the OpenCode database (ID obtained from `opc list project`):
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
opc delete project 9a3bb589
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Rotate to a working API key:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
opc auth rotate
|
|
107
|
+
# → Rotated OpenCode API key to: my-backup-key
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Rotate through a SOCKS5 proxy:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
opc auth rotate --proxy socks5://127.0.0.1:1080
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### How it works
|
|
117
|
+
|
|
118
|
+
1. **Database check**: On every command except `--help`, the tool first verifies the OpenCode database is accessible via `checkDatabase()`.
|
|
119
|
+
2. **List**: Queries the `session` or `project` table and displays results in formatted tables with dynamic column widths.
|
|
120
|
+
3. **Delete**: Uses recursive SQL (Common Table Expressions) to delete sessions and their descendants, or cascading deletes for project sessions.
|
|
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.
|
|
122
|
+
|
|
123
|
+
### Requirements
|
|
124
|
+
|
|
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`:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"binary-collections": {
|
|
144
|
+
"opencode": {
|
|
145
|
+
"keys": [
|
|
146
|
+
{ "name": "primary", "key": "sk-xxxxxx" }
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Source
|
|
154
|
+
|
|
155
|
+
See [`src/opencode-cli.ts`](../src/opencode-cli.ts).
|
|
@@ -19,4 +19,4 @@ Scans `package.json` resolutions for GitHub tarball URLs (raw.githubusercontent.
|
|
|
19
19
|
|
|
20
20
|
### Source
|
|
21
21
|
|
|
22
|
-
See [`src/package-resolutions-updater
|
|
22
|
+
See [`src/package-resolutions-updater-cli.mjs`](../src/package-resolutions-updater-cli.mjs).
|
package/docs-src/rmpath.md
CHANGED
|
@@ -19,4 +19,4 @@ Performs a complete removal of a git submodule:
|
|
|
19
19
|
|
|
20
20
|
### Source
|
|
21
21
|
|
|
22
|
-
See [`src/submodule-remove
|
|
22
|
+
See [`src/submodule-remove-cli.js`](../src/submodule-remove-cli.js).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Upload Backend
|
|
2
|
+
|
|
3
|
+
Uploads PHP files from the `backend/` directory to a remote server via SFTP. Reads the connection configuration from `.vscode/sftp.json` and deploys all `.php` files into `{remotePath}/php_backend` on the target server.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
node scripts/upload-backend.mjs
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Prerequisites
|
|
12
|
+
|
|
13
|
+
- An SFTP server configured in `.vscode/sftp.json`
|
|
14
|
+
- PHP files present in the `backend/` directory
|
|
15
|
+
|
|
16
|
+
### Behavior
|
|
17
|
+
|
|
18
|
+
1. Reads `.vscode/sftp.json` for host, port, username, and password
|
|
19
|
+
2. Scans `backend/` for all `*.php` files
|
|
20
|
+
3. Connects to the remote server via SFTP
|
|
21
|
+
4. Creates the `php_backend` subdirectory under the configured `remotePath`
|
|
22
|
+
5. Uploads each PHP file into that directory
|
|
23
|
+
6. Prints a confirmation per uploaded file
|
|
24
|
+
|
|
25
|
+
If no PHP files are found, the script exits with a notice.
|
|
26
|
+
|
|
27
|
+
## Source
|
|
28
|
+
|
|
29
|
+
See [`scripts/upload-backend.mjs`](../scripts/upload-backend.mjs).
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# VSCode CLI
|
|
2
|
+
|
|
3
|
+
CLI tool for inspecting VS Code workspace storage directories. Scans the `workspaceStorage` folder under the VS Code user data directory, reads each subdirectory's `workspace.json`, and lists workspace projects with their storage identifiers. Optionally filters to workspaces that have a Copilot memory tool directory.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
vscode-cli <command> [subcommand] [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Aliases
|
|
12
|
+
|
|
13
|
+
This command is available under the following alias:
|
|
14
|
+
|
|
15
|
+
- `vscode-cli` (default)
|
|
16
|
+
|
|
17
|
+
### Commands
|
|
18
|
+
|
|
19
|
+
#### `list project`
|
|
20
|
+
|
|
21
|
+
Lists all workspace projects in a table format showing truncated storage ID, folder path, and whether Copilot memory tool data exists.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
vscode-cli list project
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### `list project --copilot-memory`
|
|
28
|
+
|
|
29
|
+
Lists only projects that have a Copilot memory tool directory (i.e., those where `GitHub.copilot-chat/memory-tool/memories` exists under the workspace storage directory).
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
vscode-cli list project --copilot-memory
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Short aliases: `--copilotMemory`, `--cm`
|
|
36
|
+
|
|
37
|
+
### Options
|
|
38
|
+
|
|
39
|
+
| Flag | Description |
|
|
40
|
+
| :--- | :--- |
|
|
41
|
+
| `-h`, `--help` | Show help message |
|
|
42
|
+
| `--copilot-memory` | Filter to projects with Copilot memory tool |
|
|
43
|
+
|
|
44
|
+
### Examples
|
|
45
|
+
|
|
46
|
+
List all workspace projects:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
vscode-cli list project
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
List only projects with Copilot memory tool data:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
vscode-cli list project --copilot-memory
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### How it works
|
|
59
|
+
|
|
60
|
+
1. **Scan**: Lists all subdirectories under the VS Code `workspaceStorage` folder (e.g., `%APPDATA%/Code/User/workspaceStorage` on Windows).
|
|
61
|
+
2. **Parse**: Reads `workspace.json` from each subdirectory to extract the workspace `folder` URI.
|
|
62
|
+
3. **Decode**: Converts `file:///` URIs to absolute filesystem paths (e.g., `file:///d%3A/Repositories/project` → `d:/Repositories/project`).
|
|
63
|
+
4. **Filter** (optional): When `--copilot-memory` is specified, only includes entries where `GitHub.copilot-chat/memory-tool/memories` exists on disk.
|
|
64
|
+
5. **Display**: Renders results in a formatted table with dynamic column widths.
|
|
65
|
+
|
|
66
|
+
### Programmatic API
|
|
67
|
+
|
|
68
|
+
The workspace scanning logic can also be imported directly:
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
import { listWorkspaceProjects } from './src/vscode/storage.js';
|
|
72
|
+
|
|
73
|
+
const projects = await listWorkspaceProjects();
|
|
74
|
+
|
|
75
|
+
// projects is WorkspaceEntry[] with:
|
|
76
|
+
// storageId: string — hash-based subdirectory name
|
|
77
|
+
// folder: string — absolute filesystem path (decoded URI)
|
|
78
|
+
// storagePath: string — full path to the workspace storage subdirectory
|
|
79
|
+
// copilotMemoryDir?: string — path to Copilot memory tool directory (if it exists)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Source
|
|
83
|
+
|
|
84
|
+
See [`src/vscode-cli.ts`](../src/vscode-cli.ts).
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Workflow Badge
|
|
2
|
+
|
|
3
|
+
Generates a detailed SVG badge showing the status of the latest GitHub Actions workflow run. Displays workflow metadata, per-job step breakdown, and aggregated status counts — all in a polished card-style SVG suitable for embedding in READMEs, dashboards, or CI summary pages.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
workflow-badge [options]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Aliases
|
|
12
|
+
|
|
13
|
+
This command is available under several aliases (all invoke the same CLI):
|
|
14
|
+
|
|
15
|
+
- `workflow-badge` (default)
|
|
16
|
+
- `wf-badge`
|
|
17
|
+
- `gh-status-badge`
|
|
18
|
+
- `actions-badge`
|
|
19
|
+
|
|
20
|
+
### Options
|
|
21
|
+
|
|
22
|
+
| Flag | Type | Description |
|
|
23
|
+
| :--- | :--- | :--- |
|
|
24
|
+
| `-o`, `--output` | `string` | Write SVG to file instead of stdout |
|
|
25
|
+
| `--owner` | `string` | GitHub repository owner (default: auto-detect from git remote) |
|
|
26
|
+
| `--repo` | `string` | GitHub repository name (default: auto-detect from git remote) |
|
|
27
|
+
| `--workflow` | `string` | Filter by workflow filename (e.g. `"test.yml"`) or numeric workflow ID |
|
|
28
|
+
| `--token` | `string` | GitHub access token (overrides `ACCESS_TOKEN` / `GITHUB_TOKEN` / `GH_TOKEN` env vars) |
|
|
29
|
+
| `--width` | `number` | SVG width in pixels (default: `520`) |
|
|
30
|
+
| `--max-steps` | `number` | Max steps to show per job (default: all). Use to keep badge compact |
|
|
31
|
+
| `-h`, `--help` | `boolean` | Show help message |
|
|
32
|
+
|
|
33
|
+
### Environment Variables
|
|
34
|
+
|
|
35
|
+
| Variable | Description |
|
|
36
|
+
| :------- | :---------- |
|
|
37
|
+
| `ACCESS_TOKEN` / `GITHUB_TOKEN` / `GH_TOKEN` | GitHub personal access token (required for API calls) |
|
|
38
|
+
| `GH_OWNER` | Override repository owner (optional) |
|
|
39
|
+
| `GH_REPO` | Override repository name (optional) |
|
|
40
|
+
|
|
41
|
+
### Examples
|
|
42
|
+
|
|
43
|
+
Preview badge in terminal (SVG printed to stdout):
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
workflow-badge
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Save badge to file:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
workflow-badge --output badge.svg
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Save for a specific repository with custom width:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
workflow-badge --owner dimaslanjaka --repo bin --output docs/workflow-status.svg --width 600
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Keep the badge compact by limiting visible steps per job:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
workflow-badge --max-steps 5 --output compact-badge.svg
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Generate a badge for a specific workflow YAML file:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
workflow-badge --workflow test.yml
|
|
71
|
+
workflow-badge --owner dimaslanjaka --repo bin --workflow deploy.yml --output deploy-badge.svg
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Output
|
|
75
|
+
|
|
76
|
+
The generated SVG is a card-style badge with:
|
|
77
|
+
|
|
78
|
+
- **Accent bar** — color-coded based on overall status (green = passing, red = failing, amber = in progress, grey = cancelled/pending)
|
|
79
|
+
- **Title section** — "Workflow Status" label with status pill
|
|
80
|
+
- **Metadata rows** — workflow name, status, branch, run ID
|
|
81
|
+
- **Jobs breakdown** — each job with its status, plus individual step rows with icons (✓ = passed, ✗ = failed, ◌ = pending, – = skipped)
|
|
82
|
+
- **Footer summary** — aggregated step counts
|
|
83
|
+
|
|
84
|
+
### PHP Backend
|
|
85
|
+
|
|
86
|
+
A PHP script is available at [`backend/workflow-badge.php`](../backend/workflow-badge.php) that serves the badge as a live image via HTTP. It spawns the Node CLI, captures the SVG output, and serves it with the correct `image/svg+xml` content type. The PHP backend requires the full project (with the CLI script under `src/` or `lib/`) to be deployed on the server — it does not fall back to a remote tarball.
|
|
87
|
+
|
|
88
|
+
**Query parameters:**
|
|
89
|
+
|
|
90
|
+
| Parameter | Required | Description |
|
|
91
|
+
| :-------- | :------- | :---------- |
|
|
92
|
+
| `owner` | yes | GitHub repository owner |
|
|
93
|
+
| `repo` | yes | GitHub repository name |
|
|
94
|
+
| `workflow` | no | Filter by workflow filename (e.g. `test.yml`) or workflow ID |
|
|
95
|
+
| `width` | no | SVG width in pixels (200–2000, default: 520) |
|
|
96
|
+
| `max-steps` | no | Max steps to show per job (1–200, default: all) |
|
|
97
|
+
| `token` | no | GitHub access token (overrides server env) |
|
|
98
|
+
|
|
99
|
+
**Requirements:**
|
|
100
|
+
- PHP 7.4+ with `proc_open` enabled
|
|
101
|
+
- The project's Node CLI script deployed on the server (`src/github-workflows/workflow-badge-cli.mjs` or `lib/github-workflows/workflow-badge-cli.cjs`)
|
|
102
|
+
- `ACCESS_TOKEN` (or `GITHUB_TOKEN` / `GH_TOKEN`) environment variable set on the server, or pass `&token=...` per request
|
|
103
|
+
|
|
104
|
+
**Usage as `<img>` tag:**
|
|
105
|
+
|
|
106
|
+
```html
|
|
107
|
+
<img src="https://your-domain.com/backend/workflow-badge.php?owner=dimaslanjaka&repo=bin" />
|
|
108
|
+
<!-- or using our server -->
|
|
109
|
+
<img src="http://sh.webmanajemen.com/php_backend/workflow-badge.php?owner=dimaslanjaka&repo=bin" />
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+

|
|
113
|
+
|
|
114
|
+
You can optionally add `&width=600`, `&max-steps=5`, `&workflow=test.yml`, or `&token=ghp_xxx` to customize the badge appearance or override the server's GitHub token for a single request.
|
|
115
|
+
|
|
116
|
+
The script validates all parameters before passing them to the Node CLI, separates `stdout` (SVG) from `stderr` (diagnostics) via `proc_open`, and returns appropriate HTTP error codes for invalid inputs or CLI failures.
|
|
117
|
+
|
|
118
|
+
## Source
|
|
119
|
+
|
|
120
|
+
See [`src/github-workflows/workflow-badge-cli.mjs`](../src/github-workflows/workflow-badge-cli.mjs).
|
|
@@ -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);
|