From 261ff3e652c1085e740b15d92316e2fd023ca846 Mon Sep 17 00:00:00 2001 From: zlshames Date: Fri, 10 Nov 2023 15:49:39 -0500 Subject: [PATCH 1/3] switch to new electron notarize --- packages/server/package.json | 2 +- packages/server/scripts/notarize.js | 5 +++-- yarn.lock | 17 +++++++++-------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index c1a09b22..42fe35d9 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -36,6 +36,7 @@ "@babel/plugin-proposal-private-property-in-object": "^7.16.7", "@babel/preset-env": "^7.12.11", "@babel/preset-typescript": "^7.12.7", + "@electron/notarize": "^2.1.0", "@types/better-sqlite3": "^7.5.0", "@types/crypto-js": "^4.0.1", "@types/electron": "^1.6.10", @@ -62,7 +63,6 @@ "css-loader": "^3.5.2", "electron": "17.4.11", "electron-builder": "^23.0.2", - "electron-notarize": "^1.2.1", "electron-rebuild": "^3.2.9", "eslint": "^8.13.0", "eslint-config-prettier": "^8.5.0", diff --git a/packages/server/scripts/notarize.js b/packages/server/scripts/notarize.js index 9fcdd7aa..6f8cf16a 100644 --- a/packages/server/scripts/notarize.js +++ b/packages/server/scripts/notarize.js @@ -1,7 +1,7 @@ /* eslint-disable consistent-return */ /* eslint-disable no-return-await */ require('dotenv').config(); -const { notarize } = require('electron-notarize'); +const { notarize } = require('@electron/notarize'); exports.default = async function notarizing(context) { const { electronPlatformName, appOutDir } = context; @@ -12,9 +12,10 @@ exports.default = async function notarizing(context) { const appName = context.packager.appInfo.productFilename; return await notarize({ - appBundleId: 'com.bluebubbles.messaging', + tool: 'notarytool', appPath: `${appOutDir}/${appName}.app`, appleId: process.env.APPLEID, appleIdPassword: process.env.APPLEIDPASS, + teamId: process.env.TEAMID }); }; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 0fbd7d0f..cd92cdc1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2190,6 +2190,15 @@ optionalDependencies: global-agent "^3.0.0" +"@electron/notarize@^2.1.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.1.0.tgz#76aaec10c8687225e8d0a427cc9df67611c46ff3" + integrity sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA== + dependencies: + debug "^4.1.1" + fs-extra "^9.0.1" + promise-retry "^2.0.1" + "@electron/universal@1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@electron/universal/-/universal-1.2.1.tgz#3c2c4ff37063a4e9ab1e6ff57db0bc619bc82339" @@ -6705,14 +6714,6 @@ electron-log@^4.4.7: resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-4.4.8.tgz#fcb9f714dbcaefb6ac7984c4683912c74730248a" integrity sha512-QQ4GvrXO+HkgqqEOYbi+DHL7hj5JM+nHi/j+qrN9zeeXVKy8ZABgbu4CnG+BBqDZ2+tbeq9tUC4DZfIWFU5AZA== -electron-notarize@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/electron-notarize/-/electron-notarize-1.2.2.tgz#ebf2b258e8e08c1c9f8ff61dc53d5b16b439daf4" - integrity sha512-ZStVWYcWI7g87/PgjPJSIIhwQXOaw4/XeXU+pWqMMktSLHaGMLHdyPPN7Cmao7+Cr7fYufA16npdtMndYciHNw== - dependencies: - debug "^4.1.1" - fs-extra "^9.0.1" - electron-osx-sign@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.6.0.tgz#9b69c191d471d9458ef5b1e4fdd52baa059f1bb8" From 104f9cbbcdb36e60cc84a3b4b369a5a05c171da8 Mon Sep 17 00:00:00 2001 From: zlshames Date: Fri, 10 Nov 2023 15:51:38 -0500 Subject: [PATCH 2/3] removes console.log --- packages/ui/src/app/components/stats/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/ui/src/app/components/stats/index.tsx b/packages/ui/src/app/components/stats/index.tsx index 56266ab8..8f5819e7 100644 --- a/packages/ui/src/app/components/stats/index.tsx +++ b/packages/ui/src/app/components/stats/index.tsx @@ -93,7 +93,6 @@ export const UpdatableStatBox = ( if (pastDays) { if (!finalArgs) finalArgs = {}; finalArgs.after = new Date(new Date().getTime() - (pastDays * 86_400_000)); - console.log(finalArgs); } ipcRenderer.invoke(ipcEvent, finalArgs).then(async (value) => { From 084c27703ec70d95b986c0400cb94a7b2075012e Mon Sep 17 00:00:00 2001 From: zlshames Date: Fri, 10 Nov 2023 16:16:56 -0500 Subject: [PATCH 3/3] fix: daily message box --- .../ui/src/app/components/stats/DailyMessagesStatBox.tsx | 9 +-------- packages/ui/src/app/components/stats/index.tsx | 6 +++--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/ui/src/app/components/stats/DailyMessagesStatBox.tsx b/packages/ui/src/app/components/stats/DailyMessagesStatBox.tsx index d447ee52..ff75aea3 100644 --- a/packages/ui/src/app/components/stats/DailyMessagesStatBox.tsx +++ b/packages/ui/src/app/components/stats/DailyMessagesStatBox.tsx @@ -13,23 +13,16 @@ export const DailyMessagesStatBox = ( delay?: number } ): JSX.Element => { - const args = (): NodeJS.Dict | null => { - const after = new Date(); - after.setDate(after.getDate() - 1); - return { after }; - }; - return ( ); }; \ No newline at end of file diff --git a/packages/ui/src/app/components/stats/index.tsx b/packages/ui/src/app/components/stats/index.tsx index 8f5819e7..df7291fb 100644 --- a/packages/ui/src/app/components/stats/index.tsx +++ b/packages/ui/src/app/components/stats/index.tsx @@ -58,7 +58,7 @@ export const UpdatableStatBox = ( autoUpdate = true, updateInterval = 60000, delay = 0, - pastDays = 0 + pastDays = null }: { title: string, @@ -72,7 +72,7 @@ export const UpdatableStatBox = ( autoUpdate?: boolean, updateInterval?: number, delay?: number, - pastDays?: number + pastDays?: number | null } ): JSX.Element => { const dispatch = useAppDispatch(); @@ -90,7 +90,7 @@ export const UpdatableStatBox = ( // Fetch the stat and dispatch the results to listeners let finalArgs = args ? args() : null; - if (pastDays) { + if (pastDays && pastDays > 0) { if (!finalArgs) finalArgs = {}; finalArgs.after = new Date(new Date().getTime() - (pastDays * 86_400_000)); }