@php-wasm/universal 3.1.22 → 3.1.26
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/README.md +6 -5
- package/index.cjs +16 -15
- package/index.cjs.map +1 -1
- package/index.js +983 -396
- package/index.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/load-extension.d.ts +117 -145
- package/package.json +7 -6
- package/php-extension-manifest-schema-validator.d.ts +10 -0
- package/php-extension-manifest-schema-validator.js +1467 -0
- package/php-extension-manifest-schema.json +83 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$ref": "#/definitions/PHPExtensionManifest",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"PHPExtensionManifest": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"version": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"mode": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"const": "php-extension"
|
|
17
|
+
},
|
|
18
|
+
"artifacts": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"properties": {
|
|
23
|
+
"phpVersion": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "PHP major/minor version, e.g. `8.4`."
|
|
26
|
+
},
|
|
27
|
+
"sourcePath": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "Relative to the manifest URL/base URL, or an absolute URL."
|
|
30
|
+
},
|
|
31
|
+
"extraFiles": {
|
|
32
|
+
"$ref": "#/definitions/PHPExtensionManifestExtraFiles",
|
|
33
|
+
"description": "URL-backed files needed only by this artifact."
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": ["phpVersion", "sourcePath"],
|
|
37
|
+
"additionalProperties": false
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"extraFiles": {
|
|
41
|
+
"$ref": "#/definitions/PHPExtensionManifestExtraFiles",
|
|
42
|
+
"description": "URL-backed files shared by every artifact in this manifest."
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": ["name", "artifacts"],
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"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."
|
|
48
|
+
},
|
|
49
|
+
"PHPExtensionManifestExtraFiles": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"vfsRoot": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "Absolute VFS path where files and directories are written. When a manifest declares both top-level and per-artifact `extraFiles`, the first declared `targetPath` wins. Defaults to `<extensionDir>/<name>-assets`."
|
|
55
|
+
},
|
|
56
|
+
"nodes": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"properties": {
|
|
61
|
+
"vfsPath": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "Joined with the group's `vfsRoot` to form the final VFS path."
|
|
64
|
+
},
|
|
65
|
+
"type": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"enum": ["file", "directory"],
|
|
68
|
+
"description": "Defaults to \"file\". Only file nodes need a `sourcePath`."
|
|
69
|
+
},
|
|
70
|
+
"sourcePath": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"description": "Relative to the manifest URL/base URL, or an absolute URL."
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"required": ["vfsPath"],
|
|
76
|
+
"additionalProperties": false
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"additionalProperties": false
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|