@php-wasm/universal 3.1.30 → 3.1.32

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
@@ -36,7 +36,7 @@ export { rotatePHPRuntime } from './rotate-php-runtime';
36
36
  export { writeFiles } from './write-files';
37
37
  export type { FileTree } from './write-files';
38
38
  export { withResolvedPHPExtensions, installPHPExtensionFilesSync, PHP_EXTENSIONS_DIR, resolvePHPExtension, } from './load-extension';
39
- export type { InstallPHPExtensionFilesOptions, PHPExtensionIniDirective, ResolvedInstallOptions, ResolvedPHPExtension, PHPExtensionManifest, PHPExtensionManifestExtraFiles, PHPExtensionSource, } from './load-extension';
39
+ export type { InstallPHPExtensionFilesOptions, PHPExtensionIniDirective, PHPExtensionLoadDirective, ResolvedInstallOptions, ResolvedPHPExtension, PHPExtensionManifest, PHPExtensionManifestExtraFiles, PHPExtensionSource, } from './load-extension';
40
40
  export { DEFAULT_BASE_URL, ensurePathPrefix, removePathPrefix, toRelativeUrl, } from './urls';
41
41
  export { isExitCode } from './is-exit-code';
42
42
  export { proxyFileSystem, isPathToSharedFS } from './proxy-file-system';
@@ -10,6 +10,7 @@ export declare const PHP_EXTENSIONS_DIR = "/internal/shared/extensions";
10
10
  * regular PHP extensions and `zend_extension` for Zend extensions like Xdebug.
11
11
  */
12
12
  export type PHPExtensionIniDirective = 'extension' | 'zend_extension';
13
+ export type PHPExtensionLoadDirective = PHPExtensionIniDirective | false;
13
14
  /**
14
15
  * Extension artifact manifest. Lets callers publish a matrix of `.so` files
15
16
  * and lets `resolvePHPExtension()` select the artifact matching the current
@@ -19,6 +20,21 @@ export interface PHPExtensionManifest {
19
20
  name: string;
20
21
  version?: string;
21
22
  mode?: 'php-extension';
23
+ /**
24
+ * The first directive of the generated startup `.ini` file. Defaults to
25
+ * `extension`; use `zend_extension` for Zend extensions like Xdebug.
26
+ * Use `false` to stage the `.so` without registering it in php.ini.
27
+ */
28
+ loadWithIniDirective?: PHPExtensionLoadDirective;
29
+ /** Additional `key=value` lines for the generated startup `.ini` file. */
30
+ iniEntries?: Record<string, string>;
31
+ /** Environment variables added before the extension is loaded. */
32
+ env?: Record<string, string>;
33
+ /**
34
+ * VFS directory where PHP.wasm writes the extension `.so` file and its
35
+ * per-extension ini file. Defaults to `PHP_EXTENSIONS_DIR`.
36
+ */
37
+ extensionDir?: string;
22
38
  artifacts: Array<{
23
39
  /** PHP major/minor version, e.g. `8.4`. */
24
40
  phpVersion: string;
@@ -85,7 +101,7 @@ export interface ResolvedInstallOptions {
85
101
  * extensions need `extension=...`; Zend extensions like Xdebug need
86
102
  * `zend_extension=...`.
87
103
  */
88
- loadWithIniDirective?: PHPExtensionIniDirective;
104
+ loadWithIniDirective?: PHPExtensionLoadDirective;
89
105
  /** Additional `key=value` lines for the generated startup `.ini` file. */
90
106
  iniEntries?: Record<string, string>;
91
107
  /**
@@ -119,13 +135,13 @@ export interface ResolvedPHPExtension {
119
135
  /** Compiled extension bytes to write at `soPath`. */
120
136
  soBytes: Uint8Array;
121
137
  /** Absolute VFS path the generated per-extension ini file is staged at. */
122
- iniPath: string;
138
+ iniPath?: string;
123
139
  /**
124
140
  * Contents of the generated per-extension ini file. The first line is the
125
141
  * `extension=` or `zend_extension=` directive; remaining lines are the
126
142
  * caller-supplied `iniEntries`.
127
143
  */
128
- iniContent: string;
144
+ iniContent?: string;
129
145
  /** Sidecar files staged alongside the extension. Optional. */
130
146
  extraFiles?: ResolvedExtraFiles;
131
147
  /** Environment variables added before PHP startup. */
@@ -159,7 +175,7 @@ export interface InstallPHPExtensionFilesOptions {
159
175
  * extensions need `extension=...`; Zend extensions like Xdebug need
160
176
  * `zend_extension=...`.
161
177
  */
162
- loadWithIniDirective?: PHPExtensionIniDirective;
178
+ loadWithIniDirective?: PHPExtensionLoadDirective;
163
179
  /** Additional `key=value` lines for the generated startup `.ini` file. */
164
180
  iniEntries?: Record<string, string>;
165
181
  /** Sidecar files to write into the PHP VFS before the extension is loaded. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@php-wasm/universal",
3
- "version": "3.1.30",
3
+ "version": "3.1.32",
4
4
  "description": "PHP.wasm – emscripten bindings for PHP",
5
5
  "repository": {
6
6
  "type": "git",
@@ -37,17 +37,17 @@
37
37
  "module": "./index.js",
38
38
  "types": "index.d.ts",
39
39
  "license": "GPL-2.0-or-later",
40
- "gitHead": "1034030cf2893113dfc0d3a3ff79b1c60906cabe",
40
+ "gitHead": "992e9bb9c6aa842bb646044f56491c10fcb82e46",
41
41
  "engines": {
42
42
  "node": ">=20.10.0",
43
43
  "npm": ">=10.2.3"
44
44
  },
45
45
  "dependencies": {
46
46
  "ini": "4.1.2",
47
- "@php-wasm/logger": "3.1.30",
48
- "@php-wasm/util": "3.1.30",
49
- "@php-wasm/stream-compression": "3.1.30",
50
- "@php-wasm/progress": "3.1.30"
47
+ "@php-wasm/logger": "3.1.32",
48
+ "@php-wasm/util": "3.1.32",
49
+ "@php-wasm/stream-compression": "3.1.32",
50
+ "@php-wasm/progress": "3.1.32"
51
51
  },
52
52
  "packageManager": "npm@10.9.2",
53
53
  "overrides": {