@budibase/server 1.2.35 → 1.2.38

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.
Files changed (268) hide show
  1. package/builder/assets/{index.05962580.js → index.47bfb9a6.js} +48 -48
  2. package/builder/index.html +1 -1
  3. package/coverage/clover.xml +2 -2
  4. package/coverage/coverage-final.json +13 -13
  5. package/coverage/lcov-report/api/controllers/apikeys.js.html +1 -1
  6. package/coverage/lcov-report/api/controllers/auth.js.html +1 -1
  7. package/coverage/lcov-report/api/controllers/automation.js.html +3 -3
  8. package/coverage/lcov-report/api/controllers/backup.js.html +3 -3
  9. package/coverage/lcov-report/api/controllers/cloud.js.html +4 -4
  10. package/coverage/lcov-report/api/controllers/component.js.html +3 -3
  11. package/coverage/lcov-report/api/controllers/datasource.js.html +3 -3
  12. package/coverage/lcov-report/api/controllers/dev.js.html +4 -4
  13. package/coverage/lcov-report/api/controllers/index.html +1 -1
  14. package/coverage/lcov-report/api/controllers/integration.js.html +3 -3
  15. package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
  16. package/coverage/lcov-report/api/controllers/metadata.js.html +1 -1
  17. package/coverage/lcov-report/api/controllers/migrations.js.html +1 -1
  18. package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
  19. package/coverage/lcov-report/api/controllers/query/index.html +1 -1
  20. package/coverage/lcov-report/api/controllers/query/validation.js.html +1 -1
  21. package/coverage/lcov-report/api/controllers/role.js.html +1 -1
  22. package/coverage/lcov-report/api/controllers/routing.js.html +1 -1
  23. package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
  24. package/coverage/lcov-report/api/controllers/row/index.html +1 -1
  25. package/coverage/lcov-report/api/controllers/row/internal.js.html +3 -3
  26. package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
  27. package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
  28. package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
  29. package/coverage/lcov-report/api/controllers/screen.js.html +1 -1
  30. package/coverage/lcov-report/api/controllers/script.js.html +1 -1
  31. package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
  32. package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
  33. package/coverage/lcov-report/api/controllers/table/index.html +1 -1
  34. package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
  35. package/coverage/lcov-report/api/controllers/templates.js.html +1 -1
  36. package/coverage/lcov-report/api/controllers/user.js.html +1 -1
  37. package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
  38. package/coverage/lcov-report/api/controllers/view/index.html +1 -1
  39. package/coverage/lcov-report/api/controllers/view/index.js.html +3 -3
  40. package/coverage/lcov-report/api/controllers/view/utils.js.html +5 -5
  41. package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
  42. package/coverage/lcov-report/api/controllers/webhook.js.html +1 -1
  43. package/coverage/lcov-report/api/index.html +1 -1
  44. package/coverage/lcov-report/api/index.js.html +1 -1
  45. package/coverage/lcov-report/api/routes/analytics.js.html +1 -1
  46. package/coverage/lcov-report/api/routes/apikeys.js.html +1 -1
  47. package/coverage/lcov-report/api/routes/auth.js.html +1 -1
  48. package/coverage/lcov-report/api/routes/automation.js.html +1 -1
  49. package/coverage/lcov-report/api/routes/backup.js.html +1 -1
  50. package/coverage/lcov-report/api/routes/cloud.js.html +1 -1
  51. package/coverage/lcov-report/api/routes/component.js.html +1 -1
  52. package/coverage/lcov-report/api/routes/datasource.js.html +1 -1
  53. package/coverage/lcov-report/api/routes/deploy.js.html +1 -1
  54. package/coverage/lcov-report/api/routes/dev.js.html +1 -1
  55. package/coverage/lcov-report/api/routes/index.html +1 -1
  56. package/coverage/lcov-report/api/routes/integration.js.html +1 -1
  57. package/coverage/lcov-report/api/routes/layout.js.html +1 -1
  58. package/coverage/lcov-report/api/routes/metadata.js.html +1 -1
  59. package/coverage/lcov-report/api/routes/migrations.js.html +1 -1
  60. package/coverage/lcov-report/api/routes/permission.js.html +1 -1
  61. package/coverage/lcov-report/api/routes/query.js.html +1 -1
  62. package/coverage/lcov-report/api/routes/role.js.html +1 -1
  63. package/coverage/lcov-report/api/routes/routing.js.html +1 -1
  64. package/coverage/lcov-report/api/routes/screen.js.html +1 -1
  65. package/coverage/lcov-report/api/routes/script.js.html +1 -1
  66. package/coverage/lcov-report/api/routes/table.js.html +1 -1
  67. package/coverage/lcov-report/api/routes/templates.js.html +1 -1
  68. package/coverage/lcov-report/api/routes/user.js.html +1 -1
  69. package/coverage/lcov-report/api/routes/utils/index.html +1 -1
  70. package/coverage/lcov-report/api/routes/utils/validators.js.html +1 -1
  71. package/coverage/lcov-report/api/routes/view.js.html +1 -1
  72. package/coverage/lcov-report/api/routes/webhook.js.html +1 -1
  73. package/coverage/lcov-report/automations/actions.js.html +1 -1
  74. package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
  75. package/coverage/lcov-report/automations/bullboard.js.html +1 -1
  76. package/coverage/lcov-report/automations/index.html +1 -1
  77. package/coverage/lcov-report/automations/index.js.html +1 -1
  78. package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
  79. package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
  80. package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
  81. package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
  82. package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
  83. package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
  84. package/coverage/lcov-report/automations/steps/index.html +1 -1
  85. package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
  86. package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
  87. package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
  88. package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
  89. package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
  90. package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
  91. package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
  92. package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
  93. package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
  94. package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
  95. package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
  96. package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
  97. package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
  98. package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
  99. package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
  100. package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
  101. package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
  102. package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
  103. package/coverage/lcov-report/automations/triggers.js.html +1 -1
  104. package/coverage/lcov-report/constants/index.html +1 -1
  105. package/coverage/lcov-report/constants/index.js.html +1 -1
  106. package/coverage/lcov-report/constants/layouts.js.html +1 -1
  107. package/coverage/lcov-report/constants/screens.js.html +1 -1
  108. package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
  109. package/coverage/lcov-report/db/index.html +1 -1
  110. package/coverage/lcov-report/db/index.js.html +1 -1
  111. package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
  112. package/coverage/lcov-report/db/linkedRows/index.html +1 -1
  113. package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
  114. package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +3 -3
  115. package/coverage/lcov-report/db/newid.js.html +1 -1
  116. package/coverage/lcov-report/db/utils.js.html +39 -39
  117. package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
  118. package/coverage/lcov-report/events/index.html +1 -1
  119. package/coverage/lcov-report/events/index.js.html +1 -1
  120. package/coverage/lcov-report/events/utils.js.html +1 -1
  121. package/coverage/lcov-report/index.html +1 -1
  122. package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
  123. package/coverage/lcov-report/integrations/tests/index.html +1 -1
  124. package/coverage/lcov-report/middleware/appInfo.js.html +1 -1
  125. package/coverage/lcov-report/middleware/builder.js.html +3 -3
  126. package/coverage/lcov-report/middleware/currentapp.js.html +1 -1
  127. package/coverage/lcov-report/middleware/index.html +1 -1
  128. package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
  129. package/coverage/lcov-report/middleware/publicApi.js.html +1 -1
  130. package/coverage/lcov-report/middleware/resourceId.js.html +1 -1
  131. package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
  132. package/coverage/lcov-report/middleware/utils.js.html +1 -1
  133. package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
  134. package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
  135. package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
  136. package/coverage/lcov-report/utilities/global.js.html +1 -1
  137. package/coverage/lcov-report/utilities/index.html +1 -1
  138. package/coverage/lcov-report/utilities/index.js.html +1 -1
  139. package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
  140. package/coverage/lcov-report/utilities/queue/index.html +1 -1
  141. package/coverage/lcov-report/utilities/routing/index.html +1 -1
  142. package/coverage/lcov-report/utilities/routing/index.js.html +3 -3
  143. package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
  144. package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
  145. package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
  146. package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
  147. package/coverage/lcov-report/utilities/security.js.html +9 -9
  148. package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
  149. package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
  150. package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
  151. package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
  152. package/coverage/lcov-report/utilities/users.js.html +1 -1
  153. package/coverage/lcov-report/utilities/workerRequests.js.html +1 -1
  154. package/dist/api/controllers/analytics.js +1 -1
  155. package/dist/api/controllers/application.js +8 -8
  156. package/dist/api/controllers/automation.js +2 -2
  157. package/dist/api/controllers/backup.js +2 -2
  158. package/dist/api/controllers/cloud.js +3 -3
  159. package/dist/api/controllers/component.js +2 -2
  160. package/dist/api/controllers/datasource.js +2 -2
  161. package/dist/api/controllers/deploy/index.js +6 -6
  162. package/dist/api/controllers/dev.js +3 -3
  163. package/dist/api/controllers/integration.js +2 -2
  164. package/dist/api/controllers/public/utils.js +1 -1
  165. package/dist/api/controllers/row/ExternalRequest.js +3 -3
  166. package/dist/api/controllers/row/internal.js +2 -2
  167. package/dist/api/controllers/static/index.js +2 -2
  168. package/dist/api/controllers/view/index.js +2 -2
  169. package/dist/api/controllers/view/utils.js +3 -3
  170. package/dist/db/linkedRows/linkUtils.js +2 -2
  171. package/dist/db/utils.js +37 -37
  172. package/dist/db/views/staticViews.js +4 -4
  173. package/dist/definitions/automations.js +6 -6
  174. package/dist/definitions/datasource.js +6 -70
  175. package/dist/integrations/airtable.js +13 -13
  176. package/dist/integrations/arangodb.js +8 -8
  177. package/dist/integrations/base/sql.js +28 -28
  178. package/dist/integrations/base/sqlTable.js +4 -4
  179. package/dist/integrations/couchdb.js +8 -8
  180. package/dist/integrations/dynamodb.js +21 -21
  181. package/dist/integrations/elasticsearch.js +12 -12
  182. package/dist/integrations/firebase.js +12 -12
  183. package/dist/integrations/googlesheets.js +14 -14
  184. package/dist/integrations/index.js +34 -34
  185. package/dist/integrations/microsoftSqlServer.js +14 -14
  186. package/dist/integrations/mongodb.js +9 -9
  187. package/dist/integrations/mysql.js +13 -13
  188. package/dist/integrations/oracle.js +13 -13
  189. package/dist/integrations/postgres.js +15 -15
  190. package/dist/integrations/redis.js +10 -10
  191. package/dist/integrations/rest.js +15 -14
  192. package/dist/integrations/s3.js +2 -2
  193. package/dist/integrations/snowflake.js +5 -5
  194. package/dist/integrations/utils.js +14 -14
  195. package/dist/middleware/builder.js +2 -2
  196. package/dist/migrations/functions/appUrls.js +2 -2
  197. package/dist/migrations/functions/backfill/app/queries.js +3 -1
  198. package/dist/migrations/functions/backfill/app.js +1 -1
  199. package/dist/migrations/functions/backfill/global/users.js +1 -1
  200. package/dist/package.json +6 -6
  201. package/dist/tests/utilities/TestConfiguration.js +2 -2
  202. package/dist/threads/automation.js +2 -2
  203. package/dist/tsconfig.build.tsbuildinfo +1 -1
  204. package/dist/utilities/routing/index.js +2 -2
  205. package/dist/utilities/security.js +8 -8
  206. package/package.json +7 -7
  207. package/src/api/controllers/analytics.ts +2 -2
  208. package/src/api/controllers/application.ts +9 -9
  209. package/src/api/controllers/automation.js +2 -2
  210. package/src/api/controllers/backup.js +2 -2
  211. package/src/api/controllers/cloud.js +3 -3
  212. package/src/api/controllers/component.js +2 -2
  213. package/src/api/controllers/datasource.js +2 -2
  214. package/src/api/controllers/deploy/index.ts +7 -7
  215. package/src/api/controllers/dev.js +3 -3
  216. package/src/api/controllers/integration.js +2 -2
  217. package/src/api/controllers/public/utils.ts +2 -2
  218. package/src/api/controllers/query/import/sources/openapi2.ts +1 -1
  219. package/src/api/controllers/query/import/sources/openapi3.ts +1 -1
  220. package/src/api/controllers/row/ExternalRequest.ts +5 -7
  221. package/src/api/controllers/row/internal.js +2 -2
  222. package/src/api/controllers/static/index.ts +2 -2
  223. package/src/api/controllers/view/index.js +2 -2
  224. package/src/api/controllers/view/utils.js +4 -4
  225. package/src/db/linkedRows/linkUtils.js +2 -2
  226. package/src/db/utils.js +38 -38
  227. package/src/db/views/staticViews.js +4 -9
  228. package/src/definitions/automations.ts +2 -2
  229. package/src/definitions/common.ts +14 -65
  230. package/src/definitions/datasource.ts +5 -250
  231. package/src/integrations/airtable.ts +16 -16
  232. package/src/integrations/arangodb.ts +11 -11
  233. package/src/integrations/base/sql.ts +16 -16
  234. package/src/integrations/base/sqlTable.ts +1 -6
  235. package/src/integrations/base/utils.ts +1 -2
  236. package/src/integrations/couchdb.ts +11 -11
  237. package/src/integrations/dynamodb.ts +24 -24
  238. package/src/integrations/elasticsearch.ts +15 -15
  239. package/src/integrations/firebase.ts +15 -15
  240. package/src/integrations/googlesheets.ts +19 -18
  241. package/src/integrations/index.ts +34 -34
  242. package/src/integrations/microsoftSqlServer.ts +19 -18
  243. package/src/integrations/mongodb.ts +12 -12
  244. package/src/integrations/mysql.ts +19 -18
  245. package/src/integrations/oracle.ts +16 -16
  246. package/src/integrations/postgres.ts +20 -20
  247. package/src/integrations/queries/sql.ts +1 -2
  248. package/src/integrations/redis.ts +10 -14
  249. package/src/integrations/rest.ts +22 -20
  250. package/src/integrations/s3.ts +2 -3
  251. package/src/integrations/snowflake.ts +5 -5
  252. package/src/integrations/tests/sql.spec.js +7 -7
  253. package/src/integrations/utils.ts +8 -9
  254. package/src/middleware/builder.js +2 -2
  255. package/src/migrations/functions/appUrls.ts +2 -2
  256. package/src/migrations/functions/backfill/app/queries.ts +3 -2
  257. package/src/migrations/functions/backfill/app.ts +1 -1
  258. package/src/migrations/functions/backfill/global/users.ts +1 -1
  259. package/src/migrations/functions/tests/appUrls.spec.js +3 -3
  260. package/src/migrations/tests/index.spec.ts +2 -2
  261. package/src/tests/utilities/TestConfiguration.js +2 -2
  262. package/src/threads/automation.ts +3 -3
  263. package/src/utilities/routing/index.js +2 -2
  264. package/src/utilities/security.js +8 -8
  265. package/dist/integrations/base/IntegrationBase.js +0 -2
  266. package/dist/integrations/base/datasourcePlus.js +0 -2
  267. package/src/integrations/base/IntegrationBase.ts +0 -6
  268. package/src/integrations/base/datasourcePlus.ts +0 -13
@@ -166,7 +166,7 @@
166
166
  <div class='footer quiet pad2 space-top1 center small'>
167
167
  Code coverage generated by
168
168
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
169
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
169
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
170
170
  </div>
171
171
  <script src="../../prettify.js"></script>
172
172
  <script>
@@ -190,7 +190,7 @@
190
190
  <div class='footer quiet pad2 space-top1 center small'>
191
191
  Code coverage generated by
192
192
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
193
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
193
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
194
194
  </div>
195
195
  <script src="../../prettify.js"></script>
196
196
  <script>
@@ -190,7 +190,7 @@
190
190
  <div class='footer quiet pad2 space-top1 center small'>
191
191
  Code coverage generated by
192
192
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
193
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
193
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
194
194
  </div>
195
195
  <script src="../../prettify.js"></script>
196
196
  <script>
@@ -178,7 +178,7 @@
178
178
  <div class='footer quiet pad2 space-top1 center small'>
179
179
  Code coverage generated by
180
180
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
181
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
181
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
182
182
  </div>
183
183
  <script src="../../prettify.js"></script>
184
184
  <script>
@@ -409,7 +409,7 @@ exports.TRIGGER_DEFINITIONS = TRIGGER_DEFINITIONS
409
409
  <div class='footer quiet pad2 space-top1 center small'>
410
410
  Code coverage generated by
411
411
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
412
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
412
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
413
413
  </div>
414
414
  <script src="../prettify.js"></script>
415
415
  <script>
@@ -131,7 +131,7 @@
131
131
  <div class='footer quiet pad2 space-top1 center small'>
132
132
  Code coverage generated by
133
133
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
134
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
134
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
135
135
  </div>
136
136
  <script src="../prettify.js"></script>
137
137
  <script>
@@ -712,7 +712,7 @@ exports.MAX_AUTOMATION_RECURRING_ERRORS = 5
712
712
  <div class='footer quiet pad2 space-top1 center small'>
713
713
  Code coverage generated by
714
714
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
715
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
715
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
716
716
  </div>
717
717
  <script src="../prettify.js"></script>
718
718
  <script>
@@ -529,7 +529,7 @@ module.exports = {
529
529
  <div class='footer quiet pad2 space-top1 center small'>
530
530
  Code coverage generated by
531
531
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
532
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
532
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
533
533
  </div>
534
534
  <script src="../prettify.js"></script>
535
535
  <script>
@@ -208,7 +208,7 @@ exports.createHomeScreen = () =&gt; ({
208
208
  <div class='footer quiet pad2 space-top1 center small'>
209
209
  Code coverage generated by
210
210
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
211
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
211
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
212
212
  </div>
213
213
  <script src="../prettify.js"></script>
214
214
  <script>
@@ -217,7 +217,7 @@ exports.runView = <span class="fstat-no" title="function not covered" >as</span>
217
217
  <div class='footer quiet pad2 space-top1 center small'>
218
218
  Code coverage generated by
219
219
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
220
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
220
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
221
221
  </div>
222
222
  <script src="../prettify.js"></script>
223
223
  <script>
@@ -146,7 +146,7 @@
146
146
  <div class='footer quiet pad2 space-top1 center small'>
147
147
  Code coverage generated by
148
148
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
149
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
149
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
150
150
  </div>
151
151
  <script src="../prettify.js"></script>
152
152
  <script>
@@ -118,7 +118,7 @@ exports.init = () =&gt; {
118
118
  <div class='footer quiet pad2 space-top1 center small'>
119
119
  Code coverage generated by
120
120
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
121
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
121
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
122
122
  </div>
123
123
  <script src="../prettify.js"></script>
124
124
  <script>
@@ -1465,7 +1465,7 @@ module.exports = LinkController
1465
1465
  <div class='footer quiet pad2 space-top1 center small'>
1466
1466
  Code coverage generated by
1467
1467
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1468
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
1468
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
1469
1469
  </div>
1470
1470
  <script src="../../prettify.js"></script>
1471
1471
  <script>
@@ -131,7 +131,7 @@
131
131
  <div class='footer quiet pad2 space-top1 center small'>
132
132
  Code coverage generated by
133
133
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
134
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
134
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
135
135
  </div>
136
136
  <script src="../../prettify.js"></script>
137
137
  <script>
@@ -706,7 +706,7 @@ exports.squashLinksToPrimaryDisplay = async (table, enriched) =&gt; {
706
706
  <div class='footer quiet pad2 space-top1 center small'>
707
707
  Code coverage generated by
708
708
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
709
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
709
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
710
710
  </div>
711
711
  <script src="../../prettify.js"></script>
712
712
  <script>
@@ -296,7 +296,7 @@
296
296
  <span class="cline-any cline-no">&nbsp;</span>
297
297
  <span class="cline-any cline-neutral">&nbsp;</span>
298
298
  <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const Sentry = require("@sentry/node")
299
- const { ViewNames, getQueryIndex } = require("../utils")
299
+ const { ViewName, getQueryIndex } = require("../utils")
300
300
  const { FieldTypes } = require("../../constants")
301
301
  const { createLinkView } = require("../views/staticViews")
302
302
  const { getAppDB } = require("@budibase/backend-core/context")
@@ -338,7 +338,7 @@ exports.getLinkDocuments = async function (args) {
338
338
  }
339
339
  params.include_docs = !!includeDocs
340
340
  try {
341
- let linkRows = (await db.query(getQueryIndex(ViewNames.LINK), params)).rows
341
+ let linkRows = (await db.query(getQueryIndex(ViewName.LINK), params)).rows
342
342
  // filter to get unique entries
343
343
  const foundIds = []
344
344
  linkRows = linkRows.filter(link =&gt; {
@@ -418,7 +418,7 @@ exports.getRelatedTableForField = (table, fieldName) =&gt; {
418
418
  <div class='footer quiet pad2 space-top1 center small'>
419
419
  Code coverage generated by
420
420
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
421
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
421
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
422
422
  </div>
423
423
  <script src="../../prettify.js"></script>
424
424
  <script>
@@ -85,7 +85,7 @@ module.exports = function () {
85
85
  <div class='footer quiet pad2 space-top1 center small'>
86
86
  Code coverage generated by
87
87
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
88
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
88
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
89
89
  </div>
90
90
  <script src="../prettify.js"></script>
91
91
  <script>
@@ -827,7 +827,7 @@
827
827
  <span class="cline-any cline-neutral">&nbsp;</span>
828
828
  <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">const newid = require("./newid")
829
829
  const {
830
- DocumentTypes: CoreDocTypes,
830
+ DocumentType: CoreDocTypes,
831
831
  getRoleParams,
832
832
  generateRoleID,
833
833
  APP_DEV_PREFIX,
@@ -839,7 +839,7 @@ const {
839
839
  getDevelopmentAppID,
840
840
  generateAppID,
841
841
  getQueryIndex,
842
- ViewNames,
842
+ ViewName,
843
843
  } = require("@budibase/backend-core/db")
844
844
  &nbsp;
845
845
  const UNICODE_MAX = "\ufff0"
@@ -850,7 +850,7 @@ const AppStatus = {
850
850
  DEPLOYED: "published",
851
851
  }
852
852
  &nbsp;
853
- const DocumentTypes = {
853
+ const DocumentType = {
854
854
  ...CoreDocTypes,
855
855
  TABLE: "ta",
856
856
  ROW: "ro",
@@ -893,12 +893,12 @@ exports.APP_PREFIX = APP_PREFIX
893
893
  exports.APP_DEV_PREFIX = APP_DEV_PREFIX
894
894
  exports.isDevAppID = isDevAppID
895
895
  exports.isProdAppID = isProdAppID
896
- exports.USER_METDATA_PREFIX = `${DocumentTypes.ROW}${SEPARATOR}${InternalTables.USER_METADATA}${SEPARATOR}`
897
- exports.LINK_USER_METADATA_PREFIX = `${DocumentTypes.LINK}${SEPARATOR}${InternalTables.USER_METADATA}${SEPARATOR}`
898
- exports.TABLE_ROW_PREFIX = `${DocumentTypes.ROW}${SEPARATOR}${DocumentTypes.TABLE}`
899
- exports.ViewNames = ViewNames
896
+ exports.USER_METDATA_PREFIX = `${DocumentType.ROW}${SEPARATOR}${InternalTables.USER_METADATA}${SEPARATOR}`
897
+ exports.LINK_USER_METADATA_PREFIX = `${DocumentType.LINK}${SEPARATOR}${InternalTables.USER_METADATA}${SEPARATOR}`
898
+ exports.TABLE_ROW_PREFIX = `${DocumentType.ROW}${SEPARATOR}${DocumentType.TABLE}`
899
+ exports.ViewName = ViewName
900
900
  exports.InternalTables = InternalTables
901
- exports.DocumentTypes = DocumentTypes
901
+ exports.DocumentType = DocumentType
902
902
  exports.SEPARATOR = SEPARATOR
903
903
  exports.UNICODE_MAX = UNICODE_MAX
904
904
  exports.SearchIndexes = SearchIndexes
@@ -941,7 +941,7 @@ exports.getDocParams = getDocParams
941
941
  * Gets parameters for retrieving tables, this is a utility function for the getDocParams function.
942
942
  */
943
943
  exports.getTableParams = (tableId = <span class="branch-0 cbranch-no" title="branch not covered" >null,</span> otherProps = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
944
- return getDocParams(DocumentTypes.TABLE, tableId, otherProps)
944
+ return getDocParams(DocumentType.TABLE, tableId, otherProps)
945
945
  }
946
946
  &nbsp;
947
947
  /**
@@ -949,7 +949,7 @@ exports.getTableParams = (tableId = <span class="branch-0 cbranch-no" title="bra
949
949
  * @returns {string} The new table ID which the table doc can be stored under.
950
950
  */
951
951
  exports.generateTableID = () =&gt; {
952
- return `${DocumentTypes.TABLE}${SEPARATOR}${newid()}`
952
+ return `${DocumentType.TABLE}${SEPARATOR}${newid()}`
953
953
  }
954
954
  &nbsp;
955
955
  /**
@@ -962,12 +962,12 @@ exports.generateTableID = () =&gt; {
962
962
  */
963
963
  exports.getRowParams = (tableId = <span class="branch-0 cbranch-no" title="branch not covered" >null,</span> rowId = <span class="branch-0 cbranch-no" title="branch not covered" >null,</span> otherProps = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
964
964
  if (tableId == null) {
965
- return getDocParams(DocumentTypes.ROW, null, otherProps)
965
+ return getDocParams(DocumentType.ROW, null, otherProps)
966
966
  }
967
967
  &nbsp;
968
968
  const endOfKey = rowId == null ? `${tableId}${SEPARATOR}` : <span class="branch-1 cbranch-no" title="branch not covered" >rowId</span>
969
969
  &nbsp;
970
- return getDocParams(DocumentTypes.ROW, endOfKey, otherProps)
970
+ return getDocParams(DocumentType.ROW, endOfKey, otherProps)
971
971
  }
972
972
  &nbsp;
973
973
  /**
@@ -977,9 +977,9 @@ exports.getRowParams = (tableId = <span class="branch-0 cbranch-no" title="branc
977
977
  */
978
978
  exports.getTableIDFromRowID = <span class="fstat-no" title="function not covered" >ro</span>wId =&gt; {
979
979
  const components = <span class="cstat-no" title="statement not covered" >rowId</span>
980
- .split(DocumentTypes.TABLE + SEPARATOR)[1]
980
+ .split(DocumentType.TABLE + SEPARATOR)[1]
981
981
  .split(SEPARATOR)
982
- <span class="cstat-no" title="statement not covered" > return `${DocumentTypes.TABLE}${SEPARATOR}${components[0]}`</span>
982
+ <span class="cstat-no" title="statement not covered" > return `${DocumentType.TABLE}${SEPARATOR}${components[0]}`</span>
983
983
  }
984
984
  &nbsp;
985
985
  /**
@@ -990,7 +990,7 @@ exports.getTableIDFromRowID = <span class="fstat-no" title="function not covered
990
990
  */
991
991
  exports.generateRowID = (tableId, id = null) =&gt; {
992
992
  id = id || newid()
993
- return `${DocumentTypes.ROW}${SEPARATOR}${tableId}${SEPARATOR}${id}`
993
+ return `${DocumentType.ROW}${SEPARATOR}${tableId}${SEPARATOR}${id}`
994
994
  }
995
995
  &nbsp;
996
996
  /**
@@ -1013,7 +1013,7 @@ exports.generateUserMetadataID = globalId =&gt; {
1013
1013
  * Breaks up the ID to get the global ID.
1014
1014
  */
1015
1015
  exports.getGlobalIDFromUserMetadataID = id =&gt; {
1016
- const prefix = `${DocumentTypes.ROW}${SEPARATOR}${InternalTables.USER_METADATA}${SEPARATOR}`
1016
+ const prefix = `${DocumentType.ROW}${SEPARATOR}${InternalTables.USER_METADATA}${SEPARATOR}`
1017
1017
  if (!id || !id.includes(prefix)) {
1018
1018
  return id
1019
1019
  }
@@ -1024,7 +1024,7 @@ exports.getGlobalIDFromUserMetadataID = id =&gt; {
1024
1024
  * Gets parameters for retrieving automations, this is a utility function for the getDocParams function.
1025
1025
  */
1026
1026
  exports.getAutomationParams = (automationId = <span class="branch-0 cbranch-no" title="branch not covered" >null,</span> otherProps = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
1027
- return getDocParams(DocumentTypes.AUTOMATION, automationId, otherProps)
1027
+ return getDocParams(DocumentType.AUTOMATION, automationId, otherProps)
1028
1028
  }
1029
1029
  &nbsp;
1030
1030
  /**
@@ -1032,7 +1032,7 @@ exports.getAutomationParams = (automationId = <span class="branch-0 cbranch-no"
1032
1032
  * @returns {string} The new automation ID which the automation doc can be stored under.
1033
1033
  */
1034
1034
  exports.generateAutomationID = () =&gt; {
1035
- return `${DocumentTypes.AUTOMATION}${SEPARATOR}${newid()}`
1035
+ return `${DocumentType.AUTOMATION}${SEPARATOR}${newid()}`
1036
1036
  }
1037
1037
  &nbsp;
1038
1038
  /**
@@ -1057,14 +1057,14 @@ exports.generateLinkID = (
1057
1057
  const tables = `${SEPARATOR}${tableId1}${SEPARATOR}${tableId2}`
1058
1058
  const rows = `${SEPARATOR}${rowId1}${SEPARATOR}${rowId2}`
1059
1059
  const fields = `${SEPARATOR}${fieldName1}${SEPARATOR}${fieldName2}`
1060
- return `${DocumentTypes.LINK}${tables}${rows}${fields}`
1060
+ return `${DocumentType.LINK}${tables}${rows}${fields}`
1061
1061
  }
1062
1062
  &nbsp;
1063
1063
  /**
1064
1064
  * Gets parameters for retrieving link docs, this is a utility function for the getDocParams function.
1065
1065
  */
1066
1066
  exports.getLinkParams = <span class="fstat-no" title="function not covered" >(o</span>therProps = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
1067
- <span class="cstat-no" title="statement not covered" > return getDocParams(DocumentTypes.LINK, null, otherProps)</span>
1067
+ <span class="cstat-no" title="statement not covered" > return getDocParams(DocumentType.LINK, null, otherProps)</span>
1068
1068
  }
1069
1069
  &nbsp;
1070
1070
  /**
@@ -1072,14 +1072,14 @@ exports.getLinkParams = <span class="fstat-no" title="function not covered" >(o<
1072
1072
  * @returns {string} The new layout ID which the layout doc can be stored under.
1073
1073
  */
1074
1074
  exports.generateLayoutID = id =&gt; {
1075
- return `${DocumentTypes.LAYOUT}${SEPARATOR}${id || newid()}`
1075
+ return `${DocumentType.LAYOUT}${SEPARATOR}${id || newid()}`
1076
1076
  }
1077
1077
  &nbsp;
1078
1078
  /**
1079
1079
  * Gets parameters for retrieving layout, this is a utility function for the getDocParams function.
1080
1080
  */
1081
1081
  exports.getLayoutParams = (layoutId = <span class="branch-0 cbranch-no" title="branch not covered" >null,</span> otherProps = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
1082
- return getDocParams(DocumentTypes.LAYOUT, layoutId, otherProps)
1082
+ return getDocParams(DocumentType.LAYOUT, layoutId, otherProps)
1083
1083
  }
1084
1084
  &nbsp;
1085
1085
  /**
@@ -1087,14 +1087,14 @@ exports.getLayoutParams = (layoutId = <span class="branch-0 cbranch-no" title="b
1087
1087
  * @returns {string} The new screen ID which the screen doc can be stored under.
1088
1088
  */
1089
1089
  exports.generateScreenID = () =&gt; {
1090
- return `${DocumentTypes.SCREEN}${SEPARATOR}${newid()}`
1090
+ return `${DocumentType.SCREEN}${SEPARATOR}${newid()}`
1091
1091
  }
1092
1092
  &nbsp;
1093
1093
  /**
1094
1094
  * Gets parameters for retrieving screens, this is a utility function for the getDocParams function.
1095
1095
  */
1096
1096
  exports.getScreenParams = (screenId = <span class="branch-0 cbranch-no" title="branch not covered" >null,</span> otherProps = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
1097
- return getDocParams(DocumentTypes.SCREEN, screenId, otherProps)
1097
+ return getDocParams(DocumentType.SCREEN, screenId, otherProps)
1098
1098
  }
1099
1099
  &nbsp;
1100
1100
  /**
@@ -1102,14 +1102,14 @@ exports.getScreenParams = (screenId = <span class="branch-0 cbranch-no" title="b
1102
1102
  * @returns {string} The new webhook ID which the webhook doc can be stored under.
1103
1103
  */
1104
1104
  exports.generateWebhookID = () =&gt; {
1105
- return `${DocumentTypes.WEBHOOK}${SEPARATOR}${newid()}`
1105
+ return `${DocumentType.WEBHOOK}${SEPARATOR}${newid()}`
1106
1106
  }
1107
1107
  &nbsp;
1108
1108
  /**
1109
1109
  * Gets parameters for retrieving a webhook, this is a utility function for the getDocParams function.
1110
1110
  */
1111
1111
  exports.getWebhookParams = (webhookId = <span class="branch-0 cbranch-no" title="branch not covered" >null,</span> otherProps = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
1112
- return getDocParams(DocumentTypes.WEBHOOK, webhookId, otherProps)
1112
+ return getDocParams(DocumentType.WEBHOOK, webhookId, otherProps)
1113
1113
  }
1114
1114
  &nbsp;
1115
1115
  /**
@@ -1118,7 +1118,7 @@ exports.getWebhookParams = (webhookId = <span class="branch-0 cbranch-no" title=
1118
1118
  */
1119
1119
  exports.generateDatasourceID = ({ plus = false } = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
1120
1120
  return `${
1121
- plus ? <span class="branch-0 cbranch-no" title="branch not covered" >DocumentTypes.DATASOURCE_PLUS </span>: DocumentTypes.DATASOURCE
1121
+ plus ? <span class="branch-0 cbranch-no" title="branch not covered" >DocumentType.DATASOURCE_PLUS </span>: DocumentType.DATASOURCE
1122
1122
  }${SEPARATOR}${newid()}`
1123
1123
  }
1124
1124
  &nbsp;
@@ -1126,7 +1126,7 @@ exports.generateDatasourceID = ({ plus = false } = <span class="branch-0 cbranch
1126
1126
  * Gets parameters for retrieving a datasource, this is a utility function for the getDocParams function.
1127
1127
  */
1128
1128
  exports.getDatasourceParams = (datasourceId = <span class="branch-0 cbranch-no" title="branch not covered" >null,</span> otherProps = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
1129
- return getDocParams(DocumentTypes.DATASOURCE, datasourceId, otherProps)
1129
+ return getDocParams(DocumentType.DATASOURCE, datasourceId, otherProps)
1130
1130
  }
1131
1131
  &nbsp;
1132
1132
  /**
@@ -1135,7 +1135,7 @@ exports.getDatasourceParams = (datasourceId = <span class="branch-0 cbranch-no"
1135
1135
  */
1136
1136
  exports.generateQueryID = datasourceId =&gt; {
1137
1137
  return `${
1138
- DocumentTypes.QUERY
1138
+ DocumentType.QUERY
1139
1139
  }${SEPARATOR}${datasourceId}${SEPARATOR}${newid()}`
1140
1140
  }
1141
1141
  &nbsp;
@@ -1144,14 +1144,14 @@ exports.generateQueryID = datasourceId =&gt; {
1144
1144
  * automations etc.
1145
1145
  */
1146
1146
  exports.generateAutomationMetadataID = <span class="fstat-no" title="function not covered" >au</span>tomationId =&gt; {
1147
- <span class="cstat-no" title="statement not covered" > return `${DocumentTypes.AUTOMATION_METADATA}${SEPARATOR}${automationId}`</span>
1147
+ <span class="cstat-no" title="statement not covered" > return `${DocumentType.AUTOMATION_METADATA}${SEPARATOR}${automationId}`</span>
1148
1148
  }
1149
1149
  &nbsp;
1150
1150
  /**
1151
1151
  * Retrieve all automation metadata in an app database.
1152
1152
  */
1153
1153
  exports.getAutomationMetadataParams = (otherProps = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
1154
- return getDocParams(DocumentTypes.AUTOMATION_METADATA, null, otherProps)
1154
+ return getDocParams(DocumentType.AUTOMATION_METADATA, null, otherProps)
1155
1155
  }
1156
1156
  &nbsp;
1157
1157
  /**
@@ -1159,11 +1159,11 @@ exports.getAutomationMetadataParams = (otherProps = <span class="branch-0 cbranc
1159
1159
  */
1160
1160
  exports.getQueryParams = (datasourceId = <span class="branch-0 cbranch-no" title="branch not covered" >null,</span> otherProps = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
1161
1161
  if (datasourceId == null) {
1162
- return getDocParams(DocumentTypes.QUERY, null, otherProps)
1162
+ return getDocParams(DocumentType.QUERY, null, otherProps)
1163
1163
  }
1164
1164
  &nbsp;
1165
1165
  return getDocParams(
1166
- DocumentTypes.QUERY,
1166
+ DocumentType.QUERY,
1167
1167
  `${datasourceId}${SEPARATOR}`,
1168
1168
  otherProps
1169
1169
  )
@@ -1174,11 +1174,11 @@ exports.getQueryParams = (datasourceId = <span class="branch-0 cbranch-no" title
1174
1174
  * @returns {string} The ID of the flag document that was generated.
1175
1175
  */
1176
1176
  exports.generateUserFlagID = <span class="fstat-no" title="function not covered" >us</span>erId =&gt; {
1177
- <span class="cstat-no" title="statement not covered" > return `${DocumentTypes.USER_FLAG}${SEPARATOR}${userId}`</span>
1177
+ <span class="cstat-no" title="statement not covered" > return `${DocumentType.USER_FLAG}${SEPARATOR}${userId}`</span>
1178
1178
  }
1179
1179
  &nbsp;
1180
1180
  exports.generateMetadataID = (type, entityId) =&gt; {
1181
- return `${DocumentTypes.METADATA}${SEPARATOR}${type}${SEPARATOR}${entityId}`
1181
+ return `${DocumentType.METADATA}${SEPARATOR}${type}${SEPARATOR}${entityId}`
1182
1182
  }
1183
1183
  &nbsp;
1184
1184
  exports.getMetadataParams = <span class="fstat-no" title="function not covered" >(t</span>ype, entityId = <span class="branch-0 cbranch-no" title="branch not covered" >null,</span> otherProps = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
@@ -1186,15 +1186,15 @@ exports.getMetadataParams = <span class="fstat-no" title="function not covered"
1186
1186
  <span class="cstat-no" title="statement not covered" > if (entityId != null) {</span>
1187
1187
  <span class="cstat-no" title="statement not covered" > docId += entityId</span>
1188
1188
  }
1189
- <span class="cstat-no" title="statement not covered" > return getDocParams(DocumentTypes.METADATA, docId, otherProps)</span>
1189
+ <span class="cstat-no" title="statement not covered" > return getDocParams(DocumentType.METADATA, docId, otherProps)</span>
1190
1190
  }
1191
1191
  &nbsp;
1192
1192
  exports.generateMemoryViewID = viewName =&gt; {
1193
- return `${DocumentTypes.MEM_VIEW}${SEPARATOR}${viewName}`
1193
+ return `${DocumentType.MEM_VIEW}${SEPARATOR}${viewName}`
1194
1194
  }
1195
1195
  &nbsp;
1196
1196
  exports.getMemoryViewParams = <span class="fstat-no" title="function not covered" >(o</span>therProps = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> =&gt; {
1197
- <span class="cstat-no" title="statement not covered" > return getDocParams(DocumentTypes.MEM_VIEW, null, otherProps)</span>
1197
+ <span class="cstat-no" title="statement not covered" > return getDocParams(DocumentType.MEM_VIEW, null, otherProps)</span>
1198
1198
  }
1199
1199
  &nbsp;
1200
1200
  /**
@@ -1213,7 +1213,7 @@ exports.getMultiIDParams = ids =&gt; {
1213
1213
  <div class='footer quiet pad2 space-top1 center small'>
1214
1214
  Code coverage generated by
1215
1215
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
1216
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
1216
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
1217
1217
  </div>
1218
1218
  <script src="../prettify.js"></script>
1219
1219
  <script>
@@ -223,7 +223,7 @@ module.exports = AutomationEmitter
223
223
  <div class='footer quiet pad2 space-top1 center small'>
224
224
  Code coverage generated by
225
225
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
226
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
226
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
227
227
  </div>
228
228
  <script src="../prettify.js"></script>
229
229
  <script>
@@ -131,7 +131,7 @@
131
131
  <div class='footer quiet pad2 space-top1 center small'>
132
132
  Code coverage generated by
133
133
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
134
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
134
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
135
135
  </div>
136
136
  <script src="../prettify.js"></script>
137
137
  <script>
@@ -160,7 +160,7 @@ module.exports = emitter
160
160
  <div class='footer quiet pad2 space-top1 center small'>
161
161
  Code coverage generated by
162
162
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
163
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
163
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
164
164
  </div>
165
165
  <script src="../prettify.js"></script>
166
166
  <script>
@@ -184,7 +184,7 @@ exports.tableEmission = ({ emitter, eventName, appId, table, metadata }) =&gt; {
184
184
  <div class='footer quiet pad2 space-top1 center small'>
185
185
  Code coverage generated by
186
186
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
187
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
187
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
188
188
  </div>
189
189
  <script src="../prettify.js"></script>
190
190
  <script>
@@ -416,7 +416,7 @@
416
416
  <div class='footer quiet pad2 space-top1 center small'>
417
417
  Code coverage generated by
418
418
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
419
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
419
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
420
420
  </div>
421
421
  <script src="prettify.js"></script>
422
422
  <script>
@@ -70,7 +70,7 @@
70
70
  <div class='footer quiet pad2 space-top1 center small'>
71
71
  Code coverage generated by
72
72
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
73
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
73
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
74
74
  </div>
75
75
  <script src="../../prettify.js"></script>
76
76
  <script>
@@ -101,7 +101,7 @@
101
101
  <div class='footer quiet pad2 space-top1 center small'>
102
102
  Code coverage generated by
103
103
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
104
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
104
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
105
105
  </div>
106
106
  <script src="../../prettify.js"></script>
107
107
  <script>
@@ -127,7 +127,7 @@ exports.middleware =
127
127
  <div class='footer quiet pad2 space-top1 center small'>
128
128
  Code coverage generated by
129
129
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
130
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
130
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
131
131
  </div>
132
132
  <script src="../prettify.js"></script>
133
133
  <script>
@@ -251,7 +251,7 @@ const {
251
251
  setDebounce,
252
252
  } = require("../utilities/redis")
253
253
  const { doWithDB } = require("@budibase/backend-core/db")
254
- const { DocumentTypes, getGlobalIDFromUserMetadataID } = require("../db/utils")
254
+ const { DocumentType, getGlobalIDFromUserMetadataID } = require("../db/utils")
255
255
  const { PermissionTypes } = require("@budibase/backend-core/permissions")
256
256
  const { app: appCache } = require("@budibase/backend-core/cache")
257
257
  &nbsp;
@@ -294,7 +294,7 @@ async function updateAppUpdatedAt(ctx) {
294
294
  <span class="cstat-no" title="statement not covered" > return</span>
295
295
  }
296
296
  await doWithDB(appId, async db =&gt; {
297
- const metadata = await db.get(DocumentTypes.APP_METADATA)
297
+ const metadata = await db.get(DocumentType.APP_METADATA)
298
298
  metadata.updatedAt = new Date().toISOString()
299
299
  &nbsp;
300
300
  metadata.updatedBy = getGlobalIDFromUserMetadataID(ctx.user.userId)
@@ -340,7 +340,7 @@ module.exports = async (ctx, permType) =&gt; {
340
340
  <div class='footer quiet pad2 space-top1 center small'>
341
341
  Code coverage generated by
342
342
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
343
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
343
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
344
344
  </div>
345
345
  <script src="../prettify.js"></script>
346
346
  <script>
@@ -475,7 +475,7 @@ module.exports = async (ctx, next) =&gt; {
475
475
  <div class='footer quiet pad2 space-top1 center small'>
476
476
  Code coverage generated by
477
477
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
478
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
478
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
479
479
  </div>
480
480
  <script src="../prettify.js"></script>
481
481
  <script>
@@ -206,7 +206,7 @@
206
206
  <div class='footer quiet pad2 space-top1 center small'>
207
207
  Code coverage generated by
208
208
  <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
209
- at Wed Aug 10 2022 16:43:20 GMT+0000 (Coordinated Universal Time)
209
+ at Thu Aug 11 2022 14:28:59 GMT+0000 (Coordinated Universal Time)
210
210
  </div>
211
211
  <script src="../prettify.js"></script>
212
212
  <script>