routie dev init since i didn't adhere to any proper guidance up until now

This commit is contained in:
2026-04-29 22:27:29 -06:00
commit e1dabb71e2
15301 changed files with 3562618 additions and 0 deletions
@@ -0,0 +1,18 @@
import { RegexOption } from '../../types/common-options.js'
/**
* Checks if all node names match the specified pattern.
*
* @param params - The parameters object.
* @param params.allNamesMatchPattern - The pattern to match against all node
* names.
* @param params.nodeNames - Array of node names to test against patterns.
* @returns True if all node names match the specified pattern, or if no pattern
* is specified; otherwise, false.
*/
export declare function passesAllNamesMatchPatternFilter({
allNamesMatchPattern,
nodeNames,
}: {
allNamesMatchPattern?: RegexOption
nodeNames: string[]
}): boolean
@@ -0,0 +1,18 @@
import { matches } from '../matches.js'
/**
* Checks if all node names match the specified pattern.
*
* @param params - The parameters object.
* @param params.allNamesMatchPattern - The pattern to match against all node
* names.
* @param params.nodeNames - Array of node names to test against patterns.
* @returns True if all node names match the specified pattern, or if no pattern
* is specified; otherwise, false.
*/
function passesAllNamesMatchPatternFilter({ allNamesMatchPattern, nodeNames }) {
if (!allNamesMatchPattern) {
return true
}
return nodeNames.every(nodeName => matches(nodeName, allNamesMatchPattern))
}
export { passesAllNamesMatchPatternFilter }
@@ -0,0 +1,17 @@
/**
* Checks if the given AST selector matches the expected AST selector.
*
* @param params - The parameters object.
* @param params.matchesAstSelector - The AST selector to match against, or
* undefined if no selector is specified.
* @param params.matchedAstSelectors - The matched AST selectors for a node.
* @returns True if the given AST selector matches the expected AST selector, or
* if no selector is specified; otherwise, false.
*/
export declare function passesAstSelectorFilter({
matchedAstSelectors,
matchesAstSelector,
}: {
matchedAstSelectors: ReadonlySet<string>
matchesAstSelector: undefined | string
}): boolean
@@ -0,0 +1,17 @@
/**
* Checks if the given AST selector matches the expected AST selector.
*
* @param params - The parameters object.
* @param params.matchesAstSelector - The AST selector to match against, or
* undefined if no selector is specified.
* @param params.matchedAstSelectors - The matched AST selectors for a node.
* @returns True if the given AST selector matches the expected AST selector, or
* if no selector is specified; otherwise, false.
*/
function passesAstSelectorFilter({ matchedAstSelectors, matchesAstSelector }) {
if (!matchesAstSelector) {
return true
}
return matchedAstSelectors.has(matchesAstSelector)
}
export { passesAstSelectorFilter }