Skip to content

Commit ab0bdac

Browse files
authored
Merge pull request #20 from ci7lus/chore/unrequired-mirakurun
Mirakurunが設定されていなくても再生開始できるように
2 parents a189343 + b5363d5 commit ab0bdac

File tree

45 files changed

+3924
-1499
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3924
-1499
lines changed

package.json

Lines changed: 54 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -21,82 +21,82 @@
2121
"build:sync": "webpack --color -c webpack-prebuild.config.ts"
2222
},
2323
"devDependencies": {
24-
"@ci7lus/eslint-config": "^1.1.0",
25-
"@graphql-codegen/add": "^3.2.0",
26-
"@graphql-codegen/cli": "^2.9.0",
27-
"@graphql-codegen/typescript": "^2.7.2",
28-
"@graphql-codegen/typescript-graphql-request": "^4.5.2",
29-
"@graphql-codegen/typescript-operations": "^2.5.2",
30-
"@tailwindcss/forms": "^0.5.2",
31-
"@types/discord-rpc": "^4.0.3",
24+
"@ci7lus/eslint-config": "^1.1.1",
25+
"@graphql-codegen/add": "^3",
26+
"@graphql-codegen/cli": "2.9.0",
27+
"@graphql-codegen/typescript": "^3.0.4",
28+
"@graphql-codegen/typescript-graphql-request": "4.5.9",
29+
"@graphql-codegen/typescript-operations": "^3.0.4",
30+
"@tailwindcss/forms": "^0.5.3",
31+
"@types/discord-rpc": "^4.0.4",
3232
"@types/dplayer": "^1.25.2",
33-
"@types/gapi.client.drive": "^3.0.13",
34-
"@types/koa": "^2.13.5",
35-
"@types/koa__router": "^8.0.11",
36-
"@types/node": "^16.10.2",
33+
"@types/gapi.client.drive": "^3.0.15",
34+
"@types/koa": "^2.13.6",
35+
"@types/koa__router": "^12.0.0",
36+
"@types/node": "^18.16.3",
3737
"@types/postcss-import": "^14.0.0",
38-
"@types/react-table": "^7.7.12",
38+
"@types/react-table": "^7.7.14",
3939
"@types/tailwindcss": "^3.1.0",
40-
"@types/twitter-text": "^3.1.2",
40+
"@types/twitter-text": "^3.1.5",
4141
"@types/url-join": "^4.0.1",
42-
"@types/webpack": "^5.28.0",
43-
"@types/webpack-bundle-analyzer": "^4.4.1",
42+
"@types/webpack": "^5.28.1",
43+
"@types/webpack-bundle-analyzer": "^4.6.0",
4444
"assert": "^2.0.0",
45-
"autoprefixer": "^10.4.7",
45+
"autoprefixer": "^10.4.14",
4646
"buffer": "^6.0.3",
4747
"crypto-browserify": "^3.12.0",
48-
"css-loader": "^6.7.1",
49-
"esbuild-loader": "^2.19.0",
50-
"eslint-plugin-classnames": "^0.2.1",
48+
"css-loader": "^6.7.3",
49+
"esbuild-loader": "^2",
50+
"eslint-plugin-classnames": "^0.3.1",
5151
"https-browserify": "^1.0.0",
52-
"husky": "^8.0.1",
52+
"husky": "^8.0.3",
5353
"license-webpack-plugin": "^4.0.2",
54-
"lint-staged": "^13.0.3",
54+
"lint-staged": "^13.2.2",
5555
"path-browserify": "^1.0.1",
56-
"postcss": "^8.4.14",
57-
"postcss-import": "^14.1.0",
58-
"postcss-loader": "^7.0.1",
59-
"prettier": "^2.7.1",
56+
"postcss": "^8.4.23",
57+
"postcss-import": "^15.1.0",
58+
"postcss-loader": "^7.3.0",
59+
"prettier": "^2.8.8",
6060
"process": "^0.11.10",
6161
"querystring-es3": "^0.2.1",
62-
"sass": "^1.53.0",
63-
"sass-loader": "^13.0.2",
62+
"sass": "^1.62.1",
63+
"sass-loader": "^13.2.2",
6464
"stream-browserify": "^3.0.0",
6565
"stream-http": "^3.2.0",
66-
"tailwindcss": "^3.1.6",
66+
"tailwindcss": "^3.3.2",
6767
"ts-node": "^10.9.1",
6868
"twitter-d": "^0.6.0",
69-
"typescript": "^4.7.4",
69+
"typescript": "^5.0.4",
7070
"url": "^0.11.0",
71-
"util": "^0.12.4",
72-
"webpack": "^5.73.0",
73-
"webpack-bundle-analyzer": "^4.5.0",
74-
"webpack-cli": "^4.10.0"
71+
"util": "^0.12.5",
72+
"webpack": "^5.82.0",
73+
"webpack-bundle-analyzer": "^4.8.0",
74+
"webpack-cli": "^5.0.2"
7575
},
7676
"dependencies": {
77-
"@headlessui/react": "^1.6.6",
77+
"@headlessui/react": "^1.7.14",
7878
"@koa/router": "^12.0.0",
7979
"@neneka/dplayer": "^1.27.2",
80-
"@tanstack/react-table": "^8.5.11",
81-
"@types/react": "^18.0.15",
82-
"@types/react-dom": "^18.0.6",
83-
"axios": "^1.0.0-alpha.1",
84-
"axios-retry": "^3.3.1",
85-
"bonjour-service": "^1.0.14",
80+
"@tanstack/react-table": "^8.9.1",
81+
"@types/react": "^18.2.5",
82+
"@types/react-dom": "^18.2.3",
83+
"axios": "^0",
84+
"axios-retry": "^3.4.0",
85+
"bonjour-service": "^1.1.1",
8686
"clsx": "^1.2.1",
87-
"dayjs": "^1.11.3",
87+
"dayjs": "^1.11.7",
8888
"discord-rpc": "^4.0.1",
89-
"eventmit": "^1.1.0",
90-
"fast-xml-parser": "^4.0.9",
91-
"format-duration": "^2.0.0",
89+
"eventmit": "^2.0.4",
90+
"fast-xml-parser": "^4.2.2",
91+
"format-duration": "^3.0.2",
9292
"get-port": "^6.1.2",
93-
"graphql": "^16.5.0",
94-
"interweave": "^13.0.0",
93+
"graphql": "^16.6.0",
94+
"interweave": "^13.1.0",
9595
"interweave-autolink": "^5.1.0",
96-
"js-base64": "^3.7.2",
97-
"koa": "^2.13.4",
96+
"js-base64": "^3.7.5",
97+
"koa": "^2.14.2",
9898
"koa-easy-ws": "^2.1.0",
99-
"pretty-bytes": "^6.0.0",
99+
"pretty-bytes": "^6.1.0",
100100
"react": "^18.2.0",
101101
"react-dom": "^18.2.0",
102102
"react-feather": "^2.0.10",
@@ -105,7 +105,7 @@
105105
"recoil": "^0.7.4",
106106
"recoil-sync": "0.1.1-alpha.1",
107107
"reconnecting-websocket": "^4.4.0",
108-
"twitter-api-client": "^1.5.2",
108+
"twitter-api-client": "^1.6.1",
109109
"twitter-text": "^3.1.0",
110110
"url-join": "^5.0.0",
111111
"yaml": "^1"
@@ -115,6 +115,9 @@
115115
"eslint": "*",
116116
"utf-8-validate": "^5.0.6"
117117
},
118+
"resolutions": {
119+
"@graphql-tools/prisma-loader": "7.2.2"
120+
},
118121
"lint-staged": {
119122
"*.{js,ts,tsx}": "eslint --max-warnings 0 --cache",
120123
"*.{js,ts,tsx,md}": "prettier"

src/@types/plugin.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,14 +322,14 @@ declare const ChannelPolarityEnum: {
322322
readonly V: "V"
323323
}
324324
declare type ChannelPolarityEnum =
325-
typeof ChannelPolarityEnum[keyof typeof ChannelPolarityEnum]
325+
(typeof ChannelPolarityEnum)[keyof typeof ChannelPolarityEnum]
326326
declare const ChannelType: {
327327
readonly Gr: "GR"
328328
readonly Bs: "BS"
329329
readonly Cs: "CS"
330330
readonly Sky: "SKY"
331331
}
332-
declare type ChannelType = typeof ChannelType[keyof typeof ChannelType]
332+
declare type ChannelType = (typeof ChannelType)[keyof typeof ChannelType]
333333
/**
334334
*
335335
* @export
@@ -436,7 +436,7 @@ declare const ProgramAudioSamplingRate: {
436436
readonly NUMBER_48000: 48000
437437
}
438438
declare type ProgramAudioSamplingRate =
439-
typeof ProgramAudioSamplingRate[keyof typeof ProgramAudioSamplingRate]
439+
(typeof ProgramAudioSamplingRate)[keyof typeof ProgramAudioSamplingRate]
440440
interface ProgramAudios {
441441
/**
442442
*
@@ -482,7 +482,7 @@ declare const ProgramAudiosLangsEnum: {
482482
readonly Etc: "etc"
483483
}
484484
declare type ProgramAudiosLangsEnum =
485-
typeof ProgramAudiosLangsEnum[keyof typeof ProgramAudiosLangsEnum]
485+
(typeof ProgramAudiosLangsEnum)[keyof typeof ProgramAudiosLangsEnum]
486486
interface ProgramGenre {
487487
/**
488488
*
@@ -590,14 +590,14 @@ declare const ProgramVideoResolution: {
590590
readonly _4320p: "4320p"
591591
}
592592
declare type ProgramVideoResolution =
593-
typeof ProgramVideoResolution[keyof typeof ProgramVideoResolution]
593+
(typeof ProgramVideoResolution)[keyof typeof ProgramVideoResolution]
594594
declare const ProgramVideoType: {
595595
readonly Mpeg2: "mpeg2"
596596
readonly H264: "h.264"
597597
readonly H265: "h.265"
598598
}
599599
declare type ProgramVideoType =
600-
typeof ProgramVideoType[keyof typeof ProgramVideoType]
600+
(typeof ProgramVideoType)[keyof typeof ProgramVideoType]
601601
interface RelatedItem {
602602
/**
603603
*
@@ -630,7 +630,7 @@ declare const RelatedItemTypeEnum: {
630630
readonly Movement: "movement"
631631
}
632632
declare type RelatedItemTypeEnum =
633-
typeof RelatedItemTypeEnum[keyof typeof RelatedItemTypeEnum]
633+
(typeof RelatedItemTypeEnum)[keyof typeof RelatedItemTypeEnum]
634634
/**
635635
*
636636
* @export
@@ -22353,7 +22353,7 @@ declare type OpenWindowArg = {
2235322353
playingContent?: ContentPlayerPlayingContent
2235422354
}
2235522355
declare type OpenBuiltinWindowArg = {
22356-
name: Omit<keyof typeof ROUTES, typeof ROUTES["ContentPlayer"]>
22356+
name: Omit<keyof typeof ROUTES, (typeof ROUTES)["ContentPlayer"]>
2235722357
}
2235822358
declare type OpenContentPlayerWindowArgs = {
2235922359
playingContent?: ContentPlayerPlayingContent

src/miraktest-annict/AnnictRenderer.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import { useThrottleFn } from "react-use"
66
import { atom, useRecoilValue, useRecoilState, useSetRecoilState } from "recoil"
77
import { syncEffect } from "recoil-sync"
88
import YAML from "yaml"
9-
import { InitPlugin } from "../@types/plugin"
10-
import { SayaDefinition } from "../miraktest-saya/types"
11-
import tailwind from "../tailwind.scss"
129
import { AnnictTrack } from "./components/AnnictTrack"
1310
import {
1411
ANNICT_META,
1512
ANNICT_PLUGIN_PREFIX,
1613
ANNICT_TRACK_WINDOW_ID,
1714
} from "./constants"
1815
import { AnnictSetting, ARM } from "./types"
16+
import { InitPlugin } from "../@types/plugin"
17+
import { SayaDefinition } from "../miraktest-saya/types"
18+
import tailwind from "../tailwind.scss"
1919

2020
/**
2121
* MirakTest Annict Plugin
@@ -219,7 +219,6 @@ export const AnnictRenderer: InitPlugin["renderer"] = ({
219219
atoms.globalContentPlayerPlayingContentFamily(activeId ?? 0)
220220
)
221221
const time = useRecoilValue(timeAtom)
222-
const services = useRecoilValue(atoms.mirakurunServicesSelector)
223222
useEffect(() => {
224223
rpc.setWindowTitle(`Annict - ${appInfo.name}`)
225224
}, [])
@@ -259,7 +258,7 @@ export const AnnictRenderer: InitPlugin["renderer"] = ({
259258
"leading-loose"
260259
)}
261260
>
262-
{setting.accessToken && services && sayaDefinition && arm ? (
261+
{setting.accessToken && sayaDefinition && arm ? (
263262
<AnnictTrack
264263
accessToken={setting.accessToken}
265264
playingContent={playingContent}

src/miraktest-annict/components/AnnictTrack.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import clsx from "clsx"
22
import React, { useEffect, useState } from "react"
33
import { Link } from "react-feather"
44
import Recoil, { useRecoilState } from "recoil"
5+
import { SearchWorkForm } from "./SeachWorkForm"
56
import { ContentPlayerPlayingContent } from "../../@types/plugin"
67
import { SayaDefinition } from "../../miraktest-saya/types"
78
import { AnnictRESTAPI, generateGqlClient } from "../annictAPI"
@@ -14,7 +15,6 @@ import {
1415
import { detectProgramInfo } from "../findWork"
1516
import { RatingState, StatusState, WorkFragment } from "../gql"
1617
import { ARM } from "../types"
17-
import { SearchWorkForm } from "./SeachWorkForm"
1818

1919
export const AnnictTrack: React.FC<{
2020
accessToken: string

src/miraktest-annict/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const ANNICT_META = {
3636
id: ANNICT_PLUGIN_ID,
3737
name: "Annict",
3838
author: "ci7lus",
39-
version: "0.3.7",
39+
version: "0.4.0",
4040
description: "視聴中の番組をAnnictで記録する",
4141
authorUrl: "https://github.com/ci7lus",
4242
url: "https://github.com/ci7lus/miraktest-plugins/tree/master/src/miraktest-annict",

src/miraktest-annict/findWork.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import dayjs from "dayjs"
22
import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
33
import isSameOrBefore from "dayjs/plugin/isSameOrBefore"
4-
import { Program } from "../@types/plugin"
5-
import { SayaDefinitionChannel } from "../miraktest-saya/types"
6-
import { wait } from "../shared/utils"
74
import { AnnictRESTAPI } from "./annictAPI"
85
import { SyobocalAPI } from "./syobocalAPI"
96
import { ARM } from "./types"
7+
import { Program } from "../@types/plugin"
8+
import { SayaDefinitionChannel } from "../miraktest-saya/types"
9+
import { wait } from "../shared/utils"
1010

1111
dayjs.extend(isSameOrAfter)
1212
dayjs.extend(isSameOrBefore)

0 commit comments

Comments
 (0)