@react-native/debugger-shell 0.87.0-nightly-20260706-e04ff69ab → 0.87.0-nightly-20260708-b67b7ba62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/electron/AppMenu.d.ts +11 -0
- package/dist/electron/AppMenu.js +167 -0
- package/dist/electron/AppMenu.js.flow +11 -0
- package/dist/electron/MainInstanceEntryPoint.js +3 -43
- package/dist/electron/utils.d.ts +12 -0
- package/dist/electron/utils.js +12 -0
- package/dist/electron/utils.js.flow +12 -0
- package/package.json +2 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export declare function configureAppMenu(): void;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.configureAppMenu = configureAppMenu;
|
|
7
|
+
const { BrowserWindow, Menu, app, nativeImage, shell } = require("electron");
|
|
8
|
+
const { isMacOSAtLeast } = require("./utils");
|
|
9
|
+
function configureAppMenu() {
|
|
10
|
+
const template = [
|
|
11
|
+
...(process.platform === "darwin"
|
|
12
|
+
? [
|
|
13
|
+
{
|
|
14
|
+
role: "appMenu",
|
|
15
|
+
},
|
|
16
|
+
]
|
|
17
|
+
: []),
|
|
18
|
+
{
|
|
19
|
+
label: "File",
|
|
20
|
+
submenu: [
|
|
21
|
+
{
|
|
22
|
+
label: "Reload App",
|
|
23
|
+
accelerator:
|
|
24
|
+
process.platform === "darwin" ? "Command+R" : "Control+R",
|
|
25
|
+
click: () => invokeCommand("inspector-main.reload"),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: "Reload DevTools",
|
|
29
|
+
accelerator: process.platform === "darwin" ? "Option+R" : "Alt+R",
|
|
30
|
+
click: () => BrowserWindow.getFocusedWindow()?.webContents.reload(),
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: "separator",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
label: "Quick Open…",
|
|
37
|
+
...menuSymbol("doc.text.magnifyingglass"),
|
|
38
|
+
accelerator:
|
|
39
|
+
process.platform === "darwin" ? "Command+P" : "Control+P",
|
|
40
|
+
click: () => invokeCommand("quick-open.show"),
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: "separator",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
role: "close",
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: "Edit",
|
|
52
|
+
submenu: [
|
|
53
|
+
{
|
|
54
|
+
role: "undo",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
role: "redo",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: "separator",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
role: "cut",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
role: "copy",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
role: "paste",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
role: "selectAll",
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: "View",
|
|
78
|
+
submenu: [
|
|
79
|
+
{
|
|
80
|
+
label: "Command Palette…",
|
|
81
|
+
...menuSymbol("filemenu.and.selection"),
|
|
82
|
+
accelerator:
|
|
83
|
+
process.platform === "darwin"
|
|
84
|
+
? "Command+Shift+P"
|
|
85
|
+
: "Control+Shift+P",
|
|
86
|
+
click: () => invokeCommand("quick-open.show-command-menu"),
|
|
87
|
+
},
|
|
88
|
+
...(!app.isPackaged
|
|
89
|
+
? [
|
|
90
|
+
{
|
|
91
|
+
type: "separator",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
role: "toggleDevTools",
|
|
95
|
+
},
|
|
96
|
+
]
|
|
97
|
+
: []),
|
|
98
|
+
{
|
|
99
|
+
type: "separator",
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
role: "resetZoom",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
role: "zoomIn",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
role: "zoomOut",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
type: "separator",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
role: "togglefullscreen",
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
role: "windowMenu",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
role: "help",
|
|
123
|
+
submenu: [
|
|
124
|
+
{
|
|
125
|
+
label: "Keyboard Shortcuts",
|
|
126
|
+
...menuSymbol("keyboard"),
|
|
127
|
+
click: () => invokeCommand("settings.shortcuts"),
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
type: "separator",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
label: "React Native Website",
|
|
134
|
+
click: () => shell.openExternal("https://reactnative.dev"),
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: "Release Notes",
|
|
138
|
+
click: () =>
|
|
139
|
+
shell.openExternal(
|
|
140
|
+
"https://github.com/facebook/react-native/releases",
|
|
141
|
+
),
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
];
|
|
146
|
+
const menu = Menu.buildFromTemplate(template);
|
|
147
|
+
Menu.setApplicationMenu(menu);
|
|
148
|
+
}
|
|
149
|
+
function menuSymbol(symbolName) {
|
|
150
|
+
if (!isMacOSAtLeast(26)) {
|
|
151
|
+
return {};
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
icon: nativeImage.createMenuSymbol(symbolName),
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function invokeCommand(commandId) {
|
|
158
|
+
const win = BrowserWindow.getFocusedWindow();
|
|
159
|
+
win?.webContents.executeJavaScript(
|
|
160
|
+
`(async () => {
|
|
161
|
+
const UI = await import('./ui/legacy/legacy.js');
|
|
162
|
+
return UI.ActionRegistry.ActionRegistry.instance()
|
|
163
|
+
.getAction(${JSON.stringify(commandId)})?.execute();
|
|
164
|
+
})()`,
|
|
165
|
+
true,
|
|
166
|
+
);
|
|
167
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow strict-local
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
declare export function configureAppMenu(): void;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _AppMenu = require("./AppMenu.js");
|
|
3
4
|
var _SettingsStore = _interopRequireDefault(require("./SettingsStore.js"));
|
|
4
5
|
function _interopRequireDefault(e) {
|
|
5
6
|
return e && e.__esModule ? e : { default: e };
|
|
6
7
|
}
|
|
7
8
|
const path = require("path");
|
|
8
9
|
const util = require("util");
|
|
9
|
-
const { BrowserWindow,
|
|
10
|
+
const { BrowserWindow, app, shell, ipcMain } = require("electron");
|
|
10
11
|
const appSettings = new _SettingsStore.default();
|
|
11
12
|
const windowMetadata = new WeakMap();
|
|
12
13
|
function handleLaunchArgs(argv) {
|
|
@@ -72,47 +73,6 @@ function handleLaunchArgs(argv) {
|
|
|
72
73
|
}
|
|
73
74
|
frontendWindow.focus();
|
|
74
75
|
}
|
|
75
|
-
function configureAppMenu() {
|
|
76
|
-
const template = [
|
|
77
|
-
...(process.platform === "darwin"
|
|
78
|
-
? [
|
|
79
|
-
{
|
|
80
|
-
role: "appMenu",
|
|
81
|
-
},
|
|
82
|
-
]
|
|
83
|
-
: []),
|
|
84
|
-
{
|
|
85
|
-
role: "fileMenu",
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
role: "editMenu",
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
role: "viewMenu",
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
role: "windowMenu",
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
role: "help",
|
|
98
|
-
submenu: [
|
|
99
|
-
{
|
|
100
|
-
label: "React Native Website",
|
|
101
|
-
click: () => shell.openExternal("https://reactnative.dev"),
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
label: "Release Notes",
|
|
105
|
-
click: () =>
|
|
106
|
-
shell.openExternal(
|
|
107
|
-
"https://github.com/facebook/react-native/releases",
|
|
108
|
-
),
|
|
109
|
-
},
|
|
110
|
-
],
|
|
111
|
-
},
|
|
112
|
-
];
|
|
113
|
-
const menu = Menu.buildFromTemplate(template);
|
|
114
|
-
Menu.setApplicationMenu(menu);
|
|
115
|
-
}
|
|
116
76
|
function getSavedWindowPosition(windowKey) {
|
|
117
77
|
return appSettings.get("windowArrangements", {})[windowKey];
|
|
118
78
|
}
|
|
@@ -140,7 +100,7 @@ function setupWindowResizeListeners(browserWindow, windowKey) {
|
|
|
140
100
|
}
|
|
141
101
|
app.whenReady().then(() => {
|
|
142
102
|
handleLaunchArgs(process.argv.slice(app.isPackaged ? 1 : 2));
|
|
143
|
-
configureAppMenu();
|
|
103
|
+
(0, _AppMenu.configureAppMenu)();
|
|
144
104
|
app.on(
|
|
145
105
|
"second-instance",
|
|
146
106
|
(event, electronArgv, workingDirectory, additionalData) => {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** Equivalent of Swift's `if #available(macOS 26, *)`. */
|
|
12
|
+
export declare function isMacOSAtLeast(major: number): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
exports.isMacOSAtLeast = isMacOSAtLeast;
|
|
7
|
+
function isMacOSAtLeast(major) {
|
|
8
|
+
return (
|
|
9
|
+
process.platform === "darwin" &&
|
|
10
|
+
Number.parseInt(process.getSystemVersion().split(".")[0], 10) >= major
|
|
11
|
+
);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow strict-local
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** Equivalent of Swift's `if #available(macOS 26, *)`. */
|
|
12
|
+
declare export function isMacOSAtLeast(major: number): boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native/debugger-shell",
|
|
3
3
|
"productName": "React Native DevTools",
|
|
4
|
-
"version": "0.87.0-nightly-
|
|
4
|
+
"version": "0.87.0-nightly-20260708-b67b7ba62",
|
|
5
5
|
"description": "Experimental debugger shell for React Native for use with @react-native/debugger-frontend",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react-native",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"fb-dotslash": "0.5.8"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"electron": "
|
|
39
|
+
"electron": "43.0.0",
|
|
40
40
|
"semver": "^7.1.3"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|