@php-wasm/web 3.1.22 → 3.1.26

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.
@@ -1,4 +1,5 @@
1
- import type { EmscriptenOptions, PHPExtensionInstallOptions, PHPWasmAsyncMode, SupportedPHPVersion } from '@php-wasm/universal';
1
+ import type { EmscriptenOptions, ResolvedInstallOptions, SupportedPHPVersion } from '@php-wasm/universal';
2
+ type PHPWasmAsyncMode = 'jspi' | 'asyncify';
2
3
  /**
3
4
  * Built-in PHP extensions shipped with `@php-wasm/web`.
4
5
  */
@@ -6,11 +7,10 @@ export type BuiltInPHPWebExtensionName = 'intl';
6
7
  /**
7
8
  * External PHP extension source that can be installed before PHP starts.
8
9
  *
9
- * The runtime supplies the active PHP version and async mode before
10
- * resolving the source, so callers only provide the artifact source and
11
- * install options.
10
+ * External sources are supported in JSPI runtimes only. Asyncify support is
11
+ * limited to bundled extensions shipped with this package.
12
12
  */
13
- export type RuntimePHPWebExtensionSource = PHPExtensionInstallOptions;
13
+ export type RuntimePHPWebExtensionSource = Omit<ResolvedInstallOptions, 'phpVersion'>;
14
14
  /**
15
15
  * PHP extension request accepted by `loadWebRuntime()`.
16
16
  *
@@ -35,3 +35,4 @@ export type PHPWebExtension = BuiltInPHPWebExtensionName | {
35
35
  * downloads do not block each other.
36
36
  */
37
37
  export declare function withPHPExtensions(version: SupportedPHPVersion, asyncMode: PHPWasmAsyncMode, options: EmscriptenOptions, extensions?: PHPWebExtension[]): Promise<EmscriptenOptions>;
38
+ export {};
@@ -8,8 +8,8 @@ export interface LoaderOptions {
8
8
  /**
9
9
  * PHP extensions to install before the runtime starts.
10
10
  *
11
- * Use built-in names such as `intl`, or pass an external extension source
12
- * such as a manifest.
11
+ * Use built-in names such as `intl`, or pass an external JSPI extension
12
+ * source such as a manifest.
13
13
  */
14
14
  extensions?: PHPWebExtension[];
15
15
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/web",
3
- "version": "3.1.22",
3
+ "version": "3.1.26",
4
4
  "description": "PHP.wasm for the web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,6 +39,7 @@
39
39
  "types": "index.d.ts",
40
40
  "dependencies": {
41
41
  "@zip.js/zip.js": "2.7.57",
42
+ "ajv": "8.12.0",
42
43
  "async-lock": "1.4.1",
43
44
  "clean-git-ref": "2.0.1",
44
45
  "crc-32": "1.2.2",
@@ -59,23 +60,23 @@
59
60
  "wasm-feature-detect": "1.8.0",
60
61
  "ws": "8.18.0",
61
62
  "yargs": "17.7.2",
62
- "@php-wasm/util": "3.1.22",
63
- "@php-wasm/universal": "3.1.22",
64
- "@php-wasm/logger": "3.1.22",
65
- "@php-wasm/fs-journal": "3.1.22",
66
- "@wp-playground/storage": "3.1.22",
67
- "@php-wasm/web-8-5": "3.1.22",
68
- "@php-wasm/web-8-4": "3.1.22",
69
- "@php-wasm/web-8-3": "3.1.22",
70
- "@php-wasm/web-8-2": "3.1.22",
71
- "@php-wasm/web-8-1": "3.1.22",
72
- "@php-wasm/web-8-0": "3.1.22",
73
- "@php-wasm/web-7-4": "3.1.22",
74
- "@wp-playground/common": "3.1.22",
75
- "@php-wasm/web-5-2": "3.1.22",
76
- "@php-wasm/web-service-worker": "3.1.22"
63
+ "@php-wasm/util": "3.1.26",
64
+ "@php-wasm/universal": "3.1.26",
65
+ "@php-wasm/logger": "3.1.26",
66
+ "@php-wasm/fs-journal": "3.1.26",
67
+ "@wp-playground/storage": "3.1.26",
68
+ "@php-wasm/web-8-5": "3.1.26",
69
+ "@php-wasm/web-8-4": "3.1.26",
70
+ "@php-wasm/web-8-3": "3.1.26",
71
+ "@php-wasm/web-8-2": "3.1.26",
72
+ "@php-wasm/web-8-1": "3.1.26",
73
+ "@php-wasm/web-8-0": "3.1.26",
74
+ "@php-wasm/web-7-4": "3.1.26",
75
+ "@wp-playground/common": "3.1.26",
76
+ "@php-wasm/web-5-2": "3.1.26",
77
+ "@php-wasm/web-service-worker": "3.1.26"
77
78
  },
78
- "gitHead": "04c986b63dd56fe74e4ed0cf04d00cae7ac050bf",
79
+ "gitHead": "6acfccb8e79f4e664429e3f729f04dbf2ff55303",
79
80
  "engines": {
80
81
  "node": ">=20.10.0",
81
82
  "npm": ">=10.2.3"
@@ -1,5 +1,5 @@
1
1
  import { PHP, PHPRequestHandler, proxyFileSystem, setPhpIniEntries } from '@php-wasm/universal';
2
- import { generateCertificate, loadWebRuntime } from '../../lib';
2
+ import { certificateToPEM, generateCertificate, loadWebRuntime } from '../../lib';
3
3
  declare global {
4
4
  interface Window {
5
5
  PHP: typeof PHP;
@@ -8,5 +8,6 @@ declare global {
8
8
  proxyFileSystem: typeof proxyFileSystem;
9
9
  setPhpIniEntries: typeof setPhpIniEntries;
10
10
  generateCertificate: typeof generateCertificate;
11
+ certificateToPEM: typeof certificateToPEM;
11
12
  }
12
13
  }