@odori/cli 0.0.10 → 0.0.12

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/dist/cli.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  checkFlags,
3
3
  parseArgs,
4
4
  run
5
- } from "./chunk-AJBK4XRB.js";
5
+ } from "./chunk-FS2BJU5Q.js";
6
6
  export {
7
7
  checkFlags,
8
8
  parseArgs,
package/dist/index.d.ts CHANGED
@@ -251,6 +251,8 @@ type RenderTarget = {
251
251
  input?: Record<string, unknown>;
252
252
  prepared?: unknown;
253
253
  audio?: ManifestAudioCue[];
254
+ /** A declared audio variant's name, applied when the page compiles cues. */
255
+ audioVariant?: string;
254
256
  targetLufs?: number;
255
257
  scenes?: Array<{
256
258
  id: string;
@@ -360,7 +362,7 @@ declare const targetFor: (video: LoadedVideo, input?: Record<string, unknown>, p
360
362
  id: string;
361
363
  start: number;
362
364
  durationInFrames: number;
363
- }>) => RenderTarget;
365
+ }>, audioVariant?: string) => RenderTarget;
364
366
  /**
365
367
  * `metadata.duration` is authoritative. When it is absent, the compiled
366
368
  * timeline reported by the runtime is used instead.
@@ -458,6 +460,100 @@ type DeterminismFinding = {
458
460
  */
459
461
  declare const checkDeterminism: (config: ResolvedConfig) => Promise<DeterminismFinding[]>;
460
462
 
463
+ /**
464
+ * A fact about the project's shape that discovery itself cannot say.
465
+ *
466
+ * Discovery answers "what exists": it walks the tree and takes what matches.
467
+ * That is the right behaviour for a build — an unrecognized file must never
468
+ * take the project down — and exactly the wrong behaviour for an author,
469
+ * because everything discovery quietly steps over is a file someone wrote on
470
+ * purpose. The filesystem is Odori's contract: `video.tsx` is a video,
471
+ * `*.preview.tsx` is a fixture, a directory under components/ names a
472
+ * component. This module checks the places where that contract can be almost
473
+ * met, which is the one distance discovery cannot see.
474
+ *
475
+ * An `error` is a promise the project makes and breaks at render or play
476
+ * time: a sound that will be silence, an override that will never be heard.
477
+ * A `warn` is a file that works today and will surprise someone later.
478
+ */
479
+ type StructureFinding = {
480
+ level: "error" | "warn";
481
+ /** The file an author would open to fix it, relative to the project root. */
482
+ file: string;
483
+ message: string;
484
+ };
485
+ /**
486
+ * Check the filesystem contract and report every place it is almost met.
487
+ *
488
+ * Everything here is answerable in Node from the tree and the loaded
489
+ * metadata: no browser, no network, no render. That is what makes it cheap
490
+ * enough to run inside `odori doctor` and first inside `odori test`, before
491
+ * a browser ever starts.
492
+ */
493
+ declare const checkStructure: (config: ResolvedConfig, graph: ProjectGraph, videos: LoadedVideo[]) => Promise<StructureFinding[]>;
494
+
495
+ /**
496
+ * The whole project as one JSON document: what the filesystem declares,
497
+ * compiled and answered for. `catalog.json` is what discovery alone can say
498
+ * about the tree; this is what the tree says once every entry has actually
499
+ * been loaded — durations, formats, brands, variants, who uses what — plus
500
+ * every place the filesystem contract is almost met.
501
+ *
502
+ * The point is inspectability without execution. An agent, a CI step, or a
503
+ * teammate's script should be able to ask "what is in this project and is
504
+ * its shape sound" by reading one file, instead of importing modules or
505
+ * driving a browser. The videos themselves stay the source of truth; this is
506
+ * the tree's own testimony, written down where anything can read it.
507
+ */
508
+ type GraphArtifact = {
509
+ sourceHash: string;
510
+ generatedAt: string;
511
+ videos: Array<{
512
+ id: string;
513
+ title: string;
514
+ description?: string;
515
+ file: string;
516
+ format: {
517
+ width: number;
518
+ height: number;
519
+ fps: number;
520
+ };
521
+ /** 0 when the composition's scenes decide, which only a browser can total. */
522
+ durationInFrames: number;
523
+ seconds: number | null;
524
+ brand: string;
525
+ tags: string[];
526
+ audioVariants: string[];
527
+ components: string[];
528
+ prepare: boolean;
529
+ }>;
530
+ components: Array<{
531
+ name: string;
532
+ file: string;
533
+ usedBy: string[];
534
+ }>;
535
+ brands: Array<{
536
+ name: string;
537
+ file: string;
538
+ }>;
539
+ audio: Array<{
540
+ name: string;
541
+ url: string;
542
+ file: string;
543
+ bytes: number;
544
+ }>;
545
+ categories: Array<{
546
+ path: string;
547
+ name?: string;
548
+ order?: number;
549
+ }>;
550
+ findings: StructureFinding[];
551
+ };
552
+ declare const buildGraphArtifact: (root?: string) => Promise<{
553
+ artifact: GraphArtifact;
554
+ outDir: string;
555
+ }>;
556
+
461
557
  /**
462
558
  * The two programs a render actually runs.
463
559
  *
@@ -607,6 +703,8 @@ declare const exportCommand: (id: string, options?: {
607
703
  format?: string;
608
704
  /** False writes the picture with no audio track. */
609
705
  audio?: boolean;
706
+ /** A declared audio variant to voice this export with. */
707
+ audioVariant?: string;
610
708
  /** True draws on the machine's GPU instead of the reproducible backend. */
611
709
  fast?: boolean;
612
710
  skipUnchangedFrames?: boolean;
@@ -733,4 +831,4 @@ declare const newCommand: (name: string, options?: {
733
831
  /** Add the videos source root and configuration to an existing project. */
734
832
  declare const initCommand: (root?: string) => Promise<void>;
735
833
 
736
- export { CHROME_BUILD, type ChunkPlan, type CompileResult, type ComponentStatus, type Context, type DeterminismFinding, type DiffLine, FORMATS, type FrameChunk, JobQueue, type JobRecord, type LoadedVideo, type MixInput, type OdoriConfig, type ProjectGraph, type RenderOptions, type RenderTarget, type RenderTimings, type ResolvedBinary, type ResolvedConfig, type StudioServer, type VideoFormat, addCommand, alphaWarning, appendJobLog, buildAudioFilter, cacheRoot, cancelJob, checkDeterminism, chunkFrames, clearPrepareCache, compileInBrowser, componentStatus, countChanges, createContext, createIntegrityResolver, createJob, defaultConcurrency, defineConfig, devCommand, diffCommand, diffLines, discoverProject, ensureFfmpeg, exportCommand, exportQueue, fileKey, findVideo, formatDiff, formatNames, frameCommand, freezeManifest, generateImports, initCommand, inspectCommand, installBrowser, installFfmpeg, jobsCommand, listCommand, listJobs, loadConfig, loadVideos, localCandidates, newCommand, openRenderPage, outputName, planChunks, prepareCacheKey, probeSignatures, readAudio, readJob, readPrepareCache, readTimeline, reconcileJobs, renderMovie, renderStill, renderToolchain, resolveBrowser, resolveChromePath, resolveCueFile, resolveFfmpeg, resolveFormat, runJob, runPrepare, seekTo, startStudioServer, targetFor, testCommand, updateCommand, updateJob, withServer, writeGenerated, writePrepareCache };
834
+ export { CHROME_BUILD, type ChunkPlan, type CompileResult, type ComponentStatus, type Context, type DeterminismFinding, type DiffLine, FORMATS, type FrameChunk, type GraphArtifact, JobQueue, type JobRecord, type LoadedVideo, type MixInput, type OdoriConfig, type ProjectGraph, type RenderOptions, type RenderTarget, type RenderTimings, type ResolvedBinary, type ResolvedConfig, type StructureFinding, type StudioServer, type VideoFormat, addCommand, alphaWarning, appendJobLog, buildAudioFilter, buildGraphArtifact, cacheRoot, cancelJob, checkDeterminism, checkStructure, chunkFrames, clearPrepareCache, compileInBrowser, componentStatus, countChanges, createContext, createIntegrityResolver, createJob, defaultConcurrency, defineConfig, devCommand, diffCommand, diffLines, discoverProject, ensureFfmpeg, exportCommand, exportQueue, fileKey, findVideo, formatDiff, formatNames, frameCommand, freezeManifest, generateImports, initCommand, inspectCommand, installBrowser, installFfmpeg, jobsCommand, listCommand, listJobs, loadConfig, loadVideos, localCandidates, newCommand, openRenderPage, outputName, planChunks, prepareCacheKey, probeSignatures, readAudio, readJob, readPrepareCache, readTimeline, reconcileJobs, renderMovie, renderStill, renderToolchain, resolveBrowser, resolveChromePath, resolveCueFile, resolveFfmpeg, resolveFormat, runJob, runPrepare, seekTo, startStudioServer, targetFor, testCommand, updateCommand, updateJob, withServer, writeGenerated, writePrepareCache };
package/dist/index.js CHANGED
@@ -6,9 +6,11 @@ import {
6
6
  alphaWarning,
7
7
  appendJobLog,
8
8
  buildAudioFilter,
9
+ buildGraphArtifact,
9
10
  cacheRoot,
10
11
  cancelJob,
11
12
  checkDeterminism,
13
+ checkStructure,
12
14
  chunkFrames,
13
15
  clearPrepareCache,
14
16
  compileInBrowser,
@@ -75,7 +77,7 @@ import {
75
77
  withServer,
76
78
  writeGenerated,
77
79
  writePrepareCache
78
- } from "./chunk-AJBK4XRB.js";
80
+ } from "./chunk-FS2BJU5Q.js";
79
81
  export {
80
82
  CHROME_BUILD,
81
83
  FORMATS,
@@ -84,9 +86,11 @@ export {
84
86
  alphaWarning,
85
87
  appendJobLog,
86
88
  buildAudioFilter,
89
+ buildGraphArtifact,
87
90
  cacheRoot,
88
91
  cancelJob,
89
92
  checkDeterminism,
93
+ checkStructure,
90
94
  chunkFrames,
91
95
  clearPrepareCache,
92
96
  compileInBrowser,