diff options
author | Vianney Bouchaud | 2025-02-06 16:01:18 +0100 |
---|---|---|
committer | Vianney Bouchaud | 2025-02-06 16:01:18 +0100 |
commit | 52e624319015d4b1a9b80ea025c48d721a938a6b (patch) | |
tree | 405a335efc16ea7bf7cc99d888e6a77d3b789531 | |
parent | 28b66c17e97d71fd34951920c8a00f93558a7154 (diff) | |
download | aur-52e624319015d4b1a9b80ea025c48d721a938a6b.tar.gz |
upgpkg: bruno 1.38.1-1
upstream release
fix build by disabling telemetry
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | 0001-disable-telemetry.patch | 241 | ||||
-rw-r--r-- | PKGBUILD | 12 |
3 files changed, 255 insertions, 8 deletions
@@ -1,7 +1,7 @@ pkgbase = bruno pkgdesc = Opensource API Client for Exploring and Testing APIs - pkgver = 1.34.2 - pkgrel = 2 + pkgver = 1.38.1 + pkgrel = 1 url = https://www.usebruno.com/ arch = x86_64 license = MIT @@ -11,9 +11,11 @@ pkgbase = bruno makedepends = python depends = electron31 depends = alsa-lib - source = bruno-1.34.2.tar.gz::https://github.com/usebruno/bruno/archive/v1.34.2.tar.gz + source = bruno-1.38.1.tar.gz::https://github.com/usebruno/bruno/archive/v1.38.1.tar.gz source = com.usebruno.app.Bruno.desktop - sha256sums = ab8720a4c958f6f102c1464900d239cedb7eeb3b696f1d710b01a5c8d83a480d + source = 0001-disable-telemetry.patch + sha256sums = 468ab677fdb381b20b1de3a3433c4b36c461f9bc85cd1326fdac8f6900f9e8dc sha256sums = 7bad0d66e67fdaaf99d1b7b32ba2f119b7d6dba12ecfdb398c39ee3c81bbe051 + sha256sums = 3690f13e46e5bfc8d45ede5d7ac99d1c23e25190408903c01e15ce3aa9a20d4f pkgname = bruno diff --git a/0001-disable-telemetry.patch b/0001-disable-telemetry.patch new file mode 100644 index 000000000000..b98f4b26d4f0 --- /dev/null +++ b/0001-disable-telemetry.patch @@ -0,0 +1,241 @@ +From bd059e48ab28da2e7b878215b354b974e5b51967 Mon Sep 17 00:00:00 2001 +From: Vianney Bouchaud <vianney@bouchaud.org> +Date: Thu, 6 Feb 2025 15:41:08 +0100 +Subject: [PATCH] disable telemetry + +--- + package-lock.json | 20 ----- + packages/bruno-app/package.json | 1 - + .../components/Sidebar/GoldenEdition/index.js | 50 +------------ + packages/bruno-app/src/providers/App/index.js | 2 - + .../src/providers/App/useTelemetry.js | 73 ------------------- + 5 files changed, 1 insertion(+), 145 deletions(-) + delete mode 100644 packages/bruno-app/src/providers/App/useTelemetry.js + +diff --git a/package-lock.json b/package-lock.json +index b5b8d545..59dfa2f5 100644 +--- a/package-lock.json ++++ b/package-lock.json +@@ -18918,19 +18918,6 @@ + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, +- "node_modules/posthog-node": { +- "version": "4.2.1", +- "resolved": "https://registry.npmjs.org/posthog-node/-/posthog-node-4.2.1.tgz", +- "integrity": "sha512-l+fsjYEkTik3m/G0pE7gMr4qBJP84LhK779oQm6MBzhBGpd4By4qieTW+4FUAlNCyzQTynn3Nhsa50c0IELSxQ==", +- "license": "MIT", +- "dependencies": { +- "axios": "^1.7.4", +- "rusha": "^0.8.14" +- }, +- "engines": { +- "node": ">=15.0.0" +- } +- }, + "node_modules/postman-request": { + "version": "2.88.1-postman.40", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.40.tgz", +@@ -20614,12 +20601,6 @@ + "queue-microtask": "^1.2.2" + } + }, +- "node_modules/rusha": { +- "version": "0.8.14", +- "resolved": "https://registry.npmjs.org/rusha/-/rusha-0.8.14.tgz", +- "integrity": "sha512-cLgakCUf6PedEu15t8kbsjnwIFFR2D4RfL+W3iWFJ4iac7z4B0ZI8fxy4R3J956kAI68HclCFGL8MPoUVC3qVA==", +- "license": "MIT" +- }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", +@@ -24018,7 +23999,6 @@ + "path": "^0.12.7", + "pdfjs-dist": "4.4.168", + "platform": "^1.3.6", +- "posthog-node": "4.2.1", + "prettier": "^2.7.1", + "qs": "^6.11.0", + "query-string": "^7.0.1", +diff --git a/packages/bruno-app/package.json b/packages/bruno-app/package.json +index d4fb47bc..86d1a67b 100644 +--- a/packages/bruno-app/package.json ++++ b/packages/bruno-app/package.json +@@ -52,7 +52,6 @@ + "path": "^0.12.7", + "pdfjs-dist": "4.4.168", + "platform": "^1.3.6", +- "posthog-node": "4.2.1", + "prettier": "^2.7.1", + "qs": "^6.11.0", + "query-string": "^7.0.1", +diff --git a/packages/bruno-app/src/components/Sidebar/GoldenEdition/index.js b/packages/bruno-app/src/components/Sidebar/GoldenEdition/index.js +index ac6acee6..b0528d50 100644 +--- a/packages/bruno-app/src/components/Sidebar/GoldenEdition/index.js ++++ b/packages/bruno-app/src/components/Sidebar/GoldenEdition/index.js +@@ -1,33 +1,9 @@ +-import React, { useState, useEffect } from 'react'; ++import React, { useState } from 'react'; + import Modal from 'components/Modal/index'; +-import { PostHog } from 'posthog-node'; +-import { uuid } from 'utils/common'; + import { IconHeart, IconUser, IconUsers, IconPlus } from '@tabler/icons'; +-import platformLib from 'platform'; + import StyledWrapper from './StyledWrapper'; + import { useTheme } from 'providers/Theme/index'; + +-let posthogClient = null; +-const posthogApiKey = process.env.NEXT_PUBLIC_POSTHOG_API_KEY; +-const getPosthogClient = () => { +- if (posthogClient) { +- return posthogClient; +- } +- +- posthogClient = new PostHog(posthogApiKey); +- return posthogClient; +-}; +-const getAnonymousTrackingId = () => { +- let id = localStorage.getItem('bruno.anonymousTrackingId'); +- +- if (!id || !id.length || id.length !== 21) { +- id = uuid(); +- localStorage.setItem('bruno.anonymousTrackingId', id); +- } +- +- return id; +-}; +- + const HeartIcon = () => { + return ( + <svg +@@ -61,30 +37,6 @@ const CheckIcon = () => { + const GoldenEdition = ({ onClose }) => { + const { displayedTheme } = useTheme(); + +- useEffect(() => { +- const anonymousId = getAnonymousTrackingId(); +- const client = getPosthogClient(); +- client.capture({ +- distinctId: anonymousId, +- event: 'golden-edition-modal-opened', +- properties: { +- os: platformLib.os.family +- } +- }); +- }, []); +- +- const goldenEditionBuyClick = () => { +- const anonymousId = getAnonymousTrackingId(); +- const client = getPosthogClient(); +- client.capture({ +- distinctId: anonymousId, +- event: 'golden-edition-buy-clicked', +- properties: { +- os: platformLib.os.family +- } +- }); +- }; +- + const goldenEditonIndividuals = [ + 'Inbuilt Bru File Explorer', + 'Visual Git (Like Gitlens for Vscode)', +diff --git a/packages/bruno-app/src/providers/App/index.js b/packages/bruno-app/src/providers/App/index.js +index 7664ae03..aa636fd1 100644 +--- a/packages/bruno-app/src/providers/App/index.js ++++ b/packages/bruno-app/src/providers/App/index.js +@@ -4,13 +4,11 @@ import { useDispatch } from 'react-redux'; + import { refreshScreenWidth } from 'providers/ReduxStore/slices/app'; + import ConfirmAppClose from './ConfirmAppClose'; + import useIpcEvents from './useIpcEvents'; +-import useTelemetry from './useTelemetry'; + import StyledWrapper from './StyledWrapper'; + + export const AppContext = React.createContext(); + + export const AppProvider = (props) => { +- useTelemetry(); + useIpcEvents(); + + const dispatch = useDispatch(); +diff --git a/packages/bruno-app/src/providers/App/useTelemetry.js b/packages/bruno-app/src/providers/App/useTelemetry.js +deleted file mode 100644 +index f89b1343..00000000 +--- a/packages/bruno-app/src/providers/App/useTelemetry.js ++++ /dev/null +@@ -1,73 +0,0 @@ +-/** +- * Telemetry in bruno is just an anonymous visit counter (triggered once per day). +- * The only details shared are: +- * - OS (ex: mac, windows, linux) +- * - Bruno Version (ex: 1.3.0) +- * We don't track usage analytics / micro-interactions / crash logs / anything else. +- */ +- +-import { useEffect } from 'react'; +-import { PostHog } from 'posthog-node'; +-import platformLib from 'platform'; +-import { uuid } from 'utils/common'; +- +-const posthogApiKey = process.env.NEXT_PUBLIC_POSTHOG_API_KEY; +-let posthogClient = null; +- +-const isPlaywrightTestRunning = () => { +- return process.env.PLAYWRIGHT ? true : false; +-}; +- +-const isDevEnv = () => { +- return import.meta.env.MODE === 'development'; +-}; +- +-const getPosthogClient = () => { +- if (posthogClient) { +- return posthogClient; +- } +- +- posthogClient = new PostHog(posthogApiKey); +- return posthogClient; +-}; +- +-const getAnonymousTrackingId = () => { +- let id = localStorage.getItem('bruno.anonymousTrackingId'); +- +- if (!id || !id.length || id.length !== 21) { +- id = uuid(); +- localStorage.setItem('bruno.anonymousTrackingId', id); +- } +- +- return id; +-}; +- +-const trackStart = () => { +- if (isPlaywrightTestRunning()) { +- return; +- } +- +- if (isDevEnv()) { +- return; +- } +- +- const trackingId = getAnonymousTrackingId(); +- const client = getPosthogClient(); +- client.capture({ +- distinctId: trackingId, +- event: 'start', +- properties: { +- os: platformLib.os.family, +- version: '1.36.0' +- } +- }); +-}; +- +-const useTelemetry = () => { +- useEffect(() => { +- trackStart(); +- setInterval(trackStart, 24 * 60 * 60 * 1000); +- }, []); +-}; +- +-export default useTelemetry; +-- +2.48.1 + @@ -2,8 +2,8 @@ pkgname=bruno pkgdesc="Opensource API Client for Exploring and Testing APIs" -pkgver=1.34.2 -pkgrel=2 +pkgver=1.38.1 +pkgrel=1 arch=('x86_64') url="https://www.usebruno.com/" license=('MIT') @@ -22,11 +22,13 @@ makedepends=( source=( "${pkgname}-${pkgver}.tar.gz::https://github.com/usebruno/bruno/archive/v${pkgver}.tar.gz" com.usebruno.app.Bruno.desktop + 0001-disable-telemetry.patch ) sha256sums=( - 'ab8720a4c958f6f102c1464900d239cedb7eeb3b696f1d710b01a5c8d83a480d' + '468ab677fdb381b20b1de3a3433c4b36c461f9bc85cd1326fdac8f6900f9e8dc' '7bad0d66e67fdaaf99d1b7b32ba2f119b7d6dba12ecfdb398c39ee3c81bbe051' + '3690f13e46e5bfc8d45ede5d7ac99d1c23e25190408903c01e15ce3aa9a20d4f' ) _ensure_local_nvm() { @@ -44,6 +46,8 @@ prepare() { _ensure_local_nvm cd "${pkgname}-${pkgver}" + patch -Np1 -i "${srcdir}/0001-disable-telemetry.patch" + nvm install # https://typicode.github.io/husky/how-to.html#ci-server-and-docker @@ -57,7 +61,7 @@ prepare() { build() { _ensure_local_nvm - export NODE_ENV=production + # export NODE_ENV=production export NODE_OPTIONS=--openssl-legacy-provider cd "${pkgname}-${pkgver}" |