New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@php-wasm/universal

Package Overview
Dependencies
Maintainers
3
Versions
125
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 0.1.56 to 0.1.58

39

index.js

@@ -304,6 +304,6 @@ const v = Symbol("error"), _ = Symbol("message");

const j = "http://example.com";
function k(s) {
function T(s) {
return s.toString().substring(s.origin.length);
}
function T(s, e) {
function k(s, e) {
return !e || !s.startsWith(e) ? s : s.substring(e.length);

@@ -355,3 +355,3 @@ }

const t = new URL(e);
return t.pathname.startsWith(this.#n) && (t.pathname = t.pathname.slice(this.#n.length)), k(t);
return t.pathname.startsWith(this.#n) && (t.pathname = t.pathname.slice(this.#n.length)), T(t);
}

@@ -374,3 +374,3 @@ get isRequestRunning() {

t ? void 0 : j
), n = T(
), n = k(
r.pathname,

@@ -460,3 +460,3 @@ this.#n

relativeUri: z(
k(t),
T(t),
this.#n

@@ -485,3 +485,3 @@ ),

#u(e) {
let t = T(e, this.#n);
let t = k(e, this.#n);
t.includes(".php") ? t = t.split(".php")[0] + ".php" : (t.endsWith("/") || (t += "/"), t.endsWith("index.php") || (t += "index.php"));

@@ -865,7 +865,9 @@ const r = `${this.#e}${t}`;

);
for (const t in e)
this.addServerGlobalEntry(
`HTTP_${t.toUpperCase().replace(/-/g, "_")}`,
for (const t in e) {
let r = "HTTP_";
["content-type", "content-length"].includes(t.toLowerCase()) && (r = ""), this.addServerGlobalEntry(
`${r}${t.toUpperCase().replace(/-/g, "_")}`,
e[t]
);
}
}

@@ -1001,11 +1003,16 @@ #h(e) {

}
listFiles(e) {
listFiles(e, t = { prependPath: !1 }) {
if (!this.fileExists(e))
return [];
try {
return this[a].FS.readdir(e).filter(
(t) => t !== "." && t !== ".."
const r = this[a].FS.readdir(e).filter(
(n) => n !== "." && n !== ".."
);
} catch (t) {
return console.error(t, { path: e }), [];
if (t.prependPath) {
const n = e.replace(/\/$/, "");
return r.map((o) => `${n}/${o}`);
}
return r;
} catch (r) {
return console.error(r, { path: e }), [];
}

@@ -1086,5 +1093,5 @@ }

re as loadPHPRuntime,
T as removePathPrefix,
k as removePathPrefix,
p as rethrowFileSystemError,
k as toRelativeUrl
T as toRelativeUrl
};

@@ -5,3 +5,3 @@ import { PHPBrowser } from './php-browser';

import type { PHPRuntimeId } from './load-php-runtime';
import { IsomorphicLocalPHP, PHPRequest, PHPRunOptions, RmDirOptions } from './universal-php';
import { IsomorphicLocalPHP, PHPRequest, PHPRunOptions, RmDirOptions, ListFilesOptions } from './universal-php';
export declare const __private__dont__use: unique symbol;

@@ -65,3 +65,3 @@ /**

/** @inheritDoc */
listFiles(path: string): string[];
listFiles(path: string, options?: ListFilesOptions): string[];
/** @inheritDoc */

@@ -68,0 +68,0 @@ isDir(path: string): boolean;

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

export type { FileInfo, IsomorphicLocalPHP, IsomorphicRemotePHP, PHPOutput, PHPRunOptions, UniversalPHP, RmDirOptions, HTTPMethod, PHPRequest, PHPRequestHeaders, RequestHandler, } from './universal-php';
export type { FileInfo, IsomorphicLocalPHP, IsomorphicRemotePHP, PHPOutput, PHPRunOptions, UniversalPHP, ListFilesOptions, RmDirOptions, HTTPMethod, PHPRequest, PHPRequestHeaders, RequestHandler, } from './universal-php';
export { UnhandledRejectionsTarget } from './wasm-error-reporting';

@@ -3,0 +3,0 @@ export { PHPResponse } from './php-response';

@@ -209,5 +209,6 @@ import { Remote } from 'comlink';

* @param path - The directory path to list.
* @param options - Options for the listing.
* @returns The list of files and directories in the given directory.
*/
listFiles(path: string): string[];
listFiles(path: string, options?: ListFilesOptions): string[];
/**

@@ -396,1 +397,8 @@ * Checks if a directory exists in the PHP filesystem.

}
export interface ListFilesOptions {
/**
* If true, prepend given folder path to all file names.
* Default: false.
*/
prependPath: boolean;
}
{
"name": "@php-wasm/universal",
"version": "0.1.56",
"version": "0.1.58",
"description": "PHP.wasm – emscripten bindings for PHP",

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

"license": "GPL-2.0-or-later",
"gitHead": "af3583eb7c6644a9859ea4782702c6e2c3474821"
"gitHead": "dbc77ed4c0b0a2625cfbe08722fade036c69a425"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc