message: fix: extract the resolveLibrary api
diff: @@ -500,22 +500,15 @@ export namespace Version {
  return stack;
  }
  - /**
  - * Resolve all these library and filter out os specific libs
  - * @param libs All raw lib
  - * @param platform The platform
  - */
  - export function resolveLibraries(libs: Library[], platform: Platform = currentPlatform): ResolvedLibrary[] {
  - const empty: ResolvedLibrary = null!;
  - return libs.map((lib) => {
  + export function resolveLibrary(lib: Library, platform: Platform = currentPlatform): ResolvedLibrary | undefined {
  if ("rules" in lib && !checkAllowed(lib.rules, platform)) {
  - return empty;
  + return undefined;
  }
  if ("natives" in lib) {
  - if (!lib.natives[platform.name]) { return empty; }
  + if (!lib.natives[platform.name]) { return undefined; }
  const classifier = (lib.natives[platform.name]).replace("${arch}", platform.arch.substring(1));
  const nativeArtifact = lib.downloads.classifiers[classifier];
  - if (!nativeArtifact) { return empty; }
  + if (!nativeArtifact) { return undefined; }
  return new ResolvedNative(lib.name + ":" + classifier, LibraryInfo.resolve(lib.name + ":" + classifier), lib.downloads.classifiers[classifier], lib.extract ? lib.extract.exclude ? lib.extract.exclude : undefined : undefined);
  }
  const info = LibraryInfo.resolve(lib.name);
  @@ -535,7 +528,15 @@ export namespace Version {
  url: maven + info.path,
  };
  return new ResolvedLibrary(lib.name, info, artifact, lib.checksums, lib.serverreq, lib.clientreq);
  - }).filter((l) => l !== empty);
  + }
  +
  + /**
  + * Resolve all these library and filter out os specific libs
  + * @param libs All raw lib
  + * @param platform The platform
  + */
  + export function resolveLibraries(libs: Library[], platform: Platform = currentPlatform): ResolvedLibrary[] {
  + return libs.map((lib) => resolveLibrary(lib, platform)).filter((l) => l !== undefined) as ResolvedLibrary[];
  }
  /**
  