Compare commits

..

2 Commits

Author SHA1 Message Date
Nicolas Dextraze
9842cc6164 fix npm audit (except nodeunit)
add .nvmrc
docker nodejs build in a folder on the ephemeral disk so we don't interfere with lib and node_modules folders
2023-01-30 14:49:45 -05:00
Nicolas Dextraze
bf1ebfaab0 release compatible with Eventstore v20.10.x 2023-01-30 11:48:29 -05:00
24 changed files with 11820 additions and 18949 deletions

1
.gitignore vendored
View File

@ -34,7 +34,6 @@ node_modules
# InteliJ
.idea/workspace.xml
.idea/shelf
.vscode
lib/

View File

@ -24,22 +24,14 @@ If you want to learn more about EventSourcing/EventModeling, you can join one of
Install using `npm install node-eventstore-client`
Versions to install to match EventStore versions:
- 0.1.x for ES prior to 3.9.4
- 0.2.x for ES from 3.9.4 to 5.x
- 20.10.x for ES 20.10 LTS
- 21.10.x for ES 21.10 LTS
- 22.10.x for ES 22.10 LTS
### Dependencies
- Node.js >= 14
- Node.js >= 4.0
- Modules: [long](https://www.npmjs.org/package/long), [protobufjs](https://www.npmjs.org/package/protobufjs), [uuid](https://www.npmjs.org/package/uuid), [strict-event-emitter-types](https://www.npmjs.com/package/strict-event-emitter-types) (installed via `npm install`)
### Install and run an Eventstore on localhost
See https://eventstore.com
See https://eventstore.org/docs/introduction/4.1.0/
*Note: If you are using a version of EventStore prior to 3.9.4, you need to use version 0.1.x of this package `npm install node-eventstore-client@^0.1`.*

View File

@ -2,7 +2,7 @@ version: '3.7'
services:
eventstore1:
image: eventstore/eventstore:22.10.0-buster-slim
image: eventstore/eventstore:20.10.5-buster-slim
environment:
- EVENTSTORE_CLUSTER_SIZE=3
- EVENTSTORE_CLUSTER_DNS=cluster.tests.node-eventstore-client.local
@ -40,7 +40,7 @@ services:
- ./certs:/etc/eventstore/certs:ro
eventstore2:
image: eventstore/eventstore:22.10.0-buster-slim
image: eventstore/eventstore:20.10.5-buster-slim
environment:
- EVENTSTORE_CLUSTER_SIZE=3
- EVENTSTORE_CLUSTER_DNS=cluster.tests.node-eventstore-client.local
@ -74,7 +74,7 @@ services:
- ./certs:/etc/eventstore/certs:ro
eventstore3:
image: eventstore/eventstore:22.10.0-buster-slim
image: eventstore/eventstore:20.10.5-buster-slim
environment:
- EVENTSTORE_CLUSTER_SIZE=3
- EVENTSTORE_CLUSTER_DNS=cluster.tests.node-eventstore-client.local

View File

@ -2,7 +2,7 @@ version: '3.4'
services:
eventstore:
image: eventstore/eventstore:22.10.0-buster-slim
image: eventstore/eventstore:20.10.5-buster-slim
environment:
- EVENTSTORE_CLUSTER_SIZE=1
- EVENTSTORE_RUN_PROJECTIONS=All

279
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "node-eventstore-client",
"version": "21.10.0",
"version": "20.10.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -753,32 +753,27 @@
"@protobufjs/aspromise": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
"integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==",
"dev": true
"integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ=="
},
"@protobufjs/base64": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==",
"dev": true
"integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg=="
},
"@protobufjs/codegen": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==",
"dev": true
"integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg=="
},
"@protobufjs/eventemitter": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
"integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==",
"dev": true
"integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q=="
},
"@protobufjs/fetch": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
"integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
"dev": true,
"requires": {
"@protobufjs/aspromise": "^1.1.1",
"@protobufjs/inquire": "^1.1.0"
@ -787,32 +782,27 @@
"@protobufjs/float": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
"integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
"dev": true
"integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ=="
},
"@protobufjs/inquire": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
"integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
"dev": true
"integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q=="
},
"@protobufjs/path": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
"integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==",
"dev": true
"integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA=="
},
"@protobufjs/pool": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
"integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==",
"dev": true
"integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw=="
},
"@protobufjs/utf8": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
"dev": true
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
},
"@sinclair/typebox": {
"version": "0.25.21",
@ -950,6 +940,11 @@
"integrity": "sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==",
"dev": true
},
"@types/long": {
"version": "3.0.32",
"resolved": "https://registry.npmjs.org/@types/long/-/long-3.0.32.tgz",
"integrity": "sha512-ZXyOOm83p7X8p3s0IYM3VeueNmHpkk/yMlP8CLeOnEcu6hIwPH7YjZBvhQkR0ZFS2DqZAxKtJ/M5fcuv3OU5BA=="
},
"@types/markdown-it": {
"version": "12.2.3",
"resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz",
@ -1168,12 +1163,6 @@
"integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==",
"dev": true
},
"acorn-jsx": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"dev": true
},
"ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@ -1891,12 +1880,6 @@
"integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==",
"dev": true
},
"deep-is": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
"integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
"dev": true
},
"deepmerge": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.0.tgz",
@ -2095,19 +2078,6 @@
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true
},
"escodegen": {
"version": "1.14.3",
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
"integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
"dev": true,
"requires": {
"esprima": "^4.0.1",
"estraverse": "^4.2.0",
"esutils": "^2.0.2",
"optionator": "^0.8.1",
"source-map": "~0.6.1"
}
},
"eslint-scope": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
@ -2118,29 +2088,12 @@
"estraverse": "^4.1.1"
}
},
"eslint-visitor-keys": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz",
"integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==",
"dev": true
},
"esm": {
"version": "3.2.25",
"resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
"integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==",
"dev": true
},
"espree": {
"version": "9.4.1",
"resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz",
"integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==",
"dev": true,
"requires": {
"acorn": "^8.8.0",
"acorn-jsx": "^5.3.2",
"eslint-visitor-keys": "^3.3.0"
}
},
"esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
@ -2170,12 +2123,6 @@
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
"dev": true
},
"esutils": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
},
"events": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
@ -2393,12 +2340,6 @@
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
"dev": true
},
"fast-levenshtein": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
"dev": true
},
"fb-watchman": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz",
@ -3929,16 +3870,6 @@
"integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==",
"dev": true
},
"levn": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
"integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==",
"dev": true,
"requires": {
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2"
}
},
"lines-and-columns": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
@ -4046,9 +3977,9 @@
"dev": true
},
"long": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz",
"integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A=="
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz",
"integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg=="
},
"lru-cache": {
"version": "5.1.1",
@ -4602,12 +4533,6 @@
"require-main-filename": "^2.0.0"
}
},
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"dev": true
},
"wrap-ansi": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
@ -4734,20 +4659,6 @@
"integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==",
"dev": true
},
"optionator": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
"integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
"dev": true,
"requires": {
"deep-is": "~0.1.3",
"fast-levenshtein": "~2.0.6",
"levn": "~0.3.0",
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2",
"word-wrap": "~1.2.3"
}
},
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
@ -4915,12 +4826,6 @@
"integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==",
"dev": true
},
"prelude-ls": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
"integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==",
"dev": true
},
"pretty-format": {
"version": "29.4.1",
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.4.1.tgz",
@ -4957,10 +4862,9 @@
}
},
"protobufjs": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.0.tgz",
"integrity": "sha512-hYCqTDuII4iJ4stZqiuGCSU8xxWl5JeXYpwARGtn/tWcKCAro6h3WQz+xpsNbXW0UYqpmTQFEyFWO0G0Kjt64g==",
"dev": true,
"version": "6.11.3",
"resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz",
"integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==",
"requires": {
"@protobufjs/aspromise": "^1.1.2",
"@protobufjs/base64": "^1.1.2",
@ -4972,88 +4876,20 @@
"@protobufjs/path": "^1.1.2",
"@protobufjs/pool": "^1.1.0",
"@protobufjs/utf8": "^1.1.0",
"@types/long": "^4.0.1",
"@types/node": ">=13.7.0",
"long": "^5.0.0"
}
},
"protobufjs-cli": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/protobufjs-cli/-/protobufjs-cli-1.1.0.tgz",
"integrity": "sha512-VXMQn+z3yG2WbN2E+mx5vcyIHF7yJSg2jqyqfxcZLWNOSTqUzSSgAE5vu04/JEpwxTI04JGyrZRDHC36wr04uw==",
"dev": true,
"requires": {
"chalk": "^4.0.0",
"escodegen": "^1.13.0",
"espree": "^9.0.0",
"estraverse": "^5.1.0",
"glob": "^8.0.0",
"jsdoc": "^4.0.0",
"minimist": "^1.2.0",
"semver": "^7.1.2",
"tmp": "^0.2.1",
"uglify-js": "^3.7.7"
"long": "^4.0.0"
},
"dependencies": {
"brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0"
}
"@types/long": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz",
"integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA=="
},
"estraverse": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
"dev": true
},
"glob": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz",
"integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^5.0.1",
"once": "^1.3.0"
}
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"dev": true,
"requires": {
"yallist": "^4.0.0"
}
},
"minimatch": {
"version": "5.1.6",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz",
"integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
"dev": true,
"requires": {
"brace-expansion": "^2.0.1"
}
},
"semver": {
"version": "7.3.8",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
"integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
}
},
"yallist": {
"long": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
"dev": true
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA=="
}
}
},
@ -5239,14 +5075,6 @@
"tough-cookie": "~2.5.0",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
},
"dependencies": {
"uuid": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"dev": true
}
}
},
"require-directory": {
@ -6056,26 +5884,6 @@
"integrity": "sha512-Ynn2Gsp+oCvYScQXeV+cCs7citRDilq0qDXA6tuvFwDgiYyyaq7D5vKUlAPezzZR5NDobc/QMeN6e5guOYmvxg==",
"dev": true
},
"tmp": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
"integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==",
"dev": true,
"requires": {
"rimraf": "^3.0.0"
},
"dependencies": {
"rimraf": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"dev": true,
"requires": {
"glob": "^7.1.3"
}
}
}
},
"tmpl": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz",
@ -6197,15 +6005,6 @@
"integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==",
"dev": true
},
"type-check": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
"integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==",
"dev": true,
"requires": {
"prelude-ls": "~1.1.2"
}
},
"type-detect": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
@ -6230,12 +6029,6 @@
"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
"dev": true
},
"uglify-js": {
"version": "3.17.4",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz",
"integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==",
"dev": true
},
"underscore": {
"version": "1.13.6",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz",
@ -6365,9 +6158,9 @@
"dev": true
},
"uuid": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
"integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg=="
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
},
"v8-compile-cache": {
"version": "2.3.0",
@ -6797,12 +6590,6 @@
"integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==",
"dev": true
},
"word-wrap": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
"dev": true
},
"wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",

View File

@ -1,6 +1,6 @@
{
"name": "node-eventstore-client",
"version": "22.10.0",
"version": "20.10.0",
"description": "A port of the EventStore .Net ClientAPI to Node.js",
"main": "index.js",
"types": "index.d.ts",
@ -59,17 +59,17 @@
},
"homepage": "https://github.com/nicdex/node-eventstore-client#readme",
"dependencies": {
"@types/node": ">=14",
"long": "^5.2.0",
"@types/long": "^3.0.32",
"@types/node": ">=5.10",
"long": "^3.2.0",
"protobufjs": "^6.8.8",
"strict-event-emitter-types": "^1.2.0",
"uuid": "^9.0.0"
"uuid": "^3.0.1"
},
"devDependencies": {
"jest": "^29.4.1",
"jsdoc": "^4.0.0",
"nodeunit": "^0.11.3",
"protobufjs": "^7.2.0",
"protobufjs-cli": "^1.1.0",
"webpack": "^5.75.0",
"webpack-cli": "^3.3.10"
}

View File

@ -37,7 +37,7 @@ AppendToStreamOperation.prototype._createRequestDto = function() {
eventStreamId: this._stream,
expectedVersion: this._expectedVersion,
events: dtos,
requireLeader: this._requireMaster});
requireMaster: this._requireMaster});
};
AppendToStreamOperation.prototype._inspectResponse = function(response) {
@ -79,4 +79,4 @@ AppendToStreamOperation.prototype.toString = function() {
return util.format("Stream: %s, ExpectedVersion: %d", this._stream, this._expectedVersion);
};
module.exports = AppendToStreamOperation;
module.exports = AppendToStreamOperation;

View File

@ -24,7 +24,7 @@ util.inherits(CommitTransactionOperation, OperationBase);
CommitTransactionOperation.prototype._createRequestDto = function() {
return new ClientMessage.TransactionCommit({
transactionId: this._transactionId,
requireLeader: this._requireMaster
requireMaster: this._requireMaster
});
};
@ -66,4 +66,4 @@ CommitTransactionOperation.prototype.toString = function() {
return util.format("TransactionId: %s", this._transactionId);
};
module.exports = CommitTransactionOperation;
module.exports = CommitTransactionOperation;

View File

@ -27,7 +27,7 @@ DeleteStreamOperation.prototype._createRequestDto = function() {
return new ClientMessage.DeleteStream({
eventStreamId: this._stream,
expectedVersion: this._expectedVersion,
requireLeader: this._requireMaster,
requireMaster: this._requireMaster,
hardDelete: this._hardDelete
});
};
@ -69,4 +69,4 @@ DeleteStreamOperation.prototype.toString = function() {
return util.format("Stream: %s, ExpectedVersion: %s.", this._stream, this._expectedVersion);
};
module.exports = DeleteStreamOperation;
module.exports = DeleteStreamOperation;

View File

@ -117,9 +117,9 @@ OperationBase.prototype._inspectNotHandled = function(pkg)
case ClientMessage.NotHandled.NotHandledReason.TooBusy:
return new InspectionResult(InspectionDecision.Retry, "NotHandled - TooBusy");
case ClientMessage.NotHandled.NotHandledReason.NotLeader:
var masterInfo = ClientMessage.NotHandled.LeaderInfo.decode(message.additionalInfo);
return new InspectionResult(InspectionDecision.Reconnect, "NotHandled - NotLeader",
case ClientMessage.NotHandled.NotHandledReason.NotMaster:
var masterInfo = ClientMessage.NotHandled.MasterInfo.decode(message.additionalInfo);
return new InspectionResult(InspectionDecision.Reconnect, "NotHandled - NotMaster",
{host: masterInfo.externalTcpAddress, port: masterInfo.externalTcpPort},
{host: masterInfo.externalSecureTcpAddress, port: masterInfo.externalSecureTcpPort});
@ -145,4 +145,4 @@ OperationBase.prototype._inspectUnexpectedCommand = function(pkg, expectedComman
};
module.exports = OperationBase;
module.exports = OperationBase;

View File

@ -29,7 +29,7 @@ ReadAllEventsBackwardOperation.prototype._createRequestDto = function() {
preparePosition: this._position.preparePosition,
maxCount: this._maxCount,
resolveLinkTos: this._resolveLinkTos,
requireLeader: this._requireMaster
requireMaster: this._requireMaster
});
};
@ -64,4 +64,4 @@ ReadAllEventsBackwardOperation.prototype.toString = function() {
this._position, this._maxCount, this._resolveLinkTos, this._requireMaster);
};
module.exports = ReadAllEventsBackwardOperation;
module.exports = ReadAllEventsBackwardOperation;

View File

@ -29,7 +29,7 @@ ReadAllEventsForwardOperation.prototype._createRequestDto = function() {
preparePosition: this._position.preparePosition,
maxCount: this._maxCount,
resolveLinkTos: this._resolveLinkTos,
requireLeader: this._requireMaster
requireMaster: this._requireMaster
});
};
@ -64,4 +64,4 @@ ReadAllEventsForwardOperation.prototype.toString = function() {
this._position, this._maxCount, this._resolveLinkTos, this._requireMaster);
};
module.exports = ReadAllEventsForwardOperation;
module.exports = ReadAllEventsForwardOperation;

View File

@ -25,7 +25,7 @@ ReadEventOperation.prototype._createRequestDto = function() {
eventStreamId: this._stream,
eventNumber: this._eventNumber,
resolveLinkTos: this._resolveLinkTos,
requireLeader: this._requireMaster
requireMaster: this._requireMaster
});
};
@ -81,4 +81,4 @@ ReadEventOperation.prototype.toString = function() {
this._stream, this._eventNumber, this._resolveLinkTos, this._requireMaster);
};
module.exports = ReadEventOperation;
module.exports = ReadEventOperation;

View File

@ -31,7 +31,7 @@ ReadStreamEventsBackwardOperation.prototype._createRequestDto = function() {
fromEventNumber: this._fromEventNumber,
maxCount: this._maxCount,
resolveLinkTos: this._resolveLinkTos,
requireLeader: this._requireMaster
requireMaster: this._requireMaster
});
};
@ -76,4 +76,4 @@ ReadStreamEventsBackwardOperation.prototype.toString = function() {
this._stream, this._fromEventNumber, this._maxCount, this._resolveLinkTos, this._requireMaster);
};
module.exports = ReadStreamEventsBackwardOperation;
module.exports = ReadStreamEventsBackwardOperation;

View File

@ -31,7 +31,7 @@ ReadStreamEventsForwardOperation.prototype._createRequestDto = function() {
fromEventNumber: this._fromEventNumber,
maxCount: this._maxCount,
resolveLinkTos: this._resolveLinkTos,
requireLeader: this._requireMaster
requireMaster: this._requireMaster
});
};
@ -76,4 +76,4 @@ ReadStreamEventsForwardOperation.prototype.toString = function() {
this._stream, this._fromEventNumber, this._maxCount, this._resolveLinkTos, this._requireMaster);
};
module.exports = ReadStreamEventsForwardOperation;
module.exports = ReadStreamEventsForwardOperation;

View File

@ -25,7 +25,7 @@ StartTransactionOperation.prototype._createRequestDto = function() {
return new ClientMessage.TransactionStart({
eventStreamId: this._stream,
expectedVersion: this._expectedVersion,
requireLeader: this._requireMaster
requireMaster: this._requireMaster
});
};
@ -66,4 +66,4 @@ StartTransactionOperation.prototype.toString = function() {
return util.format("Stream: %s, ExpectedVersion: %d", this._stream, this._expectedVersion);
};
module.exports = StartTransactionOperation;
module.exports = StartTransactionOperation;

View File

@ -137,9 +137,9 @@ SubscriptionOperation.prototype.inspectPackage = function(pkg) {
case ClientMessage.NotHandled.NotHandledReason.TooBusy:
return new InspectionResult(InspectionDecision.Retry, "NotHandled - TooBusy");
case ClientMessage.NotHandled.NotHandledReason.NotLeader:
var masterInfo = ClientMessage.NotHandled.LeaderInfo.decode(message.additionalInfo);
return new InspectionResult(InspectionDecision.Reconnect, "NotHandled - NotLeader",
case ClientMessage.NotHandled.NotHandledReason.NotMaster:
var masterInfo = ClientMessage.NotHandled.MasterInfo.decode(message.additionalInfo);
return new InspectionResult(InspectionDecision.Reconnect, "NotHandled - NotMaster",
{host: masterInfo.externalTcpAddress, port: masterInfo.externalTcpPort},
{host: masterInfo.externalSecureTcpAddress, port: masterInfo.externalSecureTcpPort});
@ -279,4 +279,4 @@ SubscriptionOperation.prototype.toString = function() {
};
module.exports = SubscriptionOperation;
module.exports = SubscriptionOperation;

View File

@ -32,7 +32,7 @@ TransactionalWriteOperation.prototype._createRequestDto = function() {
return new ClientMessage.TransactionWrite({
transactionId: this._transactionId,
events: dtos,
requireLeader: this._requireMaster
requireMaster: this._requireMaster
});
};
@ -64,4 +64,4 @@ TransactionalWriteOperation.prototype.toString = function() {
return util.format("TransactionId: %s", this._transactionId);
};
module.exports = TransactionalWriteOperation;
module.exports = TransactionalWriteOperation;

View File

@ -8,15 +8,20 @@ const VNodeStates = Object.freeze({
CatchingUp: 4,
Clone: 5,
Follower: 6,
Slave: 6,
PreLeader: 7,
PreMaster: 7,
Leader: 8,
Master: 8,
Manager: 9,
ShuttingDown: 10,
Shutdown: 11,
ReadOnlyLeaderless: 12,
ReadOnlyMasterless: 12,
PreReadOnlyReplica: 13,
ReadOnlyReplica: 14,
ResigningLeader: 15,
ResigningMaster: 15,
});
function ClusterInfo(members) {
@ -32,7 +37,7 @@ function ClusterInfo(members) {
ClusterInfo.prototype._getBestNode = function () {
return this._members
.filter(member => member.isAlive && member.isAllowedToConnect)
.filter(member => member.isAlive && member.isAllowedToConnect && VNodeStates[member.state] <= VNodeStates.Master)
.sort(function (a, b) {
return VNodeStates[b.state] - VNodeStates[a.state];
})[0];

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,3 @@
syntax = "proto3";
package EventStore.Client.Messages;
enum OperationResult
@ -15,115 +13,114 @@ enum OperationResult
}
message NewEvent {
bytes event_id = 1;
string event_type = 2;
int32 data_content_type = 3;
int32 metadata_content_type = 4;
bytes data = 5;
bytes metadata = 6;
required bytes event_id = 1;
required string event_type = 2;
required int32 data_content_type = 3;
required int32 metadata_content_type = 4;
required bytes data = 5;
optional bytes metadata = 6;
}
message EventRecord {
string event_stream_id = 1;
int64 event_number = 2;
bytes event_id = 3;
string event_type = 4;
int32 data_content_type = 5;
int32 metadata_content_type = 6;
bytes data = 7;
bytes metadata = 8;
int64 created = 9;
int64 created_epoch = 10;
required string event_stream_id = 1;
required int64 event_number = 2;
required bytes event_id = 3;
required string event_type = 4;
required int32 data_content_type = 5;
required int32 metadata_content_type = 6;
required bytes data = 7;
optional bytes metadata = 8;
optional int64 created = 9;
optional int64 created_epoch = 10;
}
message ResolvedIndexedEvent {
EventRecord event = 1;
EventRecord link = 2;
optional EventRecord event = 1;
optional EventRecord link = 2;
}
message ResolvedEvent {
EventRecord event = 1;
EventRecord link = 2;
int64 commit_position = 3;
int64 prepare_position = 4;
optional EventRecord event = 1;
optional EventRecord link = 2;
required int64 commit_position = 3;
required int64 prepare_position = 4;
}
message WriteEvents {
string event_stream_id = 1;
int64 expected_version = 2;
required string event_stream_id = 1;
required int64 expected_version = 2;
repeated NewEvent events = 3;
bool require_leader = 4;
required bool require_master = 4;
}
message WriteEventsCompleted {
OperationResult result = 1;
string message = 2;
int64 first_event_number = 3;
int64 last_event_number = 4;
int64 prepare_position = 5;
int64 commit_position = 6;
int64 current_version = 7;
required OperationResult result = 1;
optional string message = 2;
required int64 first_event_number = 3;
required int64 last_event_number = 4;
optional int64 prepare_position = 5;
optional int64 commit_position = 6;
optional int64 current_version = 7;
}
message DeleteStream {
string event_stream_id = 1;
int64 expected_version = 2;
bool require_leader = 3;
bool hard_delete = 4;
required string event_stream_id = 1;
required int64 expected_version = 2;
required bool require_master = 3;
optional bool hard_delete = 4;
}
message DeleteStreamCompleted {
OperationResult result = 1;
string message = 2;
int64 prepare_position = 3;
int64 commit_position = 4;
int64 current_version = 5;
required OperationResult result = 1;
optional string message = 2;
optional int64 prepare_position = 3;
optional int64 commit_position = 4;
}
message TransactionStart {
string event_stream_id = 1;
int64 expected_version = 2;
bool require_leader = 3;
required string event_stream_id = 1;
required int64 expected_version = 2;
required bool require_master = 3;
}
message TransactionStartCompleted {
int64 transaction_id = 1;
OperationResult result = 2;
string message = 3;
required int64 transaction_id = 1;
required OperationResult result = 2;
optional string message = 3;
}
message TransactionWrite {
int64 transaction_id = 1;
required int64 transaction_id = 1;
repeated NewEvent events = 2;
bool require_leader = 3;
required bool require_master = 3;
}
message TransactionWriteCompleted {
int64 transaction_id = 1;
OperationResult result = 2;
string message = 3;
required int64 transaction_id = 1;
required OperationResult result = 2;
optional string message = 3;
}
message TransactionCommit {
int64 transaction_id = 1;
bool require_leader = 2;
required int64 transaction_id = 1;
required bool require_master = 2;
}
message TransactionCommitCompleted {
int64 transaction_id = 1;
OperationResult result = 2;
string message = 3;
int64 first_event_number = 4;
int64 last_event_number = 5;
int64 prepare_position = 6;
int64 commit_position = 7;
required int64 transaction_id = 1;
required OperationResult result = 2;
optional string message = 3;
required int64 first_event_number = 4;
required int64 last_event_number = 5;
optional int64 prepare_position = 6;
optional int64 commit_position = 7;
}
message ReadEvent {
string event_stream_id = 1;
int64 event_number = 2;
bool resolve_link_tos = 3;
bool require_leader = 4;
required string event_stream_id = 1;
required int64 event_number = 2;
required bool resolve_link_tos = 3;
required bool require_master = 4;
}
message ReadEventCompleted {
@ -137,18 +134,18 @@ message ReadEventCompleted {
AccessDenied = 5;
}
ReadEventResult result = 1;
ResolvedIndexedEvent event = 2;
required ReadEventResult result = 1;
required ResolvedIndexedEvent event = 2;
string error = 3;
optional string error = 3;
}
message ReadStreamEvents {
string event_stream_id = 1;
int64 from_event_number = 2;
int32 max_count = 3;
bool resolve_link_tos = 4;
bool require_leader = 5;
required string event_stream_id = 1;
required int64 from_event_number = 2;
required int32 max_count = 3;
required bool resolve_link_tos = 4;
required bool require_master = 5;
}
message ReadStreamEventsCompleted {
@ -163,21 +160,21 @@ message ReadStreamEventsCompleted {
}
repeated ResolvedIndexedEvent events = 1;
ReadStreamResult result = 2;
int64 next_event_number = 3;
int64 last_event_number = 4;
bool is_end_of_stream = 5;
int64 last_commit_position = 6;
required ReadStreamResult result = 2;
required int64 next_event_number = 3;
required int64 last_event_number = 4;
required bool is_end_of_stream = 5;
required int64 last_commit_position = 6;
string error = 7;
optional string error = 7;
}
message ReadAllEvents {
int64 commit_position = 1;
int64 prepare_position = 2;
int32 max_count = 3;
bool resolve_link_tos = 4;
bool require_leader = 5;
required int64 commit_position = 1;
required int64 prepare_position = 2;
required int32 max_count = 3;
required bool resolve_link_tos = 4;
required bool require_master = 5;
}
message ReadAllEventsCompleted {
@ -189,105 +186,57 @@ message ReadAllEventsCompleted {
AccessDenied = 3;
}
int64 commit_position = 1;
int64 prepare_position = 2;
required int64 commit_position = 1;
required int64 prepare_position = 2;
repeated ResolvedEvent events = 3;
int64 next_commit_position = 4;
int64 next_prepare_position = 5;
required int64 next_commit_position = 4;
required int64 next_prepare_position = 5;
ReadAllResult result = 6;
string error = 7;
}
message Filter{
enum FilterContext {
StreamId = 0;
EventType = 1;
}
enum FilterType {
Regex = 0;
Prefix = 1;
}
FilterContext context = 1;
FilterType type = 2;
repeated string data = 3;
}
message FilteredReadAllEvents {
int64 commit_position = 1;
int64 prepare_position = 2;
int32 max_count = 3;
int32 max_search_window = 4;
bool resolve_link_tos = 5;
bool require_leader = 6;
Filter filter = 7;
}
message FilteredReadAllEventsCompleted {
enum FilteredReadAllResult {
Success = 0;
NotModified = 1;
Error = 2;
AccessDenied = 3;
}
int64 commit_position = 1;
int64 prepare_position = 2;
repeated ResolvedEvent events = 3;
int64 next_commit_position = 4;
int64 next_prepare_position = 5;
bool is_end_of_stream = 6;
FilteredReadAllResult result = 7;
string error = 8;
optional ReadAllResult result = 6 [default = Success];
optional string error = 7;
}
message CreatePersistentSubscription {
string subscription_group_name = 1;
string event_stream_id = 2;
bool resolve_link_tos = 3;
int64 start_from = 4;
int32 message_timeout_milliseconds = 5;
bool record_statistics = 6;
int32 live_buffer_size = 7;
int32 read_batch_size = 8;
int32 buffer_size = 9;
int32 max_retry_count = 10;
bool prefer_round_robin = 11;
int32 checkpoint_after_time = 12;
int32 checkpoint_max_count = 13;
int32 checkpoint_min_count = 14;
int32 subscriber_max_count = 15;
string named_consumer_strategy = 16;
required string subscription_group_name = 1;
required string event_stream_id = 2;
required bool resolve_link_tos = 3;
required int64 start_from = 4;
required int32 message_timeout_milliseconds = 5;
required bool record_statistics = 6;
required int32 live_buffer_size = 7;
required int32 read_batch_size = 8;
required int32 buffer_size = 9;
required int32 max_retry_count = 10;
required bool prefer_round_robin = 11;
required int32 checkpoint_after_time = 12;
required int32 checkpoint_max_count = 13;
required int32 checkpoint_min_count = 14;
required int32 subscriber_max_count = 15;
optional string named_consumer_strategy = 16;
}
message DeletePersistentSubscription {
string subscription_group_name = 1;
string event_stream_id = 2;
required string subscription_group_name = 1;
required string event_stream_id = 2;
}
message UpdatePersistentSubscription {
string subscription_group_name = 1;
string event_stream_id = 2;
bool resolve_link_tos = 3;
int64 start_from = 4;
int32 message_timeout_milliseconds = 5;
bool record_statistics = 6;
int32 live_buffer_size = 7;
int32 read_batch_size = 8;
int32 buffer_size = 9;
int32 max_retry_count = 10;
bool prefer_round_robin = 11;
int32 checkpoint_after_time = 12;
int32 checkpoint_max_count = 13;
int32 checkpoint_min_count = 14;
int32 subscriber_max_count = 15;
string named_consumer_strategy = 16;
required string subscription_group_name = 1;
required string event_stream_id = 2;
required bool resolve_link_tos = 3;
required int64 start_from = 4;
required int32 message_timeout_milliseconds = 5;
required bool record_statistics = 6;
required int32 live_buffer_size = 7;
required int32 read_batch_size = 8;
required int32 buffer_size = 9;
required int32 max_retry_count = 10;
required bool prefer_round_robin = 11;
required int32 checkpoint_after_time = 12;
required int32 checkpoint_max_count = 13;
required int32 checkpoint_min_count = 14;
required int32 subscriber_max_count = 15;
optional string named_consumer_strategy = 16;
}
message UpdatePersistentSubscriptionCompleted {
@ -297,8 +246,8 @@ message UpdatePersistentSubscriptionCompleted {
Fail = 2;
AccessDenied=3;
}
UpdatePersistentSubscriptionResult result = 1;
string reason = 2;
required UpdatePersistentSubscriptionResult result = 1 [default = Success];
optional string reason = 2;
}
message CreatePersistentSubscriptionCompleted {
@ -308,8 +257,8 @@ message CreatePersistentSubscriptionCompleted {
Fail = 2;
AccessDenied=3;
}
CreatePersistentSubscriptionResult result = 1;
string reason = 2;
required CreatePersistentSubscriptionResult result = 1 [default = Success];
optional string reason = 2;
}
message DeletePersistentSubscriptionCompleted {
@ -319,19 +268,19 @@ message DeletePersistentSubscriptionCompleted {
Fail = 2;
AccessDenied = 3;
}
DeletePersistentSubscriptionResult result = 1;
string reason = 2;
required DeletePersistentSubscriptionResult result = 1 [default = Success];
optional string reason = 2;
}
message ConnectToPersistentSubscription {
string subscription_id = 1;
string event_stream_id = 2;
int32 allowed_in_flight_messages = 3;
required string subscription_id = 1;
required string event_stream_id = 2;
required int32 allowed_in_flight_messages = 3;
}
message PersistentSubscriptionAckEvents {
string subscription_id = 1;
required string subscription_id = 1;
repeated bytes processed_event_ids = 2;
}
@ -344,47 +293,34 @@ message PersistentSubscriptionNakEvents {
Stop = 4;
}
string subscription_id = 1;
required string subscription_id = 1;
repeated bytes processed_event_ids = 2;
string message = 3;
NakAction action = 4;
optional string message = 3;
required NakAction action = 4 [default = Unknown];
}
message PersistentSubscriptionConfirmation {
int64 last_commit_position = 1;
string subscription_id = 2;
int64 last_event_number = 3;
required int64 last_commit_position = 1;
required string subscription_id = 2;
optional int64 last_event_number = 3;
}
message PersistentSubscriptionStreamEventAppeared {
ResolvedIndexedEvent event = 1;
int32 retryCount = 2;
required ResolvedIndexedEvent event = 1;
}
message SubscribeToStream {
string event_stream_id = 1;
bool resolve_link_tos = 2;
}
message FilteredSubscribeToStream {
string event_stream_id = 1;
bool resolve_link_tos = 2;
Filter filter = 3;
int32 checkpoint_interval = 4;
}
message CheckpointReached {
int64 commit_position = 1;
int64 prepare_position = 2;
required string event_stream_id = 1;
required bool resolve_link_tos = 2;
}
message SubscriptionConfirmation {
int64 last_commit_position = 1;
int64 last_event_number = 2;
required int64 last_commit_position = 1;
optional int64 last_event_number = 2;
}
message StreamEventAppeared {
ResolvedEvent event = 1;
required ResolvedEvent event = 1;
}
message UnsubscribeFromStream {
@ -399,52 +335,52 @@ message SubscriptionDropped {
PersistentSubscriptionDeleted=3;
SubscriberMaxCountReached=4;
}
SubscriptionDropReason reason = 1;
optional SubscriptionDropReason reason = 1 [default = Unsubscribed];
}
message NotHandled {
enum NotHandledReason {
NotReady = 0;
TooBusy = 1;
NotLeader = 2;
IsReadOnly = 3;
NotMaster = 2;
}
NotHandledReason reason = 1;
bytes additional_info = 2;
message LeaderInfo {
string external_tcp_address = 1;
int32 external_tcp_port = 2;
string http_address = 3;
int32 http_port = 4;
string external_secure_tcp_address = 5;
int32 external_secure_tcp_port = 6;
required NotHandledReason reason = 1;
optional bytes additional_info = 2;
message MasterInfo {
required string external_tcp_address = 1;
required int32 external_tcp_port = 2;
required string external_http_address = 3;
required int32 external_http_port = 4;
optional string external_secure_tcp_address = 5;
optional int32 external_secure_tcp_port = 6;
}
}
message ScavengeDatabase {
}
message ScavengeDatabaseResponse {
message ScavengeDatabaseCompleted {
enum ScavengeResult {
Started = 0;
Success = 0;
InProgress = 1;
Unauthorized = 2;
Failed = 2;
}
ScavengeResult result = 1;
string scavengeId = 2;
required ScavengeResult result = 1;
optional string error = 2;
required int32 total_time_ms = 3;
required int64 total_space_saved = 4;
}
message IdentifyClient {
int32 version = 1;
string connection_name = 2;
required int32 version = 1;
optional string connection_name = 2;
}
message ClientIdentified {
}
}

View File

@ -6,7 +6,7 @@ const ProjectionsClient = require('./projectionsClient');
* @param {Logger} log Instance of Logger to use for logging.
* @param {string} httpEndPoint HTTP endpoint of an Event Store server.
* @param {number} operationTimeout Operation timeout in milliseconds.
* @param {boolean} [rejectUnauthorized] Reject authorized SSL certs (if using SSL) - set to false is using self-signed certs
* @param {boolean} [rejectUnauthorized] Reject authorized SSL certs (if using SSL) - set to false if using self-signed certs
* @constructor
*/
function ProjectionsManager(log, httpEndPoint, operationTimeout, rejectUnauthorized) {

View File

@ -13,7 +13,6 @@ protobufJS.configure();
var settings = {
log: new NoopLogger(),
useSslConnection: true,
validateServer: false
};
if (process.env.TESTS_VERBOSE_LOGGING === '1') {
settings.verboseLogging = true;

4235
yarn.lock

File diff suppressed because it is too large Load Diff