1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-27 14:28:53 +09:00

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: environment:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
POSTGRES_DB: misskey POSTGRES_DB: cherrypick
volumes: volumes:
- postgres-data:/var/lib/postgresql/data - postgres-data:/var/lib/postgresql/data
healthcheck: healthcheck:

View File

@ -167,8 +167,8 @@ TODO
## Environment Variable ## Environment Variable
- `MISSKEY_CONFIG_YML`: Specify the file path of config.yml instead of default.yml (e.g. `2nd.yml`). - `CHERRYPICK_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_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 ## Continuous integration
CherryPick uses GitHub Actions for executing automated tests. CherryPick uses GitHub Actions for executing automated tests.

View File

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

View File

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

View File

@ -46,7 +46,7 @@ export class WebfingerService {
const m = query.match(mRegex); const m = query.match(mRegex);
if (m) { if (m) {
const hostname = m[2]; 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}` })}`; return `http${useHttp ? '' : 's'}://${hostname}/.well-known/webfinger?${urlQuery({ resource: `acct:${query}` })}`;
} }

View File

@ -1,3 +1,3 @@
# Prelude # Prelude
このディレクトリのコードはJavaScriptの表現能力を補うためのコードです。 このディレクトリのコードは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 //#endregion

View File

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