refactor: split out package constant

This commit is contained in:
iCrawl
2022-08-23 04:20:41 +02:00
parent ac3bc6a2db
commit 206523587a
6 changed files with 14 additions and 24 deletions

View File

@@ -32,14 +32,13 @@ import { Variable } from '~/components/model/Variable';
import { MemberProvider } from '~/contexts/member';
import { createApiModel } from '~/util/api-model.server';
import { findMember, findMemberByKey } from '~/util/model.server';
import { PACKAGES } from '~/util/packages';
import { findPackage, getMembers } from '~/util/parse.server';
export const getStaticPaths: GetStaticPaths = async () => {
const packages = ['builders', 'collection', 'proxy', 'rest', 'voice', 'ws'];
const pkgs = (
await Promise.all(
packages.map(async (packageName) => {
PACKAGES.map(async (packageName) => {
try {
let data: any[] = [];
let versions: string[] = [];
@@ -121,7 +120,7 @@ export const getStaticPaths: GetStaticPaths = async () => {
return {
paths: pkgs,
fallback: true,
fallback: 'blocking',
};
};