@adonisjs/http-server 8.0.0-next.9 → 8.0.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/build/define_config-D-kQXU0e.js +2438 -0
- package/build/factories/http_context.d.ts +10 -4
- package/build/factories/main.d.ts +2 -2
- package/build/factories/main.js +170 -345
- package/build/factories/request.d.ts +4 -4
- package/build/factories/response.d.ts +4 -4
- package/build/factories/router.d.ts +1 -1
- package/build/factories/server_factory.d.ts +1 -1
- package/build/factories/url_builder_factory.d.ts +3 -3
- package/build/helpers-C_2HouOe.js +52 -0
- package/build/index.d.ts +2 -2
- package/build/index.js +155 -373
- package/build/src/client/helpers.d.ts +37 -0
- package/build/src/client/types.d.ts +194 -0
- package/build/src/client/url_builder.d.ts +15 -0
- package/build/src/client/url_builder.js +115 -0
- package/build/src/cookies/client.d.ts +28 -5
- package/build/src/cookies/drivers/encrypted.d.ts +1 -1
- package/build/src/cookies/drivers/signed.d.ts +1 -1
- package/build/src/cookies/parser.d.ts +1 -1
- package/build/src/cookies/serializer.d.ts +2 -2
- package/build/src/debug.d.ts +14 -1
- package/build/src/define_config.d.ts +19 -1
- package/build/src/define_middleware.d.ts +19 -3
- package/build/src/errors.d.ts +60 -5
- package/build/src/exception_handler.d.ts +28 -8
- package/build/src/helpers.d.ts +5 -17
- package/build/src/helpers.js +76 -24
- package/build/src/http_context/main.d.ts +67 -17
- package/build/src/qs.d.ts +17 -3
- package/build/src/redirect.d.ts +22 -3
- package/build/src/request.d.ts +12 -5
- package/build/src/response.d.ts +5 -5
- package/build/src/response_status.d.ts +14 -0
- package/build/src/router/main.d.ts +6 -2
- package/build/src/router/route.d.ts +130 -32
- package/build/src/router/signed_url_builder.d.ts +1 -1
- package/build/src/server/main.d.ts +6 -6
- package/build/src/types/main.js +1 -0
- package/build/src/types/response.d.ts +6 -1
- package/build/src/types/route.d.ts +3 -27
- package/build/src/types/url_builder.d.ts +2 -140
- package/build/src/utils.d.ts +71 -6
- package/build/types-AUwURgIL.js +1 -0
- package/build/utils-BjSHKI3s.js +618 -0
- package/package.json +55 -46
- package/build/chunk-CVZAIRWJ.js +0 -1222
- package/build/chunk-JD6QW4NQ.js +0 -4428
- package/build/src/router/url_builder.d.ts +0 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Logger } from '@adonisjs/logger';
|
|
2
2
|
import type { LazyImport } from '@poppinss/utils/types';
|
|
3
|
-
import type { Encryption } from '@
|
|
3
|
+
import type { Encryption } from '@boringnode/encryption';
|
|
4
4
|
import type { Server as HttpsServer } from 'node:https';
|
|
5
5
|
import type { Application } from '@adonisjs/application';
|
|
6
6
|
import type { EmitterLike } from '@adonisjs/events/types';
|
|
@@ -8,9 +8,9 @@ import { type ContainerResolver } from '@adonisjs/fold';
|
|
|
8
8
|
import type { ServerResponse, IncomingMessage, Server as HttpServer } from 'node:http';
|
|
9
9
|
import type { MiddlewareAsClass, ParsedGlobalMiddleware } from '../types/middleware.ts';
|
|
10
10
|
import type { ServerConfig, HttpServerEvents, ErrorHandlerAsAClass, TestingMiddlewarePipeline } from '../types/server.ts';
|
|
11
|
-
import {
|
|
12
|
-
import { Response } from '../response.ts';
|
|
11
|
+
import { HttpRequest } from '../request.ts';
|
|
13
12
|
import { Router } from '../router/main.ts';
|
|
13
|
+
import { HttpResponse } from '../response.ts';
|
|
14
14
|
import { HttpContext } from '../http_context/main.ts';
|
|
15
15
|
/**
|
|
16
16
|
* The Server class provides the core HTTP server implementation for AdonisJS.
|
|
@@ -105,7 +105,7 @@ export declare class Server {
|
|
|
105
105
|
* @param res - Node.js ServerResponse
|
|
106
106
|
* @returns New Request instance
|
|
107
107
|
*/
|
|
108
|
-
createRequest(req: IncomingMessage, res: ServerResponse):
|
|
108
|
+
createRequest(req: IncomingMessage, res: ServerResponse): HttpRequest;
|
|
109
109
|
/**
|
|
110
110
|
* Creates a Response instance from Node.js request/response objects
|
|
111
111
|
*
|
|
@@ -113,7 +113,7 @@ export declare class Server {
|
|
|
113
113
|
* @param res - Node.js ServerResponse
|
|
114
114
|
* @returns New Response instance
|
|
115
115
|
*/
|
|
116
|
-
createResponse(req: IncomingMessage, res: ServerResponse):
|
|
116
|
+
createResponse(req: IncomingMessage, res: ServerResponse): HttpResponse;
|
|
117
117
|
/**
|
|
118
118
|
* Creates an HttpContext instance with request-specific logger
|
|
119
119
|
*
|
|
@@ -122,7 +122,7 @@ export declare class Server {
|
|
|
122
122
|
* @param resolver - Container resolver for dependency injection
|
|
123
123
|
* @returns New HttpContext instance
|
|
124
124
|
*/
|
|
125
|
-
createHttpContext(request:
|
|
125
|
+
createHttpContext(request: HttpRequest, response: HttpResponse, resolver: ContainerResolver<any>): HttpContext;
|
|
126
126
|
/**
|
|
127
127
|
* Gets the list of registered global middleware
|
|
128
128
|
*
|
package/build/src/types/main.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -30,6 +30,11 @@ export type CastableHeader = string | number | boolean | string[] | number[] | b
|
|
|
30
30
|
* Configuration options for HTTP response handling and processing
|
|
31
31
|
*/
|
|
32
32
|
export type ResponseConfig = {
|
|
33
|
+
/**
|
|
34
|
+
* Define a custom serializer to serialize the response body
|
|
35
|
+
* to a JSON string
|
|
36
|
+
*/
|
|
37
|
+
serializeJSON(payload: unknown): string | undefined;
|
|
33
38
|
/**
|
|
34
39
|
* Whether or not to generate etags for responses. Etags can be
|
|
35
40
|
* enabled/disabled when sending response as well.
|
|
@@ -51,4 +56,4 @@ export type ResponseConfig = {
|
|
|
51
56
|
/**
|
|
52
57
|
* A readable stream that can be piped to the response stream method
|
|
53
58
|
*/
|
|
54
|
-
export type ResponseStream = Readable
|
|
59
|
+
export type ResponseStream = Readable | ReadableStream<any>;
|
|
@@ -4,6 +4,7 @@ import type { Constructor, LazyImport } from '@poppinss/utils/types';
|
|
|
4
4
|
import type { ServerErrorHandler } from './server.ts';
|
|
5
5
|
import type { HttpContext } from '../http_context/main.ts';
|
|
6
6
|
import type { MiddlewareFn, ParsedGlobalMiddleware } from './middleware.ts';
|
|
7
|
+
import { type ClientRouteJSON, type ClientRouteMatchItTokens } from '../client/types.ts';
|
|
7
8
|
/**
|
|
8
9
|
* Configuration for matching and casting route parameters
|
|
9
10
|
*/
|
|
@@ -16,16 +17,7 @@ export type RouteMatcher = {
|
|
|
16
17
|
/**
|
|
17
18
|
* Route token structure used internally by the matchit routing library
|
|
18
19
|
*/
|
|
19
|
-
export type MatchItRouteToken = RouteMatcher &
|
|
20
|
-
/** Original token string */
|
|
21
|
-
old: string;
|
|
22
|
-
/** Token type identifier (0=static, 1=param, 2=wildcard, 3=optional) */
|
|
23
|
-
type: 0 | 1 | 2 | 3;
|
|
24
|
-
/** Token value */
|
|
25
|
-
val: string;
|
|
26
|
-
/** Token end delimiter */
|
|
27
|
-
end: string;
|
|
28
|
-
};
|
|
20
|
+
export type MatchItRouteToken = RouteMatcher & ClientRouteMatchItTokens;
|
|
29
21
|
/**
|
|
30
22
|
* Extracts method names from a controller class that accept HttpContext as first parameter
|
|
31
23
|
*/
|
|
@@ -120,20 +112,12 @@ export type RouteMatchers = {
|
|
|
120
112
|
/**
|
|
121
113
|
* Complete route definition with all metadata, handlers, and execution context
|
|
122
114
|
*/
|
|
123
|
-
export type RouteJSON = {
|
|
115
|
+
export type RouteJSON = Pick<ClientRouteJSON, 'name' | 'methods' | 'domain' | 'pattern'> & {
|
|
124
116
|
/**
|
|
125
117
|
* The execute function to execute the route middleware
|
|
126
118
|
* and the handler
|
|
127
119
|
*/
|
|
128
120
|
execute: (route: RouteJSON, resolver: ContainerResolver<any>, ctx: HttpContext, errorResponder: ServerErrorHandler['handle']) => any;
|
|
129
|
-
/**
|
|
130
|
-
* A unique name for the route
|
|
131
|
-
*/
|
|
132
|
-
name?: string;
|
|
133
|
-
/**
|
|
134
|
-
* Route URI pattern
|
|
135
|
-
*/
|
|
136
|
-
pattern: string;
|
|
137
121
|
/**
|
|
138
122
|
* Route handler
|
|
139
123
|
*/
|
|
@@ -150,14 +134,6 @@ export type RouteJSON = {
|
|
|
150
134
|
* Tokens to be used to construct the route URL
|
|
151
135
|
*/
|
|
152
136
|
tokens: MatchItRouteToken[];
|
|
153
|
-
/**
|
|
154
|
-
* HTTP methods, the route responds to.
|
|
155
|
-
*/
|
|
156
|
-
methods: string[];
|
|
157
|
-
/**
|
|
158
|
-
* The domain for which the route is registered.
|
|
159
|
-
*/
|
|
160
|
-
domain: string;
|
|
161
137
|
/**
|
|
162
138
|
* Matchers for route params.
|
|
163
139
|
*/
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
4
|
-
import { type Prettify } from '@poppinss/utils/types';
|
|
5
|
-
/**
|
|
6
|
-
* Configuration options for URL generation helpers
|
|
7
|
-
*/
|
|
8
|
-
export type URLOptions = {
|
|
9
|
-
/** Query string parameters to append to the URL */
|
|
10
|
-
qs?: Record<string, any>;
|
|
11
|
-
/** URL prefix to prepend to the generated URL */
|
|
12
|
-
prefixUrl?: string;
|
|
13
|
-
};
|
|
1
|
+
import { type UrlFor, type LookupList, type URLOptions, type LookupListRoute, type RouteBuilderArguments } from '../client/types.ts';
|
|
2
|
+
export { URLOptions, LookupListRoute, RouteBuilderArguments, LookupList, UrlFor };
|
|
14
3
|
/**
|
|
15
4
|
* Configuration options for signed URL generation helpers
|
|
16
5
|
*/
|
|
@@ -20,133 +9,6 @@ export type SignedURLOptions = URLOptions & {
|
|
|
20
9
|
/** Purpose identifier for the signed URL */
|
|
21
10
|
purpose?: string;
|
|
22
11
|
};
|
|
23
|
-
/**
|
|
24
|
-
* Utility type that constructs function arguments for route URL builders based on route parameters
|
|
25
|
-
*/
|
|
26
|
-
export type RouteBuilderArguments<Identifier, Route, Options extends any = URLOptions> = Route extends LookupListRoute ? Prettify<Route['params'] extends undefined ? [identifier: Identifier, params?: undefined, options?: Options] : [undefined] extends [Route['params']] ? [
|
|
27
|
-
identifier: Identifier,
|
|
28
|
-
params?: Route['params'] | Route['paramsTuple'],
|
|
29
|
-
options?: Options
|
|
30
|
-
] : [
|
|
31
|
-
identifier: Identifier,
|
|
32
|
-
params: Route['params'] | Route['paramsTuple'],
|
|
33
|
-
options?: Options
|
|
34
|
-
]> : never;
|
|
35
|
-
/**
|
|
36
|
-
* LookupList type is used by the URLBuilder to provide
|
|
37
|
-
* type-safety when creating URLs.
|
|
38
|
-
*
|
|
39
|
-
* There is no runtime property that matches this type. Its
|
|
40
|
-
* purely for type-inference.
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* Route definition structure for type-safe URL building
|
|
44
|
-
*/
|
|
45
|
-
export type LookupListRoute = {
|
|
46
|
-
/** Parameters as a tuple for positional arguments */
|
|
47
|
-
paramsTuple?: [...any[]];
|
|
48
|
-
/** Parameters as a named object */
|
|
49
|
-
params?: {
|
|
50
|
-
[name: string]: any;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Complete route lookup structure organized by HTTP methods and route identifiers
|
|
55
|
-
*/
|
|
56
|
-
export type LookupList = {
|
|
57
|
-
/** HTTP method to route mapping */
|
|
58
|
-
[method: string]: {
|
|
59
|
-
/** Route identifier to route definition mapping */
|
|
60
|
-
[identifier: string]: LookupListRoute;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* The urlFor helper is used to make URLs for pre-existing known routes. You can
|
|
65
|
-
* make a URL using the route name, route pattern, or the route controller
|
|
66
|
-
* reference (depends upon enabled lookupStrategies)
|
|
67
|
-
*
|
|
68
|
-
* ```ts
|
|
69
|
-
* urlFor('users.show', [1]) // /users/1
|
|
70
|
-
*
|
|
71
|
-
* // Lookup inside a specific domain
|
|
72
|
-
* urlFor('blog.adonisjs.com@posts.show', [1]) // /posts/1
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
export type UrlFor<Routes extends LookupList, Options extends any = URLOptions> = (<Identifier extends keyof Routes['ALL'] & string>(...[identifier, params, options]: RouteBuilderArguments<Identifier, Routes['ALL'][Identifier], Options>) => string) & {
|
|
76
|
-
/**
|
|
77
|
-
* Make URL for a GET route. An error will be raised if the route doesn't
|
|
78
|
-
* exist.
|
|
79
|
-
*
|
|
80
|
-
* ```ts
|
|
81
|
-
* urlFor.get('users.show', [1]) // { method: 'get', url: '/users/1' }
|
|
82
|
-
* urlFor.get('users.store', [1]) // Error: Route not found GET@users/store
|
|
83
|
-
* ```
|
|
84
|
-
*/
|
|
85
|
-
get<RouteIdentifier extends keyof Routes['GET'] & string>(...[identifier, params, options]: RouteBuilderArguments<RouteIdentifier, Routes['GET'][RouteIdentifier], Options>): {
|
|
86
|
-
method: 'get';
|
|
87
|
-
url: string;
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Make URL for a POST route. An error will be raised if the route doesn't
|
|
91
|
-
* exist.
|
|
92
|
-
*
|
|
93
|
-
* ```ts
|
|
94
|
-
* urlFor.post('users.store') // { method: 'post', url: '/users' }
|
|
95
|
-
* urlFor.post('users.show', [1]) // Error: Route not found POST@users.show
|
|
96
|
-
* ```
|
|
97
|
-
*/
|
|
98
|
-
post<RouteIdentifier extends keyof Routes['POST'] & string>(...[identifier, params, options]: RouteBuilderArguments<RouteIdentifier, Routes['POST'][RouteIdentifier], Options>): {
|
|
99
|
-
method: 'post';
|
|
100
|
-
url: string;
|
|
101
|
-
};
|
|
102
|
-
/**
|
|
103
|
-
* Make URL for a PUT route. An error will be raised if the route doesn't
|
|
104
|
-
* exist.
|
|
105
|
-
*
|
|
106
|
-
* ```ts
|
|
107
|
-
* urlFor.put('users.update', [1]) // { method: 'put', url: '/users/1' }
|
|
108
|
-
* urlFor.put('users.show', [1]) // Error: Route not found PUT@users.show
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
put<RouteIdentifier extends keyof Routes['PUT'] & string>(...[identifier, params, options]: RouteBuilderArguments<RouteIdentifier, Routes['PUT'][RouteIdentifier], Options>): {
|
|
112
|
-
method: 'put';
|
|
113
|
-
url: string;
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* Make URL for a PATCH route. An error will be raised if the route doesn't
|
|
117
|
-
* exist.
|
|
118
|
-
*
|
|
119
|
-
* ```ts
|
|
120
|
-
* urlFor.put('users.update', [1]) // { method: 'patch', url: '/users/1' }
|
|
121
|
-
* urlFor.put('users.show', [1]) // Error: Route not found PATCH@users.show
|
|
122
|
-
* ```
|
|
123
|
-
*/
|
|
124
|
-
patch<RouteIdentifier extends keyof Routes['PATCH'] & string>(...[identifier, params, options]: RouteBuilderArguments<RouteIdentifier, Routes['PATCH'][RouteIdentifier], Options>): {
|
|
125
|
-
method: 'patch';
|
|
126
|
-
url: string;
|
|
127
|
-
};
|
|
128
|
-
/**
|
|
129
|
-
* Make URL for a DELETE route. An error will be raised if the route doesn't
|
|
130
|
-
* exist.
|
|
131
|
-
*
|
|
132
|
-
* ```ts
|
|
133
|
-
* urlFor.delete('users.destroy', [1]) // { method: 'delete', url: '/users/1' }
|
|
134
|
-
* urlFor.delete('users.show', [1]) // Error: Route not found DELETE@users.show
|
|
135
|
-
* ```
|
|
136
|
-
*/
|
|
137
|
-
delete<RouteIdentifier extends keyof Routes['DELETE'] & string>(...[identifier, params, options]: RouteBuilderArguments<RouteIdentifier, Routes['DELETE'][RouteIdentifier], Options>): {
|
|
138
|
-
method: 'delete';
|
|
139
|
-
url: string;
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* Make URL for a custom route method. An error will be raised if the route doesn't
|
|
143
|
-
* exist for the same method.
|
|
144
|
-
*/
|
|
145
|
-
method<Method extends keyof Routes & string, RouteIdentifier extends keyof Routes[Method] & string>(method: Method, ...[identifier, params, options]: RouteBuilderArguments<RouteIdentifier, Routes[Method][RouteIdentifier], Options>): {
|
|
146
|
-
method: Method;
|
|
147
|
-
url: string;
|
|
148
|
-
};
|
|
149
|
-
};
|
|
150
12
|
/**
|
|
151
13
|
* Utility type to extract routes for a specific HTTP method from the routes collection
|
|
152
14
|
*/
|
package/build/src/utils.d.ts
CHANGED
|
@@ -4,23 +4,88 @@ import { BriskRoute } from './router/brisk.ts';
|
|
|
4
4
|
import type { RouteJSON } from './types/route.ts';
|
|
5
5
|
import { RouteResource } from './router/resource.ts';
|
|
6
6
|
/**
|
|
7
|
-
* Makes input string consistent by having only the starting
|
|
8
|
-
*
|
|
7
|
+
* Makes input string consistent by having only the starting slash.
|
|
8
|
+
*
|
|
9
|
+
* Removes trailing slashes and ensures the path starts with a forward slash,
|
|
10
|
+
* except for the root path '/' which remains unchanged.
|
|
11
|
+
*
|
|
12
|
+
* @param input - The input path string to normalize
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* dropSlash('/users/') // '/users'
|
|
17
|
+
* dropSlash('users') // '/users'
|
|
18
|
+
* dropSlash('/') // '/'
|
|
19
|
+
* ```
|
|
9
20
|
*/
|
|
10
21
|
export declare function dropSlash(input: string): string;
|
|
11
22
|
/**
|
|
12
|
-
* Returns a flat list of routes from
|
|
23
|
+
* Returns a flat list of routes from route groups, resources, and brisk routes.
|
|
24
|
+
*
|
|
25
|
+
* This function recursively processes route collections, extracting individual routes
|
|
26
|
+
* from groups and resources while filtering out any deleted routes.
|
|
27
|
+
*
|
|
28
|
+
* @param routes - Array containing route groups, individual routes, resources, and brisk routes
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const flatRoutes = toRoutesJSON([
|
|
33
|
+
* routeGroup,
|
|
34
|
+
* singleRoute,
|
|
35
|
+
* resourceRoutes
|
|
36
|
+
* ])
|
|
37
|
+
* ```
|
|
13
38
|
*/
|
|
14
39
|
export declare function toRoutesJSON(routes: (RouteGroup | Route | RouteResource | BriskRoute)[]): RouteJSON[];
|
|
15
40
|
/**
|
|
16
|
-
* Helper to
|
|
17
|
-
*
|
|
41
|
+
* Helper to determine if a remote address should be trusted.
|
|
42
|
+
*
|
|
43
|
+
* Uses caching to avoid repeated expensive proxy function calls for the same
|
|
44
|
+
* remote address. The cache improves performance when the same addresses are
|
|
45
|
+
* checked multiple times.
|
|
46
|
+
*
|
|
47
|
+
* @param remoteAddress - The remote IP address to check
|
|
48
|
+
* @param proxyFn - Function that determines if an address should be trusted
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const isTrusted = trustProxy('192.168.1.1', proxyAddr.compile('loopback'))
|
|
53
|
+
* ```
|
|
18
54
|
*/
|
|
19
55
|
export declare function trustProxy(remoteAddress: string, proxyFn: (addr: string, distance: number) => boolean): boolean;
|
|
20
56
|
/**
|
|
21
|
-
* Parses a range expression
|
|
57
|
+
* Parses a range expression (e.g., '200..299') into an object with numeric keys.
|
|
58
|
+
*
|
|
59
|
+
* Supports both single values and ranges. For ranges, all numbers between
|
|
60
|
+
* the start and end (inclusive) are mapped to the provided value.
|
|
61
|
+
*
|
|
62
|
+
* @param range - Range expression as a string (e.g., '200', '200..299')
|
|
63
|
+
* @param value - Value to assign to each number in the range
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* parseRange('200', 'success') // { 200: 'success' }
|
|
68
|
+
* parseRange('200..202', 'success') // { 200: 'success', 201: 'success', 202: 'success' }
|
|
69
|
+
* ```
|
|
22
70
|
*/
|
|
23
71
|
export declare function parseRange<T>(range: string, value: T): Record<number, T>;
|
|
72
|
+
/**
|
|
73
|
+
* Safely decodes a URI path while handling special characters and query strings.
|
|
74
|
+
*
|
|
75
|
+
* This function carefully parses and decodes URI components, handling edge cases
|
|
76
|
+
* like double-encoded characters and non-standard query string delimiters.
|
|
77
|
+
* It separates the pathname from query parameters and determines whether
|
|
78
|
+
* route parameters should be decoded.
|
|
79
|
+
*
|
|
80
|
+
* @param path - The URI path to decode
|
|
81
|
+
* @param useSemicolonDelimiter - Whether to treat semicolons as query string delimiters
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* const result = safeDecodeURI('/users/123?name=john', false)
|
|
86
|
+
* // Returns: { pathname: '/users/123', query: 'name=john', shouldDecodeParam: false }
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
24
89
|
export declare function safeDecodeURI(path: string, useSemicolonDelimiter: boolean): {
|
|
25
90
|
pathname: string;
|
|
26
91
|
query: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|