@php-wasm/web 3.0.46 → 3.0.52

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/lib/index.d.ts CHANGED
@@ -7,6 +7,5 @@ export { createDirectoryHandleMountHandler } from './directory-handle-mount';
7
7
  export type { MountDevice, MountOptions, SyncProgress, SyncProgressCallback, } from './directory-handle-mount';
8
8
  export * from './tls/certificates';
9
9
  export type { TCPOverFetchOptions } from './tcp-over-fetch-websocket';
10
- export { fetchWithCorsProxy } from './fetch-with-cors-proxy';
11
- export { FirewallInterferenceError } from './firewall-interference-error';
10
+ export { fetchWithCorsProxy, FirewallInterferenceError, } from '@php-wasm/web-service-worker';
12
11
  export { consumeAPI, exposeAPI, type RemoteAPI, type PublicAPI, type WithAPIState, type WithIsReady, } from '@php-wasm/universal';
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Renegotiation Info Extension (RFC 5746)
3
+ * https://datatracker.ietf.org/doc/html/rfc5746
4
+ *
5
+ * This extension is used to prevent MITM attacks during TLS renegotiation.
6
+ * For initial connections (not renegotiations), the client sends an empty
7
+ * renegotiated_connection field, and the server responds with the same.
8
+ *
9
+ * struct {
10
+ * opaque renegotiated_connection<0..255>;
11
+ * } RenegotiationInfo;
12
+ */
13
+ export type RenegotiationInfo = {
14
+ renegotiatedConnection: Uint8Array;
15
+ };
16
+ export declare const RenegotiationInfoExtension: {
17
+ decodeFromClient(data: Uint8Array): RenegotiationInfo;
18
+ /**
19
+ * For an initial connection (not a renegotiation), the server responds
20
+ * with an empty renegotiated_connection field.
21
+ */
22
+ encodeForClient(): Uint8Array;
23
+ };
@@ -6,11 +6,16 @@ import type { ParsedECPointFormats } from './11_ec_point_formats';
6
6
  import { ECPointFormatsExtension } from './11_ec_point_formats';
7
7
  import type { SignatureAlgorithms } from './13_signature_algorithms';
8
8
  import { SignatureAlgorithmsExtension } from './13_signature_algorithms';
9
+ import type { RenegotiationInfo } from './65281_renegotiation_info';
9
10
  export declare const TLSExtensionsHandlers: {
10
11
  readonly server_name: typeof ServerNameExtension;
11
12
  readonly signature_algorithms: typeof SignatureAlgorithmsExtension;
12
13
  readonly supported_groups: typeof SupportedGroupsExtension;
13
14
  readonly ec_point_formats: typeof ECPointFormatsExtension;
15
+ readonly renegotiation_info: {
16
+ decodeFromClient(data: Uint8Array): RenegotiationInfo;
17
+ encodeForClient(): Uint8Array;
18
+ };
14
19
  };
15
20
  export type SupportedTLSExtension = keyof typeof TLSExtensionsHandlers;
16
21
  export type ParsedExtension = {
@@ -29,6 +34,10 @@ export type ParsedExtension = {
29
34
  type: 'supported_groups';
30
35
  data: ParsedSupportedGroups;
31
36
  raw: Uint8Array;
37
+ } | {
38
+ type: 'renegotiation_info';
39
+ data: RenegotiationInfo;
40
+ raw: Uint8Array;
32
41
  };
33
42
  /**
34
43
  * The extensions in a ClientHello message are encoded as follows:
@@ -56,6 +56,7 @@ export declare const ExtensionTypes: {
56
56
  readonly key_share: 51;
57
57
  readonly transparency_info: 52;
58
58
  readonly connection_id: 54;
59
+ readonly renegotiation_info: 65281;
59
60
  };
60
61
  export type ExtensionType = keyof typeof ExtensionTypes;
61
62
  export declare const ExtensionNames: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/web",
3
- "version": "3.0.46",
3
+ "version": "3.0.52",
4
4
  "description": "PHP.wasm for the web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,7 +37,7 @@
37
37
  "main": "./index.cjs",
38
38
  "module": "./index.js",
39
39
  "types": "index.d.ts",
40
- "gitHead": "845cbc01dba047db8bf0b4ae2670b924e3517087",
40
+ "gitHead": "fd79b4d41ec8858ecacde7a814818fac95c40246",
41
41
  "engines": {
42
42
  "node": ">=20.18.3",
43
43
  "npm": ">=10.1.0"
@@ -49,19 +49,19 @@
49
49
  "wasm-feature-detect": "1.8.0",
50
50
  "ws": "8.18.3",
51
51
  "yargs": "17.7.2",
52
- "@php-wasm/util": "3.0.46",
53
- "@php-wasm/universal": "3.0.46",
54
- "@php-wasm/logger": "3.0.46",
55
- "@php-wasm/fs-journal": "3.0.46",
56
- "@php-wasm/web-8-5": "3.0.46",
57
- "@php-wasm/web-8-4": "3.0.46",
58
- "@php-wasm/web-8-3": "3.0.46",
59
- "@php-wasm/web-8-2": "3.0.46",
60
- "@php-wasm/web-8-1": "3.0.46",
61
- "@php-wasm/web-8-0": "3.0.46",
62
- "@php-wasm/web-7-4": "3.0.46",
63
- "@wp-playground/common": "3.0.46",
64
- "@php-wasm/web-service-worker": "3.0.46"
52
+ "@php-wasm/util": "3.0.52",
53
+ "@php-wasm/universal": "3.0.52",
54
+ "@php-wasm/logger": "3.0.52",
55
+ "@php-wasm/fs-journal": "3.0.52",
56
+ "@php-wasm/web-8-5": "3.0.52",
57
+ "@php-wasm/web-8-4": "3.0.52",
58
+ "@php-wasm/web-8-3": "3.0.52",
59
+ "@php-wasm/web-8-2": "3.0.52",
60
+ "@php-wasm/web-8-1": "3.0.52",
61
+ "@php-wasm/web-8-0": "3.0.52",
62
+ "@php-wasm/web-7-4": "3.0.52",
63
+ "@wp-playground/common": "3.0.52",
64
+ "@php-wasm/web-service-worker": "3.0.52"
65
65
  },
66
66
  "packageManager": "npm@10.9.2",
67
67
  "overrides": {
@@ -72,7 +72,9 @@
72
72
  "@playwright/test": "1.55.1",
73
73
  "ws": "8.18.3",
74
74
  "tmp": "0.2.5",
75
- "form-data": "^4.0.4"
75
+ "form-data": "^4.0.4",
76
+ "lodash": "^4.17.23",
77
+ "glob": "^9.3.0"
76
78
  },
77
79
  "optionalDependencies": {
78
80
  "fs-ext": "2.1.1"
@@ -1 +0,0 @@
1
- export declare function fetchWithCorsProxy(input: RequestInfo, init?: RequestInit, corsProxyUrl?: string, playgroundUrl?: string): Promise<Response>;
@@ -1,13 +0,0 @@
1
- /**
2
- * Error thrown when a CORS proxy response appears to have been
3
- * intercepted by a network firewall or corporate proxy.
4
- *
5
- * This is detected when a response from the CORS proxy is missing
6
- * the X-Playground-Cors-Proxy header that legitimate responses include.
7
- */
8
- export declare class FirewallInterferenceError extends Error {
9
- readonly url: string;
10
- readonly status: number;
11
- readonly statusText: string;
12
- constructor(url: string, status: number, statusText: string);
13
- }