From e9f8659398ccab6e0b1fd15d694f213a8d9bbcac Mon Sep 17 00:00:00 2001
From: Van Nguyen <36019388+nguyentvan7@users.noreply.github.com>
Date: Mon, 25 Dec 2023 21:57:06 -0700
Subject: [PATCH] Fix misc issues (#1383)
* Add Hu Tao atk optimization target
* Make Song of Days Past a teambuff
* Update scanner versions
* Remove Akasha scanner
* Add Song of Days past as optimization target
* Modify SyncRepo to take a parameter for branch name
* Remove Song of Days Past opt target
---
.../Data/Artifacts/SongOfDaysPast/index.tsx | 15 ++++++++++-----
.../src/app/Data/Characters/HuTao/index.tsx | 1 +
apps/frontend/src/app/PageScanner/index.tsx | 18 ++++++++----------
libs/dm/project.json | 3 ++-
.../src/executors/sync-repo/executor.spec.ts | 3 +++
.../plugin/src/executors/sync-repo/executor.ts | 9 +++++++--
.../plugin/src/executors/sync-repo/schema.d.ts | 1 +
.../plugin/src/executors/sync-repo/schema.json | 4 ++++
libs/sr-dm/project.json | 3 ++-
9 files changed, 38 insertions(+), 19 deletions(-)
diff --git a/apps/frontend/src/app/Data/Artifacts/SongOfDaysPast/index.tsx b/apps/frontend/src/app/Data/Artifacts/SongOfDaysPast/index.tsx
index fb30793fe6..5344ce98cf 100644
--- a/apps/frontend/src/app/Data/Artifacts/SongOfDaysPast/index.tsx
+++ b/apps/frontend/src/app/Data/Artifacts/SongOfDaysPast/index.tsx
@@ -34,11 +34,15 @@ const burst_dmgInc = { ...healing_dmgInc }
export const data: Data = dataObjForArtifactSheet(key, {
premod: {
heal_: set2,
- normal_dmgInc,
- charged_dmgInc,
- plunging_dmgInc,
- skill_dmgInc,
- burst_dmgInc,
+ },
+ teamBuff: {
+ premod: {
+ normal_dmgInc,
+ charged_dmgInc,
+ plunging_dmgInc,
+ skill_dmgInc,
+ burst_dmgInc,
+ },
},
})
@@ -54,6 +58,7 @@ const sheet: IArtifactSheet = {
value: condHealing,
path: condHealingPath,
name: trm('condName'),
+ teamBuff: true,
states: objKeyMap(healingArr, (heal) => ({
name: `${heal}`,
fields: [
diff --git a/apps/frontend/src/app/Data/Characters/HuTao/index.tsx b/apps/frontend/src/app/Data/Characters/HuTao/index.tsx
index 84ba91c0fa..432de5470c 100644
--- a/apps/frontend/src/app/Data/Characters/HuTao/index.tsx
+++ b/apps/frontend/src/app/Data/Characters/HuTao/index.tsx
@@ -175,6 +175,7 @@ const dmgFormulas = {
),
skill: {
dmg: dmgNode('atk', dm.skill.dmg, 'skill'),
+ atk,
},
burst: {
dmg: dmgNode('atk', dm.burst.dmg, 'burst'),
diff --git a/apps/frontend/src/app/PageScanner/index.tsx b/apps/frontend/src/app/PageScanner/index.tsx
index a7673af13a..e505832dd7 100644
--- a/apps/frontend/src/app/PageScanner/index.tsx
+++ b/apps/frontend/src/app/PageScanner/index.tsx
@@ -1,9 +1,9 @@
import { AnvilIcon, DiscordIcon } from '@genshin-optimizer/svgicons'
+import { CardThemed, SqBadge } from '@genshin-optimizer/ui-common'
import {
Backpack,
Computer,
Download,
- EmojiEvents,
Gamepad,
InsertLink,
PersonSearch,
@@ -27,10 +27,8 @@ import ReactGA from 'react-ga4'
import { Trans, useTranslation } from 'react-i18next'
import { Link as RouterLink } from 'react-router-dom'
import AdScanner from './AdeptiScanner.png'
-import AkashaScanner from './AkashaScanner.png'
-import Artiscan from './artiscan.png'
import GIScanner from './GIScanner.png'
-import { CardThemed, SqBadge } from '@genshin-optimizer/ui-common'
+import Artiscan from './artiscan.png'
export default function PageScanner() {
const { t } = useTranslation('page_scanner')
ReactGA.send({ hitType: 'pageview', page: '/scanner' })
@@ -98,7 +96,7 @@ export default function PageScanner() {
sx={{ display: 'flex', alignItems: 'center' }}
>
- 4.2
+ 4.3
@@ -156,7 +154,7 @@ export default function PageScanner() {
sx={{ display: 'flex', alignItems: 'center' }}
>
- 4.2
+ 4.3
@@ -243,7 +241,7 @@ export default function PageScanner() {
sx={{ display: 'flex', alignItems: 'center' }}
>
- 4.2
+ 4.3
@@ -295,7 +293,7 @@ export default function PageScanner() {
-
+ {/*
@@ -383,7 +381,7 @@ export default function PageScanner() {
-
+ */}
)
diff --git a/libs/dm/project.json b/libs/dm/project.json
index 585fad7ffe..e8f5dc5f44 100644
--- a/libs/dm/project.json
+++ b/libs/dm/project.json
@@ -7,7 +7,8 @@
"load-dm": {
"options": {
"repoUrl": "https://gitlab.com/Dimbreath/AnimeGameData.git",
- "outputPath": "libs/dm/GenshinData"
+ "outputPath": "libs/dm/GenshinData",
+ "branch": "origin/main"
},
"inputs": [
{
diff --git a/libs/plugin/src/executors/sync-repo/executor.spec.ts b/libs/plugin/src/executors/sync-repo/executor.spec.ts
index ab0c6d4263..7dd27c402c 100644
--- a/libs/plugin/src/executors/sync-repo/executor.spec.ts
+++ b/libs/plugin/src/executors/sync-repo/executor.spec.ts
@@ -7,6 +7,7 @@ describe('SyncRepo Executor', () => {
const repoUrl = 'https://github.com/chrislgarry/Apollo-11/'
const outputPath = path.join(__dirname, 'TestDB')
const hashPath = path.join(__dirname, 'TestDB.hash')
+ const branch = 'origin/master'
if (fs.existsSync(outputPath))
fs.rmSync(outputPath, { recursive: true, force: true })
@@ -15,6 +16,7 @@ describe('SyncRepo Executor', () => {
const output1 = await executor({
repoUrl,
outputPath,
+ branch,
prefixPath: false,
})
@@ -28,6 +30,7 @@ describe('SyncRepo Executor', () => {
const output2 = await executor({
repoUrl,
outputPath,
+ branch,
prefixPath: false,
})
expect(output2.success).toBe(true)
diff --git a/libs/plugin/src/executors/sync-repo/executor.ts b/libs/plugin/src/executors/sync-repo/executor.ts
index be84571f90..05e0d41336 100644
--- a/libs/plugin/src/executors/sync-repo/executor.ts
+++ b/libs/plugin/src/executors/sync-repo/executor.ts
@@ -7,7 +7,12 @@ import * as path from 'path'
export default async function runExecutor(
options: SyncRepoExecutorSchema
): Promise<{ success: boolean }> {
- const { outputPath, repoUrl: url, prefixPath: prefix = true } = options
+ const {
+ outputPath,
+ repoUrl: url,
+ prefixPath: prefix = true,
+ branch,
+ } = options
const cwd = prefix ? path.join(workspaceRoot, outputPath) : outputPath
const remoteHash = getRemoteRepoHash(url)
const name = path.basename(cwd)
@@ -23,7 +28,7 @@ Caution: if this is part of nx cache replay,
const localHash = getLocalRepoHash(cwd)
if (remoteHash !== localHash) {
execSync(`git fetch --depth 1`, { cwd })
- execSync(`git reset --hard origin/master`, { cwd })
+ execSync(`git reset --hard ${branch}`, { cwd })
} else console.log('Repo already existed with the latest commit')
} else {
// Clone
diff --git a/libs/plugin/src/executors/sync-repo/schema.d.ts b/libs/plugin/src/executors/sync-repo/schema.d.ts
index 0ebda2b084..c0f57dd67f 100644
--- a/libs/plugin/src/executors/sync-repo/schema.d.ts
+++ b/libs/plugin/src/executors/sync-repo/schema.d.ts
@@ -1,5 +1,6 @@
export interface SyncRepoExecutorSchema {
repoUrl: string
outputPath: string
+ branch: string
prefixPath?: boolean
}
diff --git a/libs/plugin/src/executors/sync-repo/schema.json b/libs/plugin/src/executors/sync-repo/schema.json
index ea63294e62..0d9577ada2 100644
--- a/libs/plugin/src/executors/sync-repo/schema.json
+++ b/libs/plugin/src/executors/sync-repo/schema.json
@@ -13,6 +13,10 @@
"type": "string",
"description": "Local repo path (including the repo name)"
},
+ "branch": {
+ "type": "string",
+ "description": "Branch to sync (e.g. origin/master)"
+ },
"prefixPath": {
"type": "boolean",
"description": "Whether to prepend `localPath` with `{workspaceRoot}`. Default: true"
diff --git a/libs/sr-dm/project.json b/libs/sr-dm/project.json
index 3d15ad97e6..8abffb625a 100644
--- a/libs/sr-dm/project.json
+++ b/libs/sr-dm/project.json
@@ -7,7 +7,8 @@
"load-dm": {
"options": {
"repoUrl": "https://github.com/Dimbreath/StarRailData.git",
- "outputPath": "libs/sr-dm/StarRailData"
+ "outputPath": "libs/sr-dm/StarRailData",
+ "branch": "origin/master"
},
"inputs": [
{