client lib tests

This commit is contained in:
Martin McKeaveney 2020-05-07 13:33:25 +01:00
parent 0ec47971d0
commit 16ec3719ea
12 changed files with 861 additions and 26 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

BIN
packages/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -29,12 +29,9 @@ export const loadBudibase = async opts => {
// let { appRootPath } = frontendDefinition; // let { appRootPath } = frontendDefinition;
// appRootPath = appRootPath === "" ? "" : "/" + trimSlash(appRootPatl) // appRootPath = appRootPath === "" ? "" : "/" + trimSlash(appRootPatl)
const componentLibraryModules = {} const componentLibraryModules = opts.componentLibraries || {}
const libraries = frontendDefinition.libraries || [ const libraries = frontendDefinition.libraries || []
"@budibase/standard-components",
"@budibase/materialdesign-components",
]
for (let library of libraries) { for (let library of libraries) {
// fetch the JavaScript for the component libraries from the server // fetch the JavaScript for the component libraries from the server

View File

@ -1,4 +1,4 @@
import { split, last } from "lodash/fp" import { split, last, compose } from "lodash/fp"
import { prepareRenderComponent } from "./prepareRenderComponent" import { prepareRenderComponent } from "./prepareRenderComponent"
import { isScreenSlot } from "./builtinComponents" import { isScreenSlot } from "./builtinComponents"
import deepEqual from "deep-equal" import deepEqual from "deep-equal"

BIN
packages/server/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -7,3 +7,4 @@ myapps/
!/builder/nano.min.css !/builder/nano.min.css
public/ public/
db/dev.db/ db/dev.db/
dist

View File

@ -4,7 +4,7 @@ const router = require("./api")
const koaBody = require("koa-body") const koaBody = require("koa-body")
const app = new Koa() const app = new Koa()
module.exports = async () => { module.exports = () => {
app.keys = Object.keys(process.env) app.keys = Object.keys(process.env)
.filter(k => k.startsWith("COOKIE_KEY_")) .filter(k => k.startsWith("COOKIE_KEY_"))
.map(k => process.env[k]) .map(k => process.env[k])

BIN
packages/server/build/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,11 @@
const { app, BrowserWindow } = require('electron');
require("dotenv").config()
function createWindow() {
app.server = require("./app")();
let win = new BrowserWindow({ width: 1920, height: 1080 });
win.loadURL('http://localhost:4001');
}
app.whenReady().then(createWindow)

View File

@ -7,10 +7,10 @@
"test": "jest apps && jest builder", "test": "jest apps && jest builder",
"test:integration": "jest neo --runInBand", "test:integration": "jest neo --runInBand",
"test:watch": "jest -w", "test:watch": "jest -w",
"build": "",
"initialise": "node ../cli/bin/budi init ./myapps -b local -q", "initialise": "node ../cli/bin/budi init ./myapps -b local -q",
"budi": "node ../cli/bin/budi", "budi": "node ../cli/bin/budi",
"dev:builder": "nodemon index" "dev:builder": "nodemon index",
"electron": "electron electron.js"
}, },
"keywords": [ "keywords": [
"budibase" "budibase"
@ -44,6 +44,8 @@
}, },
"devDependencies": { "devDependencies": {
"@jest/test-sequencer": "^24.8.0", "@jest/test-sequencer": "^24.8.0",
"electron": "^8.2.5",
"electron-builder": "^22.6.0",
"jest": "^24.8.0", "jest": "^24.8.0",
"nodemon": "^2.0.2", "nodemon": "^2.0.2",
"server-destroy": "^1.0.1", "server-destroy": "^1.0.1",

File diff suppressed because it is too large Load Diff