hide-a-bed 7.0.1 → 7.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/cjs/index.cjs +47 -0
- package/dist/esm/index.mjs +47 -1
- package/impl/bindConfig.mts +5 -0
- package/impl/headDB.mts +55 -0
- package/impl/utils/errors.mts +1 -0
- package/impl/utils/fetch.mts +2 -1
- package/index.mts +2 -0
- package/package.json +2 -2
- package/types/output/impl/bindConfig.d.mts +2 -0
- package/types/output/impl/bindConfig.d.mts.map +1 -1
- package/types/output/impl/headDB.d.mts +13 -0
- package/types/output/impl/headDB.d.mts.map +1 -0
- package/types/output/impl/headDB.test.d.mts +2 -0
- package/types/output/impl/headDB.test.d.mts.map +1 -0
- package/types/output/impl/utils/errors.d.mts +1 -1
- package/types/output/impl/utils/errors.d.mts.map +1 -1
- package/types/output/impl/utils/fetch.d.mts +2 -2
- package/types/output/impl/utils/fetch.d.mts.map +1 -1
- package/types/output/index.d.mts +2 -1
- package/types/output/index.d.mts.map +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
And some utility APIs
|
|
16
16
|
|
|
17
17
|
- [`getDBInfo()`](#getdbinfo)
|
|
18
|
+
- [`headDB()`](#headdb)
|
|
18
19
|
- [`createQuery()`](#createquery) 🍭
|
|
19
20
|
- [`withRetry()`](#withretry)
|
|
20
21
|
|
|
@@ -517,6 +518,19 @@ const result = await getDBInfo({
|
|
|
517
518
|
// result: { db_name: 'test', doc_count: 3232 }
|
|
518
519
|
```
|
|
519
520
|
|
|
521
|
+
#### headDB()
|
|
522
|
+
|
|
523
|
+
Run a lightweight database health check using CouchDB's `HEAD /{db}` route.
|
|
524
|
+
|
|
525
|
+
```javascript
|
|
526
|
+
const config = { couch: 'http://localhost:5984/mydb' }
|
|
527
|
+
const healthy = await headDB({
|
|
528
|
+
...config,
|
|
529
|
+
request: { timeout: 2000 }
|
|
530
|
+
})
|
|
531
|
+
// healthy: true
|
|
532
|
+
```
|
|
533
|
+
|
|
520
534
|
### View Queries
|
|
521
535
|
|
|
522
536
|
#### query
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -2070,6 +2070,51 @@ const getDBInfo = async (configInput) => {
|
|
|
2070
2070
|
return CouchDBInfo.parse(resp.body);
|
|
2071
2071
|
};
|
|
2072
2072
|
|
|
2073
|
+
//#endregion
|
|
2074
|
+
//#region impl/headDB.mts
|
|
2075
|
+
/**
|
|
2076
|
+
* Performs a health check against the target CouchDB database using `HEAD /{db}`.
|
|
2077
|
+
*
|
|
2078
|
+
* @see {@link https://docs.couchdb.org/en/stable/api/database/common.html#head--db | CouchDB API Documentation}
|
|
2079
|
+
*
|
|
2080
|
+
* @param configInput - The CouchDB configuration input.
|
|
2081
|
+
* @returns A promise that resolves to `true` when the database responds successfully.
|
|
2082
|
+
* @throws {RetryableError} `RetryableError` If a retryable error occurs during the request.
|
|
2083
|
+
* @throws {OperationError} For other non-retryable response failures.
|
|
2084
|
+
*/
|
|
2085
|
+
const headDB = async (configInput) => {
|
|
2086
|
+
const config = CouchConfig.parse(configInput);
|
|
2087
|
+
const logger = createLogger(config);
|
|
2088
|
+
const url = createCouchDbUrl(config.couch);
|
|
2089
|
+
let resp;
|
|
2090
|
+
try {
|
|
2091
|
+
resp = await fetchCouchJson({
|
|
2092
|
+
auth: config.auth,
|
|
2093
|
+
method: "HEAD",
|
|
2094
|
+
operation: "headDB",
|
|
2095
|
+
request: config.request,
|
|
2096
|
+
url
|
|
2097
|
+
});
|
|
2098
|
+
if (!isSuccessStatusCode("database", resp.statusCode)) {
|
|
2099
|
+
logger.error(`Non-success status code received: ${resp.statusCode}`);
|
|
2100
|
+
throw createResponseError({
|
|
2101
|
+
body: resp.body,
|
|
2102
|
+
defaultMessage: "Database health check failed",
|
|
2103
|
+
operation: "headDB",
|
|
2104
|
+
statusCode: resp.statusCode
|
|
2105
|
+
});
|
|
2106
|
+
}
|
|
2107
|
+
} catch (err) {
|
|
2108
|
+
logger.error("Error during head operation:", err);
|
|
2109
|
+
RetryableError.handleNetworkError(err, "headDB");
|
|
2110
|
+
}
|
|
2111
|
+
if (!resp) {
|
|
2112
|
+
logger.error("No response received from head request");
|
|
2113
|
+
throw new RetryableError("Database health check failed", 503, { operation: "headDB" });
|
|
2114
|
+
}
|
|
2115
|
+
return true;
|
|
2116
|
+
};
|
|
2117
|
+
|
|
2073
2118
|
//#endregion
|
|
2074
2119
|
//#region schema/sugar/lock.mts
|
|
2075
2120
|
const LockDoc = CouchDoc.extend({
|
|
@@ -2403,6 +2448,7 @@ function doBind(config) {
|
|
|
2403
2448
|
bulkSave: config.bindWithRetry ? withRetry(bulkSave.bind(null, config), retryOptions) : bulkSave.bind(null, config),
|
|
2404
2449
|
bulkSaveTransaction: bulkSaveTransaction.bind(null, config),
|
|
2405
2450
|
getDBInfo: config.bindWithRetry ? withRetry(getDBInfo.bind(null, config), retryOptions) : getDBInfo.bind(null, config),
|
|
2451
|
+
headDB: config.bindWithRetry ? withRetry(headDB.bind(null, config), retryOptions) : headDB.bind(null, config),
|
|
2406
2452
|
patch: config.bindWithRetry ? withRetry(patch.bind(null, config), retryOptions) : patch.bind(null, config),
|
|
2407
2453
|
patchDangerously: patchDangerously.bind(null, config),
|
|
2408
2454
|
put: config.bindWithRetry ? withRetry(put.bind(null, config), retryOptions) : put.bind(null, config),
|
|
@@ -2434,6 +2480,7 @@ exports.createQuery = createQuery;
|
|
|
2434
2480
|
exports.get = get;
|
|
2435
2481
|
exports.getAtRev = getAtRev;
|
|
2436
2482
|
exports.getDBInfo = getDBInfo;
|
|
2483
|
+
exports.headDB = headDB;
|
|
2437
2484
|
exports.patch = patch;
|
|
2438
2485
|
exports.patchDangerously = patchDangerously;
|
|
2439
2486
|
exports.put = put;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -2038,6 +2038,51 @@ const getDBInfo = async (configInput) => {
|
|
|
2038
2038
|
return CouchDBInfo.parse(resp.body);
|
|
2039
2039
|
};
|
|
2040
2040
|
|
|
2041
|
+
//#endregion
|
|
2042
|
+
//#region impl/headDB.mts
|
|
2043
|
+
/**
|
|
2044
|
+
* Performs a health check against the target CouchDB database using `HEAD /{db}`.
|
|
2045
|
+
*
|
|
2046
|
+
* @see {@link https://docs.couchdb.org/en/stable/api/database/common.html#head--db | CouchDB API Documentation}
|
|
2047
|
+
*
|
|
2048
|
+
* @param configInput - The CouchDB configuration input.
|
|
2049
|
+
* @returns A promise that resolves to `true` when the database responds successfully.
|
|
2050
|
+
* @throws {RetryableError} `RetryableError` If a retryable error occurs during the request.
|
|
2051
|
+
* @throws {OperationError} For other non-retryable response failures.
|
|
2052
|
+
*/
|
|
2053
|
+
const headDB = async (configInput) => {
|
|
2054
|
+
const config = CouchConfig.parse(configInput);
|
|
2055
|
+
const logger = createLogger(config);
|
|
2056
|
+
const url = createCouchDbUrl(config.couch);
|
|
2057
|
+
let resp;
|
|
2058
|
+
try {
|
|
2059
|
+
resp = await fetchCouchJson({
|
|
2060
|
+
auth: config.auth,
|
|
2061
|
+
method: "HEAD",
|
|
2062
|
+
operation: "headDB",
|
|
2063
|
+
request: config.request,
|
|
2064
|
+
url
|
|
2065
|
+
});
|
|
2066
|
+
if (!isSuccessStatusCode("database", resp.statusCode)) {
|
|
2067
|
+
logger.error(`Non-success status code received: ${resp.statusCode}`);
|
|
2068
|
+
throw createResponseError({
|
|
2069
|
+
body: resp.body,
|
|
2070
|
+
defaultMessage: "Database health check failed",
|
|
2071
|
+
operation: "headDB",
|
|
2072
|
+
statusCode: resp.statusCode
|
|
2073
|
+
});
|
|
2074
|
+
}
|
|
2075
|
+
} catch (err) {
|
|
2076
|
+
logger.error("Error during head operation:", err);
|
|
2077
|
+
RetryableError.handleNetworkError(err, "headDB");
|
|
2078
|
+
}
|
|
2079
|
+
if (!resp) {
|
|
2080
|
+
logger.error("No response received from head request");
|
|
2081
|
+
throw new RetryableError("Database health check failed", 503, { operation: "headDB" });
|
|
2082
|
+
}
|
|
2083
|
+
return true;
|
|
2084
|
+
};
|
|
2085
|
+
|
|
2041
2086
|
//#endregion
|
|
2042
2087
|
//#region schema/sugar/lock.mts
|
|
2043
2088
|
const LockDoc = CouchDoc.extend({
|
|
@@ -2371,6 +2416,7 @@ function doBind(config) {
|
|
|
2371
2416
|
bulkSave: config.bindWithRetry ? withRetry(bulkSave.bind(null, config), retryOptions) : bulkSave.bind(null, config),
|
|
2372
2417
|
bulkSaveTransaction: bulkSaveTransaction.bind(null, config),
|
|
2373
2418
|
getDBInfo: config.bindWithRetry ? withRetry(getDBInfo.bind(null, config), retryOptions) : getDBInfo.bind(null, config),
|
|
2419
|
+
headDB: config.bindWithRetry ? withRetry(headDB.bind(null, config), retryOptions) : headDB.bind(null, config),
|
|
2374
2420
|
patch: config.bindWithRetry ? withRetry(patch.bind(null, config), retryOptions) : patch.bind(null, config),
|
|
2375
2421
|
patchDangerously: patchDangerously.bind(null, config),
|
|
2376
2422
|
put: config.bindWithRetry ? withRetry(put.bind(null, config), retryOptions) : put.bind(null, config),
|
|
@@ -2383,4 +2429,4 @@ function doBind(config) {
|
|
|
2383
2429
|
}
|
|
2384
2430
|
|
|
2385
2431
|
//#endregion
|
|
2386
|
-
export { ConflictError, HideABedError, NotFoundError, OperationError, QueryBuilder, RetryableError, ValidationError, bindConfig, bulkGet, bulkGetDictionary, bulkRemove, bulkRemoveMap, bulkSave, bulkSaveTransaction, createLock, createQuery, get, getAtRev, getDBInfo, patch, patchDangerously, put, query, queryStream, remove, removeLock, watchDocs, withRetry };
|
|
2432
|
+
export { ConflictError, HideABedError, NotFoundError, OperationError, QueryBuilder, RetryableError, ValidationError, bindConfig, bulkGet, bulkGetDictionary, bulkRemove, bulkRemoveMap, bulkSave, bulkSaveTransaction, createLock, createQuery, get, getAtRev, getDBInfo, headDB, patch, patchDangerously, put, query, queryStream, remove, removeLock, watchDocs, withRetry };
|
package/impl/bindConfig.mts
CHANGED
|
@@ -17,6 +17,7 @@ import { query } from './query.mts'
|
|
|
17
17
|
import { bulkRemove, bulkRemoveMap } from './bulkRemove.mts'
|
|
18
18
|
import { bulkSave, bulkSaveTransaction } from './bulkSave.mts'
|
|
19
19
|
import { getDBInfo } from './getDBInfo.mts'
|
|
20
|
+
import { headDB } from './headDB.mts'
|
|
20
21
|
import { remove } from './remove.mts'
|
|
21
22
|
import { createLock, removeLock } from './sugar/lock.mts'
|
|
22
23
|
import { watchDocs } from './sugar/watch.mts'
|
|
@@ -38,6 +39,7 @@ type BoundMethods = {
|
|
|
38
39
|
bulkSave: BoundConfigMethod<typeof bulkSave>
|
|
39
40
|
bulkSaveTransaction: BoundConfigMethod<typeof bulkSaveTransaction>
|
|
40
41
|
getDBInfo: BoundConfigMethod<typeof getDBInfo>
|
|
42
|
+
headDB: BoundConfigMethod<typeof headDB>
|
|
41
43
|
patch: BoundConfigMethod<typeof patch>
|
|
42
44
|
patchDangerously: BoundConfigMethod<typeof patchDangerously>
|
|
43
45
|
put: BoundConfigMethod<typeof put>
|
|
@@ -141,6 +143,9 @@ function doBind(config: CouchConfig): BoundMethods {
|
|
|
141
143
|
getDBInfo: config.bindWithRetry
|
|
142
144
|
? withRetry(getDBInfo.bind(null, config), retryOptions)
|
|
143
145
|
: getDBInfo.bind(null, config),
|
|
146
|
+
headDB: config.bindWithRetry
|
|
147
|
+
? withRetry(headDB.bind(null, config), retryOptions)
|
|
148
|
+
: headDB.bind(null, config),
|
|
144
149
|
patch: config.bindWithRetry
|
|
145
150
|
? withRetry(patch.bind(null, config), retryOptions)
|
|
146
151
|
: patch.bind(null, config),
|
package/impl/headDB.mts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { RetryableError, createResponseError } from './utils/errors.mts'
|
|
2
|
+
import { createLogger } from './utils/logger.mts'
|
|
3
|
+
import { CouchConfig, type CouchConfigInput } from '../schema/config.mts'
|
|
4
|
+
import { fetchCouchJson } from './utils/fetch.mts'
|
|
5
|
+
import { isSuccessStatusCode } from './utils/response.mts'
|
|
6
|
+
import { createCouchDbUrl } from './utils/url.mts'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Performs a health check against the target CouchDB database using `HEAD /{db}`.
|
|
10
|
+
*
|
|
11
|
+
* @see {@link https://docs.couchdb.org/en/stable/api/database/common.html#head--db | CouchDB API Documentation}
|
|
12
|
+
*
|
|
13
|
+
* @param configInput - The CouchDB configuration input.
|
|
14
|
+
* @returns A promise that resolves to `true` when the database responds successfully.
|
|
15
|
+
* @throws {RetryableError} `RetryableError` If a retryable error occurs during the request.
|
|
16
|
+
* @throws {OperationError} For other non-retryable response failures.
|
|
17
|
+
*/
|
|
18
|
+
export const headDB = async (configInput: CouchConfigInput): Promise<true> => {
|
|
19
|
+
const config = CouchConfig.parse(configInput)
|
|
20
|
+
const logger = createLogger(config)
|
|
21
|
+
const url = createCouchDbUrl(config.couch)
|
|
22
|
+
|
|
23
|
+
let resp
|
|
24
|
+
try {
|
|
25
|
+
resp = await fetchCouchJson({
|
|
26
|
+
auth: config.auth,
|
|
27
|
+
method: 'HEAD',
|
|
28
|
+
operation: 'headDB',
|
|
29
|
+
request: config.request,
|
|
30
|
+
url
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
if (!isSuccessStatusCode('database', resp.statusCode)) {
|
|
34
|
+
logger.error(`Non-success status code received: ${resp.statusCode}`)
|
|
35
|
+
throw createResponseError({
|
|
36
|
+
body: resp.body,
|
|
37
|
+
defaultMessage: 'Database health check failed',
|
|
38
|
+
operation: 'headDB',
|
|
39
|
+
statusCode: resp.statusCode
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
} catch (err) {
|
|
43
|
+
logger.error('Error during head operation:', err)
|
|
44
|
+
RetryableError.handleNetworkError(err, 'headDB')
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!resp) {
|
|
48
|
+
logger.error('No response received from head request')
|
|
49
|
+
throw new RetryableError('Database health check failed', 503, {
|
|
50
|
+
operation: 'headDB'
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return true
|
|
55
|
+
}
|
package/impl/utils/errors.mts
CHANGED
package/impl/utils/fetch.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { RetryableError } from './errors.mts'
|
|
|
2
2
|
import type { RequestOptions } from '../../schema/request.mts'
|
|
3
3
|
import { composeAbortSignal } from './request.mts'
|
|
4
4
|
|
|
5
|
-
export type HttpMethod = 'DELETE' | 'GET' | 'POST' | 'PUT'
|
|
5
|
+
export type HttpMethod = 'DELETE' | 'GET' | 'HEAD' | 'POST' | 'PUT'
|
|
6
6
|
|
|
7
7
|
type NativeFetchBody = RequestInit['body']
|
|
8
8
|
|
|
@@ -33,6 +33,7 @@ export type FetchRequestOptions = {
|
|
|
33
33
|
| 'get'
|
|
34
34
|
| 'getAtRev'
|
|
35
35
|
| 'getDBInfo'
|
|
36
|
+
| 'headDB'
|
|
36
37
|
| 'patch'
|
|
37
38
|
| 'patchDangerously'
|
|
38
39
|
| 'put'
|
package/index.mts
CHANGED
|
@@ -11,6 +11,7 @@ import { remove } from './impl/remove.mts'
|
|
|
11
11
|
import { bulkSave, bulkSaveTransaction } from './impl/bulkSave.mts'
|
|
12
12
|
import { query } from './impl/query.mts'
|
|
13
13
|
import { getDBInfo } from './impl/getDBInfo.mts'
|
|
14
|
+
import { headDB } from './impl/headDB.mts'
|
|
14
15
|
import { bulkRemove, bulkRemoveMap } from './impl/bulkRemove.mts'
|
|
15
16
|
import { createLock, removeLock } from './impl/sugar/lock.mts'
|
|
16
17
|
import { watchDocs } from './impl/sugar/watch.mts'
|
|
@@ -25,6 +26,7 @@ export {
|
|
|
25
26
|
query,
|
|
26
27
|
queryStream,
|
|
27
28
|
getDBInfo,
|
|
29
|
+
headDB,
|
|
28
30
|
|
|
29
31
|
// sugar methods
|
|
30
32
|
patch,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hide-a-bed",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.1",
|
|
4
4
|
"description": "An abstraction over couchdb calls that includes easy mock/stubs with pouchdb",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"couchdb",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"format:check": "oxfmt --check .",
|
|
49
49
|
"typecheck": "tsc --noEmit",
|
|
50
50
|
"typecheck:watch": "tsc --noEmit --watch",
|
|
51
|
-
"prepublishOnly": "npm run build",
|
|
51
|
+
"prepublishOnly": "npm test && npm run build",
|
|
52
52
|
"validate": "npm run format:check && npm run lint && npm run typecheck",
|
|
53
53
|
"full": "npm run lint:fix && npm run build && npm run clean"
|
|
54
54
|
},
|
|
@@ -9,6 +9,7 @@ import type { QueryBound } from './query.mts';
|
|
|
9
9
|
import { bulkRemove, bulkRemoveMap } from './bulkRemove.mts';
|
|
10
10
|
import { bulkSave, bulkSaveTransaction } from './bulkSave.mts';
|
|
11
11
|
import { getDBInfo } from './getDBInfo.mts';
|
|
12
|
+
import { headDB } from './headDB.mts';
|
|
12
13
|
import { remove } from './remove.mts';
|
|
13
14
|
import { createLock, removeLock } from './sugar/lock.mts';
|
|
14
15
|
import { watchDocs } from './sugar/watch.mts';
|
|
@@ -24,6 +25,7 @@ type BoundMethods = {
|
|
|
24
25
|
bulkSave: BoundConfigMethod<typeof bulkSave>;
|
|
25
26
|
bulkSaveTransaction: BoundConfigMethod<typeof bulkSaveTransaction>;
|
|
26
27
|
getDBInfo: BoundConfigMethod<typeof getDBInfo>;
|
|
28
|
+
headDB: BoundConfigMethod<typeof headDB>;
|
|
27
29
|
patch: BoundConfigMethod<typeof patch>;
|
|
28
30
|
patchDangerously: BoundConfigMethod<typeof patchDangerously>;
|
|
29
31
|
put: BoundConfigMethod<typeof put>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindConfig.d.mts","sourceRoot":"","sources":["../../../impl/bindConfig.mts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;A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;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAC/E,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAC3D,MAAM,EAAE,WAAW,UAYpB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type CouchConfigInput } from '../schema/config.mts';
|
|
2
|
+
/**
|
|
3
|
+
* Performs a health check against the target CouchDB database using `HEAD /{db}`.
|
|
4
|
+
*
|
|
5
|
+
* @see {@link https://docs.couchdb.org/en/stable/api/database/common.html#head--db | CouchDB API Documentation}
|
|
6
|
+
*
|
|
7
|
+
* @param configInput - The CouchDB configuration input.
|
|
8
|
+
* @returns A promise that resolves to `true` when the database responds successfully.
|
|
9
|
+
* @throws {RetryableError} `RetryableError` If a retryable error occurs during the request.
|
|
10
|
+
* @throws {OperationError} For other non-retryable response failures.
|
|
11
|
+
*/
|
|
12
|
+
export declare const headDB: (configInput: CouchConfigInput) => Promise<true>;
|
|
13
|
+
//# sourceMappingURL=headDB.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headDB.d.mts","sourceRoot":"","sources":["../../../impl/headDB.mts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAKzE;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,GAAU,aAAa,gBAAgB,KAAG,OAAO,CAAC,IAAI,CAqCxE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"headDB.test.d.mts","sourceRoot":"","sources":["../../../impl/headDB.test.mts"],"names":[],"mappings":""}
|
|
@@ -15,7 +15,7 @@ export interface NetworkError {
|
|
|
15
15
|
message?: string;
|
|
16
16
|
}
|
|
17
17
|
export type ErrorCategory = 'conflict' | 'network' | 'not_found' | 'operation' | 'retryable' | 'validation' | 'transaction';
|
|
18
|
-
export type ErrorOperation = 'get' | 'getAtRev' | 'getDBInfo' | 'patch' | 'patchDangerously' | 'put' | 'query' | 'queryStream' | 'remove' | 'request' | 'watchDocs';
|
|
18
|
+
export type ErrorOperation = 'get' | 'getAtRev' | 'getDBInfo' | 'headDB' | 'patch' | 'patchDangerously' | 'put' | 'query' | 'queryStream' | 'remove' | 'request' | 'watchDocs';
|
|
19
19
|
export declare const hasStatusCode: (error: unknown) => error is {
|
|
20
20
|
statusCode: number;
|
|
21
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.mts","sourceRoot":"","sources":["../../../../impl/utils/errors.mts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAGtE;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAMD,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,SAAS,GACT,WAAW,GACX,WAAW,GACX,WAAW,GACX,YAAY,GACZ,aAAa,CAAA;AAEjB,MAAM,MAAM,cAAc,GACtB,KAAK,GACL,UAAU,GACV,WAAW,GACX,OAAO,GACP,kBAAkB,GAClB,KAAK,GACL,OAAO,GACP,aAAa,GACb,QAAQ,GACR,SAAS,GACT,WAAW,CAAA;AAsCf,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI;IAAE,UAAU,EAAE,MAAM,CAAA;CAE3E,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,EAAE,SAAS,MAAM,YAKnE,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,aAAa,CAAA;IACvB,KAAK,CAAC,EAAE,OAAO,C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AG,aAAa,CAwCtC;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAKrD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RequestOptions } from '../../schema/request.mts';
|
|
2
|
-
export type HttpMethod = 'DELETE' | 'GET' | 'POST' | 'PUT';
|
|
2
|
+
export type HttpMethod = 'DELETE' | 'GET' | 'HEAD' | 'POST' | 'PUT';
|
|
3
3
|
type NativeFetchBody = RequestInit['body'];
|
|
4
4
|
export type FetchBody = NativeFetchBody | Record<string, unknown> | Array<unknown> | null | undefined;
|
|
5
5
|
export type FetchAuth = {
|
|
@@ -16,7 +16,7 @@ export type FetchRequestOptions = {
|
|
|
16
16
|
body?: FetchBody;
|
|
17
17
|
headers?: Record<string, string>;
|
|
18
18
|
method: HttpMethod;
|
|
19
|
-
operation?: 'get' | 'getAtRev' | 'getDBInfo' | 'patch' | 'patchDangerously' | 'put' | 'query' | 'queryStream' | 'remove' | 'request' | 'watchDocs';
|
|
19
|
+
operation?: 'get' | 'getAtRev' | 'getDBInfo' | 'headDB' | 'patch' | 'patchDangerously' | 'put' | 'query' | 'queryStream' | 'remove' | 'request' | 'watchDocs';
|
|
20
20
|
request?: RequestOptions;
|
|
21
21
|
signal?: AbortSignal;
|
|
22
22
|
url: string | URL;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.mts","sourceRoot":"","sources":["../../../../impl/utils/fetch.mts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAG9D,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"fetch.d.mts","sourceRoot":"","sources":["../../../../impl/utils/fetch.mts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAG9D,MAAM,MAAM,UAAU,GAAG,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CAAC,CAAC,CAkCzD"}
|
package/types/output/index.d.mts
CHANGED
|
@@ -11,10 +11,11 @@ import { remove } from './impl/remove.mts';
|
|
|
11
11
|
import { bulkSave, bulkSaveTransaction } from './impl/bulkSave.mts';
|
|
12
12
|
import { query } from './impl/query.mts';
|
|
13
13
|
import { getDBInfo } from './impl/getDBInfo.mts';
|
|
14
|
+
import { headDB } from './impl/headDB.mts';
|
|
14
15
|
import { bulkRemove, bulkRemoveMap } from './impl/bulkRemove.mts';
|
|
15
16
|
import { createLock, removeLock } from './impl/sugar/lock.mts';
|
|
16
17
|
import { watchDocs } from './impl/sugar/watch.mts';
|
|
17
|
-
export { get, getAtRev, put, remove, bulkGet, bulkSave, query, queryStream, getDBInfo, patch, patchDangerously, bulkRemove, bulkRemoveMap, bulkGetDictionary, bulkSaveTransaction, watchDocs, bindConfig, withRetry, QueryBuilder, createQuery, createLock, removeLock };
|
|
18
|
+
export { get, getAtRev, put, remove, bulkGet, bulkSave, query, queryStream, getDBInfo, headDB, patch, patchDangerously, bulkRemove, bulkRemoveMap, bulkGetDictionary, bulkSaveTransaction, watchDocs, bindConfig, withRetry, QueryBuilder, createQuery, createLock, removeLock };
|
|
18
19
|
export { ConflictError, HideABedError, NotFoundError, OperationError, RetryableError, ValidationError } from './impl/utils/errors.mts';
|
|
19
20
|
export type { BulkGetBound, BulkGetDictionaryBound, BulkGetDictionaryOptions, BulkGetDictionaryResult, BulkGetOptions, BulkGetResponse } from './impl/bulkGet.mts';
|
|
20
21
|
export type { OnInvalidDocAction } from './impl/utils/parseRows.mts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../index.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAA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