acebase-server 1.18.1 → 1.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build-vars.js CHANGED
@@ -1,6 +1,5 @@
1
1
  // Executed by npm "version" hook
2
2
  const { readFileSync, writeFileSync } = require('fs');
3
- const { execSync } = require('child_process');
4
3
  const packageInfo = require('./package.json');
5
4
 
6
5
  const sources = ['routes/meta-info', 'routes/docs'];
@@ -13,5 +12,3 @@ files.forEach(file => {
13
12
  console.log(`Replaced variable %SERVER_VERSION% with ${packageInfo.version} in ${file}`);
14
13
  }
15
14
  });
16
-
17
- execSync(`git add dist`);
@@ -37,7 +37,7 @@ class DropboxAuthProvider extends oauth_provider_1.OAuth2Provider {
37
37
  return __awaiter(this, void 0, void 0, function* () {
38
38
  // Return url to get authorization code with
39
39
  const options = info.options || {};
40
- const authUrl = `https://www.dropbox.com/oauth2/authorize?response_type=code&token_access_type=offline&client_id=${this.settings.client_id}&scope=${encodeURIComponent(this.settings.scopes.join(' '))}&redirect_uri=${encodeURIComponent(info.redirect_url)}&locale=${options.locale || ''}&require_role=${options.require_role || ''}&force_reauthentication=${options.force_reauthentication === true}&force_reapprove=${options.force_reapprove === true}&disable_signup=${options.disable_signup === true}&state=${encodeURIComponent(info.state)}`;
40
+ const authUrl = `https://www.dropbox.com/oauth2/authorize?response_type=code&token_access_type=offline&client_id=${this.settings.client_id}&scope=${encodeURIComponent(this.settings.scopes.join(' '))}&redirect_uri=${encodeURIComponent(info.redirect_url)}${options.locale ? `&locale=${options.locale}` : ''}${options.require_role ? `&require_role=${options.require_role}` : ''}&force_reauthentication=${options.force_reauthentication === true}&force_reapprove=${options.force_reapprove === true}&disable_signup=${options.disable_signup === true}&state=${encodeURIComponent(info.state)}`;
41
41
  return authUrl;
42
42
  });
43
43
  }
@@ -19,7 +19,7 @@ const addRoute = (env) => {
19
19
  info: {
20
20
  title: 'AceBase Server',
21
21
  description: 'AceBase Server API endpoint documentation and test environment. This documentation is available on the server because it is running in development mode. To disable this, set your NODE_ENV environment variable to production. Many endpoints require you to authenticate using Bearer authentication. Use the _/auth/{dbname}/signin_ endpoint to obtain an access token, then click the _Authorize_ button and paste your token into the input field. For more information about AceBase, see GitHub',
22
- version: '1.18.1',
22
+ version: '1.18.2',
23
23
  contact: {
24
24
  name: 'AceBase API Support',
25
25
  email: 'me@appy.one',
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addRoute = void 0;
4
4
  const os = require("os");
5
- const SERVER_VERSION = '1.18.1'; // Loaded from package.json by npm scripts
5
+ const SERVER_VERSION = '1.18.2'; // Loaded from package.json by npm scripts
6
6
  const addRoute = (env) => {
7
7
  // Add info endpoint
8
8
  env.router.get(`/info/${env.db.name}`, (req, res) => {
@@ -24,7 +24,7 @@ export class DropboxAuthProvider extends OAuth2Provider {
24
24
  async init(info) {
25
25
  // Return url to get authorization code with
26
26
  const options = info.options || {};
27
- const authUrl = `https://www.dropbox.com/oauth2/authorize?response_type=code&token_access_type=offline&client_id=${this.settings.client_id}&scope=${encodeURIComponent(this.settings.scopes.join(' '))}&redirect_uri=${encodeURIComponent(info.redirect_url)}&locale=${options.locale || ''}&require_role=${options.require_role || ''}&force_reauthentication=${options.force_reauthentication === true}&force_reapprove=${options.force_reapprove === true}&disable_signup=${options.disable_signup === true}&state=${encodeURIComponent(info.state)}`;
27
+ const authUrl = `https://www.dropbox.com/oauth2/authorize?response_type=code&token_access_type=offline&client_id=${this.settings.client_id}&scope=${encodeURIComponent(this.settings.scopes.join(' '))}&redirect_uri=${encodeURIComponent(info.redirect_url)}${options.locale ? `&locale=${options.locale}` : ''}${options.require_role ? `&require_role=${options.require_role}` : ''}&force_reauthentication=${options.force_reauthentication === true}&force_reapprove=${options.force_reapprove === true}&disable_signup=${options.disable_signup === true}&state=${encodeURIComponent(info.state)}`;
28
28
  return authUrl;
29
29
  }
30
30
  async getAccessToken(params) {
@@ -14,7 +14,7 @@ export const addRoute = (env) => {
14
14
  info: {
15
15
  title: 'AceBase Server',
16
16
  description: 'AceBase Server API endpoint documentation and test environment. This documentation is available on the server because it is running in development mode. To disable this, set your NODE_ENV environment variable to production. Many endpoints require you to authenticate using Bearer authentication. Use the _/auth/{dbname}/signin_ endpoint to obtain an access token, then click the _Authorize_ button and paste your token into the input field. For more information about AceBase, see GitHub',
17
- version: '1.18.1',
17
+ version: '1.18.2',
18
18
  contact: {
19
19
  name: 'AceBase API Support',
20
20
  email: 'me@appy.one',
@@ -1,5 +1,5 @@
1
1
  import * as os from 'os';
2
- const SERVER_VERSION = '1.18.1'; // Loaded from package.json by npm scripts
2
+ const SERVER_VERSION = '1.18.2'; // Loaded from package.json by npm scripts
3
3
  export const addRoute = (env) => {
4
4
  // Add info endpoint
5
5
  env.router.get(`/info/${env.db.name}`, (req, res) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acebase-server",
3
- "version": "1.18.1",
3
+ "version": "1.18.2",
4
4
  "description": "AceBase realtime database server (webserver endpoint to allow remote connections)",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",