@budibase/server 1.0.27-alpha.12 → 1.0.27-alpha.13
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.0dce895b.css → index.176f00e0.css} +1 -1
- package/builder/assets/{index.cd16a193.js → index.5776ef20.js} +200 -200
- package/builder/index.html +2 -2
- package/coverage/clover.xml +44 -44
- package/coverage/coverage-final.json +3 -3
- package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/application.js.html +1 -1
- package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +1 -1
- package/coverage/lcov-report/api/controllers/component.js.html +1 -1
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +2 -2
- package/coverage/lcov-report/api/controllers/hosting.js.html +2 -2
- package/coverage/lcov-report/api/controllers/index.html +1 -1
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +2 -2
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/application.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/hosting.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +1 -1
- package/coverage/lcov-report/api/routes/index.js.html +1 -1
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/row.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/static.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +1 -1
- package/coverage/lcov-report/automations/index.html +1 -1
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/createRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/deleteRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +2 -2
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +1 -1
- package/coverage/lcov-report/automations/utils.js.html +1 -1
- package/coverage/lcov-report/constants/index.html +1 -1
- package/coverage/lcov-report/constants/index.js.html +3 -3
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/client.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +1 -1
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +1 -1
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/authorized.js.html +1 -1
- package/coverage/lcov-report/middleware/builder.js.html +1 -1
- package/coverage/lcov-report/middleware/currentapp.js.html +17 -5
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/usageQuota.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +1 -1
- package/coverage/lcov-report/threads/automation.js.html +2 -2
- package/coverage/lcov-report/threads/index.html +1 -1
- package/coverage/lcov-report/threads/index.js.html +1 -1
- package/coverage/lcov-report/threads/query.js.html +1 -1
- package/coverage/lcov-report/threads/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +2 -2
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +1 -1
- package/coverage/lcov-report/utilities/index.js.html +2 -2
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
- package/coverage/lcov.info +82 -82
- package/dist/api/controllers/dev.js +1 -1
- package/dist/api/controllers/hosting.js +1 -1
- package/dist/api/index.js +1 -1
- package/dist/automations/steps/executeQuery.js +1 -1
- package/dist/constants/index.js +2 -2
- package/dist/middleware/currentapp.js +2 -2
- package/dist/package.json +4 -4
- package/dist/tests/utilities/TestConfiguration.js +2 -2
- package/dist/threads/automation.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utilities/budibaseDir.js +1 -1
- package/dist/utilities/fileSystem/utilities.js +1 -1
- package/dist/utilities/index.js +1 -1
- package/package.json +5 -5
- package/src/api/controllers/dev.js +1 -1
- package/src/api/controllers/hosting.js +1 -1
- package/src/api/index.js +1 -1
- package/src/automations/steps/executeQuery.js +1 -1
- package/src/constants/index.js +2 -2
- package/src/middleware/currentapp.js +7 -3
- package/src/middleware/tests/currentapp.spec.js +34 -40
- package/src/tests/utilities/TestConfiguration.js +2 -2
- package/src/threads/automation.js +1 -1
- package/src/utilities/budibaseDir.js +1 -1
- package/src/utilities/fileSystem/utilities.js +1 -1
- package/src/utilities/index.js +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const { join } = require("./centralPath");
|
|
3
3
|
const { homedir } = require("os");
|
|
4
4
|
const env = require("../environment");
|
|
5
|
-
const { budibaseTempDir } = require("@budibase/backend-core")
|
|
5
|
+
const { budibaseTempDir } = require("@budibase/backend-core/objectStore");
|
|
6
6
|
module.exports.budibaseAppsDir = function () {
|
|
7
7
|
return env.BUDIBASE_DIR || join(homedir(), ".budibase");
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const { ObjectStore, makeSureBucketExists, upload, deleteFiles, streamUpload, retrieve, retrieveToTmp, deleteFolder, uploadDirectory, downloadTarball, } = require("@budibase/backend-core")
|
|
2
|
+
const { ObjectStore, makeSureBucketExists, upload, deleteFiles, streamUpload, retrieve, retrieveToTmp, deleteFolder, uploadDirectory, downloadTarball, } = require("@budibase/backend-core/objectStore");
|
|
3
3
|
/***********************************
|
|
4
4
|
* NOTE *
|
|
5
5
|
* This file purely exists so that *
|
package/dist/utilities/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
const env = require("../environment");
|
|
12
12
|
const { OBJ_STORE_DIRECTORY } = require("../constants");
|
|
13
|
-
const { sanitizeKey } = require("@budibase/backend-core/
|
|
13
|
+
const { sanitizeKey } = require("@budibase/backend-core/objectStore");
|
|
14
14
|
const CouchDB = require("../db");
|
|
15
15
|
const { generateMetadataID } = require("../db/utils");
|
|
16
16
|
const Readable = require("stream").Readable;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/server",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "1.0.27-alpha.
|
|
4
|
+
"version": "1.0.27-alpha.13",
|
|
5
5
|
"description": "Budibase Web Server",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"license": "GPL-3.0",
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@apidevtools/swagger-parser": "^10.0.3",
|
|
73
|
-
"@budibase/backend-core": "^1.0.27-alpha.
|
|
74
|
-
"@budibase/client": "^1.0.27-alpha.
|
|
75
|
-
"@budibase/string-templates": "^1.0.27-alpha.
|
|
73
|
+
"@budibase/backend-core": "^1.0.27-alpha.13",
|
|
74
|
+
"@budibase/client": "^1.0.27-alpha.13",
|
|
75
|
+
"@budibase/string-templates": "^1.0.27-alpha.13",
|
|
76
76
|
"@bull-board/api": "^3.7.0",
|
|
77
77
|
"@bull-board/koa": "^3.7.0",
|
|
78
78
|
"@elastic/elasticsearch": "7.10.0",
|
|
@@ -165,5 +165,5 @@
|
|
|
165
165
|
"optionalDependencies": {
|
|
166
166
|
"oracledb": "^5.3.0"
|
|
167
167
|
},
|
|
168
|
-
"gitHead": "
|
|
168
|
+
"gitHead": "e48e21ffb846288ce46883674626b79755617445"
|
|
169
169
|
}
|
|
@@ -4,7 +4,7 @@ const env = require("../../environment")
|
|
|
4
4
|
const { checkSlashesInUrl } = require("../../utilities")
|
|
5
5
|
const { request } = require("../../utilities/workerRequests")
|
|
6
6
|
const { clearLock } = require("../../utilities/redis")
|
|
7
|
-
const { Replication } = require("@budibase/backend-core")
|
|
7
|
+
const { Replication } = require("@budibase/backend-core/db")
|
|
8
8
|
const { DocumentTypes } = require("../../db/utils")
|
|
9
9
|
const { app: appCache } = require("@budibase/backend-core/cache")
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const CouchDB = require("../../db")
|
|
2
2
|
const { getDeployedApps } = require("../../utilities/workerRequests")
|
|
3
3
|
const { getScopedConfig } = require("@budibase/backend-core/db")
|
|
4
|
-
const { Configs } = require("@budibase/backend-core")
|
|
4
|
+
const { Configs } = require("@budibase/backend-core/constants")
|
|
5
5
|
const { checkSlashesInUrl } = require("../../utilities")
|
|
6
6
|
|
|
7
7
|
exports.fetchUrls = async ctx => {
|
package/src/api/index.js
CHANGED
|
@@ -4,7 +4,7 @@ const {
|
|
|
4
4
|
auditLog,
|
|
5
5
|
buildTenancyMiddleware,
|
|
6
6
|
buildAppTenancyMiddleware,
|
|
7
|
-
} = require("@budibase/backend-core")
|
|
7
|
+
} = require("@budibase/backend-core/auth")
|
|
8
8
|
const currentApp = require("../middleware/currentapp")
|
|
9
9
|
const compress = require("koa-compress")
|
|
10
10
|
const zlib = require("zlib")
|
package/src/constants/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { BUILTIN_ROLE_IDS } = require("@budibase/backend-core/roles")
|
|
2
|
-
const { UserStatus } = require("@budibase/backend-core")
|
|
3
|
-
const { ObjectStoreBuckets } = require("@budibase/backend-core")
|
|
2
|
+
const { UserStatus } = require("@budibase/backend-core/constants")
|
|
3
|
+
const { ObjectStoreBuckets } = require("@budibase/backend-core/objectStore")
|
|
4
4
|
|
|
5
5
|
exports.JobQueues = {
|
|
6
6
|
AUTOMATIONS: "automationQueue",
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
const {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
const {
|
|
2
|
+
getAppId,
|
|
3
|
+
setCookie,
|
|
4
|
+
getCookie,
|
|
5
|
+
clearCookie,
|
|
6
|
+
} = require("@budibase/backend-core/utils")
|
|
7
|
+
const { Cookies } = require("@budibase/backend-core/constants")
|
|
4
8
|
const { getRole } = require("@budibase/backend-core/roles")
|
|
5
9
|
const { BUILTIN_ROLE_IDS } = require("@budibase/backend-core/roles")
|
|
6
10
|
const { generateUserMetadataID, isDevAppID } = require("../db/utils")
|
|
@@ -32,34 +32,30 @@ function mockAuthWithNoCookie() {
|
|
|
32
32
|
},
|
|
33
33
|
},
|
|
34
34
|
}))
|
|
35
|
-
jest.mock("@budibase/backend-core", () => ({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Cookies: {},
|
|
43
|
-
},
|
|
35
|
+
jest.mock("@budibase/backend-core/utils", () => ({
|
|
36
|
+
getAppId: jest.fn(),
|
|
37
|
+
setCookie: jest.fn(),
|
|
38
|
+
getCookie: jest.fn(),
|
|
39
|
+
}))
|
|
40
|
+
jest.mock("@budibase/backend-core/constants", () => ({
|
|
41
|
+
Cookies: {},
|
|
44
42
|
}))
|
|
45
43
|
}
|
|
46
44
|
|
|
47
45
|
function mockAuthWithCookie() {
|
|
48
46
|
jest.resetModules()
|
|
49
47
|
mockWorker()
|
|
50
|
-
jest.mock("@budibase/backend-core", () => ({
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return "app_test"
|
|
54
|
-
},
|
|
55
|
-
setCookie: jest.fn(),
|
|
56
|
-
getCookie: () => ({appId: "app_different", roleId: "PUBLIC"}),
|
|
48
|
+
jest.mock("@budibase/backend-core/utils", () => ({
|
|
49
|
+
getAppId: () => {
|
|
50
|
+
return "app_test"
|
|
57
51
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
setCookie: jest.fn(),
|
|
53
|
+
getCookie: () => ({appId: "app_different", roleId: "PUBLIC"}),
|
|
54
|
+
}))
|
|
55
|
+
jest.mock("@budibase/backend-core/constants", () => ({
|
|
56
|
+
Cookies: {
|
|
57
|
+
Auth: "auth",
|
|
58
|
+
CurrentApp: "currentapp",
|
|
63
59
|
},
|
|
64
60
|
}))
|
|
65
61
|
}
|
|
@@ -121,7 +117,7 @@ describe("Current app middleware", () => {
|
|
|
121
117
|
async function checkExpected(setCookie) {
|
|
122
118
|
config.setUser()
|
|
123
119
|
await config.executeMiddleware()
|
|
124
|
-
|
|
120
|
+
let { setCookie: cookieFn } = require("@budibase/backend-core/utils")
|
|
125
121
|
if (setCookie) {
|
|
126
122
|
expect(cookieFn).toHaveBeenCalled()
|
|
127
123
|
} else {
|
|
@@ -140,32 +136,30 @@ describe("Current app middleware", () => {
|
|
|
140
136
|
|
|
141
137
|
it("should perform correct when no cookie exists", async () => {
|
|
142
138
|
mockReset()
|
|
143
|
-
jest.mock("@budibase/backend-core", () => ({
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
return "app_test"
|
|
147
|
-
},
|
|
148
|
-
setCookie: jest.fn(),
|
|
149
|
-
getCookie: jest.fn(),
|
|
150
|
-
},
|
|
151
|
-
constants: {
|
|
152
|
-
Cookies: {},
|
|
139
|
+
jest.mock("@budibase/backend-core/utils", () => ({
|
|
140
|
+
getAppId: () => {
|
|
141
|
+
return "app_test"
|
|
153
142
|
},
|
|
143
|
+
setCookie: jest.fn(),
|
|
144
|
+
getCookie: jest.fn(),
|
|
145
|
+
}))
|
|
146
|
+
jest.mock("@budibase/backend-core/constants", () => ({
|
|
147
|
+
Cookies: {},
|
|
154
148
|
}))
|
|
155
149
|
await checkExpected(true)
|
|
156
150
|
})
|
|
157
151
|
|
|
158
152
|
it("lastly check what occurs when cookie doesn't need updated", async () => {
|
|
159
153
|
mockReset()
|
|
160
|
-
jest.mock("@budibase/backend-core", () => ({
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
return "app_test"
|
|
164
|
-
},
|
|
165
|
-
setCookie: jest.fn(),
|
|
166
|
-
getCookie: () => ({appId: "app_test", roleId: "PUBLIC"}),
|
|
154
|
+
jest.mock("@budibase/backend-core/utils", () => ({
|
|
155
|
+
getAppId: () => {
|
|
156
|
+
return "app_test"
|
|
167
157
|
},
|
|
168
|
-
|
|
158
|
+
setCookie: jest.fn(),
|
|
159
|
+
getCookie: () => ({appId: "app_test", roleId: "PUBLIC"}),
|
|
160
|
+
}))
|
|
161
|
+
jest.mock("@budibase/backend-core/constants", () => ({
|
|
162
|
+
Cookies: {},
|
|
169
163
|
}))
|
|
170
164
|
await checkExpected(false)
|
|
171
165
|
})
|
|
@@ -15,8 +15,8 @@ const {
|
|
|
15
15
|
const controllers = require("./controllers")
|
|
16
16
|
const supertest = require("supertest")
|
|
17
17
|
const { cleanup } = require("../../utilities/fileSystem")
|
|
18
|
-
const { Cookies, Headers } = require("@budibase/backend-core")
|
|
19
|
-
const { jwt } = require("@budibase/backend-core")
|
|
18
|
+
const { Cookies, Headers } = require("@budibase/backend-core/constants")
|
|
19
|
+
const { jwt } = require("@budibase/backend-core/auth")
|
|
20
20
|
const core = require("@budibase/backend-core")
|
|
21
21
|
const { getGlobalDB } = require("@budibase/backend-core/tenancy")
|
|
22
22
|
const { createASession } = require("@budibase/backend-core/sessions")
|
|
@@ -4,7 +4,7 @@ const actions = require("../automations/actions")
|
|
|
4
4
|
const automationUtils = require("../automations/automationUtils")
|
|
5
5
|
const AutomationEmitter = require("../events/AutomationEmitter")
|
|
6
6
|
const { processObject } = require("@budibase/string-templates")
|
|
7
|
-
const { DEFAULT_TENANT_ID } = require("@budibase/backend-core")
|
|
7
|
+
const { DEFAULT_TENANT_ID } = require("@budibase/backend-core/constants")
|
|
8
8
|
const CouchDB = require("../db")
|
|
9
9
|
const { DocumentTypes, isDevAppID } = require("../db/utils")
|
|
10
10
|
const { doInTenant } = require("@budibase/backend-core/tenancy")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { join } = require("./centralPath")
|
|
2
2
|
const { homedir } = require("os")
|
|
3
3
|
const env = require("../environment")
|
|
4
|
-
const { budibaseTempDir } = require("@budibase/backend-core")
|
|
4
|
+
const { budibaseTempDir } = require("@budibase/backend-core/objectStore")
|
|
5
5
|
|
|
6
6
|
module.exports.budibaseAppsDir = function () {
|
|
7
7
|
return env.BUDIBASE_DIR || join(homedir(), ".budibase")
|
package/src/utilities/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const env = require("../environment")
|
|
2
2
|
const { OBJ_STORE_DIRECTORY } = require("../constants")
|
|
3
|
-
const { sanitizeKey } = require("@budibase/backend-core/
|
|
3
|
+
const { sanitizeKey } = require("@budibase/backend-core/objectStore")
|
|
4
4
|
const CouchDB = require("../db")
|
|
5
5
|
const { generateMetadataID } = require("../db/utils")
|
|
6
6
|
const Readable = require("stream").Readable
|