* 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>
This commit is contained in:
29
src/command-roster.cts
Normal file
29
src/command-roster.cts
Normal file
@@ -0,0 +1,29 @@
|
||||
'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,
|
||||
};
|
||||
Reference in New Issue
Block a user