remove some default exports
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/test Pipeline failed

This commit is contained in:
Johann150 2023-05-19 00:32:11 +02:00
parent d6452795b0
commit 410c519953
Signed by: Johann150
GPG key ID: 9EE6577A2A06F8F1
7 changed files with 7 additions and 10 deletions

View file

@ -8,7 +8,7 @@ import chalkTemplate from 'chalk-template';
import semver from 'semver';
import Logger from '@/services/logger.js';
import loadConfig from '@/config/load.js';
import { loadConfig } from '@/config/load.js';
import { Config } from '@/config/types.js';
import { showMachineInfo } from '@/misc/show-machine-info.js';
import { envOption } from '@/env.js';

View file

@ -23,7 +23,7 @@ const path = process.env.NODE_ENV === 'test'
? `${dir}/test.yml`
: `${dir}/default.yml`;
export default function load(): Config {
export function loadConfig(): Config {
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../../built/meta.json`, 'utf-8'));
const clientManifest = JSON.parse(fs.readFileSync(`${_dirname}/../../../../built/_client_dist_/manifest.json`, 'utf-8'));
let config = yaml.load(fs.readFileSync(path, 'utf-8')) as Source;

View file

@ -8,7 +8,7 @@ import { dirname } from 'node:path';
import Koa from 'koa';
import cors from '@koa/cors';
import Router from '@koa/router';
import sendDriveFile from './send-drive-file.js';
import { sendDriveFile } from './send-drive-file.js';
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);

View file

@ -27,8 +27,7 @@ const commonReadableHandlerGenerator = (ctx: Koa.Context) => (e: Error): void =>
ctx.set('Cache-Control', 'max-age=300');
};
// eslint-disable-next-line import/no-default-export
export default async function(ctx: Koa.Context) {
export async function sendDriveFile(ctx: Koa.Context) {
const key = ctx.params.key;
// Fetch drive file

View file

@ -4,7 +4,7 @@ import config from '@/config/index.js';
import { User } from '@/models/entities/user.js';
import { Notes, DriveFiles, UserProfiles, Users } from '@/models/index.js';
export default async function(user: User) {
export async function packFeed(user: User) {
const author = {
link: `${config.url}/@${user.username}`,
name: user.name || user.username,

View file

@ -26,7 +26,7 @@ import { MINUTE, DAY } from '@/const.js';
import { genOpenapiSpec } from '../api/openapi/gen-spec.js';
import { urlPreviewHandler } from './url-preview.js';
import { manifestHandler } from './manifest.js';
import packFeed from './feed.js';
import { packFeed } from './feed.js';
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);

View file

@ -95,9 +95,7 @@ class Publisher {
};
}
const publisher = new Publisher();
export default publisher;
export const publisher = new Publisher();
export const publishInternalEvent = publisher.publishInternalEvent;
export const publishUserEvent = publisher.publishUserEvent;