@budibase/server 2.5.4 → 2.5.5-alpha.1

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 (39) hide show
  1. package/builder/assets/{index.7f9a008b.css → index.841e62d8.css} +3 -3
  2. package/builder/assets/index.e30988f8.js +1776 -0
  3. package/builder/index.html +2 -2
  4. package/dist/api/controllers/ops.js +40 -0
  5. package/dist/api/routes/index.js +2 -0
  6. package/dist/api/routes/ops.js +52 -0
  7. package/dist/app.js +2 -11
  8. package/dist/environment.js +0 -1
  9. package/dist/integrations/redis.js +7 -0
  10. package/dist/integrations/rest.js +4 -0
  11. package/dist/migrations/functions/usageQuotas/syncApps.js +1 -1
  12. package/dist/migrations/functions/usageQuotas/syncRows.js +1 -2
  13. package/dist/package.json +12 -12
  14. package/dist/startup.js +29 -27
  15. package/dist/threads/automation.js +14 -3
  16. package/dist/tsconfig.build.tsbuildinfo +1 -1
  17. package/package.json +13 -13
  18. package/scripts/dev/manage.js +2 -0
  19. package/src/api/controllers/ops.ts +32 -0
  20. package/src/api/routes/index.ts +2 -0
  21. package/src/api/routes/ops.ts +30 -0
  22. package/src/api/routes/tests/automation.spec.js +5 -2
  23. package/src/api/routes/tests/user.spec.js +61 -13
  24. package/src/app.ts +2 -13
  25. package/src/environment.ts +0 -1
  26. package/src/integrations/redis.ts +8 -0
  27. package/src/integrations/rest.ts +3 -0
  28. package/src/migrations/functions/usageQuotas/syncApps.ts +1 -1
  29. package/src/migrations/functions/usageQuotas/syncRows.ts +2 -3
  30. package/src/migrations/functions/usageQuotas/tests/syncRows.spec.ts +2 -2
  31. package/src/startup.ts +34 -33
  32. package/src/tests/jestEnv.ts +0 -1
  33. package/src/tests/jestSetup.ts +0 -1
  34. package/src/threads/automation.ts +16 -4
  35. package/builder/assets/index.53a50c11.js +0 -1817
  36. package/dist/elasticApm.js +0 -14
  37. package/scripts/likeCypress.ts +0 -35
  38. package/src/elasticApm.ts +0 -10
  39. package/src/tests/logging.ts +0 -34
@@ -1,14 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const elastic_apm_node_1 = __importDefault(require("elastic-apm-node"));
7
- // enable APM if configured
8
- if (process.env.ELASTIC_APM_ENABLED) {
9
- console.log("Starting elastic-apm-node");
10
- elastic_apm_node_1.default.start({
11
- serviceName: process.env.SERVICE,
12
- environment: process.env.BUDIBASE_ENVIRONMENT,
13
- });
14
- }
@@ -1,35 +0,0 @@
1
- /******************************************************
2
- * This script just makes it easy to re-create *
3
- * a cypress like environment for testing the backend *
4
- ******************************************************/
5
- import path from "path"
6
- const tmpdir = path.join(require("os").tmpdir(), ".budibase")
7
-
8
- const SERVER_PORT = "4100"
9
- const WORKER_PORT = "4200"
10
-
11
- // @ts-ignore
12
- process.env.NODE_ENV = "cypress"
13
- process.env.ENABLE_ANALYTICS = "0"
14
- process.env.JWT_SECRET = "budibase"
15
- process.env.COUCH_URL = `leveldb://${tmpdir}/.data/`
16
- process.env.SELF_HOSTED = "1"
17
- process.env.WORKER_URL = `http://localhost:${WORKER_PORT}/`
18
- process.env.MINIO_URL = `http://localhost:4004`
19
- process.env.MINIO_ACCESS_KEY = "budibase"
20
- process.env.MINIO_SECRET_KEY = "budibase"
21
- process.env.COUCH_DB_USER = "budibase"
22
- process.env.COUCH_DB_PASSWORD = "budibase"
23
- process.env.INTERNAL_API_KEY = "budibase"
24
- process.env.ALLOW_DEV_AUTOMATIONS = "1"
25
-
26
- // don't make this a variable or top level require
27
- // it will cause environment module to be loaded prematurely
28
-
29
- // override the port with the worker port temporarily
30
- process.env.PORT = WORKER_PORT
31
- const worker = require("../../worker/src/index")
32
-
33
- // override the port with the server port
34
- process.env.PORT = SERVER_PORT
35
- const server = require("../src/app")
package/src/elasticApm.ts DELETED
@@ -1,10 +0,0 @@
1
- import apm from "elastic-apm-node"
2
-
3
- // enable APM if configured
4
- if (process.env.ELASTIC_APM_ENABLED) {
5
- console.log("Starting elastic-apm-node")
6
- apm.start({
7
- serviceName: process.env.SERVICE,
8
- environment: process.env.BUDIBASE_ENVIRONMENT,
9
- })
10
- }
@@ -1,34 +0,0 @@
1
- export enum LogLevel {
2
- TRACE = "trace",
3
- DEBUG = "debug",
4
- INFO = "info",
5
- WARN = "warn",
6
- ERROR = "error",
7
- }
8
-
9
- const LOG_INDEX: { [key in LogLevel]: number } = {
10
- [LogLevel.TRACE]: 1,
11
- [LogLevel.DEBUG]: 2,
12
- [LogLevel.INFO]: 3,
13
- [LogLevel.WARN]: 4,
14
- [LogLevel.ERROR]: 5,
15
- }
16
-
17
- const setIndex = LOG_INDEX[process.env.LOG_LEVEL as LogLevel]
18
-
19
- if (setIndex > LOG_INDEX.trace) {
20
- global.console.trace = jest.fn()
21
- }
22
-
23
- if (setIndex > LOG_INDEX.debug) {
24
- global.console.debug = jest.fn()
25
- }
26
-
27
- if (setIndex > LOG_INDEX.info) {
28
- global.console.info = jest.fn()
29
- global.console.log = jest.fn()
30
- }
31
-
32
- if (setIndex > LOG_INDEX.warn) {
33
- global.console.warn = jest.fn()
34
- }