Open-source and local-first Slack and Notion alternative that puts you in control of your data
TypeScript chatchat-applicationcrdteditorelectronknowledge-baselocal-firstnotionnotion-alternativerealtime-collaborationself-hostedslacksqliteteam-collaborationwikiyjs
Enable electron audo update
Hakan Shehu7c5b96591b6f
diff --git a/apps/desktop/forge.config.ts b/apps/desktop/forge.config.tsindex 0fefb154..f227c31e 100644--- a/apps/desktop/forge.config.ts+++ b/apps/desktop/forge.config.ts@@ -82,6 +82,11 @@ const config: ForgeConfig = {icon: 'assets/colanode_logo_black.png',title: 'Colanode',}),+ {+ name: '@electron-forge/maker-zip',+ platforms: ['darwin'],+ config: {},+ },],publishers: [{@@ -91,9 +96,6 @@ const config: ForgeConfig = {owner: 'colanode',name: 'colanode',},- // Publishing options:- // draft=true creates private release for review,- // prerelease=true marks as beta, false=stable/productionprerelease: false,draft: true,},diff --git a/apps/desktop/package.json b/apps/desktop/package.jsonindex 9d791d14..ffdedc34 100644--- a/apps/desktop/package.json+++ b/apps/desktop/package.json@@ -108,6 +108,7 @@"tailwind-merge": "^2.5.5","tailwindcss-animate": "^1.0.7","ts-pattern": "^5.5.0",+ "update-electron-app": "^3.1.0","utf-8-validate": "^6.0.5","ws": "^8.18.0"}diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.tsindex ebbf8e17..21040a72 100644--- a/apps/desktop/src/main.ts+++ b/apps/desktop/src/main.ts@@ -1,4 +1,5 @@import started from 'electron-squirrel-startup';+import { updateElectronApp, UpdateSourceType } from 'update-electron-app';import { app, BrowserWindow, ipcMain, protocol, shell } from 'electron';import path from 'path';@@ -30,6 +31,16 @@ if (started) {app.quit();}+updateElectronApp({+ updateSource: {+ type: UpdateSourceType.ElectronPublicUpdateService,+ repo: 'colanode/colanode',+ host: 'https://update.electronjs.org',+ },+ updateInterval: '10 minutes',+ notifyUser: true,+});+const createWindow = async () => {await scheduler.init();notificationService.checkBadge();diff --git a/package-lock.json b/package-lock.jsonindex dc1ec2e5..48959212 100644--- a/package-lock.json+++ b/package-lock.json@@ -104,6 +104,7 @@"tailwind-merge": "^2.5.5","tailwindcss-animate": "^1.0.7","ts-pattern": "^5.5.0",+ "update-electron-app": "^3.1.0","utf-8-validate": "^6.0.5","ws": "^8.18.0"},@@ -12569,6 +12570,15 @@"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==","license": "MIT"},+ "node_modules/github-url-to-object": {+ "version": "4.0.6",+ "resolved": "https://registry.npmjs.org/github-url-to-object/-/github-url-to-object-4.0.6.tgz",+ "integrity": "sha512-NaqbYHMUAlPcmWFdrAB7bcxrNIiiJWJe8s/2+iOc9vlcHlwHqSGrPk+Yi3nu6ebTwgsZEa7igz+NH2vEq3gYwQ==",+ "license": "MIT",+ "dependencies": {+ "is-url": "^1.1.0"+ }+ },"node_modules/glob": {"version": "7.2.3","resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",@@ -13679,6 +13689,12 @@"url": "https://github.com/sponsors/sindresorhus"}},+ "node_modules/is-url": {+ "version": "1.2.4",+ "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz",+ "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==",+ "license": "MIT"+ },"node_modules/is-weakmap": {"version": "2.0.2","resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.2.tgz",@@ -20388,6 +20404,16 @@"browserslist": ">= 4.21.0"}},+ "node_modules/update-electron-app": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/update-electron-app/-/update-electron-app-3.1.0.tgz",+ "integrity": "sha512-6U5BXxw+CTtk9pXgRBFosuaOlsXjHKq3heLZMAt6j/5cNMOuEZiN576b70zccMXO8WQuoprUPtSRyseGoXE7Jw==",+ "license": "MIT",+ "dependencies": {+ "github-url-to-object": "^4.0.4",+ "ms": "^2.1.1"+ }+ },"node_modules/uri-js": {"version": "4.4.1","resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",