@openmixer/plugin-qualify 0.4.1 → 0.5.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/README.md +6 -3
- package/dist/clap-qualify.d.ts +12 -2
- package/dist/clap-qualify.js +23 -14
- package/dist/clap-qualify.js.map +1 -1
- package/dist/hosting-codes.d.ts +3 -0
- package/dist/hosting-codes.js +4 -0
- package/dist/hosting-codes.js.map +1 -1
- package/dist/measurement/format.d.ts +39 -3
- package/dist/measurement/format.js +62 -2
- package/dist/measurement/format.js.map +1 -1
- package/dist/measurement/merge.d.ts +10 -1
- package/dist/measurement/merge.js +39 -5
- package/dist/measurement/merge.js.map +1 -1
- package/dist/measurement/sweep-jsonl.js +3 -1
- package/dist/measurement/sweep-jsonl.js.map +1 -1
- package/dist/measurement/vocabulary.js +6 -0
- package/dist/measurement/vocabulary.js.map +1 -1
- package/dist/qualify-declarations.d.ts +11 -1
- package/dist/qualify-declarations.js +11 -1
- package/dist/qualify-declarations.js.map +1 -1
- package/dist/tool-paths.d.ts +2 -0
- package/dist/tool-paths.js +12 -2
- package/dist/tool-paths.js.map +1 -1
- package/package.json +1 -1
- package/src/clap-qualify.ts +39 -12
- package/src/hosting-codes.ts +4 -0
- package/src/measurement/format.ts +96 -2
- package/src/measurement/merge.ts +52 -6
- package/src/measurement/sweep-jsonl.ts +3 -1
- package/src/measurement/vocabulary.ts +7 -0
- package/src/qualify-declarations.ts +13 -1
- package/src/tool-paths.ts +15 -2
|
@@ -29,7 +29,7 @@ import type {
|
|
|
29
29
|
SoakReading,
|
|
30
30
|
StabilityMeasurement,
|
|
31
31
|
} from "./format.js";
|
|
32
|
-
import { readLifecycle, readSoakAtRate, readThreads } from "./format.js";
|
|
32
|
+
import { readIntegrity, readLifecycle, readSoakAtRate, readThreads } from "./format.js";
|
|
33
33
|
import { booleanValue, finiteNumber, isRecord, mapArray, nonEmptyString, optional, positiveNumber } from "./guards.js";
|
|
34
34
|
|
|
35
35
|
/** The sweep's three passes, each a list of parsed JSONL lines. Only `measurements` is required. */
|
|
@@ -150,6 +150,7 @@ export function measuredPluginsFromSweep(passes: SweepPasses): MeasuredPlugin[]
|
|
|
150
150
|
if (uri === undefined || audioInputs === undefined || audioOutputs === undefined) continue;
|
|
151
151
|
out.push({
|
|
152
152
|
uri,
|
|
153
|
+
...optional("version", nonEmptyString(row.version)),
|
|
153
154
|
topology: {
|
|
154
155
|
audioInputs,
|
|
155
156
|
audioOutputs,
|
|
@@ -158,6 +159,7 @@ export function measuredPluginsFromSweep(passes: SweepPasses): MeasuredPlugin[]
|
|
|
158
159
|
stability: stabilityOf(row, deep.get(uri), soak.get(uri)),
|
|
159
160
|
rtSafety: rtSafetyOf(row),
|
|
160
161
|
features: featuresOf(row),
|
|
162
|
+
...optional("integrity", readIntegrity(row.integrity)),
|
|
161
163
|
});
|
|
162
164
|
}
|
|
163
165
|
return out;
|
|
@@ -77,6 +77,13 @@ export const UNMEASURED_TERMS: readonly UnmeasuredTerm[] = [
|
|
|
77
77
|
kind: "nothing-to-measure",
|
|
78
78
|
description: "A convolver requiring an IR file the prober did not load.",
|
|
79
79
|
},
|
|
80
|
+
{
|
|
81
|
+
code: "unpinnable",
|
|
82
|
+
kind: "nothing-to-measure",
|
|
83
|
+
description:
|
|
84
|
+
"The files the host loads cannot be pinned (plugin-qualify spec §11.1): a path holding ',', '=' or " +
|
|
85
|
+
"whitespace, or a manifest using @base or a percent-encoded IRI. The plugin stays unpinned, never partly pinned.",
|
|
86
|
+
},
|
|
80
87
|
{
|
|
81
88
|
code: "refused-instantiation",
|
|
82
89
|
kind: "probe-failed",
|
|
@@ -53,11 +53,23 @@ export const CLAP_SCAN_TIMEOUT_S = 300;
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* The CLAP prober (`native/clap-qualify.c`) and the interposer it runs under (`native/rt-interpose.c`):
|
|
56
|
-
* each located by one environment variable, else the
|
|
56
|
+
* each located by one environment variable, else the first of `NATIVE_TOOL_DIRS` that holds it, else
|
|
57
|
+
* the package's own build in `native/build/`.
|
|
57
58
|
*/
|
|
58
59
|
export const CLAP_QUALIFY_TOOL_ENV = "OMX_CLAP_QUALIFY";
|
|
59
60
|
export const RT_INTERPOSE_ENV = "OMX_RT_INTERPOSE";
|
|
60
61
|
|
|
62
|
+
/** The file names of the prober and the interposer, in every place they are looked for. */
|
|
63
|
+
export const CLAP_QUALIFY_TOOL_NAME = "clap-qualify";
|
|
64
|
+
export const RT_INTERPOSE_NAME = "rt_interpose.so";
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Where the RPM and the DEB install the prober and the interposer: the libexec directory on Fedora,
|
|
68
|
+
* `/usr/lib/<package>` on Debian (policy keeps a package's private programs there). The packaging
|
|
69
|
+
* installs into exactly these; a test holds the spec and `debian/rules` to them.
|
|
70
|
+
*/
|
|
71
|
+
export const NATIVE_TOOL_DIRS: readonly string[] = ["/usr/libexec/plugin-qualify", "/usr/lib/plugin-qualify"];
|
|
72
|
+
|
|
61
73
|
/** The CLAP sweep: blocks of `CLAP_SWEEP_FRAMES` frames per rate, every parameter moved through events. */
|
|
62
74
|
export const CLAP_SWEEP_BLOCKS = 512;
|
|
63
75
|
export const CLAP_SWEEP_FRAMES = 512;
|
package/src/tool-paths.ts
CHANGED
|
@@ -5,8 +5,11 @@
|
|
|
5
5
|
* wherever it is installed (a checkout, an RPM's bundled node_modules, a pnpm store). The
|
|
6
6
|
* tools are shipped RUNTIME artefacts, not dev scripts.
|
|
7
7
|
*/
|
|
8
|
+
import { join } from "node:path";
|
|
8
9
|
import { fileURLToPath } from "node:url";
|
|
9
10
|
|
|
11
|
+
import { CLAP_QUALIFY_TOOL_NAME, NATIVE_TOOL_DIRS, RT_INTERPOSE_NAME } from "./qualify-declarations.js";
|
|
12
|
+
|
|
10
13
|
/**
|
|
11
14
|
* `tools/` — `scan.py`, `benchmark.py`, `lv2-measure.mjs`, `hosting-sweep.mjs`. Resolved when a
|
|
12
15
|
* console asks, never at import: a consumer that only reads this package's declarations from a
|
|
@@ -21,12 +24,22 @@ export function lv2MeasureToolPath(): string {
|
|
|
21
24
|
return fileURLToPath(new URL("../tools/lv2-measure.mjs", import.meta.url));
|
|
22
25
|
}
|
|
23
26
|
|
|
27
|
+
/** The package's own build of the native tools (`make -C native`). */
|
|
28
|
+
function nativeBuildDir(): string {
|
|
29
|
+
return fileURLToPath(new URL("../native/build/", import.meta.url));
|
|
30
|
+
}
|
|
31
|
+
|
|
24
32
|
/** The package's own build of the CLAP prober (`make -C native`). */
|
|
25
33
|
export function clapQualifyToolPath(): string {
|
|
26
|
-
return
|
|
34
|
+
return join(nativeBuildDir(), CLAP_QUALIFY_TOOL_NAME);
|
|
27
35
|
}
|
|
28
36
|
|
|
29
37
|
/** The package's own build of the interposer the CLAP prober runs under. */
|
|
30
38
|
export function rtInterposePath(): string {
|
|
31
|
-
return
|
|
39
|
+
return join(nativeBuildDir(), RT_INTERPOSE_NAME);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Where a native tool is looked for when no setting names it, in order: the installed directories, then the own build. */
|
|
43
|
+
export function nativeToolCandidates(name: string): string[] {
|
|
44
|
+
return [...NATIVE_TOOL_DIRS, nativeBuildDir()].map((dir) => join(dir, name));
|
|
32
45
|
}
|