Skip to content

Commit b8bd2b5

Browse files
authored
Initial commit
0 parents  commit b8bd2b5

35 files changed

+5048
-0
lines changed

.eslintrc.cjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
node: true
6+
},
7+
extends: [
8+
'digitalbazaar',
9+
'digitalbazaar/jsdoc',
10+
'digitalbazaar/module'
11+
],
12+
ignorePatterns: ['node_modules/']
13+
};

.github/workflows/main.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Bedrock Node.js CI
2+
3+
on: [push]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 10
9+
strategy:
10+
matrix:
11+
node-version: [22.x]
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Use Node.js ${{ matrix.node-version }}
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: ${{ matrix.node-version }}
18+
- run: npm install
19+
- name: Run eslint
20+
run: npm run lint
21+
test-karma:
22+
needs: [lint]
23+
runs-on: ubuntu-latest
24+
timeout-minutes: 10
25+
strategy:
26+
matrix:
27+
node-version: [22.x]
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Use Node.js ${{ matrix.node-version }}
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: ${{ matrix.node-version }}
34+
- run: |
35+
npm install
36+
cd test
37+
npm install
38+
- name: Run test with Node.js ${{ matrix.node-version }} and Karma
39+
run: |
40+
cd test
41+
npm test
42+
coverage:
43+
needs: [test-karma]
44+
runs-on: ubuntu-latest
45+
timeout-minutes: 10
46+
strategy:
47+
matrix:
48+
node-version: [22.x]
49+
steps:
50+
- uses: actions/checkout@v4
51+
- name: Use Node.js ${{ matrix.node-version }}
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: ${{ matrix.node-version }}
55+
- run: |
56+
npm install
57+
cd test
58+
npm install
59+
- name: Generate coverage report
60+
run: |
61+
cd test
62+
npm run coverage-ci
63+
- name: Upload coverage to Codecov
64+
uses: codecov/codecov-action@v4
65+
with:
66+
file: ./test/coverage/lcov.info
67+
fail_ci_if_error: true
68+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*.log
2+
*.sw[nop]
3+
*~
4+
.nyc_output
5+
.project
6+
.settings
7+
.vscode
8+
TAGS
9+
coverage
10+
node_modules
11+
reports
12+
.cache

CHANGELOG.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# bedrock-web-pouch-edv ChangeLog
2+
3+
## 8.2.0 - 2025-07-18
4+
5+
### Changed
6+
- Update dependencies:
7+
- `@digitalbazaar/[email protected]`
8+
- `pouchdb@9`
9+
- `pouchdb-adapter-indexeddb@9`
10+
- `pouchdb-find@9`
11+
- dev deps and removal of `uuid`.
12+
- Note: While pouchdb* packages have been bumped by two major versions, no
13+
significant breaking changes are expected. The changes included internal
14+
ES5 => ES6+ API changes that were not relevant here and a new default
15+
limit on `find()` queries of `25`, but every `find()` query is already
16+
expected to have provided a default or a default is provided by this
17+
library.
18+
19+
## 8.1.0 - 2023-11-07
20+
21+
### Added
22+
- Add new `cipherVersion` parameter to control whether the cipher version
23+
is "recommended" or "fips". The default (and previous only option)
24+
remains "recommended".
25+
26+
## 8.0.0 - 2023-10-16
27+
28+
### Changed
29+
- **BREAKING**: Drop support for Node.js < 18.
30+
- Use `@digitalbazaar/[email protected]` that drops support for Node.js < 18 and
31+
uses `@digitalbazaar/http-client@4` and `canonicalize@2`.
32+
33+
## 7.0.0 - 2022-08-19
34+
35+
### Changed
36+
- **BREAKING**: Use `exports` instead of `module`.
37+
- Update dependencies.
38+
- Lint module.
39+
40+
## 6.0.1 - 2022-05-30
41+
42+
### Fixed
43+
- Add purge operation to clean up deleted docs to prevent premature storage
44+
quota overflow.
45+
46+
## 6.0.0 - 2022-05-30
47+
48+
### Changed
49+
- **BREAKING**: Use `indexeddb` adapter instead of `idb` adapter. This version
50+
will also impose a `br_edv_` (bedrock EDV) prefix on database names,
51+
causing all new databases to be created, leaving old ones alone. There is
52+
no migration code available to convert an old database to a new one in this
53+
version.
54+
55+
## 5.0.0 - 2022-05-05
56+
57+
### Changed
58+
- **BREAKING**: Use `@digitalbazaar/edv-client@14` with new blind
59+
attributes version.
60+
61+
## 4.1.0 - 2022-05-03
62+
63+
### Changed
64+
- Improve pouchdb index performance by marking deleted EDV doc
65+
records with `_deleted` flag.
66+
67+
## 4.0.0 - 2022-04-05
68+
69+
### Changed
70+
- **BREAKING**: Rename package to `@bedrock/web-pouch-edv`.
71+
- **BREAKING**: Convert to module (ESM).
72+
- **BREAKING**: Remove default export.
73+
- **BREAKING**: Require node 14.x.
74+
75+
## 3.0.0 - 2022-03-01
76+
77+
### Changed
78+
- **BREAKING**: Use `@digitalbazaar/edv-client@13`.
79+
80+
## 2.0.1 - 2022-02-24
81+
82+
### Fixed
83+
- Provide alternative to `crypto.randomUUID` via `uuid` package.
84+
85+
## 2.0.0 - 2022-02-23
86+
87+
### Changed
88+
- **BREAKING**: Use `@digitalbazaar/edv-client@12`. This new version
89+
produces encrypted indexes differently (more privacy preserving)
90+
and is incompatible with the previous version.
91+
92+
## 1.2.0 - 2022-02-05
93+
94+
### Added
95+
- Add support for `limit` in EDV queries.
96+
97+
## 1.1.0 - 2022-02-03
98+
99+
### Added
100+
- Automatically initialize databases when using
101+
`PouchEdvClient` to generate a new EDV or load an one.
102+
103+
### Fixed
104+
- Fix `db.type()` deprecation warnings.
105+
- Prevent double initialization of databases.
106+
107+
## 1.0.1 - 2022-02-02
108+
109+
### Changed
110+
- Update dependencies.
111+
112+
## 1.0.0 - 2022-01-31
113+
114+
- See git history for changes.

LICENSE.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
Bedrock Non-Commercial License v1.0
2+
===================================
3+
4+
Copyright (c) 2011-2022 Digital Bazaar, Inc.
5+
All rights reserved.
6+
7+
Summary
8+
=======
9+
10+
This license allows the licensee to use Bedrock and its software modules
11+
for non-commercial purposes such as self-study, research, personal
12+
projects, or for evaluation purposes. If the licensee uses Bedrock
13+
directly or indirectly to generate revenue, or to provide products or
14+
services to more than 500 people (users), the licensee must immediately
15+
obtain a non-profit or commercial license.
16+
17+
Examples
18+
========
19+
20+
These are examples of cases that are allowed by this license:
21+
22+
* The licensee is an individual that creates Bedrock-dependent software for
23+
personal use only.
24+
* The licensee is an individual or group of students/researchers that uses
25+
Bedrock to experiment with an idea for a non-commercial project.
26+
* The licensee is a startup company that prototypes a Bedrock-dependent
27+
product before they have cash flow and will be testing the prototype
28+
software with less than 500 users. The service will not generate revenue
29+
of any kind.
30+
* The licensee is a for-profit organization that creates a product or
31+
service that is used by less than 500 users and is built with or
32+
integrates with Bedrock. The service must be exclusively provided for free
33+
and no parent, subsidiary, agent, or affiliate organization may profit
34+
from its use.
35+
36+
These cases require a non-profit or commercial license:
37+
38+
* The licensee is a non-profit that receives funding to create and/or run a
39+
Bedrock-dependent service.
40+
* The licensee is a startup company with Bedrock-dependent software that is
41+
funded by another organization.
42+
* The licensee is a startup company that is going into production with
43+
Bedrock-dependent software.
44+
* The licensee has more than 500 users using a Bedrock-dependent service
45+
either directly or indirectly.
46+
* The licensee is a medium to large organization that builds or integrates a
47+
commercial product or service with Bedrock.
48+
49+
THE LICENSE
50+
===========
51+
52+
This section and all subsequent sections of this document constitute the
53+
agreement between the licensee and Digital Bazaar, Inc.
54+
55+
DEFINITIONS
56+
===========
57+
58+
* Product - The Bedrock software and any modules associated with Bedrock
59+
where Digital Bazaar, Inc. owns the copyright.
60+
61+
CONDITIONS
62+
==========
63+
64+
Redistribution and use in source and binary forms, with or without
65+
modification, are permitted for NON-COMMERCIAL PURPOSES as long as the
66+
following conditions are met:
67+
68+
1. Any use of the Product must not generate revenue for the licensee or
69+
any parent, subsidiary, agent, or affiliate of the licensee. Use of
70+
Product includes, but is not limited to, interacting with any of the
71+
licensee's Product-dependent products or services over a network.
72+
73+
2. The aggregate number of individual people (users) of the licensee's
74+
products or services that use Product must be less than 500.
75+
76+
3. Redistributions of source code must retain the above copyright notice
77+
intact, this list of conditions and the following disclaimer.
78+
79+
4. Redistributions in binary form must reproduce the above copyright
80+
notice, this license and the following disclaimer in the documentation and
81+
on a web page available via interactive use and/or other materials
82+
provided with the distribution.
83+
84+
5. Neither the name of the copyright holder, the names of its
85+
contributors, nor any trademarks held by the copyright holder may be used
86+
to endorse or promote products or services built using the Product without
87+
specific prior written permission.
88+
89+
6. Any modifications are clearly outlined in release documentation and are
90+
specifically mentioned as not being a part of an official Product release.
91+
No additional restrictions to this license may be made when distributing
92+
modifications.
93+
94+
7. For the avoidance of doubt, this license prohibits sublicensing of the
95+
Product.
96+
97+
8. Any breach of this license by licensee must be resolved within 30 days.
98+
Failure to do so results in the termination of this license.
99+
100+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
101+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
102+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
103+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
104+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
105+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
106+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
107+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
108+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
109+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
110+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
111+
112+
To obtain a non-profit or commercial license for Product, please contact
113+
Digital Bazaar, Inc. at the following email address:
114+
115+
Digital Bazaar <[email protected]>

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# bedrock-web-pouch-edv

0 commit comments

Comments
 (0)