@odori/cli 0.0.11 → 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/LICENSE +22 -0
- package/dist/{chunk-77R3UC27.js → chunk-FS2BJU5Q.js} +741 -72
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +95 -1
- package/dist/index.js +5 -1
- package/dist/{registry-snapshot-TKH2KAC3.js → registry-snapshot-TSTAA6NT.js} +1815 -245
- package/package.json +17 -20
- package/src/cli.ts +29 -0
- package/src/commands/blocks.ts +188 -0
- package/src/commands/docs.ts +88 -0
- package/src/commands/doctor.ts +38 -0
- package/src/commands/graph.ts +141 -0
- package/src/commands/test.ts +10 -1
- package/src/discovery.ts +8 -2
- package/src/docs-snapshot.json +130 -0
- package/src/docs.ts +54 -0
- package/src/index.ts +2 -0
- package/src/registry-snapshot.json +1647 -206
- package/src/registry-source.ts +139 -0
- package/src/structure.ts +177 -0
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -460,6 +460,100 @@ type DeterminismFinding = {
|
|
|
460
460
|
*/
|
|
461
461
|
declare const checkDeterminism: (config: ResolvedConfig) => Promise<DeterminismFinding[]>;
|
|
462
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
|
+
|
|
463
557
|
/**
|
|
464
558
|
* The two programs a render actually runs.
|
|
465
559
|
*
|
|
@@ -737,4 +831,4 @@ declare const newCommand: (name: string, options?: {
|
|
|
737
831
|
/** Add the videos source root and configuration to an existing project. */
|
|
738
832
|
declare const initCommand: (root?: string) => Promise<void>;
|
|
739
833
|
|
|
740
|
-
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-
|
|
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,
|