Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type {
WholeFileLockOp,
Pid,
Fd,
} from './file-lock-manager';
} from '@php-wasm/universal';

type LockMode = 'exclusive' | 'shared' | 'unlock';

Expand Down
1 change: 0 additions & 1 deletion packages/php-wasm/node/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ export * from './networking/with-networking';
export * from './load-runtime';
export * from './use-host-filesystem';
export * from './node-fs-mount';
export * from './file-lock-manager';
export * from './file-lock-manager-for-node';
export * from './xdebug/with-xdebug';
2 changes: 1 addition & 1 deletion packages/php-wasm/node/src/lib/load-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import type {
EmscriptenOptions,
PHPRuntime,
RemoteAPI,
FileLockManager,
} from '@php-wasm/universal';
import { loadPHPRuntime, FSHelpers } from '@php-wasm/universal';
import fs from 'fs';
import { getPHPLoaderModule } from '.';
import { withNetworking } from './networking/with-networking';
import type { FileLockManager } from './file-lock-manager';
import { withXdebug, type XdebugOptions } from './xdebug/with-xdebug';
import { withIntl } from './extensions/intl/with-intl';
import { joinPaths } from '@php-wasm/util';
Expand Down
7 changes: 6 additions & 1 deletion packages/php-wasm/universal/src/lib/emscripten-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export namespace Emscripten {

export interface Mount {
type: Emscripten.FileSystemType;
opts: object;
opts: Record<string, any>;
mountpoint: string;
mounts: Mount[];
root: FSNode;
Expand Down Expand Up @@ -185,6 +185,10 @@ export namespace Emscripten {
write: boolean;
readonly isFolder: boolean;
readonly isDevice: boolean;

// NOTE: As of 2025-11-11, this property is added by a php-wasm patch
// for NODEFS.createNode(). It is not part of the Emscripten FSNode interface.
readonly isSharedFS?: boolean;
}

export interface ErrnoError extends Error {
Expand Down Expand Up @@ -394,6 +398,7 @@ export namespace Emscripten {
export declare const MEMFS: Emscripten.FileSystemType;
export declare const NODEFS: Emscripten.FileSystemType;
export declare const IDBFS: Emscripten.FileSystemType;
export declare const PROXYFS: Emscripten.FileSystemType;

// https://emscripten.org/docs/porting/connecting_cpp_and_javascript/Interacting-with-code.html
type StringToType<R> = R extends Emscripten.JSType
Expand Down
2 changes: 2 additions & 0 deletions packages/php-wasm/universal/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,5 @@ export { sandboxedSpawnHandlerFactory } from './sandboxed-spawn-handler-factory'

export * from './api';
export type { WithAPIState as WithIsReady } from './api';

export type * from './file-lock-manager';
11 changes: 11 additions & 0 deletions packages/php-wasm/universal/src/lib/os-kernel-space.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// TODO: Consider merging FileLockManager file with os-kernel-space.
import type { FileLockManager } from './file-lock-manager';

// TODO: Consider merging FileLockManager into this type.
export class OSKernelSpace {
readonly fileLockManager: FileLockManager;

constructor(fileLockManager: FileLockManager) {
this.fileLockManager = fileLockManager;
}
}
Loading
Loading