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 {
name: string;
author: string;
owner: string;
description: string;
versions: string[];
deprecated: boolean;

View File

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

View File

@ -20,7 +20,10 @@ export default function Base(p: any, children: any[]) {
/>
<style innerHTML={styles}></style>
<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
name="viewport"
content="width=device-width,initial-scale=1"

View File

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

View File

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