@neon-rs/manifest 0.1.1 → 0.1.2
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/lib/platform.cjs +5 -3
- package/lib/platform.d.cts +2 -1
- package/package.json +1 -1
package/lib/platform.cjs
CHANGED
|
@@ -82,9 +82,11 @@ exports.expandPlatformPreset = expandPlatformPreset;
|
|
|
82
82
|
function expandPlatformFamily(family) {
|
|
83
83
|
return isPlatformPreset(family)
|
|
84
84
|
? expandPlatformPreset(family)
|
|
85
|
-
:
|
|
86
|
-
?
|
|
87
|
-
: family
|
|
85
|
+
: isNodePlatform(family)
|
|
86
|
+
? { [family]: node2Rust(family)[0] }
|
|
87
|
+
: Array.isArray(family)
|
|
88
|
+
? merge(family.map(expandPlatformFamily))
|
|
89
|
+
: family;
|
|
88
90
|
}
|
|
89
91
|
exports.expandPlatformFamily = expandPlatformFamily;
|
|
90
92
|
function describeTarget(target) {
|
package/lib/platform.d.cts
CHANGED
|
@@ -19,7 +19,8 @@ export type TargetPair = {
|
|
|
19
19
|
export type PlatformMap = {
|
|
20
20
|
[key in NodePlatform]?: RustTarget;
|
|
21
21
|
};
|
|
22
|
-
export type
|
|
22
|
+
export type PlatformName = NodePlatform | PlatformPreset;
|
|
23
|
+
export type PlatformFamily = PlatformName | PlatformName[] | PlatformMap;
|
|
23
24
|
export declare function expandPlatformPreset(preset: PlatformPreset): PlatformMap;
|
|
24
25
|
export declare function expandPlatformFamily(family: PlatformFamily): PlatformMap;
|
|
25
26
|
export type PlatformDescriptor = {
|