feat(filter): add isExcluded helper with unit tests

Glob-based entity_id matcher used by the upcoming exclude-filter feature.
Single wildcard `*` (matches any sequence including dots), all other characters
matched literally with regex metacharacters escaped. Case-sensitive, anchored.

Empty pattern array always returns false, so the helper is a no-op when the
adapter is not configured to filter anything.

New mocha unit-test suite invoked via `npm run test:unit` (separate from the
existing js-controller-backed test:integration).
This commit is contained in:
mokusone
2026-05-14 11:40:28 +02:00
parent 1f0e93d357
commit 9b95ece284
3 changed files with 73 additions and 0 deletions
+1
View File
@@ -50,6 +50,7 @@
"scripts": {
"test:integration": "mocha --exit",
"test:package": "mocha test/testPackageFiles.js --exit",
"test:unit": "mocha test/testEntityFilter.js --exit",
"test": "npm run test:integration",
"build:tsc": "tsc -p tsconfig.build.json",
"build": "npm run build:tsc",