Skip to content
Open
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
28 changes: 28 additions & 0 deletions .env.save
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# The address below should be regenerated for each Orbiter site. If you are setting up an independent site, erase the value below and run the site in development mode (`pnpm dev`) to automatically regenerate.
VITE_SITE_ID=/orbitdb/zdpuB2wkkeLz6ydHKpsS77vDNRHbasD8JYExS9hY4jBVZqKkf

# These should ideally stay the same for all Orbiter sites. Changing these will create a parallel network and thereby keep your lens from syncing and interacting with the main network.

VITE_TRUSTED_SITES_SITE_ID_VAR_ID=/orbitdb/zdpuB2wkkeLz6ydHKpsS77vDNRHbasD8JYExS9hY4jBVZqKkf
VITE_TRUSTED_SITES_NAME_VAR_ID=/orbitdb/zdpuArhaMLFcttwWrd5RuHgfS4tV9GcitBKcNwarvQLr9VDFi
VITE_FEATURED_RELEASES_RELEASE_ID_VAR_ID=/orbitdb/zdpuAuoH7hoTZvBuAxG667k5YMSZaCQXU8Y88CoRG57vjZLaZ
VITE_FEATURED_RELEASES_START_TIME_VAR_ID=/orbitdb/zdpuArQnMwqU1jN9eZ9J6k8H1euLRF67qVkeWjU9NBTAf4HLQ
VITE_FEATURED_RELEASES_END_TIME_VAR_ID=/orbitdb/zdpuArhQVb8NYLXu8oyEbKZmdwGmPWXACxrYBR49zGkGyo2NV
VITE_FEATURED_RELEASES_PROMOTED_VAR_ID=/orbitdb/zdpuAzjr3v1PjM33JUp7NJpKtYMNeYQJwiR5K3REKeSCMoegq
VITE_BLOCKED_RELEASES_RELEASE_ID_VAR_ID=/orbitdb/zdpuAkyAA7XiPurjxZ39b2s5Vt57Z5dqnr6TSgMap5wP1qYBi
VITE_CONTENT_CATEGORIES_CATEGORY_ID_VAR_ID=/orbitdb/zdpuAtrNCjNSKf8hBM6rrqC4prVvsNph3Wt7E4Y2W8pFvGDXx
VITE_CONTENT_CATEGORIES_DISPLAY_NAME_VAR_ID=/orbitdb/zdpuAzKVn6Ep8feK8uCtu9GFJGPK2Z3mEmPcg2STKAuGEsKdz
VITE_CONTENT_CATEGORIES_METADATA_SCHEMA_VAR_ID=/orbitdb/zdpuAnJewUq9HZwExebbauea47Fw2v5JWtxhVufn3UZZBhTsW
VITE_RELEASES_FILE_VAR_ID=/orbitdb/zdpuAopp994ERCjk8Gb8D6m1kqSk5RoW9mq1Xsb9yogqgdGcX
VITE_RELEASES_AUTHOR_VAR_ID=/orbitdb/zdpuAwK1RDcoYe9XxN7G3eohtC6xrquybseqNUqsJMuMA1gKN
VITE_RELEASES_CONTENT_NAME_VAR_ID=/orbitdb/zdpuB1DGtFGEJDVNzxQuVzixjzT3MNH2cpxqBZBcVgDXVt17j
VITE_RELEASES_THUMBNAIL_VAR_ID=/orbitdb/zdpuAxWrRcBpPYkmBXr7XQLVB721ZbBomncpKf7UMrGgVxqau
VITE_RELEASES_COVER_VAR_ID=/orbitdb/zdpuAx9oHfCHQ4AuMGjACVi9nze5wfKDW9h6NzXVyfv1ZV93t
VITE_RELEASES_METADATA_VAR_ID=/orbitdb/zdpuAwPUmxyTjE26e4LLMNFtnQvaaUeVyQczS2GQjX6MaWzXu
VITE_RELEASES_CATEGORY_VAR_ID=/orbitdb/zdpuArKo58rLT9WawJScfBMh83H68UXrgdVC2FCvwCZVqJ7fA
VITE_COLLECTIONS_AUTHOR_VAR_ID=/orbitdb/zdpuAvM6HdN4tRWMTC2Gyqx9WhgiT3xap2N3cK5JLQUqrxeLS
VITE_COLLECTIONS_METADATA_VAR_ID=/orbitdb/zdpuAuScb292oiKL8DZsdPcQieFbUo64Nz8UMy8W2r6omv6f3
VITE_COLLECTIONS_NAME_VAR_ID=/orbitdb/zdpuB29yexzEQ8xjFHWU5WPnGsR74cNVHRyp2ynKHFLr3ycsh
VITE_COLLECTIONS_THUMBNAIL_VAR_ID=/orbitdb/zdpuAv4xkPWt2sy8uRRsyqvUK18nkJgR23MbEd85FRbtiG73k
VITE_COLLECTIONS_RELEASES_VAR_ID=/orbitdb/zdpuAt2rnT1gYeQxgVcL6B35k7c7JEWWUTtNTQ8xxous6a13N
VITE_COLLECTIONS_CATEGORY_VAR_ID=/orbitdb/zdpuAvAND67Sjsc2csTnJZEdJ5xURyT79PpB5gWX6fVjixvak
57 changes: 29 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Julien Jean Malard-Adam",
"url": "https://github.com/julienmalard"
},
"version": "0.2.0",
"version": "0.2.1",
"type": "module",
"main": "packages/main/dist/index.cjs",
"scripts": {
Expand Down Expand Up @@ -38,46 +38,46 @@
},
"devDependencies": {
"@constl/utils-tests": "^1.6.15",
"@eslint/js": "^9.21.0",
"@eslint/js": "^9.26.0",
"@mdi/font": "^7.4.47",
"@rollup/plugin-node-resolve": "^16.0.0",
"@rollup/plugin-node-resolve": "^16.0.1",
"@types/file-saver": "^2.0.7",
"@types/js-cookie": "^3.0.6",
"@types/lodash": "^4.17.16",
"@types/node": "^22.13.8",
"@types/node": "^22.15.12",
"@types/uuid": "^10.0.0",
"@types/webfontloader": "^1.6.38",
"@typescript-eslint/eslint-plugin": "^8.25.0",
"@typescript-eslint/parser": "^8.25.0",
"@vitejs/plugin-vue": "^5.2.1",
"@typescript-eslint/eslint-plugin": "^8.32.0",
"@typescript-eslint/parser": "^8.32.0",
"@vitejs/plugin-vue": "^5.2.3",
"@vue/test-utils": "^2.4.6",
"cross-env": "^7.0.3",
"electron": "^34.3.0",
"electron-builder": "^26.0.9",
"eslint": "^9.21.0",
"eslint-plugin-vue": "^9.32.0",
"electron": "^34.5.4",
"electron-builder": "^26.0.12",
"eslint": "^9.26.0",
"eslint-plugin-vue": "^9.33.0",
"happy-dom": "^14.12.3",
"nano-staged": "^0.8.0",
"playwright": "^1.50.1",
"playwright": "^1.52.0",
"prettier-plugin-organize-imports": "^4.1.0",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-resolve-id": "^1.0.2",
"sass": "^1.85.1",
"sass": "^1.87.0",
"sass-loader": "^16.0.5",
"simple-git-hooks": "^2.11.1",
"simple-git-hooks": "^2.13.0",
"typed-emitter": "^2.1.0",
"typescript": "^5.8.2",
"typescript-eslint": "^8.25.0",
"typescript": "^5.8.3",
"typescript-eslint": "^8.32.0",
"unplugin-auto-expose": "0.3.0",
"vite": "^6.2.0",
"vite": "^6.3.5",
"vite-plugin-node-polyfills": "^0.23.0",
"vite-plugin-vuetify": "^2.1.0",
"vitest": "^3.0.7",
"vue-tsc": "^2.2.6"
"vite-plugin-vuetify": "^2.1.1",
"vitest": "^3.1.3",
"vue-tsc": "^2.2.10"
},
"dependencies": {
"@constl/ipa": "^1.6.9",
"@constl/ipa": "^1.6.16",
"@constl/mandataire": "^3.0.3",
"@constl/mandataire-electron-principal": "^3.1.3",
"@constl/mandataire-electron-rendu": "^3.1.3",
Expand All @@ -87,18 +87,19 @@
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@ffmpeg/core": "^0.9.0",
"@ffmpeg/ffmpeg": "^0.9.8",
"@riffcc/orbiter": "^0.2.20",
"@vueuse/core": "^12.7.0",
"@riffcc/orbiter": "^0.2.36",
"@vueuse/core": "^12.8.2",
"ajv": "^8.17.1",
"assert": "^2.1.0",
"axios": "^1.9.0",
"change-case": "^5.4.4",
"core-js": "^3.40.0",
"core-js": "^3.42.0",
"crypto-browserify": "^3.12.1",
"electron-updater": "^6.3.9",
"electron-updater": "^6.6.2",
"ennikkai": "^2.3.4",
"events": "^3.3.0",
"file-saver": "^2.0.5",
"hls.js": "^1.5.20",
"hls.js": "^1.6.2",
"hlsjs-ipfs-loader": "^0.3.1",
"image-file-resize": "^1.0.5",
"is-ipfs": "^8.0.4",
Expand All @@ -111,8 +112,8 @@
"tslib": "^2.8.1",
"uuid": "^11.1.0",
"vue": "^3.5.13",
"vue-router": "^4.5.0",
"vuetify": "^3.7.14",
"vue-router": "^4.5.1",
"vuetify": "^3.8.3",
"webfontloader": "^1.6.28",
"wherearewe": "^2.0.1"
},
Expand Down
16 changes: 13 additions & 3 deletions packages/main/src/constellation.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
import {GestionnaireFenêtres} from '@constl/mandataire-electron-principal';
import {RIFFCC_PROTOCOL} from '/@/consts';

const enDéveloppement = import.meta.env.DEV;

const importationIPA = import('@constl/ipa');
const importationServeur = import('@constl/serveur');

// Avec ça, on peut spécifier le dossier Constellation dans les tests
const opts = process.env.DOSSIER_CONSTL ? {dossier: process.env.DOSSIER_CONSTL} : undefined;

export const gestionnaireFenêtres = new GestionnaireFenêtres({
enDéveloppement,
importationIPA,
importationServeur,
journal: enDéveloppement ? console.log : undefined,
opts,
opts: {
protocoles: [RIFFCC_PROTOCOL],

// Useful for running tests with a temporary folder
dossier: process.env.DOSSIER_CONSTL,

// Add custom domains (only for peer reachable on this domain)
domaines: process.env.VITE_DOMAINS?.split(',').map(d=>d.trim()),

// Add custom peers (other peers to connect to automatically)
pairsParDéfaut: process.env.VITE_BOOTSTRAPPERS?.split(',').map(b=>b.trim()),
},
});
2 changes: 2 additions & 0 deletions packages/main/src/consts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Todo: make configurable with environmental variable and define in single location for main and renderer
export const RIFFCC_PROTOCOL = 'Riff.CC';
2 changes: 1 addition & 1 deletion packages/main/tests/unit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vi.mock('electron', () => {
bw.prototype.loadURL = vi.fn((_: string, __?: Electron.LoadURLOptions) => Promise.resolve());
bw.prototype.loadFile = vi.fn((_: string, __?: Electron.LoadFileOptions) => Promise.resolve());
// Use "any" because the on function is overloaded
// @ts-expect-error I have no idea why
// @ts-expect-error Je ne sais pas pourquoi
// eslint-disable-next-line @typescript-eslint/no-explicit-any
bw.prototype.on = vi.fn<any>();
bw.prototype.destroy = vi.fn();
Expand Down
29 changes: 23 additions & 6 deletions packages/preload/tests/unit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import EventEmitter from 'events';
import type TypedEmitter from 'typed-emitter';
import {v4 as uuidv4} from 'uuid';

import type {MessageDIpa, MessagePourIpa} from '@constl/mandataire';
import type {MessageActionPourIpa, MessageDIpa} from '@constl/mandataire';
import {
envoyerMessageÀConstellation,
envoyerMessageÀServeurConstellation,
Expand All @@ -26,8 +26,7 @@ import {
surWindows,
écouterMessagesDeConstellation,
écouterMessagesDeServeurConstellation,
} from '../src';

} from '../src/';

vi.mock('electron', () => {
type ÉvénementsCoquille = {
Expand Down Expand Up @@ -72,7 +71,25 @@ vi.mock('electron', () => {
},
};

return {ipcRenderer};
const app: Pick<Electron.App, 'getAppPath' | 'getPath'> = {
getAppPath(): string {
return '';
},
getPath(): string {
return '';
},
};

const ipcMain: Pick<Electron.IpcMain, 'on' | 'handle'> = {
on(..._args) {
return this;
},
handle(..._args) {
return this;
},
};

return {ipcRenderer, default: {app, ipcMain, ipcRenderer}};
});

test('plateforme', async () => {
Expand All @@ -96,9 +113,9 @@ test('messages ipa constellation', async () => {

écouterMessagesDeConstellation(message => résultat.mettreÀJour(message));

const message: MessagePourIpa = {
const message: MessageActionPourIpa = {
type: 'action',
id: uuidv4(),
idRequête: uuidv4(),
fonction: ['on', 'test', 'une', 'fonction'],
args: {qui: 'nexiste', pas: 'vraiment'},
};
Expand Down
3 changes: 3 additions & 0 deletions packages/renderer/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<v-main min-height="100vh">
<router-view />
</v-main>
<div id="app">
<router-view />

Check warning on line 8 in packages/renderer/src/App.vue

View workflow job for this annotation

GitHub Actions / eslint

Expected indentation of 6 spaces but found 4 spaces
</div>

Check warning on line 9 in packages/renderer/src/App.vue

View workflow job for this annotation

GitHub Actions / eslint

Expected indentation of 4 spaces but found 2 spaces
<audio-player v-if="activeTrack"></audio-player>
<video-player
v-if="floatingVideoSource"
Expand Down
26 changes: 26 additions & 0 deletions packages/renderer/src/components/activepage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<template>
<v-container class="pa-4">
<div class="d-flex justify-center">
<v-switch v-model="model" color="primary" :label="model ? 'Hide network connections' : 'View network connections'"

Check warning on line 4 in packages/renderer/src/components/activepage.vue

View workflow job for this annotation

GitHub Actions / eslint

':label' should be on a new line

Check warning on line 4 in packages/renderer/src/components/activepage.vue

View workflow job for this annotation

GitHub Actions / eslint

'color' should be on a new line

Check warning on line 4 in packages/renderer/src/components/activepage.vue

View workflow job for this annotation

GitHub Actions / eslint

Expected a linebreak before this attribute
hide-details inset />

Check warning on line 5 in packages/renderer/src/components/activepage.vue

View workflow job for this annotation

GitHub Actions / eslint

Expected 1 line break before closing bracket, but no line breaks found

Check warning on line 5 in packages/renderer/src/components/activepage.vue

View workflow job for this annotation

GitHub Actions / eslint

'inset' should be on a new line

Check warning on line 5 in packages/renderer/src/components/activepage.vue

View workflow job for this annotation

GitHub Actions / eslint

Expected indentation of 16 spaces but found 8 spaces
</div>
<div v-if="model" class="d-flex justify-center align-center fill-height">

Check warning on line 7 in packages/renderer/src/components/activepage.vue

View workflow job for this annotation

GitHub Actions / eslint

'class' should be on a new line
<v-list>
<userlistitem v-for="(user) in users" :key="user.infoMembre.idCompte" :userid="user.infoMembre.idCompte"

Check warning on line 9 in packages/renderer/src/components/activepage.vue

View workflow job for this annotation

GitHub Actions / eslint

Expected a linebreak before this attribute
:lastActive="user.vuÀ"></userlistitem>
</v-list>
</div>
</v-container>
</template>

<script setup lang="ts">
import { ref } from 'vue'

Check failure on line 17 in packages/renderer/src/components/activepage.vue

View workflow job for this annotation

GitHub Actions / eslint

Missing semicolon
import userlistitem from './userlistitem.vue';
import { suivre as follow, obt } from '@constl/vue';

Check failure on line 19 in packages/renderer/src/components/activepage.vue

View workflow job for this annotation

GitHub Actions / eslint

'obt' is defined but never used. Allowed unused vars must match /^_/u
import { useConstellation } from '../utils';

const model = ref(false);
const { constl } = useConstellation()

Check failure on line 23 in packages/renderer/src/components/activepage.vue

View workflow job for this annotation

GitHub Actions / eslint

Missing semicolon
const users = follow(constl.réseau.suivreConnexionsMembres)

Check failure on line 24 in packages/renderer/src/components/activepage.vue

View workflow job for this annotation

GitHub Actions / eslint

Missing semicolon

</script>
Loading