@budibase/server 2.3.18-alpha.0 → 2.3.18-alpha.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.
@@ -36,6 +36,8 @@ function shutdown() {
36
36
  yield debounceClient.finish();
37
37
  if (flagClient)
38
38
  yield flagClient.finish();
39
+ // shutdown core clients
40
+ yield backend_core_1.redis.clients.shutdown();
39
41
  console.log("Redis shutdown");
40
42
  });
41
43
  }
package/jest.config.ts CHANGED
@@ -11,22 +11,17 @@ const baseConfig: Config.InitialProjectOptions = {
11
11
  transform: {
12
12
  "^.+\\.ts?$": "@swc/jest",
13
13
  },
14
- }
15
-
16
- if (!process.env.CI) {
17
- // use sources when not in CI
18
- baseConfig.moduleNameMapper = {
14
+ moduleNameMapper: {
19
15
  "@budibase/backend-core/(.*)": "<rootDir>/../backend-core/$1",
20
16
  "@budibase/backend-core": "<rootDir>/../backend-core/src",
21
17
  "@budibase/types": "<rootDir>/../types/src",
22
- }
23
- // add pro sources if they exist
24
- if (fs.existsSync("../../../budibase-pro")) {
25
- baseConfig.moduleNameMapper["@budibase/pro"] =
26
- "<rootDir>/../../../budibase-pro/packages/pro/src"
27
- }
28
- } else {
29
- console.log("Running tests with compiled dependency sources")
18
+ },
19
+ }
20
+
21
+ // add pro sources if they exist
22
+ if (fs.existsSync("../../../budibase-pro")) {
23
+ baseConfig.moduleNameMapper["@budibase/pro"] =
24
+ "<rootDir>/../../../budibase-pro/packages/pro/src"
30
25
  }
31
26
 
32
27
  const config: Config.InitialOptions = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/server",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.3.18-alpha.0",
4
+ "version": "2.3.18-alpha.2",
5
5
  "description": "Budibase Web Server",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -14,7 +14,7 @@
14
14
  "build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
15
15
  "debug": "yarn build && node --expose-gc --inspect=9222 dist/index.js",
16
16
  "postbuild": "copyfiles -u 1 src/**/*.svelte dist/ && copyfiles -u 1 src/**/*.hbs dist/ && copyfiles -u 1 src/**/*.json dist/",
17
- "test": "jest --coverage --maxWorkers=2",
17
+ "test": "jest --coverage --runInBand",
18
18
  "test:watch": "jest --watch",
19
19
  "predocker": "copyfiles -f ../client/dist/budibase-client.js ../client/manifest.json client",
20
20
  "build:docker": "yarn run predocker && docker build . -t app-service --label version=$BUDIBASE_RELEASE_VERSION",
@@ -43,11 +43,11 @@
43
43
  "license": "GPL-3.0",
44
44
  "dependencies": {
45
45
  "@apidevtools/swagger-parser": "10.0.3",
46
- "@budibase/backend-core": "2.3.18-alpha.0",
47
- "@budibase/client": "2.3.18-alpha.0",
48
- "@budibase/pro": "2.3.17",
49
- "@budibase/string-templates": "2.3.18-alpha.0",
50
- "@budibase/types": "2.3.18-alpha.0",
46
+ "@budibase/backend-core": "2.3.18-alpha.2",
47
+ "@budibase/client": "2.3.18-alpha.2",
48
+ "@budibase/pro": "2.3.18-alpha.1",
49
+ "@budibase/string-templates": "2.3.18-alpha.2",
50
+ "@budibase/types": "2.3.18-alpha.2",
51
51
  "@bull-board/api": "3.7.0",
52
52
  "@bull-board/koa": "3.9.4",
53
53
  "@elastic/elasticsearch": "7.10.0",
@@ -173,5 +173,5 @@
173
173
  "optionalDependencies": {
174
174
  "oracledb": "5.3.0"
175
175
  },
176
- "gitHead": "f4dd710b75eb0a7a65e6f9d8b8f709d3b76c435b"
176
+ "gitHead": "4321a07944ae4653d6ea716bf4c2ba588f443660"
177
177
  }
@@ -1,6 +1,6 @@
1
1
  const Resource = require("./utils/Resource")
2
2
  const { object } = require("./utils")
3
- const { BaseQueryVerbs } = require("../../dist/constants")
3
+ const { BaseQueryVerbs } = require("../../src/constants")
4
4
 
5
5
  const query = {
6
6
  _id: "query_datasource_plus_4d8be0c506b9465daf4bf84d890fdab6_454854487c574d45bc4029b1e153219e",
@@ -2,7 +2,7 @@ const {
2
2
  FieldTypes,
3
3
  RelationshipTypes,
4
4
  FormulaTypes,
5
- } = require("../../dist/constants")
5
+ } = require("../../src/constants")
6
6
  const { object } = require("./utils")
7
7
  const Resource = require("./utils/Resource")
8
8
 
@@ -13,18 +13,6 @@ describe("/static", () => {
13
13
  app = await config.init()
14
14
  })
15
15
 
16
- describe("/builder", () => {
17
- it("should serve the builder", async () => {
18
- const res = await request
19
- .get("/builder/portal")
20
- .set(config.defaultHeaders())
21
- .expect("Content-Type", /text\/html/)
22
- .expect(200)
23
-
24
- expect(res.text).toContain("<title>Budibase</title>")
25
- })
26
- })
27
-
28
16
  describe("/app", () => {
29
17
  beforeEach(() => {
30
18
  jest.clearAllMocks()
@@ -1,4 +1,4 @@
1
- const { roles, utils } = require("@budibase/backend-core")
1
+ const { roles } = require("@budibase/backend-core")
2
2
  const { checkPermissionsEndpoint } = require("./utilities/TestFunctions")
3
3
  const setup = require("./utilities")
4
4
  const { BUILTIN_ROLE_IDS } = roles
@@ -21,8 +21,7 @@ describe("/users", () => {
21
21
 
22
22
  afterAll(setup.afterAll)
23
23
 
24
- // For some reason this cannot be a beforeAll or the test "should be able to update the user" fail
25
- beforeEach(async () => {
24
+ beforeAll(async () => {
26
25
  await config.init()
27
26
  })
28
27
 
@@ -21,6 +21,8 @@ export async function shutdown() {
21
21
  if (devAppClient) await devAppClient.finish()
22
22
  if (debounceClient) await debounceClient.finish()
23
23
  if (flagClient) await flagClient.finish()
24
+ // shutdown core clients
25
+ await redis.clients.shutdown()
24
26
  console.log("Redis shutdown")
25
27
  }
26
28