Files
pybricks-code/src/sagas.ts
T
David Lechner e7366c8afd rework alerts
This starts moving alerts to the same subsystem where they are relevant
instead of putting everything in notifications.

So far, only the explorer file in use error is handled like this.
2022-05-20 19:25:18 -05:00

53 lines
1.6 KiB
TypeScript

// SPDX-License-Identifier: MIT
// Copyright (c) 2020-2022 The Pybricks Authors
import { all, put } from 'typed-redux-saga/macro';
import alerts, { AlertsSagaContext } from './alerts/sagas';
import { didStart } from './app/actions';
import app from './app/sagas';
import blePybricksService from './ble-pybricks-service/sagas';
import ble from './ble/sagas';
import editor from './editor/sagas';
import errorLog from './error-log/sagas';
import explorer from './explorer/sagas';
import fileStorage, { FileStorageSageContext } from './fileStorage/sagas';
import flashFirmware from './firmware/sagas';
import hub from './hub/sagas';
import lwp3BootloaderProtocol from './lwp3-bootloader/sagas';
import lwp3BootloaderBle from './lwp3-bootloader/sagas-ble';
import mpy from './mpy/sagas';
import notifications, { NotificationSagaContext } from './notifications/sagas';
import terminal, { TerminalSagaContext } from './terminal/sagas';
/* istanbul ignore next */
export default function* (): Generator {
yield* all([
alerts(),
app(),
blePybricksService(),
ble(),
editor(),
fileStorage(),
lwp3BootloaderBle(),
lwp3BootloaderProtocol(),
errorLog(),
explorer(),
flashFirmware(),
hub(),
mpy(),
notifications(),
terminal(),
put(didStart()),
]);
}
/**
* Combined type for all saga contexts.
*/
export type RootSagaContext = {
nextMessageId: () => number;
} & AlertsSagaContext &
FileStorageSageContext &
NotificationSagaContext &
TerminalSagaContext;