@open-audio-stack/core
Version:
Open-source audio plugin management software
224 lines (223 loc) • 7.47 kB
TypeScript
import { z } from 'zod';
import { Architecture } from '../types/Architecture.js';
import { FileFormat } from '../types/FileFormat.js';
import { FileType } from '../types/FileType.js';
import { License } from '../types/License.js';
import { PluginFile } from '../types/Plugin.js';
import { PluginType } from '../types/PluginType.js';
import { PresetFile } from '../types/Preset.js';
import { PresetType } from '../types/PresetType.js';
import { ProjectFile } from '../types/Project.js';
import { ProjectType } from '../types/ProjectType.js';
import { SystemType } from '../types/SystemType.js';
import { PackageFileMap, PackageInterface, PackageValidationRec, PackageVersion } from '../types/Package.js';
export declare function packageCompatibleFiles(pkg: PackageVersion, arch: Architecture[], sys: SystemType[], excludedFormats?: FileFormat[]): (PluginFile | PresetFile | ProjectFile)[];
export declare function packageErrors(pkgVersion: PackageVersion): z.ZodIssue[];
export declare function packageFileMap(pkgVersion: PackageVersion): PackageFileMap;
export declare function packageVersionLatest(pkg: PackageInterface): string;
export declare const PackageSystemValidator: z.ZodObject<{
max: z.ZodOptional<z.ZodNumber>;
min: z.ZodOptional<z.ZodNumber>;
type: z.ZodNativeEnum<typeof SystemType>;
}, "strip", z.ZodTypeAny, {
type: SystemType;
max?: number | undefined;
min?: number | undefined;
}, {
type: SystemType;
max?: number | undefined;
min?: number | undefined;
}>;
export declare const PackageFileValidator: z.ZodObject<{
architectures: z.ZodArray<z.ZodNativeEnum<typeof Architecture>, "many">;
sha256: z.ZodString;
size: z.ZodNumber;
systems: z.ZodArray<z.ZodObject<{
max: z.ZodOptional<z.ZodNumber>;
min: z.ZodOptional<z.ZodNumber>;
type: z.ZodNativeEnum<typeof SystemType>;
}, "strip", z.ZodTypeAny, {
type: SystemType;
max?: number | undefined;
min?: number | undefined;
}, {
type: SystemType;
max?: number | undefined;
min?: number | undefined;
}>, "many">;
type: z.ZodNativeEnum<typeof FileType>;
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: FileType;
architectures: Architecture[];
sha256: string;
size: number;
systems: {
type: SystemType;
max?: number | undefined;
min?: number | undefined;
}[];
url: string;
}, {
type: FileType;
architectures: Architecture[];
sha256: string;
size: number;
systems: {
type: SystemType;
max?: number | undefined;
min?: number | undefined;
}[];
url: string;
}>;
export declare const PackageTypeObj: {
Audiobook: ProjectType.Audiobook;
DJSet: ProjectType.DJSet;
Performance: ProjectType.Performance;
Podcast: ProjectType.Podcast;
Remix: ProjectType.Remix;
Song: ProjectType.Song;
Score: ProjectType.Score;
Chain: PresetType.Chain;
Layout: PresetType.Layout;
Mapping: PresetType.Mapping;
Patch: PresetType.Patch;
Pattern: PresetType.Pattern;
Theme: PresetType.Theme;
Effect: PluginType.Effect;
Generator: PluginType.Generator;
Instrument: PluginType.Instrument;
Sampler: PluginType.Sampler;
Tool: PluginType.Tool;
};
export declare const PackageVersionValidator: z.ZodObject<{
audio: z.ZodOptional<z.ZodString>;
author: z.ZodString;
changes: z.ZodString;
date: z.ZodString;
description: z.ZodString;
donate: z.ZodOptional<z.ZodString>;
files: z.ZodArray<z.ZodObject<{
architectures: z.ZodArray<z.ZodNativeEnum<typeof Architecture>, "many">;
sha256: z.ZodString;
size: z.ZodNumber;
systems: z.ZodArray<z.ZodObject<{
max: z.ZodOptional<z.ZodNumber>;
min: z.ZodOptional<z.ZodNumber>;
type: z.ZodNativeEnum<typeof SystemType>;
}, "strip", z.ZodTypeAny, {
type: SystemType;
max?: number | undefined;
min?: number | undefined;
}, {
type: SystemType;
max?: number | undefined;
min?: number | undefined;
}>, "many">;
type: z.ZodNativeEnum<typeof FileType>;
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: FileType;
architectures: Architecture[];
sha256: string;
size: number;
systems: {
type: SystemType;
max?: number | undefined;
min?: number | undefined;
}[];
url: string;
}, {
type: FileType;
architectures: Architecture[];
sha256: string;
size: number;
systems: {
type: SystemType;
max?: number | undefined;
min?: number | undefined;
}[];
url: string;
}>, "many">;
image: z.ZodString;
license: z.ZodNativeEnum<typeof License>;
name: z.ZodString;
tags: z.ZodArray<z.ZodString, "many">;
type: z.ZodNativeEnum<{
Audiobook: ProjectType.Audiobook;
DJSet: ProjectType.DJSet;
Performance: ProjectType.Performance;
Podcast: ProjectType.Podcast;
Remix: ProjectType.Remix;
Song: ProjectType.Song;
Score: ProjectType.Score;
Chain: PresetType.Chain;
Layout: PresetType.Layout;
Mapping: PresetType.Mapping;
Patch: PresetType.Patch;
Pattern: PresetType.Pattern;
Theme: PresetType.Theme;
Effect: PluginType.Effect;
Generator: PluginType.Generator;
Instrument: PluginType.Instrument;
Sampler: PluginType.Sampler;
Tool: PluginType.Tool;
}>;
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
date: string;
type: PluginType | PresetType | ProjectType;
author: string;
changes: string;
description: string;
url: string;
files: {
type: FileType;
architectures: Architecture[];
sha256: string;
size: number;
systems: {
type: SystemType;
max?: number | undefined;
min?: number | undefined;
}[];
url: string;
}[];
image: string;
license: License;
name: string;
tags: string[];
audio?: string | undefined;
donate?: string | undefined;
}, {
date: string;
type: PluginType | PresetType | ProjectType;
author: string;
changes: string;
description: string;
url: string;
files: {
type: FileType;
architectures: Architecture[];
sha256: string;
size: number;
systems: {
type: SystemType;
max?: number | undefined;
min?: number | undefined;
}[];
url: string;
}[];
image: string;
license: License;
name: string;
tags: string[];
audio?: string | undefined;
donate?: string | undefined;
}>;
export declare const SemverValidator: z.ZodString;
export declare function packageRecommendations(pkgVersion: PackageVersion): PackageValidationRec[];
export declare function packageRecommendationsUrl(obj: PackageVersion | PluginFile | PresetFile | ProjectFile, recs: PackageValidationRec[], field: string, domain?: string): void;
export declare function packageJsToYaml(pkgVersion: PackageVersion): string;
export declare function packageYamlToJs(pkgYaml: string): PackageVersion;
export declare function packageIsVerified(slug: string, pkgVersion: PackageVersion): boolean;