Add preliminary message backup harness

This commit is contained in:
Fedor Indutny 2024-03-15 07:20:33 -07:00 committed by GitHub
parent 231bf91a22
commit d85a1d5074
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 2997 additions and 121 deletions

View file

@ -5,6 +5,8 @@
/* eslint-disable no-console */
/* eslint-disable global-require */
import fs from 'fs';
const { config } = window.SignalContext;
if (config.environment === 'test') {
@ -14,8 +16,14 @@ if (config.environment === 'test') {
if (config.ciMode) {
console.log(
`Importing CI infrastructure; enabled in config, mode: ${config.ciMode}`
`Importing CI infrastructure; enabled in config, mode: ${config.ciMode}, ` +
`backupPath: ${config.ciBackupPath}`
);
const { getCI } = require('../../CI');
window.SignalCI = getCI(window.getTitle());
window.SignalCI = getCI({
deviceName: window.getTitle(),
backupData: config.ciBackupPath
? fs.readFileSync(config.ciBackupPath)
: undefined,
});
}