Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions front_end/core/protocol_client/InspectorBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,10 @@ export class TargetBase {
return this.getAgent('Fetch');
}

fuseboxClientAgent(): ProtocolProxyApi.FuseboxClientApi {
return this.getAgent('FuseboxClient');
}

heapProfilerAgent(): ProtocolProxyApi.HeapProfilerApi {
return this.getAgent('HeapProfiler');
}
Expand Down
8 changes: 1 addition & 7 deletions front_end/entrypoints/rn_fusebox/rn_fusebox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,7 @@ Host.rnPerfMetrics.entryPointLoadingStarted('rn_fusebox');
class FuseboxClientMetadataModel extends SDK.SDKModel.SDKModel<void> {
constructor(target: SDK.Target.Target) {
super(target);
target.router()?.sendMessage(
target.sessionId,
'FuseboxClient',
'FuseboxClient.setClientMetadata' as InspectorBackend.QualifiedName,
{},
() => {},
);
void target.fuseboxClientAgent().invoke_setClientMetadata();
}
}

Expand Down
3 changes: 3 additions & 0 deletions front_end/generated/InspectorBackendCommands.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions front_end/generated/protocol-mapping.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,17 @@ export namespace ProtocolMapping {
}

export interface Commands {
/**
* Identifies the current client as being Fusebox.
*
* The Fusebox backend may use this knowledge to print an informational
* message to the console, etc. The client should send this before enabling
* the Runtime and Log domains.
*/
'FuseboxClient.setClientMetadata': {
paramsType: [];
returnType: void;
};
/**
* Disables the accessibility domain.
*/
Expand Down
18 changes: 18 additions & 0 deletions front_end/generated/protocol-proxy-api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ declare namespace ProtocolProxyApi {
export type ProtocolDomainName = keyof ProtocolApi;

export interface ProtocolApi {
FuseboxClient: FuseboxClientApi;

Accessibility: AccessibilityApi;

Animation: AnimationApi;
Expand Down Expand Up @@ -119,6 +121,8 @@ declare namespace ProtocolProxyApi {
}

export interface ProtocolDispatchers {
FuseboxClient: FuseboxClientDispatcher;

Accessibility: AccessibilityDispatcher;

Animation: AnimationDispatcher;
Expand Down Expand Up @@ -220,6 +224,20 @@ declare namespace ProtocolProxyApi {
}


export interface FuseboxClientApi {
/**
* Identifies the current client as being Fusebox.
*
* The Fusebox backend may use this knowledge to print an informational
* message to the console, etc. The client should send this before enabling
* the Runtime and Log domains.
*/
invoke_setClientMetadata(): Promise<Protocol.ProtocolResponseWithError>;

}
export interface FuseboxClientDispatcher {
}

export interface AccessibilityApi {
/**
* Disables the accessibility domain.
Expand Down
7 changes: 7 additions & 0 deletions front_end/generated/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ export interface ProtocolResponseWithError {
type OpaqueType<Tag extends string> = {protocolOpaqueTypeTag: Tag};
type OpaqueIdentifier<RepresentationType, Tag extends string> = RepresentationType&OpaqueType<Tag>;

/**
* A React Native-specific domain pertaining to the Fusebox (React Native
* DevTools) client.
*/
export namespace FuseboxClient {
}

export namespace Accessibility {

/**
Expand Down
1 change: 1 addition & 0 deletions scripts/deps/generate_protocol_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def main():
popen([GENERATE_DEPRECATIONS_SCRIPT])

popen([CONCATENATE_PROTOCOL_SCRIPT] + [
path.join(PROTOCOL_LOCATION, 'react_native_domains.pdl'),
path.join(PROTOCOL_LOCATION, 'browser_protocol.pdl'),
path.join(V8_DIRECTORY_PATH, 'include', 'js_protocol.pdl'),
# output_file
Expand Down
11 changes: 11 additions & 0 deletions third_party/blink/public/devtools_protocol/browser_protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
"minor": "3"
},
"domains": [
{
"domain": "FuseboxClient",
"description": "A React Native-specific domain pertaining to the Fusebox (React Native\nDevTools) client.",
"experimental": true,
"commands": [
{
"name": "setClientMetadata",
"description": "Identifies the current client as being Fusebox.\n\nThe Fusebox backend may use this knowledge to print an informational\nmessage to the console, etc. The client should send this before enabling\nthe Runtime and Log domains."
}
]
},
{
"domain": "Accessibility",
"experimental": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.

# A React Native-specific domain pertaining to the Fusebox (React Native
# DevTools) client.
experimental domain FuseboxClient

# Identifies the current client as being Fusebox.
#
# The Fusebox backend may use this knowledge to print an informational
# message to the console, etc. The client should send this before enabling
# the Runtime and Log domains.
command setClientMetadata