Files
flipper/desktop/plugins/public/ui-debugger/fb-stubs/StreamInterceptor.tsx
Luke De Feo 5ce2c984a9 Bloks, support NT minification map
Summary:
There were a small number of styles / attributes that were missing, this addresses this.

Similar to the bloks minification map there are some special hardcoded reserved ids, if that doesnt work then you can look into a special place for each style

I also refactored the transform metadata method as it was getting very nested and hard to understand.

Reviewed By: aigoncharov

Differential Revision: D46799392

fbshipit-source-id: 8de8a2740f45ddb23a1bc9abb7bb36f969cf1fbb
2023-06-19 05:06:52 -07:00

32 lines
739 B
TypeScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import {DeviceOS} from 'flipper-plugin';
import {Id, Metadata, StreamInterceptor, UINode} from '../types';
export function getStreamInterceptor(_: DeviceOS): StreamInterceptor {
return new NoOpStreamInterceptor();
}
class NoOpStreamInterceptor implements StreamInterceptor {
init() {
return null;
}
async transformNodes(
nodes: Map<Id, UINode>,
): Promise<[Map<Id, UINode>, Metadata[]]> {
return [nodes, []];
}
async transformMetadata(metadata: Metadata): Promise<Metadata> {
return metadata;
}
}