Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
### 💡 Others

- Add CLI archive build phase to macOS project. ([#248](https://github.com/expo/orbit/pull/248) by [@gabrieldonadel](https://github.com/gabrieldonadel))
- Add arch info to Rudder module. ([#252](https://github.com/expo/orbit/pull/252) by [@gabrieldonadel](https://github.com/gabrieldonadel))

## 2.0.2 — 2025-02-27

Expand Down
5 changes: 4 additions & 1 deletion apps/menu-bar/modules/rudder/electron/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { app } from 'electron';
import os from 'os';

const RudderModule = {
import { type ElectronRudderModule } from '../src/Rudder.types';

const RudderModule: Omit<ElectronRudderModule, 'platform'> = {
name: 'Rudder',
appVersion: app.getVersion(),
osVersion: os.release(),
osArch: os.arch(),
};

export default RudderModule;
4 changes: 3 additions & 1 deletion apps/menu-bar/modules/rudder/electron/preload.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ElectronRudderModule } from '../src/Rudder.types';

function getAnalyticsPlatformFromPlatform(platform: string): string {
switch (platform) {
case 'darwin':
Expand All @@ -9,7 +11,7 @@ function getAnalyticsPlatformFromPlatform(platform: string): string {
}
}

const RudderModule = {
const RudderModule: Pick<ElectronRudderModule, 'name' | 'platform'> = {
name: 'Rudder',
platform: getAnalyticsPlatformFromPlatform(process.platform),
};
Expand Down
1 change: 1 addition & 0 deletions apps/menu-bar/modules/rudder/src/Rudder.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface ElectronRudderModule {
platform: string;
appVersion: string;
osVersion: string;
osArch: string;
}

export interface RudderClient {
Expand Down
3 changes: 3 additions & 0 deletions apps/menu-bar/modules/rudder/src/RudderModule.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const RudderModule: RudderClient = {
name: RudderElectronModule.platform,
version: RudderElectronModule.osVersion,
},
device: {
model: RudderElectronModule.osArch,
},
app: {
name: 'orbit',
version: RudderElectronModule.appVersion,
Expand Down