mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-11-27 06:18:46 +09:00
CherryPick🍒
This commit is contained in:
parent
366198445c
commit
43addcbd00
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "Misskey",
|
||||
"name": "CherryPick",
|
||||
"dockerComposeFile": "docker-compose.yml",
|
||||
"service": "app",
|
||||
"workspaceFolder": "/workspace",
|
||||
|
@ -90,7 +90,7 @@ export default class Logger {
|
||||
|
||||
const projectId = this.clConfig.projectId;
|
||||
const logging = new Logging({ projectId: projectId, keyFilename: this.clConfig.saKeyPath });
|
||||
const logName = this.clConfig.logName ?? 'misskey';
|
||||
const logName = this.clConfig.logName ?? 'cherrypick';
|
||||
const log = logging.log(logName);
|
||||
const logMessage = stripAnsi(message);
|
||||
|
||||
|
@ -462,7 +462,7 @@ export class Meta {
|
||||
public serverRules: string[];
|
||||
|
||||
@Column('varchar', {
|
||||
length: 1024, array: true, default: '{ "admin", "administrator", "root", "system", "maintainer", "host", "mod", "moderator", "owner", "superuser", "staff", "auth", "i", "me", "everyone", "all", "mention", "mentions", "example", "user", "users", "account", "accounts", "official", "help", "helps", "support", "supports", "info", "information", "informations", "announce", "announces", "announcement", "announcements", "notice", "notification", "notifications", "dev", "developer", "developers", "tech", "misskey" }',
|
||||
length: 1024, array: true, default: '{ "admin", "administrator", "root", "system", "maintainer", "host", "mod", "moderator", "owner", "superuser", "staff", "auth", "i", "me", "everyone", "all", "mention", "mentions", "example", "user", "users", "account", "accounts", "official", "help", "helps", "support", "supports", "info", "information", "informations", "announce", "announces", "announcement", "announcements", "notice", "notification", "notifications", "dev", "developer", "developers", "tech", "misskey", "cherrypick" }',
|
||||
})
|
||||
public preservedUsernames: string[];
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ export function genOpenapiSpec(config: Config) {
|
||||
|
||||
info: {
|
||||
version: config.version,
|
||||
title: 'Misskey API',
|
||||
title: 'CherryPick API',
|
||||
'x-logo': { url: '/static-assets/api-doc.png' },
|
||||
},
|
||||
|
||||
|
@ -4,7 +4,7 @@ import * as Misskey from '../src';
|
||||
describe('API', () => {
|
||||
test('success', async () => {
|
||||
const cli = new Misskey.api.APIClient({
|
||||
origin: 'https://misskey.test',
|
||||
origin: 'https://cherrypick.test',
|
||||
credential: 'TOKEN'
|
||||
});
|
||||
const res = await cli.request('meta', { detail: true });
|
||||
@ -13,7 +13,7 @@ describe('API', () => {
|
||||
|
||||
test('conditional respose type (meta)', async () => {
|
||||
const cli = new Misskey.api.APIClient({
|
||||
origin: 'https://misskey.test',
|
||||
origin: 'https://cherrypick.test',
|
||||
credential: 'TOKEN'
|
||||
});
|
||||
|
||||
@ -32,7 +32,7 @@ describe('API', () => {
|
||||
|
||||
test('conditional respose type (users/show)', async () => {
|
||||
const cli = new Misskey.api.APIClient({
|
||||
origin: 'https://misskey.test',
|
||||
origin: 'https://cherrypick.test',
|
||||
credential: 'TOKEN'
|
||||
});
|
||||
|
||||
|
@ -20,7 +20,7 @@ describe('API', () => {
|
||||
fetchMock.resetMocks();
|
||||
fetchMock.mockResponse(async (req) => {
|
||||
const body = await req.json();
|
||||
if (req.method == 'POST' && req.url == 'https://misskey.test/api/i') {
|
||||
if (req.method == 'POST' && req.url == 'https://cherrypick.test/api/i') {
|
||||
if (body.i === 'TOKEN') {
|
||||
return JSON.stringify({ id: 'foo' });
|
||||
} else {
|
||||
@ -32,7 +32,7 @@ describe('API', () => {
|
||||
});
|
||||
|
||||
const cli = new APIClient({
|
||||
origin: 'https://misskey.test',
|
||||
origin: 'https://cherrypick.test',
|
||||
credential: 'TOKEN',
|
||||
});
|
||||
|
||||
@ -43,7 +43,7 @@ describe('API', () => {
|
||||
});
|
||||
|
||||
expect(getFetchCall(fetchMock.mock.calls[0])).toEqual({
|
||||
url: 'https://misskey.test/api/i',
|
||||
url: 'https://cherrypick.test/api/i',
|
||||
method: 'POST',
|
||||
body: { i: 'TOKEN' }
|
||||
});
|
||||
@ -53,7 +53,7 @@ describe('API', () => {
|
||||
fetchMock.resetMocks();
|
||||
fetchMock.mockResponse(async (req) => {
|
||||
const body = await req.json();
|
||||
if (req.method == 'POST' && req.url == 'https://misskey.test/api/notes/show') {
|
||||
if (req.method == 'POST' && req.url == 'https://cherrypick.test/api/notes/show') {
|
||||
if (body.i === 'TOKEN' && body.noteId === 'aaaaa') {
|
||||
return JSON.stringify({ id: 'foo' });
|
||||
} else {
|
||||
@ -65,7 +65,7 @@ describe('API', () => {
|
||||
});
|
||||
|
||||
const cli = new APIClient({
|
||||
origin: 'https://misskey.test',
|
||||
origin: 'https://cherrypick.test',
|
||||
credential: 'TOKEN',
|
||||
});
|
||||
|
||||
@ -76,7 +76,7 @@ describe('API', () => {
|
||||
});
|
||||
|
||||
expect(getFetchCall(fetchMock.mock.calls[0])).toEqual({
|
||||
url: 'https://misskey.test/api/notes/show',
|
||||
url: 'https://cherrypick.test/api/notes/show',
|
||||
method: 'POST',
|
||||
body: { i: 'TOKEN', noteId: 'aaaaa' }
|
||||
});
|
||||
@ -85,7 +85,7 @@ describe('API', () => {
|
||||
test('204 No Content で null が返る', async () => {
|
||||
fetchMock.resetMocks();
|
||||
fetchMock.mockResponse(async (req) => {
|
||||
if (req.method == 'POST' && req.url == 'https://misskey.test/api/reset-password') {
|
||||
if (req.method == 'POST' && req.url == 'https://cherrypick.test/api/reset-password') {
|
||||
return { status: 204 };
|
||||
} else {
|
||||
return { status: 404 };
|
||||
@ -93,7 +93,7 @@ describe('API', () => {
|
||||
});
|
||||
|
||||
const cli = new APIClient({
|
||||
origin: 'https://misskey.test',
|
||||
origin: 'https://cherrypick.test',
|
||||
credential: 'TOKEN',
|
||||
});
|
||||
|
||||
@ -102,7 +102,7 @@ describe('API', () => {
|
||||
expect(res).toEqual(null);
|
||||
|
||||
expect(getFetchCall(fetchMock.mock.calls[0])).toEqual({
|
||||
url: 'https://misskey.test/api/reset-password',
|
||||
url: 'https://cherrypick.test/api/reset-password',
|
||||
method: 'POST',
|
||||
body: { i: 'TOKEN', token: 'aaa', password: 'aaa' }
|
||||
});
|
||||
@ -112,7 +112,7 @@ describe('API', () => {
|
||||
fetchMock.resetMocks();
|
||||
fetchMock.mockResponse(async (req) => {
|
||||
const body = await req.json();
|
||||
if (req.method == 'POST' && req.url == 'https://misskey.test/api/i') {
|
||||
if (req.method == 'POST' && req.url == 'https://cherrypick.test/api/i') {
|
||||
if (typeof body.i === 'string') {
|
||||
return JSON.stringify({ id: 'foo' });
|
||||
} else {
|
||||
@ -134,7 +134,7 @@ describe('API', () => {
|
||||
|
||||
try {
|
||||
const cli = new APIClient({
|
||||
origin: 'https://misskey.test',
|
||||
origin: 'https://cherrypick.test',
|
||||
credential: 'TOKEN',
|
||||
});
|
||||
|
||||
@ -162,7 +162,7 @@ describe('API', () => {
|
||||
|
||||
try {
|
||||
const cli = new APIClient({
|
||||
origin: 'https://misskey.test',
|
||||
origin: 'https://cherrypick.test',
|
||||
credential: 'TOKEN',
|
||||
});
|
||||
|
||||
@ -179,7 +179,7 @@ describe('API', () => {
|
||||
|
||||
try {
|
||||
const cli = new APIClient({
|
||||
origin: 'https://misskey.test',
|
||||
origin: 'https://cherrypick.test',
|
||||
credential: 'TOKEN',
|
||||
});
|
||||
|
||||
@ -200,7 +200,7 @@ describe('API', () => {
|
||||
|
||||
try {
|
||||
const cli = new APIClient({
|
||||
origin: 'https://misskey.test',
|
||||
origin: 'https://cherrypick.test',
|
||||
credential: 'TOKEN',
|
||||
});
|
||||
|
||||
|
@ -3,8 +3,8 @@ import Stream from '../src/streaming';
|
||||
|
||||
describe('Streaming', () => {
|
||||
test('useChannel', async () => {
|
||||
const server = new WS('wss://misskey.test/streaming');
|
||||
const stream = new Stream('https://misskey.test', { token: 'TOKEN' });
|
||||
const server = new WS('wss://cherrypick.test/streaming');
|
||||
const stream = new Stream('https://cherrypick.test', { token: 'TOKEN' });
|
||||
const mainChannelReceived: any[] = [];
|
||||
const main = stream.useChannel('main');
|
||||
main.on('meUpdated', payload => {
|
||||
@ -40,8 +40,8 @@ describe('Streaming', () => {
|
||||
});
|
||||
|
||||
test('useChannel with parameters', async () => {
|
||||
const server = new WS('wss://misskey.test/streaming');
|
||||
const stream = new Stream('https://misskey.test', { token: 'TOKEN' });
|
||||
const server = new WS('wss://cherrypick.test/streaming');
|
||||
const stream = new Stream('https://cherrypick.test', { token: 'TOKEN' });
|
||||
const messagingChannelReceived: any[] = [];
|
||||
const messaging = stream.useChannel('messaging', { otherparty: 'aaa' });
|
||||
messaging.on('message', payload => {
|
||||
@ -78,8 +78,8 @@ describe('Streaming', () => {
|
||||
});
|
||||
|
||||
test('ちゃんとチャンネルごとにidが異なる', async () => {
|
||||
const server = new WS('wss://misskey.test/streaming');
|
||||
const stream = new Stream('https://misskey.test', { token: 'TOKEN' });
|
||||
const server = new WS('wss://cherrypick.test/streaming');
|
||||
const stream = new Stream('https://cherrypick.test', { token: 'TOKEN' });
|
||||
|
||||
stream.useChannel('messaging', { otherparty: 'aaa' });
|
||||
stream.useChannel('messaging', { otherparty: 'bbb' });
|
||||
@ -101,8 +101,8 @@ describe('Streaming', () => {
|
||||
});
|
||||
|
||||
test('Connection#send', async () => {
|
||||
const server = new WS('wss://misskey.test/streaming');
|
||||
const stream = new Stream('https://misskey.test', { token: 'TOKEN' });
|
||||
const server = new WS('wss://cherrypick.test/streaming');
|
||||
const stream = new Stream('https://cherrypick.test', { token: 'TOKEN' });
|
||||
|
||||
const messaging = stream.useChannel('messaging', { otherparty: 'aaa' });
|
||||
messaging.send('read', { id: 'aaa' });
|
||||
@ -124,8 +124,8 @@ describe('Streaming', () => {
|
||||
});
|
||||
|
||||
test('Connection#dispose', async () => {
|
||||
const server = new WS('wss://misskey.test/streaming');
|
||||
const stream = new Stream('https://misskey.test', { token: 'TOKEN' });
|
||||
const server = new WS('wss://cherrypick.test/streaming');
|
||||
const stream = new Stream('https://cherrypick.test', { token: 'TOKEN' });
|
||||
const mainChannelReceived: any[] = [];
|
||||
const main = stream.useChannel('main');
|
||||
main.on('meUpdated', payload => {
|
||||
|
@ -22,7 +22,7 @@ export const Default = {
|
||||
};
|
||||
},
|
||||
},
|
||||
template: '<MkA v-bind="props">Misskey</MkA>',
|
||||
template: '<MkA v-bind="props">CherryPick</MkA>',
|
||||
};
|
||||
},
|
||||
async play({ canvasElement }) {
|
||||
|
@ -48,7 +48,7 @@ export const Long = {
|
||||
user: {
|
||||
...userDetailed(),
|
||||
username: 'the_quick_brown_fox_jumped_over_the_lazy_dog',
|
||||
host: 'misskey.example',
|
||||
host: 'cherrypick.example',
|
||||
},
|
||||
},
|
||||
decorators: [
|
||||
|
@ -73,7 +73,7 @@ describe('MkMediaImage', () => {
|
||||
test('Attaching image with an alt message should show an ALT indicator', async () => {
|
||||
const mkMediaImage = renderMediaImage({
|
||||
type: 'image/png',
|
||||
comment: 'Misskeyのロゴです',
|
||||
comment: 'CherryPickのロゴです',
|
||||
});
|
||||
const [gif, alt] = await Promise.all([
|
||||
mkMediaImage.queryByText('GIF'),
|
||||
@ -86,7 +86,7 @@ describe('MkMediaImage', () => {
|
||||
test('Attaching GIF image with an alt message should show a GIF and an ALT indicator', async () => {
|
||||
const mkMediaImage = renderMediaImage({
|
||||
type: 'image/gif',
|
||||
comment: 'Misskeyのロゴです',
|
||||
comment: 'CherryPickのロゴです',
|
||||
});
|
||||
const [gif, alt] = await Promise.all([
|
||||
mkMediaImage.queryByText('GIF'),
|
||||
|
@ -18,7 +18,7 @@ const iconUrl = (name: BadgeNames): string => `/static-assets/tabler-badges/${na
|
||||
/* How to add a new badge:
|
||||
* 1. Find the icon and download png from https://tabler-icons.io/
|
||||
* 2. vips resize ~/Downloads/icon-name.png vipswork.png 0.4; vips scRGB2BW vipswork.png ~/icon-name.png"[compression=9,strip]"; rm vipswork.png;
|
||||
* 3. mv ~/icon-name.png ~/misskey/packages/backend/assets/tabler-badges/
|
||||
* 3. mv ~/icon-name.png ~/cherrypick/packages/backend/assets/tabler-badges/
|
||||
* 4. Add 'icon-name' to BadgeNames
|
||||
* 5. Add `badge: iconUrl('icon-name'),`
|
||||
*/
|
||||
@ -265,7 +265,7 @@ export async function createEmptyNotification(): Promise<void> {
|
||||
await globalThis.registration.showNotification(
|
||||
(new URL(origin)).host,
|
||||
{
|
||||
body: `Misskey v${_VERSION_}`,
|
||||
body: `CherryPick v${_VERSION_}`,
|
||||
silent: true,
|
||||
badge: iconUrl('null'),
|
||||
tag: 'read_notification',
|
||||
|
Loading…
Reference in New Issue
Block a user