@visulima/vis 6.6.0 → 6.6.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 +6 -0
- package/bin/vis.mjs +5 -1
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/catalog.js +1 -1
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +182 -151
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler12.js +1 -1
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler22.js +2 -2
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler26.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler5.js +1 -1
- package/dist/packem_chunks/handler50.js +2 -2
- package/dist/packem_chunks/handler51.js +1 -1
- package/dist/packem_chunks/handler52.js +1 -1
- package/dist/packem_chunks/handler54.js +1 -1
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler58.js +3 -3
- package/dist/packem_chunks/handler59.js +1 -1
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler60.js +1 -1
- package/dist/packem_chunks/handler61.js +2 -2
- package/dist/packem_chunks/handler62.js +1 -1
- package/dist/packem_chunks/handler63.js +1 -1
- package/dist/packem_chunks/handler64.js +5 -5
- package/dist/packem_chunks/handler65.js +3 -3
- package/dist/packem_chunks/handler66.js +3 -3
- package/dist/packem_chunks/handler67.js +1 -1
- package/dist/packem_chunks/handler68.js +1 -1
- package/dist/packem_chunks/handler69.js +1 -1
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +1 -1
- package/dist/packem_chunks/handler71.js +1 -1
- package/dist/packem_chunks/handler72.js +1 -1
- package/dist/packem_chunks/handler73.js +1 -1
- package/dist/packem_chunks/handler74.js +1 -1
- package/dist/packem_chunks/handler75.js +15 -15
- package/dist/packem_chunks/handler76.js +1 -1
- package/dist/packem_chunks/handler77.js +1 -1
- package/dist/packem_chunks/handler78.js +2 -2
- package/dist/packem_chunks/handler79.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/index7.js +1 -1
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tripwire.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_shared/{advisories-BldM-U4F.js → advisories-C803XIyf.js} +1 -1
- package/dist/packem_shared/{affected-selection-DxKQo2N5.js → affected-selection-N_hH7E2F.js} +1 -1
- package/dist/packem_shared/{ai-analysis-D1Y5a_SZ.js → ai-analysis-Cl0z4yyY.js} +1 -1
- package/dist/packem_shared/{ai-cache-CSmj5gA2.js → ai-cache-62Q75Ohc.js} +1 -1
- package/dist/packem_shared/{ai-fix-DVcnNQ0X.js → ai-fix-B5o7o8D0.js} +1 -1
- package/dist/packem_shared/{bin-Bw91EYm6.js → bin-Dg4DTW2J.js} +1 -1
- package/dist/packem_shared/{build-scripts-ETlkUGzC.js → build-scripts-DXEaKPbM.js} +1 -1
- package/dist/packem_shared/{dependency-scan-Dv1kJ-Sn.js → dependency-scan-DRigy-Ce.js} +1 -1
- package/dist/packem_shared/{detect-Bch1mcQe.js → detect-Cy4J0ZzQ.js} +1 -1
- package/dist/packem_shared/{docker-DPxeLIQl.js → docker-eH4IgLNI.js} +1 -1
- package/dist/packem_shared/{ecosystem-gate-IugL9cei.js → ecosystem-gate-Bn-P4Yqx.js} +1 -1
- package/dist/packem_shared/{env-D3wteXlq.js → env-B_MqQz0I.js} +1 -1
- package/dist/packem_shared/{env-consistency-1rRSdrFI.js → env-consistency-C-gPg1z7.js} +1 -1
- package/dist/packem_shared/{failure-log-Dgp-P-SJ.js → failure-log-TINPmB_Y.js} +1 -1
- package/dist/packem_shared/glob-Cyk1H9ZL-BcU6BdWa.js +1 -0
- package/dist/packem_shared/{index-DojXARzs.js → index-DUGTZGN1.js} +1 -1
- package/dist/packem_shared/{index-BTwTRy_a.js → index-DV9plm6F.js} +1 -1
- package/dist/packem_shared/{lifecycle-C6o0cmOT.js → lifecycle-C2j-_yjz.js} +1 -1
- package/dist/packem_shared/{manifests-CgiKqpP8.js → manifests-Dxq09rdz.js} +1 -1
- package/dist/packem_shared/{min-release-age-RVDHqGu5.js → min-release-age-lSu9fMQU.js} +1 -1
- package/dist/packem_shared/{missing-package-json-Cf7PavlK.js → missing-package-json-DX1OyAgd.js} +1 -1
- package/dist/packem_shared/{multi-eco-lockfiles-B3591j5D.js → multi-eco-lockfiles-BBdBBERS.js} +1 -1
- package/dist/packem_shared/{native-config-sync-BGLC8n86.js → native-config-sync-CDV3izkE.js} +1 -1
- package/dist/packem_shared/{osv-CI9eaGmG.js → osv-zlqqFEue.js} +1 -1
- package/dist/packem_shared/{package-version-COyEFX59.js → package-version-ilIDuvbM.js} +1 -1
- package/dist/packem_shared/{packument-Dij7POVt.js → packument-DgfV5ebL.js} +1 -1
- package/dist/packem_shared/{project-name-filter-B7h62wuR.js → project-name-filter-Bav_usE5.js} +1 -1
- package/dist/packem_shared/{provenance-BVFxzkUv.js → provenance-iyO7oSbr.js} +1 -1
- package/dist/packem_shared/{registry-CyYhBUaF.js → registry-DiFjkq9L.js} +1 -1
- package/dist/packem_shared/{registry-keys-BwWnVZtb.js → registry-keys-PoCGGEQU.js} +1 -1
- package/dist/packem_shared/{renderToString-DR0zDUjh-CQT5Ebrc.js → renderToString-DR0zDUjh-DIy97Cvo.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-BshyrPRh.js → resolve-explicit-BxXTTACy.js} +1 -1
- package/dist/packem_shared/{run-summary-utils-RzgHeC8f.js → run-summary-utils-CWtpwjB-.js} +1 -1
- package/dist/packem_shared/{runtime-check-CpBsIYcl.js → runtime-check-B2_65Qxg.js} +1 -1
- package/dist/packem_shared/{s1ngularity-Bb56bc8v.js → s1ngularity-2ULYV9dv.js} +1 -1
- package/dist/packem_shared/{scaffold-files-sbf-Y1nQ.js → scaffold-files-ljwdtNix.js} +1 -1
- package/dist/packem_shared/{scan-progress-Blrj96LZ.js → scan-progress-Bg2J2LtK.js} +1 -1
- package/dist/packem_shared/{selectors-DmRRUQsG.js → selectors-CZt_FK38.js} +1 -1
- package/dist/packem_shared/{signatures-DlGMQsHg.js → signatures-wQxWdScn.js} +1 -1
- package/dist/packem_shared/{spinner-B30I9gQR.js → spinner-DqhHeEEh.js} +1 -1
- package/dist/packem_shared/{table-ahQIE6tw.js → table-DWrn2wa0.js} +1 -1
- package/dist/packem_shared/{tabs-K9dH5Qdu.js → tabs-CPZha41U.js} +1 -1
- package/dist/packem_shared/{toolchain-B7PrWDAi.js → toolchain-B7MSc6S4.js} +1 -1
- package/dist/packem_shared/{typosquats-Dn2ahBS1.js → typosquats-CCM8oyg7.js} +1 -1
- package/dist/packem_shared/{use-measured-height-D5xfIDWl.js → use-measured-height-Zz5Edg6J.js} +1 -1
- package/dist/packem_shared/{vis-update-app-CPpJkbSs.js → vis-update-app-CouPhMGg.js} +1 -1
- package/dist/packem_shared/{vis-user-error-C3y9hGtw.js → vis-user-error-Ceb7hJQW.js} +1 -1
- package/dist/packem_shared/{watch-loop-DQ6KryuH.js → watch-loop-CY-QsO2E.js} +1 -1
- package/index.d.ts +213 -204
- package/index.js +231 -104
- package/package.json +9 -9
- package/dist/packem_shared/glob-Cyk1H9ZL-D0MQr5DW.js +0 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Which binding artifact the generated loader actually loaded: `'native'` for
|
|
6
|
+
* a native addon, otherwise the `platformArchABI` of the WASI flavor. Every
|
|
7
|
+
* flavor napi-rs can build is listed, because `NAPI_RS_NATIVE_LIBRARY_PATH`
|
|
8
|
+
* can point the loader at a WASI artifact this package does not build itself.
|
|
9
|
+
*/
|
|
10
|
+
export declare const __napiBindingTarget: 'native' | 'wasm32-wasi' | 'wasm32-wasip1'
|
|
11
|
+
|
|
3
12
|
/**
|
|
4
13
|
* Opaque handle wrapping a decoded `BloomFilter`. JS calls back into
|
|
5
14
|
* `osv_bloom_probe` / `osv_bloom_probe_batch` with this handle. Arc so
|
|
@@ -7,43 +16,43 @@
|
|
|
7
16
|
* the bitset.
|
|
8
17
|
*/
|
|
9
18
|
export declare class OsvBloomHandle {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
19
|
+
/**
|
|
20
|
+
* `n` field from the filter header — entry count the upstream
|
|
21
|
+
* builder inserted. Exposed for `vis advisories bloom status`.
|
|
22
|
+
*/
|
|
23
|
+
get entriesInserted(): number
|
|
24
|
+
/**
|
|
25
|
+
* `m` field — bit count. Returned as a decimal string so the full
|
|
26
|
+
* u64 round-trips without JS-Number precision loss; today's filter
|
|
27
|
+
* is ~3.1M bits but the wire format reserves 64-bit headroom.
|
|
28
|
+
*/
|
|
29
|
+
get bitCountString(): string
|
|
30
|
+
/** `k` field — hash-function count per probe. */
|
|
31
|
+
get hashCount(): number
|
|
32
|
+
/**
|
|
33
|
+
* `built_at_unix_seconds` — UNIX seconds the upstream builder
|
|
34
|
+
* recorded, as a decimal string. JS reconstructs via
|
|
35
|
+
* `new Date(Number(s) * 1000)`. Use this in status output rather
|
|
36
|
+
* than the local fetch time.
|
|
37
|
+
*/
|
|
38
|
+
get builtAtUnixSecondsString(): string
|
|
39
|
+
/**
|
|
40
|
+
* `format_version` — currently 1. Surfaced so JS can flag a
|
|
41
|
+
* version-mismatch warning without re-decoding.
|
|
42
|
+
*/
|
|
43
|
+
get formatVersion(): number
|
|
35
44
|
}
|
|
36
45
|
|
|
37
46
|
export interface AddOptions {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
packages: Array<string>
|
|
48
|
+
saveDev: boolean
|
|
49
|
+
exact: boolean
|
|
50
|
+
peer: boolean
|
|
51
|
+
optional: boolean
|
|
52
|
+
global: boolean
|
|
53
|
+
workspace: boolean
|
|
54
|
+
workspaceRoot: boolean
|
|
55
|
+
filter: Array<string>
|
|
47
56
|
}
|
|
48
57
|
|
|
49
58
|
/**
|
|
@@ -51,57 +60,57 @@ export interface AddOptions {
|
|
|
51
60
|
* zip → JSON → INSERT pipeline can take seconds; we run it on a libuv worker
|
|
52
61
|
* so the main JS thread is free.
|
|
53
62
|
*/
|
|
54
|
-
export declare function advisoriesIngest(options: AdvisoryIngestOptions, onProgress: (current: number, total: number) => void): Promise<AdvisoryIngestResult
|
|
63
|
+
export declare function advisoriesIngest(options: AdvisoryIngestOptions, onProgress: (current: number, total: number) => void): Promise<AdvisoryIngestResult>
|
|
55
64
|
|
|
56
65
|
/**
|
|
57
66
|
* Synchronous query path. Returns one `AdvisoryQueryResult` per input,
|
|
58
67
|
* preserving order, so callers can zip back to their lockfile rows by index.
|
|
59
68
|
*/
|
|
60
|
-
export declare function advisoriesQuery(dbPath: string, queries: Array<AdvisoryQuery>): Array<AdvisoryQueryResult
|
|
69
|
+
export declare function advisoriesQuery(dbPath: string, queries: Array<AdvisoryQuery>): Array<AdvisoryQueryResult>
|
|
61
70
|
|
|
62
|
-
export declare function advisoriesStatus(dbPath: string): AdvisoryDbStatus
|
|
71
|
+
export declare function advisoriesStatus(dbPath: string): AdvisoryDbStatus
|
|
63
72
|
|
|
64
73
|
export interface AdvisoryDbStatus {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
exists: boolean
|
|
75
|
+
ecosystems: Array<AdvisoryEcosystemStatus>
|
|
76
|
+
sizeBytes: number
|
|
77
|
+
schemaVersion: number
|
|
69
78
|
}
|
|
70
79
|
|
|
71
80
|
export interface AdvisoryEcosystemStatus {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
name: string
|
|
82
|
+
advisoryCount: number
|
|
83
|
+
lastSyncIso: string
|
|
84
|
+
manifestEtag?: string
|
|
76
85
|
}
|
|
77
86
|
|
|
78
87
|
export interface AdvisoryIngestOptions {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
/** Path to a previously-downloaded OSV dump zip on disk. */
|
|
89
|
+
zipPath: string
|
|
90
|
+
dbPath: string
|
|
91
|
+
ecosystem: string
|
|
92
|
+
/**
|
|
93
|
+
* HTTP ETag header to write into the `manifest_etag` meta row for this
|
|
94
|
+
* ecosystem. `null` when the server didn't send one.
|
|
95
|
+
*/
|
|
96
|
+
manifestEtag?: string
|
|
88
97
|
}
|
|
89
98
|
|
|
90
99
|
export interface AdvisoryIngestResult {
|
|
91
|
-
|
|
92
|
-
|
|
100
|
+
advisoriesIngested: number
|
|
101
|
+
durationMs: number
|
|
93
102
|
}
|
|
94
103
|
|
|
95
104
|
export interface AdvisoryQuery {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
105
|
+
ecosystem: string
|
|
106
|
+
name: string
|
|
107
|
+
version: string
|
|
99
108
|
}
|
|
100
109
|
|
|
101
110
|
export interface AdvisoryQueryResult {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
111
|
+
name: string
|
|
112
|
+
version: string
|
|
113
|
+
vulnerabilities: Array<NativeVulnerabilityJs>
|
|
105
114
|
}
|
|
106
115
|
|
|
107
116
|
/**
|
|
@@ -110,15 +119,15 @@ export interface AdvisoryQueryResult {
|
|
|
110
119
|
* migrated `.pre-commit-config.yaml` files — anything outside this set
|
|
111
120
|
* (and outside the vis-specific overlay) is surfaced as a warning.
|
|
112
121
|
*/
|
|
113
|
-
export declare function allKnownTags(): Array<string
|
|
122
|
+
export declare function allKnownTags(): Array<string>
|
|
114
123
|
|
|
115
124
|
export interface CleanResult {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
125
|
+
/** Directories that were removed */
|
|
126
|
+
removed: Array<string>
|
|
127
|
+
/** Directories that failed to remove (with error messages) */
|
|
128
|
+
errors: Array<string>
|
|
129
|
+
/** Lockfiles that were removed (when --lockfile flag used) */
|
|
130
|
+
lockfilesRemoved: Array<string>
|
|
122
131
|
}
|
|
123
132
|
|
|
124
133
|
/**
|
|
@@ -129,21 +138,21 @@ export interface CleanResult {
|
|
|
129
138
|
*
|
|
130
139
|
* When `remove_lockfile` is true, also removes lockfiles from the root.
|
|
131
140
|
*/
|
|
132
|
-
export declare function cleanWorkspace(root: string, removeLockfile: boolean): CleanResult
|
|
141
|
+
export declare function cleanWorkspace(root: string, removeLockfile: boolean): CleanResult
|
|
133
142
|
|
|
134
143
|
export interface DetectedPackageManager {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
/** The package manager name: "pnpm", "npm", "yarn", or "bun" */
|
|
145
|
+
name: string
|
|
146
|
+
/** The version string from packageManager field, or None if unknown */
|
|
147
|
+
version?: string
|
|
148
|
+
/**
|
|
149
|
+
* Build metadata (sha256 hash) appended to packageManager field by
|
|
150
|
+
* corepack. `parts[1].split('+').next()` strips it from `version`;
|
|
151
|
+
* this field preserves it for callers that want to verify the pin.
|
|
152
|
+
*/
|
|
153
|
+
buildMeta?: string
|
|
154
|
+
/** Whether this is a monorepo/workspace */
|
|
155
|
+
isWorkspace: boolean
|
|
147
156
|
}
|
|
148
157
|
|
|
149
158
|
/**
|
|
@@ -156,7 +165,7 @@ export interface DetectedPackageManager {
|
|
|
156
165
|
*
|
|
157
166
|
* Returns `napi::Result` so any I/O errors surface as JS exceptions.
|
|
158
167
|
*/
|
|
159
|
-
export declare function detectPackageManager(cwd: string, opts?: DetectPackageManagerOptions | undefined | null): DetectedPackageManager
|
|
168
|
+
export declare function detectPackageManager(cwd: string, opts?: DetectPackageManagerOptions | undefined | null): DetectedPackageManager
|
|
160
169
|
|
|
161
170
|
/**
|
|
162
171
|
* Options controlling which detection sources to consult.
|
|
@@ -167,40 +176,40 @@ export declare function detectPackageManager(cwd: string, opts?: DetectPackageMa
|
|
|
167
176
|
* `{}` enables every source.
|
|
168
177
|
*/
|
|
169
178
|
export interface DetectPackageManagerOptions {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
179
|
+
/** Skip reading the `packageManager` field in package.json. */
|
|
180
|
+
ignorePackageJson?: boolean
|
|
181
|
+
/** Skip lockfile walk (pnpm-lock.yaml, yarn.lock, …). */
|
|
182
|
+
ignoreLockFile?: boolean
|
|
183
|
+
/**
|
|
184
|
+
* Skip the `npm_config_user_agent` env-var fallback. Set by every
|
|
185
|
+
* PM when running scripts; lets a tool spawned from `pnpm run x`
|
|
186
|
+
* know it's pnpm even without a lockfile.
|
|
187
|
+
*/
|
|
188
|
+
ignoreArgv?: boolean
|
|
180
189
|
}
|
|
181
190
|
|
|
182
191
|
export interface DlxOptions {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
192
|
+
package: string
|
|
193
|
+
args: Array<string>
|
|
194
|
+
additionalPackages: Array<string>
|
|
195
|
+
shellMode: boolean
|
|
196
|
+
silent: boolean
|
|
188
197
|
}
|
|
189
198
|
|
|
190
199
|
export interface EditorconfigDefaults {
|
|
191
|
-
|
|
192
|
-
|
|
200
|
+
indent?: string
|
|
201
|
+
lineEnding?: string
|
|
193
202
|
}
|
|
194
203
|
|
|
195
204
|
export interface ExecOptions {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
205
|
+
command: string
|
|
206
|
+
args: Array<string>
|
|
207
|
+
shellMode: boolean
|
|
208
|
+
recursive: boolean
|
|
209
|
+
workspaceRoot: boolean
|
|
210
|
+
parallel: boolean
|
|
211
|
+
reverse: boolean
|
|
212
|
+
filter: Array<string>
|
|
204
213
|
}
|
|
205
214
|
|
|
206
215
|
/**
|
|
@@ -211,33 +220,33 @@ export interface ExecOptions {
|
|
|
211
220
|
* Returns `napi::Result<ExecResult>` -- throws a JS error for disallowed
|
|
212
221
|
* binaries or spawn failures, returns ExecResult with exit code otherwise.
|
|
213
222
|
*/
|
|
214
|
-
export declare function execPmCommand(bin: string, args: Array<string>, cwd: string): ExecResult
|
|
223
|
+
export declare function execPmCommand(bin: string, args: Array<string>, cwd: string): ExecResult
|
|
215
224
|
|
|
216
225
|
/**
|
|
217
226
|
* Executes a package manager command with inherited stdio (interactive).
|
|
218
227
|
* Returns exit code. Throws JS error for disallowed binaries or spawn failures.
|
|
219
228
|
*/
|
|
220
|
-
export declare function execPmCommandInteractive(bin: string, args: Array<string>, cwd: string): number
|
|
229
|
+
export declare function execPmCommandInteractive(bin: string, args: Array<string>, cwd: string): number
|
|
221
230
|
|
|
222
231
|
export interface ExecResult {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
232
|
+
code: number
|
|
233
|
+
stdout: string
|
|
234
|
+
stderr: string
|
|
226
235
|
}
|
|
227
236
|
|
|
228
237
|
export interface InstallOptions {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
238
|
+
frozenLockfile: boolean
|
|
239
|
+
prod: boolean
|
|
240
|
+
dev: boolean
|
|
241
|
+
noOptional: boolean
|
|
242
|
+
force: boolean
|
|
243
|
+
ignoreScripts: boolean
|
|
244
|
+
lockfileOnly: boolean
|
|
245
|
+
offline: boolean
|
|
246
|
+
silent: boolean
|
|
247
|
+
recursive: boolean
|
|
248
|
+
workspaceRoot: boolean
|
|
249
|
+
filter: Array<string>
|
|
241
250
|
}
|
|
242
251
|
|
|
243
252
|
/**
|
|
@@ -258,38 +267,38 @@ export interface InstallOptions {
|
|
|
258
267
|
* 6 — added `transform_ts`: oxc-based TS/JSX → JS transpile for the runtime
|
|
259
268
|
* loader (config / generators / `vis x`), replacing the `jiti` dependency.
|
|
260
269
|
*/
|
|
261
|
-
export const NATIVE_BINDING_VERSION: number
|
|
270
|
+
export declare const NATIVE_BINDING_VERSION: number
|
|
262
271
|
|
|
263
272
|
export interface NativeSortPackageJsonOptions {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
273
|
+
/** Enable formatted output with newlines (default: true) */
|
|
274
|
+
pretty?: boolean
|
|
275
|
+
/** Alphabetize script commands (default: false) */
|
|
276
|
+
sortScripts?: boolean
|
|
268
277
|
}
|
|
269
278
|
|
|
270
279
|
export interface NativeVulnerabilityJs {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
280
|
+
id: string
|
|
281
|
+
aliases: Array<string>
|
|
282
|
+
/** Normalized severity: "CRITICAL" | "HIGH" | "MODERATE" | "LOW" | "UNKNOWN". */
|
|
283
|
+
severity: string
|
|
284
|
+
summary: string
|
|
285
|
+
fixedVersions: Array<string>
|
|
286
|
+
cvssScore?: number
|
|
278
287
|
}
|
|
279
288
|
|
|
280
289
|
export interface OsvBloomBatchHit {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
290
|
+
/**
|
|
291
|
+
* Index into the input batch array. Lets JS reconstruct which
|
|
292
|
+
* lockfile row triggered the hit without re-walking the inputs.
|
|
293
|
+
*/
|
|
294
|
+
index: number
|
|
295
|
+
name: string
|
|
296
|
+
version: string
|
|
288
297
|
}
|
|
289
298
|
|
|
290
299
|
export interface OsvBloomBatchQuery {
|
|
291
|
-
|
|
292
|
-
|
|
300
|
+
name: string
|
|
301
|
+
version: string
|
|
293
302
|
}
|
|
294
303
|
|
|
295
304
|
/**
|
|
@@ -297,7 +306,7 @@ export interface OsvBloomBatchQuery {
|
|
|
297
306
|
* Returns an opaque handle; reuse it for every probe call until the
|
|
298
307
|
* JS-side cache invalidates.
|
|
299
308
|
*/
|
|
300
|
-
export declare function osvBloomDecode(bytes: Buffer): OsvBloomHandle
|
|
309
|
+
export declare function osvBloomDecode(bytes: Buffer): OsvBloomHandle
|
|
301
310
|
|
|
302
311
|
/**
|
|
303
312
|
* Probe a single `(name, version)` pair. Returns `true` when the pair
|
|
@@ -309,7 +318,7 @@ export declare function osvBloomDecode(bytes: Buffer): OsvBloomHandle;
|
|
|
309
318
|
* unbounded ranges still match. Unparseable versions probe only the
|
|
310
319
|
* wildcard bucket.
|
|
311
320
|
*/
|
|
312
|
-
export declare function osvBloomProbe(handle: OsvBloomHandle, name: string, version: string): boolean
|
|
321
|
+
export declare function osvBloomProbe(handle: OsvBloomHandle, name: string, version: string): boolean
|
|
313
322
|
|
|
314
323
|
/**
|
|
315
324
|
* Batch variant. Returns only the hits, with their original index — the
|
|
@@ -317,20 +326,20 @@ export declare function osvBloomProbe(handle: OsvBloomHandle, name: string, vers
|
|
|
317
326
|
* (`Vec<bool>` of length N) would dominate the cost. Order of returned
|
|
318
327
|
* hits matches input order.
|
|
319
328
|
*/
|
|
320
|
-
export declare function osvBloomProbeBatch(handle: OsvBloomHandle, queries: Array<OsvBloomBatchQuery>): Array<OsvBloomBatchHit
|
|
329
|
+
export declare function osvBloomProbeBatch(handle: OsvBloomHandle, queries: Array<OsvBloomBatchQuery>): Array<OsvBloomBatchHit>
|
|
321
330
|
|
|
322
331
|
export interface OutdatedOptions {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
332
|
+
packages: Array<string>
|
|
333
|
+
long: boolean
|
|
334
|
+
format: string
|
|
335
|
+
recursive: boolean
|
|
336
|
+
filter: Array<string>
|
|
337
|
+
workspaceRoot: boolean
|
|
338
|
+
prod: boolean
|
|
339
|
+
dev: boolean
|
|
340
|
+
noOptional: boolean
|
|
341
|
+
compatible: boolean
|
|
342
|
+
global: boolean
|
|
334
343
|
}
|
|
335
344
|
|
|
336
345
|
/**
|
|
@@ -340,33 +349,33 @@ export interface OutdatedOptions {
|
|
|
340
349
|
* pre-commit's behavior of treating "no shebang" as "no interpreter
|
|
341
350
|
* tags" rather than as an error.
|
|
342
351
|
*/
|
|
343
|
-
export declare function parseShebang(path: string): Array<string
|
|
352
|
+
export declare function parseShebang(path: string): Array<string>
|
|
344
353
|
|
|
345
354
|
export interface ProgressPayload {
|
|
346
|
-
|
|
347
|
-
|
|
355
|
+
current: number
|
|
356
|
+
total: number
|
|
348
357
|
}
|
|
349
358
|
|
|
350
359
|
export interface RemoveOptions {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
360
|
+
packages: Array<string>
|
|
361
|
+
saveDev: boolean
|
|
362
|
+
global: boolean
|
|
363
|
+
recursive: boolean
|
|
364
|
+
workspaceRoot: boolean
|
|
365
|
+
filter: Array<string>
|
|
357
366
|
}
|
|
358
367
|
|
|
359
|
-
export declare function resolveAdd(pm: string, version: string, opts: AddOptions): ResolvedCommand
|
|
368
|
+
export declare function resolveAdd(pm: string, version: string, opts: AddOptions): ResolvedCommand
|
|
360
369
|
|
|
361
370
|
export interface ResolvedCommand {
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
371
|
+
bin: string
|
|
372
|
+
args: Array<string>
|
|
373
|
+
warnings: Array<string>
|
|
365
374
|
}
|
|
366
375
|
|
|
367
|
-
export declare function resolveDedupe(pm: string, version: string, check: boolean): ResolvedCommand
|
|
376
|
+
export declare function resolveDedupe(pm: string, version: string, check: boolean): ResolvedCommand
|
|
368
377
|
|
|
369
|
-
export declare function resolveDlx(pm: string, version: string, opts: DlxOptions): ResolvedCommand
|
|
378
|
+
export declare function resolveDlx(pm: string, version: string, opts: DlxOptions): ResolvedCommand
|
|
370
379
|
|
|
371
380
|
/**
|
|
372
381
|
* Resolves `.editorconfig` defaults for `file_path` using the spec-compliant
|
|
@@ -376,27 +385,27 @@ export declare function resolveDlx(pm: string, version: string, opts: DlxOptions
|
|
|
376
385
|
* configured. Parse / IO failures collapse to an empty result so callers can
|
|
377
386
|
* fall back to content sniffing without try/catch noise.
|
|
378
387
|
*/
|
|
379
|
-
export declare function resolveEditorconfigDefaults(filePath: string): EditorconfigDefaults
|
|
388
|
+
export declare function resolveEditorconfigDefaults(filePath: string): EditorconfigDefaults
|
|
380
389
|
|
|
381
|
-
export declare function resolveExec(pm: string, version: string, opts: ExecOptions): ResolvedCommand
|
|
390
|
+
export declare function resolveExec(pm: string, version: string, opts: ExecOptions): ResolvedCommand
|
|
382
391
|
|
|
383
|
-
export declare function resolveInstall(pm: string, version: string, opts: InstallOptions): ResolvedCommand
|
|
392
|
+
export declare function resolveInstall(pm: string, version: string, opts: InstallOptions): ResolvedCommand
|
|
384
393
|
|
|
385
|
-
export declare function resolveLink(pm: string, version: string, target?: string | undefined | null): ResolvedCommand
|
|
394
|
+
export declare function resolveLink(pm: string, version: string, target?: string | undefined | null): ResolvedCommand
|
|
386
395
|
|
|
387
|
-
export declare function resolveOutdated(pm: string, version: string, opts: OutdatedOptions): ResolvedCommand
|
|
396
|
+
export declare function resolveOutdated(pm: string, version: string, opts: OutdatedOptions): ResolvedCommand
|
|
388
397
|
|
|
389
|
-
export declare function resolvePmCommand(pm: string, version: string, subcommand: string, extraArgs: Array<string>): ResolvedCommand
|
|
398
|
+
export declare function resolvePmCommand(pm: string, version: string, subcommand: string, extraArgs: Array<string>): ResolvedCommand
|
|
390
399
|
|
|
391
|
-
export declare function resolveRemove(pm: string, version: string, opts: RemoveOptions): ResolvedCommand
|
|
400
|
+
export declare function resolveRemove(pm: string, version: string, opts: RemoveOptions): ResolvedCommand
|
|
392
401
|
|
|
393
|
-
export declare function resolveUnlink(pm: string, version: string, packages: Array<string>, recursive: boolean): ResolvedCommand
|
|
402
|
+
export declare function resolveUnlink(pm: string, version: string, packages: Array<string>, recursive: boolean): ResolvedCommand
|
|
394
403
|
|
|
395
|
-
export declare function resolveWhy(pm: string, version: string, opts: WhyOptions): ResolvedCommand
|
|
404
|
+
export declare function resolveWhy(pm: string, version: string, opts: WhyOptions): ResolvedCommand
|
|
396
405
|
|
|
397
|
-
export declare function sortPackageJsonString(contents: string): string
|
|
406
|
+
export declare function sortPackageJsonString(contents: string): string
|
|
398
407
|
|
|
399
|
-
export declare function sortPackageJsonStringWithOptions(contents: string, options: NativeSortPackageJsonOptions): string
|
|
408
|
+
export declare function sortPackageJsonStringWithOptions(contents: string, options: NativeSortPackageJsonOptions): string
|
|
400
409
|
|
|
401
410
|
/**
|
|
402
411
|
* Classifies a single file path using `prek-identify`. Returns the set of
|
|
@@ -405,7 +414,7 @@ export declare function sortPackageJsonStringWithOptions(contents: string, optio
|
|
|
405
414
|
* don't need try/catch — the vis hook runtime treats "unclassified" and
|
|
406
415
|
* "no tags" identically.
|
|
407
416
|
*/
|
|
408
|
-
export declare function tagsFromPath(path: string): Array<string
|
|
417
|
+
export declare function tagsFromPath(path: string): Array<string>
|
|
409
418
|
|
|
410
419
|
/**
|
|
411
420
|
* Batch variant of [`tags_from_path`]. Returns one tag list per input
|
|
@@ -414,11 +423,11 @@ export declare function tagsFromPath(path: string): Array<string>;
|
|
|
414
423
|
* (the same behavior pre-commit applies when stat-ing a deleted staged
|
|
415
424
|
* file mid-run).
|
|
416
425
|
*/
|
|
417
|
-
export declare function tagsFromPaths(paths: Array<string>): Array<Array<string
|
|
426
|
+
export declare function tagsFromPaths(paths: Array<string>): Array<Array<string>>
|
|
418
427
|
|
|
419
428
|
export interface TransformResult {
|
|
420
|
-
|
|
421
|
-
|
|
429
|
+
/** Transpiled JavaScript source. */
|
|
430
|
+
code: string
|
|
422
431
|
}
|
|
423
432
|
|
|
424
433
|
/**
|
|
@@ -426,25 +435,25 @@ export interface TransformResult {
|
|
|
426
435
|
* source dialect by extension (`.ts`/`.tsx`/`.mts`/`.cts`/`.js`/...). Returns the
|
|
427
436
|
* emitted JS; throws on a fatal parse failure.
|
|
428
437
|
*/
|
|
429
|
-
export declare function transformTs(filename: string, source: string): TransformResult
|
|
438
|
+
export declare function transformTs(filename: string, source: string): TransformResult
|
|
430
439
|
|
|
431
440
|
/**
|
|
432
441
|
* Finds the full path to a binary using `which`-style lookup.
|
|
433
442
|
* Returns None if not found.
|
|
434
443
|
*/
|
|
435
|
-
export declare function whichBin(name: string): string | null
|
|
444
|
+
export declare function whichBin(name: string): string | null
|
|
436
445
|
|
|
437
446
|
export interface WhyOptions {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
447
|
+
packages: Array<string>
|
|
448
|
+
json: boolean
|
|
449
|
+
long: boolean
|
|
450
|
+
parseable: boolean
|
|
451
|
+
recursive: boolean
|
|
452
|
+
dev: boolean
|
|
453
|
+
prod: boolean
|
|
454
|
+
noOptional: boolean
|
|
455
|
+
global: boolean
|
|
456
|
+
/** Depth limit. Uses Option<i32> directly (napi supports it). */
|
|
457
|
+
depth?: number
|
|
458
|
+
filter: Array<string>
|
|
450
459
|
}
|