From 216e78a3edc40dac4001682662cc95eb5ebb09ef Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Tue, 7 Nov 2023 15:10:45 +0000 Subject: [PATCH 1/2] Allow --machine to be passed to devtools_tool serve --- tool/lib/commands/serve.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tool/lib/commands/serve.dart b/tool/lib/commands/serve.dart index cab95753e50..cc38a3c8f17 100644 --- a/tool/lib/commands/serve.dart +++ b/tool/lib/commands/serve.dart @@ -53,6 +53,11 @@ class ServeCommand extends Command { help: 'Whether to build the DevTools app in release mode before starting ' 'the DevTools server.', + ) + ..addFlag( + 'machine', + negatable: false, + help: 'Sets output format to JSON for consumption in tools.', ); } From eb66845fdeafe3ab1a6749ab68aa9540c839b3fd Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Tue, 7 Nov 2023 15:21:36 +0000 Subject: [PATCH 2/2] Add allow-embedding --- tool/lib/commands/serve.dart | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tool/lib/commands/serve.dart b/tool/lib/commands/serve.dart index cc38a3c8f17..869abdfbbb9 100644 --- a/tool/lib/commands/serve.dart +++ b/tool/lib/commands/serve.dart @@ -14,6 +14,8 @@ import '../utils.dart'; const _useLocalFlutterFlag = 'use-local-flutter'; const _updatePerfettoFlag = 'update-perfetto'; const _buildAppFlag = 'build-app'; +const _machineFlag = 'machine'; +const _allowEmbeddingFlag = 'allow-embedding'; /// This command builds DevTools in release mode by running the /// `devtools_tool build-release` command and then serves DevTools with a @@ -54,10 +56,15 @@ class ServeCommand extends Command { 'Whether to build the DevTools app in release mode before starting ' 'the DevTools server.', ) + // Flags defined in the server in DDS. ..addFlag( - 'machine', + _machineFlag, negatable: false, help: 'Sets output format to JSON for consumption in tools.', + ) + ..addFlag( + _allowEmbeddingFlag, + help: 'Allow embedding DevTools inside an iframe.', ); }