@warlock.js/core 4.2.9 → 4.2.11

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 (2) hide show
  1. package/CHANGELOG.md +16 -5
  2. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -6,12 +6,23 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
- - `lowerStage3Decorators()` — shared Vite/Vitest plugin that lowers TC39 Stage-3 decorators with esbuild before oxc / the SSR rewrite mangles them. Drop it first in a config's `plugins` so model-decorated files load under Vitest 4 / Vite 8.
9
+ ## 4.2.11
10
+
11
+ ### Added
12
+
13
+ - `lowerStage3Decorators()` — Vite/Vitest plugin that lowers TC39 Stage-3 decorators with esbuild before oxc / the SSR rewrite mangles them; drop it first in a config's `plugins` so model-decorated files load under Vitest 4 / Vite 8.
14
+ - `warlock add notifications` — installs `@warlock.js/notifications` (+ the `mail` feature), ejects `config/notifications.ts`, and scaffolds the app-owned `Notification` model + migration into `src/app/notifications/` (idempotent; async queue opt-in).
15
+ - Notifications connector — built-in connector (priority `8`, early phase) reads `config/notifications.ts` at boot and passes it to `setNotificationConfig`; lazy-imports `@warlock.js/notifications` (config-gated), so core keeps no hard dependency on it.
16
+
17
+ ### Changed
18
+
10
19
  - `warlock add test` now scaffolds a `vite.config.ts` that includes `lowerStage3Decorators()`, so a fresh project can test decorated models out of the box.
11
- - `warlock add test` `test`/`test:coverage` scripts now run one-shot (`vitest run`) instead of watch mode — safe for CI by default.
12
- - `startHttpTestServer` now starts early-phase connectors (database, cache, logger, …) **before** loading app modules, then late-phase connectors (http, socket) after — mirroring the dev/prod boot order. Fixes a `MissingDataSourceError` when a module's `main.ts` boot side-effect queries the DB at import time under the Vitest integration harness.
13
- - `warlock add notifications` — new feature in the `add` command: installs `@warlock.js/notifications` (and pulls the `mail` feature for the default mail channel), ejects `config/notifications.ts` (mail + in-app channels wired), and scaffolds the app-owned `Notification` model + a timestamped migration into `src/app/notifications/`. Re-running is idempotent (the model file is the sentinel — no duplicate migration). The async queue stays opt-in (commented in the config; enable with `warlock add herald` + `heraldQueue()`).
14
- - **Notifications connector** — a built-in connector (priority `8`, early phase) reads `config/notifications.ts` at boot and hands its default export to `setNotificationConfig`. `@warlock.js/notifications` is lazy-imported (gated on the config's presence), so core keeps no hard dependency on it — the same pattern as the herald connector. Config files stay declarative (`export default config`); the side-effect moves out of the config file.
20
+ - `warlock add test` `test` / `test:coverage` scripts now run one-shot (`vitest run`) instead of watch mode — CI-safe by default.
21
+ - Bumped `@mongez/reinforcements` to 3.3.0
22
+
23
+ ### Fixed
24
+
25
+ - `startHttpTestServer` now starts early-phase connectors (database, cache, logger, …) before loading app modules, then late-phase (http, socket) after — mirroring dev/prod boot order; fixes a `MissingDataSourceError` when a module's boot side-effect queries the DB at import under the Vitest integration harness.
15
26
 
16
27
  ## 4.2.5
17
28
 
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "https://github.com/warlockjs/core"
19
+ "url": "https://github.com/warlockjs/framework"
20
20
  },
21
21
  "dependencies": {
22
22
  "@fastify/cookie": "^10.0.0",
@@ -30,19 +30,19 @@
30
30
  "@mongez/copper": "^2.1.2",
31
31
  "@mongez/dotenv": "^1.2.4",
32
32
  "@mongez/events": "^2.2.6",
33
- "@mongez/http": "^3.3.7",
33
+ "@mongez/http": "^3.3.8",
34
34
  "@mongez/localization": "^3.4.6",
35
- "@mongez/reinforcements": "^3.2.0",
35
+ "@mongez/reinforcements": "^3.3.0",
36
36
  "@mongez/slug": "^1.0.7",
37
37
  "@mongez/supportive-is": "^2.1.3",
38
38
  "@mongez/time-wizard": "^1.0.6",
39
- "@warlock.js/auth": "4.2.9",
40
- "@warlock.js/cache": "4.2.9",
41
- "@warlock.js/cascade": "4.2.9",
42
- "@warlock.js/context": "4.2.9",
43
- "@warlock.js/logger": "4.2.9",
44
- "@warlock.js/seal": "4.2.9",
45
- "@warlock.js/fs": "4.2.9",
39
+ "@warlock.js/auth": "4.2.11",
40
+ "@warlock.js/cache": "4.2.11",
41
+ "@warlock.js/cascade": "4.2.11",
42
+ "@warlock.js/context": "4.2.11",
43
+ "@warlock.js/logger": "4.2.11",
44
+ "@warlock.js/seal": "4.2.11",
45
+ "@warlock.js/fs": "4.2.11",
46
46
  "chokidar": "^5.0.0",
47
47
  "dayjs": "^1.11.19",
48
48
  "es-module-lexer": "^2.0.0",
@@ -68,12 +68,12 @@
68
68
  "react": "^19.2.3",
69
69
  "react-dom": "^19.2.3",
70
70
  "@react-email/render": "^2.0.5",
71
- "@warlock.js/herald": "4.2.9"
71
+ "@warlock.js/herald": "4.2.11"
72
72
  },
73
73
  "bin": {
74
74
  "warlock": "bin/warlock.js"
75
75
  },
76
- "version": "4.2.9",
76
+ "version": "4.2.11",
77
77
  "type": "module",
78
78
  "main": "./esm/index.mjs",
79
79
  "module": "./esm/index.mjs",