mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 12:11:28 -07:00
Automate AUR publish in tagged release workflow (#22)
This commit is contained in:
@@ -279,7 +279,11 @@ export function createFirstRunSetupService(deps: {
|
||||
});
|
||||
if (
|
||||
isSetupCompleted(state) &&
|
||||
!(state.yomitanSetupMode === 'external' && !externalYomitanConfigured && !yomitanSetupSatisfied)
|
||||
!(
|
||||
state.yomitanSetupMode === 'external' &&
|
||||
!externalYomitanConfigured &&
|
||||
!yomitanSetupSatisfied
|
||||
)
|
||||
) {
|
||||
completed = true;
|
||||
return refreshWithState(state);
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import * as path from 'path';
|
||||
|
||||
function redactSkippedYomitanWriteValue(
|
||||
actionName: 'importYomitanDictionary' | 'deleteYomitanDictionary' | 'upsertYomitanDictionarySettings',
|
||||
actionName:
|
||||
| 'importYomitanDictionary'
|
||||
| 'deleteYomitanDictionary'
|
||||
| 'upsertYomitanDictionarySettings',
|
||||
rawValue: string,
|
||||
): string {
|
||||
const trimmed = rawValue.trim();
|
||||
@@ -18,7 +21,10 @@ function redactSkippedYomitanWriteValue(
|
||||
}
|
||||
|
||||
export function formatSkippedYomitanWriteAction(
|
||||
actionName: 'importYomitanDictionary' | 'deleteYomitanDictionary' | 'upsertYomitanDictionarySettings',
|
||||
actionName:
|
||||
| 'importYomitanDictionary'
|
||||
| 'deleteYomitanDictionary'
|
||||
| 'upsertYomitanDictionarySettings',
|
||||
rawValue: string,
|
||||
): string {
|
||||
return `${actionName}(${redactSkippedYomitanWriteValue(actionName, rawValue)})`;
|
||||
|
||||
@@ -9,7 +9,11 @@ test('yomitan settings runtime composes opener with built deps', async () => {
|
||||
|
||||
const runtime = createYomitanSettingsRuntime({
|
||||
ensureYomitanExtensionLoaded: async () => ({ id: 'ext' }),
|
||||
openYomitanSettingsWindow: ({ getExistingWindow, setWindow, yomitanSession: forwardedSession }) => {
|
||||
openYomitanSettingsWindow: ({
|
||||
getExistingWindow,
|
||||
setWindow,
|
||||
yomitanSession: forwardedSession,
|
||||
}) => {
|
||||
calls.push(`open-window:${(forwardedSession as { id: string } | null)?.id ?? 'null'}`);
|
||||
const current = getExistingWindow();
|
||||
if (!current) {
|
||||
@@ -54,5 +58,7 @@ test('yomitan settings runtime warns and does not open when no yomitan session i
|
||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||
|
||||
assert.equal(existingWindow, null);
|
||||
assert.deepEqual(calls, ['warn:Unable to open Yomitan settings: Yomitan session is unavailable.']);
|
||||
assert.deepEqual(calls, [
|
||||
'warn:Unable to open Yomitan settings: Yomitan session is unavailable.',
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user