mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 14:29:45 +00:00
style(sdk): apply prettier with single quotes
Run prettier across sdk/base and sdk/package to apply the standardized quote style (single quotes matching web).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { HealthStatus } from "../../../base/lib/types"
|
||||
import { HealthStatus } from '../../../base/lib/types'
|
||||
|
||||
export type TriggerInput = {
|
||||
lastResult?: HealthStatus
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Trigger } from "./index"
|
||||
import { Trigger } from './index'
|
||||
|
||||
export function changeOnFirstSuccess(o: {
|
||||
beforeFirstSuccess: Trigger
|
||||
@@ -13,7 +13,7 @@ export function changeOnFirstSuccess(o: {
|
||||
const beforeFirstSuccess = o.beforeFirstSuccess(getInput)
|
||||
for (
|
||||
let res = await beforeFirstSuccess.next();
|
||||
currentValue?.lastResult !== "success" && !res.done;
|
||||
currentValue?.lastResult !== 'success' && !res.done;
|
||||
res = await beforeFirstSuccess.next()
|
||||
) {
|
||||
yield
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { cooldownTrigger } from "./cooldownTrigger"
|
||||
import { changeOnFirstSuccess } from "./changeOnFirstSuccess"
|
||||
import { cooldownTrigger } from './cooldownTrigger'
|
||||
import { changeOnFirstSuccess } from './changeOnFirstSuccess'
|
||||
|
||||
export const defaultTrigger = changeOnFirstSuccess({
|
||||
beforeFirstSuccess: cooldownTrigger(1000),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TriggerInput } from "./TriggerInput"
|
||||
export { changeOnFirstSuccess } from "./changeOnFirstSuccess"
|
||||
export { cooldownTrigger } from "./cooldownTrigger"
|
||||
import { TriggerInput } from './TriggerInput'
|
||||
export { changeOnFirstSuccess } from './changeOnFirstSuccess'
|
||||
export { cooldownTrigger } from './cooldownTrigger'
|
||||
|
||||
export type Trigger = (
|
||||
getInput: () => TriggerInput,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Trigger } from "."
|
||||
import { HealthStatus } from "../../../base/lib/types"
|
||||
import { Trigger } from '.'
|
||||
import { HealthStatus } from '../../../base/lib/types'
|
||||
|
||||
export type LastStatusTriggerParams = { [k in HealthStatus]?: Trigger } & {
|
||||
default: Trigger
|
||||
@@ -15,13 +15,13 @@ export function lastStatus(o: LastStatusTriggerParams): Trigger {
|
||||
}
|
||||
while (true) {
|
||||
let currentValue = getInput()
|
||||
let prev: HealthStatus | "default" | undefined = currentValue.lastResult
|
||||
let prev: HealthStatus | 'default' | undefined = currentValue.lastResult
|
||||
if (!prev) {
|
||||
yield
|
||||
continue
|
||||
}
|
||||
if (!(prev in o)) {
|
||||
prev = "default"
|
||||
prev = 'default'
|
||||
}
|
||||
if (!triggers[prev]) {
|
||||
triggers[prev] = o[prev]!(getInput)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Trigger } from "."
|
||||
import { lastStatus } from "./lastStatus"
|
||||
import { Trigger } from '.'
|
||||
import { lastStatus } from './lastStatus'
|
||||
|
||||
export const successFailure = (o: {
|
||||
duringSuccess: Trigger
|
||||
|
||||
Reference in New Issue
Block a user