@valbuild/next 0.119.0 → 0.120.2

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,103 @@
1
1
  # @valbuild/next
2
2
 
3
+ ## 0.120.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#593](https://github.com/valbuild/val/pull/593) [`095ee0d`](https://github.com/valbuild/val/commit/095ee0dd011b069c30bc99ae58356e28796e106b) Thanks [@freekh](https://github.com/freekh)! - Publish the packages that 0.120.1 did not reach.
8
+
9
+ `@valbuild/server@0.120.1` made it to npm, but `@valbuild/cli`,
10
+ `@valbuild/language-server` and `@valbuild/next` did not — the release job
11
+ failed part-way through, and the version numbers it had already claimed could
12
+ not be reused. This release carries the same contents for those three packages:
13
+ they pick up the MCP signing-key rotation fix from `@valbuild/server@0.120.1`,
14
+ and there is nothing else in it.
15
+
16
+ If you are on 0.120.0, upgrade straight to this version. There is no 0.120.1 of
17
+ these three packages, and there will not be one.
18
+
19
+ - Updated dependencies [[`095ee0d`](https://github.com/valbuild/val/commit/095ee0dd011b069c30bc99ae58356e28796e106b)]:
20
+ - @valbuild/language-server@0.120.2
21
+
22
+ ## 0.120.1
23
+
24
+ ### Patch Changes
25
+
26
+ - [#590](https://github.com/valbuild/val/pull/590) [`6f318d4`](https://github.com/valbuild/val/commit/6f318d406295b772e721bf463283f47e2822e996) Thanks [@freekh](https://github.com/freekh)! - MCP: survive a signing-key rotation, and say what a refused local token means.
27
+
28
+ `@valbuild/next` caches the authorization server's JWKS for five minutes. Until
29
+ now a token signed with a key that arrived inside that window was refused
30
+ outright, so every warm instance rejected valid tokens until the cache expired —
31
+ a rotation on the issuer's side showed up as an outage on yours.
32
+
33
+ A token naming a key the cache does not hold now provokes one refetch of the key
34
+ set, at most once per issuer every 30 seconds. The rate limit matters because the
35
+ key id comes from the token: without it, unknown key ids would be a way to make
36
+ your app call its issuer once per request. It limits how often a fetch is
37
+ _started_, so requests that arrive while one is already running join it — which
38
+ is the normal shape of a rotation, where many requests meet the new key at once.
39
+
40
+ Separately, an MCP call that presents an access token to a project running in
41
+ local filesystem mode is still refused — there is nothing to authenticate against
42
+ — but the message now names the cause, which is that the project has an `oauth`
43
+ issuer configured (often `VAL_OAUTH_ISSUER` in a local `.env`) and should not
44
+ have one for local development.
45
+
46
+ - Updated dependencies [[`6f318d4`](https://github.com/valbuild/val/commit/6f318d406295b772e721bf463283f47e2822e996)]:
47
+ - @valbuild/server@0.120.1
48
+ - @valbuild/language-server@0.120.1
49
+
50
+ ## 0.120.0
51
+
52
+ ### Minor Changes
53
+
54
+ - [#589](https://github.com/valbuild/val/pull/589) [`c2d3c0e`](https://github.com/valbuild/val/commit/c2d3c0e6c2010c0a94c725d9dbaa618998773e8a) Thanks [@freekh](https://github.com/freekh)! - **Breaking:** `s.richtext()` options are flat.
55
+
56
+ The `style`, `block` and `inline` groups are gone — every option is a key of its
57
+ own. The names are unchanged, so updating a schema is only a matter of removing
58
+ the wrappers:
59
+
60
+ ```ts
61
+ // before
62
+ s.richtext({
63
+ style: { bold: true, italic: true },
64
+ block: { h1: true, ul: true },
65
+ inline: { a: true, img: s.image() },
66
+ });
67
+
68
+ // after
69
+ s.richtext({
70
+ bold: true,
71
+ italic: true,
72
+ h1: true,
73
+ ul: true,
74
+ a: true,
75
+ img: s.image(),
76
+ });
77
+ ```
78
+
79
+ The groups never carried any meaning the option names did not already have, and
80
+ they cost something real: an option name and its `ValRichText` theme key were
81
+ spelled differently (`block.h1` vs `theme.h1`), so the type that keeps a theme
82
+ exhaustive had to restate all thirteen options by hand. It is now a mapped type
83
+ over the options themselves — which also fixes an inconsistency in it: enabling
84
+ links with a schema (`a: s.route()`) rather than `a: true` now requires an `a`
85
+ key in the theme, the way `img` always has.
86
+
87
+ `ValRichText` themes were already flat and are unchanged. The serialized schema
88
+ that the server sends the Studio is flat too, so a project must not mix
89
+ `@valbuild/*` versions across this release.
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies [[`c2d3c0e`](https://github.com/valbuild/val/commit/c2d3c0e6c2010c0a94c725d9dbaa618998773e8a)]:
94
+ - @valbuild/core@0.120.0
95
+ - @valbuild/react@0.120.0
96
+ - @valbuild/shared@0.120.0
97
+ - @valbuild/ui@0.120.0
98
+ - @valbuild/language-server@0.120.0
99
+ - @valbuild/server@0.120.0
100
+
3
101
  ## 0.119.0
4
102
 
5
103
  ### Patch Changes
package/README.md CHANGED
@@ -662,27 +662,21 @@ import { s, c } from "./val.config";
662
662
 
663
663
  export const schema = s.richtext({
664
664
  // styling
665
- style: {
666
- bold: true, // enables bold
667
- italic: true, // enables italic text
668
- lineThrough: true, // enables line/strike-through
669
- },
665
+ bold: true, // enables bold
666
+ italic: true, // enables italic text
667
+ lineThrough: true, // enables line/strike-through
670
668
  // tags:
671
- block: {
672
- //ul: true, // enables unordered lists
673
- //ol: true, // enables ordered lists
674
- // headings:
675
- h1: true,
676
- h2: true,
677
- // h3: true,
678
- // h4: true,
679
- // h5: true,
680
- // h6: true
681
- },
682
- inline: {
683
- //a: true, // enables links
684
- //img: true, // enables images
685
- },
669
+ //ul: true, // enables unordered lists
670
+ //ol: true, // enables ordered lists
671
+ // headings:
672
+ h1: true,
673
+ h2: true,
674
+ // h3: true,
675
+ // h4: true,
676
+ // h5: true,
677
+ // h6: true,
678
+ //a: true, // enables links
679
+ //img: true, // enables images
686
680
  });
687
681
 
688
682
  export default c.define("/src/app/content", schema, [
@@ -713,9 +707,7 @@ export default function Page() {
713
707
  <main>
714
708
  <ValRichText
715
709
  theme={{
716
- style: {
717
- bold: "font-bold", // <- maps bold to a class. NOTE: tailwind classes are supported
718
- },
710
+ bold: "font-bold", // <- maps bold to a class. NOTE: tailwind classes are supported
719
711
  //
720
712
  }}
721
713
  content={content}
@@ -739,7 +731,7 @@ To add classes to `ValRichText` you can use the theme property:
739
731
  />
740
732
  ```
741
733
 
742
- **NOTE**: if a theme is defined, you must define a mapping for every tag that the you get. What tags you have is decided based on the `options` defined on the `s.richtext()` schema. For example: `s.richtext({ style: { bold: true } })` requires that you add a `bold` theme.
734
+ **NOTE**: if a theme is defined, you must define a mapping for every tag you can get. What tags you have is decided based on the `options` defined on the `s.richtext()` schema. For example: `s.richtext({ bold: true })` requires that you add a `bold` theme.
743
735
 
744
736
  ```tsx
745
737
  <ValRichText
@@ -31,6 +31,10 @@ import { type ValToolAuth } from "@valbuild/server";
31
31
  * - **Nothing is read from the payload before the signature verifies.** Claims
32
32
  * from an unverified token are attacker input.
33
33
  * - **Keys come only from the configured issuer's JWKS**, never from the token.
34
+ * The key set is cached, but a token naming a `kid` the cache does not hold
35
+ * provokes one rate-limited refetch rather than a refusal — see
36
+ * {@link UNKNOWN_KID_REFETCH_INTERVAL_MS}. Without that, this server's own
37
+ * cache turns any key rotation into an outage lasting the rest of the TTL.
34
38
  * - **ECDSA JWS signatures are raw `r||s`** (RFC 7518), not DER, which is what
35
39
  * `dsaEncoding: "ieee-p1363"` below is for. Omit it and every valid signature
36
40
  * is rejected — or worse, a future change makes it accept the wrong thing.
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "next",
13
13
  "react"
14
14
  ],
15
- "version": "0.119.0",
15
+ "version": "0.120.2",
16
16
  "main": "dist/valbuild-next.cjs.js",
17
17
  "module": "dist/valbuild-next.esm.js",
18
18
  "exports": {
@@ -47,12 +47,12 @@
47
47
  "dependencies": {
48
48
  "client-only": "^0.0.1",
49
49
  "server-only": "^0.0.1",
50
- "@valbuild/core": "0.117.0",
51
- "@valbuild/react": "0.119.0",
52
- "@valbuild/server": "0.119.0",
53
- "@valbuild/ui": "0.119.0",
54
- "@valbuild/shared": "0.118.0",
55
- "@valbuild/language-server": "0.119.0"
50
+ "@valbuild/language-server": "0.120.2",
51
+ "@valbuild/core": "0.120.0",
52
+ "@valbuild/react": "0.120.0",
53
+ "@valbuild/server": "0.120.1",
54
+ "@valbuild/shared": "0.120.0",
55
+ "@valbuild/ui": "0.120.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@testing-library/react": "^16.3.3",