@budibase/server 1.0.49 → 1.0.50-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__mocks__/arangojs.ts +1 -1
- package/__mocks__/aws-sdk.ts +4 -4
- package/__mocks__/mongodb.ts +4 -5
- package/__mocks__/mssql.ts +3 -3
- package/__mocks__/node-fetch.ts +2 -1
- package/__mocks__/pg.ts +3 -5
- package/builder/assets/index.c0cc369d.css +6 -0
- package/builder/assets/{index.2c37968e.js → index.ff2bad21.js} +252 -249
- package/builder/assets/{vendor.f9faf6ab.js → vendor.5ad9695a.js} +202 -106
- package/builder/index.html +3 -3
- package/coverage/clover.xml +3105 -2814
- package/coverage/coverage-final.json +106 -101
- package/coverage/lcov-report/api/controllers/analytics.js.html +1 -1
- package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/controllers/application.js.html +257 -152
- package/coverage/lcov-report/api/controllers/auth.js.html +22 -13
- package/coverage/lcov-report/api/controllers/automation.js.html +39 -69
- package/coverage/lcov-report/api/controllers/backup.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +8 -11
- package/coverage/lcov-report/api/controllers/component.js.html +13 -16
- package/coverage/lcov-report/api/controllers/datasource.js.html +81 -51
- package/coverage/lcov-report/api/controllers/dev.js.html +6 -6
- package/coverage/lcov-report/api/controllers/index.html +78 -78
- package/coverage/lcov-report/api/controllers/integration.js.html +1 -1
- package/coverage/lcov-report/api/controllers/layout.js.html +9 -9
- package/coverage/lcov-report/api/controllers/metadata.js.html +6 -21
- package/coverage/lcov-report/api/controllers/migrations.js.html +119 -0
- package/coverage/lcov-report/api/controllers/permission.js.html +19 -19
- package/coverage/lcov-report/api/controllers/query/index.html +10 -10
- package/coverage/lcov-report/api/controllers/query/index.js.html +38 -35
- package/coverage/lcov-report/api/controllers/query/validation.js.html +6 -6
- package/coverage/lcov-report/api/controllers/role.js.html +16 -16
- package/coverage/lcov-report/api/controllers/routing.js.html +7 -10
- package/coverage/lcov-report/api/controllers/row/external.js.html +48 -141
- package/coverage/lcov-report/api/controllers/row/index.html +55 -40
- package/coverage/lcov-report/api/controllers/row/index.js.html +26 -26
- package/coverage/lcov-report/api/controllers/row/internal.js.html +118 -226
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +52 -34
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +548 -0
- package/coverage/lcov-report/api/controllers/row/utils.js.html +47 -62
- package/coverage/lcov-report/api/controllers/screen.js.html +15 -21
- package/coverage/lcov-report/api/controllers/script.js.html +4 -4
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +599 -0
- package/coverage/lcov-report/api/controllers/table/external.js.html +25 -34
- package/coverage/lcov-report/api/controllers/table/index.html +58 -43
- package/coverage/lcov-report/api/controllers/table/index.js.html +58 -82
- package/coverage/lcov-report/api/controllers/table/internal.js.html +81 -66
- package/coverage/lcov-report/api/controllers/table/utils.js.html +218 -110
- package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
- package/coverage/lcov-report/api/controllers/user.js.html +79 -76
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +4 -4
- package/coverage/lcov-report/api/controllers/view/index.html +16 -16
- package/coverage/lcov-report/api/controllers/view/index.js.html +27 -33
- package/coverage/lcov-report/api/controllers/view/utils.js.html +35 -20
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +7 -7
- package/coverage/lcov-report/api/controllers/webhook.js.html +34 -28
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +8 -8
- package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
- package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
- package/coverage/lcov-report/api/routes/application.js.html +1 -1
- package/coverage/lcov-report/api/routes/auth.js.html +1 -1
- package/coverage/lcov-report/api/routes/automation.js.html +1 -1
- package/coverage/lcov-report/api/routes/backup.js.html +1 -1
- package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
- package/coverage/lcov-report/api/routes/component.js.html +1 -1
- package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
- package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
- package/coverage/lcov-report/api/routes/dev.js.html +1 -1
- package/coverage/lcov-report/api/routes/index.html +18 -18
- package/coverage/lcov-report/api/routes/index.js.html +3 -3
- package/coverage/lcov-report/api/routes/integration.js.html +1 -1
- package/coverage/lcov-report/api/routes/layout.js.html +1 -1
- package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
- package/coverage/lcov-report/api/routes/{hosting.js.html → migrations.js.html} +17 -14
- package/coverage/lcov-report/api/routes/permission.js.html +1 -1
- package/coverage/lcov-report/api/routes/query.js.html +1 -1
- package/coverage/lcov-report/api/routes/role.js.html +1 -1
- package/coverage/lcov-report/api/routes/routing.js.html +1 -1
- package/coverage/lcov-report/api/routes/row.js.html +1 -1
- package/coverage/lcov-report/api/routes/screen.js.html +1 -1
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/static.js.html +17 -2
- package/coverage/lcov-report/api/routes/table.js.html +1 -1
- package/coverage/lcov-report/api/routes/templates.js.html +1 -1
- package/coverage/lcov-report/api/routes/user.js.html +1 -1
- package/coverage/lcov-report/api/routes/view.js.html +1 -1
- package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/actions.js.html +24 -24
- package/coverage/lcov-report/automations/automationUtils.js.html +7 -10
- package/coverage/lcov-report/automations/bullboard.js.html +16 -16
- package/coverage/lcov-report/automations/index.html +18 -18
- package/coverage/lcov-report/automations/index.js.html +1 -1
- package/coverage/lcov-report/automations/steps/bash.js.html +6 -6
- package/coverage/lcov-report/automations/steps/createRow.js.html +13 -22
- package/coverage/lcov-report/automations/steps/delay.js.html +4 -4
- package/coverage/lcov-report/automations/steps/deleteRow.js.html +11 -20
- package/coverage/lcov-report/automations/steps/discord.js.html +7 -7
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +6 -6
- package/coverage/lcov-report/automations/steps/executeScript.js.html +6 -6
- package/coverage/lcov-report/automations/steps/filter.js.html +7 -7
- package/coverage/lcov-report/automations/steps/index.html +13 -13
- package/coverage/lcov-report/automations/steps/integromat.js.html +5 -5
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +8 -8
- package/coverage/lcov-report/automations/steps/queryRows.js.html +10 -10
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +5 -5
- package/coverage/lcov-report/automations/steps/serverLog.js.html +3 -3
- package/coverage/lcov-report/automations/steps/slack.js.html +5 -5
- package/coverage/lcov-report/automations/steps/updateRow.js.html +7 -7
- package/coverage/lcov-report/automations/steps/utils.js.html +3 -3
- package/coverage/lcov-report/automations/steps/zapier.js.html +5 -5
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +2 -2
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +2 -2
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +8 -8
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +2 -2
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +2 -2
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +2 -2
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +2 -2
- package/coverage/lcov-report/automations/triggers.js.html +61 -55
- package/coverage/lcov-report/automations/utils.js.html +54 -42
- package/coverage/lcov-report/constants/index.html +5 -5
- package/coverage/lcov-report/constants/index.js.html +53 -26
- package/coverage/lcov-report/constants/layouts.js.html +5 -5
- package/coverage/lcov-report/constants/screens.js.html +4 -4
- package/coverage/lcov-report/db/client.js.html +18 -18
- package/coverage/lcov-report/db/inMemoryView.js.html +7 -7
- package/coverage/lcov-report/db/index.html +15 -15
- package/coverage/lcov-report/db/index.js.html +3 -3
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +25 -37
- package/coverage/lcov-report/db/linkedRows/index.html +27 -27
- package/coverage/lcov-report/db/linkedRows/index.js.html +51 -96
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +42 -42
- package/coverage/lcov-report/db/newid.js.html +4 -4
- package/coverage/lcov-report/db/utils.js.html +87 -87
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +5 -5
- package/coverage/lcov-report/events/utils.js.html +3 -3
- package/coverage/lcov-report/index.html +135 -120
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
- package/coverage/lcov-report/middleware/authorized.js.html +173 -65
- package/coverage/lcov-report/middleware/builder.js.html +10 -10
- package/coverage/lcov-report/middleware/currentapp.js.html +95 -83
- package/coverage/lcov-report/middleware/index.html +38 -38
- package/coverage/lcov-report/middleware/joi-validator.js.html +3 -3
- package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/usageQuota.js.html +281 -53
- package/coverage/lcov-report/middleware/utils.js.html +2 -2
- package/coverage/lcov-report/threads/automation.js.html +30 -24
- package/coverage/lcov-report/threads/index.html +26 -26
- package/coverage/lcov-report/threads/index.js.html +10 -10
- package/coverage/lcov-report/threads/query.js.html +39 -24
- package/coverage/lcov-report/threads/utils.js.html +14 -14
- package/coverage/lcov-report/utilities/bcrypt.js.html +1 -1
- package/coverage/lcov-report/utilities/budibaseDir.js.html +7 -7
- package/coverage/lcov-report/utilities/centralPath.js.html +4 -4
- package/coverage/lcov-report/utilities/csvParser.js.html +6 -6
- package/coverage/lcov-report/utilities/global.js.html +58 -49
- package/coverage/lcov-report/utilities/index.html +37 -37
- package/coverage/lcov-report/utilities/index.js.html +43 -73
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +8 -8
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +7 -7
- package/coverage/lcov-report/utilities/rowProcessor/index.html +27 -27
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +97 -103
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +75 -27
- package/coverage/lcov-report/utilities/scriptRunner.js.html +5 -5
- package/coverage/lcov-report/utilities/security.js.html +8 -8
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +141 -0
- package/coverage/lcov-report/utilities/usageQuota/index.js.html +359 -0
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +305 -0
- package/coverage/lcov-report/{api/controllers/hosting.js.html → utilities/usageQuota/usageQuoteReset.js.html} +36 -48
- package/coverage/lcov-report/utilities/users.js.html +9 -9
- package/coverage/lcov-report/utilities/workerRequests.js.html +43 -112
- package/coverage/lcov.info +5010 -4425
- package/dist/api/controllers/application.js +90 -60
- package/dist/api/controllers/auth.js +8 -5
- package/dist/api/controllers/automation.js +14 -19
- package/dist/api/controllers/cloud.js +2 -3
- package/dist/api/controllers/component.js +3 -4
- package/dist/api/controllers/datasource.js +20 -10
- package/dist/api/controllers/deploy/Deployment.js +3 -6
- package/dist/api/controllers/deploy/index.js +12 -13
- package/dist/api/controllers/dev.js +5 -5
- package/dist/api/controllers/layout.js +3 -3
- package/dist/api/controllers/metadata.js +4 -4
- package/dist/api/controllers/migrations.js +21 -0
- package/dist/api/controllers/permission.js +4 -4
- package/dist/api/controllers/query/import/index.js +4 -6
- package/dist/api/controllers/query/index.js +11 -10
- package/dist/api/controllers/role.js +5 -5
- package/dist/api/controllers/routing.js +5 -6
- package/dist/api/controllers/row/ExternalRequest.js +90 -67
- package/dist/api/controllers/row/external.js +14 -22
- package/dist/api/controllers/row/internal.js +55 -93
- package/dist/api/controllers/row/internalSearch.js +23 -17
- package/dist/api/controllers/row/staticFormula.js +147 -0
- package/dist/api/controllers/row/utils.js +13 -14
- package/dist/api/controllers/screen.js +5 -7
- package/dist/api/controllers/static/index.js +62 -16
- package/dist/api/controllers/table/bulkFormula.js +159 -0
- package/dist/api/controllers/table/external.js +7 -10
- package/dist/api/controllers/table/index.js +16 -13
- package/dist/api/controllers/table/internal.js +22 -16
- package/dist/api/controllers/table/utils.js +62 -35
- package/dist/api/controllers/user.js +43 -43
- package/dist/api/controllers/view/index.js +8 -10
- package/dist/api/controllers/view/utils.js +9 -4
- package/dist/api/controllers/webhook.js +10 -8
- package/dist/api/routes/index.js +2 -2
- package/dist/api/routes/migrations.js +9 -0
- package/dist/api/routes/static.js +2 -1
- package/dist/api/routes/tests/utilities/TestFunctions.js +37 -17
- package/dist/app.js +35 -5
- package/dist/automations/automationUtils.js +2 -3
- package/dist/automations/steps/createRow.js +3 -5
- package/dist/automations/steps/deleteRow.js +1 -4
- package/dist/automations/steps/updateRow.js +1 -1
- package/dist/automations/triggers.js +27 -25
- package/dist/automations/utils.js +10 -5
- package/dist/constants/index.js +7 -0
- package/dist/db/linkedRows/LinkController.js +3 -7
- package/dist/db/linkedRows/index.js +16 -27
- package/dist/db/linkedRows/linkUtils.js +6 -6
- package/dist/db/views/staticViews.js +9 -10
- package/dist/definitions/datasource.js +1 -0
- package/dist/environment.js +4 -1
- package/dist/integrations/base/sql.js +62 -21
- package/dist/integrations/googlesheets.js +340 -0
- package/dist/integrations/index.js +3 -0
- package/dist/integrations/utils.js +60 -9
- package/dist/middleware/authorized.js +57 -30
- package/dist/middleware/builder.js +2 -2
- package/dist/middleware/currentapp.js +41 -37
- package/dist/middleware/usageQuota.js +82 -15
- package/dist/migrations/functions/appUrls.js +46 -0
- package/dist/migrations/functions/quotas1.js +50 -0
- package/dist/migrations/functions/usageQuotas/index.js +20 -0
- package/dist/migrations/functions/usageQuotas/syncApps.js +29 -0
- package/dist/migrations/functions/usageQuotas/syncRows.js +33 -0
- package/dist/migrations/functions/userEmailViewCasing.js +24 -0
- package/dist/migrations/index.js +62 -0
- package/dist/package.json +8 -5
- package/dist/tests/utilities/TestConfiguration.js +80 -50
- package/dist/threads/automation.js +13 -11
- package/dist/threads/query.js +15 -11
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utilities/fileSystem/index.js +4 -3
- package/dist/utilities/global.js +15 -12
- package/dist/utilities/index.js +7 -17
- package/dist/utilities/routing/index.js +5 -5
- package/dist/utilities/rowProcessor/index.js +23 -17
- package/dist/utilities/rowProcessor/utils.js +14 -4
- package/dist/utilities/{usageQuota.js → usageQuota/index.js} +45 -31
- package/dist/utilities/usageQuota/rows.js +78 -0
- package/dist/utilities/usageQuota/usageQuoteReset.js +16 -0
- package/dist/utilities/users.js +3 -3
- package/dist/utilities/workerRequests.js +4 -24
- package/nodemon.json +1 -1
- package/package.json +9 -6
- package/scripts/integrations/mssql/data/Dockerfile +1 -1
- package/scripts/integrations/mssql/data/setup.sql +17 -4
- package/scripts/integrations/postgres/init.sql +11 -6
- package/scripts/likeCypress.ts +1 -1
- package/src/api/controllers/application.js +85 -50
- package/src/api/controllers/auth.js +8 -5
- package/src/api/controllers/automation.js +13 -23
- package/src/api/controllers/cloud.js +2 -3
- package/src/api/controllers/component.js +3 -4
- package/src/api/controllers/datasource.js +21 -11
- package/src/api/controllers/deploy/Deployment.js +3 -7
- package/src/api/controllers/deploy/index.js +20 -13
- package/src/api/controllers/dev.js +5 -5
- package/src/api/controllers/layout.js +3 -3
- package/src/api/controllers/metadata.js +4 -9
- package/src/api/controllers/migrations.js +13 -0
- package/src/api/controllers/permission.js +4 -4
- package/src/api/controllers/query/import/index.ts +4 -6
- package/src/api/controllers/query/import/tests/index.spec.js +2 -1
- package/src/api/controllers/query/index.js +11 -10
- package/src/api/controllers/role.js +5 -5
- package/src/api/controllers/routing.js +5 -6
- package/src/api/controllers/row/ExternalRequest.ts +67 -43
- package/src/api/controllers/row/external.js +27 -58
- package/src/api/controllers/row/internal.js +54 -90
- package/src/api/controllers/row/internalSearch.js +23 -17
- package/src/api/controllers/row/staticFormula.js +156 -0
- package/src/api/controllers/row/utils.js +13 -18
- package/src/api/controllers/screen.js +5 -7
- package/src/api/controllers/static/index.js +66 -15
- package/src/api/controllers/table/bulkFormula.js +173 -0
- package/src/api/controllers/table/external.js +7 -10
- package/src/api/controllers/table/index.js +20 -28
- package/src/api/controllers/table/internal.js +24 -19
- package/src/api/controllers/table/utils.js +78 -42
- package/src/api/controllers/user.js +46 -45
- package/src/api/controllers/view/index.js +8 -10
- package/src/api/controllers/view/utils.js +9 -4
- package/src/api/controllers/webhook.js +10 -8
- package/src/api/routes/index.js +2 -2
- package/src/api/routes/migrations.js +14 -0
- package/src/api/routes/static.js +5 -0
- package/src/api/routes/tests/application.spec.js +2 -2
- package/src/api/routes/tests/auth.spec.js +1 -2
- package/src/api/routes/tests/automation.spec.js +1 -0
- package/src/api/routes/tests/misc.spec.js +0 -1
- package/src/api/routes/tests/routing.spec.js +21 -12
- package/src/api/routes/tests/row.spec.js +7 -4
- package/src/api/routes/tests/static.spec.js +98 -0
- package/src/api/routes/tests/utilities/TestFunctions.js +39 -17
- package/src/app.ts +18 -5
- package/src/automations/automationUtils.js +2 -3
- package/src/automations/steps/createRow.js +2 -5
- package/src/automations/steps/deleteRow.js +1 -4
- package/src/automations/steps/updateRow.js +1 -1
- package/src/automations/triggers.js +33 -31
- package/src/automations/utils.js +9 -5
- package/src/constants/index.js +9 -0
- package/src/db/linkedRows/LinkController.js +3 -7
- package/src/db/linkedRows/index.js +16 -31
- package/src/db/linkedRows/linkUtils.js +6 -6
- package/src/db/tests/linkController.spec.js +0 -1
- package/src/db/tests/linkTests.spec.js +5 -6
- package/src/db/views/staticViews.js +8 -10
- package/src/definitions/common.ts +3 -0
- package/src/definitions/datasource.ts +3 -0
- package/src/environment.js +4 -1
- package/src/integrations/base/sql.ts +75 -29
- package/src/integrations/googlesheets.ts +353 -0
- package/src/integrations/index.ts +3 -0
- package/src/integrations/tests/sql.spec.js +16 -0
- package/src/integrations/utils.ts +75 -12
- package/src/middleware/authorized.js +66 -30
- package/src/middleware/builder.js +2 -2
- package/src/middleware/currentapp.js +50 -46
- package/src/middleware/tests/authorized.spec.js +13 -6
- package/src/middleware/tests/currentapp.spec.js +6 -0
- package/src/middleware/tests/usageQuota.spec.js +18 -24
- package/src/middleware/usageQuota.js +93 -17
- package/src/migrations/functions/appUrls.ts +34 -0
- package/src/migrations/functions/quotas1.ts +20 -0
- package/src/migrations/functions/tests/appUrls.spec.js +29 -0
- package/src/migrations/functions/tests/quotas1.spec.js +27 -0
- package/src/migrations/functions/tests/userEmailViewCasing.spec.js +25 -0
- package/src/migrations/functions/usageQuotas/index.ts +8 -0
- package/src/migrations/functions/usageQuotas/syncApps.ts +18 -0
- package/src/migrations/functions/usageQuotas/syncRows.ts +22 -0
- package/src/migrations/functions/usageQuotas/tests/syncApps.spec.js +37 -0
- package/src/migrations/functions/usageQuotas/tests/syncRows.spec.js +43 -0
- package/src/migrations/functions/userEmailViewCasing.ts +13 -0
- package/src/migrations/index.ts +56 -0
- package/src/module.d.ts +3 -0
- package/src/tests/utilities/TestConfiguration.js +82 -55
- package/src/threads/automation.js +17 -15
- package/src/threads/query.js +17 -12
- package/src/utilities/fileSystem/index.js +4 -3
- package/src/utilities/global.js +15 -12
- package/src/utilities/index.js +7 -17
- package/src/utilities/routing/index.js +5 -5
- package/src/utilities/rowProcessor/index.js +25 -27
- package/src/utilities/rowProcessor/utils.js +23 -7
- package/src/utilities/tests/usageQuota/usageQuota.spec.js +72 -0
- package/src/utilities/usageQuota/index.js +93 -0
- package/src/utilities/usageQuota/rows.js +75 -0
- package/src/utilities/usageQuota/usageQuoteReset.js +18 -0
- package/src/utilities/users.js +3 -3
- package/src/utilities/workerRequests.js +4 -27
- package/tsconfig.json +2 -1
- package/builder/assets/index.39e01193.css +0 -1
- package/dist/api/controllers/hosting.js +0 -30
- package/dist/api/routes/hosting.js +0 -11
- package/src/api/controllers/hosting.js +0 -22
- package/src/api/routes/hosting.js +0 -13
- package/src/api/routes/tests/hosting.spec.js +0 -36
- package/src/utilities/usageQuota.js +0 -73
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">85.42% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>170/199</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">63.33% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>38/60</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">91.66% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>22/24</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">85.49% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>165/193</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -477,105 +477,65 @@
|
|
|
477
477
|
<a name='L418'></a><a href='#L418'>418</a>
|
|
478
478
|
<a name='L419'></a><a href='#L419'>419</a>
|
|
479
479
|
<a name='L420'></a><a href='#L420'>420</a>
|
|
480
|
-
<a name='L421'></a><a href='#L421'>421</a>
|
|
481
|
-
<a name='L422'></a><a href='#L422'>422</a>
|
|
482
|
-
<a name='L423'></a><a href='#L423'>423</a>
|
|
483
|
-
<a name='L424'></a><a href='#L424'>424</a>
|
|
484
|
-
<a name='L425'></a><a href='#L425'>425</a>
|
|
485
|
-
<a name='L426'></a><a href='#L426'>426</a>
|
|
486
|
-
<a name='L427'></a><a href='#L427'>427</a>
|
|
487
|
-
<a name='L428'></a><a href='#L428'>428</a>
|
|
488
|
-
<a name='L429'></a><a href='#L429'>429</a>
|
|
489
|
-
<a name='L430'></a><a href='#L430'>430</a>
|
|
490
|
-
<a name='L431'></a><a href='#L431'>431</a>
|
|
491
|
-
<a name='L432'></a><a href='#L432'>432</a>
|
|
492
|
-
<a name='L433'></a><a href='#L433'>433</a>
|
|
493
|
-
<a name='L434'></a><a href='#L434'>434</a>
|
|
494
|
-
<a name='L435'></a><a href='#L435'>435</a>
|
|
495
|
-
<a name='L436'></a><a href='#L436'>436</a>
|
|
496
|
-
<a name='L437'></a><a href='#L437'>437</a>
|
|
497
|
-
<a name='L438'></a><a href='#L438'>438</a>
|
|
498
|
-
<a name='L439'></a><a href='#L439'>439</a>
|
|
499
|
-
<a name='L440'></a><a href='#L440'>440</a>
|
|
500
|
-
<a name='L441'></a><a href='#L441'>441</a>
|
|
501
|
-
<a name='L442'></a><a href='#L442'>442</a>
|
|
502
|
-
<a name='L443'></a><a href='#L443'>443</a>
|
|
503
|
-
<a name='L444'></a><a href='#L444'>444</a>
|
|
504
|
-
<a name='L445'></a><a href='#L445'>445</a>
|
|
505
|
-
<a name='L446'></a><a href='#L446'>446</a>
|
|
506
|
-
<a name='L447'></a><a href='#L447'>447</a>
|
|
507
|
-
<a name='L448'></a><a href='#L448'>448</a>
|
|
508
|
-
<a name='L449'></a><a href='#L449'>449</a>
|
|
509
|
-
<a name='L450'></a><a href='#L450'>450</a>
|
|
510
|
-
<a name='L451'></a><a href='#L451'>451</a>
|
|
511
|
-
<a name='L452'></a><a href='#L452'>452</a>
|
|
512
|
-
<a name='L453'></a><a href='#L453'>453</a>
|
|
513
|
-
<a name='L454'></a><a href='#L454'>454</a>
|
|
514
|
-
<a name='L455'></a><a href='#L455'>455</a>
|
|
515
|
-
<a name='L456'></a><a href='#L456'>456</a>
|
|
516
|
-
<a name='L457'></a><a href='#L457'>457</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">34x</span>
|
|
517
|
-
<span class="cline-any cline-yes">34x</span>
|
|
480
|
+
<a name='L421'></a><a href='#L421'>421</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">39x</span>
|
|
518
481
|
<span class="cline-any cline-neutral"> </span>
|
|
519
482
|
<span class="cline-any cline-neutral"> </span>
|
|
520
483
|
<span class="cline-any cline-neutral"> </span>
|
|
521
484
|
<span class="cline-any cline-neutral"> </span>
|
|
522
485
|
<span class="cline-any cline-neutral"> </span>
|
|
523
|
-
<span class="cline-any cline-yes">
|
|
524
|
-
<span class="cline-any cline-yes">
|
|
486
|
+
<span class="cline-any cline-yes">39x</span>
|
|
487
|
+
<span class="cline-any cline-yes">39x</span>
|
|
525
488
|
<span class="cline-any cline-neutral"> </span>
|
|
526
489
|
<span class="cline-any cline-neutral"> </span>
|
|
527
490
|
<span class="cline-any cline-neutral"> </span>
|
|
528
491
|
<span class="cline-any cline-neutral"> </span>
|
|
492
|
+
<span class="cline-any cline-yes">39x</span>
|
|
493
|
+
<span class="cline-any cline-yes">39x</span>
|
|
494
|
+
<span class="cline-any cline-yes">39x</span>
|
|
495
|
+
<span class="cline-any cline-yes">39x</span>
|
|
496
|
+
<span class="cline-any cline-yes">39x</span>
|
|
497
|
+
<span class="cline-any cline-yes">39x</span>
|
|
498
|
+
<span class="cline-any cline-yes">39x</span>
|
|
529
499
|
<span class="cline-any cline-neutral"> </span>
|
|
530
|
-
<span class="cline-any cline-yes">34x</span>
|
|
531
|
-
<span class="cline-any cline-yes">34x</span>
|
|
532
|
-
<span class="cline-any cline-yes">34x</span>
|
|
533
|
-
<span class="cline-any cline-yes">34x</span>
|
|
534
|
-
<span class="cline-any cline-yes">34x</span>
|
|
535
|
-
<span class="cline-any cline-yes">34x</span>
|
|
536
|
-
<span class="cline-any cline-yes">34x</span>
|
|
537
|
-
<span class="cline-any cline-yes">34x</span>
|
|
538
500
|
<span class="cline-any cline-neutral"> </span>
|
|
539
501
|
<span class="cline-any cline-neutral"> </span>
|
|
540
502
|
<span class="cline-any cline-neutral"> </span>
|
|
541
503
|
<span class="cline-any cline-neutral"> </span>
|
|
504
|
+
<span class="cline-any cline-yes">39x</span>
|
|
505
|
+
<span class="cline-any cline-yes">39x</span>
|
|
506
|
+
<span class="cline-any cline-yes">39x</span>
|
|
507
|
+
<span class="cline-any cline-yes">39x</span>
|
|
542
508
|
<span class="cline-any cline-neutral"> </span>
|
|
543
|
-
<span class="cline-any cline-yes">
|
|
544
|
-
<span class="cline-any cline-yes">34x</span>
|
|
509
|
+
<span class="cline-any cline-yes">39x</span>
|
|
545
510
|
<span class="cline-any cline-neutral"> </span>
|
|
546
|
-
<span class="cline-any cline-yes">34x</span>
|
|
547
511
|
<span class="cline-any cline-neutral"> </span>
|
|
548
512
|
<span class="cline-any cline-neutral"> </span>
|
|
549
513
|
<span class="cline-any cline-neutral"> </span>
|
|
550
514
|
<span class="cline-any cline-neutral"> </span>
|
|
551
515
|
<span class="cline-any cline-neutral"> </span>
|
|
516
|
+
<span class="cline-any cline-yes">6x</span>
|
|
517
|
+
<span class="cline-any cline-yes">6x</span>
|
|
518
|
+
<span class="cline-any cline-yes">6x</span>
|
|
552
519
|
<span class="cline-any cline-neutral"> </span>
|
|
553
|
-
<span class="cline-any cline-yes">
|
|
554
|
-
<span class="cline-any cline-
|
|
520
|
+
<span class="cline-any cline-yes">6x</span>
|
|
521
|
+
<span class="cline-any cline-yes">6x</span>
|
|
522
|
+
<span class="cline-any cline-yes">6x</span>
|
|
555
523
|
<span class="cline-any cline-neutral"> </span>
|
|
556
524
|
<span class="cline-any cline-neutral"> </span>
|
|
557
|
-
<span class="cline-any cline-yes">
|
|
558
|
-
<span class="cline-any cline-no"> </span>
|
|
525
|
+
<span class="cline-any cline-yes">1x</span>
|
|
559
526
|
<span class="cline-any cline-no"> </span>
|
|
560
527
|
<span class="cline-any cline-neutral"> </span>
|
|
561
|
-
<span class="cline-any cline-
|
|
562
|
-
<span class="cline-any cline-no"> </span>
|
|
528
|
+
<span class="cline-any cline-yes">1x</span>
|
|
563
529
|
<span class="cline-any cline-no"> </span>
|
|
564
530
|
<span class="cline-any cline-neutral"> </span>
|
|
565
531
|
<span class="cline-any cline-neutral"> </span>
|
|
566
|
-
<span class="cline-any cline-
|
|
532
|
+
<span class="cline-any cline-yes">5x</span>
|
|
567
533
|
<span class="cline-any cline-no"> </span>
|
|
568
534
|
<span class="cline-any cline-neutral"> </span>
|
|
535
|
+
<span class="cline-any cline-yes">5x</span>
|
|
569
536
|
<span class="cline-any cline-no"> </span>
|
|
570
537
|
<span class="cline-any cline-neutral"> </span>
|
|
571
|
-
<span class="cline-any cline-
|
|
572
|
-
<span class="cline-any cline-neutral"> </span>
|
|
573
|
-
<span class="cline-any cline-yes">70x</span>
|
|
574
|
-
<span class="cline-any cline-yes">70x</span>
|
|
575
|
-
<span class="cline-any cline-neutral"> </span>
|
|
576
|
-
<span class="cline-any cline-yes">70x</span>
|
|
577
|
-
<span class="cline-any cline-yes">70x</span>
|
|
578
|
-
<span class="cline-any cline-neutral"> </span>
|
|
538
|
+
<span class="cline-any cline-yes">5x</span>
|
|
579
539
|
<span class="cline-any cline-neutral"> </span>
|
|
580
540
|
<span class="cline-any cline-neutral"> </span>
|
|
581
541
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -594,34 +554,7 @@
|
|
|
594
554
|
<span class="cline-any cline-yes">5x</span>
|
|
595
555
|
<span class="cline-any cline-neutral"> </span>
|
|
596
556
|
<span class="cline-any cline-neutral"> </span>
|
|
597
|
-
<span class="cline-any cline-
|
|
598
|
-
<span class="cline-any cline-yes">6x</span>
|
|
599
|
-
<span class="cline-any cline-yes">6x</span>
|
|
600
|
-
<span class="cline-any cline-yes">6x</span>
|
|
601
|
-
<span class="cline-any cline-neutral"> </span>
|
|
602
|
-
<span class="cline-any cline-yes">6x</span>
|
|
603
|
-
<span class="cline-any cline-yes">6x</span>
|
|
604
|
-
<span class="cline-any cline-yes">6x</span>
|
|
605
|
-
<span class="cline-any cline-neutral"> </span>
|
|
606
|
-
<span class="cline-any cline-neutral"> </span>
|
|
607
|
-
<span class="cline-any cline-yes">1x</span>
|
|
608
|
-
<span class="cline-any cline-no"> </span>
|
|
609
|
-
<span class="cline-any cline-neutral"> </span>
|
|
610
|
-
<span class="cline-any cline-yes">1x</span>
|
|
611
|
-
<span class="cline-any cline-no"> </span>
|
|
612
|
-
<span class="cline-any cline-neutral"> </span>
|
|
613
|
-
<span class="cline-any cline-neutral"> </span>
|
|
614
|
-
<span class="cline-any cline-yes">5x</span>
|
|
615
|
-
<span class="cline-any cline-no"> </span>
|
|
616
|
-
<span class="cline-any cline-neutral"> </span>
|
|
617
|
-
<span class="cline-any cline-yes">5x</span>
|
|
618
|
-
<span class="cline-any cline-no"> </span>
|
|
619
|
-
<span class="cline-any cline-neutral"> </span>
|
|
620
|
-
<span class="cline-any cline-yes">5x</span>
|
|
621
|
-
<span class="cline-any cline-neutral"> </span>
|
|
622
|
-
<span class="cline-any cline-neutral"> </span>
|
|
623
|
-
<span class="cline-any cline-yes">34x</span>
|
|
624
|
-
<span class="cline-any cline-yes">5x</span>
|
|
557
|
+
<span class="cline-any cline-yes">39x</span>
|
|
625
558
|
<span class="cline-any cline-yes">5x</span>
|
|
626
559
|
<span class="cline-any cline-yes">5x</span>
|
|
627
560
|
<span class="cline-any cline-yes">5x</span>
|
|
@@ -667,7 +600,6 @@
|
|
|
667
600
|
<span class="cline-any cline-neutral"> </span>
|
|
668
601
|
<span class="cline-any cline-neutral"> </span>
|
|
669
602
|
<span class="cline-any cline-neutral"> </span>
|
|
670
|
-
<span class="cline-any cline-neutral"> </span>
|
|
671
603
|
<span class="cline-any cline-yes">4x</span>
|
|
672
604
|
<span class="cline-any cline-neutral"> </span>
|
|
673
605
|
<span class="cline-any cline-yes">4x</span>
|
|
@@ -680,42 +612,45 @@
|
|
|
680
612
|
<span class="cline-any cline-yes">4x</span>
|
|
681
613
|
<span class="cline-any cline-neutral"> </span>
|
|
682
614
|
<span class="cline-any cline-neutral"> </span>
|
|
683
|
-
<span class="cline-any cline-yes">34x</span>
|
|
684
|
-
<span class="cline-any cline-yes">67x</span>
|
|
685
|
-
<span class="cline-any cline-yes">67x</span>
|
|
686
|
-
<span class="cline-any cline-yes">67x</span>
|
|
687
|
-
<span class="cline-any cline-yes">67x</span>
|
|
688
615
|
<span class="cline-any cline-neutral"> </span>
|
|
689
|
-
<span class="cline-any cline-yes">67x</span>
|
|
690
|
-
<span class="cline-any cline-yes">67x</span>
|
|
691
616
|
<span class="cline-any cline-neutral"> </span>
|
|
692
617
|
<span class="cline-any cline-neutral"> </span>
|
|
618
|
+
<span class="cline-any cline-yes">39x</span>
|
|
619
|
+
<span class="cline-any cline-yes">70x</span>
|
|
620
|
+
<span class="cline-any cline-yes">70x</span>
|
|
621
|
+
<span class="cline-any cline-yes">70x</span>
|
|
693
622
|
<span class="cline-any cline-neutral"> </span>
|
|
694
|
-
<span class="cline-any cline-yes">
|
|
695
|
-
<span class="cline-any cline-yes">
|
|
696
|
-
<span class="cline-any cline-yes">67x</span>
|
|
623
|
+
<span class="cline-any cline-yes">70x</span>
|
|
624
|
+
<span class="cline-any cline-yes">70x</span>
|
|
697
625
|
<span class="cline-any cline-neutral"> </span>
|
|
698
626
|
<span class="cline-any cline-neutral"> </span>
|
|
699
627
|
<span class="cline-any cline-neutral"> </span>
|
|
628
|
+
<span class="cline-any cline-yes">70x</span>
|
|
629
|
+
<span class="cline-any cline-yes">70x</span>
|
|
630
|
+
<span class="cline-any cline-yes">70x</span>
|
|
700
631
|
<span class="cline-any cline-neutral"> </span>
|
|
701
|
-
<span class="cline-any cline-
|
|
632
|
+
<span class="cline-any cline-neutral"> </span>
|
|
633
|
+
<span class="cline-any cline-neutral"> </span>
|
|
634
|
+
<span class="cline-any cline-neutral"> </span>
|
|
635
|
+
<span class="cline-any cline-yes">70x</span>
|
|
702
636
|
<span class="cline-any cline-no"> </span>
|
|
703
637
|
<span class="cline-any cline-neutral"> </span>
|
|
704
638
|
<span class="cline-any cline-neutral"> </span>
|
|
705
639
|
<span class="cline-any cline-neutral"> </span>
|
|
706
|
-
<span class="cline-any cline-yes">
|
|
640
|
+
<span class="cline-any cline-yes">70x</span>
|
|
707
641
|
<span class="cline-any cline-neutral"> </span>
|
|
708
642
|
<span class="cline-any cline-neutral"> </span>
|
|
709
643
|
<span class="cline-any cline-neutral"> </span>
|
|
710
644
|
<span class="cline-any cline-neutral"> </span>
|
|
711
645
|
<span class="cline-any cline-neutral"> </span>
|
|
712
646
|
<span class="cline-any cline-neutral"> </span>
|
|
647
|
+
<span class="cline-any cline-yes">69x</span>
|
|
713
648
|
<span class="cline-any cline-neutral"> </span>
|
|
714
|
-
<span class="cline-any cline-yes">66x</span>
|
|
715
649
|
<span class="cline-any cline-neutral"> </span>
|
|
716
650
|
<span class="cline-any cline-neutral"> </span>
|
|
717
|
-
<span class="cline-any cline-
|
|
718
|
-
<span class="cline-any cline-
|
|
651
|
+
<span class="cline-any cline-neutral"> </span>
|
|
652
|
+
<span class="cline-any cline-neutral"> </span>
|
|
653
|
+
<span class="cline-any cline-yes">39x</span>
|
|
719
654
|
<span class="cline-any cline-yes">7x</span>
|
|
720
655
|
<span class="cline-any cline-neutral"> </span>
|
|
721
656
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -777,8 +712,7 @@
|
|
|
777
712
|
<span class="cline-any cline-yes">5x</span>
|
|
778
713
|
<span class="cline-any cline-neutral"> </span>
|
|
779
714
|
<span class="cline-any cline-neutral"> </span>
|
|
780
|
-
<span class="cline-any cline-yes">
|
|
781
|
-
<span class="cline-any cline-yes">5x</span>
|
|
715
|
+
<span class="cline-any cline-yes">39x</span>
|
|
782
716
|
<span class="cline-any cline-yes">5x</span>
|
|
783
717
|
<span class="cline-any cline-neutral"> </span>
|
|
784
718
|
<span class="cline-any cline-yes">5x</span>
|
|
@@ -787,8 +721,7 @@
|
|
|
787
721
|
<span class="cline-any cline-yes">5x</span>
|
|
788
722
|
<span class="cline-any cline-neutral"> </span>
|
|
789
723
|
<span class="cline-any cline-neutral"> </span>
|
|
790
|
-
<span class="cline-any cline-yes">
|
|
791
|
-
<span class="cline-any cline-yes">18x</span>
|
|
724
|
+
<span class="cline-any cline-yes">39x</span>
|
|
792
725
|
<span class="cline-any cline-yes">18x</span>
|
|
793
726
|
<span class="cline-any cline-yes">18x</span>
|
|
794
727
|
<span class="cline-any cline-yes">18x</span>
|
|
@@ -796,8 +729,7 @@
|
|
|
796
729
|
<span class="cline-any cline-yes">15x</span>
|
|
797
730
|
<span class="cline-any cline-neutral"> </span>
|
|
798
731
|
<span class="cline-any cline-neutral"> </span>
|
|
799
|
-
<span class="cline-any cline-yes">
|
|
800
|
-
<span class="cline-any cline-yes">3x</span>
|
|
732
|
+
<span class="cline-any cline-yes">39x</span>
|
|
801
733
|
<span class="cline-any cline-yes">3x</span>
|
|
802
734
|
<span class="cline-any cline-yes">3x</span>
|
|
803
735
|
<span class="cline-any cline-yes">3x</span>
|
|
@@ -815,6 +747,7 @@
|
|
|
815
747
|
<span class="cline-any cline-neutral"> </span>
|
|
816
748
|
<span class="cline-any cline-neutral"> </span>
|
|
817
749
|
<span class="cline-any cline-neutral"> </span>
|
|
750
|
+
<span class="cline-any cline-yes">2x</span>
|
|
818
751
|
<span class="cline-any cline-neutral"> </span>
|
|
819
752
|
<span class="cline-any cline-yes">2x</span>
|
|
820
753
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -831,8 +764,7 @@
|
|
|
831
764
|
<span class="cline-any cline-yes">2x</span>
|
|
832
765
|
<span class="cline-any cline-neutral"> </span>
|
|
833
766
|
<span class="cline-any cline-neutral"> </span>
|
|
834
|
-
<span class="cline-any cline-yes">
|
|
835
|
-
<span class="cline-any cline-yes">2x</span>
|
|
767
|
+
<span class="cline-any cline-yes">39x</span>
|
|
836
768
|
<span class="cline-any cline-yes">2x</span>
|
|
837
769
|
<span class="cline-any cline-yes">2x</span>
|
|
838
770
|
<span class="cline-any cline-yes">2x</span>
|
|
@@ -850,7 +782,6 @@
|
|
|
850
782
|
<span class="cline-any cline-neutral"> </span>
|
|
851
783
|
<span class="cline-any cline-neutral"> </span>
|
|
852
784
|
<span class="cline-any cline-neutral"> </span>
|
|
853
|
-
<span class="cline-any cline-neutral"> </span>
|
|
854
785
|
<span class="cline-any cline-yes">2x</span>
|
|
855
786
|
<span class="cline-any cline-no"> </span>
|
|
856
787
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -867,9 +798,10 @@
|
|
|
867
798
|
<span class="cline-any cline-yes">2x</span>
|
|
868
799
|
<span class="cline-any cline-yes">2x</span>
|
|
869
800
|
<span class="cline-any cline-yes">2x</span>
|
|
801
|
+
<span class="cline-any cline-yes">2x</span>
|
|
870
802
|
<span class="cline-any cline-neutral"> </span>
|
|
871
803
|
<span class="cline-any cline-neutral"> </span>
|
|
872
|
-
<span class="cline-any cline-yes">
|
|
804
|
+
<span class="cline-any cline-yes">39x</span>
|
|
873
805
|
<span class="cline-any cline-neutral"> </span>
|
|
874
806
|
<span class="cline-any cline-yes">1x</span>
|
|
875
807
|
<span class="cline-any cline-no"> </span>
|
|
@@ -880,7 +812,6 @@
|
|
|
880
812
|
<span class="cline-any cline-yes">1x</span>
|
|
881
813
|
<span class="cline-any cline-yes">1x</span>
|
|
882
814
|
<span class="cline-any cline-yes">1x</span>
|
|
883
|
-
<span class="cline-any cline-yes">1x</span>
|
|
884
815
|
<span class="cline-any cline-neutral"> </span>
|
|
885
816
|
<span class="cline-any cline-neutral"> </span>
|
|
886
817
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -902,16 +833,14 @@
|
|
|
902
833
|
<span class="cline-any cline-yes">1x</span>
|
|
903
834
|
<span class="cline-any cline-neutral"> </span>
|
|
904
835
|
<span class="cline-any cline-neutral"> </span>
|
|
905
|
-
<span class="cline-any cline-yes">
|
|
836
|
+
<span class="cline-any cline-yes">39x</span>
|
|
906
837
|
<span class="cline-any cline-yes">2x</span>
|
|
907
838
|
<span class="cline-any cline-neutral"> </span>
|
|
908
839
|
<span class="cline-any cline-neutral"> </span>
|
|
909
840
|
<span class="cline-any cline-neutral"> </span>
|
|
910
841
|
<span class="cline-any cline-neutral"> </span>
|
|
911
842
|
<span class="cline-any cline-neutral"> </span>
|
|
912
|
-
<span class="cline-any cline-
|
|
913
|
-
<span class="cline-any cline-yes">34x</span>
|
|
914
|
-
<span class="cline-any cline-yes">1x</span>
|
|
843
|
+
<span class="cline-any cline-yes">39x</span>
|
|
915
844
|
<span class="cline-any cline-yes">1x</span>
|
|
916
845
|
<span class="cline-any cline-yes">1x</span>
|
|
917
846
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -926,7 +855,6 @@
|
|
|
926
855
|
<span class="cline-any cline-neutral"> </span>
|
|
927
856
|
<span class="cline-any cline-neutral"> </span>
|
|
928
857
|
<span class="cline-any cline-neutral"> </span>
|
|
929
|
-
<span class="cline-any cline-neutral"> </span>
|
|
930
858
|
<span class="cline-any cline-yes">1x</span>
|
|
931
859
|
<span class="cline-any cline-neutral"> </span>
|
|
932
860
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -969,11 +897,10 @@
|
|
|
969
897
|
<span class="cline-any cline-neutral"> </span>
|
|
970
898
|
<span class="cline-any cline-yes">1x</span>
|
|
971
899
|
<span class="cline-any cline-neutral"> </span>
|
|
972
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const
|
|
973
|
-
const linkRows = require("../../../db/linkedRows")
|
|
900
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">const linkRows = require("../../../db/linkedRows")
|
|
974
901
|
const {
|
|
975
|
-
getRowParams,
|
|
976
902
|
generateRowID,
|
|
903
|
+
getRowParams,
|
|
977
904
|
DocumentTypes,
|
|
978
905
|
InternalTables,
|
|
979
906
|
} = require("../../../db/utils")
|
|
@@ -981,11 +908,9 @@ const userController = require("../user")
|
|
|
981
908
|
const {
|
|
982
909
|
inputProcessing,
|
|
983
910
|
outputProcessing,
|
|
984
|
-
processAutoColumn,
|
|
985
911
|
cleanupAttachments,
|
|
986
912
|
} = require("../../../utilities/rowProcessor")
|
|
987
913
|
const { FieldTypes } = require("../../../constants")
|
|
988
|
-
const { isEqual } = require("lodash")
|
|
989
914
|
const { validate, findRow } = require("./utils")
|
|
990
915
|
const { fullSearch, paginatedSearch } = require("./internalSearch")
|
|
991
916
|
const { getGlobalUsersFromMetadata } = require("../../../utilities/global")
|
|
@@ -998,6 +923,8 @@ const {
|
|
|
998
923
|
getFromMemoryDoc,
|
|
999
924
|
} = require("../view/utils")
|
|
1000
925
|
const { cloneDeep } = require("lodash/fp")
|
|
926
|
+
const { getAppDB } = require("@budibase/backend-core/context")
|
|
927
|
+
const { finaliseRow, updateRelatedFormula } = require("./staticFormula")
|
|
1001
928
|
|
|
1002
929
|
const CALCULATION_TYPES = {
|
|
1003
930
|
SUM: "sum",
|
|
@@ -1005,51 +932,6 @@ const CALCULATION_TYPES = {
|
|
|
1005
932
|
STATS: "stats",
|
|
1006
933
|
}
|
|
1007
934
|
|
|
1008
|
-
async function storeResponse(ctx, db, row, oldTable, table) {
|
|
1009
|
-
row.type = "row"
|
|
1010
|
-
// don't worry about rev, tables handle rev/lastID updates
|
|
1011
|
-
// if another row has been written since processing this will
|
|
1012
|
-
// handle the auto ID clash
|
|
1013
|
-
<span class="missing-if-branch" title="if path not taken" >I</span>if (!isEqual(oldTable, table)) {
|
|
1014
|
-
<span class="cstat-no" title="statement not covered" > try {</span>
|
|
1015
|
-
<span class="cstat-no" title="statement not covered" > await db.put(table)</span>
|
|
1016
|
-
} catch (err) {
|
|
1017
|
-
<span class="cstat-no" title="statement not covered" > if (err.status === 409) {</span>
|
|
1018
|
-
const updatedTable = <span class="cstat-no" title="statement not covered" >await db.get(table._id)</span>
|
|
1019
|
-
let response = <span class="cstat-no" title="statement not covered" >processAutoColumn(null, updatedTable, row, {</span>
|
|
1020
|
-
reprocessing: true,
|
|
1021
|
-
})
|
|
1022
|
-
<span class="cstat-no" title="statement not covered" > await db.put(response.table)</span>
|
|
1023
|
-
<span class="cstat-no" title="statement not covered" > row = response.row</span>
|
|
1024
|
-
} else {
|
|
1025
|
-
<span class="cstat-no" title="statement not covered" > throw err</span>
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
const response = await db.put(row)
|
|
1030
|
-
row._rev = response.rev
|
|
1031
|
-
// process the row before return, to include relationships
|
|
1032
|
-
row = await outputProcessing(ctx, table, row, { squash: false })
|
|
1033
|
-
return { row, table }
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
// doesn't do the outputProcessing
|
|
1037
|
-
async function getRawTableData(ctx, db, tableId) {
|
|
1038
|
-
let rows
|
|
1039
|
-
<span class="missing-if-branch" title="if path not taken" >I</span>if (tableId === InternalTables.USER_METADATA) {
|
|
1040
|
-
<span class="cstat-no" title="statement not covered" > await userController.fetchMetadata(ctx)</span>
|
|
1041
|
-
<span class="cstat-no" title="statement not covered" > rows = ctx.body</span>
|
|
1042
|
-
} else {
|
|
1043
|
-
const response = await db.allDocs(
|
|
1044
|
-
getRowParams(tableId, null, {
|
|
1045
|
-
include_docs: true,
|
|
1046
|
-
})
|
|
1047
|
-
)
|
|
1048
|
-
rows = response.rows.map(row => row.doc)
|
|
1049
|
-
}
|
|
1050
|
-
return rows
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
935
|
async function getView(db, viewName) {
|
|
1054
936
|
let mainGetter = env.SELF_HOSTED ? getFromDesignDoc : <span class="branch-1 cbranch-no" title="branch not covered" >getFromMemoryDoc</span>
|
|
1055
937
|
let secondaryGetter = env.SELF_HOSTED ? getFromMemoryDoc : <span class="branch-1 cbranch-no" title="branch not covered" >getFromDesignDoc</span>
|
|
@@ -1076,9 +958,24 @@ async function getView(db, viewName) {
|
|
|
1076
958
|
return viewInfo
|
|
1077
959
|
}
|
|
1078
960
|
|
|
961
|
+
async function getRawTableData(ctx, db, tableId) {
|
|
962
|
+
let rows
|
|
963
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (tableId === InternalTables.USER_METADATA) {
|
|
964
|
+
<span class="cstat-no" title="statement not covered" > await userController.fetchMetadata(ctx)</span>
|
|
965
|
+
<span class="cstat-no" title="statement not covered" > rows = ctx.body</span>
|
|
966
|
+
} else {
|
|
967
|
+
const response = await db.allDocs(
|
|
968
|
+
getRowParams(tableId, null, {
|
|
969
|
+
include_docs: true,
|
|
970
|
+
})
|
|
971
|
+
)
|
|
972
|
+
rows = response.rows.map(row => row.doc)
|
|
973
|
+
}
|
|
974
|
+
return rows
|
|
975
|
+
}
|
|
976
|
+
|
|
1079
977
|
exports.patch = async ctx => {
|
|
1080
|
-
const
|
|
1081
|
-
const db = new CouchDB(appId)
|
|
978
|
+
const db = getAppDB()
|
|
1082
979
|
const inputs = ctx.request.body
|
|
1083
980
|
const tableId = inputs.tableId
|
|
1084
981
|
const isUserTable = tableId === InternalTables.USER_METADATA
|
|
@@ -1117,14 +1014,13 @@ exports.patch = async ctx => {
|
|
|
1117
1014
|
|
|
1118
1015
|
// returned row is cleaned and prepared for writing to DB
|
|
1119
1016
|
row = await linkRows.updateLinks({
|
|
1120
|
-
appId,
|
|
1121
1017
|
eventType: linkRows.EventType.ROW_UPDATE,
|
|
1122
1018
|
row,
|
|
1123
1019
|
tableId: row.tableId,
|
|
1124
1020
|
table,
|
|
1125
1021
|
})
|
|
1126
1022
|
// check if any attachments removed
|
|
1127
|
-
await cleanupAttachments(
|
|
1023
|
+
await cleanupAttachments(table, { oldRow, row })
|
|
1128
1024
|
|
|
1129
1025
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (isUserTable) {
|
|
1130
1026
|
// the row has been updated, need to put it into the ctx
|
|
@@ -1133,12 +1029,14 @@ exports.patch = async ctx => {
|
|
|
1133
1029
|
<span class="cstat-no" title="statement not covered" > return { row: ctx.body, table }</span>
|
|
1134
1030
|
}
|
|
1135
1031
|
|
|
1136
|
-
return
|
|
1032
|
+
return finaliseRow(table, row, {
|
|
1033
|
+
oldTable: dbTable,
|
|
1034
|
+
updateFormula: true,
|
|
1035
|
+
})
|
|
1137
1036
|
}
|
|
1138
1037
|
|
|
1139
1038
|
exports.save = async function (ctx) {
|
|
1140
|
-
const
|
|
1141
|
-
const db = new CouchDB(appId)
|
|
1039
|
+
const db = getAppDB()
|
|
1142
1040
|
let inputs = ctx.request.body
|
|
1143
1041
|
inputs.tableId = ctx.params.tableId
|
|
1144
1042
|
|
|
@@ -1160,18 +1058,19 @@ exports.save = async function (ctx) {
|
|
|
1160
1058
|
|
|
1161
1059
|
// make sure link rows are up to date
|
|
1162
1060
|
row = await linkRows.updateLinks({
|
|
1163
|
-
appId,
|
|
1164
1061
|
eventType: linkRows.EventType.ROW_SAVE,
|
|
1165
1062
|
row,
|
|
1166
1063
|
tableId: row.tableId,
|
|
1167
1064
|
table,
|
|
1168
1065
|
})
|
|
1169
1066
|
|
|
1170
|
-
return
|
|
1067
|
+
return finaliseRow(table, row, {
|
|
1068
|
+
oldTable: dbTable,
|
|
1069
|
+
updateFormula: true,
|
|
1070
|
+
})
|
|
1171
1071
|
}
|
|
1172
1072
|
|
|
1173
1073
|
exports.fetchView = async ctx => {
|
|
1174
|
-
const appId = ctx.appId
|
|
1175
1074
|
const viewName = ctx.params.viewName
|
|
1176
1075
|
|
|
1177
1076
|
// if this is a table view being looked for just transfer to that
|
|
@@ -1180,7 +1079,7 @@ exports.fetchView = async ctx => {
|
|
|
1180
1079
|
return exports.fetch(ctx)
|
|
1181
1080
|
}
|
|
1182
1081
|
|
|
1183
|
-
const db =
|
|
1082
|
+
const db = getAppDB()
|
|
1184
1083
|
const { calculation, group, field } = ctx.query
|
|
1185
1084
|
const viewInfo = await getView(db, viewName)
|
|
1186
1085
|
let response
|
|
@@ -1207,7 +1106,7 @@ exports.fetchView = async ctx => {
|
|
|
1207
1106
|
schema: {},
|
|
1208
1107
|
}
|
|
1209
1108
|
}
|
|
1210
|
-
rows = await outputProcessing(
|
|
1109
|
+
rows = await outputProcessing(table, response.rows)
|
|
1211
1110
|
}
|
|
1212
1111
|
|
|
1213
1112
|
if (calculation === CALCULATION_TYPES.STATS) {
|
|
@@ -1234,27 +1133,24 @@ exports.fetchView = async ctx => {
|
|
|
1234
1133
|
}
|
|
1235
1134
|
|
|
1236
1135
|
exports.fetch = async ctx => {
|
|
1237
|
-
const
|
|
1238
|
-
const db = new CouchDB(appId)
|
|
1136
|
+
const db = getAppDB()
|
|
1239
1137
|
|
|
1240
1138
|
const tableId = ctx.params.tableId
|
|
1241
1139
|
let table = await db.get(tableId)
|
|
1242
1140
|
let rows = await getRawTableData(ctx, db, tableId)
|
|
1243
|
-
return outputProcessing(
|
|
1141
|
+
return outputProcessing(table, rows)
|
|
1244
1142
|
}
|
|
1245
1143
|
|
|
1246
1144
|
exports.find = async ctx => {
|
|
1247
|
-
const
|
|
1248
|
-
const db = new CouchDB(appId)
|
|
1145
|
+
const db = getAppDB()
|
|
1249
1146
|
const table = await db.get(ctx.params.tableId)
|
|
1250
|
-
let row = await findRow(ctx,
|
|
1251
|
-
row = await outputProcessing(
|
|
1147
|
+
let row = await findRow(ctx, ctx.params.tableId, ctx.params.rowId)
|
|
1148
|
+
row = await outputProcessing(table, row)
|
|
1252
1149
|
return row
|
|
1253
1150
|
}
|
|
1254
1151
|
|
|
1255
1152
|
exports.destroy = async function (ctx) {
|
|
1256
|
-
const
|
|
1257
|
-
const db = new CouchDB(appId)
|
|
1153
|
+
const db = getAppDB()
|
|
1258
1154
|
const { _id, _rev } = ctx.request.body
|
|
1259
1155
|
let row = await db.get(_id)
|
|
1260
1156
|
|
|
@@ -1263,16 +1159,17 @@ exports.destroy = async function (ctx) {
|
|
|
1263
1159
|
}
|
|
1264
1160
|
const table = await db.get(row.tableId)
|
|
1265
1161
|
// update the row to include full relationships before deleting them
|
|
1266
|
-
row = await outputProcessing(
|
|
1162
|
+
row = await outputProcessing(table, row, { squash: false })
|
|
1267
1163
|
// now remove the relationships
|
|
1268
1164
|
await linkRows.updateLinks({
|
|
1269
|
-
appId,
|
|
1270
1165
|
eventType: linkRows.EventType.ROW_DELETE,
|
|
1271
1166
|
row,
|
|
1272
1167
|
tableId: row.tableId,
|
|
1273
1168
|
})
|
|
1274
1169
|
// remove any attachments that were on the row from object storage
|
|
1275
|
-
await cleanupAttachments(
|
|
1170
|
+
await cleanupAttachments(table, { row })
|
|
1171
|
+
// remove any static formula
|
|
1172
|
+
await updateRelatedFormula(table, row)
|
|
1276
1173
|
|
|
1277
1174
|
let response
|
|
1278
1175
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (ctx.params.tableId === InternalTables.USER_METADATA) {
|
|
@@ -1288,20 +1185,18 @@ exports.destroy = async function (ctx) {
|
|
|
1288
1185
|
}
|
|
1289
1186
|
|
|
1290
1187
|
exports.bulkDestroy = async ctx => {
|
|
1291
|
-
const
|
|
1292
|
-
const db = new CouchDB(appId)
|
|
1188
|
+
const db = getAppDB()
|
|
1293
1189
|
const tableId = ctx.params.tableId
|
|
1294
1190
|
const table = await db.get(tableId)
|
|
1295
1191
|
let { rows } = ctx.request.body
|
|
1296
1192
|
|
|
1297
1193
|
// before carrying out any updates, make sure the rows are ready to be returned
|
|
1298
1194
|
// they need to be the full rows (including previous relationships) for automations
|
|
1299
|
-
rows = await outputProcessing(
|
|
1195
|
+
rows = await outputProcessing(table, rows, { squash: false })
|
|
1300
1196
|
|
|
1301
1197
|
// remove the relationships first
|
|
1302
1198
|
let updates = rows.map(row =>
|
|
1303
1199
|
linkRows.updateLinks({
|
|
1304
|
-
appId,
|
|
1305
1200
|
eventType: linkRows.EventType.ROW_DELETE,
|
|
1306
1201
|
row,
|
|
1307
1202
|
tableId: row.tableId,
|
|
@@ -1320,7 +1215,8 @@ exports.bulkDestroy = async ctx => {
|
|
|
1320
1215
|
await db.bulkDocs(rows.map(row => ({ ...row, _deleted: true })))
|
|
1321
1216
|
}
|
|
1322
1217
|
// remove any attachments that were on the rows from object storage
|
|
1323
|
-
await cleanupAttachments(
|
|
1218
|
+
await cleanupAttachments(table, { rows })
|
|
1219
|
+
await updateRelatedFormula(table, rows)
|
|
1324
1220
|
await Promise.all(updates)
|
|
1325
1221
|
return { response: { ok: true }, rows }
|
|
1326
1222
|
}
|
|
@@ -1331,28 +1227,27 @@ exports.search = async ctx => {
|
|
|
1331
1227
|
<span class="cstat-no" title="statement not covered" > return { rows: await exports.fetch(ctx) }</span>
|
|
1332
1228
|
}
|
|
1333
1229
|
|
|
1334
|
-
const appId = ctx.appId
|
|
1335
1230
|
const { tableId } = ctx.params
|
|
1336
|
-
const db =
|
|
1231
|
+
const db = getAppDB()
|
|
1337
1232
|
const { paginate, query, ...params } = ctx.request.body
|
|
1338
1233
|
params.version = ctx.version
|
|
1339
1234
|
params.tableId = tableId
|
|
1340
1235
|
|
|
1341
1236
|
let response
|
|
1342
1237
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (paginate) {
|
|
1343
|
-
<span class="cstat-no" title="statement not covered" > response = await paginatedSearch(
|
|
1238
|
+
<span class="cstat-no" title="statement not covered" > response = await paginatedSearch(query, params)</span>
|
|
1344
1239
|
} else {
|
|
1345
|
-
response = await fullSearch(
|
|
1240
|
+
response = await fullSearch(query, params)
|
|
1346
1241
|
}
|
|
1347
1242
|
|
|
1348
1243
|
// Enrich search results with relationships
|
|
1349
1244
|
if (response.rows && response.rows.length) {
|
|
1350
1245
|
// enrich with global users if from users table
|
|
1351
1246
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (tableId === InternalTables.USER_METADATA) {
|
|
1352
|
-
<span class="cstat-no" title="statement not covered" > response.rows = await getGlobalUsersFromMetadata(
|
|
1247
|
+
<span class="cstat-no" title="statement not covered" > response.rows = await getGlobalUsersFromMetadata(response.rows)</span>
|
|
1353
1248
|
}
|
|
1354
1249
|
const table = await db.get(tableId)
|
|
1355
|
-
response.rows = await outputProcessing(
|
|
1250
|
+
response.rows = await outputProcessing(table, response.rows)
|
|
1356
1251
|
}
|
|
1357
1252
|
|
|
1358
1253
|
return response
|
|
@@ -1360,25 +1255,22 @@ exports.search = async ctx => {
|
|
|
1360
1255
|
|
|
1361
1256
|
exports.validate = async ctx => {
|
|
1362
1257
|
return validate({
|
|
1363
|
-
appId: ctx.appId,
|
|
1364
1258
|
tableId: ctx.params.tableId,
|
|
1365
1259
|
row: ctx.request.body,
|
|
1366
1260
|
})
|
|
1367
1261
|
}
|
|
1368
1262
|
|
|
1369
1263
|
exports.fetchEnrichedRow = async ctx => {
|
|
1370
|
-
const
|
|
1371
|
-
const db = new CouchDB(appId)
|
|
1264
|
+
const db = getAppDB()
|
|
1372
1265
|
const tableId = ctx.params.tableId
|
|
1373
1266
|
const rowId = ctx.params.rowId
|
|
1374
1267
|
// need table to work out where links go in row
|
|
1375
1268
|
let [table, row] = await Promise.all([
|
|
1376
1269
|
db.get(tableId),
|
|
1377
|
-
findRow(ctx,
|
|
1270
|
+
findRow(ctx, tableId, rowId),
|
|
1378
1271
|
])
|
|
1379
1272
|
// get the link docs
|
|
1380
1273
|
const linkVals = await linkRows.getLinkDocuments({
|
|
1381
|
-
appId,
|
|
1382
1274
|
tableId,
|
|
1383
1275
|
rowId,
|
|
1384
1276
|
})
|
|
@@ -1405,7 +1297,7 @@ exports.fetchEnrichedRow = async ctx => {
|
|
|
1405
1297
|
for (let [tableId, rows] of Object.entries(groups)) {
|
|
1406
1298
|
// need to include the IDs in these rows for any links they may have
|
|
1407
1299
|
linkedRows = linkedRows.concat(
|
|
1408
|
-
await outputProcessing(
|
|
1300
|
+
await outputProcessing(tables[tableId], rows)
|
|
1409
1301
|
)
|
|
1410
1302
|
}
|
|
1411
1303
|
|
|
@@ -1432,7 +1324,7 @@ exports.fetchEnrichedRow = async ctx => {
|
|
|
1432
1324
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1433
1325
|
Code coverage generated by
|
|
1434
1326
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
1435
|
-
at
|
|
1327
|
+
at Mon Feb 07 2022 20:42:11 GMT+0000 (Coordinated Universal Time)
|
|
1436
1328
|
</div>
|
|
1437
1329
|
</div>
|
|
1438
1330
|
<script src="../../../prettify.js"></script>
|