(type: LogType = "info", ...args: any[])
| 6 | process.env.ENABLE_LOGGING === "true" || process.env.ENABLE_LOGGING === "1"; |
| 7 | |
| 8 | export function log(type: LogType = "info", ...args: any[]): void { |
| 9 | if (!ENABLE_LOGGING) return; |
| 10 | |
| 11 | switch (type) { |
| 12 | case "info": |
| 13 | console.info(...args); |
| 14 | break; |
| 15 | case "error": |
| 16 | console.error(...args); |
| 17 | break; |
| 18 | default: |
| 19 | console.log(...args); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | // Function to parse schema-specific permissions from environment variables |
| 24 | export function parseSchemaPermissions( |
no outgoing calls
no test coverage detected