l0.DependencyControl.ScriptTargetFilter¶
ScriptTargetFilter ¶
Selects which packages a feed operation should process, by script type and namespace. Construct it from a spec table, or empty and build it up fluently — every builder method returns self so calls can be chained. Because modules and automation scripts aren't required to have unique namespaces, rules are keyed by script type first.
ScriptTargetFilter!\include(domain.ScriptType.Module, "l0.DependencyControl")
ScriptTargetFilter!\includeAll domain.ScriptType.Module -- every module
ScriptTargetFilter!\includeAll! -- everything
ScriptTargetFilter {[domain.ScriptType.Module]: {include: {"l0.DependencyControl"}}}
Constructor ¶
| param | type | description |
|---|---|---|
| spec? | table<ScriptType, true | { include?: string[], exclude?: string[] }> |
Initial rules keyed by script type. |
Instance methods¶
include ¶
Includes a single namespace of the given script type.
| param | type | description |
|---|---|---|
| scriptType | ScriptType | |
| namespace | string |
Returns:
selfScriptTargetFilter
includeAll ¶
Includes every namespace of the given script type, or — when called without an argument — every namespace of every script type.
| param | type | description |
|---|---|---|
| scriptType? | ScriptType | Script type to include all of; omit to include everything. |
Returns:
selfScriptTargetFilter
exclude ¶
Excludes a single namespace of the given script type (takes precedence over includes).
| param | type | description |
|---|---|---|
| scriptType | ScriptType | |
| namespace | string |
Returns:
selfScriptTargetFilter
matches ¶
Tests whether a script of the given type and namespace should be processed.
| param | type | description |
|---|---|---|
| scriptType | ScriptType | |
| namespace | string |
Returns:
boolean
Fields¶
| field | type | description |
|---|---|---|
| scriptTypes | ScriptType[] | The script types this filter would process (those carrying any rule), sorted. Read-only. |
| scriptTypeList | ScriptType[] |