From 677c1df597ddf035740548387a7e570a92bd8078 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sun, 11 Sep 2022 19:58:16 +0200 Subject: [PATCH] rename foundkey-js imports to foundkey --- packages/backend/test/utils.ts | 4 +- packages/client/src/account.ts | 12 ++-- packages/client/src/components/MkNoteSub.vue | 8 +-- .../src/components/abuse-report-window.vue | 4 +- .../client/src/components/cropper-dialog.vue | 8 +-- packages/client/src/components/cw-button.vue | 4 +- .../src/components/drive-file-thumbnail.vue | 4 +- .../src/components/drive-select-dialog.vue | 8 +-- .../client/src/components/drive-window.vue | 4 +- packages/client/src/components/drive.file.vue | 6 +- .../client/src/components/drive.folder.vue | 14 ++--- .../src/components/drive.nav-folder.vue | 14 ++--- packages/client/src/components/drive.vue | 62 +++++++++---------- .../client/src/components/emoji-picker.vue | 6 +- .../client/src/components/featured-photos.vue | 4 +- .../client/src/components/follow-button.vue | 6 +- .../client/src/components/global/acct.vue | 4 +- .../client/src/components/global/avatar.vue | 4 +- .../src/components/global/user-name.vue | 4 +- .../src/components/instance-card-mini.vue | 4 +- .../client/src/components/media-banner.vue | 4 +- .../client/src/components/media-caption.vue | 4 +- .../client/src/components/media-image.vue | 4 +- packages/client/src/components/media-list.vue | 6 +- .../client/src/components/media-video.vue | 4 +- .../client/src/components/note-detailed.vue | 12 ++-- .../client/src/components/note-header.vue | 4 +- .../client/src/components/note-simple.vue | 4 +- packages/client/src/components/note.vue | 8 +-- .../client/src/components/notification.vue | 4 +- packages/client/src/components/poll.vue | 4 +- packages/client/src/components/post-form.vue | 22 +++---- .../components/reactions-viewer.reaction.vue | 4 +- .../src/components/reactions-viewer.vue | 4 +- .../src/components/sub-note-content.vue | 4 +- .../client/src/components/ui/pagination.vue | 6 +- .../client/src/components/user-card-mini.vue | 4 +- packages/client/src/components/user-info.vue | 4 +- .../src/components/user-online-indicator.vue | 4 +- .../src/components/user-select-dialog.vue | 10 +-- .../src/components/visibility-picker.vue | 8 +-- packages/client/src/filters/user.ts | 8 +-- packages/client/src/instance.ts | 4 +- packages/client/src/os.ts | 8 +-- packages/client/src/pages/_error_.vue | 4 +- packages/client/src/pages/clip.vue | 4 +- packages/client/src/pages/instance-info.vue | 6 +- .../pages/messaging/messaging-room.form.vue | 8 +-- .../messaging/messaging-room.message.vue | 4 +- .../src/pages/messaging/messaging-room.vue | 10 +-- packages/client/src/pages/note.vue | 4 +- packages/client/src/pages/share.vue | 10 +-- packages/client/src/pages/user-info.vue | 4 +- .../client/src/pages/user/follow-list.vue | 4 +- packages/client/src/pages/user/followers.vue | 4 +- packages/client/src/pages/user/following.vue | 4 +- packages/client/src/pages/user/gallery.vue | 4 +- packages/client/src/pages/user/home.vue | 4 +- .../client/src/pages/user/index.activity.vue | 4 +- .../client/src/pages/user/index.timeline.vue | 4 +- packages/client/src/pages/user/index.vue | 4 +- packages/client/src/pages/user/pages.vue | 4 +- packages/client/src/pages/user/reactions.vue | 4 +- packages/client/src/scripts/get-note-menu.ts | 8 +-- .../client/src/scripts/get-note-summary.ts | 4 +- packages/client/src/scripts/page-metadata.ts | 6 +- packages/client/src/scripts/upload.ts | 4 +- .../client/src/scripts/use-note-capture.ts | 4 +- packages/client/src/stream.ts | 4 +- packages/client/src/types/menu.ts | 8 +-- packages/sw/src/filters/user.ts | 8 +-- packages/sw/src/scripts/operations.ts | 6 +- packages/sw/src/types.ts | 6 +- 73 files changed, 242 insertions(+), 242 deletions(-) diff --git a/packages/backend/test/utils.ts b/packages/backend/test/utils.ts index 2fd939353..a366547e6 100644 --- a/packages/backend/test/utils.ts +++ b/packages/backend/test/utils.ts @@ -6,7 +6,7 @@ import * as childProcess from 'child_process'; import * as http from 'node:http'; import { SIGKILL } from 'constants'; import WebSocket from 'ws'; -import * as misskey from 'foundkey-js'; +import * as foundkey from 'foundkey-js'; import fetch from 'node-fetch'; import FormData from 'form-data'; import { DataSource } from 'typeorm'; @@ -96,7 +96,7 @@ export const signup = async (params?: any): Promise => { return res.body; }; -export const post = async (user: any, params?: misskey.Endpoints['notes/create']['req']): Promise => { +export const post = async (user: any, params?: foundkey.Endpoints['notes/create']['req']): Promise => { const q = Object.assign({ text: 'test', }, params); diff --git a/packages/client/src/account.ts b/packages/client/src/account.ts index 33acf73a9..718c7b5b0 100644 --- a/packages/client/src/account.ts +++ b/packages/client/src/account.ts @@ -1,5 +1,5 @@ import { defineAsyncComponent, reactive } from 'vue'; -import * as misskey from 'foundkey-js'; +import * as foundkey from 'foundkey-js'; import { showSuspendedDialog } from './scripts/show-suspended-dialog'; import { i18n } from './i18n'; import { del, get, set } from '@/scripts/idb-proxy'; @@ -9,7 +9,7 @@ import { unisonReload, reloadChannel } from '@/scripts/unison-reload'; // TODO: 他のタブと永続化されたstateを同期 -type Account = misskey.entities.MeDetailed; +type Account = foundkey.entities.MeDetailed; const accountData = localStorage.getItem('account'); @@ -141,8 +141,8 @@ export async function login(token: Account['token'], redirect?: string) { export async function openAccountMenu(opts: { includeCurrentAccount?: boolean; withExtraOperation: boolean; - active?: misskey.entities.UserDetailed['id']; - onChoose?: (account: misskey.entities.UserDetailed) => void; + active?: foundkey.entities.UserDetailed['id']; + onChoose?: (account: foundkey.entities.UserDetailed) => void; }, ev: MouseEvent) { function showSigninDialog() { popup(defineAsyncComponent(() => import('@/components/signin-dialog.vue')), {}, { @@ -162,7 +162,7 @@ export async function openAccountMenu(opts: { }, 'closed'); } - async function switchAccount(account: misskey.entities.UserDetailed) { + async function switchAccount(account: foundkey.entities.UserDetailed) { const storedAccounts = await getAccounts(); const token = storedAccounts.find(x => x.id === account.id).token; switchAccountWithToken(token); @@ -175,7 +175,7 @@ export async function openAccountMenu(opts: { const storedAccounts = await getAccounts().then(accounts => accounts.filter(x => x.id !== $i.id)); const accountsPromise = api('users/show', { userIds: storedAccounts.map(x => x.id) }); - function createItem(account: misskey.entities.UserDetailed) { + function createItem(account: foundkey.entities.UserDetailed) { return { type: 'user', user: account, diff --git a/packages/client/src/components/MkNoteSub.vue b/packages/client/src/components/MkNoteSub.vue index c60f385e7..7f6d90080 100644 --- a/packages/client/src/components/MkNoteSub.vue +++ b/packages/client/src/components/MkNoteSub.vue @@ -27,7 +27,7 @@