@ooneex/url 1.2.3 → 1.2.4
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 +11 -3
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,14 @@ import { LocaleType as LocaleType2 } from "@ooneex/translation";
|
|
|
2
2
|
import { ScalarType as ScalarType2 } from "@ooneex/types";
|
|
3
3
|
import { LocaleType } from "@ooneex/translation";
|
|
4
4
|
import { ScalarType } from "@ooneex/types";
|
|
5
|
+
type UrlQueriesType = Record<string, ScalarType> & {
|
|
6
|
+
lang?: LocaleType;
|
|
7
|
+
page?: number;
|
|
8
|
+
limit?: number;
|
|
9
|
+
order?: "ASC" | "DESC";
|
|
10
|
+
orderBy?: string;
|
|
11
|
+
q?: string;
|
|
12
|
+
};
|
|
5
13
|
interface IReadonlyUrl {
|
|
6
14
|
getNative: () => URL;
|
|
7
15
|
getProtocol: () => string;
|
|
@@ -10,7 +18,7 @@ interface IReadonlyUrl {
|
|
|
10
18
|
getHostname: () => string;
|
|
11
19
|
getPort: () => number;
|
|
12
20
|
getPath: () => string;
|
|
13
|
-
getQueries: () =>
|
|
21
|
+
getQueries: () => UrlQueriesType;
|
|
14
22
|
getFragment: () => string;
|
|
15
23
|
getBase: () => string;
|
|
16
24
|
getOrigin: () => string;
|
|
@@ -30,7 +38,7 @@ interface IUrl extends IReadonlyUrl {
|
|
|
30
38
|
setPath: (path: string) => IUrl;
|
|
31
39
|
setFragment: (fragment: string) => IUrl;
|
|
32
40
|
addQuery: (key: string, value: ScalarType) => IUrl;
|
|
33
|
-
setQueries: (queries:
|
|
41
|
+
setQueries: (queries: UrlQueriesType) => IUrl;
|
|
34
42
|
removeQuery: (key: string) => IUrl;
|
|
35
43
|
clearQueries: () => IUrl;
|
|
36
44
|
}
|
|
@@ -82,4 +90,4 @@ declare class Url extends ReadonlyUrl implements IUrl {
|
|
|
82
90
|
private shouldShowPort;
|
|
83
91
|
private buildQueryString;
|
|
84
92
|
}
|
|
85
|
-
export { Url, ReadonlyUrl, IUrl, IReadonlyUrl };
|
|
93
|
+
export { UrlQueriesType, Url, ReadonlyUrl, IUrl, IReadonlyUrl };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ooneex/url",
|
|
3
3
|
"description": "URL parsing and manipulation library with query string handling, path normalization, and route parameter extraction for web applications",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"npm:publish": "bun publish --tolerate-republish --force --production --access public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@ooneex/utils": "0.4.
|
|
31
|
+
"@ooneex/utils": "0.4.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@ooneex/types": "1.1.
|
|
35
|
-
"@ooneex/translation": "1.1.
|
|
34
|
+
"@ooneex/types": "1.1.3",
|
|
35
|
+
"@ooneex/translation": "1.1.4"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
38
|
"bun",
|