@real-router/core 0.78.0 → 0.79.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.
- package/README.md +1 -1
- package/dist/cjs/Router-BRuC-daj.js +2 -0
- package/dist/cjs/Router-BRuC-daj.js.map +1 -0
- package/dist/cjs/api.d.ts +1 -1
- package/dist/cjs/api.js +1 -1
- package/dist/cjs/buildParamMeta-DniluAIV.js +2 -0
- package/dist/cjs/buildParamMeta-DniluAIV.js.map +1 -0
- package/dist/cjs/{cloneRouter-a6LJt-zh.js → cloneRouter-3AOUeQ8M.js} +2 -2
- package/dist/cjs/{cloneRouter-a6LJt-zh.js.map → cloneRouter-3AOUeQ8M.js.map} +1 -1
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{types-xg2zHVF6.d.ts → types-DaXCTxi1.d.ts} +1 -34
- package/dist/cjs/types-DaXCTxi1.d.ts.map +1 -0
- package/dist/cjs/utils.js +1 -1
- package/dist/cjs/validation.d.ts +1 -1
- package/dist/cjs/validation.d.ts.map +1 -1
- package/dist/cjs/validation.js +1 -1
- package/dist/cjs/validation.js.map +1 -1
- package/dist/esm/Router-DikzugaD.mjs +2 -0
- package/dist/esm/Router-DikzugaD.mjs.map +1 -0
- package/dist/esm/api.d.mts +1 -1
- package/dist/esm/api.mjs +1 -1
- package/dist/esm/buildParamMeta-bOLhLF9h.mjs +2 -0
- package/dist/esm/buildParamMeta-bOLhLF9h.mjs.map +1 -0
- package/dist/esm/{cloneRouter-CqS4kTs8.mjs → cloneRouter-CAh5vA3l.mjs} +2 -2
- package/dist/esm/{cloneRouter-CqS4kTs8.mjs.map → cloneRouter-CAh5vA3l.mjs.map} +1 -1
- package/dist/esm/index.d.mts +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/{types-xg2zHVF6.d.mts → types-DaXCTxi1.d.mts} +1 -34
- package/dist/esm/types-DaXCTxi1.d.mts.map +1 -0
- package/dist/esm/utils.mjs +1 -1
- package/dist/esm/validation.d.mts +1 -1
- package/dist/esm/validation.d.mts.map +1 -1
- package/dist/esm/validation.mjs +1 -1
- package/dist/esm/validation.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/Router-D6NzRxBA.js +0 -2
- package/dist/cjs/Router-D6NzRxBA.js.map +0 -1
- package/dist/cjs/buildParamMeta-CkG6cUIl.js +0 -2
- package/dist/cjs/buildParamMeta-CkG6cUIl.js.map +0 -1
- package/dist/cjs/types-xg2zHVF6.d.ts.map +0 -1
- package/dist/esm/Router-De0Gr9Ll.mjs +0 -2
- package/dist/esm/Router-De0Gr9Ll.mjs.map +0 -1
- package/dist/esm/buildParamMeta-Bl0uORu6.mjs +0 -2
- package/dist/esm/buildParamMeta-Bl0uORu6.mjs.map +0 -1
- package/dist/esm/types-xg2zHVF6.d.mts.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=new WeakMap;function t(t){let n=e.get(t);if(!n)throw TypeError(`[real-router] Invalid router instance — not found in internals registry`);return n}function n(t,n){e.set(t,n)}function r(e,t,n){let r=t;for(let t of e){let e=r;r=(...n)=>t(e,...n)}return r(...n)}function i(e,t,n){return((...i)=>{let a=n.get(e);return!a||a.length===0?t(...i):r(a,t,i)})}function a(e,t,n){return(i,a)=>{let o=n.get(e);return!o||o.length===0?t(i,a):r(o,t,[i,a])}}const o=`[^>]*`;function s(e){let t=!1;for(let n of e)if(n===`<`)t=!0;else if(n===`>`){if(!t)return!1;t=!1}return!t}const c=/[<>]/u,l=e=>e===58||e===42;function u(e){let t=[],n=0,r=!1;for(let i=0;i<e.length;i+=1){let a=e.charCodeAt(i);a===60?r=!0:a===62?r=!1:a===47&&!r&&(t.push(e.slice(n,i)),n=i+1)}return t.push(e.slice(n)),t}function d(e){let t=e.length;if(t===0)return{kind:`static`,text:``};if(!l(e.charCodeAt(0))){for(let n=0;n<t;n+=1){let r=e.charCodeAt(n);if(r===60)return{error:`constraint-in-static`};if(l(r)&&n+1<t&&e.charCodeAt(n+1)!==60)return{error:`fused-marker`}}return e.charCodeAt(t-1)===63?{error:`name-less`}:{kind:`static`,text:e}}let n=e.charCodeAt(0)===42,r=1;for(;r<t;){let t=e.charCodeAt(r);if(t===60||t===63)break;r+=1}let i=e.slice(1,r);if(i.length===0)return{error:`name-less`};if(l(i.charCodeAt(i.length-1)))return{error:`trailing-marker`};let a,o=!1;if(r<t)if(e.charCodeAt(r)===60){let n=e.indexOf(`>`,r+1);if(n===-1)return{error:`unbalanced-constraint`};if(n===r+1)return{error:`empty-constraint`};a=e.slice(r,n+1);let i=n+1;if(i<t)if(e.charCodeAt(i)===63)o=!0;else return{error:`fused-constraint-suffix`}}else o=!0;return n?o?{error:`optional-splat`}:{kind:`splat`,name:i}:a===void 0?{kind:`param`,name:i,optional:o}:{kind:`param`,name:i,constraint:a,optional:o}}function f(e){for(let t of u(e)){let e=d(t);if(`error`in e)return e.error}}function p(e){let t=u(e);for(let e=2;e<t.length;e+=1)if(t[e].startsWith(`*`)&&m(t[e-1])&&m(t[e-2]))return!0;return!1}function m(e){return e.startsWith(`:`)&&e.endsWith(`?`)}function h(e){return`(${e.slice(1,-1)})`}function g(e,t){try{return RegExp(`^${h(e)}$`)}catch{throw Error(`[buildParamMeta] Invalid constraint '${e}' on parameter '${t}': the body between '<' and '>' must be a valid regular expression (e.g. '<[0-9]+>', '<[a-z]+>').`)}}const _=new RegExp(String.raw`([:*]${`[^/?<]+`}(?:<${o}>)?)\?(?=[/?]|$)`,`g`),v=RegExp(`<${o}>`,`g`),y=/\?(.+)$/;function b(e){return e.replaceAll(v,e=>`<${`x`.repeat(e.length-2)}>`).replaceAll(_,`$1\0`)}const x=Object.freeze([]),S=Object.freeze({}),C=new Map,w=Object.freeze({urlParams:x,queryParams:x,spatParams:x,paramTypeMap:S,constraintPatterns:C,pathPattern:``});function T(e,t,n,r,i){for(let a of u(e)){if(a.length===0)continue;let e=d(a);`error`in e||e.kind===`static`||(t.push(e.name),r[e.name]=`url`,e.kind===`splat`?n.push(e.name):e.constraint!==void 0&&i.set(e.name,{pattern:g(e.constraint,e.name),constraint:e.constraint}))}}function E(e){let t=[],n=[],r=[],i={},a=new Map,o=y.exec(b(e));if(o!==null){let t=e.slice(o.index+1).split(`&`);for(let e of t){let t=e.trim();t.length>0&&(n.push(t),i[t]=`query`)}e=e.slice(0,o.index)}return T(e,t,r,i,a),D(t,n,r,i,a,e)}function D(e,t,n,r,i,a){return{urlParams:e.length===0?x:e,queryParams:t.length===0?x:t,spatParams:n.length===0?x:n,paramTypeMap:e.length===0&&t.length===0?S:r,constraintPatterns:i.size===0?C:i,pathPattern:a}}export{d as a,c,i as d,t as f,p as i,s as l,E as n,u as o,n as p,f as r,o as s,w as t,a as u};
|
|
2
|
-
//# sourceMappingURL=buildParamMeta-Bl0uORu6.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buildParamMeta-Bl0uORu6.mjs","names":[],"sources":["../../src/internals.ts","../../src/engine/path-matcher/constraint-grammar.ts","../../src/engine/path-matcher/parseSegment.ts","../../src/engine/path-matcher/buildParamMeta.ts"],"sourcesContent":["import type { RouteTree } from \"./engine\";\nimport type { DependenciesStore } from \"./namespaces\";\nimport type { RoutesStore } from \"./namespaces/RoutesNamespace\";\nimport type { Router as RouterClass } from \"./Router\";\nimport type {\n DefaultDependencies,\n EventName,\n LoggerConfig,\n NavigationOptions,\n Options,\n Params,\n Plugin,\n Router as RouterInterface,\n RouterLogger,\n RouteTreeState,\n SimpleState,\n State,\n TreeChangedEvent,\n Unsubscribe,\n EventMethodMap,\n PluginFactory,\n} from \"./types\";\nimport type { RouterValidator } from \"./types/RouterValidator\";\nimport type { SerializedRouterState } from \"./utils\";\n\nexport interface RouterInternals<\n D extends DefaultDependencies = DefaultDependencies,\n> {\n readonly makeState: <P extends Params = Params>(\n name: string,\n params?: P,\n path?: string,\n meta?: Record<string, Record<string, \"url\" | \"query\">>,\n ) => State<P>;\n\n readonly forwardState: <P extends Params = Params>(\n routeName: string,\n routeParams: P,\n ) => SimpleState<P>;\n\n readonly buildStateResolved: (\n resolvedName: string,\n resolvedParams: Params,\n ) => RouteTreeState | undefined;\n\n readonly matchPath: <P extends Params = Params>(\n path: string,\n options?: Options,\n ) => State<P> | undefined;\n\n readonly getOptions: () => Options;\n\n readonly addEventListener: <E extends EventName>(\n eventName: E,\n cb: Plugin[EventMethodMap[E]],\n ) => Unsubscribe;\n\n /**\n * Route-tree mutation channel — internal access for the `getRoutesApi`\n * wrapper. A dedicated bridge is required because the public\n * `addEventListener<E extends EventName>` structurally rejects\n * `\"TREE_CHANGED\"` (it is not in the public `EventName` union), is strict on\n * duplicates, and exposes neither `emit` nor `listenerCount`.\n */\n readonly treeChanged: {\n readonly emit: (event: TreeChangedEvent) => void;\n readonly subscribe: (\n handler: (event: TreeChangedEvent) => void,\n ) => Unsubscribe;\n readonly listenerCount: () => number;\n /**\n * True while a `TREE_CHANGED` emit is on the stack — `getRoutesApi` reads it\n * to reject reentrant route-CRUD from a `subscribeChanges` handler (#1032).\n */\n readonly isEmitting: () => boolean;\n };\n\n readonly buildPath: (route: string, params?: Params) => string;\n\n readonly emitTransitionError: (error: Error) => void;\n\n /**\n * Emits `TRANSITION_SUCCESS` directly (no FSM transition) — used by\n * `getRoutesApi().replace()` to notify `router.subscribe` listeners when a\n * structural replace revalidates the active state (#950). Mirrors the success\n * emission `completeTransition` / `navigateToNotFound` perform.\n */\n readonly emitTransitionSuccess: (\n toState: State,\n fromState: State | undefined,\n opts?: NavigationOptions,\n ) => void;\n\n /**\n * Commits the not-found (`UNKNOWN_ROUTE`) state for `path` and emits\n * `TRANSITION_SUCCESS` — the `NavigationNamespace.navigateToNotFound`\n * primitive. `replace()` uses it when a structural replace drops the active\n * route, so subscribers are notified instead of the state silently clearing\n * (#950).\n */\n readonly navigateToNotFound: (path: string) => State;\n\n readonly start: (path: string) => Promise<State>;\n\n /**\n * Plugin-only navigation entry point — delegates to\n * `NavigationNamespace.navigateToState` (`getPluginApi(router).navigateToState`).\n * Hidden from `Router`/`Navigator` to keep the userland surface minimal;\n * see `core-types/src/api.ts` for usage docs.\n */\n readonly navigateToState: (\n state: State,\n options?: NavigationOptions,\n ) => Promise<State>;\n\n /* eslint-disable @typescript-eslint/no-explicit-any -- heterogeneous map: stores different InterceptorFn<M> types under different keys */\n readonly interceptors: Map<\n string,\n ((next: (...args: any[]) => any, ...args: any[]) => any)[]\n >;\n /* eslint-enable @typescript-eslint/no-explicit-any */\n\n readonly setRootPath: (rootPath: string) => void;\n readonly getRootPath: () => string;\n\n readonly getTree: () => RouteTree;\n\n readonly isDisposed: () => boolean;\n\n validator: RouterValidator | null;\n\n // Per-router logger instance (built from `options.logger` in the Router\n // constructor). The facade reads it as `getInternals(this).logger`; namespaces\n // receive it via their deps at wiring; plugins reach it through\n // `getPluginApi(router).logger`. Replaces the former process-global singleton\n // from the standalone `@real-router/logger` package (now folded into\n // `foundation/logger`), whose `configure()` leaked across routers (#724).\n readonly logger: RouterLogger;\n\n // Dependencies (issue #172)\n readonly dependenciesGetStore: () => DependenciesStore<D>;\n\n // Clone support (issue #173, consolidated #964). One accessor for the\n // source-side snapshot a clone carries over besides the route store, so a new\n // clone-relevant subsystem is wired in a single place instead of being spread\n // across separate methods.\n readonly getCloneState: () => {\n options: Options;\n dependencies: Record<string, unknown>;\n pluginFactories: PluginFactory<D>[];\n // Resolved logger config of the base router, so a clone can build its OWN\n // logger inheriting the base's level/callback. Frozen `options` do NOT carry\n // `logger` (stripped in the constructor), so `options` above can't convey it;\n // cloneRouter merges a per-request override (traceId) over this snapshot.\n loggerConfig: LoggerConfig;\n };\n\n // Consolidated route data store (issue #174 Phase 2)\n readonly routeGetStore: () => RoutesStore<D>;\n\n // Cross-namespace state (issue #174)\n readonly getStateName: () => string | undefined;\n readonly isTransitioning: () => boolean;\n readonly clearState: () => void;\n readonly setState: (state: State) => void;\n readonly routerExtensions: { keys: string[] }[];\n readonly contextClaimRecords: Set<string>;\n\n /**\n * One-shot hydration scratchpad populated by `hydrateRouter` immediately\n * before delegating to `router.start(parsed.path)` and cleared in the\n * matching `finally`. SSR loader plugins read this slot directly via\n * `getInternals(router).hydrationState` to short-circuit their own loader\n * call when the server-resolved namespace value is already present in the\n * parsed state (#596). `null` outside of an active `hydrateRouter`\n * invocation.\n */\n hydrationState: SerializedRouterState | null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- existential type: stores RouterInternals for all Dependencies types\nconst internals = new WeakMap<object, RouterInternals<any>>();\n\nexport function getInternals<D extends DefaultDependencies>(\n router: RouterInterface<D>,\n): RouterInternals<D> {\n const ctx = internals.get(router);\n\n if (!ctx) {\n throw new TypeError(\n \"[real-router] Invalid router instance — not found in internals registry\",\n );\n }\n\n return ctx as RouterInternals<D>;\n}\n\nexport function registerInternals<D extends DefaultDependencies>(\n router: RouterClass<D>,\n ctx: RouterInternals<D>,\n): void {\n internals.set(router, ctx);\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument -- internal chain execution: type safety enforced at public API boundary (PluginApi.addInterceptor) */\nfunction executeInterceptorChain<T>(\n interceptors: ((next: (...args: any[]) => any, ...args: any[]) => any)[],\n original: (...args: any[]) => T,\n args: any[],\n): T {\n let chain = original as (...args: any[]) => any;\n\n for (const interceptor of interceptors) {\n const prev = chain;\n\n chain = (...chainArgs: any[]) => interceptor(prev, ...chainArgs);\n }\n\n return chain(...args) as T;\n}\n\n/**\n * Variadic interceptor wrapper — wraps a function of any arity, returning the\n * same callable type `T`. Use {@link createBinaryInterceptable} instead when the\n * wrapped method takes exactly two args and the caller needs the precise\n * `(a, b) => r` signature preserved (the variadic form widens args to `any[]`).\n */\nexport function createInterceptable<T extends (...args: any[]) => any>(\n name: string,\n original: T,\n interceptors: Map<\n string,\n ((next: (...args: any[]) => any, ...args: any[]) => any)[]\n >,\n): T {\n return ((...args: any[]) => {\n const chain = interceptors.get(name);\n\n if (!chain || chain.length === 0) {\n return original(...args);\n }\n\n return executeInterceptorChain(chain, original, args);\n }) as T;\n}\n\n/**\n * Two-argument interceptor wrapper — preserves the exact `(a: A, b: B) => R`\n * signature, which the variadic {@link createInterceptable} cannot express\n * (it widens args to `any[]`). Used for the binary interceptable methods\n * `forwardState(routeName, routeParams)` and `buildPath(route, params)`.\n */\nexport function createBinaryInterceptable<A, B, R>(\n name: string,\n original: (a: A, b: B) => R,\n interceptors: Map<\n string,\n ((next: (...args: any[]) => any, ...args: any[]) => any)[]\n >,\n): (a: A, b: B) => R {\n return (arg1: A, arg2: B) => {\n const chain = interceptors.get(name);\n\n if (!chain || chain.length === 0) {\n return original(arg1, arg2);\n }\n\n return executeInterceptorChain(chain, original, [arg1, arg2]);\n };\n}\n/* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-argument */\n","/**\n * Single source of truth for the constraint-delimiter `<...>` grammar (#804).\n *\n * Before this module the `<...>` grammar was re-spelled independently in 6\n * places across `path-matcher` + `route-tree`, with a live `+`/`*` desync\n * between the match side (`<[^>]+>`) and the strip/build side (`<[^>]*>`) — the\n * exact \"two desynced regexes\" class #738 unified for the param-*name* axis.\n * This module is the constraint-axis counterpart of `PARAM_NAME_PATTERN`:\n *\n * - `CONSTRAINT_BODY_PATTERN` — the one atom every constraint-parsing regex\n * (match / strip / build) derives from, so they can never disagree again.\n * - `isConstraintBalanced` — the one balance predicate the route-tree gate and\n * the `registerTree` backstop consume, so no layer re-rolls the scan.\n *\n * @module constraint-grammar\n */\n\n/**\n * Constraint body between `<` and `>`: any run of characters except the\n * closing `>`. Canonical quantifier is `*` (empties allowed at the *grammar*\n * level; the semantically-useless empty `<>` is rejected at the route-tree gate\n * and the `registerTree` backstop, not smuggled through — see #804 §3.3). Every\n * regex that parses `<...>` derives from this constant via interpolation, so the\n * match / strip / build phases share one definition — the same discipline\n * `PARAM_NAME_PATTERN` established for the param-name axis (#738).\n */\nexport const CONSTRAINT_BODY_PATTERN = \"[^>]*\";\n\n/**\n * Reports whether a path's `<...>` constraint delimiters are balanced.\n *\n * Single linear scan: a `<` opens a constraint and the first following `>`\n * closes it; a `<` inside the body is allowed (`<[a<b]>`). A `>` seen outside a\n * constraint, or a `<` left unclosed at the end, is a stray/unbalanced\n * delimiter.\n *\n * Implemented as a scan rather than a `replaceAll(new RegExp(...), \"\")` strip so\n * the intent — delimiter *balance*, not HTML *sanitization* — is unambiguous to\n * both readers and static analysis (the regex strip is the classic\n * incomplete-tag-sanitizer pattern CodeQL flags, which this is not).\n *\n * Authoritative in the producing layer (#804): `route-tree`'s `validateRoutePath`\n * gate and `path-matcher`'s own `registerTree` backstop both consume this — the\n * opt-in/gate validators never reimplement the scan (same axis as #1047).\n */\nexport function isConstraintBalanced(path: string): boolean {\n let insideConstraint = false;\n\n for (const char of path) {\n if (char === \"<\") {\n insideConstraint = true;\n } else if (char === \">\") {\n if (!insideConstraint) {\n return false; // stray `>` with no open `<`\n }\n\n insideConstraint = false;\n }\n }\n\n return !insideConstraint; // a still-open `<` is an unclosed constraint\n}\n\n/**\n * A query-param NAME may not contain `<`/`>` (#1242 §5.1) — such a char is a\n * constraint delimiter leaked into the query, e.g. a reverse-order modifier typo\n * `/a/:b?<\\d+>` parses the `?` as the query start, making `<\\d+>` the query name.\n * Single-sourced so the route-tree gate and the `registerTree` backstop share one\n * definition of \"invalid query-name char\".\n */\nexport const INVALID_QUERY_NAME_RGX = /[<>]/u;\n","/**\n * Canonical route-segment tokenizer.\n *\n * The single owner of \"where does a name / marker / constraint end\" for ONE\n * path segment (post-`/`-split). It replaces the five name-boundary compositions\n * of `PARAM_NAME_PATTERN` currently spread across `buildParamMeta` (L1),\n * `registration` (L2 build + L3 trie), and `route-tree`'s validation gate (L4),\n * so those layers can never disagree on a boundary (the gate↔backstop drift\n * class — #858 / #1050 / #1150 / #1311 / #1149 / #1324).\n *\n * A single left-to-right `charCodeAt` scan produces either a token tuple or a\n * typed error. Grammar (RFC §4):\n * 1. Leading `:`/`*` → param/splat; otherwise `static` (a marker glued *after* a\n * static prefix ⇒ `fused-marker`; a `<...>` in a marker-less segment ⇒\n * `constraint-in-static`; a trailing `?` on a marker-less segment ⇒ `name-less`\n * — the optional modifier has no param name, #1241 / `/faq?`).\n * 2. name = any char except `<`/`?` (no `/` remains inside a segment); a name\n * ending in a bare `:`/`*` ⇒ `trailing-marker` (#1324). A *mid* marker stays\n * a name char — `:a:b` → name `a:b`, preserved.\n * 3. empty name ⇒ `name-less` (#858).\n * 4. constraint = `<...>` after the name; unbalanced/`<>` ⇒ `unbalanced`/`empty`\n * (#804); text after `>` other than a trailing `?` ⇒ `fused-constraint-suffix`\n * (#1150).\n * 5. a trailing `?` ⇒ optional; on a splat ⇒ `optional-splat` (#1149).\n *\n * @module parseSegment\n */\n\n/* eslint-disable unicorn/prefer-code-point, sonarjs/cognitive-complexity -- charCodeAt code-unit scan + a single inlined branchy pass are this RFC's char-scan perf basis (§9); the same deliberate choices as registration/trie.ts hasNonAsciiSegment (#1285) and SegmentMatcher's inlined #traverseFrom (:550). Markers compared are ASCII (`:` `*` `<` `?`, < 0x80). */\n\n/** A successfully tokenized segment. */\nexport type SegmentTokens =\n | { readonly kind: \"static\"; readonly text: string }\n | {\n readonly kind: \"param\";\n readonly name: string;\n readonly constraint?: string;\n readonly optional: boolean;\n }\n | { readonly kind: \"splat\"; readonly name: string };\n\n/** Grammar-shape rejections, each mirroring an existing registration guard. */\nexport type SegmentErrorCode =\n | \"name-less\" // #858 — a marker with no name\n | \"trailing-marker\" // #1324 — a param name ending in a bare `:`/`*`\n | \"fused-marker\" // #1050 — a marker glued after a static prefix\n | \"fused-constraint-suffix\" // #1150 — static text after a constraint's `>`\n | \"constraint-in-static\" // #1311 — a `<...>` in a marker-less segment\n | \"optional-splat\" // #1149 — `*name?`\n | \"unbalanced-constraint\" // #804 — `<` with no matching `>`\n | \"empty-constraint\"; // #804 — `<>` (compiles to a never-matching `^()$`)\n\nexport interface SegmentError {\n readonly error: SegmentErrorCode;\n}\n\nconst COLON = 58; // :\nconst STAR = 42; // *\nconst LT = 60; // <\nconst GT = 62; // >\nconst QUESTION = 63; // ?\nconst SLASH = 47; // /\n\nconst isMarker = (code: number): boolean => code === COLON || code === STAR;\n\n/**\n * Splits a path into its `/`-delimited segments — but NOT on a `/` inside a\n * `<...>` constraint, whose body may legally contain `/` (e.g. `:id<a/b>`, which\n * the current whole-path `buildParamMeta` scan tolerates). First-`>` semantics,\n * matching the constraint grammar (`<[^>]*>`). This is the **segmentation** half\n * of the path-grammar unification: `parseSegment` owns the per-segment grammar,\n * `splitPathSegments` owns where a segment begins and ends. Reused by every layer\n * that must go from a path string to per-segment tokens (L1 now; L3 in a later\n * phase), so segmentation itself can never drift.\n *\n * @param path - a route path (query already stripped by the caller)\n * @returns the segments in order, including empty leading/trailing/`//` segments\n * (the caller skips empties, matching the current behaviour)\n */\nexport function splitPathSegments(path: string): string[] {\n const segments: string[] = [];\n let start = 0;\n let inConstraint = false;\n\n for (let i = 0; i < path.length; i += 1) {\n const code = path.charCodeAt(i);\n\n if (code === LT) {\n inConstraint = true;\n } else if (code === GT) {\n inConstraint = false;\n } else if (code === SLASH && !inConstraint) {\n segments.push(path.slice(start, i));\n start = i + 1;\n }\n }\n\n segments.push(path.slice(start));\n\n return segments;\n}\n\n/**\n * Tokenizes a single path segment (already split on `/`).\n *\n * @param segment - one `/`-delimited segment of a route path\n * @returns the segment's tokens, or a typed grammar error\n */\nexport function parseSegment(segment: string): SegmentTokens | SegmentError {\n const length = segment.length;\n\n if (length === 0) {\n return { kind: \"static\", text: \"\" };\n }\n\n // ---- static segment (no leading marker) -------------------------------\n if (!isMarker(segment.charCodeAt(0))) {\n for (let i = 0; i < length; i += 1) {\n const code = segment.charCodeAt(i);\n\n // A `<...>` in a marker-less segment reshapes the route (#1311).\n if (code === LT) {\n return { error: \"constraint-in-static\" };\n }\n\n // A marker glued after a static prefix is extracted as a param by build/meta\n // but compiled as a static literal by the trie (#1050) — reject it as fused.\n // Two placements are NOT fused: a marker ENDING the segment (a static ending in\n // `:`/`*` — `/a:`, `/a*`, F2 — caught by `i + 1 < length` being false), and a\n // marker followed by `<` (the constraint-in-static case `a<b>`, caught by the\n // `<` branch above). Every OTHER following char is fused — including a `?`\n // (`a:?`): that shape never reaches the tokenizer through a real path (a `?`\n // after a bare marker is not a valid `:name?` optional, so the query mask strips\n // it before `/`-segmentation), so a direct call correctly reports fused-marker.\n if (\n isMarker(code) &&\n i + 1 < length &&\n segment.charCodeAt(i + 1) !== LT\n ) {\n return { error: \"fused-marker\" };\n }\n }\n\n // A trailing `?` is the optional modifier; on a marker-less segment (no param\n // name) it is an optional-with-no-name — name-less (#858/#1241, `/faq?`). The\n // backstop rejects it by the SAME rule: its `endsWith(\"?\")` optional fork routes\n // the segment to `extractParamName` → this tokenizer. Owning the `?` modifier\n // here (not just in the marker branches) is what lets the gate and backstop\n // agree on it — otherwise the gate reads `faq?` as a valid static (#1324 §4).\n if (segment.charCodeAt(length - 1) === QUESTION) {\n return { error: \"name-less\" };\n }\n\n return { kind: \"static\", text: segment };\n }\n\n const splat = segment.charCodeAt(0) === STAR;\n\n // ---- name: up to the first `<` or `?` (a segment holds no `/`) ---------\n let cursor = 1;\n\n while (cursor < length) {\n const code = segment.charCodeAt(cursor);\n\n if (code === LT || code === QUESTION) {\n break;\n }\n\n cursor += 1;\n }\n\n const name = segment.slice(1, cursor);\n\n if (name.length === 0) {\n return { error: \"name-less\" }; // #858\n }\n\n if (isMarker(name.charCodeAt(name.length - 1))) {\n return { error: \"trailing-marker\" }; // #1324\n }\n\n // ---- constraint + optional --------------------------------------------\n let constraint: string | undefined;\n let optional = false;\n\n if (cursor < length) {\n if (segment.charCodeAt(cursor) === LT) {\n const close = segment.indexOf(\">\", cursor + 1);\n\n if (close === -1) {\n return { error: \"unbalanced-constraint\" }; // #804\n }\n\n if (close === cursor + 1) {\n return { error: \"empty-constraint\" }; // #804 — `<>`\n }\n\n constraint = segment.slice(cursor, close + 1);\n\n const after = close + 1;\n\n if (after < length) {\n // Only a trailing `?` may follow a constraint (matches the current\n // `(\\?)?` capture); any other text is fused (#1150).\n if (segment.charCodeAt(after) === QUESTION) {\n optional = true;\n } else {\n return { error: \"fused-constraint-suffix\" };\n }\n }\n } else {\n // segment.charCodeAt(cursor) === QUESTION\n optional = true;\n }\n }\n\n if (splat) {\n if (optional) {\n return { error: \"optional-splat\" }; // #1149\n }\n\n return { kind: \"splat\", name };\n }\n\n return constraint === undefined\n ? { kind: \"param\", name, optional }\n : { kind: \"param\", name, constraint, optional };\n}\n\n/**\n * Returns the first per-segment grammar error in a path, or `undefined` if every\n * segment tokenizes cleanly.\n *\n * The **validation-facing** entry over the tokenizer: `route-tree`'s\n * `validateRoutePath` calls this instead of re-running its own split+parse loop,\n * so the gate and the matcher's own grammar cannot drift (#1324) and the loop\n * stays single-sourced here — the tokenizer primitives (`parseSegment`,\n * `splitPathSegments`) need not leak into the package's public surface. An empty\n * segment tokenizes as `static` (never an error), so leading/trailing/`//`\n * empties are skipped naturally.\n *\n * @param path - a route path (query already stripped by the caller)\n * @returns the first `SegmentErrorCode` (scanned left to right), or `undefined`\n */\nexport function findSegmentGrammarError(\n path: string,\n): SegmentErrorCode | undefined {\n for (const segment of splitPathSegments(path)) {\n const token = parseSegment(segment);\n\n if (\"error\" in token) {\n return token.error;\n }\n }\n\n return undefined;\n}\n\n/**\n * Whether a path places ≥2 optional params DIRECTLY before a splat\n * (`/:a?/:b?/*rest`, `/:a<c>?/:b<c>?/*rest`, #1287). A single trie slot carries\n * only one optional→splat fork, so the outer optional's mark overwrites the\n * inner's — the omit-outer/take-inner form silently reshapes into the splat.\n *\n * A whole-path (cross-segment) property that `parseSegment` cannot decide per\n * segment — so, like `isConstraintBalanced`, it is shared verbatim between the\n * matcher's `registerTree` backstop and `route-tree`'s validation gate, and the\n * two cannot drift. Runs on the RAW path: `splitPathSegments` is constraint-aware,\n * so a `<[^/]+>` body does not break the segment split.\n */\nexport function hasMultipleOptionalsBeforeSplat(path: string): boolean {\n const segments = splitPathSegments(path);\n\n for (let i = 2; i < segments.length; i += 1) {\n if (\n segments[i].startsWith(\"*\") &&\n isOptionalParamSegment(segments[i - 1]) &&\n isOptionalParamSegment(segments[i - 2])\n ) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction isOptionalParamSegment(segment: string): boolean {\n return segment.startsWith(\":\") && segment.endsWith(\"?\");\n}\n","/**\n * Route Parameter Metadata Extraction.\n *\n * Extracts parameter metadata from route path patterns without requiring\n * a full path-parser instance. Replaces parser.urlParams/queryParams/spatParams.\n *\n * @module buildParamMeta\n */\n\nimport { CONSTRAINT_BODY_PATTERN } from \"./constraint-grammar\";\nimport { parseSegment, splitPathSegments } from \"./parseSegment\";\n\nimport type { ConstraintPattern, ParamMeta } from \"./types\";\n\n/**\n * Extracts the regex pattern from a constraint string.\n *\n * @param constraint - Constraint string (e.g., \"<\\\\d+>\")\n * @returns Regex capture group pattern (e.g., \"(\\\\d+)\")\n */\nfunction extractConstraintPattern(constraint: string): string {\n // Strip the \"<\"/\">\" delimiters. parseSegment guarantees the `<body>` shape\n // (balanced, non-empty body — #804), so a plain slice is exact — and avoids\n // the regex-strip idiom the incomplete-multi-character-sanitization SAST\n // class flags (semgrep/CodeQL).\n return `(${constraint.slice(1, -1)})`;\n}\n\n/**\n * Compiles a `<...>` constraint body to its anchored `^(…)$` matcher, rejecting a\n * body that is not a valid regular expression (`<*x>`, `<(>`, `<[>`) with a clear\n * error. Without this, an invalid body would surface as a raw V8 `SyntaxError`\n * (\"Invalid regular expression … Nothing to repeat\") deep inside tree-building\n * (`computeCaches`) OR the validation gate (both call `buildParamMeta`) — this is\n * the single constraint-compilation site, so one guard covers every consumer.\n */\nfunction compileConstraintPattern(\n constraint: string,\n paramName: string,\n): RegExp {\n try {\n return new RegExp(`^${extractConstraintPattern(constraint)}$`);\n } catch {\n throw new Error(\n `[buildParamMeta] Invalid constraint '${constraint}' on parameter '${paramName}': ` +\n `the body between '<' and '>' must be a valid regular expression (e.g. '<[0-9]+>', '<[a-z]+>').`,\n );\n }\n}\n\n/**\n * Canonical param-name character class: any char except `/`, `?`, `<`.\n *\n * **Single source of truth** for \"what characters a parameter name may contain\"\n * (#738), now consumed by the whole-path query-mask (`OPTIONAL_PARAM_MARKER_RGX`\n * below). The route-tree gate reads the per-segment grammar through `parseSegment`\n * (`findSegmentGrammarError`), not this char class. The\n * per-segment name grammar itself lives in `parseSegment` (the tokenizer this\n * module now consumes for URL-param extraction), so `match()` / `buildPath()`\n * cannot disagree on a name.\n */\nexport const PARAM_NAME_PATTERN = \"[^/?<]+\";\n\n// The optional-param marker `?` ends at a segment boundary (`/`), the start of a\n// query string (`?`, e.g. `/:id??tab`), or end of input. Including `?` in the\n// lookahead is what stops the optional marker being mistaken for the query\n// separator when a query follows an optional param directly.\nconst OPTIONAL_PARAM_MARKER_RGX = new RegExp(\n String.raw`([:*]${PARAM_NAME_PATTERN}(?:<${CONSTRAINT_BODY_PATTERN}>)?)\\?(?=[/?]|$)`,\n \"g\",\n);\n\n// Matches a `<...>` constraint body; used to neutralize `?` inside constraints\n// before query detection. Delimiter grammar derives from the single\n// `CONSTRAINT_BODY_PATTERN` atom (#804) so match/strip/build cannot desync.\n\nconst CONSTRAINT_RGX = new RegExp(`<${CONSTRAINT_BODY_PATTERN}>`, \"g\");\n\n/**\n * Regex for matching query parameters in path patterns.\n *\n * Matches query string portion after \"?\" in path.\n *\n * @example\n * ```\n * \"/search?q&page\" → matches \"q&page\"\n * ```\n */\n// eslint-disable-next-line sonarjs/super-linear-regex -- bounded input from route definitions, not user input\nconst QUERY_PARAM_RGX = /\\?(.+)$/;\n\n/**\n * Length-preserving mask used only to locate the real query separator `?`.\n *\n * Two kinds of `?` must NOT be mistaken for the query separator:\n * - the optional-param marker (`:id?`),\n * - a `?` inside a `<...>` constraint (e.g. the lazy quantifier in `:id<\\d?>`).\n *\n * Both are neutralized in place (same length, so the match index maps back onto\n * the original `path`). Without this, `/a/:id<\\d?>` was split at the constraint's\n * `?`, producing `queryParams:[\">\"]`, a truncated `pathPattern`, and a lost\n * constraint — crashing `start()` with `Missing required param` (#738).\n */\nfunction maskForQueryDetection(path: string): string {\n // Blank constraint interiors: \"<\\d?>\" → \"<xxx>\" (length preserved).\n const constraintsMasked = path.replaceAll(\n CONSTRAINT_RGX,\n (constraint) => `<${\"x\".repeat(constraint.length - 2)}>`,\n );\n\n // Replace the optional-param `?` with NUL (length preserved, never a `?`).\n return constraintsMasked.replaceAll(OPTIONAL_PARAM_MARKER_RGX, \"$1\u0000\");\n}\n\n/**\n * Builds parameter metadata from a route path pattern.\n *\n * Extracts URL parameters, query parameters, and splat parameters\n * from the path pattern string.\n *\n * @param path - Route path pattern (e.g., \"/users/:id/posts/:postId?q\")\n * @returns Parameter metadata object\n *\n * @example\n * ```typescript\n * buildParamMeta(\"/users/:id\")\n * // → {\n * // urlParams: [\"id\"],\n * // queryParams: [],\n * // spatParams: [],\n * // paramTypeMap: { id: \"url\" }\n * // }\n *\n * buildParamMeta(\"/search?q&page\")\n * // → {\n * // urlParams: [],\n * // queryParams: [\"q\", \"page\"],\n * // spatParams: [],\n * // paramTypeMap: { q: \"query\", page: \"query\" }\n * // }\n *\n * buildParamMeta(\"/files/*path\")\n * // → {\n * // urlParams: [\"path\"],\n * // queryParams: [],\n * // spatParams: [\"path\"],\n * // paramTypeMap: { path: \"url\" }\n * // }\n *\n * buildParamMeta(\"/users/:id/posts/:postId?q&page\")\n * // → {\n * // urlParams: [\"id\", \"postId\"],\n * // queryParams: [\"q\", \"page\"],\n * // spatParams: [],\n * // paramTypeMap: { id: \"url\", postId: \"url\", q: \"query\", page: \"query\" }\n * // }\n * ```\n */\n// Shared frozen sentinels for the common no-params case — avoid a fresh empty\n// array/object/Map per route (#1009). ParamMeta fields are Readonly*; match/build\n// only read them, and computeCaches' Object.freeze on the arrays/object is a\n// no-op on an already-frozen shared instance.\nconst EMPTY_PARAM_NAMES: readonly string[] = Object.freeze([]);\nconst EMPTY_PARAM_TYPE_MAP: Readonly<Record<string, \"url\" | \"query\">> =\n Object.freeze({});\nconst EMPTY_CONSTRAINTS: ReadonlyMap<string, ConstraintPattern> = new Map();\n\n// Whole-meta shared sentinel for the fully-static case: every collection is a\n// #1009 sentinel AND pathPattern degenerates to the input path itself (no query\n// to strip), so the 6-field wrapper carries zero per-route information. The\n// RETAINING caller (route-tree's computeCaches) swaps a matching fresh result\n// for this instance — buildParamMeta itself keeps returning fresh objects so\n// the validation gate can read the real pathPattern of arbitrary input paths.\n// `pathPattern` is \"\" here; the one stored-meta reader (`registerNode`) falls\n// back to `node.path` on identity match.\nexport const EMPTY_PARAM_META: ParamMeta = Object.freeze({\n urlParams: EMPTY_PARAM_NAMES,\n queryParams: EMPTY_PARAM_NAMES,\n spatParams: EMPTY_PARAM_NAMES,\n paramTypeMap: EMPTY_PARAM_TYPE_MAP,\n constraintPatterns: EMPTY_CONSTRAINTS,\n pathPattern: \"\",\n});\n\n/**\n * Extracts URL/splat params + constraints from a path's segments into the given\n * accumulators via the canonical `parseSegment` tokenizer (RFC Phase 2). Split\n * out of `buildParamMeta` so the builder stays under the cognitive-complexity\n * budget (like `shareEmptyCollections`). A malformed segment (token errors) or a\n * `static` segment contributes nothing — a malformed route is rejected downstream\n * before it compiles, so its meta is moot (this includes the #1324 trailing-marker\n * family the old whole-path scan swallowed into a param name: the enumerated §8\n * flip, affecting only that dead route's unused meta until the trie migrates).\n */\nfunction collectUrlParams(\n path: string,\n urlParams: string[],\n spatParams: string[],\n paramTypeMap: Record<string, \"url\" | \"query\">,\n constraintPatterns: Map<string, ConstraintPattern>,\n): void {\n for (const segment of splitPathSegments(path)) {\n if (segment.length === 0) {\n continue;\n }\n\n const token = parseSegment(segment);\n\n if (\"error\" in token || token.kind === \"static\") {\n continue;\n }\n\n urlParams.push(token.name);\n paramTypeMap[token.name] = \"url\";\n\n if (token.kind === \"splat\") {\n spatParams.push(token.name);\n } else if (token.constraint !== undefined) {\n constraintPatterns.set(token.name, {\n pattern: compileConstraintPattern(token.constraint, token.name),\n constraint: token.constraint,\n });\n }\n }\n}\n\nexport function buildParamMeta(path: string): ParamMeta {\n const urlParams: string[] = [];\n const queryParams: string[] = [];\n const spatParams: string[] = [];\n const paramTypeMap: Record<string, \"url\" | \"query\"> = {};\n const constraintPatterns = new Map<string, ConstraintPattern>();\n\n // Locate the real query separator on a length-preserving mask (so the index\n // maps back onto `path`) that hides the optional-param `?` marker and any `?`\n // inside a `<...>` constraint.\n const queryMatch = QUERY_PARAM_RGX.exec(maskForQueryDetection(path));\n\n if (queryMatch !== null) {\n const queryString = path.slice(queryMatch.index + 1);\n const params = queryString.split(\"&\");\n\n for (const param of params) {\n const paramName = param.trim();\n\n if (paramName.length > 0) {\n queryParams.push(paramName);\n paramTypeMap[paramName] = \"query\";\n }\n }\n\n path = path.slice(0, queryMatch.index);\n }\n\n collectUrlParams(\n path,\n urlParams,\n spatParams,\n paramTypeMap,\n constraintPatterns,\n );\n\n return shareEmptyCollections(\n urlParams,\n queryParams,\n spatParams,\n paramTypeMap,\n constraintPatterns,\n path,\n );\n}\n\n// #1009: swap each freshly-built empty collection for a shared frozen sentinel\n// — factored out of buildParamMeta so the hot builder stays under the cognitive-\n// complexity budget. match/build only read these (Readonly*), and computeCaches'\n// Object.freeze is a no-op on an already-frozen shared instance.\nfunction shareEmptyCollections(\n urlParams: string[],\n queryParams: string[],\n spatParams: string[],\n paramTypeMap: Record<string, \"url\" | \"query\">,\n constraintPatterns: Map<string, ConstraintPattern>,\n pathPattern: string,\n): ParamMeta {\n return {\n urlParams: urlParams.length === 0 ? EMPTY_PARAM_NAMES : urlParams,\n queryParams: queryParams.length === 0 ? EMPTY_PARAM_NAMES : queryParams,\n spatParams: spatParams.length === 0 ? EMPTY_PARAM_NAMES : spatParams,\n paramTypeMap:\n urlParams.length === 0 && queryParams.length === 0\n ? EMPTY_PARAM_TYPE_MAP\n : paramTypeMap,\n constraintPatterns:\n constraintPatterns.size === 0 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AM,CAEvB,IAAM,EADc,EAAK,MAAM,EAAW,MAAQ,CACzB,CAAC,CAAC,MAAM,GAAG,EAEpC,IAAK,IAAM,KAAS,EAAQ,CAC1B,IAAM,EAAY,EAAM,KAAK,EAEzB,EAAU,OAAS,IACrB,EAAY,KAAK,CAAS,EAC1B,EAAa,GAAa,QAE9B,CAEA,EAAO,EAAK,MAAM,EAAG,EAAW,KAAK,CACvC,CAUA,OARA,EACE,EACA,EACA,EACA,EACA,CACF,EAEO,EACL,EACA,EACA,EACA,EACA,EACA,CACF,CACF,CAMA,SAAS,EACP,EACA,EACA,EACA,EACA,EACA,EACW,CACX,MAAO,CACL,UAAW,EAAU,SAAW,EAAI,EAAoB,EACxD,YAAa,EAAY,SAAW,EAAI,EAAoB,EAC5D,WAAY,EAAW,SAAW,EAAI,EAAoB,EAC1D,aACE,EAAU,SAAW,GAAK,EAAY,SAAW,EAC7C,EACA,EACN,mBACE,EAAmB,OAAS,EAAI,EAAoB,EACtD,aACF,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-xg2zHVF6.d.mts","names":[],"sources":["../../src/engine/path-matcher/types.ts","../../src/engine/builder/types.ts"],"mappings":";;AAeA;;;;;;;;AAaqB;UAbJ,iBAAA;EAmBS;;;;;EAAA,SAbf,OAAA,EAAS,MAAM;EAyDgB;;;;;EAAA,SAlD/B,UAAA;AAAA;;;;UAMM,SAAA;EAmDN;;AAAW;AAetB;;EAfW,SA7CA,SAAA;EA4DsB;AAAA;AAMjC;;;EANiC,SArDtB,WAAA;EAgEU;;;;;EAAA,SAzDV,UAAA;EA4DsB;;;;;EAAA,SArDtB,YAAA,EAAc,QAAA,CAAS,MAAA;EAkDb;;;;;;;;;;AAGmB;AAwCxC;;;;EA3CqB,SAjCV,kBAAA,EAAoB,WAAA,SAAoB,iBAAA;EAsIlC;;;;;EAAA,SA/HN,WAAA;AAAA;;;;;;;;;KAeC,qBAAA;AAAA,UAMK,gBAAA;EAAA,SACN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