UNPKG

ctan

Version:

CTAN (Comprehensive TeX Archive Network) API client for Node.js

180 lines (179 loc) 5.06 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var schemas_exports = {}; __export(schemas_exports, { Author: () => Author, Authors: () => Authors, Copyright: () => Copyright, Package: () => Package, PackageAuthor: () => PackageAuthor, PackageDescription: () => PackageDescription, PackageDocumentation: () => PackageDocumentation, PackageSummary: () => PackageSummary, PackageVersion: () => PackageVersion, Packages: () => Packages, Topic: () => Topic, Topics: () => Topics }); module.exports = __toCommonJS(schemas_exports); const Author = { type: "object", properties: { key: { type: "string" }, givenname: { type: "string", default: "" }, familyname: { type: "string", default: "" }, pkgs: { type: "array", items: { type: "string" }, uniqueItems: true, nullable: true } }, required: ["key", "givenname", "familyname"], additionalProperties: true }; const Authors = { type: "array", items: Author }; const PackageSummary = { type: "object", properties: { key: { type: "string" }, name: { type: "string" }, caption: { type: "string" } }, required: ["key", "name", "caption"], additionalProperties: true }; const Packages = { type: "array", items: PackageSummary }; const PackageAuthor = { type: "object", properties: { id: { type: "string" }, active: { type: "boolean" } }, required: ["id", "active"], additionalProperties: true }; const Copyright = { type: "object", properties: { owner: { type: "string" }, year: { type: "string", nullable: true } }, required: ["owner", "year"], minProperties: 1, additionalProperties: true }; const PackageVersion = { type: "object", properties: { number: { type: "string", nullable: true }, date: { type: "string", nullable: true } }, minProperties: 1, required: [], additionalProperties: true }; const PackageDescription = { type: "object", properties: { text: { type: "string", nullable: true }, language: { type: "string", nullable: true } }, required: [], additionalProperties: true }; const PackageDocumentation = { type: "object", properties: { language: { type: "string", nullable: true }, details: { type: "string", nullable: true }, href: { type: "string", nullable: true } }, required: [], additionalProperties: true }; const Package = { type: "object", properties: { id: { type: "string" }, name: { type: "string" }, caption: { type: "string" }, authors: { type: "array", items: PackageAuthor }, copyright: { type: "array", items: Copyright, nullable: true }, license: { type: ["string", "array"], oneOf: [{ type: "string" }, { type: "array", items: { type: "string" } }], nullable: true }, version: { ...PackageVersion, nullable: true }, descriptions: { type: "array", items: PackageDescription, nullable: true }, documentation: { type: "array", items: PackageDocumentation }, ctan: { type: "object", properties: { path: { type: "string" }, file: { type: "boolean", nullable: true } }, required: ["path"], nullable: true, additionalProperties: true }, install: { type: "string", nullable: true }, miktex: { type: "string", nullable: true }, texlive: { type: "string", nullable: true }, index: { type: "array", items: { type: "string" }, nullable: true }, topics: { type: "array", items: { type: "string" }, nullable: true }, home: { type: "string", nullable: true }, also: { type: "array", items: { type: "string" }, nullable: true } }, required: ["id", "name", "caption", "authors", "documentation"], additionalProperties: true }; const Topic = { type: "object", properties: { key: { type: "string" }, details: { type: "string" }, packages: { type: "array", items: { type: "string" }, nullable: true } }, required: ["key", "details"], additionalProperties: true }; const Topics = { type: "array", items: Topic }; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { Author, Authors, Copyright, Package, PackageAuthor, PackageDescription, PackageDocumentation, PackageSummary, PackageVersion, Packages, Topic, Topics });