@formio/appserver 1.1.2 → 1.1.3

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/lib/index.js +13 -12
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -54,7 +54,7 @@ node index
54
54
  This library uses environment variables to configure the configurations required to run the server. These are as follows.
55
55
 
56
56
  | Variable Name | Required | Description | Example |
57
- |--------------|:-----:|-----------:|
57
+ |--------------|-----|-----------|-----|
58
58
  | MONGO | yes | Your MongoDB Connection string to use the default DB. | mongodb://localhost:27017/appserver |
59
59
  | PROJECT_ENDPOINT | yes | The endpoint for your deployed Form.io Enterprise project. | https://mydeployment.com/myproject |
60
60
  | PROJECT_KEY | yes | The API Key for your deployed Form.io Enterprise Project. | abc123 |
package/lib/index.js CHANGED
@@ -4,6 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Actions = exports.Auth = exports.Database = exports.Processor = exports.Prepper = exports.Server = exports.Modules = void 0;
7
+ // Load the license key.
8
+ const fs_1 = __importDefault(require("fs"));
9
+ const get_1 = __importDefault(require("lodash/get"));
10
+ let licenseKey = (0, get_1.default)(process.env, 'LICENSE_KEY', '');
11
+ if (!licenseKey) {
12
+ try {
13
+ licenseKey = fs_1.default.readFileSync(path_1.default.join((0, process_2.cwd)(), 'license.txt'), 'utf8');
14
+ }
15
+ catch (err) {
16
+ console.log('No license key found. Please set the LICENSE_KEY environment variable or create a license.txt file in the root of the project.');
17
+ process.exit();
18
+ }
19
+ }
7
20
  const appserver_core_1 = require("@formio/appserver-core");
8
21
  const auth_1 = require("./auth");
9
22
  Object.defineProperty(exports, "Auth", { enumerable: true, get: function () { return auth_1.Auth; } });
@@ -17,22 +30,10 @@ const prepare_1 = require("./prepare");
17
30
  Object.defineProperty(exports, "Prepper", { enumerable: true, get: function () { return prepare_1.Prepper; } });
18
31
  const process_2 = require("process");
19
32
  const path_1 = __importDefault(require("path"));
20
- const fs_1 = __importDefault(require("fs"));
21
- const get_1 = __importDefault(require("lodash/get"));
22
33
  const defaultsDeep_1 = __importDefault(require("lodash/defaultsDeep"));
23
34
  const packageJson = require('../package.json');
24
35
  const appCorePackage = require('@formio/appserver-core/package.json');
25
36
  const corePackage = require('@formio/core');
26
- // Load the license key.
27
- let licenseKey = (0, get_1.default)(process.env, 'LICENSE_KEY', '');
28
- if (!licenseKey) {
29
- try {
30
- licenseKey = fs_1.default.readFileSync(path_1.default.join((0, process_2.cwd)(), 'license.txt'), 'utf8');
31
- }
32
- catch (err) {
33
- console.error('No license key found. Please set the LICENSE_KEY environment variable or create a license.txt file in the root of the project.');
34
- }
35
- }
36
37
  exports.Modules = {
37
38
  db: db_1.Database,
38
39
  auth: auth_1.Auth,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/appserver",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "A highly performant and extensible Application Server for Form.io Multi-Tenant Deployments.",
5
5
  "main": "server.js",
6
6
  "scripts": {