@visulima/vis 1.0.0-alpha.19 → 1.0.0-alpha.20
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 +164 -0
- package/LICENSE.md +187 -779
- package/README.md +1 -1
- package/dist/config/index.d.ts +535 -121
- package/dist/config/index.js +1 -1
- package/dist/packem_chunks/bin.js +380 -286
- package/dist/packem_chunks/config.js +15 -14
- package/dist/packem_chunks/doctor-probe.js +2 -2
- package/dist/packem_chunks/fix.js +9 -9
- package/dist/packem_chunks/handler.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -2
- package/dist/packem_chunks/handler11.js +5 -1
- package/dist/packem_chunks/handler12.js +1 -5
- package/dist/packem_chunks/handler13.js +27 -1
- package/dist/packem_chunks/handler14.js +5 -20
- package/dist/packem_chunks/handler15.js +1 -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 -5
- package/dist/packem_chunks/handler20.js +5 -2
- package/dist/packem_chunks/handler21.js +2 -18
- package/dist/packem_chunks/handler22.js +2 -1
- package/dist/packem_chunks/handler23.js +18 -1
- package/dist/packem_chunks/handler24.js +1 -5
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler26.js +5 -3
- package/dist/packem_chunks/handler27.js +1 -1
- package/dist/packem_chunks/handler28.js +3 -1
- package/dist/packem_chunks/handler29.js +1 -7
- package/dist/packem_chunks/handler3.js +3 -3
- package/dist/packem_chunks/handler30.js +6 -22
- package/dist/packem_chunks/handler31.js +33 -3
- package/dist/packem_chunks/handler32.js +3 -1
- package/dist/packem_chunks/handler33.js +1 -2
- package/dist/packem_chunks/handler34.js +25 -24
- package/dist/packem_chunks/handler35.js +3 -3
- package/dist/packem_chunks/handler36.js +6 -21
- package/dist/packem_chunks/handler37.js +22 -428
- package/dist/packem_chunks/handler38.js +428 -6
- package/dist/packem_chunks/handler39.js +6 -5
- package/dist/packem_chunks/handler4.js +8 -2
- package/dist/packem_chunks/handler40.js +24 -10
- package/dist/packem_chunks/handler41.js +10 -24
- package/dist/packem_chunks/handler42.js +1 -1
- package/dist/packem_chunks/handler43.js +6 -6
- package/dist/packem_chunks/handler44.js +13 -13
- package/dist/packem_chunks/handler45.js +213 -3
- package/dist/packem_chunks/handler46.js +3 -27
- package/dist/packem_chunks/handler47.js +21 -161
- package/dist/packem_chunks/handler48.js +166 -33
- package/dist/packem_chunks/handler49.js +34 -0
- package/dist/packem_chunks/handler5.js +1 -8
- 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 +2 -1
- package/dist/packem_chunks/heal-accept.js +2 -2
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +16 -16
- package/dist/packem_chunks/index.js +6 -6
- package/dist/packem_chunks/keys-refresh.js +4 -0
- package/dist/packem_chunks/list.js +3 -0
- package/dist/packem_chunks/loader.js +1 -1
- package/dist/packem_chunks/prune.js +3 -0
- package/dist/packem_chunks/run.js +1 -0
- package/dist/packem_chunks/status.js +2 -0
- package/dist/packem_chunks/sync.js +2 -0
- package/dist/packem_chunks/sync2.js +2 -0
- package/dist/packem_chunks/tripwire.js +2 -0
- package/dist/packem_shared/advisories-DsynpacV.js +1 -0
- package/dist/packem_shared/{ai-analysis-C_GpXikx.js → ai-analysis-uYuTIIXi.js} +1 -1
- package/dist/packem_shared/{ai-cache-DrCLD4gc.js → ai-cache-DuwHYx2O.js} +1 -1
- package/dist/packem_shared/{ai-fix-CWOz12Om.js → ai-fix-DzrA-dVz.js} +4 -4
- package/dist/packem_shared/applyDefaults-BOVDw1jD.js +1 -0
- package/dist/packem_shared/build-scripts-DsWMSWDs.js +1 -0
- package/dist/packem_shared/{cache-directory-C_U1qsIw.js → cache-directory-DQak1Vjc.js} +1 -1
- package/dist/packem_shared/cyclonedx-CiHXuG8M.js +4 -0
- package/dist/packem_shared/dependency-scan-DC3nAFHS.js +1 -0
- package/dist/packem_shared/{docker-B4s1fjiN.js → docker-B-CIN_nj.js} +19 -19
- package/dist/packem_shared/{failure-log-CSC6KfcO.js → failure-log-C3LEMmkq.js} +1 -1
- package/dist/packem_shared/{flakiness-DUtrm-wS.js → flakiness-Dq6K4ymq.js} +1 -1
- package/dist/packem_shared/glob-MHJQjR39-CQ2GC0b_.js +1 -0
- package/dist/packem_shared/{lifecycle-CgK8pcfa.js → lifecycle-Dv3nAtoD.js} +2 -2
- package/dist/packem_shared/{lockfile-i-qvq_k8.js → lockfile-C5DYMHVq.js} +1 -1
- package/dist/packem_shared/manifests-B0fMp872.js +1 -0
- package/dist/packem_shared/min-release-age-BFozFonQ.js +34 -0
- package/dist/packem_shared/native-config-sync-Dvi1g2nQ.js +21 -0
- package/dist/packem_shared/registry-keys-CewRFW0e.js +1 -0
- package/dist/packem_shared/resolve-explicit-CC4Kifk5.js +5 -0
- package/dist/packem_shared/{run-summary-utils-CJv75pla.js → run-summary-utils-BaBGP3bo.js} +1 -1
- package/dist/packem_shared/{runtime-check-CBU6W8qG.js → runtime-check-BusAwPb2.js} +1 -1
- package/dist/packem_shared/scan-progress-CMynp3eA.js +2 -0
- package/dist/packem_shared/signatures-5ZdjJ2Pu.js +2 -0
- package/dist/packem_shared/{toolchain-B7dckBQ1.js → toolchain-Cc3cwyLP.js} +3 -3
- package/dist/packem_shared/typosquats-BCeR-sLf.js +1 -0
- package/dist/packem_shared/verify-07kUNTuP.js +1 -0
- package/dist/packem_shared/{vis-update-app-D0uL3eO5.js → vis-update-app-CFrlJ3mW.js} +1 -1
- package/index.d.ts +358 -0
- package/index.js +56 -53
- package/package.json +14 -13
- package/schemas/vis-config.schema.json +595 -100
- package/dist/packem_shared/applyDefaults-DLY94gWA.js +0 -1
- package/dist/packem_shared/dependency-scan-YdgNVvoz.js +0 -2
- package/dist/packem_shared/readTomlSync-1fKo0R52-DtxWULlF.js +0 -109
- package/dist/packem_shared/typosquats-B3A38-qx.js +0 -1
- package/dist/packem_shared/verify-WDStBFvK.js +0 -1
package/index.d.ts
ADDED
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
/* auto-generated by NAPI-RS */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export interface AddOptions {
|
|
4
|
+
packages: Array<string>
|
|
5
|
+
saveDev: boolean
|
|
6
|
+
exact: boolean
|
|
7
|
+
peer: boolean
|
|
8
|
+
optional: boolean
|
|
9
|
+
global: boolean
|
|
10
|
+
workspace: boolean
|
|
11
|
+
workspaceRoot: boolean
|
|
12
|
+
filter: Array<string>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Ingest one OSV ecosystem dump into the local SQLite. Async because the
|
|
17
|
+
* zip → JSON → INSERT pipeline can take seconds; we run it on a libuv worker
|
|
18
|
+
* so the main JS thread is free.
|
|
19
|
+
*/
|
|
20
|
+
export declare function advisoriesIngest(options: AdvisoryIngestOptions, onProgress: (current: number, total: number) => void): Promise<AdvisoryIngestResult>
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Synchronous query path. Returns one `AdvisoryQueryResult` per input,
|
|
24
|
+
* preserving order, so callers can zip back to their lockfile rows by index.
|
|
25
|
+
*/
|
|
26
|
+
export declare function advisoriesQuery(dbPath: string, queries: Array<AdvisoryQuery>): Array<AdvisoryQueryResult>
|
|
27
|
+
|
|
28
|
+
export declare function advisoriesStatus(dbPath: string): AdvisoryDbStatus
|
|
29
|
+
|
|
30
|
+
export interface AdvisoryDbStatus {
|
|
31
|
+
exists: boolean
|
|
32
|
+
ecosystems: Array<AdvisoryEcosystemStatus>
|
|
33
|
+
sizeBytes: number
|
|
34
|
+
schemaVersion: number
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface AdvisoryEcosystemStatus {
|
|
38
|
+
name: string
|
|
39
|
+
advisoryCount: number
|
|
40
|
+
lastSyncIso: string
|
|
41
|
+
manifestEtag?: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface AdvisoryIngestOptions {
|
|
45
|
+
/** Path to a previously-downloaded OSV dump zip on disk. */
|
|
46
|
+
zipPath: string
|
|
47
|
+
dbPath: string
|
|
48
|
+
ecosystem: string
|
|
49
|
+
/**
|
|
50
|
+
* HTTP ETag header to write into the `manifest_etag` meta row for this
|
|
51
|
+
* ecosystem. `null` when the server didn't send one.
|
|
52
|
+
*/
|
|
53
|
+
manifestEtag?: string
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface AdvisoryIngestResult {
|
|
57
|
+
advisoriesIngested: number
|
|
58
|
+
durationMs: number
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface AdvisoryQuery {
|
|
62
|
+
ecosystem: string
|
|
63
|
+
name: string
|
|
64
|
+
version: string
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface AdvisoryQueryResult {
|
|
68
|
+
name: string
|
|
69
|
+
version: string
|
|
70
|
+
vulnerabilities: Array<NativeVulnerabilityJs>
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Returns the full prek-identify tag universe. Used by the vis migrator
|
|
75
|
+
* to validate `types:` / `types_or:` / `exclude_types:` filters in
|
|
76
|
+
* migrated `.pre-commit-config.yaml` files — anything outside this set
|
|
77
|
+
* (and outside the vis-specific overlay) is surfaced as a warning.
|
|
78
|
+
*/
|
|
79
|
+
export declare function allKnownTags(): Array<string>
|
|
80
|
+
|
|
81
|
+
export interface CleanResult {
|
|
82
|
+
/** Directories that were removed */
|
|
83
|
+
removed: Array<string>
|
|
84
|
+
/** Directories that failed to remove (with error messages) */
|
|
85
|
+
errors: Array<string>
|
|
86
|
+
/** Lockfiles that were removed (when --lockfile flag used) */
|
|
87
|
+
lockfilesRemoved: Array<string>
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Safely removes all node_modules directories in a workspace.
|
|
92
|
+
*
|
|
93
|
+
* Uses Rust's `fs::remove_dir_all` which correctly handles symlinks and
|
|
94
|
+
* NTFS junctions on Windows without following them into targets.
|
|
95
|
+
*
|
|
96
|
+
* When `remove_lockfile` is true, also removes lockfiles from the root.
|
|
97
|
+
*/
|
|
98
|
+
export declare function cleanWorkspace(root: string, removeLockfile: boolean): CleanResult
|
|
99
|
+
|
|
100
|
+
export interface DetectedPackageManager {
|
|
101
|
+
/** The package manager name: "pnpm", "npm", "yarn", "bun", or "deno" */
|
|
102
|
+
name: string
|
|
103
|
+
/** The version string from packageManager field, or None if unknown */
|
|
104
|
+
version?: string
|
|
105
|
+
/**
|
|
106
|
+
* Build metadata (sha256 hash) appended to packageManager field by
|
|
107
|
+
* corepack. `parts[1].split('+').next()` strips it from `version`;
|
|
108
|
+
* this field preserves it for callers that want to verify the pin.
|
|
109
|
+
*/
|
|
110
|
+
buildMeta?: string
|
|
111
|
+
/** Whether this is a monorepo/workspace */
|
|
112
|
+
isWorkspace: boolean
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Detects the package manager for the project at the given path.
|
|
117
|
+
* Priority: packageManager field > lockfiles > config files >
|
|
118
|
+
* `npm_config_user_agent` env var > default (pnpm).
|
|
119
|
+
*
|
|
120
|
+
* `opts` lets callers skip individual sources. `None` opts default
|
|
121
|
+
* to "use the source".
|
|
122
|
+
*
|
|
123
|
+
* Returns `napi::Result` so any I/O errors surface as JS exceptions.
|
|
124
|
+
*/
|
|
125
|
+
export declare function detectPackageManager(cwd: string, opts?: DetectPackageManagerOptions | undefined | null): DetectedPackageManager
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Options controlling which detection sources to consult.
|
|
129
|
+
*
|
|
130
|
+
* Matches nypm's `detectPackageManager` opts. All flags are
|
|
131
|
+
* `Option<bool>` so callers can omit them; `None` is treated as the
|
|
132
|
+
* default (use the source). Mirrors the JS-side ergonomics where
|
|
133
|
+
* `{}` enables every source.
|
|
134
|
+
*/
|
|
135
|
+
export interface DetectPackageManagerOptions {
|
|
136
|
+
/** Skip reading the `packageManager` field in package.json. */
|
|
137
|
+
ignorePackageJson?: boolean
|
|
138
|
+
/** Skip lockfile walk (pnpm-lock.yaml, yarn.lock, …). */
|
|
139
|
+
ignoreLockFile?: boolean
|
|
140
|
+
/**
|
|
141
|
+
* Skip the `npm_config_user_agent` env-var fallback. Set by every
|
|
142
|
+
* PM when running scripts; lets a tool spawned from `pnpm run x`
|
|
143
|
+
* know it's pnpm even without a lockfile.
|
|
144
|
+
*/
|
|
145
|
+
ignoreArgv?: boolean
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export interface DlxOptions {
|
|
149
|
+
package: string
|
|
150
|
+
args: Array<string>
|
|
151
|
+
additionalPackages: Array<string>
|
|
152
|
+
shellMode: boolean
|
|
153
|
+
silent: boolean
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface EditorconfigDefaults {
|
|
157
|
+
indent?: string
|
|
158
|
+
lineEnding?: string
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface ExecOptions {
|
|
162
|
+
command: string
|
|
163
|
+
args: Array<string>
|
|
164
|
+
shellMode: boolean
|
|
165
|
+
recursive: boolean
|
|
166
|
+
workspaceRoot: boolean
|
|
167
|
+
parallel: boolean
|
|
168
|
+
reverse: boolean
|
|
169
|
+
filter: Array<string>
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Executes a package manager command synchronously.
|
|
174
|
+
* Uses Rust's std::process::Command for maximum performance.
|
|
175
|
+
* Only allowed binaries can be executed (see ALLOWED_BINS).
|
|
176
|
+
*
|
|
177
|
+
* Returns `napi::Result<ExecResult>` -- throws a JS error for disallowed
|
|
178
|
+
* binaries or spawn failures, returns ExecResult with exit code otherwise.
|
|
179
|
+
*/
|
|
180
|
+
export declare function execPmCommand(bin: string, args: Array<string>, cwd: string): ExecResult
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Executes a package manager command with inherited stdio (interactive).
|
|
184
|
+
* Returns exit code. Throws JS error for disallowed binaries or spawn failures.
|
|
185
|
+
*/
|
|
186
|
+
export declare function execPmCommandInteractive(bin: string, args: Array<string>, cwd: string): number
|
|
187
|
+
|
|
188
|
+
export interface ExecResult {
|
|
189
|
+
code: number
|
|
190
|
+
stdout: string
|
|
191
|
+
stderr: string
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface InstallOptions {
|
|
195
|
+
frozenLockfile: boolean
|
|
196
|
+
prod: boolean
|
|
197
|
+
dev: boolean
|
|
198
|
+
noOptional: boolean
|
|
199
|
+
force: boolean
|
|
200
|
+
ignoreScripts: boolean
|
|
201
|
+
lockfileOnly: boolean
|
|
202
|
+
offline: boolean
|
|
203
|
+
silent: boolean
|
|
204
|
+
recursive: boolean
|
|
205
|
+
workspaceRoot: boolean
|
|
206
|
+
filter: Array<string>
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* ABI compatibility version. Bump this whenever any `#[napi]` function
|
|
211
|
+
* signature changes so the TypeScript loader can reject stale `.node`
|
|
212
|
+
* files (e.g. a local build from before the change) that would
|
|
213
|
+
* otherwise silently misinterpret arguments.
|
|
214
|
+
*
|
|
215
|
+
* Version history:
|
|
216
|
+
* 1 — initial versioned ABI. `resolve_link` gained a `version` parameter.
|
|
217
|
+
* 2 — added `resolve_editorconfig_defaults` (replaces the `editorconfig` npm package).
|
|
218
|
+
* 3 — added prek-identify bindings: `tags_from_path`, `tags_from_paths`,
|
|
219
|
+
* `parse_shebang`, `all_known_tags`.
|
|
220
|
+
* 4 — added offline advisories: `advisories_ingest`, `advisories_query`,
|
|
221
|
+
* `advisories_status`. Backed by bundled SQLite (rusqlite) + zip.
|
|
222
|
+
*/
|
|
223
|
+
export const NATIVE_BINDING_VERSION: number
|
|
224
|
+
|
|
225
|
+
export interface NativeSortPackageJsonOptions {
|
|
226
|
+
/** Enable formatted output with newlines (default: true) */
|
|
227
|
+
pretty?: boolean
|
|
228
|
+
/** Alphabetize script commands (default: false) */
|
|
229
|
+
sortScripts?: boolean
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export interface NativeVulnerabilityJs {
|
|
233
|
+
id: string
|
|
234
|
+
aliases: Array<string>
|
|
235
|
+
/** Normalized severity: "CRITICAL" | "HIGH" | "MODERATE" | "LOW" | "UNKNOWN". */
|
|
236
|
+
severity: string
|
|
237
|
+
summary: string
|
|
238
|
+
fixedVersions: Array<string>
|
|
239
|
+
cvssScore?: number
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface OutdatedOptions {
|
|
243
|
+
packages: Array<string>
|
|
244
|
+
long: boolean
|
|
245
|
+
format: string
|
|
246
|
+
recursive: boolean
|
|
247
|
+
filter: Array<string>
|
|
248
|
+
workspaceRoot: boolean
|
|
249
|
+
prod: boolean
|
|
250
|
+
dev: boolean
|
|
251
|
+
noOptional: boolean
|
|
252
|
+
compatible: boolean
|
|
253
|
+
global: boolean
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Parses the shebang line of an executable file, returning the
|
|
258
|
+
* interpreter argv (e.g. `["python3"]`, `["env", "node"]`). Returns an
|
|
259
|
+
* empty vector when the file has no shebang or cannot be read — mirrors
|
|
260
|
+
* pre-commit's behavior of treating "no shebang" as "no interpreter
|
|
261
|
+
* tags" rather than as an error.
|
|
262
|
+
*/
|
|
263
|
+
export declare function parseShebang(path: string): Array<string>
|
|
264
|
+
|
|
265
|
+
export interface ProgressPayload {
|
|
266
|
+
current: number
|
|
267
|
+
total: number
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export interface RemoveOptions {
|
|
271
|
+
packages: Array<string>
|
|
272
|
+
saveDev: boolean
|
|
273
|
+
global: boolean
|
|
274
|
+
recursive: boolean
|
|
275
|
+
workspaceRoot: boolean
|
|
276
|
+
filter: Array<string>
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export declare function resolveAdd(pm: string, version: string, opts: AddOptions): ResolvedCommand
|
|
280
|
+
|
|
281
|
+
export interface ResolvedCommand {
|
|
282
|
+
bin: string
|
|
283
|
+
args: Array<string>
|
|
284
|
+
warnings: Array<string>
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export declare function resolveDedupe(pm: string, version: string, check: boolean): ResolvedCommand
|
|
288
|
+
|
|
289
|
+
export declare function resolveDlx(pm: string, version: string, opts: DlxOptions): ResolvedCommand
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Resolves `.editorconfig` defaults for `file_path` using the spec-compliant
|
|
293
|
+
* `ec4rs` parser. Mirrors the previous `editorconfig` npm package surface
|
|
294
|
+
* consumed by `src/util/editorconfig.ts`: returns the indent string and a
|
|
295
|
+
* normalized line-ending tag, or `None` for either when no usable value is
|
|
296
|
+
* configured. Parse / IO failures collapse to an empty result so callers can
|
|
297
|
+
* fall back to content sniffing without try/catch noise.
|
|
298
|
+
*/
|
|
299
|
+
export declare function resolveEditorconfigDefaults(filePath: string): EditorconfigDefaults
|
|
300
|
+
|
|
301
|
+
export declare function resolveExec(pm: string, version: string, opts: ExecOptions): ResolvedCommand
|
|
302
|
+
|
|
303
|
+
export declare function resolveInstall(pm: string, version: string, opts: InstallOptions): ResolvedCommand
|
|
304
|
+
|
|
305
|
+
export declare function resolveLink(pm: string, version: string, target?: string | undefined | null): ResolvedCommand
|
|
306
|
+
|
|
307
|
+
export declare function resolveOutdated(pm: string, version: string, opts: OutdatedOptions): ResolvedCommand
|
|
308
|
+
|
|
309
|
+
export declare function resolvePmCommand(pm: string, version: string, subcommand: string, extraArgs: Array<string>): ResolvedCommand
|
|
310
|
+
|
|
311
|
+
export declare function resolveRemove(pm: string, version: string, opts: RemoveOptions): ResolvedCommand
|
|
312
|
+
|
|
313
|
+
export declare function resolveUnlink(pm: string, version: string, packages: Array<string>, recursive: boolean): ResolvedCommand
|
|
314
|
+
|
|
315
|
+
export declare function resolveWhy(pm: string, version: string, opts: WhyOptions): ResolvedCommand
|
|
316
|
+
|
|
317
|
+
export declare function sortPackageJsonString(contents: string): string
|
|
318
|
+
|
|
319
|
+
export declare function sortPackageJsonStringWithOptions(contents: string, options: NativeSortPackageJsonOptions): string
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Classifies a single file path using `prek-identify`. Returns the set of
|
|
323
|
+
* tags (extensions, interpreters, metadata) that pre-commit / prek would
|
|
324
|
+
* associate with the file. Errors collapse to an empty vector so callers
|
|
325
|
+
* don't need try/catch — the vis hook runtime treats "unclassified" and
|
|
326
|
+
* "no tags" identically.
|
|
327
|
+
*/
|
|
328
|
+
export declare function tagsFromPath(path: string): Array<string>
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Batch variant of [`tags_from_path`]. Returns one tag list per input
|
|
332
|
+
* path in the same order. Errors for individual paths collapse to empty
|
|
333
|
+
* vectors so partial classification failures don't fail the whole batch
|
|
334
|
+
* (the same behavior pre-commit applies when stat-ing a deleted staged
|
|
335
|
+
* file mid-run).
|
|
336
|
+
*/
|
|
337
|
+
export declare function tagsFromPaths(paths: Array<string>): Array<Array<string>>
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Finds the full path to a binary using `which`-style lookup.
|
|
341
|
+
* Returns None if not found.
|
|
342
|
+
*/
|
|
343
|
+
export declare function whichBin(name: string): string | null
|
|
344
|
+
|
|
345
|
+
export interface WhyOptions {
|
|
346
|
+
packages: Array<string>
|
|
347
|
+
json: boolean
|
|
348
|
+
long: boolean
|
|
349
|
+
parseable: boolean
|
|
350
|
+
recursive: boolean
|
|
351
|
+
dev: boolean
|
|
352
|
+
prod: boolean
|
|
353
|
+
noOptional: boolean
|
|
354
|
+
global: boolean
|
|
355
|
+
/** Depth limit. Uses Option<i32> directly (napi supports it). */
|
|
356
|
+
depth?: number
|
|
357
|
+
filter: Array<string>
|
|
358
|
+
}
|
package/index.js
CHANGED
|
@@ -81,8 +81,8 @@ function requireNative() {
|
|
|
81
81
|
try {
|
|
82
82
|
const binding = require('@visulima/vis-binding-android-arm64')
|
|
83
83
|
const bindingPackageVersion = require('@visulima/vis-binding-android-arm64/package.json').version
|
|
84
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
85
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
84
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
85
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
86
86
|
}
|
|
87
87
|
return binding
|
|
88
88
|
} catch (e) {
|
|
@@ -97,8 +97,8 @@ function requireNative() {
|
|
|
97
97
|
try {
|
|
98
98
|
const binding = require('@visulima/vis-binding-android-arm-eabi')
|
|
99
99
|
const bindingPackageVersion = require('@visulima/vis-binding-android-arm-eabi/package.json').version
|
|
100
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
101
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
100
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
101
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
102
102
|
}
|
|
103
103
|
return binding
|
|
104
104
|
} catch (e) {
|
|
@@ -118,8 +118,8 @@ function requireNative() {
|
|
|
118
118
|
try {
|
|
119
119
|
const binding = require('@visulima/vis-binding-win32-x64-gnu')
|
|
120
120
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-gnu/package.json').version
|
|
121
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
122
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
121
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
122
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
123
123
|
}
|
|
124
124
|
return binding
|
|
125
125
|
} catch (e) {
|
|
@@ -134,8 +134,8 @@ function requireNative() {
|
|
|
134
134
|
try {
|
|
135
135
|
const binding = require('@visulima/vis-binding-win32-x64-msvc')
|
|
136
136
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-x64-msvc/package.json').version
|
|
137
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
138
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
137
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
138
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
139
139
|
}
|
|
140
140
|
return binding
|
|
141
141
|
} catch (e) {
|
|
@@ -151,8 +151,8 @@ function requireNative() {
|
|
|
151
151
|
try {
|
|
152
152
|
const binding = require('@visulima/vis-binding-win32-ia32-msvc')
|
|
153
153
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-ia32-msvc/package.json').version
|
|
154
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
155
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
154
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
155
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
156
156
|
}
|
|
157
157
|
return binding
|
|
158
158
|
} catch (e) {
|
|
@@ -167,8 +167,8 @@ function requireNative() {
|
|
|
167
167
|
try {
|
|
168
168
|
const binding = require('@visulima/vis-binding-win32-arm64-msvc')
|
|
169
169
|
const bindingPackageVersion = require('@visulima/vis-binding-win32-arm64-msvc/package.json').version
|
|
170
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
171
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
170
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
171
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
172
172
|
}
|
|
173
173
|
return binding
|
|
174
174
|
} catch (e) {
|
|
@@ -186,8 +186,8 @@ function requireNative() {
|
|
|
186
186
|
try {
|
|
187
187
|
const binding = require('@visulima/vis-binding-darwin-universal')
|
|
188
188
|
const bindingPackageVersion = require('@visulima/vis-binding-darwin-universal/package.json').version
|
|
189
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
190
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
189
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
190
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
191
191
|
}
|
|
192
192
|
return binding
|
|
193
193
|
} catch (e) {
|
|
@@ -202,8 +202,8 @@ function requireNative() {
|
|
|
202
202
|
try {
|
|
203
203
|
const binding = require('@visulima/vis-binding-darwin-x64')
|
|
204
204
|
const bindingPackageVersion = require('@visulima/vis-binding-darwin-x64/package.json').version
|
|
205
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
206
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
205
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
206
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
207
207
|
}
|
|
208
208
|
return binding
|
|
209
209
|
} catch (e) {
|
|
@@ -218,8 +218,8 @@ function requireNative() {
|
|
|
218
218
|
try {
|
|
219
219
|
const binding = require('@visulima/vis-binding-darwin-arm64')
|
|
220
220
|
const bindingPackageVersion = require('@visulima/vis-binding-darwin-arm64/package.json').version
|
|
221
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
222
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
221
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
222
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
223
223
|
}
|
|
224
224
|
return binding
|
|
225
225
|
} catch (e) {
|
|
@@ -238,8 +238,8 @@ function requireNative() {
|
|
|
238
238
|
try {
|
|
239
239
|
const binding = require('@visulima/vis-binding-freebsd-x64')
|
|
240
240
|
const bindingPackageVersion = require('@visulima/vis-binding-freebsd-x64/package.json').version
|
|
241
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
241
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
242
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
243
243
|
}
|
|
244
244
|
return binding
|
|
245
245
|
} catch (e) {
|
|
@@ -254,8 +254,8 @@ function requireNative() {
|
|
|
254
254
|
try {
|
|
255
255
|
const binding = require('@visulima/vis-binding-freebsd-arm64')
|
|
256
256
|
const bindingPackageVersion = require('@visulima/vis-binding-freebsd-arm64/package.json').version
|
|
257
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
258
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
257
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
258
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
259
259
|
}
|
|
260
260
|
return binding
|
|
261
261
|
} catch (e) {
|
|
@@ -275,8 +275,8 @@ function requireNative() {
|
|
|
275
275
|
try {
|
|
276
276
|
const binding = require('@visulima/vis-binding-linux-x64-musl')
|
|
277
277
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-musl/package.json').version
|
|
278
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
279
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
278
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
279
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
280
280
|
}
|
|
281
281
|
return binding
|
|
282
282
|
} catch (e) {
|
|
@@ -291,8 +291,8 @@ function requireNative() {
|
|
|
291
291
|
try {
|
|
292
292
|
const binding = require('@visulima/vis-binding-linux-x64-gnu')
|
|
293
293
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-x64-gnu/package.json').version
|
|
294
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
295
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
294
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
295
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
296
296
|
}
|
|
297
297
|
return binding
|
|
298
298
|
} catch (e) {
|
|
@@ -309,8 +309,8 @@ function requireNative() {
|
|
|
309
309
|
try {
|
|
310
310
|
const binding = require('@visulima/vis-binding-linux-arm64-musl')
|
|
311
311
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-musl/package.json').version
|
|
312
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
313
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
312
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
313
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
314
314
|
}
|
|
315
315
|
return binding
|
|
316
316
|
} catch (e) {
|
|
@@ -325,8 +325,8 @@ function requireNative() {
|
|
|
325
325
|
try {
|
|
326
326
|
const binding = require('@visulima/vis-binding-linux-arm64-gnu')
|
|
327
327
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm64-gnu/package.json').version
|
|
328
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
328
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
330
330
|
}
|
|
331
331
|
return binding
|
|
332
332
|
} catch (e) {
|
|
@@ -343,8 +343,8 @@ function requireNative() {
|
|
|
343
343
|
try {
|
|
344
344
|
const binding = require('@visulima/vis-binding-linux-arm-musleabihf')
|
|
345
345
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-musleabihf/package.json').version
|
|
346
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
347
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
346
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
347
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
348
348
|
}
|
|
349
349
|
return binding
|
|
350
350
|
} catch (e) {
|
|
@@ -359,8 +359,8 @@ function requireNative() {
|
|
|
359
359
|
try {
|
|
360
360
|
const binding = require('@visulima/vis-binding-linux-arm-gnueabihf')
|
|
361
361
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-arm-gnueabihf/package.json').version
|
|
362
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
363
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
362
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
363
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
364
364
|
}
|
|
365
365
|
return binding
|
|
366
366
|
} catch (e) {
|
|
@@ -377,8 +377,8 @@ function requireNative() {
|
|
|
377
377
|
try {
|
|
378
378
|
const binding = require('@visulima/vis-binding-linux-loong64-musl')
|
|
379
379
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-musl/package.json').version
|
|
380
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
381
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
380
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
381
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
382
382
|
}
|
|
383
383
|
return binding
|
|
384
384
|
} catch (e) {
|
|
@@ -393,8 +393,8 @@ function requireNative() {
|
|
|
393
393
|
try {
|
|
394
394
|
const binding = require('@visulima/vis-binding-linux-loong64-gnu')
|
|
395
395
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-loong64-gnu/package.json').version
|
|
396
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
397
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
396
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
397
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
398
398
|
}
|
|
399
399
|
return binding
|
|
400
400
|
} catch (e) {
|
|
@@ -411,8 +411,8 @@ function requireNative() {
|
|
|
411
411
|
try {
|
|
412
412
|
const binding = require('@visulima/vis-binding-linux-riscv64-musl')
|
|
413
413
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-musl/package.json').version
|
|
414
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
415
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
414
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
415
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
416
416
|
}
|
|
417
417
|
return binding
|
|
418
418
|
} catch (e) {
|
|
@@ -427,8 +427,8 @@ function requireNative() {
|
|
|
427
427
|
try {
|
|
428
428
|
const binding = require('@visulima/vis-binding-linux-riscv64-gnu')
|
|
429
429
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-riscv64-gnu/package.json').version
|
|
430
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
431
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
430
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
431
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
432
432
|
}
|
|
433
433
|
return binding
|
|
434
434
|
} catch (e) {
|
|
@@ -444,8 +444,8 @@ function requireNative() {
|
|
|
444
444
|
try {
|
|
445
445
|
const binding = require('@visulima/vis-binding-linux-ppc64-gnu')
|
|
446
446
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-ppc64-gnu/package.json').version
|
|
447
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
448
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
447
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
448
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
449
449
|
}
|
|
450
450
|
return binding
|
|
451
451
|
} catch (e) {
|
|
@@ -460,8 +460,8 @@ function requireNative() {
|
|
|
460
460
|
try {
|
|
461
461
|
const binding = require('@visulima/vis-binding-linux-s390x-gnu')
|
|
462
462
|
const bindingPackageVersion = require('@visulima/vis-binding-linux-s390x-gnu/package.json').version
|
|
463
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
464
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
463
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
464
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
465
465
|
}
|
|
466
466
|
return binding
|
|
467
467
|
} catch (e) {
|
|
@@ -480,8 +480,8 @@ function requireNative() {
|
|
|
480
480
|
try {
|
|
481
481
|
const binding = require('@visulima/vis-binding-openharmony-arm64')
|
|
482
482
|
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm64/package.json').version
|
|
483
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
484
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
483
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
484
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
485
485
|
}
|
|
486
486
|
return binding
|
|
487
487
|
} catch (e) {
|
|
@@ -496,8 +496,8 @@ function requireNative() {
|
|
|
496
496
|
try {
|
|
497
497
|
const binding = require('@visulima/vis-binding-openharmony-x64')
|
|
498
498
|
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-x64/package.json').version
|
|
499
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
500
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
499
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
500
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
501
501
|
}
|
|
502
502
|
return binding
|
|
503
503
|
} catch (e) {
|
|
@@ -512,8 +512,8 @@ function requireNative() {
|
|
|
512
512
|
try {
|
|
513
513
|
const binding = require('@visulima/vis-binding-openharmony-arm')
|
|
514
514
|
const bindingPackageVersion = require('@visulima/vis-binding-openharmony-arm/package.json').version
|
|
515
|
-
if (bindingPackageVersion !== '1.0.0-alpha.
|
|
516
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.
|
|
515
|
+
if (bindingPackageVersion !== '1.0.0-alpha.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
516
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.0-alpha.20 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
517
517
|
}
|
|
518
518
|
return binding
|
|
519
519
|
} catch (e) {
|
|
@@ -579,7 +579,10 @@ if (!nativeBinding) {
|
|
|
579
579
|
throw new Error(`Failed to load native binding`)
|
|
580
580
|
}
|
|
581
581
|
|
|
582
|
-
const { allKnownTags, cleanWorkspace, detectPackageManager, execPmCommand, execPmCommandInteractive, NATIVE_BINDING_VERSION, parseShebang, resolveAdd, resolveDedupe, resolveDlx, resolveEditorconfigDefaults, resolveExec, resolveInstall, resolveLink, resolveOutdated, resolvePmCommand, resolveRemove, resolveUnlink, resolveWhy, sortPackageJsonString, sortPackageJsonStringWithOptions, tagsFromPath, tagsFromPaths, whichBin } = nativeBinding
|
|
582
|
+
const { advisoriesIngest, advisoriesQuery, advisoriesStatus, allKnownTags, cleanWorkspace, detectPackageManager, execPmCommand, execPmCommandInteractive, NATIVE_BINDING_VERSION, parseShebang, resolveAdd, resolveDedupe, resolveDlx, resolveEditorconfigDefaults, resolveExec, resolveInstall, resolveLink, resolveOutdated, resolvePmCommand, resolveRemove, resolveUnlink, resolveWhy, sortPackageJsonString, sortPackageJsonStringWithOptions, tagsFromPath, tagsFromPaths, whichBin } = nativeBinding
|
|
583
|
+
export { advisoriesIngest }
|
|
584
|
+
export { advisoriesQuery }
|
|
585
|
+
export { advisoriesStatus }
|
|
583
586
|
export { allKnownTags }
|
|
584
587
|
export { cleanWorkspace }
|
|
585
588
|
export { detectPackageManager }
|