@php-wasm/web 3.0.42 → 3.0.43
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 +6 -6
- package/index.cjs.map +1 -1
- package/index.js +12 -20
- package/index.js.map +1 -1
- package/lib/extensions/intl/with-intl.d.ts +1 -1
- package/package.json +15 -17
package/index.js
CHANGED
|
@@ -21,10 +21,6 @@ async function De(i = O) {
|
|
|
21
21
|
return (await import("@php-wasm/web-8-0")).getPHPLoaderModule();
|
|
22
22
|
case "7.4":
|
|
23
23
|
return (await import("@php-wasm/web-7-4")).getPHPLoaderModule();
|
|
24
|
-
case "7.3":
|
|
25
|
-
return (await import("@php-wasm/web-7-3")).getPHPLoaderModule();
|
|
26
|
-
case "7.2":
|
|
27
|
-
return (await import("@php-wasm/web-7-2")).getPHPLoaderModule();
|
|
28
24
|
}
|
|
29
25
|
throw new Error(`Unsupported PHP version ${i}`);
|
|
30
26
|
}
|
|
@@ -86,7 +82,7 @@ class v {
|
|
|
86
82
|
this.uint8Array.set(e, this.offset), this.offset += e.length;
|
|
87
83
|
}
|
|
88
84
|
}
|
|
89
|
-
const
|
|
85
|
+
const P = {
|
|
90
86
|
server_name: 0,
|
|
91
87
|
max_fragment_length: 1,
|
|
92
88
|
client_certificate_url: 2,
|
|
@@ -140,9 +136,9 @@ const b = {
|
|
|
140
136
|
key_share: 51,
|
|
141
137
|
transparency_info: 52,
|
|
142
138
|
connection_id: 54
|
|
143
|
-
}, We = f(
|
|
139
|
+
}, We = f(P), _e = {
|
|
144
140
|
host_name: 0
|
|
145
|
-
},
|
|
141
|
+
}, be = f(_e);
|
|
146
142
|
class oe {
|
|
147
143
|
static decodeFromClient(e) {
|
|
148
144
|
const t = new DataView(e.buffer);
|
|
@@ -159,7 +155,7 @@ class oe {
|
|
|
159
155
|
switch (r += _, a) {
|
|
160
156
|
case _e.host_name:
|
|
161
157
|
s.push({
|
|
162
|
-
name_type:
|
|
158
|
+
name_type: be[a],
|
|
163
159
|
name: {
|
|
164
160
|
host_name: new TextDecoder().decode(S)
|
|
165
161
|
}
|
|
@@ -188,7 +184,7 @@ class oe {
|
|
|
188
184
|
"Encoding non-empty lists for ClientHello is not supported yet. Only empty lists meant for ServerHello are supported today."
|
|
189
185
|
);
|
|
190
186
|
const t = new v(4);
|
|
191
|
-
return t.writeUint16(
|
|
187
|
+
return t.writeUint16(P.server_name), t.writeUint16(0), t.uint8Array;
|
|
192
188
|
}
|
|
193
189
|
}
|
|
194
190
|
const ce = {
|
|
@@ -401,7 +397,7 @@ const ce = {
|
|
|
401
397
|
x25519: 29,
|
|
402
398
|
x448: 30
|
|
403
399
|
}, Y = f(Se);
|
|
404
|
-
class
|
|
400
|
+
class Pe {
|
|
405
401
|
/**
|
|
406
402
|
* +--------------------------------------------------+
|
|
407
403
|
* | Payload Length [2B] |
|
|
@@ -439,7 +435,7 @@ class be {
|
|
|
439
435
|
*/
|
|
440
436
|
static encodeForClient(e) {
|
|
441
437
|
const t = new v(6);
|
|
442
|
-
return t.writeUint16(
|
|
438
|
+
return t.writeUint16(P.supported_groups), t.writeUint16(2), t.writeUint16(Se[e]), t.uint8Array;
|
|
443
439
|
}
|
|
444
440
|
}
|
|
445
441
|
const Ce = {
|
|
@@ -487,7 +483,7 @@ class Re {
|
|
|
487
483
|
*/
|
|
488
484
|
static encodeForClient(e) {
|
|
489
485
|
const t = new v(6);
|
|
490
|
-
return t.writeUint16(
|
|
486
|
+
return t.writeUint16(P.ec_point_formats), t.writeUint16(2), t.writeUint8(1), t.writeUint8(Ce[e]), t.uint8Array;
|
|
491
487
|
}
|
|
492
488
|
}
|
|
493
489
|
const j = {
|
|
@@ -552,13 +548,13 @@ class Be {
|
|
|
552
548
|
*/
|
|
553
549
|
static encodeforClient(e, t) {
|
|
554
550
|
const r = new v(6);
|
|
555
|
-
return r.writeUint16(
|
|
551
|
+
return r.writeUint16(P.signature_algorithms), r.writeUint16(2), r.writeUint8(G[e]), r.writeUint8(j[t]), r.uint8Array;
|
|
556
552
|
}
|
|
557
553
|
}
|
|
558
554
|
const Q = {
|
|
559
555
|
server_name: oe,
|
|
560
556
|
signature_algorithms: Be,
|
|
561
|
-
supported_groups:
|
|
557
|
+
supported_groups: Pe,
|
|
562
558
|
ec_point_formats: Re
|
|
563
559
|
};
|
|
564
560
|
function Ue(i) {
|
|
@@ -1810,10 +1806,10 @@ function ue(i) {
|
|
|
1810
1806
|
`)) || i;
|
|
1811
1807
|
}
|
|
1812
1808
|
function ne(i) {
|
|
1813
|
-
const e = i.getUTCFullYear().toString().substr(2), t =
|
|
1809
|
+
const e = i.getUTCFullYear().toString().substr(2), t = b(i.getUTCMonth() + 1), r = b(i.getUTCDate()), n = b(i.getUTCHours()), s = b(i.getUTCMinutes()), a = b(i.getUTCSeconds());
|
|
1814
1810
|
return `${e}${t}${r}${n}${s}${a}Z`;
|
|
1815
1811
|
}
|
|
1816
|
-
function
|
|
1812
|
+
function b(i) {
|
|
1817
1813
|
return i.toString().padStart(2, "0");
|
|
1818
1814
|
}
|
|
1819
1815
|
function Ve(i, e) {
|
|
@@ -2258,10 +2254,6 @@ async function nt(i = O) {
|
|
|
2258
2254
|
return (await import("@php-wasm/web-8-0")).getIntlExtensionPath();
|
|
2259
2255
|
case "7.4":
|
|
2260
2256
|
return (await import("@php-wasm/web-7-4")).getIntlExtensionPath();
|
|
2261
|
-
case "7.3":
|
|
2262
|
-
return (await import("@php-wasm/web-7-3")).getIntlExtensionPath();
|
|
2263
|
-
case "7.2":
|
|
2264
|
-
return (await import("@php-wasm/web-7-2")).getIntlExtensionPath();
|
|
2265
2257
|
}
|
|
2266
2258
|
throw new Error(`Unsupported PHP version ${i}`);
|
|
2267
2259
|
}
|