(params)
| 9309 | |
| 9310 | const debug$4 = getLogger('tsdav:collection'); |
| 9311 | const collectionQuery = async (params) => { |
| 9312 | const { url, body, depth, defaultNamespace = DAVNamespaceShort.DAV, headers, headersToExclude, } = params; |
| 9313 | const queryResults = await davRequest({ |
| 9314 | url, |
| 9315 | init: { |
| 9316 | method: 'REPORT', |
| 9317 | headers: excludeHeaders(cleanupFalsy({ depth, ...headers }), headersToExclude), |
| 9318 | namespace: defaultNamespace, |
| 9319 | body, |
| 9320 | }, |
| 9321 | }); |
| 9322 | // empty query result |
| 9323 | if (queryResults.length === 1 && !queryResults[0].raw) { |
| 9324 | return []; |
| 9325 | } |
| 9326 | return queryResults; |
| 9327 | }; |
| 9328 | const makeCollection = async (params) => { |
| 9329 | const { url, props, depth, headers, headersToExclude } = params; |
| 9330 | return davRequest({ |
no test coverage detected