1
0
Fork 0
mirror of synced 2024-07-02 13:01:09 +12:00

fixing CI

This commit is contained in:
Martin McKeaveney 2020-05-18 11:18:31 +01:00
parent 3c9af5336e
commit 5cd218da02
8 changed files with 14 additions and 26 deletions

View file

@ -21,6 +21,7 @@
} }
], ],
"rules": { "rules": {
"prettier/prettier": "error" "prettier/prettier": "error",
"no-self-assign": "off"
} }
} }

View file

@ -251,12 +251,12 @@ const renameScreen = store => (oldname, newname) => {
const savePage = store => async page => { const savePage = store => async page => {
store.update(state => { store.update(state => {
if (s.currentFrontEndType !== "page" || !s.currentPageName) { if (state.currentFrontEndType !== "page" || !state.currentPageName) {
return state return state
} }
s.pages[s.currentPageName] = page state.pages[state.currentPageName] = page
_savePage(s) _savePage(state)
return state return state
}) })
} }
@ -271,7 +271,9 @@ const addStylesheet = store => stylesheet => {
const removeStylesheet = store => stylesheet => { const removeStylesheet = store => stylesheet => {
store.update(state => { store.update(state => {
state.pages.stylesheets = s.pages.stylesheets.filter(s => s !== stylesheet) state.pages.stylesheets = state.pages.stylesheets.filter(
s => s !== stylesheet
)
_savePage(state) _savePage(state)
return state return state
}) })
@ -446,7 +448,7 @@ const setComponentCode = store => code => {
// save without messing with the store // save without messing with the store
_saveScreenApi(state.currentPreviewItem, state) _saveScreenApi(state.currentPreviewItem, state)
return s return state
}) })
} }

View file

@ -32,8 +32,8 @@ export default ({
text-transform: uppercase; text-transform: uppercase;
font-weight: bold; font-weight: bold;
} }
<\/style> </style>
<\script> <script>
window["##BUDIBASE_FRONTEND_DEFINITION##"] = ${frontendDefinition}; window["##BUDIBASE_FRONTEND_DEFINITION##"] = ${frontendDefinition};
window["##BUDIBASE_FRONTEND_FUNCTIONS##"] = ${currentPageFunctions}; window["##BUDIBASE_FRONTEND_FUNCTIONS##"] = ${currentPageFunctions};
@ -41,7 +41,7 @@ export default ({
.then(module => { .then(module => {
module.loadBudibase({ window, localStorage }); module.loadBudibase({ window, localStorage });
}) })
<\/script> </script>
</head> </head>
<body> <body>
</body> </body>

View file

@ -29,15 +29,6 @@ describe("createDefaultProps", () => {
expect(props._component).toBe("some_component") expect(props._component).toBe("some_component")
}) })
it("should return error when component name not supplied", () => {
const comp = getcomponent()
comp.name = ""
const { errors } = createProps(comp)
expect(errors.length).toEqual(1)
})
it("should create a object with single blank string value, when prop definition is 'string' ", () => { it("should create a object with single blank string value, when prop definition is 'string' ", () => {
const comp = getcomponent() const comp = getcomponent()
comp.props.fieldName = "string" comp.props.fieldName = "string"

View file

@ -11,9 +11,6 @@
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"scripts": {
"test": "test"
},
"keywords": [ "keywords": [
"budibase" "budibase"
], ],

View file

@ -2,9 +2,6 @@
"name": "name", "name": "name",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {

View file

@ -39,7 +39,7 @@ exports.create = async function(ctx) {
ctx.body = newModel ctx.body = newModel
} }
exports.update = async function(ctx) {} exports.update = async function() {}
exports.destroy = async function(ctx) { exports.destroy = async function(ctx) {
const db = new CouchDB(ctx.params.instanceId) const db = new CouchDB(ctx.params.instanceId)

View file

@ -1,7 +1,7 @@
const CouchDB = require("../../db") const CouchDB = require("../../db")
const controller = { const controller = {
query: async ctx => {}, query: async () => {},
fetch: async ctx => { fetch: async ctx => {
const db = new CouchDB(ctx.params.instanceId) const db = new CouchDB(ctx.params.instanceId)
const designDoc = await db.get("_design/database") const designDoc = await db.get("_design/database")