@socketsecurity/lib 6.0.9 → 6.0.10
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 +6 -0
- package/README.md +8 -9
- package/dist/abort/signal.d.ts +1 -1
- package/dist/abort/signal.js +1 -1
- package/dist/ai/agent-context.d.mts +1 -1
- package/dist/ai/agent-context.js +3 -2
- package/dist/ai/backends.d.mts +3 -3
- package/dist/ai/backends.js +2 -2
- package/dist/ai/billing-context.d.mts +74 -0
- package/dist/ai/billing-context.js +129 -0
- package/dist/ai/credentials.d.mts +39 -5
- package/dist/ai/credentials.js +61 -6
- package/dist/ai/discover.d.mts +4 -0
- package/dist/ai/discover.js +4 -0
- package/dist/ai/exec.d.mts +1 -1
- package/dist/ai/exec.js +1 -1
- package/dist/ai/http.d.mts +8 -8
- package/dist/ai/http.js +6 -6
- package/dist/ai/profiles.d.mts +9 -10
- package/dist/ai/profiles.js +0 -5
- package/dist/ai/role.d.mts +58 -0
- package/dist/ai/role.js +96 -0
- package/dist/ai/route-heuristic.d.mts +177 -0
- package/dist/ai/route-heuristic.js +194 -0
- package/dist/ai/route.d.mts +10 -9
- package/dist/ai/route.js +14 -13
- package/dist/ai/spawn.d.mts +2 -1
- package/dist/ai/spawn.js +25 -2
- package/dist/ai/subagent-status.d.mts +2 -0
- package/dist/ai/subagent-status.js +2 -0
- package/dist/ai/tier.d.mts +1 -1
- package/dist/ai/types.d.mts +9 -2
- package/dist/ai/worktree.d.mts +1 -1
- package/dist/ai/worktree.js +3 -2
- package/dist/argv/parse.d.ts +2 -0
- package/dist/argv/parse.js +2 -0
- package/dist/bin/_internal.d.ts +1 -1
- package/dist/bin/_internal.js +1 -1
- package/dist/bin/prim.cjs +446 -300
- package/dist/bin/shadow.js +2 -1
- package/dist/bin/which.d.ts +28 -3
- package/dist/bin/which.js +45 -3
- package/dist/cacache/_internal.d.ts +10 -2
- package/dist/cacache/_internal.js +6 -10
- package/dist/cache/ttl/_internal.d.ts +33 -0
- package/dist/cache/ttl/_internal.js +68 -0
- package/dist/cache/ttl/browser.d.ts +56 -0
- package/dist/cache/ttl/browser.js +257 -0
- package/dist/cache/ttl/store.js +10 -33
- package/dist/cache/ttl/types.d.ts +46 -3
- package/dist/checks/primordials-defaults.d.ts +5 -5
- package/dist/checks/primordials-defaults.js +5 -5
- package/dist/checks/primordials.d.ts +1 -1
- package/dist/checks/primordials.js +25 -17
- package/dist/cli/check-primordials.d.ts +6 -1
- package/dist/cli/check-primordials.js +14 -5
- package/dist/cli/check.js +1 -1
- package/dist/cli/socket-lib.d.ts +1 -1
- package/dist/cli/socket-lib.js +3 -3
- package/dist/colors/socket-palette.d.ts +1 -1
- package/dist/compression/brotli.d.ts +6 -2
- package/dist/compression/brotli.js +4 -0
- package/dist/compression/gzip.d.ts +6 -2
- package/dist/compression/gzip.js +6 -1
- package/dist/config/layers.d.ts +4 -4
- package/dist/config/layers.js +4 -4
- package/dist/constants/agents.d.ts +3 -0
- package/dist/constants/agents.js +3 -0
- package/dist/constants/node.d.ts +14 -0
- package/dist/constants/node.js +14 -0
- package/dist/constants/package-default-node-range.js +1 -5
- package/dist/constants/packages.d.ts +5 -0
- package/dist/constants/packages.js +5 -0
- package/dist/constants/platform.d.ts +1 -1
- package/dist/constants/platform.js +1 -1
- package/dist/constants/socket.js +1 -1
- package/dist/constants/typescript.d.ts +5 -0
- package/dist/constants/typescript.js +5 -0
- package/dist/debug/_internal.d.ts +22 -7
- package/dist/debug/_internal.js +33 -15
- package/dist/debug/namespace.js +11 -8
- package/dist/debug/output.d.ts +12 -1
- package/dist/debug/output.js +33 -16
- package/dist/dlx/binary-resolution.js +7 -4
- package/dist/eco/npm/npm/parse-lockfile.js +2 -1
- package/dist/eco/npm/vlt/exec.d.ts +1 -1
- package/dist/eco/npm/vlt/exec.js +1 -1
- package/dist/env/agents.d.ts +6 -0
- package/dist/env/agents.js +29 -0
- package/dist/env/flags.d.ts +12 -0
- package/dist/env/flags.js +23 -0
- package/dist/env/github-status.js +2 -2
- package/dist/env/providers.d.ts +6 -0
- package/dist/env/providers.js +23 -0
- package/dist/env/proxy.js +1 -1
- package/dist/env/rewire.d.ts +32 -0
- package/dist/env/rewire.js +55 -23
- package/dist/env/runtimes.d.ts +9 -0
- package/dist/env/runtimes.js +53 -0
- package/dist/env/socket-cli.d.ts +5 -2
- package/dist/env/socket-cli.js +6 -3
- package/dist/errors/predicates.d.ts +3 -2
- package/dist/errors/predicates.js +5 -3
- package/dist/errors/stack.js +2 -1
- package/dist/events/exit/_internal.d.ts +1 -23
- package/dist/external/@npmcli/package-json.js +179 -88
- package/dist/external/@npmcli/promise-spawn.js +2 -2
- package/dist/external/@sinclair/typebox/value.js +5 -4
- package/dist/external/@socketregistry/yocto-spinner.js +3 -3
- package/dist/external/adm-zip.d.ts +82 -0
- package/dist/external/adm-zip.js +2 -2
- package/dist/external/cacache.d.ts +87 -0
- package/dist/external/debug.d.ts +22 -0
- package/dist/external/debug.js +11 -4
- package/dist/external/del.d.ts +1 -0
- package/dist/external/external-pack.d.ts +12 -0
- package/dist/external/external-pack.js +41 -34
- package/dist/external/fast-glob.d.ts +8 -0
- package/dist/external/fast-sort.d.ts +1 -0
- package/dist/external/get-east-asian-width.d.ts +5 -0
- package/dist/external/get-east-asian-width.js +8 -1
- package/dist/external/has-flag.d.ts +1 -0
- package/dist/external/inquirer-pack.d.ts +18 -0
- package/dist/external/libnpmexec.d.ts +35 -0
- package/dist/external/libnpmpack.d.ts +1 -0
- package/dist/external/make-fetch-happen.d.ts +13 -0
- package/dist/external/normalize-package-data.d.ts +4 -0
- package/dist/external/npm-core.d.ts +14 -0
- package/dist/external/npm-pack.d.ts +24 -0
- package/dist/external/npm-pack.js +1551 -1867
- package/dist/external/npm-package-arg.d.ts +4 -0
- package/dist/external/p-map.js +8 -1
- package/dist/external/pacote.d.ts +15 -0
- package/dist/external/pico-pack.d.ts +16 -0
- package/dist/external/pico-pack.js +38 -23
- package/dist/external/picomatch.d.ts +96 -0
- package/dist/external/pony-cause.d.ts +14 -0
- package/dist/external/semver.d.ts +60 -0
- package/dist/external/semver.js +1459 -4
- package/dist/external/shell-quote.d.ts +51 -0
- package/dist/external/shell-quote.js +55 -15
- package/dist/external/signal-exit.d.ts +1 -0
- package/dist/external/spdx-correct.d.ts +4 -0
- package/dist/external/spdx-expression-parse.d.ts +4 -0
- package/dist/external/spdx-pack.d.ts +10 -0
- package/dist/external/std-env.d.ts +284 -0
- package/dist/external/std-env.js +323 -0
- package/dist/external/streaming-iterables.d.ts +11 -0
- package/dist/external/supports-color.d.ts +1 -0
- package/dist/external/tar-fs.d.ts +31 -0
- package/dist/external/validate-npm-package-name.d.ts +4 -0
- package/dist/external/which.d.ts +25 -0
- package/dist/external/which.js +2 -2
- package/dist/external/yargs-parser.d.ts +2 -0
- package/dist/external/yargs-parser.js +11 -3
- package/dist/external/yoctocolors-cjs.d.ts +51 -0
- package/dist/external-tools/bazel/asset-names.d.ts +1 -1
- package/dist/external-tools/bazel/from-download.d.ts +1 -1
- package/dist/external-tools/bazel/resolve.d.ts +3 -0
- package/dist/external-tools/bazel/resolve.js +3 -0
- package/dist/external-tools/cdxgen/asset-names.d.ts +5 -5
- package/dist/external-tools/cdxgen/asset-names.js +3 -3
- package/dist/external-tools/cdxgen/from-download.d.ts +2 -2
- package/dist/external-tools/cdxgen/from-download.js +1 -1
- package/dist/external-tools/cdxgen/resolve.d.ts +4 -1
- package/dist/external-tools/cdxgen/resolve.js +4 -1
- package/dist/external-tools/cdxgen/types.d.ts +1 -1
- package/dist/external-tools/from-download.d.ts +2 -2
- package/dist/external-tools/from-download.js +1 -1
- package/dist/external-tools/janus/asset-names.d.ts +4 -1
- package/dist/external-tools/janus/asset-names.js +3 -0
- package/dist/external-tools/janus/from-download.d.ts +3 -3
- package/dist/external-tools/janus/from-download.js +2 -2
- package/dist/external-tools/janus/resolve.d.ts +3 -0
- package/dist/external-tools/janus/resolve.js +3 -0
- package/dist/external-tools/jre/asset-names.d.ts +3 -1
- package/dist/external-tools/jre/asset-names.js +2 -0
- package/dist/external-tools/jre/from-download.d.ts +1 -1
- package/dist/external-tools/manifest.d.ts +5 -3
- package/dist/external-tools/manifest.js +4 -2
- package/dist/external-tools/opengrep/asset-names.d.ts +1 -1
- package/dist/external-tools/opengrep/resolve.d.ts +3 -0
- package/dist/external-tools/opengrep/resolve.js +3 -0
- package/dist/external-tools/python/asset-names.d.ts +3 -1
- package/dist/external-tools/python/asset-names.js +7 -3
- package/dist/external-tools/python/pin.js +3 -1
- package/dist/external-tools/python/resolve.d.ts +3 -0
- package/dist/external-tools/python/resolve.js +3 -0
- package/dist/external-tools/sbt/resolve.d.ts +3 -0
- package/dist/external-tools/sbt/resolve.js +3 -0
- package/dist/external-tools/skillspector/from-uv.d.ts +1 -1
- package/dist/external-tools/synp/resolve.d.ts +3 -0
- package/dist/external-tools/synp/resolve.js +3 -0
- package/dist/external-tools/trivy/asset-names.d.ts +1 -1
- package/dist/external-tools/trivy/resolve.d.ts +3 -0
- package/dist/external-tools/trivy/resolve.js +3 -0
- package/dist/external-tools/trufflehog/asset-names.d.ts +4 -1
- package/dist/external-tools/trufflehog/asset-names.js +3 -0
- package/dist/external-tools/trufflehog/from-download.d.ts +1 -1
- package/dist/external-tools/trufflehog/resolve.d.ts +3 -0
- package/dist/external-tools/trufflehog/resolve.js +3 -0
- package/dist/external-tools/uv/asset-names.d.ts +1 -1
- package/dist/external-tools/uv/resolve.d.ts +3 -0
- package/dist/external-tools/uv/resolve.js +3 -0
- package/dist/fleet/repo-config.d.ts +8 -6
- package/dist/fleet/repo-config.js +8 -6
- package/dist/fs/_internal.d.ts +1 -1
- package/dist/fs/_internal.js +1 -1
- package/dist/fs/access.d.ts +2 -0
- package/dist/fs/access.js +2 -0
- package/dist/fs/allowed-dirs-cache.js +5 -3
- package/dist/fs/find.js +1 -2
- package/dist/fs/inspect.d.ts +2 -2
- package/dist/fs/read-file.js +3 -4
- package/dist/fs/safe.js +1 -1
- package/dist/git/_internal.js +5 -1
- package/dist/github/commit.d.ts +92 -0
- package/dist/github/commit.js +113 -0
- package/dist/github/ghsa.js +1 -1
- package/dist/github/refs-graphql.js +1 -1
- package/dist/github/request.js +1 -1
- package/dist/github/token.d.ts +5 -2
- package/dist/github/token.js +6 -4
- package/dist/github/workflow-runs.d.ts +107 -0
- package/dist/github/workflow-runs.js +98 -0
- package/dist/http-request/_internal.d.ts +1 -1
- package/dist/http-request/browser.d.ts +6 -0
- package/dist/http-request/browser.js +3 -2
- package/dist/http-request/download.js +2 -0
- package/dist/http-request/headers.d.ts +1 -1
- package/dist/http-request/headers.js +1 -1
- package/dist/http-request/request-attempt.js +6 -3
- package/dist/http-request/request-types.d.ts +10 -1
- package/dist/http-request/request.js +2 -2
- package/dist/http-request/user-agent.d.ts +23 -2
- package/dist/http-request/user-agent.js +48 -6
- package/dist/integrity.d.ts +3 -1
- package/dist/integrity.js +3 -1
- package/dist/json/format.js +4 -1
- package/dist/logger/_internal.d.ts +13 -15
- package/dist/logger/_internal.js +21 -21
- package/dist/logger/colors.d.ts +9 -3
- package/dist/logger/colors.js +6 -13
- package/dist/logger/console-methods.js +2 -2
- package/dist/logger/console.d.ts +1 -0
- package/dist/logger/console.js +9 -9
- package/dist/logger/node.js +2 -1
- package/dist/native-messaging/install.js +1 -1
- package/dist/native-messaging/rate-limit.d.ts +4 -1
- package/dist/native-messaging/rate-limit.js +4 -1
- package/dist/node/events.d.ts +3 -0
- package/dist/node/events.js +3 -0
- package/dist/node/fs.d.ts +1 -1
- package/dist/node/timers-promises.d.ts +3 -0
- package/dist/node/timers-promises.js +3 -0
- package/dist/node/url.d.ts +3 -0
- package/dist/node/url.js +3 -0
- package/dist/npm/meta-cache.d.ts +183 -0
- package/dist/npm/meta-cache.js +318 -0
- package/dist/npm/meta-slice.d.ts +27 -0
- package/dist/npm/meta-slice.js +68 -0
- package/dist/npm/meta-types.d.ts +282 -0
- package/dist/npm/meta-types.js +2 -0
- package/dist/npm/meta.d.ts +125 -0
- package/dist/npm/meta.js +347 -0
- package/dist/npm/registry.d.ts +212 -0
- package/dist/npm/registry.js +284 -0
- package/dist/objects/getters.d.ts +1 -1
- package/dist/objects/getters.js +1 -1
- package/dist/packages/manifest.js +6 -7
- package/dist/packages/metadata-extensions.js +2 -4
- package/dist/packages/provenance.d.ts +8 -0
- package/dist/packages/provenance.js +8 -0
- package/dist/packages/tarball.js +1 -2
- package/dist/packages/validation.d.ts +0 -10
- package/dist/packages/validation.js +0 -14
- package/dist/paths/exts.d.ts +30 -0
- package/dist/paths/exts.js +30 -0
- package/dist/paths/filenames.d.ts +6 -0
- package/dist/paths/filenames.js +6 -0
- package/dist/paths/globs.d.ts +6 -0
- package/dist/paths/globs.js +6 -0
- package/dist/paths/resolve.js +19 -14
- package/dist/paths/socket.d.ts +8 -8
- package/dist/paths/socket.js +8 -8
- package/dist/perf/report.js +4 -2
- package/dist/pkg-ext/data.js +0 -2
- package/dist/primordials/globals.d.ts +1 -1
- package/dist/primordials/globals.js +1 -1
- package/dist/primordials/headers.d.ts +13 -1
- package/dist/primordials/headers.js +13 -1
- package/dist/primordials/process.d.ts +1 -1
- package/dist/primordials/process.js +1 -1
- package/dist/primordials/url.d.ts +18 -0
- package/dist/primordials/url.js +18 -0
- package/dist/process/spawn/child.js +3 -5
- package/dist/promises/_internal.d.ts +1 -1
- package/dist/promises/_internal.js +1 -2
- package/dist/promises/options.js +3 -3
- package/dist/releases/socket-btm-binary-naming.js +12 -1
- package/dist/secrets/_internal.d.ts +1 -1
- package/dist/secrets/_internal.js +1 -1
- package/dist/secrets/find.d.ts +2 -2
- package/dist/secrets/find.js +2 -2
- package/dist/secrets/keychain.d.ts +10 -1
- package/dist/secrets/keychain.js +10 -1
- package/dist/secrets/socket-api-token.d.ts +1 -1
- package/dist/secrets/socket-api-token.js +1 -1
- package/dist/secrets/types.d.ts +1 -1
- package/dist/smol/http.d.ts +2 -0
- package/dist/smol/http.js +2 -0
- package/dist/smol/https.d.ts +2 -0
- package/dist/smol/https.js +2 -0
- package/dist/sorts/_internal.d.ts +2 -3
- package/dist/sorts/_internal.js +1 -3
- package/dist/spinner/format.js +2 -4
- package/dist/stdio/footer.js +8 -7
- package/dist/stdio/prompts.d.ts +8 -15
- package/dist/stdio/prompts.js +18 -29
- package/dist/strings/predicates.d.ts +2 -2
- package/dist/strings/search.js +1 -1
- package/dist/strings/types.d.ts +4 -0
- package/dist/strings/width.d.ts +1 -0
- package/dist/strings/width.js +17 -8
- package/dist/themes/context.d.ts +13 -0
- package/dist/themes/context.js +23 -8
- package/dist/versions/_internal.d.ts +43 -13
- package/dist/versions/_internal.js +27 -15
- package/dist/versions/compare.d.ts +16 -10
- package/dist/versions/compare.js +36 -16
- package/dist/versions/parse.js +1 -1
- package/dist/versions/range.js +3 -2
- package/dist/words/pluralize.js +4 -1
- package/llms.txt +63 -750
- package/package.json +200 -35
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
const { ObjectCreate: _p_ObjectCreate } = require('../primordials/object.js')
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* Bundled from std-env
|
|
5
|
+
* This is a zero-dependency bundle created by rolldown.
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
//#region \0rolldown/runtime.js
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __name = (target, value) => __defProp(target, "name", {
|
|
12
|
+
value,
|
|
13
|
+
configurable: true
|
|
14
|
+
});
|
|
15
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
16
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
17
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
18
|
+
var __esmMin = (fn, res, err) => () => {
|
|
19
|
+
if (err) throw err[0];
|
|
20
|
+
try {
|
|
21
|
+
return fn && (res = fn(fn = 0)), res;
|
|
22
|
+
} catch (e) {
|
|
23
|
+
throw err = [e], e;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var __exportAll = (all, no_symbols) => {
|
|
27
|
+
let target = {};
|
|
28
|
+
for (var name in all) {
|
|
29
|
+
__defProp(target, name, {
|
|
30
|
+
get: all[name],
|
|
31
|
+
enumerable: true
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
if (!no_symbols) {
|
|
35
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
36
|
+
}
|
|
37
|
+
return target;
|
|
38
|
+
};
|
|
39
|
+
var __copyProps = (to, from, except, desc) => {
|
|
40
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
42
|
+
key = keys[i];
|
|
43
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
44
|
+
__defProp(to, key, {
|
|
45
|
+
get: ((k) => from[k]).bind(null, key),
|
|
46
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return to;
|
|
52
|
+
};
|
|
53
|
+
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
54
|
+
|
|
55
|
+
//#endregion
|
|
56
|
+
|
|
57
|
+
//#region node_modules/.pnpm/std-env@4.1.0/node_modules/std-env/dist/index.mjs
|
|
58
|
+
var dist_exports = /* @__PURE__ */ __exportAll({
|
|
59
|
+
agent: () => s,
|
|
60
|
+
agentInfo: () => o,
|
|
61
|
+
detectAgent: () => a,
|
|
62
|
+
detectProvider: () => u,
|
|
63
|
+
env: () => e,
|
|
64
|
+
hasTTY: () => h,
|
|
65
|
+
hasWindow: () => g,
|
|
66
|
+
isAgent: () => c,
|
|
67
|
+
isBun: () => k,
|
|
68
|
+
isCI: () => m,
|
|
69
|
+
isColorSupported: () => T,
|
|
70
|
+
isDebug: () => _,
|
|
71
|
+
isDeno: () => A,
|
|
72
|
+
isDevelopment: () => b,
|
|
73
|
+
isEdgeLight: () => N,
|
|
74
|
+
isFastly: () => j,
|
|
75
|
+
isLinux: () => C,
|
|
76
|
+
isMacOS: () => w,
|
|
77
|
+
isMinimal: () => x,
|
|
78
|
+
isNetlify: () => M,
|
|
79
|
+
isNode: () => O,
|
|
80
|
+
isProduction: () => y,
|
|
81
|
+
isTest: () => v,
|
|
82
|
+
isWindows: () => S,
|
|
83
|
+
isWorkerd: () => P,
|
|
84
|
+
nodeENV: () => n,
|
|
85
|
+
nodeMajorVersion: () => D,
|
|
86
|
+
nodeVersion: () => E,
|
|
87
|
+
platform: () => p,
|
|
88
|
+
process: () => t,
|
|
89
|
+
provider: () => f,
|
|
90
|
+
providerInfo: () => d,
|
|
91
|
+
runtime: () => R,
|
|
92
|
+
runtimeInfo: () => L
|
|
93
|
+
});
|
|
94
|
+
function i(t, n) {
|
|
95
|
+
return () => {
|
|
96
|
+
let r = e[t];
|
|
97
|
+
return r ? n.test(r) : !1;
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
function a() {
|
|
101
|
+
let t = e.AI_AGENT;
|
|
102
|
+
if (t) return { name: t.toLowerCase() };
|
|
103
|
+
for (let [t, n] of r) for (let r of n) if (typeof r == `string` ? e[r] : r()) return { name: t };
|
|
104
|
+
return {};
|
|
105
|
+
}
|
|
106
|
+
function u() {
|
|
107
|
+
for (let t of l) if (e[t[1] || t[0]]) return {
|
|
108
|
+
name: t[0].toLowerCase(),
|
|
109
|
+
...t[2]
|
|
110
|
+
};
|
|
111
|
+
return e.SHELL === `/bin/jsh` && t.versions?.webcontainer ? {
|
|
112
|
+
name: `stackblitz`,
|
|
113
|
+
ci: !1
|
|
114
|
+
} : {
|
|
115
|
+
name: ``,
|
|
116
|
+
ci: !1
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function I() {
|
|
120
|
+
let e = F.find((e) => e[0]);
|
|
121
|
+
if (e) return { name: e[1] };
|
|
122
|
+
}
|
|
123
|
+
var e, t, n, r, o, s, c, l, d, f, p, m, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, A, j, M, N, P, F, L, R;
|
|
124
|
+
var init_dist = __esmMin((() => {
|
|
125
|
+
e = globalThis.process?.env || _p_ObjectCreate(null);
|
|
126
|
+
t = globalThis.process || { env: e };
|
|
127
|
+
n = t !== void 0 && t.env && t.env.NODE_ENV || void 0;
|
|
128
|
+
r = [
|
|
129
|
+
[`claude`, [`CLAUDECODE`, `CLAUDE_CODE`]],
|
|
130
|
+
[`replit`, [`REPL_ID`]],
|
|
131
|
+
[`gemini`, [`GEMINI_CLI`]],
|
|
132
|
+
[`codex`, [`CODEX_SANDBOX`, `CODEX_THREAD_ID`]],
|
|
133
|
+
[`opencode`, [`OPENCODE`]],
|
|
134
|
+
[`pi`, [i(`PATH`, /\.pi[\\/]agent/)]],
|
|
135
|
+
[`auggie`, [`AUGMENT_AGENT`]],
|
|
136
|
+
[`goose`, [`GOOSE_PROVIDER`]],
|
|
137
|
+
[`devin`, [i(`EDITOR`, /devin/)]],
|
|
138
|
+
[`cursor`, [`CURSOR_AGENT`]],
|
|
139
|
+
[`kiro`, [i(`TERM_PROGRAM`, /kiro/)]]
|
|
140
|
+
];
|
|
141
|
+
o = a();
|
|
142
|
+
s = o.name;
|
|
143
|
+
c = !!o.name;
|
|
144
|
+
l = [
|
|
145
|
+
[`APPVEYOR`],
|
|
146
|
+
[
|
|
147
|
+
`AWS_AMPLIFY`,
|
|
148
|
+
`AWS_APP_ID`,
|
|
149
|
+
{ ci: !0 }
|
|
150
|
+
],
|
|
151
|
+
[`AZURE_PIPELINES`, `SYSTEM_TEAMFOUNDATIONCOLLECTIONURI`],
|
|
152
|
+
[`AZURE_STATIC`, `INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN`],
|
|
153
|
+
[`APPCIRCLE`, `AC_APPCIRCLE`],
|
|
154
|
+
[`BAMBOO`, `bamboo_planKey`],
|
|
155
|
+
[`BITBUCKET`, `BITBUCKET_COMMIT`],
|
|
156
|
+
[`BITRISE`, `BITRISE_IO`],
|
|
157
|
+
[`BUDDY`, `BUDDY_WORKSPACE_ID`],
|
|
158
|
+
[`BUILDKITE`],
|
|
159
|
+
[`CIRCLE`, `CIRCLECI`],
|
|
160
|
+
[`CIRRUS`, `CIRRUS_CI`],
|
|
161
|
+
[
|
|
162
|
+
`CLOUDFLARE_PAGES`,
|
|
163
|
+
`CF_PAGES`,
|
|
164
|
+
{ ci: !0 }
|
|
165
|
+
],
|
|
166
|
+
[
|
|
167
|
+
`CLOUDFLARE_WORKERS`,
|
|
168
|
+
`WORKERS_CI`,
|
|
169
|
+
{ ci: !0 }
|
|
170
|
+
],
|
|
171
|
+
[`GOOGLE_CLOUDRUN`, `K_SERVICE`],
|
|
172
|
+
[`GOOGLE_CLOUDRUN_JOB`, `CLOUD_RUN_JOB`],
|
|
173
|
+
[`CODEBUILD`, `CODEBUILD_BUILD_ARN`],
|
|
174
|
+
[`CODEFRESH`, `CF_BUILD_ID`],
|
|
175
|
+
[`DRONE`],
|
|
176
|
+
[`DRONE`, `DRONE_BUILD_EVENT`],
|
|
177
|
+
[`DSARI`],
|
|
178
|
+
[`GITHUB_ACTIONS`],
|
|
179
|
+
[`GITLAB`, `GITLAB_CI`],
|
|
180
|
+
[`GITLAB`, `CI_MERGE_REQUEST_ID`],
|
|
181
|
+
[`GOCD`, `GO_PIPELINE_LABEL`],
|
|
182
|
+
[`LAYERCI`],
|
|
183
|
+
[`JENKINS`, `JENKINS_URL`],
|
|
184
|
+
[`HUDSON`, `HUDSON_URL`],
|
|
185
|
+
[`MAGNUM`],
|
|
186
|
+
[`NETLIFY`],
|
|
187
|
+
[
|
|
188
|
+
`NETLIFY`,
|
|
189
|
+
`NETLIFY_LOCAL`,
|
|
190
|
+
{ ci: !1 }
|
|
191
|
+
],
|
|
192
|
+
[`NEVERCODE`],
|
|
193
|
+
[`RENDER`],
|
|
194
|
+
[`SAIL`, `SAILCI`],
|
|
195
|
+
[`SEMAPHORE`],
|
|
196
|
+
[`SCREWDRIVER`],
|
|
197
|
+
[`SHIPPABLE`],
|
|
198
|
+
[`SOLANO`, `TDDIUM`],
|
|
199
|
+
[`STRIDER`],
|
|
200
|
+
[`TEAMCITY`, `TEAMCITY_VERSION`],
|
|
201
|
+
[`TRAVIS`],
|
|
202
|
+
[`VERCEL`, `NOW_BUILDER`],
|
|
203
|
+
[
|
|
204
|
+
`VERCEL`,
|
|
205
|
+
`VERCEL`,
|
|
206
|
+
{ ci: !1 }
|
|
207
|
+
],
|
|
208
|
+
[
|
|
209
|
+
`VERCEL`,
|
|
210
|
+
`VERCEL_ENV`,
|
|
211
|
+
{ ci: !1 }
|
|
212
|
+
],
|
|
213
|
+
[`APPCENTER`, `APPCENTER_BUILD_ID`],
|
|
214
|
+
[
|
|
215
|
+
`CODESANDBOX`,
|
|
216
|
+
`CODESANDBOX_SSE`,
|
|
217
|
+
{ ci: !1 }
|
|
218
|
+
],
|
|
219
|
+
[
|
|
220
|
+
`CODESANDBOX`,
|
|
221
|
+
`CODESANDBOX_HOST`,
|
|
222
|
+
{ ci: !1 }
|
|
223
|
+
],
|
|
224
|
+
[`STACKBLITZ`],
|
|
225
|
+
[`STORMKIT`],
|
|
226
|
+
[`CLEAVR`],
|
|
227
|
+
[`ZEABUR`],
|
|
228
|
+
[
|
|
229
|
+
`CODESPHERE`,
|
|
230
|
+
`CODESPHERE_APP_ID`,
|
|
231
|
+
{ ci: !0 }
|
|
232
|
+
],
|
|
233
|
+
[`RAILWAY`, `RAILWAY_PROJECT_ID`],
|
|
234
|
+
[`RAILWAY`, `RAILWAY_SERVICE_ID`],
|
|
235
|
+
[`DENO-DEPLOY`, `DENO_DEPLOY`],
|
|
236
|
+
[`DENO-DEPLOY`, `DENO_DEPLOYMENT_ID`],
|
|
237
|
+
[
|
|
238
|
+
`FIREBASE_APP_HOSTING`,
|
|
239
|
+
`FIREBASE_APP_HOSTING`,
|
|
240
|
+
{ ci: !0 }
|
|
241
|
+
],
|
|
242
|
+
[
|
|
243
|
+
`EDGEONE_PAGES`,
|
|
244
|
+
`EO_PAGES_CI`,
|
|
245
|
+
{ ci: !0 }
|
|
246
|
+
]
|
|
247
|
+
];
|
|
248
|
+
d = u();
|
|
249
|
+
f = d.name;
|
|
250
|
+
p = t.platform || ``;
|
|
251
|
+
m = !!e.CI || d.ci !== !1;
|
|
252
|
+
h = !!t.stdout?.isTTY;
|
|
253
|
+
g = typeof window < `u`;
|
|
254
|
+
_ = !!e.DEBUG;
|
|
255
|
+
v = n === `test` || !!e.TEST;
|
|
256
|
+
y = n === `production` || e.MODE === `production`;
|
|
257
|
+
b = n === `dev` || n === `development` || e.MODE === `development`;
|
|
258
|
+
x = !!e.MINIMAL || m || v || !h;
|
|
259
|
+
S = /^win/i.test(p);
|
|
260
|
+
C = /^linux/i.test(p);
|
|
261
|
+
w = /^darwin/i.test(p);
|
|
262
|
+
T = !e.NO_COLOR && (!!e.FORCE_COLOR || (h || S) && e.TERM !== `dumb` || m);
|
|
263
|
+
E = (t.versions?.node || ``).replace(/^v/, ``) || null;
|
|
264
|
+
D = Number(E?.split(`.`)[0]) || null;
|
|
265
|
+
O = !!t?.versions?.node;
|
|
266
|
+
k = `Bun` in globalThis;
|
|
267
|
+
A = `Deno` in globalThis;
|
|
268
|
+
j = `fastly` in globalThis;
|
|
269
|
+
M = `Netlify` in globalThis;
|
|
270
|
+
N = `EdgeRuntime` in globalThis;
|
|
271
|
+
P = globalThis.undefined?.userAgent === `Cloudflare-Workers`;
|
|
272
|
+
F = [
|
|
273
|
+
[M, `netlify`],
|
|
274
|
+
[N, `edge-light`],
|
|
275
|
+
[P, `workerd`],
|
|
276
|
+
[j, `fastly`],
|
|
277
|
+
[A, `deno`],
|
|
278
|
+
[k, `bun`],
|
|
279
|
+
[O, `node`]
|
|
280
|
+
];
|
|
281
|
+
L = I();
|
|
282
|
+
R = L?.name || ``;
|
|
283
|
+
}));
|
|
284
|
+
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region src/external/std-env.js
|
|
287
|
+
module.exports = (init_dist(), __toCommonJS(dist_exports));
|
|
288
|
+
|
|
289
|
+
//#endregion
|
|
290
|
+
exports.agent = s;
|
|
291
|
+
exports.agentInfo = o;
|
|
292
|
+
exports.detectAgent = a;
|
|
293
|
+
exports.detectProvider = u;
|
|
294
|
+
exports.env = e;
|
|
295
|
+
exports.hasTTY = h;
|
|
296
|
+
exports.hasWindow = g;
|
|
297
|
+
exports.isAgent = c;
|
|
298
|
+
exports.isBun = k;
|
|
299
|
+
exports.isCI = m;
|
|
300
|
+
exports.isColorSupported = T;
|
|
301
|
+
exports.isDebug = _;
|
|
302
|
+
exports.isDeno = A;
|
|
303
|
+
exports.isDevelopment = b;
|
|
304
|
+
exports.isEdgeLight = N;
|
|
305
|
+
exports.isFastly = j;
|
|
306
|
+
exports.isLinux = C;
|
|
307
|
+
exports.isMacOS = w;
|
|
308
|
+
exports.isMinimal = x;
|
|
309
|
+
exports.isNetlify = M;
|
|
310
|
+
exports.isNode = O;
|
|
311
|
+
exports.isProduction = y;
|
|
312
|
+
exports.isTest = v;
|
|
313
|
+
exports.isWindows = S;
|
|
314
|
+
exports.isWorkerd = P;
|
|
315
|
+
exports.nodeENV = n;
|
|
316
|
+
exports.nodeMajorVersion = D;
|
|
317
|
+
exports.nodeVersion = E;
|
|
318
|
+
exports.platform = p;
|
|
319
|
+
exports.process = t;
|
|
320
|
+
exports.provider = f;
|
|
321
|
+
exports.providerInfo = d;
|
|
322
|
+
exports.runtime = R;
|
|
323
|
+
exports.runtimeInfo = L;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function parallelMap<T, R>(
|
|
2
|
+
concurrency: number,
|
|
3
|
+
mapper: (value: T) => Promise<R> | R,
|
|
4
|
+
iterable: AsyncIterable<T> | Iterable<T>,
|
|
5
|
+
): AsyncIterableIterator<R>
|
|
6
|
+
|
|
7
|
+
export function transform<T, R>(
|
|
8
|
+
concurrency: number,
|
|
9
|
+
func: (data: T) => R | Promise<R>,
|
|
10
|
+
iterable: AsyncIterable<T> | Iterable<T>,
|
|
11
|
+
): AsyncIterableIterator<R>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { supportsColor as default } from './external-pack'
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Readable, Writable } from 'node:stream'
|
|
2
|
+
|
|
3
|
+
export interface PackOptions {
|
|
4
|
+
entries?: string[]
|
|
5
|
+
dereference?: boolean
|
|
6
|
+
filter?: (name: string) => boolean
|
|
7
|
+
fs?: any
|
|
8
|
+
ignore?: (name: string) => boolean
|
|
9
|
+
map?: (header: any) => any
|
|
10
|
+
mapStream?: (stream: Readable, header: any) => Readable
|
|
11
|
+
pack?: any
|
|
12
|
+
sort?: boolean
|
|
13
|
+
strip?: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ExtractOptions {
|
|
17
|
+
dereference?: boolean
|
|
18
|
+
filter?: (name: string, header: any) => boolean
|
|
19
|
+
fs?: any
|
|
20
|
+
ignore?: (name: string, header: any) => boolean
|
|
21
|
+
map?: (header: any) => any
|
|
22
|
+
mapStream?: (stream: Readable, header: any) => Readable
|
|
23
|
+
readable?: boolean
|
|
24
|
+
strip?: number
|
|
25
|
+
strict?: boolean
|
|
26
|
+
umask?: number
|
|
27
|
+
writable?: boolean
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function pack(cwd: string, opts?: PackOptions): Readable
|
|
31
|
+
export function extract(cwd: string, opts?: ExtractOptions): Writable
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface WhichOptions {
|
|
2
|
+
path?: string
|
|
3
|
+
pathExt?: string
|
|
4
|
+
all?: boolean
|
|
5
|
+
nothrow?: boolean
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface WhichFunction {
|
|
9
|
+
(cmd: string, options: WhichOptions & { all: true }): Promise<string[]>
|
|
10
|
+
(
|
|
11
|
+
cmd: string,
|
|
12
|
+
options: WhichOptions & { nothrow: true; all?: false },
|
|
13
|
+
): Promise<string | null>
|
|
14
|
+
(cmd: string, options?: WhichOptions): Promise<string>
|
|
15
|
+
|
|
16
|
+
sync(cmd: string, options: WhichOptions & { all: true }): string[]
|
|
17
|
+
sync(
|
|
18
|
+
cmd: string,
|
|
19
|
+
options: WhichOptions & { nothrow: true; all?: false },
|
|
20
|
+
): string | null
|
|
21
|
+
sync(cmd: string, options?: WhichOptions): string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare const which: WhichFunction
|
|
25
|
+
export default which
|
package/dist/external/which.js
CHANGED
|
@@ -76,7 +76,7 @@ var require_posix = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
76
76
|
const myGroups = options.groups ?? process.getgroups?.() ?? [];
|
|
77
77
|
const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];
|
|
78
78
|
if (myUid === void 0 || myGid === void 0) throw new _p_ErrorCtor("cannot get uid or gid");
|
|
79
|
-
const groups = new _p_SetCtor([myGid, ...myGroups]);
|
|
79
|
+
const groups = /* @__PURE__ */ new _p_SetCtor([myGid, ...myGroups]);
|
|
80
80
|
const mod = stat.mode;
|
|
81
81
|
const uid = stat.uid;
|
|
82
82
|
const gid = stat.gid;
|
|
@@ -206,7 +206,7 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
206
206
|
}));
|
|
207
207
|
|
|
208
208
|
//#endregion
|
|
209
|
-
//#region node_modules/.pnpm/which@
|
|
209
|
+
//#region node_modules/.pnpm/which@7.0.0/node_modules/which/lib/index.js
|
|
210
210
|
var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
211
211
|
const { isexe, sync: isexeSync } = require_cjs();
|
|
212
212
|
const { join, delimiter, sep, posix } = require("path");
|
|
@@ -14,7 +14,14 @@ var __name = (target, value) => __defProp(target, "name", {
|
|
|
14
14
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
15
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
16
16
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
-
var __esmMin = (fn, res) => () =>
|
|
17
|
+
var __esmMin = (fn, res, err) => () => {
|
|
18
|
+
if (err) throw err[0];
|
|
19
|
+
try {
|
|
20
|
+
return fn && (res = fn(fn = 0)), res;
|
|
21
|
+
} catch (e) {
|
|
22
|
+
throw err = [e], e;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
18
25
|
var __exportAll = (all, no_symbols) => {
|
|
19
26
|
let target = {};
|
|
20
27
|
for (var name in all) {
|
|
@@ -48,7 +55,7 @@ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["modu
|
|
|
48
55
|
let util = require("util");
|
|
49
56
|
let path = require("path");
|
|
50
57
|
let fs = require("fs");
|
|
51
|
-
let node_module = require("
|
|
58
|
+
let node_module = require("module");
|
|
52
59
|
|
|
53
60
|
const { ArrayIsArray: _p_ArrayIsArray } = require('../primordials/array.js')
|
|
54
61
|
|
|
@@ -534,7 +541,8 @@ var init_yargs_parser = __esmMin((() => {
|
|
|
534
541
|
const splitKey = key.split(".");
|
|
535
542
|
setKey(argv, splitKey, value);
|
|
536
543
|
if (flags.aliases[key]) flags.aliases[key].forEach(function(x) {
|
|
537
|
-
|
|
544
|
+
const keyProperties = x.split(".");
|
|
545
|
+
setKey(argv, keyProperties, value);
|
|
538
546
|
});
|
|
539
547
|
if (splitKey.length > 1 && configuration["dot-notation"]) (flags.aliases[splitKey[0]] || []).forEach(function(x) {
|
|
540
548
|
let keyProperties = x.split(".");
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export interface YoctoColors {
|
|
2
|
+
// Modifiers
|
|
3
|
+
reset: (text: string) => string
|
|
4
|
+
bold: (text: string) => string
|
|
5
|
+
dim: (text: string) => string
|
|
6
|
+
italic: (text: string) => string
|
|
7
|
+
underline: (text: string) => string
|
|
8
|
+
overline: (text: string) => string
|
|
9
|
+
inverse: (text: string) => string
|
|
10
|
+
hidden: (text: string) => string
|
|
11
|
+
strikethrough: (text: string) => string
|
|
12
|
+
|
|
13
|
+
// Colors
|
|
14
|
+
black: (text: string) => string
|
|
15
|
+
red: (text: string) => string
|
|
16
|
+
green: (text: string) => string
|
|
17
|
+
yellow: (text: string) => string
|
|
18
|
+
blue: (text: string) => string
|
|
19
|
+
magenta: (text: string) => string
|
|
20
|
+
cyan: (text: string) => string
|
|
21
|
+
white: (text: string) => string
|
|
22
|
+
gray: (text: string) => string
|
|
23
|
+
grey: (text: string) => string
|
|
24
|
+
|
|
25
|
+
// Bright colors
|
|
26
|
+
blackBright: (text: string) => string
|
|
27
|
+
redBright: (text: string) => string
|
|
28
|
+
greenBright: (text: string) => string
|
|
29
|
+
yellowBright: (text: string) => string
|
|
30
|
+
blueBright: (text: string) => string
|
|
31
|
+
magentaBright: (text: string) => string
|
|
32
|
+
cyanBright: (text: string) => string
|
|
33
|
+
whiteBright: (text: string) => string
|
|
34
|
+
|
|
35
|
+
// Background colors
|
|
36
|
+
bgBlack: (text: string) => string
|
|
37
|
+
bgRed: (text: string) => string
|
|
38
|
+
bgGreen: (text: string) => string
|
|
39
|
+
bgYellow: (text: string) => string
|
|
40
|
+
bgBlue: (text: string) => string
|
|
41
|
+
bgMagenta: (text: string) => string
|
|
42
|
+
bgCyan: (text: string) => string
|
|
43
|
+
bgWhite: (text: string) => string
|
|
44
|
+
|
|
45
|
+
// RGB colors
|
|
46
|
+
rgb: (r: number, g: number, b: number) => (text: string) => string
|
|
47
|
+
bgRgb: (r: number, g: number, b: number) => (text: string) => string
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare const yoctocolorsCjs: YoctoColors
|
|
51
|
+
export default yoctocolorsCjs
|
|
@@ -39,7 +39,7 @@ export interface BazelDownloadOptions {
|
|
|
39
39
|
*/
|
|
40
40
|
version: string;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Socket platform-arch token — looked up in `BAZEL_ASSET_MAP`. Returns
|
|
43
43
|
* `undefined` when no entry exists for the target.
|
|
44
44
|
*/
|
|
45
45
|
platformArch: string;
|
|
@@ -31,5 +31,8 @@ export interface ResolveBazelOptions {
|
|
|
31
31
|
}
|
|
32
32
|
export declare function cacheKey(options: ResolveBazelOptions | undefined): string;
|
|
33
33
|
export declare function doResolveBazel(options?: ResolveBazelOptions | undefined): Promise<ResolvedBazel | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* @unused No internal or Socket consumers (exercised only by its unit tests).
|
|
36
|
+
*/
|
|
34
37
|
export declare function resetBazelResolution(): void;
|
|
35
38
|
export declare function resolveBazel(options?: ResolveBazelOptions | undefined): Promise<ResolvedBazel | undefined>;
|
|
@@ -42,6 +42,9 @@ async function doResolveBazel(options) {
|
|
|
42
42
|
if (options?.downloadIfMissing) return require_external_tools_bazel_from_download.bazelFromDownload(options.downloadIfMissing);
|
|
43
43
|
}
|
|
44
44
|
/* c8 ignore start - test-only escape hatch. */
|
|
45
|
+
/**
|
|
46
|
+
* @unused No internal or Socket consumers (exercised only by its unit tests).
|
|
47
|
+
*/
|
|
45
48
|
function resetBazelResolution() {
|
|
46
49
|
resolutionCache.clear();
|
|
47
50
|
}
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* https://github.com/CycloneDX/cdxgen/releases/download/v<X.Y.Z>/cdxgen-<os>-<arch>[-musl][-slim][.exe]
|
|
13
13
|
* Reference: https://github.com/CycloneDX/cdxgen/releases. Single source of
|
|
14
14
|
* truth: the SEA binary IS the install path. The legacy `@cyclonedx/cdxgen`
|
|
15
|
-
* npm package is not used as a fallback — every platform-arch
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* npm package is not used as a fallback — every platform-arch Socket supports
|
|
16
|
+
* has a SEA build, and routing through npm for unsupported targets would
|
|
17
|
+
* silently use a different distribution (different bundle composition,
|
|
18
18
|
* different startup cost, different version-pin surface). One install path;
|
|
19
19
|
* one cached binary.
|
|
20
20
|
*/
|
|
@@ -36,8 +36,8 @@ export interface CdxgenDownloadOptions {
|
|
|
36
36
|
*/
|
|
37
37
|
version: string;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
|
-
* when no entry exists for the target.
|
|
39
|
+
* Socket platform-arch token — looked up in the asset map. Returns
|
|
40
|
+
* `undefined` when no entry exists for the target.
|
|
41
41
|
*/
|
|
42
42
|
platformArch: string;
|
|
43
43
|
/**
|
|
@@ -18,9 +18,9 @@ const require_primordials_object = require('../../primordials/object.js');
|
|
|
18
18
|
* https://github.com/CycloneDX/cdxgen/releases/download/v<X.Y.Z>/cdxgen-<os>-<arch>[-musl][-slim][.exe]
|
|
19
19
|
* Reference: https://github.com/CycloneDX/cdxgen/releases. Single source of
|
|
20
20
|
* truth: the SEA binary IS the install path. The legacy `@cyclonedx/cdxgen`
|
|
21
|
-
* npm package is not used as a fallback — every platform-arch
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* npm package is not used as a fallback — every platform-arch Socket supports
|
|
22
|
+
* has a SEA build, and routing through npm for unsupported targets would
|
|
23
|
+
* silently use a different distribution (different bundle composition,
|
|
24
24
|
* different startup cost, different version-pin surface). One install path;
|
|
25
25
|
* one cached binary.
|
|
26
26
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* wrapper) with sidecar `.sha256` files; this helper passes the pinned
|
|
6
6
|
* integrity through `downloadToolArchive`, then copies the downloaded blob to
|
|
7
7
|
* `cdxgen[.exe]` and chmods it 0o755. Platforms upstream doesn't ship a SEA
|
|
8
|
-
* for (none today; the asset map covers all 8
|
|
8
|
+
* for (none today; the asset map covers all 8 Socket targets) return
|
|
9
9
|
* `undefined` — callers should fall back to `cdxgenFromNpm()` for those.
|
|
10
10
|
*/
|
|
11
11
|
import type { BinaryDownloader } from '../from-download';
|
|
@@ -18,7 +18,7 @@ export interface CdxgenFromDownloadOptions {
|
|
|
18
18
|
*/
|
|
19
19
|
version: string;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Socket platform-arch token, e.g. `'darwin-arm64'`.
|
|
22
22
|
*/
|
|
23
23
|
platformArch: string;
|
|
24
24
|
/**
|
|
@@ -20,7 +20,7 @@ node_path = require_runtime.__toESM(node_path);
|
|
|
20
20
|
* wrapper) with sidecar `.sha256` files; this helper passes the pinned
|
|
21
21
|
* integrity through `downloadToolArchive`, then copies the downloaded blob to
|
|
22
22
|
* `cdxgen[.exe]` and chmods it 0o755. Platforms upstream doesn't ship a SEA
|
|
23
|
-
* for (none today; the asset map covers all 8
|
|
23
|
+
* for (none today; the asset map covers all 8 Socket targets) return
|
|
24
24
|
* `undefined` — callers should fall back to `cdxgenFromNpm()` for those.
|
|
25
25
|
*/
|
|
26
26
|
async function cdxgenFromDownload(options) {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* 2. PATH — `cdxgen` on the system PATH
|
|
7
7
|
* 3. download — upstream SEA binary from the GitHub release (slim by default;
|
|
8
8
|
* pass `variant: 'full'` for the bun+deno-bundled flavor) Single source of
|
|
9
|
-
* truth: SEA binary only. No npm-package fallback — every
|
|
9
|
+
* truth: SEA binary only. No npm-package fallback — every Socket
|
|
10
10
|
* platform-arch is covered by the SEA matrix, and routing through npm
|
|
11
11
|
* would split the install surface in two for no benefit. Returns
|
|
12
12
|
* `undefined` if all of the enabled sources miss. Memoized per
|
|
@@ -28,5 +28,8 @@ export interface ResolveCdxgenOptions {
|
|
|
28
28
|
}
|
|
29
29
|
export declare function cacheKey(options: ResolveCdxgenOptions | undefined): string;
|
|
30
30
|
export declare function doResolveCdxgen(options?: ResolveCdxgenOptions | undefined): Promise<ResolvedCdxgen | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* @unused No internal or Socket consumers (exercised only by its unit tests).
|
|
33
|
+
*/
|
|
31
34
|
export declare function resetCdxgenResolution(): void;
|
|
32
35
|
export declare function resolveCdxgen(options?: ResolveCdxgenOptions | undefined): Promise<ResolvedCdxgen | undefined>;
|
|
@@ -15,7 +15,7 @@ const require_external_tools_cdxgen_from_vfs = require('./from-vfs.js');
|
|
|
15
15
|
* 2. PATH — `cdxgen` on the system PATH
|
|
16
16
|
* 3. download — upstream SEA binary from the GitHub release (slim by default;
|
|
17
17
|
* pass `variant: 'full'` for the bun+deno-bundled flavor) Single source of
|
|
18
|
-
* truth: SEA binary only. No npm-package fallback — every
|
|
18
|
+
* truth: SEA binary only. No npm-package fallback — every Socket
|
|
19
19
|
* platform-arch is covered by the SEA matrix, and routing through npm
|
|
20
20
|
* would split the install surface in two for no benefit. Returns
|
|
21
21
|
* `undefined` if all of the enabled sources miss. Memoized per
|
|
@@ -46,6 +46,9 @@ async function doResolveCdxgen(options) {
|
|
|
46
46
|
if (options?.downloadIfMissing) return require_external_tools_cdxgen_from_download.cdxgenFromDownload(options.downloadIfMissing);
|
|
47
47
|
}
|
|
48
48
|
/* c8 ignore start - test-only escape hatch. */
|
|
49
|
+
/**
|
|
50
|
+
* @unused No internal or Socket consumers (exercised only by its unit tests).
|
|
51
|
+
*/
|
|
49
52
|
function resetCdxgenResolution() {
|
|
50
53
|
resolutionCache.clear();
|
|
51
54
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Shared types for cdxgen resolution. cdxgen ships per-platform SEA
|
|
3
3
|
* binaries starting in v12.0.x — that's the single install path. The legacy
|
|
4
|
-
* `@cyclonedx/cdxgen` npm package is NOT used as a fallback: every
|
|
4
|
+
* `@cyclonedx/cdxgen` npm package is NOT used as a fallback: every Socket
|
|
5
5
|
* platform-arch has a SEA build, and routing through npm for any target would
|
|
6
6
|
* silently use a different distribution (different bundle composition,
|
|
7
7
|
* different startup cost). One install path; one cached binary. The future
|