@warlock.js/core 5.24.0 → 5.26.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 (256) hide show
  1. package/CHANGELOG.md +64 -1
  2. package/bin/warlock.js +0 -0
  3. package/esm/application/application.d.mts +21 -0
  4. package/esm/application/application.d.mts.map +1 -1
  5. package/esm/application/application.mjs +29 -1
  6. package/esm/application/application.mjs.map +1 -1
  7. package/esm/application/boot-signal.d.mts +2 -1
  8. package/esm/application/boot-signal.d.mts.map +1 -1
  9. package/esm/application/boot-signal.mjs.map +1 -1
  10. package/esm/application/index.d.mts +1 -0
  11. package/esm/application/index.mjs +1 -0
  12. package/esm/application/roles.d.mts +72 -0
  13. package/esm/application/roles.d.mts.map +1 -0
  14. package/esm/application/roles.mjs +124 -0
  15. package/esm/application/roles.mjs.map +1 -0
  16. package/esm/cli/commands/add.command.mjs.map +1 -1
  17. package/esm/cli/commands/create-database.command.mjs.map +1 -1
  18. package/esm/cli/commands/dev-server.command.mjs.map +1 -1
  19. package/esm/cli/commands/doctor/boot-for-diagnostics.mjs.map +1 -1
  20. package/esm/cli/commands/doctor/checks/index.mjs +2 -0
  21. package/esm/cli/commands/doctor/checks/index.mjs.map +1 -1
  22. package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs +170 -0
  23. package/esm/cli/commands/doctor/checks/locales-ts-deprecated.check.mjs.map +1 -0
  24. package/esm/cli/commands/doctor/doctor-command.action.mjs +7 -2
  25. package/esm/cli/commands/doctor/doctor-command.action.mjs.map +1 -1
  26. package/esm/cli/commands/doctor.command.mjs +5 -0
  27. package/esm/cli/commands/doctor.command.mjs.map +1 -1
  28. package/esm/cli/commands/drop-tables.command.mjs.map +1 -1
  29. package/esm/cli/commands/generate/generators/module.generator.mjs +1 -12
  30. package/esm/cli/commands/generate/generators/module.generator.mjs.map +1 -1
  31. package/esm/cli/commands/generate/utils/path-resolver.mjs.map +1 -1
  32. package/esm/cli/commands/migrate.command.mjs.map +1 -1
  33. package/esm/cli/commands/routes.command.mjs.map +1 -1
  34. package/esm/cli/commands/seed.command.mjs.map +1 -1
  35. package/esm/cli/commands/start-production.command.mjs +54 -5
  36. package/esm/cli/commands/start-production.command.mjs.map +1 -1
  37. package/esm/cli/commands/storage-put.action.mjs.map +1 -1
  38. package/esm/cli/commands/storage-put.command.mjs.map +1 -1
  39. package/esm/cli/commands/typings-generator.command.mjs +20 -1
  40. package/esm/cli/commands/typings-generator.command.mjs.map +1 -1
  41. package/esm/cli/commands/update.command.mjs.map +1 -1
  42. package/esm/cli/commands-loader.mjs.map +1 -1
  43. package/esm/config/config-loader.d.mts.map +1 -1
  44. package/esm/config/config-loader.mjs +3 -1
  45. package/esm/config/config-loader.mjs.map +1 -1
  46. package/esm/connectors/connectors-manager.mjs.map +1 -1
  47. package/esm/connectors/database-connector.mjs.map +1 -1
  48. package/esm/connectors/herald-connector.mjs.map +1 -1
  49. package/esm/connectors/http-connector.d.mts.map +1 -1
  50. package/esm/connectors/http-connector.mjs +7 -0
  51. package/esm/connectors/http-connector.mjs.map +1 -1
  52. package/esm/connectors/logger-connector.mjs.map +1 -1
  53. package/esm/connectors/mail-connector.mjs.map +1 -1
  54. package/esm/connectors/types.d.mts +8 -0
  55. package/esm/connectors/types.d.mts.map +1 -1
  56. package/esm/connectors/types.mjs.map +1 -1
  57. package/esm/database/create-database-action.mjs.map +1 -1
  58. package/esm/database/drop-tables-action.mjs.map +1 -1
  59. package/esm/database/migrate-action.mjs +4 -3
  60. package/esm/database/migrate-action.mjs.map +1 -1
  61. package/esm/database/models/database-log/database-log.mjs.map +1 -1
  62. package/esm/database/seed-command-action.mjs +2 -1
  63. package/esm/database/seed-command-action.mjs.map +1 -1
  64. package/esm/dev-server/dependency-graph.mjs.map +1 -1
  65. package/esm/dev-server/development-server.mjs +2 -0
  66. package/esm/dev-server/development-server.mjs.map +1 -1
  67. package/esm/dev-server/files-orchestrator.mjs.map +1 -1
  68. package/esm/dev-server/layer-executor.mjs.map +1 -1
  69. package/esm/dev-server/legacy-locales-warning.mjs +16 -0
  70. package/esm/dev-server/legacy-locales-warning.mjs.map +1 -0
  71. package/esm/dev-server/manifest-manager.mjs.map +1 -1
  72. package/esm/dev-server/module-loader.mjs +26 -5
  73. package/esm/dev-server/module-loader.mjs.map +1 -1
  74. package/esm/dev-server/register-installed-devtools.mjs +47 -0
  75. package/esm/dev-server/register-installed-devtools.mjs.map +1 -0
  76. package/esm/dev-server/run-connector-typings.mjs +28 -0
  77. package/esm/dev-server/run-connector-typings.mjs.map +1 -0
  78. package/esm/dev-server/special-file-patterns.mjs +5 -3
  79. package/esm/dev-server/special-file-patterns.mjs.map +1 -1
  80. package/esm/dev-server/special-files-collector.d.mts +2 -2
  81. package/esm/dev-server/special-files-collector.d.mts.map +1 -1
  82. package/esm/dev-server/special-files-collector.mjs +7 -4
  83. package/esm/dev-server/special-files-collector.mjs.map +1 -1
  84. package/esm/dev-server/translation-keys-sources.mjs +7 -3
  85. package/esm/dev-server/translation-keys-sources.mjs.map +1 -1
  86. package/esm/dev-server/type-generator.mjs +27 -4
  87. package/esm/dev-server/type-generator.mjs.map +1 -1
  88. package/esm/encryption/password.mjs.map +1 -1
  89. package/esm/generations/add-command.action.mjs +3 -1
  90. package/esm/generations/add-command.action.mjs.map +1 -1
  91. package/esm/generations/features/access.feature.mjs +38 -18
  92. package/esm/generations/features/access.feature.mjs.map +1 -1
  93. package/esm/generations/features/ai-anthropic.feature.mjs.map +1 -1
  94. package/esm/generations/features/ai-bedrock.feature.mjs.map +1 -1
  95. package/esm/generations/features/ai-google.feature.mjs.map +1 -1
  96. package/esm/generations/features/ai-ollama.feature.mjs.map +1 -1
  97. package/esm/generations/features/ai-openai.feature.mjs.map +1 -1
  98. package/esm/generations/features/ai-panoptic.feature.mjs.map +1 -1
  99. package/esm/generations/features/ai-tools.feature.mjs.map +1 -1
  100. package/esm/generations/features/ai-workspace.feature.mjs.map +1 -1
  101. package/esm/generations/features/ai.feature.mjs.map +1 -1
  102. package/esm/generations/features/bull-board.feature.mjs +2 -2
  103. package/esm/generations/features/bull-board.feature.mjs.map +1 -1
  104. package/esm/generations/features/devtools.feature.mjs +23 -0
  105. package/esm/generations/features/devtools.feature.mjs.map +1 -0
  106. package/esm/generations/features/herald.feature.mjs.map +1 -1
  107. package/esm/generations/features/image.feature.mjs.map +1 -1
  108. package/esm/generations/features/index.mjs +2 -0
  109. package/esm/generations/features/index.mjs.map +1 -1
  110. package/esm/generations/features/mail.feature.mjs.map +1 -1
  111. package/esm/generations/features/mongodb.feature.mjs.map +1 -1
  112. package/esm/generations/features/notifications.feature.mjs.map +1 -1
  113. package/esm/generations/features/postgres.feature.mjs.map +1 -1
  114. package/esm/generations/features/react-email.feature.mjs.map +1 -1
  115. package/esm/generations/features/react.feature.mjs.map +1 -1
  116. package/esm/generations/features/redis.feature.mjs.map +1 -1
  117. package/esm/generations/features/s3.feature.mjs.map +1 -1
  118. package/esm/generations/features/scheduler.feature.mjs.map +1 -1
  119. package/esm/generations/features/ses.feature.mjs.map +1 -1
  120. package/esm/generations/features/socket.feature.mjs.map +1 -1
  121. package/esm/generations/features/test.feature.mjs +6 -2
  122. package/esm/generations/features/test.feature.mjs.map +1 -1
  123. package/esm/generations/features/types.mjs.map +1 -1
  124. package/esm/generations/features/web.feature.mjs.map +1 -1
  125. package/esm/http/build-rate-limit-options.d.mts +8 -2
  126. package/esm/http/build-rate-limit-options.d.mts.map +1 -1
  127. package/esm/http/build-rate-limit-options.mjs +1 -0
  128. package/esm/http/build-rate-limit-options.mjs.map +1 -1
  129. package/esm/http/database/RequestLog.mjs.map +1 -1
  130. package/esm/http/errors/errors.d.mts +1 -17
  131. package/esm/http/errors/errors.d.mts.map +1 -1
  132. package/esm/http/errors/errors.mjs +1 -20
  133. package/esm/http/errors/errors.mjs.map +1 -1
  134. package/esm/http/index.d.mts +4 -3
  135. package/esm/http/index.mjs +3 -2
  136. package/esm/http/middleware/inject-request-context.d.mts +1 -1
  137. package/esm/http/middleware/inject-request-context.d.mts.map +1 -1
  138. package/esm/http/middleware/inject-request-context.mjs +9 -1
  139. package/esm/http/middleware/inject-request-context.mjs.map +1 -1
  140. package/esm/http/middleware/rate-limit.middleware.d.mts.map +1 -1
  141. package/esm/http/middleware/rate-limit.middleware.mjs +5 -1
  142. package/esm/http/middleware/rate-limit.middleware.mjs.map +1 -1
  143. package/esm/http/request.d.mts +7 -24
  144. package/esm/http/request.d.mts.map +1 -1
  145. package/esm/http/request.mjs +1 -22
  146. package/esm/http/request.mjs.map +1 -1
  147. package/esm/http/response.d.mts +5 -5
  148. package/esm/http/response.d.mts.map +1 -1
  149. package/esm/http/response.mjs +4 -2
  150. package/esm/http/response.mjs.map +1 -1
  151. package/esm/http/server-rebuilt.d.mts +20 -0
  152. package/esm/http/server-rebuilt.d.mts.map +1 -0
  153. package/esm/http/server-rebuilt.mjs +21 -0
  154. package/esm/http/server-rebuilt.mjs.map +1 -0
  155. package/esm/http/tracing/index.mjs +1 -1
  156. package/esm/http/tracing/tracing-dispatcher.d.mts +13 -6
  157. package/esm/http/tracing/tracing-dispatcher.d.mts.map +1 -1
  158. package/esm/http/tracing/tracing-dispatcher.mjs +46 -14
  159. package/esm/http/tracing/tracing-dispatcher.mjs.map +1 -1
  160. package/esm/http/tracing/tracing.type.d.mts +2 -1
  161. package/esm/http/tracing/tracing.type.d.mts.map +1 -1
  162. package/esm/http/types.d.mts +9 -0
  163. package/esm/http/types.d.mts.map +1 -1
  164. package/esm/image/image.mjs.map +1 -1
  165. package/esm/index.d.mts +8 -4
  166. package/esm/index.mjs +8 -3
  167. package/esm/loader/app-module-importer.d.mts +17 -0
  168. package/esm/loader/app-module-importer.d.mts.map +1 -0
  169. package/esm/loader/app-module-importer.mjs +20 -0
  170. package/esm/loader/app-module-importer.mjs.map +1 -0
  171. package/esm/localization/index.mjs +4 -0
  172. package/esm/localization/parse-locale-dictionary.d.mts +23 -0
  173. package/esm/localization/parse-locale-dictionary.d.mts.map +1 -0
  174. package/esm/localization/parse-locale-dictionary.mjs +215 -0
  175. package/esm/localization/parse-locale-dictionary.mjs.map +1 -0
  176. package/esm/localization/register-locale-dictionary.d.mts +12 -0
  177. package/esm/localization/register-locale-dictionary.d.mts.map +1 -0
  178. package/esm/localization/register-locale-dictionary.mjs +58 -0
  179. package/esm/localization/register-locale-dictionary.mjs.map +1 -0
  180. package/esm/logger/logger.mjs.map +1 -1
  181. package/esm/mail/events.d.mts +7 -0
  182. package/esm/mail/events.d.mts.map +1 -1
  183. package/esm/mail/events.mjs +7 -0
  184. package/esm/mail/events.mjs.map +1 -1
  185. package/esm/mail/send-mail.d.mts.map +1 -1
  186. package/esm/mail/send-mail.mjs +23 -2
  187. package/esm/mail/send-mail.mjs.map +1 -1
  188. package/esm/mail/types.d.mts +5 -1
  189. package/esm/mail/types.d.mts.map +1 -1
  190. package/esm/mail/types.mjs.map +1 -1
  191. package/esm/manifest/manifest-manager.mjs.map +1 -1
  192. package/esm/production/build-contributions.mjs +19 -3
  193. package/esm/production/build-contributions.mjs.map +1 -1
  194. package/esm/production/production-builder.mjs +39 -10
  195. package/esm/production/production-builder.mjs.map +1 -1
  196. package/esm/production/production-supervisor.mjs +6 -0
  197. package/esm/production/production-supervisor.mjs.map +1 -1
  198. package/esm/production/resolve-build-config.d.mts +1 -1
  199. package/esm/production/resolve-build-config.mjs +15 -0
  200. package/esm/production/resolve-build-config.mjs.map +1 -1
  201. package/esm/production/route-registration-child.mjs +14 -2
  202. package/esm/production/route-registration-child.mjs.map +1 -1
  203. package/esm/production/route-registration-snapshot.mjs +9 -2
  204. package/esm/production/route-registration-snapshot.mjs.map +1 -1
  205. package/esm/resource/resource-field-builder.mjs +1 -1
  206. package/esm/resource/resource-field-builder.mjs.map +1 -1
  207. package/esm/resource/resource.d.mts +5 -0
  208. package/esm/resource/resource.d.mts.map +1 -1
  209. package/esm/resource/resource.mjs +17 -6
  210. package/esm/resource/resource.mjs.map +1 -1
  211. package/esm/router/router.d.mts.map +1 -1
  212. package/esm/router/router.mjs +1 -0
  213. package/esm/router/router.mjs.map +1 -1
  214. package/esm/router/types.d.mts +10 -1
  215. package/esm/router/types.d.mts.map +1 -1
  216. package/esm/tests/index.d.mts +3 -2
  217. package/esm/tests/index.mjs +3 -2
  218. package/esm/tests/start-http-development-server.d.mts +10 -0
  219. package/esm/tests/start-http-development-server.d.mts.map +1 -1
  220. package/esm/tests/start-http-development-server.mjs +16 -2
  221. package/esm/tests/start-http-development-server.mjs.map +1 -1
  222. package/esm/tests/vitest-setup.d.mts +16 -1
  223. package/esm/tests/vitest-setup.d.mts.map +1 -1
  224. package/esm/tests/vitest-setup.mjs +20 -2
  225. package/esm/tests/vitest-setup.mjs.map +1 -1
  226. package/esm/use-cases/use-case-events.mjs.map +1 -1
  227. package/esm/utils/is-test-file.mjs +15 -0
  228. package/esm/utils/is-test-file.mjs.map +1 -0
  229. package/esm/utils/normalized-path.d.mts +3 -1
  230. package/esm/utils/normalized-path.d.mts.map +1 -1
  231. package/esm/utils/normalized-path.mjs +4 -2
  232. package/esm/utils/normalized-path.mjs.map +1 -1
  233. package/esm/utils/paths.mjs.map +1 -1
  234. package/esm/validation/plugins/database-plugin.mjs.map +1 -1
  235. package/esm/validation/validateAll.mjs +57 -4
  236. package/esm/validation/validateAll.mjs.map +1 -1
  237. package/esm/warlock-config/default-configurations.mjs +1 -0
  238. package/esm/warlock-config/default-configurations.mjs.map +1 -1
  239. package/esm/warlock-config/types.d.mts +7 -0
  240. package/esm/warlock-config/types.d.mts.map +1 -1
  241. package/esm/warlock-config/warlock-config.manager.mjs.map +1 -1
  242. package/llms-full.txt +382 -214
  243. package/llms.txt +1 -1
  244. package/package.json +23 -19
  245. package/skills/README.md +1 -1
  246. package/skills/configure-app/SKILL.md +2 -0
  247. package/skills/create-controller/SKILL.md +4 -0
  248. package/skills/define-resource/SKILL.md +4 -0
  249. package/skills/request-tracing/SKILL.md +38 -15
  250. package/skills/run-app/SKILL.md +71 -34
  251. package/skills/send-mail/SKILL.md +55 -25
  252. package/skills/test-http/SKILL.md +28 -9
  253. package/skills/test-service/SKILL.md +61 -40
  254. package/skills/use-localization/SKILL.md +39 -26
  255. package/skills/warlock-conventions/SKILL.md +26 -18
  256. package/skills/write-cli-command/SKILL.md +50 -45
@@ -43,16 +43,16 @@ Run it: `npx warlock users.promote --email=hasan@example.com` (or `npx warlock u
43
43
 
44
44
  ## `CLICommandOptions` — the factory input
45
45
 
46
- | Field | Type | Required | Notes |
47
- | ------------- | ----------------------------- | -------- | ---------------------------------------------------------------------------------------------- |
48
- | `name` | `string` | yes | Dot notation OK (`db.seed`, `jwt.generate`). May include positional placeholders (`name <arg>`). |
49
- | `description` | `string` | | Shown in `warlock --help` and `warlock <cmd> --help`. |
50
- | `alias` | `string` | | Short name (`m` for `migrate`). |
51
- | `action` | `(data) => void \| Promise` | yes | Runs after preloaders. `data` is `{ args, options }`. |
52
- | `preAction` | `(data) => void \| Promise` | | Runs **before** preloaders — banner, input validation. |
53
- | `preload` | `CLICommandPreload` | | What to load before `action` runs. See below. |
54
- | `persistent` | `boolean` | | `true` for long-running commands (dev server). Skips the auto-exit. |
55
- | `options` | `CLICommandOption[]` | | Flag definitions. See below. |
46
+ | Field | Type | Required | Notes |
47
+ | ------------- | --------------------------- | -------- | ------------------------------------------------------------------------------------------------ |
48
+ | `name` | `string` | yes | Dot notation OK (`db.seed`, `jwt.generate`). May include positional placeholders (`name <arg>`). |
49
+ | `description` | `string` | | Shown in `warlock --help` and `warlock <cmd> --help`. |
50
+ | `alias` | `string` | | Short name (`m` for `migrate`). |
51
+ | `action` | `(data) => void \| Promise` | yes | Runs after preloaders. `data` is `{ args, options }`. |
52
+ | `preAction` | `(data) => void \| Promise` | | Runs **before** preloaders — banner, input validation. |
53
+ | `preload` | `CLICommandPreload` | | What to load before `action` runs. See below. |
54
+ | `persistent` | `boolean` | | `true` for long-running commands (dev server). Skips the auto-exit. |
55
+ | `options` | `CLICommandOption[]` | | Flag definitions. See below. |
56
56
 
57
57
  ## Options — flag shape
58
58
 
@@ -154,29 +154,29 @@ The framework ships a fixed set of commands you call but don't author. Knowing t
154
154
 
155
155
  ### Database + migrations
156
156
 
157
- | Command | Flags / args | Preloads |
158
- | -------- | ----------------------------------------------- | ------------------------------ |
159
- | `warlock migrate` | `--list` / `-l` (executed **and** pending), `--pending` (pending only, sets an exit code), `--fresh` / `-f` (drop tables first) | database, logger |
160
- | `warlock seed` | `--name <pattern>` (run seeds matching the pattern) | full bootstrap (env, configs, app modules) |
161
- | `warlock create-database <name>` | bare positional `<name>` | database |
162
- | `warlock drop.tables` | `--force, -f` (skip confirmation prompt) | database, logger |
163
- | `warlock db.indexes` | builds DB indexes for every registered model | database |
157
+ | Command | Flags / args | Preloads |
158
+ | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |
159
+ | `warlock migrate` | `--list` / `-l` (executed **and** pending), `--pending` (pending only, sets an exit code), `--fresh` / `-f` (drop tables first) | database, logger |
160
+ | `warlock seed` | `--name <pattern>` (run seeds matching the pattern) | full bootstrap (env, configs, app modules) |
161
+ | `warlock create-database <name>` | bare positional `<name>` | database |
162
+ | `warlock drop.tables` | `--force, -f` (skip confirmation prompt) | database, logger |
163
+ | `warlock db.indexes` | builds DB indexes for every registered model | database |
164
164
 
165
165
  **Asking what will run next.** `warlock migrate --list` prints executed migrations and then the pending ones **in execution order**. Do not derive the pending set by differencing `--all` against `--list`: `--all` globs `src/app` only, while `--list` reads the migrations table, which also holds migrations that packages register through `database.migrations` (`@warlock.js/auth` contributes two). The difference under-counts pending, in the direction that says "safe to proceed".
166
166
 
167
167
  `--list` is a report and always exits `0`. `--pending` is a gate, and its exit code is its whole API:
168
168
 
169
- | Exit | Meaning |
170
- | ---- | ------- |
169
+ | Exit | Meaning |
170
+ | ---- | ------------------------- |
171
171
  | `0` | computed, nothing pending |
172
- | `1` | computed, N pending |
172
+ | `1` | computed, N pending |
173
173
  | `2` | **could not be computed** |
174
174
 
175
175
  ```bash
176
176
  warlock migrate --pending && ./deploy.sh
177
177
  ```
178
178
 
179
- `2` is separate from `1` on purpose — a script must be able to tell a backlog from an unknown, because one means *run them* and the other means *stop*. When the migration files cannot be loaded, both commands print `Pending: unavailable — <reason>` beneath a complete executed listing rather than reporting `0`.
179
+ `2` is separate from `1` on purpose — a script must be able to tell a backlog from an unknown, because one means _run them_ and the other means _stop_. When the migration files cannot be loaded, both commands print `Pending: unavailable — <reason>` beneath a complete executed listing rather than reporting `0`.
180
180
 
181
181
  **If you are writing a command that reports on pending migrations:** register migrations first. `listPendingMigrations()` filters the runner's registry, so a caller that has not loaded anything gets `[]` — which reads as "nothing pending" and is not the same claim.
182
182
 
@@ -202,36 +202,41 @@ warlock generate (alias: g) — interactive picker
202
202
 
203
203
  `warlock add <features...>` installs framework-adjacent features through a curated registry — bundles npm dependencies + scaffold files + tsconfig patches + package.json scripts in one call. Featured names (from `add-command.action.ts`):
204
204
 
205
- | Feature | Installs |
206
- | ------------- | --------------------------------------------------------------------------------------------------- |
207
- | `react-email` | `react-email` + `@react-email/components` + `@react-email/render` + `@react-email/tailwind`; drops a `welcome-email.tsx` sample; patches `tsconfig.json` |
208
- | `web` | Warlock Web + React stack; scaffolds the application page, localization, contact endpoint, and Web configuration |
209
- | `react` | `react` + `react-dom` + types |
205
+ | Feature | Installs |
206
+ | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
207
+ | `react-email` | `react-email` + `@react-email/components` + `@react-email/render` + `@react-email/tailwind`; drops a `welcome-email.tsx` sample; patches `tsconfig.json` |
208
+ | `web` | Warlock Web + React stack; scaffolds the application page, localization, contact endpoint, and Web configuration |
209
+ | `react` | `react` + `react-dom` + types |
210
210
  | `bull-board` | `@bull-board/api` + `@bull-board/fastify`; writes a `dashboard` block to `src/config/queue.ts`. `requires: ["queue"]` — adds the `queue` feature first automatically when it's missing |
211
- | `image` | `sharp` (for the `Image` class) |
212
- | `mail` | `nodemailer` + types |
213
- | `ses` | `@aws-sdk/client-sesv2` |
214
- | `mongodb` | `mongodb` driver |
215
- | `postgres` | `pg` |
216
- | `mysql` | `mysql2` |
217
- | `redis` | `redis` |
218
- | `s3` | `@aws-sdk/client-s3` + `@aws-sdk/lib-storage` + `@aws-sdk/s3-request-presigner` |
219
- | `scheduler` | `@warlock.js/scheduler` |
220
- | `swagger` | `@warlock.js/swagger` |
221
- | `postman` | `@warlock.js/postman` |
222
- | `herald` | `@warlock.js/herald` + `amqplib` + types; ejects `src/config/communicator.ts` |
223
- | `test` | `vitest` + `@mongez/vite` + coverage; drops `test-global-setup.ts` / `test-setup.ts` / `vite.config.ts` |
211
+ | `image` | `sharp` (for the `Image` class) |
212
+ | `mail` | `nodemailer` + types |
213
+ | `ses` | `@aws-sdk/client-sesv2` |
214
+ | `mongodb` | `mongodb` driver |
215
+ | `postgres` | `pg` |
216
+ | `mysql` | `mysql2` |
217
+ | `redis` | `redis` |
218
+ | `s3` | `@aws-sdk/client-s3` + `@aws-sdk/lib-storage` + `@aws-sdk/s3-request-presigner` |
219
+ | `scheduler` | `@warlock.js/scheduler` |
220
+ | `swagger` | `@warlock.js/swagger` |
221
+ | `postman` | `@warlock.js/postman` |
222
+ | `herald` | `@warlock.js/herald` + `amqplib` + types; ejects `src/config/communicator.ts` |
223
+ | `test` | `vitest` + `@mongez/vite` + coverage; drops `test-global-setup.ts` / `test-setup.ts` / `vite.config.ts` |
224
+ | `devtools` | `@warlock.js/devtools` as a dev dependency; `warlock dev` auto-loads its development dashboard at `/__warlock` |
224
225
 
225
226
  Run `warlock add --list` to see what's currently registered. Pass `--packageManager <yarn\|pnpm\|npm>` to override auto-detection (defaults to whichever lockfile is present).
226
227
 
228
+ `warlock add devtools` never adds anything to `warlock.config.ts`. The package
229
+ is loaded automatically by `warlock dev` when installed, and is omitted from a
230
+ production install with dev dependencies excluded.
231
+
227
232
  The Web starter keeps the page's universal non-component setup in `src/web/index.register.ts`, while `src/web/index.page.tsx` re-exports `register`. Warlock still discovers and runs the hook from the page namespace in both SSR and the browser, but editing the page component remains inside React's Fast Refresh boundary. Do not move the `register()` declaration inline beside the component: React Refresh treats that non-component export as incompatible and reloads the page, losing component state.
228
233
 
229
234
  ### Misc
230
235
 
231
- | Command | Purpose |
232
- | -------- | ----------------------------------------------------------- |
233
- | `warlock storage.put <localPath> [destination]` | Upload a local file to the default storage disk |
234
- | `warlock jwt.generate` | Generate a JWT secret in `.env` (from `@warlock.js/auth`) |
236
+ | Command | Purpose |
237
+ | ----------------------------------------------- | --------------------------------------------------------- |
238
+ | `warlock storage.put <localPath> [destination]` | Upload a local file to the default storage disk |
239
+ | `warlock jwt.generate` | Generate a JWT secret in `.env` (from `@warlock.js/auth`) |
235
240
 
236
241
  ## Common patterns
237
242
 
@@ -293,7 +298,7 @@ export default command({
293
298
  });
294
299
  ```
295
300
 
296
- `preAction` runs *before* preloaders — cheap way to bail out without spinning up the database.
301
+ `preAction` runs _before_ preloaders — cheap way to bail out without spinning up the database.
297
302
 
298
303
  ## Gotchas
299
304
 
@@ -301,7 +306,7 @@ export default command({
301
306
  - **Don't put logic at module top level.** The file gets imported during the commands scan (`warlock --warm-cache`). Anything outside `action` runs at scan time, possibly before any config or env is loaded.
302
307
  - **Required options block execution.** If `required: true` and the user omits the flag, the framework prints `Missing required options:` and exits `1` before `action` runs.
303
308
  - **Connectors are not free.** `connectors: true` boots the database, cache, storage, etc. For a print-version-and-exit command, leave `preload` undefined.
304
- - **`name` field with positional slots** (`name: "storage.put <localPath>"`) — the *registered* name is still `storage.put` (the first whitespace-separated token), so look up + alias work normally. Slots are only documentation/help-output.
309
+ - **`name` field with positional slots** (`name: "storage.put <localPath>"`) — the _registered_ name is still `storage.put` (the first whitespace-separated token), so look up + alias work normally. Slots are only documentation/help-output.
305
310
  - **Aliases must be unique across plugin + framework + project.** The first registration wins; later collisions silently overwrite the map entry.
306
311
 
307
312
  ## See also