CherryPick🍒

This commit is contained in:
NoriDev 2023-06-09 22:55:20 +09:00
parent 563a952e38
commit 37cca3b7f1
8 changed files with 12 additions and 12 deletions

View file

@ -35,7 +35,7 @@ services:
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: misskey
POSTGRES_DB: cherrypick
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:

View file

@ -167,8 +167,8 @@ TODO
## Environment Variable
- `MISSKEY_CONFIG_YML`: Specify the file path of config.yml instead of default.yml (e.g. `2nd.yml`).
- `MISSKEY_WEBFINGER_USE_HTTP`: If it's set true, WebFinger requests will be http instead of https, useful for testing federation between servers in localhost. NEVER USE IN PRODUCTION.
- `CHERRYPICK_CONFIG_YML`: Specify the file path of config.yml instead of default.yml (e.g. `2nd.yml`).
- `CHERRYPICK_WEBFINGER_USE_HTTP`: If it's set true, WebFinger requests will be http instead of https, useful for testing federation between servers in localhost. NEVER USE IN PRODUCTION.
## Continuous integration
CherryPick uses GitHub Actions for executing automated tests.

View file

@ -1,2 +1,2 @@
# Misskey Backend
# CherryPick Backend
![](../../assets/backend.png)

View file

@ -98,7 +98,7 @@ export type Source = {
};
/**
* Misskeyが自動的に()
* CherryPickが自動的に()
*/
export type Mixin = {
version: string;
@ -133,8 +133,8 @@ const dir = `${_dirname}/../../../.config`;
/**
* Path of configuration file
*/
const path = process.env.MISSKEY_CONFIG_YML
? resolve(dir, process.env.MISSKEY_CONFIG_YML)
const path = process.env.CHERRYPICK_CONFIG_YML
? resolve(dir, process.env.CHERRYPICK_CONFIG_YML)
: process.env.NODE_ENV === 'test'
? resolve(dir, 'test.yml')
: resolve(dir, 'default.yml');

View file

@ -46,7 +46,7 @@ export class WebfingerService {
const m = query.match(mRegex);
if (m) {
const hostname = m[2];
const useHttp = process.env.MISSKEY_WEBFINGER_USE_HTTP && process.env.MISSKEY_WEBFINGER_USE_HTTP.toLowerCase() === 'true';
const useHttp = process.env.CHERRYPICK_WEBFINGER_USE_HTTP && process.env.CHERRYPICK_WEBFINGER_USE_HTTP.toLowerCase() === 'true';
return `http${useHttp ? '' : 's'}://${hostname}/.well-known/webfinger?${urlQuery({ resource: `acct:${query}` })}`;
}

View file

@ -1,3 +1,3 @@
# Prelude
このディレクトリのコードはJavaScriptの表現能力を補うためのコードです。
Misskey固有の処理とは独立したコードの集まりですが、Misskeyのコードを読みやすくすることを目的としています。
CherryPick固有の処理とは独立したコードの集まりですが、CherryPickのコードを読みやすくすることを目的としています。

View file

@ -141,7 +141,7 @@ export async function common(createVue: () => App<Element>) {
}
}
history.replaceState({ misskey: 'loginId' }, '', target);
history.replaceState({ cherrypick: 'loginId' }, '', target);
}
//#endregion

View file

@ -3,7 +3,7 @@ import * as Misskey from '../src';
describe('Streaming', () => {
test('emit type', async () => {
const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' });
const stream = new Misskey.Stream('https://cherrypick.test', { token: 'TOKEN' });
const mainChannel = stream.useChannel('main');
mainChannel.on('notification', notification => {
expectType<Misskey.entities.Notification>(notification);
@ -11,7 +11,7 @@ describe('Streaming', () => {
});
test('params type', async () => {
const stream = new Misskey.Stream('https://misskey.test', { token: 'TOKEN' });
const stream = new Misskey.Stream('https://cherrypick.test', { token: 'TOKEN' });
// TODO: 「stream.useChannel の第二引数として受け入れる型が
// {
// otherparty?: User['id'] | null;