@budibase/server 2.3.18-alpha.13 → 2.3.18-alpha.15

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.
@@ -172,7 +172,7 @@ class GoogleSheetsIntegration implements DatasourcePlus {
172
172
  async connect() {
173
173
  try {
174
174
  // Initialise oAuth client
175
- let googleConfig = await configs.getGoogleConfig()
175
+ let googleConfig = await configs.getGoogleDatasourceConfig()
176
176
  if (!googleConfig) {
177
177
  throw new HTTPError("Google config not found", 400)
178
178
  }
package/src/startup.ts CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  generateApiKey,
6
6
  getChecklist,
7
7
  } from "./utilities/workerRequests"
8
- import { installation, tenancy, logging } from "@budibase/backend-core"
8
+ import { installation, tenancy, logging, events } from "@budibase/backend-core"
9
9
  import fs from "fs"
10
10
  import { watch } from "./watch"
11
11
  import * as automations from "./automations"
@@ -124,6 +124,9 @@ export async function startup(app?: any, server?: any) {
124
124
  // get the references to the queue promises, don't await as
125
125
  // they will never end, unless the processing stops
126
126
  let queuePromises = []
127
+ // configure events to use the pro audit log write
128
+ // can't integrate directly into backend-core due to cyclic issues
129
+ queuePromises.push(events.processors.init(pro.sdk.auditLogs.write))
127
130
  queuePromises.push(automations.init())
128
131
  queuePromises.push(initPro())
129
132
  if (app) {
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.removeKeyNumbering = void 0;
4
- const QUERY_START_REGEX = /\d[0-9]*:/g;
5
- function removeKeyNumbering(key) {
6
- if (typeof key === "string" && key.match(QUERY_START_REGEX) != null) {
7
- const parts = key.split(":");
8
- // remove the number
9
- parts.shift();
10
- return parts.join(":");
11
- }
12
- else {
13
- return key;
14
- }
15
- }
16
- exports.removeKeyNumbering = removeKeyNumbering;
@@ -1,12 +0,0 @@
1
- const QUERY_START_REGEX = /\d[0-9]*:/g
2
-
3
- export function removeKeyNumbering(key: any): string {
4
- if (typeof key === "string" && key.match(QUERY_START_REGEX) != null) {
5
- const parts = key.split(":")
6
- // remove the number
7
- parts.shift()
8
- return parts.join(":")
9
- } else {
10
- return key
11
- }
12
- }