insite-cookie 1.0.40 → 1.0.42
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 +1 -1
- package/bun.lockb +0 -0
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
package/bun.lockb
CHANGED
|
Binary file
|
package/dist/client.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var h=e=>{throw TypeError(e)};var m=(e,o,t)=>o.has(e)||h("Cannot "+t);var i=(e,o,t)=>(m(e,o,"read from private field"),t?t.call(e):o.get(e)),a=(e,o,t)=>o.has(e)?h("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(e):o.set(e,t);var l={set:"~setcookie"};var r,d=class{constructor(o,t={}){a(this,r,o=>{let t=new XMLHttpRequest;t.onload=this.onload,t.onerror=this.onerror,t.open(this.method,`${this.url}?${o}`,!0),t.send(null)});let{method:c="GET",url:u="/cookie",onload:s,onerror:n}=t;this.method=c,this.url=u,s&&(this.onload=s),n&&(this.onerror=n),o.on(`message:${l.set}`,i(this,r))}onload(){this.readyState===4&&this.status!==200&&console.error("Set cookie:",this.statusText)}onerror(){console.error("Set cookie:",this.statusText)}};r=new WeakMap;export{d as CookieSetter};
|
|
2
2
|
//# sourceMappingURL=client.js.map
|
package/dist/client.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/common.js", "../src/client/Setter.js"],
|
|
4
4
|
"sourcesContent": ["export const headers = {\n\tset: \"~setcookie\"\n};\n", "import { headers } from \"../common\";\n\n\nexport class CookieSetter {\n\tconstructor(ws, options = {}) {\n\t\t\n\t\tconst {\n\t\t\tmethod = \"GET\",\n\t\t\turl = \"/cookie\",\n\t\t\tonload,\n\t\t\tonerror\n\t\t} = options;\n\t\t\n\t\tthis.method = method;\n\t\tthis.url = url;\n\t\t\n\t\tif (onload)\n\t\t\tthis.onload = onload;\n\t\t\n\t\tif (onerror)\n\t\t\tthis.onerror = onerror;\n\t\t\n\t\tws.on(`message:${headers.set}`, this.#handleSet);\n\t\t\n\t}\n\t\n\t#handleSet = token => {\n\t\tconst xhr = new XMLHttpRequest();\n\t\t\n\t\txhr.onload = this.onload;\n\t\txhr.onerror = this.onerror;\n\t\t\n\t\txhr.open(this.method, `${this.url}?${token}`, true);\n\t\t\n\t\txhr.send(null);\n\t\t\n\t};\n\t\n\tonload() {\n\t\t\n\t\tif (this.readyState === 4 && this.status !== 200)\n\t\t\tconsole.error(\"Set cookie:\", this.statusText);\n\t\t\n\t}\n\t\n\tonerror() {\n\t\t\n\t\tconsole.error(\"Set cookie:\", this.statusText);\n\t\t\n\t}\n\t\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "iQAAO,IAAMA,EAAU,CACtB,IAAK,YACN,ECFA,IAAAC,EAGaC,EAAN,KAAmB,CACzB,YAAYC,EAAIC,EAAU,CAAC,EAAG,CAsB9BC,EAAA,KAAAJ,EAAaK,GAAS,CACrB,IAAMC,EAAM,IAAI,eAEhBA,EAAI,OAAS,KAAK,OAClBA,EAAI,QAAU,KAAK,QAEnBA,EAAI,KAAK,KAAK,OAAQ,GAAG,KAAK,GAAG,IAAID,CAAK,GAAI,EAAI,EAElDC,EAAI,KAAK,IAAI,CAEd,GA9BC,GAAM,CACL,OAAAC,EAAS,MACT,IAAAC,EAAM,UACN,OAAAC,EACA,QAAAC,CACD,EAAIP,EAEJ,KAAK,OAASI,EACd,KAAK,IAAMC,EAEPC,IACH,KAAK,OAASA,GAEXC,IACH,KAAK,QAAUA,GAEhBR,EAAG,GAAG,WAAWS,EAAQ,GAAG,GAAIC,EAAA,KAAKZ,EAAU,CAEhD,CAcA,QAAS,CAEJ,KAAK,aAAe,GAAK,KAAK,SAAW,KAC5C,QAAQ,MAAM,cAAe,KAAK,UAAU,CAE9C,CAEA,SAAU,CAET,QAAQ,MAAM,cAAe,KAAK,UAAU,CAE7C,CAED,EAzBCA,EAAA",
|
|
6
6
|
"names": ["headers", "_handleSet", "CookieSetter", "ws", "options", "__privateAdd", "token", "xhr", "method", "url", "onload", "onerror", "headers", "__privateGet"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "insite-cookie",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.42",
|
|
4
4
|
"description": "Cookie support for inSite",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/server.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"./server": "./dist/server.js",
|
|
10
10
|
"./client": "./dist/client.js"
|
|
11
11
|
},
|
|
12
|
-
"packageManager": "bun@1.1.
|
|
12
|
+
"packageManager": "bun@1.1.9",
|
|
13
13
|
"scripts": {
|
|
14
14
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
15
15
|
"build": "bun .conveyer.js"
|