@gobing-ai/knowledge-kit 0.1.20 → 0.1.22
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/.claude-plugin/marketplace.json +1 -1
- package/dist/board/collect/index.js +1 -0
- package/dist/board/daily-voice/index.js +1279 -261
- package/dist/board/itc/index.js +1 -0
- package/dist/index.js +13893 -8995
- package/package.json +1 -1
- package/plugins/generations/dailynews-gen/dist/index.js +285 -16
- package/plugins/generations/dailynews-gen/src/editorial-claims.ts +215 -0
- package/plugins/generations/dailynews-gen/src/index.ts +23 -4
- package/plugins/generations/dailynews-gen/src/script-builder.ts +10 -3
- package/plugins/generations/dailynews-gen/src/script-plan.ts +74 -14
- package/plugins/generations/music-gen/README.md +277 -0
- package/plugins/generations/music-gen/dist/index.js +23544 -0
- package/plugins/generations/music-gen/package.json +24 -0
- package/plugins/generations/music-gen/plugin.json +23 -0
- package/plugins/generations/music-gen/presets/SOURCE.md +39 -0
- package/plugins/generations/music-gen/presets/formats/clip.yaml +21 -0
- package/plugins/generations/music-gen/presets/formats/jingle.yaml +22 -0
- package/plugins/generations/music-gen/presets/formats/loop.yaml +21 -0
- package/plugins/generations/music-gen/presets/formats/song.yaml +31 -0
- package/plugins/generations/music-gen/presets/formats/underscore.yaml +22 -0
- package/plugins/generations/music-gen/presets/themes/ambient-tech.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/cinematic.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/lofi.yaml +30 -0
- package/plugins/generations/music-gen/presets/themes/synthwave.yaml +30 -0
- package/plugins/generations/music-gen/scripts/gen-preset-index.ts +181 -0
- package/plugins/generations/music-gen/scripts/resolve-preset.ts +64 -0
- package/plugins/generations/music-gen/src/adapter/index.ts +35 -0
- package/plugins/generations/music-gen/src/adapter/instance.ts +904 -0
- package/plugins/generations/music-gen/src/adapter/offline.ts +124 -0
- package/plugins/generations/music-gen/src/artifact.ts +223 -0
- package/plugins/generations/music-gen/src/audio/checks.ts +618 -0
- package/plugins/generations/music-gen/src/audio/master.ts +267 -0
- package/plugins/generations/music-gen/src/audio/measure.ts +507 -0
- package/plugins/generations/music-gen/src/audio/profile.ts +131 -0
- package/plugins/generations/music-gen/src/audio.ts +122 -0
- package/plugins/generations/music-gen/src/brief.ts +191 -0
- package/plugins/generations/music-gen/src/config.ts +451 -0
- package/plugins/generations/music-gen/src/content.ts +199 -0
- package/plugins/generations/music-gen/src/digest.ts +100 -0
- package/plugins/generations/music-gen/src/index.ts +147 -0
- package/plugins/generations/music-gen/src/job.ts +131 -0
- package/plugins/generations/music-gen/src/plugin.ts +371 -0
- package/plugins/generations/music-gen/src/presets.ts +918 -0
- package/plugins/generations/music-gen/src/render.ts +87 -0
- package/plugins/generations/music-gen/src/request.ts +102 -0
- package/plugins/generations/music-gen/src/spend.ts +495 -0
- package/plugins/generations/music-gen/tsconfig.json +8 -0
- package/plugins/kk/plugin.json +1 -1
- package/plugins/kk/schedules/kk-serve.launchd.plist.tmpl +2 -1
- package/plugins/kk/scripts/cover-compositor.ts +380 -32
- package/plugins/kk/scripts/daily-cover-mock.ts +40 -3
- package/plugins/kk/scripts/daily-stages.ts +659 -20
- package/plugins/kk/scripts/episode-identity.ts +180 -0
- package/plugins/kk/scripts/kk-workflow-stages.ts +37 -1
- package/plugins/kk/scripts/music-stages.ts +624 -0
- package/plugins/kk/scripts/news-editorial-ledger.ts +906 -0
- package/plugins/kk/scripts/source-citation.ts +187 -0
- package/plugins/kk/scripts/topic-selection-attempts.ts +446 -0
- package/plugins/kk/scripts/topic-selection-calibration.ts +161 -0
- package/plugins/kk/skills/content-judge/SKILL.md +11 -6
- package/plugins/kk/skills/content-judge/references/music-quality-rubric.md +147 -0
- package/plugins/kk/skills/content-judge/references/rubrics.md +15 -0
- package/plugins/kk/skills/content-safety/SKILL.md +12 -0
- package/plugins/kk/skills/music-authoring/SKILL.md +276 -0
- package/plugins/kk/skills/music-authoring/references/judge-input.md +117 -0
- package/plugins/kk/skills/news-editorial/SKILL.md +102 -15
- package/plugins/kk/skills/news-editorial/references/selection.md +4 -0
- package/plugins/kk/skills/news-editorial/references/style-contract.zh.md +58 -11
- package/plugins/kk/workflows/kk-daily-ai-voice.yaml +8 -8
- package/plugins/kk/workflows/kk-daily-ai-voice2.yaml +7 -7
- package/plugins/kk/workflows/kk-music.yaml +328 -0
- package/plugins/kk/workflows/kk-news-generate.yaml +58 -3
- package/plugins/publishings/bilibili-pub/dist/index.js +11 -1
- package/plugins/publishings/bilibili-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/cnblogs-pub/dist/index.js +11 -1
- package/plugins/publishings/cnblogs-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/csdn-pub/dist/index.js +11 -1
- package/plugins/publishings/csdn-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/infoq-pub/dist/index.js +11 -1
- package/plugins/publishings/infoq-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/jike-pub/dist/index.js +11 -1
- package/plugins/publishings/jike-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/juejin-pub/dist/index.js +11 -1
- package/plugins/publishings/juejin-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/linkedin-pub/dist/index.js +11 -1
- package/plugins/publishings/linkedin-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/podcast-pub/dist/index.js +586 -20
- package/plugins/publishings/podcast-pub/src/corrections.ts +509 -0
- package/plugins/publishings/podcast-pub/src/index.ts +257 -5
- package/plugins/publishings/podcast-pub/src/show-notes-brief.ts +240 -0
- package/plugins/publishings/podcast-pub/src/show-notes.ts +69 -13
- package/plugins/publishings/shipinhao-pub/dist/index.js +59 -8
- package/plugins/publishings/shipinhao-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/shipinhao-pub/src/audio-flow.ts +105 -6
- package/plugins/publishings/sspai-pub/dist/index.js +11 -1
- package/plugins/publishings/sspai-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/substack-pub/dist/index.js +11 -1
- package/plugins/publishings/substack-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/surfdash-pub/dist/index.js +72 -20
- package/plugins/publishings/surfdash-pub/src/digest-check.ts +7 -3
- package/plugins/publishings/surfdash-pub/src/index.ts +100 -17
- package/plugins/publishings/surfdash-pub/src/topic-claims.ts +3 -1
- package/plugins/publishings/threads-pub/dist/index.js +11 -1
- package/plugins/publishings/threads-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/wechatmp-pub/dist/index.js +11 -1
- package/plugins/publishings/wechatmp-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/weibo-pub/dist/index.js +11 -1
- package/plugins/publishings/weibo-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/x-pub/dist/index.js +11 -1
- package/plugins/publishings/x-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/xhs-pub/dist/index.js +11 -1
- package/plugins/publishings/xhs-pub/dist/profile-check.js +11 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/index.js +11 -1
- package/plugins/publishings/xiaoyuzhou-pub/dist/profile-check.js +11 -1
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loudness normalization — the "master" step (task 0405 R3/R4).
|
|
3
|
+
*
|
|
4
|
+
* **Two passes, one target.** Pass 1 is the `loudnorm=print_format=json`
|
|
5
|
+
* analysis (shared with measurement); pass 2 re-encodes the take with the
|
|
6
|
+
* profile's `I`/`TP` plus pass 1's `measured_I`, `measured_TP`, `measured_LRA`,
|
|
7
|
+
* `measured_thresh` and `offset`. Feeding those back is what makes the pass
|
|
8
|
+
* linear: without them ffmpeg re-measures blindly and the result lands anywhere
|
|
9
|
+
* near the target.
|
|
10
|
+
*
|
|
11
|
+
* **`-ar` is explicit, always.** `loudnorm` resamples internally to 192 kHz, so a
|
|
12
|
+
* pass that does not set the output rate emits a 192 kHz file — the exact bug R3
|
|
13
|
+
* names. The rate comes from the profile, and the delivery check re-probes the
|
|
14
|
+
* output to prove it landed.
|
|
15
|
+
*
|
|
16
|
+
* **Non-destructive.** The output is a new file `<artifact>.<profile>.<ext>`
|
|
17
|
+
* beside the provider take; the take is never opened for writing. "Master" here
|
|
18
|
+
* means loudness and true-peak normalization only — no EQ, no compression, no
|
|
19
|
+
* creative decisions (see `docs/design/music-gen.md` §"not doing").
|
|
20
|
+
*
|
|
21
|
+
* **One delivery check, no loop.** After pass 2 the *encoded output* is
|
|
22
|
+
* re-measured (R4) and `delivery.*` rows are merged into the take's
|
|
23
|
+
* `checks.json`. A failure is reported with its measured values and throws — it
|
|
24
|
+
* never re-runs pass 2, because a profile the take cannot reach (a very dynamic
|
|
25
|
+
* underscore pushed to a hot target) is information for the operator, not
|
|
26
|
+
* something to paper over.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
import { extname } from 'node:path';
|
|
30
|
+
import { createNodeFileSystem, type FileSystem } from '@gobing-ai/ts-runtime';
|
|
31
|
+
import type { AudioFormat } from '../brief';
|
|
32
|
+
import {
|
|
33
|
+
buildDeliveryCheckRows,
|
|
34
|
+
type CheckRow,
|
|
35
|
+
checksPassed,
|
|
36
|
+
checksPathFor,
|
|
37
|
+
mergeChecks,
|
|
38
|
+
readChecks,
|
|
39
|
+
writeChecks,
|
|
40
|
+
} from './checks';
|
|
41
|
+
import {
|
|
42
|
+
type AudioMeasurement,
|
|
43
|
+
AudioToolError,
|
|
44
|
+
type LoudnessMeasurement,
|
|
45
|
+
type MeasureOptions,
|
|
46
|
+
measureAudio,
|
|
47
|
+
measureLoudness,
|
|
48
|
+
spawnRunner,
|
|
49
|
+
type ToolOutput,
|
|
50
|
+
} from './measure';
|
|
51
|
+
import type { DeliveryProfile } from './profile';
|
|
52
|
+
|
|
53
|
+
/** Profile names are file-name fragments, so they carry only these characters. */
|
|
54
|
+
const PROFILE_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
55
|
+
|
|
56
|
+
/** Encoder per delivered container. WAV stays lossless 16-bit; MP3 is a deliberate CBR re-encode (R5 default is wav). */
|
|
57
|
+
const MASTER_ENCODERS: Readonly<Record<AudioFormat, readonly string[]>> = {
|
|
58
|
+
wav: ['-c:a', 'pcm_s16le'],
|
|
59
|
+
mp3: ['-c:a', 'libmp3lame', '-b:a', '192k'],
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** Raised when a master run cannot even start (missing take, unusable profile name colliding with the take). */
|
|
63
|
+
export class MasterError extends Error {
|
|
64
|
+
readonly exitCode = 1;
|
|
65
|
+
|
|
66
|
+
constructor(message: string) {
|
|
67
|
+
super(`music master: ${message}`);
|
|
68
|
+
this.name = 'MasterError';
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Raised when the post-master delivery check fails (R4). Carries the measured
|
|
74
|
+
* rows so the caller can print numbers instead of a verdict, and no second master
|
|
75
|
+
* pass exists to fall back into.
|
|
76
|
+
*/
|
|
77
|
+
export class DeliveryCheckFailure extends Error {
|
|
78
|
+
readonly exitCode = 1;
|
|
79
|
+
/** The failing `delivery.*` rows, with measured values and thresholds. */
|
|
80
|
+
readonly rows: CheckRow[];
|
|
81
|
+
/** The encoded output that was measured. */
|
|
82
|
+
readonly outputPath: string;
|
|
83
|
+
|
|
84
|
+
constructor(outputPath: string, rows: readonly CheckRow[]) {
|
|
85
|
+
const failing = rows.filter((row) => row.result === 'fail');
|
|
86
|
+
const detail = failing
|
|
87
|
+
.map(
|
|
88
|
+
(row) =>
|
|
89
|
+
`${row.id} measured ${String(row.measured)} ${row.unit} against ${String(row.threshold)} ${row.unit}`,
|
|
90
|
+
)
|
|
91
|
+
.join('; ');
|
|
92
|
+
super(
|
|
93
|
+
`music master: delivery check failed for ${outputPath}: ${detail} — the profile is not reachable for this take; pick another profile (no re-master is attempted)`,
|
|
94
|
+
);
|
|
95
|
+
this.name = 'DeliveryCheckFailure';
|
|
96
|
+
this.rows = [...rows];
|
|
97
|
+
this.outputPath = outputPath;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** Format a measured loudness value for a `loudnorm` filter argument (`-inf` is legal there). */
|
|
102
|
+
export function loudnormValue(value: number): string {
|
|
103
|
+
if (value === Number.NEGATIVE_INFINITY) {
|
|
104
|
+
return '-inf';
|
|
105
|
+
}
|
|
106
|
+
if (value === Number.POSITIVE_INFINITY) {
|
|
107
|
+
return 'inf';
|
|
108
|
+
}
|
|
109
|
+
return String(value);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** `<artifact>.<profile>.<ext>` — the mastered file's path (R3: a new file, never the take). */
|
|
113
|
+
export function masterOutputName(takePath: string, profileName: string, container: AudioFormat): string {
|
|
114
|
+
if (!PROFILE_NAME_PATTERN.test(profileName)) {
|
|
115
|
+
throw new MasterError(
|
|
116
|
+
`profile name ${JSON.stringify(profileName)} cannot be used in a file name (expected ${PROFILE_NAME_PATTERN.source})`,
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
const extension = extname(takePath);
|
|
120
|
+
const stem = extension === '' ? takePath : takePath.slice(0, takePath.length - extension.length);
|
|
121
|
+
return `${stem}.${profileName}.${container}`;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Everything the pass-2 argv needs. */
|
|
125
|
+
export interface MasterPassInput {
|
|
126
|
+
takePath: string;
|
|
127
|
+
outputPath: string;
|
|
128
|
+
profile: DeliveryProfile;
|
|
129
|
+
/** Pass 1's measurement — `measured_*` and `offset` come from here (R3). */
|
|
130
|
+
firstPass: LoudnessMeasurement;
|
|
131
|
+
ffmpegBin?: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Build the pass-2 `ffmpeg` argv: the target, pass 1's measurements, the
|
|
136
|
+
* profile's `LRA` (only when set — forcing one invites dynamic mode), the explicit
|
|
137
|
+
* `-ar`, the container's encoder, and the new output path.
|
|
138
|
+
*/
|
|
139
|
+
export function masterPassArgs(input: MasterPassInput): string[] {
|
|
140
|
+
const filter = [
|
|
141
|
+
`loudnorm=I=${loudnormValue(input.profile.lufs)}`,
|
|
142
|
+
`TP=${loudnormValue(input.profile.truePeak)}`,
|
|
143
|
+
...(input.profile.lra === undefined ? [] : [`LRA=${loudnormValue(input.profile.lra)}`]),
|
|
144
|
+
`measured_I=${loudnormValue(input.firstPass.integratedLufs)}`,
|
|
145
|
+
`measured_TP=${loudnormValue(input.firstPass.truePeakDbtp)}`,
|
|
146
|
+
`measured_LRA=${loudnormValue(input.firstPass.loudnessRangeLu)}`,
|
|
147
|
+
`measured_thresh=${loudnormValue(input.firstPass.thresholdLufs)}`,
|
|
148
|
+
`offset=${loudnormValue(input.firstPass.targetOffsetDb)}`,
|
|
149
|
+
'print_format=json',
|
|
150
|
+
].join(':');
|
|
151
|
+
return [
|
|
152
|
+
input.ffmpegBin ?? 'ffmpeg',
|
|
153
|
+
'-y',
|
|
154
|
+
'-hide_banner',
|
|
155
|
+
'-nostats',
|
|
156
|
+
'-i',
|
|
157
|
+
input.takePath,
|
|
158
|
+
'-af',
|
|
159
|
+
filter,
|
|
160
|
+
'-ar',
|
|
161
|
+
String(input.profile.sampleRate),
|
|
162
|
+
...MASTER_ENCODERS[input.profile.container],
|
|
163
|
+
input.outputPath,
|
|
164
|
+
];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** Everything {@link masterTake} needs. */
|
|
168
|
+
export interface MasterInput extends MeasureOptions {
|
|
169
|
+
/** The provider take (read only). */
|
|
170
|
+
takePath: string;
|
|
171
|
+
/** The profile's name, used in the output file name and the row notes. */
|
|
172
|
+
profileName: string;
|
|
173
|
+
/** The resolved profile (see `resolveDeliveryProfile`). */
|
|
174
|
+
profile: DeliveryProfile;
|
|
175
|
+
/** Override the output path; defaults to {@link masterOutputName}. */
|
|
176
|
+
outputPath?: string;
|
|
177
|
+
/** Override the checks file; defaults to `<take>.checks.json`. */
|
|
178
|
+
checksPath?: string;
|
|
179
|
+
fileSystem?: FileSystem;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** What a master run produced. */
|
|
183
|
+
export interface MasterResult {
|
|
184
|
+
/** The new file: `<artifact>.<profile>.<ext>`. */
|
|
185
|
+
outputPath: string;
|
|
186
|
+
/** Pass 1's measurement of the take. */
|
|
187
|
+
firstPass: LoudnessMeasurement;
|
|
188
|
+
/** The delivery rows written to `checks.json`. */
|
|
189
|
+
delivery: CheckRow[];
|
|
190
|
+
/** The measurement of the encoded output. */
|
|
191
|
+
deliveryMeasurement: AudioMeasurement;
|
|
192
|
+
checksPath: string;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Normalize one take to a delivery profile (R3) and check the encoded output
|
|
197
|
+
* against it (R4).
|
|
198
|
+
*
|
|
199
|
+
* Two spawns write nothing (`loudnorm` analysis ×2 for measurement) and exactly
|
|
200
|
+
* one spawn writes the output. On a delivery failure the rows are already merged
|
|
201
|
+
* into `checks.json` before {@link DeliveryCheckFailure} is thrown, so the file
|
|
202
|
+
* explains the failure even when the command exits non-zero.
|
|
203
|
+
*/
|
|
204
|
+
export async function masterTake(input: MasterInput): Promise<MasterResult> {
|
|
205
|
+
const fileSystem = input.fileSystem ?? createNodeFileSystem();
|
|
206
|
+
const takePath = input.takePath;
|
|
207
|
+
if (!(await fileSystem.exists(takePath))) {
|
|
208
|
+
throw new MasterError(`take not found: ${takePath}`);
|
|
209
|
+
}
|
|
210
|
+
const outputPath = input.outputPath ?? masterOutputName(takePath, input.profileName, input.profile.container);
|
|
211
|
+
if (outputPath === takePath) {
|
|
212
|
+
throw new MasterError(
|
|
213
|
+
`refusing to overwrite the provider take (${takePath}); the output must be a new <artifact>.<profile>.<ext> file`,
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
const checksPath = input.checksPath ?? checksPathFor(takePath);
|
|
217
|
+
const runner = input.runner;
|
|
218
|
+
|
|
219
|
+
// Pass 1: measure the take (no write).
|
|
220
|
+
const firstPass = await measureLoudness(takePath, input);
|
|
221
|
+
|
|
222
|
+
// Pass 2: the single write.
|
|
223
|
+
const argv = masterPassArgs({
|
|
224
|
+
takePath,
|
|
225
|
+
outputPath,
|
|
226
|
+
profile: input.profile,
|
|
227
|
+
firstPass,
|
|
228
|
+
...(input.ffmpegBin === undefined ? {} : { ffmpegBin: input.ffmpegBin }),
|
|
229
|
+
});
|
|
230
|
+
const output: ToolOutput = await (runner ?? spawnRunner)(argv);
|
|
231
|
+
if (output.exitCode !== 0) {
|
|
232
|
+
throw new AudioToolError(
|
|
233
|
+
`${input.ffmpegBin ?? 'ffmpeg'} loudnorm`,
|
|
234
|
+
'exit',
|
|
235
|
+
`exited ${String(output.exitCode)} while writing ${outputPath}`,
|
|
236
|
+
output.stderr.trim() === '' ? output.stdout : output.stderr,
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
if (!(await fileSystem.exists(outputPath))) {
|
|
240
|
+
throw new MasterError(`ffmpeg reported success but produced no file: ${outputPath}`);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Delivery check: measure the encoded output, never the intermediate (R4).
|
|
244
|
+
let deliveryMeasurement: AudioMeasurement | undefined;
|
|
245
|
+
let measurementError: string | undefined;
|
|
246
|
+
try {
|
|
247
|
+
deliveryMeasurement = await measureAudio(outputPath, input);
|
|
248
|
+
} catch (error: unknown) {
|
|
249
|
+
measurementError = error instanceof AudioToolError ? error.message : String(error);
|
|
250
|
+
}
|
|
251
|
+
const delivery = buildDeliveryCheckRows({
|
|
252
|
+
profile: input.profile,
|
|
253
|
+
profileName: input.profileName,
|
|
254
|
+
...(deliveryMeasurement === undefined ? {} : { measurement: deliveryMeasurement }),
|
|
255
|
+
...(measurementError === undefined ? {} : { measurementError }),
|
|
256
|
+
});
|
|
257
|
+
const merged = mergeChecks(await readChecks(checksPath, fileSystem), delivery);
|
|
258
|
+
await writeChecks(checksPath, merged, fileSystem);
|
|
259
|
+
if (!checksPassed(delivery)) {
|
|
260
|
+
throw new DeliveryCheckFailure(outputPath, delivery);
|
|
261
|
+
}
|
|
262
|
+
if (deliveryMeasurement === undefined) {
|
|
263
|
+
// Unreachable in practice: a missing measurement fails every delivery row above.
|
|
264
|
+
throw new DeliveryCheckFailure(outputPath, delivery);
|
|
265
|
+
}
|
|
266
|
+
return { outputPath, firstPass, delivery, deliveryMeasurement, checksPath };
|
|
267
|
+
}
|