refactor: prefix Mi for all entities (#11719)

* wip

* wip

* wip

* wip

* Update RepositoryModule.ts

* wip

* wip

* wip

* Revert "wip"

This reverts commit c1c13b37d2aaf3c65bc148212da302b0eb7868bf.
This commit is contained in:
syuilo 2023-08-16 17:51:28 +09:00 committed by GitHub
parent 9264ca336b
commit 792622aead
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
229 changed files with 1990 additions and 1990 deletions

View file

@ -9,7 +9,7 @@ import * as assert from 'assert';
// node-fetch only supports it's own Blob yet
// https://github.com/node-fetch/node-fetch/pull/1664
import { Blob } from 'node-fetch';
import { User } from '@/models/index.js';
import { MiUser } from '@/models/index.js';
import { startServer, signup, post, api, uploadFile, simpleGet, initTestDb } from '../utils.js';
import type { INestApplicationContext } from '@nestjs/common';
import type * as misskey from 'misskey-js';
@ -298,7 +298,7 @@ describe('Endpoints', () => {
assert.strictEqual(res.status, 200);
const connection = await initTestDb(true);
const Users = connection.getRepository(User);
const Users = connection.getRepository(MiUser);
const newBob = await Users.findOneByOrFail({ id: bob.id });
assert.strictEqual(newBob.followersCount, 0);
assert.strictEqual(newBob.followingCount, 1);
@ -360,7 +360,7 @@ describe('Endpoints', () => {
assert.strictEqual(res.status, 200);
const connection = await initTestDb(true);
const Users = connection.getRepository(User);
const Users = connection.getRepository(MiUser);
const newBob = await Users.findOneByOrFail({ id: bob.id });
assert.strictEqual(newBob.followersCount, 0);
assert.strictEqual(newBob.followingCount, 0);

View file

@ -7,7 +7,7 @@ process.env.NODE_ENV = 'test';
import * as assert from 'assert';
import { loadConfig } from '@/config.js';
import { User, UsersRepository } from '@/models/index.js';
import { MiUser, UsersRepository } from '@/models/index.js';
import { jobQueue } from '@/boot/common.js';
import { secureRndstr } from '@/misc/secure-rndstr.js';
import { uploadFile, signup, startServer, initTestDb, api, sleep, successfulApiCall } from '../utils.js';
@ -42,7 +42,7 @@ describe('Account Move', () => {
dave = await signup({ username: 'dave' });
eve = await signup({ username: 'eve' });
frank = await signup({ username: 'frank' });
Users = connection.getRepository(User);
Users = connection.getRepository(MiUser);
}, 1000 * 60 * 2);
afterAll(async () => {

View file

@ -6,7 +6,7 @@
process.env.NODE_ENV = 'test';
import * as assert from 'assert';
import { Note } from '@/models/entities/Note.js';
import { MiNote } from '@/models/entities/Note.js';
import { MAX_NOTE_TEXT_LENGTH } from '@/const.js';
import { signup, post, uploadUrl, startServer, initTestDb, api, uploadFile } from '../utils.js';
import type { INestApplicationContext } from '@nestjs/common';
@ -22,7 +22,7 @@ describe('Note', () => {
beforeAll(async () => {
app = await startServer();
const connection = await initTestDb(true);
Notes = connection.getRepository(Note);
Notes = connection.getRepository(MiNote);
alice = await signup({ username: 'alice' });
bob = await signup({ username: 'bob' });
}, 1000 * 60 * 2);

View file

@ -6,7 +6,7 @@
process.env.NODE_ENV = 'test';
import * as assert from 'assert';
import { Following } from '@/models/entities/Following.js';
import { MiFollowing } from '@/models/entities/Following.js';
import { connectStream, signup, api, post, startServer, initTestDb, waitFire } from '../utils.js';
import type { INestApplicationContext } from '@nestjs/common';
import type * as misskey from 'misskey-js';
@ -46,7 +46,7 @@ describe('Streaming', () => {
beforeAll(async () => {
app = await startServer();
const connection = await initTestDb(true);
Followings = connection.getRepository(Following);
Followings = connection.getRepository(MiFollowing);
ayano = await signup({ username: 'ayano' });
kyoko = await signup({ username: 'kyoko' });