npm run fmt
This commit is contained in:
parent
21fe35da05
commit
11c595619d
21 changed files with 155 additions and 137 deletions
|
|
@ -62,12 +62,11 @@ const register = async (
|
|||
server: Hapi.Server,
|
||||
pluginOpts?: any
|
||||
): Promise<void> => {
|
||||
const options: any =
|
||||
Hoek.applyToDefaults(
|
||||
// a little type gymnastics here to workaround poor typing
|
||||
defaultOptions as any,
|
||||
pluginOpts
|
||||
) as any;
|
||||
const options: any = Hoek.applyToDefaults(
|
||||
// a little type gymnastics here to workaround poor typing
|
||||
defaultOptions as any,
|
||||
pluginOpts
|
||||
) as any;
|
||||
|
||||
if (!options.nextAuthAdapterFactory) {
|
||||
throw new Error(
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@ import type { Adapter } from "next-auth/adapters";
|
|||
import type { NumberSchema, StringSchema, ObjectSchema } from "joi";
|
||||
import type { Request } from "@hapi/hapi";
|
||||
|
||||
export type AdapterFactory = (
|
||||
request: Request
|
||||
) => Adapter;
|
||||
export type AdapterFactory = (request: Request) => Adapter;
|
||||
|
||||
export interface NextAuthPluginOptions {
|
||||
nextAuthAdapterFactory: Adapter;
|
||||
|
|
|
|||
|
|
@ -268,60 +268,60 @@ export const configSchema = {
|
|||
doc: "The full base zammad api url",
|
||||
format: String,
|
||||
default: undefined,
|
||||
env: "ZAMMAD_API_URL"
|
||||
env: "ZAMMAD_API_URL",
|
||||
},
|
||||
zammadApiKey: {
|
||||
doc: "The zammad api key",
|
||||
format: String,
|
||||
default: undefined,
|
||||
sensitive: true,
|
||||
env: "ZAMMAD_API_KEY"
|
||||
env: "ZAMMAD_API_KEY",
|
||||
},
|
||||
labelStudioApiUrl: {
|
||||
doc: "The full base label studio api url",
|
||||
format: String,
|
||||
default: undefined,
|
||||
env: "LABEL_STUDIO_API_URL"
|
||||
env: "LABEL_STUDIO_API_URL",
|
||||
},
|
||||
labelStudioApiKey: {
|
||||
doc: "The label studio api key",
|
||||
format: String,
|
||||
default: undefined,
|
||||
sensitive: true,
|
||||
env: "LABEL_STUDIO_API_KEY"
|
||||
env: "LABEL_STUDIO_API_KEY",
|
||||
},
|
||||
contributorId: {
|
||||
doc: "The leafcutter contributor id",
|
||||
format: String,
|
||||
default: undefined,
|
||||
env: "LEAFCUTTER_CONTRIBUTOR_ID"
|
||||
env: "LEAFCUTTER_CONTRIBUTOR_ID",
|
||||
},
|
||||
contributorName: {
|
||||
doc: "The leafcutter contributor name",
|
||||
format: String,
|
||||
default: undefined,
|
||||
env: "LEAFCUTTER_CONTRIBUTOR_NAME"
|
||||
env: "LEAFCUTTER_CONTRIBUTOR_NAME",
|
||||
},
|
||||
opensearchApiUrl: {
|
||||
doc: "The opensearch api url",
|
||||
format: String,
|
||||
default: undefined,
|
||||
env: "OPENSEARCH_API_URL"
|
||||
env: "OPENSEARCH_API_URL",
|
||||
},
|
||||
opensearchUsername: {
|
||||
doc: "The opensearch username",
|
||||
format: String,
|
||||
default: undefined,
|
||||
env: "OPENSEARCH_USERNAME"
|
||||
env: "OPENSEARCH_USERNAME",
|
||||
},
|
||||
opensearchPassword: {
|
||||
doc: "The opensearch password",
|
||||
format: String,
|
||||
default: undefined,
|
||||
sensative: true,
|
||||
env: "OPENSEARCH_PASSWORD"
|
||||
env: "OPENSEARCH_PASSWORD",
|
||||
},
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// define the interfaces for the concrete config objects
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import process from "node:process";
|
|||
import { existsSync } from "node:fs";
|
||||
import path from "node:path";
|
||||
import { exec } from "node:child_process";
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { fileURLToPath } from "node:url";
|
||||
import type { IAppConfig } from "@digiresilience/metamigo-config";
|
||||
|
||||
/**
|
||||
|
|
@ -37,8 +37,8 @@ export const migrateWrapper = async (
|
|||
};
|
||||
const cmd = `npx --no-install graphile-migrate ${commands.join(" ")}`;
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
const dbDir = path.resolve(__dirname, '../../');
|
||||
const gmrcPath = path.resolve(__dirname, '../../.gmrc');
|
||||
const dbDir = path.resolve(__dirname, "../../");
|
||||
const gmrcPath = path.resolve(__dirname, "../../.gmrc");
|
||||
if (!existsSync(gmrcPath)) {
|
||||
throw new Error(`graphile migrate config not found at ${gmrcPath}`);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ export const SettingsService = (
|
|||
return s.value;
|
||||
},
|
||||
|
||||
async save<T>(settingInfo: SettingInfo<T>, value: T): Promise<T> {
|
||||
async save<T>(settingInfo: SettingInfo<T>, value: T): Promise<T> {
|
||||
const s = await repo.upsert(settingInfo.name, value);
|
||||
return s.value;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -50,5 +50,4 @@ export class WhatsappBotRecordRepository extends RepositoryBase(
|
|||
[this.schemaTable, verified, bot.id]
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ const mutableObj = defState("mutableObj", {
|
|||
});
|
||||
|
||||
type FortyOneAdder = () => number;
|
||||
|
||||
|
||||
type Incrementer = (n: number) => number;
|
||||
|
||||
const inc41 = defState<FortyOneAdder>("inc41", {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue