@gjsify/https 0.3.20 → 0.4.0
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.defineProperty,__name=(t,n)=>e(t,`name`,{value:n,configurable:!0});export{__name};
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Server as e,get as t,request as n}from"node:http";import{TLSSocket as r,createSecureContext as i}from"node:tls";import{URL as a}from"node:url";var
|
|
1
|
+
import"./_virtual/_rolldown/runtime.js";import{Server as e,get as t,request as n}from"node:http";import{TLSSocket as r,createSecureContext as i}from"node:tls";import{URL as a}from"node:url";var Agent=class{defaultPort=443;protocol=`https:`;maxSockets=1/0;maxFreeSockets=256;constructor(e){}destroy(){}};const o=new Agent;function request(e,t,r){if(typeof e==`string`){if(e.startsWith(`https://`)||e.startsWith(`http://`))return n(e,t,r);let i={hostname:e,protocol:`https:`,port:443};return typeof t==`object`&&Object.assign(i,t),typeof t==`function`&&(r=t),n(i,r)}if(e instanceof a)return n(e,t,r);let i={protocol:`https:`,port:443,...e};return typeof t==`function`&&(r=t),n(i,r)}function get(e,n,r){if(typeof e==`string`){if(e.startsWith(`https://`)||e.startsWith(`http://`))return t(e,n,r);let i={hostname:e,protocol:`https:`,port:443};return typeof n==`object`&&Object.assign(i,n),typeof n==`function`&&(r=n),t(i,r)}if(e instanceof a)return t(e,n,r);let i={protocol:`https:`,port:443,...e,method:`GET`};return typeof n==`function`&&(r=n),t(i,r)}var Server=class extends e{constructor(e,t){super(t)}};function createServer(e,t){return typeof e==`function`?new Server(void 0,e):new Server(e,t)}var s={Agent,globalAgent:o,Server,request,get,createServer,TLSSocket:r,createSecureContext:i};export{Agent,Server,r as TLSSocket,i as createSecureContext,createServer,s as default,get,o as globalAgent,request};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/https",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Node.js https module for Gjs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"https"
|
|
31
31
|
],
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@gjsify/cli": "^0.
|
|
34
|
-
"@gjsify/unit": "^0.
|
|
33
|
+
"@gjsify/cli": "^0.4.0",
|
|
34
|
+
"@gjsify/unit": "^0.4.0",
|
|
35
35
|
"@types/node": "^25.6.2",
|
|
36
36
|
"typescript": "^6.0.3"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@gjsify/http": "^0.
|
|
40
|
-
"@gjsify/tls": "^0.
|
|
39
|
+
"@gjsify/http": "^0.4.0",
|
|
40
|
+
"@gjsify/tls": "^0.4.0"
|
|
41
41
|
}
|
|
42
42
|
}
|