@php-wasm/node 1.1.4 → 1.1.5
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/asyncify/php_7_2.js +23 -0
- package/asyncify/php_7_3.js +23 -0
- package/asyncify/php_7_4.js +23 -0
- package/asyncify/php_8_0.js +23 -0
- package/asyncify/php_8_1.js +23 -0
- package/asyncify/php_8_2.js +23 -0
- package/asyncify/php_8_3.js +23 -0
- package/asyncify/php_8_4.js +23 -0
- package/index.cjs +328 -32
- package/index.js +328 -32
- package/jspi/php_7_2.js +41 -4
- package/jspi/php_7_3.js +41 -4
- package/jspi/php_7_4.js +41 -4
- package/jspi/php_8_0.js +41 -4
- package/jspi/php_8_1.js +41 -4
- package/jspi/php_8_2.js +41 -4
- package/jspi/php_8_3.js +41 -4
- package/jspi/php_8_4.js +41 -4
- package/package.json +8 -8
package/asyncify/php_7_2.js
CHANGED
|
@@ -7002,6 +7002,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7002
7002
|
|
|
7003
7003
|
var PHPWASM = {
|
|
7004
7004
|
init: function () {
|
|
7005
|
+
Module['ENV'] = Module['ENV'] || {};
|
|
7006
|
+
// Ensure a platform-level bin directory for a fallback `php` binary.
|
|
7007
|
+
Module['ENV']['PATH'] = [
|
|
7008
|
+
Module['ENV']['PATH'],
|
|
7009
|
+
'/internal/shared/bin',
|
|
7010
|
+
]
|
|
7011
|
+
.filter(Boolean)
|
|
7012
|
+
.join(':');
|
|
7013
|
+
|
|
7005
7014
|
// The /internal directory is required by the C module. It's where the
|
|
7006
7015
|
// stdout, stderr, and headers information are written for the JavaScript
|
|
7007
7016
|
// code to read later on.
|
|
@@ -7012,6 +7021,20 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7012
7021
|
// The files from the preload directory are preloaded using the
|
|
7013
7022
|
// auto_prepend_file php.ini directive.
|
|
7014
7023
|
FS.mkdir('/internal/shared/preload');
|
|
7024
|
+
// Platform-level bin directory for a fallback `php` binary. Without it,
|
|
7025
|
+
// PHP may not populate the PHP_BINARY constant.
|
|
7026
|
+
FS.mkdir('/internal/shared/bin');
|
|
7027
|
+
const originalOnRuntimeInitialized = Module['onRuntimeInitialized'];
|
|
7028
|
+
Module['onRuntimeInitialized'] = () => {
|
|
7029
|
+
// Dummy PHP binary for PHP to populate the PHP_BINARY constant.
|
|
7030
|
+
FS.writeFile(
|
|
7031
|
+
'/internal/shared/bin/php',
|
|
7032
|
+
new TextEncoder().encode('#!/bin/sh\nphp "$@"')
|
|
7033
|
+
);
|
|
7034
|
+
// It must be executable to be used by PHP.
|
|
7035
|
+
FS.chmod('/internal/shared/bin/php', 0o755);
|
|
7036
|
+
originalOnRuntimeInitialized();
|
|
7037
|
+
};
|
|
7015
7038
|
// Create stdout and stderr devices. We can't just use Emscripten's
|
|
7016
7039
|
// default stdout and stderr devices because they stop processing data
|
|
7017
7040
|
// on the first null byte. However, when dealing with binary data,
|
package/asyncify/php_7_3.js
CHANGED
|
@@ -7002,6 +7002,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7002
7002
|
|
|
7003
7003
|
var PHPWASM = {
|
|
7004
7004
|
init: function () {
|
|
7005
|
+
Module['ENV'] = Module['ENV'] || {};
|
|
7006
|
+
// Ensure a platform-level bin directory for a fallback `php` binary.
|
|
7007
|
+
Module['ENV']['PATH'] = [
|
|
7008
|
+
Module['ENV']['PATH'],
|
|
7009
|
+
'/internal/shared/bin',
|
|
7010
|
+
]
|
|
7011
|
+
.filter(Boolean)
|
|
7012
|
+
.join(':');
|
|
7013
|
+
|
|
7005
7014
|
// The /internal directory is required by the C module. It's where the
|
|
7006
7015
|
// stdout, stderr, and headers information are written for the JavaScript
|
|
7007
7016
|
// code to read later on.
|
|
@@ -7012,6 +7021,20 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7012
7021
|
// The files from the preload directory are preloaded using the
|
|
7013
7022
|
// auto_prepend_file php.ini directive.
|
|
7014
7023
|
FS.mkdir('/internal/shared/preload');
|
|
7024
|
+
// Platform-level bin directory for a fallback `php` binary. Without it,
|
|
7025
|
+
// PHP may not populate the PHP_BINARY constant.
|
|
7026
|
+
FS.mkdir('/internal/shared/bin');
|
|
7027
|
+
const originalOnRuntimeInitialized = Module['onRuntimeInitialized'];
|
|
7028
|
+
Module['onRuntimeInitialized'] = () => {
|
|
7029
|
+
// Dummy PHP binary for PHP to populate the PHP_BINARY constant.
|
|
7030
|
+
FS.writeFile(
|
|
7031
|
+
'/internal/shared/bin/php',
|
|
7032
|
+
new TextEncoder().encode('#!/bin/sh\nphp "$@"')
|
|
7033
|
+
);
|
|
7034
|
+
// It must be executable to be used by PHP.
|
|
7035
|
+
FS.chmod('/internal/shared/bin/php', 0o755);
|
|
7036
|
+
originalOnRuntimeInitialized();
|
|
7037
|
+
};
|
|
7015
7038
|
// Create stdout and stderr devices. We can't just use Emscripten's
|
|
7016
7039
|
// default stdout and stderr devices because they stop processing data
|
|
7017
7040
|
// on the first null byte. However, when dealing with binary data,
|
package/asyncify/php_7_4.js
CHANGED
|
@@ -7002,6 +7002,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7002
7002
|
|
|
7003
7003
|
var PHPWASM = {
|
|
7004
7004
|
init: function () {
|
|
7005
|
+
Module['ENV'] = Module['ENV'] || {};
|
|
7006
|
+
// Ensure a platform-level bin directory for a fallback `php` binary.
|
|
7007
|
+
Module['ENV']['PATH'] = [
|
|
7008
|
+
Module['ENV']['PATH'],
|
|
7009
|
+
'/internal/shared/bin',
|
|
7010
|
+
]
|
|
7011
|
+
.filter(Boolean)
|
|
7012
|
+
.join(':');
|
|
7013
|
+
|
|
7005
7014
|
// The /internal directory is required by the C module. It's where the
|
|
7006
7015
|
// stdout, stderr, and headers information are written for the JavaScript
|
|
7007
7016
|
// code to read later on.
|
|
@@ -7012,6 +7021,20 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7012
7021
|
// The files from the preload directory are preloaded using the
|
|
7013
7022
|
// auto_prepend_file php.ini directive.
|
|
7014
7023
|
FS.mkdir('/internal/shared/preload');
|
|
7024
|
+
// Platform-level bin directory for a fallback `php` binary. Without it,
|
|
7025
|
+
// PHP may not populate the PHP_BINARY constant.
|
|
7026
|
+
FS.mkdir('/internal/shared/bin');
|
|
7027
|
+
const originalOnRuntimeInitialized = Module['onRuntimeInitialized'];
|
|
7028
|
+
Module['onRuntimeInitialized'] = () => {
|
|
7029
|
+
// Dummy PHP binary for PHP to populate the PHP_BINARY constant.
|
|
7030
|
+
FS.writeFile(
|
|
7031
|
+
'/internal/shared/bin/php',
|
|
7032
|
+
new TextEncoder().encode('#!/bin/sh\nphp "$@"')
|
|
7033
|
+
);
|
|
7034
|
+
// It must be executable to be used by PHP.
|
|
7035
|
+
FS.chmod('/internal/shared/bin/php', 0o755);
|
|
7036
|
+
originalOnRuntimeInitialized();
|
|
7037
|
+
};
|
|
7015
7038
|
// Create stdout and stderr devices. We can't just use Emscripten's
|
|
7016
7039
|
// default stdout and stderr devices because they stop processing data
|
|
7017
7040
|
// on the first null byte. However, when dealing with binary data,
|
package/asyncify/php_8_0.js
CHANGED
|
@@ -7002,6 +7002,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7002
7002
|
|
|
7003
7003
|
var PHPWASM = {
|
|
7004
7004
|
init: function () {
|
|
7005
|
+
Module['ENV'] = Module['ENV'] || {};
|
|
7006
|
+
// Ensure a platform-level bin directory for a fallback `php` binary.
|
|
7007
|
+
Module['ENV']['PATH'] = [
|
|
7008
|
+
Module['ENV']['PATH'],
|
|
7009
|
+
'/internal/shared/bin',
|
|
7010
|
+
]
|
|
7011
|
+
.filter(Boolean)
|
|
7012
|
+
.join(':');
|
|
7013
|
+
|
|
7005
7014
|
// The /internal directory is required by the C module. It's where the
|
|
7006
7015
|
// stdout, stderr, and headers information are written for the JavaScript
|
|
7007
7016
|
// code to read later on.
|
|
@@ -7012,6 +7021,20 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7012
7021
|
// The files from the preload directory are preloaded using the
|
|
7013
7022
|
// auto_prepend_file php.ini directive.
|
|
7014
7023
|
FS.mkdir('/internal/shared/preload');
|
|
7024
|
+
// Platform-level bin directory for a fallback `php` binary. Without it,
|
|
7025
|
+
// PHP may not populate the PHP_BINARY constant.
|
|
7026
|
+
FS.mkdir('/internal/shared/bin');
|
|
7027
|
+
const originalOnRuntimeInitialized = Module['onRuntimeInitialized'];
|
|
7028
|
+
Module['onRuntimeInitialized'] = () => {
|
|
7029
|
+
// Dummy PHP binary for PHP to populate the PHP_BINARY constant.
|
|
7030
|
+
FS.writeFile(
|
|
7031
|
+
'/internal/shared/bin/php',
|
|
7032
|
+
new TextEncoder().encode('#!/bin/sh\nphp "$@"')
|
|
7033
|
+
);
|
|
7034
|
+
// It must be executable to be used by PHP.
|
|
7035
|
+
FS.chmod('/internal/shared/bin/php', 0o755);
|
|
7036
|
+
originalOnRuntimeInitialized();
|
|
7037
|
+
};
|
|
7015
7038
|
// Create stdout and stderr devices. We can't just use Emscripten's
|
|
7016
7039
|
// default stdout and stderr devices because they stop processing data
|
|
7017
7040
|
// on the first null byte. However, when dealing with binary data,
|
package/asyncify/php_8_1.js
CHANGED
|
@@ -7030,6 +7030,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7030
7030
|
|
|
7031
7031
|
var PHPWASM = {
|
|
7032
7032
|
init: function () {
|
|
7033
|
+
Module['ENV'] = Module['ENV'] || {};
|
|
7034
|
+
// Ensure a platform-level bin directory for a fallback `php` binary.
|
|
7035
|
+
Module['ENV']['PATH'] = [
|
|
7036
|
+
Module['ENV']['PATH'],
|
|
7037
|
+
'/internal/shared/bin',
|
|
7038
|
+
]
|
|
7039
|
+
.filter(Boolean)
|
|
7040
|
+
.join(':');
|
|
7041
|
+
|
|
7033
7042
|
// The /internal directory is required by the C module. It's where the
|
|
7034
7043
|
// stdout, stderr, and headers information are written for the JavaScript
|
|
7035
7044
|
// code to read later on.
|
|
@@ -7040,6 +7049,20 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7040
7049
|
// The files from the preload directory are preloaded using the
|
|
7041
7050
|
// auto_prepend_file php.ini directive.
|
|
7042
7051
|
FS.mkdir('/internal/shared/preload');
|
|
7052
|
+
// Platform-level bin directory for a fallback `php` binary. Without it,
|
|
7053
|
+
// PHP may not populate the PHP_BINARY constant.
|
|
7054
|
+
FS.mkdir('/internal/shared/bin');
|
|
7055
|
+
const originalOnRuntimeInitialized = Module['onRuntimeInitialized'];
|
|
7056
|
+
Module['onRuntimeInitialized'] = () => {
|
|
7057
|
+
// Dummy PHP binary for PHP to populate the PHP_BINARY constant.
|
|
7058
|
+
FS.writeFile(
|
|
7059
|
+
'/internal/shared/bin/php',
|
|
7060
|
+
new TextEncoder().encode('#!/bin/sh\nphp "$@"')
|
|
7061
|
+
);
|
|
7062
|
+
// It must be executable to be used by PHP.
|
|
7063
|
+
FS.chmod('/internal/shared/bin/php', 0o755);
|
|
7064
|
+
originalOnRuntimeInitialized();
|
|
7065
|
+
};
|
|
7043
7066
|
// Create stdout and stderr devices. We can't just use Emscripten's
|
|
7044
7067
|
// default stdout and stderr devices because they stop processing data
|
|
7045
7068
|
// on the first null byte. However, when dealing with binary data,
|
package/asyncify/php_8_2.js
CHANGED
|
@@ -7032,6 +7032,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7032
7032
|
|
|
7033
7033
|
var PHPWASM = {
|
|
7034
7034
|
init: function () {
|
|
7035
|
+
Module['ENV'] = Module['ENV'] || {};
|
|
7036
|
+
// Ensure a platform-level bin directory for a fallback `php` binary.
|
|
7037
|
+
Module['ENV']['PATH'] = [
|
|
7038
|
+
Module['ENV']['PATH'],
|
|
7039
|
+
'/internal/shared/bin',
|
|
7040
|
+
]
|
|
7041
|
+
.filter(Boolean)
|
|
7042
|
+
.join(':');
|
|
7043
|
+
|
|
7035
7044
|
// The /internal directory is required by the C module. It's where the
|
|
7036
7045
|
// stdout, stderr, and headers information are written for the JavaScript
|
|
7037
7046
|
// code to read later on.
|
|
@@ -7042,6 +7051,20 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7042
7051
|
// The files from the preload directory are preloaded using the
|
|
7043
7052
|
// auto_prepend_file php.ini directive.
|
|
7044
7053
|
FS.mkdir('/internal/shared/preload');
|
|
7054
|
+
// Platform-level bin directory for a fallback `php` binary. Without it,
|
|
7055
|
+
// PHP may not populate the PHP_BINARY constant.
|
|
7056
|
+
FS.mkdir('/internal/shared/bin');
|
|
7057
|
+
const originalOnRuntimeInitialized = Module['onRuntimeInitialized'];
|
|
7058
|
+
Module['onRuntimeInitialized'] = () => {
|
|
7059
|
+
// Dummy PHP binary for PHP to populate the PHP_BINARY constant.
|
|
7060
|
+
FS.writeFile(
|
|
7061
|
+
'/internal/shared/bin/php',
|
|
7062
|
+
new TextEncoder().encode('#!/bin/sh\nphp "$@"')
|
|
7063
|
+
);
|
|
7064
|
+
// It must be executable to be used by PHP.
|
|
7065
|
+
FS.chmod('/internal/shared/bin/php', 0o755);
|
|
7066
|
+
originalOnRuntimeInitialized();
|
|
7067
|
+
};
|
|
7045
7068
|
// Create stdout and stderr devices. We can't just use Emscripten's
|
|
7046
7069
|
// default stdout and stderr devices because they stop processing data
|
|
7047
7070
|
// on the first null byte. However, when dealing with binary data,
|
package/asyncify/php_8_3.js
CHANGED
|
@@ -7032,6 +7032,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7032
7032
|
|
|
7033
7033
|
var PHPWASM = {
|
|
7034
7034
|
init: function () {
|
|
7035
|
+
Module['ENV'] = Module['ENV'] || {};
|
|
7036
|
+
// Ensure a platform-level bin directory for a fallback `php` binary.
|
|
7037
|
+
Module['ENV']['PATH'] = [
|
|
7038
|
+
Module['ENV']['PATH'],
|
|
7039
|
+
'/internal/shared/bin',
|
|
7040
|
+
]
|
|
7041
|
+
.filter(Boolean)
|
|
7042
|
+
.join(':');
|
|
7043
|
+
|
|
7035
7044
|
// The /internal directory is required by the C module. It's where the
|
|
7036
7045
|
// stdout, stderr, and headers information are written for the JavaScript
|
|
7037
7046
|
// code to read later on.
|
|
@@ -7042,6 +7051,20 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7042
7051
|
// The files from the preload directory are preloaded using the
|
|
7043
7052
|
// auto_prepend_file php.ini directive.
|
|
7044
7053
|
FS.mkdir('/internal/shared/preload');
|
|
7054
|
+
// Platform-level bin directory for a fallback `php` binary. Without it,
|
|
7055
|
+
// PHP may not populate the PHP_BINARY constant.
|
|
7056
|
+
FS.mkdir('/internal/shared/bin');
|
|
7057
|
+
const originalOnRuntimeInitialized = Module['onRuntimeInitialized'];
|
|
7058
|
+
Module['onRuntimeInitialized'] = () => {
|
|
7059
|
+
// Dummy PHP binary for PHP to populate the PHP_BINARY constant.
|
|
7060
|
+
FS.writeFile(
|
|
7061
|
+
'/internal/shared/bin/php',
|
|
7062
|
+
new TextEncoder().encode('#!/bin/sh\nphp "$@"')
|
|
7063
|
+
);
|
|
7064
|
+
// It must be executable to be used by PHP.
|
|
7065
|
+
FS.chmod('/internal/shared/bin/php', 0o755);
|
|
7066
|
+
originalOnRuntimeInitialized();
|
|
7067
|
+
};
|
|
7045
7068
|
// Create stdout and stderr devices. We can't just use Emscripten's
|
|
7046
7069
|
// default stdout and stderr devices because they stop processing data
|
|
7047
7070
|
// on the first null byte. However, when dealing with binary data,
|
package/asyncify/php_8_4.js
CHANGED
|
@@ -7032,6 +7032,15 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7032
7032
|
|
|
7033
7033
|
var PHPWASM = {
|
|
7034
7034
|
init: function () {
|
|
7035
|
+
Module['ENV'] = Module['ENV'] || {};
|
|
7036
|
+
// Ensure a platform-level bin directory for a fallback `php` binary.
|
|
7037
|
+
Module['ENV']['PATH'] = [
|
|
7038
|
+
Module['ENV']['PATH'],
|
|
7039
|
+
'/internal/shared/bin',
|
|
7040
|
+
]
|
|
7041
|
+
.filter(Boolean)
|
|
7042
|
+
.join(':');
|
|
7043
|
+
|
|
7035
7044
|
// The /internal directory is required by the C module. It's where the
|
|
7036
7045
|
// stdout, stderr, and headers information are written for the JavaScript
|
|
7037
7046
|
// code to read later on.
|
|
@@ -7042,6 +7051,20 @@ export function init(RuntimeName, PHPLoader) {
|
|
|
7042
7051
|
// The files from the preload directory are preloaded using the
|
|
7043
7052
|
// auto_prepend_file php.ini directive.
|
|
7044
7053
|
FS.mkdir('/internal/shared/preload');
|
|
7054
|
+
// Platform-level bin directory for a fallback `php` binary. Without it,
|
|
7055
|
+
// PHP may not populate the PHP_BINARY constant.
|
|
7056
|
+
FS.mkdir('/internal/shared/bin');
|
|
7057
|
+
const originalOnRuntimeInitialized = Module['onRuntimeInitialized'];
|
|
7058
|
+
Module['onRuntimeInitialized'] = () => {
|
|
7059
|
+
// Dummy PHP binary for PHP to populate the PHP_BINARY constant.
|
|
7060
|
+
FS.writeFile(
|
|
7061
|
+
'/internal/shared/bin/php',
|
|
7062
|
+
new TextEncoder().encode('#!/bin/sh\nphp "$@"')
|
|
7063
|
+
);
|
|
7064
|
+
// It must be executable to be used by PHP.
|
|
7065
|
+
FS.chmod('/internal/shared/bin/php', 0o755);
|
|
7066
|
+
originalOnRuntimeInitialized();
|
|
7067
|
+
};
|
|
7045
7068
|
// Create stdout and stderr devices. We can't just use Emscripten's
|
|
7046
7069
|
// default stdout and stderr devices because they stop processing data
|
|
7047
7070
|
// on the first null byte. However, when dealing with binary data,
|