( record: StateRootCompositionRecord, compositionId: string, )
| 103 | } |
| 104 | |
| 105 | function assertMatchingComposition( |
| 106 | record: StateRootCompositionRecord, |
| 107 | compositionId: string, |
| 108 | ): void { |
| 109 | if (record.compositionId === compositionId) return; |
| 110 | throw new StateRootCompositionError( |
| 111 | 'composition_mismatch', |
| 112 | `State Root requires Runtime Host composition ${record.compositionId}`, |
| 113 | ); |
| 114 | } |
| 115 | |
| 116 | function requireCompositionId(value: string): void { |
| 117 | if (!COMPOSITION_ID_PATTERN.test(value) || value.length > 128) { |
no outgoing calls
no test coverage detected