mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
fix: app paths (#8729)
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
export const DESCRIPTION = 'Imagine a guide... that explores the many possibilities for your discord.js bot.';
|
export const DESCRIPTION = 'Imagine a guide... that explores the many possibilities for your discord.js bot.';
|
||||||
|
|
||||||
export const GITHUB_BASE_PAGES_PATH = 'https://github.com/discordjs/discord.js/tree/main/packages/guide/src/pages';
|
export const GITHUB_BASE_PAGES_PATH = 'https://github.com/discordjs/discord.js/tree/main/apps/guide/src/pages';
|
||||||
|
|||||||
@@ -51,7 +51,10 @@ export const getStaticPaths: GetStaticPaths = async () => {
|
|||||||
let data: any[] = [];
|
let data: any[] = [];
|
||||||
let versions: string[] = [];
|
let versions: string[] = [];
|
||||||
if (process.env.NEXT_PUBLIC_LOCAL_DEV) {
|
if (process.env.NEXT_PUBLIC_LOCAL_DEV) {
|
||||||
const res = await readFile(join(cwd(), '..', packageName, 'docs', 'docs.api.json'), 'utf8');
|
const res = await readFile(
|
||||||
|
join(cwd(), '..', '..', 'packages', packageName, 'docs', 'docs.api.json'),
|
||||||
|
'utf8',
|
||||||
|
);
|
||||||
data = JSON.parse(res);
|
data = JSON.parse(res);
|
||||||
} else {
|
} else {
|
||||||
const response = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`);
|
const response = await fetch(`https://docs.discordjs.dev/api/info?package=${packageName}`);
|
||||||
@@ -137,7 +140,7 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
|
|||||||
const [memberName, overloadIndex] = member?.split(':') ?? [];
|
const [memberName, overloadIndex] = member?.split(':') ?? [];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const readme = await readFile(join(cwd(), '..', packageName, 'README.md'), 'utf8');
|
const readme = await readFile(join(cwd(), '..', '..', 'packages', packageName, 'README.md'), 'utf8');
|
||||||
|
|
||||||
const mdxSource = await serialize(readme, {
|
const mdxSource = await serialize(readme, {
|
||||||
mdxOptions: {
|
mdxOptions: {
|
||||||
@@ -173,7 +176,7 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
|
|||||||
|
|
||||||
let data;
|
let data;
|
||||||
if (process.env.NEXT_PUBLIC_LOCAL_DEV) {
|
if (process.env.NEXT_PUBLIC_LOCAL_DEV) {
|
||||||
const res = await readFile(join(cwd(), '..', packageName, 'docs', 'docs.api.json'), 'utf8');
|
const res = await readFile(join(cwd(), '..', '..', 'packages', packageName, 'docs', 'docs.api.json'), 'utf8');
|
||||||
data = JSON.parse(res);
|
data = JSON.parse(res);
|
||||||
} else {
|
} else {
|
||||||
const res = await fetch(`https://docs.discordjs.dev/docs/${packageName}/${branchName}.api.json`);
|
const res = await fetch(`https://docs.discordjs.dev/docs/${packageName}/${branchName}.api.json`);
|
||||||
@@ -280,5 +283,5 @@ export default function SlugPage(props: Partial<SidebarLayoutProps & { error?: s
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const config = {
|
export const config = {
|
||||||
unstable_includeFiles: ['../{builders,collection,proxy,rest,util,voice,ws}/README.md'],
|
unstable_includeFiles: [`../../packages/{${PACKAGES.join(',')}}/README.md`],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,6 +3,18 @@ description: 'Uploads code coverage reports to codecov with separate flags for s
|
|||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
|
- name: Upload Guide Coverage
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
files: ./apps/guide/coverage/cobertura-coverage.xml
|
||||||
|
flags: guide
|
||||||
|
|
||||||
|
- name: Upload Website Coverage
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
with:
|
||||||
|
files: ./apps/website/coverage/cobertura-coverage.xml
|
||||||
|
flags: website
|
||||||
|
|
||||||
- name: Upload Builders Coverage
|
- name: Upload Builders Coverage
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
@@ -39,12 +51,6 @@ runs:
|
|||||||
files: ./packages/voice/coverage/cobertura-coverage.xml
|
files: ./packages/voice/coverage/cobertura-coverage.xml
|
||||||
flags: voice
|
flags: voice
|
||||||
|
|
||||||
- name: Upload Website Coverage
|
|
||||||
uses: codecov/codecov-action@v3
|
|
||||||
with:
|
|
||||||
files: ./packages/website/coverage/cobertura-coverage.xml
|
|
||||||
flags: website
|
|
||||||
|
|
||||||
- name: Upload WS Coverage
|
- name: Upload WS Coverage
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user