binary-collections 2.0.12 → 2.0.14
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/binaries/binary-executor.cjs +307 -162
- package/binaries/clean-nodemodule.cjs +307 -162
- package/binaries/clean-nodemodules.cjs +307 -162
- package/binaries/composer.cjs +323 -0
- package/binaries/composer.cmd +2 -0
- package/binaries/composer.phar +0 -0
- package/binaries/dev.cjs +307 -162
- package/binaries/empty.cjs +307 -162
- package/binaries/git-reduce-size.cjs +307 -162
- package/binaries/javakill.cjs +307 -162
- package/binaries/kill-process.cjs +307 -162
- package/binaries/nodekill.cjs +307 -162
- package/binaries/prod.cjs +307 -162
- package/binaries/py.cjs +307 -162
- package/binaries/rmfind.cjs +307 -162
- package/binaries/rmx.cjs +307 -162
- package/binaries/submodule-token.cjs +307 -162
- package/binaries/test-cjs.cjs +307 -162
- package/binaries/test-esm.cjs +307 -162
- package/binaries/yarn-clean.cjs +307 -162
- package/binaries/yc +22 -1
- package/binaries/yc.cjs +307 -162
- package/binaries/ycw +256 -0
- package/binaries/ycw.cjs +323 -0
- package/docs-src/binary-collections.md +34 -0
- package/docs-src/changelog.md +26 -0
- package/docs-src/clean-github-actions-caches.md +115 -0
- package/docs-src/copy-move-file.md +56 -0
- package/docs-src/del-gradle.md +17 -0
- package/docs-src/del-ps.md +28 -0
- package/docs-src/downloader.md +62 -0
- package/docs-src/env-helpers.md +29 -0
- package/docs-src/find-node-modules.md +17 -0
- package/docs-src/free-chatgpt.md +26 -0
- 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 +33 -0
- package/docs-src/git-fix.md +34 -0
- package/docs-src/git-purge.md +17 -0
- package/docs-src/git-reduce-size.md +17 -0
- package/docs-src/git-undo.md +21 -0
- package/docs-src/kill-night-crows.md +26 -0
- package/docs-src/node-cache-cleaner.md +182 -0
- package/docs-src/node-executor.md +50 -0
- package/docs-src/node-package-packer.md +48 -0
- package/docs-src/npm-run-series.md +43 -0
- package/docs-src/opencode-cli.md +127 -0
- package/docs-src/package-resolutions-updater.md +22 -0
- package/docs-src/php-cs-fixer-staged.md +19 -0
- package/docs-src/print-directory-tree.md +35 -0
- package/docs-src/print-tarball-tree.md +55 -0
- package/docs-src/py.md +19 -0
- package/docs-src/remove-module.md +32 -0
- package/docs-src/rmfind-rmx.md +21 -0
- package/docs-src/rmpath.md +38 -0
- package/docs-src/run-by-checksum.md +87 -0
- package/docs-src/submodule-install.md +31 -0
- package/docs-src/submodule-remove.md +22 -0
- package/docs-src/submodule-token.md +17 -0
- package/docs-src/test-runners.md +21 -0
- 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/docs-src/yarn-install.md +31 -0
- package/docs-src/yarn-reinstall.md +27 -0
- package/lib/binary-collections/config.cjs +15 -3
- package/lib/binary-collections/config.d.cts +10 -0
- package/lib/binary-collections/config.mjs +2 -2
- package/lib/binary-collections/findScript.cjs +75 -28
- package/lib/binary-collections/findScript.mjs +2 -2
- package/lib/binary-collections/listScript.cjs +75 -28
- package/lib/binary-collections/listScript.mjs +2 -2
- package/lib/binary-collections.cjs +85 -43
- package/lib/binary-collections.mjs +8 -8
- package/lib/changelog.cjs +7 -12
- package/lib/changelog.mjs +2 -2
- package/lib/chunk-2SJKVOTN.mjs +146 -0
- package/lib/{chunk-SPTECFE5.mjs → chunk-3F6EIHYG.mjs} +87 -21
- package/lib/chunk-546KAIYT.mjs +113 -0
- package/lib/chunk-56BVU63B.mjs +86 -0
- package/lib/chunk-5WAOOOGZ.mjs +77 -0
- package/lib/{chunk-V2IBPCEV.mjs → chunk-6C7KTYGZ.mjs} +3 -1
- package/lib/{chunk-5RTXZVCW.mjs → chunk-6RK5UCTP.mjs} +5 -10
- package/lib/chunk-72XTQ3CK.mjs +45 -0
- package/lib/chunk-7N52Z4IJ.mjs +39 -0
- package/lib/chunk-7Q6YEUQF.mjs +246 -0
- package/lib/{chunk-ZOWVMII3.mjs → chunk-AJ3OIYYP.mjs} +75 -28
- package/lib/chunk-AQZ7LMFS.mjs +100 -0
- package/lib/chunk-BDCMTOZI.mjs +246 -0
- package/lib/chunk-BEUM4LH4.mjs +184 -0
- package/lib/{chunk-66KDU4TX.mjs → chunk-BO4TZS4Q.mjs} +39 -61
- package/lib/chunk-CM3IC5YC.mjs +226 -0
- package/lib/{chunk-6PU7BAHB.mjs → chunk-D42YBRZW.mjs} +1 -1
- package/lib/chunk-FR3DMHJC.mjs +146 -0
- package/lib/chunk-I3O5ZRYU.mjs +77 -0
- package/lib/chunk-J4M5EL5P.mjs +108 -0
- package/lib/chunk-JK3MG2KF.mjs +236 -0
- package/lib/chunk-JMUFQSPE.mjs +184 -0
- package/lib/chunk-JVMLKHD2.mjs +62 -0
- package/lib/chunk-KAT2JNLZ.mjs +146 -0
- package/lib/chunk-KLKAIFKI.mjs +40 -0
- package/lib/{chunk-FB2WKVJD.mjs → chunk-KRCPFWIF.mjs} +72 -37
- package/lib/chunk-LACQTD5V.mjs +225 -0
- package/lib/chunk-LVSPEFU2.mjs +86 -0
- package/lib/chunk-MCCMMZSM.mjs +60 -0
- package/lib/{chunk-2LSRSEXF.mjs → chunk-MGPYPKIE.mjs} +2 -2
- package/lib/chunk-OA2RKEY3.mjs +162 -0
- package/lib/{chunk-C6D2TTYU.mjs → chunk-OBXLTXFJ.mjs} +4 -2
- package/lib/{chunk-G5UUEWUO.mjs → chunk-PAZH45HS.mjs} +8 -2
- package/lib/chunk-QD4T255Z.mjs +40 -0
- package/lib/{chunk-XPJGCDOD.mjs → chunk-QII2EKCS.mjs} +14 -2
- package/lib/chunk-QZMGBDSA.mjs +32 -0
- package/lib/chunk-RDGDLSPD.mjs +76 -0
- package/lib/chunk-RJKTSUAX.mjs +123 -0
- package/lib/chunk-RKPIBGKE.mjs +61 -0
- package/lib/chunk-SARIXFHP.mjs +44 -0
- package/lib/chunk-SJYP66BO.mjs +62 -0
- package/lib/chunk-SWUAEY4H.mjs +44 -0
- package/lib/chunk-TP3O2JGW.mjs +88 -0
- package/lib/chunk-UAIF5VIA.mjs +89 -0
- package/lib/chunk-UDZBVKXH.mjs +94 -0
- package/lib/chunk-UEOWRYAN.mjs +32 -0
- package/lib/chunk-UHPFLJXH.mjs +227 -0
- package/lib/{chunk-M3YIYRHT.mjs → chunk-UY5VUEA3.mjs} +1 -1
- package/lib/chunk-UYNBNLV5.mjs +113 -0
- package/lib/chunk-WOC4FZ6F.mjs +164 -0
- package/lib/chunk-WSHVPGNM.mjs +44 -0
- package/lib/chunk-X7UVQ6ZC.mjs +183 -0
- package/lib/{chunk-NCZPTKDV.mjs → chunk-XI67TI46.mjs} +1 -1
- package/lib/chunk-XW5NZAKI.mjs +82 -0
- package/lib/chunk-YLV4QATP.mjs +86 -0
- package/lib/chunk-YWSLMAQ7.mjs +65 -0
- package/lib/chunk-ZB4IQ6VJ.mjs +46 -0
- package/lib/cross-env/command.cjs +2 -2
- package/lib/cross-env/command.js +2 -2
- package/lib/cross-env/command.mjs +2 -2
- package/lib/cross-env/index.cjs +2 -2
- package/lib/cross-env/index.mjs +5 -5
- package/lib/cross-env/variable.mjs +2 -2
- package/lib/del-gradle.cjs +7 -12
- package/lib/del-gradle.mjs +23 -17
- package/lib/del-node-modules.cjs +186 -4
- package/lib/del-node-modules.mjs +151 -142
- package/lib/{del-ps.cjs → del-ps-cli.cjs} +36 -41
- package/lib/del-ps-cli.mjs +44 -0
- package/lib/del-yarn-caches.cjs +6 -11
- package/lib/del-yarn-caches.mjs +1 -1
- package/lib/downloader-cli.cjs +256 -0
- package/lib/downloader-cli.mjs +90 -0
- package/lib/file/copy-cli.cjs +183 -2
- package/lib/file/copy-cli.mjs +6 -2
- package/lib/file/move-cli.cjs +183 -2
- package/lib/file/move-cli.mjs +6 -2
- package/lib/find-node-modules-cli.cjs +2 -2
- package/lib/find-node-modules-cli.mjs +11 -5
- package/lib/find-node-modules.cjs +1 -1
- package/lib/find-node-modules.mjs +1 -1
- package/lib/free-chatgpt.cjs +6 -11
- package/lib/free-chatgpt.mjs +1 -1
- package/lib/{git-diff-cli.cjs → git/git-diff-cli.cjs} +109 -36
- package/lib/{git-diff-cli.mjs → git/git-diff-cli.mjs} +7 -7
- package/lib/{git-diff.cjs → git/git-diff.cjs} +107 -34
- package/lib/{git-diff.js → git/git-diff.js} +88 -31
- package/lib/{git-diff.mjs → git/git-diff.mjs} +6 -6
- package/lib/{git-fix.cjs → git/git-fix.cjs} +140 -14
- package/lib/git/git-fix.d.cts +2 -0
- package/lib/{git-fix.mjs → git/git-fix.mjs} +19 -14
- package/lib/{git-purge.cjs → git/git-purge.cjs} +8 -13
- package/lib/{git-purge.mjs → git/git-purge.mjs} +5 -5
- package/lib/git/user-config.cjs +137 -12
- package/lib/git/user-config.mjs +4 -2
- package/lib/{clean-github-actions-caches-cli.cjs → github-workflows/clean-github-actions-caches-cli.cjs} +292 -222
- package/lib/{clean-github-actions-caches-cli.mjs → github-workflows/clean-github-actions-caches-cli.mjs} +30 -11
- package/lib/github-workflows/clean-github-actions-caches.cjs +473 -0
- package/lib/github-workflows/clean-github-actions-caches.d.cts +53 -0
- package/lib/{clean-github-actions-caches.mjs → github-workflows/clean-github-actions-caches.mjs} +5 -3
- 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 +541 -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/{ps/isWin.mjs → github-workflows/get-latest-workflow-status.mjs} +3 -5
- package/lib/github-workflows/utils.cjs +271 -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 +722 -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/index.cjs +1 -1
- package/lib/index.mjs +1 -1
- package/lib/node-cache-cleaner-cli.cjs +185 -2
- package/lib/node-cache-cleaner-cli.js +2 -5
- package/lib/node-cache-cleaner-cli.mjs +8 -4
- package/lib/node-executor.cjs +183 -2
- package/lib/node-executor.mjs +5 -2
- package/lib/node-package-packer/build-readme.cjs +150 -0
- package/lib/node-package-packer/build-readme.d.mts +10 -0
- package/lib/node-package-packer/build-readme.mjs +10 -0
- package/lib/node-package-packer/build-tarball.cjs +495 -0
- package/lib/node-package-packer/build-tarball.d.mts +33 -0
- package/lib/node-package-packer/build-tarball.mjs +175 -0
- package/lib/node-package-packer-cli.cjs +525 -0
- package/lib/node-package-packer-cli.d.mts +1 -0
- package/lib/node-package-packer-cli.mjs +34 -0
- package/lib/npm-run-series.cjs +7 -12
- package/lib/npm-run-series.mjs +2 -2
- package/lib/opencode/cli/auth-rotate.cjs +143 -0
- package/lib/opencode/cli/auth-rotate.d.ts +1 -0
- package/lib/opencode/cli/auth-rotate.js +70 -0
- package/lib/opencode/cli/auth-rotate.mjs +10 -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/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/{ps/isWin.cjs → opencode/types.cjs} +3 -12
- package/lib/opencode/types.d.ts +31 -0
- package/lib/{ps/isWin.js → opencode/types.js} +0 -2
- package/lib/opencode/types.mjs +7 -0
- package/lib/opencode/utils/check-api.cjs +59 -0
- package/lib/opencode/utils/check-api.d.ts +12 -0
- package/lib/opencode/utils/check-api.js +46 -0
- package/lib/opencode/utils/check-api.mjs +8 -0
- package/lib/opencode-cli.cjs +473 -0
- package/lib/opencode-cli.d.ts +2 -0
- package/lib/opencode-cli.js +115 -0
- package/lib/opencode-cli.mjs +111 -0
- package/lib/package-resolutions-updater-cli.cjs +218 -194
- package/lib/package-resolutions-updater-cli.mjs +6 -4
- package/lib/package-resolutions-updater.cjs +216 -192
- package/lib/package-resolutions-updater.d.mts +44 -1
- package/lib/package-resolutions-updater.mjs +5 -3
- package/lib/php-cs-fixer-staged.cjs +1 -1
- package/lib/php-cs-fixer-staged.mjs +1 -1
- package/lib/print-directory-tree.cjs +147 -21
- package/lib/print-directory-tree.mjs +17 -11
- package/lib/print-tarball-tree.cjs +262 -0
- package/lib/print-tarball-tree.d.mts +1 -0
- package/lib/print-tarball-tree.mjs +68 -0
- package/lib/ps/index.cjs +10 -10
- package/lib/ps/index.mjs +4 -4
- package/lib/ps/table-parser.d.ts +3 -4
- package/lib/ps/table-parser.js +9 -16
- package/lib/remove-module.cjs +17 -22
- package/lib/remove-module.mjs +2 -2
- package/lib/rm-node-module-cli.cjs +171 -4
- package/lib/rm-node-module-cli.mjs +7 -4
- package/lib/rmpath-cli.cjs +411 -0
- package/lib/rmpath-cli.d.mts +1 -0
- package/lib/rmpath-cli.mjs +25 -0
- package/lib/rmpath.cjs +113 -188
- package/lib/rmpath.mjs +7 -101
- package/lib/run-by-checksum/cache.cjs +69 -0
- package/lib/run-by-checksum/cache.d.ts +19 -0
- package/lib/run-by-checksum/cache.js +50 -0
- package/lib/run-by-checksum/cache.mjs +12 -0
- package/lib/run-by-checksum/hash.cjs +88 -0
- package/lib/run-by-checksum/hash.d.ts +17 -0
- package/lib/run-by-checksum/hash.js +119 -0
- package/lib/run-by-checksum/hash.mjs +10 -0
- package/lib/run-by-checksum/run.cjs +185 -0
- package/lib/run-by-checksum/run.d.ts +22 -0
- package/lib/run-by-checksum/run.js +93 -0
- package/lib/run-by-checksum/run.mjs +10 -0
- package/lib/run-by-checksum-cli.cjs +398 -0
- package/lib/run-by-checksum-cli.d.ts +2 -0
- package/lib/run-by-checksum-cli.js +43 -0
- package/lib/run-by-checksum-cli.mjs +56 -0
- package/lib/submodule-install.cjs +137 -16
- package/lib/submodule-install.mjs +7 -6
- package/lib/submodule-remove-cli.cjs +300 -7
- package/lib/submodule-remove-cli.js +2 -2
- package/lib/submodule-remove-cli.mjs +8 -3
- package/lib/submodule-remove.cjs +146 -5
- package/lib/submodule-remove.mjs +3 -1
- package/lib/utils/fetchResponse.cjs +24 -0
- package/lib/utils/fetchResponse.d.cts +25 -0
- package/lib/utils/fetchResponse.mjs +6 -0
- 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/index.cjs +5 -10
- package/lib/utils/index.d.cts +2 -9
- package/lib/utils/index.mjs +1 -1
- package/lib/utils/isWindows.mjs +3 -1
- package/lib/utils/runBash.cjs +1 -1
- package/lib/utils/runBash.mjs +1 -1
- 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/lib/yarn-per-branch-lock-installer.cjs +202 -11
- package/lib/yarn-per-branch-lock-installer.mjs +24 -11
- package/lib/yarn-reinstall.cjs +6 -11
- package/lib/yarn-reinstall.mjs +1 -1
- package/package.json +75 -28
- package/readme.html +2 -2
- package/readme.md +44 -11
- package/releases/readme.md +6 -3
- package/src/github-workflows/generate-test-ci-step-cli.mjs +126 -0
- package/tmp/test-repo-runChecksum/test-complex-glob/README.md +1 -0
- package/tmp/test-repo-runChecksum/test-mixed-args/README.md +1 -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/.opencode/package.json +0 -5
- package/lib/chunk-6S4NXESK.mjs +0 -26
- package/lib/clean-github-actions-caches.cjs +0 -249
- package/lib/clean-github-actions-caches.d.cts +0 -15
- package/lib/del-gradle.js +0 -16
- package/lib/del-node-modules.js +0 -211
- package/lib/del-ps.js +0 -32
- package/lib/del-ps.mjs +0 -43
- package/lib/find-node-modules-cli.js +0 -4
- package/lib/ps/isWin.d.ts +0 -2
- package/test/package.json +0 -20
- package/test-project/package.json +0 -22
- package/test-project/workspaces/workspace-a/package.json +0 -135
- package/test-project/workspaces/workspace-a/test/demo/package.json +0 -25
- package/test-project/workspaces/workspace-b/package.json +0 -139
- package/test-project/workspaces/workspace-b/test/sample-project/package.json +0 -7
- package/test-project/workspaces/workspace-b/themes/hexo-theme-flowbite/package.json +0 -96
- package/tmp/rm-node-modules-test-project/package.json +0 -17
- package/tmp/rm-node-modules-test-project/packages/workspace-a/package.json +0 -16
- package/tmp/rm-node-modules-test-project/packages/workspace-b/package.json +0 -16
- package/tmp/test-repo/package.json +0 -17
- /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/{del-node-modules.d.ts → del-ps-cli.d.mts} +0 -0
- /package/lib/{find-node-modules-cli.d.ts → downloader-cli.d.cts} +0 -0
- /package/lib/{git-diff-cli.d.ts → find-node-modules-cli.d.cts} +0 -0
- /package/lib/{git-fix.d.cts → 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-purge.d.cts → git/git-purge.d.cts} +0 -0
- /package/lib/{del-ps.d.ts → github-workflows/clean-github-actions-caches-cli.d.cts} +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Run by Checksum
|
|
2
|
+
|
|
3
|
+
Run a command only when the checksum of matched files changes. Computes SHA-256 hashes of all matching files, stores them in a cache under `tmp/.checksum/`, and compares on subsequent runs to determine if the command should execute again.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
run-by-checksum -p "<glob>" -e "<command>"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Aliases
|
|
12
|
+
|
|
13
|
+
This command is available under several aliases (all invoke the same CLI):
|
|
14
|
+
|
|
15
|
+
- `run-by-checksum` (default)
|
|
16
|
+
- `run-checksum`
|
|
17
|
+
- `run-c`
|
|
18
|
+
|
|
19
|
+
### Options
|
|
20
|
+
|
|
21
|
+
| Flag | Type | Description |
|
|
22
|
+
| :--- | :--- | :--- |
|
|
23
|
+
| `-p`, `--pattern` | `string[]` | Glob pattern(s) to include (can be repeated) |
|
|
24
|
+
| `-i`, `--ignore` | `string[]` | Glob pattern(s) to exclude (can be repeated) |
|
|
25
|
+
| `-e`, `--exec` | `string` | Command to execute when checksum changes |
|
|
26
|
+
| `-c`, `--cwd` | `string` | Working directory for glob scanning and spawn (default: `INIT_CWD` or current directory) |
|
|
27
|
+
| `-h`, `--help` | `boolean` | Show help message |
|
|
28
|
+
|
|
29
|
+
### Examples
|
|
30
|
+
|
|
31
|
+
Run a build script when any `.js` or `.ts` file changes:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
run-by-checksum -p "src/**/*.js" -p "src/**/*.ts" -e "npm run build"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Ignore node_modules and run tests when source files change:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
run-by-checksum -p "src/**/*.js" -i "**/node_modules/**" -e "npm test"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Override the working directory (both glob scanning and spawned command run relative to the given directory):
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
run-by-checksum -p "*.js" -e "npm test" --cwd /path/to/project
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### How it works
|
|
50
|
+
|
|
51
|
+
1. **Scan**: All files matching the given glob patterns are collected.
|
|
52
|
+
2. **Hash**: SHA-256 checksums are computed for each matched file's content and combined into a single hash.
|
|
53
|
+
3. **Compare**: The combined hash is compared against a previously cached hash stored in `tmp/.checksum/<md5-key>.json`.
|
|
54
|
+
4. **Execute**: If the hash differs (files have changed), the specified command is executed.
|
|
55
|
+
5. **Cache**: Only if the command exits successfully (exit code 0) is the new checksum persisted to the cache. On failure, the old checksum is retained so the command will re-run on the next invocation.
|
|
56
|
+
6. **Skip**: If the hash matches (no changes), the command is skipped.
|
|
57
|
+
|
|
58
|
+
### Programmatic API
|
|
59
|
+
|
|
60
|
+
The core logic can also be imported directly:
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
import { runChecksum } from './src/run-by-checksum/run.js';
|
|
64
|
+
|
|
65
|
+
await runChecksum({
|
|
66
|
+
patterns: ['src/**/*.js'],
|
|
67
|
+
ignore: ['**/node_modules/**'],
|
|
68
|
+
exec: 'npm run build',
|
|
69
|
+
cwd: process.cwd(),
|
|
70
|
+
dryRun: false // set to true to detect changes without executing
|
|
71
|
+
});
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The function returns:
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
{
|
|
78
|
+
changed: boolean, // whether files changed since last run
|
|
79
|
+
cacheFile: string, // path to the cache file
|
|
80
|
+
files: string[], // list of matched files
|
|
81
|
+
skipped?: boolean // only present when dryRun=true and changes detected
|
|
82
|
+
}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Source
|
|
86
|
+
|
|
87
|
+
See [`src/run-by-checksum-cli.js`](../src/run-by-checksum-cli.js).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
## Submodule Install
|
|
2
|
+
|
|
3
|
+
Installs and updates git submodules recursively, applying access tokens for private repos.
|
|
4
|
+
|
|
5
|
+
### Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
submodule-install [options] [repo-path]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Options
|
|
12
|
+
|
|
13
|
+
| Option | Description |
|
|
14
|
+
|--------|-------------|
|
|
15
|
+
| `--cwd <path>` | Set working directory |
|
|
16
|
+
| `-h, --help` | Show help message |
|
|
17
|
+
|
|
18
|
+
### Description
|
|
19
|
+
|
|
20
|
+
- Installs and updates git submodules recursively
|
|
21
|
+
- Applies access tokens (`GITHUB_TOKEN` or `ACCESS_TOKEN` from `.env`) for private repositories
|
|
22
|
+
- Prevents infinite recursion loops by tracking visited submodules
|
|
23
|
+
|
|
24
|
+
### Environment Setup
|
|
25
|
+
|
|
26
|
+
1. Add `GITHUB_TOKEN` or `ACCESS_TOKEN` to your `.env` file
|
|
27
|
+
2. Ensure your tokens have access to the required repositories
|
|
28
|
+
|
|
29
|
+
### Source
|
|
30
|
+
|
|
31
|
+
See [`src/submodule-install.cjs`](../src/submodule-install.cjs)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## Submodule Remove
|
|
2
|
+
|
|
3
|
+
Completely removes a git submodule from the repository.
|
|
4
|
+
|
|
5
|
+
### Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
submodule-remove <submodule-path>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Description
|
|
12
|
+
|
|
13
|
+
Performs a complete removal of a git submodule:
|
|
14
|
+
- De-initializes the submodule (`git submodule deinit`)
|
|
15
|
+
- Removes the submodule from `.gitmodules`
|
|
16
|
+
- Removes the submodule from `.git/config`
|
|
17
|
+
- Removes the submodule directory
|
|
18
|
+
- Commits the changes
|
|
19
|
+
|
|
20
|
+
### Source
|
|
21
|
+
|
|
22
|
+
See [`src/submodule-remove-cli.js`](../src/submodule-remove-cli.js).
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
## Submodule Token Manager
|
|
2
|
+
|
|
3
|
+
Removes access tokens from git submodule URLs.
|
|
4
|
+
|
|
5
|
+
### Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
submodule-token
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Description
|
|
12
|
+
|
|
13
|
+
Scans submodule URLs in `.gitmodules` and removes any embedded access tokens, leaving clean HTTPS URLs.
|
|
14
|
+
|
|
15
|
+
### Source
|
|
16
|
+
|
|
17
|
+
See [`bin/submodule-token`](../bin/submodule-token)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## Jest Test Runners
|
|
2
|
+
|
|
3
|
+
Run Jest tests for CommonJS or ESM modules.
|
|
4
|
+
|
|
5
|
+
### Commands
|
|
6
|
+
|
|
7
|
+
| Command | Description |
|
|
8
|
+
|---------|-------------|
|
|
9
|
+
| `test-cjs` | Run Jest for CommonJS tests |
|
|
10
|
+
| `test-esm` | Run Jest for ESM tests (with `--experimental-vm-modules`) |
|
|
11
|
+
|
|
12
|
+
### Usage
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
test-cjs [jest-options...]
|
|
16
|
+
test-esm [jest-options...]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Source
|
|
20
|
+
|
|
21
|
+
See [`bin/test-cjs`](../bin/test-cjs) & [`bin/test-esm`](../bin/test-esm)
|
|
@@ -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,31 @@
|
|
|
1
|
+
## Per-Branch Yarn Lock Installer
|
|
2
|
+
|
|
3
|
+
Manages per-branch `yarn.lock` files — saves and restores branch-specific lockfiles.
|
|
4
|
+
|
|
5
|
+
### Aliases
|
|
6
|
+
|
|
7
|
+
- `yarn-install` (default)
|
|
8
|
+
- `y-install`
|
|
9
|
+
- `yarn-per-branch-lock-installer`
|
|
10
|
+
|
|
11
|
+
### Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
yarn-install [packages...]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Options
|
|
18
|
+
|
|
19
|
+
| Option | Description |
|
|
20
|
+
|--------|-------------|
|
|
21
|
+
| `-h, --help` | Show help message |
|
|
22
|
+
|
|
23
|
+
### Description
|
|
24
|
+
|
|
25
|
+
- Saves the current `yarn.lock` to a branch-specific file before switching branches
|
|
26
|
+
- Restores the branch-specific `yarn.lock` when returning to a branch
|
|
27
|
+
- Runs `yarn install` or `yarn up` to sync dependencies
|
|
28
|
+
|
|
29
|
+
### Source
|
|
30
|
+
|
|
31
|
+
See [`src/yarn-per-branch-lock-installer.cjs`](../src/yarn-per-branch-lock-installer.cjs)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
## Yarn Package Reinstaller
|
|
2
|
+
|
|
3
|
+
Reinstalls a yarn package by removing and re-adding it.
|
|
4
|
+
|
|
5
|
+
### Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn-reinstall <packageName> [--dev|-D|--peer|-P|--optional|-O]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Options
|
|
12
|
+
|
|
13
|
+
| Option | Description |
|
|
14
|
+
|--------|-------------|
|
|
15
|
+
| `--dev`, `-D` | Add as dev dependency |
|
|
16
|
+
| `--peer`, `-P` | Add as peer dependency |
|
|
17
|
+
| `--optional`, `-O` | Add as optional dependency |
|
|
18
|
+
|
|
19
|
+
### Description
|
|
20
|
+
|
|
21
|
+
- Checks if the package is currently installed before removing
|
|
22
|
+
- Runs `yarn remove <packageName>` then `yarn add <packageName> [flags]`
|
|
23
|
+
- Skips removal if the package is not installed
|
|
24
|
+
|
|
25
|
+
### Source
|
|
26
|
+
|
|
27
|
+
See [`src/yarn-reinstall.cjs`](../src/yarn-reinstall.cjs)
|
|
@@ -90,6 +90,9 @@ var require_findEnvFiles = __commonJS({
|
|
|
90
90
|
return envFiles.find((file) => {
|
|
91
91
|
try {
|
|
92
92
|
const content = fs.readFileSync(file, "utf-8");
|
|
93
|
+
if (tokenName instanceof RegExp) {
|
|
94
|
+
return tokenName.test(content);
|
|
95
|
+
}
|
|
93
96
|
const regex = new RegExp(`^\\s*${tokenName}\\s*=`, "m");
|
|
94
97
|
return regex.test(content);
|
|
95
98
|
} catch (err) {
|
|
@@ -109,9 +112,16 @@ var require_findEnvFiles = __commonJS({
|
|
|
109
112
|
|
|
110
113
|
// src/binary-collections/config.cjs
|
|
111
114
|
init_cjs_shims();
|
|
112
|
-
var path = require("
|
|
115
|
+
var path = require("upath");
|
|
116
|
+
var minimistLib = require("minimist");
|
|
113
117
|
var { findEnvWithToken } = require_findEnvFiles();
|
|
114
|
-
require("dotenv")
|
|
118
|
+
var dotenv = require("dotenv");
|
|
119
|
+
var loadDotenv = (tokenKey = /ACCESS_TOKEN|GITHUB_TOKEN/) => dotenv.config({ path: findEnvWithToken(void 0, tokenKey), quiet: true, overwrite: true });
|
|
120
|
+
loadDotenv();
|
|
121
|
+
var cliArgv = minimistLib(process.argv.slice(2), {
|
|
122
|
+
string: ["token"]
|
|
123
|
+
});
|
|
124
|
+
var GITHUB_ACCESS_TOKEN = cliArgv.token || process.env.ACCESS_TOKEN || process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
|
|
115
125
|
function getTempDir() {
|
|
116
126
|
return process.env.TEMP_DIR || path.join(process.cwd(), "tmp");
|
|
117
127
|
}
|
|
@@ -122,5 +132,7 @@ var TEMP_BASE_DIR = getTempDir();
|
|
|
122
132
|
module.exports = {
|
|
123
133
|
getTempDir,
|
|
124
134
|
getTempPath,
|
|
125
|
-
TEMP_BASE_DIR
|
|
135
|
+
TEMP_BASE_DIR,
|
|
136
|
+
GITHUB_ACCESS_TOKEN,
|
|
137
|
+
loadDotenv
|
|
126
138
|
};
|
|
@@ -14,3 +14,13 @@ export function getTempPath(...segments: string[]): string;
|
|
|
14
14
|
* Legacy aliases for backward compatibility
|
|
15
15
|
*/
|
|
16
16
|
export const TEMP_BASE_DIR: string;
|
|
17
|
+
export const GITHUB_ACCESS_TOKEN: any;
|
|
18
|
+
/**
|
|
19
|
+
* Load .env file containing a token variable.
|
|
20
|
+
* Searches for `.env*` files and picks the first one matching the given token key.
|
|
21
|
+
*
|
|
22
|
+
* @param {string|RegExp} [tokenKey=/ACCESS_TOKEN|GITHUB_TOKEN/] - Token name or regex to search for.
|
|
23
|
+
* Passed as second argument to `findEnvWithToken()`.
|
|
24
|
+
* @returns {void}
|
|
25
|
+
*/
|
|
26
|
+
export function loadDotenv(tokenKey?: string | RegExp): void;
|
|
@@ -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-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-SARIXFHP.mjs";
|
|
5
|
+
import "../chunk-J4M5EL5P.mjs";
|
|
6
6
|
import "../chunk-QQ4A6DLD.mjs";
|
|
7
7
|
export default require_config();
|