@php-wasm/node 3.1.9 → 3.1.11
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/index.cjs +8 -6
- package/index.js +8 -6
- package/package.json +15 -15
package/index.cjs
CHANGED
|
@@ -1939,11 +1939,11 @@ async function loadNodeRuntime(phpVersion, options = {}) {
|
|
|
1939
1939
|
normalizedPath
|
|
1940
1940
|
);
|
|
1941
1941
|
if (import_fs5.default.existsSync(absoluteSourcePath)) {
|
|
1942
|
+
const sourceStat = import_fs5.default.statSync(absoluteSourcePath);
|
|
1942
1943
|
if (!import_universal12.FSHelpers.fileExists(
|
|
1943
1944
|
phpRuntime.FS,
|
|
1944
1945
|
symlinkMountPath
|
|
1945
1946
|
)) {
|
|
1946
|
-
const sourceStat = import_fs5.default.statSync(absoluteSourcePath);
|
|
1947
1947
|
if (sourceStat.isDirectory()) {
|
|
1948
1948
|
phpRuntime.FS.mkdirTree(symlinkMountPath);
|
|
1949
1949
|
} else if (sourceStat.isFile()) {
|
|
@@ -1957,13 +1957,15 @@ async function loadNodeRuntime(phpVersion, options = {}) {
|
|
|
1957
1957
|
);
|
|
1958
1958
|
}
|
|
1959
1959
|
}
|
|
1960
|
-
const
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1960
|
+
const mountPath = sourceStat.isFile() ? (0, import_util.dirname)(symlinkMountPath) : symlinkMountPath;
|
|
1961
|
+
const mountRoot = sourceStat.isFile() ? (0, import_util.dirname)(normalizedPath) : absoluteSourcePath;
|
|
1962
|
+
const mountNode = phpRuntime.FS.lookupPath(mountPath).node;
|
|
1963
|
+
const isMounted = mountNode.mount.mountpoint === mountPath;
|
|
1964
|
+
if (!isMounted) {
|
|
1963
1965
|
phpRuntime.FS.mount(
|
|
1964
1966
|
phpRuntime.FS.filesystems.NODEFS,
|
|
1965
|
-
{ root:
|
|
1966
|
-
|
|
1967
|
+
{ root: mountRoot },
|
|
1968
|
+
mountPath
|
|
1967
1969
|
);
|
|
1968
1970
|
}
|
|
1969
1971
|
}
|
package/index.js
CHANGED
|
@@ -1921,11 +1921,11 @@ async function loadNodeRuntime(phpVersion, options = {}) {
|
|
|
1921
1921
|
normalizedPath
|
|
1922
1922
|
);
|
|
1923
1923
|
if (fs5.existsSync(absoluteSourcePath)) {
|
|
1924
|
+
const sourceStat = fs5.statSync(absoluteSourcePath);
|
|
1924
1925
|
if (!FSHelpers5.fileExists(
|
|
1925
1926
|
phpRuntime.FS,
|
|
1926
1927
|
symlinkMountPath
|
|
1927
1928
|
)) {
|
|
1928
|
-
const sourceStat = fs5.statSync(absoluteSourcePath);
|
|
1929
1929
|
if (sourceStat.isDirectory()) {
|
|
1930
1930
|
phpRuntime.FS.mkdirTree(symlinkMountPath);
|
|
1931
1931
|
} else if (sourceStat.isFile()) {
|
|
@@ -1939,13 +1939,15 @@ async function loadNodeRuntime(phpVersion, options = {}) {
|
|
|
1939
1939
|
);
|
|
1940
1940
|
}
|
|
1941
1941
|
}
|
|
1942
|
-
const
|
|
1943
|
-
const
|
|
1944
|
-
|
|
1942
|
+
const mountPath = sourceStat.isFile() ? dirname(symlinkMountPath) : symlinkMountPath;
|
|
1943
|
+
const mountRoot = sourceStat.isFile() ? dirname(normalizedPath) : absoluteSourcePath;
|
|
1944
|
+
const mountNode = phpRuntime.FS.lookupPath(mountPath).node;
|
|
1945
|
+
const isMounted = mountNode.mount.mountpoint === mountPath;
|
|
1946
|
+
if (!isMounted) {
|
|
1945
1947
|
phpRuntime.FS.mount(
|
|
1946
1948
|
phpRuntime.FS.filesystems.NODEFS,
|
|
1947
|
-
{ root:
|
|
1948
|
-
|
|
1949
|
+
{ root: mountRoot },
|
|
1950
|
+
mountPath
|
|
1949
1951
|
);
|
|
1950
1952
|
}
|
|
1951
1953
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@php-wasm/node",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.11",
|
|
4
4
|
"description": "PHP.wasm for Node.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"license": "GPL-2.0-or-later",
|
|
40
40
|
"types": "index.d.ts",
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "3b20c772b295a86dba0069170df45b1ec93b0313",
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=20.10.0",
|
|
44
44
|
"npm": ">=10.2.3"
|
|
@@ -52,19 +52,19 @@
|
|
|
52
52
|
"wasm-feature-detect": "1.8.0",
|
|
53
53
|
"ws": "8.18.3",
|
|
54
54
|
"yargs": "17.7.2",
|
|
55
|
-
"@php-wasm/node-polyfills": "3.1.
|
|
56
|
-
"@php-wasm/universal": "3.1.
|
|
57
|
-
"@php-wasm/node-8-5": "3.1.
|
|
58
|
-
"@php-wasm/node-8-4": "3.1.
|
|
59
|
-
"@php-wasm/node-8-3": "3.1.
|
|
60
|
-
"@php-wasm/node-8-2": "3.1.
|
|
61
|
-
"@php-wasm/node-8-1": "3.1.
|
|
62
|
-
"@php-wasm/node-8-0": "3.1.
|
|
63
|
-
"@php-wasm/node-7-4": "3.1.
|
|
64
|
-
"@php-wasm/cli-util": "3.1.
|
|
65
|
-
"@php-wasm/logger": "3.1.
|
|
66
|
-
"@php-wasm/util": "3.1.
|
|
67
|
-
"@wp-playground/common": "3.1.
|
|
55
|
+
"@php-wasm/node-polyfills": "3.1.11",
|
|
56
|
+
"@php-wasm/universal": "3.1.11",
|
|
57
|
+
"@php-wasm/node-8-5": "3.1.11",
|
|
58
|
+
"@php-wasm/node-8-4": "3.1.11",
|
|
59
|
+
"@php-wasm/node-8-3": "3.1.11",
|
|
60
|
+
"@php-wasm/node-8-2": "3.1.11",
|
|
61
|
+
"@php-wasm/node-8-1": "3.1.11",
|
|
62
|
+
"@php-wasm/node-8-0": "3.1.11",
|
|
63
|
+
"@php-wasm/node-7-4": "3.1.11",
|
|
64
|
+
"@php-wasm/cli-util": "3.1.11",
|
|
65
|
+
"@php-wasm/logger": "3.1.11",
|
|
66
|
+
"@php-wasm/util": "3.1.11",
|
|
67
|
+
"@wp-playground/common": "3.1.11"
|
|
68
68
|
},
|
|
69
69
|
"packageManager": "npm@10.9.2",
|
|
70
70
|
"overrides": {
|