diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index d054c94b33..0000000000 --- a/.dockerignore +++ /dev/null @@ -1,8 +0,0 @@ -** - -!/package.json -!/bin/build-site.js -!/bin/install-jekyll.sh -!/package-lock.json -!/docs/Gemfile -!/docs/Gemfile.lock diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e422b22d7d..7110893cfc 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,11 +28,5 @@ jobs: persist-credentials: false - uses: ./.github/actions/install-node-package with: - node-version: 22 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.7 - bundler-cache: true - - run: sudo gem install bundler -v 2.1.4 - - run: npm run install-jekyll + node-version: 24 - run: BUILD=1 npm run build-site diff --git a/.gitignore b/.gitignore index 90f8ceec1e..a1758bd6f9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ tmp* /node_modules docs/_site docs/static/css -docs/.jekyll-cache npm-debug.log npm-debug.log.* *~ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b3832063f0..4d90220191 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -97,16 +97,7 @@ Now when you visit https://github.com/myfork/pouchdb there should be a button th Building PouchDB Documentation -------------------------------------- -The source for the website http://pouchdb.com is stored inside the `docs` directory of the PouchDB repository, you can make changes and submit pull requests as with any other patch. To build and view the website locally you will need to have the Ruby development package installed. -On Ubuntu this is done with: - - $ sudo apt install -y ruby-dev - -You then neet to install [jekyll](http://jekyllrb.com/) and a few other gems. Jekyll is installed using [bundler](http://bundler.io/) so you need to install that first. -On Ubuntu you will need root permissions to do this so prefix the ```gem``` command with ```sudo``` - - $ [sudo] gem install bundler - $ npm run install-jekyll +The source for the website http://pouchdb.com is stored inside the `docs` directory of the PouchDB repository, you can make changes and submit pull requests as with any other patch. If you haven't already done so, you'll also need to run `npm install` to pull in packages for the dev server: @@ -118,10 +109,6 @@ Now you can build the site and start the dev server with: You should now find the documentation at http://127.0.0.1:4000 -You can also build and run the documentation with docker: - - $ npm run dev-site-with-docker - Writing a PouchDB Blog Post -------------------------------------- @@ -166,7 +153,7 @@ Release Procedure * `npm run set-version -- $VERSION` * `npm run release`. Note that with 2FA in npm, it will request you an OTP for every package. * Copy the `dist/pouchdb*` files from the $VERSION tag on github, paste the release notes and add the distribution files to Github Releases, rename `pouchdb.min.js` to `pouchdb-$VERSION.min.js` (same with `pouchdb.js`) after you upload it. - * Update docs/_config.yml to the current version + * Update `docs/_data/site.yml` to the current version * Push updated versions to master * `npm run publish-site` diff --git a/bin/build-site.js b/bin/build-site.js index 94eea8a01d..55ca802c72 100755 --- a/bin/build-site.js +++ b/bin/build-site.js @@ -17,14 +17,6 @@ const POUCHDB_LESS = resolvePath('docs/src/less/pouchdb/pouchdb.less'); process.chdir('docs'); -async function checkJekyll() { - try { - await exec('bundle check'); - } catch (err) { - throw new Error('Jekyll is not installed. You need to do: npm run install-jekyll'); - } -} - async function buildCSS() { fs.mkdirSync(__dirname + '/../docs/static/css', { recursive:true }); const cmd = [ resolvePath('node_modules/less/bin/lessc'), POUCHDB_LESS ].join(' '); @@ -34,9 +26,9 @@ async function buildCSS() { console.log('Updated:', POUCHDB_CSS); } -async function buildJekyll() { - await exec('bundle exec jekyll build'); - console.log('=> Rebuilt jekyll'); +async function buildEleventy() { + await exec('npx @11ty/eleventy'); + console.log('=> Rebuilt eleventy'); highlightEs6(); console.log('=> Highlighted ES6'); @@ -83,9 +75,8 @@ function onError(err) { function buildEverything() { return Promise.resolve() - .then(checkJekyll) .then(buildCSS) - .then(buildJekyll) + .then(buildEleventy) .catch(onError); } @@ -95,24 +86,25 @@ function resolvePath(projectLocalPath) { if (!process.env.BUILD) { const http_server = require('http-server'); - const watchGlob = require('glob-watcher'); + const globWatcher = require('glob-watcher'); + const watchGlob = (path, fn) => globWatcher(path, () => fn().catch(console.log)); // Simpler ways of blacklisting certain paths here would be very welcome. fs.readdirSync('.') .forEach(path => { - if (path === '_site' || path.startsWith('Gemfile')) { + if (path === '_site') { return; } if (fs.statSync(path).isDirectory()) { - watchGlob(`${path}/**`, buildJekyll); + watchGlob(`${path}/**`, buildEleventy); } else { - watchGlob(path, buildJekyll); + watchGlob(path, buildEleventy); } }); - watchGlob('static/src/*/*.less', buildCSS); + watchGlob('src/less/**', buildCSS); http_server.createServer({root: '_site', cache: '-1'}).listen(4000); console.log('Server address: http://localhost:4000'); diff --git a/docs-dev.Dockerfile b/docs-dev.Dockerfile deleted file mode 100644 index b5b49782de..0000000000 --- a/docs-dev.Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -# maintain similarity to CI by using common base image: -FROM ubuntu:20.04 - -RUN apt-get update && \ - apt-get --yes install \ - build-essential \ - curl \ - ruby-full \ - && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# TODO confirm ruby version is 2.7... if it matters -RUN gem install bundler -v 2.1.4 - -ENV NODE_VERSION=22.12.0 -ENV NVM_DIR=/root/.nvm -RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash -RUN . "$NVM_DIR/nvm.sh" && nvm install 22 -ENV PATH="$NVM_DIR/versions/node/v${NODE_VERSION}/bin/:${PATH}" - -WORKDIR /pouchdb-docs - -COPY ./docs/ ./docs-bundler -RUN cd docs-bundler && bundle install - -COPY package.json package-lock.json . -RUN npm install --ci - -COPY ./bin/ ./bin/ - -CMD ["npm", "run", "build-site"] diff --git a/docs/Gemfile b/docs/Gemfile deleted file mode 100644 index b43c8f4222..0000000000 --- a/docs/Gemfile +++ /dev/null @@ -1,10 +0,0 @@ -source 'https://rubygems.org' - -gem 'jekyll', '3.9.1' - -group :jekyll_plugins do - gem 'jekyll-paginate' - gem 'redcarpet' -end - -gem 'json' diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock deleted file mode 100644 index 33f8d36e93..0000000000 --- a/docs/Gemfile.lock +++ /dev/null @@ -1,69 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - addressable (2.8.6) - public_suffix (>= 2.0.2, < 6.0) - colorator (1.1.0) - concurrent-ruby (1.2.3) - em-websocket (0.5.3) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0) - eventmachine (1.2.7) - ffi (1.16.3) - forwardable-extended (2.6.0) - http_parser.rb (0.8.0) - i18n (0.9.5) - concurrent-ruby (~> 1.0) - jekyll (3.9.1) - addressable (~> 2.4) - colorator (~> 1.0) - em-websocket (~> 0.5) - i18n (~> 0.7) - jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 2.0) - kramdown (>= 1.17, < 3) - liquid (~> 4.0) - mercenary (~> 0.3.3) - pathutil (~> 0.9) - rouge (>= 1.7, < 4) - safe_yaml (~> 1.0) - jekyll-paginate (1.1.0) - jekyll-sass-converter (1.5.2) - sass (~> 3.4) - jekyll-watch (2.2.1) - listen (~> 3.0) - json (2.3.1) - kramdown (2.4.0) - rexml - liquid (4.0.4) - listen (3.9.0) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) - mercenary (0.3.6) - pathutil (0.16.2) - forwardable-extended (~> 2.6) - public_suffix (5.0.5) - rb-fsevent (0.11.2) - rb-inotify (0.10.1) - ffi (~> 1.0) - redcarpet (3.5.1) - rexml (3.4.2) - rouge (3.30.0) - safe_yaml (1.0.5) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - -PLATFORMS - ruby - -DEPENDENCIES - jekyll (= 3.9.1) - jekyll-paginate - json - redcarpet - -BUNDLED WITH - 2.1.4 diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index 225bc17e8b..0000000000 --- a/docs/_config.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: PouchDB -description: PouchDB, the JavaScript Database that Syncs! -url: http://pouchdb.com -markdown: redcarpet -baseurl: -version: 9.0.0 -paginate: 5 -paginate_path: "blog/page:num" -github: - repository_url: https://github.com/apache/pouchdb -collections: - guides: - output: true -exclude: - - src diff --git a/docs/_data/authors.json b/docs/_data/authors.json new file mode 100644 index 0000000000..af09e0a5c2 --- /dev/null +++ b/docs/_data/authors.json @@ -0,0 +1,65 @@ +[ + { + "name": "Nick Colley", + "twitter": "nickcolley", + "github": "nickcolley", + "www": "http://nickcolley.co.uk", + "gravatar": "d83613912d1a2511a784b99c703bdcf6" + }, + { + "name": "Nolan Lawson", + "twitter": "nolanlawson", + "github": "nolanlawson", + "www": "http://nolanlawson.com", + "gravatar": "c436dec61b906e27c963518d0ef1d972" + }, + { + "name": "Dale Harvey", + "twitter": "daleharvey", + "github": "daleharvey", + "www": "http://arandomurl.com", + "gravatar": "030451d8cfc268d666bae9a7fe8d10ec" + }, + { + "name": "Calvin Metcalf", + "twitter": "CWMma", + "github": "calvinmetcalf", + "www": "http://calvinmetcalf.com/", + "gravatar": "e8153037a068f1c32e546f82729a64a5" + }, + { + "name": "Giovanni Ornaghi", + "twitter": "sphaso", + "github": "sphaso", + "www": "https://it.linkedin.com/in/giovanniornaghi", + "gravatar": "da853b1ad9ebe5e1c3ab5b340bb63b70" + }, + { + "name": "Garren Smith", + "twitter": "garrensmith", + "github": "garrensmith", + "www": "http://www.redcometlabs.com", + "gravatar": "15fb22e15587c7c36e0aeb5bf3579b07" + }, + { + "name": "Will Holley", + "twitter": "wilhol", + "github": "willholley", + "www": "https://github.com/willholley/", + "gravatar": "059d287498c864868b910fb0db7c469b" + }, + { + "name": "Gareth Bowen", + "twitter": "garethjtbowen", + "github": "garethbowen", + "www": "https://bowenwebdesign.co.nz", + "gravatar": "eda4874d50a06c7a6b231ba3dd29c7c0" + }, + { + "name": "Alba Herrerías", + "twitter": "alba_dev", + "github": "AlbaHerrerias", + "www": "https://www.albaherrerias.dev", + "gravatar": "da81e745b26ae8ca53fc77538599510f" + } +] diff --git a/docs/_data/authors.yml b/docs/_data/authors.yml deleted file mode 100644 index b4396b8529..0000000000 --- a/docs/_data/authors.yml +++ /dev/null @@ -1,53 +0,0 @@ -- name: Nick Colley - twitter: nickcolley - github: nickcolley - www: http://nickcolley.co.uk - gravatar: d83613912d1a2511a784b99c703bdcf6 - -- name: Nolan Lawson - twitter: nolanlawson - github: nolanlawson - www: http://nolanlawson.com - gravatar: c436dec61b906e27c963518d0ef1d972 - -- name: Dale Harvey - twitter: daleharvey - github: daleharvey - www: http://arandomurl.com - gravatar: 030451d8cfc268d666bae9a7fe8d10ec - -- name: Calvin Metcalf - twitter: CWMma - github: calvinmetcalf - www: http://calvinmetcalf.com/ - gravatar: e8153037a068f1c32e546f82729a64a5 - -- name: Giovanni Ornaghi - twitter: sphaso - github: sphaso - www: https://it.linkedin.com/in/giovanniornaghi - gravatar: da853b1ad9ebe5e1c3ab5b340bb63b70 - -- name: Garren Smith - twitter: garrensmith - github: garrensmith - www: http://www.redcometlabs.com - gravatar: 15fb22e15587c7c36e0aeb5bf3579b07 - -- name: Will Holley - twitter: wilhol - github: willholley - www: https://github.com/willholley/ - gravatar: 059d287498c864868b910fb0db7c469b - -- name: Gareth Bowen - twitter: garethjtbowen - github: garethbowen - www: https://bowenwebdesign.co.nz - gravatar: eda4874d50a06c7a6b231ba3dd29c7c0 - -- name: Alba Herrerías - twitter: alba_dev - github: AlbaHerrerias - www: https://www.albaherrerias.dev - gravatar: da81e745b26ae8ca53fc77538599510f diff --git a/docs/_data/site.json b/docs/_data/site.json new file mode 100644 index 0000000000..ba2d582ebb --- /dev/null +++ b/docs/_data/site.json @@ -0,0 +1,10 @@ +{ + "name": "PouchDB", + "description": "PouchDB, the JavaScript Database that Syncs!", + "url": "http://pouchdb.com", + "baseurl": "", + "version": "9.0.0", + "github": { + "repository_url": "https://github.com/pouchdb/pouchdb" + } +} diff --git a/docs/_includes/api/active_tasks.html b/docs/_includes/api/active_tasks.html index 673a8a8850..0d57da5b8a 100644 --- a/docs/_includes/api/active_tasks.html +++ b/docs/_includes/api/active_tasks.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="List active tasks" hash="active_tasks" %} -{% highlight js %} +{% highlight "js" %} PouchDB.activeTasks.list() {% endhighlight %} @@ -8,13 +8,13 @@ #### Example Usage: -{% highlight js %} +{% highlight "js" %} const tasks = PouchDB.activeTasks.list() {% endhighlight %} #### Example Result: -{% highlight js %} +{% highlight "js" %} [{ "id": "d81fea92-8ce4-42df-bb2b-89a4e67536c3", "name": "database_compaction", @@ -29,7 +29,7 @@ You can use [JavaScript Proxies](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) to monitor calls to the active tasks API. For the `PouchDB.activeTasks.add()` function, which is used internally to announce new tasks to PouchDB, you can monitor calls as follows: -{% highlight js %} +{% highlight "js" %} PouchDB.activeTasks.add = new Proxy(PouchDB.activeTasks.add, { apply: (target, thisArg, argumentsList) => { const task = argumentsList[0]; diff --git a/docs/_includes/api/batch_create.html b/docs/_includes/api/batch_create.html index 13f58a6abf..aa7510617f 100644 --- a/docs/_includes/api/batch_create.html +++ b/docs/_includes/api/batch_create.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Create/update a batch of documents" hash="batch_create" %} -{% highlight js %} +{% highlight "js" %} db.bulkDocs(docs, [options], [callback]) {% endhighlight %} @@ -13,7 +13,7 @@ Put some new docs, providing the `_id`s: {% include code/start.html id="bulk_docs_1" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.bulkDocs([ {title : 'Lisa Says', _id: 'doc1'}, {title : 'Space Oddity', _id: 'doc2'} @@ -25,7 +25,7 @@ {% include code/end.html %} {% include code/start.html id="bulk_docs_1" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.bulkDocs([ {title : 'Lisa Says', _id: 'doc1'}, @@ -38,7 +38,7 @@ {% include code/end.html %} {% include code/start.html id="bulk_docs_1" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.bulkDocs([ {title : 'Lisa Says', _id: 'doc1'}, {title : 'Space Oddity', _id: 'doc2'} @@ -53,7 +53,7 @@ Post some new docs and auto-generate the `_id`s: {% include code/start.html id="bulk_docs_2" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.bulkDocs([ {title : 'Lisa Says'}, {title : 'Space Oddity'} @@ -65,7 +65,7 @@ {% include code/end.html %} {% include code/start.html id="bulk_docs_2" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.bulkDocs([ {title : 'Lisa Says'}, @@ -78,7 +78,7 @@ {% include code/end.html %} {% include code/start.html id="bulk_docs_2" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.bulkDocs([ {title : 'Lisa Says'}, {title : 'Space Oddity'} @@ -91,7 +91,7 @@ {% include code/end.html %} #### Example Response: -{% highlight js %} +{% highlight "js" %} [ { "ok": true, @@ -110,7 +110,7 @@ from the [put()/post() API](#create_document). If there are any errors, they will be provided individually like so: -{% highlight js %} +{% highlight "js" %} [ { status: 409, name: 'conflict', @@ -131,7 +131,7 @@ You can also use `bulkDocs()` to update/delete many documents at once: {% include code/start.html id="bulk_docs3" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.bulkDocs([ { title : 'Lisa Says', @@ -153,7 +153,7 @@ {% include code/end.html %} {% include code/start.html id="bulk_docs3" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.bulkDocs([ { @@ -176,7 +176,7 @@ {% include code/end.html %} {% include code/start.html id="bulk_docs3" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.bulkDocs([ { title : 'Lisa Says', @@ -201,7 +201,7 @@ Or delete them: {% include code/start.html id="bulk_docs_4" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.bulkDocs([ { title : 'Lisa Says', @@ -223,7 +223,7 @@ {% include code/end.html %} {% include code/start.html id="bulk_docs_4" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.bulkDocs([ { @@ -246,7 +246,7 @@ {% include code/end.html %} {% include code/start.html id="bulk_docs_4" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.bulkDocs([ { title : 'Lisa Says', diff --git a/docs/_includes/api/batch_fetch.html b/docs/_includes/api/batch_fetch.html index 0e7e6749ae..ce970a9407 100644 --- a/docs/_includes/api/batch_fetch.html +++ b/docs/_includes/api/batch_fetch.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Fetch a batch of documents" hash="batch_fetch" %} -{% highlight js %} +{% highlight "js" %} db.allDocs([options], [callback]) {% endhighlight %} @@ -33,7 +33,7 @@ #### Example Usage: {% include code/start.html id="all_docs" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.allDocs({ include_docs: true, attachments: true @@ -45,7 +45,7 @@ {% include code/end.html %} {% include code/start.html id="all_docs" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.allDocs({ include_docs: true, @@ -58,7 +58,7 @@ {% include code/end.html %} {% include code/start.html id="all_docs" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.allDocs({ include_docs: true, attachments: true @@ -72,7 +72,7 @@ #### Example Response: -{% highlight js %} +{% highlight "js" %} { "offset": 0, "total_rows": 1, @@ -109,7 +109,7 @@ You can use `startkey`/`endkey` to find all docs in a range: {% include code/start.html id="all_docs_2" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.allDocs({ include_docs: true, attachments: true, @@ -123,7 +123,7 @@ {% include code/end.html %} {% include code/start.html id="all_docs_2" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.allDocs({ include_docs: true, @@ -138,7 +138,7 @@ {% include code/end.html %} {% include code/start.html id="all_docs_2" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.allDocs({ include_docs: true, attachments: true, @@ -159,7 +159,7 @@ You can do prefix search in `allDocs()` – i.e. "give me all the documents whose `_id`s start with `'foo'`" – by using the special high Unicode character `'\ufff0'`: {% include code/start.html id="all_docs_3" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.allDocs({ include_docs: true, attachments: true, @@ -173,7 +173,7 @@ {% include code/end.html %} {% include code/start.html id="all_docs_3" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.allDocs({ include_docs: true, @@ -188,7 +188,7 @@ {% include code/end.html %} {% include code/start.html id="all_docs_3" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.allDocs({ include_docs: true, attachments: true, diff --git a/docs/_includes/api/bulk_get.html b/docs/_includes/api/bulk_get.html index a664a3e1b3..d5cb826f1c 100644 --- a/docs/_includes/api/bulk_get.html +++ b/docs/_includes/api/bulk_get.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Document bulk get" hash="bulk_get" %} -{% highlight js %} +{% highlight "js" %} db.bulkGet(options, [callback]) {% endhighlight %} @@ -21,7 +21,7 @@ #### Example Usage: {% include code/start.html id="bulkget1" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.bulkGet({ docs: [ { id: "existing-doc", rev: "1-b2e54331db828310f3c772d6e042ac9c"}, @@ -36,7 +36,7 @@ {% include code/end.html %} {% include code/start.html id="bulkget1" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.bulkGet({ docs: [ @@ -52,7 +52,7 @@ {% include code/end.html %} {% include code/start.html id="bulkget1" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.bulkGet({ docs: [ { id: "doc-that-exists", rev: "1-967a00dff5e02add41819138abb3284d"}, @@ -68,7 +68,7 @@ {% include code/end.html %} #### Example Response: -{% highlight js %} +{% highlight "js" %} { "results": [ { diff --git a/docs/_includes/api/changes.html b/docs/_includes/api/changes.html index 6bfbf69079..706c00cfe8 100644 --- a/docs/_includes/api/changes.html +++ b/docs/_includes/api/changes.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Listen to database changes" hash="changes" %} -{% highlight js %} +{% highlight "js" %} db.changes(options) {% endhighlight %} @@ -41,7 +41,7 @@ #### Example Usage: -{% highlight js %} +{% highlight "js" %} const changes = db.changes({ since: 'now', live: true, @@ -58,7 +58,7 @@ {% endhighlight %} #### Example Response: -{% highlight js %} +{% highlight "js" %} { "id":"somestuff", "seq":21, @@ -83,7 +83,7 @@ Example response in the `'change'` listener (using `{include_docs: true}`): -{% highlight js %} +{% highlight "js" %} { id: 'doc1', changes: [ { rev: '1-9152679630cc461b9477792d93b83eae' } ], doc: { @@ -96,7 +96,7 @@ Example response in the `'change'` listener when a doc was deleted: -{% highlight js %} +{% highlight "js" %} { id: 'doc2', changes: [ { rev: '2-9b50a4b63008378e8d0718a9ad05c7af' } ], doc: { _id: 'doc2', @@ -110,7 +110,7 @@ Example response in the `'complete'` listener: -{% highlight js %} +{% highlight "js" %} { "results": [ { @@ -147,7 +147,7 @@ returns a list of the changes (i.e. what the `'complete'` event emits): {% include code/start.html id="changes1" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.changes({ limit: 10, since: 0 @@ -159,7 +159,7 @@ {% include code/end.html %} {% include code/start.html id="changes1" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.changes({ limit: 10, @@ -172,7 +172,7 @@ {% include code/end.html %} {% include code/start.html id="changes1" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.changes({ limit: 10, since: 0 @@ -186,7 +186,7 @@ #### Example Response: -{% highlight js %} +{% highlight "js" %} { "results": [{ "id": "0B3358C1-BA4B-4186-8795-9024203EB7DD", @@ -242,7 +242,7 @@ In these examples, we'll work with some mammals. Let's imagine our docs are: -{% highlight js %} +{% highlight "js" %} [ {_id: 'a', name: 'Kangaroo', type: 'marsupial'}, {_id: 'b', name: 'Koala', type: 'marsupial'}, @@ -258,7 +258,7 @@ Filter by `type === 'marsupial'`: -{% highlight js %} +{% highlight "js" %} db.changes({ filter: function (doc) { return doc.type === 'marsupial'; @@ -270,7 +270,7 @@ Filter documents with `_id`s `['a', 'c']`. -{% highlight js %} +{% highlight "js" %} db.changes({ doc_ids: ['a', 'c'] }); @@ -280,7 +280,7 @@ First `put()` a design document: -{% highlight js %} +{% highlight "js" %} { _id: '_design/mydesign', filters: { @@ -293,7 +293,7 @@ Then filter by `type === 'marsupial'`: -{% highlight js %} +{% highlight "js" %} db.changes({ filter: 'mydesign/myfilter' }); @@ -305,7 +305,7 @@ First `put()` a design document: -{% highlight js %} +{% highlight "js" %} { _id: '_design/myfilter', filters: { @@ -318,7 +318,7 @@ Then filter by `type === 'marsupial'`: -{% highlight js %} +{% highlight "js" %} db.changes({ filter: 'myfilter', query_params: {type: 'marsupial'} @@ -335,7 +335,7 @@ First `put()` a design document: -{% highlight js %} +{% highlight "js" %} { _id: '_design/mydesign', views: { @@ -350,7 +350,7 @@ Then filter by `type === 'marsupial'`: -{% highlight js %} +{% highlight "js" %} db.changes({ filter: '_view', view: 'mydesign/myview' diff --git a/docs/_includes/api/close_database.html b/docs/_includes/api/close_database.html index 3e82f1563e..71ff21d78c 100644 --- a/docs/_includes/api/close_database.html +++ b/docs/_includes/api/close_database.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Close a database" hash="close_database"%} -{% highlight js %} +{% highlight "js" %} db.close([callback]) {% endhighlight %} @@ -9,7 +9,7 @@ #### Example Usage {% include code/start.html id="close_db" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.close(function () { // success }); @@ -18,14 +18,14 @@ {% include code/start.html id="close_db" type="async" %} -{% highlight js %} +{% highlight "js" %} await db.close(); {% endhighlight %} {% include code/end.html %} {% include code/start.html id="close_db" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.close().then(function () { // success }); diff --git a/docs/_includes/api/compaction.html b/docs/_includes/api/compaction.html index c936375d54..7b12671a18 100644 --- a/docs/_includes/api/compaction.html +++ b/docs/_includes/api/compaction.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Compact the database" hash="compaction" %} -{% highlight js %} +{% highlight "js" %} db.compact([options], [callback]) {% endhighlight %} @@ -15,7 +15,7 @@ #### Example Usage: {% include code/start.html id="compact" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.compact(function (err, result) { if (err) { return console.log(err); } // handle result @@ -24,7 +24,7 @@ {% include code/end.html %} {% include code/start.html id="compact" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.compact(); } catch (err) { @@ -34,7 +34,7 @@ {% include code/end.html %} {% include code/start.html id="compact" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.compact().then(function (result) { // handle result }).catch(function (err) { @@ -44,6 +44,6 @@ {% include code/end.html %} #### Example Response: -{% highlight js %} +{% highlight "js" %} { "ok" : "true" } {% endhighlight %} diff --git a/docs/_includes/api/create_database.html b/docs/_includes/api/create_database.html index faa17c5019..f29d88f2e7 100644 --- a/docs/_includes/api/create_database.html +++ b/docs/_includes/api/create_database.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Create a database" hash="create_database" %} -{% highlight js %} +{% highlight "js" %} new PouchDB([name], [options]) {% endhighlight %} @@ -38,7 +38,7 @@ [levelup_options]: https://github.com/rvagg/node-levelup/#options #### Example Usage: -{% highlight js %} +{% highlight "js" %} const db = new PouchDB('dbname'); // or const db = new PouchDB('http://localhost:5984/dbname'); @@ -46,13 +46,13 @@ Create an in-memory Pouch (must install `pouchdb-adapter-memory` first): -{% highlight js %} +{% highlight "js" %} const db = new PouchDB('dbname', {adapter: 'memory'}); {% endhighlight %} Create a remote PouchDB with special fetch options: -{% highlight js %} +{% highlight "js" %} const db = new PouchDB('http://example.com/dbname', { fetch: function (url, opts) { opts.headers.set('X-Some-Special-Header', 'foo'); diff --git a/docs/_includes/api/create_document.html b/docs/_includes/api/create_document.html index 6a377ead31..d0f2a61451 100644 --- a/docs/_includes/api/create_document.html +++ b/docs/_includes/api/create_document.html @@ -1,7 +1,7 @@ {% include anchor.html edit="true" title="Create/update a document" hash="create_document" %} ### Using db.put() -{% highlight js %} +{% highlight "js" %} db.put(doc, [options], [callback]) {% endhighlight %} @@ -16,7 +16,7 @@ Create a new doc with an `_id` of `'mydoc'`: {% include code/start.html id="newDoc" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.put({ _id: 'mydoc', title: 'Heroes' @@ -28,7 +28,7 @@ {% include code/end.html %} {% include code/start.html id="newDoc" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const response = await db.put({ _id: 'mydoc', @@ -41,7 +41,7 @@ {% include code/end.html %} {% include code/start.html id="newDoc" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.put({ _id: 'mydoc', title: 'Heroes' @@ -56,7 +56,7 @@ You can update an existing doc using `_rev`: {% include code/start.html id="updateDoc" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.get('mydoc', function(err, doc) { if (err) { return console.log(err); } db.put({ @@ -72,7 +72,7 @@ {% include code/end.html %} {% include code/start.html id="updateDoc" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const doc = await db.get('mydoc'); const response = await db.put({ @@ -88,7 +88,7 @@ {% include code/start.html id="updateDoc" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.get('mydoc').then(function(doc) { return db.put({ _id: 'mydoc', @@ -104,7 +104,7 @@ {% include code/end.html %} #### Example Response: -{% highlight js %} +{% highlight "js" %} { "ok": true, "id": "mydoc", @@ -117,7 +117,7 @@ ### Using db.post() -{% highlight js %} +{% highlight "js" %} db.post(doc, [options], [callback]) {% endhighlight %} @@ -126,7 +126,7 @@ #### Example Usage: {% include code/start.html id="post_doc" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.post({ title: 'Ziggy Stardust' }, function (err, response) { @@ -137,7 +137,7 @@ {% include code/end.html %} {% include code/start.html id="post_doc" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const response = await db.post({ title: 'Ziggy Stardust' @@ -149,7 +149,7 @@ {% include code/end.html %} {% include code/start.html id="post_doc" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.post({ title: 'Ziggy Stardust' }).then(function (response) { @@ -161,7 +161,7 @@ {% include code/end.html %} #### Example Response: -{% highlight js %} +{% highlight "js" %} { "ok" : true, "id" : "8A2C3761-FFD5-4770-9B8C-38C33CED300A", diff --git a/docs/_includes/api/create_index.html b/docs/_includes/api/create_index.html index 38b26a61f4..8c474728b9 100644 --- a/docs/_includes/api/create_index.html +++ b/docs/_includes/api/create_index.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Create index" hash="create_index" %} -{% highlight js %} +{% highlight "js" %} db.createIndex(index [, callback]) {% endhighlight %} @@ -18,7 +18,7 @@ #### Example Usage: {% include code/start.html id="create_idx" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.createIndex({ index: { fields: ['foo'] @@ -31,7 +31,7 @@ {% include code/end.html %} {% include code/start.html id="create_idx" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.createIndex({ index: { @@ -45,7 +45,7 @@ {% include code/end.html %} {% include code/start.html id="create_idx" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.createIndex({ index: { fields: ['foo'] @@ -62,20 +62,20 @@ If the index was created, you'll see: -{% highlight js %} +{% highlight "js" %} { "result": "created" } {% endhighlight %} Or if the index already exists: -{% highlight js %} +{% highlight "js" %} { "result": "exists" } {% endhighlight %} You can also create an index on multiple fields: {% include code/start.html id="create_idx2" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.createIndex({ index: { fields: ['foo', 'bar', 'baz'] @@ -88,7 +88,7 @@ {% include code/end.html %} {% include code/start.html id="create_idx2" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.createIndex({ index: { @@ -102,7 +102,7 @@ {% include code/end.html %} {% include code/start.html id="create_idx2" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.createIndex({ index: { fields: ['foo', 'bar', 'baz'] @@ -118,7 +118,7 @@ Or an index on deep fields: {% include code/start.html id="create_idx3" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.createIndex({ index: { fields: ['person.address.zipcode'] @@ -131,7 +131,7 @@ {% include code/end.html %} {% include code/start.html id="create_idx3" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.createIndex({ index: { @@ -145,7 +145,7 @@ {% include code/end.html %} {% include code/start.html id="create_idx3" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.createIndex({ index: { fields: ['person.address.zipcode'] @@ -161,7 +161,7 @@ You can also specify additional options, if you want more control over how your index is created: {% include code/start.html id="create_idx4" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.createIndex({ index: { fields: ['foo', 'bar'], @@ -177,7 +177,7 @@ {% include code/end.html %} {% include code/start.html id="create_idx4" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.createIndex({ index: { @@ -194,7 +194,7 @@ {% include code/end.html %} {% include code/start.html id="create_idx4" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.createIndex({ index: { fields: ['foo', 'bar'], @@ -224,7 +224,7 @@ {% include alert/end.html%} {% include code/start.html id="create_idx5" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.createIndex({ index: { fields: ['year', 'title'], @@ -240,7 +240,7 @@ {% include code/end.html %} {% include code/start.html id="create_idx5" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = db.createIndex({ index: { @@ -257,7 +257,7 @@ {% include code/end.html %} {% include code/start.html id="create_idx5" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.createIndex({ index: { fields: ['year', 'title'], @@ -283,7 +283,7 @@ When a PouchDB instance updates an index, it emits `indexing` events that include information about the progress of the index update task. -{% highlight js %} +{% highlight "js" %} const db = new PouchDB('my-docs'); db.on('indexing', function (event) { diff --git a/docs/_includes/api/database_information.html b/docs/_includes/api/database_information.html index e2cb79ff5f..a37926fd95 100644 --- a/docs/_includes/api/database_information.html +++ b/docs/_includes/api/database_information.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Get database information" hash="database_information" %} -{% highlight js %} +{% highlight "js" %} db.info([callback]) {% endhighlight %} @@ -9,7 +9,7 @@ #### Example Usage: {% include code/start.html id="dbinfo" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.info(function(err, info) { if (err) { return console.log(err); } // handle result @@ -18,7 +18,7 @@ {% include code/end.html %} {% include code/start.html id="dbinfo" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.info(); } catch (err) { @@ -28,7 +28,7 @@ {% include code/end.html %} {% include code/start.html id="dbinfo" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.info().then(function (result) { // handle result }).catch(function (err) { @@ -38,7 +38,7 @@ {% include code/end.html %} #### Example Response: -{% highlight js %} +{% highlight "js" %} { "db_name": "test", "doc_count": 4, diff --git a/docs/_includes/api/defaults.html b/docs/_includes/api/defaults.html index de2b22cab5..8012d10cdd 100644 --- a/docs/_includes/api/defaults.html +++ b/docs/_includes/api/defaults.html @@ -3,7 +3,7 @@ If you find yourself using the same constructor options repeatedly, you can simplify your code with `PouchDB.defaults()`: -{% highlight js %} +{% highlight "js" %} PouchDB.defaults({ option1: 'foo', option2: 'value' @@ -13,7 +13,7 @@ The returned object is a constructor function that works the same as `PouchDB`, except that whenever you invoke it (e.g. with `new`), the given options will be passed in by default. #### Example Usage: -{% highlight js %} +{% highlight "js" %} const MyMemPouch = PouchDB.defaults({ adapter: 'memory' }); diff --git a/docs/_includes/api/delete_attachment.html b/docs/_includes/api/delete_attachment.html index bceff6a70c..bebb5c2b5f 100644 --- a/docs/_includes/api/delete_attachment.html +++ b/docs/_includes/api/delete_attachment.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Delete an attachment" hash="delete_attachment" %} -{% highlight js %} +{% highlight "js" %} db.removeAttachment(docId, attachmentId, rev, [callback]) {% endhighlight %} @@ -9,7 +9,7 @@ #### Example Usage: {% include code/start.html id="delete_att" type="callback" %} -{% highlight js %} +{% highlight "js" %} const rev = '1-068E73F5B44FEC987B51354DFC772891'; db.removeAttachment('doc', 'att.txt', rev, function(err, res) { if (err) { return console.log(err); } @@ -19,7 +19,7 @@ {% include code/end.html %} {% include code/start.html id="delete_att" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const rev = '1-068E73F5B44FEC987B51354DFC772891'; const result = await db.removeAttachment('doc', 'att.txt', rev); @@ -30,7 +30,7 @@ {% include code/end.html %} {% include code/start.html id="delete_att" type="promise" %} -{% highlight js %} +{% highlight "js" %} const rev = '1-068E73F5B44FEC987B51354DFC772891'; db.removeAttachment('doc', 'att.txt', rev).then(function (result) { // handle result @@ -42,7 +42,7 @@ #### Example Response: -{% highlight js %} +{% highlight "js" %} { "ok": true, "rev": "2-1F983211AB87EFCCC980974DFC27382F" diff --git a/docs/_includes/api/delete_database.html b/docs/_includes/api/delete_database.html index 69cca3cad8..5a6a94f0ea 100644 --- a/docs/_includes/api/delete_database.html +++ b/docs/_includes/api/delete_database.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Delete a database" hash="delete_database"%} -{% highlight js %} +{% highlight "js" %} db.destroy([options], [callback]) {% endhighlight %} @@ -9,7 +9,7 @@ #### Example Usage {% include code/start.html id="destroy_db" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.destroy(function (err, response) { if (err) { return console.log(err); @@ -22,7 +22,7 @@ {% include code/start.html id="destroy_db" type="async" %} -{% highlight js %} +{% highlight "js" %} try { await db.destroy(); } catch (err) { @@ -33,7 +33,7 @@ {% include code/start.html id="destroy_db" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.destroy().then(function (response) { // success }).catch(function (err) { @@ -43,7 +43,7 @@ {% include code/end.html %} #### Example Response: -{% highlight js %} +{% highlight "js" %} { "ok" : true } diff --git a/docs/_includes/api/delete_document.html b/docs/_includes/api/delete_document.html index c6e11c7c15..4005db0b70 100644 --- a/docs/_includes/api/delete_document.html +++ b/docs/_includes/api/delete_document.html @@ -1,12 +1,12 @@ {% include anchor.html edit="true" title="Delete a document" hash="delete_document"%} -{% highlight js %} +{% highlight "js" %} db.remove(doc, [options], [callback]) {% endhighlight %} Or: -{% highlight js %} +{% highlight "js" %} db.remove(docId, docRev, [options], [callback]) {% endhighlight %} @@ -18,7 +18,7 @@ #### Example Usage: {% include code/start.html id="delete_doc" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.get('mydoc', function(err, doc) { if (err) { return console.log(err); } db.remove(doc, function(err, response) { @@ -30,7 +30,7 @@ {% include code/end.html %} {% include code/start.html id="delete_doc" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const doc = await db.get('mydoc'); const response = await db.remove(doc); @@ -41,7 +41,7 @@ {% include code/end.html %} {% include code/start.html id="delete_doc" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.get('mydoc').then(function(doc) { return db.remove(doc); }).then(function (result) { @@ -54,7 +54,7 @@ #### Example Response: -{% highlight js %} +{% highlight "js" %} { "ok": true, "id": "mydoc", @@ -65,7 +65,7 @@ You can also delete a document by just providing an `id` and `rev`: {% include code/start.html id="delete_doc3" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.get('mydoc', function(err, doc) { if (err) { return console.log(err); } db.remove(doc._id, doc._rev, function(err, response) { @@ -77,7 +77,7 @@ {% include code/end.html %} {% include code/start.html id="delete_doc3" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const doc = await db.get('mydoc'); const response = await db.remove(doc._id, doc._rev); @@ -88,7 +88,7 @@ {% include code/end.html %} {% include code/start.html id="delete_doc3" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.get('mydoc').then(function(doc) { return db.remove(doc._id, doc._rev); }).then(function (result) { @@ -102,7 +102,7 @@ You can also delete a document by using `put()` with `{_deleted: true}`: {% include code/start.html id="delete_doc2" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.get('mydoc', function(err, doc) { if (err) { return console.log(err); } doc._deleted = true; @@ -115,7 +115,7 @@ {% include code/end.html %} {% include code/start.html id="delete_doc2" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const doc = await db.get('mydoc'); doc._deleted = true; @@ -127,7 +127,7 @@ {% include code/end.html %} {% include code/start.html id="delete_doc2" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.get('mydoc').then(function(doc) { doc._deleted = true; return db.put(doc); diff --git a/docs/_includes/api/delete_index.html b/docs/_includes/api/delete_index.html index 733bd743c1..b76448c80b 100644 --- a/docs/_includes/api/delete_index.html +++ b/docs/_includes/api/delete_index.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Delete index" hash="delete_index" %} -{% highlight js %} +{% highlight "js" %} db.deleteIndex(index [, callback]) {% endhighlight %} @@ -19,7 +19,7 @@ #### Example Usage: {% include code/start.html id="delete_idx" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.deleteIndex({ "ddoc": "_design/idx-0f3a6f73110868266fa5c688caf8acd3", "name": "idx-0f3a6f73110868266fa5c688caf8acd3", @@ -38,7 +38,7 @@ {% include code/end.html %} {% include code/start.html id="delete_idx" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.deleteIndex({ "ddoc": "_design/idx-0f3a6f73110868266fa5c688caf8acd3", @@ -58,7 +58,7 @@ {% include code/end.html %} {% include code/start.html id="delete_idx" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.deleteIndex({ "ddoc": "_design/idx-0f3a6f73110868266fa5c688caf8acd3", "name": "idx-0f3a6f73110868266fa5c688caf8acd3", @@ -79,7 +79,7 @@ #### Example Response: -{% highlight js %} +{% highlight "js" %} { "ok": true } {% endhighlight %} @@ -88,7 +88,7 @@ one after the built-in `_all_docs` index): {% include code/start.html id="delete_idx2" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.getIndexes(function (err, indexesResult) { if (err) { return console.log(err); } db.deleteIndex(indexesResult.indexes[1], function (err, result) { @@ -100,7 +100,7 @@ {% include code/end.html %} {% include code/start.html id="delete_idx2" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const indexesResult = await db.getIndexes(); const result = await db.deleteIndex(indexesResult.indexes[1]); @@ -111,7 +111,7 @@ {% include code/end.html %} {% include code/start.html id="delete_idx2" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.getIndexes().then(function (indexesResult) { return db.deleteIndex(indexesResult.indexes[1]); }).then(function (result) { diff --git a/docs/_includes/api/events.html b/docs/_includes/api/events.html index 1e7563e305..be755403d4 100644 --- a/docs/_includes/api/events.html +++ b/docs/_includes/api/events.html @@ -2,7 +2,7 @@ PouchDB is an [event emitter][event emitter] and will emit a `'created'` event when a database is created. A `'destroyed'` event is emitted when a database is destroyed. -{% highlight js %} +{% highlight "js" %} PouchDB.on('created', function (dbName) { // called whenever a db is created. }); diff --git a/docs/_includes/api/explain_index.html b/docs/_includes/api/explain_index.html index e79cd50e2c..ff40d1b818 100644 --- a/docs/_includes/api/explain_index.html +++ b/docs/_includes/api/explain_index.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Explain index" hash="explain_index" %} -{% highlight js %} +{% highlight "js" %} db.explain(request [, callback]) {% endhighlight %} @@ -18,7 +18,7 @@ #### Example Usage: {% include code/start.html id="explain_idx" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.explain({ selector: { name: 'Mario', @@ -34,7 +34,7 @@ {% include code/end.html %} {% include code/start.html id="explain_idx" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const explanation = await db.explain({ selector: { @@ -51,7 +51,7 @@ {% include code/end.html %} {% include code/start.html id="explain_idx" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.explain({ selector: { name: 'Mario', @@ -69,7 +69,7 @@ #### Example Response: -{% highlight js %} +{% highlight "js" %} { "dbname": "database-name" "index": { diff --git a/docs/_includes/api/fetch_document.html b/docs/_includes/api/fetch_document.html index 0897a24f09..6d14d01e1f 100644 --- a/docs/_includes/api/fetch_document.html +++ b/docs/_includes/api/fetch_document.html @@ -1,7 +1,7 @@ {% include anchor.html edit="true" title="Fetch a document" hash="fetch_document"%} -{% highlight js %} +{% highlight "js" %} db.get(docId, [options], [callback]) {% endhighlight %} @@ -23,7 +23,7 @@ #### Example Usage: {% include code/start.html id="get1" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.get('mydoc', function(err, doc) { if (err) { return console.log(err); } // handle doc @@ -32,7 +32,7 @@ {% include code/end.html %} {% include code/start.html id="get1" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const doc = await db.get('mydoc'); } catch (err) { @@ -42,7 +42,7 @@ {% include code/end.html %} {% include code/start.html id="get1" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.get('mydoc').then(function (doc) { // handle doc }).catch(function (err) { @@ -52,7 +52,7 @@ {% include code/end.html %} #### Example Response: -{% highlight js %} +{% highlight "js" %} { "_id": "mydoc", "_rev": "1-A6157A5EA545C99B00FF904EEF05FD9F" diff --git a/docs/_includes/api/get_attachment.html b/docs/_includes/api/get_attachment.html index 5578176228..1c8218a707 100644 --- a/docs/_includes/api/get_attachment.html +++ b/docs/_includes/api/get_attachment.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Get an attachment" hash="get_attachment" %} -{% highlight js %} +{% highlight "js" %} db.getAttachment(docId, attachmentId, [options], [callback]) {% endhighlight %} @@ -15,7 +15,7 @@ Get an attachment with filename `'att.txt'` from document with ID `'doc'`: {% include code/start.html id="get_att1" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.getAttachment('doc', 'att.txt', function(err, blobOrBuffer) { if (err) { return console.log(err); } // handle result @@ -24,7 +24,7 @@ {% include code/end.html %} {% include code/start.html id="get_att1" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const blobOrBuffer = await db.getAttachment('doc', 'att.txt'); } catch (err) { @@ -34,7 +34,7 @@ {% include code/end.html %} {% include code/start.html id="get_att1" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.getAttachment('doc', 'att.txt').then(function (blobOrBuffer) { // handle result }).catch(function (err) { @@ -47,7 +47,7 @@ the revision `'1-abcd'`: {% include code/start.html id="get_att2" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.getAttachment('doc', 'att.txt', {rev: '1-abcd'}, function(err, blobOrBuffer) { if (err) { return console.log(err); } // handle result @@ -56,7 +56,7 @@ {% include code/end.html %} {% include code/start.html id="get_att2" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const blobOrBuffer = await db.getAttachment('doc', 'att.txt', {rev: '1-abcd'}); } catch (err) { @@ -66,7 +66,7 @@ {% include code/end.html %} {% include code/start.html id="get_att2" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.getAttachment('doc', 'att.txt', {rev: '1-abcd'}).then(function (blobOrBuffer) { // handle result }).catch(function (err) { @@ -83,7 +83,7 @@ You can specify `{attachments: true}` to most "read" operations, such as `get()`, `allDocs()`, `changes()`, and `query()`. The attachment data will then be included inlined in the resulting doc(s). However, it will always be supplied as base64. For example: -{% highlight js %} +{% highlight "js" %} { "_attachments": { "att.txt": { @@ -99,7 +99,7 @@ For such APIs, when you don't specify `{attachments: true}`, you will instead get metadata about the attachments. For example: -{% highlight js %} +{% highlight "js" %} { "_attachments": { "att.txt": { diff --git a/docs/_includes/api/list_indexes.html b/docs/_includes/api/list_indexes.html index fa24c9be11..283195e35c 100644 --- a/docs/_includes/api/list_indexes.html +++ b/docs/_includes/api/list_indexes.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="List indexes" hash="list_indexes" %} -{% highlight js %} +{% highlight "js" %} db.getIndexes([callback]) {% endhighlight %} @@ -19,7 +19,7 @@ #### Example Usage: {% include code/start.html id="get_idxs" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.getIndexes(function (err, result) { if (err) { return console.log(err); } // handle result @@ -28,7 +28,7 @@ {% include code/end.html %} {% include code/start.html id="get_idxs" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.getIndexes(); } catch (err) { @@ -38,7 +38,7 @@ {% include code/end.html %} {% include code/start.html id="get_idxs" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.getIndexes().then(function (result) { // handle result }).catch(function (err) { @@ -49,7 +49,7 @@ #### Example Response: -{% highlight js %} +{% highlight "js" %} { "indexes": [ { diff --git a/docs/_includes/api/overview.html b/docs/_includes/api/overview.html index 02df9305fd..04a35649cd 100644 --- a/docs/_includes/api/overview.html +++ b/docs/_includes/api/overview.html @@ -5,7 +5,7 @@ Most of the API is exposed as: -{% highlight js %} +{% highlight "js" %} db.doSomething(args..., [options], [callback]) {% endhighlight %} @@ -15,7 +15,7 @@ Callbacks use the standard Node.js idiom of: -{% highlight js %} +{% highlight "js" %} function(error, result) { /* ... */ } {% endhighlight %} @@ -35,7 +35,7 @@ To use a custom promise implementation with PouchDB, you must redefine a global `Promise` object before loading PouchDB: -{% highlight html %} +{% highlight "html" %} {% endhighlight %} @@ -46,7 +46,7 @@ Note that the samples for `async`/`await` in the API documentation assume that your code is inside an async function. So for instance: -{% highlight js %} +{% highlight "js" %} async function myFunction() { // your code goes in here } diff --git a/docs/_includes/api/plugins.html b/docs/_includes/api/plugins.html index 06b29c1113..890db8ac51 100644 --- a/docs/_includes/api/plugins.html +++ b/docs/_includes/api/plugins.html @@ -12,7 +12,7 @@ Writing a plugin is easy! The API is: -{% highlight js %} +{% highlight "js" %} PouchDB.plugin({ methodName: myFunction }); @@ -23,7 +23,7 @@ There is a [PouchDB Plugin Seed project](https://github.com/pouchdb/plugin-seed), which is the fastest way to get started writing, building and testing your very own plugin. #### Example Usage: -{% highlight js %} +{% highlight "js" %} PouchDB.plugin({ sayHello : function () { console.log("Hello!"); @@ -38,7 +38,7 @@ or attach event listeners to the `PouchDB` object. #### Example Usage: -{% highlight js %} +{% highlight "js" %} PouchDB.plugin(function (PouchDB) { PouchDB.hello = 'world'; }); @@ -53,7 +53,7 @@ You can load plugins into PouchDB when you load it via `require()`. -{% highlight js %} +{% highlight "js" %} const greet = {sayHello: function() { console.log("Hello!"); }}; const PouchDB = require('pouchdb').plugin(greet); @@ -64,7 +64,7 @@ You can chain plugins, as well: -{% highlight js %} +{% highlight "js" %} const greet = {sayHello: function() { console.log("Hello!"); }}; const manners = {thank: function(name) { console.log("Thank you, " + name); }}; @@ -85,7 +85,7 @@ Because PouchDB guarantees to plugin authors that all data changes ultimately happen via `bulkDocs()`, it is the ideal place for an application or plugin to intercept updates. -{% highlight js %} +{% highlight "js" %} // Keep a reference to the "upstream" function. const pouchBulkDocs = PouchDB.prototype.bulkDocs; PouchDB.plugin({bulkDocs: validBulkDocs}); diff --git a/docs/_includes/api/purge.html b/docs/_includes/api/purge.html index 54374a8026..27b7aeb270 100644 --- a/docs/_includes/api/purge.html +++ b/docs/_includes/api/purge.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Purge a document rev" hash="purge" %} -{% highlight js %} +{% highlight "js" %} db.purge(docId, rev) {% endhighlight %} @@ -23,7 +23,7 @@ #### Example Usage: {% include code/start.html id="purge1" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.purge('mydoc', '6-3a24009a9525bde9e4bfa8a99046b00d', function (err, result) { if (err) { return console.log(err); } @@ -33,7 +33,7 @@ {% include code/end.html %} {% include code/start.html id="purge1" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.purge('mydoc', '6-3a24009a9525bde9e4bfa8a99046b00d'); // handle result @@ -44,7 +44,7 @@ {% include code/end.html %} {% include code/start.html id="purge1" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.purge('mydoc', '6-3a24009a9525bde9e4bfa8a99046b00d') .then(function (result) { // handle result @@ -56,7 +56,7 @@ #### Example Response: -{% highlight js %} +{% highlight "js" %} { "ok": true, "deletedRevs": [ diff --git a/docs/_includes/api/query_database.html b/docs/_includes/api/query_database.html index 073ce32fe0..0895330a56 100644 --- a/docs/_includes/api/query_database.html +++ b/docs/_includes/api/query_database.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Map/reduce queries" hash="query_database" %} -{% highlight js %} +{% highlight "js" %} db.query(fun, [options], [callback]) {% endhighlight %} @@ -62,7 +62,7 @@ #### Example Usage: {% include code/start.html id="query1" type="callback" %} -{% highlight js %} +{% highlight "js" %} // create a design doc const ddoc = { _id: '_design/index', @@ -96,7 +96,7 @@ {% include code/end.html %} {% include code/start.html id="query1" type="async" %} -{% highlight js %} +{% highlight "js" %} // create a design doc const ddoc = { _id: '_design/index', @@ -133,7 +133,7 @@ {% include code/end.html %} {% include code/start.html id="query1" type="promise" %} -{% highlight js %} +{% highlight "js" %} // create a design doc const ddoc = { _id: '_design/index', @@ -169,7 +169,7 @@ {% include code/end.html %} #### Example Response: -{% highlight js %} +{% highlight "js" %} { "offset" : 0, "rows": [{ @@ -197,7 +197,7 @@ You can also use [complex keys](https://docs.couchdb.org/en/stable/ddocs/views/collation.html#complex-keys) for fancy ordering: {% include code/start.html id="query2" type="callback" %} -{% highlight js %} +{% highlight "js" %} function map(doc) { // sort by last name, first name, and age emit([doc.lastName, doc.firstName, doc.age]); @@ -210,7 +210,7 @@ {% include code/end.html %} {% include code/start.html id="query2" type="async" %} -{% highlight js %} +{% highlight "js" %} function map(doc) { // sort by last name, first name, and age emit([doc.lastName, doc.firstName, doc.age]); @@ -224,7 +224,7 @@ {% include code/end.html %} {% include code/start.html id="query2" type="promise" %} -{% highlight js %} +{% highlight "js" %} function map(doc) { // sort by last name, first name, and age emit([doc.lastName, doc.firstName, doc.age]); @@ -238,7 +238,7 @@ {% include code/end.html %} #### Example Response: -{% highlight js %} +{% highlight "js" %} { "offset": 0, "rows": [{ @@ -271,7 +271,7 @@ PouchDB fully supports [linked documents](https://docs.couchdb.org/en/stable/ddocs/views/joins.html?highlight=linked%20documents#linked-documents). Use them to join two types of documents together, by simply adding an `_id` to the emitted value: {% include code/start.html id="query3" type="callback" %} -{% highlight js %} +{% highlight "js" %} function map(doc) { // join artist data to albums if (doc.type === 'album') { @@ -286,7 +286,7 @@ {% include code/end.html %} {% include code/start.html id="query3" type="async" %} -{% highlight js %} +{% highlight "js" %} function map(doc) { // join artist data to albums if (doc.type === 'album') { @@ -302,7 +302,7 @@ {% include code/end.html %} {% include code/start.html id="query3" type="promise" %} -{% highlight js %} +{% highlight "js" %} function map(doc) { // join artist data to albums if (doc.type === 'album') { @@ -319,7 +319,7 @@ #### Example response: -{% highlight js %} +{% highlight "js" %} { "offset": 0, "rows": [ @@ -378,7 +378,7 @@ If you pass a function to `db.query` and give it the `emit` function as the second argument, then you can use a closure. (Since PouchDB has to use `eval()` to bind `emit`.) {% include code/start.html id="query4" type="callback" %} -{% highlight js %} +{% highlight "js" %} // BAD! will throw error const myId = 'foo'; db.query(function(doc) { @@ -403,7 +403,7 @@ {% include code/end.html %} {% include code/start.html id="query4" type="async" %} -{% highlight js %} +{% highlight "js" %} // BAD! will throw error const myId = 'foo'; try { @@ -431,7 +431,7 @@ {% include code/end.html %} {% include code/start.html id="query4" type="promise" %} -{% highlight js %} +{% highlight "js" %} // BAD! will throw error const myId = 'foo'; db.query(function(doc) { diff --git a/docs/_includes/api/query_index.html b/docs/_includes/api/query_index.html index 7ea7ca8b8a..3ee32da6b7 100644 --- a/docs/_includes/api/query_index.html +++ b/docs/_includes/api/query_index.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Query index" hash="query_index" %} -{% highlight js %} +{% highlight "js" %} db.find(request [, callback]) {% endhighlight %} @@ -18,7 +18,7 @@ #### Example Usage: {% include code/start.html id="query_idx" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.find({ selector: {name: 'Mario'}, fields: ['_id', 'name'], @@ -31,7 +31,7 @@ {% include code/end.html %} {% include code/start.html id="query_idx" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.find({ selector: {name: 'Mario'}, @@ -45,7 +45,7 @@ {% include code/end.html %} {% include code/start.html id="query_idx" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.find({ selector: {name: 'Mario'}, fields: ['_id', 'name'], @@ -60,7 +60,7 @@ #### Example Response: -{% highlight js %} +{% highlight "js" %} { "docs": [ { @@ -104,7 +104,7 @@ If there's no index that matches your `selector`/`sort`, then this method will issue a warning: -{% highlight js %} +{% highlight "js" %} { "docs": [ /* ... */ ], "warning": "No matching index found, create an index to optimize query time." @@ -121,7 +121,7 @@ Use `$eq` for "equals": {% include code/start.html id="query_idx2" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.find({ selector: {name: {$eq: 'Mario'}} }, function (err, result) { @@ -132,7 +132,7 @@ {% include code/end.html %} {% include code/start.html id="query_idx2" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.find({ selector: {name: {$eq: 'Mario'}} @@ -144,7 +144,7 @@ {% include code/end.html %} {% include code/start.html id="query_idx2" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.find({ selector: {name: {$eq: 'Mario'}} }).then(function (result) { @@ -158,7 +158,7 @@ This is equivalent to: {% include code/start.html id="query_idx3" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.find({ selector: {name: 'Mario'} }, function (err, result) { @@ -169,7 +169,7 @@ {% include code/end.html %} {% include code/start.html id="query_idx3" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.find({ selector: {name: 'Mario'} @@ -181,7 +181,7 @@ {% include code/end.html %} {% include code/start.html id="query_idx3" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.find({ selector: {name: 'Mario'} }).then(function (result) { @@ -196,7 +196,7 @@ find all docs where `series` is `'Mario'` and `debut` is greater than `1990`: {% include code/start.html id="query_idx4" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.find({ selector: { series: 'Mario', @@ -210,7 +210,7 @@ {% include code/end.html %} {% include code/start.html id="query_idx4" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.find({ selector: { @@ -225,7 +225,7 @@ {% include code/end.html %} {% include code/start.html id="query_idx4" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.find({ selector: { series: 'Mario', @@ -242,7 +242,7 @@ This is equivalent to: {% include code/start.html id="query_idx5" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.find({ selector: { $and: [ @@ -258,7 +258,7 @@ {% include code/end.html %} {% include code/start.html id="query_idx5" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.find({ selector: { @@ -275,7 +275,7 @@ {% include code/end.html %} {% include code/start.html id="query_idx5" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.find({ selector: { $and: [ @@ -294,7 +294,7 @@ You can also sort the returned documents. For instance, to find all docs sorted by `debut` descending: {% include code/start.html id="query_idx6" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.find({ selector: { debut: {'$gte': null} @@ -308,7 +308,7 @@ {% include code/end.html %} {% include code/start.html id="query_idx6" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.find({ selector: { @@ -323,7 +323,7 @@ {% include code/end.html %} {% include code/start.html id="query_idx6" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.find({ selector: { debut: {'$gte': null} diff --git a/docs/_includes/api/replication.html b/docs/_includes/api/replication.html index 7ee4284e07..4beea78eb9 100644 --- a/docs/_includes/api/replication.html +++ b/docs/_includes/api/replication.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Replicate a database" hash="replication" %} -{% highlight js %} +{% highlight "js" %} PouchDB.replicate(source, target, [options]) {% endhighlight %} @@ -36,7 +36,7 @@ #### Example Usage: -{% highlight js %} +{% highlight "js" %} const rep = PouchDB.replicate('mydb', 'http://localhost:5984/mydb', { live: true, retry: true @@ -59,7 +59,7 @@ There are also shorthands for replication given existing PouchDB objects. These behave the same as `PouchDB.replicate()`: -{% highlight js %} +{% highlight "js" %} db.replicate.to(remoteDB, [options]); // or db.replicate.from(remoteDB, [options]); @@ -82,7 +82,7 @@ As with [changes()](#changes), you can also omit `live`, in which case you can use `replicate()` in the callback/promise style and it will be treated as a single-shot operation. {% include code/start.html id="replication1" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.replicate.to(remote, function (err, result) { if (err) { return console.log(err); } // handle 'completed' result @@ -91,7 +91,7 @@ {% include code/end.html %} {% include code/start.html id="replication1" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.replicate.to(remote); } catch (err) { @@ -101,7 +101,7 @@ {% include code/end.html %} {% include code/start.html id="replication1" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.replicate.to(remote).then(function (result) { // handle 'completed' result }).catch(function (err) { @@ -116,7 +116,7 @@ Example response in the `'change'` listener: -{% highlight js %} +{% highlight "js" %} { "doc_write_failures": 0, "docs_read": 1, @@ -135,7 +135,7 @@ Example response in the `'complete'` listener: -{% highlight js %} +{% highlight "js" %} { "doc_write_failures": 0, "docs_read": 2, @@ -181,7 +181,7 @@ In these examples, we'll work with some mammals. Let's imagine our docs are: -{% highlight js %} +{% highlight "js" %} [ {_id: 'a', name: 'Kangaroo', type: 'marsupial'}, {_id: 'b', name: 'Koala', type: 'marsupial'}, @@ -197,7 +197,7 @@ Filter by `type === 'marsupial'`: -{% highlight js %} +{% highlight "js" %} remote.replicate.to(local, { filter: function (doc) { return doc.type === 'marsupial'; @@ -209,7 +209,7 @@ Filter documents with `_id`s `['a', 'c']`. -{% highlight js %} +{% highlight "js" %} remote.replicate.to(local, { doc_ids: ['a', 'c'] }); @@ -219,7 +219,7 @@ First `put()` a design document in the remote database: -{% highlight js %} +{% highlight "js" %} { _id: '_design/mydesign', filters: { @@ -232,7 +232,7 @@ Then filter by `type === 'marsupial'`: -{% highlight js %} +{% highlight "js" %} remote.replicate.to(local, { filter: 'mydesign/myfilter' }); @@ -244,7 +244,7 @@ First `put()` a design document in the remote database: -{% highlight js %} +{% highlight "js" %} { _id: '_design/mydesign', filters: { @@ -257,7 +257,7 @@ Then filter by `type === 'marsupial'`: -{% highlight js %} +{% highlight "js" %} remote.replicate.to(local, { filter: 'mydesign/myfilter', query_params: {type: 'marsupial'} @@ -272,7 +272,7 @@ First `put()` a design document in the remote database: -{% highlight js %} +{% highlight "js" %} { _id: '_design/mydesign', views: { @@ -289,7 +289,7 @@ Then filter by `type === 'marsupial'`: -{% highlight js %} +{% highlight "js" %} remote.replicate.to(local, { filter: '_view', view: 'mydesign/myview' @@ -302,7 +302,7 @@ Here's a simple backoff function that starts at 1000 milliseconds and triples it every time a remote request fails: -{% highlight js %} +{% highlight "js" %} db.replicate.to(remote, { live: true, diff --git a/docs/_includes/api/revisions_diff.html b/docs/_includes/api/revisions_diff.html index 9bd6c45607..61a649a55e 100644 --- a/docs/_includes/api/revisions_diff.html +++ b/docs/_includes/api/revisions_diff.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Document revisions diff" hash="revisions_diff" %} -{% highlight js %} +{% highlight "js" %} db.revsDiff(diff, [callback]) {% endhighlight %} @@ -10,7 +10,7 @@ #### Example Usage: {% include code/start.html id="revsdiff1" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.revsDiff({ myDoc1: [ "1-b2e54331db828310f3c772d6e042ac9c", @@ -24,7 +24,7 @@ {% include code/end.html %} {% include code/start.html id="revsdiff1" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.revsDiff({ myDoc1: [ @@ -39,7 +39,7 @@ {% include code/end.html %} {% include code/start.html id="revsdiff1" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.revsDiff({ myDoc1: [ "1-b2e54331db828310f3c772d6e042ac9c", @@ -54,7 +54,7 @@ {% include code/end.html %} #### Example Response: -{% highlight js %} +{% highlight "js" %} { "myDoc1": { "missing": ["2-3a24009a9525bde9e4bfa8a99046b00d"] diff --git a/docs/_includes/api/save_attachment.html b/docs/_includes/api/save_attachment.html index 3f2ac38207..4cba436a3f 100644 --- a/docs/_includes/api/save_attachment.html +++ b/docs/_includes/api/save_attachment.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Save an attachment" hash="save_attachment" %} -{% highlight js %} +{% highlight "js" %} db.putAttachment(docId, attachmentId, [rev], attachment, type, [callback]); {% endhighlight %} @@ -15,7 +15,7 @@ #### Example Usage: {% include code/start.html id="attach1" type="callback" %} -{% highlight js %} +{% highlight "js" %} const attachment = new Blob(['Is there life on Mars?'], {type: 'text/plain'}); db.putAttachment('doc', 'att.txt', attachment, 'text/plain', function(err, res) { if (err) { return console.log(err); } @@ -25,7 +25,7 @@ {% include code/end.html %} {% include code/start.html id="attach1" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const attachment = new Blob(['Is there life on Mars?'], {type: 'text/plain'}); const result = await db.putAttachment('doc', 'att.txt', attachment, 'text/plain'); @@ -36,7 +36,7 @@ {% include code/end.html %} {% include code/start.html id="attach1" type="promise" %} -{% highlight js %} +{% highlight "js" %} const attachment = new Blob(['Is there life on Mars?'], {type: 'text/plain'}); db.putAttachment('doc', 'att.txt', attachment, 'text/plain').then(function (result) { // handle result @@ -48,7 +48,7 @@ #### Example Response: -{% highlight js %} +{% highlight "js" %} { "ok": true, "id": "doc", @@ -58,7 +58,7 @@ Within Node, you must use a `Buffer` instead of a `Blob`: -{% highlight js %} +{% highlight "js" %} const attachment = new Buffer('Is there life on Mars?'); {% endhighlight %} @@ -71,7 +71,7 @@ If you supply a string instead of a `Blob`/`Buffer`, then it will be assumed to be a base64-encoded string, and will be processed accordingly: {% include code/start.html id="attach3" type="callback" %} -{% highlight js %} +{% highlight "js" %} const attachment = "TGVnZW5kYXJ5IGhlYXJ0cywgdGVhciB1cyBhbGwgYXBhcnQKTWFrZS" + "BvdXIgZW1vdGlvbnMgYmxlZWQsIGNyeWluZyBvdXQgaW4gbmVlZA=="; @@ -83,7 +83,7 @@ {% include code/end.html %} {% include code/start.html id="attach3" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const attachment = "TGVnZW5kYXJ5IGhlYXJ0cywgdGVhciB1cyBhbGwgYXBhcnQKTWFrZS" + @@ -96,7 +96,7 @@ {% include code/end.html %} {% include code/start.html id="attach3" type="promise" %} -{% highlight js %} +{% highlight "js" %} const attachment = "TGVnZW5kYXJ5IGhlYXJ0cywgdGVhciB1cyBhbGwgYXBhcnQKTWFrZS" + "BvdXIgZW1vdGlvbnMgYmxlZWQsIGNyeWluZyBvdXQgaW4gbmVlZA=="; @@ -114,7 +114,7 @@ You can also inline attachments inside the document. The attachment data may be supplied as a base64-encoded string with the `content_type`: {% include code/start.html id="attach2" type="callback" %} -{% highlight js %} +{% highlight "js" %} const doc = { "_id": "doc", "title": "Legendary Hearts", @@ -134,7 +134,7 @@ {% include code/end.html %} {% include code/start.html id="attach2" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const doc = { "_id": "doc", @@ -155,7 +155,7 @@ {% include code/end.html %} {% include code/start.html id="attach2" type="promise" %} -{% highlight js %} +{% highlight "js" %} const doc = { "_id": "doc", "title": "Legendary Hearts", @@ -180,7 +180,7 @@ You can also inline `Blob`s/`Buffer`s: {% include code/start.html id="attach4" type="callback" %} -{% highlight js %} +{% highlight "js" %} const doc = { "_id": "doc", "title": "Legendary Hearts", @@ -199,7 +199,7 @@ {% include code/end.html %} {% include code/start.html id="attach4" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const doc = { "_id": "doc", @@ -219,7 +219,7 @@ {% include code/end.html %} {% include code/start.html id="attach4" type="promise" %} -{% highlight js %} +{% highlight "js" %} const doc = { "_id": "doc", "title": "Legendary Hearts", @@ -243,7 +243,7 @@ The inline approach allows you to save multiple attachments to the same document in a single shot: {% include code/start.html id="attach5" type="callback" %} -{% highlight js %} +{% highlight "js" %} const doc = { "_id": "doc", "title": "Legendary Hearts", @@ -276,7 +276,7 @@ {% include code/end.html %} {% include code/start.html id="attach5" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const doc = { "_id": "doc", @@ -310,7 +310,7 @@ {% include code/end.html %} {% include code/start.html id="attach5" type="promise" %} -{% highlight js %} +{% highlight "js" %} const doc = { "_id": "doc", "title": "Legendary Hearts", diff --git a/docs/_includes/api/sync.html b/docs/_includes/api/sync.html index eb75ed15b7..83b8586071 100644 --- a/docs/_includes/api/sync.html +++ b/docs/_includes/api/sync.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="Sync a database" hash="sync" %} -{% highlight js %} +{% highlight "js" %} const sync = PouchDB.sync(src, target, [options]) {% endhighlight %} @@ -8,7 +8,7 @@ In other words, this code: -{% highlight js %} +{% highlight "js" %} PouchDB.replicate('mydb', 'http://localhost:5984/mydb'); PouchDB.replicate('http://localhost:5984/mydb', 'mydb'); {% endhighlight %} @@ -16,7 +16,7 @@ is equivalent to this code: -{% highlight js %} +{% highlight "js" %} PouchDB.sync('mydb', 'http://localhost:5984/mydb'); {% endhighlight %} @@ -28,7 +28,7 @@ Replication options such as `filter` passed to sync directly will be passed to both replications. Please refer to [replicate()](api.html#replication) for documentation on those options. #### Example Usage: -{% highlight js %} +{% highlight "js" %} const sync = PouchDB.sync('mydb', 'http://localhost:5984/mydb', { live: true, retry: true @@ -51,14 +51,14 @@ There is also a shorthand for syncing given existing PouchDB objects. This behaves the same as `PouchDB.sync()`: -{% highlight js %} +{% highlight "js" %} db.sync(remoteDB, [options]); {% endhighlight %} It is also possible to combine "one-way" replication and sync for performance reasons. When your PouchDB application starts up it could perform a one-off, one-way replication to completion and then initiate the two-way, continuous retryable sync: -{% highlight js %} +{% highlight "js" %} const url = 'http://localhost:5984/mydb'; const opts = { live: true, retry: true }; @@ -78,7 +78,7 @@ Change events in `sync` have an extra property `direction` which refers to the direction the change was going. Its value will either be `push` or `pull`. -{% highlight js %} +{% highlight "js" %} { direction: 'push', change: { ok: true, diff --git a/docs/_includes/api/view_cleanup.html b/docs/_includes/api/view_cleanup.html index 4df285312d..8ff0c66d23 100644 --- a/docs/_includes/api/view_cleanup.html +++ b/docs/_includes/api/view_cleanup.html @@ -1,6 +1,6 @@ {% include anchor.html edit="true" title="View cleanup" hash="view_cleanup" %} -{% highlight js %} +{% highlight "js" %} db.viewCleanup([callback]) {% endhighlight %} @@ -13,7 +13,7 @@ #### Example Usage: {% include code/start.html id="viewcleanup" type="callback" %} -{% highlight js %} +{% highlight "js" %} db.viewCleanup(function (err, result) { if (err) { return console.log(err); } // handle result @@ -22,7 +22,7 @@ {% include code/end.html %} {% include code/start.html id="viewcleanup" type="async" %} -{% highlight js %} +{% highlight "js" %} try { const result = await db.viewCleanup(); } catch (err) { @@ -32,7 +32,7 @@ {% include code/end.html %} {% include code/start.html id="viewcleanup" type="promise" %} -{% highlight js %} +{% highlight "js" %} db.viewCleanup().then(function (result) { // handle result }).catch(function (err) { @@ -42,6 +42,6 @@ {% include code/end.html %} #### Example Response: -{% highlight js %} +{% highlight "js" %} { "ok" : "true" } {% endhighlight %} \ No newline at end of file diff --git a/docs/_includes/guides_nav.html b/docs/_includes/guides_nav.html index d37e0915e4..c4773fee1f 100644 --- a/docs/_includes/guides_nav.html +++ b/docs/_includes/guides_nav.html @@ -1,8 +1,8 @@ -{% assign guides = (site.guides | sort: 'index') %} +{% assign guides = collections.guides | sort: 'index' %} {% for guide in guides %} - {% assign title = guide.title %} - {% if guide.nav %} - {% assign title = guide.nav %} + {% assign title = guide.data.title %} + {% if guide.data.nav %} + {% assign title = guide.data.nav %} {% endif %} {% include nav_item.html path=guide.url text=title %} {% endfor %} diff --git a/docs/_includes/post_details.html b/docs/_includes/post_details.html index 977d0c1e77..b25c4946d1 100644 --- a/docs/_includes/post_details.html +++ b/docs/_includes/post_details.html @@ -1,38 +1,42 @@ -{% unless post %} - {% assign post = page %} -{% endunless %} +{% if post %} + {% assign author = post.data.author %} + {% assign post_date = post.date %} + {% assign modified_date = post.modified_date %} + {% assign url = post.url %} +{% else %} + {% assign post_date = page.date %} +{% endif %} -{% assign post_author = post.author %} -{% assign post_gravatar = 'https://www.fillmurray.com/82/82' %} -{% assign modified_date = '' %} +{% assign post_author = author %} +{% assign post_gravatar = '' %} -{% for author in site.data.authors %} - {% if author.name == post.author %} - {% if author.twitter %} - {% capture post_author %}{{ post.author }}{% endcapture %} +{% for a in authors %} + {% if a.name == author %} + {% if a.twitter %} + {% capture post_author %}{{ author }}{% endcapture %} {% endif %} - {% if author.gravatar %} - {% capture post_gravatar %}https://gravatar.com/avatar/{{ author.gravatar }}{% endcapture %} + {% if a.gravatar %} + {% capture post_gravatar %}https://gravatar.com/avatar/{{ a.gravatar }}{% endcapture %} {% endif %} {% endif %} {% endfor %} -{% if post.modified_date %} - {% capture modified_date %}Updated: {{ post.modified_date | date_to_long_string }}
{% endcapture %} +{% if modified_date %} + {% capture modified_date %}Updated: {{ modified_date | date_to_long_string }}
{% endcapture %} {% endif %}
- {{ post.author }} + {{ author }}

By: {{ post_author }}
- Published: {{ post.date | date_to_long_string }}
+ Published: {{ post_date | date_to_long_string }}
{% if page.url == "/blog/" or page.url contains "/blog/page" or page.url == "/" %} - {{ post.excerpt | strip_html | truncatewords: 30, '' }} - [...] + {{ post.page.excerpt | markdown | strip_html | truncatewords: 30, '' }} + [...] {% endif %}

diff --git a/docs/_layouts/2ColLeft.html b/docs/_layouts/2ColLeft.html index 77e5dc73b9..a655349eca 100644 --- a/docs/_layouts/2ColLeft.html +++ b/docs/_layouts/2ColLeft.html @@ -7,7 +7,7 @@
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 207cd0aef3..63670b0804 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -3,7 +3,7 @@ - {{ page.title }} + {{ title }} @@ -69,14 +69,14 @@
-

{{ page.title }}

- {% if page.edit != false %} +

{{ title }}

+ {% if edit != false %} {% include edit_button.html %} {% endif %} - {% if page.sub_title %} -

{{ page.sub_title}}

+ {% if sub_title %} +

{{ sub_title}}

{% endif %}
diff --git a/docs/_layouts/guide.html b/docs/_layouts/guide.html index 7f6942e51b..87669ad2d4 100644 --- a/docs/_layouts/guide.html +++ b/docs/_layouts/guide.html @@ -4,21 +4,21 @@ {{ content }} -{% assign guides = site.guides | sort: 'index' %} +{% assign guides = collections.guides | sort: 'index' %} {% for guide in guides %} - {% if page.title == guide.title %} - {% assign prev = guide.index | minus: 2 %} - {% assign next = guide.index %} + {% if title == guide.data.title %} + {% assign prev = guide.data.index | minus: 2 %} + {% assign next = guide.data.index %} diff --git a/docs/_plugins/markdown.rb b/docs/_plugins/markdown.rb deleted file mode 100644 index 5481a5ad66..0000000000 --- a/docs/_plugins/markdown.rb +++ /dev/null @@ -1,13 +0,0 @@ -module Jekyll - class MarkdownBlock < Liquid::Block - def initialize(tag_name, text, tokens) - super - end - require "kramdown" - def render(context) - content = super - "#{Kramdown::Document.new(content).to_html}" - end - end -end -Liquid::Template.register_tag('markdown', Jekyll::MarkdownBlock) \ No newline at end of file diff --git a/docs/blog/index.html b/docs/blog/index.html index 87abb308c0..c3510d8d94 100644 --- a/docs/blog/index.html +++ b/docs/blog/index.html @@ -2,30 +2,34 @@ layout: default title: Blog edit: false +pagination: + data: collections.posts + size: 5 + reverse: true + alias: posts +permalink: "blog/{% if pagination.pageNumber > 0 %}page{{ pagination.pageNumber | plus:1 }}/{% endif %}" ---
-{% for post in paginator.posts %} +{% for post in posts %} -{{ post.title }} +{{ post.data.title }} {% include post_details.html %} {% endfor %}
diff --git a/docs/download.md b/docs/download.md index 1663ce0d4a..e8d5264826 100644 --- a/docs/download.md +++ b/docs/download.md @@ -6,7 +6,7 @@ sidebar: nav.html {% include anchor.html class="h3" title="Quick Start" hash="file" %} -{% highlight html %} +{% highlight "html" %} @@ -52,7 +52,7 @@ PouchDB is now installed in your app and ready to use! (In production, you shoul The rest of the work will be done inside `app.js`. We will start by creating a database to enter your todos. To create a database simply instantiate a new PouchDB object with the name of the database: -{% highlight js %} +{% highlight "js" %} // EDITING STARTS HERE (you don't need to edit anything above this line) const db = new PouchDB('todos'); @@ -65,7 +65,7 @@ You don't need to create a schema for the database. After giving it a name, you The first thing we shall do is start writing items to the database. The main input will call `addTodo` with the current text when the user presses `Enter`. We can complete this function with the following code: -{% highlight js %} +{% highlight "js" %} function addTodo(text) { const todo = { _id: new Date().toISOString(), @@ -88,7 +88,7 @@ The `callback` function will be called once the document has been written (or fa We have included a helper function `redrawTodosUI` that takes an array of todos to display, so all we need to do is read the todos from the database. Here we will simply read all the documents using `db.allDocs`. The `include_docs` option tells PouchDB to give us the data within each document, and the `descending` option tells PouchDB how to order the results based on their `_id` field, giving us newest first. -{% highlight js %} +{% highlight "js" %} function showTodos() { db.allDocs({include_docs: true, descending: true}, function(err, doc) { redrawTodosUI(doc.rows); @@ -102,7 +102,7 @@ Once you have included this code, you should be able to refresh the page to see We don't want to refresh the page to see new items. More typically you would update the UI manually when you write data to it, however, in PouchDB you may be syncing data remotely, so you want to make sure you update whenever the remote data changes. To do this we will call `db.changes` which subscribes to updates to the database, wherever they come from. You can enter this code between the `remoteCouch` and `addTodo` declaration: -{% highlight js %} +{% highlight "js" %} const remoteCouch = false; db.changes({ @@ -120,7 +120,7 @@ So every time an update happens to the database, we redraw the UI to show the ne When the user checks a checkbox, the `checkboxChanged` function will be called, so we'll fill in the code to edit the object and call `db.put`: -{% highlight js %} +{% highlight "js" %} function checkboxChanged(todo, event) { todo.completed = event.target.checked; db.put(todo); @@ -135,7 +135,7 @@ You can test that this works by checking a todo item and refreshing the page. It To delete an object you can call db.remove with the object. -{% highlight js %} +{% highlight "js" %} function deleteButtonPressed(todo) { db.remove(todo); } @@ -147,7 +147,7 @@ Similar to editing a document, both the `_id` and `_rev` properties are required `todoBlurred` is called when the user edits a document. Here we'll delete the document if the user has entered a blank title, and we'll update it otherwise. -{% highlight js %} +{% highlight "js" %} function todoBlurred(todo, event) { const trimmedText = event.target.value.trim(); if (!trimmedText) { @@ -169,14 +169,14 @@ To replicate directly with CouchDB, you need to make sure CORS is enabled. Only You can enable CORS in CouchDB using `curl` or the Futon web interface, but we've saved you some time by making a Node script called [add-cors-to-couchdb](https://github.com/pouchdb/add-cors-to-couchdb). Just run: -{% highlight bash %} +{% highlight "bash" %} $ npm install -g add-cors-to-couchdb $ add-cors-to-couchdb {% endhighlight %} Or if your database is not at `127.0.0.1:5984`: -{% highlight bash %} +{% highlight "bash" %} $ add-cors-to-couchdb http://me.example.com -u myusername -p mypassword {% endhighlight %} @@ -188,7 +188,7 @@ You can check that CORS is now enabled by visiting [http://localhost:5984/_utils Now we will have the todo list sync. Back in `app.js` we need to specify the address of the remote database. Remember to replace `user`, `pass` and `myname.example.com` with the credentials of your own CouchDB instance: -{% highlight js %} +{% highlight "js" %} // EDITING STARTS HERE (you don't need to edit anything above this line) const db = new PouchDB('todos'); @@ -197,7 +197,7 @@ const remoteCouch = 'http://user:pass@myname.example.com/todos'; Then we can implement the sync function like so: -{% highlight js %} +{% highlight "js" %} function sync() { syncDom.setAttribute('data-sync-state', 'syncing'); const opts = {live: true}; diff --git a/docs/_guides/async-code.md b/docs/guides/async-code.md similarity index 100% rename from docs/_guides/async-code.md rename to docs/guides/async-code.md diff --git a/docs/_guides/attachments.md b/docs/guides/attachments.md similarity index 100% rename from docs/_guides/attachments.md rename to docs/guides/attachments.md diff --git a/docs/_guides/bulk-operations.md b/docs/guides/bulk-operations.md similarity index 100% rename from docs/_guides/bulk-operations.md rename to docs/guides/bulk-operations.md diff --git a/docs/_guides/changes.md b/docs/guides/changes.md similarity index 100% rename from docs/_guides/changes.md rename to docs/guides/changes.md diff --git a/docs/_guides/compact-and-destroy.md b/docs/guides/compact-and-destroy.md similarity index 100% rename from docs/_guides/compact-and-destroy.md rename to docs/guides/compact-and-destroy.md diff --git a/docs/_guides/conflicts.md b/docs/guides/conflicts.md similarity index 100% rename from docs/_guides/conflicts.md rename to docs/guides/conflicts.md diff --git a/docs/_guides/databases.md b/docs/guides/databases.md similarity index 100% rename from docs/_guides/databases.md rename to docs/guides/databases.md diff --git a/docs/_guides/documents.md b/docs/guides/documents.md similarity index 100% rename from docs/_guides/documents.md rename to docs/guides/documents.md diff --git a/docs/guides/guides.json b/docs/guides/guides.json new file mode 100644 index 0000000000..cd20b85a28 --- /dev/null +++ b/docs/guides/guides.json @@ -0,0 +1,3 @@ +{ + "tags": "guides" +} diff --git a/docs/_guides/index.md b/docs/guides/index.md similarity index 100% rename from docs/_guides/index.md rename to docs/guides/index.md diff --git a/docs/_guides/local-documents.md b/docs/guides/local-documents.md similarity index 100% rename from docs/_guides/local-documents.md rename to docs/guides/local-documents.md diff --git a/docs/_guides/mango-queries.md b/docs/guides/mango-queries.md similarity index 100% rename from docs/_guides/mango-queries.md rename to docs/guides/mango-queries.md diff --git a/docs/_guides/queries.md b/docs/guides/queries.md similarity index 100% rename from docs/_guides/queries.md rename to docs/guides/queries.md diff --git a/docs/_guides/replication.md b/docs/guides/replication.md similarity index 100% rename from docs/_guides/replication.md rename to docs/guides/replication.md diff --git a/docs/_guides/setup-couchdb.md b/docs/guides/setup-couchdb.md similarity index 100% rename from docs/_guides/setup-couchdb.md rename to docs/guides/setup-couchdb.md diff --git a/docs/_guides/setup-pouchdb.md b/docs/guides/setup-pouchdb.md similarity index 100% rename from docs/_guides/setup-pouchdb.md rename to docs/guides/setup-pouchdb.md diff --git a/docs/_guides/updating-deleting.md b/docs/guides/updating-deleting.md similarity index 100% rename from docs/_guides/updating-deleting.md rename to docs/guides/updating-deleting.md diff --git a/docs/index.md b/docs/index.md index 496b1f5a6d..fab1ae7749 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,29 +2,19 @@ layout: default title: PouchDB, the JavaScript Database that Syncs! --- -
-
-
-
-

The Database that Syncs!

-

PouchDB is an open-source JavaScript database inspired by Apache CouchDB that is designed to run well within the browser.

-

PouchDB was created to help web developers build applications that work as well offline as they do online.

It enables applications to store data locally while offline, then synchronize it with CouchDB and compatible servers when the application is back online, keeping the user's data in sync no matter where they next login.

- Learn more -
-
-{% highlight js %} +{% highlight "js" %} const db = new PouchDB('dbname'); db.put({ @@ -39,105 +29,64 @@ db.changes().on('change', function() { db.replicate.to('https://example.com/mydb'); {% endhighlight %} -
-
-
-
-
-
-
- -
- -

Cross Browser

Works in Firefox, Chrome, Opera, Safari, IE and Node.js

-
-
- -

Lightweight

PouchDB is just a script tag and 46KB (gzipped) away in the browser, or $ npm install pouchdb away in Node.

-
-
- -

Easy to Learn

Requires some programming knowledge, however PouchDB is a piece of cake to learn.

-
-
- -

Open Source

Everything is developed out in the open on GitHub, contributors always welcome!

-
-
-
-
-
-

Latest

-
- -{% for post in site.posts limit:2 %} - +{% for post in collections.posts limit:2 %}
- - -

{{ post.title }}

- +

{{ post.data.title }}

{% include post_details.html %} -
- {% endfor %} -
- View more -
-
diff --git a/docs/manifest.appcache b/docs/manifest.appcache index 03144a0b9e..dc4d5e0160 100644 --- a/docs/manifest.appcache +++ b/docs/manifest.appcache @@ -5,11 +5,11 @@ CACHE MANIFEST # rev {{ site.time }} CACHE: -{% for page in site.pages %}{% if page.url != '/manifest.appcache' %}{{ page.url | replace:'index.html','' }}{% endif %} +{% for page in collections.pages %}{% if page.url != '/manifest.appcache' %}{{ page.url | replace:'index.html','' }}{% endif %} {% endfor %} -{% for page in site.guides %}{{ page.url | replace:'index.html','' }} +{% for page in collections.guides %}{{ page.url | replace:'index.html','' }} {% endfor %} -{% for page in site.posts %}{{ page.url | replace:'index.html','' }} +{% for page in collections.posts %}{{ page.url | replace:'index.html','' }} {% endfor %} /static/css/pouchdb.css diff --git a/docs/_posts/2014-04-01-pouchdb-2.1.0.md b/docs/posts/2014-04-01-pouchdb-2.1.0.md similarity index 100% rename from docs/_posts/2014-04-01-pouchdb-2.1.0.md rename to docs/posts/2014-04-01-pouchdb-2.1.0.md diff --git a/docs/_posts/2014-04-01-welcome-to-the-pouchdb-blog.md b/docs/posts/2014-04-01-welcome-to-the-pouchdb-blog.md similarity index 100% rename from docs/_posts/2014-04-01-welcome-to-the-pouchdb-blog.md rename to docs/posts/2014-04-01-welcome-to-the-pouchdb-blog.md diff --git a/docs/_posts/2014-04-14-pagination-strategies-with-pouchdb.md b/docs/posts/2014-04-14-pagination-strategies-with-pouchdb.md similarity index 100% rename from docs/_posts/2014-04-14-pagination-strategies-with-pouchdb.md rename to docs/posts/2014-04-14-pagination-strategies-with-pouchdb.md diff --git a/docs/_posts/2014-05-01-pouchdb-2.2.0.md b/docs/posts/2014-05-01-pouchdb-2.2.0.md similarity index 100% rename from docs/_posts/2014-05-01-pouchdb-2.2.0.md rename to docs/posts/2014-05-01-pouchdb-2.2.0.md diff --git a/docs/_posts/2014-05-01-secondary-indexes-have-landed-in-pouchdb.md b/docs/posts/2014-05-01-secondary-indexes-have-landed-in-pouchdb.md similarity index 100% rename from docs/_posts/2014-05-01-secondary-indexes-have-landed-in-pouchdb.md rename to docs/posts/2014-05-01-secondary-indexes-have-landed-in-pouchdb.md diff --git a/docs/_posts/2014-06-01-pouchdb-2.2.3.md b/docs/posts/2014-06-01-pouchdb-2.2.3.md similarity index 100% rename from docs/_posts/2014-06-01-pouchdb-2.2.3.md rename to docs/posts/2014-06-01-pouchdb-2.2.3.md diff --git a/docs/_posts/2014-06-17-12-pro-tips-for-better-code-with-pouchdb.md b/docs/posts/2014-06-17-12-pro-tips-for-better-code-with-pouchdb.md similarity index 100% rename from docs/_posts/2014-06-17-12-pro-tips-for-better-code-with-pouchdb.md rename to docs/posts/2014-06-17-12-pro-tips-for-better-code-with-pouchdb.md diff --git a/docs/_posts/2014-07-25-pouchdb-levels-up.md b/docs/posts/2014-07-25-pouchdb-levels-up.md similarity index 100% rename from docs/_posts/2014-07-25-pouchdb-levels-up.md rename to docs/posts/2014-07-25-pouchdb-levels-up.md diff --git a/docs/_posts/2014-08-12-pouchdb-3.0.0.md b/docs/posts/2014-08-12-pouchdb-3.0.0.md similarity index 100% rename from docs/_posts/2014-08-12-pouchdb-3.0.0.md rename to docs/posts/2014-08-12-pouchdb-3.0.0.md diff --git a/docs/_posts/2014-08-16-pouchdb-3.0.1.md b/docs/posts/2014-08-16-pouchdb-3.0.1.md similarity index 100% rename from docs/_posts/2014-08-16-pouchdb-3.0.1.md rename to docs/posts/2014-08-16-pouchdb-3.0.1.md diff --git a/docs/_posts/2014-08-20-pouchdb-3.0.2.md b/docs/posts/2014-08-20-pouchdb-3.0.2.md similarity index 100% rename from docs/_posts/2014-08-20-pouchdb-3.0.2.md rename to docs/posts/2014-08-20-pouchdb-3.0.2.md diff --git a/docs/_posts/2014-08-29-pouchdb-3.0.3.md b/docs/posts/2014-08-29-pouchdb-3.0.3.md similarity index 100% rename from docs/_posts/2014-08-29-pouchdb-3.0.3.md rename to docs/posts/2014-08-29-pouchdb-3.0.3.md diff --git a/docs/_posts/2014-09-04-pouchdb-3.0.4.md b/docs/posts/2014-09-04-pouchdb-3.0.4.md similarity index 100% rename from docs/_posts/2014-09-04-pouchdb-3.0.4.md rename to docs/posts/2014-09-04-pouchdb-3.0.4.md diff --git a/docs/_posts/2014-09-07-pouchdb-3.0.5.md b/docs/posts/2014-09-07-pouchdb-3.0.5.md similarity index 100% rename from docs/_posts/2014-09-07-pouchdb-3.0.5.md rename to docs/posts/2014-09-07-pouchdb-3.0.5.md diff --git a/docs/_posts/2014-09-22-3.0.6.md b/docs/posts/2014-09-22-3.0.6.md similarity index 100% rename from docs/_posts/2014-09-22-3.0.6.md rename to docs/posts/2014-09-22-3.0.6.md diff --git a/docs/_posts/2014-10-26-10-things-i-learned-from-reading-and-writing-the-pouchdb-source.md b/docs/posts/2014-10-26-10-things-i-learned-from-reading-and-writing-the-pouchdb-source.md similarity index 100% rename from docs/_posts/2014-10-26-10-things-i-learned-from-reading-and-writing-the-pouchdb-source.md rename to docs/posts/2014-10-26-10-things-i-learned-from-reading-and-writing-the-pouchdb-source.md diff --git a/docs/_posts/2014-11-10-3.1.0.md b/docs/posts/2014-11-10-3.1.0.md similarity index 100% rename from docs/_posts/2014-11-10-3.1.0.md rename to docs/posts/2014-11-10-3.1.0.md diff --git a/docs/_posts/2014-11-27-testing-pouchdb.md b/docs/posts/2014-11-27-testing-pouchdb.md similarity index 100% rename from docs/_posts/2014-11-27-testing-pouchdb.md rename to docs/posts/2014-11-27-testing-pouchdb.md diff --git a/docs/_posts/2014-12-04-3.2.0.md b/docs/posts/2014-12-04-3.2.0.md similarity index 100% rename from docs/_posts/2014-12-04-3.2.0.md rename to docs/posts/2014-12-04-3.2.0.md diff --git a/docs/_posts/2014-12-11-the-pains-of-being-async-at-heart.md b/docs/posts/2014-12-11-the-pains-of-being-async-at-heart.md similarity index 100% rename from docs/_posts/2014-12-11-the-pains-of-being-async-at-heart.md rename to docs/posts/2014-12-11-the-pains-of-being-async-at-heart.md diff --git a/docs/_posts/2015-01-05-pouchdb-3.2.1-you-can-always-be-faster.md b/docs/posts/2015-01-05-pouchdb-3.2.1-you-can-always-be-faster.md similarity index 100% rename from docs/_posts/2015-01-05-pouchdb-3.2.1-you-can-always-be-faster.md rename to docs/posts/2015-01-05-pouchdb-3.2.1-you-can-always-be-faster.md diff --git a/docs/_posts/2015-02-03-fix-up-look-sharp.md b/docs/posts/2015-02-03-fix-up-look-sharp.md similarity index 100% rename from docs/_posts/2015-02-03-fix-up-look-sharp.md rename to docs/posts/2015-02-03-fix-up-look-sharp.md diff --git a/docs/_posts/2015-02-14-a-quick-one.md b/docs/posts/2015-02-14-a-quick-one.md similarity index 100% rename from docs/_posts/2015-02-14-a-quick-one.md rename to docs/posts/2015-02-14-a-quick-one.md diff --git a/docs/_posts/2015-02-28-efficiently-managing-ui-state-in-pouchdb.md b/docs/posts/2015-02-28-efficiently-managing-ui-state-in-pouchdb.md similarity index 100% rename from docs/_posts/2015-02-28-efficiently-managing-ui-state-in-pouchdb.md rename to docs/posts/2015-02-28-efficiently-managing-ui-state-in-pouchdb.md diff --git a/docs/_posts/2015-03-05-taming-the-async-beast-with-es7.md b/docs/posts/2015-03-05-taming-the-async-beast-with-es7.md similarity index 97% rename from docs/_posts/2015-03-05-taming-the-async-beast-with-es7.md rename to docs/posts/2015-03-05-taming-the-async-beast-with-es7.md index 7a9b111ffc..d095ea32ab 100644 --- a/docs/_posts/2015-03-05-taming-the-async-beast-with-es7.md +++ b/docs/posts/2015-03-05-taming-the-async-beast-with-es7.md @@ -13,7 +13,7 @@ We can't really help it. PouchDB is an abstraction over IndexedDB, WebSQL, Level When I think of elegant database APIs, however, I'm still struck by the simplicity of LocalStorage: -{% highlight js %} +{% highlight "js" %} if (!localStorage.foo) { localStorage.foo = 'bar'; }; @@ -30,7 +30,7 @@ For PouchDB, we can try to mitigate the complexity of asynchronous APIs with pro However, promisey code is still hard to read, because promises are basically a bolt-on replacement for language primitives like `try`, `catch`, and `return`: -{% highlight js %} +{% highlight "js" %} var db = new PouchDB('mydb'); db.post({}).then(function (result) { // post a new doc return db.get(result.id); // fetch the doc @@ -49,7 +49,7 @@ Until recently, this was the best we could hope for. But all of that changes wit What if I told you that, with ES7, you could rewrite the above code to look like this: -{% highlight js %} +{% highlight "js" %} let db = new PouchDB('mydb'); try { let result = await db.post({}); @@ -72,7 +72,7 @@ First, let's take a look at how ES7 is accomplishing this amazing feat. ES7 gives us a new kind of function, the `async function`. Inside of an `async function`, we have a new keyword, `await`, which we use to "wait for" a promise: -{% highlight js %} +{% highlight "js" %} async function myFunction() { let result = await somethingThatReturnsAPromise(); console.log(result); // cool, we have a result @@ -82,7 +82,7 @@ async function myFunction() { If the promise resolves, we can immediately interact with it on the next line. And if it rejects, then an error is thrown. So `try`/`catch` actually works again! -{% highlight js %} +{% highlight "js" %} async function myFunction() { try { await somethingThatReturnsAPromise(); @@ -104,7 +104,7 @@ First, consider a common idiom in PouchDB: we want to `get()` a document by `_id With promises, you'd have to write something like this: -{% highlight js %} +{% highlight "js" %} db.get('docid').catch(function (err) { if (err.name === 'not_found') { return {}; // new doc @@ -117,7 +117,7 @@ db.get('docid').catch(function (err) { With async functions, this becomes: -{% highlight js %} +{% highlight "js" %} let doc; try { doc = await db.get('docid'); @@ -143,7 +143,7 @@ Another, more insidious problem is that you have to be careful to wrap your code My advice is to ensure that your async functions are entirely surrounded by `try`/`catch`es, at least at the top level: -{% highlight js %} +{% highlight "js" %} async function createNewDoc() { let response = await db.post({}); // post a new doc return await db.get(response.id); // find by id @@ -165,7 +165,7 @@ Async functions get really impressive when it comes to iteration. For instance, Using standard ES6 promises, we'd have to roll our own promise chain: -{% highlight js %} +{% highlight "js" %} var promise = Promise.resolve(); var docs = [{}, {}, {}]; @@ -182,7 +182,7 @@ promise.then(function () { This works, but it sure is ugly. It's also error-prone, because if you accidentally do: -{% highlight js %} +{% highlight "js" %} docs.forEach(function (doc) { promise = promise.then(db.post(doc)); }); @@ -192,7 +192,7 @@ Then the promises will actually execute *concurrently*, which can lead to unexpe With ES7, though, we can just use a regular for-loop: -{% highlight js %} +{% highlight "js" %} let docs = [{}, {}, {}]; for (let i = 0; i < docs.length; i++) { @@ -203,7 +203,7 @@ for (let i = 0; i < docs.length; i++) { This (very concise) code does the same thing as the promise chain! We can make it even shorter by using `for...of`: -{% highlight js %} +{% highlight "js" %} let docs = [{}, {}, {}]; for (let doc of docs) { @@ -213,7 +213,7 @@ for (let doc of docs) { Note that you cannot use a `forEach()` loop here. If you were to naïvely write: -{% highlight js %} +{% highlight "js" %} let docs = [{}, {}, {}]; // WARNING: this won't work @@ -232,7 +232,7 @@ This is because you cannot use `await` from within a normal function. You have t However, if you try to use an async function, then you will get a more subtle bug: -{% highlight js %} +{% highlight "js" %} let docs = [{}, {}, {}]; // WARNING: this won't work @@ -260,7 +260,7 @@ If we do want to execute multiple promises concurrently, though, then this is pr Recall that with ES6 promises, we have `Promise.all()`. Let's use it to return an array of values from an array of promises: -{% highlight js %} +{% highlight "js" %} var docs = [{}, {}, {}]; return Promise.all(docs.map(function (doc) { @@ -272,7 +272,7 @@ return Promise.all(docs.map(function (doc) { In ES7, we can do this is a more straightforward way: -{% highlight js %} +{% highlight "js" %} let docs = [{}, {}, {}]; let promises = docs.map((doc) => db.post(doc)); @@ -285,7 +285,7 @@ console.log(results); The most important parts are 1) creating the `promises` array, which starts invoking all the promises immediately, and 2) that we are `await`ing those promises within the main function. If we tried to use `Array.prototype.map`, then it wouldn't work: -{% highlight js %} +{% highlight "js" %} let docs = [{}, {}, {}]; let promises = docs.map((doc) => db.post(doc)); @@ -302,7 +302,7 @@ The reason this doesn't work is because we are `await`ing inside of the sub-func If you don't mind using `Promise.all`, you can also use it to tidy up the code a bit: -{% highlight js %} +{% highlight "js" %} let docs = [{}, {}, {}]; let promises = docs.map((doc) => db.post(doc)); diff --git a/docs/_posts/2015-04-05-filtered-replication.md b/docs/posts/2015-04-05-filtered-replication.md similarity index 99% rename from docs/_posts/2015-04-05-filtered-replication.md rename to docs/posts/2015-04-05-filtered-replication.md index 87548ccff7..946093acd8 100644 --- a/docs/_posts/2015-04-05-filtered-replication.md +++ b/docs/posts/2015-04-05-filtered-replication.md @@ -31,7 +31,7 @@ To reproduce the examples you’ll need PouchDB v3.4.0, which contains some bugf The first step in implementing your server-side filtering solution is to create the design document. This is an example: -{% highlight js %} +{% highlight "js" %} { "_id": "_design/app", "filters": { @@ -61,7 +61,7 @@ We'll come back to this design document later. Now it's time to implement our cl * `filter`: can take either the string corresponding to the filter function (see example below), or a JS function (for client-side filtering). * `query_params`: takes a JS object. This object is what we find in the `req.query` object inside the design document function. Just what we need! -{% highlight js %} +{% highlight "js" %} localDB.sync(remoteDB, { live: true, retry: true, @@ -96,7 +96,7 @@ In PouchDB, this corresponds to `put()`ing a document with `_deleted: true`, rat The next gotcha deserves a bit more space. I find it very counter-intuitive, and my guess is that you'll feel the same. Since you're interested in two-way replication, you want the client to not only read data, but write data as well. What you expect is that saves on the local database will get replicated to the remote database. Let's look at some code: -{% highlight js %} +{% highlight "js" %} this.save = function (foobar) { return localDB.get(foobar._id).then(function (doc) { doc.someNiceField = foobar.someNiceField; @@ -109,7 +109,7 @@ In ORM parlance, this is a "connected scenario" update. You retrieve the documen If you followed this post step-by-step, however, this won't work. Why? To make two-way filtered replication work, the design document needs to be in both the remote database and the local database. To do this, we might decide to simply replicate the design document alongside the other documents. Hence our design document becomes: -{% highlight js %} +{% highlight "js" %} { "_id": "_design/app", "filters": { diff --git a/docs/_posts/2015-04-07-better-late-than-never.md b/docs/posts/2015-04-07-better-late-than-never.md similarity index 100% rename from docs/_posts/2015-04-07-better-late-than-never.md rename to docs/posts/2015-04-07-better-late-than-never.md diff --git a/docs/_posts/2015-05-07-pouchdb-3.5.0-vote-for-pouchdb.md b/docs/posts/2015-05-07-pouchdb-3.5.0-vote-for-pouchdb.md similarity index 100% rename from docs/_posts/2015-05-07-pouchdb-3.5.0-vote-for-pouchdb.md rename to docs/posts/2015-05-07-pouchdb-3.5.0-vote-for-pouchdb.md diff --git a/docs/_posts/2015-05-18-we-have-a-problem-with-promises.md b/docs/posts/2015-05-18-we-have-a-problem-with-promises.md similarity index 100% rename from docs/_posts/2015-05-18-we-have-a-problem-with-promises.md rename to docs/posts/2015-05-18-we-have-a-problem-with-promises.md diff --git a/docs/_posts/2015-06-01-pouchdb-3.6.0.md b/docs/posts/2015-06-01-pouchdb-3.6.0.md similarity index 100% rename from docs/_posts/2015-06-01-pouchdb-3.6.0.md rename to docs/posts/2015-06-01-pouchdb-3.6.0.md diff --git a/docs/_posts/2015-08-03-pouchdb-4.0.0-ballast-overboard.md b/docs/posts/2015-08-03-pouchdb-4.0.0-ballast-overboard.md similarity index 100% rename from docs/_posts/2015-08-03-pouchdb-4.0.0-ballast-overboard.md rename to docs/posts/2015-08-03-pouchdb-4.0.0-ballast-overboard.md diff --git a/docs/_posts/2015-09-01-pouchdb-4.0.1-gotta-go-fast.md b/docs/posts/2015-09-01-pouchdb-4.0.1-gotta-go-fast.md similarity index 100% rename from docs/_posts/2015-09-01-pouchdb-4.0.1-gotta-go-fast.md rename to docs/posts/2015-09-01-pouchdb-4.0.1-gotta-go-fast.md diff --git a/docs/_posts/2015-09-12-pouchdb-4.0.2-a-little-extra.md b/docs/posts/2015-09-12-pouchdb-4.0.2-a-little-extra.md similarity index 100% rename from docs/_posts/2015-09-12-pouchdb-4.0.2-a-little-extra.md rename to docs/posts/2015-09-12-pouchdb-4.0.2-a-little-extra.md diff --git a/docs/_posts/2015-10-06-pouchdb-5.0.0-five-years-of-pouchdb.md b/docs/posts/2015-10-06-pouchdb-5.0.0-five-years-of-pouchdb.md similarity index 100% rename from docs/_posts/2015-10-06-pouchdb-5.0.0-five-years-of-pouchdb.md rename to docs/posts/2015-10-06-pouchdb-5.0.0-five-years-of-pouchdb.md diff --git a/docs/_posts/2015-11-03-cover-all.md b/docs/posts/2015-11-03-cover-all.md similarity index 100% rename from docs/_posts/2015-11-03-cover-all.md rename to docs/posts/2015-11-03-cover-all.md diff --git a/docs/_posts/2016-01-13-pouchdb-5.2.0-a-better-build-system-with-rollup.md b/docs/posts/2016-01-13-pouchdb-5.2.0-a-better-build-system-with-rollup.md similarity index 100% rename from docs/_posts/2016-01-13-pouchdb-5.2.0-a-better-build-system-with-rollup.md rename to docs/posts/2016-01-13-pouchdb-5.2.0-a-better-build-system-with-rollup.md diff --git a/docs/_posts/2016-03-04-pouchdb-5.3.0-sqlite-support-in-node.md b/docs/posts/2016-03-04-pouchdb-5.3.0-sqlite-support-in-node.md similarity index 100% rename from docs/_posts/2016-03-04-pouchdb-5.3.0-sqlite-support-in-node.md rename to docs/posts/2016-03-04-pouchdb-5.3.0-sqlite-support-in-node.md diff --git a/docs/_posts/2016-04-28-prebuilt-databases-with-pouchdb.md b/docs/posts/2016-04-28-prebuilt-databases-with-pouchdb.md similarity index 100% rename from docs/_posts/2016-04-28-prebuilt-databases-with-pouchdb.md rename to docs/posts/2016-04-28-prebuilt-databases-with-pouchdb.md diff --git a/docs/_posts/2016-06-06-introducing-pouchdb-custom-builds.md b/docs/posts/2016-06-06-introducing-pouchdb-custom-builds.md similarity index 100% rename from docs/_posts/2016-06-06-introducing-pouchdb-custom-builds.md rename to docs/posts/2016-06-06-introducing-pouchdb-custom-builds.md diff --git a/docs/_posts/2016-06-06-pouchdb-5.4.0.md b/docs/posts/2016-06-06-pouchdb-5.4.0.md similarity index 100% rename from docs/_posts/2016-06-06-pouchdb-5.4.0.md rename to docs/posts/2016-06-06-pouchdb-5.4.0.md diff --git a/docs/_posts/2016-09-05-pouchdb-6.0.0.md b/docs/posts/2016-09-05-pouchdb-6.0.0.md similarity index 100% rename from docs/_posts/2016-09-05-pouchdb-6.0.0.md rename to docs/posts/2016-09-05-pouchdb-6.0.0.md diff --git a/docs/_posts/2016-12-12-pouchdb-6.1.0.md b/docs/posts/2016-12-12-pouchdb-6.1.0.md similarity index 100% rename from docs/_posts/2016-12-12-pouchdb-6.1.0.md rename to docs/posts/2016-12-12-pouchdb-6.1.0.md diff --git a/docs/_posts/2017-01-05-pouchdb-6.1.1.md b/docs/posts/2017-01-05-pouchdb-6.1.1.md similarity index 100% rename from docs/_posts/2017-01-05-pouchdb-6.1.1.md rename to docs/posts/2017-01-05-pouchdb-6.1.1.md diff --git a/docs/_posts/2017-04-20-pouchdb-6.2.0.md b/docs/posts/2017-04-20-pouchdb-6.2.0.md similarity index 100% rename from docs/_posts/2017-04-20-pouchdb-6.2.0.md rename to docs/posts/2017-04-20-pouchdb-6.2.0.md diff --git a/docs/_posts/2017-07-13-pouchdb-6.3.0.md b/docs/posts/2017-07-13-pouchdb-6.3.0.md similarity index 100% rename from docs/_posts/2017-07-13-pouchdb-6.3.0.md rename to docs/posts/2017-07-13-pouchdb-6.3.0.md diff --git a/docs/_posts/2017-12-16-pouchdb-6.4.0.md b/docs/posts/2017-12-16-pouchdb-6.4.0.md similarity index 100% rename from docs/_posts/2017-12-16-pouchdb-6.4.0.md rename to docs/posts/2017-12-16-pouchdb-6.4.0.md diff --git a/docs/_posts/2018-01-23-pouchdb-6.4.2.md b/docs/posts/2018-01-23-pouchdb-6.4.2.md similarity index 100% rename from docs/_posts/2018-01-23-pouchdb-6.4.2.md rename to docs/posts/2018-01-23-pouchdb-6.4.2.md diff --git a/docs/_posts/2018-06-21-pouchdb-7.0.0.md b/docs/posts/2018-06-21-pouchdb-7.0.0.md similarity index 100% rename from docs/_posts/2018-06-21-pouchdb-7.0.0.md rename to docs/posts/2018-06-21-pouchdb-7.0.0.md diff --git a/docs/_posts/2019-06-13-pouchdb-7.1.1.md b/docs/posts/2019-06-13-pouchdb-7.1.1.md similarity index 100% rename from docs/_posts/2019-06-13-pouchdb-7.1.1.md rename to docs/posts/2019-06-13-pouchdb-7.1.1.md diff --git a/docs/_posts/2020-02-12-pouchdb-7.2.0.md b/docs/posts/2020-02-12-pouchdb-7.2.0.md similarity index 100% rename from docs/_posts/2020-02-12-pouchdb-7.2.0.md rename to docs/posts/2020-02-12-pouchdb-7.2.0.md diff --git a/docs/_posts/2022-04-13-pouchdb-7.3.0.md b/docs/posts/2022-04-13-pouchdb-7.3.0.md similarity index 100% rename from docs/_posts/2022-04-13-pouchdb-7.3.0.md rename to docs/posts/2022-04-13-pouchdb-7.3.0.md diff --git a/docs/_posts/2022-11-11-pouchdb-7.3.1.md b/docs/posts/2022-11-11-pouchdb-7.3.1.md similarity index 100% rename from docs/_posts/2022-11-11-pouchdb-7.3.1.md rename to docs/posts/2022-11-11-pouchdb-7.3.1.md diff --git a/docs/_posts/2022-12-14-pouchdb-8.0.0.md b/docs/posts/2022-12-14-pouchdb-8.0.0.md similarity index 100% rename from docs/_posts/2022-12-14-pouchdb-8.0.0.md rename to docs/posts/2022-12-14-pouchdb-8.0.0.md diff --git a/docs/_posts/2023-02-09-pouchdb-8.0.1.md b/docs/posts/2023-02-09-pouchdb-8.0.1.md similarity index 100% rename from docs/_posts/2023-02-09-pouchdb-8.0.1.md rename to docs/posts/2023-02-09-pouchdb-8.0.1.md diff --git a/docs/_posts/2024-05-24-pouchdb-9.0.0.md b/docs/posts/2024-05-24-pouchdb-9.0.0.md similarity index 100% rename from docs/_posts/2024-05-24-pouchdb-9.0.0.md rename to docs/posts/2024-05-24-pouchdb-9.0.0.md diff --git a/docs/posts/posts.json b/docs/posts/posts.json new file mode 100644 index 0000000000..3b14774b79 --- /dev/null +++ b/docs/posts/posts.json @@ -0,0 +1,3 @@ +{ + "tags": "posts" +} diff --git a/docs/serviceWorker.js b/docs/serviceWorker.js index 69fe588936..7e090ef482 100644 --- a/docs/serviceWorker.js +++ b/docs/serviceWorker.js @@ -13,18 +13,18 @@ var criticalAssets = [ ]; var pages = [ - {% for page in site.pages %} + {% for page in collections.pages %} {% if page.url != '/manifest.appcache' %} '{{ page.url | replace:'index.html','' }}', {% endif %} {% endfor %} - {% for page in site.guides %} + {% for page in collections.guides %} '{{ page.url | replace:'index.html','' }}', {% endfor %} ]; var blogPosts = [ - {% for page in site.posts %} + {% for page in collections.posts %} '{{ page.url | replace:'index.html','' }}', {% endfor %} ]; diff --git a/docs/src/code.js b/docs/src/code.js index 0dd4d3809a..8ea79bdbaa 100644 --- a/docs/src/code.js +++ b/docs/src/code.js @@ -133,7 +133,7 @@ function addCodeCopyButtons() { const btn = document.createElement('button'); btn.style.position = 'absolute'; btn.style.top = '11.5px'; - btn.style.right = '15px'; + btn.style.right = '11.5px'; btn.textContent = txt; parent.appendChild(btn); @@ -142,9 +142,9 @@ function addCodeCopyButtons() { } document - .querySelectorAll('code[data-lang]') + .querySelectorAll('pre.language-js') .forEach(codeElement => { - codeElement.parentElement.style.position = 'relative'; + codeElement.style.position = 'relative'; const btn = addButton('📎', codeElement); btn.onclick = copyCodeFor(codeElement); diff --git a/docs/src/less/pouchdb/code.less b/docs/src/less/pouchdb/code.less index a5feb85b39..cff926eafc 100644 --- a/docs/src/less/pouchdb/code.less +++ b/docs/src/less/pouchdb/code.less @@ -8,3 +8,33 @@ pre { padding-left: @pre-padding; padding-right: @pre-padding; } + +@duck-egg: #66d9ef; +@martian-green: #a6e22e; +@mustard: #e6db74; +@purple: #ae81ff; +@pinky: #f92672; +@soft-green: #6eca97; +@dry-slate: #3f3f3f; +@whitish: #f8f8f2; + +.language-bash { background-color:@dry-slate; color:@whitish } +.language-bash .token.parameter.variable { color:@pinky } + +.language-html { background-color:@dry-slate; color:@soft-green } +.language-js,.language-javascript { background-color:@dry-slate; color:@soft-green } +.token.attr-name { color:@martian-green } +.token.attr-value { color:@mustard } +.token.tag .token.attr-value .attr-equals { color:@martian-green } +.token.tag .token.attr-value .token.punctuation { color:@mustard } +.token.class-name { color:@soft-green } +.token.function { color:@soft-green } +.token.keyword { color:@duck-egg } +.token.number { color:@purple } +.token.operator { color:@pinky } +.token.property + .token.operator { color:@whitish } +.token.property { color:@martian-green } +.token.punctuation { color:@whitish } +.token.string { color:@mustard } +.token.tag { color:@pinky } +.token.tag .token.punctuation { color:@pinky } diff --git a/package-lock.json b/package-lock.json index f970755cbd..1e705124a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "vuvuzela": "1.0.3" }, "devDependencies": { + "@11ty/eleventy": "^3.1.2", "add-cors-to-couchdb": "0.0.6", "body-parser": "1.20.3", "browserify": "16.4.0", @@ -39,6 +40,7 @@ "cssmin": "0.4.3", "denodeify": "1.2.1", "derequire": "2.1.1", + "eleventy-plugin-markdown-shortcode": "^1.1.0", "eslint": "8.7.0", "express": "4.20.0", "express-pouchdb": "4.2.0", @@ -55,6 +57,7 @@ "ncp": "2.0.0", "playwright": "1.49.1", "pouchdb-express-router": "0.0.11", + "prismjs": "^1.30.0", "replace": "1.2.1", "rimraf": "2.7.1", "rollup": "0.67.4", @@ -70,6 +73,434 @@ "ua-parser-js": "0.7.24" } }, + "node_modules/@11ty/dependency-tree": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@11ty/dependency-tree/-/dependency-tree-4.0.0.tgz", + "integrity": "sha512-PTOnwM8Xt+GdJmwRKg4pZ8EKAgGoK7pedZBfNSOChXu8MYk2FdEsxdJYecX4t62owpGw3xK60q9TQv/5JI59jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@11ty/eleventy-utils": "^2.0.1" + } + }, + "node_modules/@11ty/dependency-tree-esm": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@11ty/dependency-tree-esm/-/dependency-tree-esm-2.0.2.tgz", + "integrity": "sha512-kSTmXneksQLBhwsfqjxiSi9ecRKENXmRtT5RG95rFoWSI8kkwLcGlYpoXsPkCD9uQwSU1rmDzXBDnqUJlWaIyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@11ty/eleventy-utils": "^2.0.7", + "acorn": "^8.15.0", + "dependency-graph": "^1.0.0", + "normalize-path": "^3.0.0" + } + }, + "node_modules/@11ty/eleventy": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@11ty/eleventy/-/eleventy-3.1.2.tgz", + "integrity": "sha512-IcsDlbXnBf8cHzbM1YBv3JcTyLB35EK88QexmVyFdVJVgUU6bh9g687rpxryJirHzo06PuwnYaEEdVZQfIgRGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@11ty/dependency-tree": "^4.0.0", + "@11ty/dependency-tree-esm": "^2.0.0", + "@11ty/eleventy-dev-server": "^2.0.8", + "@11ty/eleventy-plugin-bundle": "^3.0.6", + "@11ty/eleventy-utils": "^2.0.7", + "@11ty/lodash-custom": "^4.17.21", + "@11ty/posthtml-urls": "^1.0.1", + "@11ty/recursive-copy": "^4.0.2", + "@sindresorhus/slugify": "^2.2.1", + "bcp-47-normalize": "^2.3.0", + "chokidar": "^3.6.0", + "debug": "^4.4.1", + "dependency-graph": "^1.0.0", + "entities": "^6.0.1", + "filesize": "^10.1.6", + "gray-matter": "^4.0.3", + "iso-639-1": "^3.1.5", + "js-yaml": "^4.1.0", + "kleur": "^4.1.5", + "liquidjs": "^10.21.1", + "luxon": "^3.6.1", + "markdown-it": "^14.1.0", + "minimist": "^1.2.8", + "moo": "^0.5.2", + "node-retrieve-globals": "^6.0.1", + "nunjucks": "^3.2.4", + "picomatch": "^4.0.2", + "please-upgrade-node": "^3.2.0", + "posthtml": "^0.16.6", + "posthtml-match-helper": "^2.0.3", + "semver": "^7.7.2", + "slugify": "^1.6.6", + "tinyglobby": "^0.2.14" + }, + "bin": { + "eleventy": "cmd.cjs" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/11ty" + } + }, + "node_modules/@11ty/eleventy-dev-server": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@11ty/eleventy-dev-server/-/eleventy-dev-server-2.0.8.tgz", + "integrity": "sha512-15oC5M1DQlCaOMUq4limKRYmWiGecDaGwryr7fTE/oM9Ix8siqMvWi+I8VjsfrGr+iViDvWcH/TVI6D12d93mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@11ty/eleventy-utils": "^2.0.1", + "chokidar": "^3.6.0", + "debug": "^4.4.0", + "finalhandler": "^1.3.1", + "mime": "^3.0.0", + "minimist": "^1.2.8", + "morphdom": "^2.7.4", + "please-upgrade-node": "^3.2.0", + "send": "^1.1.0", + "ssri": "^11.0.0", + "urlpattern-polyfill": "^10.0.0", + "ws": "^8.18.1" + }, + "bin": { + "eleventy-dev-server": "cmd.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/11ty" + } + }, + "node_modules/@11ty/eleventy-dev-server/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@11ty/eleventy-dev-server/node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/@11ty/eleventy-dev-server/node_modules/finalhandler": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/@11ty/eleventy-dev-server/node_modules/finalhandler/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/@11ty/eleventy-dev-server/node_modules/finalhandler/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@11ty/eleventy-dev-server/node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/@11ty/eleventy-dev-server/node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "dev": true, + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@11ty/eleventy-dev-server/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@11ty/eleventy-dev-server/node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@11ty/eleventy-dev-server/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@11ty/eleventy-dev-server/node_modules/send": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", + "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.5", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "mime-types": "^3.0.1", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/@11ty/eleventy-dev-server/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/@11ty/eleventy-plugin-bundle": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@11ty/eleventy-plugin-bundle/-/eleventy-plugin-bundle-3.0.7.tgz", + "integrity": "sha512-QK1tRFBhQdZASnYU8GMzpTdsMMFLVAkuU0gVVILqNyp09xJJZb81kAS3AFrNrwBCsgLxTdWHJ8N64+OTTsoKkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@11ty/eleventy-utils": "^2.0.2", + "debug": "^4.4.0", + "posthtml-match-helper": "^2.0.3" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/11ty" + } + }, + "node_modules/@11ty/eleventy-plugin-bundle/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@11ty/eleventy-plugin-bundle/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@11ty/eleventy-utils": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@11ty/eleventy-utils/-/eleventy-utils-2.0.7.tgz", + "integrity": "sha512-6QE+duqSQ0GY9rENXYb4iPR4AYGdrFpqnmi59tFp9VrleOl0QSh8VlBr2yd6dlhkdtj7904poZW5PvGr9cMiJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/11ty" + } + }, + "node_modules/@11ty/eleventy/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@11ty/eleventy/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@11ty/eleventy/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/@11ty/eleventy/node_modules/semver": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@11ty/lodash-custom": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@11ty/lodash-custom/-/lodash-custom-4.17.21.tgz", + "integrity": "sha512-Mqt6im1xpb1Ykn3nbcCovWXK3ggywRJa+IXIdoz4wIIK+cvozADH63lexcuPpGS/gJ6/m2JxyyXDyupkMr5DHw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/11ty" + } + }, + "node_modules/@11ty/posthtml-urls": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@11ty/posthtml-urls/-/posthtml-urls-1.0.1.tgz", + "integrity": "sha512-6EFN/yYSxC/OzYXpq4gXDyDMlX/W+2MgCvvoxf11X1z76bqkqFJ8eep5RiBWfGT5j0323a1pwpelcJJdR46MCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "evaluate-value": "^2.0.0", + "http-equiv-refresh": "^2.0.1", + "list-to-array": "^1.1.0", + "parse-srcset": "^1.0.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@11ty/recursive-copy": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@11ty/recursive-copy/-/recursive-copy-4.0.2.tgz", + "integrity": "sha512-174nFXxL/6KcYbLYpra+q3nDbfKxLxRTNVY1atq2M1pYYiPfHse++3IFNl8mjPFsd7y2qQjxLORzIjHMjL3NDQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "errno": "^1.0.0", + "junk": "^3.1.0", + "maximatch": "^0.1.0", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@11ty/recursive-copy/node_modules/errno": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/errno/-/errno-1.0.0.tgz", + "integrity": "sha512-3zV5mFS1E8/1bPxt/B0xxzI1snsg3uSCIh6Zo1qKg6iMw93hzPANk9oBFzSFBFrwuVoQuE3rLoouAUfwOAj1wQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, "node_modules/@eslint/eslintrc": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", @@ -159,6 +590,65 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@sindresorhus/slugify": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@sindresorhus/slugify/-/slugify-2.2.1.tgz", + "integrity": "sha512-MkngSCRZ8JdSOCHRaYd+D01XhvU3Hjy6MGl06zhOk614hp9EOAp5gIkBeQg7wtmxpitU6eAL4kdiRMcJa2dlrw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/transliterate": "^1.0.0", + "escape-string-regexp": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@sindresorhus/slugify/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@sindresorhus/transliterate": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/transliterate/-/transliterate-1.6.0.tgz", + "integrity": "sha512-doH1gimEu3A46VX6aVxpHTeHrytJAG6HgdxntYnCFiIFHEM/ZGpG8KiZGBChchjQmG0XFIBL552kBTjVcMZXwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@sindresorhus/transliterate/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -180,6 +670,13 @@ "@types/node": "*" } }, + "node_modules/a-sync-waterfall": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", + "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==", + "dev": true, + "license": "MIT" + }, "node_modules/abbrev": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", @@ -215,10 +712,11 @@ } }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -417,12 +915,45 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array-differ": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", + "integrity": "sha512-LeZY+DZDRnvP7eMuQ6LHfCzUGxAAIViUBliK24P3hWXL6y4SortgR6Nim6xrkfSLlmH0+k+9NYNwVC2s53ZrYQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", "dev": true }, + "node_modules/array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-uniq": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", @@ -586,6 +1117,23 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true, + "license": "MIT" + }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -795,6 +1343,48 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "node_modules/bcp-47": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/bcp-47/-/bcp-47-2.1.0.tgz", + "integrity": "sha512-9IIS3UPrvIa1Ej+lVDdDwO7zLehjqsaByECw0bu2RRGP73jALm6FYbzI5gWbgHLvNdkvfXB5YrSbocZdOS0c0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-alphanumerical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/bcp-47-match": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/bcp-47-match/-/bcp-47-match-2.0.3.tgz", + "integrity": "sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/bcp-47-normalize": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/bcp-47-normalize/-/bcp-47-normalize-2.3.0.tgz", + "integrity": "sha512-8I/wfzqQvttUFz7HVJgIZ7+dj3vUaIyIxYXaTRP1YWoSDfzt6TUmxaKZeuXR62qBmYr+nvuWINFRl6pZ5DlN4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "bcp-47": "^2.0.0", + "bcp-47-match": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -1626,16 +2216,11 @@ } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "license": "MIT", "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -1648,6 +2233,9 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } @@ -2466,6 +3054,16 @@ "node": ">= 0.6" } }, + "node_modules/dependency-graph": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-1.0.0.tgz", + "integrity": "sha512-cW3gggJ28HZ/LExwxP2B++aiKxhJXMSIt9K48FOXQkm+vuG5gyatXnLsONRJdzO/7VfjDIiaOOa/bs4l464Lwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/deps-sort": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", @@ -2661,6 +3259,31 @@ "node": ">=6.0.0" } }, + "node_modules/dom-serializer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", + "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", + "dev": true, + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "license": "BSD-2-Clause", + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", @@ -2671,6 +3294,50 @@ "npm": ">=1.2" } }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", + "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", + "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, "node_modules/dot-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", @@ -2784,6 +3451,75 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "dev": true }, + "node_modules/eleventy-plugin-markdown-shortcode": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eleventy-plugin-markdown-shortcode/-/eleventy-plugin-markdown-shortcode-1.1.0.tgz", + "integrity": "sha512-/IujRaY7QzKUvpYvvCNJf2iWsxxC3ta19oyWoSbgL6LR7uL7JZtlNVpGFhbyiGqtZ82oWiTkfN+W4YT1XWxYcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "markdown-it": "^10.0.0", + "markdown-it-front-matter": "^0.2.1" + } + }, + "node_modules/eleventy-plugin-markdown-shortcode/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/eleventy-plugin-markdown-shortcode/node_modules/entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/eleventy-plugin-markdown-shortcode/node_modules/linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "dev": true, + "license": "MIT", + "dependencies": { + "uc.micro": "^1.0.1" + } + }, + "node_modules/eleventy-plugin-markdown-shortcode/node_modules/markdown-it": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "entities": "~2.0.0", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/eleventy-plugin-markdown-shortcode/node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "dev": true, + "license": "MIT" + }, + "node_modules/eleventy-plugin-markdown-shortcode/node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true, + "license": "MIT" + }, "node_modules/elliptic": { "version": "6.6.1", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.6.1.tgz", @@ -2872,6 +3608,19 @@ "write-stream": "~0.4.3" } }, + "node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/equals": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/equals/-/equals-1.0.5.tgz", @@ -3434,6 +4183,16 @@ "node": ">= 8" } }, + "node_modules/esm-import-transformer": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/esm-import-transformer/-/esm-import-transformer-3.0.5.tgz", + "integrity": "sha512-1GKLvfuMnnpI75l8c6sHoz0L3Z872xL5akGuBudgqTDPv4Vy6f2Ec7jEMKTxlqWl/3kSvNbHELeimJtnqgYniw==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.15.0" + } + }, "node_modules/esniff": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/esniff/-/esniff-1.1.0.tgz", @@ -3531,6 +4290,16 @@ "node": ">= 0.6" } }, + "node_modules/evaluate-value": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/evaluate-value/-/evaluate-value-2.0.0.tgz", + "integrity": "sha512-VonfiuDJc0z4sOO7W0Pd130VLsXN6vmBWZlrog1mCb/o7o/Nl5Lr25+Kj/nkCCAhG+zqeeGjxhkK9oHpkgTHhQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, "node_modules/event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", @@ -3764,6 +4533,19 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, + "node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -3827,6 +4609,16 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/filesize": { + "version": "10.1.6", + "resolved": "https://registry.npmjs.org/filesize/-/filesize-10.1.6.tgz", + "integrity": "sha512-sJslQKU2uM33qH5nqewAwVB2QgR6w1aMNsYUp3aN5rMRyXEwJGmZvaWzeJFNTOXWlHQyBFCWrdj3fV/fsTOX8w==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">= 10.4.0" + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -4293,6 +5085,60 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, + "node_modules/gray-matter": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", + "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-yaml": "^3.13.1", + "kind-of": "^6.0.2", + "section-matter": "^1.0.0", + "strip-bom-string": "^1.0.0" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/gray-matter/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/gray-matter/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/gray-matter/node_modules/js-yaml": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/handlebars": { "version": "4.7.8", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", @@ -4537,6 +5383,49 @@ "node": ">=0.10" } }, + "node_modules/htmlparser2": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-7.2.0.tgz", + "integrity": "sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.2", + "domutils": "^2.8.0", + "entities": "^3.0.1" + } + }, + "node_modules/htmlparser2/node_modules/entities": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-3.0.1.tgz", + "integrity": "sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/http-equiv-refresh": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-equiv-refresh/-/http-equiv-refresh-2.0.1.tgz", + "integrity": "sha512-XJpDL/MLkV3dKwLzHwr2dY05dYNfBNlyPu4STQ8WvKCFdc6vC5tPXuq28of663+gHVg03C+16pHHs/+FmmDjcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -4864,6 +5753,32 @@ "node": ">= 0.10" } }, + "node_modules/is-alphabetical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", + "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", + "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-arguments": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", @@ -4996,12 +5911,33 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-decimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", + "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-empty": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-empty/-/is-empty-1.2.0.tgz", "integrity": "sha512-F2FnH/otLNJv0J6wc73A5Xo7oHLNnqplYqZhUu01tD54DIPvxIRSTSLkrUB/M0nHO4vo1O9PDfN4KoTxCzLh/w==", "dev": true }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -5032,6 +5968,13 @@ "node": ">=0.10.0" } }, + "node_modules/is-json": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-json/-/is-json-2.0.1.tgz", + "integrity": "sha512-6BEnpVn1rcf3ngfmViLM6vjUjGErbdrL4rwlv+u1NO1XO8kqT4YGL8+19Q+Z/bas8tY90BTWMk2+fW1g6hQjbA==", + "dev": true, + "license": "ISC" + }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -5209,6 +6152,16 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/iso-639-1": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/iso-639-1/-/iso-639-1-3.1.5.tgz", + "integrity": "sha512-gXkz5+KN7HrG0Q5UGqSMO2qB9AsbEeyLP54kF1YrMsIxmu+g4BdB7rflReZTSTZGpfj8wywu6pfPBCylPIzGQA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0" + } + }, "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -5476,6 +6429,36 @@ "node": ">=0.8.0" } }, + "node_modules/junk": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/junk/-/junk-3.1.0.tgz", + "integrity": "sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/labeled-stream-splicer": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", @@ -5783,27 +6766,75 @@ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "dev": true, + "dependencies": { + "immediate": "~3.0.5" + } + }, + "node_modules/lie/node_modules/immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", + "dev": true + }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, + "node_modules/liquidjs": { + "version": "10.24.0", + "resolved": "https://registry.npmjs.org/liquidjs/-/liquidjs-10.24.0.tgz", + "integrity": "sha512-TAUNAdgwaAXjjcUFuYVJm9kOVH7zc0mTKxsG9t9Lu4qdWjB2BEblyVIYpjWcmJLMGgiYqnGNJjpNMHx0gp/46A==", + "dev": true, + "license": "MIT", + "dependencies": { + "commander": "^10.0.0" + }, + "bin": { + "liquid": "bin/liquid.js", + "liquidjs": "bin/liquid.js" }, "engines": { - "node": ">= 0.8.0" + "node": ">=16" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/liquidjs" } }, - "node_modules/lie": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "node_modules/liquidjs/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, - "dependencies": { - "immediate": "~3.0.5" + "license": "MIT", + "engines": { + "node": ">=14" } }, - "node_modules/lie/node_modules/immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", - "dev": true + "node_modules/list-to-array": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/list-to-array/-/list-to-array-1.1.0.tgz", + "integrity": "sha512-+dAZZ2mM+/m+vY9ezfoueVvrgnHIGi5FvgSymbIgJOFwiznWyA59mav95L+Mc6xPtL3s9gm5eNTlNtxJLbNM1g==", + "dev": true, + "license": "MIT" }, "node_modules/localstorage-down": { "version": "0.6.7", @@ -5905,6 +6936,16 @@ "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", "integrity": "sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==" }, + "node_modules/luxon": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz", + "integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, "node_modules/make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", @@ -5931,6 +6972,44 @@ "semver": "bin/semver" } }, + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/markdown-it-front-matter": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/markdown-it-front-matter/-/markdown-it-front-matter-0.2.4.tgz", + "integrity": "sha512-25GUs0yjS2hLl8zAemVndeEzThB1p42yxuDEKbd4JlL3jiz+jsm6e56Ya8B0VREOkNxLYB4TTwaoPJ3ElMmW+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/markdown-it/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/marky": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.5.tgz", @@ -5947,6 +7026,22 @@ "node": ">= 0.4" } }, + "node_modules/maximatch": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/maximatch/-/maximatch-0.1.0.tgz", + "integrity": "sha512-9ORVtDUFk4u/NFfo0vG/ND/z7UQCVZBL539YW0+U1I7H1BkZwizcPx5foFv7LCPcBnm2U6RjFnQOsIvN4/Vm2A==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-differ": "^1.0.0", + "array-union": "^1.0.1", + "arrify": "^1.0.0", + "minimatch": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -5958,6 +7053,13 @@ "safe-buffer": "^5.1.2" } }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true, + "license": "MIT" + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -6102,6 +7204,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", @@ -6438,6 +7550,20 @@ "xtend": "~4.0.1" } }, + "node_modules/moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/morphdom": { + "version": "2.7.7", + "resolved": "https://registry.npmjs.org/morphdom/-/morphdom-2.7.7.tgz", + "integrity": "sha512-04GmsiBcalrSCNmzfo+UjU8tt3PhZJKzcOy+r1FlGA7/zri8wre3I1WkYN9PT3sIeIKfW9bpyElA+VzOg2E24g==", + "dev": true, + "license": "MIT" + }, "node_modules/ms": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.0.tgz", @@ -6584,6 +7710,31 @@ "node-gyp-build-test": "build-test.js" } }, + "node_modules/node-retrieve-globals": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/node-retrieve-globals/-/node-retrieve-globals-6.0.1.tgz", + "integrity": "sha512-j0DeFuZ/Wg3VlklfbxUgZF/mdHMTEiEipBb3q0SpMMbHaV3AVfoUQF8UGxh1s/yjqO0TgRZd4Pi/x2yRqoQ4Eg==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.14.1", + "acorn-walk": "^8.3.4", + "esm-import-transformer": "^3.0.3" + } + }, + "node_modules/node-retrieve-globals/node_modules/acorn-walk": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/nodemon": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.2.1.tgz", @@ -6642,6 +7793,42 @@ "node": ">=0.10.0" } }, + "node_modules/nunjucks": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.4.tgz", + "integrity": "sha512-26XRV6BhkgK0VOxfbU5cQI+ICFUtMLixv1noZn1tGU38kQH5A5nmmbk/O45xdyBhD1esk47nKrY0mvQpZIhRjQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "a-sync-waterfall": "^1.0.0", + "asap": "^2.0.3", + "commander": "^5.1.0" + }, + "bin": { + "nunjucks-precompile": "bin/precompile" + }, + "engines": { + "node": ">= 6.9.0" + }, + "peerDependencies": { + "chokidar": "^3.3.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/nunjucks/node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -6946,6 +8133,13 @@ "node": ">= 0.10" } }, + "node_modules/parse-srcset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-srcset/-/parse-srcset-1.0.2.tgz", + "integrity": "sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==", + "dev": true, + "license": "MIT" + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -7162,6 +8356,16 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver-compare": "^1.0.0" + } + }, "node_modules/portfinder": { "version": "1.0.32", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz", @@ -7200,6 +8404,59 @@ "node": ">= 0.4" } }, + "node_modules/posthtml": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/posthtml/-/posthtml-0.16.7.tgz", + "integrity": "sha512-7Hc+IvlQ7hlaIfQFZnxlRl0jnpWq2qwibORBhQYIb0QbNtuicc5ZxvKkVT71HJ4Py1wSZ/3VR1r8LfkCtoCzhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "posthtml-parser": "^0.11.0", + "posthtml-render": "^3.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/posthtml-match-helper": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/posthtml-match-helper/-/posthtml-match-helper-2.0.3.tgz", + "integrity": "sha512-p9oJgTdMF2dyd7WE54QI1LvpBIkNkbSiiECKezNnDVYhGhD1AaOnAkw0Uh0y5TW+OHO8iBdSqnd8Wkpb6iUqmw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "posthtml": "^0.16.6" + } + }, + "node_modules/posthtml-parser": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.11.0.tgz", + "integrity": "sha512-QecJtfLekJbWVo/dMAA+OSwY79wpRmbqS5TeXvXSX+f0c6pW4/SE6inzZ2qkU7oAMCPqIDkZDvd/bQsSFUnKyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "htmlparser2": "^7.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/posthtml-render": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/posthtml-render/-/posthtml-render-3.0.0.tgz", + "integrity": "sha512-z+16RoxK3fUPgwaIgH9NGnK1HKY9XIDpydky5eQGgAFVXTCSezalv9U2jQuNV+Z9qV1fDWNzldcw4eK0SSbqKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-json": "^2.0.1" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/pouchdb-abstract-mapreduce": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/pouchdb-abstract-mapreduce/-/pouchdb-abstract-mapreduce-7.3.1.tgz", @@ -8072,6 +9329,16 @@ "node": ">= 0.8.0" } }, + "node_modules/prismjs": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", + "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", @@ -8160,6 +9427,16 @@ "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", "dev": true }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -8847,6 +10124,20 @@ "truncate-utf8-bytes": "^1.0.0" } }, + "node_modules/section-matter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", + "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "extend-shallow": "^2.0.1", + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/secure-compare": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz", @@ -8874,6 +10165,13 @@ "semver": "bin/semver" } }, + "node_modules/semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", + "dev": true, + "license": "MIT" + }, "node_modules/send": { "version": "0.19.0", "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", @@ -9183,6 +10481,26 @@ } ] }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/slugify": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.6.6.tgz", + "integrity": "sha512-h+z7HKHYXj6wJU+AnS/+IH8Uh9fdcX1Lrhg1/VMdf9PwoBQXFcXiAdsy2tSK0P6gKwJLXp02r90ahUCqHk9rrw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/snake-case": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", @@ -9257,6 +10575,19 @@ "node": ">=0.10.0" } }, + "node_modules/ssri": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-11.0.0.tgz", + "integrity": "sha512-aZpUoMN/Jj2MqA4vMCeiKGnc/8SuSyHbGSBdgFbZxP8OJGF/lFkIuElzPxsN0q8TQQ+prw3P4EDfB3TBHHgfXw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, "node_modules/stacktrace-parser": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", @@ -9580,6 +10911,16 @@ "node": ">=8" } }, + "node_modules/strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -9790,6 +11131,54 @@ "resolved": "https://registry.npmjs.org/tiny-queue/-/tiny-queue-0.2.0.tgz", "integrity": "sha512-ucfrvjzfbtc+xqmn95DEUtGcDHJHQgZ9IR0mizPOZBkY45reZDCJjafUGVJOGJassjn0MavTyWOCQcG+agpLxw==" }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/to-buffer": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz", @@ -10068,6 +11457,13 @@ "node": "*" } }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true, + "license": "MIT" + }, "node_modules/uglify-js": { "version": "3.19.3", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", @@ -10279,6 +11675,13 @@ "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==", "dev": true }, + "node_modules/urlpattern-polyfill": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.1.0.tgz", + "integrity": "sha512-IGjKp/o0NL3Bso1PymYURCJxMPNAf/ILOpendP9f5B6e1rTJgdgiOvgfoT8VxCAdY+Wisb9uhGaJJf3yZ2V9nw==", + "dev": true, + "license": "MIT" + }, "node_modules/user-home": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", @@ -10526,6 +11929,28 @@ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-0.0.4.tgz", "integrity": "sha512-azrivNydKRYt7zwLV5wWUK7YzKTWs3q87xSmY6DlHapPrCvaT6ZrukvM5erV+yCSSPmZT8zkSdttOHQpWWm9zw==" }, + "node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/xdg-basedir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-1.0.1.tgz", diff --git a/package.json b/package.json index 739ebcf64b..c6b560c89e 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,8 @@ "test": "./bin/run-test.sh", "prepublishOnly": "npm run build", "release": "./bin/release.sh", - "install-jekyll": "./bin/install-jekyll.sh", "publish-site": "./bin/publish-site.sh", "build-site": "node ./bin/build-site.js", - "dev-site-with-docker": "docker build --file docs-dev.Dockerfile --progress=plain . && docker run -it --rm --volume $PWD/docs:/pouchdb-docs/docs -p 4000:4000 $(docker build --file docs-dev.Dockerfile --quiet .)", "test-coverage": "./bin/test-coverage.sh", "coverage": "COVERAGE=1 SERVER=pouchdb-server POUCHDB_SERVER_FLAGS=--in-memory PLUGINS=pouchdb-find ./bin/test-coverage.sh", "build-test": "npm run build-test-utils && npm run build-perf", @@ -57,6 +55,7 @@ "vuvuzela": "1.0.3" }, "devDependencies": { + "@11ty/eleventy": "^3.1.2", "add-cors-to-couchdb": "0.0.6", "body-parser": "1.20.3", "browserify": "16.4.0", @@ -68,6 +67,7 @@ "cssmin": "0.4.3", "denodeify": "1.2.1", "derequire": "2.1.1", + "eleventy-plugin-markdown-shortcode": "^1.1.0", "eslint": "8.7.0", "express": "4.20.0", "express-pouchdb": "4.2.0", @@ -84,6 +84,7 @@ "ncp": "2.0.0", "playwright": "1.49.1", "pouchdb-express-router": "0.0.11", + "prismjs": "^1.30.0", "replace": "1.2.1", "rimraf": "2.7.1", "rollup": "0.67.4",