hide-a-bed 5.2.8 → 6.0.0
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/.prettierrc +7 -0
- package/README.md +270 -218
- package/dist/cjs/index.cjs +1952 -0
- package/dist/esm/index.mjs +1898 -0
- package/eslint.config.js +15 -0
- package/impl/bindConfig.mts +140 -0
- package/impl/bulkGet.mts +256 -0
- package/impl/bulkRemove.mts +98 -0
- package/impl/bulkSave.mts +286 -0
- package/impl/get.mts +137 -0
- package/impl/getDBInfo.mts +67 -0
- package/impl/patch.mts +134 -0
- package/impl/put.mts +56 -0
- package/impl/query.mts +224 -0
- package/impl/remove.mts +65 -0
- package/impl/retry.mts +66 -0
- package/impl/stream.mts +143 -0
- package/impl/sugar/lock.mts +103 -0
- package/impl/sugar/{watch.mjs → watch.mts} +56 -22
- package/impl/utils/errors.mts +130 -0
- package/impl/utils/logger.mts +62 -0
- package/impl/utils/mergeNeedleOpts.mts +16 -0
- package/impl/utils/parseRows.mts +117 -0
- package/impl/utils/queryBuilder.mts +173 -0
- package/impl/utils/queryString.mts +44 -0
- package/impl/{trackedEmitter.mjs → utils/trackedEmitter.mts} +9 -7
- package/impl/utils/transactionErrors.mts +71 -0
- package/index.mts +82 -0
- package/migration_guides/v6.md +70 -0
- package/package.json +49 -32
- package/schema/config.mts +81 -0
- package/schema/couch/couch.input.schema.ts +43 -0
- package/schema/couch/couch.output.schema.ts +169 -0
- package/schema/sugar/lock.mts +18 -0
- package/schema/sugar/watch.mts +14 -0
- package/schema/util.mts +8 -0
- package/tsconfig.json +10 -4
- package/tsdown.config.ts +16 -0
- package/typedoc.json +4 -0
- package/types/output/eslint.config.d.ts +3 -0
- package/types/output/eslint.config.d.ts.map +1 -0
- package/types/output/impl/bindConfig.d.mts +174 -0
- package/types/output/impl/bindConfig.d.mts.map +1 -0
- package/types/output/impl/bulkGet.d.mts +75 -0
- package/types/output/impl/bulkGet.d.mts.map +1 -0
- package/types/output/impl/bulkGet.test.d.mts +2 -0
- package/types/output/impl/bulkGet.test.d.mts.map +1 -0
- package/types/output/impl/bulkRemove.d.mts +63 -0
- package/types/output/impl/bulkRemove.d.mts.map +1 -0
- package/types/output/impl/bulkRemove.test.d.mts +2 -0
- package/types/output/impl/bulkRemove.test.d.mts.map +1 -0
- package/types/output/impl/bulkSave.d.mts +64 -0
- package/types/output/impl/bulkSave.d.mts.map +1 -0
- package/types/output/impl/bulkSave.test.d.mts +2 -0
- package/types/output/impl/bulkSave.test.d.mts.map +1 -0
- package/types/output/impl/get.d.mts +20 -0
- package/types/output/impl/get.d.mts.map +1 -0
- package/types/output/impl/get.test.d.mts +2 -0
- package/types/output/impl/get.test.d.mts.map +1 -0
- package/types/output/impl/getDBInfo.d.mts +52 -0
- package/types/output/impl/getDBInfo.d.mts.map +1 -0
- package/types/output/impl/getDBInfo.test.d.mts +2 -0
- package/types/output/impl/getDBInfo.test.d.mts.map +1 -0
- package/types/output/impl/patch.d.mts +45 -0
- package/types/output/impl/patch.d.mts.map +1 -0
- package/types/output/impl/patch.test.d.mts +2 -0
- package/types/output/impl/patch.test.d.mts.map +1 -0
- package/types/output/impl/put.d.mts +5 -0
- package/types/output/impl/put.d.mts.map +1 -0
- package/types/output/impl/put.test.d.mts +2 -0
- package/types/output/impl/put.test.d.mts.map +1 -0
- package/types/output/impl/query.d.mts +47 -0
- package/types/output/impl/query.d.mts.map +1 -0
- package/types/output/impl/query.test.d.mts +2 -0
- package/types/output/impl/query.test.d.mts.map +1 -0
- package/types/output/impl/remove.d.mts +9 -0
- package/types/output/impl/remove.d.mts.map +1 -0
- package/types/output/impl/remove.test.d.mts +2 -0
- package/types/output/impl/remove.test.d.mts.map +1 -0
- package/types/output/impl/retry.d.mts +32 -0
- package/types/output/impl/retry.d.mts.map +1 -0
- package/types/output/impl/retry.test.d.mts +2 -0
- package/types/output/impl/retry.test.d.mts.map +1 -0
- package/types/output/impl/stream.d.mts +13 -0
- package/types/output/impl/stream.d.mts.map +1 -0
- package/types/output/impl/stream.test.d.mts +2 -0
- package/types/output/impl/stream.test.d.mts.map +1 -0
- package/types/output/impl/sugar/lock.d.mts +24 -0
- package/types/output/impl/sugar/lock.d.mts.map +1 -0
- package/types/output/impl/sugar/lock.test.d.mts +2 -0
- package/types/output/impl/sugar/lock.test.d.mts.map +1 -0
- package/types/output/impl/sugar/watch.d.mts +21 -0
- package/types/output/impl/sugar/watch.d.mts.map +1 -0
- package/types/output/impl/sugar/watch.test.d.mts +2 -0
- package/types/output/impl/sugar/watch.test.d.mts.map +1 -0
- package/types/output/impl/utils/errors.d.mts +78 -0
- package/types/output/impl/utils/errors.d.mts.map +1 -0
- package/types/output/impl/utils/errors.test.d.mts +2 -0
- package/types/output/impl/utils/errors.test.d.mts.map +1 -0
- package/types/output/impl/utils/logger.d.mts +11 -0
- package/types/output/impl/utils/logger.d.mts.map +1 -0
- package/types/output/impl/utils/logger.test.d.mts +2 -0
- package/types/output/impl/utils/logger.test.d.mts.map +1 -0
- package/types/output/impl/utils/mergeNeedleOpts.d.mts +53 -0
- package/types/output/impl/utils/mergeNeedleOpts.d.mts.map +1 -0
- package/types/output/impl/utils/parseRows.d.mts +15 -0
- package/types/output/impl/utils/parseRows.d.mts.map +1 -0
- package/types/output/impl/utils/parseRows.test.d.mts +2 -0
- package/types/output/impl/utils/parseRows.test.d.mts.map +1 -0
- package/types/output/impl/utils/queryBuilder.d.mts +68 -0
- package/types/output/impl/utils/queryBuilder.d.mts.map +1 -0
- package/types/output/impl/utils/queryBuilder.test.d.mts +2 -0
- package/types/output/impl/utils/queryBuilder.test.d.mts.map +1 -0
- package/types/output/impl/utils/queryString.d.mts +9 -0
- package/types/output/impl/utils/queryString.d.mts.map +1 -0
- package/types/output/impl/utils/queryString.test.d.mts +2 -0
- package/types/output/impl/utils/queryString.test.d.mts.map +1 -0
- package/types/output/impl/utils/trackedEmitter.d.mts +7 -0
- package/types/output/impl/utils/trackedEmitter.d.mts.map +1 -0
- package/{impl → types/output/impl/utils}/transactionErrors.d.mts +16 -31
- package/types/output/impl/utils/transactionErrors.d.mts.map +1 -0
- package/types/output/index.d.mts +32 -0
- package/types/output/index.d.mts.map +1 -0
- package/types/output/index.test.d.mts +2 -0
- package/types/output/index.test.d.mts.map +1 -0
- package/types/output/schema/config.d.mts +90 -0
- package/types/output/schema/config.d.mts.map +1 -0
- package/types/output/schema/couch/couch.input.schema.d.ts +29 -0
- package/types/output/schema/couch/couch.input.schema.d.ts.map +1 -0
- package/types/output/schema/couch/couch.output.schema.d.ts +113 -0
- package/types/output/schema/couch/couch.output.schema.d.ts.map +1 -0
- package/types/output/schema/sugar/lock.d.mts +19 -0
- package/types/output/schema/sugar/lock.d.mts.map +1 -0
- package/types/output/schema/sugar/watch.d.mts +11 -0
- package/types/output/schema/sugar/watch.d.mts.map +1 -0
- package/types/output/schema/util.d.mts +85 -0
- package/types/output/schema/util.d.mts.map +1 -0
- package/types/output/tsdown.config.d.ts +3 -0
- package/types/output/tsdown.config.d.ts.map +1 -0
- package/types/output/types/standard-schema.d.ts +60 -0
- package/types/output/types/standard-schema.d.ts.map +1 -0
- package/types/standard-schema.ts +76 -0
- package/types/utils.d.ts +1 -0
- package/cjs/impl/bulk.cjs +0 -275
- package/cjs/impl/changes.cjs +0 -67
- package/cjs/impl/crud.cjs +0 -127
- package/cjs/impl/errors.cjs +0 -75
- package/cjs/impl/logger.cjs +0 -70
- package/cjs/impl/patch.cjs +0 -95
- package/cjs/impl/query.cjs +0 -116
- package/cjs/impl/queryBuilder.cjs +0 -163
- package/cjs/impl/retry.cjs +0 -55
- package/cjs/impl/stream.cjs +0 -121
- package/cjs/impl/sugar/lock.cjs +0 -81
- package/cjs/impl/sugar/watch.cjs +0 -159
- package/cjs/impl/trackedEmitter.cjs +0 -54
- package/cjs/impl/transactionErrors.cjs +0 -70
- package/cjs/impl/util.cjs +0 -64
- package/cjs/index.cjs +0 -132
- package/cjs/integration/changes.cjs +0 -76
- package/cjs/integration/disconnect-watch.cjs +0 -52
- package/cjs/integration/watch.cjs +0 -59
- package/cjs/schema/bind.cjs +0 -59
- package/cjs/schema/bulk.cjs +0 -92
- package/cjs/schema/changes.cjs +0 -68
- package/cjs/schema/config.cjs +0 -48
- package/cjs/schema/crud.cjs +0 -77
- package/cjs/schema/patch.cjs +0 -53
- package/cjs/schema/query.cjs +0 -62
- package/cjs/schema/stream.cjs +0 -42
- package/cjs/schema/sugar/lock.cjs +0 -59
- package/cjs/schema/sugar/watch.cjs +0 -42
- package/cjs/schema/util.cjs +0 -39
- package/config.json +0 -5
- package/docs/compiler.png +0 -0
- package/dualmode.config.json +0 -11
- package/impl/bulk.d.mts +0 -11
- package/impl/bulk.d.mts.map +0 -1
- package/impl/bulk.mjs +0 -291
- package/impl/changes.d.mts +0 -12
- package/impl/changes.d.mts.map +0 -1
- package/impl/changes.mjs +0 -53
- package/impl/crud.d.mts +0 -7
- package/impl/crud.d.mts.map +0 -1
- package/impl/crud.mjs +0 -108
- package/impl/errors.d.mts +0 -43
- package/impl/errors.d.mts.map +0 -1
- package/impl/errors.mjs +0 -65
- package/impl/logger.d.mts +0 -32
- package/impl/logger.d.mts.map +0 -1
- package/impl/logger.mjs +0 -59
- package/impl/patch.d.mts +0 -6
- package/impl/patch.d.mts.map +0 -1
- package/impl/patch.mjs +0 -88
- package/impl/query.d.mts +0 -195
- package/impl/query.d.mts.map +0 -1
- package/impl/query.mjs +0 -122
- package/impl/queryBuilder.d.mts +0 -154
- package/impl/queryBuilder.d.mts.map +0 -1
- package/impl/queryBuilder.mjs +0 -175
- package/impl/retry.d.mts +0 -2
- package/impl/retry.d.mts.map +0 -1
- package/impl/retry.mjs +0 -39
- package/impl/stream.d.mts +0 -3
- package/impl/stream.d.mts.map +0 -1
- package/impl/stream.mjs +0 -98
- package/impl/sugar/lock.d.mts +0 -5
- package/impl/sugar/lock.d.mts.map +0 -1
- package/impl/sugar/lock.mjs +0 -70
- package/impl/sugar/watch.d.mts +0 -34
- package/impl/sugar/watch.d.mts.map +0 -1
- package/impl/trackedEmitter.d.mts +0 -8
- package/impl/trackedEmitter.d.mts.map +0 -1
- package/impl/transactionErrors.d.mts.map +0 -1
- package/impl/transactionErrors.mjs +0 -47
- package/impl/util.d.mts +0 -3
- package/impl/util.d.mts.map +0 -1
- package/impl/util.mjs +0 -35
- package/index.d.mts +0 -80
- package/index.d.mts.map +0 -1
- package/index.mjs +0 -141
- package/integration/changes.mjs +0 -60
- package/integration/disconnect-watch.mjs +0 -36
- package/integration/watch.mjs +0 -40
- package/schema/bind.d.mts +0 -5461
- package/schema/bind.d.mts.map +0 -1
- package/schema/bind.mjs +0 -43
- package/schema/bulk.d.mts +0 -923
- package/schema/bulk.d.mts.map +0 -1
- package/schema/bulk.mjs +0 -83
- package/schema/changes.d.mts +0 -191
- package/schema/changes.d.mts.map +0 -1
- package/schema/changes.mjs +0 -59
- package/schema/config.d.mts +0 -79
- package/schema/config.d.mts.map +0 -1
- package/schema/config.mjs +0 -26
- package/schema/crud.d.mts +0 -491
- package/schema/crud.d.mts.map +0 -1
- package/schema/crud.mjs +0 -64
- package/schema/patch.d.mts +0 -255
- package/schema/patch.d.mts.map +0 -1
- package/schema/patch.mjs +0 -42
- package/schema/query.d.mts +0 -406
- package/schema/query.d.mts.map +0 -1
- package/schema/query.mjs +0 -45
- package/schema/stream.d.mts +0 -211
- package/schema/stream.d.mts.map +0 -1
- package/schema/stream.mjs +0 -23
- package/schema/sugar/lock.d.mts +0 -238
- package/schema/sugar/lock.d.mts.map +0 -1
- package/schema/sugar/lock.mjs +0 -50
- package/schema/sugar/watch.d.mts +0 -127
- package/schema/sugar/watch.d.mts.map +0 -1
- package/schema/sugar/watch.mjs +0 -29
- package/schema/util.d.mts +0 -160
- package/schema/util.d.mts.map +0 -1
- package/schema/util.mjs +0 -35
- package/types/changes-stream.d.ts +0 -11
package/cjs/schema/bind.cjs
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var bind_exports = {};
|
|
20
|
-
__export(bind_exports, {
|
|
21
|
-
Bind: () => Bind,
|
|
22
|
-
BindBase: () => BindBase,
|
|
23
|
-
BindReturns: () => BindReturns
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(bind_exports);
|
|
26
|
-
var import_zod = require("zod");
|
|
27
|
-
var import_config = require("./config.cjs");
|
|
28
|
-
var import_bulk = require("./bulk.cjs");
|
|
29
|
-
var import_crud = require("./crud.cjs");
|
|
30
|
-
var import_patch = require("./patch.cjs");
|
|
31
|
-
var import_query = require("./query.cjs");
|
|
32
|
-
var import_stream = require("./stream.cjs");
|
|
33
|
-
var import_lock = require("./sugar/lock.cjs");
|
|
34
|
-
var import_changes = require("./changes.cjs");
|
|
35
|
-
var import_watch = require("./sugar/watch.cjs");
|
|
36
|
-
var import_util = require("./util.cjs");
|
|
37
|
-
const BindBase = import_zod.z.object({
|
|
38
|
-
bulkGet: import_bulk.BulkGetBound,
|
|
39
|
-
bulkSave: import_bulk.BulkSaveBound,
|
|
40
|
-
bulkRemove: import_bulk.BulkRemoveBound,
|
|
41
|
-
bulkGetDictionary: import_bulk.BulkGetDictionaryBound,
|
|
42
|
-
bulkSaveTransaction: import_bulk.BulkSaveTransactionBound,
|
|
43
|
-
get: import_crud.CouchGetBound,
|
|
44
|
-
getAtRev: import_crud.CouchGetAtRevBound,
|
|
45
|
-
put: import_crud.CouchPutBound,
|
|
46
|
-
patch: import_patch.PatchBound,
|
|
47
|
-
query: import_query.SimpleViewQueryBound,
|
|
48
|
-
queryStream: import_stream.SimpleViewQueryStreamBound,
|
|
49
|
-
createLock: import_lock.CreateLockBound,
|
|
50
|
-
removeLock: import_lock.RemoveLockBound,
|
|
51
|
-
changes: import_changes.ChangesBound,
|
|
52
|
-
watchDocs: import_watch.WatchDocsBound,
|
|
53
|
-
getDBInfo: import_util.GetDBInfoBound
|
|
54
|
-
});
|
|
55
|
-
const RebindOptions = import_config.CouchConfig.omit({ couch: true });
|
|
56
|
-
const BindReturns = BindBase.extend({
|
|
57
|
-
options: import_zod.z.function().args(RebindOptions).returns(BindBase)
|
|
58
|
-
});
|
|
59
|
-
const Bind = import_zod.z.function().args(import_config.CouchConfig).returns(BindReturns);
|
package/cjs/schema/bulk.cjs
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var bulk_exports = {};
|
|
20
|
-
__export(bulk_exports, {
|
|
21
|
-
BulkGet: () => BulkGet,
|
|
22
|
-
BulkGetBound: () => BulkGetBound,
|
|
23
|
-
BulkGetDictionary: () => BulkGetDictionary,
|
|
24
|
-
BulkGetDictionaryBound: () => BulkGetDictionaryBound,
|
|
25
|
-
BulkGetDictionaryResponse: () => BulkGetDictionaryResponse,
|
|
26
|
-
BulkRemove: () => BulkRemove,
|
|
27
|
-
BulkRemoveBound: () => BulkRemoveBound,
|
|
28
|
-
BulkSave: () => BulkSave,
|
|
29
|
-
BulkSaveBound: () => BulkSaveBound,
|
|
30
|
-
BulkSaveResponseSchema: () => BulkSaveResponseSchema,
|
|
31
|
-
BulkSaveRow: () => BulkSaveRow,
|
|
32
|
-
BulkSaveTransaction: () => BulkSaveTransaction,
|
|
33
|
-
BulkSaveTransactionBound: () => BulkSaveTransactionBound,
|
|
34
|
-
OptionalIdCouchDoc: () => OptionalIdCouchDoc
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(bulk_exports);
|
|
37
|
-
var import_zod = require("zod");
|
|
38
|
-
var import_config = require("./config.cjs");
|
|
39
|
-
var import_query = require("./query.cjs");
|
|
40
|
-
var import_crud = require("./crud.cjs");
|
|
41
|
-
const BulkSaveRow = import_zod.z.object({
|
|
42
|
-
ok: import_zod.z.boolean().nullish(),
|
|
43
|
-
id: import_zod.z.string().nullish(),
|
|
44
|
-
rev: import_zod.z.string().nullish(),
|
|
45
|
-
error: import_zod.z.string().nullish().describe("if an error occured, one word reason, eg conflict"),
|
|
46
|
-
reason: import_zod.z.string().nullish().describe("a full error message")
|
|
47
|
-
});
|
|
48
|
-
const BulkSaveResponseSchema = import_zod.z.array(BulkSaveRow);
|
|
49
|
-
const OptionalIdCouchDoc = import_crud.CouchDoc.extend({
|
|
50
|
-
_id: import_crud.CouchDoc.shape._id.optional()
|
|
51
|
-
});
|
|
52
|
-
const BulkSave = import_zod.z.function().args(
|
|
53
|
-
import_config.CouchConfig,
|
|
54
|
-
import_zod.z.array(OptionalIdCouchDoc)
|
|
55
|
-
).returns(import_zod.z.promise(BulkSaveResponseSchema));
|
|
56
|
-
const BulkSaveBound = import_zod.z.function().args(
|
|
57
|
-
import_zod.z.array(OptionalIdCouchDoc)
|
|
58
|
-
).returns(import_zod.z.promise(BulkSaveResponseSchema));
|
|
59
|
-
const BulkGet = import_zod.z.function().args(
|
|
60
|
-
import_config.CouchConfig,
|
|
61
|
-
import_zod.z.array(import_zod.z.string().describe("the ids to get"))
|
|
62
|
-
).returns(import_zod.z.promise(import_query.SimpleViewQueryResponse));
|
|
63
|
-
const BulkGetBound = import_zod.z.function().args(
|
|
64
|
-
import_zod.z.array(import_zod.z.string().describe("the ids to get"))
|
|
65
|
-
).returns(import_zod.z.promise(import_query.SimpleViewQueryResponse));
|
|
66
|
-
const BulkRemove = import_zod.z.function().args(
|
|
67
|
-
import_config.CouchConfig,
|
|
68
|
-
import_zod.z.array(import_zod.z.string().describe("the ids to delete"))
|
|
69
|
-
).returns(import_zod.z.promise(BulkSaveResponseSchema));
|
|
70
|
-
const BulkRemoveBound = import_zod.z.function().args(
|
|
71
|
-
import_zod.z.array(import_zod.z.string().describe("the ids to delete"))
|
|
72
|
-
).returns(import_zod.z.promise(BulkSaveResponseSchema));
|
|
73
|
-
const BulkGetDictionaryResponse = import_zod.z.object({
|
|
74
|
-
found: import_zod.z.record(import_zod.z.string(), import_crud.CouchDoc),
|
|
75
|
-
notFound: import_zod.z.record(import_zod.z.string(), import_query.ViewRow)
|
|
76
|
-
});
|
|
77
|
-
const BulkGetDictionary = import_zod.z.function().args(
|
|
78
|
-
import_config.CouchConfig,
|
|
79
|
-
import_zod.z.array(import_zod.z.string().describe("the ids to get"))
|
|
80
|
-
).returns(import_zod.z.promise(BulkGetDictionaryResponse));
|
|
81
|
-
const BulkGetDictionaryBound = import_zod.z.function().args(
|
|
82
|
-
import_zod.z.array(import_zod.z.string().describe("the ids to get"))
|
|
83
|
-
).returns(import_zod.z.promise(BulkGetDictionaryResponse));
|
|
84
|
-
const BulkSaveTransaction = import_zod.z.function().args(
|
|
85
|
-
import_config.CouchConfig,
|
|
86
|
-
import_zod.z.string().describe("transaction id"),
|
|
87
|
-
import_zod.z.array(import_crud.CouchDoc)
|
|
88
|
-
).returns(import_zod.z.promise(BulkSaveResponseSchema));
|
|
89
|
-
const BulkSaveTransactionBound = import_zod.z.function().args(
|
|
90
|
-
import_zod.z.string().describe("transaction id"),
|
|
91
|
-
import_zod.z.array(import_crud.CouchDoc)
|
|
92
|
-
).returns(import_zod.z.promise(BulkSaveResponseSchema));
|
package/cjs/schema/changes.cjs
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var changes_exports = {};
|
|
20
|
-
__export(changes_exports, {
|
|
21
|
-
Changes: () => Changes,
|
|
22
|
-
ChangesBound: () => ChangesBound,
|
|
23
|
-
ChangesEmitter: () => ChangesEmitter,
|
|
24
|
-
ChangesOptions: () => ChangesOptions,
|
|
25
|
-
ChangesResponse: () => ChangesResponse
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(changes_exports);
|
|
28
|
-
var import_zod = require("zod");
|
|
29
|
-
var import_config = require("./config.cjs");
|
|
30
|
-
var import_crud = require("./crud.cjs");
|
|
31
|
-
const ChangesOptions = import_zod.z.object({
|
|
32
|
-
feed: import_zod.z.enum(["continuous", "longpoll"]).default("continuous"),
|
|
33
|
-
filter: import_zod.z.any(),
|
|
34
|
-
// z.union([z.string(), z.array()]).optional(),
|
|
35
|
-
inactivity_ms: import_zod.z.number().default(60 * 60 * 1e3),
|
|
36
|
-
/** @type {number} */
|
|
37
|
-
timeout: import_zod.z.number().optional(),
|
|
38
|
-
requestTimeout: import_zod.z.number().default(2 * 60 * 1e3),
|
|
39
|
-
since: import_zod.z.union([import_zod.z.number(), import_zod.z.literal("now")]).default(0),
|
|
40
|
-
heartbeat: import_zod.z.number().default(30 * 1e3),
|
|
41
|
-
style: import_zod.z.enum(["main_only", "all_docs"]).default("main_only"),
|
|
42
|
-
include_docs: import_zod.z.boolean().default(false),
|
|
43
|
-
query_params: import_zod.z.record(import_zod.z.any()).default({}),
|
|
44
|
-
use_post: import_zod.z.boolean().default(false)
|
|
45
|
-
}).partial();
|
|
46
|
-
const ChangesResponse = import_zod.z.object({
|
|
47
|
-
id: import_zod.z.string(),
|
|
48
|
-
seq: import_zod.z.number(),
|
|
49
|
-
changes: import_zod.z.array(import_zod.z.object({
|
|
50
|
-
rev: import_zod.z.string()
|
|
51
|
-
})),
|
|
52
|
-
doc: import_crud.CouchDoc.nullish().optional(),
|
|
53
|
-
deleted: import_zod.z.boolean().optional()
|
|
54
|
-
});
|
|
55
|
-
const ChangesEmitter = import_zod.z.object({
|
|
56
|
-
on: import_zod.z.function().args(import_zod.z.string(), import_zod.z.function().args(import_zod.z.any()).returns(import_zod.z.void())).returns(import_zod.z.any()),
|
|
57
|
-
removeListener: import_zod.z.function().args(import_zod.z.string(), import_zod.z.function().args(import_zod.z.any()).returns(import_zod.z.void())).returns(import_zod.z.any()),
|
|
58
|
-
stop: import_zod.z.function().returns(import_zod.z.void())
|
|
59
|
-
});
|
|
60
|
-
const Changes = import_zod.z.function().args(
|
|
61
|
-
import_config.CouchConfig,
|
|
62
|
-
import_zod.z.function().args(import_zod.z.any()).returns(import_zod.z.void()),
|
|
63
|
-
ChangesOptions
|
|
64
|
-
).returns(import_zod.z.promise(ChangesEmitter));
|
|
65
|
-
const ChangesBound = import_zod.z.function().args(
|
|
66
|
-
import_zod.z.function().args(import_zod.z.any()).returns(import_zod.z.void()),
|
|
67
|
-
ChangesOptions
|
|
68
|
-
).returns(import_zod.z.promise(ChangesEmitter));
|
package/cjs/schema/config.cjs
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var config_exports = {};
|
|
20
|
-
__export(config_exports, {
|
|
21
|
-
CouchConfig: () => CouchConfig
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(config_exports);
|
|
24
|
-
var import_zod = require("zod");
|
|
25
|
-
const LoggerSchema = import_zod.z.object({
|
|
26
|
-
error: import_zod.z.function().args(import_zod.z.any()).returns(import_zod.z.void()).optional(),
|
|
27
|
-
warn: import_zod.z.function().args(import_zod.z.any()).returns(import_zod.z.void()).optional(),
|
|
28
|
-
info: import_zod.z.function().args(import_zod.z.any()).returns(import_zod.z.void()).optional(),
|
|
29
|
-
debug: import_zod.z.function().args(import_zod.z.any()).returns(import_zod.z.void()).optional()
|
|
30
|
-
}).or(import_zod.z.function().args(
|
|
31
|
-
import_zod.z.string(),
|
|
32
|
-
// level
|
|
33
|
-
import_zod.z.any()
|
|
34
|
-
// message/args
|
|
35
|
-
).returns(import_zod.z.void()));
|
|
36
|
-
const CouchConfig = import_zod.z.object({
|
|
37
|
-
throwOnGetNotFound: import_zod.z.boolean().optional().default(false).describe("if a get is 404 should we throw or return undefined"),
|
|
38
|
-
couch: import_zod.z.string().describe("the url of the couch db"),
|
|
39
|
-
bindWithRetry: import_zod.z.boolean().optional().default(true).describe("should we bind with retry"),
|
|
40
|
-
maxRetries: import_zod.z.number().optional().default(3).describe("maximum number of retry attempts"),
|
|
41
|
-
initialDelay: import_zod.z.number().optional().default(1e3).describe("initial retry delay in milliseconds"),
|
|
42
|
-
backoffFactor: import_zod.z.number().optional().default(2).describe("multiplier for exponential backoff"),
|
|
43
|
-
useConsoleLogger: import_zod.z.boolean().optional().default(false).describe("turn on console as a fallback logger"),
|
|
44
|
-
logger: LoggerSchema.optional().describe("logging interface supporting winston-like or simple function interface"),
|
|
45
|
-
// _emitter: z.any().optional().describe('emitter for events'),
|
|
46
|
-
_normalizedLogger: import_zod.z.any().optional()
|
|
47
|
-
// Internal property for caching normalized logger
|
|
48
|
-
}).passthrough().describe("The std config object");
|
package/cjs/schema/crud.cjs
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var crud_exports = {};
|
|
20
|
-
__export(crud_exports, {
|
|
21
|
-
CouchDoc: () => CouchDoc,
|
|
22
|
-
CouchDocResponse: () => CouchDocResponse,
|
|
23
|
-
CouchGet: () => CouchGet,
|
|
24
|
-
CouchGetAtRev: () => CouchGetAtRev,
|
|
25
|
-
CouchGetAtRevBound: () => CouchGetAtRevBound,
|
|
26
|
-
CouchGetBound: () => CouchGetBound,
|
|
27
|
-
CouchGetOptions: () => CouchGetOptions,
|
|
28
|
-
CouchGetWithOptions: () => CouchGetWithOptions,
|
|
29
|
-
CouchPut: () => CouchPut,
|
|
30
|
-
CouchPutBound: () => CouchPutBound
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(crud_exports);
|
|
33
|
-
var import_zod = require("zod");
|
|
34
|
-
var import_config = require("./config.cjs");
|
|
35
|
-
const CouchDoc = import_zod.z.object({
|
|
36
|
-
_id: import_zod.z.string().describe("the couch doc id"),
|
|
37
|
-
_rev: import_zod.z.string().optional().nullish().describe("the doc revision"),
|
|
38
|
-
_deleted: import_zod.z.boolean().optional().describe("is the doc deleted")
|
|
39
|
-
}).passthrough();
|
|
40
|
-
const CouchDocResponse = import_zod.z.object({
|
|
41
|
-
ok: import_zod.z.boolean().optional().describe("did the request succeed"),
|
|
42
|
-
error: import_zod.z.string().optional().describe("the error message, if did not succed"),
|
|
43
|
-
statusCode: import_zod.z.number(),
|
|
44
|
-
id: import_zod.z.string().optional().describe("the couch doc id"),
|
|
45
|
-
rev: import_zod.z.string().optional().describe("the new rev of the doc")
|
|
46
|
-
});
|
|
47
|
-
const CouchPut = import_zod.z.function().args(
|
|
48
|
-
import_config.CouchConfig,
|
|
49
|
-
CouchDoc
|
|
50
|
-
).returns(import_zod.z.promise(CouchDocResponse));
|
|
51
|
-
const CouchPutBound = import_zod.z.function().args(
|
|
52
|
-
CouchDoc
|
|
53
|
-
).returns(import_zod.z.promise(CouchDocResponse));
|
|
54
|
-
const CouchGet = import_zod.z.function().args(
|
|
55
|
-
import_config.CouchConfig,
|
|
56
|
-
import_zod.z.string().describe("the couch doc id")
|
|
57
|
-
).returns(import_zod.z.promise(CouchDoc.nullable()));
|
|
58
|
-
const CouchGetBound = import_zod.z.function().args(
|
|
59
|
-
import_zod.z.string().describe("the couch doc id")
|
|
60
|
-
).returns(import_zod.z.promise(CouchDoc.nullable()));
|
|
61
|
-
const CouchGetAtRev = import_zod.z.function().args(
|
|
62
|
-
import_config.CouchConfig,
|
|
63
|
-
import_zod.z.string().describe("the couch doc id"),
|
|
64
|
-
import_zod.z.string().describe("the rev")
|
|
65
|
-
).returns(import_zod.z.promise(CouchDoc.nullable()));
|
|
66
|
-
const CouchGetAtRevBound = import_zod.z.function().args(
|
|
67
|
-
import_zod.z.string().describe("the couch doc id"),
|
|
68
|
-
import_zod.z.string().describe("the rev")
|
|
69
|
-
).returns(import_zod.z.promise(CouchDoc.nullable()));
|
|
70
|
-
const CouchGetOptions = import_zod.z.object({
|
|
71
|
-
rev: import_zod.z.string().optional().describe("the couch doc revision")
|
|
72
|
-
});
|
|
73
|
-
const CouchGetWithOptions = import_zod.z.function().args(
|
|
74
|
-
import_config.CouchConfig,
|
|
75
|
-
import_zod.z.string().describe("the couch doc id"),
|
|
76
|
-
CouchGetOptions
|
|
77
|
-
).returns(import_zod.z.promise(CouchDoc.nullable()));
|
package/cjs/schema/patch.cjs
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var patch_exports = {};
|
|
20
|
-
__export(patch_exports, {
|
|
21
|
-
Patch: () => Patch,
|
|
22
|
-
PatchBound: () => PatchBound,
|
|
23
|
-
PatchDangerously: () => PatchDangerously,
|
|
24
|
-
PatchDangerouslyBound: () => PatchDangerouslyBound,
|
|
25
|
-
PatchProperties: () => PatchProperties,
|
|
26
|
-
StrictPatchProperties: () => StrictPatchProperties
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(patch_exports);
|
|
29
|
-
var import_zod = require("zod");
|
|
30
|
-
var import_config = require("./config.cjs");
|
|
31
|
-
var import_crud = require("./crud.cjs");
|
|
32
|
-
const PatchProperties = import_zod.z.record(import_zod.z.string(), import_zod.z.any());
|
|
33
|
-
const StrictPatchProperties = import_zod.z.object({
|
|
34
|
-
_rev: import_zod.z.string()
|
|
35
|
-
}).and(PatchProperties);
|
|
36
|
-
const Patch = import_zod.z.function().args(
|
|
37
|
-
import_config.CouchConfig,
|
|
38
|
-
import_zod.z.string().describe("the couch doc id"),
|
|
39
|
-
StrictPatchProperties
|
|
40
|
-
).returns(import_zod.z.promise(import_crud.CouchDocResponse));
|
|
41
|
-
const PatchBound = import_zod.z.function().args(
|
|
42
|
-
import_zod.z.string().describe("the couch doc id"),
|
|
43
|
-
StrictPatchProperties
|
|
44
|
-
).returns(import_zod.z.promise(import_crud.CouchDocResponse));
|
|
45
|
-
const PatchDangerously = import_zod.z.function().args(
|
|
46
|
-
import_config.CouchConfig,
|
|
47
|
-
import_zod.z.string().describe("the couch doc id"),
|
|
48
|
-
PatchProperties
|
|
49
|
-
).returns(import_zod.z.promise(import_crud.CouchDocResponse));
|
|
50
|
-
const PatchDangerouslyBound = import_zod.z.function().args(
|
|
51
|
-
import_zod.z.string().describe("the couch doc id"),
|
|
52
|
-
PatchProperties
|
|
53
|
-
).returns(import_zod.z.promise(import_crud.CouchDocResponse));
|
package/cjs/schema/query.cjs
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var query_exports = {};
|
|
20
|
-
__export(query_exports, {
|
|
21
|
-
SimpleViewOptions: () => SimpleViewOptions,
|
|
22
|
-
SimpleViewQuery: () => SimpleViewQuery,
|
|
23
|
-
SimpleViewQueryBound: () => SimpleViewQueryBound,
|
|
24
|
-
SimpleViewQueryResponse: () => SimpleViewQueryResponse,
|
|
25
|
-
ViewRow: () => ViewRow
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(query_exports);
|
|
28
|
-
var import_zod = require("zod");
|
|
29
|
-
var import_config = require("./config.cjs");
|
|
30
|
-
const ViewRow = import_zod.z.object({
|
|
31
|
-
id: import_zod.z.string().optional(),
|
|
32
|
-
key: import_zod.z.any().nullable(),
|
|
33
|
-
value: import_zod.z.any().nullable(),
|
|
34
|
-
doc: import_zod.z.object({}).passthrough().optional().nullish(),
|
|
35
|
-
error: import_zod.z.string().optional().describe("usually not_found, if something is wrong with this doc")
|
|
36
|
-
});
|
|
37
|
-
const SimpleViewQueryResponse = import_zod.z.object({
|
|
38
|
-
error: import_zod.z.string().optional().describe("if something is wrong"),
|
|
39
|
-
rows: import_zod.z.array(ViewRow)
|
|
40
|
-
}).passthrough();
|
|
41
|
-
const SimpleViewOptions = import_zod.z.object({
|
|
42
|
-
startkey: import_zod.z.any().optional(),
|
|
43
|
-
endkey: import_zod.z.any().optional(),
|
|
44
|
-
descending: import_zod.z.boolean().optional().describe("sort results descending"),
|
|
45
|
-
skip: import_zod.z.number().nonnegative().optional().describe("skip this many rows"),
|
|
46
|
-
limit: import_zod.z.number().nonnegative().optional().describe("limit the results to this many rows"),
|
|
47
|
-
key: import_zod.z.any().optional(),
|
|
48
|
-
keys: import_zod.z.array(import_zod.z.any()).optional(),
|
|
49
|
-
include_docs: import_zod.z.boolean().optional().describe("join the id to the doc and return it"),
|
|
50
|
-
reduce: import_zod.z.boolean().optional().describe("reduce the results"),
|
|
51
|
-
group: import_zod.z.boolean().optional().describe("group the results"),
|
|
52
|
-
group_level: import_zod.z.number().positive().optional().describe("group the results at this level")
|
|
53
|
-
}).optional().describe("query options");
|
|
54
|
-
const SimpleViewQuery = import_zod.z.function().args(
|
|
55
|
-
import_config.CouchConfig,
|
|
56
|
-
import_zod.z.string().describe("the view name"),
|
|
57
|
-
SimpleViewOptions
|
|
58
|
-
).returns(import_zod.z.promise(SimpleViewQueryResponse));
|
|
59
|
-
const SimpleViewQueryBound = import_zod.z.function().args(
|
|
60
|
-
import_zod.z.string().describe("the view name"),
|
|
61
|
-
SimpleViewOptions
|
|
62
|
-
).returns(import_zod.z.promise(SimpleViewQueryResponse));
|
package/cjs/schema/stream.cjs
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var stream_exports = {};
|
|
20
|
-
__export(stream_exports, {
|
|
21
|
-
OnRow: () => OnRow,
|
|
22
|
-
SimpleViewQueryStream: () => SimpleViewQueryStream,
|
|
23
|
-
SimpleViewQueryStreamBound: () => SimpleViewQueryStreamBound
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(stream_exports);
|
|
26
|
-
var import_zod = require("zod");
|
|
27
|
-
var import_config = require("./config.cjs");
|
|
28
|
-
var import_query = require("./query.cjs");
|
|
29
|
-
const OnRow = import_zod.z.function().args(
|
|
30
|
-
import_query.ViewRow
|
|
31
|
-
);
|
|
32
|
-
const SimpleViewQueryStream = import_zod.z.function().args(
|
|
33
|
-
import_config.CouchConfig,
|
|
34
|
-
import_zod.z.string().describe("the view name"),
|
|
35
|
-
import_query.SimpleViewOptions,
|
|
36
|
-
OnRow
|
|
37
|
-
).returns(import_zod.z.promise(import_zod.z.undefined()));
|
|
38
|
-
const SimpleViewQueryStreamBound = import_zod.z.function().args(
|
|
39
|
-
import_zod.z.string().describe("the view name"),
|
|
40
|
-
import_query.SimpleViewOptions,
|
|
41
|
-
OnRow
|
|
42
|
-
).returns(import_zod.z.promise(import_zod.z.undefined()));
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var lock_exports = {};
|
|
20
|
-
__export(lock_exports, {
|
|
21
|
-
CreateLock: () => CreateLock,
|
|
22
|
-
CreateLockBound: () => CreateLockBound,
|
|
23
|
-
Lock: () => Lock,
|
|
24
|
-
LockOptions: () => LockOptions,
|
|
25
|
-
RemoveLock: () => RemoveLock,
|
|
26
|
-
RemoveLockBound: () => RemoveLockBound
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(lock_exports);
|
|
29
|
-
var import_zod = require("zod");
|
|
30
|
-
var import_config = require("../config.cjs");
|
|
31
|
-
var import_crud = require("../crud.cjs");
|
|
32
|
-
const Lock = import_crud.CouchDoc.extend({
|
|
33
|
-
type: import_zod.z.literal("lock"),
|
|
34
|
-
locks: import_zod.z.string().describe("the document ID being locked"),
|
|
35
|
-
lockedAt: import_zod.z.string().describe("ISO timestamp when lock was created"),
|
|
36
|
-
lockedBy: import_zod.z.string().describe("username of who created the lock")
|
|
37
|
-
});
|
|
38
|
-
const LockOptions = import_zod.z.object({
|
|
39
|
-
enableLocking: import_zod.z.boolean().default(true).describe("whether locking is enabled"),
|
|
40
|
-
username: import_zod.z.string().describe("username to attribute locks to")
|
|
41
|
-
});
|
|
42
|
-
const CreateLock = import_zod.z.function().args(
|
|
43
|
-
import_config.CouchConfig,
|
|
44
|
-
import_zod.z.string().describe("document ID to lock"),
|
|
45
|
-
LockOptions
|
|
46
|
-
).returns(import_zod.z.promise(import_zod.z.boolean()));
|
|
47
|
-
const CreateLockBound = import_zod.z.function().args(
|
|
48
|
-
import_zod.z.string().describe("document ID to lock"),
|
|
49
|
-
LockOptions
|
|
50
|
-
).returns(import_zod.z.promise(import_zod.z.boolean()));
|
|
51
|
-
const RemoveLock = import_zod.z.function().args(
|
|
52
|
-
import_config.CouchConfig,
|
|
53
|
-
import_zod.z.string().describe("document ID to unlock"),
|
|
54
|
-
LockOptions
|
|
55
|
-
).returns(import_zod.z.promise(import_zod.z.void()));
|
|
56
|
-
const RemoveLockBound = import_zod.z.function().args(
|
|
57
|
-
import_zod.z.string().describe("document ID to unlock"),
|
|
58
|
-
LockOptions
|
|
59
|
-
).returns(import_zod.z.promise(import_zod.z.void()));
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var watch_exports = {};
|
|
20
|
-
__export(watch_exports, {
|
|
21
|
-
WatchDocs: () => WatchDocs,
|
|
22
|
-
WatchDocsBound: () => WatchDocsBound,
|
|
23
|
-
WatchOptions: () => WatchOptions
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(watch_exports);
|
|
26
|
-
var import_zod = require("zod");
|
|
27
|
-
var import_config = require("../config.cjs");
|
|
28
|
-
var import_changes = require("../changes.cjs");
|
|
29
|
-
const WatchOptions = import_zod.z.object({
|
|
30
|
-
include_docs: import_zod.z.boolean().default(false)
|
|
31
|
-
}).partial();
|
|
32
|
-
const WatchDocs = import_zod.z.function().args(
|
|
33
|
-
import_config.CouchConfig,
|
|
34
|
-
import_zod.z.union([import_zod.z.string(), import_zod.z.array(import_zod.z.string())]),
|
|
35
|
-
import_zod.z.function().args(import_zod.z.any()).returns(import_zod.z.void()),
|
|
36
|
-
WatchOptions
|
|
37
|
-
).returns(import_changes.ChangesEmitter);
|
|
38
|
-
const WatchDocsBound = import_zod.z.function().args(
|
|
39
|
-
import_zod.z.union([import_zod.z.string(), import_zod.z.array(import_zod.z.string())]),
|
|
40
|
-
import_zod.z.function().args(import_zod.z.any()).returns(import_zod.z.void()),
|
|
41
|
-
WatchOptions
|
|
42
|
-
).returns(import_changes.ChangesEmitter);
|
package/cjs/schema/util.cjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var util_exports = {};
|
|
20
|
-
__export(util_exports, {
|
|
21
|
-
DBInfo: () => DBInfo,
|
|
22
|
-
GetDBInfo: () => GetDBInfo,
|
|
23
|
-
GetDBInfoBound: () => GetDBInfoBound
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(util_exports);
|
|
26
|
-
var import_zod = require("zod");
|
|
27
|
-
var import_config = require("./config.cjs");
|
|
28
|
-
const DBInfo = import_zod.z.object({
|
|
29
|
-
db_name: import_zod.z.string(),
|
|
30
|
-
doc_count: import_zod.z.number(),
|
|
31
|
-
update_seq: import_zod.z.number(),
|
|
32
|
-
compact_running: import_zod.z.boolean().nullish(),
|
|
33
|
-
disk_size: import_zod.z.number().nullish(),
|
|
34
|
-
committed_update_seq: import_zod.z.number().nullish()
|
|
35
|
-
}).passthrough();
|
|
36
|
-
const GetDBInfo = import_zod.z.function().args(
|
|
37
|
-
import_config.CouchConfig
|
|
38
|
-
).returns(import_zod.z.promise(DBInfo));
|
|
39
|
-
const GetDBInfoBound = import_zod.z.function().args().returns(import_zod.z.promise(DBInfo));
|
package/config.json
DELETED
package/docs/compiler.png
DELETED
|
Binary file
|