Skip to content

Commit 155880f

Browse files
renovate[bot]CopilotB4nan
authored
chore(deps): lock file maintenance (#1019)
This PR contains the following updates: | Update | Change | |---|---| | lockFileMaintenance | All locks refreshed | 🔧 This Pull Request updates lock files to use the latest dependency versions. --- ### Configuration 📅 **Schedule**: Branch creation - "before 2am" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/apify/apify-cli). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi45Ny4wIiwidXBkYXRlZEluVmVyIjoiNDMuOC41IiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: B4nan <615580+B4nan@users.noreply.github.com> Co-authored-by: Martin Adámek <banan23@gmail.com>
1 parent 64d82fb commit 155880f

3 files changed

Lines changed: 1638 additions & 1614 deletions

File tree

src/lib/command-framework/apify-command.ts

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -46,45 +46,46 @@ type IfNotUnknown<T, Y, N> = T extends unknown ? Y : N;
4646
type InferFlagTypeFromFlag<
4747
Builder extends TaggedFlagBuilder<FlagTag, string[] | null, unknown, unknown>,
4848
OptionalIfHasDefault = false,
49-
> = Builder extends TaggedFlagBuilder<infer ReturnedType, never, infer Required, infer HasDefault> // Handle special case where there can be no choices
50-
? If<
51-
// If we want to mark flags as optional if they have a default
52-
OptionalIfHasDefault,
53-
// If the flag actually has a default value, assert on that
54-
IfNotUnknown<
55-
HasDefault,
56-
FlagTagToTSType[ReturnedType] | undefined,
57-
// Otherwise fall back to required status
49+
> =
50+
Builder extends TaggedFlagBuilder<infer ReturnedType, never, infer Required, infer HasDefault> // Handle special case where there can be no choices
51+
? If<
52+
// If we want to mark flags as optional if they have a default
53+
OptionalIfHasDefault,
54+
// If the flag actually has a default value, assert on that
55+
IfNotUnknown<
56+
HasDefault,
57+
FlagTagToTSType[ReturnedType] | undefined,
58+
// Otherwise fall back to required status
59+
If<Required, FlagTagToTSType[ReturnedType], FlagTagToTSType[ReturnedType] | undefined>
60+
>,
61+
// fallback to required status
5862
If<Required, FlagTagToTSType[ReturnedType], FlagTagToTSType[ReturnedType] | undefined>
59-
>,
60-
// fallback to required status
61-
If<Required, FlagTagToTSType[ReturnedType], FlagTagToTSType[ReturnedType] | undefined>
62-
>
63-
: // Might have choices, in which case we branch based on that
64-
Builder extends TaggedFlagBuilder<infer ReturnedType, infer ChoiceType, infer Required, infer HasDefault>
65-
? // If choices is a valid array
66-
ChoiceType extends unknown[] | readonly unknown[]
67-
? // If we want optional flags to stay as optional
68-
If<
69-
OptionalIfHasDefault,
70-
ChoiceType[number] | undefined,
71-
// fallback to required status
72-
If<Required, ChoiceType[number], ChoiceType[number] | undefined>
73-
>
74-
: If<
75-
// If we want to mark flags as optional if they have a default
76-
OptionalIfHasDefault,
77-
// If the flag actually has a default value, assert on that
78-
IfNotUnknown<
79-
HasDefault,
80-
FlagTagToTSType[ReturnedType] | undefined,
81-
// Fallback to required status
63+
>
64+
: // Might have choices, in which case we branch based on that
65+
Builder extends TaggedFlagBuilder<infer ReturnedType, infer ChoiceType, infer Required, infer HasDefault>
66+
? // If choices is a valid array
67+
ChoiceType extends unknown[] | readonly unknown[]
68+
? // If we want optional flags to stay as optional
69+
If<
70+
OptionalIfHasDefault,
71+
ChoiceType[number] | undefined,
72+
// fallback to required status
73+
If<Required, ChoiceType[number], ChoiceType[number] | undefined>
74+
>
75+
: If<
76+
// If we want to mark flags as optional if they have a default
77+
OptionalIfHasDefault,
78+
// If the flag actually has a default value, assert on that
79+
IfNotUnknown<
80+
HasDefault,
81+
FlagTagToTSType[ReturnedType] | undefined,
82+
// Fallback to required status
83+
If<Required, FlagTagToTSType[ReturnedType], FlagTagToTSType[ReturnedType] | undefined>
84+
>,
85+
// fallback to required status
8286
If<Required, FlagTagToTSType[ReturnedType], FlagTagToTSType[ReturnedType] | undefined>
83-
>,
84-
// fallback to required status
85-
If<Required, FlagTagToTSType[ReturnedType], FlagTagToTSType[ReturnedType] | undefined>
86-
>
87-
: unknown;
87+
>
88+
: unknown;
8889

8990
// Adapted from https://gist.github.com/kuroski/9a7ae8e5e5c9e22985364d1ddbf3389d to support kebab-case and "string a"
9091
type CamelCase<S extends string> = S extends

0 commit comments

Comments
 (0)