@openmixer/plugin-qualify 0.12.0 → 0.13.0
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 +1 -1
- package/dist/host-profiles.d.ts +1 -2
- package/dist/host-profiles.js +12 -2
- package/dist/host-profiles.js.map +1 -1
- package/dist/hosting-codes.d.ts +77 -57
- package/dist/hosting-codes.js +89 -77
- package/dist/hosting-codes.js.map +1 -1
- package/dist/hosting-suitability.d.ts +1 -2
- package/dist/hosting-suitability.js +4 -13
- package/dist/hosting-suitability.js.map +1 -1
- package/dist/measurement/cli.d.ts +1 -1
- package/dist/measurement/cli.js +1 -1
- package/dist/measurement/cli.js.map +1 -1
- package/dist/measurement/format.d.ts +1 -1
- package/dist/measurement/vocabulary.d.ts +30 -22
- package/dist/measurement/vocabulary.js +84 -163
- package/dist/measurement/vocabulary.js.map +1 -1
- package/fixtures/clap-scan/fake.json +109 -7
- package/fixtures/probe-output/success-msi.json +11 -0
- package/package.json +2 -2
- package/src/host-profiles.ts +12 -2
- package/src/hosting-codes.ts +182 -77
- package/src/hosting-suitability.ts +4 -14
- package/src/measurement/cli.ts +1 -1
- package/src/measurement/format.ts +1 -1
- package/src/measurement/vocabulary.ts +135 -167
package/README.md
CHANGED
|
@@ -181,7 +181,7 @@ names the options it ran under, `featureOptions`:
|
|
|
181
181
|
|
|
182
182
|
| flag | what it sets | default |
|
|
183
183
|
| --- | --- | --- |
|
|
184
|
-
| `--features LIST` | the kinds offered: `map`, `unmap`, `options`, `bounded`, `worker`, `default-state`, `log` (empty: none) | all but `default-state` |
|
|
184
|
+
| `--features LIST` | the kinds offered: `map`, `unmap`, `options`, `bounded`, `worker`, `default-state`, `log`, `rtmempool` (empty: none) | all but `default-state` |
|
|
185
185
|
| `--strict` / `--no-strict` | refuse a plugin requiring a feature not offered (the record's `refusedFeature` names it), or hand it to its own instantiate without it | `--no-strict` |
|
|
186
186
|
| `--block-declares LIST` | the buf-size declarations made when `bounded` is offered: `bounded`, `fixed`, `pow2` (empty: none) | `bounded` |
|
|
187
187
|
| `--block-min N` | `bufsz:minBlockLength`; 0 is the run's block | 1 |
|
package/dist/host-profiles.d.ts
CHANGED
|
@@ -16,8 +16,7 @@ export declare const OMX_INPROCESS_FEATURES: readonly string[];
|
|
|
16
16
|
* than on the desk. The list's home is the CLAP library — libomx-clap-core's own
|
|
17
17
|
* `clap_host_extensions.h`, what its host object offers — and this is its mirror, held equal to the
|
|
18
18
|
* header at the pinned omx-clap-host (by the console's conformance test), so the verdict never
|
|
19
|
-
* promises more or less than the host provides. Nothing else: no `gui
|
|
20
|
-
* `posix-fd-support`, no `thread-pool`.
|
|
19
|
+
* promises more or less than the host provides. Nothing else: no `gui`.
|
|
21
20
|
*/
|
|
22
21
|
export declare const OMX_CLAP_HOST_EXTENSIONS: readonly string[];
|
|
23
22
|
/**
|
package/dist/host-profiles.js
CHANGED
|
@@ -33,8 +33,7 @@ export const OMX_INPROCESS_FEATURES = [
|
|
|
33
33
|
* than on the desk. The list's home is the CLAP library — libomx-clap-core's own
|
|
34
34
|
* `clap_host_extensions.h`, what its host object offers — and this is its mirror, held equal to the
|
|
35
35
|
* header at the pinned omx-clap-host (by the console's conformance test), so the verdict never
|
|
36
|
-
* promises more or less than the host provides. Nothing else: no `gui
|
|
37
|
-
* `posix-fd-support`, no `thread-pool`.
|
|
36
|
+
* promises more or less than the host provides. Nothing else: no `gui`.
|
|
38
37
|
*/
|
|
39
38
|
export const OMX_CLAP_HOST_EXTENSIONS = [
|
|
40
39
|
"clap.log",
|
|
@@ -43,6 +42,17 @@ export const OMX_CLAP_HOST_EXTENSIONS = [
|
|
|
43
42
|
"clap.params",
|
|
44
43
|
"clap.audio-ports",
|
|
45
44
|
"clap.state",
|
|
45
|
+
"clap.note-ports",
|
|
46
|
+
"clap.note-name",
|
|
47
|
+
"clap.voice-info",
|
|
48
|
+
"clap.event-registry",
|
|
49
|
+
"clap.timer-support",
|
|
50
|
+
"clap.posix-fd-support",
|
|
51
|
+
"clap.thread-pool",
|
|
52
|
+
"clap.tail",
|
|
53
|
+
"clap.surround/4",
|
|
54
|
+
"clap.ambisonic/3",
|
|
55
|
+
"clap.audio-ports-config",
|
|
46
56
|
];
|
|
47
57
|
/**
|
|
48
58
|
* The three host extensions omx-clap-host turns on beyond the library's own (omx-clap-core
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host-profiles.js","sourceRoot":"","sources":["../src/host-profiles.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sDAAsD;AACtD;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,uFAAuF;AACvF,kGAAkG;AAClG,OAAO,EACL,eAAe,EACf,qBAAqB,GAGtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,eAAe,EAA0C,MAAM,yBAAyB,CAAC;AAGlG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,mCAAmC;IACnC,qCAAqC;IACrC,0CAA0C;IAC1C,sDAAsD;IACtD,0CAA0C;IAC1C,iDAAiD;IACjD,kCAAkC;CACnC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"host-profiles.js","sourceRoot":"","sources":["../src/host-profiles.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sDAAsD;AACtD;;;;GAIG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,uFAAuF;AACvF,kGAAkG;AAClG,OAAO,EACL,eAAe,EACf,qBAAqB,GAGtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,eAAe,EAA0C,MAAM,yBAAyB,CAAC;AAGlG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,mCAAmC;IACnC,qCAAqC;IACrC,0CAA0C;IAC1C,sDAAsD;IACtD,0CAA0C;IAC1C,iDAAiD;IACjD,kCAAkC;CACnC,CAAC;AAEF;;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BAAqB,CAAC,CAAC;AAExI,+CAA+C;AAC/C,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAChD,CAAC"}
|
package/dist/hosting-codes.d.ts
CHANGED
|
@@ -1,71 +1,91 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `merge=union`, so two lanes that each add a code merge with both kept. Only the table lives
|
|
7
|
-
* here, one `key: 'code',` per line, with keys and codes unique; the registry-hotspots gate
|
|
8
|
-
* refuses anything else.
|
|
2
|
+
* Where omx-clap-core's TypeScript modules are looked for, in order: `OMX_CLAP_CORE_TSDIR` when
|
|
3
|
+
* set (and only that), else `pkg-config --variable=tsdir omx-clap-core`, else the checkout
|
|
4
|
+
* `native/fetch-deps.sh` stages, else the path `make install` of omx-clap-host uses by default —
|
|
5
|
+
* a packaged plugin-qualify's runtime has no `pkg-config` binary to ask.
|
|
9
6
|
*/
|
|
10
|
-
export declare
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
readonly featuresProvided: "hosting.features.all-provided";
|
|
29
|
-
readonly featuresMissing: "hosting.features.required-not-provided";
|
|
30
|
-
readonly featuresDisqualifying: "hosting.features.host-not-provided";
|
|
31
|
-
readonly featuresCv: "hosting.features.cv-ports";
|
|
32
|
-
readonly featuresMidiIn: "hosting.features.midi-in-fed-empty";
|
|
33
|
-
readonly featuresUnscanned: "hosting.features.scan-predates-field";
|
|
34
|
-
readonly costWithinCeiling: "hosting.cost.within-ceiling";
|
|
7
|
+
export declare function clapCoreTsDirCandidates(env?: Readonly<Record<string, string | undefined>>): readonly string[];
|
|
8
|
+
/** True for an export name that is one of omx-clap-core's hosting tables. */
|
|
9
|
+
export declare function isHostingTableName(name: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* omx-clap-core's hosting codes, by key, across its two TypeScript modules — hand-kept here
|
|
12
|
+
* (not derived from a static import: the source is a runtime-resolved install directory, not an
|
|
13
|
+
* npm dependency) and held to the real modules by
|
|
14
|
+
* `src/contract-vocabulary-conformance.test.ts`, which turns red on any drift either way.
|
|
15
|
+
*/
|
|
16
|
+
export interface HostingCodeTable {
|
|
17
|
+
readonly clapExtensionsNotCovered: "hosting.clap.extensions-not-covered";
|
|
18
|
+
readonly clapFormatNotHosted: "hosting.clap.format-not-hosted";
|
|
19
|
+
readonly clapHeadlessFailed: "hosting.clap.headless-failed";
|
|
20
|
+
readonly clapLatencyMismatch: "hosting.clap.latency-mismatch";
|
|
21
|
+
readonly clapNoteInput: "hosting.clap.note-input";
|
|
22
|
+
readonly clapProcessError: "hosting.clap.process-error";
|
|
23
|
+
readonly clapThreadViolation: "hosting.clap.thread-violation";
|
|
24
|
+
readonly clapUnqualified: "hosting.clap.unqualified";
|
|
35
25
|
readonly costAboveCeiling: "hosting.cost.above-ceiling";
|
|
26
|
+
readonly costFieldsMissing: "hosting.cost.fields-missing";
|
|
36
27
|
readonly costSpiky: "hosting.cost.spiky-tail";
|
|
37
28
|
readonly costUnmeasured: "hosting.cost.unmeasured-at-rate-and-quantum";
|
|
38
|
-
readonly
|
|
39
|
-
readonly
|
|
40
|
-
readonly
|
|
29
|
+
readonly costWithinCeiling: "hosting.cost.within-ceiling";
|
|
30
|
+
readonly featuresAtomInUnfed: "hosting.features.atom-in-unfed";
|
|
31
|
+
readonly featuresDisqualifying: "hosting.features.host-not-provided";
|
|
32
|
+
readonly featuresMidiIn: "hosting.features.midi-in-fed-empty";
|
|
33
|
+
readonly featuresMissing: "hosting.features.missing";
|
|
34
|
+
readonly featuresPortsUnreadable: "hosting.features.ports-unreadable";
|
|
35
|
+
readonly featuresProvided: "hosting.features.all-provided";
|
|
36
|
+
readonly featuresUnscanned: "hosting.features.scan-predates-field";
|
|
37
|
+
readonly idleHoldRefused: "hosting.idle.hold-refused";
|
|
41
38
|
readonly latencyNonconforming: "hosting.latency.nonconforming";
|
|
42
39
|
readonly latencyParameterDependent: "hosting.latency.parameter-dependent";
|
|
43
|
-
readonly
|
|
44
|
-
readonly
|
|
45
|
-
readonly topologyNoAudioOutput: "hosting.topology.no-audio-output";
|
|
46
|
-
readonly topologyExtraInputs: "hosting.topology.extra-inputs-fed-silence";
|
|
47
|
-
readonly topologyInstrument: "hosting.topology.instrument";
|
|
48
|
-
readonly topologyWiderThanStrip: "hosting.topology.wider-than-strip";
|
|
49
|
-
readonly clapLatencyMismatch: "hosting.clap.latency-mismatch";
|
|
50
|
-
readonly clapNotAudioEffect: "hosting.clap.not-audio-effect";
|
|
51
|
-
readonly clapHeadlessFailed: "hosting.clap.headless-failed";
|
|
52
|
-
readonly clapNoteInput: "hosting.clap.note-input";
|
|
53
|
-
readonly clapThreadViolation: "hosting.clap.thread-violation";
|
|
54
|
-
readonly clapProcessError: "hosting.clap.process-error";
|
|
55
|
-
readonly clapUnqualified: "hosting.clap.unqualified";
|
|
56
|
-
readonly clapFormatNotHosted: "hosting.clap.format-not-hosted";
|
|
57
|
-
readonly clapExtensionsNotCovered: "hosting.clap.extensions-not-covered";
|
|
40
|
+
readonly latencyResolved: "hosting.latency.resolved";
|
|
41
|
+
readonly latencyUnmeasured: "hosting.latency.unmeasured";
|
|
58
42
|
readonly outputNonFinite: "hosting.output.non-finite";
|
|
59
|
-
readonly workerNonconforming: "hosting.worker.nonconforming";
|
|
60
|
-
readonly integrityUnpinned: "hosting.integrity.unpinned";
|
|
61
|
-
readonly integrityBinaryMismatch: "hosting.integrity.binary-mismatch";
|
|
62
|
-
readonly integrityLayoutMismatch: "hosting.integrity.layout-mismatch";
|
|
63
43
|
readonly overrideIsolated: "hosting.override.curator-isolated";
|
|
44
|
+
readonly patchBusy: "hosting.patch.busy";
|
|
45
|
+
readonly patchNotWritable: "hosting.patch.not-writable";
|
|
46
|
+
readonly patchTooLarge: "hosting.patch.too-large";
|
|
47
|
+
readonly presetNotFound: "hosting.preset.not-found";
|
|
64
48
|
readonly hostProvenanceDiffers: "hosting.provenance.host-differs";
|
|
65
49
|
readonly sweepControlDidNotFire: "hosting.provenance.sweep-control-did-not-fire";
|
|
66
50
|
readonly disabled: "hosting.disabled";
|
|
67
|
-
readonly
|
|
51
|
+
readonly linked: "hosting.linked";
|
|
68
52
|
readonly noRealisation: "hosting.no-realisation";
|
|
69
53
|
readonly realisedInProcess: "hosting.realised.in-process";
|
|
70
|
-
readonly
|
|
71
|
-
|
|
54
|
+
readonly unjudged: "hosting.unjudged";
|
|
55
|
+
readonly rtSafetyClean: "hosting.rt-safety.clean-under-sweep";
|
|
56
|
+
readonly rtSafetyNotReproducible: "hosting.rt-safety.not-reproducible";
|
|
57
|
+
readonly rtSafetyNotesClean: "hosting.rt-safety.clean-under-notes";
|
|
58
|
+
readonly rtSafetyNotesUnmeasured: "hosting.rt-safety.notes-unmeasured";
|
|
59
|
+
readonly rtSafetyNotesViolations: "hosting.rt-safety.violations-under-notes";
|
|
60
|
+
readonly rtSafetyUnmeasured: "hosting.rt-safety.unmeasured";
|
|
61
|
+
readonly rtSafetyViolations: "hosting.rt-safety.violations-in-run";
|
|
62
|
+
readonly stabilityBelowFloor: "hosting.stability.cycles-below-floor";
|
|
63
|
+
readonly stabilityCrashUnattributed: "hosting.stability.crash-unattributed";
|
|
64
|
+
readonly stabilityCrashedAttributed: "hosting.stability.crashed-attributed-plugin";
|
|
65
|
+
readonly stabilityCrashedLive: "hosting.stability.crashed-live-on-this-rig";
|
|
66
|
+
readonly stabilityLinksGuiToolkit: "hosting.stability.links-gui-toolkit";
|
|
67
|
+
readonly stabilitySoakFailedAtRate: "hosting.stability.soak-failed-at-rate";
|
|
68
|
+
readonly stabilitySoaked: "hosting.stability.soaked";
|
|
69
|
+
readonly stabilitySpawnsThreads: "hosting.stability.spawns-threads";
|
|
70
|
+
readonly stabilityUnmeasured: "hosting.stability.unmeasured";
|
|
71
|
+
readonly stabilityUnsoaked: "hosting.stability.unsoaked";
|
|
72
|
+
readonly stateNotACopy: "hosting.state.not-a-copy";
|
|
73
|
+
readonly statePathOnAudio: "hosting.state.path-on-audio";
|
|
74
|
+
readonly statePathOutside: "hosting.state.path-outside";
|
|
75
|
+
readonly statePathSymlink: "hosting.state.path-symlink";
|
|
76
|
+
readonly statePathTooLong: "hosting.state.path-too-long";
|
|
77
|
+
readonly statePathUnmakeable: "hosting.state.path-unmakeable";
|
|
78
|
+
readonly stateUnreadable: "hosting.state.unreadable";
|
|
79
|
+
readonly topologyAmbisonicConfig: "hosting.topology.ambisonic-config";
|
|
80
|
+
readonly topologyChannelMapUnknown: "hosting.topology.channel-map-unknown";
|
|
81
|
+
readonly topologyInstrument: "hosting.topology.instrument";
|
|
82
|
+
readonly topologyMatched: "hosting.topology.matched";
|
|
83
|
+
readonly topologyNoAudioInput: "hosting.topology.no-audio-input";
|
|
84
|
+
readonly topologyNoAudioOutput: "hosting.topology.no-audio-output";
|
|
85
|
+
readonly topologyPortTooWide: "hosting.topology.port-too-wide";
|
|
86
|
+
readonly topologyPortWithoutChannels: "hosting.topology.port-without-channels";
|
|
87
|
+
readonly topologyTooManyPorts: "hosting.topology.too-many-ports";
|
|
88
|
+
readonly topologyWiderThanStrip: "hosting.topology.wider-than-strip";
|
|
89
|
+
readonly workerNonconforming: "hosting.worker.nonconforming";
|
|
90
|
+
}
|
|
91
|
+
export declare const HOSTING_CODE: HostingCodeTable;
|
package/dist/hosting-codes.js
CHANGED
|
@@ -1,83 +1,95 @@
|
|
|
1
1
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
2
|
// Copyright (C) 2026 Pau Aliagas <linuxnow@gmail.com>
|
|
3
3
|
/**
|
|
4
|
-
* The hosting verdict's message codes. Codes, never prose: the
|
|
5
|
-
*
|
|
4
|
+
* The hosting verdict's message codes. Codes, never prose: the surface renders the operator's
|
|
5
|
+
* locale.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* omx-clap-core declares every hosting code now (the contract split moved `data/hosting/*.json`
|
|
8
|
+
* there, byte for byte): one `HOSTING_<DIMENSION>_CODES` table per dimension, rendered into the
|
|
9
|
+
* TypeScript modules its package installs under `pkg-config --variable=tsdir omx-clap-core`
|
|
10
|
+
* (BUILDING.md) — `omx-clap-core-vocabulary.js` for the dimensions carried from omx-contract,
|
|
11
|
+
* `omx-clap-core-hosting.js` for `hosting.idle.*`, its own (both with a `.d.ts`). {@link
|
|
12
|
+
* HOSTING_CODE} is those tables flattened into one `key: code` map, loaded at import: a code
|
|
13
|
+
* neither module declares cannot be named here, and a dimension either adds arrives without an
|
|
14
|
+
* edit.
|
|
11
15
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
16
|
+
import { execFileSync } from "node:child_process";
|
|
17
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
18
|
+
import { join } from "node:path";
|
|
19
|
+
import { fileURLToPath } from "node:url";
|
|
20
|
+
/** The two TypeScript modules omx-clap-core's `tsdir` carries, each a `HOSTING_<DIMENSION>_CODES` source. */
|
|
21
|
+
const CLAP_CORE_TS_MODULES = ["omx-clap-core-vocabulary.js", "omx-clap-core-hosting.js"];
|
|
22
|
+
/** This package's own root, resolved from this module so it follows wherever it is installed. */
|
|
23
|
+
const PACKAGE_ROOT = fileURLToPath(new URL("..", import.meta.url));
|
|
24
|
+
/** `native/fetch-deps.sh`'s own checkout of omx-clap-core, for a build with no omx-clap-core-devel installed. */
|
|
25
|
+
const DEPS_TS_DIR = join(PACKAGE_ROOT, "native/deps/omx-clap-core/ts");
|
|
26
|
+
/** Where `make install` of omx-clap-host puts them (BUILDING.md), for a run with no `pkg-config` binary at all. */
|
|
27
|
+
const DEFAULT_SYSTEM_TS_DIR = "/usr/share/omx-clap-core/ts";
|
|
28
|
+
/** `pkg-config --variable=tsdir omx-clap-core`, or `undefined` where pkg-config or the package is absent. */
|
|
29
|
+
function pkgConfigTsDir(env) {
|
|
30
|
+
try {
|
|
31
|
+
const out = execFileSync(env.PKG_CONFIG ?? "pkg-config", ["--variable=tsdir", "omx-clap-core"], {
|
|
32
|
+
encoding: "utf8",
|
|
33
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
34
|
+
}).trim();
|
|
35
|
+
return out === "" ? undefined : out;
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Where omx-clap-core's TypeScript modules are looked for, in order: `OMX_CLAP_CORE_TSDIR` when
|
|
43
|
+
* set (and only that), else `pkg-config --variable=tsdir omx-clap-core`, else the checkout
|
|
44
|
+
* `native/fetch-deps.sh` stages, else the path `make install` of omx-clap-host uses by default —
|
|
45
|
+
* a packaged plugin-qualify's runtime has no `pkg-config` binary to ask.
|
|
46
|
+
*/
|
|
47
|
+
export function clapCoreTsDirCandidates(env = process.env) {
|
|
48
|
+
const set = env.OMX_CLAP_CORE_TSDIR;
|
|
49
|
+
if (set !== undefined && set !== "")
|
|
50
|
+
return [set];
|
|
51
|
+
const fromPkgConfig = pkgConfigTsDir(env);
|
|
52
|
+
return [...(fromPkgConfig === undefined ? [] : [fromPkgConfig]), DEPS_TS_DIR, DEFAULT_SYSTEM_TS_DIR];
|
|
53
|
+
}
|
|
54
|
+
function locateClapCoreTsDir() {
|
|
55
|
+
const candidates = clapCoreTsDirCandidates();
|
|
56
|
+
const dir = candidates.find((d) => CLAP_CORE_TS_MODULES.every((m) => existsSync(join(d, m))));
|
|
57
|
+
if (dir === undefined) {
|
|
58
|
+
throw new Error(`omx-clap-core's TypeScript modules (${CLAP_CORE_TS_MODULES.join(", ")}) were not found in any of: ` +
|
|
59
|
+
`${candidates.join(", ")}. Install omx-clap-core-devel (pkg-config omx-clap-core), set ` +
|
|
60
|
+
"OMX_CLAP_CORE_TSDIR to its tsdir, or run native/fetch-deps.sh.");
|
|
61
|
+
}
|
|
62
|
+
return dir;
|
|
63
|
+
}
|
|
64
|
+
/** True for an export name that is one of omx-clap-core's hosting tables. */
|
|
65
|
+
export function isHostingTableName(name) {
|
|
66
|
+
return /^HOSTING_[A-Z0-9_]+_CODES$/.test(name);
|
|
67
|
+
}
|
|
68
|
+
async function loadHostingTables() {
|
|
69
|
+
const dir = locateClapCoreTsDir();
|
|
70
|
+
const tables = {};
|
|
71
|
+
for (const name of CLAP_CORE_TS_MODULES) {
|
|
72
|
+
// The modules are self-contained ES modules in a directory with no package.json: Node 18 reads such a .js as
|
|
73
|
+
// CommonJS and refuses `export`, so the source is imported as a data: module, which is a module on every Node.
|
|
74
|
+
const source = readFileSync(join(dir, name), "utf8");
|
|
75
|
+
const mod = await import(`data:text/javascript;base64,${Buffer.from(source).toString("base64")}`);
|
|
76
|
+
for (const [exportName, table] of Object.entries(mod)) {
|
|
77
|
+
if (isHostingTableName(exportName))
|
|
78
|
+
tables[exportName] = table;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return tables;
|
|
82
|
+
}
|
|
83
|
+
function flatten(tables) {
|
|
84
|
+
const table = {};
|
|
85
|
+
for (const [name, entries] of Object.entries(tables)) {
|
|
86
|
+
for (const [key, entry] of Object.entries(entries)) {
|
|
87
|
+
if (key in table)
|
|
88
|
+
throw new Error(`omx-clap-core declares the hosting key ${key} twice (${name})`);
|
|
89
|
+
table[key] = entry.code;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return Object.freeze(table);
|
|
93
|
+
}
|
|
94
|
+
export const HOSTING_CODE = flatten(await loadHostingTables());
|
|
83
95
|
//# sourceMappingURL=hosting-codes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosting-codes.js","sourceRoot":"","sources":["../src/hosting-codes.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sDAAsD;AACtD
|
|
1
|
+
{"version":3,"file":"hosting-codes.js","sourceRoot":"","sources":["../src/hosting-codes.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sDAAsD;AACtD;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW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CAAC,EAAE,CAAC;YACtD,IAAI,kBAAkB,CAAC,UAAU,CAAC;gBAAE,MAAM,CAAC,UAAU,CAAC,GAAG,KAAuB,CAAC;QACnF,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,OAAO,CAAC,MAAsC;IACrD,MAAM,KAAK,GAA2B,EAAE,CAAC;IACzC,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACrD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YACnD,IAAI,GAAG,IAAI,KAAK;gBAAE,MAAM,IAAI,KAAK,CAAC,0CAA0C,GAAG,WAAW,IAAI,GAAG,CAAC,CAAC;YACnG,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;QAC1B,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAgC,CAAC;AAC7D,CAAC;AAoFD,MAAM,CAAC,MAAM,YAAY,GAAqB,OAAO,CAAC,MAAM,iBAAiB,EAAE,CAAC,CAAC"}
|
|
@@ -95,12 +95,11 @@ export type HostingCode = (typeof HOSTING_CODE)[keyof typeof HOSTING_CODE];
|
|
|
95
95
|
*/
|
|
96
96
|
export declare const CLAP_CORE_REFUSALS: {
|
|
97
97
|
readonly headlessFailed: "clapHeadlessFailed";
|
|
98
|
-
readonly notAudioEffect: "clapNotAudioEffect";
|
|
99
98
|
readonly noteInput: "clapNoteInput";
|
|
100
99
|
readonly noAudioInput: "topologyNoAudioInput";
|
|
101
100
|
readonly noAudioOutput: "topologyNoAudioOutput";
|
|
102
101
|
readonly widerThanStrip: "topologyWiderThanStrip";
|
|
103
|
-
readonly
|
|
102
|
+
readonly tooManyPorts: "topologyTooManyPorts";
|
|
104
103
|
readonly crashedLive: "stabilityCrashedLive";
|
|
105
104
|
readonly outputNonFinite: "outputNonFinite";
|
|
106
105
|
};
|
|
@@ -67,12 +67,11 @@ export { HOSTING_CODE };
|
|
|
67
67
|
*/
|
|
68
68
|
export const CLAP_CORE_REFUSALS = {
|
|
69
69
|
headlessFailed: "clapHeadlessFailed",
|
|
70
|
-
notAudioEffect: "clapNotAudioEffect",
|
|
71
70
|
noteInput: "clapNoteInput",
|
|
72
71
|
noAudioInput: "topologyNoAudioInput",
|
|
73
72
|
noAudioOutput: "topologyNoAudioOutput",
|
|
74
73
|
widerThanStrip: "topologyWiderThanStrip",
|
|
75
|
-
|
|
74
|
+
tooManyPorts: "topologyTooManyPorts",
|
|
76
75
|
crashedLive: "stabilityCrashedLive",
|
|
77
76
|
outputNonFinite: "outputNonFinite",
|
|
78
77
|
};
|
|
@@ -82,12 +81,11 @@ export const CLAP_CORE_REFUSALS = {
|
|
|
82
81
|
* refusal so the renderer holds no prose. A refusal without a line renders bare.
|
|
83
82
|
*/
|
|
84
83
|
export const CLAP_CORE_REFUSAL_DESCRIPTIONS = {
|
|
85
|
-
notAudioEffect: "the plugin is not an audio effect",
|
|
86
84
|
noteInput: "the plugin declares a note input the configuration refuses",
|
|
87
85
|
noAudioInput: "the plugin has no audio input",
|
|
88
86
|
noAudioOutput: "the plugin has no audio output",
|
|
89
87
|
widerThanStrip: "the plugin is wider than the strip",
|
|
90
|
-
|
|
88
|
+
tooManyPorts: "the plugin has more ports than the auxiliary limit allows",
|
|
91
89
|
crashedLive: "the plugin crashed live on this rig",
|
|
92
90
|
outputNonFinite: "the plugin produced non-finite output",
|
|
93
91
|
};
|
|
@@ -384,9 +382,6 @@ instruments = false) {
|
|
|
384
382
|
features: missing.join(" "),
|
|
385
383
|
}));
|
|
386
384
|
}
|
|
387
|
-
if ((features.cvPorts ?? 0) > 0) {
|
|
388
|
-
out.push(reason("features", "objective", "unsuitable", HOSTING_CODE.featuresCv));
|
|
389
|
-
}
|
|
390
385
|
}
|
|
391
386
|
if (descriptor.hasMidiIn && !instruments) {
|
|
392
387
|
out.push(reason("features", "objective", "conditional", HOSTING_CODE.featuresMidiIn));
|
|
@@ -489,7 +484,7 @@ export function hostingTopologyReasons(descriptor, instruments = false) {
|
|
|
489
484
|
];
|
|
490
485
|
}
|
|
491
486
|
return [
|
|
492
|
-
reason("topology", "objective", "conditional", HOSTING_CODE.
|
|
487
|
+
reason("topology", "objective", "conditional", HOSTING_CODE.topologyTooManyPorts, { ins, outs }),
|
|
493
488
|
];
|
|
494
489
|
}
|
|
495
490
|
/**
|
|
@@ -514,7 +509,7 @@ export function clapTopologyReasons(clap, instruments = false) {
|
|
|
514
509
|
return [reason("topology", "objective", "unsuitable", HOSTING_CODE.topologyWiderThanStrip, { ins, outs })];
|
|
515
510
|
}
|
|
516
511
|
if (clap.sidechainInputs > 0) {
|
|
517
|
-
return [reason("topology", "objective", "unsuitable", HOSTING_CODE.
|
|
512
|
+
return [reason("topology", "objective", "unsuitable", HOSTING_CODE.topologyTooManyPorts, { ins, outs, sidechains: clap.sidechainInputs })];
|
|
518
513
|
}
|
|
519
514
|
return [reason("topology", "objective", "suitable", HOSTING_CODE.topologyMatched, { ins, outs })];
|
|
520
515
|
}
|
|
@@ -562,10 +557,6 @@ export function clapFeatureReasons(clap, profile = OPENMIXER_CONSOLE_PROFILE, sc
|
|
|
562
557
|
}
|
|
563
558
|
const out = [];
|
|
564
559
|
const offered = profile.clapExtensions;
|
|
565
|
-
const kindHosted = clap.features.includes(CLAP_FEATURE_AUDIO_EFFECT) || (profile.instruments && clap.features.includes(CLAP_FEATURE_INSTRUMENT));
|
|
566
|
-
if (!kindHosted) {
|
|
567
|
-
out.push(reason("features", "objective", "unsuitable", HOSTING_CODE.clapNotAudioEffect, { features: clap.features.join(" ") }));
|
|
568
|
-
}
|
|
569
560
|
if (!clap.headlessOk) {
|
|
570
561
|
out.push(reason("features", "objective", "unsuitable", HOSTING_CODE.clapHeadlessFailed));
|
|
571
562
|
}
|