Files
msd-core/src/command-roster.cts
Tom Boucher 89a8f915a4 refactor(#1099): extract runtime artifact conversion module (#1100)
* refactor(#1099): extract runtime artifact conversion module

* docs(#1099): update runtime conversion inventory

* docs(#1099): reconcile runtime conversion inventory count

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-13 10:27:12 -04:00

30 lines
1.0 KiB
TypeScript

'use strict';
/**
* Command Roster Module
*
* Read-only helper for discovering canonical commands/gsd command stems and
* applying the shared GSD slash-command namespace transform.
*/
// eslint-disable-next-line @typescript-eslint/no-require-imports
const slashCommandTransformer = require('../../../scripts/fix-slash-commands.cjs') as {
readCmdNames: () => string[];
transformContentToHyphen: (src: string, cmdNames: string[]) => string;
transformContent: (src: string, cmdNames: string[]) => string;
buildPattern: (cmdNames: string[]) => RegExp | null;
buildColonPattern: (cmdNames: string[]) => RegExp | null;
};
function readGsdCommandNames(): string[] {
return slashCommandTransformer.readCmdNames();
}
export = {
readGsdCommandNames,
transformContentToHyphen: slashCommandTransformer.transformContentToHyphen,
transformContent: slashCommandTransformer.transformContent,
buildPattern: slashCommandTransformer.buildPattern,
buildColonPattern: slashCommandTransformer.buildColonPattern,
};