Merge branch 'develop' of github.com:Budibase/budibase into develop

This commit is contained in:
Andrew Kingston 2022-09-14 12:01:56 +01:00
commit 07f15ac95b
19 changed files with 117 additions and 67 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.3.15-alpha.5",
"version": "1.3.15-alpha.7",
"npmClient": "yarn",
"packages": [
"packages/*"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/backend-core",
"version": "1.3.15-alpha.5",
"version": "1.3.15-alpha.7",
"description": "Budibase backend core libraries used in server and worker",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
@ -20,11 +20,12 @@
"test:watch": "jest --watchAll"
},
"dependencies": {
"@budibase/types": "1.3.15-alpha.5",
"@budibase/types": "1.3.15-alpha.7",
"@shopify/jest-koa-mocks": "5.0.1",
"@techpass/passport-openidconnect": "0.3.2",
"aws-sdk": "2.1030.0",
"bcrypt": "5.0.1",
"bcryptjs": "2.4.3",
"dotenv": "16.0.1",
"emitter-listener": "1.1.2",
"ioredis": "4.28.0",

View File

@ -19,6 +19,7 @@ if (!LOADED && isDev() && !isTest()) {
const env = {
isTest,
isDev,
JS_BCRYPT: process.env.JS_BCRYPT,
JWT_SECRET: process.env.JWT_SECRET,
COUCH_DB_URL: process.env.COUCH_DB_URL || "http://localhost:4005",
COUCH_DB_USERNAME: process.env.COUCH_DB_USER,

View File

@ -1,5 +1,5 @@
const bcrypt = require("bcrypt")
const env = require("./environment")
const bcrypt = env.JS_BCRYPT ? require("bcryptjs") : require("bcrypt")
const { v4 } = require("uuid")
const SALT_ROUNDS = env.SALT_ROUNDS || 10

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/bbui",
"description": "A UI solution used in the different Budibase projects.",
"version": "1.3.15-alpha.5",
"version": "1.3.15-alpha.7",
"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.3.15-alpha.5",
"@budibase/string-templates": "1.3.15-alpha.7",
"@spectrum-css/actionbutton": "^1.0.1",
"@spectrum-css/actiongroup": "^1.0.1",
"@spectrum-css/avatar": "^3.0.2",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/builder",
"version": "1.3.15-alpha.5",
"version": "1.3.15-alpha.7",
"license": "GPL-3.0",
"private": true,
"scripts": {
@ -69,10 +69,10 @@
}
},
"dependencies": {
"@budibase/bbui": "1.3.15-alpha.5",
"@budibase/client": "1.3.15-alpha.5",
"@budibase/frontend-core": "1.3.15-alpha.5",
"@budibase/string-templates": "1.3.15-alpha.5",
"@budibase/bbui": "1.3.15-alpha.7",
"@budibase/client": "1.3.15-alpha.7",
"@budibase/frontend-core": "1.3.15-alpha.7",
"@budibase/string-templates": "1.3.15-alpha.7",
"@sentry/browser": "5.19.1",
"@spectrum-css/page": "^3.0.1",
"@spectrum-css/vars": "^3.0.1",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/cli",
"version": "1.3.15-alpha.5",
"version": "1.3.15-alpha.7",
"description": "Budibase CLI, for developers, self hosting and migrations.",
"main": "src/index.js",
"bin": {
@ -26,9 +26,9 @@
"outputPath": "build"
},
"dependencies": {
"@budibase/backend-core": "1.3.15-alpha.5",
"@budibase/string-templates": "1.3.15-alpha.5",
"@budibase/types": "1.3.15-alpha.5",
"@budibase/backend-core": "1.3.15-alpha.7",
"@budibase/string-templates": "1.3.15-alpha.7",
"@budibase/types": "1.3.15-alpha.7",
"axios": "0.21.2",
"chalk": "4.1.0",
"cli-progress": "3.11.2",

View File

@ -1 +1,2 @@
process.env.NO_JS = "1"
process.env.JS_BCRYPT = "1"

View File

@ -7,7 +7,7 @@ const { PLUGIN_TYPE_ARR } = require("@budibase/types")
const { validate } = require("@budibase/backend-core/plugins")
const { runPkgCommand } = require("../exec")
const { join } = require("path")
const { success, error, info } = require("../utils")
const { success, error, info, moveDirectory } = require("../utils")
function checkInPlugin() {
if (!fs.existsSync("package.json")) {
@ -22,6 +22,24 @@ function checkInPlugin() {
}
}
async function askAboutTopLevel(name) {
const files = fs.readdirSync(process.cwd())
// we are in an empty git repo, don't ask
if (files.find(file => file === ".git")) {
return false
} else {
console.log(
info(`By default the plugin will be created in the directory "${name}"`)
)
console.log(
info(
"if you are already in an empty directory, such as a new Git repo, you can disable this functionality."
)
)
return questions.confirmation("Create top level directory?")
}
}
async function init(opts) {
const type = opts["init"] || opts
if (!type || !PLUGIN_TYPE_ARR.includes(type)) {
@ -45,14 +63,21 @@ async function init(opts) {
`An amazing Budibase ${type}!`
)
const version = await questions.string("Version", "1.0.0")
const topLevel = await askAboutTopLevel(name)
// get the skeleton
console.log(info("Retrieving project..."))
await getSkeleton(type, name)
await fleshOutSkeleton(type, name, desc, version)
console.log(info("Installing dependencies..."))
await runPkgCommand("install", join(process.cwd(), name))
// if no parent directory desired move to cwd
if (!topLevel) {
moveDirectory(name, process.cwd())
console.log(info(`Plugin created in current directory.`))
} else {
console.log(info(`Plugin created in directory "${name}"`))
}
}
async function verify() {
// will throw errors if not acceptable

View File

@ -27,7 +27,10 @@ function checkForBinaries() {
}
function cleanup(evt) {
if (evt && evt.errno) {
if (!isNaN(evt)) {
return
}
if (evt) {
console.error(
error(
"Failed to run CLI command - please report with the following message:"

View File

@ -3,6 +3,7 @@ const fs = require("fs")
const axios = require("axios")
const path = require("path")
const progress = require("cli-progress")
const { join } = require("path")
exports.downloadFile = async (url, filePath) => {
filePath = path.resolve(filePath)
@ -67,3 +68,19 @@ exports.progressBar = total => {
exports.checkSlashesInUrl = url => {
return url.replace(/(https?:\/\/)|(\/)+/g, "$1$2")
}
exports.moveDirectory = (oldPath, newPath) => {
const files = fs.readdirSync(oldPath)
// check any file exists already
for (let file of files) {
if (fs.existsSync(join(newPath, file))) {
throw new Error(
"Unable to remove top level directory - some skeleton files already exist."
)
}
}
for (let file of files) {
fs.renameSync(join(oldPath, file), join(newPath, file))
}
fs.rmdirSync(oldPath)
}

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/client",
"version": "1.3.15-alpha.5",
"version": "1.3.15-alpha.7",
"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.3.15-alpha.5",
"@budibase/frontend-core": "1.3.15-alpha.5",
"@budibase/string-templates": "1.3.15-alpha.5",
"@budibase/bbui": "1.3.15-alpha.7",
"@budibase/frontend-core": "1.3.15-alpha.7",
"@budibase/string-templates": "1.3.15-alpha.7",
"@spectrum-css/button": "^3.0.3",
"@spectrum-css/card": "^3.0.3",
"@spectrum-css/divider": "^1.0.3",

View File

@ -1,12 +1,12 @@
{
"name": "@budibase/frontend-core",
"version": "1.3.15-alpha.5",
"version": "1.3.15-alpha.7",
"description": "Budibase frontend core libraries used in builder and client",
"author": "Budibase",
"license": "MPL-2.0",
"svelte": "src/index.js",
"dependencies": {
"@budibase/bbui": "1.3.15-alpha.5",
"@budibase/bbui": "1.3.15-alpha.7",
"lodash": "^4.17.21",
"svelte": "^3.46.2"
}

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/server",
"email": "hi@budibase.com",
"version": "1.3.15-alpha.5",
"version": "1.3.15-alpha.7",
"description": "Budibase Web Server",
"main": "src/index.ts",
"repository": {
@ -77,11 +77,11 @@
"license": "GPL-3.0",
"dependencies": {
"@apidevtools/swagger-parser": "10.0.3",
"@budibase/backend-core": "1.3.15-alpha.5",
"@budibase/client": "1.3.15-alpha.5",
"@budibase/pro": "1.3.15-alpha.5",
"@budibase/string-templates": "1.3.15-alpha.5",
"@budibase/types": "1.3.15-alpha.5",
"@budibase/backend-core": "1.3.15-alpha.7",
"@budibase/client": "1.3.15-alpha.7",
"@budibase/pro": "1.3.15-alpha.7",
"@budibase/string-templates": "1.3.15-alpha.7",
"@budibase/types": "1.3.15-alpha.7",
"@bull-board/api": "3.7.0",
"@bull-board/koa": "3.9.4",
"@elastic/elasticsearch": "7.10.0",

View File

@ -1094,16 +1094,17 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@1.3.15-alpha.5":
version "1.3.15-alpha.5"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.15-alpha.5.tgz#667233d65d6e2811ef97b77608770bd8def53670"
integrity sha512-bPt1wFQDbrcsrMsUPXqwNoe8mNgwZqnD4eDUmnKocUIy6EZJDiGoQ6qHz+y1NGZR/SORrP/QdFCsBPw1oixGfA==
"@budibase/backend-core@1.3.15-alpha.7":
version "1.3.15-alpha.7"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.15-alpha.7.tgz#322e842c9371c807f89b71ee2aed4ab4479b6d27"
integrity sha512-eymmLjHhEzBQEztmVRqLpAw4YzZ4xDBAtA1lnJ50AZs/ZlHE+W4BR6LX2jGvIhYK2QDGbNQtXDzkut+0Sacj0w==
dependencies:
"@budibase/types" "1.3.15-alpha.5"
"@budibase/types" "1.3.15-alpha.7"
"@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
bcrypt "5.0.1"
bcryptjs "2.4.3"
dotenv "16.0.1"
emitter-listener "1.1.2"
ioredis "4.28.0"
@ -1179,13 +1180,13 @@
svelte-flatpickr "^3.2.3"
svelte-portal "^1.0.0"
"@budibase/pro@1.3.15-alpha.5":
version "1.3.15-alpha.5"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.15-alpha.5.tgz#6faad4cead27c65bfb52cbf9cda3bc55618e8c66"
integrity sha512-czMMfxM8p+toG18C++2qu2V1qiluwYGvij/v3gJFPu/HMEM3pD/eng84M2AgPCQTJunkknCFoi0fy/N9nIa4KQ==
"@budibase/pro@1.3.15-alpha.7":
version "1.3.15-alpha.7"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.15-alpha.7.tgz#3743a26fb99d58070c8ab2741ee912a4d973baf7"
integrity sha512-RerlV0A6wSU3mSOtY5ET4WR5Qaga1WNfUeG8Lqzx3z09vC23YuB0qvpadpKoUKUanzCyprrU4zBrLED8973stQ==
dependencies:
"@budibase/backend-core" "1.3.15-alpha.5"
"@budibase/types" "1.3.15-alpha.5"
"@budibase/backend-core" "1.3.15-alpha.7"
"@budibase/types" "1.3.15-alpha.7"
"@koa/router" "8.0.8"
joi "17.6.0"
node-fetch "^2.6.1"
@ -1208,10 +1209,10 @@
svelte-apexcharts "^1.0.2"
svelte-flatpickr "^3.1.0"
"@budibase/types@1.3.15-alpha.5":
version "1.3.15-alpha.5"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.15-alpha.5.tgz#fa5da711f8b026e1dd4edcc38e0d40e2d4a76352"
integrity sha512-H8JCIKIGS/ybrogPuZtu49vhI/oMZ8dqRIBoRx1evxtehV7BEkHeDSSduHsX/qsUtpfw1ZyPb6aWO6RHLbRSFg==
"@budibase/types@1.3.15-alpha.7":
version "1.3.15-alpha.7"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.15-alpha.7.tgz#c69a38194786ea66a2c6137aa961292902472ee9"
integrity sha512-9XW5Qr0FxXRO5rC1SlwS8dcDDPYGEG5+tJcrQ0gzk+5uzQfYIB/crhB0z++9vAwkBEm09XKbjBvdf4w5haEi2w==
"@bull-board/api@3.7.0":
version "3.7.0"

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/string-templates",
"version": "1.3.15-alpha.5",
"version": "1.3.15-alpha.7",
"description": "Handlebars wrapper for Budibase templating.",
"main": "src/index.cjs",
"module": "dist/bundle.mjs",

View File

@ -1,6 +1,6 @@
{
"name": "@budibase/types",
"version": "1.3.15-alpha.5",
"version": "1.3.15-alpha.7",
"description": "Budibase types",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -1,7 +1,7 @@
{
"name": "@budibase/worker",
"email": "hi@budibase.com",
"version": "1.3.15-alpha.5",
"version": "1.3.15-alpha.7",
"description": "Budibase background service",
"main": "src/index.ts",
"repository": {
@ -35,10 +35,10 @@
"author": "Budibase",
"license": "GPL-3.0",
"dependencies": {
"@budibase/backend-core": "1.3.15-alpha.5",
"@budibase/pro": "1.3.15-alpha.5",
"@budibase/string-templates": "1.3.15-alpha.5",
"@budibase/types": "1.3.15-alpha.5",
"@budibase/backend-core": "1.3.15-alpha.7",
"@budibase/pro": "1.3.15-alpha.7",
"@budibase/string-templates": "1.3.15-alpha.7",
"@budibase/types": "1.3.15-alpha.7",
"@koa/router": "8.0.8",
"@sentry/node": "6.17.7",
"@techpass/passport-openidconnect": "0.3.2",

View File

@ -291,16 +291,17 @@
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
"@budibase/backend-core@1.3.15-alpha.5":
version "1.3.15-alpha.5"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.15-alpha.5.tgz#667233d65d6e2811ef97b77608770bd8def53670"
integrity sha512-bPt1wFQDbrcsrMsUPXqwNoe8mNgwZqnD4eDUmnKocUIy6EZJDiGoQ6qHz+y1NGZR/SORrP/QdFCsBPw1oixGfA==
"@budibase/backend-core@1.3.15-alpha.7":
version "1.3.15-alpha.7"
resolved "https://registry.yarnpkg.com/@budibase/backend-core/-/backend-core-1.3.15-alpha.7.tgz#322e842c9371c807f89b71ee2aed4ab4479b6d27"
integrity sha512-eymmLjHhEzBQEztmVRqLpAw4YzZ4xDBAtA1lnJ50AZs/ZlHE+W4BR6LX2jGvIhYK2QDGbNQtXDzkut+0Sacj0w==
dependencies:
"@budibase/types" "1.3.15-alpha.5"
"@budibase/types" "1.3.15-alpha.7"
"@shopify/jest-koa-mocks" "5.0.1"
"@techpass/passport-openidconnect" "0.3.2"
aws-sdk "2.1030.0"
bcrypt "5.0.1"
bcryptjs "2.4.3"
dotenv "16.0.1"
emitter-listener "1.1.2"
ioredis "4.28.0"
@ -326,21 +327,21 @@
uuid "8.3.2"
zlib "1.0.5"
"@budibase/pro@1.3.15-alpha.5":
version "1.3.15-alpha.5"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.15-alpha.5.tgz#6faad4cead27c65bfb52cbf9cda3bc55618e8c66"
integrity sha512-czMMfxM8p+toG18C++2qu2V1qiluwYGvij/v3gJFPu/HMEM3pD/eng84M2AgPCQTJunkknCFoi0fy/N9nIa4KQ==
"@budibase/pro@1.3.15-alpha.7":
version "1.3.15-alpha.7"
resolved "https://registry.yarnpkg.com/@budibase/pro/-/pro-1.3.15-alpha.7.tgz#3743a26fb99d58070c8ab2741ee912a4d973baf7"
integrity sha512-RerlV0A6wSU3mSOtY5ET4WR5Qaga1WNfUeG8Lqzx3z09vC23YuB0qvpadpKoUKUanzCyprrU4zBrLED8973stQ==
dependencies:
"@budibase/backend-core" "1.3.15-alpha.5"
"@budibase/types" "1.3.15-alpha.5"
"@budibase/backend-core" "1.3.15-alpha.7"
"@budibase/types" "1.3.15-alpha.7"
"@koa/router" "8.0.8"
joi "17.6.0"
node-fetch "^2.6.1"
"@budibase/types@1.3.15-alpha.5":
version "1.3.15-alpha.5"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.15-alpha.5.tgz#fa5da711f8b026e1dd4edcc38e0d40e2d4a76352"
integrity sha512-H8JCIKIGS/ybrogPuZtu49vhI/oMZ8dqRIBoRx1evxtehV7BEkHeDSSduHsX/qsUtpfw1ZyPb6aWO6RHLbRSFg==
"@budibase/types@1.3.15-alpha.7":
version "1.3.15-alpha.7"
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-1.3.15-alpha.7.tgz#c69a38194786ea66a2c6137aa961292902472ee9"
integrity sha512-9XW5Qr0FxXRO5rC1SlwS8dcDDPYGEG5+tJcrQ0gzk+5uzQfYIB/crhB0z++9vAwkBEm09XKbjBvdf4w5haEi2w==
"@cspotcode/source-map-consumer@0.8.0":
version "0.8.0"