Skip to content

refactor(config): reorganize schemas and normalize firewall behavior shape#439

Open
jcbsfilho wants to merge 9 commits into
mainfrom
refactor/config-schema
Open

refactor(config): reorganize schemas and normalize firewall behavior shape#439
jcbsfilho wants to merge 9 commits into
mainfrom
refactor/config-schema

Conversation

@jcbsfilho

Copy link
Copy Markdown
Collaborator

This pull request refactors the configuration package to reorganize and normalize how firewall behaviors are defined and processed. The main changes include moving schema files to a dedicated directory, splitting monolithic schemas, and introducing a new, more explicit structure for firewall rule behaviors. The documentation and example configurations have been updated accordingly, and tests have been adjusted to match the new structure.

Schema and Structure Refactoring

Firewall Behavior API Redesign

  • Changed firewall rule behaviors from a single behavior object to a behaviors array, where each behavior is now an object with a type field and, where applicable, an attributes field. This makes the API more explicit and extensible. (README.md [1] [2]
  • Renamed the setWafRuleset behavior to set_waf and updated its shape and documentation for clarity. (README.md [1] .changeset/free-ravens-jump.md [2]

Example Configurations and Tests

  • Refactored all example configs and tests to use the new behaviors array and discriminated union structure, replacing legacy keys like deny: true with { type: 'deny' }, and so on for all behaviors.

Processor Logic Update

Dependency Updates

…shape

- move schema files from helpers/ to a dedicated schemas/ directory
and extract the firewall schema into its own module (firewall/behaviors,
firewall/functionsInstances).
- replace the property-per-behavior pattern ({ deny: true },
{ runFunction: ... }, { setWafRuleset: {...} }) with a uniform
{ type, attributes } shape across firewall behaviors, aligning the
config contract with the API representation.
…te docs

- rename the WAF behavior type from `set_waf_ruleset` to `set_waf` across schema,
strategy, constants, types, tests, and README. Also rename the `wafMode` attribute
to `mode` in the set_waf schema to align with the API field naming convention.
@jcbsfilho jcbsfilho requested a review from a team as a code owner June 11, 2026 18:39
@github-actions

Copy link
Copy Markdown
Contributor

SCC Complexity Analysis

  • Title: refactor(config): reorganize schemas and normalize firewall behavior shape
  • Author: jcbsfilho
Metric Source Branch (refactor/config-schema) Target Branch (main) Difference
Complexity 2454 2445 9
Code 50609 50506 103

@pkg-pr-new

pkg-pr-new Bot commented Jun 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/aziontech/lib/@aziontech/builder@439
npm i https://pkg.pr.new/aziontech/lib/@aziontech/config@439
npm i https://pkg.pr.new/aziontech/lib/@aziontech/presets@439

commit: d9c832e

@github-actions

Copy link
Copy Markdown
Contributor

SCC Complexity Analysis

  • Title: refactor(config): reorganize schemas and normalize firewall behavior shape
  • Author: jcbsfilho
Metric Source Branch (refactor/config-schema) Target Branch (main) Difference
Complexity 2454 2445 9
Code 50616 50514 102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant