@budibase/server 2.4.44-alpha.8 → 2.4.44-alpha.9
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/builder/assets/{index.bd1372dd.js → index.0e1ef7eb.js} +246 -246
- package/builder/index.html +1 -1
- package/dist/package.json +8 -7
- package/dist/startup.js +29 -25
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +9 -8
- package/scripts/dev/manage.js +2 -1
- package/src/startup.ts +34 -30
- package/scripts/likeCypress.ts +0 -35
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "2.4.44-alpha.
|
|
4
|
+
"version": "2.4.44-alpha.9",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"dev:stack:down": "node scripts/dev/manage.js down",
|
|
27
27
|
"dev:stack:nuke": "node scripts/dev/manage.js nuke",
|
|
28
28
|
"dev:builder": "yarn run dev:stack:up && nodemon",
|
|
29
|
+
"dev:built": "yarn run dev:stack:up && yarn run run:docker",
|
|
29
30
|
"specs": "ts-node specs/generate.ts && openapi-typescript specs/openapi.yaml --output src/definitions/openapi.ts",
|
|
30
31
|
"initialise": "node scripts/initialise.js",
|
|
31
32
|
"env:multi:enable": "node scripts/multiTenancy.js enable",
|
|
@@ -44,12 +45,12 @@
|
|
|
44
45
|
"license": "GPL-3.0",
|
|
45
46
|
"dependencies": {
|
|
46
47
|
"@apidevtools/swagger-parser": "10.0.3",
|
|
47
|
-
"@budibase/backend-core": "2.4.44-alpha.
|
|
48
|
-
"@budibase/client": "2.4.44-alpha.
|
|
49
|
-
"@budibase/pro": "2.4.44-alpha.
|
|
50
|
-
"@budibase/shared-core": "2.4.44-alpha.
|
|
51
|
-
"@budibase/string-templates": "2.4.44-alpha.
|
|
52
|
-
"@budibase/types": "2.4.44-alpha.
|
|
48
|
+
"@budibase/backend-core": "2.4.44-alpha.9",
|
|
49
|
+
"@budibase/client": "2.4.44-alpha.9",
|
|
50
|
+
"@budibase/pro": "2.4.44-alpha.8",
|
|
51
|
+
"@budibase/shared-core": "2.4.44-alpha.9",
|
|
52
|
+
"@budibase/string-templates": "2.4.44-alpha.9",
|
|
53
|
+
"@budibase/types": "2.4.44-alpha.9",
|
|
53
54
|
"@bull-board/api": "3.7.0",
|
|
54
55
|
"@bull-board/koa": "3.9.4",
|
|
55
56
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -174,5 +175,5 @@
|
|
|
174
175
|
"optionalDependencies": {
|
|
175
176
|
"oracledb": "5.3.0"
|
|
176
177
|
},
|
|
177
|
-
"gitHead": "
|
|
178
|
+
"gitHead": "a4fe60d41874d2cc733479ee9359f8fdb495fa71"
|
|
178
179
|
}
|
package/scripts/dev/manage.js
CHANGED
|
@@ -45,7 +45,8 @@ async function init() {
|
|
|
45
45
|
BB_ADMIN_USER_PASSWORD: "",
|
|
46
46
|
PLUGINS_DIR: "",
|
|
47
47
|
TENANT_FEATURE_FLAGS: "*:LICENSING,*:USER_GROUPS,*:ONBOARDING_TOUR",
|
|
48
|
-
|
|
48
|
+
HTTP_MIGRATIONS: "0",
|
|
49
|
+
HTTP_LOGGING: "0",
|
|
49
50
|
}
|
|
50
51
|
let envFile = ""
|
|
51
52
|
Object.keys(envFileJson).forEach(key => {
|
package/src/startup.ts
CHANGED
|
@@ -45,8 +45,10 @@ async function initPro() {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
function shutdown(server?: any) {
|
|
48
|
-
server
|
|
49
|
-
|
|
48
|
+
if (server) {
|
|
49
|
+
server.close()
|
|
50
|
+
server.destroy()
|
|
51
|
+
}
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
export async function startup(app?: any, server?: any) {
|
|
@@ -69,11 +71,39 @@ export async function startup(app?: any, server?: any) {
|
|
|
69
71
|
await migrations.migrate()
|
|
70
72
|
} catch (e) {
|
|
71
73
|
logging.logAlert("Error performing migrations. Exiting.", e)
|
|
72
|
-
shutdown()
|
|
74
|
+
shutdown(server)
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
77
|
|
|
78
|
+
// monitor plugin directory if required
|
|
79
|
+
if (
|
|
80
|
+
env.SELF_HOSTED &&
|
|
81
|
+
!env.MULTI_TENANCY &&
|
|
82
|
+
env.PLUGINS_DIR &&
|
|
83
|
+
fs.existsSync(env.PLUGINS_DIR)
|
|
84
|
+
) {
|
|
85
|
+
watch()
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// check for version updates
|
|
89
|
+
await installation.checkInstallVersion()
|
|
90
|
+
|
|
91
|
+
// get the references to the queue promises, don't await as
|
|
92
|
+
// they will never end, unless the processing stops
|
|
93
|
+
let queuePromises = []
|
|
94
|
+
// configure events to use the pro audit log write
|
|
95
|
+
// can't integrate directly into backend-core due to cyclic issues
|
|
96
|
+
queuePromises.push(events.processors.init(pro.sdk.auditLogs.write))
|
|
97
|
+
queuePromises.push(automations.init())
|
|
98
|
+
queuePromises.push(initPro())
|
|
99
|
+
if (app) {
|
|
100
|
+
// bring routes online as final step once everything ready
|
|
101
|
+
await initRoutes(app)
|
|
102
|
+
}
|
|
103
|
+
|
|
76
104
|
// check and create admin user if required
|
|
105
|
+
// this must be run after the api has been initialised due to
|
|
106
|
+
// the app user sync
|
|
77
107
|
if (
|
|
78
108
|
env.SELF_HOSTED &&
|
|
79
109
|
!env.MULTI_TENANCY &&
|
|
@@ -100,34 +130,8 @@ export async function startup(app?: any, server?: any) {
|
|
|
100
130
|
)
|
|
101
131
|
} catch (e) {
|
|
102
132
|
logging.logAlert("Error creating initial admin user. Exiting.", e)
|
|
103
|
-
shutdown()
|
|
133
|
+
shutdown(server)
|
|
104
134
|
}
|
|
105
135
|
}
|
|
106
136
|
}
|
|
107
|
-
|
|
108
|
-
// monitor plugin directory if required
|
|
109
|
-
if (
|
|
110
|
-
env.SELF_HOSTED &&
|
|
111
|
-
!env.MULTI_TENANCY &&
|
|
112
|
-
env.PLUGINS_DIR &&
|
|
113
|
-
fs.existsSync(env.PLUGINS_DIR)
|
|
114
|
-
) {
|
|
115
|
-
watch()
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// check for version updates
|
|
119
|
-
await installation.checkInstallVersion()
|
|
120
|
-
|
|
121
|
-
// get the references to the queue promises, don't await as
|
|
122
|
-
// they will never end, unless the processing stops
|
|
123
|
-
let queuePromises = []
|
|
124
|
-
// configure events to use the pro audit log write
|
|
125
|
-
// can't integrate directly into backend-core due to cyclic issues
|
|
126
|
-
queuePromises.push(events.processors.init(pro.sdk.auditLogs.write))
|
|
127
|
-
queuePromises.push(automations.init())
|
|
128
|
-
queuePromises.push(initPro())
|
|
129
|
-
if (app) {
|
|
130
|
-
// bring routes online as final step once everything ready
|
|
131
|
-
await initRoutes(app)
|
|
132
|
-
}
|
|
133
137
|
}
|
package/scripts/likeCypress.ts
DELETED
|
@@ -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")
|