diff --git a/lerna.json b/lerna.json index 75c6bf2f90..ce7aa07df6 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.167-alpha.3", + "version": "1.0.167-alpha.4", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 728f212cb5..128a392d6b 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.167-alpha.3", + "version": "1.0.167-alpha.4", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index bbf5ac6a78..586a02e97c 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.0.167-alpha.3", + "version": "1.0.167-alpha.4", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", @@ -38,7 +38,7 @@ ], "dependencies": { "@adobe/spectrum-css-workflow-icons": "^1.2.1", - "@budibase/string-templates": "^1.0.167-alpha.3", + "@budibase/string-templates": "^1.0.167-alpha.4", "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/avatar": "^3.0.2", diff --git a/packages/builder/package.json b/packages/builder/package.json index fed7e0382a..d9bb6f28d1 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.167-alpha.3", + "version": "1.0.167-alpha.4", "license": "GPL-3.0", "private": true, "scripts": { @@ -67,10 +67,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.167-alpha.3", - "@budibase/client": "^1.0.167-alpha.3", - "@budibase/frontend-core": "^1.0.167-alpha.3", - "@budibase/string-templates": "^1.0.167-alpha.3", + "@budibase/bbui": "^1.0.167-alpha.4", + "@budibase/client": "^1.0.167-alpha.4", + "@budibase/frontend-core": "^1.0.167-alpha.4", + "@budibase/string-templates": "^1.0.167-alpha.4", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index d4302d28ab..454aa63957 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.167-alpha.3", + "version": "1.0.167-alpha.4", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 6aa9c6a34a..e7bee51e7f 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.167-alpha.3", + "version": "1.0.167-alpha.4", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^1.0.167-alpha.3", - "@budibase/frontend-core": "^1.0.167-alpha.3", - "@budibase/string-templates": "^1.0.167-alpha.3", + "@budibase/bbui": "^1.0.167-alpha.4", + "@budibase/frontend-core": "^1.0.167-alpha.4", + "@budibase/string-templates": "^1.0.167-alpha.4", "@spectrum-css/button": "^3.0.3", "@spectrum-css/card": "^3.0.3", "@spectrum-css/divider": "^1.0.3", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 7cd15de482..686d03fcf6 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.0.167-alpha.3", + "version": "1.0.167-alpha.4", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.0.167-alpha.3", + "@budibase/bbui": "^1.0.167-alpha.4", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/frontend-core/src/api/templates.js b/packages/frontend-core/src/api/templates.js index 3c474dabc6..660a85d745 100644 --- a/packages/frontend-core/src/api/templates.js +++ b/packages/frontend-core/src/api/templates.js @@ -29,7 +29,7 @@ export const buildTemplateEndpoints = API => ({ */ getAppTemplates: async () => { return await API.get({ - url: "/api/templates?type=app", + url: "/api/templates", }) }, }) diff --git a/packages/server/package.json b/packages/server/package.json index fc61c91006..9218fb43ed 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.0.167-alpha.3", + "version": "1.0.167-alpha.4", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -69,10 +69,10 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "^10.0.3", - "@budibase/backend-core": "^1.0.167-alpha.3", - "@budibase/client": "^1.0.167-alpha.3", - "@budibase/pro": "1.0.167-alpha.3", - "@budibase/string-templates": "^1.0.167-alpha.3", + "@budibase/backend-core": "^1.0.167-alpha.4", + "@budibase/client": "^1.0.167-alpha.4", + "@budibase/pro": "1.0.167-alpha.4", + "@budibase/string-templates": "^1.0.167-alpha.4", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/server/src/api/controllers/templates.js b/packages/server/src/api/controllers/templates.js index 03dbbd2ee2..3a1cafdf5a 100644 --- a/packages/server/src/api/controllers/templates.js +++ b/packages/server/src/api/controllers/templates.js @@ -1,12 +1,13 @@ const fetch = require("node-fetch") const { downloadTemplate } = require("../../utilities/fileSystem") +const env = require("../../environment") // development flag, can be used to test against templates exported locally const DEFAULT_TEMPLATES_BUCKET = "prod-budi-templates.s3-eu-west-1.amazonaws.com" exports.fetch = async function (ctx) { - const { type = "app" } = ctx.query + let type = env.TEMPLATE_REPOSITORY let response, error = false try { diff --git a/packages/server/src/environment.js b/packages/server/src/environment.js index 5ff6554847..45b8f68a49 100644 --- a/packages/server/src/environment.js +++ b/packages/server/src/environment.js @@ -54,6 +54,7 @@ module.exports = { JEST_WORKER_ID: process.env.JEST_WORKER_ID, BUDIBASE_ENVIRONMENT: process.env.BUDIBASE_ENVIRONMENT, DISABLE_ACCOUNT_PORTAL: process.env.DISABLE_ACCOUNT_PORTAL, + TEMPLATE_REPOSITORY: process.env.TEMPLATE_REPOSITORY || "app", // minor SALT_ROUNDS: process.env.SALT_ROUNDS, LOGGER: process.env.LOGGER, diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 823d2401d0..65f3d567cf 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.0.167-alpha.3", + "version": "1.0.167-alpha.4", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index 8c57f233d3..1c36e80963 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.0.167-alpha.3", + "version": "1.0.167-alpha.4", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -31,9 +31,9 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.0.167-alpha.3", - "@budibase/pro": "1.0.167-alpha.3", - "@budibase/string-templates": "^1.0.167-alpha.3", + "@budibase/backend-core": "^1.0.167-alpha.4", + "@budibase/pro": "1.0.167-alpha.4", + "@budibase/string-templates": "^1.0.167-alpha.4", "@koa/router": "^8.0.0", "@sentry/node": "6.17.7", "@techpass/passport-openidconnect": "^0.3.0",