@php-wasm/universal 3.1.29 → 3.1.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/LICENSE +339 -0
- package/README.md +7 -6
- package/index.cjs +10 -11
- package/index.cjs.map +1 -1
- package/index.js +1379 -904
- package/index.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/load-extension.d.ts +20 -4
- package/package.json +6 -6
- package/php-extension-manifest-schema-validator.js +1616 -608
- package/php-extension-manifest-schema.json +70 -38
|
@@ -15,10 +15,48 @@
|
|
|
15
15
|
"type": "string",
|
|
16
16
|
"const": "php-extension"
|
|
17
17
|
},
|
|
18
|
+
"loadWithIniDirective": {
|
|
19
|
+
"$ref": "#/definitions/PHPExtensionLoadDirective",
|
|
20
|
+
"description": "The first directive of the generated startup `.ini` file. Defaults to `extension`; use `zend_extension` for Zend extensions like Xdebug. Use `false` to stage the `.so` without registering it in php.ini."
|
|
21
|
+
},
|
|
22
|
+
"iniEntries": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"description": "Additional `key=value` lines for the generated startup `.ini` file."
|
|
28
|
+
},
|
|
29
|
+
"env": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"description": "Environment variables added before the extension is loaded."
|
|
35
|
+
},
|
|
36
|
+
"extensionDir": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "VFS directory where PHP.wasm writes the extension `.so` file and its per-extension ini file. Defaults to `PHP_EXTENSIONS_DIR`."
|
|
39
|
+
},
|
|
18
40
|
"artifacts": {
|
|
19
41
|
"type": "array",
|
|
20
42
|
"items": {
|
|
21
|
-
"
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"phpVersion": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "PHP major/minor version, e.g. `8.4`."
|
|
48
|
+
},
|
|
49
|
+
"sourcePath": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "Relative to the manifest URL/base URL, or an absolute URL."
|
|
52
|
+
},
|
|
53
|
+
"extraFiles": {
|
|
54
|
+
"$ref": "#/definitions/PHPExtensionManifestExtraFiles",
|
|
55
|
+
"description": "URL-backed files needed only by this artifact."
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": ["phpVersion", "sourcePath"],
|
|
59
|
+
"additionalProperties": false
|
|
22
60
|
}
|
|
23
61
|
},
|
|
24
62
|
"extraFiles": {
|
|
@@ -30,24 +68,21 @@
|
|
|
30
68
|
"additionalProperties": false,
|
|
31
69
|
"description": "Extension artifact manifest. Lets callers publish a matrix of `.so` files and lets `resolvePHPExtension()` select the artifact matching the current PHP version. External extension artifacts are JSPI-only."
|
|
32
70
|
},
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"type": "string",
|
|
38
|
-
"description": "PHP major/minor version, e.g. `8.4`."
|
|
39
|
-
},
|
|
40
|
-
"sourcePath": {
|
|
41
|
-
"type": "string",
|
|
42
|
-
"description": "Relative to the manifest URL/base URL, or an absolute URL."
|
|
71
|
+
"PHPExtensionLoadDirective": {
|
|
72
|
+
"anyOf": [
|
|
73
|
+
{
|
|
74
|
+
"$ref": "#/definitions/PHPExtensionIniDirective"
|
|
43
75
|
},
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
76
|
+
{
|
|
77
|
+
"type": "boolean",
|
|
78
|
+
"const": false
|
|
47
79
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
"PHPExtensionIniDirective": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"enum": ["extension", "zend_extension"],
|
|
85
|
+
"description": "The php.ini directive used to load the extension. Use `extension` for regular PHP extensions and `zend_extension` for Zend extensions like Xdebug."
|
|
51
86
|
},
|
|
52
87
|
"PHPExtensionManifestExtraFiles": {
|
|
53
88
|
"type": "object",
|
|
@@ -59,31 +94,28 @@
|
|
|
59
94
|
"nodes": {
|
|
60
95
|
"type": "array",
|
|
61
96
|
"items": {
|
|
62
|
-
"
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"vfsPath": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"description": "Joined with the group's `vfsRoot` to form the final VFS path."
|
|
102
|
+
},
|
|
103
|
+
"type": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"enum": ["file", "directory"],
|
|
106
|
+
"description": "Defaults to \"file\". Only file nodes need a `sourcePath`."
|
|
107
|
+
},
|
|
108
|
+
"sourcePath": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"description": "Relative to the manifest URL/base URL, or an absolute URL."
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"required": ["vfsPath"],
|
|
114
|
+
"additionalProperties": false
|
|
63
115
|
}
|
|
64
116
|
}
|
|
65
117
|
},
|
|
66
118
|
"additionalProperties": false
|
|
67
|
-
},
|
|
68
|
-
"PHPExtensionManifestExtraFile": {
|
|
69
|
-
"type": "object",
|
|
70
|
-
"properties": {
|
|
71
|
-
"vfsPath": {
|
|
72
|
-
"type": "string",
|
|
73
|
-
"description": "Joined with the group's `vfsRoot` to form the final VFS path."
|
|
74
|
-
},
|
|
75
|
-
"type": {
|
|
76
|
-
"type": "string",
|
|
77
|
-
"enum": ["file", "directory"],
|
|
78
|
-
"description": "Defaults to \"file\". Only file nodes need a `sourcePath`."
|
|
79
|
-
},
|
|
80
|
-
"sourcePath": {
|
|
81
|
-
"type": "string",
|
|
82
|
-
"description": "Relative to the manifest URL/base URL, or an absolute URL."
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
"required": ["vfsPath"],
|
|
86
|
-
"additionalProperties": false
|
|
87
119
|
}
|
|
88
120
|
}
|
|
89
121
|
}
|