Rename discord/params to discord/config
Just doing this for consistency with the other plugins. Test plan: Simple rename-refactor, `yarn flow` passes.
This commit is contained in:
parent
8ca7840187
commit
b31d9e6ac1
|
@ -4,7 +4,7 @@ import {type Project} from "../core/project";
|
|||
import {type Weights as WeightsT} from "../core/weights";
|
||||
import {type PluginDeclaration} from "../analysis/pluginDeclaration";
|
||||
import {type TimelineCredParameters} from "../analysis/timeline/params";
|
||||
import {type DiscordToken} from "../plugins/experimental-discord/params";
|
||||
import {type DiscordToken} from "../plugins/experimental-discord/config";
|
||||
import {type GithubToken} from "../plugins/github/token";
|
||||
import {type CacheProvider} from "../backend/cache";
|
||||
import {DataDirectory} from "../backend/dataDirectory";
|
||||
|
|
|
@ -6,7 +6,7 @@ import {type WeightedGraph as WeightedGraphT} from "../core/weightedGraph";
|
|||
import * as WeightedGraph from "../core/weightedGraph";
|
||||
import {type TimelineCredParameters} from "../analysis/timeline/params";
|
||||
import {type GithubToken} from "../plugins/github/token";
|
||||
import {type DiscordToken} from "../plugins/experimental-discord/params";
|
||||
import {type DiscordToken} from "../plugins/experimental-discord/config";
|
||||
import {type CacheProvider} from "./cache";
|
||||
import {TaskReporter} from "../util/taskReporter";
|
||||
import {TimelineCred} from "../analysis/timeline/timelineCred";
|
||||
|
|
|
@ -7,7 +7,7 @@ import * as WeightedGraph from "../core/weightedGraph";
|
|||
import {type PluginDeclaration} from "../analysis/pluginDeclaration";
|
||||
import {type CacheProvider} from "./cache";
|
||||
import {type GithubToken} from "../plugins/github/token";
|
||||
import {type DiscordToken} from "../plugins/experimental-discord/params";
|
||||
import {type DiscordToken} from "../plugins/experimental-discord/config";
|
||||
import {type Loader as GithubLoader} from "../plugins/github/loader";
|
||||
import {type Loader as DiscordLoader} from "../plugins/experimental-discord/loader";
|
||||
import {type Loader as DiscourseLoader} from "../plugins/discourse/loader";
|
||||
|
|
|
@ -7,7 +7,7 @@ import deepFreeze from "deep-freeze";
|
|||
import fs from "fs-extra";
|
||||
import {type Weights, fromJSON as weightsFromJSON} from "../core/weights";
|
||||
import {validateToken, type GithubToken} from "../plugins/github/token";
|
||||
import {type DiscordToken} from "../plugins/experimental-discord/params";
|
||||
import {type DiscordToken} from "../plugins/experimental-discord/config";
|
||||
|
||||
export type PluginName = "git" | "github";
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import {type ProjectParameters as Initiatives} from "../plugins/initiatives/para
|
|||
import {type Identity} from "../plugins/identity/identity";
|
||||
import {type DiscourseServer} from "../plugins/discourse/server";
|
||||
import type {TimelineCredParameters} from "../analysis/timeline/params";
|
||||
import {type ProjectOptions as Discord} from "../plugins/experimental-discord/params";
|
||||
import {type DiscordConfig as Discord} from "../plugins/experimental-discord/config";
|
||||
|
||||
export type ProjectId = string;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import {type EmojiWeightMap} from "./createGraph";
|
|||
|
||||
export type {BotToken as DiscordToken} from "./models";
|
||||
|
||||
export type ProjectOptions = {|
|
||||
export type DiscordConfig = {|
|
||||
+guildId: Model.Snowflake,
|
||||
+reactionWeights: EmojiWeightMap,
|
||||
|};
|
|
@ -7,7 +7,7 @@ import {type CacheProvider} from "../../backend/cache";
|
|||
import {SqliteMirrorRepository} from "./mirrorRepository";
|
||||
import {weightsForDeclaration} from "../../analysis/pluginDeclaration";
|
||||
import {createGraph as _createGraph} from "./createGraph";
|
||||
import {type ProjectOptions} from "./params";
|
||||
import {type DiscordConfig} from "./config";
|
||||
import {declaration} from "./declaration";
|
||||
import * as Model from "./models";
|
||||
import {Fetcher} from "./fetcher";
|
||||
|
@ -26,7 +26,7 @@ export default ({
|
|||
}: Loader);
|
||||
|
||||
export async function updateMirror(
|
||||
{guildId}: ProjectOptions,
|
||||
{guildId}: DiscordConfig,
|
||||
token: Model.BotToken,
|
||||
cache: CacheProvider,
|
||||
reporter: TaskReporter
|
||||
|
@ -38,7 +38,7 @@ export async function updateMirror(
|
|||
}
|
||||
|
||||
export async function createGraph(
|
||||
{guildId, reactionWeights}: ProjectOptions,
|
||||
{guildId, reactionWeights}: DiscordConfig,
|
||||
cache: CacheProvider
|
||||
): Promise<WeightedGraph> {
|
||||
const repo = await repository(cache, guildId);
|
||||
|
|
Loading…
Reference in New Issue