import { Definition, HelloDefinition } from '@devvit/protos';
import { LinkedBundle } from '@devvit/protos/types/devvit/runtime/bundle.js';
import CircuitBreakApp from './CircuitBreakApp.js';
import FetchApp from './FetchApp.js';
import PingApp from './PingApp.js';
export const circuitBreakAppBundle = newTestLinkedBundle('test.local', `module.exports = {default: ${CircuitBreakApp}}`);
export const fetchAppBundle = newTestLinkedBundle('test.local', `module.exports = {default: ${FetchApp}}`);
export const pingAppBundle = newTestLinkedBundle('test.local', `console.log('eval'); module.exports = {default: ${PingApp}}`);
export function newTestLinkedBundle(hostname, code, uses = []) {
    return {
        assets: {},
        hostname,
        code,
        actor: { name: hostname, owner: 'snoo', version: '1.2.3' },
        products: {},
        provides: [Definition.toSerializable(HelloDefinition)],
        uses,
        webviewAssets: {},
    };
}
