Switching to owner instead of author
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Fabian Stamm 2020-08-03 09:38:01 +02:00
parent 93984f211b
commit 7da72872ba
5 changed files with 9 additions and 7 deletions

View File

@ -4,7 +4,7 @@ await FS.ensureDir("./data");
export interface IPackage { export interface IPackage {
name: string; name: string;
author: string; owner: string;
description: string; description: string;
versions: string[]; versions: string[];
deprecated: boolean; deprecated: boolean;

View File

@ -110,7 +110,7 @@ async function uploadPackage(ctx: ABC.Context) {
if (!packageMeta) { if (!packageMeta) {
packageMeta = { packageMeta = {
name: packageName, name: packageName,
author: ctx.customContext.user, owner: ctx.customContext.user,
description: meta.description, description: meta.description,
deprecated: false, deprecated: false,
versions: [], versions: [],
@ -157,7 +157,6 @@ async function uploadPackage(ctx: ABC.Context) {
{ {
$set: { $set: {
versions: [...packageMeta.versions, packageVersion], versions: [...packageMeta.versions, packageVersion],
author: ctx.customContext.user,
description: meta.description || packageMeta.description, description: meta.description || packageMeta.description,
deprecated: meta.deprecated === true, deprecated: meta.deprecated === true,
}, },

View File

@ -20,7 +20,10 @@ export default function Base(p: any, children: any[]) {
/> />
<style innerHTML={styles}></style> <style innerHTML={styles}></style>
<title>{title}</title> <title>{title}</title>
<meta name="Description" content="Deno package registry" /> <meta
name="Description"
content="Deno package registry. Includes version management, deprecation of packages as well as a CDN for distributing deno packages."
/>
<meta <meta
name="viewport" name="viewport"
content="width=device-width,initial-scale=1" content="width=device-width,initial-scale=1"

View File

@ -5,7 +5,7 @@ import DB, { IPackage } from "../db.ts";
import { sortVersions } from "../utils.ts"; import { sortVersions } from "../utils.ts";
function Package({ pkg }: { pkg: IPackage }) { function Package({ pkg }: { pkg: IPackage }) {
const { name, versions, author, description, deprecated } = pkg; const { name, versions, owner, description, deprecated } = pkg;
const sorted = versions.sort(sortVersions).reverse(); const sorted = versions.sort(sortVersions).reverse();
@ -19,7 +19,7 @@ function Package({ pkg }: { pkg: IPackage }) {
{name} <span class="badge">{sorted[0]}</span> {name} <span class="badge">{sorted[0]}</span>
{deprecated && <span class="badge warning">deprecated</span>} {deprecated && <span class="badge warning">deprecated</span>}
</h4> </h4>
<h5 class="card-subtitle">By {author}</h5> <h5 class="card-subtitle">By {owner}</h5>
<div class="card-text"> <div class="card-text">
{/* {versions.map((version) => ( {/* {versions.map((version) => (
<li>{version}</li> <li>{version}</li>

View File

@ -58,7 +58,7 @@ export default async function index({
<Main> <Main>
<h2 style="margin-bottom: 0">Package: {pkg.name}</h2> <h2 style="margin-bottom: 0">Package: {pkg.name}</h2>
<h4 class="text-muted" style="margin-top: 0; margin-left: .5rem"> <h4 class="text-muted" style="margin-top: 0; margin-left: .5rem">
By {pkg.author} By {pkg.owner}
</h4> </h4>
<div class="tabs"> <div class="tabs">