Files
pearcord-platform/mixins/json-export/emoji-json-mixin.js
T
Raven ScottandCursor a5dba86570 refactor(platform): organize mixins into category directories
Move 136 prototype mixins under mixins/domain, json-export, and
runtime/* so the package root stays navigable. Manifest assign order
is unchanged; apply-platform-mixins and runtime registry paths updated.

Co-authored-by: Cursor <[email protected]>
2026-06-03 17:42:26 -04:00

36 lines
1.4 KiB
JavaScript

'use strict'
const { createJsonExportDualHealMixin } = require('pearcord-json-export-mixin')
const emojiJsonMixin = createJsonExportDualHealMixin({
gossipEntries: [
{ method: '_shouldGossipEmojiRegistryJson', keysField: '_emojiRegistryJsonGossipKeys', initMethod: '_initEmojiRegistryJsonMixinState' },
{ method: '_shouldGossipStickerPackExportJson', gossipHashPrefix: 'effective:', keysField: '_stickerPackRegistryJsonGossipKeys', initMethod: '_initStickerPackJsonMixinState' },
],
heals: [
{
watermarkField: '_emojiJsonHealWatermark',
shouldGossipMethod: '_shouldGossipEmojiRegistryJson',
healMethod: '_healEmojiRegistryExportCursorOnPartition',
spanKind: 'emoji.json',
healContext: 'heal.emoji',
countField: 'guildEmojiJsonCount',
bridgeKind: 'emoji.json',
listExportsMethod: 'listEmojiRegistryJsonExports'
},
{
watermarkField: '_stickerPackJsonHealWatermark',
shouldGossipMethod: '_shouldGossipStickerPackExportJson',
healMethod: '_healStickerPackExportCursorOnPartition',
spanKind: 'emoji.json',
healContext: 'heal.sticker',
countField: 'guildEmojiJsonCount',
bridgeKind: 'emoji.json',
listExportsMethod: 'listStickerPackExportJsonExports',
extraSpanEnd: (rows) => ({ emojiCount: rows[0]?.emojiCount || 0 })
}
]
})
module.exports = { emojiJsonMixin }