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

Function optionalSecurity

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

Source from the content-addressed store, hash-verified

61}
62
63export function optionalSecurity(argumentName: string, rawValue: string): "loose" | "strict" | undefined {
64 if (rawValue.length === 0) {
65 return undefined;
66 }
67
68 const cleanValue = rawValue.toLowerCase();
69 if (cleanValue === "loose") {
70 return "loose";
71 }
72 if (cleanValue === "strict") {
73 return "strict";
74 }
75
76 throw new Error(`${argumentName}: invalid parameter - you provided "${rawValue}". Try "loose" or "strict" instead.`);
77}
78
79export function optionalInt(argumentName: string, rawValue: string): number | undefined {
80 if (rawValue.length === 0) {

Callers 2

runDeploymentFunction · 0.90
main.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected