Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
933 B
Text
32 lines
933 B
Text
import { Channel, getChannels } from "./internal/diagnostics_channel/channel.mjs";
|
|
import { TracingChannel } from "./internal/diagnostics_channel/tracing-channel.mjs";
|
|
export { Channel } from "./internal/diagnostics_channel/channel.mjs";
|
|
export const channel = function(name) {
|
|
const channels = getChannels();
|
|
if (name in channels) {
|
|
return channels[name];
|
|
}
|
|
return new Channel(name);
|
|
};
|
|
export const hasSubscribers = function(name) {
|
|
const channels = getChannels();
|
|
const channel = channels[name];
|
|
return channel && channel.hasSubscribers;
|
|
};
|
|
export const subscribe = function(name, onMessage) {
|
|
channel(name).subscribe(onMessage);
|
|
};
|
|
export const unsubscribe = function(name, onMessage) {
|
|
return channel(name).unsubscribe(onMessage);
|
|
};
|
|
export const tracingChannel = function(name) {
|
|
return new TracingChannel(name);
|
|
};
|
|
export default {
|
|
Channel,
|
|
channel,
|
|
hasSubscribers,
|
|
subscribe,
|
|
tracingChannel,
|
|
unsubscribe
|
|
};
|