Commit graph

37 commits

Author SHA1 Message Date
Jeffrey Layanto
0e2e5e7325
The rest of partitioned database support (#131)
Co-authored-by: Jeffrey Layanto <jeffrey@layanto.com>
2020-08-22 07:44:46 -07:00
Jeffrey Layanto
97ec00e958
Added db.isPartitioned(dbName) and extended db.create(dbName, params) to allow creation of partitioned database (#128) 2020-07-24 06:30:07 -07:00
Jeffrey Layanto
8fb3c67085
Add missing encodeURIComponent on dbName (#127)
* Add missing encodeURIComponent on dbName in config.js and db.js

* Update test to create db with special characters name

* Add missing encodeURIComponent

Co-authored-by: Jeffrey Layanto <jeffrey@layanto.com>
2020-06-03 07:40:00 -07:00
Jeffrey Layanto
a2d47ab1e0
Add support for partitioned check (#126)
* Add support for partitioned check

* Add system.supportPartitioned() to API.md

* Fix jshint line too long error

* Fix broken test

* Fix broken test

* Fix broken test

* Clean up test

* Fix broken test

* Fix broken test

* Revert fix

* Fix broken test

* Revert destroySession change

* Fix user test

Co-authored-by: Jeffrey Layanto <jeffrey@layanto.com>
2020-05-13 06:57:51 -07:00
Andreas Siegel
d07c87fae9 Add support for filters in change feed (#111)
* Add find to doc functions

* Replace const by var

* Merge upstream

* Add support for filtered changes
2019-04-03 06:50:43 -07:00
Jeffrey Layanto
f23c3b26ca Fix cookie authentication in node and browser (#108)
* Pass slouch in when instantiating EnhancedRequest

This is to allow EnhanceRequest to access slouch._requestWrapper.setCookie

* Update locally stored cookie when response has set-cookie header

* Delete unused this._cookie

* Fix cookie-authentication in browser

* Fix test

Request header now always include withCredentials: true

* Fix test

EnhancedRequest constructor now requires instance of Slouch

* Typo

* Fix test

* Remove TODO comment and clean up redundant code

* Revert change to user.js

* Fix user test spec

* Fix user test spec

* Fix browser coverage test fail

* FIx beautify test fail

* Fix failed jshint test
2019-03-21 19:55:59 -07:00
Andreas Siegel
6e2676b09b Add doc.find() (#102)
* Add find to doc functions

* Replace const by var
2019-01-04 11:40:31 -06:00
Geoff Cox
b59ec8795e
test(circleci): upgrade to 2.0 (#80)
* test(circleci): upgrade to 2.0

* test(circleci): extra space

* doc(testing): headless chrome

* test(chrome): tweaks for chrome

* fix(packages): memorystream no longer needed
2018-03-12 19:53:10 -07:00
Geoff Cox
bac8a620cb
fix(reconnect): reconnect even when no data (#73)
* fix(reconnect): reconnect even when no data

* test(db): allow time to reconnect
2018-01-31 17:17:14 -08:00
Geoff Cox
bd70d67552
fix(log): censor passwords (#63)
* fix(log): censor passwords

* feat(couch-persistent-stream-iterator): add request opts
2017-12-08 17:06:15 -08:00
Geoff Cox
0adbd365ad
fix(circleci): use port 15984 (#62)
* fix(circleci): use port 15984

* fix(circleci): use config for port

* fix(jshint)

* fix(circleci): 15984
2017-12-08 14:58:04 -08:00
urdeveloper
21c73ffb26 Encode database names and document Ids used n Urls (#55)
* Encode database names and document Ids used n Urls

* Encode viewDocId as well and add the corresponding test cases.

* Fix jshint errors
2017-12-06 16:44:06 -08:00
Geoff Cox
c9ee77e393
refactor(doc): expose updateOrIgnore (#52)
* refactor(doc): expose updateOrIgnore

* fix(doc): missing Promise require
2017-11-18 20:58:30 -08:00
Geoff Cox
02844c8dee fix(reset): prevent noise in _global_changes 2017-11-07 06:38:25 -08:00
Geoff Cox
223b91fa4d feat(force-reconnect) 2017-11-03 12:41:19 -07:00
Geoff Cox
477f50b2ee feat(db): changes array 2017-10-27 07:25:59 -07:00
Geoff Cox
5be5b27b13 feat(doc): bulk create or update 2017-10-11 14:17:42 -07:00
Geoff Cox
27339bbd2a fix(doc): update should return new rev 2017-10-10 14:13:38 -07:00
Geoff Cox
06416ee915 test(changes): workaround for phantomjs 2017-10-07 19:31:06 -07:00
Geoff Cox
059c66f5c7 fix(changes): resume on reconnect 2017-10-06 15:50:26 -07:00
Geoff Cox
bdcb25c382 test(changes): resume fails 2017-10-06 15:30:15 -07:00
Geoff Cox
4f8d22e119 fix(test): race conditions (#35)
* test(exclude-design-docs): cannot guarantee order

* fix(test): 10s is not always long enough

* fix(test): 15s is not always long enough
2017-10-06 14:51:39 -07:00
standup75
ef15df6bc9 Added onlyUserCanView (#28)
* Added onlyUserCanView

* Added tests

* removed test/README.md

* Beatified and fixed jshint error
2017-09-26 11:13:58 -07:00
Geoff Cox
cf43f23e7e fix(config): each node needs its own opts 2017-09-25 16:44:03 -07:00
Geoff Cox
54a60e7a21 feat(auth): cookie authentication in node (#27)
* feat(cookie): request-wrapper

* test(request-wrapper): 100% coverage

* test(browser): 100% coverage

* refactor(request-class): rename to enhanced-request

* feat(get-session)

* feat(enhanced-request): full response

* refactor(enhanced-request): enhanced opts

* feat(example): authentication
2017-09-23 04:49:07 -07:00
Geoff Cox
25b4bc1fdb feat(persist-through-conflicts): use exponential backoff 2017-09-13 16:07:14 -07:00
Geoff Cox
d48a43efda fix(user): sort roles 2017-09-05 15:15:22 -07:00
Geoff Cox
5d9f13669a test(user): ignore if no conflicts 2017-09-05 14:35:20 -07:00
Geoff Cox
ddaa14bb0e feat(user): resolve conflicts 2017-09-05 14:15:49 -07:00
Geoff Cox
49d9a2ea01 feat(ignore-dup-updates) 2017-08-31 06:10:17 -07:00
Geoff Cox
9ea044563f fix(couch-persistent-stream-iterator): handle authentication errors 2017-07-28 14:34:50 -07:00
Geoff Cox
f830ee2ba5 test(couchdb-1) (#7)
* test(couchdb-1)

* test(couchdb-1)

* fix(couchdb-1): cross-browser config

* test(updates): really needs to be continuous

* test(membership): coverage in couchdb 1

* test(couchdb-1): disable for circleci
2017-07-18 09:14:16 -07:00
Geoff Cox
13a468c309 chore(version): 0.0.2 2017-07-18 07:47:47 -07:00
Geoff Cox
da7ca1123e 100% coverage (#4)
* doc(readme): clean up reasons

* doc(motto)

* test(db-and-doc): more coverage

* test(create-or-update-ignore-conflict)

* test(upsert)

* test(ignore-missing)

* test(post-and-ignore-conflict)

* test(get-merge-put)

* refactor(all): rename post and put

* test(get-merge-create-or-update)

* test(get-merge-update-ignore-conflict)

* test(get-merge-upsert)

* test(get-modify-upsert)

* refactor(doc): redundant code

* test(destroy-ignore-conflict)

* test(get-and-destroy)

* test(mark-as-destroyed)

* test(set-destroyed)

* refactor(attachment)

* test(doc): 100% coverage

* test(attachment): create with base 64

* test(attachment): clean up binary code

* test(attachment): get

* test(attachment): destroy

* test(system): is couchdb 1

* test(system): get

* test(system): reset

* test(updates)

* test(updates)

* test(all): unique DB names

* test(system): reactivate tests

* test(user): add role

* test(user): downsert role

* feat(stream-iterator): indefinite

* test(user): 100% coverage

* test(request-class)

* test(request-class): 100% coverage

* test(config)

* test(config): more coverage

* test(config): more coverage

* test(config): 100% coverage

* test(all): 100% coverage

* refactor(beautify)

* test(coverage): enforce 100%

* test(system): fix race condition

* test(user): shortcut for browser

* test(updates): test continuous stream in phantomjs

* test(updates): test continuous stream in phantomjs

* test(continuous): mock for phantomjs

* test(system): abort iterators

* test(system): fake abort
2017-07-18 07:45:32 -07:00
Geoff Cox
559b1a750c refactor(all): simplify naming (#3)
* refactor(db): split up

* refactor(all)

* refactor(db)

* refactor(doc)

* refactor(security)

* refactor(common)

* refactor(view)

* refactor(system)

* refactor(config)

* refactor(user)

* refactor(jshint)

* test(db): all

* test(user)

* refactor(test): remove old

* test(exclude-design-docs-iterator)

* refactor(old): remove old files

* refactor(move): move new files from fomo

* refactor(jshint)
2017-07-13 23:48:34 -07:00
Geoff Cox
b7bf7c0bb6 initial (#1)
* initial

* feat(exclude-design-docs-iterator)

* fix(request): need to define unescape

* test(request): ECONNREFUSED/ENOTFOUND errors in different browsers

* test(circleci): run couchdb

* test(circleci): enable cors

* test(coverage): disable check for now

* test(circleci): missing nvm
2017-07-12 23:50:23 -07:00
Geoff Cox
bca9ecb9be initial 2017-07-11 22:22:43 -07:00