@socketsecurity/lib 5.18.2 → 5.19.1
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 +57 -0
- package/README.md +6 -5
- package/dist/abort.d.ts +3 -0
- package/dist/abort.js +1 -0
- package/dist/agent.d.ts +66 -49
- package/dist/agent.js +51 -50
- package/dist/ansi.d.ts +2 -5
- package/dist/ansi.js +3 -2
- package/dist/archives.d.ts +25 -21
- package/dist/archives.js +35 -34
- package/dist/argv/flags.d.ts +100 -91
- package/dist/argv/flags.js +88 -87
- package/dist/argv/parse.d.ts +30 -40
- package/dist/argv/parse.js +33 -32
- package/dist/arrays.d.ts +4 -8
- package/dist/arrays.js +1 -0
- package/dist/bin.d.ts +7 -5
- package/dist/bin.js +52 -29
- package/dist/cacache.d.ts +13 -12
- package/dist/cacache.js +9 -8
- package/dist/cache-with-ttl.d.ts +53 -35
- package/dist/cache-with-ttl.js +1 -0
- package/dist/colors.d.ts +5 -5
- package/dist/colors.js +1 -0
- package/dist/constants/agents.d.ts +5 -9
- package/dist/constants/agents.js +3 -2
- package/dist/constants/core.d.ts +5 -10
- package/dist/constants/core.js +2 -1
- package/dist/constants/encoding.d.ts +3 -3
- package/dist/constants/encoding.js +1 -0
- package/dist/constants/github.d.ts +3 -3
- package/dist/constants/github.js +1 -0
- package/dist/constants/licenses.d.ts +9 -2
- package/dist/constants/licenses.js +1 -0
- package/dist/constants/lifecycle-script-names.js +1 -0
- package/dist/constants/maintained-node-versions.d.ts +3 -0
- package/dist/constants/maintained-node-versions.js +1 -0
- package/dist/constants/node.d.ts +125 -16
- package/dist/constants/node.js +74 -73
- package/dist/constants/package-default-node-range.d.ts +3 -1
- package/dist/constants/package-default-node-range.js +2 -1
- package/dist/constants/package-default-socket-categories.d.ts +0 -1
- package/dist/constants/package-default-socket-categories.js +1 -0
- package/dist/constants/packages.d.ts +12 -17
- package/dist/constants/packages.js +31 -16
- package/dist/constants/platform.d.ts +1 -2
- package/dist/constants/platform.js +2 -1
- package/dist/constants/process.d.ts +18 -0
- package/dist/constants/process.js +1 -0
- package/dist/constants/socket.d.ts +4 -10
- package/dist/constants/socket.js +2 -1
- package/dist/constants/testing.d.ts +3 -3
- package/dist/constants/testing.js +1 -0
- package/dist/constants/time.d.ts +3 -4
- package/dist/constants/time.js +1 -0
- package/dist/constants/typescript.d.ts +10 -3
- package/dist/constants/typescript.js +5 -4
- package/dist/cover/code.d.ts +3 -0
- package/dist/cover/code.js +12 -12
- package/dist/cover/formatters.d.ts +12 -9
- package/dist/cover/formatters.js +19 -18
- package/dist/cover/type.d.ts +3 -0
- package/dist/cover/type.js +1 -0
- package/dist/cover/types.js +1 -0
- package/dist/debug.d.ts +32 -47
- package/dist/debug.js +97 -96
- package/dist/dlx/arborist.d.ts +134 -0
- package/dist/dlx/arborist.js +177 -0
- package/dist/dlx/binary.d.ts +25 -9
- package/dist/dlx/binary.js +34 -12
- package/dist/dlx/cache.d.ts +1 -0
- package/dist/dlx/cache.js +2 -1
- package/dist/dlx/detect.d.ts +15 -0
- package/dist/dlx/detect.js +28 -20
- package/dist/dlx/dir.d.ts +1 -11
- package/dist/dlx/dir.js +2 -12
- package/dist/dlx/integrity.d.ts +86 -0
- package/dist/dlx/integrity.js +112 -0
- package/dist/dlx/lockfile.d.ts +115 -0
- package/dist/dlx/lockfile.js +139 -0
- package/dist/dlx/manifest.d.ts +26 -1
- package/dist/dlx/manifest.js +9 -6
- package/dist/dlx/package.d.ts +58 -3
- package/dist/dlx/package.js +101 -74
- package/dist/dlx/packages.d.ts +1 -11
- package/dist/dlx/packages.js +3 -14
- package/dist/dlx/paths.d.ts +1 -0
- package/dist/dlx/paths.js +2 -1
- package/dist/effects/pulse-frames.js +1 -0
- package/dist/effects/text-shimmer.d.ts +13 -2
- package/dist/effects/text-shimmer.js +50 -46
- package/dist/effects/types.js +1 -0
- package/dist/effects/ultra.js +1 -0
- package/dist/env/ci.d.ts +6 -1
- package/dist/env/ci.js +1 -0
- package/dist/env/debug.d.ts +5 -1
- package/dist/env/debug.js +1 -0
- package/dist/env/github.d.ts +19 -23
- package/dist/env/github.js +5 -4
- package/dist/env/helpers.d.ts +21 -9
- package/dist/env/helpers.js +5 -11
- package/dist/env/home.d.ts +17 -4
- package/dist/env/home.js +2 -1
- package/dist/env/locale.d.ts +4 -3
- package/dist/env/locale.js +1 -0
- package/dist/env/node-auth-token.d.ts +5 -1
- package/dist/env/node-auth-token.js +1 -0
- package/dist/env/node-env.d.ts +5 -1
- package/dist/env/node-env.js +1 -0
- package/dist/env/npm.d.ts +4 -5
- package/dist/env/npm.js +1 -0
- package/dist/env/package-manager.d.ts +4 -3
- package/dist/env/package-manager.js +2 -1
- package/dist/env/path.d.ts +5 -1
- package/dist/env/path.js +1 -0
- package/dist/env/pre-commit.d.ts +5 -1
- package/dist/env/pre-commit.js +1 -0
- package/dist/env/rewire.d.ts +10 -0
- package/dist/env/rewire.js +7 -5
- package/dist/env/shell.d.ts +5 -1
- package/dist/env/shell.js +1 -0
- package/dist/env/socket-cli-shadow.d.ts +4 -5
- package/dist/env/socket-cli-shadow.js +1 -0
- package/dist/env/socket-cli.d.ts +4 -14
- package/dist/env/socket-cli.js +1 -0
- package/dist/env/socket.d.ts +6 -18
- package/dist/env/socket.js +4 -3
- package/dist/env/temp-dir.d.ts +4 -3
- package/dist/env/temp-dir.js +1 -0
- package/dist/env/term.d.ts +5 -1
- package/dist/env/term.js +1 -0
- package/dist/env/test.d.ts +4 -3
- package/dist/env/test.js +1 -0
- package/dist/env/windows.d.ts +4 -4
- package/dist/env/windows.js +1 -0
- package/dist/env/xdg.d.ts +4 -3
- package/dist/env/xdg.js +1 -0
- package/dist/env.d.ts +83 -23
- package/dist/env.js +112 -80
- package/dist/errors.js +1 -0
- package/dist/external/@socketregistry/packageurl-js.js +2 -2
- package/dist/external/external-pack.js +1562 -1673
- package/dist/external/npm-pack.js +5 -1
- package/dist/fs.d.ts +92 -113
- package/dist/fs.js +35 -35
- package/dist/git.d.ts +170 -164
- package/dist/git.js +113 -87
- package/dist/github.d.ts +249 -227
- package/dist/github.js +82 -81
- package/dist/globs.d.ts +31 -17
- package/dist/globs.js +51 -58
- package/dist/http-request.d.ts +99 -99
- package/dist/http-request.js +182 -156
- package/dist/ipc-cli.d.ts +28 -0
- package/dist/{utils/get-ipc.js → ipc-cli.js} +4 -3
- package/dist/ipc.d.ts +9 -299
- package/dist/ipc.js +18 -204
- package/dist/json/edit.d.ts +3 -1
- package/dist/json/edit.js +30 -30
- package/dist/json/format.d.ts +36 -36
- package/dist/json/format.js +22 -21
- package/dist/json/parse.d.ts +4 -2
- package/dist/json/parse.js +1 -0
- package/dist/json/types.js +1 -0
- package/dist/{links/index.d.ts → links.d.ts} +6 -2
- package/dist/{links/index.js → links.js} +5 -4
- package/dist/logger.d.ts +4 -6
- package/dist/logger.js +61 -53
- package/dist/memoization.d.ts +52 -49
- package/dist/memoization.js +55 -33
- package/dist/objects.d.ts +25 -44
- package/dist/objects.js +2 -1
- package/dist/package-extensions.d.ts +6 -0
- package/dist/package-extensions.js +2 -1
- package/dist/packages/edit.d.ts +3 -5
- package/dist/packages/edit.js +4 -3
- package/dist/packages/exports.d.ts +11 -14
- package/dist/packages/exports.js +11 -10
- package/dist/packages/isolation.d.ts +4 -0
- package/dist/packages/isolation.js +20 -19
- package/dist/packages/licenses.d.ts +3 -10
- package/dist/packages/licenses.js +2 -1
- package/dist/packages/manifest.d.ts +3 -3
- package/dist/packages/manifest.js +1 -0
- package/dist/packages/normalize.d.ts +3 -4
- package/dist/packages/normalize.js +1 -0
- package/dist/packages/operations.d.ts +3 -10
- package/dist/packages/operations.js +1 -0
- package/dist/packages/provenance.d.ts +10 -8
- package/dist/packages/provenance.js +55 -54
- package/dist/packages/specs.d.ts +3 -5
- package/dist/packages/specs.js +1 -0
- package/dist/packages/validation.d.ts +3 -3
- package/dist/packages/validation.js +1 -0
- package/dist/packages.d.ts +2 -17
- package/dist/packages.js +2 -1
- package/dist/paths/dirnames.d.ts +0 -2
- package/dist/paths/dirnames.js +1 -0
- package/dist/paths/exts.d.ts +0 -1
- package/dist/paths/exts.js +1 -0
- package/dist/paths/filenames.d.ts +0 -1
- package/dist/paths/filenames.js +1 -0
- package/dist/paths/globs.d.ts +0 -1
- package/dist/paths/globs.js +1 -0
- package/dist/paths/normalize.d.ts +115 -123
- package/dist/paths/normalize.js +128 -127
- package/dist/paths/packages.d.ts +3 -2
- package/dist/paths/packages.js +2 -1
- package/dist/paths/rewire.d.ts +9 -0
- package/dist/paths/rewire.js +5 -3
- package/dist/paths/socket.d.ts +37 -23
- package/dist/paths/socket.js +26 -25
- package/dist/performance.d.ts +87 -84
- package/dist/performance.js +97 -96
- package/dist/process-lock.d.ts +41 -1
- package/dist/process-lock.js +24 -17
- package/dist/promise-queue.d.ts +6 -0
- package/dist/promise-queue.js +1 -0
- package/dist/promises.d.ts +40 -55
- package/dist/promises.js +12 -11
- package/dist/regexps.d.ts +0 -5
- package/dist/regexps.js +1 -0
- package/dist/releases/github.d.ts +59 -63
- package/dist/releases/github.js +95 -100
- package/dist/releases/socket-btm.d.ts +9 -2
- package/dist/releases/socket-btm.js +32 -25
- package/dist/sea.d.ts +5 -0
- package/dist/sea.js +1 -0
- package/dist/shadow.d.ts +4 -0
- package/dist/shadow.js +1 -0
- package/dist/signal-exit.d.ts +7 -7
- package/dist/signal-exit.js +46 -45
- package/dist/sorts.d.ts +5 -7
- package/dist/sorts.js +11 -10
- package/dist/spawn.d.ts +96 -77
- package/dist/spawn.js +39 -38
- package/dist/spinner.d.ts +21 -22
- package/dist/spinner.js +15 -11
- package/dist/ssri.d.ts +31 -36
- package/dist/ssri.js +15 -14
- package/dist/stdio/_stream.d.ts +31 -0
- package/dist/stdio/_stream.js +57 -0
- package/dist/stdio/clear.d.ts +38 -15
- package/dist/stdio/clear.js +5 -4
- package/dist/stdio/divider.d.ts +40 -36
- package/dist/stdio/divider.js +10 -9
- package/dist/stdio/footer.d.ts +20 -0
- package/dist/stdio/footer.js +12 -2
- package/dist/stdio/header.d.ts +4 -16
- package/dist/stdio/header.js +1 -9
- package/dist/stdio/progress.d.ts +4 -0
- package/dist/stdio/progress.js +13 -8
- package/dist/stdio/prompts.d.ts +24 -23
- package/dist/stdio/prompts.js +10 -9
- package/dist/stdio/stderr.d.ts +51 -39
- package/dist/stdio/stderr.js +19 -22
- package/dist/stdio/stdout.d.ts +54 -52
- package/dist/stdio/stdout.js +35 -33
- package/dist/streams.d.ts +4 -3
- package/dist/streams.js +1 -0
- package/dist/strings.d.ts +31 -85
- package/dist/strings.js +5 -49
- package/dist/suppress-warnings.d.ts +32 -15
- package/dist/suppress-warnings.js +14 -13
- package/dist/tables.d.ts +30 -26
- package/dist/tables.js +24 -23
- package/dist/temporary-executor.d.ts +4 -0
- package/dist/temporary-executor.js +1 -0
- package/dist/themes/context.d.ts +30 -26
- package/dist/themes/context.js +19 -18
- package/dist/themes/index.d.ts +0 -4
- package/dist/themes/index.js +1 -0
- package/dist/themes/themes.d.ts +1 -1
- package/dist/themes/themes.js +1 -0
- package/dist/themes/types.js +1 -0
- package/dist/themes/utils.d.ts +46 -43
- package/dist/themes/utils.js +45 -44
- package/dist/types.d.ts +48 -52
- package/dist/types.js +35 -35
- package/dist/url.d.ts +48 -53
- package/dist/url.js +38 -37
- package/dist/validation/json-parser.d.ts +19 -190
- package/dist/validation/json-parser.js +5 -69
- package/dist/validation/types.d.ts +9 -33
- package/dist/validation/types.js +1 -0
- package/dist/versions.d.ts +1 -0
- package/dist/versions.js +2 -1
- package/dist/words.d.ts +3 -6
- package/dist/words.js +1 -0
- package/dist/zod.js +1 -0
- package/package.json +40 -54
- package/dist/functions.d.ts +0 -57
- package/dist/functions.js +0 -70
- package/dist/stdio/mask.d.ts +0 -151
- package/dist/stdio/mask.js +0 -224
- package/dist/utils/get-ipc.d.ts +0 -15
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socketsecurity/lib",
|
|
3
|
-
"version": "5.
|
|
4
|
-
"packageManager": "pnpm@11.0.0-rc.
|
|
3
|
+
"version": "5.19.1",
|
|
4
|
+
"packageManager": "pnpm@11.0.0-rc.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Core utilities and infrastructure for Socket.dev security tools",
|
|
7
7
|
"keywords": [
|
|
@@ -223,6 +223,10 @@
|
|
|
223
223
|
"types": "./dist/debug.d.ts",
|
|
224
224
|
"default": "./dist/debug.js"
|
|
225
225
|
},
|
|
226
|
+
"./dlx/arborist": {
|
|
227
|
+
"types": "./dist/dlx/arborist.d.ts",
|
|
228
|
+
"default": "./dist/dlx/arborist.js"
|
|
229
|
+
},
|
|
226
230
|
"./dlx/binary": {
|
|
227
231
|
"types": "./dist/dlx/binary.d.ts",
|
|
228
232
|
"default": "./dist/dlx/binary.js"
|
|
@@ -239,6 +243,14 @@
|
|
|
239
243
|
"types": "./dist/dlx/dir.d.ts",
|
|
240
244
|
"default": "./dist/dlx/dir.js"
|
|
241
245
|
},
|
|
246
|
+
"./dlx/integrity": {
|
|
247
|
+
"types": "./dist/dlx/integrity.d.ts",
|
|
248
|
+
"default": "./dist/dlx/integrity.js"
|
|
249
|
+
},
|
|
250
|
+
"./dlx/lockfile": {
|
|
251
|
+
"types": "./dist/dlx/lockfile.d.ts",
|
|
252
|
+
"default": "./dist/dlx/lockfile.js"
|
|
253
|
+
},
|
|
242
254
|
"./dlx/manifest": {
|
|
243
255
|
"types": "./dist/dlx/manifest.d.ts",
|
|
244
256
|
"default": "./dist/dlx/manifest.js"
|
|
@@ -371,10 +383,6 @@
|
|
|
371
383
|
"types": "./dist/fs.d.ts",
|
|
372
384
|
"default": "./dist/fs.js"
|
|
373
385
|
},
|
|
374
|
-
"./functions": {
|
|
375
|
-
"types": "./dist/functions.d.ts",
|
|
376
|
-
"default": "./dist/functions.js"
|
|
377
|
-
},
|
|
378
386
|
"./git": {
|
|
379
387
|
"types": "./dist/git.d.ts",
|
|
380
388
|
"default": "./dist/git.js"
|
|
@@ -395,6 +403,10 @@
|
|
|
395
403
|
"types": "./dist/ipc.d.ts",
|
|
396
404
|
"default": "./dist/ipc.js"
|
|
397
405
|
},
|
|
406
|
+
"./ipc-cli": {
|
|
407
|
+
"types": "./dist/ipc-cli.d.ts",
|
|
408
|
+
"default": "./dist/ipc-cli.js"
|
|
409
|
+
},
|
|
398
410
|
"./json/edit": {
|
|
399
411
|
"types": "./dist/json/edit.d.ts",
|
|
400
412
|
"default": "./dist/json/edit.js"
|
|
@@ -412,12 +424,8 @@
|
|
|
412
424
|
"default": "./dist/json/types.js"
|
|
413
425
|
},
|
|
414
426
|
"./links": {
|
|
415
|
-
"types": "./dist/links
|
|
416
|
-
"default": "./dist/links
|
|
417
|
-
},
|
|
418
|
-
"./links/index": {
|
|
419
|
-
"types": "./dist/links/index.d.ts",
|
|
420
|
-
"default": "./dist/links/index.js"
|
|
427
|
+
"types": "./dist/links.d.ts",
|
|
428
|
+
"default": "./dist/links.js"
|
|
421
429
|
},
|
|
422
430
|
"./logger": {
|
|
423
431
|
"types": "./dist/logger.d.ts",
|
|
@@ -583,10 +591,6 @@
|
|
|
583
591
|
"types": "./dist/stdio/header.d.ts",
|
|
584
592
|
"default": "./dist/stdio/header.js"
|
|
585
593
|
},
|
|
586
|
-
"./stdio/mask": {
|
|
587
|
-
"types": "./dist/stdio/mask.d.ts",
|
|
588
|
-
"default": "./dist/stdio/mask.js"
|
|
589
|
-
},
|
|
590
594
|
"./stdio/progress": {
|
|
591
595
|
"types": "./dist/stdio/progress.d.ts",
|
|
592
596
|
"default": "./dist/stdio/progress.js"
|
|
@@ -631,10 +635,6 @@
|
|
|
631
635
|
"types": "./dist/themes/context.d.ts",
|
|
632
636
|
"default": "./dist/themes/context.js"
|
|
633
637
|
},
|
|
634
|
-
"./themes/index": {
|
|
635
|
-
"types": "./dist/themes/index.d.ts",
|
|
636
|
-
"default": "./dist/themes/index.js"
|
|
637
|
-
},
|
|
638
638
|
"./themes/themes": {
|
|
639
639
|
"types": "./dist/themes/themes.d.ts",
|
|
640
640
|
"default": "./dist/themes/themes.js"
|
|
@@ -655,10 +655,6 @@
|
|
|
655
655
|
"types": "./dist/url.d.ts",
|
|
656
656
|
"default": "./dist/url.js"
|
|
657
657
|
},
|
|
658
|
-
"./utils/get-ipc": {
|
|
659
|
-
"types": "./dist/utils/get-ipc.d.ts",
|
|
660
|
-
"default": "./dist/utils/get-ipc.js"
|
|
661
|
-
},
|
|
662
658
|
"./validation/json-parser": {
|
|
663
659
|
"types": "./dist/validation/json-parser.d.ts",
|
|
664
660
|
"default": "./dist/validation/json-parser.js"
|
|
@@ -696,22 +692,18 @@
|
|
|
696
692
|
},
|
|
697
693
|
"sideEffects": false,
|
|
698
694
|
"scripts": {
|
|
699
|
-
"build": "node scripts/build/main.
|
|
700
|
-
"check": "node scripts/check.
|
|
701
|
-
"clean": "node scripts/build/clean.
|
|
702
|
-
"cover": "node scripts/test/cover.
|
|
703
|
-
"dev": "node scripts/build/main.
|
|
704
|
-
"fix": "node scripts/fix.
|
|
705
|
-
"
|
|
706
|
-
"format:check": "oxfmt --check",
|
|
707
|
-
"lint": "node scripts/lint.mjs",
|
|
708
|
-
"lint:oxlint": "oxlint .",
|
|
709
|
-
"lint:oxfmt": "oxfmt --check .",
|
|
695
|
+
"build": "node scripts/build/main.mts",
|
|
696
|
+
"check": "node scripts/check.mts",
|
|
697
|
+
"clean": "node scripts/build/clean.mts",
|
|
698
|
+
"cover": "node scripts/test/cover.mts",
|
|
699
|
+
"dev": "node scripts/build/main.mts --watch",
|
|
700
|
+
"fix": "node scripts/fix.mts",
|
|
701
|
+
"lint": "node scripts/lint.mts",
|
|
710
702
|
"security": "agentshield scan && { command -v zizmor >/dev/null && zizmor .github/ || echo 'zizmor not installed — run pnpm run setup to install'; }",
|
|
711
703
|
"prepare": "husky",
|
|
712
704
|
"prepublishOnly": "pnpm run build",
|
|
713
|
-
"test": "node scripts/test/main.
|
|
714
|
-
"update": "node scripts/update.
|
|
705
|
+
"test": "node scripts/test/main.mts",
|
|
706
|
+
"update": "node scripts/update.mts"
|
|
715
707
|
},
|
|
716
708
|
"devDependencies": {
|
|
717
709
|
"@anthropic-ai/claude-code": "2.1.92",
|
|
@@ -719,34 +711,30 @@
|
|
|
719
711
|
"@babel/parser": "7.28.4",
|
|
720
712
|
"@babel/traverse": "7.28.4",
|
|
721
713
|
"@babel/types": "7.28.4",
|
|
722
|
-
"
|
|
723
|
-
"@
|
|
724
|
-
"@inquirer/
|
|
725
|
-
"@inquirer/
|
|
726
|
-
"@inquirer/
|
|
727
|
-
"@inquirer/
|
|
728
|
-
"@inquirer/search": "3.1.1",
|
|
729
|
-
"@inquirer/select": "4.3.2",
|
|
714
|
+
"@inquirer/checkbox": "5.1.3",
|
|
715
|
+
"@inquirer/confirm": "6.0.11",
|
|
716
|
+
"@inquirer/input": "5.0.11",
|
|
717
|
+
"@inquirer/password": "5.0.11",
|
|
718
|
+
"@inquirer/search": "4.1.7",
|
|
719
|
+
"@inquirer/select": "5.1.3",
|
|
730
720
|
"@npmcli/arborist": "9.1.4",
|
|
731
721
|
"@npmcli/package-json": "7.0.0",
|
|
732
722
|
"@npmcli/promise-spawn": "8.0.3",
|
|
733
723
|
"@socketregistry/is-unicode-supported": "1.0.5",
|
|
734
|
-
"@socketregistry/packageurl-js": "1.4.
|
|
724
|
+
"@socketregistry/packageurl-js": "1.4.2",
|
|
735
725
|
"@socketregistry/yocto-spinner": "1.0.25",
|
|
736
|
-
"@socketsecurity/lib-stable": "npm:@socketsecurity/lib@5.
|
|
726
|
+
"@socketsecurity/lib-stable": "npm:@socketsecurity/lib@5.19.0",
|
|
737
727
|
"@types/node": "24.9.2",
|
|
738
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
728
|
+
"@typescript/native-preview": "7.0.0-dev.20260415.1",
|
|
739
729
|
"@vitest/coverage-v8": "4.0.3",
|
|
740
730
|
"@vitest/ui": "4.0.3",
|
|
741
|
-
"@yarnpkg/core": "4.5.0",
|
|
742
731
|
"@yarnpkg/extensions": "2.0.6",
|
|
743
732
|
"adm-zip": "0.5.16",
|
|
744
733
|
"cacache": "20.0.1",
|
|
745
734
|
"debug": "4.4.3",
|
|
746
735
|
"del": "8.0.1",
|
|
747
|
-
"
|
|
736
|
+
"ecc-agentshield": "1.4.0",
|
|
748
737
|
"esbuild": "0.25.11",
|
|
749
|
-
"eslint-plugin-sort-destructure-keys": "2.0.0",
|
|
750
738
|
"fast-glob": "3.3.3",
|
|
751
739
|
"fast-sort": "3.4.1",
|
|
752
740
|
"get-east-asian-width": "1.3.0",
|
|
@@ -761,7 +749,7 @@
|
|
|
761
749
|
"nock": "14.0.10",
|
|
762
750
|
"normalize-package-data": "8.0.0",
|
|
763
751
|
"npm-package-arg": "13.0.0",
|
|
764
|
-
"oxfmt": "
|
|
752
|
+
"oxfmt": "0.37.0",
|
|
765
753
|
"oxlint": "1.53.0",
|
|
766
754
|
"p-map": "7.0.4",
|
|
767
755
|
"pacote": "21.5.0",
|
|
@@ -776,11 +764,9 @@
|
|
|
776
764
|
"tar-fs": "3.1.2",
|
|
777
765
|
"tar-stream": "3.1.8",
|
|
778
766
|
"taze": "19.9.2",
|
|
779
|
-
"trash": "10.0.0",
|
|
780
767
|
"type-coverage": "2.29.7",
|
|
781
768
|
"typescript": "5.9.2",
|
|
782
769
|
"validate-npm-package-name": "6.0.2",
|
|
783
|
-
"vite-tsconfig-paths": "5.1.4",
|
|
784
770
|
"vitest": "4.0.3",
|
|
785
771
|
"which": "5.0.0",
|
|
786
772
|
"yargs-parser": "22.0.0",
|
package/dist/functions.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Common function utilities for control flow and caching.
|
|
3
|
-
* Provides noop, once, and other foundational function helpers.
|
|
4
|
-
*/
|
|
5
|
-
// Type definitions
|
|
6
|
-
export type AsyncFunction<TArgs extends unknown[], TResult> = (...args: TArgs) => Promise<TResult>;
|
|
7
|
-
export type AnyFunction = (...args: unknown[]) => unknown;
|
|
8
|
-
/**
|
|
9
|
-
* A no-op function that does nothing.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```typescript
|
|
13
|
-
* const callback = noop
|
|
14
|
-
* callback() // does nothing
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
18
|
-
export declare function noop(): void;
|
|
19
|
-
/**
|
|
20
|
-
* Create a function that only executes once.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```typescript
|
|
24
|
-
* const init = once(() => Math.random())
|
|
25
|
-
* init() // 0.456 (random value)
|
|
26
|
-
* init() // 0.456 (same value, not recalculated)
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
30
|
-
export declare function once<T extends AnyFunction>(fn: T): T;
|
|
31
|
-
/**
|
|
32
|
-
* Wrap an async function to silently catch and ignore errors.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* const safeFetch = silentWrapAsync(async (url: string) => {
|
|
37
|
-
* const res = await fetch(url)
|
|
38
|
-
* return res.json()
|
|
39
|
-
* })
|
|
40
|
-
* await safeFetch('https://example.com') // result or undefined on error
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
44
|
-
export declare function silentWrapAsync<TArgs extends unknown[], TResult>(fn: AsyncFunction<TArgs, TResult>): (...args: TArgs) => Promise<TResult | undefined>;
|
|
45
|
-
/**
|
|
46
|
-
* Execute a function with tail call optimization via trampoline.
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```typescript
|
|
50
|
-
* const factorial = trampoline((n: number, acc = 1): any =>
|
|
51
|
-
* n <= 1 ? acc : () => factorial(n - 1, n * acc)
|
|
52
|
-
* )
|
|
53
|
-
* factorial(5) // 120
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
/*@__NO_SIDE_EFFECTS__*/
|
|
57
|
-
export declare function trampoline<T extends AnyFunction>(fn: T): T;
|
package/dist/functions.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* Socket Lib - Built with esbuild */
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
var functions_exports = {};
|
|
21
|
-
__export(functions_exports, {
|
|
22
|
-
noop: () => noop,
|
|
23
|
-
once: () => once,
|
|
24
|
-
silentWrapAsync: () => silentWrapAsync,
|
|
25
|
-
trampoline: () => trampoline
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(functions_exports);
|
|
28
|
-
// @__NO_SIDE_EFFECTS__
|
|
29
|
-
function noop() {
|
|
30
|
-
}
|
|
31
|
-
// @__NO_SIDE_EFFECTS__
|
|
32
|
-
function once(fn) {
|
|
33
|
-
let called = false;
|
|
34
|
-
let result;
|
|
35
|
-
return function(...args) {
|
|
36
|
-
if (!called) {
|
|
37
|
-
called = true;
|
|
38
|
-
result = fn.apply(this, args);
|
|
39
|
-
}
|
|
40
|
-
return result;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
// @__NO_SIDE_EFFECTS__
|
|
44
|
-
function silentWrapAsync(fn) {
|
|
45
|
-
return async (...args) => {
|
|
46
|
-
try {
|
|
47
|
-
const result = await fn(...args);
|
|
48
|
-
return result === null ? void 0 : result;
|
|
49
|
-
} catch {
|
|
50
|
-
}
|
|
51
|
-
return void 0;
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
// @__NO_SIDE_EFFECTS__
|
|
55
|
-
function trampoline(fn) {
|
|
56
|
-
return function(...args) {
|
|
57
|
-
let result = fn.apply(this, args);
|
|
58
|
-
while (typeof result === "function") {
|
|
59
|
-
result = result();
|
|
60
|
-
}
|
|
61
|
-
return result;
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
65
|
-
0 && (module.exports = {
|
|
66
|
-
noop,
|
|
67
|
-
once,
|
|
68
|
-
silentWrapAsync,
|
|
69
|
-
trampoline
|
|
70
|
-
});
|
package/dist/stdio/mask.d.ts
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import type { ChildProcess, SpawnOptions } from 'child_process';
|
|
2
|
-
export interface OutputMaskOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Current working directory for spawned process.
|
|
5
|
-
* @default process.cwd()
|
|
6
|
-
*/
|
|
7
|
-
cwd?: string | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* Environment variables for spawned process.
|
|
10
|
-
* @default process.env
|
|
11
|
-
*/
|
|
12
|
-
env?: NodeJS.ProcessEnv | undefined;
|
|
13
|
-
/**
|
|
14
|
-
* Filter output before displaying or buffering.
|
|
15
|
-
* Return `false` to skip the line, `true` to include it.
|
|
16
|
-
*
|
|
17
|
-
* Useful for filtering non-fatal warnings or noise from test runners.
|
|
18
|
-
* The filter runs on every chunk of output before display/buffering.
|
|
19
|
-
*
|
|
20
|
-
* @param text - The output text chunk (may include ANSI codes)
|
|
21
|
-
* @param stream - Whether this came from 'stdout' or 'stderr'
|
|
22
|
-
* @returns `true` to include this output, `false` to skip it
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* filterOutput: (text, stream) => {
|
|
27
|
-
* // Skip vitest worker termination errors
|
|
28
|
-
* if (text.includes('Terminating worker thread')) return false
|
|
29
|
-
* return true
|
|
30
|
-
* }
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
filterOutput?: ((text: string, stream: 'stdout' | 'stderr') => boolean) | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* Progress message to display in spinner.
|
|
36
|
-
* @default 'Running…'
|
|
37
|
-
*/
|
|
38
|
-
message?: string | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* Override the exit code based on captured output.
|
|
41
|
-
*
|
|
42
|
-
* Useful for handling non-fatal errors that shouldn't fail the build.
|
|
43
|
-
* Called after the process exits with the original code and all captured output.
|
|
44
|
-
* Return a number to override the exit code, or `undefined` to keep original.
|
|
45
|
-
*
|
|
46
|
-
* @param code - Original exit code from the process
|
|
47
|
-
* @param stdout - All captured stdout (even filtered lines are captured)
|
|
48
|
-
* @param stderr - All captured stderr (even filtered lines are captured)
|
|
49
|
-
* @returns New exit code, or `undefined` to keep original
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```ts
|
|
53
|
-
* overrideExitCode: (code, stdout, stderr) => {
|
|
54
|
-
* // If only worker termination errors, treat as success
|
|
55
|
-
* const output = stdout + stderr
|
|
56
|
-
* const hasWorkerError = output.includes('Terminating worker thread')
|
|
57
|
-
* const hasRealFailure = output.includes('FAIL')
|
|
58
|
-
* if (code !== 0 && hasWorkerError && !hasRealFailure) {
|
|
59
|
-
* return 0 // Override to success
|
|
60
|
-
* }
|
|
61
|
-
* return undefined // Keep original
|
|
62
|
-
* }
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
overrideExitCode?: ((code: number, stdout: string, stderr: string) => number | undefined) | undefined;
|
|
66
|
-
/**
|
|
67
|
-
* Start with output visible instead of masked.
|
|
68
|
-
* When `true`, output shows immediately without needing ctrl+o.
|
|
69
|
-
* @default false
|
|
70
|
-
*/
|
|
71
|
-
showOutput?: boolean | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* Text to show after "ctrl+o" in spinner message.
|
|
74
|
-
* @default 'to see full output'
|
|
75
|
-
*/
|
|
76
|
-
toggleText?: string | undefined;
|
|
77
|
-
}
|
|
78
|
-
export interface OutputMask {
|
|
79
|
-
/** Whether spinner is currently active */
|
|
80
|
-
isSpinning: boolean;
|
|
81
|
-
/** Buffered output lines */
|
|
82
|
-
outputBuffer: string[];
|
|
83
|
-
/** All stderr captured (for exit code override) */
|
|
84
|
-
stderrCapture: string;
|
|
85
|
-
/** All stdout captured (for exit code override) */
|
|
86
|
-
stdoutCapture: string;
|
|
87
|
-
/** Whether output is currently visible */
|
|
88
|
-
verbose: boolean;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Create an output mask for controlling command output visibility.
|
|
92
|
-
* The mask tracks whether output should be shown or hidden (buffered).
|
|
93
|
-
* When hidden, output is buffered and a spinner is shown instead.
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* ```typescript
|
|
97
|
-
* const mask = createOutputMask({ showOutput: false })
|
|
98
|
-
* console.log(mask.verbose) // false
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
export declare function createOutputMask(options?: OutputMaskOptions): OutputMask;
|
|
102
|
-
/**
|
|
103
|
-
* Create a keyboard handler for toggling output visibility.
|
|
104
|
-
* Handles two key combinations:
|
|
105
|
-
* - ctrl+o: Toggle between showing and hiding output.
|
|
106
|
-
* - ctrl+c: Cancel the running process.
|
|
107
|
-
* The handler manipulates terminal state using ANSI escape sequences.
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* ```typescript
|
|
111
|
-
* const handler = createKeyboardHandler(mask, childProcess, {
|
|
112
|
-
* message: 'Testing...',
|
|
113
|
-
* })
|
|
114
|
-
* ```
|
|
115
|
-
*/
|
|
116
|
-
type ReadlineKey = {
|
|
117
|
-
ctrl?: boolean;
|
|
118
|
-
name?: string;
|
|
119
|
-
};
|
|
120
|
-
export declare function createKeyboardHandler(mask: OutputMask, child: ChildProcess, options?: OutputMaskOptions): (_str: string, key: ReadlineKey) => void;
|
|
121
|
-
/**
|
|
122
|
-
* Attach output masking to a child process.
|
|
123
|
-
* Returns a promise that resolves with the exit code.
|
|
124
|
-
* This function:
|
|
125
|
-
* - Sets up keyboard input handling in raw mode for immediate key capture.
|
|
126
|
-
* - Buffers stdout/stderr when not in verbose mode.
|
|
127
|
-
* - Shows a spinner when output is masked.
|
|
128
|
-
* - Allows toggling between masked and unmasked output with ctrl+o.
|
|
129
|
-
*
|
|
130
|
-
* @example
|
|
131
|
-
* ```typescript
|
|
132
|
-
* const child = spawn("pnpm", ["test"], { stdio: ["inherit", "pipe", "pipe"] })
|
|
133
|
-
* const exitCode = await attachOutputMask(child, { message: 'Running tests' })
|
|
134
|
-
* ```
|
|
135
|
-
*/
|
|
136
|
-
export declare function attachOutputMask(child: ChildProcess, options?: OutputMaskOptions): Promise<number>;
|
|
137
|
-
/**
|
|
138
|
-
* Run a command with interactive output masking.
|
|
139
|
-
* Convenience wrapper around spawn + attachOutputMask.
|
|
140
|
-
* Spawns a child process and attaches the output masking system to it.
|
|
141
|
-
* stdin is inherited, stdout and stderr are piped for masking control.
|
|
142
|
-
*
|
|
143
|
-
* @example
|
|
144
|
-
* ```typescript
|
|
145
|
-
* const exitCode = await runWithMask('pnpm', ['test'], {
|
|
146
|
-
* message: 'Running tests',
|
|
147
|
-
* })
|
|
148
|
-
* ```
|
|
149
|
-
*/
|
|
150
|
-
export declare function runWithMask(command: string, args?: string[], options?: OutputMaskOptions & SpawnOptions): Promise<number>;
|
|
151
|
-
export {};
|