vertz 0.2.75 → 0.2.78

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,101 @@
1
1
  # vertz
2
2
 
3
+ ## 0.2.78
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @vertz/cli@0.2.78
9
+ - @vertz/cloudflare@0.2.78
10
+ - @vertz/db@0.2.78
11
+ - @vertz/errors@0.2.78
12
+ - @vertz/fetch@0.2.78
13
+ - @vertz/schema@0.2.78
14
+ - @vertz/server@0.2.78
15
+ - @vertz/testing@0.2.78
16
+ - @vertz/tui@0.2.78
17
+ - @vertz/ui@0.2.78
18
+ - @vertz/ui-primitives@0.2.78
19
+ - @vertz/ui-server@0.2.78
20
+ - @vertz/ui-auth@0.2.20
21
+
22
+ ## 0.2.77
23
+
24
+ ### Patch Changes
25
+
26
+ - [#2895](https://github.com/vertz-dev/vertz/pull/2895) [`368e138`](https://github.com/vertz-dev/vertz/commit/368e1382421dbbb78e02a6766143a38bce696d76) Thanks [@viniciusdacal](https://github.com/viniciusdacal)! - fix(vertz): auto-load `import.meta.hot` types when importing from any client-runtime subpath
27
+
28
+ Closes [#2893](https://github.com/vertz-dev/vertz/issues/2893).
29
+
30
+ The `vertz/client` type augmentation existed but required users to manually add `"types": ["vertz/client"]` to their tsconfig — a step easy to miss, leading to the TS2339 "Property 'hot' does not exist on type 'ImportMeta'" error reported in #2777 and then again in #2893.
31
+
32
+ The client-runtime subpath declarations (`dist/ui.d.ts`, `dist/ui-components.d.ts`, `dist/ui-primitives.d.ts`, `dist/ui-auth.d.ts`) now start with `/// <reference types="vertz/client" />`, injected by a post-`tsc` step (`scripts/inject-client-reference.mjs`). Any file that imports from one of those subpaths — which includes every `create-vertz-app` scaffold's `entry-client.ts` — pulls in the `ImportMeta.hot` augmentation automatically, so `import.meta.hot?.accept()` typechecks with no tsconfig changes. Declaration sourcemaps are shifted by one line to stay accurate.
33
+
34
+ The `"types": ["vertz/client"]` opt-in still works for cases where a file uses `import.meta.hot` without touching any of those subpaths.
35
+
36
+ - [#2917](https://github.com/vertz-dev/vertz/pull/2917) [`abffcd7`](https://github.com/vertz-dev/vertz/commit/abffcd7af0ec4e7ca134b9bee371c7d2d32858ff) Thanks [@viniciusdacal](https://github.com/viniciusdacal)! - feat(vertz): add `invalidate`, `decline`, `on`, `off` to `import.meta.hot`
37
+
38
+ Closes [#2812](https://github.com/vertz-dev/vertz/issues/2812).
39
+
40
+ The `vtz` compiler previously stripped `import.meta.hot` references entirely at build time, so calls to `accept()` / `dispose()` were no-ops under `vtz dev`. The compiler now rewrites `import.meta.hot` to a runtime lookup (`globalThis.__vtz_hot?.(import.meta.url)`) that resolves to a real per-module hot context exposed by the HMR client.
41
+
42
+ New methods on `ImportMetaHot`:
43
+
44
+ - `invalidate(message?)` — trigger a full page reload with an optional reason.
45
+ - `decline()` — opt out of HMR for the current module; the next update targeting it falls back to a full reload.
46
+ - `on(event, cb)` / `off(event, cb)` — subscribe to runtime events: `vertz:beforeUpdate`, `vertz:afterUpdate`, `vertz:beforeFullReload`, `vertz:invalidate`, `vertz:error`.
47
+
48
+ `send()` (custom client → server events) and `prune()` (cleanup on module removal) are tracked as a follow-up — they require bidirectional WebSocket support and module-removal tracking.
49
+
50
+ - [#2926](https://github.com/vertz-dev/vertz/pull/2926) [`4d9b23d`](https://github.com/vertz-dev/vertz/commit/4d9b23d1cac81ab88388f044d5988b2d0704f363) Thanks [@viniciusdacal](https://github.com/viniciusdacal)! - feat(ui): add `@vertz/ui/client` subpath for UI-only consumers of `import.meta.hot` types [#2813]
51
+
52
+ Apps that install `@vertz/ui` directly — component-library authors, or frontends that don't use the server/db layers — can now type `import.meta.hot` without pulling in the `vertz` meta-package:
53
+
54
+ ```jsonc
55
+ // tsconfig.json
56
+ {
57
+ "compilerOptions": {
58
+ "types": ["@vertz/ui/client"]
59
+ }
60
+ }
61
+ ```
62
+
63
+ The canonical augmentation now lives in `@vertz/ui/client.d.ts`. `vertz/client` continues to work and resolves to the same shape — it re-exports `@vertz/ui/client` via a triple-slash reference, so the two subpaths cannot drift.
64
+
65
+ - Updated dependencies [[`81ffffe`](https://github.com/vertz-dev/vertz/commit/81ffffe18b499a18f8b83b5a78079baf40d7cc88), [`13c2ee6`](https://github.com/vertz-dev/vertz/commit/13c2ee6d7804e988e2b361af5c7e9a9c97e091ab), [`6a1adab`](https://github.com/vertz-dev/vertz/commit/6a1adab795218a347c96e831d0628457dd72b796), [`8f5b18b`](https://github.com/vertz-dev/vertz/commit/8f5b18b5d726148bc4613f28d2c752d6e5998f13), [`b7500f9`](https://github.com/vertz-dev/vertz/commit/b7500f9489d7bb65260ec7fff5f95b3fd4d95925), [`846b303`](https://github.com/vertz-dev/vertz/commit/846b303ef2a887208a397b9137cd32675a7dff4e), [`a81fd4f`](https://github.com/vertz-dev/vertz/commit/a81fd4fbd6b540ded6da83abf2d5afe35f7b242a), [`40c8a70`](https://github.com/vertz-dev/vertz/commit/40c8a70693665bf5c0a47bf957923ff57abbc41c), [`cc62c89`](https://github.com/vertz-dev/vertz/commit/cc62c89b5b126bb22a11fe1c1c89088857b3dca2), [`9819901`](https://github.com/vertz-dev/vertz/commit/9819901b97226bbdffb090a7261ee2e3828d163c), [`4d9b23d`](https://github.com/vertz-dev/vertz/commit/4d9b23d1cac81ab88388f044d5988b2d0704f363)]:
66
+ - @vertz/db@0.2.77
67
+ - @vertz/ui@0.2.77
68
+ - @vertz/ui-server@0.2.77
69
+ - @vertz/schema@0.2.77
70
+ - @vertz/server@0.2.77
71
+ - @vertz/cli@0.2.77
72
+ - @vertz/cloudflare@0.2.77
73
+ - @vertz/errors@0.2.77
74
+ - @vertz/fetch@0.2.77
75
+ - @vertz/testing@0.2.77
76
+ - @vertz/tui@0.2.77
77
+ - @vertz/ui-primitives@0.2.77
78
+ - @vertz/ui-auth@0.2.20
79
+
80
+ ## 0.2.76
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies [[`cf25bbb`](https://github.com/vertz-dev/vertz/commit/cf25bbb270186e25ca34a11f29d361e7113412bc), [`8a9546d`](https://github.com/vertz-dev/vertz/commit/8a9546d4725f5aa1572ab0dbf96e20abb6063413)]:
85
+ - @vertz/db@0.2.76
86
+ - @vertz/ui-primitives@0.2.76
87
+ - @vertz/cli@0.2.76
88
+ - @vertz/cloudflare@0.2.76
89
+ - @vertz/errors@0.2.76
90
+ - @vertz/fetch@0.2.76
91
+ - @vertz/schema@0.2.76
92
+ - @vertz/server@0.2.76
93
+ - @vertz/testing@0.2.76
94
+ - @vertz/tui@0.2.76
95
+ - @vertz/ui@0.2.76
96
+ - @vertz/ui-server@0.2.76
97
+ - @vertz/ui-auth@0.2.20
98
+
3
99
  ## 0.2.75
4
100
 
5
101
  ### Patch Changes
package/client.d.ts CHANGED
@@ -1,6 +1,12 @@
1
1
  /**
2
2
  * Vertz client-side runtime type augmentations.
3
3
  *
4
+ * The canonical augmentation lives in `@vertz/ui/client` so that apps which
5
+ * install `@vertz/ui` directly (without the meta-package) can opt into the
6
+ * same `ImportMeta.hot` types. This file re-exports it so `vertz/client`
7
+ * stays a valid tsconfig entry — both subpaths resolve to the same shape
8
+ * and cannot drift.
9
+ *
4
10
  * Include in your tsconfig.json:
5
11
  * "types": ["vertz/client"]
6
12
  *
@@ -8,24 +14,6 @@
8
14
  * /// <reference types="vertz/client" />
9
15
  */
10
16
 
11
- declare global {
12
- interface ImportMetaHot {
13
- /** Accept the current module's HMR update. */
14
- accept(): void;
15
- /** Accept the current module's HMR update with a callback receiving the new module. */
16
- accept(cb: (newModule: unknown) => void): void;
17
- /** Accept updates for specific dependencies. */
18
- accept(deps: string | readonly string[], cb?: (modules: unknown[]) => void): void;
19
- /** Dispose callback — runs before module is replaced. */
20
- dispose(cb: (data: Record<string, unknown>) => void): void;
21
- /** Persistent data across HMR updates. */
22
- data: Record<string, unknown>;
23
- }
24
-
25
- interface ImportMeta {
26
- /** Hot Module Replacement API. Only available in dev mode; undefined in production and SSR. */
27
- readonly hot: ImportMetaHot | undefined;
28
- }
29
- }
17
+ /// <reference types="@vertz/ui/client" />
30
18
 
31
19
  export {};
package/dist/ui-auth.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ /// <reference types="vertz/client" />
1
2
  export * from '@vertz/ui-auth';
2
3
  //# sourceMappingURL=ui-auth.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui-auth.d.ts","sourceRoot":"","sources":["../src/ui-auth.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ui-auth.d.ts","sourceRoot":"","sources":["../src/ui-auth.ts"],"names":[],"mappings":";AAAA,cAAc,gBAAgB,CAAC"}
@@ -1,2 +1,3 @@
1
+ /// <reference types="vertz/client" />
1
2
  export * from '@vertz/ui/components';
2
3
  //# sourceMappingURL=ui-components.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui-components.d.ts","sourceRoot":"","sources":["../src/ui-components.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"ui-components.d.ts","sourceRoot":"","sources":["../src/ui-components.ts"],"names":[],"mappings":";AAAA,cAAc,sBAAsB,CAAC"}
@@ -1,2 +1,3 @@
1
+ /// <reference types="vertz/client" />
1
2
  export * from '@vertz/ui-primitives';
2
3
  //# sourceMappingURL=ui-primitives.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui-primitives.d.ts","sourceRoot":"","sources":["../src/ui-primitives.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"ui-primitives.d.ts","sourceRoot":"","sources":["../src/ui-primitives.ts"],"names":[],"mappings":";AAAA,cAAc,sBAAsB,CAAC"}
package/dist/ui.d.ts CHANGED
@@ -1,2 +1,3 @@
1
+ /// <reference types="vertz/client" />
1
2
  export * from '@vertz/ui';
2
3
  //# sourceMappingURL=ui.d.ts.map
package/dist/ui.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":";AAAA,cAAc,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vertz",
3
- "version": "0.2.75",
3
+ "version": "0.2.78",
4
4
  "description": "Full-stack TypeScript framework — database ORM, API server, compiled UI, and custom runtime. One schema drives every layer.",
5
5
  "keywords": [
6
6
  "ai",
@@ -104,26 +104,26 @@
104
104
  "provenance": true
105
105
  },
106
106
  "scripts": {
107
- "build": "tsc",
107
+ "build": "tsc && node scripts/inject-client-reference.mjs",
108
108
  "typecheck": "tsgo --noEmit -p tsconfig.typecheck.json",
109
109
  "test": "vtz test"
110
110
  },
111
111
  "dependencies": {
112
- "@vertz/cli": "^0.2.75",
113
- "@vertz/cloudflare": "^0.2.75",
114
- "@vertz/db": "^0.2.75",
115
- "@vertz/errors": "^0.2.75",
116
- "@vertz/fetch": "^0.2.75",
117
- "@vertz/schema": "^0.2.75",
118
- "@vertz/server": "^0.2.75",
119
- "@vertz/testing": "^0.2.75",
120
- "@vertz/tui": "^0.2.75",
121
- "@vertz/ui": "^0.2.75",
112
+ "@vertz/cli": "^0.2.78",
113
+ "@vertz/cloudflare": "^0.2.78",
114
+ "@vertz/db": "^0.2.78",
115
+ "@vertz/errors": "^0.2.78",
116
+ "@vertz/fetch": "^0.2.78",
117
+ "@vertz/schema": "^0.2.78",
118
+ "@vertz/server": "^0.2.78",
119
+ "@vertz/testing": "^0.2.78",
120
+ "@vertz/tui": "^0.2.78",
121
+ "@vertz/ui": "^0.2.78",
122
122
  "@vertz/ui-auth": "^0.2.20",
123
- "@vertz/ui-primitives": "^0.2.75",
124
- "@vertz/ui-server": "^0.2.75"
123
+ "@vertz/ui-primitives": "^0.2.78",
124
+ "@vertz/ui-server": "^0.2.78"
125
125
  },
126
126
  "devDependencies": {
127
- "@vertz/test": "0.2.75"
127
+ "@vertz/test": "0.2.78"
128
128
  }
129
129
  }