Skip to content

Commit

Permalink
Revert "chore: update devtools patches (2nd attempt) (#7008)" (#7131)
Browse files Browse the repository at this point in the history
This reverts commit 4755bbc.
  • Loading branch information
edmundhung authored Oct 30, 2024
1 parent 07b5b25 commit d1474fc
Show file tree
Hide file tree
Showing 25 changed files with 2,742 additions and 559 deletions.
5 changes: 0 additions & 5 deletions .changeset/famous-birds-remain.md

This file was deleted.

4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,6 @@ packages/quick-edit/web
packages/wrangler/config-schema.json
packages/wrangler-devtools/built-devtools
packages/wrangler-devtools/.cipd
packages/wrangler-devtools/.gclient
packages/wrangler-devtools/.gclient_entries
packages/wrangler-devtools/.gclient_previous_sync_commits
packages/wrangler-devtools/.gcs_entries
packages/wrangler-devtools/depot
packages/wrangler-devtools/devtools-frontend
packages/miniflare/dist-types/
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ packages/create-cloudflare/templates*/**/*.*
# but still exclude the worker-configuration.d.ts file, since it's generated
!packages/create-cloudflare/templates*/hello-world/**/*.*
packages/create-cloudflare/templates*/hello-world/**/worker-configuration.d.ts
packages/wrangler-devtools/devtools-frontend

# dist-functions are generated in the fixtures/vitest-pool-workers-examples/pages-functions-unit-integration-self folder
dist-functions
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler-devtools/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ROOT = $(realpath .)
PATH_WITH_DEPOT = $(PATH):$(ROOT)/depot/
# The upstream devtools commit upon which our patches are based
HEAD = 279239c4c670edbde12345aca4fadb7f07d503e8
HEAD = 64208f10b3efe06a92c58d345bd828832d09c4a7
PATCHES = $(shell ls ${PWD}/patches/*.patch)
depot:
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git depot
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
From 24644cc732ec4bf8589715e853067eadd1b52e29 Mon Sep 17 00:00:00 2001
From: Workers DevProd <[email protected]>
Date: Mon, 2 Oct 2023 18:13:34 +0100
Subject: [PATCH 01/15] Support viewing files over the network

---
front_end/core/sdk/Target.ts | 4 ++++
front_end/entrypoints/js_app/js_app.ts | 2 +-
front_end/panels/sources/sources-meta.ts | 11 ++++++++---
tsconfig.json | 3 ++-
4 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/front_end/core/sdk/Target.ts b/front_end/core/sdk/Target.ts
index eed909ea64..5e1778885d 100644
--- a/front_end/core/sdk/Target.ts
+++ b/front_end/core/sdk/Target.ts
@@ -82,6 +82,9 @@ export class Target extends ProtocolClient.InspectorBackend.TargetBase {
case Type.Tab:
this.#capabilitiesMask = Capability.Target | Capability.Tracing;
break;
+ case Type.Cloudflare:
+ this.#capabilitiesMask = Capability.JS | Capability.Network;
+ break;
}
this.#typeInternal = type;
this.#parentTargetInternal = parentTarget;
@@ -255,6 +258,7 @@ export enum Type {
Browser = 'browser',
AuctionWorklet = 'auction-worklet',
Tab = 'tab',
+ Cloudflare = 'cloudflare',
}

// TODO(crbug.com/1167717): Make this a const enum again
diff --git a/front_end/entrypoints/js_app/js_app.ts b/front_end/entrypoints/js_app/js_app.ts
index cafecfa4ba..213ca7fecd 100644
--- a/front_end/entrypoints/js_app/js_app.ts
+++ b/front_end/entrypoints/js_app/js_app.ts
@@ -38,7 +38,7 @@ export class JsMainImpl implements Common.Runnable.Runnable {
Host.userMetrics.actionTaken(Host.UserMetrics.Action.ConnectToNodeJSDirectly);
void SDK.Connections.initMainConnection(async () => {
const target = SDK.TargetManager.TargetManager.instance().createTarget(
- 'main', i18nString(UIStrings.main), SDK.Target.Type.Node, null);
+ 'main', i18nString(UIStrings.main), SDK.Target.Type.Cloudflare, null);
void target.runtimeAgent().invoke_runIfWaitingForDebugger();
}, Components.TargetDetachedDialog.TargetDetachedDialog.webSocketConnectionLost);
}
diff --git a/front_end/panels/sources/sources-meta.ts b/front_end/panels/sources/sources-meta.ts
index a0c126df12..4b8244ea69 100644
--- a/front_end/panels/sources/sources-meta.ts
+++ b/front_end/panels/sources/sources-meta.ts
@@ -41,6 +41,11 @@ const UIStrings = {
*@description Title of the 'Snippets' tool in the Snippets Navigator View, which is part of the Sources tool
*/
snippets: 'Snippets',
+ /**
+ *@description Title of the 'Cloudflare' tool in the Cloudflare Navigator View, which is part of the Sources tool
+ */
+ cloudflare: 'Cloudflare',
+ /**
/**
*@description Command for showing the 'Search' tool
*/
@@ -454,14 +459,14 @@ UI.ViewManager.registerViewExtension({

UI.ViewManager.registerViewExtension({
location: UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW,
- id: 'navigator-files',
+ id: 'navigator-network',
commandPrompt: i18nLazyString(UIStrings.showWorkspace),
- title: i18nLazyString(UIStrings.workspace),
+ title: i18nLazyString(UIStrings.cloudflare),
order: 3,
persistence: UI.ViewManager.ViewPersistence.PERMANENT,
async loadView() {
const Sources = await loadSourcesModule();
- return Sources.SourcesNavigator.FilesNavigatorView.instance();
+ return Sources.SourcesNavigator.NetworkNavigatorView.instance();
},
});

diff --git a/tsconfig.json b/tsconfig.json
index ac0d4aaf68..29c726e185 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -16,6 +16,7 @@
"inspector_overlay"
],
"exclude": [
- "front_end/**/*-legacy.ts"
+ "front_end/**/*-legacy.ts",
+ "third_party/**/*.ts"
]
}
--
2.39.3 (Apple Git-145)

This file was deleted.

Loading

0 comments on commit d1474fc

Please sign in to comment.