@socketsecurity/lib 0.0.0 → 1.0.0
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/CHANGELOG.md +270 -0
- package/LICENSE +21 -0
- package/README.md +80 -2
- package/data/extensions.json +28 -0
- package/dist/abort.d.ts +11 -0
- package/dist/abort.js +62 -0
- package/dist/abort.js.map +7 -0
- package/dist/agent.d.ts +102 -0
- package/dist/agent.js +288 -0
- package/dist/agent.js.map +7 -0
- package/dist/ansi.d.ts +29 -0
- package/dist/ansi.js +62 -0
- package/dist/ansi.js.map +7 -0
- package/dist/argv/flags.d.ts +199 -0
- package/dist/argv/flags.js +284 -0
- package/dist/argv/flags.js.map +7 -0
- package/dist/argv/parse.d.ts +76 -0
- package/dist/argv/parse.js +173 -0
- package/dist/argv/parse.js.map +7 -0
- package/dist/arrays.d.ts +29 -0
- package/dist/arrays.js +87 -0
- package/dist/arrays.js.map +7 -0
- package/dist/bin.d.ts +50 -0
- package/dist/bin.js +405 -0
- package/dist/bin.js.map +7 -0
- package/dist/cacache.d.ts +86 -0
- package/dist/cacache.js +140 -0
- package/dist/cacache.js.map +7 -0
- package/dist/cache-with-ttl.d.ts +133 -0
- package/dist/cache-with-ttl.js +225 -0
- package/dist/cache-with-ttl.js.map +7 -0
- package/dist/constants/agents.d.ts +37 -0
- package/dist/constants/agents.js +128 -0
- package/dist/constants/agents.js.map +7 -0
- package/dist/constants/core.d.ts +22 -0
- package/dist/constants/core.js +59 -0
- package/dist/constants/core.js.map +7 -0
- package/dist/constants/encoding.d.ts +13 -0
- package/dist/constants/encoding.js +50 -0
- package/dist/constants/encoding.js.map +7 -0
- package/dist/constants/github.d.ts +7 -0
- package/dist/constants/github.js +32 -0
- package/dist/constants/github.js.map +7 -0
- package/dist/constants/licenses.d.ts +8 -0
- package/dist/constants/licenses.js +68 -0
- package/dist/constants/licenses.js.map +7 -0
- package/dist/constants/node.d.ts +29 -0
- package/dist/constants/node.js +173 -0
- package/dist/constants/node.js.map +7 -0
- package/dist/constants/packages.d.ts +19 -0
- package/dist/constants/packages.js +130 -0
- package/dist/constants/packages.js.map +7 -0
- package/dist/constants/paths.d.ts +51 -0
- package/dist/constants/paths.js +152 -0
- package/dist/constants/paths.js.map +7 -0
- package/dist/constants/platform.d.ts +6 -0
- package/dist/constants/platform.js +43 -0
- package/dist/constants/platform.js.map +7 -0
- package/dist/constants/process.d.ts +7 -0
- package/dist/constants/process.js +54 -0
- package/dist/constants/process.js.map +7 -0
- package/dist/constants/socket.d.ts +29 -0
- package/dist/constants/socket.js +83 -0
- package/dist/constants/socket.js.map +7 -0
- package/dist/constants/testing.d.ts +9 -0
- package/dist/constants/testing.js +38 -0
- package/dist/constants/testing.js.map +7 -0
- package/dist/constants/time.d.ts +11 -0
- package/dist/constants/time.js +41 -0
- package/dist/constants/time.js.map +7 -0
- package/dist/constants/typescript.d.ts +6 -0
- package/dist/constants/typescript.js +56 -0
- package/dist/constants/typescript.js.map +7 -0
- package/dist/cover/code.d.ts +8 -0
- package/dist/cover/code.js +137 -0
- package/dist/cover/code.js.map +7 -0
- package/dist/cover/formatters.d.ts +9 -0
- package/dist/cover/formatters.js +103 -0
- package/dist/cover/formatters.js.map +7 -0
- package/dist/cover/type.d.ts +7 -0
- package/dist/cover/type.js +65 -0
- package/dist/cover/type.js.map +7 -0
- package/dist/cover/types.d.ts +70 -0
- package/dist/cover/types.js +17 -0
- package/dist/cover/types.js.map +7 -0
- package/dist/debug.d.ts +99 -0
- package/dist/debug.js +345 -0
- package/dist/debug.js.map +7 -0
- package/dist/dlx-binary.d.ts +49 -0
- package/dist/dlx-binary.js +261 -0
- package/dist/dlx-binary.js.map +7 -0
- package/dist/dlx.d.ts +64 -0
- package/dist/dlx.js +168 -0
- package/dist/dlx.js.map +7 -0
- package/dist/download-lock.d.ts +48 -0
- package/dist/download-lock.js +139 -0
- package/dist/download-lock.js.map +7 -0
- package/dist/effects/pulse-frames.d.ts +23 -0
- package/dist/effects/pulse-frames.js +66 -0
- package/dist/effects/pulse-frames.js.map +7 -0
- package/dist/effects/text-shimmer.d.ts +37 -0
- package/dist/effects/text-shimmer.js +175 -0
- package/dist/effects/text-shimmer.js.map +7 -0
- package/dist/effects/types.d.ts +41 -0
- package/dist/effects/types.js +17 -0
- package/dist/effects/types.js.map +7 -0
- package/dist/effects/ultra.d.ts +16 -0
- package/dist/effects/ultra.js +63 -0
- package/dist/effects/ultra.js.map +7 -0
- package/dist/env/appdata.d.ts +1 -0
- package/dist/env/appdata.js +30 -0
- package/dist/env/appdata.js.map +7 -0
- package/dist/env/ci.d.ts +1 -0
- package/dist/env/ci.js +31 -0
- package/dist/env/ci.js.map +7 -0
- package/dist/env/comspec.d.ts +1 -0
- package/dist/env/comspec.js +30 -0
- package/dist/env/comspec.js.map +7 -0
- package/dist/env/debug.d.ts +1 -0
- package/dist/env/debug.js +30 -0
- package/dist/env/debug.js.map +7 -0
- package/dist/env/getters.d.ts +40 -0
- package/dist/env/getters.js +283 -0
- package/dist/env/getters.js.map +7 -0
- package/dist/env/github-api-url.d.ts +1 -0
- package/dist/env/github-api-url.js +30 -0
- package/dist/env/github-api-url.js.map +7 -0
- package/dist/env/github-base-ref.d.ts +1 -0
- package/dist/env/github-base-ref.js +30 -0
- package/dist/env/github-base-ref.js.map +7 -0
- package/dist/env/github-ref-name.d.ts +1 -0
- package/dist/env/github-ref-name.js +30 -0
- package/dist/env/github-ref-name.js.map +7 -0
- package/dist/env/github-ref-type.d.ts +1 -0
- package/dist/env/github-ref-type.js +30 -0
- package/dist/env/github-ref-type.js.map +7 -0
- package/dist/env/github-repository.d.ts +1 -0
- package/dist/env/github-repository.js +30 -0
- package/dist/env/github-repository.js.map +7 -0
- package/dist/env/github-server-url.d.ts +1 -0
- package/dist/env/github-server-url.js +30 -0
- package/dist/env/github-server-url.js.map +7 -0
- package/dist/env/github-token.d.ts +1 -0
- package/dist/env/github-token.js +30 -0
- package/dist/env/github-token.js.map +7 -0
- package/dist/env/helpers.d.ts +6 -0
- package/dist/env/helpers.js +49 -0
- package/dist/env/helpers.js.map +7 -0
- package/dist/env/home.d.ts +1 -0
- package/dist/env/home.js +30 -0
- package/dist/env/home.js.map +7 -0
- package/dist/env/jest-worker-id.d.ts +1 -0
- package/dist/env/jest-worker-id.js +30 -0
- package/dist/env/jest-worker-id.js.map +7 -0
- package/dist/env/lang.d.ts +1 -0
- package/dist/env/lang.js +30 -0
- package/dist/env/lang.js.map +7 -0
- package/dist/env/lc-all.d.ts +1 -0
- package/dist/env/lc-all.js +30 -0
- package/dist/env/lc-all.js.map +7 -0
- package/dist/env/lc-messages.d.ts +1 -0
- package/dist/env/lc-messages.js +30 -0
- package/dist/env/lc-messages.js.map +7 -0
- package/dist/env/localappdata.d.ts +1 -0
- package/dist/env/localappdata.js +30 -0
- package/dist/env/localappdata.js.map +7 -0
- package/dist/env/node-auth-token.d.ts +1 -0
- package/dist/env/node-auth-token.js +30 -0
- package/dist/env/node-auth-token.js.map +7 -0
- package/dist/env/node-env.d.ts +1 -0
- package/dist/env/node-env.js +30 -0
- package/dist/env/node-env.js.map +7 -0
- package/dist/env/npm-config-registry.d.ts +1 -0
- package/dist/env/npm-config-registry.js +30 -0
- package/dist/env/npm-config-registry.js.map +7 -0
- package/dist/env/npm-config-user-agent.d.ts +1 -0
- package/dist/env/npm-config-user-agent.js +30 -0
- package/dist/env/npm-config-user-agent.js.map +7 -0
- package/dist/env/npm-lifecycle-event.d.ts +1 -0
- package/dist/env/npm-lifecycle-event.js +30 -0
- package/dist/env/npm-lifecycle-event.js.map +7 -0
- package/dist/env/npm-registry.d.ts +1 -0
- package/dist/env/npm-registry.js +30 -0
- package/dist/env/npm-registry.js.map +7 -0
- package/dist/env/npm-token.d.ts +1 -0
- package/dist/env/npm-token.js +30 -0
- package/dist/env/npm-token.js.map +7 -0
- package/dist/env/path.d.ts +1 -0
- package/dist/env/path.js +30 -0
- package/dist/env/path.js.map +7 -0
- package/dist/env/pre-commit.d.ts +1 -0
- package/dist/env/pre-commit.js +31 -0
- package/dist/env/pre-commit.js.map +7 -0
- package/dist/env/shell.d.ts +1 -0
- package/dist/env/shell.js +30 -0
- package/dist/env/shell.js.map +7 -0
- package/dist/env/socket-accept-risks.d.ts +1 -0
- package/dist/env/socket-accept-risks.js +31 -0
- package/dist/env/socket-accept-risks.js.map +7 -0
- package/dist/env/socket-api-base-url.d.ts +1 -0
- package/dist/env/socket-api-base-url.js +30 -0
- package/dist/env/socket-api-base-url.js.map +7 -0
- package/dist/env/socket-api-proxy.d.ts +1 -0
- package/dist/env/socket-api-proxy.js +30 -0
- package/dist/env/socket-api-proxy.js.map +7 -0
- package/dist/env/socket-api-timeout.d.ts +1 -0
- package/dist/env/socket-api-timeout.js +31 -0
- package/dist/env/socket-api-timeout.js.map +7 -0
- package/dist/env/socket-api-token.d.ts +1 -0
- package/dist/env/socket-api-token.js +30 -0
- package/dist/env/socket-api-token.js.map +7 -0
- package/dist/env/socket-cacache-dir.d.ts +1 -0
- package/dist/env/socket-cacache-dir.js +30 -0
- package/dist/env/socket-cacache-dir.js.map +7 -0
- package/dist/env/socket-cli-accept-risks.d.ts +1 -0
- package/dist/env/socket-cli-accept-risks.js +33 -0
- package/dist/env/socket-cli-accept-risks.js.map +7 -0
- package/dist/env/socket-cli-api-base-url.d.ts +1 -0
- package/dist/env/socket-cli-api-base-url.js +30 -0
- package/dist/env/socket-cli-api-base-url.js.map +7 -0
- package/dist/env/socket-cli-api-proxy.d.ts +1 -0
- package/dist/env/socket-cli-api-proxy.js +30 -0
- package/dist/env/socket-cli-api-proxy.js.map +7 -0
- package/dist/env/socket-cli-api-timeout.d.ts +1 -0
- package/dist/env/socket-cli-api-timeout.js +31 -0
- package/dist/env/socket-cli-api-timeout.js.map +7 -0
- package/dist/env/socket-cli-api-token.d.ts +1 -0
- package/dist/env/socket-cli-api-token.js +30 -0
- package/dist/env/socket-cli-api-token.js.map +7 -0
- package/dist/env/socket-cli-config.d.ts +1 -0
- package/dist/env/socket-cli-config.js +30 -0
- package/dist/env/socket-cli-config.js.map +7 -0
- package/dist/env/socket-cli-fix.d.ts +1 -0
- package/dist/env/socket-cli-fix.js +30 -0
- package/dist/env/socket-cli-fix.js.map +7 -0
- package/dist/env/socket-cli-no-api-token.d.ts +1 -0
- package/dist/env/socket-cli-no-api-token.js +33 -0
- package/dist/env/socket-cli-no-api-token.js.map +7 -0
- package/dist/env/socket-cli-optimize.d.ts +1 -0
- package/dist/env/socket-cli-optimize.js +31 -0
- package/dist/env/socket-cli-optimize.js.map +7 -0
- package/dist/env/socket-cli-org-slug.d.ts +1 -0
- package/dist/env/socket-cli-org-slug.js +30 -0
- package/dist/env/socket-cli-org-slug.js.map +7 -0
- package/dist/env/socket-cli-shadow-accept-risks.d.ts +1 -0
- package/dist/env/socket-cli-shadow-accept-risks.js +33 -0
- package/dist/env/socket-cli-shadow-accept-risks.js.map +7 -0
- package/dist/env/socket-cli-shadow-api-token.d.ts +1 -0
- package/dist/env/socket-cli-shadow-api-token.js +30 -0
- package/dist/env/socket-cli-shadow-api-token.js.map +7 -0
- package/dist/env/socket-cli-shadow-bin.d.ts +1 -0
- package/dist/env/socket-cli-shadow-bin.js +30 -0
- package/dist/env/socket-cli-shadow-bin.js.map +7 -0
- package/dist/env/socket-cli-shadow-progress.d.ts +1 -0
- package/dist/env/socket-cli-shadow-progress.js +33 -0
- package/dist/env/socket-cli-shadow-progress.js.map +7 -0
- package/dist/env/socket-cli-shadow-silent.d.ts +1 -0
- package/dist/env/socket-cli-shadow-silent.js +33 -0
- package/dist/env/socket-cli-shadow-silent.js.map +7 -0
- package/dist/env/socket-cli-view-all-risks.d.ts +1 -0
- package/dist/env/socket-cli-view-all-risks.js +33 -0
- package/dist/env/socket-cli-view-all-risks.js.map +7 -0
- package/dist/env/socket-config.d.ts +1 -0
- package/dist/env/socket-config.js +30 -0
- package/dist/env/socket-config.js.map +7 -0
- package/dist/env/socket-debug.d.ts +1 -0
- package/dist/env/socket-debug.js +30 -0
- package/dist/env/socket-debug.js.map +7 -0
- package/dist/env/socket-home.d.ts +1 -0
- package/dist/env/socket-home.js +30 -0
- package/dist/env/socket-home.js.map +7 -0
- package/dist/env/socket-no-api-token.d.ts +1 -0
- package/dist/env/socket-no-api-token.js +31 -0
- package/dist/env/socket-no-api-token.js.map +7 -0
- package/dist/env/socket-npm-registry.d.ts +1 -0
- package/dist/env/socket-npm-registry.js +30 -0
- package/dist/env/socket-npm-registry.js.map +7 -0
- package/dist/env/socket-org-slug.d.ts +1 -0
- package/dist/env/socket-org-slug.js +30 -0
- package/dist/env/socket-org-slug.js.map +7 -0
- package/dist/env/socket-registry-url.d.ts +1 -0
- package/dist/env/socket-registry-url.js +30 -0
- package/dist/env/socket-registry-url.js.map +7 -0
- package/dist/env/socket-view-all-risks.d.ts +1 -0
- package/dist/env/socket-view-all-risks.js +31 -0
- package/dist/env/socket-view-all-risks.js.map +7 -0
- package/dist/env/temp.d.ts +1 -0
- package/dist/env/temp.js +30 -0
- package/dist/env/temp.js.map +7 -0
- package/dist/env/term.d.ts +1 -0
- package/dist/env/term.js +30 -0
- package/dist/env/term.js.map +7 -0
- package/dist/env/tmp.d.ts +1 -0
- package/dist/env/tmp.js +30 -0
- package/dist/env/tmp.js.map +7 -0
- package/dist/env/tmpdir.d.ts +1 -0
- package/dist/env/tmpdir.js +30 -0
- package/dist/env/tmpdir.js.map +7 -0
- package/dist/env/userprofile.d.ts +1 -0
- package/dist/env/userprofile.js +30 -0
- package/dist/env/userprofile.js.map +7 -0
- package/dist/env/vitest.d.ts +1 -0
- package/dist/env/vitest.js +31 -0
- package/dist/env/vitest.js.map +7 -0
- package/dist/env/xdg-cache-home.d.ts +1 -0
- package/dist/env/xdg-cache-home.js +30 -0
- package/dist/env/xdg-cache-home.js.map +7 -0
- package/dist/env/xdg-config-home.d.ts +1 -0
- package/dist/env/xdg-config-home.js +30 -0
- package/dist/env/xdg-config-home.js.map +7 -0
- package/dist/env/xdg-data-home.d.ts +1 -0
- package/dist/env/xdg-data-home.js +30 -0
- package/dist/env/xdg-data-home.js.map +7 -0
- package/dist/env.d.ts +15 -0
- package/dist/env.js +63 -0
- package/dist/env.js.map +7 -0
- package/dist/external/@inquirer/checkbox.js +4 -0
- package/dist/external/@inquirer/confirm.js +22 -0
- package/dist/external/@inquirer/core.js +4 -0
- package/dist/external/@inquirer/input.js +1 -0
- package/dist/external/@inquirer/password.js +1 -0
- package/dist/external/@inquirer/prompts.js +4 -0
- package/dist/external/@inquirer/search.js +1 -0
- package/dist/external/@inquirer/select.js +25 -0
- package/dist/external/@npmcli/package-json/index.js +1 -0
- package/dist/external/@npmcli/package-json/lib/read-package.js +1 -0
- package/dist/external/@npmcli/package-json/lib/sort.js +1 -0
- package/dist/external/@npmcli/promise-spawn.js +5 -0
- package/dist/external/@socketregistry/is-unicode-supported.d.ts +2 -0
- package/dist/external/@socketregistry/is-unicode-supported.js +5 -0
- package/dist/external/@socketregistry/packageurl-js.js +34 -0
- package/dist/external/@socketregistry/yocto-spinner.d.ts +12 -0
- package/dist/external/@socketregistry/yocto-spinner.js +8 -0
- package/dist/external/@yarnpkg/extensions.d.ts +5 -0
- package/dist/external/@yarnpkg/extensions.js +5 -0
- package/dist/external/cacache.d.ts +93 -0
- package/dist/external/cacache.js +32 -0
- package/dist/external/debug.d.ts +25 -0
- package/dist/external/debug.js +9 -0
- package/dist/external/del.d.ts +1 -0
- package/dist/external/del.js +54 -0
- package/dist/external/fast-glob.js +54 -0
- package/dist/external/fast-sort.d.ts +4 -0
- package/dist/external/fast-sort.js +5 -0
- package/dist/external/get-east-asian-width.d.ts +5 -0
- package/dist/external/get-east-asian-width.js +5 -0
- package/dist/external/libnpmpack.d.ts +3 -0
- package/dist/external/libnpmpack.js +225 -0
- package/dist/external/make-fetch-happen.d.ts +16 -0
- package/dist/external/make-fetch-happen.js +69 -0
- package/dist/external/normalize-package-data.js +6 -0
- package/dist/external/npm-package-arg.js +6 -0
- package/dist/external/pacote.d.ts +19 -0
- package/dist/external/pacote.js +105 -0
- package/dist/external/picomatch.js +5 -0
- package/dist/external/semver.d.ts +3 -0
- package/dist/external/semver.js +5 -0
- package/dist/external/spdx-correct.js +5 -0
- package/dist/external/spdx-expression-parse.js +5 -0
- package/dist/external/streaming-iterables.js +5 -0
- package/dist/external/validate-npm-package-name.js +5 -0
- package/dist/external/which.js +5 -0
- package/dist/external/yargs-parser.d.ts +3 -0
- package/dist/external/yargs-parser.js +26 -0
- package/dist/external/yoctocolors-cjs.d.ts +38 -0
- package/dist/external/yoctocolors-cjs.js +5 -0
- package/dist/external/zod.d.ts +1 -0
- package/dist/external/zod.js +27 -0
- package/dist/fs.d.ts +184 -0
- package/dist/fs.js +610 -0
- package/dist/fs.js.map +7 -0
- package/dist/functions.d.ts +27 -0
- package/dist/functions.js +70 -0
- package/dist/functions.js.map +7 -0
- package/dist/git.d.ts +93 -0
- package/dist/git.js +321 -0
- package/dist/git.js.map +7 -0
- package/dist/github.d.ts +121 -0
- package/dist/github.js +203 -0
- package/dist/github.js.map +7 -0
- package/dist/globs.d.ts +46 -0
- package/dist/globs.js +154 -0
- package/dist/globs.js.map +7 -0
- package/dist/http-request.d.ts +53 -0
- package/dist/http-request.js +315 -0
- package/dist/http-request.js.map +7 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +7 -0
- package/dist/ipc.d.ts +366 -0
- package/dist/ipc.js +234 -0
- package/dist/ipc.js.map +7 -0
- package/dist/json.d.ts +23 -0
- package/dist/json.js +75 -0
- package/dist/json.js.map +7 -0
- package/dist/logger.d.ts +183 -0
- package/dist/logger.js +653 -0
- package/dist/logger.js.map +7 -0
- package/dist/maintained-node-versions.d.ts +7 -0
- package/dist/maintained-node-versions.js +37 -0
- package/dist/maintained-node-versions.js.map +7 -0
- package/dist/memoization.d.ts +142 -0
- package/dist/memoization.js +212 -0
- package/dist/memoization.js.map +7 -0
- package/dist/objects.d.ts +146 -0
- package/dist/objects.js +321 -0
- package/dist/objects.js.map +7 -0
- package/dist/packages/editable.d.ts +107 -0
- package/dist/packages/editable.js +358 -0
- package/dist/packages/editable.js.map +7 -0
- package/dist/packages/exports.d.ts +30 -0
- package/dist/packages/exports.js +164 -0
- package/dist/packages/exports.js.map +7 -0
- package/dist/packages/isolation.d.ts +22 -0
- package/dist/packages/isolation.js +197 -0
- package/dist/packages/isolation.js.map +7 -0
- package/dist/packages/licenses.d.ts +68 -0
- package/dist/packages/licenses.js +216 -0
- package/dist/packages/licenses.js.map +7 -0
- package/dist/packages/manifest.d.ts +16 -0
- package/dist/packages/manifest.js +192 -0
- package/dist/packages/manifest.js.map +7 -0
- package/dist/packages/normalize.d.ts +21 -0
- package/dist/packages/normalize.js +122 -0
- package/dist/packages/normalize.js.map +7 -0
- package/dist/packages/operations.d.ts +54 -0
- package/dist/packages/operations.js +306 -0
- package/dist/packages/operations.js.map +7 -0
- package/dist/packages/paths.d.ts +10 -0
- package/dist/packages/paths.js +55 -0
- package/dist/packages/paths.js.map +7 -0
- package/dist/packages/provenance.d.ts +10 -0
- package/dist/packages/provenance.js +180 -0
- package/dist/packages/provenance.js.map +7 -0
- package/dist/packages/registry.d.ts +8 -0
- package/dist/packages/registry.js +30 -0
- package/dist/packages/registry.js.map +7 -0
- package/dist/packages/specs.d.ts +28 -0
- package/dist/packages/specs.js +85 -0
- package/dist/packages/specs.js.map +7 -0
- package/dist/packages/validation.d.ts +15 -0
- package/dist/packages/validation.js +53 -0
- package/dist/packages/validation.js.map +7 -0
- package/dist/packages.d.ts +154 -0
- package/dist/packages.js +131 -0
- package/dist/packages.js.map +7 -0
- package/dist/path.d.ts +74 -0
- package/dist/path.js +442 -0
- package/dist/path.js.map +7 -0
- package/dist/paths.d.ts +42 -0
- package/dist/paths.js +145 -0
- package/dist/paths.js.map +7 -0
- package/dist/performance.d.ts +178 -0
- package/dist/performance.js +219 -0
- package/dist/performance.js.map +7 -0
- package/dist/promise-queue.d.ts +35 -0
- package/dist/promise-queue.js +111 -0
- package/dist/promise-queue.js.map +7 -0
- package/dist/promises.d.ts +67 -0
- package/dist/promises.js +268 -0
- package/dist/promises.js.map +7 -0
- package/dist/prompts.d.ts +27 -0
- package/dist/prompts.js +60 -0
- package/dist/prompts.js.map +7 -0
- package/dist/regexps.d.ts +13 -0
- package/dist/regexps.js +32 -0
- package/dist/regexps.js.map +7 -0
- package/dist/sea.d.ts +10 -0
- package/dist/sea.js +46 -0
- package/dist/sea.js.map +7 -0
- package/dist/shadow.d.ts +17 -0
- package/dist/shadow.js +60 -0
- package/dist/shadow.js.map +7 -0
- package/dist/signal-exit.d.ts +23 -0
- package/dist/signal-exit.js +250 -0
- package/dist/signal-exit.js.map +7 -0
- package/dist/sorts.d.ts +28 -0
- package/dist/sorts.js +96 -0
- package/dist/sorts.js.map +7 -0
- package/dist/spawn.d.ts +207 -0
- package/dist/spawn.js +201 -0
- package/dist/spawn.js.map +7 -0
- package/dist/spinner.d.ts +208 -0
- package/dist/spinner.js +729 -0
- package/dist/spinner.js.map +7 -0
- package/dist/ssri.d.ts +95 -0
- package/dist/ssri.js +73 -0
- package/dist/ssri.js.map +7 -0
- package/dist/stdio/clear.d.ts +40 -0
- package/dist/stdio/clear.js +84 -0
- package/dist/stdio/clear.js.map +7 -0
- package/dist/stdio/divider.d.ts +48 -0
- package/dist/stdio/divider.js +81 -0
- package/dist/stdio/divider.js.map +7 -0
- package/dist/stdio/footer.d.ts +25 -0
- package/dist/stdio/footer.js +96 -0
- package/dist/stdio/footer.js.map +7 -0
- package/dist/stdio/header.d.ts +25 -0
- package/dist/stdio/header.js +102 -0
- package/dist/stdio/header.js.map +7 -0
- package/dist/stdio/mask.d.ts +72 -0
- package/dist/stdio/mask.js +187 -0
- package/dist/stdio/mask.js.map +7 -0
- package/dist/stdio/progress.d.ts +51 -0
- package/dist/stdio/progress.js +171 -0
- package/dist/stdio/progress.js.map +7 -0
- package/dist/stdio/prompts.d.ts +46 -0
- package/dist/stdio/prompts.js +90 -0
- package/dist/stdio/prompts.js.map +7 -0
- package/dist/stdio/stderr.d.ts +48 -0
- package/dist/stdio/stderr.js +91 -0
- package/dist/stdio/stderr.js.map +7 -0
- package/dist/stdio/stdout.d.ts +48 -0
- package/dist/stdio/stdout.js +105 -0
- package/dist/stdio/stdout.js.map +7 -0
- package/dist/streams.d.ts +20 -0
- package/dist/streams.js +80 -0
- package/dist/streams.js.map +7 -0
- package/dist/strings.d.ts +139 -0
- package/dist/strings.js +253 -0
- package/dist/strings.js.map +7 -0
- package/dist/suppress-warnings.d.ts +66 -0
- package/dist/suppress-warnings.js +100 -0
- package/dist/suppress-warnings.js.map +7 -0
- package/dist/tables.d.ts +69 -0
- package/dist/tables.js +130 -0
- package/dist/tables.js.map +7 -0
- package/dist/temporary-executor.d.ts +9 -0
- package/dist/temporary-executor.js +54 -0
- package/dist/temporary-executor.js.map +7 -0
- package/dist/types.d.ts +65 -0
- package/dist/types.js +74 -0
- package/dist/types.js.map +7 -0
- package/dist/url.d.ts +60 -0
- package/dist/url.js +144 -0
- package/dist/url.js.map +7 -0
- package/dist/utils/get-ipc.d.ts +16 -0
- package/dist/utils/get-ipc.js +60 -0
- package/dist/utils/get-ipc.js.map +7 -0
- package/dist/validation/json-parser.d.ts +10 -0
- package/dist/validation/json-parser.js +129 -0
- package/dist/validation/json-parser.js.map +7 -0
- package/dist/validation/types.d.ts +40 -0
- package/dist/validation/types.js +17 -0
- package/dist/validation/types.js.map +7 -0
- package/dist/versions.d.ts +87 -0
- package/dist/versions.js +155 -0
- package/dist/versions.js.map +7 -0
- package/dist/words.d.ts +22 -0
- package/dist/words.js +52 -0
- package/dist/words.js.map +7 -0
- package/dist/zod.d.ts +5 -0
- package/dist/zod.js +29 -0
- package/dist/zod.js.map +7 -0
- package/package.json +856 -7
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2025-10-20
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Consolidated parseArgs into argv/parse module
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
**Historical Entries**: The entries below are from when this package was named `@socketsecurity/registry`. This package was renamed to `@socketsecurity/lib` starting with version 1.0.0.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## [1.5.3] - 2025-10-07
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- Fix bad build and add validation to prevent in future
|
|
25
|
+
|
|
26
|
+
## [1.5.2] - 2025-10-07
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- Added coverage utilities to parse v8 and type coverage reports
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- Fixed `isPath` function to exclude URLs with protocols
|
|
35
|
+
- Fixed `isolatePackage` to handle file: URLs and npm-package-arg paths correctly
|
|
36
|
+
|
|
37
|
+
## [1.5.1] - 2025-10-05
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- Added `isolatePackage` to `lib/packages/isolation` for creating isolated package test environments
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
|
|
45
|
+
- Removed `dependencies/index` barrel file to prevent eager loading of all dependency modules
|
|
46
|
+
|
|
47
|
+
## [1.5.0] - 2025-10-05
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- Added support for testing local development packages in addition to socket-registry packages
|
|
52
|
+
- Exposed isolation module as part of public API via `lib/packages`
|
|
53
|
+
|
|
54
|
+
### Changed
|
|
55
|
+
|
|
56
|
+
- Renamed `setupPackageTest` to `isolatePackage` for clearer intent
|
|
57
|
+
- Refactored `installPackageForTesting` to accept explicit `sourcePath` and `packageName` parameters
|
|
58
|
+
- Simplified package installation logic by removing path detection from low-level function
|
|
59
|
+
- Consolidated `setupPackageTest` and `setupMultiEntryTest` into single `isolatePackage` function with options
|
|
60
|
+
|
|
61
|
+
## [1.4.6] - 2025-10-05
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
|
|
65
|
+
- Added comprehensive package.json exports validation tests
|
|
66
|
+
|
|
67
|
+
## [1.4.5] - 2025-10-05
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
|
|
71
|
+
- Added performance monitoring utilities with timer, measurement, and reporting functions
|
|
72
|
+
- Added memoization utilities with LRU, TTL, weak references, and promise deduplication support
|
|
73
|
+
- Added table formatting utilities (`formatTable`, `formatSimpleTable`) for CLI output
|
|
74
|
+
- Added progress tracking to spinner with `updateProgress()` and `incrementProgress()` methods
|
|
75
|
+
- Added `isDir` and `safeStats` async helpers to fs module
|
|
76
|
+
|
|
77
|
+
### Changed
|
|
78
|
+
|
|
79
|
+
- Removed `platform` and `arch` options from `dlxBinary` function as cross-platform binary execution is not supported
|
|
80
|
+
|
|
81
|
+
### Fixed
|
|
82
|
+
|
|
83
|
+
- Fixed Windows shell execution in `dlxBinary` by adding cache directory to PATH
|
|
84
|
+
|
|
85
|
+
## [1.4.4] - 2025-10-05
|
|
86
|
+
|
|
87
|
+
### Fixed
|
|
88
|
+
|
|
89
|
+
- Fixed subpath exports
|
|
90
|
+
|
|
91
|
+
## [1.4.3] - 2025-10-04
|
|
92
|
+
|
|
93
|
+
### Added
|
|
94
|
+
|
|
95
|
+
- Spinner lifecycle utilities (`withSpinner`, `withSpinnerRestore`, `withSpinnerSync`) for automatic spinner cleanup with try/finally blocks
|
|
96
|
+
|
|
97
|
+
## [1.4.2] - 2025-10-04
|
|
98
|
+
|
|
99
|
+
### Added
|
|
100
|
+
|
|
101
|
+
- Added `GITHUB_API_BASE_URL` constant for GitHub API endpoint configuration
|
|
102
|
+
- Added `SOCKET_API_BASE_URL` constant for Socket API endpoint configuration
|
|
103
|
+
- Added generic TTL cache utility (`createTtlCache`) with in-memory memoization and persistent storage support
|
|
104
|
+
|
|
105
|
+
### Changed
|
|
106
|
+
|
|
107
|
+
- Refactored GitHub caching to use the new `cache-with-ttl` utility for better performance and consistency
|
|
108
|
+
|
|
109
|
+
## [1.4.1] - 2025-10-04
|
|
110
|
+
|
|
111
|
+
### Changed
|
|
112
|
+
|
|
113
|
+
- Update maintained Node.js versions of `constants.maintainedNodeVersions`
|
|
114
|
+
|
|
115
|
+
## [1.4.0] - 2025-10-04
|
|
116
|
+
|
|
117
|
+
### Added
|
|
118
|
+
|
|
119
|
+
- Added `PromiseQueue` utility for controlled concurrency operations
|
|
120
|
+
- Added lazy dependency loaders and test utilities
|
|
121
|
+
- Added HTTP utilities with retry logic and download locking
|
|
122
|
+
- Added `.claude` directory for scratch documents
|
|
123
|
+
- Added `noUnusedLocals` and `noUnusedParameters` to TypeScript config
|
|
124
|
+
|
|
125
|
+
### Changed
|
|
126
|
+
|
|
127
|
+
- Refactored all library functions to use options objects for better API consistency
|
|
128
|
+
- `lib/strings.ts` - String manipulation functions
|
|
129
|
+
- `lib/url.ts` - URL handling functions
|
|
130
|
+
- `lib/words.ts` - Word manipulation functions
|
|
131
|
+
- Refactored `lib/packages` module into specialized submodules for improved code organization
|
|
132
|
+
- `lib/packages/editable.ts` - Package editing functionality
|
|
133
|
+
- `lib/packages/exports.ts` - Export resolution utilities
|
|
134
|
+
- `lib/packages/licenses.ts` - License handling and validation
|
|
135
|
+
- `lib/packages/manifest.ts` - Manifest data operations
|
|
136
|
+
- `lib/packages/normalize.ts` - Path normalization utilities
|
|
137
|
+
- `lib/packages/operations.ts` - Package installation and modification operations
|
|
138
|
+
- `lib/packages/paths.ts` - Package path utilities
|
|
139
|
+
- `lib/packages/provenance.ts` - Package provenance verification
|
|
140
|
+
- `lib/packages/specs.ts` - Package spec parsing
|
|
141
|
+
- `lib/packages/validation.ts` - Package validation utilities
|
|
142
|
+
- Moved configuration files (vitest, eslint, knip, oxlint, taze) to `.config` directory
|
|
143
|
+
- Replaced `fetch()` with Node.js native `http`/`https` modules for better reliability
|
|
144
|
+
- Replaced `any` types with meaningful types across library utilities
|
|
145
|
+
- Improved pnpm security with build script allowlist
|
|
146
|
+
- Updated vitest coverage thresholds to 80%
|
|
147
|
+
- Consolidated test files to reduce duplication
|
|
148
|
+
- Note: Public API remains unchanged; these are internal organizational improvements
|
|
149
|
+
|
|
150
|
+
### Fixed
|
|
151
|
+
|
|
152
|
+
- Fixed resource leaks and race conditions in socket-registry
|
|
153
|
+
- Fixed `yarn-cache-path` constant to return string type consistently
|
|
154
|
+
- Fixed Yarn Windows temp path detection in `shouldSkipShadow`
|
|
155
|
+
- Fixed path normalization for Windows compatibility across all path utilities
|
|
156
|
+
- Fixed cache path tests for Windows case sensitivity
|
|
157
|
+
- Fixed type errors in promises, parse-args, logger, and specs tests
|
|
158
|
+
- Fixed GitHub tests to mock `httpRequest` correctly
|
|
159
|
+
- Fixed SEA build tests to mock `httpRequest`
|
|
160
|
+
- Decoded URL percent-encoding in `pathLikeToString` fallback
|
|
161
|
+
|
|
162
|
+
## [1.3.10] - 2025-10-03
|
|
163
|
+
|
|
164
|
+
### Added
|
|
165
|
+
|
|
166
|
+
- New utility modules for DLX, shadow, SEA, cacache, and versions functionality
|
|
167
|
+
- getSocketHomePath alias to paths module
|
|
168
|
+
- del dependency and external wrapper for safer file deletion
|
|
169
|
+
- @fileoverview tags to lib modules
|
|
170
|
+
- camelCase expansion for kebab-case arguments in parseArgs
|
|
171
|
+
- Coerce and configuration options to parseArgs
|
|
172
|
+
|
|
173
|
+
### Changed
|
|
174
|
+
|
|
175
|
+
- Updated file removal to use del package for safer deletion
|
|
176
|
+
- Normalized path returns in fs and Socket directory utilities
|
|
177
|
+
- Removed default exports from git and parse-args modules
|
|
178
|
+
- Enhanced test coverage across multiple modules (parse-args, prompts, strings, env, spawn, json)
|
|
179
|
+
|
|
180
|
+
## [1.3.9] - 2025-10-03
|
|
181
|
+
|
|
182
|
+
### Changed
|
|
183
|
+
|
|
184
|
+
- Internal build and distribution updates
|
|
185
|
+
|
|
186
|
+
## [1.3.8] - 2025-10-03
|
|
187
|
+
|
|
188
|
+
### Added
|
|
189
|
+
|
|
190
|
+
- Added unified directory structure for Socket ecosystem tools
|
|
191
|
+
- New path utilities module for cross-platform directory resolution
|
|
192
|
+
- Directory structure constants for Socket CLI, Registry, Firewall, and DLX
|
|
193
|
+
|
|
194
|
+
## [1.3.7] - 2025-10-02
|
|
195
|
+
|
|
196
|
+
### Changed
|
|
197
|
+
|
|
198
|
+
- Updated manifest.json entries
|
|
199
|
+
|
|
200
|
+
## [1.3.6] - 2025-10-01
|
|
201
|
+
|
|
202
|
+
### Fixed
|
|
203
|
+
|
|
204
|
+
- Fixed indent-string interoperability with older v1 and v2 versions
|
|
205
|
+
|
|
206
|
+
## [1.3.5] - 2025-10-01
|
|
207
|
+
|
|
208
|
+
### Added
|
|
209
|
+
|
|
210
|
+
- Added lib/git utilities module
|
|
211
|
+
|
|
212
|
+
### Fixed
|
|
213
|
+
|
|
214
|
+
- Fixed invalid manifest entries
|
|
215
|
+
- Fixed parseArgs strip-aliased bug
|
|
216
|
+
|
|
217
|
+
## [1.3.4] - 2025-10-01
|
|
218
|
+
|
|
219
|
+
### Changed
|
|
220
|
+
|
|
221
|
+
- Updated various package override versions
|
|
222
|
+
|
|
223
|
+
## [1.3.3] - 2025-10-01
|
|
224
|
+
|
|
225
|
+
### Fixed
|
|
226
|
+
|
|
227
|
+
- Fixed normalizePath collapsing multiple leading `..` segments incorrectly
|
|
228
|
+
|
|
229
|
+
## [1.3.2] - 2025-10-01
|
|
230
|
+
|
|
231
|
+
### Added
|
|
232
|
+
|
|
233
|
+
- Added 'sfw' to isBlessedPackageName method check
|
|
234
|
+
- Added ENV.DEBUG normalization for debug package compatibility
|
|
235
|
+
- `DEBUG='1'` or `DEBUG='true'` automatically expands to `DEBUG='*'` (enables all namespaces)
|
|
236
|
+
- `DEBUG='0'` or `DEBUG='false'` automatically converts to empty string (disables all output)
|
|
237
|
+
- Namespace patterns like `DEBUG='app:*'` are preserved unchanged
|
|
238
|
+
|
|
239
|
+
## [1.3.1] - 2025-09-30
|
|
240
|
+
|
|
241
|
+
### Changed
|
|
242
|
+
|
|
243
|
+
- Renamed debug functions from *Complex to *Ns
|
|
244
|
+
|
|
245
|
+
### Fixed
|
|
246
|
+
|
|
247
|
+
- Fixed regression with lib/prompts module imports
|
|
248
|
+
|
|
249
|
+
## [1.3.0] - 2025-09-29
|
|
250
|
+
|
|
251
|
+
### Changed
|
|
252
|
+
|
|
253
|
+
- Updated registry subpath exports
|
|
254
|
+
|
|
255
|
+
### Fixed
|
|
256
|
+
|
|
257
|
+
- Fixed Node.js built-in module imports in CommonJS output
|
|
258
|
+
|
|
259
|
+
## [1.2.2] - 2025-09-29
|
|
260
|
+
|
|
261
|
+
### Changed
|
|
262
|
+
|
|
263
|
+
- Internal improvements to module structure
|
|
264
|
+
|
|
265
|
+
## [1.2.1] - 2025-09-29
|
|
266
|
+
|
|
267
|
+
### Changed
|
|
268
|
+
|
|
269
|
+
- Restructured constants module with new architecture
|
|
270
|
+
- Updated build configuration and package exports
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Socket Inc
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,8 +1,86 @@
|
|
|
1
1
|
# @socketsecurity/lib
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://socket.dev/npm/package/@socketsecurity/lib)
|
|
4
|
+
[](https://github.com/SocketDev/socket-lib/actions/workflows/ci.yml)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
[](https://twitter.com/SocketSecurity)
|
|
7
|
+
[](https://bsky.app/profile/socket.dev)
|
|
8
|
+
|
|
9
|
+
> Core utilities, constants, and helper functions for Socket.dev security tools.
|
|
10
|
+
|
|
11
|
+
## Installation
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pnpm install @socketsecurity/lib
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
- **Constants** — Access Node.js, npm, and package manager constants
|
|
20
|
+
- **Type Definitions** — Full TypeScript support with comprehensive type exports
|
|
21
|
+
- **Helper Utilities** — File system, path, package, and process utilities
|
|
22
|
+
- **Environment Variables** — Typed access to environment variables
|
|
23
|
+
- **Effects** — Visual effects for CLI applications
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
### Constants
|
|
28
|
+
|
|
29
|
+
Import Node.js and package manager constants:
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
import {
|
|
33
|
+
NODE_MODULES,
|
|
34
|
+
PACKAGE_JSON,
|
|
35
|
+
PNPM_LOCK_YAML,
|
|
36
|
+
NPM_REGISTRY_URL,
|
|
37
|
+
} from '@socketsecurity/lib/constants/packages'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Environment Variables
|
|
41
|
+
|
|
42
|
+
Access typed environment variables:
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
import { getEnv } from '@socketsecurity/lib/env/getters'
|
|
46
|
+
import { NODE_ENV } from '@socketsecurity/lib/env/node-env'
|
|
47
|
+
|
|
48
|
+
const env = getEnv('NODE_ENV')
|
|
49
|
+
console.log(NODE_ENV) // 'production' | 'development' | 'test'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
For a complete list of available modules, see the [package.json exports](./package.json).
|
|
53
|
+
|
|
54
|
+
## Type Definitions
|
|
55
|
+
|
|
56
|
+
All types are exported for TypeScript projects:
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import type {
|
|
60
|
+
PackageJson,
|
|
61
|
+
TsConfig,
|
|
62
|
+
LockFile,
|
|
63
|
+
} from '@socketsecurity/lib/types'
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Utilities
|
|
67
|
+
|
|
68
|
+
Access utility modules for common operations:
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// File system utilities
|
|
72
|
+
import { readJsonFile, writeJsonFile } from '@socketsecurity/lib/fs'
|
|
73
|
+
|
|
74
|
+
// Package utilities
|
|
75
|
+
import { parsePackageSpec } from '@socketsecurity/lib/packages'
|
|
76
|
+
|
|
77
|
+
// Path utilities
|
|
78
|
+
import { normalizePath } from '@socketsecurity/lib/paths'
|
|
79
|
+
|
|
80
|
+
// And many more...
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
See the [exports map](./package.json) for all available utility modules.
|
|
6
84
|
|
|
7
85
|
## License
|
|
8
86
|
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"npm": [
|
|
3
|
+
[
|
|
4
|
+
"pkg:npm/%40socketregistry/packageurl-js@latest",
|
|
5
|
+
{
|
|
6
|
+
"categories": ["levelup"],
|
|
7
|
+
"engines": { "node": ">=18" },
|
|
8
|
+
"interop": ["cjs"],
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"name": "@socketregistry/packageurl-js",
|
|
11
|
+
"package": "packageurl-js",
|
|
12
|
+
"version": "latest"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
[
|
|
16
|
+
"pkg:npm/shell-quote@latest",
|
|
17
|
+
{
|
|
18
|
+
"categories": ["tuneup"],
|
|
19
|
+
"engines": { "node": ">=18" },
|
|
20
|
+
"interop": ["cjs"],
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"name": "shell-quote",
|
|
23
|
+
"package": "shell-quote",
|
|
24
|
+
"version": "latest"
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
]
|
|
28
|
+
}
|
package/dist/abort.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Abort signal utilities.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Create a composite AbortSignal from multiple signals.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createCompositeAbortSignal(...signals: Array<AbortSignal | null | undefined>): AbortSignal;
|
|
8
|
+
/**
|
|
9
|
+
* Create an AbortSignal that triggers after a timeout.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createTimeoutSignal(ms: number): AbortSignal;
|
package/dist/abort.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* Socket Lib - Built with esbuild */
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var abort_exports = {};
|
|
20
|
+
__export(abort_exports, {
|
|
21
|
+
createCompositeAbortSignal: () => createCompositeAbortSignal,
|
|
22
|
+
createTimeoutSignal: () => createTimeoutSignal
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(abort_exports);
|
|
25
|
+
function createCompositeAbortSignal(...signals) {
|
|
26
|
+
const validSignals = signals.filter((s) => s != null);
|
|
27
|
+
if (validSignals.length === 0) {
|
|
28
|
+
return new AbortController().signal;
|
|
29
|
+
}
|
|
30
|
+
if (validSignals.length === 1) {
|
|
31
|
+
return validSignals[0];
|
|
32
|
+
}
|
|
33
|
+
const controller = new AbortController();
|
|
34
|
+
for (const signal of validSignals) {
|
|
35
|
+
if (signal.aborted) {
|
|
36
|
+
controller.abort();
|
|
37
|
+
return controller.signal;
|
|
38
|
+
}
|
|
39
|
+
signal.addEventListener("abort", () => controller.abort(), { once: true });
|
|
40
|
+
}
|
|
41
|
+
return controller.signal;
|
|
42
|
+
}
|
|
43
|
+
function createTimeoutSignal(ms) {
|
|
44
|
+
if (typeof ms !== "number" || Number.isNaN(ms)) {
|
|
45
|
+
throw new TypeError("timeout must be a number");
|
|
46
|
+
}
|
|
47
|
+
if (!Number.isFinite(ms)) {
|
|
48
|
+
throw new TypeError("timeout must be a finite number");
|
|
49
|
+
}
|
|
50
|
+
if (ms <= 0) {
|
|
51
|
+
throw new TypeError("timeout must be a positive number");
|
|
52
|
+
}
|
|
53
|
+
const controller = new AbortController();
|
|
54
|
+
setTimeout(() => controller.abort(), ms);
|
|
55
|
+
return controller.signal;
|
|
56
|
+
}
|
|
57
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
58
|
+
0 && (module.exports = {
|
|
59
|
+
createCompositeAbortSignal,
|
|
60
|
+
createTimeoutSignal
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=abort.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/abort.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @fileoverview Abort signal utilities.\n */\n\n/**\n * Create a composite AbortSignal from multiple signals.\n */\nexport function createCompositeAbortSignal(\n ...signals: Array<AbortSignal | null | undefined>\n): AbortSignal {\n const validSignals = signals.filter(s => s != null) as AbortSignal[]\n\n if (validSignals.length === 0) {\n return new AbortController().signal\n }\n\n if (validSignals.length === 1) {\n // biome-ignore lint/style/noNonNullAssertion: Length check ensures array has exactly one element.\n return validSignals[0]!\n }\n\n const controller = new AbortController()\n\n for (const signal of validSignals) {\n if (signal.aborted) {\n controller.abort()\n return controller.signal\n }\n signal.addEventListener('abort', () => controller.abort(), { once: true })\n }\n\n return controller.signal\n}\n\n/**\n * Create an AbortSignal that triggers after a timeout.\n */\nexport function createTimeoutSignal(ms: number): AbortSignal {\n if (typeof ms !== 'number' || Number.isNaN(ms)) {\n throw new TypeError('timeout must be a number')\n }\n if (!Number.isFinite(ms)) {\n throw new TypeError('timeout must be a finite number')\n }\n if (ms <= 0) {\n throw new TypeError('timeout must be a positive number')\n }\n const controller = new AbortController()\n setTimeout(() => controller.abort(), ms)\n return controller.signal\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,SAAS,8BACX,SACU;AACb,QAAM,eAAe,QAAQ,OAAO,OAAK,KAAK,IAAI;AAElD,MAAI,aAAa,WAAW,GAAG;AAC7B,WAAO,IAAI,gBAAgB,EAAE;AAAA,EAC/B;AAEA,MAAI,aAAa,WAAW,GAAG;AAE7B,WAAO,aAAa,CAAC;AAAA,EACvB;AAEA,QAAM,aAAa,IAAI,gBAAgB;AAEvC,aAAW,UAAU,cAAc;AACjC,QAAI,OAAO,SAAS;AAClB,iBAAW,MAAM;AACjB,aAAO,WAAW;AAAA,IACpB;AACA,WAAO,iBAAiB,SAAS,MAAM,WAAW,MAAM,GAAG,EAAE,MAAM,KAAK,CAAC;AAAA,EAC3E;AAEA,SAAO,WAAW;AACpB;AAKO,SAAS,oBAAoB,IAAyB;AAC3D,MAAI,OAAO,OAAO,YAAY,OAAO,MAAM,EAAE,GAAG;AAC9C,UAAM,IAAI,UAAU,0BAA0B;AAAA,EAChD;AACA,MAAI,CAAC,OAAO,SAAS,EAAE,GAAG;AACxB,UAAM,IAAI,UAAU,iCAAiC;AAAA,EACvD;AACA,MAAI,MAAM,GAAG;AACX,UAAM,IAAI,UAAU,mCAAmC;AAAA,EACzD;AACA,QAAM,aAAa,IAAI,gBAAgB;AACvC,aAAW,MAAM,WAAW,MAAM,GAAG,EAAE;AACvC,SAAO,WAAW;AACpB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/agent.d.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { SpawnOptions } from './spawn';
|
|
2
|
+
/**
|
|
3
|
+
* Execute npm commands with optimized flags and settings.
|
|
4
|
+
*
|
|
5
|
+
* SECURITY: Uses array-based arguments to prevent command injection. All elements
|
|
6
|
+
* in the args array are properly escaped by Node.js when passed to spawn().
|
|
7
|
+
*/
|
|
8
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
9
|
+
export declare function execNpm(args: string[], options?: SpawnOptions | undefined): import("./spawn").PromiseSpawnResult;
|
|
10
|
+
export interface PnpmOptions extends SpawnOptions {
|
|
11
|
+
allowLockfileUpdate?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Execute pnpm commands with optimized flags and settings.
|
|
15
|
+
*
|
|
16
|
+
* SECURITY: Uses array-based arguments to prevent command injection. All elements
|
|
17
|
+
* in the args array are properly escaped by Node.js when passed to execBin().
|
|
18
|
+
*/
|
|
19
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
20
|
+
export declare function execPnpm(args: string[], options?: PnpmOptions | undefined): Promise<{
|
|
21
|
+
cmd: string;
|
|
22
|
+
args: string[] | readonly string[];
|
|
23
|
+
code: number;
|
|
24
|
+
signal: NodeJS.Signals;
|
|
25
|
+
stdout: string | Buffer<ArrayBufferLike>;
|
|
26
|
+
stderr: string | Buffer<ArrayBufferLike>;
|
|
27
|
+
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Execute yarn commands with optimized flags and settings.
|
|
30
|
+
*
|
|
31
|
+
* SECURITY: Uses array-based arguments to prevent command injection. All elements
|
|
32
|
+
* in the args array are properly escaped by Node.js when passed to execBin().
|
|
33
|
+
*/
|
|
34
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
35
|
+
export declare function execYarn(args: string[], options?: import('./spawn').SpawnOptions): Promise<{
|
|
36
|
+
cmd: string;
|
|
37
|
+
args: string[] | readonly string[];
|
|
38
|
+
code: number;
|
|
39
|
+
signal: NodeJS.Signals;
|
|
40
|
+
stdout: string | Buffer<ArrayBufferLike>;
|
|
41
|
+
stderr: string | Buffer<ArrayBufferLike>;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Check if a command argument is an npm audit flag.
|
|
45
|
+
*/
|
|
46
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
47
|
+
export declare function isNpmAuditFlag(cmdArg: string): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Check if a command argument is an npm fund flag.
|
|
50
|
+
*/
|
|
51
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
52
|
+
export declare function isNpmFundFlag(cmdArg: string): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Check if a command argument is an npm loglevel flag.
|
|
55
|
+
*/
|
|
56
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
57
|
+
export declare function isNpmLoglevelFlag(cmdArg: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Check if a command argument is an npm node-options flag.
|
|
60
|
+
*/
|
|
61
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
62
|
+
export declare function isNpmNodeOptionsFlag(cmdArg: string): boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Check if a command argument is an npm progress flag.
|
|
65
|
+
*/
|
|
66
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
67
|
+
export declare function isNpmProgressFlag(cmdArg: string): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Check if a command argument is a pnpm ignore-scripts flag.
|
|
70
|
+
*/
|
|
71
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
72
|
+
export declare function isPnpmIgnoreScriptsFlag(cmdArg: string): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Check if a command argument is a pnpm frozen-lockfile flag.
|
|
75
|
+
*/
|
|
76
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
77
|
+
export declare function isPnpmFrozenLockfileFlag(cmdArg: string): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Check if a command argument is a pnpm install command.
|
|
80
|
+
*/
|
|
81
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
82
|
+
export declare function isPnpmInstallCommand(cmdArg: string): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Alias for isNpmLoglevelFlag for pnpm usage.
|
|
85
|
+
*/
|
|
86
|
+
export declare const isPnpmLoglevelFlag: typeof isNpmLoglevelFlag;
|
|
87
|
+
/**
|
|
88
|
+
* Execute a package.json script using the appropriate package manager.
|
|
89
|
+
* Automatically detects pnpm, yarn, or npm based on lockfiles.
|
|
90
|
+
*/
|
|
91
|
+
export interface ExecScriptOptions extends SpawnOptions {
|
|
92
|
+
prepost?: boolean | undefined;
|
|
93
|
+
}
|
|
94
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
95
|
+
export declare function execScript(scriptName: string, args?: string[] | readonly string[] | ExecScriptOptions | undefined, options?: ExecScriptOptions | undefined): Promise<{
|
|
96
|
+
cmd: string;
|
|
97
|
+
args: string[] | readonly string[];
|
|
98
|
+
code: number;
|
|
99
|
+
signal: NodeJS.Signals;
|
|
100
|
+
stdout: string | Buffer<ArrayBufferLike>;
|
|
101
|
+
stderr: string | Buffer<ArrayBufferLike>;
|
|
102
|
+
}>;
|