This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathnpm-debug.log
104 lines (104 loc) · 28.8 KB
/
npm-debug.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'publish' ]
2 info using [email protected]
3 info using [email protected]
4 verbose publish [ '.' ]
5 silly cache add args [ '.', null ]
6 verbose cache add spec .
7 silly cache add parsed spec { raw: '.',
7 silly cache add scope: null,
7 silly cache add name: null,
7 silly cache add rawSpec: '.',
7 silly cache add spec: '/home/mattange/git/loopback-connector-couch',
7 silly cache add type: 'directory' }
8 verbose tar pack [ '/home/mattange/.npm/loopback-connector-couch/0.1.0/package.tgz',
8 verbose tar pack '/home/mattange/git/loopback-connector-couch' ]
9 verbose tarball /home/mattange/.npm/loopback-connector-couch/0.1.0/package.tgz
10 verbose folder /home/mattange/git/loopback-connector-couch
11 info prepublish [email protected]
12 verbose addLocalTarball adding from inside cache /home/mattange/.npm/loopback-connector-couch/0.1.0/package.tgz
13 silly cache afterAdd [email protected]
14 verbose afterAdd /home/mattange/.npm/loopback-connector-couch/0.1.0/package/package.json not in flight; writing
15 verbose afterAdd /home/mattange/.npm/loopback-connector-couch/0.1.0/package/package.json written
16 silly publish { name: 'loopback-connector-couch',
16 silly publish version: '0.1.0',
16 silly publish description: 'CouchDB adapter for Loopback.io',
16 silly publish keywords:
16 silly publish [ 'strongloop',
16 silly publish 'loopback',
16 silly publish 'connector',
16 silly publish 'couch',
16 silly publish 'CouchDB',
16 silly publish 'loopback-connector' ],
16 silly publish main: 'index.js',
16 silly publish contributors: [ { name: 'Matteo Angeloni', email: '[email protected]' } ],
16 silly publish dependencies: { debug: '^2.1.0', lodash: '^2.4.1', nano: '^6.0.2' },
16 silly publish devDependencies: { grunt: '^0.4.5', 'grunt-contrib-coffee': '^0.12.0' },
16 silly publish repository:
16 silly publish { type: 'git',
16 silly publish url: 'https://github.com/mattange/loopback-connector-couch.git' },
16 silly publish author: { name: 'Matteo Angeloni', email: '[email protected]' },
16 silly publish license: 'MIT',
16 silly publish gitHead: 'ec6ad0149288bda877e6bbd97aa81936655b3684',
16 silly publish readme: '## loopback-connector-couch\n\nCouchDB connector for Loopback.io. \nHeavily borrowing from the original CouchDB-nano adapter for jugglingdb by Nicholas Westlake and Anatoliy Chakkaev, but adapted/partially rewritten for use with Loopback.io.\nYou need to have CoffeeScript if you want to adapt it. \n\n## Compilation\nUse `grunt` to produce end file in `./lib`. Else, use directly the provided version or modify Gruntfile as you need.\n\n## Working with your database\nUpon initialisation, you can specify different authorisations, and up to 3 different connections will be established to the database: one for reader, one for writer and one for admin (see below why you need an admin one).\n\n## Usage\n\nTo use it you need to load the loopback-connector-juggler first if used programmatically, as any other connector.\nOtherwise, set things up in your datasources.json (see Loopback.io documentation for details):\n\n``` \t\n"YOURDATASOURCENAME": {\n\t"name": "YOURDATASOURCENAME",\t//Loopback.io - mandatory\n\t"connector": "couch",\t\t\t//Loopback.io - mandatory\n\t"db": "DBNAME",\t\t\t\t\t//"db" or "database" - required\n\t"host": "127.0.0.1",\t\t\t//this is also the default if not included\n\t"port": 5984,\t\t\t\t\t//this is also the default if not included\n\t"protocol": "http",\t\t\t\t//this is also the default if not included\n\t"auth": {\t\t\t\t\t\t//optional, including each of its members\n\t\t\t"admin": {\n\t\t\t\t"username": "YOURUSERNAME_ADMIN",\n\t\t\t\t"password": "YOURPASSWORD_ADMIN"\n\t\t\t},\n\t\t\t"reader": {\n\t\t\t\t"username": "YOURUSERNAME_READER",\n\t\t\t\t"password": "YOURPASSWORD_READER"\n\t\t\t},\n\t\t\t"writer": {\n\t\t\t\t"username": "YOURUSERNAME_WRITER",\n\t\t\t\t"password": "YOURPASSWORD_WRITER"\n\t\t\t}\n\t},\n\t"views": [\t\t\t\t\t\t//optional\n\t\t{\n\t\t\t"ddoc": "existing_design_document",\n\t\t\t"name": "existing_design_document_view"\n\t\t},\n\t\t...\n\t]\n}\n```\n \n### Automatic creation of views for indexes\n\nThis adapter will automatically a number of design documents on your database:\n 1. `\\_design/loopback` document contains `by_model` view that maps documents to their model name (set as property in the model as "loopbackModel"). To do so, authorisation enabled to modify design documents is required in the parameters if the CouchDB server is not in party mode.\n 2. For each model that has at least one property with `index: true` it will create one design document named `\\_design/loopback_<modelName>` and one view named `by_<propertyName>` for each indexed property. Again, authorisation enabled to modify design documents is required.\n 3. Additional views can be queried if appropriately set up at initialization in the `views` option. \n\n### Automatic use of created views\n\nDuring querying of database for standard Loopback.io API endpoints this adapter will:\n 1. Try to automatically leverage the views it created if an indexed property is used in `where`.\n 2. Fallback to using `loopback/by_model` view to reduce the number of documents it has to load and scan.\n\n### Query parameters and other details\n\n- All queries to the database use `include_docs` set to `true`\n- Loopback\'s `offset` is used as `skip` query parameter \n- Loopback\'s `limit` is used as `limit` query parameter\n- Both `offset` and `limit` are ignored in the request if a specific `id` is requested via `where` (e.g. `{"where": {"id":"someID"}}`). If `where` is included (e.g. `{"where":{"foo":"bar"}}`), then the results are retrieved in their entirety, then filtered via `where` and then `offset` and `limit`, so that for example all items that satisfy the `where` criteria can be retrieved in various paginated requests.\n\n## Known caveats\n\n- `queryView` API endpoint (only generated if the options specify additional views to be made available in the CouchDB database) will return the output of the view (with specific keys as requested), that may or may not be linked to the Model being used for the query, if the same CouchDB database is used for multiple document types: fundamentally, no checks are done on the output of the view (other than any _id into id and removing loopbackModel property in case present).\n- `PUT /modelName/{id} | updateAttributes` API endpoint will work as expected, but will not return the updated `_rev` (working to solve that issue). Consider updating the entire document via `PUT /modelName`, as that will allow to update the `_rev` in the response.\n\n## MIT License\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the "Software"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n\n',
16 silly publish readmeFilename: 'README.md',
16 silly publish bugs: { url: 'https://github.com/mattange/loopback-connector-couch/issues' },
16 silly publish homepage: 'https://github.com/mattange/loopback-connector-couch',
16 silly publish _id: '[email protected]',
16 silly publish scripts: {},
16 silly publish _shasum: '82a225c14245763a23a22280f8f0a84f3e8e8ce8',
16 silly publish _from: '.' }
17 silly mapToRegistry name loopback-connector-couch
18 silly mapToRegistry using default registry
19 silly mapToRegistry registry https://registry.npmjs.org/
20 silly mapToRegistry uri https://registry.npmjs.org/loopback-connector-couch
21 verbose publish registryBase https://registry.npmjs.org/
22 silly publish uploading /home/mattange/.npm/loopback-connector-couch/0.1.0/package.tgz
23 verbose request uri https://registry.npmjs.org/loopback-connector-couch
24 verbose request sending authorization for write operation
25 info attempt registry request try #1 at 15:46:04
26 verbose request id e40ecb18052742a9
27 http request PUT https://registry.npmjs.org/loopback-connector-couch
28 http 403 https://registry.npmjs.org/loopback-connector-couch
29 verbose headers { date: 'Sun, 01 Mar 2015 15:46:06 GMT',
29 verbose headers server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
29 verbose headers 'content-type': 'application/json',
29 verbose headers 'cache-control': 'max-age=60',
29 verbose headers 'content-length': '9798',
29 verbose headers 'accept-ranges': 'bytes',
29 verbose headers via: '1.1 varnish',
29 verbose headers 'x-served-by': 'cache-fra1228-FRA',
29 verbose headers 'x-cache': 'MISS',
29 verbose headers 'x-cache-hits': '0',
29 verbose headers 'x-timer': 'S1425224765.749967,VS0,VE490',
29 verbose headers 'keep-alive': 'timeout=10, max=50',
29 verbose headers connection: 'Keep-Alive' }
30 verbose request invalidating /home/mattange/.npm/registry.npmjs.org/loopback-connector-couch on PUT
31 error publish Failed PUT 403
32 verbose stack Error: forbidden cannot modify pre-existing version: 0.1.0
32 verbose stack old={"name":"loopback-connector-couch","version":"0.1.0","description":"CouchDB adapter for Loopback.io","keywords":["strongloop","loopback","connector","couch","CouchDB","loopback-connector"],"main":"index.js","contributors":[{"name":"Matteo Angeloni","email":"[email protected]"}],"dependencies":{"lodash":"^2.4.1","nano":"^6.0.2"},"devDependencies":{"debug":"^2.1.0","grunt":"^0.4.5","grunt-contrib-coffee":"^0.12.0"},"repository":{"type":"git","url":"https://github.com/mattange/loopback-connector-couch.git"},"author":{"name":"Matteo Angeloni","email":"[email protected]"},"license":"MIT","gitHead":"2ff80df83bb4cfc0003656ff3a5f7ad0b9f1b011","bugs":{"url":"https://github.com/mattange/loopback-connector-couch/issues"},"homepage":"https://github.com/mattange/loopback-connector-couch","_id":"[email protected]","scripts":{},"_shasum":"8764550edc9e28a5e7f4078eb0127f23e22afc8a","_from":"loopback-connector-couch","_resolved":"file:loopback-connector-couch","_npmVersion":"2.1.8","_nodeVersion":"0.10.33","_npmUser":{"name":"mattange","email":"[email protected]"},"maintainers":[{"name":"mattange","email":"[email protected]"}],"dist":{"shasum":"8764550edc9e28a5e7f4078eb0127f23e22afc8a","tarball":"http://registry.npmjs.org/loopback-connector-couch/-/loopback-connector-couch-0.1.0.tgz"}}
32 verbose stack new={"name":"loopback-connector-couch","version":"0.1.0","description":"CouchDB adapter for Loopback.io","keywords":["strongloop","loopback","connector","couch","CouchDB","loopback-connector"],"main":"index.js","contributors":[{"name":"Matteo Angeloni","email":"[email protected]"}],"dependencies":{"debug":"^2.1.0","lodash":"^2.4.1","nano":"^6.0.2"},"devDependencies":{"grunt":"^0.4.5","grunt-contrib-coffee":"^0.12.0"},"repository":{"type":"git","url":"https://github.com/mattange/loopback-connector-couch.git"},"author":{"name":"Matteo Angeloni","email":"[email protected]"},"license":"MIT","gitHead":"ec6ad0149288bda877e6bbd97aa81936655b3684","readme":"## loopback-connector-couch\u000a\u000aCouchDB connector for Loopback.io. \u000aHeavily borrowing from the original CouchDB-nano adapter for jugglingdb by Nicholas Westlake and Anatoliy Chakkaev, but adapted/partially rewritten for use with Loopback.io.\u000aYou need to have CoffeeScript if you want to adapt it. \u000a\u000a## Compilation\u000aUse `grunt` to produce end file in `./lib`. Else, use directly the provided version or modify Gruntfile as you need.\u000a\u000a## Working with your database\u000aUpon initialisation, you can specify different authorisations, and up to 3 different connections will be established to the database: one for reader, one for writer and one for admin (see below why you need an admin one).\u000a\u000a## Usage\u000a\u000aTo use it you need to load the loopback-connector-juggler first if used programmatically, as any other connector.\u000aOtherwise, set things up in your datasources.json (see Loopback.io documentation for details):\u000a\u000a``` \u0009\u000a\"YOURDATASOURCENAME\": {\u000a\u0009\"name\": \"YOURDATASOURCENAME\",\u0009//Loopback.io - mandatory\u000a\u0009\"connector\": \"couch\",\u0009\u0009\u0009//Loopback.io - mandatory\u000a\u0009\"db\": \"DBNAME\",\u0009\u0009\u0009\u0009\u0009//\"db\" or \"database\" - required\u000a\u0009\"host\": \"127.0.0.1\",\u0009\u0009\u0009//this is also the default if not included\u000a\u0009\"port\": 5984,\u0009\u0009\u0009\u0009\u0009//this is also the default if not included\u000a\u0009\"protocol\": \"http\",\u0009\u0009\u0009\u0009//this is also the default if not included\u000a\u0009\"auth\": {\u0009\u0009\u0009\u0009\u0009\u0009//optional, including each of its members\u000a\u0009\u0009\u0009\"admin\": {\u000a\u0009\u0009\u0009\u0009\"username\": \"YOURUSERNAME_ADMIN\",\u000a\u0009\u0009\u0009\u0009\"password\": \"YOURPASSWORD_ADMIN\"\u000a\u0009\u0009\u0009},\u000a\u0009\u0009\u0009\"reader\": {\u000a\u0009\u0009\u0009\u0009\"username\": \"YOURUSERNAME_READER\",\u000a\u0009\u0009\u0009\u0009\"password\": \"YOURPASSWORD_READER\"\u000a\u0009\u0009\u0009},\u000a\u0009\u0009\u0009\"writer\": {\u000a\u0009\u0009\u0009\u0009\"username\": \"YOURUSERNAME_WRITER\",\u000a\u0009\u0009\u0009\u0009\"password\": \"YOURPASSWORD_WRITER\"\u000a\u0009\u0009\u0009}\u000a\u0009},\u000a\u0009\"views\": [\u0009\u0009\u0009\u0009\u0009\u0009//optional\u000a\u0009\u0009{\u000a\u0009\u0009\u0009\"ddoc\": \"existing_design_document\",\u000a\u0009\u0009\u0009\"name\": \"existing_design_document_view\"\u000a\u0009\u0009},\u000a\u0009\u0009...\u000a\u0009]\u000a}\u000a```\u000a \u000a### Automatic creation of views for indexes\u000a\u000aThis adapter will automatically a number of design documents on your database:\u000a 1. `\\_design/loopback` document contains `by_model` view that maps documents to their model name (set as property in the model as \"loopbackModel\"). To do so, authorisation enabled to modify design documents is required in the parameters if the CouchDB server is not in party mode.\u000a 2. For each model that has at least one property with `index: true` it will create one design document named `\\_design/loopback_<modelName>` and one view named `by_<propertyName>` for each indexed property. Again, authorisation enabled to modify design documents is required.\u000a 3. Additional views can be queried if appropriately set up at initialization in the `views` option. \u000a\u000a### Automatic use of created views\u000a\u000aDuring querying of database for standard Loopback.io API endpoints this adapter will:\u000a 1. Try to automatically leverage the views it created if an indexed property is used in `where`.\u000a 2. Fallback to using `loopback/by_model` view to reduce the number of documents it has to load and scan.\u000a\u000a### Query parameters and other details\u000a\u000a- All queries to the database use `include_docs` set to `true`\u000a- Loopback's `offset` is used as `skip` query parameter \u000a- Loopback's `limit` is used as `limit` query parameter\u000a- Both `offset` and `limit` are ignored in the request if a specific `id` is requested via `where` (e.g. `{\"where\": {\"id\":\"someID\"}}`). If `where` is included (e.g. `{\"where\":{\"foo\":\"bar\"}}`), then the results are retrieved in their entirety, then filtered via `where` and then `offset` and `limit`, so that for example all items that satisfy the `where` criteria can be retrieved in various paginated requests.\u000a\u000a## Known caveats\u000a\u000a- `queryView` API endpoint (only generated if the options specify additional views to be made available in the CouchDB database) will return the output of the view (with specific keys as requested), that may or may not be linked to the Model being used for the query, if the same CouchDB database is used for multiple document types: fundamentally, no checks are done on the output of the view (other than any _id into id and removing loopbackModel property in case present).\u000a- `PUT /modelName/{id} | updateAttributes` API endpoint will work as expected, but will not return the updated `_rev` (working to solve that issue). Consider updating the entire document via `PUT /modelName`, as that will allow to update the `_rev` in the response.\u000a\u000a## MIT License\u000a\u000a Permission is hereby granted, free of charge, to any person obtaining a copy\u000a of this software and associated documentation files (the \"Software\"), to deal\u000a in the Software without restriction, including without limitation the rights\u000a to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\u000a copies of the Software, and to permit persons to whom the Software is\u000a furnished to do so, subject to the following conditions:\u000a\u000a The above copyright notice and this permission notice shall be included in\u000a all copies or substantial portions of the Software.\u000a\u000a THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\u000a IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\u000a FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\u000a AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\u000a LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\u000a OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\u000a THE SOFTWARE.\u000a\u000a","readmeFilename":"README.md","bugs":{"url":"https://github.com/mattange/loopback-connector-couch/issues"},"homepage":"https://github.com/mattange/loopback-connector-couch","_id":"[email protected]","scripts":{},"_shasum":"82a225c14245763a23a22280f8f0a84f3e8e8ce8","_from":".","_npmVersion":"2.1.8","_nodeVersion":"0.10.33","_npmUser":{"name":"mattange","email":"[email protected]"},"maintainers":[{"name":"mattange","email":"[email protected]"}],"dist":{"shasum":"82a225c14245763a23a22280f8f0a84f3e8e8ce8","tarball":"http://registry.npmjs.org/loopback-connector-couch/-/loopback-connector-couch-0.1.0.tgz"}}: loopback-connector-couch
32 verbose stack at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:234:14)
32 verbose stack at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:172:14)
32 verbose stack at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:372:22)
32 verbose stack at Request.emit (events.js:98:17)
32 verbose stack at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1310:14)
32 verbose stack at Request.emit (events.js:117:20)
32 verbose stack at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1258:12)
32 verbose stack at IncomingMessage.emit (events.js:117:20)
32 verbose stack at _stream_readable.js:943:16
32 verbose stack at process._tickCallback (node.js:419:13)
33 verbose statusCode 403
34 verbose pkgid loopback-connector-couch
35 verbose cwd /home/mattange/git/loopback-connector-couch
36 error Linux 3.13.0-46-generic
37 error argv "node" "/usr/local/bin/npm" "publish"
38 error node v0.10.33
39 error npm v2.1.8
40 error code E403
41 error forbidden cannot modify pre-existing version: 0.1.0
41 error old={"name":"loopback-connector-couch","version":"0.1.0","description":"CouchDB adapter for Loopback.io","keywords":["strongloop","loopback","connector","couch","CouchDB","loopback-connector"],"main":"index.js","contributors":[{"name":"Matteo Angeloni","email":"[email protected]"}],"dependencies":{"lodash":"^2.4.1","nano":"^6.0.2"},"devDependencies":{"debug":"^2.1.0","grunt":"^0.4.5","grunt-contrib-coffee":"^0.12.0"},"repository":{"type":"git","url":"https://github.com/mattange/loopback-connector-couch.git"},"author":{"name":"Matteo Angeloni","email":"[email protected]"},"license":"MIT","gitHead":"2ff80df83bb4cfc0003656ff3a5f7ad0b9f1b011","bugs":{"url":"https://github.com/mattange/loopback-connector-couch/issues"},"homepage":"https://github.com/mattange/loopback-connector-couch","_id":"[email protected]","scripts":{},"_shasum":"8764550edc9e28a5e7f4078eb0127f23e22afc8a","_from":"loopback-connector-couch","_resolved":"file:loopback-connector-couch","_npmVersion":"2.1.8","_nodeVersion":"0.10.33","_npmUser":{"name":"mattange","email":"[email protected]"},"maintainers":[{"name":"mattange","email":"[email protected]"}],"dist":{"shasum":"8764550edc9e28a5e7f4078eb0127f23e22afc8a","tarball":"http://registry.npmjs.org/loopback-connector-couch/-/loopback-connector-couch-0.1.0.tgz"}}
41 error new={"name":"loopback-connector-couch","version":"0.1.0","description":"CouchDB adapter for Loopback.io","keywords":["strongloop","loopback","connector","couch","CouchDB","loopback-connector"],"main":"index.js","contributors":[{"name":"Matteo Angeloni","email":"[email protected]"}],"dependencies":{"debug":"^2.1.0","lodash":"^2.4.1","nano":"^6.0.2"},"devDependencies":{"grunt":"^0.4.5","grunt-contrib-coffee":"^0.12.0"},"repository":{"type":"git","url":"https://github.com/mattange/loopback-connector-couch.git"},"author":{"name":"Matteo Angeloni","email":"[email protected]"},"license":"MIT","gitHead":"ec6ad0149288bda877e6bbd97aa81936655b3684","readme":"## loopback-connector-couch\u000a\u000aCouchDB connector for Loopback.io. \u000aHeavily borrowing from the original CouchDB-nano adapter for jugglingdb by Nicholas Westlake and Anatoliy Chakkaev, but adapted/partially rewritten for use with Loopback.io.\u000aYou need to have CoffeeScript if you want to adapt it. \u000a\u000a## Compilation\u000aUse `grunt` to produce end file in `./lib`. Else, use directly the provided version or modify Gruntfile as you need.\u000a\u000a## Working with your database\u000aUpon initialisation, you can specify different authorisations, and up to 3 different connections will be established to the database: one for reader, one for writer and one for admin (see below why you need an admin one).\u000a\u000a## Usage\u000a\u000aTo use it you need to load the loopback-connector-juggler first if used programmatically, as any other connector.\u000aOtherwise, set things up in your datasources.json (see Loopback.io documentation for details):\u000a\u000a``` \u0009\u000a\"YOURDATASOURCENAME\": {\u000a\u0009\"name\": \"YOURDATASOURCENAME\",\u0009//Loopback.io - mandatory\u000a\u0009\"connector\": \"couch\",\u0009\u0009\u0009//Loopback.io - mandatory\u000a\u0009\"db\": \"DBNAME\",\u0009\u0009\u0009\u0009\u0009//\"db\" or \"database\" - required\u000a\u0009\"host\": \"127.0.0.1\",\u0009\u0009\u0009//this is also the default if not included\u000a\u0009\"port\": 5984,\u0009\u0009\u0009\u0009\u0009//this is also the default if not included\u000a\u0009\"protocol\": \"http\",\u0009\u0009\u0009\u0009//this is also the default if not included\u000a\u0009\"auth\": {\u0009\u0009\u0009\u0009\u0009\u0009//optional, including each of its members\u000a\u0009\u0009\u0009\"admin\": {\u000a\u0009\u0009\u0009\u0009\"username\": \"YOURUSERNAME_ADMIN\",\u000a\u0009\u0009\u0009\u0009\"password\": \"YOURPASSWORD_ADMIN\"\u000a\u0009\u0009\u0009},\u000a\u0009\u0009\u0009\"reader\": {\u000a\u0009\u0009\u0009\u0009\"username\": \"YOURUSERNAME_READER\",\u000a\u0009\u0009\u0009\u0009\"password\": \"YOURPASSWORD_READER\"\u000a\u0009\u0009\u0009},\u000a\u0009\u0009\u0009\"writer\": {\u000a\u0009\u0009\u0009\u0009\"username\": \"YOURUSERNAME_WRITER\",\u000a\u0009\u0009\u0009\u0009\"password\": \"YOURPASSWORD_WRITER\"\u000a\u0009\u0009\u0009}\u000a\u0009},\u000a\u0009\"views\": [\u0009\u0009\u0009\u0009\u0009\u0009//optional\u000a\u0009\u0009{\u000a\u0009\u0009\u0009\"ddoc\": \"existing_design_document\",\u000a\u0009\u0009\u0009\"name\": \"existing_design_document_view\"\u000a\u0009\u0009},\u000a\u0009\u0009...\u000a\u0009]\u000a}\u000a```\u000a \u000a### Automatic creation of views for indexes\u000a\u000aThis adapter will automatically a number of design documents on your database:\u000a 1. `\\_design/loopback` document contains `by_model` view that maps documents to their model name (set as property in the model as \"loopbackModel\"). To do so, authorisation enabled to modify design documents is required in the parameters if the CouchDB server is not in party mode.\u000a 2. For each model that has at least one property with `index: true` it will create one design document named `\\_design/loopback_<modelName>` and one view named `by_<propertyName>` for each indexed property. Again, authorisation enabled to modify design documents is required.\u000a 3. Additional views can be queried if appropriately set up at initialization in the `views` option. \u000a\u000a### Automatic use of created views\u000a\u000aDuring querying of database for standard Loopback.io API endpoints this adapter will:\u000a 1. Try to automatically leverage the views it created if an indexed property is used in `where`.\u000a 2. Fallback to using `loopback/by_model` view to reduce the number of documents it has to load and scan.\u000a\u000a### Query parameters and other details\u000a\u000a- All queries to the database use `include_docs` set to `true`\u000a- Loopback's `offset` is used as `skip` query parameter \u000a- Loopback's `limit` is used as `limit` query parameter\u000a- Both `offset` and `limit` are ignored in the request if a specific `id` is requested via `where` (e.g. `{\"where\": {\"id\":\"someID\"}}`). If `where` is included (e.g. `{\"where\":{\"foo\":\"bar\"}}`), then the results are retrieved in their entirety, then filtered via `where` and then `offset` and `limit`, so that for example all items that satisfy the `where` criteria can be retrieved in various paginated requests.\u000a\u000a## Known caveats\u000a\u000a- `queryView` API endpoint (only generated if the options specify additional views to be made available in the CouchDB database) will return the output of the view (with specific keys as requested), that may or may not be linked to the Model being used for the query, if the same CouchDB database is used for multiple document types: fundamentally, no checks are done on the output of the view (other than any _id into id and removing loopbackModel property in case present).\u000a- `PUT /modelName/{id} | updateAttributes` API endpoint will work as expected, but will not return the updated `_rev` (working to solve that issue). Consider updating the entire document via `PUT /modelName`, as that will allow to update the `_rev` in the response.\u000a\u000a## MIT License\u000a\u000a Permission is hereby granted, free of charge, to any person obtaining a copy\u000a of this software and associated documentation files (the \"Software\"), to deal\u000a in the Software without restriction, including without limitation the rights\u000a to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\u000a copies of the Software, and to permit persons to whom the Software is\u000a furnished to do so, subject to the following conditions:\u000a\u000a The above copyright notice and this permission notice shall be included in\u000a all copies or substantial portions of the Software.\u000a\u000a THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\u000a IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\u000a FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\u000a AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\u000a LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\u000a OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\u000a THE SOFTWARE.\u000a\u000a","readmeFilename":"README.md","bugs":{"url":"https://github.com/mattange/loopback-connector-couch/issues"},"homepage":"https://github.com/mattange/loopback-connector-couch","_id":"[email protected]","scripts":{},"_shasum":"82a225c14245763a23a22280f8f0a84f3e8e8ce8","_from":".","_npmVersion":"2.1.8","_nodeVersion":"0.10.33","_npmUser":{"name":"mattange","email":"[email protected]"},"maintainers":[{"name":"mattange","email":"[email protected]"}],"dist":{"shasum":"82a225c14245763a23a22280f8f0a84f3e8e8ce8","tarball":"http://registry.npmjs.org/loopback-connector-couch/-/loopback-connector-couch-0.1.0.tgz"}}: loopback-connector-couch
42 error If you need help, you may report this error at:
42 error <https://github.com/npm/npm/issues>
43 verbose exit [ 1, true ]