@exodus/xqa 1.9.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +31 -0
  2. package/dist/xqa.cjs +1388 -694
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -93,6 +93,37 @@ xqa completion bash # generate bash completions
93
93
  xqa completion zsh # generate zsh completions
94
94
  ```
95
95
 
96
+ ### Suite hooks
97
+
98
+ Suite config files may declare a `beforeEach` hook that runs before every work item on every simulator. Use this for project-owned setup (wallet provisioning, cache warming, login seeding).
99
+
100
+ ```json
101
+ {
102
+ "specs": ["specs/send.test.md"],
103
+ "hooks": {
104
+ "beforeEach": {
105
+ "script": "qa/prepare-sim.mjs",
106
+ "env": { "APP_PROFILE": "funded" }
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ The hook script is invoked as a Node child process. It receives:
113
+
114
+ - Inherited `process.env`
115
+ - Suite-declared `env` (merged below reserved keys)
116
+ - Reserved xqa-owned keys: `XQA_SIM_UDID`, `XQA_ITEM_ID`, `XQA_ITEM_TYPE`, `XQA_ITEM_NAME`, `XQA_SUITE`, and (when item type is `spec`) `XQA_SPEC_PATH`
117
+
118
+ Suite-declared `env` cannot override reserved keys — the parser rejects such configs.
119
+
120
+ Contract:
121
+
122
+ - Exit 0 → proceed with item.
123
+ - Non-zero exit → item marked failed, `executeItem` skipped, counts toward simulator-unhealthy threshold.
124
+ - 120s timeout (not configurable in v1).
125
+ - Honors the suite abort signal.
126
+
96
127
  ## Configuration
97
128
 
98
129
  Configuration is loaded from environment variables and `.env.local`: