(name: string)
| 32 | }; |
| 33 | |
| 34 | export const validateServiceName = (name: string) => { |
| 35 | if (!ALLOWED_NAME_CHARACTERS.test(name)) { |
| 36 | throw new AgentRPCError( |
| 37 | `Service name must only contain letters and numbers. Got: ${name}`, |
| 38 | ); |
| 39 | } |
| 40 | if (name.length > MAX_NAME_LENGTH) { |
| 41 | throw new AgentRPCError( |
| 42 | `Service name must be less than ${MAX_NAME_LENGTH} characters: Got ${name} with length ${name.length}.`, |
| 43 | ); |
| 44 | } |
| 45 | }; |
| 46 | |
| 47 | export const validateFunctionName = (name: string) => { |
| 48 | if (!ALLOWED_NAME_CHARACTERS.test(name)) { |
nothing calls this directly
no outgoing calls
no test coverage detected