diff --git a/.eslintrc.json b/.eslintrc.json
index 2d9ab315a3..5c12e7c29c 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -21,6 +21,7 @@
}
],
"rules": {
- "prettier/prettier": "error"
+ "prettier/prettier": "error",
+ "no-self-assign": "off"
}
}
\ No newline at end of file
diff --git a/packages/builder/src/App.svelte b/packages/builder/src/App.svelte
index de64d43249..86c7580a56 100644
--- a/packages/builder/src/App.svelte
+++ b/packages/builder/src/App.svelte
@@ -29,4 +29,3 @@
-
diff --git a/packages/builder/src/builderStore/store/backend.js b/packages/builder/src/builderStore/store/backend.js
index e925c04e8d..62ebd39682 100644
--- a/packages/builder/src/builderStore/store/backend.js
+++ b/packages/builder/src/builderStore/store/backend.js
@@ -80,4 +80,4 @@ export const createDatabaseForApp = store => appInstance => {
state.appInstances.push(appInstance)
return state
})
-}
\ No newline at end of file
+}
diff --git a/packages/builder/src/builderStore/store/index.js b/packages/builder/src/builderStore/store/index.js
index 5adb1b88f3..a8315918ba 100644
--- a/packages/builder/src/builderStore/store/index.js
+++ b/packages/builder/src/builderStore/store/index.js
@@ -1,5 +1,5 @@
import { cloneDeep, values } from "lodash/fp"
-import { backendUiStore } from "builderStore";
+import { backendUiStore } from "builderStore"
import * as backendStoreActions from "./backend"
import { writable, get } from "svelte/store"
import api from "../api"
@@ -11,10 +11,7 @@ import {
makePropsSafe,
getBuiltin,
} from "components/userInterface/pagesParsing/createProps"
-import {
- fetchComponentLibModules,
- fetchComponentLibDefinitions,
-} from "../loadComponentLibraries"
+import { fetchComponentLibDefinitions } from "../loadComponentLibraries"
import { buildCodeForScreens } from "../buildCodeForScreens"
import { generate_screen_css } from "../generate_css"
import { insertCodeMetadata } from "../insertCodeMetadata"
@@ -93,7 +90,7 @@ const setPackage = (store, initial) => async pkg => {
},
}
- initial.libraries = await fetchComponentLibModules(pkg.application)
+ initial.libraries = pkg.application.componentLibraries
initial.components = await fetchComponentLibDefinitions(pkg.application._id)
initial.appname = pkg.application.name
initial.appId = pkg.application._id
@@ -194,7 +191,7 @@ const setCurrentScreen = store => screenName => {
const deleteScreen = store => name => {
store.update(s => {
const components = s.components.filter(c => c.name !== name)
- const screens = s.screens.filter(c => c.name !== name);
+ const screens = s.screens.filter(c => c.name !== name)
s.components = components
s.screens = screens
@@ -251,12 +248,12 @@ const renameScreen = store => (oldname, newname) => {
const savePage = store => async page => {
store.update(state => {
- if (s.currentFrontEndType !== "page" || !s.currentPageName) {
+ if (state.currentFrontEndType !== "page" || !state.currentPageName) {
return state
}
- s.pages[s.currentPageName] = page
- _savePage(s)
+ state.pages[state.currentPageName] = page
+ _savePage(state)
return state
})
}
@@ -271,7 +268,9 @@ const addStylesheet = store => stylesheet => {
const removeStylesheet = store => stylesheet => {
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)
return state
})
@@ -351,12 +350,16 @@ const addChildComponent = store => (componentToAdd, presetName) => {
const presetProps = presetName ? component.presets[presetName] : {}
- const instanceId = get(backendUiStore).selectedDatabase._id;
+ const instanceId = get(backendUiStore).selectedDatabase._id
- const newComponent = createProps(component, {
- ...presetProps,
- _instanceId: instanceId
- }, state)
+ const newComponent = createProps(
+ component,
+ {
+ ...presetProps,
+ _instanceId: instanceId,
+ },
+ state
+ )
state.currentComponentInfo._children = state.currentComponentInfo._children.concat(
newComponent.props
@@ -442,7 +445,7 @@ const setComponentCode = store => code => {
// save without messing with the store
_saveScreenApi(state.currentPreviewItem, state)
- return s
+ return state
})
}
diff --git a/packages/builder/src/components/database/ModelDataTable/modals/CreateDatabase.svelte b/packages/builder/src/components/database/ModelDataTable/modals/CreateDatabase.svelte
index ec03a77247..b9208b15a3 100644
--- a/packages/builder/src/components/database/ModelDataTable/modals/CreateDatabase.svelte
+++ b/packages/builder/src/components/database/ModelDataTable/modals/CreateDatabase.svelte
@@ -9,10 +9,7 @@
let databaseName
async function createDatabase() {
- const response = await api.createDatabase(
- $store.appId,
- databaseName
- )
+ const response = await api.createDatabase($store.appId, databaseName)
store.createDatabaseForApp(response)
onClosed()
}
diff --git a/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte b/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte
index 7ece231cf7..02aa072910 100644
--- a/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte
+++ b/packages/builder/src/components/userInterface/AppPreview/CurrentItemPreview.svelte
@@ -46,7 +46,7 @@
$: frontendDefinition = {
appId: $store.appId,
- libraries: Object.keys($store.libraries),
+ libraries: $store.libraries,
page: $store.currentPreviewItem,
screens: screensExist
? $store.currentPreviewItem._screens
diff --git a/packages/builder/src/components/userInterface/AppPreview/iframeTemplate.js b/packages/builder/src/components/userInterface/AppPreview/iframeTemplate.js
index 57ae0a71c2..3c774cc4b8 100644
--- a/packages/builder/src/components/userInterface/AppPreview/iframeTemplate.js
+++ b/packages/builder/src/components/userInterface/AppPreview/iframeTemplate.js
@@ -32,8 +32,8 @@ export default ({
text-transform: uppercase;
font-weight: bold;
}
- <\/style>
- <\script>
+
+
diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte
index da4834a429..10628b09a1 100644
--- a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte
+++ b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte
@@ -36,11 +36,6 @@
sortBy("title"),
])
- const isScreenSelected = component =>
- component.component &&
- $store.currentPreviewItem &&
- component.component.name === $store.currentPreviewItem.name
-
const confirmDeleteComponent = component => {
componentToDelete = component
confirmDeleteDialog.show()
diff --git a/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte b/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte
index 09f7af7c81..684d400399 100644
--- a/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte
+++ b/packages/builder/src/components/userInterface/EventsEditor/EventEditorModal.svelte
@@ -1,5 +1,5 @@
@@ -28,7 +27,7 @@
- {:else if type === 'colour'}
-
{:else}
{/if}
diff --git a/packages/builder/src/components/userInterface/pagesParsing/createProps.js b/packages/builder/src/components/userInterface/pagesParsing/createProps.js
index efca014490..c37e05e023 100644
--- a/packages/builder/src/components/userInterface/pagesParsing/createProps.js
+++ b/packages/builder/src/components/userInterface/pagesParsing/createProps.js
@@ -25,7 +25,7 @@ export const createProps = (componentDefinition, derivedFromProps) => {
_id: uuid(),
_component: componentDefinition._component,
_styles: { position: {}, layout: {} },
- _code: ""
+ _code: "",
}
const errors = []
diff --git a/packages/builder/src/components/userInterface/pagesParsing/types.js b/packages/builder/src/components/userInterface/pagesParsing/types.js
index fe49d31727..cb8d542e32 100644
--- a/packages/builder/src/components/userInterface/pagesParsing/types.js
+++ b/packages/builder/src/components/userInterface/pagesParsing/types.js
@@ -20,7 +20,7 @@ export const TYPE_MAP = {
"##bbstate": "",
},
},
- models: {
+ models: {
default: [],
- }
+ },
}
diff --git a/packages/builder/src/main.js b/packages/builder/src/main.js
index 77dcc4e172..eb1357fde2 100644
--- a/packages/builder/src/main.js
+++ b/packages/builder/src/main.js
@@ -1,6 +1,6 @@
import "./global.css"
import "./fonts.css"
-import "./budibase.css";
+import "./budibase.css"
import "/assets/roboto-v20-latin-ext_latin-300"
import "/assets/roboto-v20-latin-ext_latin-400"
import "/assets/roboto-v20-latin-ext_latin-500"
diff --git a/packages/builder/tests/createProps.spec.js b/packages/builder/tests/createProps.spec.js
index c4e4d80298..269ab8156a 100644
--- a/packages/builder/tests/createProps.spec.js
+++ b/packages/builder/tests/createProps.spec.js
@@ -29,15 +29,6 @@ describe("createDefaultProps", () => {
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' ", () => {
const comp = getcomponent()
comp.props.fieldName = "string"
diff --git a/packages/cli/package.json b/packages/cli/package.json
index 4abc9ec99d..768402cc2b 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -11,9 +11,6 @@
"publishConfig": {
"access": "public"
},
- "scripts": {
- "test": "test"
- },
"keywords": [
"budibase"
],
diff --git a/packages/cli/src/commands/new/appDirectoryTemplate/package.json b/packages/cli/src/commands/new/appDirectoryTemplate/package.json
index 9828683df7..f49e35d23f 100644
--- a/packages/cli/src/commands/new/appDirectoryTemplate/package.json
+++ b/packages/cli/src/commands/new/appDirectoryTemplate/package.json
@@ -2,9 +2,6 @@
"name": "name",
"version": "1.0.0",
"description": "",
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
"author": "",
"license": "ISC",
"dependencies": {
diff --git a/packages/client/src/index.js b/packages/client/src/index.js
index b84e9172e4..0bb762d54a 100644
--- a/packages/client/src/index.js
+++ b/packages/client/src/index.js
@@ -15,7 +15,7 @@ export const loadBudibase = async opts => {
// TODO: update
const user = {}
- const componentLibraryModules = opts && opts.componentLibraries || {}
+ const componentLibraryModules = (opts && opts.componentLibraries) || {}
const libraries = frontendDefinition.libraries || []
diff --git a/packages/server/src/api/controllers/application.js b/packages/server/src/api/controllers/application.js
index 8160e4a5bf..b79ca0e581 100644
--- a/packages/server/src/api/controllers/application.js
+++ b/packages/server/src/api/controllers/application.js
@@ -37,6 +37,7 @@ exports.create = async function(ctx) {
const { rev } = await db.post(newApplication)
newApplication._rev = rev
+
ctx.body = newApplication
ctx.message = `Application ${ctx.request.body.name} created successfully`
}
diff --git a/packages/server/src/api/controllers/instance.js b/packages/server/src/api/controllers/instance.js
index 19edf53293..dcfc1ba2dc 100644
--- a/packages/server/src/api/controllers/instance.js
+++ b/packages/server/src/api/controllers/instance.js
@@ -6,7 +6,7 @@ const env = require("../../environment")
exports.create = async function(ctx) {
const instanceName = ctx.request.body.name
const uid = uuid.v4().replace(/-/g, "")
- const instanceId = `inst_${ctx.params.applicationId.substring(0,7)}_${uid}`
+ const instanceId = `inst_${ctx.params.applicationId.substring(0, 7)}_${uid}`
const { applicationId } = ctx.params
const clientId = env.CLIENT_ID
const db = new CouchDB(instanceId)
diff --git a/packages/server/src/api/controllers/model.js b/packages/server/src/api/controllers/model.js
index 5eba25d059..4a97cf97aa 100644
--- a/packages/server/src/api/controllers/model.js
+++ b/packages/server/src/api/controllers/model.js
@@ -39,7 +39,7 @@ exports.create = async function(ctx) {
ctx.body = newModel
}
-exports.update = async function(ctx) {}
+exports.update = async function() {}
exports.destroy = async function(ctx) {
const db = new CouchDB(ctx.params.instanceId)
diff --git a/packages/server/src/api/controllers/view.js b/packages/server/src/api/controllers/view.js
index 64d3c3b98d..8456837c6a 100644
--- a/packages/server/src/api/controllers/view.js
+++ b/packages/server/src/api/controllers/view.js
@@ -1,7 +1,7 @@
const CouchDB = require("../../db")
const controller = {
- query: async ctx => {},
+ query: async () => {},
fetch: async ctx => {
const db = new CouchDB(ctx.params.instanceId)
const designDoc = await db.get("_design/database")
diff --git a/packages/server/src/api/index.js b/packages/server/src/api/index.js
index 2e3cd87b45..86b885bdcd 100644
--- a/packages/server/src/api/index.js
+++ b/packages/server/src/api/index.js
@@ -30,6 +30,7 @@ router
deflate: {
flush: zlib.Z_SYNC_FLUSH,
},
+ br: false,
})
)
.use(async (ctx, next) => {
diff --git a/packages/server/src/api/routes/client.js b/packages/server/src/api/routes/client.js
index c12b9e14e1..ff87b82e22 100644
--- a/packages/server/src/api/routes/client.js
+++ b/packages/server/src/api/routes/client.js
@@ -1,15 +1,8 @@
const Router = require("@koa/router")
const controller = require("../controllers/client")
-const env = require("../../environment")
const router = Router()
router.get("/api/client/id", controller.getClientId)
-if (env.NODE_ENV === "jest") {
- router
- .post("/api/client", controller.create)
- .delete("/api/client", controller.destroy)
-}
-
module.exports = router
diff --git a/packages/server/src/api/routes/tests/application.spec.js b/packages/server/src/api/routes/tests/application.spec.js
index 3619b59477..4e6766f71c 100644
--- a/packages/server/src/api/routes/tests/application.spec.js
+++ b/packages/server/src/api/routes/tests/application.spec.js
@@ -15,11 +15,11 @@ describe("/applications", () => {
});
beforeEach(async () => {
- await createClientDatabase(request)
+ await createClientDatabase()
})
afterEach(async () => {
- await destroyClientDatabase(request)
+ await destroyClientDatabase()
})
afterAll(async () => {
diff --git a/packages/server/src/api/routes/tests/client.spec.js b/packages/server/src/api/routes/tests/client.spec.js
deleted file mode 100644
index 1652905698..0000000000
--- a/packages/server/src/api/routes/tests/client.spec.js
+++ /dev/null
@@ -1,48 +0,0 @@
-const {
- createClientDatabase,
- destroyClientDatabase,
- supertest,
-} = require("./couchTestUtils")
-
-const CLIENT_ID = "test-client-id"
-
-describe("/clients", () => {
- let request;
- let server;
-
- beforeEach(async () => {
- ({ request, server } = await supertest())
- });
-
- afterEach(async () => {
- server.close();
- })
-
- describe("create", () => {
-
- it("returns a success message when the client database is successfully created", async () => {
- const res = await request
- .post("/api/client")
- .send({ clientId: "testing" })
- .set("Accept", "application/json")
- .expect(200)
-
- expect(res.res.statusMessage).toEqual(`Client Database ${process.env.CLIENT_ID} successfully provisioned.`);
- })
- });
-
- describe("destroy", () => {
- beforeEach(async () => {
- db = await createClientDatabase(request);
- });
-
- it("returns a success message when the client database is successfully destroyed", async () => {
- const res = await request
- .delete(`/api/client`)
- .set("Accept", "application/json")
- .expect(200)
- expect(res.res.statusMessage).toEqual(`Client Database ${process.env.CLIENT_ID} successfully deleted.`);
-
- })
- });
-});
diff --git a/packages/server/src/api/routes/tests/couchTestUtils.js b/packages/server/src/api/routes/tests/couchTestUtils.js
index eacb32b631..49c86065dc 100644
--- a/packages/server/src/api/routes/tests/couchTestUtils.js
+++ b/packages/server/src/api/routes/tests/couchTestUtils.js
@@ -1,7 +1,10 @@
const CouchDB = require("../../../db")
+const { create, destroy } = require("../../../db/clientDb")
const supertest = require("supertest")
const app = require("../../../app")
+const TEST_CLIENT_ID = "test-client-id"
+
exports.supertest = async () => {
let request
let port = 4002
@@ -11,9 +14,12 @@ exports.supertest = async () => {
try {
server = await app(port)
started = true
- } catch (e) {
- if (e.code === "EADDRINUSE") port = port + 1
- else throw e
+ } catch (err) {
+ if (err.code === "EADDRINUSE") {
+ port = port + 1
+ } else {
+ throw err
+ }
}
}
@@ -45,13 +51,7 @@ exports.createModel = async (request, instanceId, model) => {
return res.body
}
-exports.createClientDatabase = async request => {
- const res = await request
- .post("/api/client")
- .set(exports.defaultHeaders)
- .send({})
- return res.body
-}
+exports.createClientDatabase = async () => await create(TEST_CLIENT_ID)
exports.createApplication = async (request, name = "test_application") => {
const res = await request
@@ -63,12 +63,7 @@ exports.createApplication = async (request, name = "test_application") => {
return res.body
}
-exports.destroyClientDatabase = async request => {
- await request
- .delete(`/api/client`)
- .set(exports.defaultHeaders)
- .send({})
-}
+exports.destroyClientDatabase = async () => await destroy(TEST_CLIENT_ID)
exports.createInstance = async (request, appId) => {
const res = await request
diff --git a/packages/server/src/db/client.js b/packages/server/src/db/client.js
index f2c090b564..182cd8e032 100644
--- a/packages/server/src/db/client.js
+++ b/packages/server/src/db/client.js
@@ -3,15 +3,22 @@ const allDbs = require("pouchdb-all-dbs")
const { budibaseAppsDir } = require("../utilities/budibaseDir")
const env = require("../environment")
-const COUCH_DB_URL = env.COUCH_DB_URL || `leveldb://${budibaseAppsDir().replace(/\\/g, "/")}/.data/`
+const COUCH_DB_URL = env.COUCH_DB_URL || `leveldb://${budibaseAppsDir()}/.data/`
const isInMemory = env.NODE_ENV === "jest"
-if (isInMemory) PouchDB.plugin(require("pouchdb-adapter-memory"))
+let POUCH_DB_DEFAULTS = {
+ prefix: COUCH_DB_URL,
+}
-const Pouch = PouchDB.defaults({
- prefix: isInMemory ? undefined : COUCH_DB_URL,
- adapter: isInMemory ? "memory" : undefined,
-})
+if (isInMemory) {
+ PouchDB.plugin(require("pouchdb-adapter-memory"))
+ POUCH_DB_DEFAULTS = {
+ prefix: undefined,
+ adapter: "memory",
+ }
+}
+
+const Pouch = PouchDB.defaults(POUCH_DB_DEFAULTS)
allDbs(Pouch)
diff --git a/packages/server/src/electron.js b/packages/server/src/electron.js
index b4bae9d706..51c67d4439 100644
--- a/packages/server/src/electron.js
+++ b/packages/server/src/electron.js
@@ -1,47 +1,46 @@
-const { app, BrowserWindow } = require("electron");
-const { join } = require("path");
-const { homedir } = require("os");
-const isDev = require("electron-is-dev");
-const { autoUpdater } = require("electron-updater");
-const unhandled = require("electron-unhandled");
+const { app, BrowserWindow } = require("electron")
+const { join } = require("path")
+const { homedir } = require("os")
+const isDev = require("electron-is-dev")
+const { autoUpdater } = require("electron-updater")
+const unhandled = require("electron-unhandled")
-require("dotenv").config({ path: join(homedir(), ".budibase", ".env") });
+require("dotenv").config({ path: join(homedir(), ".budibase", ".env") })
if (isDev) {
unhandled({
- showDialog: true
- });
+ showDialog: true,
+ })
}
-const APP_URL = "http://localhost:4001";
-const APP_TITLE = "Budibase Builder";
+const APP_URL = "http://localhost:4001"
+const APP_TITLE = "Budibase Builder"
let win
function createWindow() {
- app.server = require("./app");
- win = new BrowserWindow({ width: 1920, height: 1080 });
- win.setTitle(APP_TITLE);
- win.loadURL(APP_URL);
+ app.server = require("./app")
+ win = new BrowserWindow({ width: 1920, height: 1080 })
+ win.setTitle(APP_TITLE)
+ win.loadURL(APP_URL)
if (isDev) {
- win.webContents.openDevTools();
+ win.webContents.openDevTools()
} else {
- autoUpdater.checkForUpdatesAndNotify();
+ autoUpdater.checkForUpdatesAndNotify()
}
}
app.whenReady().then(createWindow)
-
// Quit when all windows are closed.
app.on("window-all-closed", () => {
- // On macOS it is common for applications and their menu bar
- // to stay active until the user quits explicitly with Cmd + Q
- if (process.platform !== "darwin") app.quit();
-});
+ // On macOS it is common for applications and their menu bar
+ // to stay active until the user quits explicitly with Cmd + Q
+ if (process.platform !== "darwin") app.quit()
+})
app.on("activate", () => {
- // On macOS it's common to re-create a window in the app when the
- // dock icon is clicked and there are no other windows open.
- if (win === null) createWindow();
-});
\ No newline at end of file
+ // On macOS it's common to re-create a window in the app when the
+ // dock icon is clicked and there are no other windows open.
+ if (win === null) createWindow()
+})
diff --git a/packages/server/src/utilities/builder/buildPage.js b/packages/server/src/utilities/builder/buildPage.js
index dc259dfd6e..0540fd064f 100644
--- a/packages/server/src/utilities/builder/buildPage.js
+++ b/packages/server/src/utilities/builder/buildPage.js
@@ -95,8 +95,8 @@ const buildFrontendAppDefinition = async (config, appId, pageName, pkg) => {
screens: pkg.screens,
libraries: [
"@budibase/materialdesign-components",
- "@budibase/standard-components"
- ]
+ "@budibase/standard-components",
+ ],
})
await writeFile(
diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock
index 4494630634..2bc0773828 100644
--- a/packages/server/yarn.lock
+++ b/packages/server/yarn.lock
@@ -194,20 +194,6 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"
-"@budibase/client@^0.0.32":
- version "0.0.32"
- resolved "https://registry.yarnpkg.com/@budibase/client/-/client-0.0.32.tgz#76d9f147563a0bf939eae7f32ce75b2a527ba496"
- integrity sha512-jmCCLn0CUoQbL6h623S5IqK6+GYLqX3WzUTZInSb1SCBOM3pI0eLP5HwTR6s7r42SfD0v9jTWRdyTnHiElNj8A==
- dependencies:
- "@nx-js/compiler-util" "^2.0.0"
- bcryptjs "^2.4.3"
- deep-equal "^2.0.1"
- lodash "^4.17.15"
- lunr "^2.3.5"
- regexparam "^1.3.0"
- shortid "^2.2.8"
- svelte "^3.9.2"
-
"@budibase/core@^0.0.32":
version "0.0.32"
resolved "https://registry.yarnpkg.com/@budibase/core/-/core-0.0.32.tgz#c5d9ab869c5e9596a1ac337aaf041e795b1cc7fa"
@@ -824,11 +810,6 @@ array-equal@^1.0.0:
resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93"
integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=
-array-filter@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83"
- integrity sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=
-
array-unique@^0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
@@ -896,13 +877,6 @@ atob@^2.1.2:
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
-available-typed-arrays@^1.0.0, available-typed-arrays@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz#6b098ca9d8039079ee3f77f7b783c4480ba513f5"
- integrity sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==
- dependencies:
- array-filter "^1.0.0"
-
aws-sign2@~0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
@@ -1608,26 +1582,6 @@ decompress-response@^3.3.0:
dependencies:
mimic-response "^1.0.0"
-deep-equal@^2.0.1:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.0.3.tgz#cad1c15277ad78a5c01c49c2dee0f54de8a6a7b0"
- integrity sha512-Spqdl4H+ky45I9ByyJtXteOm9CaIrPmnIPmOhrkKGNYWeDgCvJ8jNYVCTjChxW4FqGuZnLHADc8EKRMX6+CgvA==
- dependencies:
- es-abstract "^1.17.5"
- es-get-iterator "^1.1.0"
- is-arguments "^1.0.4"
- is-date-object "^1.0.2"
- is-regex "^1.0.5"
- isarray "^2.0.5"
- object-is "^1.1.2"
- object-keys "^1.1.1"
- object.assign "^4.1.0"
- regexp.prototype.flags "^1.3.0"
- side-channel "^1.0.2"
- which-boxed-primitive "^1.0.1"
- which-collection "^1.0.1"
- which-typed-array "^1.1.2"
-
deep-equal@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
@@ -1981,7 +1935,7 @@ error-inject@^1.0.0:
resolved "https://registry.yarnpkg.com/error-inject/-/error-inject-1.0.0.tgz#e2b3d91b54aed672f309d950d154850fa11d4f37"
integrity sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc=
-es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.4, es-abstract@^1.17.5:
+es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.5:
version "1.17.5"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.5.tgz#d8c9d1d66c8981fb9200e2251d799eee92774ae9"
integrity sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==
@@ -1998,19 +1952,6 @@ es-abstract@^1.17.0-next.1, es-abstract@^1.17.2, es-abstract@^1.17.4, es-abstrac
string.prototype.trimleft "^2.1.1"
string.prototype.trimright "^2.1.1"
-es-get-iterator@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.0.tgz#bb98ad9d6d63b31aacdc8f89d5d0ee57bcb5b4c8"
- integrity sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==
- dependencies:
- es-abstract "^1.17.4"
- has-symbols "^1.0.1"
- is-arguments "^1.0.4"
- is-map "^2.0.1"
- is-set "^2.0.1"
- is-string "^1.0.5"
- isarray "^2.0.5"
-
es-to-primitive@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a"
@@ -2979,21 +2920,11 @@ is-accessor-descriptor@^1.0.0:
dependencies:
kind-of "^6.0.0"
-is-arguments@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.0.4.tgz#3faf966c7cba0ff437fb31f6250082fcf0448cf3"
- integrity sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==
-
is-arrayish@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=
-is-bigint@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.0.tgz#73da8c33208d00f130e9b5e15d23eac9215601c4"
- integrity sha512-t5mGUXC/xRheCK431ylNiSkGGpBp8bHENBcENTkDT6ppwPzEVxNGZRvgvmOEfbWkFhA7D2GEuE2mmQTr78sl2g==
-
is-binary-path@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
@@ -3001,11 +2932,6 @@ is-binary-path@~2.1.0:
dependencies:
binary-extensions "^2.0.0"
-is-boolean-object@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.0.1.tgz#10edc0900dd127697a92f6f9807c7617d68ac48e"
- integrity sha512-TqZuVwa/sppcrhUCAYkGBk7w0yxfQQnxq28fjkO53tnK9FQXmdwz2JS5+GjsWQ6RByES1K40nI+yDic5c9/aAQ==
-
is-buffer@^1.1.5:
version "1.1.6"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
@@ -3042,7 +2968,7 @@ is-data-descriptor@^1.0.0:
dependencies:
kind-of "^6.0.0"
-is-date-object@^1.0.1, is-date-object@^1.0.2:
+is-date-object@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e"
integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==
@@ -3117,21 +3043,11 @@ is-installed-globally@^0.3.1:
global-dirs "^2.0.1"
is-path-inside "^3.0.1"
-is-map@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.1.tgz#520dafc4307bb8ebc33b813de5ce7c9400d644a1"
- integrity sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==
-
is-npm@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-4.0.0.tgz#c90dd8380696df87a7a6d823c20d0b12bbe3c84d"
integrity sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==
-is-number-object@^1.0.3:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.4.tgz#36ac95e741cf18b283fc1ddf5e83da798e3ec197"
- integrity sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==
-
is-number@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195"
@@ -3168,21 +3084,11 @@ is-regex@^1.0.5:
dependencies:
has "^1.0.3"
-is-set@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.1.tgz#d1604afdab1724986d30091575f54945da7e5f43"
- integrity sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==
-
is-stream@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
-is-string@^1.0.4, is-string@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6"
- integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==
-
is-symbol@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937"
@@ -3199,31 +3105,11 @@ is-type-of@^1.0.0:
is-class-hotfix "~0.0.6"
isstream "~0.1.2"
-is-typed-array@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.3.tgz#a4ff5a5e672e1a55f99c7f54e59597af5c1df04d"
- integrity sha512-BSYUBOK/HJibQ30wWkWold5txYwMUXQct9YHAQJr8fSwvZoiglcqB0pd7vEN23+Tsi9IUEjztdOSzl4qLVYGTQ==
- dependencies:
- available-typed-arrays "^1.0.0"
- es-abstract "^1.17.4"
- foreach "^2.0.5"
- has-symbols "^1.0.1"
-
is-typedarray@^1.0.0, is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
-is-weakmap@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2"
- integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==
-
-is-weakset@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.1.tgz#e9a0af88dbd751589f5e50d80f4c98b780884f83"
- integrity sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw==
-
is-windows@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
@@ -3249,11 +3135,6 @@ isarray@1.0.0, isarray@~1.0.0:
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
-isarray@^2.0.5:
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723"
- integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==
-
isbinaryfile@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.6.tgz#edcb62b224e2b4710830b67498c8e4e5a4d2610b"
@@ -4644,14 +4525,6 @@ object-inspect@^1.7.0:
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67"
integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==
-object-is@^1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.2.tgz#c5d2e87ff9e119f78b7a088441519e2eec1573b6"
- integrity sha512-5lHCz+0uufF6wZ7CRFWJN3hp8Jqblpgve06U5CMQ3f//6iDjPr2PEo9MWCjEssDsa+UZEL4PkFpr+BMop6aKzQ==
- dependencies:
- define-properties "^1.1.3"
- es-abstract "^1.17.5"
-
object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.0.6, object-keys@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
@@ -5325,19 +5198,6 @@ regex-not@^1.0.0, regex-not@^1.0.2:
extend-shallow "^3.0.2"
safe-regex "^1.1.0"
-regexp.prototype.flags@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz#7aba89b3c13a64509dabcf3ca8d9fbb9bdf5cb75"
- integrity sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==
- dependencies:
- define-properties "^1.1.3"
- es-abstract "^1.17.0-next.1"
-
-regexparam@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-1.3.0.tgz#2fe42c93e32a40eff6235d635e0ffa344b92965f"
- integrity sha512-6IQpFBv6e5vz1QAqI+V4k8P2e/3gRrqfCJ9FI+O1FLQTO+Uz6RXZEZOPmTJ6hlGj7gkERzY5BRCv09whKP96/g==
-
regexpp@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
@@ -5666,14 +5526,6 @@ shortid@^2.2.8:
dependencies:
nanoid "^2.1.0"
-side-channel@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.2.tgz#df5d1abadb4e4bf4af1cd8852bf132d2f7876947"
- integrity sha512-7rL9YlPHg7Ancea1S96Pa8/QWb4BtXL/TZvS6B8XFetGBeuhAsfmUspK6DokBeZ64+Kj9TCNRD/30pVz1BvQNA==
- dependencies:
- es-abstract "^1.17.0-next.1"
- object-inspect "^1.7.0"
-
signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
@@ -6067,11 +5919,6 @@ supports-color@^7.1.0:
dependencies:
has-flag "^4.0.0"
-svelte@^3.9.2:
- version "3.22.2"
- resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.22.2.tgz#06585244191bf7a112af2a0025610f33d77c3715"
- integrity sha512-DxumO0+vvHA6NSc2jtVty08I8lFI43q8P2zX6JxZL8J1kqK5NVjad6TRM/twhnWXC+QScnwkZ15O6X1aTsEKTA==
-
symbol-tree@^3.2.2:
version "3.2.4"
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
@@ -6552,44 +6399,11 @@ whatwg-url@^7.0.0:
tr46 "^1.0.1"
webidl-conversions "^4.0.2"
-which-boxed-primitive@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.1.tgz#cbe8f838ebe91ba2471bb69e9edbda67ab5a5ec1"
- integrity sha512-7BT4TwISdDGBgaemWU0N0OU7FeAEJ9Oo2P1PHRm/FCWoEi2VLWC9b6xvxAA3C/NMpxg3HXVgi0sMmGbNUbNepQ==
- dependencies:
- is-bigint "^1.0.0"
- is-boolean-object "^1.0.0"
- is-number-object "^1.0.3"
- is-string "^1.0.4"
- is-symbol "^1.0.2"
-
-which-collection@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906"
- integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==
- dependencies:
- is-map "^2.0.1"
- is-set "^2.0.1"
- is-weakmap "^2.0.1"
- is-weakset "^2.0.1"
-
which-module@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
-which-typed-array@^1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.2.tgz#e5f98e56bda93e3dac196b01d47c1156679c00b2"
- integrity sha512-KT6okrd1tE6JdZAy3o2VhMoYPh3+J6EMZLyrxBQsZflI1QCZIxMrIYLkosd8Twf+YfknVIHmYQPgJt238p8dnQ==
- dependencies:
- available-typed-arrays "^1.0.2"
- es-abstract "^1.17.5"
- foreach "^2.0.5"
- function-bind "^1.1.1"
- has-symbols "^1.0.1"
- is-typed-array "^1.1.3"
-
which@^1.2.9, which@^1.3.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
diff --git a/packages/standard-components/rollup.config.js b/packages/standard-components/rollup.config.js
index 078b107232..2ac5b8447c 100644
--- a/packages/standard-components/rollup.config.js
+++ b/packages/standard-components/rollup.config.js
@@ -19,6 +19,6 @@ export default {
resolve({
browser: true,
}),
- commonjs()
+ commonjs(),
],
}
diff --git a/packages/standard-components/src/DataChart.svelte b/packages/standard-components/src/DataChart.svelte
index 7ddb3228f5..67c1579a2b 100644
--- a/packages/standard-components/src/DataChart.svelte
+++ b/packages/standard-components/src/DataChart.svelte
@@ -1,11 +1,11 @@
-
\ No newline at end of file
+
diff --git a/packages/standard-components/src/DataForm.svelte b/packages/standard-components/src/DataForm.svelte
index 1316b51fe8..6213dd231a 100644
--- a/packages/standard-components/src/DataForm.svelte
+++ b/packages/standard-components/src/DataForm.svelte
@@ -8,7 +8,7 @@
let username
let password
let newModel = {
- modelId: model._id
+ modelId: model._id,
}
let store = _bb.store
@@ -16,16 +16,13 @@
async function save() {
const SAVE_RECORD_URL = `/api/${_instanceId}/records`
- const response = await _bb.api.post(SAVE_RECORD_URL, newModel);
- const json = await response.json();
+ const response = await _bb.api.post(SAVE_RECORD_URL, newModel)
+ const json = await response.json()
store.update(state => {
- state[model._id] = [
- ...state[model._id],
- json
- ]
+ state[model._id] = [...state[model._id], json]
return state
- });
+ })
}
const handleInput = field => event => {
@@ -54,17 +51,14 @@
{#each fields as field}