mirror of
https://github.com/responsively-org/responsively-app
synced 2024-11-10 14:54:12 +00:00
Merge branch 'main' into dependabot/npm_and_yarn/desktop-app/css-minimizer-webpack-plugin-5.0.0
This commit is contained in:
commit
e8b9380d5e
7 changed files with 43 additions and 51 deletions
|
@ -115,7 +115,7 @@
|
|||
"electron-debug": "^3.2.0",
|
||||
"electron-log": "^4.4.8",
|
||||
"electron-store": "^8.0.2",
|
||||
"electron-updater": "^5.2.3",
|
||||
"electron-updater": "^5.3.0",
|
||||
"emitter": "^0.0.5",
|
||||
"mousetrap": "^1.6.5",
|
||||
"os": "^0.1.2",
|
||||
|
@ -138,7 +138,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@electron/notarize": "^1.2.3",
|
||||
"@electron/rebuild": "^3.2.10",
|
||||
"@electron/rebuild": "^3.2.13",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
|
||||
"@svgr/webpack": "^7.0.0",
|
||||
"@tailwindcss/typography": "^0.5.8",
|
||||
|
@ -152,7 +152,7 @@
|
|||
"@types/mousetrap": "^1.6.10",
|
||||
"@types/node": "18.15.2",
|
||||
"@types/react": "18.0.28",
|
||||
"@types/react-dom": "18.0.6",
|
||||
"@types/react-dom": "18.0.10",
|
||||
"@types/react-test-renderer": "^18.0.0",
|
||||
"@types/terser-webpack-plugin": "^5.0.4",
|
||||
"@types/uuid": "^9.0.1",
|
||||
|
@ -167,8 +167,8 @@
|
|||
"css-loader": "^6.7.3",
|
||||
"css-minimizer-webpack-plugin": "^5.0.0",
|
||||
"detect-port": "^1.3.0",
|
||||
"electron": "^23.1.3",
|
||||
"electron-builder": "^23.3.3",
|
||||
"electron": "^24.2.0",
|
||||
"electron-builder": "^23.6.0",
|
||||
"electron-devtools-installer": "^3.2.0",
|
||||
"electronmon": "^2.0.2",
|
||||
"eslint": "^8.36.0",
|
||||
|
|
|
@ -79,6 +79,10 @@ const enableInspector = async (
|
|||
): Promise<ToggleInspectorResult> => {
|
||||
const { webviewId } = args;
|
||||
const webViewContents = webContents.fromId(webviewId);
|
||||
if (webViewContents === undefined) {
|
||||
return { status: false };
|
||||
}
|
||||
|
||||
const dbg = webViewContents.debugger;
|
||||
if (!dbg.isAttached()) {
|
||||
dbg.attach();
|
||||
|
@ -108,6 +112,9 @@ const disableInspector = async (
|
|||
): Promise<ToggleInspectorResult> => {
|
||||
const { webviewId } = args;
|
||||
const webViewContents = webContents.fromId(webviewId);
|
||||
if (webViewContents === undefined) {
|
||||
return { status: false };
|
||||
}
|
||||
const dbg = webViewContents.debugger;
|
||||
try {
|
||||
await dbg.sendCommand('Overlay.setInspectMode', {
|
||||
|
@ -128,10 +135,11 @@ const openDevtools = async (
|
|||
arg: OpenDevtoolsArgs
|
||||
): Promise<OpenDevtoolsResult> => {
|
||||
const { webviewId, dockPosition } = arg;
|
||||
if (mainWindow == null) {
|
||||
const optionalWebview = webContents.fromId(webviewId);
|
||||
if (mainWindow == null || optionalWebview === undefined) {
|
||||
return { status: false };
|
||||
}
|
||||
devtoolsWebview = webContents.fromId(webviewId);
|
||||
devtoolsWebview = optionalWebview;
|
||||
if (dockPosition === DOCK_POSITION.UNDOCKED) {
|
||||
devtoolsWebview.openDevTools({ mode: 'detach' });
|
||||
return { status: true };
|
||||
|
|
|
@ -23,7 +23,7 @@ export const initNativeFunctionHandlers = () => {
|
|||
_,
|
||||
arg: DisableDefaultWindowOpenHandlerArgs
|
||||
): Promise<DisableDefaultWindowOpenHandlerResult> => {
|
||||
webContents.fromId(arg.webContentsId).setWindowOpenHandler(() => {
|
||||
webContents.fromId(arg.webContentsId)?.setWindowOpenHandler(() => {
|
||||
return { action: 'deny' };
|
||||
});
|
||||
return { done: true };
|
||||
|
|
|
@ -25,8 +25,8 @@ export interface ScreenshotResult {
|
|||
|
||||
const captureImage = async (
|
||||
webContentsId: number
|
||||
): Promise<Electron.NativeImage> => {
|
||||
const Image = await webContents.fromId(webContentsId).capturePage();
|
||||
): Promise<Electron.NativeImage | undefined> => {
|
||||
const Image = await webContents.fromId(webContentsId)?.capturePage();
|
||||
return Image;
|
||||
};
|
||||
|
||||
|
@ -38,6 +38,9 @@ const quickScreenshot = async (
|
|||
device: { name },
|
||||
} = arg;
|
||||
const image = await captureImage(webContentsId);
|
||||
if (image === undefined) {
|
||||
return { done: false };
|
||||
}
|
||||
const dir = path.join(homedir(), `Desktop/Responsively-Screenshots`);
|
||||
const filePath = path.join(dir, `/${name}-${Date.now()}.jpeg`);
|
||||
await ensureDir(dir);
|
||||
|
|
|
@ -14,11 +14,11 @@ const deleteStorage = async (
|
|||
): Promise<DeleteStorageResult> => {
|
||||
const { webContentsId, storages } = arg;
|
||||
if (storages?.length === 1 && storages[0] === 'network-cache') {
|
||||
await webContents.fromId(webContentsId).session.clearCache();
|
||||
await webContents.fromId(webContentsId)?.session.clearCache();
|
||||
} else {
|
||||
await webContents
|
||||
.fromId(webContentsId)
|
||||
.session.clearStorageData({ storages });
|
||||
?.session.clearStorageData({ storages });
|
||||
}
|
||||
return { done: true };
|
||||
};
|
||||
|
|
|
@ -7,6 +7,7 @@ import { Device } from 'common/deviceList';
|
|||
import WebPage from 'main/screenshot/webpage';
|
||||
|
||||
import screenshotSfx from 'renderer/assets/sfx/screenshot.mp3';
|
||||
import { updateWebViewHeightAndScale } from 'common/webViewUtils';
|
||||
|
||||
interface Props {
|
||||
webview: Electron.WebviewTag | null;
|
||||
|
|
|
@ -1239,10 +1239,10 @@
|
|||
debug "^4.1.1"
|
||||
fs-extra "^9.0.1"
|
||||
|
||||
"@electron/rebuild@^3.2.10":
|
||||
version "3.2.10"
|
||||
resolved "https://registry.yarnpkg.com/@electron/rebuild/-/rebuild-3.2.10.tgz#adc9443179709d4e4b93a68fac6a08b9a3b9e5e6"
|
||||
integrity sha512-SUBM6Mwi3yZaDFQjZzfGKpYTtOp9m60glounwX6tfGeVc/ZOl4jbquktUcyy7gYSLDWFLtKkftkY2xgMJZLQgg==
|
||||
"@electron/rebuild@^3.2.13":
|
||||
version "3.2.13"
|
||||
resolved "https://registry.yarnpkg.com/@electron/rebuild/-/rebuild-3.2.13.tgz#98fbb98981b1a86162546a2ab91b2355569cca4c"
|
||||
integrity sha512-DH9Ol4JCnHDYVOD0fKWq+Qqbn/0WU1O6QR0mIpMXEVU4YFM4PlaqNC9K36mGShNBxxGFotZCMDrB1wl/iHM12g==
|
||||
dependencies:
|
||||
"@malept/cross-spawn-promise" "^2.0.0"
|
||||
chalk "^4.0.0"
|
||||
|
@ -1250,7 +1250,6 @@
|
|||
detect-libc "^2.0.1"
|
||||
fs-extra "^10.0.0"
|
||||
got "^11.7.0"
|
||||
lzma-native "^8.0.5"
|
||||
node-abi "^3.0.0"
|
||||
node-api-version "^0.1.4"
|
||||
node-gyp "^9.0.0"
|
||||
|
@ -2352,10 +2351,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.2.tgz#0407ceb15647f186318101546d5ae40725b73810"
|
||||
integrity sha512-sDPHm2wfx2QhrMDK0pOt2J4KLJMAcerqWNvnED0itPRJWvI+bK+uNHzcH1dFsBlf7G3u8tqXmRF3wkvL9yUwMw==
|
||||
|
||||
"@types/node@^16.11.26":
|
||||
version "16.18.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.0.tgz#34982c6d5b5734c900f4ee69e1b87d212db6c60f"
|
||||
integrity sha512-LqYqYzYvnbCaQfLAwRt0zboqnsViwhZm+vjaMSqcfN36vulAg7Pt0T83q4WZO2YOBw3XdyHi8cQ88H22zmULOA==
|
||||
"@types/node@^18.11.18":
|
||||
version "18.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.7.tgz#86d0ba2541f808cb78d4dc5d3e40242a349d6db8"
|
||||
integrity sha512-MFg7ua/bRtnA1hYE3pVyWxGd/r7aMqjNOdHvlSsXV3n8iaeGKkOaPzpJh6/ovf4bEXWcojkeMJpTsq3mzXW4IQ==
|
||||
|
||||
"@types/parse-glob@*":
|
||||
version "3.0.29"
|
||||
|
@ -2400,10 +2399,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc"
|
||||
integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==
|
||||
|
||||
"@types/react-dom@18.0.6":
|
||||
version "18.0.6"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.6.tgz#36652900024842b74607a17786b6662dd1e103a1"
|
||||
integrity sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA==
|
||||
"@types/react-dom@18.0.10":
|
||||
version "18.0.10"
|
||||
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.10.tgz#3b66dec56aa0f16a6cc26da9e9ca96c35c0b4352"
|
||||
integrity sha512-E42GW/JA4Qv15wQdqJq8DL4JhNpB3prJgjgapN3qJT9K2zO5IIAQh4VXvCEDupoqAwnz0cY4RlXeC/ajX5SFHg==
|
||||
dependencies:
|
||||
"@types/react" "*"
|
||||
|
||||
|
@ -5472,7 +5471,7 @@ electron-args@^0.1.0:
|
|||
minimist "^1.2.0"
|
||||
redent "^2.0.0"
|
||||
|
||||
electron-builder@^23.3.3:
|
||||
electron-builder@^23.6.0:
|
||||
version "23.6.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-23.6.0.tgz#c79050cbdce90ed96c5feb67c34e9e0a21b5331b"
|
||||
integrity sha512-y8D4zO+HXGCNxFBV/JlyhFnoQ0Y0K7/sFH+XwIbj47pqaW8S6PGYQbjoObolKBR1ddQFPt4rwp4CnwMJrW3HAw==
|
||||
|
@ -5576,7 +5575,7 @@ electron-to-chromium@^1.4.284:
|
|||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.341.tgz#ab31e9e57ef7758a14c7a7977a1978d599514470"
|
||||
integrity sha512-R4A8VfUBQY9WmAhuqY5tjHRf5fH2AAf6vqitBOE0y6u2PgHgqHSrhZmu78dIX3fVZtjqlwJNX1i2zwC3VpHtQQ==
|
||||
|
||||
electron-updater@^5.2.3:
|
||||
electron-updater@^5.3.0:
|
||||
version "5.3.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-5.3.0.tgz#3ba0d20407911a2edc5a68bee45c5aa2023e9ff8"
|
||||
integrity sha512-iKEr7yQBcvnQUPnSDYGSWC9t0eF2YbZWeYYYZzYxdl+HiRejXFENjYMnYjoOm2zxyD6Cr2JTHZhp9pqxiXuCOw==
|
||||
|
@ -5591,13 +5590,13 @@ electron-updater@^5.2.3:
|
|||
semver "^7.3.5"
|
||||
typed-emitter "^2.1.0"
|
||||
|
||||
electron@^23.1.3:
|
||||
version "23.1.3"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-23.1.3.tgz#42efdb98443a51db38bb0b627ec6788b1a64b92d"
|
||||
integrity sha512-MNjuUS2K6/OxlJ0zTC77djo1R3xM038v1kUunvNFgDMZHYKpSOzOMNsPiwM2BGp+uZbkUb0nTnYafxXrM8H16w==
|
||||
electron@^24.2.0:
|
||||
version "24.2.0"
|
||||
resolved "https://registry.yarnpkg.com/electron/-/electron-24.2.0.tgz#54623a909e2e5d53a69d5fd8bf22ab37e61c188b"
|
||||
integrity sha512-fEYAftYqFhveniWJbEHXjNMWjooFFIuqNj/eEFJkGzycInfBJq/c4E/dew++s6s0YLubxFnjoF2qZiqapLj0gA==
|
||||
dependencies:
|
||||
"@electron/get" "^2.0.0"
|
||||
"@types/node" "^16.11.26"
|
||||
"@types/node" "^18.11.18"
|
||||
extract-zip "^2.0.1"
|
||||
|
||||
electronmon@^2.0.2:
|
||||
|
@ -9410,15 +9409,6 @@ lz-string@^1.5.0:
|
|||
resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941"
|
||||
integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==
|
||||
|
||||
lzma-native@^8.0.5:
|
||||
version "8.0.6"
|
||||
resolved "https://registry.yarnpkg.com/lzma-native/-/lzma-native-8.0.6.tgz#3ea456209d643bafd9b5d911781bdf0b396b2665"
|
||||
integrity sha512-09xfg67mkL2Lz20PrrDeNYZxzeW7ADtpYFbwSQh9U8+76RIzx5QsJBMy8qikv3hbUPfpy6hqwxt6FcGK81g9AA==
|
||||
dependencies:
|
||||
node-addon-api "^3.1.0"
|
||||
node-gyp-build "^4.2.1"
|
||||
readable-stream "^3.6.0"
|
||||
|
||||
make-dir@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
|
||||
|
@ -10122,11 +10112,6 @@ node-addon-api@^1.6.3:
|
|||
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d"
|
||||
integrity sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==
|
||||
|
||||
node-addon-api@^3.1.0:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161"
|
||||
integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==
|
||||
|
||||
node-api-version@^0.1.4:
|
||||
version "0.1.4"
|
||||
resolved "https://registry.yarnpkg.com/node-api-version/-/node-api-version-0.1.4.tgz#1ed46a485e462d55d66b5aa1fe2821720dedf080"
|
||||
|
@ -10139,11 +10124,6 @@ node-forge@^1:
|
|||
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3"
|
||||
integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==
|
||||
|
||||
node-gyp-build@^4.2.1:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40"
|
||||
integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==
|
||||
|
||||
node-gyp@^9.0.0:
|
||||
version "9.3.0"
|
||||
resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.3.0.tgz#f8eefe77f0ad8edb3b3b898409b53e697642b319"
|
||||
|
|
Loading…
Reference in a new issue