Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
var fs = require('fs');
var express = require('express');
var jade = require('jade');
var couchbase = require('couchbase');
var _ = require('underscore');
var Q = require('q');
var AWS = require('aws-sdk');
AWS.config.region = 'us-east-1';
var ViewQuery = couchbase.ViewQuery;
var ENTRIES_PER_PAGE = 30;
function is_server_download(filepath) {
var re = /\.deb$|\.rpm$|\.zip$|\.exe$|\.tar\.gz$/;
if (filepath.indexOf("couchbase-server") !== -1) {
if (re.exec(filepath))
return true;
// if (filepath.indexOf(".md5") !==-1 || filepath.indexOf(".staging") !== -1 || filepath.indexOf(".xml") !== -1 || filepath.indexOf(".html") !== -1)
// return false;
else
return false;
}
};
exports.is_server_download = is_server_download;
it('should reference native couchbase.ViewQuery', (done) => {
assert.strictEqual(couchbase.ViewQuery, nativeCouch.ViewQuery);
done();
});
});
function deleteItems(result, callback1) {
var query = cb.ViewQuery.from('dev_models', 'by_author').custom({inclusive_end: true, key: user.id});
async.waterfall([
function(callback2) {
Models.Application.bucket.query(query, callback2);
},
function(results, callback2) {
async.each(Object.keys(results), function(objectKey, c) {
Models.Application.bucket.remove(objectKey, c);
}, callback2);
}
], callback1);
},
function deleteLookupKeys(result, callback1) {
static get ViewQuery() { return couchbase.ViewQuery; }
static get N1qlQuery() { return couchbase.N1qlQuery; }