🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@php-wasm/universal

Package Overview
Dependencies
Maintainers
8
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@php-wasm/universal - npm Package Compare versions

Comparing version
3.1.44
to
3.1.45
+1
-0
lib/api.d.ts

@@ -32,2 +32,3 @@ import { releaseProxy, type NodeEndpoint as NodeWorker, type Remote, type IsomorphicMessagePort, type ProxyMethods } from './comlink-sync';

* { t: 'error', m: string } – terminal error
* { t: 'cancel' } – consumer cancelled the stream
*/

@@ -34,0 +35,0 @@ export declare function streamToPort(stream: ReadableStream<Uint8Array>): MessagePort;

+3
-1

@@ -27,5 +27,7 @@ export type { MessageListener, PHPOutput, PHPRunOptions, UniversalPHP, PHPEvent, PHPEventListener, HTTPMethod, PHPRequest, PHPRequestHeaders, SpawnHandler, } from './universal-php';

export { createLegacyPhpIniPreRunStep, LEGACY_PHP_INI_CONTENT, LEGACY_PHP_INI_PATH, } from './legacy-php-ini';
export { PHP, __private__dont__use, PHPExecutionFailureError } from './php';
export { MountStillActiveError, PHP, __private__dont__use, PHPExecutionFailureError, } from './php';
export type { MountHandler, UnmountFunction } from './php';
export { loadPHPRuntime, popLoadedRuntime } from './load-php-runtime';
export { phpEventStdinTransfer } from '@php-wasm/util';
export type { PHPEventWithStdinTransfer, PHPSendmailSpawnedEvent, } from '@php-wasm/util';
export type { Emscripten } from './emscripten-types';

@@ -32,0 +34,0 @@ export type { DataModule, EmscriptenOptions, PHPLoaderModule, PHPRuntime, PHPRuntimeId, RuntimeType, } from './load-php-runtime';

@@ -121,3 +121,3 @@ import type { EmscriptenDownloadMonitor } from '@php-wasm/progress';

removeEventListener(eventType: PHPWorkerEvent['type'], listener: PHPWorkerEventListener): void;
protected dispatchEvent<Event extends PHPWorkerEvent>(event: Event): void;
protected dispatchEvent<EventType extends PHPWorkerEvent>(event: EventType): void;
protected registerWorkerListeners(php: PHP): void;

@@ -124,0 +124,0 @@ [Symbol.asyncDispose](): Promise<void>;

@@ -17,2 +17,12 @@ /// <reference types="node" />

export type UnmountFunction = (() => Promise<any>) | (() => any);
/**
* Signals that an unmount failed before the mount was detached.
*
* Only this error guarantees that the mount remains active and its teardown can
* be retried, so registries may retain it. `cause` is the underlying failure that
* prevented the unmount. Ordinary unmount errors make no such guarantee.
*/
export declare class MountStillActiveError extends Error {
constructor(cause: unknown);
}
export type MountHandler = (php: PHP, FS: Emscripten.RootFS, vfsMountPoint: string) => UnmountFunction | Promise<UnmountFunction>;

@@ -100,2 +110,8 @@ export declare const PHP_INI_PATH = "/internal/shared/php.ini";

setSpawnHandler(handler: SpawnHandler | string): Promise<void>;
/**
* Overrides spawning of a specific binary, e.g. `sendmail`. The override
* applies to any argv[0] whose basename matches `command` and takes
* precedence over the handler installed via setSpawnHandler().
*/
setCommandSpawnHandler(command: string, handler: SpawnHandler): void;
/** @deprecated Use PHPRequestHandler instead. */

@@ -449,2 +465,6 @@ get absoluteUrl(): string;

*
* The returned unmount function removes the mount from runtime-rotation
* tracking on success or ordinary failure. `MountStillActiveError` leaves it
* tracked because the handler guarantees the mount remains live and retryable.
*
* @param virtualFSPath - Where to mount it in the PHP virtual filesystem.

@@ -451,0 +471,0 @@ * @param mountHandler - The mount handler to use.

@@ -0,1 +1,2 @@

import type { PHPSendmailSpawnedEvent } from '@php-wasm/util';
import type { Remote } from './comlink-sync';

@@ -42,3 +43,3 @@ import type { Pooled } from './object-pool-proxy';

*/
export type PHPEvent = PHPRequestEndEvent | PHPRequestErrorEvent | PHPRuntimeInitializedEvent | PHPRuntimeBeforeExitEvent | PHPFilesystemWriteEvent;
export type PHPEvent = PHPRequestEndEvent | PHPRequestErrorEvent | PHPRuntimeInitializedEvent | PHPRuntimeBeforeExitEvent | PHPFilesystemWriteEvent | PHPSendmailSpawnedEvent;
/**

@@ -45,0 +46,0 @@ * A callback function that handles PHP events.

@@ -15,2 +15,6 @@ import type { UniversalPHP } from './universal-php';

*
* Every key in the file tree must resolve inside the target directory. Paths
* are validated before any existing files are removed so an invalid nested
* entry cannot leave the target directory half-cleared.
*
* @example ```ts

@@ -25,6 +29,10 @@ * await writeFiles(php, '/test', {

* @param php
* The Playground filesystem to write to.
* @param root
* The directory that receives the file tree.
* @param newFiles
* Files and nested directories keyed by relative paths.
* @param options
* Write behavior such as clearing the root first.
*/
export declare function writeFiles(php: UniversalPHP, root: string, newFiles: FileTree, { rmRoot }?: WriteFilesOptions): Promise<void>;
{
"name": "@php-wasm/universal",
"version": "3.1.44",
"version": "3.1.45",
"description": "PHP.wasm – emscripten bindings for PHP",

@@ -40,3 +40,3 @@ "repository": {

"license": "GPL-2.0-or-later",
"gitHead": "0dbdfe5a210d28802052ef7023d385eb005ff7a4",
"gitHead": "d8132e032daf7c1ac2fd568af48444d84a59ced2",
"engines": {

@@ -48,6 +48,6 @@ "node": ">=20.10.0",

"ini": "4.1.2",
"@php-wasm/logger": "3.1.44",
"@php-wasm/util": "3.1.44",
"@php-wasm/stream-compression": "3.1.44",
"@php-wasm/progress": "3.1.44"
"@php-wasm/util": "3.1.45",
"@php-wasm/logger": "3.1.45",
"@php-wasm/stream-compression": "3.1.45",
"@php-wasm/progress": "3.1.45"
},

@@ -54,0 +54,0 @@ "packageManager": "npm@10.9.2",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display