@php-wasm/web-service-worker 3.1.34 → 3.1.36
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/index.cjs +1 -1
- package/index.js +147 -116
- package/package.json +4 -4
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@php-wasm/scopes"),H=require("@php-wasm/universal");var R=typeof document<"u"?document.currentScript:null;const q=25e3;let x=0;function v(e,t,...o){const n=g();return e.postMessage({...t,requestId:n},...o),n}function g(){return++x}function E(e,t,o=q){return new Promise((n,s)=>{const r=u=>{u.data.type==="response"&&u.data.requestId===t&&(e.removeEventListener("message",r),clearTimeout(a),n(u.data.response))},a=setTimeout(()=>{s(new Error("Request timed out")),e.removeEventListener("message",r)},o);e.addEventListener("message",r)})}function A(e,t){return{type:"response",requestId:e,response:t}}async function _(e){let t=new URL(e.request.url);if(!l.isURLScoped(t))try{const i=new URL(e.request.referrer);t=l.setURLScope(t,l.getURLScope(i))}catch{}const o=e.request.headers.get("content-type"),n=e.request.method==="POST"?new Uint8Array(await e.request.clone().arrayBuffer()):void 0,s={};for(const i of e.request.headers.entries())s[i[0]]=i[1];let r;try{const i={method:"request",args:[{body:n,url:t.toString(),method:e.request.method,headers:{...s,Host:t.host,"User-agent":self.navigator.userAgent,"Content-type":o}}]},c=l.getURLScope(t);if(c===null)throw new Error(`The URL ${t.toString()} is not scoped. This should not happen.`);const f=await b(i,c);if(r=await E(self,f),delete r.headers["x-frame-options"],r.headers["content-security-policy"]){const y=r.headers["content-security-policy"].map(d=>C("frame-ancestors",d)).filter(d=>d.trim().length>0);y.length>0?r.headers["content-security-policy"]=y:delete r.headers["content-security-policy"]}}catch(i){throw console.error(i,{url:t.toString()}),i}if(r.httpStatusCode>=300&&r.httpStatusCode<=399&&r.headers.location){const i=l.getURLScope(t);let c=new URL(r.headers.location[0],t.toString());return i&&!l.isURLScoped(c)&&(c=l.setURLScope(c,i)),Response.redirect(c.toString(),r.httpStatusCode)}const a=[101,103,204,205,304].includes(r.httpStatusCode);let u=null;return a||(r.bodyPort?u=H.portToStream(r.bodyPort):u=r.bytes),new Response(u,{headers:r.headers,status:r.httpStatusCode})}async function b(e,t){const o=g();for(const n of await self.clients.matchAll({includeUncontrolled:!0}))n.postMessage({...e,scope:t,requestId:o});return o}async function w(e,t){let o;return["GET","HEAD"].includes(e.method)?o=void 0:"body"in t?o=t.body:!e.bodyUsed&&e.body?o=e.body:o=await e.arrayBuffer(),new Request(t.url||e.url,{body:o,method:e.method,headers:e.headers,referrer:e.referrer,referrerPolicy:e.referrerPolicy,mode:e.mode==="navigate"?"same-origin":e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,integrity:e.integrity,...o instanceof ReadableStream&&{duplex:"half"},...t})}let h;const I={resetStreamBodySupported(){h=void 0}};async function T(){if(h!==void 0)return h;try{const e=new ReadableStream({start(t){t.close()}});await fetch("data:,",{method:"POST",body:e,duplex:"half"}),h=!0}catch{h=!1}return h}function O(e){const t={};return e.headers.forEach((o,n)=>{t[n]=o}),t}function C(e,t){const o=/^[\u{9}\u{A}\u{C}\u{D}\u{20}]+/u,n=/[\u{9}\u{A}\u{C}\u{D}\u{20}]+$/u,s=/[\u{9}\u{A}\u{C}\u{D}\u{20}]/u;return t.split(";").filter(r=>{const a=r.replace(o,"").replace(n,""),[u]=a.split(s,1);return u.toLowerCase()!==e.toLowerCase()}).join(";")}class U extends Error{constructor(t,o,n){super(`Could not fetch ${t} – your network appears to be blocking this request (HTTP ${o}). This often happens on school, university, or corporate networks. Try switching to a different network or using a VPN.`),this.name="FirewallInterferenceError",this.url=t,this.status=o,this.statusText=n}}const D="X-Playground-Cors-Proxy",L=new Map([["api.anthropic.com",{"anthropic-dangerous-direct-browser-access":"true"}],["api.openai.com",{}],["generativelanguage.googleapis.com",{}]]);async function B(e,t,o,n){var i;let s=typeof e=="string"?new Request(e,t):e;const r=n?new URL(n):null;let a=r?new URL(s.url,r):new URL(s.url);if(M(a))return await fetch(s);if(N(a))return s=await j(s,a),await fetch(s);if(a.protocol==="http:"){a.protocol="https:";const c=a.toString();s=await w(s,{url:c}),a=new URL(c)}if(!o)return await fetch(s);if(r&&a.protocol===r.protocol&&a.hostname===r.hostname&&a.port===r.port&&a.pathname.startsWith(r.pathname))return await fetch(s);const u=s.clone();try{return await fetch(s)}catch{const c=new Headers(s.headers),f=((i=c.get("x-cors-proxy-allowed-request-headers"))==null?void 0:i.split(","))||[],y=f.includes("authorization")||f.includes("cookie"),d=c.get("content-type");d&&d.toLowerCase().includes("multipart/form-data")&&(c.set("x-cors-proxy-content-type",d),c.set("content-type","application/octet-stream"));let p=null;const S=s.method.toUpperCase();S!=="GET"&&S!=="HEAD"&&(await T()?p=u.body:p=await u.arrayBuffer()),p instanceof ReadableStream&&new URL(o,typeof document>"u"?require("url").pathToFileURL(__filename).href:R&&R.tagName.toUpperCase()==="SCRIPT"&&R.src||new URL("index.cjs",document.baseURI).href).protocol==="http:"&&(p=await new Response(p).arrayBuffer());const P=await w(s,{url:`${o}${s.url}`,headers:c,body:p,...y&&{credentials:"include"}}),m=await fetch(P);if(!m.headers.has(D))throw new U(s.url,m.status,m.statusText);return m}}function M(e){return e.hostname==="localhost"||e.hostname==="127.0.0.1"||e.hostname==="[::1]"||e.hostname==="::1"}function N(e){return e.protocol==="https:"&&L.has(e.hostname)}async function j(e,t){const o=L.get(t.hostname);if(!o)return e;const n=new Headers(e.headers);for(const[s,r]of Object.entries(o))n.has(s)||n.set(s,r);return await w(e,{headers:n})}exports.FirewallInterferenceError=U;exports.__testing=I;exports.awaitReply=E;exports.broadcastMessageExpectReply=b;exports.cloneRequest=w;exports.convertFetchEventToPHPRequest=_;exports.fetchWithCorsProxy=B;exports.getNextRequestId=g;exports.getRequestHeaders=O;exports.postMessageExpectReply=v;exports.removeContentSecurityPolicyDirective=C;exports.responseTo=A;exports.supportsReadableStreamBody=T;
|
package/index.js
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { isURLScoped as
|
|
1
|
+
import { isURLScoped as R, setURLScope as S, getURLScope as m } from "@php-wasm/scopes";
|
|
2
2
|
import { portToStream as C } from "@php-wasm/universal";
|
|
3
3
|
const L = 25e3;
|
|
4
4
|
let U = 0;
|
|
5
|
-
function
|
|
6
|
-
const
|
|
5
|
+
function M(e, t, ...r) {
|
|
6
|
+
const n = E();
|
|
7
7
|
return e.postMessage(
|
|
8
8
|
{
|
|
9
9
|
...t,
|
|
10
|
-
requestId:
|
|
10
|
+
requestId: n
|
|
11
11
|
},
|
|
12
|
-
...
|
|
13
|
-
),
|
|
12
|
+
...r
|
|
13
|
+
), n;
|
|
14
14
|
}
|
|
15
15
|
function E() {
|
|
16
16
|
return ++U;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
return new Promise((
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
s(new Error("Request timed out")), e.removeEventListener("message",
|
|
24
|
-
},
|
|
25
|
-
e.addEventListener("message",
|
|
18
|
+
function H(e, t, r = L) {
|
|
19
|
+
return new Promise((n, s) => {
|
|
20
|
+
const o = (d) => {
|
|
21
|
+
d.data.type === "response" && d.data.requestId === t && (e.removeEventListener("message", o), clearTimeout(a), n(d.data.response));
|
|
22
|
+
}, a = setTimeout(() => {
|
|
23
|
+
s(new Error("Request timed out")), e.removeEventListener("message", o);
|
|
24
|
+
}, r);
|
|
25
|
+
e.addEventListener("message", o);
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function N(e, t) {
|
|
29
29
|
return {
|
|
30
30
|
type: "response",
|
|
31
31
|
requestId: e,
|
|
32
32
|
response: t
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
async function
|
|
35
|
+
async function $(e) {
|
|
36
36
|
let t = new URL(e.request.url);
|
|
37
|
-
if (!
|
|
37
|
+
if (!R(t))
|
|
38
38
|
try {
|
|
39
|
-
const
|
|
40
|
-
t = S(t,
|
|
39
|
+
const c = new URL(e.request.referrer);
|
|
40
|
+
t = S(t, m(c));
|
|
41
41
|
} catch {
|
|
42
42
|
}
|
|
43
|
-
const
|
|
44
|
-
for (const
|
|
45
|
-
s[
|
|
46
|
-
let
|
|
43
|
+
const r = e.request.headers.get("content-type"), n = e.request.method === "POST" ? new Uint8Array(await e.request.clone().arrayBuffer()) : void 0, s = {};
|
|
44
|
+
for (const c of e.request.headers.entries())
|
|
45
|
+
s[c[0]] = c[1];
|
|
46
|
+
let o;
|
|
47
47
|
try {
|
|
48
|
-
const
|
|
48
|
+
const c = {
|
|
49
49
|
method: "request",
|
|
50
50
|
args: [
|
|
51
51
|
{
|
|
52
|
-
body:
|
|
52
|
+
body: n,
|
|
53
53
|
url: t.toString(),
|
|
54
54
|
method: e.request.method,
|
|
55
55
|
headers: {
|
|
@@ -58,58 +58,58 @@ async function _(e) {
|
|
|
58
58
|
// Safari and Firefox don't make the User-Agent header
|
|
59
59
|
// available in the fetch event. Let's add it manually:
|
|
60
60
|
"User-agent": self.navigator.userAgent,
|
|
61
|
-
"Content-type":
|
|
61
|
+
"Content-type": r
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
]
|
|
65
|
-
},
|
|
66
|
-
if (
|
|
65
|
+
}, i = m(t);
|
|
66
|
+
if (i === null)
|
|
67
67
|
throw new Error(
|
|
68
68
|
`The URL ${t.toString()} is not scoped. This should not happen.`
|
|
69
69
|
);
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
72
|
-
const
|
|
73
|
-
(
|
|
70
|
+
const p = await P(c, i);
|
|
71
|
+
if (o = await H(self, p), delete o.headers["x-frame-options"], o.headers["content-security-policy"]) {
|
|
72
|
+
const f = o.headers["content-security-policy"].map(
|
|
73
|
+
(l) => x(
|
|
74
74
|
"frame-ancestors",
|
|
75
|
-
|
|
75
|
+
l
|
|
76
76
|
)
|
|
77
|
-
).filter((
|
|
78
|
-
|
|
77
|
+
).filter((l) => l.trim().length > 0);
|
|
78
|
+
f.length > 0 ? o.headers["content-security-policy"] = f : delete o.headers["content-security-policy"];
|
|
79
79
|
}
|
|
80
|
-
} catch (
|
|
81
|
-
throw console.error(
|
|
80
|
+
} catch (c) {
|
|
81
|
+
throw console.error(c, { url: t.toString() }), c;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
84
|
-
const
|
|
85
|
-
let
|
|
86
|
-
|
|
83
|
+
if (o.httpStatusCode >= 300 && o.httpStatusCode <= 399 && o.headers.location) {
|
|
84
|
+
const c = m(t);
|
|
85
|
+
let i = new URL(
|
|
86
|
+
o.headers.location[0],
|
|
87
87
|
t.toString()
|
|
88
88
|
);
|
|
89
|
-
return
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
return c && !R(i) && (i = S(i, c)), Response.redirect(
|
|
90
|
+
i.toString(),
|
|
91
|
+
o.httpStatusCode
|
|
92
92
|
);
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
|
|
94
|
+
const a = [101, 103, 204, 205, 304].includes(
|
|
95
|
+
o.httpStatusCode
|
|
96
96
|
);
|
|
97
|
-
let
|
|
98
|
-
return
|
|
99
|
-
headers:
|
|
100
|
-
status:
|
|
97
|
+
let d = null;
|
|
98
|
+
return a || (o.bodyPort ? d = C(o.bodyPort) : d = o.bytes), new Response(d, {
|
|
99
|
+
headers: o.headers,
|
|
100
|
+
status: o.httpStatusCode
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
|
-
async function
|
|
104
|
-
const
|
|
105
|
-
for (const
|
|
103
|
+
async function P(e, t) {
|
|
104
|
+
const r = E();
|
|
105
|
+
for (const n of await self.clients.matchAll({
|
|
106
106
|
// Sometimes the client that triggered the current fetch()
|
|
107
107
|
// event is considered uncontrolled in Google Chrome. This
|
|
108
108
|
// only happens on the first few fetches() after the initial
|
|
109
109
|
// registration of the service worker.
|
|
110
110
|
includeUncontrolled: !0
|
|
111
111
|
}))
|
|
112
|
-
|
|
112
|
+
n.postMessage({
|
|
113
113
|
...e,
|
|
114
114
|
/**
|
|
115
115
|
* Attach the scope with a URL starting with `/scope:` to this message.
|
|
@@ -119,14 +119,14 @@ async function x(e, t) {
|
|
|
119
119
|
* helps WASM workers ignore requests meant for other WASM workers.
|
|
120
120
|
*/
|
|
121
121
|
scope: t,
|
|
122
|
-
requestId:
|
|
122
|
+
requestId: r
|
|
123
123
|
});
|
|
124
|
-
return
|
|
124
|
+
return r;
|
|
125
125
|
}
|
|
126
|
-
async function
|
|
127
|
-
let
|
|
128
|
-
return ["GET", "HEAD"].includes(e.method) ?
|
|
129
|
-
body:
|
|
126
|
+
async function w(e, t) {
|
|
127
|
+
let r;
|
|
128
|
+
return ["GET", "HEAD"].includes(e.method) ? r = void 0 : "body" in t ? r = t.body : !e.bodyUsed && e.body ? r = e.body : r = await e.arrayBuffer(), new Request(t.url || e.url, {
|
|
129
|
+
body: r,
|
|
130
130
|
method: e.method,
|
|
131
131
|
headers: e.headers,
|
|
132
132
|
referrer: e.referrer,
|
|
@@ -148,19 +148,19 @@ async function b(e, t) {
|
|
|
148
148
|
*
|
|
149
149
|
* See MDN: https://developer.mozilla.org/en-US/docs/Web/API/Request/duplex
|
|
150
150
|
*/
|
|
151
|
-
...
|
|
151
|
+
...r instanceof ReadableStream && { duplex: "half" },
|
|
152
152
|
...t
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
-
let
|
|
156
|
-
const
|
|
155
|
+
let h;
|
|
156
|
+
const j = {
|
|
157
157
|
resetStreamBodySupported() {
|
|
158
|
-
|
|
158
|
+
h = void 0;
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
|
-
async function
|
|
162
|
-
if (
|
|
163
|
-
return
|
|
161
|
+
async function A() {
|
|
162
|
+
if (h !== void 0)
|
|
163
|
+
return h;
|
|
164
164
|
try {
|
|
165
165
|
const e = new ReadableStream({
|
|
166
166
|
start(t) {
|
|
@@ -171,70 +171,84 @@ async function q() {
|
|
|
171
171
|
method: "POST",
|
|
172
172
|
body: e,
|
|
173
173
|
duplex: "half"
|
|
174
|
-
}),
|
|
174
|
+
}), h = !0;
|
|
175
175
|
} catch {
|
|
176
|
-
|
|
176
|
+
h = !1;
|
|
177
177
|
}
|
|
178
|
-
return
|
|
178
|
+
return h;
|
|
179
179
|
}
|
|
180
180
|
function k(e) {
|
|
181
181
|
const t = {};
|
|
182
|
-
return e.headers.forEach((
|
|
183
|
-
t[
|
|
182
|
+
return e.headers.forEach((r, n) => {
|
|
183
|
+
t[n] = r;
|
|
184
184
|
}), t;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
const
|
|
188
|
-
return t.split(";").filter((
|
|
189
|
-
const
|
|
186
|
+
function x(e, t) {
|
|
187
|
+
const r = /^[\u{9}\u{A}\u{C}\u{D}\u{20}]+/u, n = /[\u{9}\u{A}\u{C}\u{D}\u{20}]+$/u, s = /[\u{9}\u{A}\u{C}\u{D}\u{20}]/u;
|
|
188
|
+
return t.split(";").filter((o) => {
|
|
189
|
+
const a = o.replace(r, "").replace(n, ""), [d] = a.split(
|
|
190
190
|
s,
|
|
191
191
|
// The directive name is the first token.
|
|
192
192
|
1
|
|
193
193
|
);
|
|
194
|
-
return
|
|
194
|
+
return d.toLowerCase() !== e.toLowerCase();
|
|
195
195
|
}).join(";");
|
|
196
196
|
}
|
|
197
|
-
class
|
|
198
|
-
constructor(t,
|
|
197
|
+
class O extends Error {
|
|
198
|
+
constructor(t, r, n) {
|
|
199
199
|
super(
|
|
200
|
-
`Could not fetch ${t} – your network appears to be blocking this request (HTTP ${
|
|
201
|
-
), this.name = "FirewallInterferenceError", this.url = t, this.status =
|
|
200
|
+
`Could not fetch ${t} – your network appears to be blocking this request (HTTP ${r}). This often happens on school, university, or corporate networks. Try switching to a different network or using a VPN.`
|
|
201
|
+
), this.name = "FirewallInterferenceError", this.url = t, this.status = r, this.statusText = n;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
const
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
const q = "X-Playground-Cors-Proxy", b = /* @__PURE__ */ new Map([
|
|
205
|
+
[
|
|
206
|
+
"api.anthropic.com",
|
|
207
|
+
{
|
|
208
|
+
"anthropic-dangerous-direct-browser-access": "true"
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
["api.openai.com", {}],
|
|
212
|
+
["generativelanguage.googleapis.com", {}]
|
|
213
|
+
]);
|
|
214
|
+
async function W(e, t, r, n) {
|
|
215
|
+
var c;
|
|
207
216
|
let s = typeof e == "string" ? new Request(e, t) : e;
|
|
208
|
-
const
|
|
209
|
-
let
|
|
210
|
-
if (
|
|
217
|
+
const o = n ? new URL(n) : null;
|
|
218
|
+
let a = o ? new URL(s.url, o) : new URL(s.url);
|
|
219
|
+
if (D(a))
|
|
211
220
|
return await fetch(s);
|
|
212
|
-
if (
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
221
|
+
if (B(a))
|
|
222
|
+
return s = await I(
|
|
223
|
+
s,
|
|
224
|
+
a
|
|
225
|
+
), await fetch(s);
|
|
226
|
+
if (a.protocol === "http:") {
|
|
227
|
+
a.protocol = "https:";
|
|
228
|
+
const i = a.toString();
|
|
229
|
+
s = await w(s, { url: i }), a = new URL(i);
|
|
216
230
|
}
|
|
217
|
-
if (!
|
|
231
|
+
if (!r)
|
|
218
232
|
return await fetch(s);
|
|
219
|
-
if (
|
|
233
|
+
if (o && a.protocol === o.protocol && a.hostname === o.hostname && a.port === o.port && a.pathname.startsWith(o.pathname))
|
|
220
234
|
return await fetch(s);
|
|
221
|
-
const
|
|
235
|
+
const d = s.clone();
|
|
222
236
|
try {
|
|
223
237
|
return await fetch(s);
|
|
224
238
|
} catch {
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
let
|
|
228
|
-
const
|
|
229
|
-
|
|
230
|
-
const T = await
|
|
231
|
-
url: `${
|
|
232
|
-
headers:
|
|
233
|
-
body:
|
|
239
|
+
const i = new Headers(s.headers), p = ((c = i.get("x-cors-proxy-allowed-request-headers")) == null ? void 0 : c.split(",")) || [], f = p.includes("authorization") || p.includes("cookie"), l = i.get("content-type");
|
|
240
|
+
l && l.toLowerCase().includes("multipart/form-data") && (i.set("x-cors-proxy-content-type", l), i.set("content-type", "application/octet-stream"));
|
|
241
|
+
let u = null;
|
|
242
|
+
const g = s.method.toUpperCase();
|
|
243
|
+
g !== "GET" && g !== "HEAD" && (await A() ? u = d.body : u = await d.arrayBuffer()), u instanceof ReadableStream && new URL(r, import.meta.url).protocol === "http:" && (u = await new Response(u).arrayBuffer());
|
|
244
|
+
const T = await w(s, {
|
|
245
|
+
url: `${r}${s.url}`,
|
|
246
|
+
headers: i,
|
|
247
|
+
body: u,
|
|
234
248
|
...f && { credentials: "include" }
|
|
235
249
|
}), y = await fetch(T);
|
|
236
|
-
if (!y.headers.has(
|
|
237
|
-
throw new
|
|
250
|
+
if (!y.headers.has(q))
|
|
251
|
+
throw new O(
|
|
238
252
|
s.url,
|
|
239
253
|
y.status,
|
|
240
254
|
y.statusText
|
|
@@ -242,18 +256,35 @@ async function M(e, t, o, a) {
|
|
|
242
256
|
return y;
|
|
243
257
|
}
|
|
244
258
|
}
|
|
259
|
+
function D(e) {
|
|
260
|
+
return e.hostname === "localhost" || e.hostname === "127.0.0.1" || e.hostname === "[::1]" || e.hostname === "::1";
|
|
261
|
+
}
|
|
262
|
+
function B(e) {
|
|
263
|
+
return e.protocol === "https:" && b.has(e.hostname);
|
|
264
|
+
}
|
|
265
|
+
async function I(e, t) {
|
|
266
|
+
const r = b.get(t.hostname);
|
|
267
|
+
if (!r)
|
|
268
|
+
return e;
|
|
269
|
+
const n = new Headers(e.headers);
|
|
270
|
+
for (const [s, o] of Object.entries(r))
|
|
271
|
+
n.has(s) || n.set(s, o);
|
|
272
|
+
return await w(e, {
|
|
273
|
+
headers: n
|
|
274
|
+
});
|
|
275
|
+
}
|
|
245
276
|
export {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
277
|
+
O as FirewallInterferenceError,
|
|
278
|
+
j as __testing,
|
|
279
|
+
H as awaitReply,
|
|
280
|
+
P as broadcastMessageExpectReply,
|
|
281
|
+
w as cloneRequest,
|
|
282
|
+
$ as convertFetchEventToPHPRequest,
|
|
283
|
+
W as fetchWithCorsProxy,
|
|
253
284
|
E as getNextRequestId,
|
|
254
285
|
k as getRequestHeaders,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
286
|
+
M as postMessageExpectReply,
|
|
287
|
+
x as removeContentSecurityPolicyDirective,
|
|
288
|
+
N as responseTo,
|
|
289
|
+
A as supportsReadableStreamBody
|
|
259
290
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@php-wasm/web-service-worker",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.36",
|
|
4
4
|
"description": "PHP.wasm – service worker utils",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
"main": "./index.cjs",
|
|
32
32
|
"module": "./index.js",
|
|
33
33
|
"license": "GPL-2.0-or-later",
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "371f4fd6f9d56af6fb35b6c2cf0267edaea83755",
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=20.10.0",
|
|
37
37
|
"npm": ">=10.2.3"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@php-wasm/scopes": "3.1.
|
|
41
|
-
"@php-wasm/universal": "3.1.
|
|
40
|
+
"@php-wasm/scopes": "3.1.36",
|
|
41
|
+
"@php-wasm/universal": "3.1.36"
|
|
42
42
|
},
|
|
43
43
|
"packageManager": "npm@10.9.2",
|
|
44
44
|
"overrides": {
|