@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
package/dist/bin/prim.cjs
CHANGED
|
@@ -8,7 +8,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
8
8
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
9
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
10
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var __esmMin = (fn, res) => () =>
|
|
11
|
+
var __esmMin = (fn, res, err) => () => {
|
|
12
|
+
if (err) throw err[0];
|
|
13
|
+
try {
|
|
14
|
+
return fn && (res = fn(fn = 0)), res;
|
|
15
|
+
} catch (e) {
|
|
16
|
+
throw err = [e], e;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
12
19
|
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
13
20
|
var __exportAll = (all, no_symbols) => {
|
|
14
21
|
let target = {};
|
|
@@ -104,13 +111,13 @@ const walk = wasm.walk;
|
|
|
104
111
|
* dependency on the per-file walk state, so they live apart from the
|
|
105
112
|
* `auditDirectory` orchestrator in `audit.mts`.
|
|
106
113
|
*/
|
|
107
|
-
const TS_EXTENSIONS$2 = new Set([
|
|
114
|
+
const TS_EXTENSIONS$2 = /* @__PURE__ */ new Set([
|
|
108
115
|
".cts",
|
|
109
116
|
".mts",
|
|
110
117
|
".ts",
|
|
111
118
|
".tsx"
|
|
112
119
|
]);
|
|
113
|
-
const JS_EXTENSIONS$1 = new Set([
|
|
120
|
+
const JS_EXTENSIONS$1 = /* @__PURE__ */ new Set([
|
|
114
121
|
".cjs",
|
|
115
122
|
".js",
|
|
116
123
|
".jsx",
|
|
@@ -254,7 +261,7 @@ function lineColumnAt$1(lineStarts, offset) {
|
|
|
254
261
|
* analyzer encounters in the wild. Surfaced into the AI prompt so Claude
|
|
255
262
|
* knows what false-positives to guard against.
|
|
256
263
|
*/
|
|
257
|
-
const AMBIGUOUS_PROTOTYPE_METHODS = new Map([
|
|
264
|
+
const AMBIGUOUS_PROTOTYPE_METHODS = /* @__PURE__ */ new Map([
|
|
258
265
|
["exec", {
|
|
259
266
|
candidates: ["RegExp"],
|
|
260
267
|
hint: "Also: ChildProcess.prototype is `kill`/`disconnect`/etc., not `exec` — but custom CLI/test libraries occasionally name a method `.exec(...)`."
|
|
@@ -1232,7 +1239,7 @@ async function* ck($, Q) {
|
|
|
1232
1239
|
}
|
|
1233
1240
|
}
|
|
1234
1241
|
async function* pk($) {
|
|
1235
|
-
let Q = new Uint8Array();
|
|
1242
|
+
let Q = /* @__PURE__ */ new Uint8Array();
|
|
1236
1243
|
for await (let J of $) {
|
|
1237
1244
|
if (J == null) continue;
|
|
1238
1245
|
let Y = J instanceof ArrayBuffer ? new Uint8Array(J) : typeof J === "string" ? G8(J) : J, X = new Uint8Array(Q.length + Y.length);
|
|
@@ -8678,7 +8685,7 @@ function iz($, Q, J, Y) {
|
|
|
8678
8685
|
sandbox: H,
|
|
8679
8686
|
spawnClaudeCodeProcess: q.spawnClaudeCodeProcess,
|
|
8680
8687
|
deferSpawn: Y
|
|
8681
|
-
}),
|
|
8688
|
+
}), p_ = {
|
|
8682
8689
|
systemPrompt: V,
|
|
8683
8690
|
appendSystemPrompt: B,
|
|
8684
8691
|
planModeInstructions: q.planModeInstructions,
|
|
@@ -8691,7 +8698,7 @@ function iz($, Q, J, Y) {
|
|
|
8691
8698
|
promptSuggestions: q.promptSuggestions,
|
|
8692
8699
|
agentProgressSummaries: q.agentProgressSummaries,
|
|
8693
8700
|
forwardSubagentText: VX
|
|
8694
|
-
}, d$, sz);
|
|
8701
|
+
}, AG = new c7(WN, Q, k, o0, w, YN, JN, p_, d$, sz);
|
|
8695
8702
|
if (e$) {
|
|
8696
8703
|
let _6 = () => (0, path.join)(Y4.CLAUDE_CONFIG_DIR ?? (0, path.join)((0, os.homedir)(), ".claude"), "projects"), m6 = S_ === "eager", s1 = new CU(async (t0, IG) => {
|
|
8697
8704
|
let f9 = Z_(t0, _6());
|
|
@@ -9281,7 +9288,7 @@ var init_sdk = __esmMin((() => {
|
|
|
9281
9288
|
I2.isCompatible = I2._makeCompatibilityCheck = void 0;
|
|
9282
9289
|
var _x = TU(), j2 = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
9283
9290
|
function A2($) {
|
|
9284
|
-
let Q = new Set([$]), J = /* @__PURE__ */ new Set(), Y = $.match(j2);
|
|
9291
|
+
let Q = /* @__PURE__ */ new Set([$]), J = /* @__PURE__ */ new Set(), Y = $.match(j2);
|
|
9285
9292
|
if (!Y) return () => !1;
|
|
9286
9293
|
let X = {
|
|
9287
9294
|
major: +Y[1],
|
|
@@ -11465,7 +11472,7 @@ var init_sdk = __esmMin((() => {
|
|
|
11465
11472
|
_B = I((tj) => {
|
|
11466
11473
|
Object.defineProperty(tj, "__esModule", { value: !0 });
|
|
11467
11474
|
tj.getRules = tj.isJSONType = void 0;
|
|
11468
|
-
var hd = new Set([
|
|
11475
|
+
var hd = /* @__PURE__ */ new Set([
|
|
11469
11476
|
"string",
|
|
11470
11477
|
"number",
|
|
11471
11478
|
"integer",
|
|
@@ -11572,7 +11579,7 @@ var init_sdk = __esmMin((() => {
|
|
|
11572
11579
|
return G;
|
|
11573
11580
|
}
|
|
11574
11581
|
WA.coerceAndCheckDataType = td;
|
|
11575
|
-
var YA = new Set([
|
|
11582
|
+
var YA = /* @__PURE__ */ new Set([
|
|
11576
11583
|
"string",
|
|
11577
11584
|
"number",
|
|
11578
11585
|
"integer",
|
|
@@ -12045,7 +12052,7 @@ var init_sdk = __esmMin((() => {
|
|
|
12045
12052
|
vJ = I((SA) => {
|
|
12046
12053
|
Object.defineProperty(SA, "__esModule", { value: !0 });
|
|
12047
12054
|
SA.getSchemaRefs = SA.resolveUrl = SA.normalizeId = SA._getFullPath = SA.getFullPath = SA.inlineRef = void 0;
|
|
12048
|
-
var ti = q$(), ai = yB(), si = PA(), ei = new Set([
|
|
12055
|
+
var ti = q$(), ai = yB(), si = PA(), ei = /* @__PURE__ */ new Set([
|
|
12049
12056
|
"type",
|
|
12050
12057
|
"format",
|
|
12051
12058
|
"pattern",
|
|
@@ -12070,7 +12077,7 @@ var init_sdk = __esmMin((() => {
|
|
|
12070
12077
|
return EA($) <= Q;
|
|
12071
12078
|
}
|
|
12072
12079
|
SA.inlineRef = $n;
|
|
12073
|
-
var Qn = new Set([
|
|
12080
|
+
var Qn = /* @__PURE__ */ new Set([
|
|
12074
12081
|
"$ref",
|
|
12075
12082
|
"$recursiveRef",
|
|
12076
12083
|
"$recursiveAnchor",
|
|
@@ -12645,7 +12652,7 @@ var init_sdk = __esmMin((() => {
|
|
|
12645
12652
|
return pB.call(this, J, G);
|
|
12646
12653
|
}
|
|
12647
12654
|
$I.resolveSchema = xW;
|
|
12648
|
-
var pn = new Set([
|
|
12655
|
+
var pn = /* @__PURE__ */ new Set([
|
|
12649
12656
|
"properties",
|
|
12650
12657
|
"patternProperties",
|
|
12651
12658
|
"enum",
|
|
@@ -13185,7 +13192,7 @@ var init_sdk = __esmMin((() => {
|
|
|
13185
13192
|
"removeAdditional",
|
|
13186
13193
|
"useDefaults",
|
|
13187
13194
|
"coerceTypes"
|
|
13188
|
-
], Tr = new Set([
|
|
13195
|
+
], Tr = /* @__PURE__ */ new Set([
|
|
13189
13196
|
"validate",
|
|
13190
13197
|
"serialize",
|
|
13191
13198
|
"parse",
|
|
@@ -15491,7 +15498,7 @@ var init_sdk = __esmMin((() => {
|
|
|
15491
15498
|
_G = function() {
|
|
15492
15499
|
let { crypto: $ } = globalThis;
|
|
15493
15500
|
if ($?.randomUUID) return _G = $.randomUUID.bind($), $.randomUUID();
|
|
15494
|
-
let Q = new Uint8Array(1), J = $ ? () => $.getRandomValues(Q)[0] : () => Math.random() * 255 & 255;
|
|
15501
|
+
let Q = /* @__PURE__ */ new Uint8Array(1), J = $ ? () => $.getRandomValues(Q)[0] : () => Math.random() * 255 & 255;
|
|
15495
15502
|
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (Y) => (+Y ^ J() & 15 >> +Y / 4).toString(16));
|
|
15496
15503
|
};
|
|
15497
15504
|
u9 = ($) => {
|
|
@@ -15657,7 +15664,7 @@ var init_sdk = __esmMin((() => {
|
|
|
15657
15664
|
};
|
|
15658
15665
|
};
|
|
15659
15666
|
dN = "urn:ietf:params:oauth:grant-type:jwt-bearer", iN = "refresh_token", LX = "/v1/oauth/token", Q0 = "oauth-2025-04-20", nN = "oidc-federation-2026-04-01", rN = 120, W8 = 30, oN = 5, pN = 1048576;
|
|
15660
|
-
TG = 2e3, Tk = new Set([
|
|
15667
|
+
TG = 2e3, Tk = /* @__PURE__ */ new Set([
|
|
15661
15668
|
"error",
|
|
15662
15669
|
"error_description",
|
|
15663
15670
|
"error_uri"
|
|
@@ -15841,7 +15848,7 @@ var init_sdk = __esmMin((() => {
|
|
|
15841
15848
|
;
|
|
15842
15849
|
z1 = class {
|
|
15843
15850
|
constructor() {
|
|
15844
|
-
k6.set(this, void 0), v6.set(this, void 0), f(this, k6, new Uint8Array(), "f"), f(this, v6, null, "f");
|
|
15851
|
+
k6.set(this, void 0), v6.set(this, void 0), f(this, k6, /* @__PURE__ */ new Uint8Array(), "f"), f(this, v6, null, "f");
|
|
15845
15852
|
}
|
|
15846
15853
|
decode($) {
|
|
15847
15854
|
if ($ == null) return [];
|
|
@@ -15869,7 +15876,7 @@ var init_sdk = __esmMin((() => {
|
|
|
15869
15876
|
}
|
|
15870
15877
|
};
|
|
15871
15878
|
k6 = /* @__PURE__ */ new WeakMap(), v6 = /* @__PURE__ */ new WeakMap();
|
|
15872
|
-
z1.NEWLINE_CHARS = new Set([`
|
|
15879
|
+
z1.NEWLINE_CHARS = /* @__PURE__ */ new Set([`
|
|
15873
15880
|
`, "\r"]);
|
|
15874
15881
|
z1.NEWLINE_REGEXP = /\r\n|[\n\r]/g;
|
|
15875
15882
|
;
|
|
@@ -20552,12 +20559,12 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
20552
20559
|
Qg = 1048576, wZ = 5242880;
|
|
20553
20560
|
k5 = Buffer.from("{\"type\":\"attribution-snapshot\""), Yg = Buffer.from("{\"type\":\"system\""), a7 = 10, Wg = Buffer.from([a7]), Gg = 256;
|
|
20554
20561
|
Lg = 32;
|
|
20555
|
-
Tg = new Set([
|
|
20562
|
+
Tg = /* @__PURE__ */ new Set([
|
|
20556
20563
|
"EXDEV",
|
|
20557
20564
|
"EPERM",
|
|
20558
20565
|
"EEXIST",
|
|
20559
20566
|
"EBUSY"
|
|
20560
|
-
]), xg = new Set([
|
|
20567
|
+
]), xg = /* @__PURE__ */ new Set([
|
|
20561
20568
|
"ENOSPC",
|
|
20562
20569
|
"EIO",
|
|
20563
20570
|
"EDQUOT",
|
|
@@ -20591,7 +20598,7 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
20591
20598
|
}
|
|
20592
20599
|
};
|
|
20593
20600
|
mg = new async_hooks.AsyncLocalStorage();
|
|
20594
|
-
cg = new Set([
|
|
20601
|
+
cg = /* @__PURE__ */ new Set([
|
|
20595
20602
|
"user",
|
|
20596
20603
|
"assistant",
|
|
20597
20604
|
"attachment",
|
|
@@ -23907,11 +23914,11 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
23907
23914
|
return "object";
|
|
23908
23915
|
default: throw Error(`Unknown data type: ${Q}`);
|
|
23909
23916
|
}
|
|
23910
|
-
}, ZQ = new Set([
|
|
23917
|
+
}, ZQ = /* @__PURE__ */ new Set([
|
|
23911
23918
|
"string",
|
|
23912
23919
|
"number",
|
|
23913
23920
|
"symbol"
|
|
23914
|
-
]), QK = new Set([
|
|
23921
|
+
]), QK = /* @__PURE__ */ new Set([
|
|
23915
23922
|
"string",
|
|
23916
23923
|
"number",
|
|
23917
23924
|
"bigint",
|
|
@@ -23953,7 +23960,7 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
23953
23960
|
}, W);
|
|
23954
23961
|
if (G instanceof Promise) throw new o4();
|
|
23955
23962
|
if (G.issues.length) {
|
|
23956
|
-
let U = new (X?.Err ?? $)(G.issues.map((H) => y6(H, W, c$())));
|
|
23963
|
+
let U = new ((X?.Err) ?? $)(G.issues.map((H) => y6(H, W, c$())));
|
|
23957
23964
|
throw r5(U, X?.callee), U;
|
|
23958
23965
|
}
|
|
23959
23966
|
return G.value;
|
|
@@ -23964,7 +23971,7 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
23964
23971
|
}, W);
|
|
23965
23972
|
if (G instanceof Promise) G = await G;
|
|
23966
23973
|
if (G.issues.length) {
|
|
23967
|
-
let U = new (X?.Err ?? $)(G.issues.map((H) => y6(H, W, c$())));
|
|
23974
|
+
let U = new ((X?.Err) ?? $)(G.issues.map((H) => y6(H, W, c$())));
|
|
23968
23975
|
throw r5(U, X?.callee), U;
|
|
23969
23976
|
}
|
|
23970
23977
|
return G.value;
|
|
@@ -24780,7 +24787,7 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
24780
24787
|
}), J;
|
|
24781
24788
|
};
|
|
24782
24789
|
}), SY = F("$ZodUndefined", ($, Q) => {
|
|
24783
|
-
o.init($, Q), $._zod.pattern = vK, $._zod.values = new Set([void 0]), $._zod.optin = "optional", $._zod.optout = "optional", $._zod.parse = (J, Y) => {
|
|
24790
|
+
o.init($, Q), $._zod.pattern = vK, $._zod.values = /* @__PURE__ */ new Set([void 0]), $._zod.optin = "optional", $._zod.optout = "optional", $._zod.parse = (J, Y) => {
|
|
24784
24791
|
let X = J.value;
|
|
24785
24792
|
if (typeof X > "u") return J;
|
|
24786
24793
|
return J.issues.push({
|
|
@@ -24791,7 +24798,7 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
24791
24798
|
}), J;
|
|
24792
24799
|
};
|
|
24793
24800
|
}), kY = F("$ZodNull", ($, Q) => {
|
|
24794
|
-
o.init($, Q), $._zod.pattern = kK, $._zod.values = new Set([null]), $._zod.parse = (J, Y) => {
|
|
24801
|
+
o.init($, Q), $._zod.pattern = kK, $._zod.values = /* @__PURE__ */ new Set([null]), $._zod.parse = (J, Y) => {
|
|
24795
24802
|
let X = J.value;
|
|
24796
24803
|
if (X === null) return J;
|
|
24797
24804
|
return J.issues.push({
|
|
@@ -25304,7 +25311,7 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
25304
25311
|
};
|
|
25305
25312
|
}), pY = F("$ZodOptional", ($, Q) => {
|
|
25306
25313
|
o.init($, Q), $._zod.optin = "optional", $._zod.optout = "optional", N$($._zod, "values", () => {
|
|
25307
|
-
return Q.innerType._zod.values ? new Set([...Q.innerType._zod.values, void 0]) : void 0;
|
|
25314
|
+
return Q.innerType._zod.values ? /* @__PURE__ */ new Set([...Q.innerType._zod.values, void 0]) : void 0;
|
|
25308
25315
|
}), N$($._zod, "pattern", () => {
|
|
25309
25316
|
let J = Q.innerType._zod.pattern;
|
|
25310
25317
|
return J ? new RegExp(`^(${FQ(J.source)})?$`) : void 0;
|
|
@@ -25318,7 +25325,7 @@ new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
|
25318
25325
|
let J = Q.innerType._zod.pattern;
|
|
25319
25326
|
return J ? new RegExp(`^(${FQ(J.source)}|null)$`) : void 0;
|
|
25320
25327
|
}), N$($._zod, "values", () => {
|
|
25321
|
-
return Q.innerType._zod.values ? new Set([...Q.innerType._zod.values, null]) : void 0;
|
|
25328
|
+
return Q.innerType._zod.values ? /* @__PURE__ */ new Set([...Q.innerType._zod.values, null]) : void 0;
|
|
25322
25329
|
}), $._zod.parse = (J, Y) => {
|
|
25323
25330
|
if (J.value === null) return J;
|
|
25324
25331
|
return Q.innerType._zod.run(J, Y);
|
|
@@ -33692,7 +33699,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33692
33699
|
matcher: K.string().optional().describe("String pattern to match (e.g. tool names like \"Write\")"),
|
|
33693
33700
|
hooks: K.array(SE()).describe("List of hooks to execute when the matcher matches")
|
|
33694
33701
|
})), c0 = _(() => K.partialRecord(K.enum(s0), K.array(kE())));
|
|
33695
|
-
fE = new Set([
|
|
33702
|
+
fE = /* @__PURE__ */ new Set([
|
|
33696
33703
|
"claude-code-marketplace",
|
|
33697
33704
|
"claude-code-plugins",
|
|
33698
33705
|
"claude-plugins-official",
|
|
@@ -34064,12 +34071,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
34064
34071
|
"user",
|
|
34065
34072
|
"project",
|
|
34066
34073
|
"local"
|
|
34067
|
-
], I6$ = new Set([
|
|
34074
|
+
], I6$ = /* @__PURE__ */ new Set([
|
|
34068
34075
|
"bypassPermissions",
|
|
34069
34076
|
"auto",
|
|
34070
34077
|
"acceptEdits"
|
|
34071
|
-
]), R6$ = new Set(["project"]);
|
|
34072
|
-
u6$ = new Set([
|
|
34078
|
+
]), R6$ = /* @__PURE__ */ new Set(["project"]);
|
|
34079
|
+
u6$ = /* @__PURE__ */ new Set([
|
|
34073
34080
|
"EBUSY",
|
|
34074
34081
|
"EMFILE",
|
|
34075
34082
|
"ENFILE",
|
|
@@ -34429,7 +34436,7 @@ function saveCache(targetRoot, cache) {
|
|
|
34429
34436
|
* and stay as-is; use the `processEnv()` / `processArgv()` helpers by hand
|
|
34430
34437
|
* where tamper-safety on those is wanted.
|
|
34431
34438
|
*/
|
|
34432
|
-
const TRACKED_GLOBALS = new Set([
|
|
34439
|
+
const TRACKED_GLOBALS = /* @__PURE__ */ new Set([
|
|
34433
34440
|
"AggregateError",
|
|
34434
34441
|
"Array",
|
|
34435
34442
|
"ArrayBuffer",
|
|
@@ -34491,7 +34498,7 @@ const TRACKED_GLOBALS = new Set([
|
|
|
34491
34498
|
* Array, Map, Set, NodeList, …) are intentionally excluded — they require type
|
|
34492
34499
|
* info we don't have.
|
|
34493
34500
|
*/
|
|
34494
|
-
const UNAMBIGUOUS_PROTOTYPE_METHODS = new Map([
|
|
34501
|
+
const UNAMBIGUOUS_PROTOTYPE_METHODS = /* @__PURE__ */ new Map([
|
|
34495
34502
|
["charAt", "String"],
|
|
34496
34503
|
["charCodeAt", "String"],
|
|
34497
34504
|
["codePointAt", "String"],
|
|
@@ -34571,7 +34578,7 @@ const UNAMBIGUOUS_PROTOTYPE_METHODS = new Map([
|
|
|
34571
34578
|
* "String.prototype.isAbsolute" because `path` matches the String hint regex.
|
|
34572
34579
|
* Same for `path.join`, `path.dirname`, etc.
|
|
34573
34580
|
*/
|
|
34574
|
-
const NODE_MODULE_STATIC_METHODS = new Set([
|
|
34581
|
+
const NODE_MODULE_STATIC_METHODS = /* @__PURE__ */ new Set([
|
|
34575
34582
|
"access",
|
|
34576
34583
|
"appendFile",
|
|
34577
34584
|
"arch",
|
|
@@ -34642,7 +34649,7 @@ const NODE_MODULE_STATIC_METHODS = new Set([
|
|
|
34642
34649
|
* returns the live value.
|
|
34643
34650
|
* https://v8.dev/docs/stack-trace-api#stack-trace-collection-for-custom-exceptions.
|
|
34644
34651
|
*/
|
|
34645
|
-
const INTENTIONAL_NON_PRIMORDIAL_STATICS = new Set([
|
|
34652
|
+
const INTENTIONAL_NON_PRIMORDIAL_STATICS = /* @__PURE__ */ new Set([
|
|
34646
34653
|
"Error.captureStackTrace",
|
|
34647
34654
|
"Error.prepareStackTrace",
|
|
34648
34655
|
"Error.stackTraceLimit"
|
|
@@ -34658,7 +34665,7 @@ const INTENTIONAL_NON_PRIMORDIAL_STATICS = new Set([
|
|
|
34658
34665
|
* sites entirely — both reading and writing them through a primordial would
|
|
34659
34666
|
* change the static type.
|
|
34660
34667
|
*/
|
|
34661
|
-
const TYPE_NARROWING_STATIC_CALLS = new Set(["Symbol.for"]);
|
|
34668
|
+
const TYPE_NARROWING_STATIC_CALLS = /* @__PURE__ */ new Set(["Symbol.for"]);
|
|
34662
34669
|
function ctorPrimordialName(global) {
|
|
34663
34670
|
return global + "Ctor";
|
|
34664
34671
|
}
|
|
@@ -34689,13 +34696,13 @@ function getPrototypeMethods(globalName) {
|
|
|
34689
34696
|
* dismiss them.
|
|
34690
34697
|
*/
|
|
34691
34698
|
function guessReceiverType(name) {
|
|
34692
|
-
if (/^(ancestors|args|argv|arr|array|children|chunks|cols|deps|elements|entries|errors|events|files|items|jobs|keys|lines|list|matches|messages|nodes|parts|paths|records|requests|responses|results|rows|rows|siblings|specs|tags|tasks|tokens|values|warnings)$/.test(name) || /(Array|List|Tuple|Vec)$/.test(name)) return "Array";
|
|
34693
|
-
if (/^(cmd|code|command|description|ext|filename|hash|header|input|key|label|line|message|msg|name|output|path|prefix|raw|s|sha|slug|source|sourceCode|spec|str|substring|suffix|tag|text|title|url|val|value|version|word)$/.test(name)) return "String";
|
|
34694
|
-
if (/^(count|day|depth|height|hours|i|idx|index|j|k|len|length|millis|minutes|month|n|num|number|offset|percent|ratio|score|seconds|size|width|year)$/.test(name)) return "Number";
|
|
34695
|
-
if (/^(created|d|date|deadline|end|expires|modified|now|start|timestamp|updated|when)$/.test(name) || /(At|Date|Time)$/.test(name)) return "Date";
|
|
34696
|
-
if (/^(re|regex|regexp)$/.test(name) || /Re(gExp|gex)$/.test(name)) return "RegExp";
|
|
34697
|
-
if (/^(p|pending|promise)$/.test(name) || name.endsWith("Promise")) return "Promise";
|
|
34698
|
-
if (/^(buf|buffer|bytes)$/.test(name) || name.endsWith("Buffer")) return "Buffer";
|
|
34699
|
+
if (/^(?:ancestors|args|argv|arr|array|children|chunks|cols|deps|elements|entries|errors|events|files|items|jobs|keys|lines|list|matches|messages|nodes|parts|paths|records|requests|responses|results|rows|rows|siblings|specs|tags|tasks|tokens|values|warnings)$/.test(name) || /(?:Array|List|Tuple|Vec)$/.test(name)) return "Array";
|
|
34700
|
+
if (/^(?:cmd|code|command|description|ext|filename|hash|header|input|key|label|line|message|msg|name|output|path|prefix|raw|s|sha|slug|source|sourceCode|spec|str|substring|suffix|tag|text|title|url|val|value|version|word)$/.test(name)) return "String";
|
|
34701
|
+
if (/^(?:count|day|depth|height|hours|i|idx|index|j|k|len|length|millis|minutes|month|n|num|number|offset|percent|ratio|score|seconds|size|width|year)$/.test(name)) return "Number";
|
|
34702
|
+
if (/^(?:created|d|date|deadline|end|expires|modified|now|start|timestamp|updated|when)$/.test(name) || /(?:At|Date|Time)$/.test(name)) return "Date";
|
|
34703
|
+
if (/^(?:re|regex|regexp)$/.test(name) || /Re(?:gExp|gex)$/.test(name)) return "RegExp";
|
|
34704
|
+
if (/^(?:p|pending|promise)$/.test(name) || name.endsWith("Promise")) return "Promise";
|
|
34705
|
+
if (/^(?:buf|buffer|bytes)$/.test(name) || name.endsWith("Buffer")) return "Buffer";
|
|
34699
34706
|
}
|
|
34700
34707
|
/**
|
|
34701
34708
|
* Returns the primordial name for `<global>.prototype.<method>` if the method
|
|
@@ -35028,7 +35035,7 @@ async function auditDirectory({ aiDisambiguate = false, exported, scanDir, skipD
|
|
|
35028
35035
|
}
|
|
35029
35036
|
|
|
35030
35037
|
//#endregion
|
|
35031
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
35038
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/constants/runtime.js
|
|
35032
35039
|
var require_runtime$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35033
35040
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35034
35041
|
/**
|
|
@@ -35059,154 +35066,122 @@ var require_runtime$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35059
35066
|
}));
|
|
35060
35067
|
|
|
35061
35068
|
//#endregion
|
|
35062
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
35063
|
-
var
|
|
35064
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35065
|
-
const nodeOs = require_runtime$5().IS_NODE ? /*@__PURE__*/ require("os") : void 0;
|
|
35066
|
-
function getNodeOs() {
|
|
35067
|
-
return nodeOs;
|
|
35068
|
-
}
|
|
35069
|
-
const osArch = nodeOs?.arch;
|
|
35070
|
-
const osHomedir = nodeOs?.homedir;
|
|
35071
|
-
const osPlatform = nodeOs?.platform;
|
|
35072
|
-
const osTmpdir = nodeOs?.tmpdir;
|
|
35073
|
-
exports.getNodeOs = getNodeOs;
|
|
35074
|
-
exports.osArch = osArch;
|
|
35075
|
-
exports.osHomedir = osHomedir;
|
|
35076
|
-
exports.osPlatform = osPlatform;
|
|
35077
|
-
exports.osTmpdir = osTmpdir;
|
|
35078
|
-
}));
|
|
35079
|
-
|
|
35080
|
-
//#endregion
|
|
35081
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8_typescript@5.9.2/node_modules/@socketsecurity/lib/dist/constants/platform.js
|
|
35082
|
-
var require_platform = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35069
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/node/module.js
|
|
35070
|
+
var require_module = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35083
35071
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35084
|
-
const
|
|
35085
|
-
let
|
|
35072
|
+
const require_constants_runtime = require_runtime$5();
|
|
35073
|
+
let module$1$1 = require("module");
|
|
35086
35074
|
/**
|
|
35087
|
-
* @file
|
|
35075
|
+
* @file Accessors for `node:module` that work across runtimes. Ambient
|
|
35076
|
+
* `require` is bound in CommonJS but unbound in ESM and inside
|
|
35077
|
+
* ahead-of-time-compiled package modules (e.g. Perry), where reading it
|
|
35078
|
+
* throws. And Perry's `require('module')` value omits `isBuiltin`. So instead
|
|
35079
|
+
* of the ambient `require('module')` lazy-loader, `isBuiltin`/`createRequire`
|
|
35080
|
+
* are imported as named values from the bare `module` specifier — which
|
|
35081
|
+
* resolves on Node and Perry, and which browser bundlers can stub via
|
|
35082
|
+
* resolve.fallback (a `node:` prefix would throw UnhandledSchemeError
|
|
35083
|
+
* there).
|
|
35084
|
+
* `require` is DIRECTORY-SPECIFIC: `createRequire(base)` resolves relative
|
|
35085
|
+
* specifiers (`./x`, `../y`) from `base`'s directory. For builtins and bare
|
|
35086
|
+
* packages that's irrelevant (they resolve the same anywhere), so the cached
|
|
35087
|
+
* `getRequire` / `requireBuiltin` bind to THIS file. A RELATIVE specifier
|
|
35088
|
+
* must resolve from the CALLER's directory, so use `requireFrom` with the
|
|
35089
|
+
* caller's `import.meta.url` — binding such a load to this file would resolve
|
|
35090
|
+
* it against `src/node/` instead. Bundled, every module collapses to one base
|
|
35091
|
+
* and either works; unbundled (e.g. AOT-compiled from source), each module
|
|
35092
|
+
* sits at its own nested path and the base matters.
|
|
35088
35093
|
*/
|
|
35089
|
-
let
|
|
35094
|
+
let cachedModule;
|
|
35095
|
+
let cachedRequire;
|
|
35090
35096
|
/**
|
|
35091
|
-
*
|
|
35097
|
+
* Bind a working `require`. Ambient `require` exists in CommonJS; in ESM and
|
|
35098
|
+
* ahead-of-time-compiled package modules it is unbound (reading it throws or
|
|
35099
|
+
* yields undefined), so fall back to `createRequire`. Returns undefined off
|
|
35100
|
+
* Node and in browsers, where neither is available.
|
|
35101
|
+
*
|
|
35102
|
+
* `fromUrl` sets the resolution base — pass a caller's `import.meta.url` to
|
|
35103
|
+
* resolve that caller's RELATIVE specifiers. When omitted, the base is this
|
|
35104
|
+
* file, which is correct only for builtins / bare packages (dir-independent).
|
|
35105
|
+
* With `fromUrl` the ambient `require` is skipped: it is bound to THIS file, so
|
|
35106
|
+
* it would resolve a relative specifier from the wrong directory.
|
|
35092
35107
|
*/
|
|
35093
|
-
function
|
|
35094
|
-
if (
|
|
35095
|
-
return
|
|
35108
|
+
function bindRequire(fromUrl) {
|
|
35109
|
+
if (!require_constants_runtime.IS_NODE) return;
|
|
35110
|
+
if (!fromUrl && typeof require === "function") return require;
|
|
35111
|
+
if (typeof module$1$1.createRequire === "function") try {
|
|
35112
|
+
return (0, module$1$1.createRequire)(fromUrl ?? require("url").pathToFileURL(__filename).href);
|
|
35113
|
+
} catch {
|
|
35114
|
+
return;
|
|
35115
|
+
}
|
|
35096
35116
|
}
|
|
35097
|
-
const MUSL_LINKERS = [
|
|
35098
|
-
"/lib/ld-musl-x86_64.so.1",
|
|
35099
|
-
"/lib/ld-musl-aarch64.so.1",
|
|
35100
|
-
"/usr/lib/ld-musl-x86_64.so.1",
|
|
35101
|
-
"/usr/lib/ld-musl-aarch64.so.1"
|
|
35102
|
-
];
|
|
35103
|
-
let memoizedLibc;
|
|
35104
|
-
let memoizedLibcProbed = false;
|
|
35105
35117
|
/**
|
|
35106
|
-
*
|
|
35107
|
-
* `
|
|
35108
|
-
* musl dynamic linker. The single source of truth for libc detection —
|
|
35109
|
-
* tool-specific resolvers (`getPythonArch`, `getJreArch`) call this rather than
|
|
35110
|
-
* re-probing.
|
|
35118
|
+
* Returns `node:module` (or undefined off Node), loaded through the bound
|
|
35119
|
+
* `require`. Cached across calls.
|
|
35111
35120
|
*/
|
|
35112
|
-
function
|
|
35113
|
-
|
|
35114
|
-
memoizedLibcProbed = true;
|
|
35115
|
-
/* c8 ignore start - Linux-only filesystem probe. */
|
|
35116
|
-
if (getOs() !== "linux") memoizedLibc = void 0;
|
|
35117
|
-
else {
|
|
35118
|
-
memoizedLibc = "glibc";
|
|
35119
|
-
for (let i = 0, { length } = MUSL_LINKERS; i < length; i += 1) if ((0, node_fs$1.existsSync)(MUSL_LINKERS[i])) {
|
|
35120
|
-
memoizedLibc = "musl";
|
|
35121
|
-
break;
|
|
35122
|
-
}
|
|
35123
|
-
}
|
|
35124
|
-
}
|
|
35125
|
-
return memoizedLibc;
|
|
35121
|
+
function getNodeModule() {
|
|
35122
|
+
return cachedModule ??= requireBuiltin("module");
|
|
35126
35123
|
}
|
|
35127
|
-
let memoizedOs;
|
|
35128
35124
|
/**
|
|
35129
|
-
*
|
|
35130
|
-
*
|
|
35125
|
+
* Returns a working `require` bound to THIS file, binding one on first call
|
|
35126
|
+
* (see bindRequire). Cached across calls; undefined off Node / in browsers.
|
|
35127
|
+
*
|
|
35128
|
+
* For builtins and bare packages only — the resolution base is this file, so a
|
|
35129
|
+
* relative specifier would resolve from `src/node/`. Use `requireFrom` for
|
|
35130
|
+
* relative loads.
|
|
35131
35131
|
*/
|
|
35132
|
-
function
|
|
35133
|
-
if (
|
|
35134
|
-
return
|
|
35132
|
+
function getRequire() {
|
|
35133
|
+
if (cachedRequire === void 0) cachedRequire = bindRequire();
|
|
35134
|
+
return cachedRequire;
|
|
35135
35135
|
}
|
|
35136
|
-
let memoizedTarget;
|
|
35137
35136
|
/**
|
|
35138
|
-
*
|
|
35139
|
-
*
|
|
35140
|
-
*
|
|
35141
|
-
*
|
|
35142
|
-
*
|
|
35143
|
-
*
|
|
35144
|
-
*
|
|
35145
|
-
* (python-build- standalone) / `getJreArch` (Adoptium).
|
|
35137
|
+
* Is `name` a Node built-in module? Resolved from the statically-imported
|
|
35138
|
+
* `isBuiltin`, so it works on Node and on ahead-of-time-compiled binaries
|
|
35139
|
+
* (Perry), where ambient `require('module')` would lack `isBuiltin`. Returns
|
|
35140
|
+
* false in browsers, where the bare `module` import is stubbed away.
|
|
35141
|
+
*
|
|
35142
|
+
* Single source of truth for "is this a Node builtin?" probes across socket-lib
|
|
35143
|
+
* (used by the smol-binding loaders to gate their `node:smol-*` loads).
|
|
35146
35144
|
*/
|
|
35147
|
-
function
|
|
35148
|
-
if (
|
|
35149
|
-
|
|
35150
|
-
memoizedTarget = `${getOs()}-${getArch()}${libcSuffix}`;
|
|
35151
|
-
}
|
|
35152
|
-
return memoizedTarget;
|
|
35145
|
+
function isNodeBuiltin(name) {
|
|
35146
|
+
if (!require_constants_runtime.IS_NODE || typeof module$1$1.isBuiltin !== "function") return false;
|
|
35147
|
+
return (0, module$1$1.isBuiltin)(name);
|
|
35153
35148
|
}
|
|
35154
|
-
const DARWIN = getOs() === "darwin";
|
|
35155
|
-
const WIN32 = getOs() === "win32";
|
|
35156
35149
|
/**
|
|
35157
|
-
*
|
|
35158
|
-
*
|
|
35159
|
-
*
|
|
35160
|
-
*
|
|
35150
|
+
* Load a built-in module by *computed* specifier through the bound `require`
|
|
35151
|
+
* (see getRequire). The specifier is a parameter — never a literal at the call
|
|
35152
|
+
* site — so browser bundlers neither walk nor bundle it. Returns undefined
|
|
35153
|
+
* where no `require` can be bound.
|
|
35154
|
+
*
|
|
35155
|
+
* Builtins / bare packages only (dir-independent); for a relative specifier use
|
|
35156
|
+
* `requireFrom`. Used by `getNodeModule` for `node:module`, and by the
|
|
35157
|
+
* smol-binding loaders for the optional `node:smol-*` native bindings (gated
|
|
35158
|
+
* behind `isNodeBuiltin`, true only on socket-btm's smol Node binary).
|
|
35161
35159
|
*/
|
|
35162
|
-
|
|
35163
|
-
|
|
35164
|
-
|
|
35165
|
-
const S_IXOTH = 1;
|
|
35166
|
-
exports.DARWIN = DARWIN;
|
|
35167
|
-
exports.NATIVE_MESSAGING_HOST = NATIVE_MESSAGING_HOST;
|
|
35168
|
-
exports.S_IXGRP = S_IXGRP;
|
|
35169
|
-
exports.S_IXOTH = S_IXOTH;
|
|
35170
|
-
exports.S_IXUSR = S_IXUSR;
|
|
35171
|
-
exports.WIN32 = WIN32;
|
|
35172
|
-
exports.getArch = getArch;
|
|
35173
|
-
exports.getLibc = getLibc;
|
|
35174
|
-
exports.getOs = getOs;
|
|
35175
|
-
exports.getTarget = getTarget;
|
|
35176
|
-
}));
|
|
35177
|
-
|
|
35178
|
-
//#endregion
|
|
35179
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.8_typescript@5.9.2/node_modules/@socketsecurity/lib/dist/node/module.js
|
|
35180
|
-
var require_module = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35181
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35182
|
-
const require_constants_runtime = require_runtime$5();
|
|
35183
|
-
let cachedModule;
|
|
35184
|
-
function getNodeModule() {
|
|
35185
|
-
if (!require_constants_runtime.IS_NODE) return;
|
|
35186
|
-
return cachedModule ??= /*@__PURE__*/ require("module");
|
|
35160
|
+
function requireBuiltin(specifier) {
|
|
35161
|
+
const req = getRequire();
|
|
35162
|
+
if (req) return req(specifier);
|
|
35187
35163
|
}
|
|
35188
35164
|
/**
|
|
35189
|
-
*
|
|
35190
|
-
*
|
|
35191
|
-
*
|
|
35192
|
-
*
|
|
35193
|
-
* Returns
|
|
35194
|
-
* undefined — no `node:` modules are built-in there.
|
|
35195
|
-
*
|
|
35196
|
-
* Single source of truth for "is this a Node builtin?" probes across socket-lib
|
|
35197
|
-
* (used by the smol-binding loaders to gate `require('node:smol-*')`).
|
|
35165
|
+
* Load a module by specifier from a CALLER-supplied base (its
|
|
35166
|
+
* `import.meta.url`). Use this for RELATIVE specifiers (`./x`, `../y`), whose
|
|
35167
|
+
* resolution depends on the caller's directory — `requireBuiltin` binds to this
|
|
35168
|
+
* file and would resolve them from `src/node/`. Not cached: the binding is
|
|
35169
|
+
* per-caller. Returns undefined where no `require` can be bound.
|
|
35198
35170
|
*/
|
|
35199
|
-
|
|
35200
|
-
|
|
35201
|
-
if (
|
|
35202
|
-
return (cachedIsBuiltin ??= getNodeModule().isBuiltin)(name);
|
|
35171
|
+
function requireFrom(fromUrl, specifier) {
|
|
35172
|
+
const req = bindRequire(fromUrl);
|
|
35173
|
+
if (req) return req(specifier);
|
|
35203
35174
|
}
|
|
35175
|
+
exports.bindRequire = bindRequire;
|
|
35204
35176
|
exports.getNodeModule = getNodeModule;
|
|
35177
|
+
exports.getRequire = getRequire;
|
|
35205
35178
|
exports.isNodeBuiltin = isNodeBuiltin;
|
|
35179
|
+
exports.requireBuiltin = requireBuiltin;
|
|
35180
|
+
exports.requireFrom = requireFrom;
|
|
35206
35181
|
}));
|
|
35207
35182
|
|
|
35208
35183
|
//#endregion
|
|
35209
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
35184
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/smol/detect.js
|
|
35210
35185
|
var require_detect = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35211
35186
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35212
35187
|
const require_node_module = require_module();
|
|
@@ -35249,7 +35224,7 @@ var require_detect = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35249
35224
|
if (!smolUtilProbed) {
|
|
35250
35225
|
smolUtilProbed = true;
|
|
35251
35226
|
/* c8 ignore start - smol Node binary only. */
|
|
35252
|
-
if (require_node_module.isNodeBuiltin("node:smol-util")) smolUtilCache =
|
|
35227
|
+
if (require_node_module.isNodeBuiltin("node:smol-util")) smolUtilCache = require_node_module.requireBuiltin("node:smol-util");
|
|
35253
35228
|
}
|
|
35254
35229
|
return smolUtilCache;
|
|
35255
35230
|
}
|
|
@@ -35279,7 +35254,7 @@ var require_detect = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35279
35254
|
}));
|
|
35280
35255
|
|
|
35281
35256
|
//#endregion
|
|
35282
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
35257
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/uncurry.js
|
|
35283
35258
|
var require_uncurry = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35284
35259
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35285
35260
|
/**
|
|
@@ -35325,7 +35300,7 @@ var require_uncurry = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35325
35300
|
}));
|
|
35326
35301
|
|
|
35327
35302
|
//#endregion
|
|
35328
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
35303
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/smol/primordial.js
|
|
35329
35304
|
var require_primordial = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35330
35305
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35331
35306
|
const require_node_module = require_module();
|
|
@@ -35355,7 +35330,7 @@ var require_primordial = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35355
35330
|
if (!smolPrimordialProbed) {
|
|
35356
35331
|
smolPrimordialProbed = true;
|
|
35357
35332
|
/* c8 ignore start - smol Node binary only. */
|
|
35358
|
-
if (require_node_module.isNodeBuiltin("node:smol-primordial")) smolPrimordial =
|
|
35333
|
+
if (require_node_module.isNodeBuiltin("node:smol-primordial")) smolPrimordial = require_node_module.requireBuiltin("node:smol-primordial");
|
|
35359
35334
|
}
|
|
35360
35335
|
return smolPrimordial;
|
|
35361
35336
|
}
|
|
@@ -35363,7 +35338,7 @@ var require_primordial = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35363
35338
|
}));
|
|
35364
35339
|
|
|
35365
35340
|
//#endregion
|
|
35366
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
35341
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/string.js
|
|
35367
35342
|
var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35368
35343
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35369
35344
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -35482,7 +35457,124 @@ var require_string = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35482
35457
|
}));
|
|
35483
35458
|
|
|
35484
35459
|
//#endregion
|
|
35485
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
35460
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/node/os.js
|
|
35461
|
+
var require_os = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35462
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35463
|
+
const nodeOs = require_runtime$5().IS_NODE ? /*@__PURE__*/ require("os") : void 0;
|
|
35464
|
+
function getNodeOs() {
|
|
35465
|
+
return nodeOs;
|
|
35466
|
+
}
|
|
35467
|
+
const osArch = nodeOs?.arch;
|
|
35468
|
+
const osHomedir = nodeOs?.homedir;
|
|
35469
|
+
const osPlatform = nodeOs?.platform;
|
|
35470
|
+
const osTmpdir = nodeOs?.tmpdir;
|
|
35471
|
+
exports.getNodeOs = getNodeOs;
|
|
35472
|
+
exports.osArch = osArch;
|
|
35473
|
+
exports.osHomedir = osHomedir;
|
|
35474
|
+
exports.osPlatform = osPlatform;
|
|
35475
|
+
exports.osTmpdir = osTmpdir;
|
|
35476
|
+
}));
|
|
35477
|
+
|
|
35478
|
+
//#endregion
|
|
35479
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/constants/platform.js
|
|
35480
|
+
var require_platform = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35481
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35482
|
+
const require_node_os = require_os();
|
|
35483
|
+
let node_fs$1 = require("node:fs");
|
|
35484
|
+
/**
|
|
35485
|
+
* @file Platform detection and OS-specific constants.
|
|
35486
|
+
*/
|
|
35487
|
+
let memoizedArch;
|
|
35488
|
+
/**
|
|
35489
|
+
* Get the current CPU architecture (memoized), e.g. `x64`, `arm64`.
|
|
35490
|
+
*/
|
|
35491
|
+
function getArch() {
|
|
35492
|
+
if (memoizedArch === void 0) memoizedArch = require_node_os.getNodeOs().arch();
|
|
35493
|
+
return memoizedArch;
|
|
35494
|
+
}
|
|
35495
|
+
const MUSL_LINKERS = [
|
|
35496
|
+
"/lib/ld-musl-x86_64.so.1",
|
|
35497
|
+
"/lib/ld-musl-aarch64.so.1",
|
|
35498
|
+
"/usr/lib/ld-musl-x86_64.so.1",
|
|
35499
|
+
"/usr/lib/ld-musl-aarch64.so.1"
|
|
35500
|
+
];
|
|
35501
|
+
let memoizedLibc;
|
|
35502
|
+
let memoizedLibcProbed = false;
|
|
35503
|
+
/**
|
|
35504
|
+
* Get the host libc variant (memoized): `'musl'` on Alpine-and-similar,
|
|
35505
|
+
* `'glibc'` on other Linux, `undefined` off-Linux. Detected by probing for the
|
|
35506
|
+
* musl dynamic linker. The single source of truth for libc detection —
|
|
35507
|
+
* tool-specific resolvers (`getPythonArch`, `getJreArch`) call this rather than
|
|
35508
|
+
* re-probing.
|
|
35509
|
+
*/
|
|
35510
|
+
function getLibc() {
|
|
35511
|
+
if (!memoizedLibcProbed) {
|
|
35512
|
+
memoizedLibcProbed = true;
|
|
35513
|
+
/* c8 ignore start - Linux-only filesystem probe. */
|
|
35514
|
+
if (getOs() !== "linux") memoizedLibc = void 0;
|
|
35515
|
+
else {
|
|
35516
|
+
memoizedLibc = "glibc";
|
|
35517
|
+
for (let i = 0, { length } = MUSL_LINKERS; i < length; i += 1) if ((0, node_fs$1.existsSync)(MUSL_LINKERS[i])) {
|
|
35518
|
+
memoizedLibc = "musl";
|
|
35519
|
+
break;
|
|
35520
|
+
}
|
|
35521
|
+
}
|
|
35522
|
+
}
|
|
35523
|
+
return memoizedLibc;
|
|
35524
|
+
}
|
|
35525
|
+
let memoizedOs;
|
|
35526
|
+
/**
|
|
35527
|
+
* Get the current OS (memoized), e.g. `darwin`, `linux`, `win32` — the raw
|
|
35528
|
+
* `process.platform` value.
|
|
35529
|
+
*/
|
|
35530
|
+
function getOs() {
|
|
35531
|
+
if (memoizedOs === void 0) memoizedOs = require_node_os.getNodeOs().platform();
|
|
35532
|
+
return memoizedOs;
|
|
35533
|
+
}
|
|
35534
|
+
let memoizedTarget;
|
|
35535
|
+
/**
|
|
35536
|
+
* Get the current host **target** in the pnpm `pack-app` vocabulary (memoized):
|
|
35537
|
+
* `<os>-<arch>[-<libc>]`, e.g. `darwin-arm64`, `linux-x64`, `win32-x64`,
|
|
35538
|
+
* `linux-x64-musl`. Raw Node `process.platform`/`process.arch` joined with `-`,
|
|
35539
|
+
* plus a `-musl` suffix on Alpine. This is the fleet-general naming for
|
|
35540
|
+
* non-python / non-JRE tools (matches pnpm's release assets,
|
|
35541
|
+
* `pnpm-<os>-<arch>[-<libc>].{tar.gz,zip}`). Tool-specific resolvers that need
|
|
35542
|
+
* a different vocabulary own their own helper — see `getPythonArch`
|
|
35543
|
+
* (python-build- standalone) / `getJreArch` (Adoptium).
|
|
35544
|
+
*/
|
|
35545
|
+
function getTarget() {
|
|
35546
|
+
if (memoizedTarget === void 0) {
|
|
35547
|
+
const libcSuffix = getLibc() === "musl" ? "-musl" : "";
|
|
35548
|
+
memoizedTarget = `${getOs()}-${getArch()}${libcSuffix}`;
|
|
35549
|
+
}
|
|
35550
|
+
return memoizedTarget;
|
|
35551
|
+
}
|
|
35552
|
+
const DARWIN = getOs() === "darwin";
|
|
35553
|
+
const WIN32 = getOs() === "win32";
|
|
35554
|
+
/**
|
|
35555
|
+
* True when this process was launched as a Chrome (or Chromium) native
|
|
35556
|
+
* messaging host. Chrome passes the extension origin URL
|
|
35557
|
+
* (`chrome-extension://<id>/`) as `process.argv[2]`; no other invocation shape
|
|
35558
|
+
* produces that prefix.
|
|
35559
|
+
*/
|
|
35560
|
+
const NATIVE_MESSAGING_HOST = typeof process !== "undefined" && typeof process.argv[2] === "string" && process.argv[2].startsWith("chrome-extension://");
|
|
35561
|
+
const S_IXUSR = 64;
|
|
35562
|
+
const S_IXGRP = 8;
|
|
35563
|
+
const S_IXOTH = 1;
|
|
35564
|
+
exports.DARWIN = DARWIN;
|
|
35565
|
+
exports.NATIVE_MESSAGING_HOST = NATIVE_MESSAGING_HOST;
|
|
35566
|
+
exports.S_IXGRP = S_IXGRP;
|
|
35567
|
+
exports.S_IXOTH = S_IXOTH;
|
|
35568
|
+
exports.S_IXUSR = S_IXUSR;
|
|
35569
|
+
exports.WIN32 = WIN32;
|
|
35570
|
+
exports.getArch = getArch;
|
|
35571
|
+
exports.getLibc = getLibc;
|
|
35572
|
+
exports.getOs = getOs;
|
|
35573
|
+
exports.getTarget = getTarget;
|
|
35574
|
+
}));
|
|
35575
|
+
|
|
35576
|
+
//#endregion
|
|
35577
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/math.js
|
|
35486
35578
|
var require_math = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35487
35579
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35488
35580
|
/**
|
|
@@ -35584,11 +35676,11 @@ var require_math = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35584
35676
|
}));
|
|
35585
35677
|
|
|
35586
35678
|
//#endregion
|
|
35587
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
35679
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/strings/search.js
|
|
35588
35680
|
var require_search = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35589
35681
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35590
|
-
const require_primordials_math = require_math();
|
|
35591
35682
|
const require_primordials_string = require_string();
|
|
35683
|
+
const require_primordials_math = require_math();
|
|
35592
35684
|
/**
|
|
35593
35685
|
* @file `search` — like `String.prototype.search` but with a configurable
|
|
35594
35686
|
* starting index. The native `RegExp.exec` + `lastIndex` dance handles this,
|
|
@@ -35637,7 +35729,7 @@ var require_search = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35637
35729
|
}));
|
|
35638
35730
|
|
|
35639
35731
|
//#endregion
|
|
35640
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
35732
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/buffer.js
|
|
35641
35733
|
var require_buffer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35642
35734
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35643
35735
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -35674,12 +35766,15 @@ var require_buffer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35674
35766
|
}));
|
|
35675
35767
|
|
|
35676
35768
|
//#endregion
|
|
35677
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
35678
|
-
var
|
|
35769
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/constants/encoding.js
|
|
35770
|
+
var require_encoding = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35679
35771
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35680
|
-
|
|
35681
|
-
|
|
35682
|
-
|
|
35772
|
+
/**
|
|
35773
|
+
* @file Character encoding and character code constants. Exports the default
|
|
35774
|
+
* UTF-8 encoding name and numeric char codes for common ASCII characters used
|
|
35775
|
+
* by path and parsing utilities.
|
|
35776
|
+
*/
|
|
35777
|
+
const UTF8 = "utf8";
|
|
35683
35778
|
const CHAR_BACKWARD_SLASH = 92;
|
|
35684
35779
|
const CHAR_COLON = 58;
|
|
35685
35780
|
const CHAR_FORWARD_SLASH = 47;
|
|
@@ -35687,6 +35782,24 @@ var require__internal$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35687
35782
|
const CHAR_LOWERCASE_Z = 122;
|
|
35688
35783
|
const CHAR_UPPERCASE_A = 65;
|
|
35689
35784
|
const CHAR_UPPERCASE_Z = 90;
|
|
35785
|
+
exports.CHAR_BACKWARD_SLASH = CHAR_BACKWARD_SLASH;
|
|
35786
|
+
exports.CHAR_COLON = CHAR_COLON;
|
|
35787
|
+
exports.CHAR_FORWARD_SLASH = CHAR_FORWARD_SLASH;
|
|
35788
|
+
exports.CHAR_LOWERCASE_A = CHAR_LOWERCASE_A;
|
|
35789
|
+
exports.CHAR_LOWERCASE_Z = CHAR_LOWERCASE_Z;
|
|
35790
|
+
exports.CHAR_UPPERCASE_A = CHAR_UPPERCASE_A;
|
|
35791
|
+
exports.CHAR_UPPERCASE_Z = CHAR_UPPERCASE_Z;
|
|
35792
|
+
exports.UTF8 = UTF8;
|
|
35793
|
+
}));
|
|
35794
|
+
|
|
35795
|
+
//#endregion
|
|
35796
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/paths/_internal.js
|
|
35797
|
+
var require__internal$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35798
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35799
|
+
const require_primordials_buffer = require_buffer();
|
|
35800
|
+
const require_primordials_string = require_string();
|
|
35801
|
+
const require_constants_platform = require_platform();
|
|
35802
|
+
const require_constants_encoding = require_encoding();
|
|
35690
35803
|
const msysDriveRegExp = /^\/([a-zA-Z])($|\/)/;
|
|
35691
35804
|
const nodeModulesPathRegExp = /(?:[/\\]|^)node_modules(?:$|[/\\])/;
|
|
35692
35805
|
const slashRegExp = /[/\\]/;
|
|
@@ -35744,13 +35857,13 @@ var require__internal$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35744
35857
|
}
|
|
35745
35858
|
return String(pathLike);
|
|
35746
35859
|
}
|
|
35747
|
-
exports.CHAR_BACKWARD_SLASH = CHAR_BACKWARD_SLASH;
|
|
35748
|
-
exports.CHAR_COLON = CHAR_COLON;
|
|
35749
|
-
exports.CHAR_FORWARD_SLASH = CHAR_FORWARD_SLASH;
|
|
35750
|
-
exports.CHAR_LOWERCASE_A = CHAR_LOWERCASE_A;
|
|
35751
|
-
exports.CHAR_LOWERCASE_Z = CHAR_LOWERCASE_Z;
|
|
35752
|
-
exports.CHAR_UPPERCASE_A = CHAR_UPPERCASE_A;
|
|
35753
|
-
exports.CHAR_UPPERCASE_Z = CHAR_UPPERCASE_Z;
|
|
35860
|
+
exports.CHAR_BACKWARD_SLASH = require_constants_encoding.CHAR_BACKWARD_SLASH;
|
|
35861
|
+
exports.CHAR_COLON = require_constants_encoding.CHAR_COLON;
|
|
35862
|
+
exports.CHAR_FORWARD_SLASH = require_constants_encoding.CHAR_FORWARD_SLASH;
|
|
35863
|
+
exports.CHAR_LOWERCASE_A = require_constants_encoding.CHAR_LOWERCASE_A;
|
|
35864
|
+
exports.CHAR_LOWERCASE_Z = require_constants_encoding.CHAR_LOWERCASE_Z;
|
|
35865
|
+
exports.CHAR_UPPERCASE_A = require_constants_encoding.CHAR_UPPERCASE_A;
|
|
35866
|
+
exports.CHAR_UPPERCASE_Z = require_constants_encoding.CHAR_UPPERCASE_Z;
|
|
35754
35867
|
exports.getUrl = getUrl;
|
|
35755
35868
|
exports.msysDriveRegExp = msysDriveRegExp;
|
|
35756
35869
|
exports.nodeModulesPathRegExp = nodeModulesPathRegExp;
|
|
@@ -35759,11 +35872,11 @@ var require__internal$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35759
35872
|
}));
|
|
35760
35873
|
|
|
35761
35874
|
//#endregion
|
|
35762
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
35875
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/paths/conversion.js
|
|
35763
35876
|
var require_conversion = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35764
35877
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35765
|
-
const require_constants_platform = require_platform();
|
|
35766
35878
|
const require_primordials_string = require_string();
|
|
35879
|
+
const require_constants_platform = require_platform();
|
|
35767
35880
|
const require_paths__internal = require__internal$1();
|
|
35768
35881
|
const require_paths_normalize = require_normalize();
|
|
35769
35882
|
/**
|
|
@@ -35875,7 +35988,7 @@ var require_conversion = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35875
35988
|
}));
|
|
35876
35989
|
|
|
35877
35990
|
//#endregion
|
|
35878
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
35991
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/regexp.js
|
|
35879
35992
|
var require_regexp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35880
35993
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35881
35994
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -35902,11 +36015,12 @@ var require_regexp = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
35902
36015
|
}));
|
|
35903
36016
|
|
|
35904
36017
|
//#endregion
|
|
35905
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
36018
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/paths/predicates.js
|
|
35906
36019
|
var require_predicates$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
35907
36020
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
35908
|
-
const require_constants_platform = require_platform();
|
|
35909
36021
|
const require_primordials_string = require_string();
|
|
36022
|
+
const require_constants_platform = require_platform();
|
|
36023
|
+
require_encoding();
|
|
35910
36024
|
const require_paths__internal = require__internal$1();
|
|
35911
36025
|
const require_primordials_regexp = require_regexp();
|
|
35912
36026
|
/**
|
|
@@ -36093,7 +36207,7 @@ var require_predicates$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36093
36207
|
}));
|
|
36094
36208
|
|
|
36095
36209
|
//#endregion
|
|
36096
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
36210
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/paths/resolve.js
|
|
36097
36211
|
var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
36098
36212
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
36099
36213
|
/**
|
|
@@ -36237,11 +36351,11 @@ var require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
36237
36351
|
}));
|
|
36238
36352
|
|
|
36239
36353
|
//#endregion
|
|
36240
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
36354
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/paths/normalize.js
|
|
36241
36355
|
var require_normalize = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
36242
36356
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
36243
|
-
const require_constants_platform = require_platform();
|
|
36244
36357
|
const require_primordials_string = require_string();
|
|
36358
|
+
const require_constants_platform = require_platform();
|
|
36245
36359
|
const require_strings_search = require_search();
|
|
36246
36360
|
const require_paths__internal = require__internal$1();
|
|
36247
36361
|
const require_paths_conversion = require_conversion();
|
|
@@ -36914,7 +37028,9 @@ function repairEndPositions(node) {
|
|
|
36914
37028
|
}
|
|
36915
37029
|
if (typeof node.type !== "string") {
|
|
36916
37030
|
let m = 0;
|
|
36917
|
-
|
|
37031
|
+
const objectKeys = Object.keys(node);
|
|
37032
|
+
for (let i = 0, { length } = objectKeys; i < length; i += 1) {
|
|
37033
|
+
const key = objectKeys[i];
|
|
36918
37034
|
if (key === "loc" || key === "range" || key.startsWith("_")) continue;
|
|
36919
37035
|
const e = repairEndPositions(node[key]);
|
|
36920
37036
|
if (e > m) m = e;
|
|
@@ -36922,7 +37038,9 @@ function repairEndPositions(node) {
|
|
|
36922
37038
|
return m;
|
|
36923
37039
|
}
|
|
36924
37040
|
let maxChildEnd = 0;
|
|
36925
|
-
|
|
37041
|
+
const nodeKeys = Object.keys(node);
|
|
37042
|
+
for (let i = 0, { length } = nodeKeys; i < length; i += 1) {
|
|
37043
|
+
const key = nodeKeys[i];
|
|
36926
37044
|
if (key === "loc" || key === "range" || key === "start" || key === "end" || key.startsWith("_")) continue;
|
|
36927
37045
|
const e = repairEndPositions(node[key]);
|
|
36928
37046
|
if (e > maxChildEnd) maxChildEnd = e;
|
|
@@ -36948,7 +37066,9 @@ function walkAst(node, visit) {
|
|
|
36948
37066
|
return;
|
|
36949
37067
|
}
|
|
36950
37068
|
if (typeof node.type === "string") visit(node);
|
|
36951
|
-
|
|
37069
|
+
const keys = Object.keys(node);
|
|
37070
|
+
for (let i = 0, { length } = keys; i < length; i += 1) {
|
|
37071
|
+
const key = keys[i];
|
|
36952
37072
|
if (key === "loc" || key === "range" || key.startsWith("_")) continue;
|
|
36953
37073
|
walkAst(node[key], visit);
|
|
36954
37074
|
}
|
|
@@ -37125,7 +37245,8 @@ function collectRewrites(options) {
|
|
|
37125
37245
|
const objSrc = src.slice(toChar(object.start), toChar(object.end));
|
|
37126
37246
|
const argsSrc = node.arguments.length > 0 ? src.slice(toChar(node.arguments[0].start), toChar(node.arguments.at(-1).end)) : "";
|
|
37127
37247
|
const callStart = toChar(node.callee.start);
|
|
37128
|
-
const
|
|
37248
|
+
const lastArgEnd = node.arguments.length > 0 ? toChar(node.arguments.at(-1).end) : toChar(node.callee.end);
|
|
37249
|
+
const callEnd = findClosingParen(src, lastArgEnd);
|
|
37129
37250
|
if (callEnd < 0) return;
|
|
37130
37251
|
const needsBang = isTsFile && nullable && nullable.has(expected);
|
|
37131
37252
|
const fnName = localName(expected) + (needsBang ? "!" : "");
|
|
@@ -37152,7 +37273,7 @@ function collectRewrites(options) {
|
|
|
37152
37273
|
* stay in separate domains.
|
|
37153
37274
|
*/
|
|
37154
37275
|
/**
|
|
37155
|
-
* Apply collected rewrites to `
|
|
37276
|
+
* Apply collected rewrites to `source`, then emit the primordials import block.
|
|
37156
37277
|
*
|
|
37157
37278
|
* Dedupes rewrite spans by `[start, end]` (acorn-wasm's compact_serialize can
|
|
37158
37279
|
* surface the same node multiple times in the JSON tree), sorts them
|
|
@@ -37166,7 +37287,7 @@ function collectRewrites(options) {
|
|
|
37166
37287
|
*
|
|
37167
37288
|
* Returns the rewritten source plus whether an import was added.
|
|
37168
37289
|
*/
|
|
37169
|
-
function applyPrimordialsImports(
|
|
37290
|
+
function applyPrimordialsImports(source, rewrites, usedPrimordials, importStyle, absPath) {
|
|
37170
37291
|
const aliasPrefix = importStyle?.aliasPrefix ?? "";
|
|
37171
37292
|
const seen = /* @__PURE__ */ new Set();
|
|
37172
37293
|
const deduped = [];
|
|
@@ -37178,7 +37299,7 @@ function applyPrimordialsImports(src, rewrites, usedPrimordials, importStyle, ab
|
|
|
37178
37299
|
deduped.push(r);
|
|
37179
37300
|
}
|
|
37180
37301
|
deduped.sort((a, b) => b.start - a.start);
|
|
37181
|
-
let out =
|
|
37302
|
+
let out = source;
|
|
37182
37303
|
for (let i = 0, { length } = deduped; i < length; i += 1) {
|
|
37183
37304
|
const r = deduped[i];
|
|
37184
37305
|
out = out.slice(0, r.start) + r.replacement + out.slice(r.end);
|
|
@@ -37189,7 +37310,8 @@ function applyPrimordialsImports(src, rewrites, usedPrimordials, importStyle, ab
|
|
|
37189
37310
|
const { exportToLeaf, leafSpecifier } = importStyle.splitByLeaf;
|
|
37190
37311
|
const byLeaf = /* @__PURE__ */ new Map();
|
|
37191
37312
|
const idents = [...usedPrimordials].toSorted();
|
|
37192
|
-
for (
|
|
37313
|
+
for (let i = 0, { length } = idents; i < length; i += 1) {
|
|
37314
|
+
const id = idents[i];
|
|
37193
37315
|
const leaf = exportToLeaf.get(id);
|
|
37194
37316
|
if (!leaf) continue;
|
|
37195
37317
|
let arr = byLeaf.get(leaf);
|
|
@@ -37199,7 +37321,9 @@ function applyPrimordialsImports(src, rewrites, usedPrimordials, importStyle, ab
|
|
|
37199
37321
|
}
|
|
37200
37322
|
arr.push(id);
|
|
37201
37323
|
}
|
|
37202
|
-
|
|
37324
|
+
const leaves = [...byLeaf.keys()].toSorted();
|
|
37325
|
+
for (let i = 0, { length } = leaves; i < length; i += 1) {
|
|
37326
|
+
const leaf = leaves[i];
|
|
37203
37327
|
const leafIdents = byLeaf.get(leaf).toSorted();
|
|
37204
37328
|
const leafSpec = leafSpecifier(absPath, leaf);
|
|
37205
37329
|
const out2 = ensureImports(newSource, leafIdents, {
|
|
@@ -37230,15 +37354,15 @@ function applyPrimordialsImports(src, rewrites, usedPrimordials, importStyle, ab
|
|
|
37230
37354
|
*
|
|
37231
37355
|
* In ESM mode emits `import { X, Y } from '<specifier>'`. In CJS mode emits
|
|
37232
37356
|
* `const { X, Y } = require('<specifier>')`. If a matching import (same shape,
|
|
37233
|
-
* same specifier) already exists in `
|
|
37234
|
-
* its destructure list and we re-sort the keys; otherwise the new
|
|
37235
|
-
* inserted after the last existing import/require, or prepended if
|
|
37236
|
-
* exists.
|
|
37357
|
+
* same specifier) already exists in `source`, the new identifiers are merged
|
|
37358
|
+
* into its destructure list and we re-sort the keys; otherwise the new
|
|
37359
|
+
* statement is inserted after the last existing import/require, or prepended if
|
|
37360
|
+
* neither exists.
|
|
37237
37361
|
*
|
|
37238
37362
|
* Returns the rewritten source and a boolean indicating whether anything was
|
|
37239
37363
|
* added/changed (vs already-present-and-complete).
|
|
37240
37364
|
*/
|
|
37241
|
-
function ensureImports(
|
|
37365
|
+
function ensureImports(source, identifiers, importStyle) {
|
|
37242
37366
|
const { kind, specifier } = importStyle;
|
|
37243
37367
|
const aliasPrefix = importStyle.aliasPrefix ?? "";
|
|
37244
37368
|
const renderEntry = (name) => aliasPrefix ? `${name}: ${aliasPrefix}${name}` : name;
|
|
@@ -37249,7 +37373,7 @@ function ensureImports(src, identifiers, importStyle) {
|
|
|
37249
37373
|
};
|
|
37250
37374
|
const escSpec = escapeRegex(specifier);
|
|
37251
37375
|
const existingRe = kind === "esm" ? new RegExp(`import\\s*\\{([^}]*)\\}\\s*from\\s*['"]${escSpec}['"];?`) : new RegExp(`(?:const|let|var)\\s*\\{([^}]*)\\}\\s*=\\s*require\\(\\s*['"]${escSpec}['"]\\s*\\);?`);
|
|
37252
|
-
const existing =
|
|
37376
|
+
const existing = source.match(existingRe);
|
|
37253
37377
|
if (existing) {
|
|
37254
37378
|
const have = new Set(existing[1].split(",").map(parseEntry).filter(Boolean));
|
|
37255
37379
|
let addedAny = false;
|
|
@@ -37258,25 +37382,25 @@ function ensureImports(src, identifiers, importStyle) {
|
|
|
37258
37382
|
addedAny = true;
|
|
37259
37383
|
}
|
|
37260
37384
|
if (!addedAny) return {
|
|
37261
|
-
newSource:
|
|
37385
|
+
newSource: source,
|
|
37262
37386
|
importAdded: false
|
|
37263
37387
|
};
|
|
37264
37388
|
const merged = [...have].toSorted().map(renderEntry).join(", ");
|
|
37265
37389
|
const replacement = kind === "esm" ? `import { ${merged} } from '${specifier}'` : `const { ${merged} } = require('${specifier}')`;
|
|
37266
37390
|
return {
|
|
37267
|
-
newSource:
|
|
37391
|
+
newSource: source.replace(existingRe, replacement),
|
|
37268
37392
|
importAdded: true
|
|
37269
37393
|
};
|
|
37270
37394
|
}
|
|
37271
|
-
const lastEnd = findInsertionPoint(
|
|
37395
|
+
const lastEnd = findInsertionPoint(source);
|
|
37272
37396
|
const list = identifiers.map(renderEntry).join(", ");
|
|
37273
37397
|
const newStmt = kind === "esm" ? `import { ${list} } from '${specifier}'\n` : `const { ${list} } = require('${specifier}')\n`;
|
|
37274
37398
|
if (lastEnd === 0) return {
|
|
37275
|
-
newSource: newStmt +
|
|
37399
|
+
newSource: newStmt + source,
|
|
37276
37400
|
importAdded: true
|
|
37277
37401
|
};
|
|
37278
37402
|
return {
|
|
37279
|
-
newSource:
|
|
37403
|
+
newSource: source.slice(0, lastEnd) + "\n" + newStmt + source.slice(lastEnd),
|
|
37280
37404
|
importAdded: true
|
|
37281
37405
|
};
|
|
37282
37406
|
}
|
|
@@ -37292,34 +37416,34 @@ function escapeRegex(s) {
|
|
|
37292
37416
|
* JSDoc / shebang block when no import/require is found, so callers prepend
|
|
37293
37417
|
* BELOW the `@fileoverview` block instead of clobbering it.
|
|
37294
37418
|
*/
|
|
37295
|
-
function findInsertionPoint(
|
|
37419
|
+
function findInsertionPoint(source) {
|
|
37296
37420
|
const importRe = /^import\s.+?from\s+['"][^'"]+['"]\s*;?\s*$/gm;
|
|
37297
37421
|
const requireRe = /^(?:const|let|var)\s+[^=]+?=\s*require\(\s*['"][^'"]+['"]\s*\)\s*;?\s*$/gm;
|
|
37298
37422
|
let lastEnd = 0;
|
|
37299
|
-
for (const m of
|
|
37423
|
+
for (const m of source.matchAll(importRe)) {
|
|
37300
37424
|
const end = m.index + m[0].length;
|
|
37301
37425
|
if (end > lastEnd) lastEnd = end;
|
|
37302
37426
|
}
|
|
37303
|
-
for (const m of
|
|
37427
|
+
for (const m of source.matchAll(requireRe)) {
|
|
37304
37428
|
const end = m.index + m[0].length;
|
|
37305
37429
|
if (end > lastEnd) lastEnd = end;
|
|
37306
37430
|
}
|
|
37307
37431
|
if (lastEnd > 0) return lastEnd;
|
|
37308
37432
|
let pos = 0;
|
|
37309
|
-
if (
|
|
37310
|
-
const nl =
|
|
37311
|
-
pos = nl === -1 ?
|
|
37433
|
+
if (source.startsWith("#!")) {
|
|
37434
|
+
const nl = source.indexOf("\n", pos);
|
|
37435
|
+
pos = nl === -1 ? source.length : nl + 1;
|
|
37312
37436
|
}
|
|
37313
|
-
while (pos <
|
|
37314
|
-
if (
|
|
37315
|
-
const close =
|
|
37437
|
+
while (pos < source.length && /\s/.test(source[pos])) pos++;
|
|
37438
|
+
if (source.startsWith("/*", pos)) {
|
|
37439
|
+
const close = source.indexOf("*/", pos);
|
|
37316
37440
|
if (close !== -1) {
|
|
37317
37441
|
pos = close + 2;
|
|
37318
|
-
if (
|
|
37442
|
+
if (source[pos] === "\n") pos++;
|
|
37319
37443
|
} else pos = 0;
|
|
37320
|
-
} else if (
|
|
37321
|
-
const nl =
|
|
37322
|
-
pos = nl === -1 ?
|
|
37444
|
+
} else if (source.startsWith("//", pos)) while (source.startsWith("//", pos)) {
|
|
37445
|
+
const nl = source.indexOf("\n", pos);
|
|
37446
|
+
pos = nl === -1 ? source.length : nl + 1;
|
|
37323
37447
|
}
|
|
37324
37448
|
else pos = 0;
|
|
37325
37449
|
return pos;
|
|
@@ -37347,7 +37471,7 @@ function findInsertionPoint(src) {
|
|
|
37347
37471
|
* the files.
|
|
37348
37472
|
*/
|
|
37349
37473
|
const DEFAULT_PRIMORDIALS_IMPORT_SPECIFIER = "@socketsecurity/lib/primordials";
|
|
37350
|
-
const REWRITABLE_EXTENSIONS = new Set([
|
|
37474
|
+
const REWRITABLE_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
37351
37475
|
".cjs",
|
|
37352
37476
|
".cts",
|
|
37353
37477
|
".js",
|
|
@@ -37357,7 +37481,7 @@ const REWRITABLE_EXTENSIONS = new Set([
|
|
|
37357
37481
|
".ts",
|
|
37358
37482
|
".tsx"
|
|
37359
37483
|
]);
|
|
37360
|
-
const TS_EXTENSIONS$1 = new Set([
|
|
37484
|
+
const TS_EXTENSIONS$1 = /* @__PURE__ */ new Set([
|
|
37361
37485
|
".cts",
|
|
37362
37486
|
".mts",
|
|
37363
37487
|
".ts",
|
|
@@ -37618,7 +37742,7 @@ function* walkDir(dir, skipDirs = [
|
|
|
37618
37742
|
* violations with file:line:column locations. Future lint rules slot into
|
|
37619
37743
|
* the same visitor.
|
|
37620
37744
|
*/
|
|
37621
|
-
const CTOR_NAMES = new Set([
|
|
37745
|
+
const CTOR_NAMES = /* @__PURE__ */ new Set([
|
|
37622
37746
|
"AggregateError",
|
|
37623
37747
|
"Array",
|
|
37624
37748
|
"ArrayBuffer",
|
|
@@ -37659,13 +37783,13 @@ const CTOR_NAMES = new Set([
|
|
|
37659
37783
|
"WeakRef",
|
|
37660
37784
|
"WeakSet"
|
|
37661
37785
|
]);
|
|
37662
|
-
const TS_EXTENSIONS = new Set([
|
|
37786
|
+
const TS_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
37663
37787
|
".cts",
|
|
37664
37788
|
".mts",
|
|
37665
37789
|
".ts",
|
|
37666
37790
|
".tsx"
|
|
37667
37791
|
]);
|
|
37668
|
-
const JS_EXTENSIONS = new Set([
|
|
37792
|
+
const JS_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
37669
37793
|
".cjs",
|
|
37670
37794
|
".js",
|
|
37671
37795
|
".jsx",
|
|
@@ -37843,7 +37967,7 @@ function lintSource({ targetRoot, scanDir, skipDirs, skipFiles, primordialSource
|
|
|
37843
37967
|
}
|
|
37844
37968
|
|
|
37845
37969
|
//#endregion
|
|
37846
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
37970
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/reflect.js
|
|
37847
37971
|
var require_reflect = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
37848
37972
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
37849
37973
|
/**
|
|
@@ -37880,7 +38004,20 @@ var require_reflect = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37880
38004
|
}));
|
|
37881
38005
|
|
|
37882
38006
|
//#endregion
|
|
37883
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
38007
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/node/async-hooks.js
|
|
38008
|
+
var require_async_hooks = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38009
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
38010
|
+
const require_constants_runtime = require_runtime$5();
|
|
38011
|
+
let asyncHooks;
|
|
38012
|
+
function getNodeAsyncHooks() {
|
|
38013
|
+
if (!require_constants_runtime.IS_NODE) return;
|
|
38014
|
+
return asyncHooks ??= /*@__PURE__*/ require("async_hooks");
|
|
38015
|
+
}
|
|
38016
|
+
exports.getNodeAsyncHooks = getNodeAsyncHooks;
|
|
38017
|
+
}));
|
|
38018
|
+
|
|
38019
|
+
//#endregion
|
|
38020
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/map-set.js
|
|
37884
38021
|
var require_map_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
37885
38022
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
37886
38023
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -37973,7 +38110,7 @@ var require_map_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
37973
38110
|
}));
|
|
37974
38111
|
|
|
37975
38112
|
//#endregion
|
|
37976
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
38113
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/themes/themes.js
|
|
37977
38114
|
var require_themes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
37978
38115
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
37979
38116
|
/**
|
|
@@ -38210,12 +38347,12 @@ var require_themes = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38210
38347
|
}));
|
|
38211
38348
|
|
|
38212
38349
|
//#endregion
|
|
38213
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
38350
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/themes/context.js
|
|
38214
38351
|
var require_context = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38215
38352
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
38353
|
+
const require_node_async_hooks = require_async_hooks();
|
|
38216
38354
|
const require_primordials_map_set = require_map_set();
|
|
38217
38355
|
const require_themes_themes = require_themes();
|
|
38218
|
-
let asyncHooks;
|
|
38219
38356
|
/**
|
|
38220
38357
|
* Emit theme change event to listeners.
|
|
38221
38358
|
*
|
|
@@ -38225,14 +38362,13 @@ var require_context = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38225
38362
|
for (const listener of listeners) listener(theme);
|
|
38226
38363
|
}
|
|
38227
38364
|
/**
|
|
38228
|
-
* Lazily load the async_hooks module
|
|
38365
|
+
* Lazily load the async_hooks module. Aliases the canonical `node/async-hooks`
|
|
38366
|
+
* accessor (single owner of the bundler-safe require); kept as an export so
|
|
38367
|
+
* this module's surface is unchanged.
|
|
38229
38368
|
*
|
|
38230
38369
|
* @private
|
|
38231
38370
|
*/
|
|
38232
|
-
|
|
38233
|
-
if (asyncHooks === void 0) asyncHooks = /*@__PURE__*/ require("node:async_hooks");
|
|
38234
|
-
return asyncHooks;
|
|
38235
|
-
}
|
|
38371
|
+
const getAsyncHooks = require_node_async_hooks.getNodeAsyncHooks;
|
|
38236
38372
|
/**
|
|
38237
38373
|
* AsyncLocalStorage for theme context isolation.
|
|
38238
38374
|
*/
|
|
@@ -38357,7 +38493,7 @@ var require_context = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38357
38493
|
}));
|
|
38358
38494
|
|
|
38359
38495
|
//#endregion
|
|
38360
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
38496
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/_internal.js
|
|
38361
38497
|
var require__internal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38362
38498
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
38363
38499
|
const require_primordials_map_set = require_map_set();
|
|
@@ -38472,7 +38608,7 @@ var require__internal = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38472
38608
|
}));
|
|
38473
38609
|
|
|
38474
38610
|
//#endregion
|
|
38475
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
38611
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/_virtual/_rolldown/runtime.js
|
|
38476
38612
|
var require_runtime$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38477
38613
|
var __create = Object.create;
|
|
38478
38614
|
var __defProp = Object.defineProperty;
|
|
@@ -38508,7 +38644,7 @@ var require_runtime$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38508
38644
|
}));
|
|
38509
38645
|
|
|
38510
38646
|
//#endregion
|
|
38511
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
38647
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/array.js
|
|
38512
38648
|
var require_array = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38513
38649
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
38514
38650
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -38648,7 +38784,7 @@ var require_array = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38648
38784
|
}));
|
|
38649
38785
|
|
|
38650
38786
|
//#endregion
|
|
38651
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
38787
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/error.js
|
|
38652
38788
|
var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38653
38789
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
38654
38790
|
/**
|
|
@@ -38696,7 +38832,7 @@ var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38696
38832
|
}));
|
|
38697
38833
|
|
|
38698
38834
|
//#endregion
|
|
38699
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
38835
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/number.js
|
|
38700
38836
|
var require_number = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38701
38837
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
38702
38838
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -38751,7 +38887,7 @@ var require_number = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38751
38887
|
}));
|
|
38752
38888
|
|
|
38753
38889
|
//#endregion
|
|
38754
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
38890
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/object.js
|
|
38755
38891
|
var require_object = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38756
38892
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
38757
38893
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -38832,7 +38968,7 @@ var require_object = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38832
38968
|
}));
|
|
38833
38969
|
|
|
38834
38970
|
//#endregion
|
|
38835
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
38971
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/promise.js
|
|
38836
38972
|
var require_promise = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
38837
38973
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
38838
38974
|
const require_primordials_uncurry = require_uncurry();
|
|
@@ -38868,7 +39004,7 @@ var require_promise = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
38868
39004
|
}));
|
|
38869
39005
|
|
|
38870
39006
|
//#endregion
|
|
38871
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
39007
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/external/external-pack.js
|
|
38872
39008
|
/**
|
|
38873
39009
|
* Bundled from external-pack
|
|
38874
39010
|
* This is a zero-dependency bundle created by rolldown.
|
|
@@ -40155,7 +40291,8 @@ var require_external_pack = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
40155
40291
|
}
|
|
40156
40292
|
const wordLength = fastStringWidth(word);
|
|
40157
40293
|
if (options.hard && wordLength > columns) {
|
|
40158
|
-
const
|
|
40294
|
+
const remainingColumns = columns - rowLength;
|
|
40295
|
+
const breaksStartingThisLine = 1 + _p_MathFloor((wordLength - remainingColumns - 1) / columns);
|
|
40159
40296
|
if (_p_MathFloor((wordLength - 1) / columns) < breaksStartingThisLine) rows.push("");
|
|
40160
40297
|
wrapWord(rows, word, columns);
|
|
40161
40298
|
rowLength = fastStringWidth(rows.at(-1) ?? "");
|
|
@@ -41531,7 +41668,7 @@ var require_external_pack = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
41531
41668
|
}));
|
|
41532
41669
|
|
|
41533
41670
|
//#endregion
|
|
41534
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
41671
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/external/yoctocolors-cjs.js
|
|
41535
41672
|
var require_yoctocolors_cjs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
41536
41673
|
const { yoctocolorsCjs } = require_external_pack();
|
|
41537
41674
|
module.exports = yoctocolorsCjs;
|
|
@@ -41539,7 +41676,7 @@ var require_yoctocolors_cjs = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
41539
41676
|
}));
|
|
41540
41677
|
|
|
41541
41678
|
//#endregion
|
|
41542
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
41679
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/colors.js
|
|
41543
41680
|
var require_colors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
41544
41681
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
41545
41682
|
const require_runtime$3 = require_runtime$4();
|
|
@@ -41556,9 +41693,9 @@ var require_colors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
41556
41693
|
* Apply a color to text using yoctocolors. Handles both named colors and RGB
|
|
41557
41694
|
* tuples.
|
|
41558
41695
|
*/
|
|
41559
|
-
function applyColor(text, color
|
|
41696
|
+
function applyColor(text, color) {
|
|
41560
41697
|
if (typeof color === "string") {
|
|
41561
|
-
const formatter =
|
|
41698
|
+
const formatter = src_external_yoctocolors_cjs.default[color];
|
|
41562
41699
|
return formatter ? formatter(text) : text;
|
|
41563
41700
|
}
|
|
41564
41701
|
const { 0: r, 1: g, 2: b } = color;
|
|
@@ -41575,7 +41712,7 @@ var require_colors = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
41575
41712
|
}));
|
|
41576
41713
|
|
|
41577
41714
|
//#endregion
|
|
41578
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
41715
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/external/@socketregistry/is-unicode-supported.js
|
|
41579
41716
|
/**
|
|
41580
41717
|
* Bundled from @socketregistry/is-unicode-supported
|
|
41581
41718
|
* This is a zero-dependency bundle created by rolldown.
|
|
@@ -41601,7 +41738,7 @@ var require_is_unicode_supported$1 = /* @__PURE__ */ __commonJSMin(((exports, mo
|
|
|
41601
41738
|
}));
|
|
41602
41739
|
|
|
41603
41740
|
//#endregion
|
|
41604
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
41741
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/symbols-builder.js
|
|
41605
41742
|
var require_symbols_builder = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
41606
41743
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
41607
41744
|
const require_runtime$2 = require_runtime$4();
|
|
@@ -41627,18 +41764,17 @@ var require_symbols_builder = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
41627
41764
|
*/
|
|
41628
41765
|
function buildLoggerSymbols(theme) {
|
|
41629
41766
|
const supported = (0, src_external__socketregistry_is_unicode_supported.default)();
|
|
41630
|
-
const colors = require_logger_colors.getYoctocolors();
|
|
41631
41767
|
/* c8 ignore start - ASCII-fallback symbol arms only fire on
|
|
41632
41768
|
terminals without unicode support; tests run on unicode TTYs. */
|
|
41633
41769
|
return {
|
|
41634
41770
|
__proto__: null,
|
|
41635
|
-
fail: require_logger_colors.applyColor(supported ? "✖" : "×", theme.colors.error
|
|
41636
|
-
info: require_logger_colors.applyColor(supported ? "ℹ" : "i", theme.colors.info
|
|
41637
|
-
progress: require_logger_colors.applyColor(supported ? "∴" : ":.", theme.colors.step
|
|
41638
|
-
skip: require_logger_colors.applyColor(supported ? "↻" : "@", theme.colors.step
|
|
41639
|
-
step: require_logger_colors.applyColor(supported ? "→" : ">", theme.colors.step
|
|
41640
|
-
success: require_logger_colors.applyColor(supported ? "✔" : "√", theme.colors.success
|
|
41641
|
-
warn: require_logger_colors.applyColor(supported ? "⚠" : "‼", theme.colors.warning
|
|
41771
|
+
fail: require_logger_colors.applyColor(supported ? "✖" : "×", theme.colors.error),
|
|
41772
|
+
info: require_logger_colors.applyColor(supported ? "ℹ" : "i", theme.colors.info),
|
|
41773
|
+
progress: require_logger_colors.applyColor(supported ? "∴" : ":.", theme.colors.step),
|
|
41774
|
+
skip: require_logger_colors.applyColor(supported ? "↻" : "@", theme.colors.step),
|
|
41775
|
+
step: require_logger_colors.applyColor(supported ? "→" : ">", theme.colors.step),
|
|
41776
|
+
success: require_logger_colors.applyColor(supported ? "✔" : "√", theme.colors.success),
|
|
41777
|
+
warn: require_logger_colors.applyColor(supported ? "⚠" : "‼", theme.colors.warning)
|
|
41642
41778
|
};
|
|
41643
41779
|
/* c8 ignore stop */
|
|
41644
41780
|
}
|
|
@@ -41659,7 +41795,7 @@ var require_symbols_builder = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
41659
41795
|
}));
|
|
41660
41796
|
|
|
41661
41797
|
//#endregion
|
|
41662
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
41798
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/primordials/globals.js
|
|
41663
41799
|
var require_globals = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
41664
41800
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
41665
41801
|
/**
|
|
@@ -41695,7 +41831,7 @@ var require_globals = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
41695
41831
|
}));
|
|
41696
41832
|
|
|
41697
41833
|
//#endregion
|
|
41698
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
41834
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/symbols.js
|
|
41699
41835
|
var require_symbols = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
41700
41836
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
41701
41837
|
const require_runtime$1 = require_runtime$4();
|
|
@@ -41734,14 +41870,14 @@ var require_symbols = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
41734
41870
|
const stepColor = theme.colors.step;
|
|
41735
41871
|
/* c8 ignore start - ASCII-fallback symbol arms only fire on
|
|
41736
41872
|
terminals without unicode support; tests run on unicode TTYs. */
|
|
41737
|
-
target["fail"] = require_logger_colors.applyColor(supported ? "✖" : "×", errorColor
|
|
41738
|
-
target["info"] = require_logger_colors.applyColor(supported ? "ℹ" : "i", infoColor
|
|
41739
|
-
target["progress"] = require_logger_colors.applyColor(supported ? "∴" : ":.", stepColor
|
|
41740
|
-
target["reason"] = colors.dim(require_logger_colors.applyColor(supported ? "∴" : ":.", warningColor
|
|
41741
|
-
target["skip"] = require_logger_colors.applyColor(supported ? "↻" : "@", stepColor
|
|
41742
|
-
target["step"] = require_logger_colors.applyColor(supported ? "→" : ">", stepColor
|
|
41743
|
-
target["success"] = require_logger_colors.applyColor(supported ? "✔" : "√", successColor
|
|
41744
|
-
target["warn"] = require_logger_colors.applyColor(supported ? "⚠" : "‼", warningColor
|
|
41873
|
+
target["fail"] = require_logger_colors.applyColor(supported ? "✖" : "×", errorColor);
|
|
41874
|
+
target["info"] = require_logger_colors.applyColor(supported ? "ℹ" : "i", infoColor);
|
|
41875
|
+
target["progress"] = require_logger_colors.applyColor(supported ? "∴" : ":.", stepColor);
|
|
41876
|
+
target["reason"] = colors.dim(require_logger_colors.applyColor(supported ? "∴" : ":.", warningColor));
|
|
41877
|
+
target["skip"] = require_logger_colors.applyColor(supported ? "↻" : "@", stepColor);
|
|
41878
|
+
target["step"] = require_logger_colors.applyColor(supported ? "→" : ">", stepColor);
|
|
41879
|
+
target["success"] = require_logger_colors.applyColor(supported ? "✔" : "√", successColor);
|
|
41880
|
+
target["warn"] = require_logger_colors.applyColor(supported ? "⚠" : "‼", warningColor);
|
|
41745
41881
|
/* c8 ignore stop */
|
|
41746
41882
|
};
|
|
41747
41883
|
const init = () => {
|
|
@@ -41819,7 +41955,7 @@ var require_symbols = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
41819
41955
|
}));
|
|
41820
41956
|
|
|
41821
41957
|
//#endregion
|
|
41822
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
41958
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/console.js
|
|
41823
41959
|
var require_console = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
41824
41960
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
41825
41961
|
const require_runtime = require_runtime$4();
|
|
@@ -41945,7 +42081,7 @@ var require_console = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
41945
42081
|
}));
|
|
41946
42082
|
|
|
41947
42083
|
//#endregion
|
|
41948
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
42084
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/console-methods.js
|
|
41949
42085
|
var require_console_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
41950
42086
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
41951
42087
|
const require_logger_symbols = require_symbols();
|
|
@@ -42113,7 +42249,7 @@ var require_console_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42113
42249
|
}));
|
|
42114
42250
|
|
|
42115
42251
|
//#endregion
|
|
42116
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
42252
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/indentation-methods.js
|
|
42117
42253
|
var require_indentation_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
42118
42254
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
42119
42255
|
const require_primordials_math = require_math();
|
|
@@ -42233,7 +42369,7 @@ var require_indentation_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42233
42369
|
}));
|
|
42234
42370
|
|
|
42235
42371
|
//#endregion
|
|
42236
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
42372
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/options.js
|
|
42237
42373
|
var require_options = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
42238
42374
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
42239
42375
|
const require_themes_themes = require_themes();
|
|
@@ -42279,7 +42415,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42279
42415
|
}));
|
|
42280
42416
|
|
|
42281
42417
|
//#endregion
|
|
42282
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
42418
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/ansi/strip.js
|
|
42283
42419
|
var require_strip = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
42284
42420
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
42285
42421
|
const require_primordials_string = require_string();
|
|
@@ -42326,11 +42462,11 @@ var require_strip = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42326
42462
|
}));
|
|
42327
42463
|
|
|
42328
42464
|
//#endregion
|
|
42329
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
42465
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/strings/format.js
|
|
42330
42466
|
var require_format = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
42331
42467
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
42332
|
-
const require_primordials_math = require_math();
|
|
42333
42468
|
const require_primordials_string = require_string();
|
|
42469
|
+
const require_primordials_math = require_math();
|
|
42334
42470
|
const require_ansi_strip = require_strip();
|
|
42335
42471
|
/**
|
|
42336
42472
|
* @file Line formatting helpers: `applyLinePrefix`, `centerText`,
|
|
@@ -42476,7 +42612,7 @@ var require_format = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42476
42612
|
}));
|
|
42477
42613
|
|
|
42478
42614
|
//#endregion
|
|
42479
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
42615
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/strings/predicates.js
|
|
42480
42616
|
var require_predicates = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
42481
42617
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
42482
42618
|
/**
|
|
@@ -42534,7 +42670,7 @@ var require_predicates = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42534
42670
|
}));
|
|
42535
42671
|
|
|
42536
42672
|
//#endregion
|
|
42537
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
42673
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/semantic-methods.js
|
|
42538
42674
|
var require_semantic_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
42539
42675
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
42540
42676
|
const require_primordials_array = require_array();
|
|
@@ -42641,7 +42777,7 @@ var require_semantic_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42641
42777
|
}));
|
|
42642
42778
|
|
|
42643
42779
|
//#endregion
|
|
42644
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
42780
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/stream.js
|
|
42645
42781
|
var require_stream = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
42646
42782
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
42647
42783
|
/**
|
|
@@ -42682,7 +42818,7 @@ var require_stream = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42682
42818
|
}));
|
|
42683
42819
|
|
|
42684
42820
|
//#endregion
|
|
42685
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
42821
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/stream-methods.js
|
|
42686
42822
|
var require_stream_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
42687
42823
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
42688
42824
|
const require_primordials_error = require_error();
|
|
@@ -42782,7 +42918,7 @@ var require_stream_methods = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
42782
42918
|
}));
|
|
42783
42919
|
|
|
42784
42920
|
//#endregion
|
|
42785
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
42921
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/node.js
|
|
42786
42922
|
var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
42787
42923
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
42788
42924
|
const require_primordials_reflect = require_reflect();
|
|
@@ -43043,7 +43179,7 @@ var require_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
43043
43179
|
}));
|
|
43044
43180
|
|
|
43045
43181
|
//#endregion
|
|
43046
|
-
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.
|
|
43182
|
+
//#region node_modules/.pnpm/@socketsecurity+lib@6.0.9_typescript@7.0.2/node_modules/@socketsecurity/lib/dist/logger/default.js
|
|
43047
43183
|
var require_default = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
43048
43184
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
43049
43185
|
const require_logger_node = require_node();
|
|
@@ -43651,7 +43787,8 @@ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, ne
|
|
|
43651
43787
|
else {
|
|
43652
43788
|
const { callback } = optionsObj;
|
|
43653
43789
|
diffLines(oldStr, newStr, Object.assign(Object.assign({}, optionsObj), { callback: (diff) => {
|
|
43654
|
-
|
|
43790
|
+
const patch = diffLinesResultToPatch(diff);
|
|
43791
|
+
callback(patch);
|
|
43655
43792
|
} }));
|
|
43656
43793
|
}
|
|
43657
43794
|
function diffLinesResultToPatch(diff) {
|
|
@@ -43849,7 +43986,11 @@ function formatHuman(findings, ctx) {
|
|
|
43849
43986
|
else if (sample.kind === "covered") verb = `replace ${items.length}× with \`${primordial}\``;
|
|
43850
43987
|
else verb = `add \`${primordial}\` to socket-lib/src/primordials.ts (${items.length} call site${items.length === 1 ? "" : "s"})`;
|
|
43851
43988
|
lines.push(verb);
|
|
43852
|
-
|
|
43989
|
+
const topItems = items.slice(0, 3);
|
|
43990
|
+
for (let i = 0, { length } = topItems; i < length; i += 1) {
|
|
43991
|
+
const item = topItems[i];
|
|
43992
|
+
lines.push(` ${item.file}:${item.line} ${item.pattern}`);
|
|
43993
|
+
}
|
|
43853
43994
|
if (items.length > 3) lines.push(` … and ${items.length - 3} more`);
|
|
43854
43995
|
lines.push("");
|
|
43855
43996
|
}
|
|
@@ -43975,9 +44116,9 @@ function reportMod(result, json, applied, showDiff = false) {
|
|
|
43975
44116
|
* 1. Explicit `--surface <path>` flag — overrides everything else. Use this to
|
|
43976
44117
|
* point at Node.js's `lib/internal/per_context/primordials.js`, a vendored
|
|
43977
44118
|
* copy, or any other primordials file.
|
|
43978
|
-
* 2. From a sibling socket-lib checkout (
|
|
43979
|
-
* the split, with a
|
|
43980
|
-
*
|
|
44119
|
+
* 2. From a sibling socket-lib checkout (its `src/primordials/` directory after
|
|
44120
|
+
* the split, with a `src/primordials.ts` legacy fallback). Used during
|
|
44121
|
+
* fleet development — picks up unreleased exports.
|
|
43981
44122
|
* 3. From the installed `@socketsecurity/lib/dist/primordials/` (or legacy
|
|
43982
44123
|
* `dist/primordials.js`). Used when running the audit on a target that has
|
|
43983
44124
|
* lib as a dep. Either way, we parse out the `export const Foo` symbol
|
|
@@ -44161,7 +44302,9 @@ function parseExports(sourcePath) {
|
|
|
44161
44302
|
const exportToLeaf = /* @__PURE__ */ new Map();
|
|
44162
44303
|
if (stat.isDirectory()) {
|
|
44163
44304
|
const parts = [];
|
|
44164
|
-
|
|
44305
|
+
const names = (0, node_fs.readdirSync)(sourcePath).toSorted();
|
|
44306
|
+
for (let i = 0, { length } = names; i < length; i += 1) {
|
|
44307
|
+
const name = names[i];
|
|
44165
44308
|
if (!(name.endsWith(".ts") || name.endsWith(".mts") || name.endsWith(".cts") || name.endsWith(".js") || name.endsWith(".d.ts"))) continue;
|
|
44166
44309
|
const full = node_path.default.join(sourcePath, name);
|
|
44167
44310
|
if (!(0, node_fs.statSync)(full).isFile()) continue;
|
|
@@ -44179,9 +44322,12 @@ function parseExports(sourcePath) {
|
|
|
44179
44322
|
const nullable = /* @__PURE__ */ new Set();
|
|
44180
44323
|
for (const m of src.matchAll(/^export const ([A-Z][a-zA-Z0-9]+)/gm)) exports.add(m[1]);
|
|
44181
44324
|
for (const m of src.matchAll(/^export function ([a-z][a-zA-Z0-9]+)/gm)) exports.add(m[1]);
|
|
44182
|
-
for (const m of src.matchAll(/^export\s*\{\s*([\s\S]+?)\s*\}/gm))
|
|
44183
|
-
const
|
|
44184
|
-
|
|
44325
|
+
for (const m of src.matchAll(/^export\s*\{\s*([\s\S]+?)\s*\}/gm)) {
|
|
44326
|
+
const idents = m[1].split(",");
|
|
44327
|
+
for (let i = 0, { length } = idents; i < length; i += 1) {
|
|
44328
|
+
const cleaned = idents[i].trim().replace(/^([A-Z][a-zA-Z0-9]+).*$/, "$1");
|
|
44329
|
+
if (/^[A-Z][a-zA-Z0-9]+$/.test(cleaned)) exports.add(cleaned);
|
|
44330
|
+
}
|
|
44185
44331
|
}
|
|
44186
44332
|
for (const m of src.matchAll(/\bprimordials\.([A-Z][a-zA-Z0-9]+)\s*=/g)) exports.add(m[1]);
|
|
44187
44333
|
for (const m of src.matchAll(/^export const ([A-Z][a-zA-Z0-9]+)\s*:\s*([\s\S]+?)\s*=\s/gm)) if (/\|\s*undefined\b/.test(m[2])) nullable.add(m[1]);
|