Skip to content

Commit

Permalink
Merge branch 'master' into docs-docker
Browse files Browse the repository at this point in the history
  • Loading branch information
alxndrsn committed Jan 9, 2025
2 parents 1fa30f4 + 8f38843 commit 12b8942
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 74 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-node-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ runs:
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- run: npm clean-install
shell: bash
2 changes: 1 addition & 1 deletion bin/build-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if (!process.env.BUILD) {
const watchGlob = require('glob-watcher');

watchGlob('**', buildJekyll);
watchGlob('docs/static/less/*/*.less', buildCSS);
watchGlob('static/less/*/*.less', buildCSS);
http_server.createServer({root: '_site', cache: '-1'}).listen(4000);
console.log('Server address: http://localhost:4000');
}
Expand Down
2 changes: 1 addition & 1 deletion bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi

#make sure deps are up to date
rm -fr node_modules
npm install
npm clean-install

# get current version
VERSION=$(node --eval "console.log(require('./packages/node_modules/pouchdb/package.json').version);")
Expand Down
4 changes: 1 addition & 3 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,14 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.1)
rexml (3.2.8)
strscan (>= 3.0.9)
rexml (3.3.9)
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)
strscan (3.1.0)

PLATFORMS
ruby
Expand Down
62 changes: 3 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions packages/node_modules/pouchdb-adapter-http/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,22 @@ function preprocessAttachments(doc) {
}));
}

function hasUrlPrefix(opts) {
if (!opts.prefix) {
function hasUrlPrefix(prefix) {
if (!prefix) {
return false;
}
const protocol = parseUri(opts.prefix).protocol;
const protocol = parseUri(prefix).protocol;
return protocol === 'http' || protocol === 'https';
}

// Get all the information you possibly can about the URI given by name and
// return it as a suitable object.
function getHost(name, opts) {
function getHost({ name, prefix }) {
// encode db name if opts.prefix is a url (#5574)
if (hasUrlPrefix(opts)) {
const dbName = opts.name.substr(opts.prefix.length);
if (hasUrlPrefix(prefix)) {
const dbName = name.substr(prefix.length);
// Ensure prefix has a trailing slash
const prefix = opts.prefix.replace(/\/?$/, '/');
name = prefix + encodeURIComponent(dbName);
name = prefix.replace(/\/?$/, '/') + encodeURIComponent(dbName);
}

const uri = parseUri(name);
Expand Down Expand Up @@ -157,7 +156,7 @@ function HttpPouch(opts, callback) {
// The functions that will be publicly available for HttpPouch
const api = this;

const host = getHost(opts.name, opts);
const host = getHost(opts);
const dbUrl = genDBUrl(host, '');

opts = clone(opts);
Expand Down

0 comments on commit 12b8942

Please sign in to comment.