From 94b2e0f134f743fe2d7d308aab7ab9e9028a61b7 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Thu, 7 May 2020 13:52:24 +0100 Subject: [PATCH] further tidy up and removal --- packages/server/.DS_Store | Bin 8196 -> 8196 bytes packages/server/.eslintrc | 12 + packages/server/build/.DS_Store | Bin 6148 -> 6148 bytes .../server/initialise/initialiseBudibase.js | 1 - packages/server/package.json | 10 +- .../{ => src}/api/controllers/application.js | 0 .../server/{ => src}/api/controllers/auth.js | 0 .../{ => src}/api/controllers/client.js | 0 .../{ => src}/api/controllers/component.js | 0 .../{ => src}/api/controllers/instance.js | 2 +- .../server/{ => src}/api/controllers/model.js | 0 .../server/{ => src}/api/controllers/page.js | 0 .../{ => src}/api/controllers/record.js | 0 .../{ => src}/api/controllers/screen.js | 0 .../{ => src}/api/controllers/static.js | 0 .../server/{ => src}/api/controllers/user.js | 0 .../server/{ => src}/api/controllers/view.js | 0 packages/server/{ => src}/api/index.js | 0 .../{ => src}/api/routes/application.js | 0 packages/server/{ => src}/api/routes/auth.js | 0 .../server/{ => src}/api/routes/client.js | 0 .../server/{ => src}/api/routes/component.js | 0 packages/server/{ => src}/api/routes/index.js | 0 .../server/{ => src}/api/routes/instance.js | 0 packages/server/{ => src}/api/routes/model.js | 0 packages/server/{ => src}/api/routes/pages.js | 0 .../server/{ => src}/api/routes/record.js | 0 .../server/{ => src}/api/routes/screen.js | 0 .../server/{ => src}/api/routes/static.js | 0 .../api/routes/tests/application.spec.js | 0 .../{ => src}/api/routes/tests/client.spec.js | 0 .../api/routes/tests/couchTestUtils.js | 0 .../api/routes/tests/instance.spec.js | 0 .../{ => src}/api/routes/tests/model.spec.js | 2 +- .../{ => src}/api/routes/tests/record.spec.js | 0 .../{ => src}/api/routes/tests/user.spec.js | 0 .../{ => src}/api/routes/tests/view.spec.js | 0 packages/server/{ => src}/api/routes/user.js | 0 packages/server/{ => src}/api/routes/view.js | 0 packages/server/{ => src}/app.js | 0 packages/server/{ => src}/db/client.js | 1 - packages/server/{ => src}/db/index.js | 0 .../server/{ => src}/db/initialiseClientDb.js | 0 packages/server/{ => src}/electron.js | 4 +- packages/server/{ => src}/index.js | 0 .../{ => src}/middleware/authenticated.js | 0 .../server/{ => src}/middleware/session.js | 0 packages/server/{ => src}/utilities/bcrypt.js | 0 .../{ => src}/utilities/builder/buildPage.js | 0 .../utilities/builder/convertCssToFiles.js | 0 .../utilities/builder/deleteCodeMeta.js | 0 .../{ => src}/utilities/builder/getPages.js | 0 .../{ => src}/utilities/builder/index.js | 0 .../utilities/builder/index.template.html | 0 .../utilities/builder/listScreens.js | 0 .../{ => src}/utilities/builder/publicPath.js | 0 .../server/src/utilities/createAppPackage.js | 7 + .../server/{ => src}/utilities/exceptions.js | 0 .../server/{ => src}/utilities/statusCodes.js | 0 packages/server/tests/apps.spec.js | 17 - packages/server/tests/authenticate.js | 187 --------- packages/server/tests/builder.spec.js | 246 ------------ packages/server/tests/createNewApp.js | 143 ------- packages/server/tests/helpers.js | 8 - packages/server/tests/serveui.js | 135 ------- packages/server/utilities/createAppPackage.js | 69 ---- .../utilities/injectedPlugins/createUser.js | 19 - .../utilities/injectedPlugins/disableUser.js | 3 - .../utilities/injectedPlugins/enableUser.js | 3 - .../server/utilities/injectedPlugins/index.js | 76 ---- packages/server/utilities/runtimePackages.js | 34 -- packages/server/utilities/targzAppPackage.js | 119 ------ packages/server/yarn.lock | 370 +++++++++++++++++- 73 files changed, 386 insertions(+), 1082 deletions(-) create mode 100644 packages/server/.eslintrc delete mode 100644 packages/server/initialise/initialiseBudibase.js rename packages/server/{ => src}/api/controllers/application.js (100%) rename packages/server/{ => src}/api/controllers/auth.js (100%) rename packages/server/{ => src}/api/controllers/client.js (100%) rename packages/server/{ => src}/api/controllers/component.js (100%) rename packages/server/{ => src}/api/controllers/instance.js (96%) rename packages/server/{ => src}/api/controllers/model.js (100%) rename packages/server/{ => src}/api/controllers/page.js (100%) rename packages/server/{ => src}/api/controllers/record.js (100%) rename packages/server/{ => src}/api/controllers/screen.js (100%) rename packages/server/{ => src}/api/controllers/static.js (100%) rename packages/server/{ => src}/api/controllers/user.js (100%) rename packages/server/{ => src}/api/controllers/view.js (100%) rename packages/server/{ => src}/api/index.js (100%) rename packages/server/{ => src}/api/routes/application.js (100%) rename packages/server/{ => src}/api/routes/auth.js (100%) rename packages/server/{ => src}/api/routes/client.js (100%) rename packages/server/{ => src}/api/routes/component.js (100%) rename packages/server/{ => src}/api/routes/index.js (100%) rename packages/server/{ => src}/api/routes/instance.js (100%) rename packages/server/{ => src}/api/routes/model.js (100%) rename packages/server/{ => src}/api/routes/pages.js (100%) rename packages/server/{ => src}/api/routes/record.js (100%) rename packages/server/{ => src}/api/routes/screen.js (100%) rename packages/server/{ => src}/api/routes/static.js (100%) rename packages/server/{ => src}/api/routes/tests/application.spec.js (100%) rename packages/server/{ => src}/api/routes/tests/client.spec.js (100%) rename packages/server/{ => src}/api/routes/tests/couchTestUtils.js (100%) rename packages/server/{ => src}/api/routes/tests/instance.spec.js (100%) rename packages/server/{ => src}/api/routes/tests/model.spec.js (98%) rename packages/server/{ => src}/api/routes/tests/record.spec.js (100%) rename packages/server/{ => src}/api/routes/tests/user.spec.js (100%) rename packages/server/{ => src}/api/routes/tests/view.spec.js (100%) rename packages/server/{ => src}/api/routes/user.js (100%) rename packages/server/{ => src}/api/routes/view.js (100%) rename packages/server/{ => src}/app.js (100%) rename packages/server/{ => src}/db/client.js (86%) rename packages/server/{ => src}/db/index.js (100%) rename packages/server/{ => src}/db/initialiseClientDb.js (100%) rename packages/server/{ => src}/electron.js (67%) rename packages/server/{ => src}/index.js (100%) rename packages/server/{ => src}/middleware/authenticated.js (100%) rename packages/server/{ => src}/middleware/session.js (100%) rename packages/server/{ => src}/utilities/bcrypt.js (100%) rename packages/server/{ => src}/utilities/builder/buildPage.js (100%) rename packages/server/{ => src}/utilities/builder/convertCssToFiles.js (100%) rename packages/server/{ => src}/utilities/builder/deleteCodeMeta.js (100%) rename packages/server/{ => src}/utilities/builder/getPages.js (100%) rename packages/server/{ => src}/utilities/builder/index.js (100%) rename packages/server/{ => src}/utilities/builder/index.template.html (100%) rename packages/server/{ => src}/utilities/builder/listScreens.js (100%) rename packages/server/{ => src}/utilities/builder/publicPath.js (100%) create mode 100644 packages/server/src/utilities/createAppPackage.js rename packages/server/{ => src}/utilities/exceptions.js (100%) rename packages/server/{ => src}/utilities/statusCodes.js (100%) delete mode 100644 packages/server/tests/apps.spec.js delete mode 100644 packages/server/tests/authenticate.js delete mode 100644 packages/server/tests/builder.spec.js delete mode 100644 packages/server/tests/createNewApp.js delete mode 100644 packages/server/tests/helpers.js delete mode 100644 packages/server/tests/serveui.js delete mode 100644 packages/server/utilities/createAppPackage.js delete mode 100644 packages/server/utilities/injectedPlugins/createUser.js delete mode 100644 packages/server/utilities/injectedPlugins/disableUser.js delete mode 100644 packages/server/utilities/injectedPlugins/enableUser.js delete mode 100644 packages/server/utilities/injectedPlugins/index.js delete mode 100644 packages/server/utilities/runtimePackages.js delete mode 100644 packages/server/utilities/targzAppPackage.js diff --git a/packages/server/.DS_Store b/packages/server/.DS_Store index acf3538c524b05658f138d65bc25d89822d3b79d..d7a28e72849dd43cde1e817c47cf654031acdf6f 100644 GIT binary patch delta 50 zcmZp1XmOa}&nUDpU^hRb&}1Hg(9P2YBA6#Di(Hy4FKRToS5%+TVPl~b^JaF5Z!8-t G*qH&9!Vii7 delta 254 zcmZp1XmOa}&nUJrU^hRb*km4oP<3vGM1}$&3;@!}4B0?3ogtN>*fS?TIVmSUiGhJZ zfPsNgd~%I|)aD!kUuI1%hD?S$AT9yoM1~w7S>MH`8p$n8L0>XSC)&rW9&ybF44rA-&bs}~fi@ljPvrBwqVWh|q G4<-Ov@;kr) diff --git a/packages/server/.eslintrc b/packages/server/.eslintrc new file mode 100644 index 0000000000..3431bf04fb --- /dev/null +++ b/packages/server/.eslintrc @@ -0,0 +1,12 @@ +{ + "globals": { + "emit": true, + "key": true + }, + "env": { + "node": true + }, + "extends": ["eslint:recommended"], + "rules": { + } +} \ No newline at end of file diff --git a/packages/server/build/.DS_Store b/packages/server/build/.DS_Store index 17019f9d85124d99eed0c817a37be26ac9db26fb..0199b6c9be444d90d836dfcd40070403cbad1986 100644 GIT binary patch delta 72 zcmZoMXfc=|#>CJzu~2NHo+2aT!~knX#>qTPrkm547qVB)qu~2NHo+2a5!~pA!7aACWj2_c^W`=x*VulLOoc!dZoctsP1_l8j zUJ1k+|G@yrVqk!(N-8fdfT}u~RFIQdTw-8woso%|g_Vt+gM*8Miq2ING!=ng0e&M^K;S_~HQym2p6XRMPg=%wi10dVjthSbuLtNF+)-xfu zvZ}hKwr(ca2Mmmi5SoD>N`omWAUO+&p&l#?F3QWv&r1i2Fm61!j%71D2R{ce=r$hw c&ODi4L{|i)31m instance !== ctx.params.instanceId ) - const updatedApp = await clientDb.put(budibaseApp) + await clientDb.put(budibaseApp) ctx.body = { message: `Instance Database ${ctx.params.instanceId} successfully destroyed.`, diff --git a/packages/server/api/controllers/model.js b/packages/server/src/api/controllers/model.js similarity index 100% rename from packages/server/api/controllers/model.js rename to packages/server/src/api/controllers/model.js diff --git a/packages/server/api/controllers/page.js b/packages/server/src/api/controllers/page.js similarity index 100% rename from packages/server/api/controllers/page.js rename to packages/server/src/api/controllers/page.js diff --git a/packages/server/api/controllers/record.js b/packages/server/src/api/controllers/record.js similarity index 100% rename from packages/server/api/controllers/record.js rename to packages/server/src/api/controllers/record.js diff --git a/packages/server/api/controllers/screen.js b/packages/server/src/api/controllers/screen.js similarity index 100% rename from packages/server/api/controllers/screen.js rename to packages/server/src/api/controllers/screen.js diff --git a/packages/server/api/controllers/static.js b/packages/server/src/api/controllers/static.js similarity index 100% rename from packages/server/api/controllers/static.js rename to packages/server/src/api/controllers/static.js diff --git a/packages/server/api/controllers/user.js b/packages/server/src/api/controllers/user.js similarity index 100% rename from packages/server/api/controllers/user.js rename to packages/server/src/api/controllers/user.js diff --git a/packages/server/api/controllers/view.js b/packages/server/src/api/controllers/view.js similarity index 100% rename from packages/server/api/controllers/view.js rename to packages/server/src/api/controllers/view.js diff --git a/packages/server/api/index.js b/packages/server/src/api/index.js similarity index 100% rename from packages/server/api/index.js rename to packages/server/src/api/index.js diff --git a/packages/server/api/routes/application.js b/packages/server/src/api/routes/application.js similarity index 100% rename from packages/server/api/routes/application.js rename to packages/server/src/api/routes/application.js diff --git a/packages/server/api/routes/auth.js b/packages/server/src/api/routes/auth.js similarity index 100% rename from packages/server/api/routes/auth.js rename to packages/server/src/api/routes/auth.js diff --git a/packages/server/api/routes/client.js b/packages/server/src/api/routes/client.js similarity index 100% rename from packages/server/api/routes/client.js rename to packages/server/src/api/routes/client.js diff --git a/packages/server/api/routes/component.js b/packages/server/src/api/routes/component.js similarity index 100% rename from packages/server/api/routes/component.js rename to packages/server/src/api/routes/component.js diff --git a/packages/server/api/routes/index.js b/packages/server/src/api/routes/index.js similarity index 100% rename from packages/server/api/routes/index.js rename to packages/server/src/api/routes/index.js diff --git a/packages/server/api/routes/instance.js b/packages/server/src/api/routes/instance.js similarity index 100% rename from packages/server/api/routes/instance.js rename to packages/server/src/api/routes/instance.js diff --git a/packages/server/api/routes/model.js b/packages/server/src/api/routes/model.js similarity index 100% rename from packages/server/api/routes/model.js rename to packages/server/src/api/routes/model.js diff --git a/packages/server/api/routes/pages.js b/packages/server/src/api/routes/pages.js similarity index 100% rename from packages/server/api/routes/pages.js rename to packages/server/src/api/routes/pages.js diff --git a/packages/server/api/routes/record.js b/packages/server/src/api/routes/record.js similarity index 100% rename from packages/server/api/routes/record.js rename to packages/server/src/api/routes/record.js diff --git a/packages/server/api/routes/screen.js b/packages/server/src/api/routes/screen.js similarity index 100% rename from packages/server/api/routes/screen.js rename to packages/server/src/api/routes/screen.js diff --git a/packages/server/api/routes/static.js b/packages/server/src/api/routes/static.js similarity index 100% rename from packages/server/api/routes/static.js rename to packages/server/src/api/routes/static.js diff --git a/packages/server/api/routes/tests/application.spec.js b/packages/server/src/api/routes/tests/application.spec.js similarity index 100% rename from packages/server/api/routes/tests/application.spec.js rename to packages/server/src/api/routes/tests/application.spec.js diff --git a/packages/server/api/routes/tests/client.spec.js b/packages/server/src/api/routes/tests/client.spec.js similarity index 100% rename from packages/server/api/routes/tests/client.spec.js rename to packages/server/src/api/routes/tests/client.spec.js diff --git a/packages/server/api/routes/tests/couchTestUtils.js b/packages/server/src/api/routes/tests/couchTestUtils.js similarity index 100% rename from packages/server/api/routes/tests/couchTestUtils.js rename to packages/server/src/api/routes/tests/couchTestUtils.js diff --git a/packages/server/api/routes/tests/instance.spec.js b/packages/server/src/api/routes/tests/instance.spec.js similarity index 100% rename from packages/server/api/routes/tests/instance.spec.js rename to packages/server/src/api/routes/tests/instance.spec.js diff --git a/packages/server/api/routes/tests/model.spec.js b/packages/server/src/api/routes/tests/model.spec.js similarity index 98% rename from packages/server/api/routes/tests/model.spec.js rename to packages/server/src/api/routes/tests/model.spec.js index 961189b9dd..d518f8806f 100644 --- a/packages/server/api/routes/tests/model.spec.js +++ b/packages/server/src/api/routes/tests/model.spec.js @@ -1,5 +1,5 @@ const supertest = require("supertest"); -const app = require("../../../../app"); +const app = require("../../../app"); const { createInstanceDatabase, createModel } = require("./couchTestUtils"); diff --git a/packages/server/api/routes/tests/record.spec.js b/packages/server/src/api/routes/tests/record.spec.js similarity index 100% rename from packages/server/api/routes/tests/record.spec.js rename to packages/server/src/api/routes/tests/record.spec.js diff --git a/packages/server/api/routes/tests/user.spec.js b/packages/server/src/api/routes/tests/user.spec.js similarity index 100% rename from packages/server/api/routes/tests/user.spec.js rename to packages/server/src/api/routes/tests/user.spec.js diff --git a/packages/server/api/routes/tests/view.spec.js b/packages/server/src/api/routes/tests/view.spec.js similarity index 100% rename from packages/server/api/routes/tests/view.spec.js rename to packages/server/src/api/routes/tests/view.spec.js diff --git a/packages/server/api/routes/user.js b/packages/server/src/api/routes/user.js similarity index 100% rename from packages/server/api/routes/user.js rename to packages/server/src/api/routes/user.js diff --git a/packages/server/api/routes/view.js b/packages/server/src/api/routes/view.js similarity index 100% rename from packages/server/api/routes/view.js rename to packages/server/src/api/routes/view.js diff --git a/packages/server/app.js b/packages/server/src/app.js similarity index 100% rename from packages/server/app.js rename to packages/server/src/app.js diff --git a/packages/server/db/client.js b/packages/server/src/db/client.js similarity index 86% rename from packages/server/db/client.js rename to packages/server/src/db/client.js index 834a3dbee0..8ee19f8de6 100644 --- a/packages/server/db/client.js +++ b/packages/server/src/db/client.js @@ -6,7 +6,6 @@ const path = require("path") const BUDIBASE_DIR = path.join(os.homedir(), ".budibase") const COUCH_DB_URL = process.env.COUCH_DB_URL || `leveldb://${BUDIBASE_DIR}/` -const DATABASE_TYPE = process.env.DATABASE_TYPE || "couch" const Pouch = PouchDB.defaults({ prefix: COUCH_DB_URL, diff --git a/packages/server/db/index.js b/packages/server/src/db/index.js similarity index 100% rename from packages/server/db/index.js rename to packages/server/src/db/index.js diff --git a/packages/server/db/initialiseClientDb.js b/packages/server/src/db/initialiseClientDb.js similarity index 100% rename from packages/server/db/initialiseClientDb.js rename to packages/server/src/db/initialiseClientDb.js diff --git a/packages/server/electron.js b/packages/server/src/electron.js similarity index 67% rename from packages/server/electron.js rename to packages/server/src/electron.js index 5a118f433f..41162e2099 100644 --- a/packages/server/electron.js +++ b/packages/server/src/electron.js @@ -2,10 +2,12 @@ const { app, BrowserWindow } = require('electron'); require("dotenv").config() +const DEV_URL = "http://localhost:4001"; + function createWindow() { app.server = require("./app")(); let win = new BrowserWindow({ width: 1920, height: 1080 }); - win.loadURL('http://localhost:4001'); + win.loadURL(DEV_URL); } app.whenReady().then(createWindow) \ No newline at end of file diff --git a/packages/server/index.js b/packages/server/src/index.js similarity index 100% rename from packages/server/index.js rename to packages/server/src/index.js diff --git a/packages/server/middleware/authenticated.js b/packages/server/src/middleware/authenticated.js similarity index 100% rename from packages/server/middleware/authenticated.js rename to packages/server/src/middleware/authenticated.js diff --git a/packages/server/middleware/session.js b/packages/server/src/middleware/session.js similarity index 100% rename from packages/server/middleware/session.js rename to packages/server/src/middleware/session.js diff --git a/packages/server/utilities/bcrypt.js b/packages/server/src/utilities/bcrypt.js similarity index 100% rename from packages/server/utilities/bcrypt.js rename to packages/server/src/utilities/bcrypt.js diff --git a/packages/server/utilities/builder/buildPage.js b/packages/server/src/utilities/builder/buildPage.js similarity index 100% rename from packages/server/utilities/builder/buildPage.js rename to packages/server/src/utilities/builder/buildPage.js diff --git a/packages/server/utilities/builder/convertCssToFiles.js b/packages/server/src/utilities/builder/convertCssToFiles.js similarity index 100% rename from packages/server/utilities/builder/convertCssToFiles.js rename to packages/server/src/utilities/builder/convertCssToFiles.js diff --git a/packages/server/utilities/builder/deleteCodeMeta.js b/packages/server/src/utilities/builder/deleteCodeMeta.js similarity index 100% rename from packages/server/utilities/builder/deleteCodeMeta.js rename to packages/server/src/utilities/builder/deleteCodeMeta.js diff --git a/packages/server/utilities/builder/getPages.js b/packages/server/src/utilities/builder/getPages.js similarity index 100% rename from packages/server/utilities/builder/getPages.js rename to packages/server/src/utilities/builder/getPages.js diff --git a/packages/server/utilities/builder/index.js b/packages/server/src/utilities/builder/index.js similarity index 100% rename from packages/server/utilities/builder/index.js rename to packages/server/src/utilities/builder/index.js diff --git a/packages/server/utilities/builder/index.template.html b/packages/server/src/utilities/builder/index.template.html similarity index 100% rename from packages/server/utilities/builder/index.template.html rename to packages/server/src/utilities/builder/index.template.html diff --git a/packages/server/utilities/builder/listScreens.js b/packages/server/src/utilities/builder/listScreens.js similarity index 100% rename from packages/server/utilities/builder/listScreens.js rename to packages/server/src/utilities/builder/listScreens.js diff --git a/packages/server/utilities/builder/publicPath.js b/packages/server/src/utilities/builder/publicPath.js similarity index 100% rename from packages/server/utilities/builder/publicPath.js rename to packages/server/src/utilities/builder/publicPath.js diff --git a/packages/server/src/utilities/createAppPackage.js b/packages/server/src/utilities/createAppPackage.js new file mode 100644 index 0000000000..49dd7ea2af --- /dev/null +++ b/packages/server/src/utilities/createAppPackage.js @@ -0,0 +1,7 @@ +const { resolve } = require("path") +const { cwd } = require("process") + +const appPackageFolder = (config, appname) => + resolve(cwd(), config.latestPackagesFolder, appname) + +module.exports.appPackageFolder = appPackageFolder diff --git a/packages/server/utilities/exceptions.js b/packages/server/src/utilities/exceptions.js similarity index 100% rename from packages/server/utilities/exceptions.js rename to packages/server/src/utilities/exceptions.js diff --git a/packages/server/utilities/statusCodes.js b/packages/server/src/utilities/statusCodes.js similarity index 100% rename from packages/server/utilities/statusCodes.js rename to packages/server/src/utilities/statusCodes.js diff --git a/packages/server/tests/apps.spec.js b/packages/server/tests/apps.spec.js deleted file mode 100644 index c8d440782c..0000000000 --- a/packages/server/tests/apps.spec.js +++ /dev/null @@ -1,17 +0,0 @@ -const app = require("./testApp")() -const authenticateMaster = require("./authenticate") -const createNewApp = require("./createNewApp") -const multipleInstances = require("./multipleInstances") -const serveui = require("./serveui") - -beforeAll(async () => await app.start()) - -afterAll(async () => await app.destroy()) - -describe("authenticateMaster", () => - authenticateMaster(app, "_master", "masterOwner")) -describe("createNewApp", () => createNewApp(app)) -describe("authenticateTestApp", () => - authenticateMaster(app, "testApp", "testAppUser1")) -describe("multipleInstances", () => multipleInstances(app)) -describe("serveUi", () => serveui(app)) diff --git a/packages/server/tests/authenticate.js b/packages/server/tests/authenticate.js deleted file mode 100644 index f35ff0e251..0000000000 --- a/packages/server/tests/authenticate.js +++ /dev/null @@ -1,187 +0,0 @@ -const statusCodes = require("../utilities/statusCodes") -const { readFile } = require("fs-extra") -const { timeout } = require("./helpers") - -module.exports = (app, appName, userName) => { - const credentials = app.credentials[userName] - - it("should return unauthorized if username is incorrect", async () => { - await app - .post(`/${appName}/api/authenticate`, { - username: "unknownuser", - password: credentials.password, - }) - .expect(statusCodes.UNAUTHORIZED) - }) - - it("should return unauthorized if password is incorrect", async () => { - await app - .post(`/${appName}/api/authenticate`, { - username: credentials.username, - password: "incorrect_password", - }) - .expect(statusCodes.UNAUTHORIZED) - }) - - it("should not get cookie when unauthorized", async () => { - const response = await app.post(`/${appName}/api/authenticate`, { - username: credentials.username, - password: "incorrect_password", - }) - - expect(response.header["set-cookie"]).toBeUndefined() - }) - - it("should return ok correct username and password supplied", async () => { - const response = await app - .post(`/${appName}/api/authenticate`, { - username: credentials.username, - password: credentials.password, - }) - .expect(statusCodes.OK) - - credentials.cookie = response.header["set-cookie"] - }) - - const testUserName = appName + "_test_user" - let testPassword = "test_user_password" - it("should be able to create new user with authenticated cookie", async () => { - await app - .post(`/${appName}/api/createUser`, { - user: { - name: testUserName, - accessLevels: ["owner"], - enabled: true, - }, - password: testPassword, - }) - .set("cookie", credentials.cookie) - .expect(statusCodes.OK) - }) - - let newUserCookie - it("should be able to authenticate with new user", async () => { - const responseNewUser = await app - .post(`/${appName}/api/authenticate`, { - username: testUserName, - password: testPassword, - }) - .expect(statusCodes.OK) - - newUserCookie = responseNewUser.header["set-cookie"] - - expect(newUserCookie).toBeDefined() - expect(newUserCookie).not.toEqual(credentials.cookie) - - app - .get("/_master/api/users/") - .set("cookie", newUserCookie) - .expect(statusCodes.OK) - }) - - it("should not be able to perform requests when user is disabled", async () => { - //HERE - await app - .post(`/${appName}/api/disableUser`, { - username: testUserName, - }) - .set("cookie", credentials.cookie) - .expect(statusCodes.OK) - - await app - .get(`/${appName}/api/users`) - .set("cookie", newUserCookie) - .expect(statusCodes.UNAUTHORIZED) - - await app - .post(`/${appName}/api/authenticate`, { - username: testUserName, - password: testPassword, - }) - .expect(statusCodes.UNAUTHORIZED) - }) - - it("should not be able to re-authenticate when user is disabled", async () => { - await app - .post(`/${appName}/api/authenticate`, { - username: testUserName, - password: testPassword, - }) - .expect(statusCodes.UNAUTHORIZED) - }) - - it("should be able with re-authenticate when user is enabled again", async () => { - await app - .post(`/${appName}/api/enableUser`, { - username: testUserName, - }) - .set("cookie", credentials.cookie) - .expect(statusCodes.OK) - - await app - .post(`/${appName}/api/authenticate`, { - username: testUserName, - password: testPassword, - }) - .expect(statusCodes.OK) - }) - - let testUserTempCode - it("should be able to reset password with temporary access", async () => { - await app - .post(`/${appName}/api/createTemporaryAccess`, { - username: testUserName, - }) - .expect(statusCodes.OK) - - testPassword = "test_user_new_password" - - // the behaviour that creates the below file is async, - /// to this timeout is giving it a change to work its magic - await timeout(10) - - const testUserTempCode = await readFile( - `./tests/.data/tempaccess${testUserName}`, - "utf8" - ) - - await app - .post(`/${appName}/api/setPasswordFromTemporaryCode`, { - username: testUserName, - tempCode: testUserTempCode, - newPassword: testPassword, - }) - .expect(statusCodes.OK) - - await app - .post(`/${appName}/api/authenticate`, { - username: testUserName, - password: testPassword, - }) - .expect(statusCodes.OK) - }) - - it("should not be able to set password with used temp code", async () => { - await app - .post(`/${appName}/api/setPasswordFromTemporaryCode`, { - username: testUserName, - tempCode: testUserTempCode, - newPassword: "whatever", - }) - .expect(statusCodes.OK) - - await app - .post(`/${appName}/api/authenticate`, { - username: testUserName, - password: "whatever", - }) - .expect(statusCodes.UNAUTHORIZED) - - await app - .post(`/${appName}/api/authenticate`, { - username: testUserName, - password: testPassword, - }) - .expect(statusCodes.OK) - }) -} diff --git a/packages/server/tests/builder.spec.js b/packages/server/tests/builder.spec.js deleted file mode 100644 index c6ac17b5d2..0000000000 --- a/packages/server/tests/builder.spec.js +++ /dev/null @@ -1,246 +0,0 @@ -const testAppDef = require("../appPackages/testApp/appDefinition.json") -const testAccessLevels = require("../appPackages/testApp/access_levels.json") -const mainPage = require("../appPackages/testApp/pages/main/page.json") -const unauthenticatedPage = require("../appPackages/testApp/pages/unauthenticated/page.json") -const testComponents = require("../appPackages/testApp/customComponents/components.json") -const testMoreComponents = require("../appPackages/testApp/moreCustomComponents/components.json") -const statusCodes = require("../utilities/statusCodes") -const screen1 = require("../appPackages/testApp/pages/main/screens/screen1.json") -const screen2 = require("../appPackages/testApp/pages/main/screens/screen2.json") -const { readJSON, pathExists, unlink, readFile } = require("fs-extra") -const { getHashedCssPaths } = require("../utilities/builder/convertCssToFiles") -const listScreens = require("../utilities/builder/listScreens") -const { getApisWithFullAccess } = require("../utilities/budibaseApi") - -const app = require("./testApp")() -testComponents.textbox.name = `./customComponents/textbox` -testMoreComponents.textbox.name = `./moreCustomComponents/textbox` - -let _master -const getmaster = async () => { - if (!_master) - _master = await getApisWithFullAccess({}, app.masterAppPackage) - return _master -} - -beforeAll(async () => { - const testScreen = "./appPackages/testApp/pages/main/screens/newscreen.json" - const testScreenAfterMove = - "./appPackages/testApp/pages/main/screens/anotherscreen.json" - - if (await pathExists(testScreen)) await unlink(testScreen) - if (await pathExists(testScreenAfterMove)) await unlink(testScreenAfterMove) - - await app.start() - - const response = await app - .post(`/_master/api/authenticate`, { - username: app.credentials.masterOwner.username, - password: app.credentials.masterOwner.password, - }) - .expect(statusCodes.OK) - - app.credentials.masterOwner.cookie = response.header["set-cookie"] - - const master = await getmaster() - const newApp = master.recordApi.getNew("/applications", "application") - newApp.name = "testApp" - await app - .post(`/_master/api/record/${newApp.key}`, newApp) - .set("cookie", app.credentials.masterOwner.cookie) - .expect(statusCodes.OK) -}) - -afterAll(async () => await app.destroy()) - -it("/apppackage should get appDefinition", async () => { - const { body } = await app - .get("/_builder/api/testApp/appPackage") - .expect(statusCodes.OK) - - expect(body.appDefinition).toEqual(testAppDef) -}) - -it("/apppackage should get access levels", async () => { - const { body } = await app - .get("/_builder/api/testApp/appPackage") - .expect(statusCodes.OK) - - expect(body.accessLevels).toEqual(testAccessLevels) -}) - -it("/apppackage should get pages", async () => { - const { body } = await app - .get("/_builder/api/testApp/appPackage") - .expect(statusCodes.OK) - expect(body.pages).toEqual({ - main: { ...mainPage, name: "main" }, - unauthenticated: { ...unauthenticatedPage, name: "unauthenticated" }, - }) -}) - -it("/apppackage should get components", async () => { - const { body } = await app - .get("/_builder/api/testApp/appPackage") - .expect(statusCodes.OK) - - expect(body.components.components["./customComponents/textbox"]).toBeDefined() - expect( - body.components.components["./moreCustomComponents/textbox"] - ).toBeDefined() - - expect(body.components.components["./customComponents/textbox"]).toEqual( - testComponents.textbox - ) - - expect(body.components.components["./moreCustomComponents/textbox"]).toEqual( - testMoreComponents.textbox - ) -}) - -it("/pages/:pageName/screens should get screens", async () => { - const { body } = await app - .get("/_builder/api/testApp/pages/main/screens") - .expect(statusCodes.OK) - - const expectedComponents = { - screen1: { ...screen1, name: "screen1" }, - screen2: { ...screen2, name: "screen2" }, - } - - expect(body).toEqual(expectedComponents) -}) - -it("should be able to create new screen", async () => { - const newscreen = { - name: "newscreen", - props: { - _component: "@budibase/standard-component/div", - className: "something", - }, - } - - await app - .post("/_builder/api/testApp/pages/main/screen", newscreen) - .expect(statusCodes.OK) - - const screenFile = "./appPackages/testApp/pages/main/screens/newscreen.json" - expect(await pathExists(screenFile)).toBe(true) - expect(await readJSON(screenFile)).toEqual(newscreen) -}) - -it("should be able to update screen", async () => { - const updatedscreen = { - name: "newscreen", - props: { - _component: "@budibase/standard-component/div", - className: "something else", - }, - } - - await app - .post("/_builder/api/testApp/pages/main/screen", updatedscreen) - .expect(statusCodes.OK) - - const screenFile = "./appPackages/testApp/pages/main/screens/newscreen.json" - expect(await readJSON(screenFile)).toEqual(updatedscreen) -}) - -it("should be able to rename screen", async () => { - await app - .patch("/_builder/api/testApp/pages/main/screen", { - oldname: "newscreen", - newname: "anotherscreen", - }) - .expect(statusCodes.OK) - - const oldcomponentFile = - "./appPackages/testApp/pages/main/screens/newscreen.json" - const newcomponentFile = - "./appPackages/testApp/pages/main/screens/anotherscreen.json" - - expect(await pathExists(oldcomponentFile)).toBe(false) - expect(await pathExists(newcomponentFile)).toBe(true) -}) - -it("should be able to delete screen", async () => { - await app - .delete("/_builder/api/testApp/pages/main/screen/anotherscreen") - .expect(statusCodes.OK) - - const componentFile = - "./appPackages/testApp/pages/main/screens/anotherscreen.json" - expect(await pathExists(componentFile)).toBe(false) -}) - -it("/savePage should prepare all necessary client files", async () => { - const mainCss = "/*main page css*/" - mainPage._css = mainCss - const screen1Css = "/*screen1 css*/" - screen1._css = screen1Css - const screen2Css = "/*screen2 css*/" - screen2._css = screen2Css - - await app - .post("/_builder/api/testApp/pages/main", { - appDefinition: testAppDef, - accessLevels: testAccessLevels, - page: mainPage, - uiFunctions: "{'1234':() => 'test return'}", - screens: [screen1, screen2], - }) - .expect(statusCodes.OK) - - const publicFolderMain = relative => - "./appPackages/testApp/public/main" + relative - - const cssDir = publicFolderMain("/css") - - expect(await pathExists(publicFolderMain("/index.html"))).toBe(true) - - expect( - await pathExists(publicFolderMain("/lib/customComponents/index.js")) - ).toBe(true) - - expect( - await pathExists(publicFolderMain("/lib/moreCustomComponents/index.js")) - ).toBe(true) - - expect( - await pathExists( - publicFolderMain( - "/lib/node_modules/@budibase/standard-components/dist/index.js" - ) - ) - ).toBe(true) - - const indexHtmlMain = await readFile(publicFolderMain("/index.html"), "utf8") - - const pageCssPaths = getHashedCssPaths(cssDir, mainCss) - const screen1CssPaths = getHashedCssPaths(cssDir, screen1Css) - const screen2CssPaths = getHashedCssPaths(cssDir, screen2Css) - - expect(await pathExists(publicFolderMain(pageCssPaths.url))).toBe(true) - const savedPageCss = await readFile( - publicFolderMain(pageCssPaths.url), - "utf8" - ) - expect(savedPageCss).toEqual(mainCss) - expect(indexHtmlMain.includes(pageCssPaths.url)).toBe(true) - - expect(await pathExists(publicFolderMain(screen1CssPaths.url))).toBe(true) - const savedScreen1Css = await readFile( - publicFolderMain(screen1CssPaths.url), - "utf8" - ) - expect(savedScreen1Css).toEqual(screen1Css) - expect(indexHtmlMain.includes(screen1CssPaths.url)).toBe(true) - - expect(await pathExists(publicFolderMain(screen2CssPaths.url))).toBe(true) - const savedScreen2Css = await readFile( - publicFolderMain(screen2CssPaths.url), - "utf8" - ) - expect(savedScreen2Css).toEqual(screen2Css) - expect(indexHtmlMain.includes(screen2CssPaths.url)).toBe(true) -}) diff --git a/packages/server/tests/createNewApp.js b/packages/server/tests/createNewApp.js deleted file mode 100644 index 2f20ec7716..0000000000 --- a/packages/server/tests/createNewApp.js +++ /dev/null @@ -1,143 +0,0 @@ -const statusCodes = require("../utilities/statusCodes") -const constructHierarchy = require("../utilities/constructHierarchy") -const { readFile } = require("fs-extra") -constructHierarchy(require("../appPackages/_master/appDefinition.json")) -const { createTarGzPackage } = require("../utilities/targzAppPackage") - -module.exports = app => { - let _master - const getmaster = async () => { - if (!_master) - _master = await getApisWithFullAccess({}, app.masterAppPackage) - return _master - } - - let newAppKey = "" - it("create new application should be successful for owner", async () => { - const master = await getmaster() - const newApp = master.recordApi.getNew("/applications", "application") - newApp.name = app.testAppInfo.name - newAppKey = newApp.key - app.apps.testApp1.key = newAppKey - await app - .post(`/_master/api/record/${newApp.key}`, newApp) - .set("cookie", app.credentials.masterOwner.cookie) - .expect(statusCodes.OK) - - const response = await app - .get(`/_master/api/record/${newApp.key}`) - .set("cookie", app.credentials.masterOwner.cookie) - .expect(statusCodes.OK) - - expect(response.body.name).toBe(newApp.name) - }) - - let version1Key = "" - it("should be able to upload new version including package files", async () => { - jest.setTimeout(30000) - const master = await getmaster() - const version1 = master.recordApi.getNew(`${newAppKey}/versions`, "version") - version1.name = "v1" - version1.defaultAccessLevel = "owner" - version1Key = version1.key - - const { path, size } = await createTarGzPackage(app.config, "testApp") - - version1.package = { relativePath: "package.tar.gz", size } - - await app - .post(`/_master/api/record/${version1.key}`, version1) - .set("cookie", app.credentials.masterOwner.cookie) - .expect(statusCodes.OK) - - await app - .post(`/_master/api/files/${version1.key}`) - .attach("file", path, "package.tar.gz") - .set("cookie", app.credentials.masterOwner.cookie) - .expect(statusCodes.OK) - - const savedAppResponse = await app - .get(`/_master/api/record/${newAppKey}`) - .set("cookie", app.credentials.masterOwner.cookie) - - const savedApp = savedAppResponse.body - savedApp.defaultVersion = version1 - await app - .post(`/_master/api/record/${newAppKey}`, savedApp) - .set("cookie", app.credentials.masterOwner.cookie) - .expect(statusCodes.OK) - - app.apps.testApp1.version1 = version1 - }) - - let instance1 - it("should be able to create new instance of app", async () => { - const master = await getmaster() - instance1 = master.recordApi.getNew(`${newAppKey}/instances`, "instance") - instance1.name = "instance 1" - instance1.active = true - instance1.version = { - key: version1Key, - name: "v1", - defaultAccessLevel: "owner", - } - - await app - .post(`/_master/api/record/${instance1.key}`, instance1) - .set("cookie", app.credentials.masterOwner.cookie) - .expect(statusCodes.OK) - - const loadInstanceResponse = await app - .get(`/_master/api/record/${instance1.key}`) - .set("cookie", app.credentials.masterOwner.cookie) - .expect(statusCodes.OK) - - instance1 = loadInstanceResponse.body - app.apps.testApp1.instance1 = instance1 - }) - - let user1_instance1 - it("should be able to create new user on instance, via master", async () => { - const master = await getmaster() - user1_instance1 = master.recordApi.getNew(`${newAppKey}/users`, "user") - user1_instance1.name = app.credentials.testAppUser1.username - user1_instance1.createdByMaster = true - master.recordApi.setCustomId(user1_instance1, user1_instance1.name) - /*const lookupResponse = await app.get(`/_master/api/lookup_field/${user1_instance1.key}?fields=instance`) - .set("cookie", app.credentials.masterOwner.cookie) - .expect(statusCodes.OK); - */ - user1_instance1.instance = instance1 - user1_instance1.active = true - //await timeout(100); - await app - .post(`/_master/api/record/${user1_instance1.key}`, user1_instance1) - .set("cookie", app.credentials.masterOwner.cookie) - .expect(statusCodes.OK) - }) - - it("should be able to set password for new user using temporary code", async () => { - const testUserTempCode = await readFile( - `./tests/.data/tempaccess${user1_instance1.name}`, - "utf8" - ) - user1_instance1.password = app.credentials.testAppUser1.password - - await app - .post("/testApp/api/setPasswordFromTemporaryCode", { - username: app.credentials.testAppUser1.username, - tempCode: testUserTempCode, - newPassword: app.credentials.testAppUser1.password, - }) - .expect(statusCodes.OK) - - const response = await app - .post("/testApp/api/authenticate", { - username: app.credentials.testAppUser1.username, - password: app.credentials.testAppUser1.password, - }) - .expect(statusCodes.OK) - - app.credentials.testAppUser1.cookie = response.header["set-cookie"] - }) -} diff --git a/packages/server/tests/helpers.js b/packages/server/tests/helpers.js deleted file mode 100644 index f2f5367df9..0000000000 --- a/packages/server/tests/helpers.js +++ /dev/null @@ -1,8 +0,0 @@ -const timeout = ms => new Promise(resolve => setTimeout(resolve, ms)) - -exports.timeout = timeout - -module.exports.sleep = async (ms, fn, ...args) => { - await timeout(ms) - return await fn(...args) -} diff --git a/packages/server/tests/serveui.js b/packages/server/tests/serveui.js deleted file mode 100644 index cae8658b07..0000000000 --- a/packages/server/tests/serveui.js +++ /dev/null @@ -1,135 +0,0 @@ -const statusCodes = require("../utilities/statusCodes") -const { readFile, writeFile, remove } = require("fs-extra") - -module.exports = app => { - it("should serve unauthenticated index.html as default", async () => { - const response = await app.get("/testApp").expect(statusCodes.OK) - - const expectedIndexHtml = await readFile( - "appPackages/testApp/public/unauthenticated/index.html", - "utf8" - ) - - expect(response.text).toBe(expectedIndexHtml) - }) - - it("should serve specified files when unauthenticated", async () => { - const response = await app.get("/testApp/app.js").expect(statusCodes.OK) - - const expectedFile = await readFile( - "appPackages/testApp/public/unauthenticated/app.js", - "utf8" - ) - - expect(response.text).toBe(expectedFile) - }) - - it("should serve main index.html as default when authenticated", async () => { - const response = await app - .get("/testApp") - .set("cookie", app.credentials.testAppUser1.cookie) - .expect(statusCodes.OK) - - const expectedIndexHtml = await readFile( - "appPackages/testApp/public/main/index.html", - "utf8" - ) - - expect(response.text).toBe(expectedIndexHtml) - }) - - it("should serve specified files when authenticated", async () => { - const response = await app - .get("/testApp/budibase-client.js") - .set("cookie", app.credentials.testAppUser1.cookie) - .expect(statusCodes.OK) - - const expectedFile = await readFile( - "appPackages/testApp/public/main/budibase-client.js", - "utf8" - ) - - expect(response.text).toBe(expectedFile) - }) - - it("should serve file from shared when authenticated", async () => { - const response = await app - .get("/testApp/_shared/shared_file.txt") - .set("cookie", app.credentials.testAppUser1.cookie) - .expect(statusCodes.OK) - - const expectedFile = await readFile( - "appPackages/testApp/public/_shared/shared_file.txt", - "utf8" - ) - - expect(response.text).toBe(expectedFile) - }) - - it("should serve file from shared when not authenticated", async () => { - const response = await app - .get("/testApp/_shared/shared_file.txt") - .expect(statusCodes.OK) - - const expectedFile = await readFile( - "appPackages/testApp/public/_shared/shared_file.txt", - "utf8" - ) - - expect(response.text).toBe(expectedFile) - }) - - it("should serve file from latest when instance is versionless", async () => { - try { - await writeFile( - "appPackages/testApp/public/_shared/new_file_for_versionless_test.txt", - "thats right", - { encoding: "utf8" } - ) - } catch (err) { - // empty - } - - try { - await app - .get("/testApp/_shared/new_file_for_versionless_test.txt") - .set("cookie", app.credentials.user1_versionlessInstance.cookie) - .expect(statusCodes.OK) - } finally { - try { - await remove( - "appPackages/testApp/public/_shared/new_file_for_versionless_test.txt" - ) - } catch (err) { - // empty - } - } - }) - - it("should not serve file from latest when instance has version", async () => { - try { - await writeFile( - "appPackages/testApp/public/_shared/new_file_for_versionless_test.txt", - "thats right", - { encoding: "utf8" } - ) - } catch (err) { - // empty - } - - try { - await app - .get("/testApp/_shared/new_file_for_versionless_test.txt") - .set("cookie", app.credentials.testAppUser1.cookie) - .expect(statusCodes.NOT_FOUND) - } finally { - try { - await remove( - "appPackages/testApp/public/_shared/new_file_for_versionless_test.txt" - ) - } catch (err) { - // empty - } - } - }) -} diff --git a/packages/server/utilities/createAppPackage.js b/packages/server/utilities/createAppPackage.js deleted file mode 100644 index 9d25507656..0000000000 --- a/packages/server/utilities/createAppPackage.js +++ /dev/null @@ -1,69 +0,0 @@ -const { resolve, join } = require("path") -const { getRuntimePackageDirectory } = require("../utilities/runtimePackages") -const injectPlugins = require("./injectedPlugins") -const { cwd } = require("process") - -const appDefinitionPath = appPath => join(appPath, "appDefinition.json") -const pluginsPath = appPath => join(appPath, "plugins.js") -const accessLevelsPath = appPath => join(appPath, "access_levels.json") - -const createAppPackage = (context, appPath) => { - const appDefModule = require(appDefinitionPath(appPath)) - - const pluginsModule = require(pluginsPath(appPath)) - - const accessLevels = require(accessLevelsPath(appPath)) - - return { - appDefinition: appDefModule, - behaviourSources: pluginsModule(context), - appPath, - accessLevels, - ...publicPaths(appPath), - } -} - -const appPackageFolder = (config, appname) => - resolve(cwd(), config.latestPackagesFolder, appname) - -module.exports.appPackageFolder = appPackageFolder - -module.exports.appsFolder = config => appPackageFolder(config, "") - -const applictionVersionPath = (context, appname, versionId) => - join(cwd(), getRuntimePackageDirectory(context, appname, versionId)) - -const publicPaths = appPath => ({ - mainUiPath: resolve(join(appPath, "public", "main")), - unauthenticatedUiPath: resolve(join(appPath, "public", "unauthenticated")), - sharedPath: resolve(join(appPath, "public", "_shared")), -}) - -module.exports.applictionVersionPublicPaths = (context, appname, versionId) => { - const appPath = applictionVersionPath(context, appname, versionId) - return publicPaths(appPath) -} - -module.exports.applictionVersionPackage = async ( - context, - appname, - versionId, - instanceKey -) => { - const pkg = createAppPackage( - context, - applictionVersionPath(context, appname, versionId) - ) - - pkg.appDefinition = constructHierarchy(pkg.appDefinition) - await injectPlugins(pkg, context.master, appname, instanceKey) - return pkg -} - -module.exports.deleteCachedPackage = (context, appname, versionId) => { - const appPath = applictionVersionPath(context, appname, versionId) - - delete require.cache[resolve(appDefinitionPath(appPath))] - delete require.cache[resolve(pluginsPath(appPath))] - delete require.cache[resolve(accessLevelsPath(appPath))] -} diff --git a/packages/server/utilities/injectedPlugins/createUser.js b/packages/server/utilities/injectedPlugins/createUser.js deleted file mode 100644 index 380ea53296..0000000000 --- a/packages/server/utilities/injectedPlugins/createUser.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = ({ masterAppInternal, instanceKey, app }) => async ({ - user, -}) => { - const { bbMaster } = masterAppInternal - const existingUser = await masterAppInternal.getUser(app.id, user.name) - - if (existingUser) return - - const masterUser = bbMaster.recordApi.getNew(`${app.key}/users`, "user") - masterUser.name = user.name - bbMaster.recordApi.setCustomId(masterUser, masterUser.name) - masterUser.createdByMaster = false - masterUser.instance = await bbMaster.recordApi.load(instanceKey) - - masterUser.active = user.enabled - await bbMaster.recordApi.save(masterUser) -} - -exports.timeout = ms => new Promise(resolve => setTimeout(resolve, ms)) diff --git a/packages/server/utilities/injectedPlugins/disableUser.js b/packages/server/utilities/injectedPlugins/disableUser.js deleted file mode 100644 index 0011bb2d58..0000000000 --- a/packages/server/utilities/injectedPlugins/disableUser.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = ({ masterAppInternal, app }) => async ({ username }) => { - await masterAppInternal.disableUser(app, username) -} diff --git a/packages/server/utilities/injectedPlugins/enableUser.js b/packages/server/utilities/injectedPlugins/enableUser.js deleted file mode 100644 index 8a7bfbcf35..0000000000 --- a/packages/server/utilities/injectedPlugins/enableUser.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = ({ masterAppInternal, app }) => async ({ username }) => { - await masterAppInternal.enableUser(app, username) -} diff --git a/packages/server/utilities/injectedPlugins/index.js b/packages/server/utilities/injectedPlugins/index.js deleted file mode 100644 index 76e967227d..0000000000 --- a/packages/server/utilities/injectedPlugins/index.js +++ /dev/null @@ -1,76 +0,0 @@ -const createUser = require("./createUser") -const enableUser = require("./enableUser") -const disableUser = require("./disableUser") - -module.exports = async ( - appPackage, - masterAppInternal, - appName, - instanceKey -) => { - const plugin = await constructPlugin(masterAppInternal, appName, instanceKey) - - appPackage.behaviourSources._injected = plugin - - createActions(appPackage) - createTriggers(appPackage) -} - -const createTriggers = appPackage => { - const appDef = appPackage.appDefinition - appDef.triggers.push({ - actionName: "createUser", - eventName: "authApi:createUser:onComplete", - optionsCreator: "return {user:context.result};", - condition: "", - }) - appDef.triggers.push({ - actionName: "enableUser", - eventName: "authApi:enableUser:onComplete", - optionsCreator: "return {username:context.username};", - condition: "", - }) - appDef.triggers.push({ - actionName: "disableUser", - eventName: "authApi:disableUser:onComplete", - optionsCreator: "return {username:context.username};", - condition: "", - }) -} - -const createActions = appPackage => { - const appDef = appPackage.appDefinition - appDef.actions.push({ - name: "createUser", - behaviourSource: "_injected", - behaviourName: "createUser", - initialOptions: {}, - }) - appDef.actions.push({ - name: "enableUser", - behaviourSource: "_injected", - behaviourName: "enableUser", - initialOptions: {}, - }) - appDef.actions.push({ - name: "disableUser", - behaviourSource: "_injected", - behaviourName: "disableUser", - initialOptions: {}, - }) -} - -const constructPlugin = async (masterAppInternal, appName, instanceKey) => { - const app = await masterAppInternal.getApplication(appName) - const initialiseObj = { - masterAppInternal, - app, - instanceKey, - } - - return { - createUser: createUser(initialiseObj), - enableUser: enableUser(initialiseObj), - disableUser: disableUser(initialiseObj), - } -} diff --git a/packages/server/utilities/runtimePackages.js b/packages/server/utilities/runtimePackages.js deleted file mode 100644 index 95c80ec6da..0000000000 --- a/packages/server/utilities/runtimePackages.js +++ /dev/null @@ -1,34 +0,0 @@ -const { join } = require("path") -const { isString, last } = require("lodash/fp") -const { common } = require("@budibase/core") -const runtimePackagesDirectory = "./runtime_apps" -const LATEST_VERSIONID = "##LATEST##" -const { $, splitKey } = common - -const getRuntimeAppsDirectory = appName => - join(runtimePackagesDirectory, appName) - -const getLatestDirectory = (appContext, appname) => - join(appContext.config.latestPackagesFolder, appname) - -module.exports.LATEST_VERSIONID = LATEST_VERSIONID - -module.exports.runtimePackagesDirectory = runtimePackagesDirectory - -module.exports.getRuntimePackageDirectory = (appId, versionId) => - versionId === LATEST_VERSIONID - ? getLatestDirectory(appId) - : join(getRuntimeAppsDirectory(appName), versionId) - -module.exports.getRuntimeAppsDirectory = getRuntimeAppsDirectory - -// the point of this in mainly to support running in dev -// i.e. if no "versions" are in use, then it will route -// to the latest package -module.exports.determineVersionId = version => { - let versionKey = isString(version) ? version : null - - if (!versionKey && version && version.key) versionKey = version.key - - return versionKey ? $(versionKey, [splitKey, last]) : LATEST_VERSIONID -} diff --git a/packages/server/utilities/targzAppPackage.js b/packages/server/utilities/targzAppPackage.js deleted file mode 100644 index 4db8eff4db..0000000000 --- a/packages/server/utilities/targzAppPackage.js +++ /dev/null @@ -1,119 +0,0 @@ -// Based on https://github.com/lafin/node-targz -// MIT license - -const fs = require("fs") -const tar = require("tar-fs") -const zlib = require("zlib") -const { join, dirname, sep } = require("path") -const { exists, mkdir, unlink, remove, stat } = require("fs-extra") -const { - getRuntimePackageDirectory, - getRuntimeAppsDirectory, -} = require("./runtimePackages") - -module.exports.createTarGzPackage = async (config, appName) => { - const appPath = join(config.latestPackagesFolder, appName) - const distPath = join(appPath, "dist") - - if (!(await exists(distPath))) { - await mkdir(distPath) - } - - const packagePath = `${distPath}/package.tar.gz` - if (await exists(`${packagePath}`)) { - await unlink(packagePath) - } - - try { - await compress(appPath, packagePath) - } catch (e) { - console.log(e) - } - const size = (await stat(packagePath)).size - return { size, path: packagePath } -} - -module.exports.unzipTarGzPackageToRuntime = async ( - context, - src, - appName, - versionId -) => { - const versionDir = getRuntimePackageDirectory(context, appName, versionId) - const appDir = getRuntimeAppsDirectory(appName) - - if (await exists(appDir)) { - if (await exists(versionDir)) { - await remove(versionDir) - } - } else { - await mkdir(appDir) - } - - await mkdir(versionDir) - - await decompress(src, versionDir) -} - -const compress = (src, dest) => - new Promise((resolve, reject) => { - // ensure opts - let opts = { src, dest } - opts.tar = { - ignore: name => - dirname(name) - .split(sep) - .pop() === "dist" || - dirname(name) - .split(sep) - .pop() === "node_modules", - } - opts.gz = opts.gz || {} - - // default gzip config - opts.gz.level = opts.gz.level || 6 - opts.gz.memLevel = opts.gz.memLevel || 6 - - // ensure src and dest - if (!opts.src) return reject("No source for compress!") - if (!opts.dest) return reject("No destination for compress!") - - // go - process.nextTick(function() { - tar - .pack(opts.src, opts.tar) - .on("error", reject) - .pipe(zlib.createGzip(opts.gz).on("error", reject)) - .pipe( - fs - .createWriteStream(opts.dest) - .on("error", reject) - .on("finish", resolve) - ) - }) - }) - -const decompress = (src, dest) => - new Promise((resolve, reject) => { - // ensure opts - let opts = { src, dest } - opts.tar = opts.tar || {} - opts.gz = opts.gz || {} - - // ensure src and dest - if (!opts.src) return reject("No source for decompress!") - if (!opts.dest) return reject("No destination for decompress!") - - // go - process.nextTick(function() { - fs.createReadStream(opts.src) - .on("error", reject) - .pipe(zlib.createGunzip(opts.gz).on("error", reject)) - .pipe( - tar - .extract(opts.dest, opts.tar) - .on("error", reject) - .on("finish", resolve) - ) - }) - }) diff --git a/packages/server/yarn.lock b/packages/server/yarn.lock index 3b1ccddb28..0c379d69ac 100644 --- a/packages/server/yarn.lock +++ b/packages/server/yarn.lock @@ -610,6 +610,11 @@ acorn-globals@^4.1.0: acorn "^6.0.1" acorn-walk "^6.0.1" +acorn-jsx@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe" + integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ== + acorn-walk@^6.0.1: version "6.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" @@ -630,12 +635,17 @@ acorn@^6.0.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== +acorn@^7.1.1: + version "7.1.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf" + integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== + ajv-keywords@^3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@^6.12.0, ajv@^6.12.2: +ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.12.2: version "6.12.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== @@ -672,6 +682,13 @@ ansi-escapes@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== +ansi-escapes@^4.2.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61" + integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== + dependencies: + type-fest "^0.11.0" + ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" @@ -1181,7 +1198,7 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1206,6 +1223,11 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + chokidar@^3.2.2: version "3.3.1" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" @@ -1251,6 +1273,18 @@ cli-boxes@^2.2.0: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d" integrity sha512-gpaBrMAizVEANOpfZp/EEUixTXDyGt7DFzdK5hU+UbWt/J0lB0w20ncZj59Z9a93xHb9u12zF5BS6i9RKbtg4w== +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-width@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" + integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== + cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -1456,7 +1490,7 @@ crc@^3.4.4: dependencies: buffer "^5.1.0" -cross-spawn@^6.0.0: +cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -1519,7 +1553,7 @@ debug@^3.1.0, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.1.0, debug@^4.1.1: +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== @@ -1700,6 +1734,13 @@ dmg-builder@22.6.0: js-yaml "^3.13.1" sanitize-filename "^1.6.3" +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + domexception@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" @@ -1966,11 +2007,83 @@ escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-visitor-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== + +eslint@^6.8.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" + integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.10.0" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^5.0.0" + eslint-utils "^1.4.3" + eslint-visitor-keys "^1.1.0" + espree "^6.1.2" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^7.0.0" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.14" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.3" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" + table "^5.2.3" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + esmangle-evaluator@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/esmangle-evaluator/-/esmangle-evaluator-1.0.1.tgz#620d866ef4861b3311f75766d52a8572bb3c6336" integrity sha1-Yg2GbvSGGzMR91dm1SqFcrs8YzY= +espree@^6.1.2: + version "6.2.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" + integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== + dependencies: + acorn "^7.1.1" + acorn-jsx "^5.2.0" + eslint-visitor-keys "^1.1.0" + esprima-fb@^15001.1.0-dev-harmony-fb: version "15001.1.0-dev-harmony-fb" resolved "https://registry.yarnpkg.com/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz#30a947303c6b8d5e955bee2b99b1d233206a6901" @@ -2001,11 +2114,30 @@ esprima@~3.1.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= -estraverse@^4.2.0: +esquery@^1.0.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" + integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.1.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" + integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== + dependencies: + estraverse "^4.1.0" + +estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== +estraverse@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.1.0.tgz#374309d39fd935ae500e7b92e8a6b4c720e59642" + integrity sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -2084,6 +2216,15 @@ extend@^3.0.0, extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== +external-editor@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" @@ -2165,6 +2306,20 @@ fetch-cookie@0.7.3: es6-denodeify "^0.1.1" tough-cookie "^2.3.3" +figures@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + file-uri-to-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" @@ -2209,6 +2364,20 @@ find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flatted@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138" + integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA== + for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -2306,6 +2475,11 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + gensync@^1.0.0-beta.1: version "1.0.0-beta.1" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.1.tgz#58f4361ff987e5ff6e1e7a210827aa371eaac269" @@ -2342,7 +2516,7 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" -glob-parent@~5.1.0: +glob-parent@^5.0.0, glob-parent@~5.1.0: version "5.1.1" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== @@ -2407,6 +2581,13 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^12.1.0: + version "12.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8" + integrity sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg== + dependencies: + type-fest "^0.8.1" + globalthis@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.1.tgz#40116f5d9c071f9e8fb0037654df1ab3a83b7ef9" @@ -2584,7 +2765,7 @@ humanize-number@0.0.2: resolved "https://registry.yarnpkg.com/humanize-number/-/humanize-number-0.0.2.tgz#11c0af6a471643633588588048f1799541489c18" integrity sha1-EcCvakcWQ2M1iFiASPF5lUFInBg= -iconv-lite@0.4.24, iconv-lite@^0.4.5: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.5: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -2608,6 +2789,11 @@ ignore-by-default@^1.0.1: resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" integrity sha1-SMptcvbGo68Aqa1K5odr44ieKwk= +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + immediate@3.0.6, immediate@~3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" @@ -2618,6 +2804,14 @@ immediate@^3.2.3: resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= +import-fresh@^3.0.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66" + integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + import-lazy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" @@ -2672,6 +2866,25 @@ inline-process-browser@^1.0.0: falafel "^1.0.1" through2 "^0.6.5" +inquirer@^7.0.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.1.0.tgz#1298a01859883e17c7264b82870ae1034f92dd29" + integrity sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg== + dependencies: + ansi-escapes "^4.2.1" + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.15" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.5.3" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" @@ -2816,7 +3029,7 @@ is-generator-function@^1.0.7: resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.7.tgz#d2132e529bb0000a7f80794d4bdf5cd5e5813522" integrity sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw== -is-glob@^4.0.1, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== @@ -3479,6 +3692,11 @@ json-schema@0.2.3: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -3855,7 +4073,7 @@ leven@^3.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== -levn@~0.3.0: +levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= @@ -3938,7 +4156,7 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= -lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.15: +lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== @@ -4079,6 +4297,11 @@ mime@^2.4.4: resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.5.tgz#d8de2ecb92982dedbb6541c9b6841d7f218ea009" integrity sha512-3hQhEUF027BuxZjQA3s7rIv/7VCQPa27hN9u9g87sEkWaKwQPuXOkVKtOeiyUrnWqTDiOs8Ed2rwg733mB0R5w== +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + mimic-response@^1.0.0, mimic-response@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" @@ -4126,6 +4349,11 @@ ms@^2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + mz@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -4371,6 +4599,13 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" +onetime@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" + integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== + dependencies: + mimic-fn "^2.1.0" + only@~0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4" @@ -4381,7 +4616,7 @@ opencollective-postinstall@^2.0.0: resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz#5657f1bede69b6e33a45939b061eb53d3c6c3a89" integrity sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw== -optionator@^0.8.1: +optionator@^0.8.1, optionator@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== @@ -4393,6 +4628,11 @@ optionator@^0.8.1: type-check "~0.3.2" word-wrap "~1.2.3" +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + p-cancelable@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" @@ -4451,6 +4691,13 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -4641,7 +4888,7 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== -progress@^2.0.3: +progress@^2.0.0, progress@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== @@ -4864,6 +5111,11 @@ regexparam@^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" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + registry-auth-token@^4.0.0: version "4.1.1" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-4.1.1.tgz#40a33be1e82539460f94328b0f7f0f84c16d9479" @@ -4957,6 +5209,11 @@ resolve-from@^3.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" integrity sha1-six699nWiBvItuZTM17rywoYh0g= +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + resolve-path@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/resolve-path/-/resolve-path-1.4.0.tgz#c4bda9f5efb2fce65247873ab36bb4d834fe16f7" @@ -4989,11 +5246,26 @@ responselike@^1.0.2: dependencies: lowercase-keys "^1.0.0" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +rimraf@2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + rimraf@^2.5.4, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -5018,6 +5290,18 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== +run-async@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" + integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== + +rxjs@^6.5.3: + version "6.5.5" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.5.tgz#c5c884e3094c8cfee31bf27eb87e54ccfc87f9ec" + integrity sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ== + dependencies: + tslib "^1.9.0" + safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -5084,7 +5368,7 @@ semver-diff@^3.1.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -5178,6 +5462,15 @@ slash@^2.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -5475,6 +5768,11 @@ strip-eof@^1.0.0: resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= +strip-json-comments@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.0.tgz#7638d31422129ecf4457440009fba03f9f9ac180" + integrity sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w== + strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -5542,6 +5840,16 @@ symbol-tree@^3.2.2: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +table@^5.2.3: + version "5.4.6" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e" + integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + tar-fs@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.0.1.tgz#e44086c1c60d31a4f0cf893b1c4e155dabfae9e2" @@ -5586,6 +5894,11 @@ test-exclude@^5.2.3: read-pkg-up "^4.0.0" require-main-filename "^2.0.0" +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + thenify-all@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726" @@ -5620,7 +5933,7 @@ through2@^0.6.2, through2@^0.6.5: readable-stream ">=1.0.33-1 <1.1.0-0" xtend ">=4.0.0 <4.1.0-0" -through@~2.3.4: +through@^2.3.6, through@~2.3.4: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -5630,6 +5943,13 @@ tiny-queue@^0.2.0: resolved "https://registry.yarnpkg.com/tiny-queue/-/tiny-queue-0.2.1.tgz#25a67f2c6e253b2ca941977b5ef7442ef97a6046" integrity sha1-JaZ/LG4lOyypQZd7XvdELvl6YEY= +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -5711,6 +6031,11 @@ truncate-utf8-bytes@^1.0.0: dependencies: utf8-byte-length "^1.0.1" +tslib@^1.9.0: + version "1.11.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.2.tgz#9c79d83272c9a7aaf166f73915c9667ecdde3cc9" + integrity sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg== + tsscmp@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" @@ -5740,6 +6065,11 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" +type-fest@^0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1" + integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== + type-fest@^0.8.0, type-fest@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" @@ -5899,6 +6229,11 @@ uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +v8-compile-cache@^2.0.3: + version "2.1.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e" + integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -6081,6 +6416,13 @@ write-stream@~0.4.3: dependencies: readable-stream "~0.0.2" +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + ws@^5.2.0: version "5.2.2" resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f"