@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 CHANGED
@@ -1 +1 @@
1
- "use strict";var r=require("./construct-url.js");exports.constructURL=r.constructURL,exports.VERSION="0.0.3";
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;
@@ -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: ({ origin, path, query, hash, }: {
38
- origin: string;
39
- path: string;
40
- query?: Record<string, any>;
41
- hash?: Record<string, any>;
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 };
@@ -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: ({ origin, path, query, hash, }: {
38
- origin: string;
39
- path: string;
40
- query?: Record<string, any>;
41
- hash?: Record<string, any>;
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 };
@@ -1 +1 @@
1
- export{constructURL}from"./construct-url.mjs";const t="0.0.3";export{t as VERSION};
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",
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
- "@rollup/plugin-node-resolve": "^15.3.0",
39
- "@rollup/plugin-replace": "^6.0.1",
40
- "@rollup/plugin-swc": "^0.4.0",
41
- "@rollup/plugin-terser": "^0.4.4",
42
- "@rollup/plugin-typescript": "^11.1.6",
43
- "@swc/core": "^1.10.0",
44
- "@swc/plugin-styled-components": "^6.0.1",
45
- "@tsconfig/node16-strictest-esm": "^1.0.3",
46
- "glob": "^10.3.12",
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/eslint-config-custom": "0.0.0"
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:types": "rollup --config rollup.types.mjs",
64
- "build:code": "rollup --config rollup.build.mjs",
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:code": "rollup --config rollup.dev.mjs --watch",
69
- "dev:types": "rollup --config rollup.types.mjs --watch",
70
- "format": "eslint src --fix",
71
- "lint": "eslint src",
72
- "test": "jest",
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};