[arch-commits] Commit in react-native-debugger/repos (8 files)
Nicola Squartini
tensor5 at archlinux.org
Sun Mar 24 06:29:01 UTC 2019
Date: Sunday, March 24, 2019 @ 06:29:01
Author: tensor5
Revision: 443294
archrelease: copy trunk to community-any
Added:
react-native-debugger/repos/community-any/
react-native-debugger/repos/community-any/Content-Security-Policy.patch
(from rev 443293, react-native-debugger/trunk/Content-Security-Policy.patch)
react-native-debugger/repos/community-any/PKGBUILD
(from rev 443293, react-native-debugger/trunk/PKGBUILD)
react-native-debugger/repos/community-any/iconPath.patch
(from rev 443293, react-native-debugger/trunk/iconPath.patch)
react-native-debugger/repos/community-any/nodeIntegration.patch
(from rev 443293, react-native-debugger/trunk/nodeIntegration.patch)
react-native-debugger/repos/community-any/react-native-debugger.desktop
(from rev 443293, react-native-debugger/trunk/react-native-debugger.desktop)
react-native-debugger/repos/community-any/react-native-debugger.js
(from rev 443293, react-native-debugger/trunk/react-native-debugger.js)
react-native-debugger/repos/community-any/setZoomLevelLimits.patch
(from rev 443293, react-native-debugger/trunk/setZoomLevelLimits.patch)
-------------------------------+
Content-Security-Policy.patch | 10 ++++++
PKGBUILD | 60 ++++++++++++++++++++++++++++++++++++++++
iconPath.patch | 11 +++++++
nodeIntegration.patch | 12 ++++++++
react-native-debugger.desktop | 8 +++++
react-native-debugger.js | 29 +++++++++++++++++++
setZoomLevelLimits.patch | 11 +++++++
7 files changed, 141 insertions(+)
Copied: react-native-debugger/repos/community-any/Content-Security-Policy.patch (from rev 443293, react-native-debugger/trunk/Content-Security-Policy.patch)
===================================================================
--- community-any/Content-Security-Policy.patch (rev 0)
+++ community-any/Content-Security-Policy.patch 2019-03-24 06:29:01 UTC (rev 443294)
@@ -0,0 +1,10 @@
+--- a/dist/app.html
++++ b/dist/app.html
+@@ -2,6 +2,7 @@
+ <html>
+ <head>
+ <meta charset=utf-8>
++ <meta http-equiv="Content-Security-Policy" content="script-src 'self'; style-src blob: 'self' 'unsafe-inline';">
+ <title>React Native Debugger</title>
+ <link href='css/style.css' rel="stylesheet" />
+ </head>
Copied: react-native-debugger/repos/community-any/PKGBUILD (from rev 443293, react-native-debugger/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2019-03-24 06:29:01 UTC (rev 443294)
@@ -0,0 +1,60 @@
+# Maintainer: Nicola Squartini <tensor5 at gmail.com>
+
+pkgname=react-native-debugger
+pkgver=0.9.7
+_commit=6d05271a1f8c97ff7295a552c25618f49e2dbfbd
+pkgrel=1
+pkgdesc='The standalone app for React Native Debugger, with React DevTools / Redux DevTools'
+arch=('any')
+url='https://github.com/jhen0409/react-native-debugger'
+license=('MIT')
+depends=('electron')
+makedepends=('asar' 'git' 'npm')
+source=("git+https://github.com/jhen0409/react-native-debugger.git#commit=${_commit}"
+ 'Content-Security-Policy.patch'
+ 'iconPath.patch'
+ 'nodeIntegration.patch'
+ 'react-native-debugger.desktop'
+ 'react-native-debugger.js'
+ 'setZoomLevelLimits.patch')
+sha256sums=('SKIP'
+ '11695a30802fb9d559608f56abdd09d864b40311de310c08e084fa93abe39443'
+ '4ac46fdbfe1658ea63f28b56ceda94b06324f8476090a0d0888f99ae43dd27ad'
+ '6700efd069c5870edf0e4aa826a89860254c262f437761ec0c328273604bda83'
+ 'f63e79516db0feb2e76c366402cf266165c0f7eb282dc55703b800b91152867d'
+ '8cd406c3b2d091f2a2b73e5755682dc925bb1f75d0d425b82507136b350a4ceb'
+ '6853ab684f5eb39e32e0b75ead0cf19c0a883108888b003f0f80cfd07cb4f965')
+
+prepare() {
+ cd ${pkgname}
+
+ patch -Np1 -i ../Content-Security-Policy.patch
+ patch -Np1 -i ../iconPath.patch
+ patch -Np1 -i ../nodeIntegration.patch
+ patch -Np1 -i ../setZoomLevelLimits.patch
+}
+
+build() {
+ cd ${pkgname}
+
+ npm install --ignore-scripts
+ cd dist
+ npm install
+ node ../scripts/patch-modules.js
+ cd ..
+ npm run build
+}
+
+package() {
+ cd ${pkgname}
+
+ install -dm755 "${pkgdir}/usr/lib"
+ rm dist/logo.png # see iconPath.patch
+ asar pack dist "${pkgdir}/usr/lib/${pkgname}.asar"
+
+ install -Dm755 ../${pkgname}.js "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm644 -t "${pkgdir}/usr/share/applications" ../${pkgname}.desktop
+ install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE.md
+ install -Dm644 electron/logo.png \
+ "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+}
Copied: react-native-debugger/repos/community-any/iconPath.patch (from rev 443293, react-native-debugger/trunk/iconPath.patch)
===================================================================
--- community-any/iconPath.patch (rev 0)
+++ community-any/iconPath.patch 2019-03-24 06:29:01 UTC (rev 443294)
@@ -0,0 +1,11 @@
+--- a/electron/main.js
++++ b/electron/main.js
+@@ -7,7 +7,7 @@
+ import { readConfig } from './config';
+ import { sendSyncState } from './sync-state';
+
+-const iconPath = path.resolve(__dirname, 'logo.png');
++const iconPath = '/usr/share/pixmaps/react-native-debugger.png';
+ const defaultOptions = { iconPath };
+
+ startListeningHandleURL(async (host, port) => {
Copied: react-native-debugger/repos/community-any/nodeIntegration.patch (from rev 443293, react-native-debugger/trunk/nodeIntegration.patch)
===================================================================
--- community-any/nodeIntegration.patch (rev 0)
+++ community-any/nodeIntegration.patch 2019-03-24 06:29:01 UTC (rev 443294)
@@ -0,0 +1,12 @@
+--- a/electron/window.js
++++ b/electron/window.js
+@@ -91,6 +91,9 @@
+ backgroundColor: '#272c37',
+ tabbingIdentifier: 'rndebugger',
+ ...config.windowBounds,
++ webPreferences: {
++ nodeIntegration: true,
++ },
+ });
+ const isFirstWindow = BrowserWindow.getAllWindows().length === 1;
+
Copied: react-native-debugger/repos/community-any/react-native-debugger.desktop (from rev 443293, react-native-debugger/trunk/react-native-debugger.desktop)
===================================================================
--- community-any/react-native-debugger.desktop (rev 0)
+++ community-any/react-native-debugger.desktop 2019-03-24 06:29:01 UTC (rev 443294)
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=React Native Debugger
+Comment=The standalone app for React Native Debugger, with React DevTools / Redux DevTools
+Icon=react-native-debugger
+Exec=react-native-debugger
+Categories=Debugger;Development;GTK;
+StartupNotify=true
Copied: react-native-debugger/repos/community-any/react-native-debugger.js (from rev 443293, react-native-debugger/trunk/react-native-debugger.js)
===================================================================
--- community-any/react-native-debugger.js (rev 0)
+++ community-any/react-native-debugger.js 2019-03-24 06:29:01 UTC (rev 443294)
@@ -0,0 +1,29 @@
+#!/usr/bin/electron
+
+const name = "react-native-debugger";
+
+const {app} = require("electron");
+const fs = require("fs");
+const {dirname, join} = require("path");
+
+// Change command name.
+const fd = fs.openSync("/proc/self/comm", fs.constants.O_WRONLY);
+fs.writeSync(fd, name);
+fs.closeSync(fd);
+
+// Remove first command line argument (/usr/bin/electron).
+process.argv.splice(0, 1);
+
+// Set application paths.
+const appPath = join(dirname(__dirname), "lib", `${name}.asar`);
+const packageJson = require(join(appPath, "package.json"));
+const productName = packageJson.productName;
+app.setAppPath(appPath);
+app.setDesktopName(name + ".desktop");
+app.setName(productName);
+app.setPath("userCache", join(app.getPath("cache"), productName));
+app.setPath("userData", join(app.getPath("appData"), productName));
+app.setVersion(packageJson.version);
+
+// Run the application.
+require("module")._load(appPath, module, true);
Copied: react-native-debugger/repos/community-any/setZoomLevelLimits.patch (from rev 443293, react-native-debugger/trunk/setZoomLevelLimits.patch)
===================================================================
--- community-any/setZoomLevelLimits.patch (rev 0)
+++ community-any/setZoomLevelLimits.patch 2019-03-24 06:29:01 UTC (rev 443294)
@@ -0,0 +1,11 @@
+--- a/app/index.js
++++ b/app/index.js
+@@ -15,7 +15,7 @@
+ const currentWindow = remote.getCurrentWindow();
+
+ webFrame.setZoomFactor(1);
+-webFrame.setZoomLevelLimits(1, 1);
++webFrame.setVisualZoomLevelLimits(1, 1);
+ if (process.env.E2E_TEST) {
+ webFrame.registerURLSchemeAsPrivileged('file');
+ }
More information about the arch-commits
mailing list