@revojs/server 0.2.3 → 0.2.5
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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/package.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export declare function useHeadersAsync<T extends StandardSchemaV1>(scope: Scope
|
|
|
75
75
|
export declare function useQuery(scope: Scope): Record<string, string>;
|
|
76
76
|
export declare function useQuery<T extends StandardSchemaV1>(scope: Scope, schema: T): StandardSchemaV1.InferOutput<T>;
|
|
77
77
|
export declare function useQueryAsync<T extends StandardSchemaV1>(scope: Scope, schema: T): Promise<StandardSchemaV1.InferOutput<T>>;
|
|
78
|
-
export declare function withQuery(scope: Scope, input: string, query: Record<string, string>): string;
|
|
78
|
+
export declare function withQuery(scope: Scope, input: string, query: Record<string, string> | URLSearchParams): string;
|
|
79
79
|
export declare function useBody(scope: Scope): Promise<Record<string, unknown>>;
|
|
80
80
|
export declare function useBody<T extends StandardSchemaV1>(scope: Scope, schema: T): Promise<StandardSchemaV1.InferOutput<T>>;
|
|
81
81
|
export declare function useBodyAsync<T extends StandardSchemaV1>(scope: Scope, schema: T): Promise<StandardSchemaV1.InferOutput<T>>;
|
package/dist/index.js
CHANGED
|
@@ -78,7 +78,7 @@ function useQueryAsync(scope, schema) {
|
|
|
78
78
|
}
|
|
79
79
|
function withQuery(scope, input, query) {
|
|
80
80
|
const url = new URL(input, useUrl(scope));
|
|
81
|
-
for (const name
|
|
81
|
+
for (const [name, value] of new URLSearchParams(query)) url.searchParams.set(name, value);
|
|
82
82
|
return url.href;
|
|
83
83
|
}
|
|
84
84
|
async function readBody(request) {
|
package/dist/package.js
CHANGED