MCPcopy
hub / github.com/SamKirkland/FTP-Deploy-Action / optionalLogLevel

Function optionalLogLevel

src/parse.ts:44–61  ·  view source on GitHub ↗
(argumentName: string, rawValue: string)

Source from the content-addressed store, hash-verified

42}
43
44export function optionalLogLevel(argumentName: string, rawValue: string): "minimal" | "standard" | "verbose" | undefined {
45 if (rawValue.length === 0) {
46 return undefined;
47 }
48
49 const cleanValue = rawValue.toLowerCase();
50 if (cleanValue === "minimal") {
51 return "minimal";
52 }
53 if (cleanValue === "standard") {
54 return "standard";
55 }
56 if (cleanValue === "verbose") {
57 return "verbose";
58 }
59
60 throw new Error(`${argumentName}: invalid parameter - you provided "${rawValue}". Try "minimal", "standard", or "verbose" instead.`);
61}
62
63export function optionalSecurity(argumentName: string, rawValue: string): "loose" | "strict" | undefined {
64 if (rawValue.length === 0) {

Callers 2

runDeploymentFunction · 0.90
main.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected