validate
Interfaces
| Interface | Description |
|---|---|
| OperationDependency | One edge of the dependency graph: a related operation and where it sits. |
| OperationNode | One node of operationGraph: an operation with both of its edge lists already resolved. |
Type Aliases
| Type Alias | Description |
|---|---|
| DependencyKind | How one operation relates to another. |
| Diagnostic | A single finding produced by validateOperations. |
| DiagnosticSeverity | How serious a Diagnostic is. |
| ValidationContext | Options for validateOperations. |
Variables
| Variable | Description |
|---|---|
| CORE_OPERATIONS | Operations that make the CDN actually process an image. A chain without one of these delivers the original file untouched — and they are exactly the operations the format/jpeg dimension ceiling applies to, which is why the set lives here and validateOperations re-exports it. |
| INFO_OPERATIONS | Info-returning operations: a chain built only from these needs no core operation, because it returns metadata rather than an image. |
| MUST_BE_LAST_OPERATIONS | Operations that must be the last directive in the chain. Video thumbs~N is subject to the same rule — use mustBeLast, which handles the counted suffix. |
| OPERATION_MODIFIERS | Target operation → the operations that configure it. The table this model is built on; exported so callers can enumerate rather than probe. |
| STACKABLE_OPERATIONS | Stackable operations — those that may legitimately appear more than once in a chain. Repeating anything else is a duplicate-operation warning, since the CDN applies only the last occurrence. |
Functions
| Function | Description |
|---|---|
| isCoreOperation | Whether an operation is a core (image-processing) one. |
| isOperationModifier | Whether an operation is state for a later one, rather than an effect in its own right — the operations for which operationDependents can be non-empty. |
| isStackable | Whether repeating this operation in a chain is meaningful. false means the CDN keeps only the last occurrence. |
| mustBeLast | Whether the operation has to be the final directive in its chain. Handles counted video operations, so thumbs~5 reports true. |
| operationDependents | The inverse of operationInputs: the operations that the one identified by ref affects. For a modifier that is every following target it still reaches; for format/jpeg it is every core operation in the chain. |
| operationGraph | The whole chain as a dependency graph, one node per operation in order. Use this instead of querying node by node: it needs no ref lookup, addresses repeated operations unambiguously by position, and is what the validator itself runs on. |
| operationInputs | The operations feeding the one identified by ref — the state that configures it, plus any chain-wide limit that applies to it. Empty when the operation has no modelled dependencies or is absent from the chain. |
| validateOperations | Validates an operation chain against the documented CDN rules. Pass { conversion: 'video' } etc. to apply conversion-path rules instead of image rules. |