@privy-io/urls 0.0.3 → 0.0.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/cjs/index.js +1 -1
- package/dist/dts/index.d.mts +15 -8
- package/dist/dts/index.d.ts +15 -8
- package/dist/esm/index.mjs +1 -1
- package/package.json +18 -27
- package/dist/cjs/construct-url.js +0 -1
- package/dist/esm/construct-url.mjs +0 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=({origin:e,path:t,query:n={},hash:r={}})=>{let i=e.endsWith(`/`)?e:`${e}/`,a=new URL(t,i);for(let[e,t]of Object.entries(n))t!==void 0&&a.searchParams.set(e,t);let o=Object.entries(r);if(o.length>0){let e=new URLSearchParams;for(let[t,n]of o)n!==void 0&&e.append(t,n);a.hash=e.toString()}return a.href};exports.VERSION=`__VERSION__`,exports.constructURL=e;
|
package/dist/dts/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/construct-url.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Constructs a URL given an origin, path, and optional query and hash objects.
|
|
3
4
|
*
|
|
@@ -34,13 +35,19 @@
|
|
|
34
35
|
* // => 'https://mainnet.infura.io/v3/abc123'
|
|
35
36
|
* ```
|
|
36
37
|
*/
|
|
37
|
-
declare const constructURL: ({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
declare const constructURL: ({
|
|
39
|
+
origin,
|
|
40
|
+
path,
|
|
41
|
+
query,
|
|
42
|
+
hash
|
|
43
|
+
}: {
|
|
44
|
+
origin: string;
|
|
45
|
+
path: string;
|
|
46
|
+
query?: Record<string, any>;
|
|
47
|
+
hash?: Record<string, any>;
|
|
42
48
|
}) => string;
|
|
43
|
-
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/index.d.ts
|
|
44
51
|
declare const VERSION = "__VERSION__";
|
|
45
|
-
|
|
46
|
-
export { VERSION, constructURL };
|
|
52
|
+
//#endregion
|
|
53
|
+
export { VERSION, constructURL };
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/construct-url.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Constructs a URL given an origin, path, and optional query and hash objects.
|
|
3
4
|
*
|
|
@@ -34,13 +35,19 @@
|
|
|
34
35
|
* // => 'https://mainnet.infura.io/v3/abc123'
|
|
35
36
|
* ```
|
|
36
37
|
*/
|
|
37
|
-
declare const constructURL: ({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
declare const constructURL: ({
|
|
39
|
+
origin,
|
|
40
|
+
path,
|
|
41
|
+
query,
|
|
42
|
+
hash
|
|
43
|
+
}: {
|
|
44
|
+
origin: string;
|
|
45
|
+
path: string;
|
|
46
|
+
query?: Record<string, any>;
|
|
47
|
+
hash?: Record<string, any>;
|
|
42
48
|
}) => string;
|
|
43
|
-
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/index.d.ts
|
|
44
51
|
declare const VERSION = "__VERSION__";
|
|
45
|
-
|
|
46
|
-
export { VERSION, constructURL };
|
|
52
|
+
//#endregion
|
|
53
|
+
export { VERSION, constructURL };
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=({origin:e,path:t,query:n={},hash:r={}})=>{let i=e.endsWith(`/`)?e:`${e}/`,a=new URL(t,i);for(let[e,t]of Object.entries(n))t!==void 0&&a.searchParams.set(e,t);let o=Object.entries(r);if(o.length>0){let e=new URLSearchParams;for(let[t,n]of o)n!==void 0&&e.append(t,n);a.hash=e.toString()}return a.href},t=`__VERSION__`;export{t as VERSION,e as constructURL};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@privy-io/urls",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "URL construction utilities for RPC endpoints and web services",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"privy"
|
|
@@ -35,24 +35,17 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"jest": "^29.7.0",
|
|
48
|
-
"@swc/jest": "0.2.37",
|
|
49
|
-
"rollup": "4.52.4",
|
|
50
|
-
"rollup-plugin-copy": "^3.5.0",
|
|
51
|
-
"rollup-plugin-dts": "^6.1.1",
|
|
52
|
-
"typescript": "~5.5.3",
|
|
53
|
-
"@privy-io/tsconfig": "0.0.0",
|
|
38
|
+
"@typescript/native-preview": "7.0.0-dev.20260327.2",
|
|
39
|
+
"oxfmt": "0.42.0",
|
|
40
|
+
"oxlint": "1.57.0",
|
|
41
|
+
"oxlint-tsgolint": "0.18.0",
|
|
42
|
+
"rolldown": "1.0.0-rc.12",
|
|
43
|
+
"rolldown-plugin-dts": "0.23.2",
|
|
44
|
+
"rollup-plugin-copy": "3.5.0",
|
|
45
|
+
"vite": "8.0.3",
|
|
46
|
+
"vitest": "4.1.2",
|
|
54
47
|
"@privy-io/build-config": "1.0.0",
|
|
55
|
-
"@privy-io/
|
|
48
|
+
"@privy-io/tsconfig": "0.0.0"
|
|
56
49
|
},
|
|
57
50
|
"peerDependencies": {},
|
|
58
51
|
"peerDependenciesMeta": {},
|
|
@@ -60,16 +53,14 @@
|
|
|
60
53
|
"access": "public"
|
|
61
54
|
},
|
|
62
55
|
"scripts": {
|
|
63
|
-
"build
|
|
64
|
-
"
|
|
65
|
-
"check-types": "tsc --noEmit",
|
|
56
|
+
"build": "rolldown --config rolldown.config.mjs",
|
|
57
|
+
"check-types": "tsgo --noEmit",
|
|
66
58
|
"clean": "rm -rf dist .turbo .swc",
|
|
67
59
|
"clean:reset": "rm -rf dist .turbo .swc node_modules",
|
|
68
|
-
"dev
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"test": "
|
|
73
|
-
"test:watch": "jest --watch"
|
|
60
|
+
"dev": "rolldown --config rolldown.config.mjs --watch",
|
|
61
|
+
"format": "oxlint src --fix",
|
|
62
|
+
"lint": "oxlint src",
|
|
63
|
+
"test": "vitest run",
|
|
64
|
+
"test:watch": "vitest"
|
|
74
65
|
}
|
|
75
66
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.constructURL=({origin:e,path:t,query:r={},hash:s={}})=>{let n=new URL(t,e.endsWith("/")?e:`${e}/`);for(let[e,t]of Object.entries(r))void 0!==t&&n.searchParams.set(e,t);let a=Object.entries(s);if(a.length>0){let e=new URLSearchParams;for(let[t,r]of a)void 0!==r&&e.append(t,r);n.hash=e.toString()}return n.href};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=({origin:e,path:t,query:r={},hash:n={}})=>{let a=new URL(t,e.endsWith("/")?e:`${e}/`);for(let[e,t]of Object.entries(r))void 0!==t&&a.searchParams.set(e,t);let h=Object.entries(n);if(h.length>0){let e=new URLSearchParams;for(let[t,r]of h)void 0!==r&&e.append(t,r);a.hash=e.toString()}return a.href};export{e as constructURL};
|