@xylabs/url 5.0.80 → 5.0.82

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/README.md CHANGED
@@ -107,6 +107,32 @@ const URL: (url, base?) => URL;
107
107
 
108
108
  ### index-node
109
109
 
110
+ ### variables
111
+
112
+ ### <a id="URL"></a>URL
113
+
114
+ [**@xylabs/url**](#../../README)
115
+
116
+ ***
117
+
118
+ ```ts
119
+ const URL: (url, base?) => URL;
120
+ ```
121
+
122
+ ## Parameters
123
+
124
+ ### url
125
+
126
+ `string` | `URL`
127
+
128
+ ### base?
129
+
130
+ `string` | `URL`
131
+
132
+ ## Returns
133
+
134
+ `URL`
135
+
110
136
 
111
137
  Part of [sdk-js](https://www.npmjs.com/package/@xyo-network/sdk-js)
112
138
 
@@ -1,3 +1,12 @@
1
+ import { URL } from 'node:url';
2
+ declare const NodeUrl: {
3
+ new (url: string | URL, base?: string | URL): URL;
4
+ prototype: URL;
5
+ canParse(input: string | URL, base?: string | URL): boolean;
6
+ createObjectURL(blob: import("node:buffer").Blob): string;
7
+ parse(input: string | URL, base?: string | URL): URL | null;
8
+ revokeObjectURL(id: string): void;
9
+ };
10
+ export { NodeUrl as URL };
1
11
  export * from './lib/index.ts';
2
- export { URL } from 'node:url';
3
12
  //# sourceMappingURL=index-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA"}
1
+ {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,QAAA,MAAM,OAAO;;;;;;;CAAM,CAAA;AACnB,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,CAAA;AACzB,cAAc,gBAAgB,CAAA"}
@@ -1,3 +1,12 @@
1
+ import { URL } from 'node:url';
2
+ declare const NodeUrl: {
3
+ new (url: string | URL, base?: string | URL): URL;
4
+ prototype: URL;
5
+ canParse(input: string | URL, base?: string | URL): boolean;
6
+ createObjectURL(blob: import("node:buffer").Blob): string;
7
+ parse(input: string | URL, base?: string | URL): URL | null;
8
+ revokeObjectURL(id: string): void;
9
+ };
10
+ export { NodeUrl as URL };
1
11
  export * from './lib/index.ts';
2
- export { URL } from 'node:url';
3
12
  //# sourceMappingURL=index-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA"}
1
+ {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,QAAA,MAAM,OAAO;;;;;;;CAAM,CAAA;AACnB,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,CAAA;AACzB,cAAc,gBAAgB,CAAA"}
@@ -1,3 +1,12 @@
1
+ import { URL } from 'node:url';
2
+ declare const NodeUrl: {
3
+ new (url: string | URL, base?: string | URL): URL;
4
+ prototype: URL;
5
+ canParse(input: string | URL, base?: string | URL): boolean;
6
+ createObjectURL(blob: import("node:buffer").Blob): string;
7
+ parse(input: string | URL, base?: string | URL): URL | null;
8
+ revokeObjectURL(id: string): void;
9
+ };
10
+ export { NodeUrl as URL };
1
11
  export * from './lib/index.ts';
2
- export { URL } from 'node:url';
3
12
  //# sourceMappingURL=index-node.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA"}
1
+ {"version":3,"file":"index-node.d.ts","sourceRoot":"","sources":["../../src/index-node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,QAAA,MAAM,OAAO;;;;;;;CAAM,CAAA;AACnB,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,CAAA;AACzB,cAAc,gBAAgB,CAAA"}
@@ -1,12 +1,15 @@
1
+ // src/index-node.ts
2
+ import { URL } from "url";
3
+
1
4
  // src/lib/isLocalhost.ts
2
5
  var isLocalhost = (hostname) => {
3
6
  return hostname === "localhost" || hostname === "127.0.0.1" || hostname === "::1" || hostname.endsWith(".localhost");
4
7
  };
5
8
 
6
9
  // src/index-node.ts
7
- import { URL } from "url";
10
+ var NodeUrl = URL;
8
11
  export {
9
- URL,
12
+ NodeUrl as URL,
10
13
  isLocalhost
11
14
  };
12
15
  //# sourceMappingURL=index-node.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/isLocalhost.ts","../../src/index-node.ts"],"sourcesContent":["export const isLocalhost = (hostname: string): boolean => {\n return (\n hostname === 'localhost'\n || hostname === '127.0.0.1'\n || hostname === '::1' // IPv6 localhost\n || hostname.endsWith('.localhost')\n )\n}\n","export * from './lib/index.ts'\nexport { URL } from 'node:url'\n"],"mappings":";AAAO,IAAM,cAAc,CAAC,aAA8B;AACxD,SACE,aAAa,eACV,aAAa,eACb,aAAa,SACb,SAAS,SAAS,YAAY;AAErC;;;ACNA,SAAS,WAAW;","names":[]}
1
+ {"version":3,"sources":["../../src/index-node.ts","../../src/lib/isLocalhost.ts"],"sourcesContent":["import { URL } from 'node:url'\n\nconst NodeUrl = URL\nexport { NodeUrl as URL }\nexport * from './lib/index.ts'\n","export const isLocalhost = (hostname: string): boolean => {\n return (\n hostname === 'localhost'\n || hostname === '127.0.0.1'\n || hostname === '::1' // IPv6 localhost\n || hostname.endsWith('.localhost')\n )\n}\n"],"mappings":";AAAA,SAAS,WAAW;;;ACAb,IAAM,cAAc,CAAC,aAA8B;AACxD,SACE,aAAa,eACV,aAAa,eACb,aAAa,SACb,SAAS,SAAS,YAAY;AAErC;;;ADLA,IAAM,UAAU;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/url",
3
- "version": "5.0.80",
3
+ "version": "5.0.82",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "url",
@@ -30,37 +30,31 @@
30
30
  ".": {
31
31
  "browser": {
32
32
  "types": "./dist/browser/index-browser.d.ts",
33
- "source": "./src/index-browser.ts",
34
33
  "default": "./dist/browser/index-browser.mjs"
35
34
  },
36
35
  "neutral": {
37
36
  "types": "./dist/neutral/index-neutral.d.ts",
38
- "source": "./src/index-neutral.ts",
39
37
  "default": "./dist/neutral/index-neutral.mjs"
40
38
  },
41
39
  "node": {
42
40
  "types": "./dist/node/index-node.d.ts",
43
- "source": "./src/index-node.ts",
44
41
  "default": "./dist/node/index-node.mjs"
45
42
  }
46
43
  },
47
44
  "./package.json": "./package.json"
48
45
  },
49
46
  "module": "./dist/neutral/index-neutral.mjs",
50
- "source": "./src/index-neutral.ts",
51
47
  "types": "./dist/neutral/index-neutral.d.ts",
52
48
  "files": [
53
49
  "dist",
54
- "src",
55
50
  "!**/*.bench.*",
56
51
  "!**/*.spec.*",
57
52
  "!**/*.test.*"
58
53
  ],
59
54
  "devDependencies": {
60
- "@types/node": "~25.2.3",
61
- "@xylabs/ts-scripts-yarn3": "~7.3.2",
62
- "@xylabs/tsconfig": "~7.3.2",
63
- "@xylabs/tsconfig-dom": "~7.3.2",
55
+ "@types/node": "~25.4.0",
56
+ "@xylabs/ts-scripts-yarn3": "~7.4.11",
57
+ "@xylabs/tsconfig": "~7.4.11",
64
58
  "typescript": "~5.9.3",
65
59
  "vitest": "~4.0.18"
66
60
  },
@@ -1,4 +0,0 @@
1
- /// <reference lib="dom" />
2
- const BrowserUrl = URL
3
- export { BrowserUrl as URL }
4
- export * from './lib/index.ts'
@@ -1,4 +0,0 @@
1
- /// <reference lib="dom" />
2
- const NeutralUrl = URL
3
- export { NeutralUrl as URL }
4
- export * from './lib/index.ts'
package/src/index-node.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './lib/index.ts'
2
- export { URL } from 'node:url'
package/src/lib/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './isLocalhost.ts'
@@ -1,8 +0,0 @@
1
- export const isLocalhost = (hostname: string): boolean => {
2
- return (
3
- hostname === 'localhost'
4
- || hostname === '127.0.0.1'
5
- || hostname === '::1' // IPv6 localhost
6
- || hostname.endsWith('.localhost')
7
- )
8
- }