@valbuild/next 0.116.0 → 0.117.1

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 ADDED
@@ -0,0 +1,81 @@
1
+ # @valbuild/next
2
+
3
+ ## 0.117.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`0ae7bac`](https://github.com/valbuild/val/commit/0ae7bac8a186460bc2b31f2ded89b00027bafb55)]:
8
+ - @valbuild/ui@0.117.1
9
+ - @valbuild/react@0.117.1
10
+ - @valbuild/server@0.117.1
11
+ - @valbuild/language-server@0.117.1
12
+
13
+ ## 0.117.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [#582](https://github.com/valbuild/val/pull/582) [`fca3efa`](https://github.com/valbuild/val/commit/fca3efa389e2817401f55ea3dd184af7c611b807) Thanks [@freekh](https://github.com/freekh)! - Accept OAuth access tokens on the MCP endpoint, so editors can authorize as themselves
18
+
19
+ `initValMcp` takes an optional `oauth` config. Give it the authorization server's
20
+ URL and this endpoint's own URL, and every MCP call must then present an access
21
+ token that Val's authorization server issued:
22
+
23
+ ```ts
24
+ const { valMcpAuthorize, valMcpTools, valMcpMetadata } = initValMcp(
25
+ valModules,
26
+ config,
27
+ {
28
+ oauth: {
29
+ issuer: "https://admin.val.build",
30
+ resource: "https://your-app.com/api/mcp",
31
+ },
32
+ },
33
+ );
34
+ ```
35
+
36
+ The token is verified in your app — signature against the issuer's published
37
+ keys, plus issuer, audience and expiry — so the caller's identity is checked
38
+ rather than claimed. **Patches created over MCP now carry that profile as their
39
+ author**, which is what makes an edit made from a phone show up in the review
40
+ screen as somebody's rather than nobody's. Scopes are enforced too: a token
41
+ without `val:write` cannot reach a tool that writes.
42
+
43
+ Mount the discovery document so clients can find where to authorize:
44
+
45
+ ```ts
46
+ // app/.well-known/oauth-protected-resource/route.ts
47
+ import { valMcpMetadata } from "../../../val/mcp";
48
+ export const { GET, OPTIONS } = valMcpMetadata!;
49
+ ```
50
+
51
+ `valMcpMetadata` is `null` when no `oauth` config is given.
52
+
53
+ **Nothing changes if you leave `oauth` out.** Local development still works with
54
+ no authorization server, and an app already using a personal access token keeps
55
+ working as before.
56
+
57
+ One breaking change if you built your own host on `createValTools`:
58
+ `ValToolContext.auth` is now a tagged union, so `{ pat }` becomes
59
+ `{ type: "pat", pat }`. The new variant is
60
+ `{ type: "verified-profile", profileId, scopes }`, for a host that verified a
61
+ token itself.
62
+
63
+ ### Patch Changes
64
+
65
+ - [#579](https://github.com/valbuild/val/pull/579) [`b2812ae`](https://github.com/valbuild/val/commit/b2812ae4ee03e005ecead3365f49c625e536f94d) Thanks [@freekh](https://github.com/freekh)! - Every release now ships a changelog. Each package's `CHANGELOG.md` records what
66
+ changed under the version that shipped it — with a link to the pull request, the
67
+ commit and the author — and the same entry becomes the body of the GitHub
68
+ Release for the tag. The file is included in the npm tarball, so it is also
69
+ readable from an installed copy.
70
+
71
+ Up to now those changelogs were generated empty, and the GitHub Releases with
72
+ them, so there was no record of what any given version contained. Releases from
73
+ this one on have one; earlier versions stay blank.
74
+
75
+ - Updated dependencies [[`fca3efa`](https://github.com/valbuild/val/commit/fca3efa389e2817401f55ea3dd184af7c611b807), [`d94a40f`](https://github.com/valbuild/val/commit/d94a40f8bd11027636d183e293aced820b6f341f), [`b2812ae`](https://github.com/valbuild/val/commit/b2812ae4ee03e005ecead3365f49c625e536f94d)]:
76
+ - @valbuild/server@0.117.0
77
+ - @valbuild/language-server@0.117.0
78
+ - @valbuild/core@0.117.0
79
+ - @valbuild/react@0.117.0
80
+ - @valbuild/shared@0.117.0
81
+ - @valbuild/ui@0.117.0
@@ -3,11 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('client-only');
6
- var routeFromVal = require('../../dist/routeFromVal-b48a454a.cjs.dev.js');
6
+ var _typeof = require('../../dist/typeof-b568f48f.cjs.dev.js');
7
7
  var core = require('@valbuild/core');
8
8
  var stega = require('@valbuild/react/stega');
9
9
  var React = require('react');
10
10
  var ValOverlayContext = require('../../dist/ValOverlayContext-5bd7628b.cjs.dev.js');
11
+ var routeFromVal = require('../../dist/routeFromVal-7df20dfe.cjs.dev.js');
11
12
  require('../../dist/createForOfIteratorHelper-0445603c.cjs.dev.js');
12
13
  require('../../dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
13
14
  require('../../dist/objectSpread2-58024783.cjs.dev.js');
@@ -118,7 +119,7 @@ function useDraftModuleSource(moduleFilePath) {
118
119
  * bundled content is used only when there is no draft view.
119
120
  */
120
121
  function draftJsonEntry(draftSource, key) {
121
- if (draftSource === undefined || draftSource === null || routeFromVal._typeof(draftSource) !== "object" || Array.isArray(draftSource)) {
122
+ if (draftSource === undefined || draftSource === null || _typeof._typeof(draftSource) !== "object" || Array.isArray(draftSource)) {
122
123
  return {
123
124
  status: "unavailable"
124
125
  };
@@ -190,7 +191,7 @@ function useValKeyStega(selector, key) {
190
191
  function readCommittedJsonEntry(selector, key) {
191
192
  var _Internal$getValPath;
192
193
  var source = selector && core.Internal.getSource(selector);
193
- var marker = source && routeFromVal._typeof(source) === "object" ? source[key] : undefined;
194
+ var marker = source && _typeof._typeof(source) === "object" ? source[key] : undefined;
194
195
  if (!core.Internal.isJson(marker)) {
195
196
  return undefined;
196
197
  }
@@ -3,11 +3,12 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('client-only');
6
- var routeFromVal = require('../../dist/routeFromVal-8ac2f984.cjs.prod.js');
6
+ var _typeof = require('../../dist/typeof-16428c61.cjs.prod.js');
7
7
  var core = require('@valbuild/core');
8
8
  var stega = require('@valbuild/react/stega');
9
9
  var React = require('react');
10
10
  var ValOverlayContext = require('../../dist/ValOverlayContext-d690744f.cjs.prod.js');
11
+ var routeFromVal = require('../../dist/routeFromVal-8032f5f7.cjs.prod.js');
11
12
  require('../../dist/createForOfIteratorHelper-d4afcad8.cjs.prod.js');
12
13
  require('../../dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js');
13
14
  require('../../dist/objectSpread2-13f847a9.cjs.prod.js');
@@ -118,7 +119,7 @@ function useDraftModuleSource(moduleFilePath) {
118
119
  * bundled content is used only when there is no draft view.
119
120
  */
120
121
  function draftJsonEntry(draftSource, key) {
121
- if (draftSource === undefined || draftSource === null || routeFromVal._typeof(draftSource) !== "object" || Array.isArray(draftSource)) {
122
+ if (draftSource === undefined || draftSource === null || _typeof._typeof(draftSource) !== "object" || Array.isArray(draftSource)) {
122
123
  return {
123
124
  status: "unavailable"
124
125
  };
@@ -190,7 +191,7 @@ function useValKeyStega(selector, key) {
190
191
  function readCommittedJsonEntry(selector, key) {
191
192
  var _Internal$getValPath;
192
193
  var source = selector && core.Internal.getSource(selector);
193
- var marker = source && routeFromVal._typeof(source) === "object" ? source[key] : undefined;
194
+ var marker = source && _typeof._typeof(source) === "object" ? source[key] : undefined;
194
195
  if (!core.Internal.isJson(marker)) {
195
196
  return undefined;
196
197
  }
@@ -1,9 +1,10 @@
1
1
  import 'client-only';
2
- import { g as getJsonEntryStegaRoot, _ as _typeof, a as isJsonValuesRecordSchema, b as getValRouteUrlFromVal, i as initValRouteFromVal } from '../../dist/routeFromVal-263eec96.esm.js';
2
+ import { _ as _typeof } from '../../dist/typeof-a1531d8f.esm.js';
3
3
  import { Internal } from '@valbuild/core';
4
4
  import { getModuleIds, stegaEncode } from '@valbuild/react/stega';
5
5
  import React from 'react';
6
6
  import { useValOverlayContext } from '../../dist/ValOverlayContext-e42a2e14.esm.js';
7
+ import { g as getJsonEntryStegaRoot, a as isJsonValuesRecordSchema, b as getValRouteUrlFromVal, i as initValRouteFromVal } from '../../dist/routeFromVal-bd69625f.esm.js';
7
8
  import '../../dist/createForOfIteratorHelper-5758a730.esm.js';
8
9
  import '../../dist/unsupportedIterableToArray-5baabfdc.esm.js';
9
10
  import '../../dist/objectSpread2-60d1bd93.esm.js';
@@ -1,5 +1,7 @@
1
1
  import { ValConfig, ValModules } from "@valbuild/core";
2
2
  import { type ValToolContext, type ValTools } from "@valbuild/server";
3
+ import { type ValOAuthConfig } from "./valAccessToken.js";
4
+ import { type ValMcpMetadataHandlers } from "./valMcpMetadata.js";
3
5
  /**
4
6
  * Val's tools over MCP, and the two checks that have to happen before a request
5
7
  * gets to them.
@@ -36,7 +38,26 @@ export type ValMcp = {
36
38
  * with an MCP server can happen once rather than per request.
37
39
  */
38
40
  valMcpTools: () => Promise<ValTools>;
41
+ /**
42
+ * The RFC 9728 protected-resource document, for mounting at
43
+ * `/.well-known/oauth-protected-resource`.
44
+ *
45
+ * `null` when no `oauth` config was given: a project that has not been told
46
+ * where to authorize must not publish a document claiming it knows.
47
+ */
48
+ valMcpMetadata: ValMcpMetadataHandlers | null;
39
49
  };
40
50
  export declare function initValMcp(valModules: ValModules, config: ValConfig, opts?: {
41
51
  formatter?: (code: string, filePath: string) => string | Promise<string>;
52
+ /**
53
+ * Where to authorize, and what audience to expect.
54
+ *
55
+ * Omit it and nothing changes: the endpoint behaves exactly as it did
56
+ * before OAuth existed, which keeps local development a one-liner and keeps
57
+ * an app that has not been reconfigured working. Provide it and every call
58
+ * needs a verified access token — including in fs mode, where a token is
59
+ * refused rather than ignored, because a host that thinks it is
60
+ * authenticating should never silently get unauthenticated local access.
61
+ */
62
+ oauth?: ValOAuthConfig;
42
63
  }): ValMcp;
@@ -0,0 +1,89 @@
1
+ import { type ValToolAuth } from "@valbuild/server";
2
+ /**
3
+ * Verifying an OAuth access token, which is the whole of what makes this app a
4
+ * resource server rather than a relay.
5
+ *
6
+ * The token is issued by Val's authorization server and presented by an MCP
7
+ * client. This app holds no signing key for it and cannot mint one — it fetches
8
+ * the issuer's *public* keys and checks a signature. That asymmetry is the
9
+ * point: a verified `sub` is a fact about the token rather than a claim by
10
+ * whoever sent it, which is what lets the tools attribute a patch to that
11
+ * profile at all.
12
+ *
13
+ * ## Why this is not `jose`
14
+ *
15
+ * `jose` was the first choice and was rejected on a fact rather than a
16
+ * preference: version 6 is ESM-only (`"type": "module"`, no CJS export). This
17
+ * package is built by preconstruct and `require`d by Next.js server code, so an
18
+ * ESM-only dependency here is a runtime failure in consumers' apps, not a build
19
+ * inconvenience. Adding it would also put a dependency in every install of
20
+ * `@valbuild/next` for one function.
21
+ *
22
+ * The actual cryptography is still not hand-rolled — `node:crypto` does the
23
+ * ECDSA and the JWK import. What is written here is the JWS envelope and the
24
+ * claim checks, and the rules that keep that safe are worth stating because
25
+ * this repository has already shipped the counterexample (`decodeJwt`: `exp`
26
+ * never checked, a non-constant-time compare, verification skippable):
27
+ *
28
+ * - **`alg` is pinned**, not read from the token. The header is only consulted
29
+ * for `kid`. A verifier that honours the token's own `alg` can be handed
30
+ * `HS256` and will treat the *published* public key as a shared secret.
31
+ * - **Nothing is read from the payload before the signature verifies.** Claims
32
+ * from an unverified token are attacker input.
33
+ * - **Keys come only from the configured issuer's JWKS**, never from the token.
34
+ * - **ECDSA JWS signatures are raw `r||s`** (RFC 7518), not DER, which is what
35
+ * `dsaEncoding: "ieee-p1363"` below is for. Omit it and every valid signature
36
+ * is rejected — or worse, a future change makes it accept the wrong thing.
37
+ */
38
+ export type ValOAuthConfig = {
39
+ /**
40
+ * The authorization server, and therefore the expected `iss`.
41
+ *
42
+ * Also where the JWKS is fetched from, so it is the one value that decides
43
+ * which keys can produce a token this app accepts. Configuration, never
44
+ * request input — a request that could name its own issuer could name its own
45
+ * key.
46
+ */
47
+ issuer: string;
48
+ /**
49
+ * This endpoint's absolute URL, and therefore the expected `aud` (RFC 8707).
50
+ *
51
+ * Audience binding is what stops a token minted for one Val site being
52
+ * replayed against another: without it, any deployment the user has access to
53
+ * would accept a token issued for any other.
54
+ */
55
+ resource: string;
56
+ /**
57
+ * Clock skew allowance, in seconds.
58
+ *
59
+ * Servers disagree about the time by more than you would like, and a token
60
+ * refused for being a second early is indistinguishable, to the person using
61
+ * it, from a broken login.
62
+ */
63
+ clockToleranceSeconds?: number;
64
+ /** Test seam. Defaults to the global `fetch`. */
65
+ fetchImpl?: typeof fetch;
66
+ };
67
+ export type ValAccessTokenResult = {
68
+ status: "ok";
69
+ auth: Extract<ValToolAuth, {
70
+ type: "verified-profile";
71
+ }>;
72
+ } | {
73
+ status: "refused";
74
+ /** For the `WWW-Authenticate` challenge: RFC 6750 section 3.1. */
75
+ error: "invalid_request" | "invalid_token" | "insufficient_scope";
76
+ description: string;
77
+ };
78
+ /** Test seam: a fresh process would have an empty cache anyway. */
79
+ export declare function clearValAccessTokenCache(): void;
80
+ /**
81
+ * Read `Authorization: Bearer …`.
82
+ *
83
+ * Exported because the refusal needs to know whether a token was presented at
84
+ * all: RFC 6750 distinguishes "no credential" — a bare `401`, which is an
85
+ * invitation to authenticate — from "a bad credential", and a client that gets
86
+ * the second when it deserved the first will not start the authorization flow.
87
+ */
88
+ export declare function readBearerToken(request: Request): string | null;
89
+ export declare function verifyValAccessToken(request: Request, config: ValOAuthConfig): Promise<ValAccessTokenResult>;
@@ -0,0 +1,47 @@
1
+ import type { ValOAuthConfig } from "./valAccessToken.js";
2
+ /**
3
+ * The one document an MCP client needs before it can authorize: RFC 9728
4
+ * Protected Resource Metadata, served by the *resource* server.
5
+ *
6
+ * This is how a client discovers where to authorize. It asks the resource — this
7
+ * app — and the resource names its authorization server. Which is why this
8
+ * belongs here and the RFC 8414 *authorization server* metadata does not: that
9
+ * document lives at the issuer, describes the issuer's own endpoints, and is
10
+ * served by the issuer. An app serving a copy would be asserting the issuer's
11
+ * configuration on its behalf, and would be wrong the moment the issuer changed
12
+ * anything.
13
+ *
14
+ * The flow, so the split reads as a whole:
15
+ *
16
+ * 1. client → `{app}/api/mcp` with no token → `401` naming this document
17
+ * 2. client → `{app}/.well-known/oauth-protected-resource` → the issuer
18
+ * 3. client → `{issuer}/.well-known/oauth-authorization-server` → endpoints
19
+ * 4. client → issuer's `/authorize`, then `/token`
20
+ * 5. client → `{app}/api/mcp` with the token
21
+ */
22
+ export type ValMcpMetadataHandlers = {
23
+ /** The metadata document. */
24
+ GET: (request: Request) => Response;
25
+ /**
26
+ * The CORS preflight.
27
+ *
28
+ * Required rather than defensive: the metadata document is fetched
29
+ * cross-origin by browser-based clients, and without a preflight answer the
30
+ * fetch fails before the document is read — which presents as "this connector
31
+ * cannot authorize" with nothing in any log to explain it.
32
+ */
33
+ OPTIONS: (request: Request) => Response;
34
+ };
35
+ export declare function createValMcpMetadata(oauth: ValOAuthConfig, scopesSupported: string[]): ValMcpMetadataHandlers;
36
+ /**
37
+ * The `WWW-Authenticate` value for a refusal (RFC 6750 section 3, RFC 9728
38
+ * section 5.1).
39
+ *
40
+ * `resource_metadata` is the load-bearing parameter: it is how a client that has
41
+ * never seen this server learns where to authorize. A `401` without it is a dead
42
+ * end — the client knows it needs a token and has no way to find out from where.
43
+ */
44
+ export declare function wwwAuthenticate(oauth: ValOAuthConfig, scopesSupported: string[], refusal?: {
45
+ error: string;
46
+ description: string;
47
+ }): string;
@@ -3,19 +3,10 @@
3
3
  var createForOfIteratorHelper = require('./createForOfIteratorHelper-0445603c.cjs.dev.js');
4
4
  var objectSpread2 = require('./objectSpread2-58024783.cjs.dev.js');
5
5
  var slicedToArray = require('./slicedToArray-44036a76.cjs.dev.js');
6
+ var _typeof = require('./typeof-b568f48f.cjs.dev.js');
6
7
  var core = require('@valbuild/core');
7
8
  var internal = require('@valbuild/shared/internal');
8
9
 
9
- function _typeof(o) {
10
- "@babel/helpers - typeof";
11
-
12
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
13
- return typeof o;
14
- } : function (o) {
15
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
16
- }, _typeof(o);
17
- }
18
-
19
10
  /**
20
11
  * True when the module's schema is a `.jsonValues()` record/router — i.e. each
21
12
  * entry value is a lazily-loaded `c.json(() => import(...))` marker. Used by the
@@ -70,8 +61,8 @@ val) {
70
61
  if (val === null) {
71
62
  return null;
72
63
  }
73
- if (_typeof(val) !== "object") {
74
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found ").concat(_typeof(val), " instead)."));
64
+ if (_typeof._typeof(val) !== "object") {
65
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found ").concat(_typeof._typeof(val), " instead)."));
75
66
  return null;
76
67
  }
77
68
  if (Array.isArray(val)) {
@@ -90,7 +81,7 @@ val) {
90
81
  console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not the Next.js App Router or External URL Page Router)."));
91
82
  return null;
92
83
  }
93
- if (_typeof(resolvedParams) !== "object") {
84
+ if (_typeof._typeof(resolvedParams) !== "object") {
94
85
  console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: params is not an object)."));
95
86
  return null;
96
87
  }
@@ -110,7 +101,7 @@ val) {
110
101
  var parsedPattern = internal.parseRoutePattern(pattern);
111
102
  var missingPatterns = [];
112
103
  var fullPathParts = [];
113
- var missingParamKeys = _typeof(resolvedParams) === "object" && resolvedParams !== null && !Array.isArray(resolvedParams) ? objectSpread2._objectSpread2({}, resolvedParams) : {};
104
+ var missingParamKeys = _typeof._typeof(resolvedParams) === "object" && resolvedParams !== null && !Array.isArray(resolvedParams) ? objectSpread2._objectSpread2({}, resolvedParams) : {};
114
105
  var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(parsedPattern !== null && parsedPattern !== void 0 ? parsedPattern : []),
115
106
  _step;
116
107
  try {
@@ -195,7 +186,6 @@ val) {
195
186
  return actualRoute;
196
187
  }
197
188
 
198
- exports._typeof = _typeof;
199
189
  exports.getJsonEntryStegaRoot = getJsonEntryStegaRoot;
200
190
  exports.getValRouteUrlFromVal = getValRouteUrlFromVal;
201
191
  exports.initValRouteFromVal = initValRouteFromVal;
@@ -3,19 +3,10 @@
3
3
  var createForOfIteratorHelper = require('./createForOfIteratorHelper-d4afcad8.cjs.prod.js');
4
4
  var objectSpread2 = require('./objectSpread2-13f847a9.cjs.prod.js');
5
5
  var slicedToArray = require('./slicedToArray-ce613de6.cjs.prod.js');
6
+ var _typeof = require('./typeof-16428c61.cjs.prod.js');
6
7
  var core = require('@valbuild/core');
7
8
  var internal = require('@valbuild/shared/internal');
8
9
 
9
- function _typeof(o) {
10
- "@babel/helpers - typeof";
11
-
12
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
13
- return typeof o;
14
- } : function (o) {
15
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
16
- }, _typeof(o);
17
- }
18
-
19
10
  /**
20
11
  * True when the module's schema is a `.jsonValues()` record/router — i.e. each
21
12
  * entry value is a lazily-loaded `c.json(() => import(...))` marker. Used by the
@@ -70,8 +61,8 @@ val) {
70
61
  if (val === null) {
71
62
  return null;
72
63
  }
73
- if (_typeof(val) !== "object") {
74
- console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found ").concat(_typeof(val), " instead)."));
64
+ if (_typeof._typeof(val) !== "object") {
65
+ console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: expected type object, found ").concat(_typeof._typeof(val), " instead)."));
75
66
  return null;
76
67
  }
77
68
  if (Array.isArray(val)) {
@@ -90,7 +81,7 @@ val) {
90
81
  console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: router is not the Next.js App Router or External URL Page Router)."));
91
82
  return null;
92
83
  }
93
- if (_typeof(resolvedParams) !== "object") {
84
+ if (_typeof._typeof(resolvedParams) !== "object") {
94
85
  console.error("Val: ".concat(methodName, " must be used with a Val Module that is a s.record().router(...) (details: params is not an object)."));
95
86
  return null;
96
87
  }
@@ -110,7 +101,7 @@ val) {
110
101
  var parsedPattern = internal.parseRoutePattern(pattern);
111
102
  var missingPatterns = [];
112
103
  var fullPathParts = [];
113
- var missingParamKeys = _typeof(resolvedParams) === "object" && resolvedParams !== null && !Array.isArray(resolvedParams) ? objectSpread2._objectSpread2({}, resolvedParams) : {};
104
+ var missingParamKeys = _typeof._typeof(resolvedParams) === "object" && resolvedParams !== null && !Array.isArray(resolvedParams) ? objectSpread2._objectSpread2({}, resolvedParams) : {};
114
105
  var _iterator = createForOfIteratorHelper._createForOfIteratorHelper(parsedPattern !== null && parsedPattern !== void 0 ? parsedPattern : []),
115
106
  _step;
116
107
  try {
@@ -195,7 +186,6 @@ val) {
195
186
  return actualRoute;
196
187
  }
197
188
 
198
- exports._typeof = _typeof;
199
189
  exports.getJsonEntryStegaRoot = getJsonEntryStegaRoot;
200
190
  exports.getValRouteUrlFromVal = getValRouteUrlFromVal;
201
191
  exports.initValRouteFromVal = initValRouteFromVal;
@@ -1,19 +1,10 @@
1
1
  import { _ as _createForOfIteratorHelper } from './createForOfIteratorHelper-5758a730.esm.js';
2
2
  import { _ as _objectSpread2 } from './objectSpread2-60d1bd93.esm.js';
3
3
  import { _ as _slicedToArray } from './slicedToArray-aa291011.esm.js';
4
+ import { _ as _typeof } from './typeof-a1531d8f.esm.js';
4
5
  import { RecordSchema, Internal } from '@valbuild/core';
5
6
  import { getNextAppRouterSourceFolder, getPatternFromModuleFilePath, parseRoutePattern } from '@valbuild/shared/internal';
6
7
 
7
- function _typeof(o) {
8
- "@babel/helpers - typeof";
9
-
10
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
11
- return typeof o;
12
- } : function (o) {
13
- return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
14
- }, _typeof(o);
15
- }
16
-
17
8
  /**
18
9
  * True when the module's schema is a `.jsonValues()` record/router — i.e. each
19
10
  * entry value is a lazily-loaded `c.json(() => import(...))` marker. Used by the
@@ -193,4 +184,4 @@ val) {
193
184
  return actualRoute;
194
185
  }
195
186
 
196
- export { _typeof as _, isJsonValuesRecordSchema as a, getValRouteUrlFromVal as b, getJsonEntryStegaRoot as g, initValRouteFromVal as i };
187
+ export { isJsonValuesRecordSchema as a, getValRouteUrlFromVal as b, getJsonEntryStegaRoot as g, initValRouteFromVal as i };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ function _typeof(o) {
4
+ "@babel/helpers - typeof";
5
+
6
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
+ return typeof o;
8
+ } : function (o) {
9
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
+ }, _typeof(o);
11
+ }
12
+
13
+ exports._typeof = _typeof;
@@ -0,0 +1,11 @@
1
+ function _typeof(o) {
2
+ "@babel/helpers - typeof";
3
+
4
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
5
+ return typeof o;
6
+ } : function (o) {
7
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
8
+ }, _typeof(o);
9
+ }
10
+
11
+ export { _typeof as _ };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ function _typeof(o) {
4
+ "@babel/helpers - typeof";
5
+
6
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
7
+ return typeof o;
8
+ } : function (o) {
9
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
10
+ }, _typeof(o);
11
+ }
12
+
13
+ exports._typeof = _typeof;
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "next",
13
13
  "react"
14
14
  ],
15
- "version": "0.116.0",
15
+ "version": "0.117.1",
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.111.0",
51
- "@valbuild/language-server": "0.116.0",
52
- "@valbuild/react": "0.116.0",
53
- "@valbuild/server": "0.116.0",
54
- "@valbuild/shared": "0.116.0",
55
- "@valbuild/ui": "0.116.0"
50
+ "@valbuild/core": "0.117.0",
51
+ "@valbuild/language-server": "0.117.1",
52
+ "@valbuild/react": "0.117.1",
53
+ "@valbuild/server": "0.117.1",
54
+ "@valbuild/ui": "0.117.1",
55
+ "@valbuild/shared": "0.117.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@testing-library/react": "^16.3.3",
@@ -73,6 +73,7 @@
73
73
  "next"
74
74
  ],
75
75
  "files": [
76
+ "CHANGELOG.md",
76
77
  "dist",
77
78
  "client",
78
79
  "server",
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('server-only');
6
- var routeFromVal = require('../../dist/routeFromVal-b48a454a.cjs.dev.js');
6
+ var _typeof = require('../../dist/typeof-b568f48f.cjs.dev.js');
7
7
  var objectSpread2 = require('../../dist/objectSpread2-58024783.cjs.dev.js');
8
8
  var version = require('../../dist/version-c311d818.cjs.dev.js');
9
9
  var defineProperty = require('../../dist/defineProperty-f90345d7.cjs.dev.js');
@@ -11,6 +11,7 @@ var stega = require('@valbuild/react/stega');
11
11
  var core = require('@valbuild/core');
12
12
  var internal = require('@valbuild/shared/internal');
13
13
  var server = require('@valbuild/server');
14
+ var routeFromVal = require('../../dist/routeFromVal-7df20dfe.cjs.dev.js');
14
15
  require('../../dist/createForOfIteratorHelper-0445603c.cjs.dev.js');
15
16
  require('../../dist/unsupportedIterableToArray-c8ab77c9.cjs.dev.js');
16
17
  require('../../dist/slicedToArray-44036a76.cjs.dev.js');
@@ -306,7 +307,7 @@ function _loadJsonEntryContent() {
306
307
  return version._regenerator().w(function (_context17) {
307
308
  while (1) switch (_context17.n) {
308
309
  case 0:
309
- if (!(!source || routeFromVal._typeof(source) !== "object")) {
310
+ if (!(!source || _typeof._typeof(source) !== "object")) {
310
311
  _context17.n = 1;
311
312
  break;
312
313
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  require('server-only');
6
- var routeFromVal = require('../../dist/routeFromVal-8ac2f984.cjs.prod.js');
6
+ var _typeof = require('../../dist/typeof-16428c61.cjs.prod.js');
7
7
  var objectSpread2 = require('../../dist/objectSpread2-13f847a9.cjs.prod.js');
8
8
  var version = require('../../dist/version-0e6da9a7.cjs.prod.js');
9
9
  var defineProperty = require('../../dist/defineProperty-8951f469.cjs.prod.js');
@@ -11,6 +11,7 @@ var stega = require('@valbuild/react/stega');
11
11
  var core = require('@valbuild/core');
12
12
  var internal = require('@valbuild/shared/internal');
13
13
  var server = require('@valbuild/server');
14
+ var routeFromVal = require('../../dist/routeFromVal-8032f5f7.cjs.prod.js');
14
15
  require('../../dist/createForOfIteratorHelper-d4afcad8.cjs.prod.js');
15
16
  require('../../dist/unsupportedIterableToArray-0d2087a2.cjs.prod.js');
16
17
  require('../../dist/slicedToArray-ce613de6.cjs.prod.js');
@@ -306,7 +307,7 @@ function _loadJsonEntryContent() {
306
307
  return version._regenerator().w(function (_context17) {
307
308
  while (1) switch (_context17.n) {
308
309
  case 0:
309
- if (!(!source || routeFromVal._typeof(source) !== "object")) {
310
+ if (!(!source || _typeof._typeof(source) !== "object")) {
310
311
  _context17.n = 1;
311
312
  break;
312
313
  }
@@ -1,5 +1,5 @@
1
1
  import 'server-only';
2
- import { i as initValRouteFromVal, g as getJsonEntryStegaRoot, a as isJsonValuesRecordSchema, b as getValRouteUrlFromVal, _ as _typeof } from '../../dist/routeFromVal-263eec96.esm.js';
2
+ import { _ as _typeof } from '../../dist/typeof-a1531d8f.esm.js';
3
3
  import { _ as _objectSpread2 } from '../../dist/objectSpread2-60d1bd93.esm.js';
4
4
  import { _ as _asyncToGenerator, V as VERSION, a as _regenerator } from '../../dist/version-4d7b692c.esm.js';
5
5
  import { _ as _defineProperty } from '../../dist/defineProperty-cca5affa.esm.js';
@@ -7,6 +7,7 @@ import { SET_RSC, stegaEncode, SET_AUTO_TAG_JSX_ENABLED } from '@valbuild/react/
7
7
  import { Internal } from '@valbuild/core';
8
8
  import { VAL_SESSION_COOKIE } from '@valbuild/shared/internal';
9
9
  import { createValServer } from '@valbuild/server';
10
+ import { i as initValRouteFromVal, g as getJsonEntryStegaRoot, a as isJsonValuesRecordSchema, b as getValRouteUrlFromVal } from '../../dist/routeFromVal-bd69625f.esm.js';
10
11
  import '../../dist/createForOfIteratorHelper-5758a730.esm.js';
11
12
  import '../../dist/unsupportedIterableToArray-5baabfdc.esm.js';
12
13
  import '../../dist/slicedToArray-aa291011.esm.js';