@visulima/vis 1.0.0-alpha.21 → 1.0.0-alpha.23
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 +103 -0
- package/LICENSE.md +204 -9
- package/README.md +21 -4
- package/dashboard/dist/index.html +152 -0
- package/dist/bin.js +1 -1
- package/dist/binx.js +3 -0
- package/dist/config/index.d.ts +208 -28
- package/dist/config/index.js +1 -1
- package/dist/packem_chunks/bin.js +360 -354
- package/dist/packem_chunks/bloom-status.js +2 -0
- package/dist/packem_chunks/bloom-sync.js +2 -0
- package/dist/packem_chunks/cache-attestation.js +1 -0
- package/dist/packem_chunks/config.js +15 -15
- package/dist/packem_chunks/doctor-probe.js +2 -2
- package/dist/packem_chunks/fix.js +3 -3
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +2 -1
- package/dist/packem_chunks/handler11.js +1 -5
- package/dist/packem_chunks/handler12.js +5 -1
- package/dist/packem_chunks/handler13.js +1 -27
- package/dist/packem_chunks/handler14.js +28 -5
- package/dist/packem_chunks/handler15.js +5 -1
- package/dist/packem_chunks/handler16.js +1 -1
- package/dist/packem_chunks/handler17.js +1 -1
- package/dist/packem_chunks/handler18.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler2.js +4 -2
- package/dist/packem_chunks/handler20.js +1 -5
- package/dist/packem_chunks/handler21.js +5 -2
- package/dist/packem_chunks/handler22.js +2 -2
- package/dist/packem_chunks/handler23.js +2 -18
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler26.js +5 -5
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler29.js +1 -1
- package/dist/packem_chunks/handler3.js +4 -4
- package/dist/packem_chunks/handler30.js +3 -3
- package/dist/packem_chunks/handler31.js +4 -4
- package/dist/packem_chunks/handler32.js +3 -3
- package/dist/packem_chunks/handler33.js +1 -1
- package/dist/packem_chunks/handler34.js +24 -24
- package/dist/packem_chunks/handler35.js +5 -3
- package/dist/packem_chunks/handler36.js +21 -6
- package/dist/packem_chunks/handler37.js +60 -21
- package/dist/packem_chunks/handler38.js +6 -428
- package/dist/packem_chunks/handler39.js +708 -6
- package/dist/packem_chunks/handler4.js +6 -8
- package/dist/packem_chunks/handler40.js +11 -11
- package/dist/packem_chunks/handler41.js +286 -10
- package/dist/packem_chunks/handler42.js +11 -11
- package/dist/packem_chunks/handler43.js +10 -25
- package/dist/packem_chunks/handler44.js +25 -24
- package/dist/packem_chunks/handler45.js +23 -212
- package/dist/packem_chunks/handler46.js +2 -2
- package/dist/packem_chunks/handler47.js +1 -1
- package/dist/packem_chunks/handler48.js +53 -46
- package/dist/packem_chunks/handler49.js +6 -6
- package/dist/packem_chunks/handler5.js +8 -1
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/handler9.js +1 -2
- package/dist/packem_chunks/heal-accept.js +4 -4
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +16 -16
- package/dist/packem_chunks/index.js +2 -2
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/list.js +2 -2
- package/dist/packem_chunks/loader.js +4 -1
- package/dist/packem_chunks/loader2.js +1 -0
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/run.js +1 -1
- package/dist/packem_chunks/status.js +2 -2
- package/dist/packem_chunks/sync.js +2 -2
- package/dist/packem_chunks/sync2.js +2 -2
- package/dist/packem_chunks/tripwire.js +2 -2
- package/dist/packem_chunks/verify-lockfile.js +2 -0
- package/dist/packem_shared/{advisories-DsynpacV.js → advisories-U1QKY_tg.js} +1 -1
- package/dist/packem_shared/{ai-analysis-uYuTIIXi.js → ai-analysis-B8pDCOuT.js} +2 -2
- package/dist/packem_shared/ai-fix-DiGSrGKv.js +43 -0
- package/dist/packem_shared/anolilab-text-CAM_E6uK.js +13 -0
- package/dist/packem_shared/applyDefaults-KxZkvlp3.js +1 -0
- package/dist/packem_shared/build-scripts-3E2pmscY.js +1 -0
- package/dist/packem_shared/cyclonedx-B293T7R0.js +4 -0
- package/dist/packem_shared/dependency-scan-BbtivycX.js +1 -0
- package/dist/packem_shared/docker-BhBBfWfc.js +60 -0
- package/dist/packem_shared/failure-log-B0Uh-65U.js +2 -0
- package/dist/packem_shared/index-C1w1GXdS.js +1 -0
- package/dist/packem_shared/index-CZX_II5N.js +29 -0
- package/dist/packem_shared/index.server-B7ETiT4C.js +2 -0
- package/dist/packem_shared/license-zZU7aavK.js +1 -0
- package/dist/packem_shared/{lifecycle-Dv3nAtoD.js → lifecycle-wRE7ymVc.js} +2 -2
- package/dist/packem_shared/{lockfile-C5DYMHVq.js → lockfile-CQLFNyVa.js} +1 -1
- package/dist/packem_shared/manifests-Z3spBpxv.js +1 -0
- package/dist/packem_shared/{min-release-age-BFozFonQ.js → min-release-age-Cz6HbF-I.js} +2 -2
- package/dist/packem_shared/{native-config-sync-Dvi1g2nQ.js → native-config-sync-BOeuyrBj.js} +5 -5
- package/dist/packem_shared/osv-bloom-CyCDpXBl.js +2 -0
- package/dist/packem_shared/pm-runner-CVliR6Ie.js +1 -0
- package/dist/packem_shared/provenance-BcldGs02.js +1 -0
- package/dist/packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js +1 -0
- package/dist/packem_shared/registry-keys-pemEkRM9.js +1 -0
- package/dist/packem_shared/resolve-explicit-2G-2HWtR.js +5 -0
- package/dist/packem_shared/runtime-check-DgXsKCsv.js +1 -0
- package/dist/packem_shared/s1ngularity-Boxkax0D.js +1 -0
- package/dist/packem_shared/scan-progress-EbvmIh4i.js +2 -0
- package/dist/packem_shared/{selectors-B2ISH581.js → selectors-BE2BCnTR.js} +1 -1
- package/dist/packem_shared/signatures-SO-fyExV.js +2 -0
- package/dist/packem_shared/toolchain-Jx2lkAYy.js +5 -0
- package/dist/packem_shared/typosquats-CioMnpnb.js +1 -0
- package/dist/packem_shared/verify-C8EAHql6.js +1 -0
- package/dist/packem_shared/{vis-update-app-CFrlJ3mW.js → vis-update-app-BWA1kA1q.js} +1 -1
- package/index.d.ts +78 -0
- package/index.js +57 -53
- package/package.json +34 -13
- package/schemas/project.schema.json +37 -7
- package/schemas/vis-config.schema.json +2395 -1996
- package/dist/packem_shared/ai-cache-DuwHYx2O.js +0 -1
- package/dist/packem_shared/ai-fix-DzrA-dVz.js +0 -43
- package/dist/packem_shared/applyDefaults-BOVDw1jD.js +0 -1
- package/dist/packem_shared/build-scripts-DsWMSWDs.js +0 -1
- package/dist/packem_shared/cache-directory-DQak1Vjc.js +0 -1
- package/dist/packem_shared/cyclonedx-CiHXuG8M.js +0 -4
- package/dist/packem_shared/dependency-scan-DC3nAFHS.js +0 -1
- package/dist/packem_shared/docker-B-CIN_nj.js +0 -60
- package/dist/packem_shared/failure-log-C3LEMmkq.js +0 -2
- package/dist/packem_shared/flakiness-Dq6K4ymq.js +0 -1
- package/dist/packem_shared/manifests-B0fMp872.js +0 -1
- package/dist/packem_shared/registry-keys-CewRFW0e.js +0 -1
- package/dist/packem_shared/resolve-explicit-CC4Kifk5.js +0 -5
- package/dist/packem_shared/run-summary-utils-BaBGP3bo.js +0 -1
- package/dist/packem_shared/runtime-check-BusAwPb2.js +0 -1
- package/dist/packem_shared/scan-progress-CMynp3eA.js +0 -2
- package/dist/packem_shared/signatures-5ZdjJ2Pu.js +0 -2
- package/dist/packem_shared/toolchain-Cc3cwyLP.js +0 -5
- package/dist/packem_shared/typosquats-BCeR-sLf.js +0 -1
- package/dist/packem_shared/verify-07kUNTuP.js +0 -1
- package/dist/packem_shared/xxh3-DrAUNq4n.js +0 -1
package/dist/bin.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./packem_chunks/bin.js";import"./packem_chunks/config.js";
|
|
2
|
+
import"./packem_shared/index-CZX_II5N.js";import"./packem_chunks/bin.js";import"./packem_chunks/config.js";import"./packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";
|
package/dist/binx.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{N as r,m as o,i as c,T as i,w as a,a as n}from"./packem_shared/index-CZX_II5N.js";r();process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");process.argv.slice(2).some(s=>s==="--version"||s==="-v"||s==="-V")&&(process.stdout.write(`${o.version}
|
|
3
|
+
`),process.exit(0));process.argv.splice(2,0,"dlx");c();const e=i("visx",{packageName:"visx",packageVersion:o.version}),p=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(a({detailed:p,exitOnError:!1}));e.addCommand(n);(async()=>{try{await e.run({shouldExitProcess:!1})}catch{process.exitCode=process.exitCode||1}finally{process.exit(process.exitCode??0)}})();
|
package/dist/config/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ interface SimilarDepFamily {
|
|
|
21
21
|
prefixes?: string[];
|
|
22
22
|
}
|
|
23
23
|
type VersionManagerName = "asdf" | "corepack" | "fnm" | "mise" | "none" | "nvm" | "proto" | "self-activate" | "volta";
|
|
24
|
-
type RuntimeTool = "bun" | "deno" | "go" | "node" | "npm" | "pnpm" | "python" | "ruby" | "rust" | "yarn";
|
|
24
|
+
type RuntimeTool = "aube" | "bun" | "deno" | "go" | "node" | "npm" | "pnpm" | "python" | "ruby" | "rust" | "yarn";
|
|
25
25
|
interface ToolchainConfig {
|
|
26
26
|
/**
|
|
27
27
|
* When a tool pin doesn't match the running version, try to fix it
|
|
@@ -651,6 +651,12 @@ interface ProjectJson {
|
|
|
651
651
|
* - `tool` — CLI or developer tooling shipped as an executable.
|
|
652
652
|
*/
|
|
653
653
|
projectType?: "application" | "library" | "service" | "tool";
|
|
654
|
+
/**
|
|
655
|
+
* Marks the project as write-restricted. Consumed by
|
|
656
|
+
* `vis sync codeowners --write-guard` to scope the generated
|
|
657
|
+
* Write Guard workflow to this project's paths.
|
|
658
|
+
*/
|
|
659
|
+
restricted?: boolean;
|
|
654
660
|
/** Source root, used for display and language inference. */
|
|
655
661
|
sourceRoot?: string;
|
|
656
662
|
/** Tech stack. */
|
|
@@ -856,9 +862,18 @@ interface VisConfig {
|
|
|
856
862
|
};
|
|
857
863
|
/**
|
|
858
864
|
* Auto-create targets from detected config files (Project Crystal-style).
|
|
859
|
-
*
|
|
865
|
+
* On by default; set `false` to disable entirely, or use the object
|
|
866
|
+
* form to disable individual detectors.
|
|
867
|
+
*
|
|
868
|
+
* Inferred targets sit *below* explicit ones — the command from
|
|
860
869
|
* `package.json#scripts`, `project.json#targets`, or `vis.task.ts`
|
|
861
|
-
* wins per-key, so opting in never
|
|
870
|
+
* always wins per-key, so opting in never changes what runs. As a
|
|
871
|
+
* caching aid, when a `package.json` script's command *is* a
|
|
872
|
+
* detector's command (optionally with extra flags, no shell
|
|
873
|
+
* chaining) and the script declares no `inputs`/`outputs`, the
|
|
874
|
+
* detector's `inputs`/`outputs` are adopted so the script target can
|
|
875
|
+
* cache precisely and restore its artifacts. Customised/compound
|
|
876
|
+
* scripts are left untouched.
|
|
862
877
|
*
|
|
863
878
|
* Built-in detectors and the targets they synthesize:
|
|
864
879
|
*
|
|
@@ -912,7 +927,7 @@ interface VisConfig {
|
|
|
912
927
|
* opt individual detectors in or out by name. Detectors omitted from
|
|
913
928
|
* the object run at their default (enabled). Useful when one
|
|
914
929
|
* detector misfires for a given workspace without disabling the rest.
|
|
915
|
-
* @default
|
|
930
|
+
* @default true
|
|
916
931
|
*/
|
|
917
932
|
inferTargets?: Record<string, boolean> | boolean;
|
|
918
933
|
/**
|
|
@@ -1503,6 +1518,53 @@ interface VisConfig {
|
|
|
1503
1518
|
*/
|
|
1504
1519
|
allowedHosts?: string[];
|
|
1505
1520
|
/**
|
|
1521
|
+
* Bloom-filter prefilter for OSV `MAL-*` (malicious-package)
|
|
1522
|
+
* advisories. Probes a ~380 KB filter fetched from
|
|
1523
|
+
* `endevco/osv-bloom` and escalates hits to the existing
|
|
1524
|
+
* advisory query path for `(name, version)` confirmation.
|
|
1525
|
+
*
|
|
1526
|
+
* Cost: ~380 KB on the wire, refreshed every 10 minutes
|
|
1527
|
+
* upstream. False-positive rate is ~0.1%, so a typical
|
|
1528
|
+
* 1000-package lockfile triggers zero or one extra
|
|
1529
|
+
* round trip per audit.
|
|
1530
|
+
*
|
|
1531
|
+
* Independent of `audit.advisories.source` / `verify` —
|
|
1532
|
+
* those control the full OSV ingest. The bloom is
|
|
1533
|
+
* MAL-* only and aimed at cold-start preflight and
|
|
1534
|
+
* ephemeral CI runners that haven't synced the full DB.
|
|
1535
|
+
*/
|
|
1536
|
+
bloom?: {
|
|
1537
|
+
/**
|
|
1538
|
+
* Extra hosts permitted as `bloom.source`. The
|
|
1539
|
+
* built-in allowlist (`endevco.github.io`) is enforced
|
|
1540
|
+
* even if this field is omitted; entries here add to it.
|
|
1541
|
+
*/
|
|
1542
|
+
allowedHosts?: string[];
|
|
1543
|
+
/**
|
|
1544
|
+
* Prefilter mode:
|
|
1545
|
+
* - `off`: never run the bloom check.
|
|
1546
|
+
* - `on`: run when a local filter is cached; on
|
|
1547
|
+
* fetch failure, fall back to the cached filter or
|
|
1548
|
+
* skip the prefilter (audit continues against the
|
|
1549
|
+
* non-bloom path).
|
|
1550
|
+
* - `required`: hard-fail the audit when the bloom
|
|
1551
|
+
* refresh fails or the local cache is missing.
|
|
1552
|
+
* Use in hardened CI together with
|
|
1553
|
+
* `audit.advisories.source`.
|
|
1554
|
+
* @default "off"
|
|
1555
|
+
*/
|
|
1556
|
+
mode?: "off" | "on" | "required";
|
|
1557
|
+
/**
|
|
1558
|
+
* Bloom mirror base URL (no trailing slash). Defaults
|
|
1559
|
+
* to the public `endevco/osv-bloom` GH Pages site.
|
|
1560
|
+
* Override only if you mirror the bloom artifacts
|
|
1561
|
+
* internally; the hostname must appear in
|
|
1562
|
+
* `allowedHosts`.
|
|
1563
|
+
* @default "https://endevco.github.io/osv-bloom"
|
|
1564
|
+
*/
|
|
1565
|
+
source?: string;
|
|
1566
|
+
};
|
|
1567
|
+
/**
|
|
1506
1568
|
* Number of hours after `lastSyncIso` before `vis audit`
|
|
1507
1569
|
* prints a "your advisory cache may be stale" notice.
|
|
1508
1570
|
* `vis audit` never auto-syncs — the user runs
|
|
@@ -1564,6 +1626,25 @@ interface VisConfig {
|
|
|
1564
1626
|
};
|
|
1565
1627
|
};
|
|
1566
1628
|
/**
|
|
1629
|
+
* Vulnerability scanner backend.
|
|
1630
|
+
*
|
|
1631
|
+
* - `auto` (default): delegate to `aube audit` when aube is the
|
|
1632
|
+
* active installer (its scanner reads the same lockfile and
|
|
1633
|
+
* produces equivalent severity ratings); otherwise run vis's
|
|
1634
|
+
* own OSV/Socket scanner.
|
|
1635
|
+
* - `aube`: always delegate to `aube audit`. Errors if `aube` is
|
|
1636
|
+
* not on PATH.
|
|
1637
|
+
* - `vis`: always use vis's built-in scanner — never delegate.
|
|
1638
|
+
*
|
|
1639
|
+
* Delegation avoids redundant work (aube already has a
|
|
1640
|
+
* full-fidelity audit pass that respects its own exclusions
|
|
1641
|
+
* via `aube-workspace.yaml::auditConfig`) and lets users get
|
|
1642
|
+
* a single, consistent result regardless of which entry point
|
|
1643
|
+
* they invoke.
|
|
1644
|
+
* @default "auto"
|
|
1645
|
+
*/
|
|
1646
|
+
backend?: "aube" | "auto" | "vis";
|
|
1647
|
+
/**
|
|
1567
1648
|
* When true, `vis audit` skips network calls and queries the
|
|
1568
1649
|
* offline cache. Equivalent to the CLI `--offline` flag.
|
|
1569
1650
|
* @default false
|
|
@@ -1578,9 +1659,50 @@ interface VisConfig {
|
|
|
1578
1659
|
*/
|
|
1579
1660
|
blockExoticSubdeps?: boolean;
|
|
1580
1661
|
/**
|
|
1662
|
+
* Package names exempted from the `blockExoticSubdeps` check.
|
|
1663
|
+
* Bare names and a trailing `*` glob (`@scope/*`) are supported.
|
|
1664
|
+
* Use for an internal package legitimately published as a git or
|
|
1665
|
+
* tarball dependency.
|
|
1666
|
+
* @example ["@myorg/legacy", "internal-*"]
|
|
1667
|
+
*/
|
|
1668
|
+
exoticSubdepsAllow?: string[];
|
|
1669
|
+
/**
|
|
1670
|
+
* deps.dev (Google Open Source Insights) data-source configuration.
|
|
1671
|
+
* Public, unauthenticated; pulls Scorecard data + advisories from
|
|
1672
|
+
* `api.deps.dev`. Complements or replaces Socket.dev. Heavily cached.
|
|
1673
|
+
* @see https://docs.deps.dev/api/v3/
|
|
1674
|
+
*/
|
|
1675
|
+
depsDev?: {
|
|
1676
|
+
/**
|
|
1677
|
+
* Cache TTL for advisory entries (immutable once published). 7 days.
|
|
1678
|
+
* @default 604800000
|
|
1679
|
+
*/
|
|
1680
|
+
advisoryCacheTtlMs?: number;
|
|
1681
|
+
/**
|
|
1682
|
+
* Enable deps.dev scanning on install/update/check/audit commands.
|
|
1683
|
+
* @default false
|
|
1684
|
+
*/
|
|
1685
|
+
enabled?: boolean;
|
|
1686
|
+
/**
|
|
1687
|
+
* Cache TTL for OpenSSF Scorecard project data (refreshes weekly). 24 hours.
|
|
1688
|
+
* @default 86400000
|
|
1689
|
+
*/
|
|
1690
|
+
projectCacheTtlMs?: number;
|
|
1691
|
+
/**
|
|
1692
|
+
* Request timeout in milliseconds.
|
|
1693
|
+
* @default 15000
|
|
1694
|
+
*/
|
|
1695
|
+
timeoutMs?: number;
|
|
1696
|
+
/**
|
|
1697
|
+
* Cache TTL for npm version metadata (immutable). 7 days.
|
|
1698
|
+
* @default 604800000
|
|
1699
|
+
*/
|
|
1700
|
+
versionCacheTtlMs?: number;
|
|
1701
|
+
};
|
|
1702
|
+
/**
|
|
1581
1703
|
* Pre-install marshall pipeline — packument-derived supply-chain
|
|
1582
|
-
* gates (author, provenance, new-bin, metadata,
|
|
1583
|
-
* expired-domains, signatures, archived-repo) that run before
|
|
1704
|
+
* gates (author, provenance, s1ngularity, new-bin, metadata,
|
|
1705
|
+
* downloads, expired-domains, signatures, archived-repo) that run before
|
|
1584
1706
|
* `vis add` / `vis install <pkg>` / `vis update <pkg>` hand off to
|
|
1585
1707
|
* the underlying package manager. Every entry is optional; omit a
|
|
1586
1708
|
* key and the marshall runs with defaults. Set `enabled: false`
|
|
@@ -1609,6 +1731,11 @@ interface VisConfig {
|
|
|
1609
1731
|
/** Days since the resolved version was published — warning threshold. */
|
|
1610
1732
|
recentVersionWarnDays?: number;
|
|
1611
1733
|
};
|
|
1734
|
+
/** npm `deprecated`-flag check on the resolved version. */
|
|
1735
|
+
deprecation?: {
|
|
1736
|
+
allowlist?: string[];
|
|
1737
|
+
enabled?: boolean;
|
|
1738
|
+
};
|
|
1612
1739
|
/** Monthly download-count floor. */
|
|
1613
1740
|
downloads?: {
|
|
1614
1741
|
allowlist?: string[];
|
|
@@ -1637,12 +1764,30 @@ interface VisConfig {
|
|
|
1637
1764
|
allowlist?: string[];
|
|
1638
1765
|
enabled?: boolean;
|
|
1639
1766
|
};
|
|
1767
|
+
/** Whole-package age heuristics (newly created / unmaintained). */
|
|
1768
|
+
packageAge?: {
|
|
1769
|
+
allowlist?: string[];
|
|
1770
|
+
enabled?: boolean; /** Package created fewer than this many days ago → error. Default 22. */
|
|
1771
|
+
newPackageDays?: number;
|
|
1772
|
+
/** No publish within this many days → warning. Default 365. */
|
|
1773
|
+
unmaintainedDays?: number;
|
|
1774
|
+
};
|
|
1640
1775
|
/** Provenance regression check. */
|
|
1641
1776
|
provenance?: {
|
|
1642
1777
|
allowlist?: string[];
|
|
1643
1778
|
enabled?: boolean;
|
|
1644
1779
|
};
|
|
1645
1780
|
/**
|
|
1781
|
+
* Composite "compromised-publish shape" detector — flags a single
|
|
1782
|
+
* version that simultaneously introduced/changed an install hook
|
|
1783
|
+
* AND dropped the provenance attestation a prior stable version
|
|
1784
|
+
* carried (the August 2025 s1ngularity / Nx fingerprint).
|
|
1785
|
+
*/
|
|
1786
|
+
s1ngularity?: {
|
|
1787
|
+
allowlist?: string[];
|
|
1788
|
+
enabled?: boolean;
|
|
1789
|
+
};
|
|
1790
|
+
/**
|
|
1646
1791
|
* ECDSA P-256 verification against npm's signing keys. Disabled
|
|
1647
1792
|
* by default because npm coverage still has gaps that produce
|
|
1648
1793
|
* noisy warnings on legitimate packages.
|
|
@@ -1867,6 +2012,54 @@ interface VisConfig {
|
|
|
1867
2012
|
};
|
|
1868
2013
|
};
|
|
1869
2014
|
/**
|
|
2015
|
+
* Which provider wins merge conflicts when multiple are enabled (e.g.
|
|
2016
|
+
* both Socket.dev and deps.dev return data for the same package). The
|
|
2017
|
+
* primary provider's `score` is kept; alerts from secondaries are
|
|
2018
|
+
* appended and deduped by `key`. Defaults to whichever provider is
|
|
2019
|
+
* enabled first in this order: socket → deps-dev → snyk.
|
|
2020
|
+
*/
|
|
2021
|
+
primaryProvider?: "deps-dev" | "snyk" | "socket";
|
|
2022
|
+
/**
|
|
2023
|
+
* Snyk data-source configuration. Snyk only contributes vulnerability
|
|
2024
|
+
* data (no maintenance / quality / supply-chain / license signal);
|
|
2025
|
+
* those axes stay neutral. Requires both an org id and an API token —
|
|
2026
|
+
* if either is missing the provider is skipped.
|
|
2027
|
+
* @see https://docs.snyk.io/snyk-api/using-specific-snyk-apis/issues-list-issues-for-a-package
|
|
2028
|
+
*/
|
|
2029
|
+
snyk?: {
|
|
2030
|
+
/**
|
|
2031
|
+
* Snyk API token. Set via VIS_SNYK_TOKEN environment variable or
|
|
2032
|
+
* here.
|
|
2033
|
+
*/
|
|
2034
|
+
apiToken?: string;
|
|
2035
|
+
/**
|
|
2036
|
+
* Snyk REST API version date sent as the `version` query param.
|
|
2037
|
+
* @default "2024-10-15"
|
|
2038
|
+
*/
|
|
2039
|
+
apiVersion?: string;
|
|
2040
|
+
/**
|
|
2041
|
+
* Cache TTL in milliseconds for Snyk issue lookups. 6 hours.
|
|
2042
|
+
* @default 21600000
|
|
2043
|
+
*/
|
|
2044
|
+
cacheTtlMs?: number;
|
|
2045
|
+
/**
|
|
2046
|
+
* Enable Snyk security scanning on install/update/check/audit
|
|
2047
|
+
* commands.
|
|
2048
|
+
* @default false
|
|
2049
|
+
*/
|
|
2050
|
+
enabled?: boolean;
|
|
2051
|
+
/**
|
|
2052
|
+
* Snyk organization id (the REST endpoint is org-scoped). Set via
|
|
2053
|
+
* VIS_SNYK_ORG environment variable or here.
|
|
2054
|
+
*/
|
|
2055
|
+
orgId?: string;
|
|
2056
|
+
/**
|
|
2057
|
+
* Request timeout in milliseconds for the Snyk API. 15 seconds.
|
|
2058
|
+
* @default 15000
|
|
2059
|
+
*/
|
|
2060
|
+
timeoutMs?: number;
|
|
2061
|
+
};
|
|
2062
|
+
/**
|
|
1870
2063
|
* Socket.dev data-source configuration. Connection knobs only — score
|
|
1871
2064
|
* thresholds and accepted-risk overrides moved to `policies.score` and
|
|
1872
2065
|
* `security.acceptedRisks` respectively.
|
|
@@ -1879,8 +2072,8 @@ interface VisConfig {
|
|
|
1879
2072
|
*/
|
|
1880
2073
|
apiToken?: string;
|
|
1881
2074
|
/**
|
|
1882
|
-
* Cache TTL in milliseconds for Socket.dev reports.
|
|
1883
|
-
* @default
|
|
2075
|
+
* Cache TTL in milliseconds for Socket.dev reports. 1 hour.
|
|
2076
|
+
* @default 3600000
|
|
1884
2077
|
*/
|
|
1885
2078
|
cacheTtlMs?: number;
|
|
1886
2079
|
/**
|
|
@@ -1889,8 +2082,8 @@ interface VisConfig {
|
|
|
1889
2082
|
*/
|
|
1890
2083
|
enabled?: boolean;
|
|
1891
2084
|
/**
|
|
1892
|
-
* Request timeout in milliseconds for the Socket.dev API.
|
|
1893
|
-
* @default
|
|
2085
|
+
* Request timeout in milliseconds for the Socket.dev API. 15 seconds.
|
|
2086
|
+
* @default 15000
|
|
1894
2087
|
*/
|
|
1895
2088
|
timeoutMs?: number;
|
|
1896
2089
|
};
|
|
@@ -2753,10 +2946,12 @@ declare const loadVisTaskConfig: (workspaceRoot: string, projectDirectory: strin
|
|
|
2753
2946
|
declare const defineTaskConfig: (config: VisTaskConfig) => VisTaskConfig;
|
|
2754
2947
|
/**
|
|
2755
2948
|
* Type-safe helper for defining vis configuration.
|
|
2756
|
-
* Provides full TypeScript autocomplete when used in `vis.config.ts`.
|
|
2757
2949
|
*
|
|
2758
|
-
*
|
|
2759
|
-
*
|
|
2950
|
+
* Pure typed-identity — returns its argument unchanged. The point is purely
|
|
2951
|
+
* editor autocomplete and structural type-checking on the literal you pass
|
|
2952
|
+
* in. Secure defaults are applied by `loadVisConfig` at load time, not here,
|
|
2953
|
+
* so wrapping vs. using `satisfies VisConfig` produces the exact same
|
|
2954
|
+
* runtime behavior. To see the active defaults, run `vis check --security-config`.
|
|
2760
2955
|
* @example
|
|
2761
2956
|
* ```typescript
|
|
2762
2957
|
* // vis.config.ts — minimal config, fully secured by defaults
|
|
@@ -2775,21 +2970,6 @@ declare const defineTaskConfig: (config: VisTaskConfig) => VisTaskConfig;
|
|
|
2775
2970
|
* },
|
|
2776
2971
|
* });
|
|
2777
2972
|
* ```
|
|
2778
|
-
* @example
|
|
2779
|
-
* ```typescript
|
|
2780
|
-
* // vis.config.ts — override a default
|
|
2781
|
-
* import { defineConfig } from "@visulima/vis/config";
|
|
2782
|
-
*
|
|
2783
|
-
* export default defineConfig({
|
|
2784
|
-
* security: {
|
|
2785
|
-
* policies: {
|
|
2786
|
-
* // Relax cooldown to 24 hours instead of the default 14 days
|
|
2787
|
-
* firstSeen: { minutes: 1440 },
|
|
2788
|
-
* installScripts: { allow: { esbuild: true } },
|
|
2789
|
-
* },
|
|
2790
|
-
* },
|
|
2791
|
-
* });
|
|
2792
|
-
* ```
|
|
2793
2973
|
*/
|
|
2794
2974
|
declare const defineConfig: (config: VisConfig) => VisConfig;
|
|
2795
2975
|
export { CONFIG_FILES, type OtelPluginOptions, SECURITY_DEFAULTS, TASK_CONFIG_FILES, type VisConfig, type VisHooks, type VisPlugin, type VisTaskConfig, applyDefaults, defineConfig, definePlugin, defineTaskConfig, findVisConfigFile, findVisTaskConfigFile, loadVisConfig, loadVisTaskConfig, otelPlugin };
|
package/dist/config/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as s,l as f,V as o,
|
|
1
|
+
import{h as s,l as f,V as o,m as e,c as n,a as l,j as C,G as g,e as d,r}from"../packem_chunks/config.js";import{definePlugin as T}from"../packem_shared/definePlugin-CWm4Dv_t.js";import{otelPlugin as t}from"../packem_shared/otelPlugin-CJR2T_lk.js";export{s as CONFIG_FILES,f as SECURITY_DEFAULTS,o as TASK_CONFIG_FILES,e as applyDefaults,n as defineConfig,T as definePlugin,l as defineTaskConfig,C as findVisConfigFile,g as findVisTaskConfigFile,d as loadVisConfig,r as loadVisTaskConfig,t as otelPlugin};
|