@php-wasm/node-8-5 3.0.31

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 ADDED
@@ -0,0 +1,72 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // packages/php-wasm/node-builds/8-5/src/index.ts
30
+ var src_exports = {};
31
+ __export(src_exports, {
32
+ getIntlExtensionPath: () => getIntlExtensionPath,
33
+ getPHPLoaderModule: () => getPHPLoaderModule,
34
+ getXdebugExtensionPath: () => getXdebugExtensionPath,
35
+ jspi: () => import_wasm_feature_detect.jspi
36
+ });
37
+ module.exports = __toCommonJS(src_exports);
38
+ var import_wasm_feature_detect = require("wasm-feature-detect");
39
+ var import_node_url = require("node:url");
40
+ var import_node_path = require("node:path");
41
+ var import_node_fs = require("node:fs");
42
+ var import_meta = {};
43
+ var currentDirPath = typeof __dirname !== "undefined" ? __dirname : (0, import_node_path.dirname)((0, import_node_url.fileURLToPath)(import_meta.url));
44
+ var packageDir = (0, import_node_fs.existsSync)((0, import_node_path.join)(currentDirPath, "jspi")) ? currentDirPath : (0, import_node_path.dirname)(currentDirPath);
45
+ async function getPHPLoaderModule() {
46
+ if (await (0, import_wasm_feature_detect.jspi)()) {
47
+ return await Promise.resolve().then(() => __toESM(require("./jspi/php_8_5.js"), 1));
48
+ } else {
49
+ return await Promise.resolve().then(() => __toESM(require("./asyncify/php_8_5.js"), 1));
50
+ }
51
+ }
52
+ async function getIntlExtensionPath() {
53
+ if (await (0, import_wasm_feature_detect.jspi)()) {
54
+ return (0, import_node_path.join)(packageDir, "jspi/extensions/intl/8_5/intl.so");
55
+ } else {
56
+ return (0, import_node_path.join)(packageDir, "asyncify/extensions/intl/8_5/intl.so");
57
+ }
58
+ }
59
+ async function getXdebugExtensionPath() {
60
+ if (await (0, import_wasm_feature_detect.jspi)()) {
61
+ return (0, import_node_path.join)(packageDir, "jspi/extensions/xdebug/8_5/xdebug.so");
62
+ } else {
63
+ return (0, import_node_path.join)(packageDir, "asyncify/extensions/xdebug/8_5/xdebug.so");
64
+ }
65
+ }
66
+ // Annotate the CommonJS export names for ESM import in node:
67
+ 0 && (module.exports = {
68
+ getIntlExtensionPath,
69
+ getPHPLoaderModule,
70
+ getXdebugExtensionPath,
71
+ jspi
72
+ });
package/index.js ADDED
@@ -0,0 +1,40 @@
1
+ import { createRequire as topLevelCreateRequire } from 'module';
2
+ const require = topLevelCreateRequire(import.meta.url);
3
+ const __filename = import.meta.filename;
4
+ const __dirname = import.meta.dirname;
5
+
6
+
7
+ // packages/php-wasm/node-builds/8-5/src/index.ts
8
+ import { jspi } from "wasm-feature-detect";
9
+ import { fileURLToPath } from "node:url";
10
+ import { dirname, join } from "node:path";
11
+ import { existsSync } from "node:fs";
12
+ var currentDirPath = typeof __dirname !== "undefined" ? __dirname : dirname(fileURLToPath(import.meta.url));
13
+ var packageDir = existsSync(join(currentDirPath, "jspi")) ? currentDirPath : dirname(currentDirPath);
14
+ async function getPHPLoaderModule() {
15
+ if (await jspi()) {
16
+ return await import("./jspi/php_8_5.js");
17
+ } else {
18
+ return await import("./asyncify/php_8_5.js");
19
+ }
20
+ }
21
+ async function getIntlExtensionPath() {
22
+ if (await jspi()) {
23
+ return join(packageDir, "jspi/extensions/intl/8_5/intl.so");
24
+ } else {
25
+ return join(packageDir, "asyncify/extensions/intl/8_5/intl.so");
26
+ }
27
+ }
28
+ async function getXdebugExtensionPath() {
29
+ if (await jspi()) {
30
+ return join(packageDir, "jspi/extensions/xdebug/8_5/xdebug.so");
31
+ } else {
32
+ return join(packageDir, "asyncify/extensions/xdebug/8_5/xdebug.so");
33
+ }
34
+ }
35
+ export {
36
+ getIntlExtensionPath,
37
+ getPHPLoaderModule,
38
+ getXdebugExtensionPath,
39
+ jspi
40
+ };
Binary file
@@ -0,0 +1,35 @@
1
+ # intl.la - a libtool library file
2
+ # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)
3
+ #
4
+ # Please DO NOT delete this file!
5
+ # It is necessary for linking the library.
6
+
7
+ # The name that we can dlopen(3).
8
+ dlname='intl.so'
9
+
10
+ # Names of this library.
11
+ library_names='intl.so intl.so intl.so'
12
+
13
+ # The name of the static archive.
14
+ old_library=''
15
+
16
+ # Libraries that this one depends upon.
17
+ dependency_libs=' -L/root/lib'
18
+
19
+ # Version information for intl.
20
+ current=0
21
+ age=0
22
+ revision=0
23
+
24
+ # Is this an already installed library?
25
+ installed=yes
26
+
27
+ # Should we warn about portability when linking against -modules?
28
+ shouldnotlink=yes
29
+
30
+ # Files to dlopen/dlpreopen
31
+ dlopen=''
32
+ dlpreopen=''
33
+
34
+ # Directory that this library needs to be installed in:
35
+ libdir='/root/php-src/ext/intl/modules'
Binary file
@@ -0,0 +1,35 @@
1
+ # xdebug.la - a libtool library file
2
+ # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56)
3
+ #
4
+ # Please DO NOT delete this file!
5
+ # It is necessary for linking the library.
6
+
7
+ # The name that we can dlopen(3).
8
+ dlname='xdebug.so'
9
+
10
+ # Names of this library.
11
+ library_names='xdebug.so xdebug.so xdebug.so'
12
+
13
+ # The name of the static archive.
14
+ old_library=''
15
+
16
+ # Libraries that this one depends upon.
17
+ dependency_libs=''
18
+
19
+ # Version information for xdebug.
20
+ current=0
21
+ age=0
22
+ revision=0
23
+
24
+ # Is this an already installed library?
25
+ installed=yes
26
+
27
+ # Should we warn about portability when linking against -modules?
28
+ shouldnotlink=yes
29
+
30
+ # Files to dlopen/dlpreopen
31
+ dlopen=''
32
+ dlpreopen=''
33
+
34
+ # Directory that this library needs to be installed in:
35
+ libdir='/root/xdebug/modules'