couchdb-web-node-plugin 1.0.736 → 1.0.737
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/helper.js +1 -1
- package/index.js +1 -1
- package/package.json +22 -3
- package/type.d.ts +16 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "couchdb-web-node-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.737",
|
|
4
4
|
"description": "A couchdb server, model instance conflict handler, rest api, authentication, session management, schema validator and model relation guarantee for webNode.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"@babel/runtime": "^7.27.0",
|
|
70
70
|
"@stylistic/eslint-plugin-ts": "^4.2.0",
|
|
71
71
|
"@types/ejs": "^3.1.5",
|
|
72
|
+
"@types/express": "^5.0.1",
|
|
72
73
|
"@types/node": "^22.13.14",
|
|
73
74
|
"@types/pouchdb-node": "^6.1.7",
|
|
74
75
|
"@typescript-eslint/eslint-plugin": "^8.29.0",
|
|
@@ -78,6 +79,8 @@
|
|
|
78
79
|
"eslint": "^9.23.0",
|
|
79
80
|
"eslint-config-google": "^0.14.0",
|
|
80
81
|
"eslint-plugin-jsdoc": "^50.6.9",
|
|
82
|
+
"express": "^5.1.0",
|
|
83
|
+
"express-pouchdb": "^4.2.0",
|
|
81
84
|
"jest": "^29.7.0",
|
|
82
85
|
"jsdoc": "^4.0.4",
|
|
83
86
|
"node-fetch": "^3.3.2",
|
|
@@ -89,6 +92,8 @@
|
|
|
89
92
|
"peerDependencies": {
|
|
90
93
|
"@babel/runtime": "*",
|
|
91
94
|
"clientnode": "*",
|
|
95
|
+
"express": "*",
|
|
96
|
+
"express-pouchdb": "*",
|
|
92
97
|
"node-fetch": "*",
|
|
93
98
|
"pouchdb-server": "*",
|
|
94
99
|
"request": "*",
|
|
@@ -98,6 +103,12 @@
|
|
|
98
103
|
"@babel/runtime": {
|
|
99
104
|
"optional": true
|
|
100
105
|
},
|
|
106
|
+
"express": {
|
|
107
|
+
"optional": true
|
|
108
|
+
},
|
|
109
|
+
"express-pouchdb": {
|
|
110
|
+
"optional": true
|
|
111
|
+
},
|
|
101
112
|
"pouchdb-server": {
|
|
102
113
|
"optional": true
|
|
103
114
|
}
|
|
@@ -150,10 +161,10 @@
|
|
|
150
161
|
"_config"
|
|
151
162
|
]
|
|
152
163
|
},
|
|
153
|
-
"
|
|
164
|
+
"runner": {
|
|
154
165
|
"memoryInMegaByte": "default",
|
|
155
166
|
"nodePath": "/usr/bin/node",
|
|
156
|
-
"
|
|
167
|
+
"variants": [
|
|
157
168
|
{
|
|
158
169
|
"adminUserConfigurationPath": "_node/couchdb@127.0.0.1/_config/admins",
|
|
159
170
|
"configurationFile": {
|
|
@@ -198,6 +209,14 @@
|
|
|
198
209
|
"../.bin/"
|
|
199
210
|
],
|
|
200
211
|
"name": "pouchdb-server"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"adminUserConfigurationPath": "_config/admins",
|
|
215
|
+
"packages": [
|
|
216
|
+
"express",
|
|
217
|
+
"express-pouchdb"
|
|
218
|
+
],
|
|
219
|
+
"name": "express-pouchdb"
|
|
201
220
|
}
|
|
202
221
|
]
|
|
203
222
|
},
|
package/type.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChildProcess } from 'child_process';
|
|
2
2
|
import { AnyFunction, Mapping, PlainObject, Primitive, ProcessCloseReason, UTILITY_SCOPE } from 'clientnode';
|
|
3
3
|
import { Configuration as BaseConfiguration, PluginHandler as BasePluginHandler, ServicePromises as BaseServicePromises, Services as BaseServices, ServicePromisesState as BaseServicePromisesState, ServicesState as BaseServicesState } from 'web-node/type';
|
|
4
|
+
import { Server as HTTPServer } from 'http';
|
|
4
5
|
export type Attachment = PouchDB.Core.Attachment & {
|
|
5
6
|
content_type?: PouchDB.Core.Attachment['content_type'];
|
|
6
7
|
contentType?: PouchDB.Core.Attachment['content_type'];
|
|
@@ -217,15 +218,20 @@ export interface DatabaseUserConfiguration {
|
|
|
217
218
|
}
|
|
218
219
|
export interface Runner {
|
|
219
220
|
adminUserConfigurationPath: string;
|
|
220
|
-
arguments?: Array<string> | null | string;
|
|
221
|
-
binaryFilePath?: null | string;
|
|
222
221
|
configurationFile?: null | {
|
|
223
222
|
content: string;
|
|
224
223
|
path: string;
|
|
225
224
|
};
|
|
225
|
+
name: Array<string> | string;
|
|
226
|
+
}
|
|
227
|
+
export interface BinaryRunner extends Runner {
|
|
228
|
+
arguments?: Array<string> | null | string;
|
|
229
|
+
binaryFilePath?: null | string;
|
|
226
230
|
environment?: null | Mapping;
|
|
227
231
|
location: Array<string> | string;
|
|
228
|
-
|
|
232
|
+
}
|
|
233
|
+
export interface InPlaceRunner extends Runner {
|
|
234
|
+
packages: Array<string> | string;
|
|
229
235
|
}
|
|
230
236
|
export interface SecuritySettings {
|
|
231
237
|
admins?: DatabaseUserConfiguration;
|
|
@@ -250,16 +256,16 @@ export interface CoreConfiguration<Type extends object = Mapping<unknown>, Attac
|
|
|
250
256
|
configuration: PlainObject;
|
|
251
257
|
prefixes: Array<string>;
|
|
252
258
|
};
|
|
253
|
-
|
|
259
|
+
runner: {
|
|
254
260
|
memoryInMegaByte: string;
|
|
255
261
|
nodePath: string;
|
|
256
|
-
|
|
262
|
+
variants: Array<BinaryRunner | InPlaceRunner>;
|
|
257
263
|
};
|
|
258
264
|
changesStream: ChangesStreamOptions;
|
|
259
265
|
changesStreamReinitializer: {
|
|
260
266
|
retries: number;
|
|
261
267
|
retryWaitingFactorInSeconds: number;
|
|
262
|
-
|
|
268
|
+
maximumRetryWaitingTimeInSeconds: number;
|
|
263
269
|
};
|
|
264
270
|
numberOfParallelChangesRunner: number;
|
|
265
271
|
connector: ConnectorConfiguration;
|
|
@@ -302,13 +308,13 @@ export interface CouchDB<Type extends object = Mapping<unknown>> {
|
|
|
302
308
|
connection: Connection<Type>;
|
|
303
309
|
connector: Connector;
|
|
304
310
|
server: {
|
|
305
|
-
process?: ChildProcess;
|
|
306
|
-
reject: (value: ProcessCloseReason) => void;
|
|
307
|
-
resolve: (reason
|
|
311
|
+
process?: ChildProcess | HTTPServer;
|
|
312
|
+
reject: (value: Error | ProcessCloseReason) => void;
|
|
313
|
+
resolve: (reason?: ProcessCloseReason) => void;
|
|
308
314
|
restart: (state: State) => Promise<void>;
|
|
309
315
|
start: (services: Services, configuration: Configuration) => Promise<void>;
|
|
310
316
|
stop: (services: Services, configuration: Configuration) => Promise<void>;
|
|
311
|
-
runner:
|
|
317
|
+
runner: BinaryRunner | InPlaceRunner;
|
|
312
318
|
};
|
|
313
319
|
validateDocument: (document: FullDocument, options: {
|
|
314
320
|
checkPublicModelType?: boolean;
|