chore: 著作権とライセンスについての情報を各ファイルに追加する (#141)

* chore: 著作権とライセンスについての情報を各ファイルに追加する

* chore: Add the SPDX information to each file

Add copyright and licensing information as defined in version 3.0 of
the REUSE Specification.

* tweak format

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>

* chore: Add SPDX-License-Identifier [skip ci]

* add missing SPDX-License-Identifier

* remove unused file

---------

Co-authored-by: Shun Sakai <sorairolake@protonmail.ch>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Co-authored-by: Chocolate Pie <106949016+chocolate-pie@users.noreply.github.com>
This commit is contained in:
riku6460
2023-08-15 02:52:38 +09:00
committed by GitHub
parent 7f0acd3ea4
commit 8d06a6475e
1667 changed files with 8400 additions and 399 deletions

View File

@@ -1,5 +1,10 @@
// @ts-check
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { fileURLToPath } from 'node:url';
import * as esbuild from 'esbuild';
import locales from '../../locales/index.js';

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
type FIXME = any;

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
/*
* Notification manager for SW
*/

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { get } from 'idb-keyval';
export async function getAccountFromId(id: string): Promise<{ token: string; id: string } | void> {

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export function getUserName(user: { name?: string | null; username: string }): string {
return user.name === '' ? user.username : user.name ?? user.username;
}

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export type Locale = { [key: string]: string | Locale };
export class I18n<T extends Locale = Locale> {

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
/*
* Language manager for SW
*/

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export function getUrlWithLoginId(url: string, loginId: string): string {
const u = new URL(url, origin);
u.searchParams.set('loginId', loginId);

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
/*
* Operations
* 各種操作

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export function char2fileName(char: string): string {
let codes = Array.from(char)
.map(x => x.codePointAt(0)?.toString(16))

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { get } from 'idb-keyval';
import * as Acct from 'misskey-js/built/acct';
import type { PushNotificationDataMap } from '@/types';
@@ -22,7 +27,7 @@ globalThis.addEventListener('activate', ev => {
});
function offlineContentHTML(): string {
return `<!doctype html>Offline. Service Worker @${_VERSION_} <button onclick="location.reload()">reload</button>`
return `<!doctype html>Offline. Service Worker @${_VERSION_} <button onclick="location.reload()">reload</button>`;
}
globalThis.addEventListener('fetch', ev => {

View File

@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
import type * as Misskey from 'misskey-js';
export type SwMessageOrderType = 'post' | 'push';