403Webshell
Server IP : 159.203.156.69  /  Your IP : 216.73.217.172
Web Server : nginx/1.24.0
System : Linux main-ubuntu 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/tanviranik.com/node_modules/vinext/dist/server/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/tanviranik.com/node_modules/vinext/dist/server/normalize-path.d.ts
//#region src/server/normalize-path.d.ts
/**
 * Re-encode path delimiter characters that were decoded by decodeURIComponent.
 * After decoding a URL segment, characters like / # ? \ need to be re-encoded
 * so they don't change the path structure.
 *
 * Ported from Next.js: packages/next/src/shared/lib/router/utils/escape-path-delimiters.ts
 * https://github.com/vercel/next.js/blob/canary/packages/next/src/shared/lib/router/utils/escape-path-delimiters.ts
 */
declare function escapePathDelimiters(segment: string, escapeEncoded?: boolean): string;
/**
 * Decode a URL pathname segment-by-segment, preserving encoded path delimiters.
 * Non-ASCII characters (e.g. %C3%A9 -> e) are decoded, but structural characters
 * like %2F (/) %23 (#) %3F (?) %5C (\) are re-encoded after decoding.
 *
 * This prevents encoded slashes from changing the path structure (e.g.
 * /admin%2Fpanel stays as a single segment, not /admin/panel).
 *
 * Ported from Next.js: packages/next/src/server/lib/router-utils/decode-path-params.ts
 * https://github.com/vercel/next.js/blob/canary/packages/next/src/server/lib/router-utils/decode-path-params.ts
 */
declare function decodePathParams(pathname: string): string;
/**
 * Path normalization utility for request handling.
 *
 * Normalizes URL pathnames to a canonical form BEFORE any matching occurs
 * (middleware, routing, redirects, rewrites). This ensures middleware and
 * the router always see the same path, preventing path-confusion issues like
 * double-slash mismatches.
 *
 * Normalization rules:
 *  1. Collapse consecutive slashes: //foo///bar → /foo/bar
 *  2. Resolve single-dot segments:  /foo/./bar  → /foo/bar
 *  3. Resolve double-dot segments:  /foo/../bar → /bar
 *  4. Ensure leading slash:         foo/bar     → /foo/bar
 *  5. Preserve root:                /           → /
 *
 * This function does NOT:
 *  - Strip or add trailing slashes (handled separately by trailingSlash config)
 *  - Decode percent-encoded characters (callers should decode before calling this)
 *  - Lowercase the path (route matching is case-sensitive)
 */
declare function normalizePath(pathname: string): string;
//#endregion
export { decodePathParams, escapePathDelimiters, normalizePath };
//# sourceMappingURL=normalize-path.d.ts.map

Youez - 2016 - github.com/yon3zu
LinuXploit