* Builds the list URL for the configured folder path or root.
(folderPath?: string)
| 134 | * Builds the list URL for the configured folder path or root. |
| 135 | */ |
| 136 | function buildListUrl(folderPath?: string): string { |
| 137 | const trimmed = folderPath?.trim() |
| 138 | if (trimmed) { |
| 139 | // Normalize path: strip leading/trailing slashes |
| 140 | const normalized = trimmed.replace(/^\/+|\/+$/g, '') |
| 141 | const encoded = normalized.split('/').map(encodeURIComponent).join('/') |
| 142 | return `${GRAPH_BASE_URL}/me/drive/root:/${encoded}:/children` |
| 143 | } |
| 144 | return `${GRAPH_BASE_URL}/me/drive/root/children` |
| 145 | } |
| 146 | |
| 147 | export const onedriveConnector: ConnectorConfig = { |
| 148 | ...onedriveConnectorMeta, |
no test coverage detected