Merge branch 'develop' of github.com:Budibase/budibase into cheeks-lab-day-portal-redesign
This commit is contained in:
commit
447c98ef5b
|
@ -6,6 +6,8 @@ labels: bug
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
## Checklist
|
||||||
|
- [ ] I have searched budibase discussions and github issues to check if my issue already exists
|
||||||
|
|
||||||
**Hosting**
|
**Hosting**
|
||||||
<!-- Delete as appropriate -->
|
<!-- Delete as appropriate -->
|
||||||
|
|
|
@ -67,16 +67,24 @@ jobs:
|
||||||
uses: azure/setup-helm@v1
|
uses: azure/setup-helm@v1
|
||||||
id: helm-install
|
id: helm-install
|
||||||
|
|
||||||
|
# due to helm repo index issue: https://github.com/helm/helm/issues/7363
|
||||||
|
# we need to create new package in a different dir, merge the index and move the package back
|
||||||
- name: Build and release helm chart
|
- name: Build and release helm chart
|
||||||
run: |
|
run: |
|
||||||
git config user.name "Budibase Helm Bot"
|
git config user.name "Budibase Helm Bot"
|
||||||
git config user.email "<>"
|
git config user.email "<>"
|
||||||
git reset --hard
|
git reset --hard
|
||||||
git pull
|
git pull
|
||||||
helm package charts/budibase --version "$RELEASE_VERSION" --app-version "$RELEASE_VERSION"
|
mkdir sync
|
||||||
|
echo "Packaging chart to sync dir"
|
||||||
|
helm package charts/budibase --version "$RELEASE_VERSION" --app-version "$RELEASE_VERSION" --destination sync
|
||||||
|
echo "Packaging successful"
|
||||||
git checkout gh-pages
|
git checkout gh-pages
|
||||||
mv *.tgz docs
|
echo "Indexing helm repo"
|
||||||
helm repo index docs
|
helm repo index --merge docs/index.yaml sync
|
||||||
|
mv -f sync/* docs
|
||||||
|
rm -rf sync
|
||||||
|
echo "Pushing new helm release"
|
||||||
git add -A
|
git add -A
|
||||||
git commit -m "Helm Release: ${{ env.RELEASE_VERSION }}"
|
git commit -m "Helm Release: ${{ env.RELEASE_VERSION }}"
|
||||||
git push
|
git push
|
||||||
|
|
|
@ -4,9 +4,6 @@ metadata:
|
||||||
annotations:
|
annotations:
|
||||||
kompose.cmd: kompose convert
|
kompose.cmd: kompose convert
|
||||||
kompose.version: 1.21.0 (992df58d8)
|
kompose.version: 1.21.0 (992df58d8)
|
||||||
{{ if .Values.globals.logAnnotations }}
|
|
||||||
{{ toYaml .Values.globals.logAnnotations | indent 4 }}
|
|
||||||
{{ end }}
|
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
labels:
|
labels:
|
||||||
io.kompose.service: app-service
|
io.kompose.service: app-service
|
||||||
|
@ -23,6 +20,9 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
kompose.cmd: kompose convert
|
kompose.cmd: kompose convert
|
||||||
kompose.version: 1.21.0 (992df58d8)
|
kompose.version: 1.21.0 (992df58d8)
|
||||||
|
{{ if .Values.services.apps.annotations }}
|
||||||
|
{{- toYaml .Values.services.apps.annotations | indent 8 -}}
|
||||||
|
{{ end }}
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
labels:
|
labels:
|
||||||
io.kompose.service: app-service
|
io.kompose.service: app-service
|
||||||
|
|
|
@ -4,9 +4,6 @@ metadata:
|
||||||
annotations:
|
annotations:
|
||||||
kompose.cmd: kompose convert
|
kompose.cmd: kompose convert
|
||||||
kompose.version: 1.21.0 (992df58d8)
|
kompose.version: 1.21.0 (992df58d8)
|
||||||
{{ if .Values.globals.logAnnotations }}
|
|
||||||
{{ toYaml .Values.globals.logAnnotations | indent 4 }}
|
|
||||||
{{ end }}
|
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: budibase-proxy
|
app.kubernetes.io/name: budibase-proxy
|
||||||
|
@ -23,6 +20,9 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
kompose.cmd: kompose convert
|
kompose.cmd: kompose convert
|
||||||
kompose.version: 1.21.0 (992df58d8)
|
kompose.version: 1.21.0 (992df58d8)
|
||||||
|
{{ if .Values.services.proxy.annotations }}
|
||||||
|
{{- toYaml .Values.services.proxy.annotations | indent 8 -}}
|
||||||
|
{{ end }}
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: budibase-proxy
|
app.kubernetes.io/name: budibase-proxy
|
||||||
|
|
|
@ -4,9 +4,6 @@ metadata:
|
||||||
annotations:
|
annotations:
|
||||||
kompose.cmd: kompose convert
|
kompose.cmd: kompose convert
|
||||||
kompose.version: 1.21.0 (992df58d8)
|
kompose.version: 1.21.0 (992df58d8)
|
||||||
{{ if .Values.globals.logAnnotations }}
|
|
||||||
{{ toYaml .Values.globals.logAnnotations | indent 4 }}
|
|
||||||
{{ end }}
|
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
labels:
|
labels:
|
||||||
io.kompose.service: worker-service
|
io.kompose.service: worker-service
|
||||||
|
@ -24,6 +21,9 @@ spec:
|
||||||
annotations:
|
annotations:
|
||||||
kompose.cmd: kompose convert
|
kompose.cmd: kompose convert
|
||||||
kompose.version: 1.21.0 (992df58d8)
|
kompose.version: 1.21.0 (992df58d8)
|
||||||
|
{{ if .Values.services.worker.annotations }}
|
||||||
|
{{- toYaml .Values.services.worker.annotations | indent 8 -}}
|
||||||
|
{{ end }}
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
labels:
|
labels:
|
||||||
io.kompose.service: worker-service
|
io.kompose.service: worker-service
|
||||||
|
|
|
@ -22,12 +22,6 @@ serviceAccount:
|
||||||
|
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
|
|
||||||
# logAnnotations:
|
|
||||||
# co.elastic.logs/multiline.type: pattern
|
|
||||||
# co.elastic.logs/multiline.pattern: '^[[:space:]]'
|
|
||||||
# co.elastic.logs/multiline.negate: false
|
|
||||||
# co.elastic.logs/multiline.match: after
|
|
||||||
|
|
||||||
podSecurityContext:
|
podSecurityContext:
|
||||||
{}
|
{}
|
||||||
# fsGroup: 2000
|
# fsGroup: 2000
|
||||||
|
@ -130,6 +124,10 @@ services:
|
||||||
minio: 'http://minio-service.{{ .Release.Namespace }}.svc.{{ .Values.services.dns }}:{{ .Values.services.objectStore.port }}'
|
minio: 'http://minio-service.{{ .Release.Namespace }}.svc.{{ .Values.services.dns }}:{{ .Values.services.objectStore.port }}'
|
||||||
couchdb: 'http://{{ .Release.Name }}-svc-couchdb:{{ .Values.services.couchdb.port }}'
|
couchdb: 'http://{{ .Release.Name }}-svc-couchdb:{{ .Values.services.couchdb.port }}'
|
||||||
resources: {}
|
resources: {}
|
||||||
|
# annotations:
|
||||||
|
# co.elastic.logs/module: nginx
|
||||||
|
# co.elastic.logs/fileset.stdout: access
|
||||||
|
# co.elastic.logs/fileset.stderr: error
|
||||||
|
|
||||||
apps:
|
apps:
|
||||||
port: 4002
|
port: 4002
|
||||||
|
@ -137,11 +135,20 @@ services:
|
||||||
logLevel: info
|
logLevel: info
|
||||||
resources: {}
|
resources: {}
|
||||||
# nodeDebug: "" # set the value of NODE_DEBUG
|
# nodeDebug: "" # set the value of NODE_DEBUG
|
||||||
|
# annotations:
|
||||||
|
# co.elastic.logs/multiline.type: pattern
|
||||||
|
# co.elastic.logs/multiline.pattern: '^[[:space:]]'
|
||||||
|
# co.elastic.logs/multiline.negate: false
|
||||||
|
# co.elastic.logs/multiline.match: after
|
||||||
worker:
|
worker:
|
||||||
port: 4003
|
port: 4003
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
resources: {}
|
resources: {}
|
||||||
|
# annotations:
|
||||||
|
# co.elastic.logs/multiline.type: pattern
|
||||||
|
# co.elastic.logs/multiline.pattern: '^[[:space:]]'
|
||||||
|
# co.elastic.logs/multiline.negate: false
|
||||||
|
# co.elastic.logs/multiline.match: after
|
||||||
|
|
||||||
couchdb:
|
couchdb:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.2.11-alpha.1",
|
"version": "2.2.12-alpha.16",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
"dev:server": "yarn run kill-server && lerna run --parallel dev:builder --concurrency 1 --scope @budibase/backend-core --scope @budibase/worker --scope @budibase/server",
|
"dev:server": "yarn run kill-server && lerna run --parallel dev:builder --concurrency 1 --scope @budibase/backend-core --scope @budibase/worker --scope @budibase/server",
|
||||||
"test": "lerna run test && yarn test:pro",
|
"test": "lerna run test && yarn test:pro",
|
||||||
"test:pro": "bash scripts/pro/test.sh",
|
"test:pro": "bash scripts/pro/test.sh",
|
||||||
"lint:eslint": "eslint packages",
|
"lint:eslint": "eslint packages && eslint qa-core",
|
||||||
"lint:prettier": "prettier --check \"packages/**/*.{js,ts,svelte}\"",
|
"lint:prettier": "prettier --check \"packages/**/*.{js,ts,svelte}\" && prettier --write \"examples/**/*.{js,ts,svelte}\" && prettier --check \"qa-core/**/*.{js,ts,svelte}\"",
|
||||||
"lint": "yarn run lint:eslint && yarn run lint:prettier",
|
"lint": "yarn run lint:eslint && yarn run lint:prettier",
|
||||||
"lint:fix:eslint": "eslint --fix packages qa-core",
|
"lint:fix:eslint": "eslint --fix packages qa-core",
|
||||||
"lint:fix:prettier": "prettier --write \"packages/**/*.{js,ts,svelte}\" && prettier --write \"examples/**/*.{js,ts,svelte}\" && prettier --write \"qa-core/**/*.{js,ts,svelte}\"",
|
"lint:fix:prettier": "prettier --write \"packages/**/*.{js,ts,svelte}\" && prettier --write \"examples/**/*.{js,ts,svelte}\" && prettier --write \"qa-core/**/*.{js,ts,svelte}\"",
|
||||||
|
@ -84,4 +84,4 @@
|
||||||
"install:pro": "bash scripts/pro/install.sh",
|
"install:pro": "bash scripts/pro/install.sh",
|
||||||
"dep:clean": "yarn clean && yarn bootstrap"
|
"dep:clean": "yarn clean && yarn bootstrap"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,9 @@ const config: Config.InitialOptions = {
|
||||||
setupFiles: ["./tests/jestSetup.ts"],
|
setupFiles: ["./tests/jestSetup.ts"],
|
||||||
collectCoverageFrom: ["src/**/*.{js,ts}"],
|
collectCoverageFrom: ["src/**/*.{js,ts}"],
|
||||||
coverageReporters: ["lcov", "json", "clover"],
|
coverageReporters: ["lcov", "json", "clover"],
|
||||||
|
transform: {
|
||||||
|
"^.+\\.ts?$": "@swc/jest",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!process.env.CI) {
|
if (!process.env.CI) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/backend-core",
|
"name": "@budibase/backend-core",
|
||||||
"version": "2.2.11-alpha.1",
|
"version": "2.2.12-alpha.16",
|
||||||
"description": "Budibase backend core libraries used in server and worker",
|
"description": "Budibase backend core libraries used in server and worker",
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
"types": "dist/src/index.d.ts",
|
"types": "dist/src/index.d.ts",
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/nano": "10.1.1",
|
"@budibase/nano": "10.1.1",
|
||||||
"@budibase/types": "2.2.11-alpha.1",
|
"@budibase/types": "2.2.12-alpha.16",
|
||||||
"@shopify/jest-koa-mocks": "5.0.1",
|
"@shopify/jest-koa-mocks": "5.0.1",
|
||||||
"@techpass/passport-openidconnect": "0.3.2",
|
"@techpass/passport-openidconnect": "0.3.2",
|
||||||
"aws-cloudfront-sign": "2.2.0",
|
"aws-cloudfront-sign": "2.2.0",
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
"bcrypt": "5.0.1",
|
"bcrypt": "5.0.1",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
"bull": "4.10.1",
|
"bull": "4.10.1",
|
||||||
|
"correlation-id": "4.0.0",
|
||||||
"dotenv": "16.0.1",
|
"dotenv": "16.0.1",
|
||||||
"emitter-listener": "1.1.2",
|
"emitter-listener": "1.1.2",
|
||||||
"ioredis": "4.28.0",
|
"ioredis": "4.28.0",
|
||||||
|
@ -56,19 +57,23 @@
|
||||||
"zlib": "1.0.5"
|
"zlib": "1.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@swc/core": "^1.3.25",
|
||||||
|
"@swc/jest": "^0.2.24",
|
||||||
"@types/chance": "1.1.3",
|
"@types/chance": "1.1.3",
|
||||||
"@types/ioredis": "4.28.0",
|
"@types/ioredis": "4.28.0",
|
||||||
"@types/jest": "27.5.1",
|
"@types/jest": "27.5.1",
|
||||||
"@types/koa": "2.13.4",
|
"@types/koa": "2.13.4",
|
||||||
|
"@types/koa-pino-logger": "3.0.0",
|
||||||
"@types/lodash": "4.14.180",
|
"@types/lodash": "4.14.180",
|
||||||
"@types/node": "14.18.20",
|
"@types/node": "14.18.20",
|
||||||
"@types/node-fetch": "2.6.1",
|
"@types/node-fetch": "2.6.1",
|
||||||
|
"@types/pino-http": "5.8.1",
|
||||||
"@types/pouchdb": "6.4.0",
|
"@types/pouchdb": "6.4.0",
|
||||||
"@types/redlock": "4.0.3",
|
"@types/redlock": "4.0.3",
|
||||||
"@types/semver": "7.3.7",
|
"@types/semver": "7.3.7",
|
||||||
"@types/tar-fs": "2.0.1",
|
"@types/tar-fs": "2.0.1",
|
||||||
"@types/uuid": "8.3.4",
|
"@types/uuid": "8.3.4",
|
||||||
"chance": "1.1.3",
|
"chance": "1.1.8",
|
||||||
"ioredis-mock": "5.8.0",
|
"ioredis-mock": "5.8.0",
|
||||||
"jest": "28.1.1",
|
"jest": "28.1.1",
|
||||||
"koa": "2.13.4",
|
"koa": "2.13.4",
|
||||||
|
|
|
@ -7,7 +7,7 @@ function generateTenantKey(key: string) {
|
||||||
return `${key}:${tenantId}`
|
return `${key}:${tenantId}`
|
||||||
}
|
}
|
||||||
|
|
||||||
export = class BaseCache {
|
export default class BaseCache {
|
||||||
client: Client | undefined
|
client: Client | undefined
|
||||||
|
|
||||||
constructor(client: Client | undefined = undefined) {
|
constructor(client: Client | undefined = undefined) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const BaseCache = require("./base")
|
const BaseCache = require("./base")
|
||||||
|
|
||||||
const GENERIC = new BaseCache()
|
const GENERIC = new BaseCache.default()
|
||||||
|
|
||||||
export enum CacheKey {
|
export enum CacheKey {
|
||||||
CHECKLIST = "checklist",
|
CHECKLIST = "checklist",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import fetch from "node-fetch"
|
import fetch from "node-fetch"
|
||||||
|
import * as logging from "../logging"
|
||||||
|
|
||||||
export = class API {
|
export default class API {
|
||||||
host: string
|
host: string
|
||||||
|
|
||||||
constructor(host: string) {
|
constructor(host: string) {
|
||||||
|
@ -22,6 +23,9 @@ export = class API {
|
||||||
|
|
||||||
let json = options.headers["Content-Type"] === "application/json"
|
let json = options.headers["Content-Type"] === "application/json"
|
||||||
|
|
||||||
|
// add x-budibase-correlation-id header
|
||||||
|
logging.correlation.setHeader(options.headers)
|
||||||
|
|
||||||
const requestOptions = {
|
const requestOptions = {
|
||||||
method: method,
|
method: method,
|
||||||
body: json ? JSON.stringify(options.body) : options.body,
|
body: json ? JSON.stringify(options.body) : options.body,
|
||||||
|
|
|
@ -22,6 +22,7 @@ export enum Header {
|
||||||
TENANT_ID = "x-budibase-tenant-id",
|
TENANT_ID = "x-budibase-tenant-id",
|
||||||
TOKEN = "x-budibase-token",
|
TOKEN = "x-budibase-token",
|
||||||
CSRF_TOKEN = "x-csrf-token",
|
CSRF_TOKEN = "x-csrf-token",
|
||||||
|
CORRELATION_ID = "x-budibase-correlation-id",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum GlobalRole {
|
export enum GlobalRole {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
require("../../../tests")
|
require("../../../tests")
|
||||||
const context = require("../")
|
const context = require("../")
|
||||||
const { DEFAULT_TENANT_ID } = require("../../constants")
|
const { DEFAULT_TENANT_ID } = require("../../constants")
|
||||||
const env = require("../../environment")
|
import env from "../../environment"
|
||||||
|
|
||||||
describe("context", () => {
|
describe("context", () => {
|
||||||
describe("doInTenant", () => {
|
describe("doInTenant", () => {
|
||||||
|
@ -26,7 +26,7 @@ describe("context", () => {
|
||||||
|
|
||||||
it("fails when no tenant id is set", () => {
|
it("fails when no tenant id is set", () => {
|
||||||
const test = () => {
|
const test = () => {
|
||||||
let error
|
let error: any
|
||||||
try {
|
try {
|
||||||
context.getTenantId()
|
context.getTenantId()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -45,7 +45,7 @@ describe("context", () => {
|
||||||
|
|
||||||
it("fails when no tenant db is set", () => {
|
it("fails when no tenant db is set", () => {
|
||||||
const test = () => {
|
const test = () => {
|
||||||
let error
|
let error: any
|
||||||
try {
|
try {
|
||||||
context.getGlobalDB()
|
context.getGlobalDB()
|
||||||
} catch (e) {
|
} catch (e) {
|
|
@ -5,18 +5,13 @@ const {
|
||||||
isDevAppID,
|
isDevAppID,
|
||||||
isProdAppID,
|
isProdAppID,
|
||||||
} = require("../conversions")
|
} = require("../conversions")
|
||||||
const {
|
const { generateAppID, getPlatformUrl, getScopedConfig } = require("../utils")
|
||||||
generateAppID,
|
|
||||||
getPlatformUrl,
|
|
||||||
getScopedConfig
|
|
||||||
} = require("../utils")
|
|
||||||
const tenancy = require("../../tenancy")
|
const tenancy = require("../../tenancy")
|
||||||
const { Config, DEFAULT_TENANT_ID } = require("../../constants")
|
const { Config, DEFAULT_TENANT_ID } = require("../../constants")
|
||||||
const env = require("../../environment")
|
import env from "../../environment"
|
||||||
|
|
||||||
describe("utils", () => {
|
describe("utils", () => {
|
||||||
describe("app ID manipulation", () => {
|
describe("app ID manipulation", () => {
|
||||||
|
|
||||||
function getID() {
|
function getID() {
|
||||||
const appId = generateAppID()
|
const appId = generateAppID()
|
||||||
const split = appId.split("_")
|
const split = appId.split("_")
|
||||||
|
@ -28,42 +23,42 @@ describe("utils", () => {
|
||||||
it("should be able to generate a new app ID", () => {
|
it("should be able to generate a new app ID", () => {
|
||||||
expect(generateAppID().startsWith("app_")).toEqual(true)
|
expect(generateAppID().startsWith("app_")).toEqual(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should be able to convert a production app ID to development", () => {
|
it("should be able to convert a production app ID to development", () => {
|
||||||
const { appId, uuid } = getID()
|
const { appId, uuid } = getID()
|
||||||
expect(getDevelopmentAppID(appId)).toEqual(`app_dev_${uuid}`)
|
expect(getDevelopmentAppID(appId)).toEqual(`app_dev_${uuid}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should be able to convert a development app ID to development", () => {
|
it("should be able to convert a development app ID to development", () => {
|
||||||
const { devAppId, uuid } = getID()
|
const { devAppId, uuid } = getID()
|
||||||
expect(getDevelopmentAppID(devAppId)).toEqual(`app_dev_${uuid}`)
|
expect(getDevelopmentAppID(devAppId)).toEqual(`app_dev_${uuid}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should be able to convert a development ID to a production", () => {
|
it("should be able to convert a development ID to a production", () => {
|
||||||
const { devAppId, uuid } = getID()
|
const { devAppId, uuid } = getID()
|
||||||
expect(getProdAppID(devAppId)).toEqual(`app_${uuid}`)
|
expect(getProdAppID(devAppId)).toEqual(`app_${uuid}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should be able to convert a production ID to production", () => {
|
it("should be able to convert a production ID to production", () => {
|
||||||
const { appId, uuid } = getID()
|
const { appId, uuid } = getID()
|
||||||
expect(getProdAppID(appId)).toEqual(`app_${uuid}`)
|
expect(getProdAppID(appId)).toEqual(`app_${uuid}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should be able to confirm dev app ID is development", () => {
|
it("should be able to confirm dev app ID is development", () => {
|
||||||
const { devAppId } = getID()
|
const { devAppId } = getID()
|
||||||
expect(isDevAppID(devAppId)).toEqual(true)
|
expect(isDevAppID(devAppId)).toEqual(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should be able to confirm prod app ID is not development", () => {
|
it("should be able to confirm prod app ID is not development", () => {
|
||||||
const { appId } = getID()
|
const { appId } = getID()
|
||||||
expect(isDevAppID(appId)).toEqual(false)
|
expect(isDevAppID(appId)).toEqual(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should be able to confirm prod app ID is prod", () => {
|
it("should be able to confirm prod app ID is prod", () => {
|
||||||
const { appId } = getID()
|
const { appId } = getID()
|
||||||
expect(isProdAppID(appId)).toEqual(true)
|
expect(isProdAppID(appId)).toEqual(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should be able to confirm dev app ID is not prod", () => {
|
it("should be able to confirm dev app ID is not prod", () => {
|
||||||
const { devAppId } = getID()
|
const { devAppId } = getID()
|
||||||
expect(isProdAppID(devAppId)).toEqual(false)
|
expect(isProdAppID(devAppId)).toEqual(false)
|
||||||
|
@ -81,8 +76,8 @@ const setDbPlatformUrl = async () => {
|
||||||
_id: "config_settings",
|
_id: "config_settings",
|
||||||
type: Config.SETTINGS,
|
type: Config.SETTINGS,
|
||||||
config: {
|
config: {
|
||||||
platformUrl: DB_URL
|
platformUrl: DB_URL,
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,17 +87,16 @@ const clearSettingsConfig = async () => {
|
||||||
try {
|
try {
|
||||||
const config = await db.get("config_settings")
|
const config = await db.get("config_settings")
|
||||||
await db.remove("config_settings", config._rev)
|
await db.remove("config_settings", config._rev)
|
||||||
} catch (e) {
|
} catch (e: any) {
|
||||||
if (e.status !== 404) {
|
if (e.status !== 404) {
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
describe("getPlatformUrl", () => {
|
describe("getPlatformUrl", () => {
|
||||||
describe("self host", () => {
|
describe("self host", () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
env._set("SELF_HOST", 1)
|
env._set("SELF_HOST", 1)
|
||||||
await clearSettingsConfig()
|
await clearSettingsConfig()
|
||||||
|
@ -129,10 +123,9 @@ describe("getPlatformUrl", () => {
|
||||||
const url = await getPlatformUrl()
|
const url = await getPlatformUrl()
|
||||||
expect(url).toBe(DB_URL)
|
expect(url).toBe(DB_URL)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
describe("cloud", () => {
|
describe("cloud", () => {
|
||||||
const TENANT_AWARE_URL = "http://default.env.com"
|
const TENANT_AWARE_URL = "http://default.env.com"
|
||||||
|
|
||||||
|
@ -163,13 +156,12 @@ describe("getPlatformUrl", () => {
|
||||||
const url = await getPlatformUrl()
|
const url = await getPlatformUrl()
|
||||||
expect(url).toBe(TENANT_AWARE_URL)
|
expect(url).toBe(TENANT_AWARE_URL)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("getScopedConfig", () => {
|
describe("getScopedConfig", () => {
|
||||||
describe("settings config", () => {
|
describe("settings config", () => {
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
env._set("SELF_HOSTED", 1)
|
env._set("SELF_HOSTED", 1)
|
||||||
env._set("PLATFORM_URL", "")
|
env._set("PLATFORM_URL", "")
|
|
@ -102,4 +102,4 @@ for (let [key, value] of Object.entries(environment)) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export = environment
|
export default environment
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
import * as licensing from "./licensing"
|
||||||
|
|
||||||
|
// combine all error codes into single object
|
||||||
|
|
||||||
|
export const codes = {
|
||||||
|
...licensing.codes,
|
||||||
|
}
|
||||||
|
|
||||||
|
// combine all error types
|
||||||
|
export const types = [licensing.type]
|
||||||
|
|
||||||
|
// combine all error contexts
|
||||||
|
const context = {
|
||||||
|
...licensing.context,
|
||||||
|
}
|
||||||
|
|
||||||
|
// derive a public error message using codes, types and any custom contexts
|
||||||
|
export const getPublicError = (err: any) => {
|
||||||
|
let error
|
||||||
|
if (err.code || err.type) {
|
||||||
|
// add generic error information
|
||||||
|
error = {
|
||||||
|
code: err.code,
|
||||||
|
type: err.type,
|
||||||
|
}
|
||||||
|
|
||||||
|
if (err.code && context[err.code]) {
|
||||||
|
error = {
|
||||||
|
...error,
|
||||||
|
// get any additional context from this error
|
||||||
|
...context[err.code](err),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return error
|
||||||
|
}
|
|
@ -1,47 +1,3 @@
|
||||||
import { HTTPError } from "./http"
|
export * from "./errors"
|
||||||
import { UsageLimitError, FeatureDisabledError } from "./licensing"
|
export { UsageLimitError, FeatureDisabledError } from "./licensing"
|
||||||
import * as licensing from "./licensing"
|
export { HTTPError } from "./http"
|
||||||
|
|
||||||
const codes = {
|
|
||||||
...licensing.codes,
|
|
||||||
}
|
|
||||||
|
|
||||||
const types = [licensing.type]
|
|
||||||
|
|
||||||
const context = {
|
|
||||||
...licensing.context,
|
|
||||||
}
|
|
||||||
|
|
||||||
const getPublicError = (err: any) => {
|
|
||||||
let error
|
|
||||||
if (err.code || err.type) {
|
|
||||||
// add generic error information
|
|
||||||
error = {
|
|
||||||
code: err.code,
|
|
||||||
type: err.type,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (err.code && context[err.code]) {
|
|
||||||
error = {
|
|
||||||
...error,
|
|
||||||
// get any additional context from this error
|
|
||||||
...context[err.code](err),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return error
|
|
||||||
}
|
|
||||||
|
|
||||||
const pkg = {
|
|
||||||
codes,
|
|
||||||
types,
|
|
||||||
errors: {
|
|
||||||
UsageLimitError,
|
|
||||||
FeatureDisabledError,
|
|
||||||
HTTPError,
|
|
||||||
},
|
|
||||||
getPublicError,
|
|
||||||
}
|
|
||||||
|
|
||||||
export = pkg
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Event } from "@budibase/types"
|
import { Event } from "@budibase/types"
|
||||||
import { processors } from "./processors"
|
import { processors } from "./processors"
|
||||||
import * as identification from "./identification"
|
import identification from "./identification"
|
||||||
import * as backfill from "./backfill"
|
import * as backfill from "./backfill"
|
||||||
|
|
||||||
export const publishEvent = async (
|
export const publishEvent = async (
|
||||||
|
|
|
@ -33,7 +33,7 @@ const pkg = require("../../package.json")
|
||||||
* - tenant
|
* - tenant
|
||||||
* - installation
|
* - installation
|
||||||
*/
|
*/
|
||||||
export const getCurrentIdentity = async (): Promise<Identity> => {
|
const getCurrentIdentity = async (): Promise<Identity> => {
|
||||||
let identityContext = identityCtx.getIdentity()
|
let identityContext = identityCtx.getIdentity()
|
||||||
const environment = getDeploymentEnvironment()
|
const environment = getDeploymentEnvironment()
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ export const getCurrentIdentity = async (): Promise<Identity> => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const identifyInstallationGroup = async (
|
const identifyInstallationGroup = async (
|
||||||
installId: string,
|
installId: string,
|
||||||
timestamp?: string | number
|
timestamp?: string | number
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
|
@ -118,7 +118,7 @@ export const identifyInstallationGroup = async (
|
||||||
await identify({ ...group, id: `$${type}_${id}` }, timestamp)
|
await identify({ ...group, id: `$${type}_${id}` }, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const identifyTenantGroup = async (
|
const identifyTenantGroup = async (
|
||||||
tenantId: string,
|
tenantId: string,
|
||||||
account: Account | undefined,
|
account: Account | undefined,
|
||||||
timestamp?: string | number
|
timestamp?: string | number
|
||||||
|
@ -156,7 +156,7 @@ export const identifyTenantGroup = async (
|
||||||
await identify({ ...group, id: `$${type}_${id}` }, timestamp)
|
await identify({ ...group, id: `$${type}_${id}` }, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const identifyUser = async (
|
const identifyUser = async (
|
||||||
user: User,
|
user: User,
|
||||||
account: CloudAccount | undefined,
|
account: CloudAccount | undefined,
|
||||||
timestamp?: string | number
|
timestamp?: string | number
|
||||||
|
@ -191,7 +191,7 @@ export const identifyUser = async (
|
||||||
await identify(identity, timestamp)
|
await identify(identity, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const identifyAccount = async (account: Account) => {
|
const identifyAccount = async (account: Account) => {
|
||||||
let id = account.accountId
|
let id = account.accountId
|
||||||
const tenantId = account.tenantId
|
const tenantId = account.tenantId
|
||||||
let type = IdentityType.USER
|
let type = IdentityType.USER
|
||||||
|
@ -224,17 +224,11 @@ export const identifyAccount = async (account: Account) => {
|
||||||
await identify(identity)
|
await identify(identity)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const identify = async (
|
const identify = async (identity: Identity, timestamp?: string | number) => {
|
||||||
identity: Identity,
|
|
||||||
timestamp?: string | number
|
|
||||||
) => {
|
|
||||||
await processors.identify(identity, timestamp)
|
await processors.identify(identity, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const identifyGroup = async (
|
const identifyGroup = async (group: Group, timestamp?: string | number) => {
|
||||||
group: Group,
|
|
||||||
timestamp?: string | number
|
|
||||||
) => {
|
|
||||||
await processors.identifyGroup(group, timestamp)
|
await processors.identifyGroup(group, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,7 +244,7 @@ const getHostingFromEnv = () => {
|
||||||
return env.SELF_HOSTED ? Hosting.SELF : Hosting.CLOUD
|
return env.SELF_HOSTED ? Hosting.SELF : Hosting.CLOUD
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getInstallationId = async () => {
|
const getInstallationId = async () => {
|
||||||
if (isAccountPortal()) {
|
if (isAccountPortal()) {
|
||||||
return "account-portal"
|
return "account-portal"
|
||||||
}
|
}
|
||||||
|
@ -300,3 +294,14 @@ const formatDistinctId = (id: string, type: IdentityType) => {
|
||||||
return id
|
return id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
getCurrentIdentity,
|
||||||
|
identifyInstallationGroup,
|
||||||
|
identifyTenantGroup,
|
||||||
|
identifyUser,
|
||||||
|
identifyAccount,
|
||||||
|
identify,
|
||||||
|
identifyGroup,
|
||||||
|
getInstallationId,
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
export * from "./publishers"
|
export * from "./publishers"
|
||||||
export * as processors from "./processors"
|
export * as processors from "./processors"
|
||||||
export * as analytics from "./analytics"
|
export * as analytics from "./analytics"
|
||||||
export * as identification from "./identification"
|
export { default as identification } from "./identification"
|
||||||
export * as backfillCache from "./backfill"
|
export * as backfillCache from "./backfill"
|
||||||
|
|
||||||
import { processors } from "./processors"
|
import { processors } from "./processors"
|
||||||
|
|
|
@ -23,7 +23,7 @@ export default class LoggingProcessor implements EventProcessor {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let timestampString = getTimestampString(timestamp)
|
let timestampString = getTimestampString(timestamp)
|
||||||
let message = `[audit] [tenant=${identity.tenantId}] [identityType=${identity.type}] [identity=${identity.id}] ${timestampString} ${event} `
|
let message = `[audit] [identityType=${identity.type}] ${timestampString} ${event} `
|
||||||
if (env.isDev()) {
|
if (env.isDev()) {
|
||||||
message = message + `[debug: [properties=${JSON.stringify(properties)}] ]`
|
message = message + `[debug: [properties=${JSON.stringify(properties)}] ]`
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,23 +7,29 @@ import {
|
||||||
AccountVerifiedEvent,
|
AccountVerifiedEvent,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export async function created(account: Account) {
|
async function created(account: Account) {
|
||||||
const properties: AccountCreatedEvent = {
|
const properties: AccountCreatedEvent = {
|
||||||
tenantId: account.tenantId,
|
tenantId: account.tenantId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.ACCOUNT_CREATED, properties)
|
await publishEvent(Event.ACCOUNT_CREATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleted(account: Account) {
|
async function deleted(account: Account) {
|
||||||
const properties: AccountDeletedEvent = {
|
const properties: AccountDeletedEvent = {
|
||||||
tenantId: account.tenantId,
|
tenantId: account.tenantId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.ACCOUNT_DELETED, properties)
|
await publishEvent(Event.ACCOUNT_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function verified(account: Account) {
|
async function verified(account: Account) {
|
||||||
const properties: AccountVerifiedEvent = {
|
const properties: AccountVerifiedEvent = {
|
||||||
tenantId: account.tenantId,
|
tenantId: account.tenantId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.ACCOUNT_VERIFIED, properties)
|
await publishEvent(Event.ACCOUNT_VERIFIED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
deleted,
|
||||||
|
verified,
|
||||||
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {
|
||||||
AppExportedEvent,
|
AppExportedEvent,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export const created = async (app: App, timestamp?: string | number) => {
|
const created = async (app: App, timestamp?: string | number) => {
|
||||||
const properties: AppCreatedEvent = {
|
const properties: AppCreatedEvent = {
|
||||||
appId: app.appId,
|
appId: app.appId,
|
||||||
version: app.version,
|
version: app.version,
|
||||||
|
@ -23,7 +23,7 @@ export const created = async (app: App, timestamp?: string | number) => {
|
||||||
await publishEvent(Event.APP_CREATED, properties, timestamp)
|
await publishEvent(Event.APP_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updated(app: App) {
|
async function updated(app: App) {
|
||||||
const properties: AppUpdatedEvent = {
|
const properties: AppUpdatedEvent = {
|
||||||
appId: app.appId,
|
appId: app.appId,
|
||||||
version: app.version,
|
version: app.version,
|
||||||
|
@ -31,35 +31,35 @@ export async function updated(app: App) {
|
||||||
await publishEvent(Event.APP_UPDATED, properties)
|
await publishEvent(Event.APP_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleted(app: App) {
|
async function deleted(app: App) {
|
||||||
const properties: AppDeletedEvent = {
|
const properties: AppDeletedEvent = {
|
||||||
appId: app.appId,
|
appId: app.appId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.APP_DELETED, properties)
|
await publishEvent(Event.APP_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function published(app: App, timestamp?: string | number) {
|
async function published(app: App, timestamp?: string | number) {
|
||||||
const properties: AppPublishedEvent = {
|
const properties: AppPublishedEvent = {
|
||||||
appId: app.appId,
|
appId: app.appId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.APP_PUBLISHED, properties, timestamp)
|
await publishEvent(Event.APP_PUBLISHED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function unpublished(app: App) {
|
async function unpublished(app: App) {
|
||||||
const properties: AppUnpublishedEvent = {
|
const properties: AppUnpublishedEvent = {
|
||||||
appId: app.appId,
|
appId: app.appId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.APP_UNPUBLISHED, properties)
|
await publishEvent(Event.APP_UNPUBLISHED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function fileImported(app: App) {
|
async function fileImported(app: App) {
|
||||||
const properties: AppFileImportedEvent = {
|
const properties: AppFileImportedEvent = {
|
||||||
appId: app.appId,
|
appId: app.appId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.APP_FILE_IMPORTED, properties)
|
await publishEvent(Event.APP_FILE_IMPORTED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function templateImported(app: App, templateKey: string) {
|
async function templateImported(app: App, templateKey: string) {
|
||||||
const properties: AppTemplateImportedEvent = {
|
const properties: AppTemplateImportedEvent = {
|
||||||
appId: app.appId,
|
appId: app.appId,
|
||||||
templateKey,
|
templateKey,
|
||||||
|
@ -67,7 +67,7 @@ export async function templateImported(app: App, templateKey: string) {
|
||||||
await publishEvent(Event.APP_TEMPLATE_IMPORTED, properties)
|
await publishEvent(Event.APP_TEMPLATE_IMPORTED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function versionUpdated(
|
async function versionUpdated(
|
||||||
app: App,
|
app: App,
|
||||||
currentVersion: string,
|
currentVersion: string,
|
||||||
updatedToVersion: string
|
updatedToVersion: string
|
||||||
|
@ -80,7 +80,7 @@ export async function versionUpdated(
|
||||||
await publishEvent(Event.APP_VERSION_UPDATED, properties)
|
await publishEvent(Event.APP_VERSION_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function versionReverted(
|
async function versionReverted(
|
||||||
app: App,
|
app: App,
|
||||||
currentVersion: string,
|
currentVersion: string,
|
||||||
revertedToVersion: string
|
revertedToVersion: string
|
||||||
|
@ -93,16 +93,30 @@ export async function versionReverted(
|
||||||
await publishEvent(Event.APP_VERSION_REVERTED, properties)
|
await publishEvent(Event.APP_VERSION_REVERTED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function reverted(app: App) {
|
async function reverted(app: App) {
|
||||||
const properties: AppRevertedEvent = {
|
const properties: AppRevertedEvent = {
|
||||||
appId: app.appId,
|
appId: app.appId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.APP_REVERTED, properties)
|
await publishEvent(Event.APP_REVERTED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function exported(app: App) {
|
async function exported(app: App) {
|
||||||
const properties: AppExportedEvent = {
|
const properties: AppExportedEvent = {
|
||||||
appId: app.appId,
|
appId: app.appId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.APP_EXPORTED, properties)
|
await publishEvent(Event.APP_EXPORTED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
updated,
|
||||||
|
deleted,
|
||||||
|
published,
|
||||||
|
unpublished,
|
||||||
|
fileImported,
|
||||||
|
templateImported,
|
||||||
|
versionUpdated,
|
||||||
|
versionReverted,
|
||||||
|
reverted,
|
||||||
|
exported,
|
||||||
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ import {
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import { identification } from ".."
|
import { identification } from ".."
|
||||||
|
|
||||||
export async function login(source: LoginSource) {
|
async function login(source: LoginSource) {
|
||||||
const identity = await identification.getCurrentIdentity()
|
const identity = await identification.getCurrentIdentity()
|
||||||
const properties: LoginEvent = {
|
const properties: LoginEvent = {
|
||||||
userId: identity.id,
|
userId: identity.id,
|
||||||
|
@ -21,7 +21,7 @@ export async function login(source: LoginSource) {
|
||||||
await publishEvent(Event.AUTH_LOGIN, properties)
|
await publishEvent(Event.AUTH_LOGIN, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function logout() {
|
async function logout() {
|
||||||
const identity = await identification.getCurrentIdentity()
|
const identity = await identification.getCurrentIdentity()
|
||||||
const properties: LogoutEvent = {
|
const properties: LogoutEvent = {
|
||||||
userId: identity.id,
|
userId: identity.id,
|
||||||
|
@ -29,30 +29,39 @@ export async function logout() {
|
||||||
await publishEvent(Event.AUTH_LOGOUT, properties)
|
await publishEvent(Event.AUTH_LOGOUT, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function SSOCreated(type: SSOType, timestamp?: string | number) {
|
async function SSOCreated(type: SSOType, timestamp?: string | number) {
|
||||||
const properties: SSOCreatedEvent = {
|
const properties: SSOCreatedEvent = {
|
||||||
type,
|
type,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.AUTH_SSO_CREATED, properties, timestamp)
|
await publishEvent(Event.AUTH_SSO_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function SSOUpdated(type: SSOType) {
|
async function SSOUpdated(type: SSOType) {
|
||||||
const properties: SSOUpdatedEvent = {
|
const properties: SSOUpdatedEvent = {
|
||||||
type,
|
type,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.AUTH_SSO_UPDATED, properties)
|
await publishEvent(Event.AUTH_SSO_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function SSOActivated(type: SSOType, timestamp?: string | number) {
|
async function SSOActivated(type: SSOType, timestamp?: string | number) {
|
||||||
const properties: SSOActivatedEvent = {
|
const properties: SSOActivatedEvent = {
|
||||||
type,
|
type,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.AUTH_SSO_ACTIVATED, properties, timestamp)
|
await publishEvent(Event.AUTH_SSO_ACTIVATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function SSODeactivated(type: SSOType) {
|
async function SSODeactivated(type: SSOType) {
|
||||||
const properties: SSODeactivatedEvent = {
|
const properties: SSODeactivatedEvent = {
|
||||||
type,
|
type,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.AUTH_SSO_DEACTIVATED, properties)
|
await publishEvent(Event.AUTH_SSO_DEACTIVATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
login,
|
||||||
|
logout,
|
||||||
|
SSOCreated,
|
||||||
|
SSOUpdated,
|
||||||
|
SSOActivated,
|
||||||
|
SSODeactivated,
|
||||||
|
}
|
||||||
|
|
|
@ -12,10 +12,7 @@ import {
|
||||||
AutomationsRunEvent,
|
AutomationsRunEvent,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export async function created(
|
async function created(automation: Automation, timestamp?: string | number) {
|
||||||
automation: Automation,
|
|
||||||
timestamp?: string | number
|
|
||||||
) {
|
|
||||||
const properties: AutomationCreatedEvent = {
|
const properties: AutomationCreatedEvent = {
|
||||||
appId: automation.appId,
|
appId: automation.appId,
|
||||||
automationId: automation._id as string,
|
automationId: automation._id as string,
|
||||||
|
@ -25,7 +22,7 @@ export async function created(
|
||||||
await publishEvent(Event.AUTOMATION_CREATED, properties, timestamp)
|
await publishEvent(Event.AUTOMATION_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function triggerUpdated(automation: Automation) {
|
async function triggerUpdated(automation: Automation) {
|
||||||
const properties: AutomationTriggerUpdatedEvent = {
|
const properties: AutomationTriggerUpdatedEvent = {
|
||||||
appId: automation.appId,
|
appId: automation.appId,
|
||||||
automationId: automation._id as string,
|
automationId: automation._id as string,
|
||||||
|
@ -35,7 +32,7 @@ export async function triggerUpdated(automation: Automation) {
|
||||||
await publishEvent(Event.AUTOMATION_TRIGGER_UPDATED, properties)
|
await publishEvent(Event.AUTOMATION_TRIGGER_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleted(automation: Automation) {
|
async function deleted(automation: Automation) {
|
||||||
const properties: AutomationDeletedEvent = {
|
const properties: AutomationDeletedEvent = {
|
||||||
appId: automation.appId,
|
appId: automation.appId,
|
||||||
automationId: automation._id as string,
|
automationId: automation._id as string,
|
||||||
|
@ -45,7 +42,7 @@ export async function deleted(automation: Automation) {
|
||||||
await publishEvent(Event.AUTOMATION_DELETED, properties)
|
await publishEvent(Event.AUTOMATION_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function tested(automation: Automation) {
|
async function tested(automation: Automation) {
|
||||||
const properties: AutomationTestedEvent = {
|
const properties: AutomationTestedEvent = {
|
||||||
appId: automation.appId,
|
appId: automation.appId,
|
||||||
automationId: automation._id as string,
|
automationId: automation._id as string,
|
||||||
|
@ -55,14 +52,14 @@ export async function tested(automation: Automation) {
|
||||||
await publishEvent(Event.AUTOMATION_TESTED, properties)
|
await publishEvent(Event.AUTOMATION_TESTED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const run = async (count: number, timestamp?: string | number) => {
|
const run = async (count: number, timestamp?: string | number) => {
|
||||||
const properties: AutomationsRunEvent = {
|
const properties: AutomationsRunEvent = {
|
||||||
count,
|
count,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.AUTOMATIONS_RUN, properties, timestamp)
|
await publishEvent(Event.AUTOMATIONS_RUN, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function stepCreated(
|
async function stepCreated(
|
||||||
automation: Automation,
|
automation: Automation,
|
||||||
step: AutomationStep,
|
step: AutomationStep,
|
||||||
timestamp?: string | number
|
timestamp?: string | number
|
||||||
|
@ -78,10 +75,7 @@ export async function stepCreated(
|
||||||
await publishEvent(Event.AUTOMATION_STEP_CREATED, properties, timestamp)
|
await publishEvent(Event.AUTOMATION_STEP_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function stepDeleted(
|
async function stepDeleted(automation: Automation, step: AutomationStep) {
|
||||||
automation: Automation,
|
|
||||||
step: AutomationStep
|
|
||||||
) {
|
|
||||||
const properties: AutomationStepDeletedEvent = {
|
const properties: AutomationStepDeletedEvent = {
|
||||||
appId: automation.appId,
|
appId: automation.appId,
|
||||||
automationId: automation._id as string,
|
automationId: automation._id as string,
|
||||||
|
@ -92,3 +86,13 @@ export async function stepDeleted(
|
||||||
}
|
}
|
||||||
await publishEvent(Event.AUTOMATION_STEP_DELETED, properties)
|
await publishEvent(Event.AUTOMATION_STEP_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
triggerUpdated,
|
||||||
|
deleted,
|
||||||
|
tested,
|
||||||
|
run,
|
||||||
|
stepCreated,
|
||||||
|
stepDeleted,
|
||||||
|
}
|
||||||
|
|
|
@ -8,18 +8,18 @@ import {
|
||||||
InstallationBackfillSucceededEvent,
|
InstallationBackfillSucceededEvent,
|
||||||
InstallationBackfillFailedEvent,
|
InstallationBackfillFailedEvent,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
const env = require("../../environment")
|
import env from "../../environment"
|
||||||
|
|
||||||
const shouldSkip = !env.SELF_HOSTED && !env.isDev()
|
const shouldSkip = !env.SELF_HOSTED && !env.isDev()
|
||||||
|
|
||||||
export async function appSucceeded(properties: AppBackfillSucceededEvent) {
|
async function appSucceeded(properties: AppBackfillSucceededEvent) {
|
||||||
if (shouldSkip) {
|
if (shouldSkip) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
await publishEvent(Event.APP_BACKFILL_SUCCEEDED, properties)
|
await publishEvent(Event.APP_BACKFILL_SUCCEEDED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function appFailed(error: any) {
|
async function appFailed(error: any) {
|
||||||
if (shouldSkip) {
|
if (shouldSkip) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -29,16 +29,14 @@ export async function appFailed(error: any) {
|
||||||
await publishEvent(Event.APP_BACKFILL_FAILED, properties)
|
await publishEvent(Event.APP_BACKFILL_FAILED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function tenantSucceeded(
|
async function tenantSucceeded(properties: TenantBackfillSucceededEvent) {
|
||||||
properties: TenantBackfillSucceededEvent
|
|
||||||
) {
|
|
||||||
if (shouldSkip) {
|
if (shouldSkip) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
await publishEvent(Event.TENANT_BACKFILL_SUCCEEDED, properties)
|
await publishEvent(Event.TENANT_BACKFILL_SUCCEEDED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function tenantFailed(error: any) {
|
async function tenantFailed(error: any) {
|
||||||
if (shouldSkip) {
|
if (shouldSkip) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -48,7 +46,7 @@ export async function tenantFailed(error: any) {
|
||||||
await publishEvent(Event.TENANT_BACKFILL_FAILED, properties)
|
await publishEvent(Event.TENANT_BACKFILL_FAILED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function installationSucceeded() {
|
async function installationSucceeded() {
|
||||||
if (shouldSkip) {
|
if (shouldSkip) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -56,7 +54,7 @@ export async function installationSucceeded() {
|
||||||
await publishEvent(Event.INSTALLATION_BACKFILL_SUCCEEDED, properties)
|
await publishEvent(Event.INSTALLATION_BACKFILL_SUCCEEDED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function installationFailed(error: any) {
|
async function installationFailed(error: any) {
|
||||||
if (shouldSkip) {
|
if (shouldSkip) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -65,3 +63,12 @@ export async function installationFailed(error: any) {
|
||||||
}
|
}
|
||||||
await publishEvent(Event.INSTALLATION_BACKFILL_FAILED, properties)
|
await publishEvent(Event.INSTALLATION_BACKFILL_FAILED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
appSucceeded,
|
||||||
|
appFailed,
|
||||||
|
tenantSucceeded,
|
||||||
|
tenantFailed,
|
||||||
|
installationSucceeded,
|
||||||
|
installationFailed,
|
||||||
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import { publishEvent } from "../events"
|
import { publishEvent } from "../events"
|
||||||
|
|
||||||
export async function appBackupRestored(backup: AppBackup) {
|
async function appBackupRestored(backup: AppBackup) {
|
||||||
const properties: AppBackupRestoreEvent = {
|
const properties: AppBackupRestoreEvent = {
|
||||||
appId: backup.appId,
|
appId: backup.appId,
|
||||||
restoreId: backup._id!,
|
restoreId: backup._id!,
|
||||||
|
@ -18,7 +18,7 @@ export async function appBackupRestored(backup: AppBackup) {
|
||||||
await publishEvent(Event.APP_BACKUP_RESTORED, properties)
|
await publishEvent(Event.APP_BACKUP_RESTORED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function appBackupTriggered(
|
async function appBackupTriggered(
|
||||||
appId: string,
|
appId: string,
|
||||||
backupId: string,
|
backupId: string,
|
||||||
type: AppBackupType,
|
type: AppBackupType,
|
||||||
|
@ -32,3 +32,8 @@ export async function appBackupTriggered(
|
||||||
}
|
}
|
||||||
await publishEvent(Event.APP_BACKUP_TRIGGERED, properties)
|
await publishEvent(Event.APP_BACKUP_TRIGGERED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
appBackupRestored,
|
||||||
|
appBackupTriggered,
|
||||||
|
}
|
||||||
|
|
|
@ -14,10 +14,7 @@ function isCustom(datasource: Datasource) {
|
||||||
return !sources.includes(datasource.source)
|
return !sources.includes(datasource.source)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function created(
|
async function created(datasource: Datasource, timestamp?: string | number) {
|
||||||
datasource: Datasource,
|
|
||||||
timestamp?: string | number
|
|
||||||
) {
|
|
||||||
const properties: DatasourceCreatedEvent = {
|
const properties: DatasourceCreatedEvent = {
|
||||||
datasourceId: datasource._id as string,
|
datasourceId: datasource._id as string,
|
||||||
source: datasource.source,
|
source: datasource.source,
|
||||||
|
@ -26,7 +23,7 @@ export async function created(
|
||||||
await publishEvent(Event.DATASOURCE_CREATED, properties, timestamp)
|
await publishEvent(Event.DATASOURCE_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updated(datasource: Datasource) {
|
async function updated(datasource: Datasource) {
|
||||||
const properties: DatasourceUpdatedEvent = {
|
const properties: DatasourceUpdatedEvent = {
|
||||||
datasourceId: datasource._id as string,
|
datasourceId: datasource._id as string,
|
||||||
source: datasource.source,
|
source: datasource.source,
|
||||||
|
@ -35,7 +32,7 @@ export async function updated(datasource: Datasource) {
|
||||||
await publishEvent(Event.DATASOURCE_UPDATED, properties)
|
await publishEvent(Event.DATASOURCE_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleted(datasource: Datasource) {
|
async function deleted(datasource: Datasource) {
|
||||||
const properties: DatasourceDeletedEvent = {
|
const properties: DatasourceDeletedEvent = {
|
||||||
datasourceId: datasource._id as string,
|
datasourceId: datasource._id as string,
|
||||||
source: datasource.source,
|
source: datasource.source,
|
||||||
|
@ -43,3 +40,9 @@ export async function deleted(datasource: Datasource) {
|
||||||
}
|
}
|
||||||
await publishEvent(Event.DATASOURCE_DELETED, properties)
|
await publishEvent(Event.DATASOURCE_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
updated,
|
||||||
|
deleted,
|
||||||
|
}
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
import { publishEvent } from "../events"
|
import { publishEvent } from "../events"
|
||||||
import { Event, SMTPCreatedEvent, SMTPUpdatedEvent } from "@budibase/types"
|
import { Event, SMTPCreatedEvent, SMTPUpdatedEvent } from "@budibase/types"
|
||||||
|
|
||||||
export async function SMTPCreated(timestamp?: string | number) {
|
async function SMTPCreated(timestamp?: string | number) {
|
||||||
const properties: SMTPCreatedEvent = {}
|
const properties: SMTPCreatedEvent = {}
|
||||||
await publishEvent(Event.EMAIL_SMTP_CREATED, properties, timestamp)
|
await publishEvent(Event.EMAIL_SMTP_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function SMTPUpdated() {
|
async function SMTPUpdated() {
|
||||||
const properties: SMTPUpdatedEvent = {}
|
const properties: SMTPUpdatedEvent = {}
|
||||||
await publishEvent(Event.EMAIL_SMTP_UPDATED, properties)
|
await publishEvent(Event.EMAIL_SMTP_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
SMTPCreated,
|
||||||
|
SMTPUpdated,
|
||||||
|
}
|
||||||
|
|
|
@ -11,28 +11,28 @@ import {
|
||||||
UserGroupRoles,
|
UserGroupRoles,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export async function created(group: UserGroup, timestamp?: number) {
|
async function created(group: UserGroup, timestamp?: number) {
|
||||||
const properties: GroupCreatedEvent = {
|
const properties: GroupCreatedEvent = {
|
||||||
groupId: group._id as string,
|
groupId: group._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.USER_GROUP_CREATED, properties, timestamp)
|
await publishEvent(Event.USER_GROUP_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updated(group: UserGroup) {
|
async function updated(group: UserGroup) {
|
||||||
const properties: GroupUpdatedEvent = {
|
const properties: GroupUpdatedEvent = {
|
||||||
groupId: group._id as string,
|
groupId: group._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.USER_GROUP_UPDATED, properties)
|
await publishEvent(Event.USER_GROUP_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleted(group: UserGroup) {
|
async function deleted(group: UserGroup) {
|
||||||
const properties: GroupDeletedEvent = {
|
const properties: GroupDeletedEvent = {
|
||||||
groupId: group._id as string,
|
groupId: group._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.USER_GROUP_DELETED, properties)
|
await publishEvent(Event.USER_GROUP_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function usersAdded(count: number, group: UserGroup) {
|
async function usersAdded(count: number, group: UserGroup) {
|
||||||
const properties: GroupUsersAddedEvent = {
|
const properties: GroupUsersAddedEvent = {
|
||||||
count,
|
count,
|
||||||
groupId: group._id as string,
|
groupId: group._id as string,
|
||||||
|
@ -40,7 +40,7 @@ export async function usersAdded(count: number, group: UserGroup) {
|
||||||
await publishEvent(Event.USER_GROUP_USERS_ADDED, properties)
|
await publishEvent(Event.USER_GROUP_USERS_ADDED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function usersDeleted(count: number, group: UserGroup) {
|
async function usersDeleted(count: number, group: UserGroup) {
|
||||||
const properties: GroupUsersDeletedEvent = {
|
const properties: GroupUsersDeletedEvent = {
|
||||||
count,
|
count,
|
||||||
groupId: group._id as string,
|
groupId: group._id as string,
|
||||||
|
@ -48,7 +48,7 @@ export async function usersDeleted(count: number, group: UserGroup) {
|
||||||
await publishEvent(Event.USER_GROUP_USERS_REMOVED, properties)
|
await publishEvent(Event.USER_GROUP_USERS_REMOVED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function createdOnboarding(groupId: string) {
|
async function createdOnboarding(groupId: string) {
|
||||||
const properties: GroupAddedOnboardingEvent = {
|
const properties: GroupAddedOnboardingEvent = {
|
||||||
groupId: groupId,
|
groupId: groupId,
|
||||||
onboarding: true,
|
onboarding: true,
|
||||||
|
@ -56,9 +56,19 @@ export async function createdOnboarding(groupId: string) {
|
||||||
await publishEvent(Event.USER_GROUP_ONBOARDING, properties)
|
await publishEvent(Event.USER_GROUP_ONBOARDING, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function permissionsEdited(roles: UserGroupRoles) {
|
async function permissionsEdited(roles: UserGroupRoles) {
|
||||||
const properties: UserGroupRoles = {
|
const properties: UserGroupRoles = {
|
||||||
...roles,
|
...roles,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.USER_GROUP_PERMISSIONS_EDITED, properties)
|
await publishEvent(Event.USER_GROUP_PERMISSIONS_EDITED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
updated,
|
||||||
|
deleted,
|
||||||
|
usersAdded,
|
||||||
|
usersDeleted,
|
||||||
|
createdOnboarding,
|
||||||
|
permissionsEdited,
|
||||||
|
}
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
export * as account from "./account"
|
export { default as account } from "./account"
|
||||||
export * as app from "./app"
|
export { default as app } from "./app"
|
||||||
export * as auth from "./auth"
|
export { default as auth } from "./auth"
|
||||||
export * as automation from "./automation"
|
export { default as automation } from "./automation"
|
||||||
export * as datasource from "./datasource"
|
export { default as datasource } from "./datasource"
|
||||||
export * as email from "./email"
|
export { default as email } from "./email"
|
||||||
export * as license from "./license"
|
export { default as license } from "./license"
|
||||||
export * as layout from "./layout"
|
export { default as layout } from "./layout"
|
||||||
export * as org from "./org"
|
export { default as org } from "./org"
|
||||||
export * as query from "./query"
|
export { default as query } from "./query"
|
||||||
export * as role from "./role"
|
export { default as role } from "./role"
|
||||||
export * as screen from "./screen"
|
export { default as screen } from "./screen"
|
||||||
export * as rows from "./rows"
|
export { default as rows } from "./rows"
|
||||||
export * as table from "./table"
|
export { default as table } from "./table"
|
||||||
export * as serve from "./serve"
|
export { default as serve } from "./serve"
|
||||||
export * as user from "./user"
|
export { default as user } from "./user"
|
||||||
export * as view from "./view"
|
export { default as view } from "./view"
|
||||||
export * as installation from "./installation"
|
export { default as installation } from "./installation"
|
||||||
export * as backfill from "./backfill"
|
export { default as backfill } from "./backfill"
|
||||||
export * as group from "./group"
|
export { default as group } from "./group"
|
||||||
export * as plugin from "./plugin"
|
export { default as plugin } from "./plugin"
|
||||||
export * as backup from "./backup"
|
export { default as backup } from "./backup"
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
import { publishEvent } from "../events"
|
import { publishEvent } from "../events"
|
||||||
import { Event, VersionCheckedEvent, VersionChangeEvent } from "@budibase/types"
|
import { Event, VersionCheckedEvent, VersionChangeEvent } from "@budibase/types"
|
||||||
|
|
||||||
export async function versionChecked(version: string) {
|
async function versionChecked(version: string) {
|
||||||
const properties: VersionCheckedEvent = {
|
const properties: VersionCheckedEvent = {
|
||||||
currentVersion: version,
|
currentVersion: version,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.INSTALLATION_VERSION_CHECKED, properties)
|
await publishEvent(Event.INSTALLATION_VERSION_CHECKED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function upgraded(from: string, to: string) {
|
async function upgraded(from: string, to: string) {
|
||||||
const properties: VersionChangeEvent = {
|
const properties: VersionChangeEvent = {
|
||||||
from,
|
from,
|
||||||
to,
|
to,
|
||||||
|
@ -17,7 +17,7 @@ export async function upgraded(from: string, to: string) {
|
||||||
await publishEvent(Event.INSTALLATION_VERSION_UPGRADED, properties)
|
await publishEvent(Event.INSTALLATION_VERSION_UPGRADED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function downgraded(from: string, to: string) {
|
async function downgraded(from: string, to: string) {
|
||||||
const properties: VersionChangeEvent = {
|
const properties: VersionChangeEvent = {
|
||||||
from,
|
from,
|
||||||
to,
|
to,
|
||||||
|
@ -25,7 +25,14 @@ export async function downgraded(from: string, to: string) {
|
||||||
await publishEvent(Event.INSTALLATION_VERSION_DOWNGRADED, properties)
|
await publishEvent(Event.INSTALLATION_VERSION_DOWNGRADED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function firstStartup() {
|
async function firstStartup() {
|
||||||
const properties = {}
|
const properties = {}
|
||||||
await publishEvent(Event.INSTALLATION_FIRST_STARTUP, properties)
|
await publishEvent(Event.INSTALLATION_FIRST_STARTUP, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
versionChecked,
|
||||||
|
upgraded,
|
||||||
|
downgraded,
|
||||||
|
firstStartup,
|
||||||
|
}
|
||||||
|
|
|
@ -6,16 +6,21 @@ import {
|
||||||
LayoutDeletedEvent,
|
LayoutDeletedEvent,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export async function created(layout: Layout, timestamp?: string | number) {
|
async function created(layout: Layout, timestamp?: string | number) {
|
||||||
const properties: LayoutCreatedEvent = {
|
const properties: LayoutCreatedEvent = {
|
||||||
layoutId: layout._id as string,
|
layoutId: layout._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.LAYOUT_CREATED, properties, timestamp)
|
await publishEvent(Event.LAYOUT_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleted(layoutId: string) {
|
async function deleted(layoutId: string) {
|
||||||
const properties: LayoutDeletedEvent = {
|
const properties: LayoutDeletedEvent = {
|
||||||
layoutId,
|
layoutId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.LAYOUT_DELETED, properties)
|
await publishEvent(Event.LAYOUT_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
deleted,
|
||||||
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {
|
||||||
LicensePaymentRecoveredEvent,
|
LicensePaymentRecoveredEvent,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export async function tierChanged(account: Account, from: number, to: number) {
|
async function tierChanged(account: Account, from: number, to: number) {
|
||||||
const properties: LicenseTierChangedEvent = {
|
const properties: LicenseTierChangedEvent = {
|
||||||
accountId: account.accountId,
|
accountId: account.accountId,
|
||||||
to,
|
to,
|
||||||
|
@ -22,11 +22,7 @@ export async function tierChanged(account: Account, from: number, to: number) {
|
||||||
await publishEvent(Event.LICENSE_TIER_CHANGED, properties)
|
await publishEvent(Event.LICENSE_TIER_CHANGED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function planChanged(
|
async function planChanged(account: Account, from: PlanType, to: PlanType) {
|
||||||
account: Account,
|
|
||||||
from: PlanType,
|
|
||||||
to: PlanType
|
|
||||||
) {
|
|
||||||
const properties: LicensePlanChangedEvent = {
|
const properties: LicensePlanChangedEvent = {
|
||||||
accountId: account.accountId,
|
accountId: account.accountId,
|
||||||
to,
|
to,
|
||||||
|
@ -35,44 +31,55 @@ export async function planChanged(
|
||||||
await publishEvent(Event.LICENSE_PLAN_CHANGED, properties)
|
await publishEvent(Event.LICENSE_PLAN_CHANGED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function activated(account: Account) {
|
async function activated(account: Account) {
|
||||||
const properties: LicenseActivatedEvent = {
|
const properties: LicenseActivatedEvent = {
|
||||||
accountId: account.accountId,
|
accountId: account.accountId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.LICENSE_ACTIVATED, properties)
|
await publishEvent(Event.LICENSE_ACTIVATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function checkoutOpened(account: Account) {
|
async function checkoutOpened(account: Account) {
|
||||||
const properties: LicenseCheckoutOpenedEvent = {
|
const properties: LicenseCheckoutOpenedEvent = {
|
||||||
accountId: account.accountId,
|
accountId: account.accountId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.LICENSE_CHECKOUT_OPENED, properties)
|
await publishEvent(Event.LICENSE_CHECKOUT_OPENED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function checkoutSuccess(account: Account) {
|
async function checkoutSuccess(account: Account) {
|
||||||
const properties: LicenseCheckoutSuccessEvent = {
|
const properties: LicenseCheckoutSuccessEvent = {
|
||||||
accountId: account.accountId,
|
accountId: account.accountId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.LICENSE_CHECKOUT_SUCCESS, properties)
|
await publishEvent(Event.LICENSE_CHECKOUT_SUCCESS, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function portalOpened(account: Account) {
|
async function portalOpened(account: Account) {
|
||||||
const properties: LicensePortalOpenedEvent = {
|
const properties: LicensePortalOpenedEvent = {
|
||||||
accountId: account.accountId,
|
accountId: account.accountId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.LICENSE_PORTAL_OPENED, properties)
|
await publishEvent(Event.LICENSE_PORTAL_OPENED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function paymentFailed(account: Account) {
|
async function paymentFailed(account: Account) {
|
||||||
const properties: LicensePaymentFailedEvent = {
|
const properties: LicensePaymentFailedEvent = {
|
||||||
accountId: account.accountId,
|
accountId: account.accountId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.LICENSE_PAYMENT_FAILED, properties)
|
await publishEvent(Event.LICENSE_PAYMENT_FAILED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function paymentRecovered(account: Account) {
|
async function paymentRecovered(account: Account) {
|
||||||
const properties: LicensePaymentRecoveredEvent = {
|
const properties: LicensePaymentRecoveredEvent = {
|
||||||
accountId: account.accountId,
|
accountId: account.accountId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.LICENSE_PAYMENT_RECOVERED, properties)
|
await publishEvent(Event.LICENSE_PAYMENT_RECOVERED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
tierChanged,
|
||||||
|
planChanged,
|
||||||
|
activated,
|
||||||
|
checkoutOpened,
|
||||||
|
checkoutSuccess,
|
||||||
|
portalOpened,
|
||||||
|
paymentFailed,
|
||||||
|
paymentRecovered,
|
||||||
|
}
|
||||||
|
|
|
@ -1,29 +1,37 @@
|
||||||
import { publishEvent } from "../events"
|
import { publishEvent } from "../events"
|
||||||
import { Event } from "@budibase/types"
|
import { Event } from "@budibase/types"
|
||||||
|
|
||||||
export async function nameUpdated(timestamp?: string | number) {
|
async function nameUpdated(timestamp?: string | number) {
|
||||||
const properties = {}
|
const properties = {}
|
||||||
await publishEvent(Event.ORG_NAME_UPDATED, properties, timestamp)
|
await publishEvent(Event.ORG_NAME_UPDATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function logoUpdated(timestamp?: string | number) {
|
async function logoUpdated(timestamp?: string | number) {
|
||||||
const properties = {}
|
const properties = {}
|
||||||
await publishEvent(Event.ORG_LOGO_UPDATED, properties, timestamp)
|
await publishEvent(Event.ORG_LOGO_UPDATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function platformURLUpdated(timestamp?: string | number) {
|
async function platformURLUpdated(timestamp?: string | number) {
|
||||||
const properties = {}
|
const properties = {}
|
||||||
await publishEvent(Event.ORG_PLATFORM_URL_UPDATED, properties, timestamp)
|
await publishEvent(Event.ORG_PLATFORM_URL_UPDATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
export async function analyticsOptOut() {
|
async function analyticsOptOut() {
|
||||||
const properties = {}
|
const properties = {}
|
||||||
await publishEvent(Event.ANALYTICS_OPT_OUT, properties)
|
await publishEvent(Event.ANALYTICS_OPT_OUT, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function analyticsOptIn() {
|
async function analyticsOptIn() {
|
||||||
const properties = {}
|
const properties = {}
|
||||||
await publishEvent(Event.ANALYTICS_OPT_OUT, properties)
|
await publishEvent(Event.ANALYTICS_OPT_OUT, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
nameUpdated,
|
||||||
|
logoUpdated,
|
||||||
|
platformURLUpdated,
|
||||||
|
analyticsOptOut,
|
||||||
|
analyticsOptIn,
|
||||||
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {
|
||||||
PluginInitEvent,
|
PluginInitEvent,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export async function init(plugin: Plugin) {
|
async function init(plugin: Plugin) {
|
||||||
const properties: PluginInitEvent = {
|
const properties: PluginInitEvent = {
|
||||||
type: plugin.schema.type,
|
type: plugin.schema.type,
|
||||||
name: plugin.name,
|
name: plugin.name,
|
||||||
|
@ -17,7 +17,7 @@ export async function init(plugin: Plugin) {
|
||||||
await publishEvent(Event.PLUGIN_INIT, properties)
|
await publishEvent(Event.PLUGIN_INIT, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function imported(plugin: Plugin) {
|
async function imported(plugin: Plugin) {
|
||||||
const properties: PluginImportedEvent = {
|
const properties: PluginImportedEvent = {
|
||||||
pluginId: plugin._id as string,
|
pluginId: plugin._id as string,
|
||||||
type: plugin.schema.type,
|
type: plugin.schema.type,
|
||||||
|
@ -29,7 +29,7 @@ export async function imported(plugin: Plugin) {
|
||||||
await publishEvent(Event.PLUGIN_IMPORTED, properties)
|
await publishEvent(Event.PLUGIN_IMPORTED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleted(plugin: Plugin) {
|
async function deleted(plugin: Plugin) {
|
||||||
const properties: PluginDeletedEvent = {
|
const properties: PluginDeletedEvent = {
|
||||||
pluginId: plugin._id as string,
|
pluginId: plugin._id as string,
|
||||||
type: plugin.schema.type,
|
type: plugin.schema.type,
|
||||||
|
@ -39,3 +39,9 @@ export async function deleted(plugin: Plugin) {
|
||||||
}
|
}
|
||||||
await publishEvent(Event.PLUGIN_DELETED, properties)
|
await publishEvent(Event.PLUGIN_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
init,
|
||||||
|
imported,
|
||||||
|
deleted,
|
||||||
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
export const created = async (
|
const created = async (
|
||||||
datasource: Datasource,
|
datasource: Datasource,
|
||||||
query: Query,
|
query: Query,
|
||||||
timestamp?: string | number
|
timestamp?: string | number
|
||||||
|
@ -27,7 +27,7 @@ export const created = async (
|
||||||
await publishEvent(Event.QUERY_CREATED, properties, timestamp)
|
await publishEvent(Event.QUERY_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const updated = async (datasource: Datasource, query: Query) => {
|
const updated = async (datasource: Datasource, query: Query) => {
|
||||||
const properties: QueryUpdatedEvent = {
|
const properties: QueryUpdatedEvent = {
|
||||||
queryId: query._id as string,
|
queryId: query._id as string,
|
||||||
datasourceId: datasource._id as string,
|
datasourceId: datasource._id as string,
|
||||||
|
@ -37,7 +37,7 @@ export const updated = async (datasource: Datasource, query: Query) => {
|
||||||
await publishEvent(Event.QUERY_UPDATED, properties)
|
await publishEvent(Event.QUERY_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const deleted = async (datasource: Datasource, query: Query) => {
|
const deleted = async (datasource: Datasource, query: Query) => {
|
||||||
const properties: QueryDeletedEvent = {
|
const properties: QueryDeletedEvent = {
|
||||||
queryId: query._id as string,
|
queryId: query._id as string,
|
||||||
datasourceId: datasource._id as string,
|
datasourceId: datasource._id as string,
|
||||||
|
@ -47,7 +47,7 @@ export const deleted = async (datasource: Datasource, query: Query) => {
|
||||||
await publishEvent(Event.QUERY_DELETED, properties)
|
await publishEvent(Event.QUERY_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const imported = async (
|
const imported = async (
|
||||||
datasource: Datasource,
|
datasource: Datasource,
|
||||||
importSource: any,
|
importSource: any,
|
||||||
count: any
|
count: any
|
||||||
|
@ -61,14 +61,14 @@ export const imported = async (
|
||||||
await publishEvent(Event.QUERY_IMPORT, properties)
|
await publishEvent(Event.QUERY_IMPORT, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const run = async (count: number, timestamp?: string | number) => {
|
const run = async (count: number, timestamp?: string | number) => {
|
||||||
const properties: QueriesRunEvent = {
|
const properties: QueriesRunEvent = {
|
||||||
count,
|
count,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.QUERIES_RUN, properties, timestamp)
|
await publishEvent(Event.QUERIES_RUN, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const previewed = async (datasource: Datasource, query: Query) => {
|
const previewed = async (datasource: Datasource, query: Query) => {
|
||||||
const properties: QueryPreviewedEvent = {
|
const properties: QueryPreviewedEvent = {
|
||||||
queryId: query._id,
|
queryId: query._id,
|
||||||
datasourceId: datasource._id as string,
|
datasourceId: datasource._id as string,
|
||||||
|
@ -77,3 +77,12 @@ export const previewed = async (datasource: Datasource, query: Query) => {
|
||||||
}
|
}
|
||||||
await publishEvent(Event.QUERY_PREVIEWED, properties)
|
await publishEvent(Event.QUERY_PREVIEWED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
updated,
|
||||||
|
deleted,
|
||||||
|
imported,
|
||||||
|
run,
|
||||||
|
previewed,
|
||||||
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ import {
|
||||||
User,
|
User,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export async function created(role: Role, timestamp?: string | number) {
|
async function created(role: Role, timestamp?: string | number) {
|
||||||
const properties: RoleCreatedEvent = {
|
const properties: RoleCreatedEvent = {
|
||||||
roleId: role._id as string,
|
roleId: role._id as string,
|
||||||
permissionId: role.permissionId,
|
permissionId: role.permissionId,
|
||||||
|
@ -19,7 +19,7 @@ export async function created(role: Role, timestamp?: string | number) {
|
||||||
await publishEvent(Event.ROLE_CREATED, properties, timestamp)
|
await publishEvent(Event.ROLE_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updated(role: Role) {
|
async function updated(role: Role) {
|
||||||
const properties: RoleUpdatedEvent = {
|
const properties: RoleUpdatedEvent = {
|
||||||
roleId: role._id as string,
|
roleId: role._id as string,
|
||||||
permissionId: role.permissionId,
|
permissionId: role.permissionId,
|
||||||
|
@ -28,7 +28,7 @@ export async function updated(role: Role) {
|
||||||
await publishEvent(Event.ROLE_UPDATED, properties)
|
await publishEvent(Event.ROLE_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleted(role: Role) {
|
async function deleted(role: Role) {
|
||||||
const properties: RoleDeletedEvent = {
|
const properties: RoleDeletedEvent = {
|
||||||
roleId: role._id as string,
|
roleId: role._id as string,
|
||||||
permissionId: role.permissionId,
|
permissionId: role.permissionId,
|
||||||
|
@ -37,7 +37,7 @@ export async function deleted(role: Role) {
|
||||||
await publishEvent(Event.ROLE_DELETED, properties)
|
await publishEvent(Event.ROLE_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function assigned(user: User, roleId: string, timestamp?: number) {
|
async function assigned(user: User, roleId: string, timestamp?: number) {
|
||||||
const properties: RoleAssignedEvent = {
|
const properties: RoleAssignedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
roleId,
|
roleId,
|
||||||
|
@ -45,10 +45,18 @@ export async function assigned(user: User, roleId: string, timestamp?: number) {
|
||||||
await publishEvent(Event.ROLE_ASSIGNED, properties, timestamp)
|
await publishEvent(Event.ROLE_ASSIGNED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function unassigned(user: User, roleId: string) {
|
async function unassigned(user: User, roleId: string) {
|
||||||
const properties: RoleUnassignedEvent = {
|
const properties: RoleUnassignedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
roleId,
|
roleId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.ROLE_UNASSIGNED, properties)
|
await publishEvent(Event.ROLE_UNASSIGNED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
updated,
|
||||||
|
deleted,
|
||||||
|
assigned,
|
||||||
|
unassigned,
|
||||||
|
}
|
||||||
|
|
|
@ -9,14 +9,14 @@ import {
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
export const created = async (count: number, timestamp?: string | number) => {
|
const created = async (count: number, timestamp?: string | number) => {
|
||||||
const properties: RowsCreatedEvent = {
|
const properties: RowsCreatedEvent = {
|
||||||
count,
|
count,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.ROWS_CREATED, properties, timestamp)
|
await publishEvent(Event.ROWS_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const imported = async (
|
const imported = async (
|
||||||
table: Table,
|
table: Table,
|
||||||
format: RowImportFormat,
|
format: RowImportFormat,
|
||||||
count: number
|
count: number
|
||||||
|
@ -28,3 +28,8 @@ export const imported = async (
|
||||||
}
|
}
|
||||||
await publishEvent(Event.ROWS_IMPORTED, properties)
|
await publishEvent(Event.ROWS_IMPORTED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
imported,
|
||||||
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import {
|
||||||
ScreenDeletedEvent,
|
ScreenDeletedEvent,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export async function created(screen: Screen, timestamp?: string | number) {
|
async function created(screen: Screen, timestamp?: string | number) {
|
||||||
const properties: ScreenCreatedEvent = {
|
const properties: ScreenCreatedEvent = {
|
||||||
layoutId: screen.layoutId,
|
layoutId: screen.layoutId,
|
||||||
screenId: screen._id as string,
|
screenId: screen._id as string,
|
||||||
|
@ -15,7 +15,7 @@ export async function created(screen: Screen, timestamp?: string | number) {
|
||||||
await publishEvent(Event.SCREEN_CREATED, properties, timestamp)
|
await publishEvent(Event.SCREEN_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleted(screen: Screen) {
|
async function deleted(screen: Screen) {
|
||||||
const properties: ScreenDeletedEvent = {
|
const properties: ScreenDeletedEvent = {
|
||||||
layoutId: screen.layoutId,
|
layoutId: screen.layoutId,
|
||||||
screenId: screen._id as string,
|
screenId: screen._id as string,
|
||||||
|
@ -23,3 +23,8 @@ export async function deleted(screen: Screen) {
|
||||||
}
|
}
|
||||||
await publishEvent(Event.SCREEN_DELETED, properties)
|
await publishEvent(Event.SCREEN_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
deleted,
|
||||||
|
}
|
||||||
|
|
|
@ -7,14 +7,14 @@ import {
|
||||||
AppServedEvent,
|
AppServedEvent,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export async function servedBuilder(timezone: string) {
|
async function servedBuilder(timezone: string) {
|
||||||
const properties: BuilderServedEvent = {
|
const properties: BuilderServedEvent = {
|
||||||
timezone,
|
timezone,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.SERVED_BUILDER, properties)
|
await publishEvent(Event.SERVED_BUILDER, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function servedApp(app: App, timezone: string) {
|
async function servedApp(app: App, timezone: string) {
|
||||||
const properties: AppServedEvent = {
|
const properties: AppServedEvent = {
|
||||||
appVersion: app.version,
|
appVersion: app.version,
|
||||||
timezone,
|
timezone,
|
||||||
|
@ -22,7 +22,7 @@ export async function servedApp(app: App, timezone: string) {
|
||||||
await publishEvent(Event.SERVED_APP, properties)
|
await publishEvent(Event.SERVED_APP, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function servedAppPreview(app: App, timezone: string) {
|
async function servedAppPreview(app: App, timezone: string) {
|
||||||
const properties: AppPreviewServedEvent = {
|
const properties: AppPreviewServedEvent = {
|
||||||
appId: app.appId,
|
appId: app.appId,
|
||||||
appVersion: app.version,
|
appVersion: app.version,
|
||||||
|
@ -30,3 +30,9 @@ export async function servedAppPreview(app: App, timezone: string) {
|
||||||
}
|
}
|
||||||
await publishEvent(Event.SERVED_APP_PREVIEW, properties)
|
await publishEvent(Event.SERVED_APP_PREVIEW, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
servedBuilder,
|
||||||
|
servedApp,
|
||||||
|
servedAppPreview,
|
||||||
|
}
|
||||||
|
|
|
@ -11,28 +11,28 @@ import {
|
||||||
TableImportedEvent,
|
TableImportedEvent,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export async function created(table: Table, timestamp?: string | number) {
|
async function created(table: Table, timestamp?: string | number) {
|
||||||
const properties: TableCreatedEvent = {
|
const properties: TableCreatedEvent = {
|
||||||
tableId: table._id as string,
|
tableId: table._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.TABLE_CREATED, properties, timestamp)
|
await publishEvent(Event.TABLE_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updated(table: Table) {
|
async function updated(table: Table) {
|
||||||
const properties: TableUpdatedEvent = {
|
const properties: TableUpdatedEvent = {
|
||||||
tableId: table._id as string,
|
tableId: table._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.TABLE_UPDATED, properties)
|
await publishEvent(Event.TABLE_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleted(table: Table) {
|
async function deleted(table: Table) {
|
||||||
const properties: TableDeletedEvent = {
|
const properties: TableDeletedEvent = {
|
||||||
tableId: table._id as string,
|
tableId: table._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.TABLE_DELETED, properties)
|
await publishEvent(Event.TABLE_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function exported(table: Table, format: TableExportFormat) {
|
async function exported(table: Table, format: TableExportFormat) {
|
||||||
const properties: TableExportedEvent = {
|
const properties: TableExportedEvent = {
|
||||||
tableId: table._id as string,
|
tableId: table._id as string,
|
||||||
format,
|
format,
|
||||||
|
@ -40,10 +40,18 @@ export async function exported(table: Table, format: TableExportFormat) {
|
||||||
await publishEvent(Event.TABLE_EXPORTED, properties)
|
await publishEvent(Event.TABLE_EXPORTED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function imported(table: Table, format: TableImportFormat) {
|
async function imported(table: Table, format: TableImportFormat) {
|
||||||
const properties: TableImportedEvent = {
|
const properties: TableImportedEvent = {
|
||||||
tableId: table._id as string,
|
tableId: table._id as string,
|
||||||
format,
|
format,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.TABLE_IMPORTED, properties)
|
await publishEvent(Event.TABLE_IMPORTED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
updated,
|
||||||
|
deleted,
|
||||||
|
exported,
|
||||||
|
imported,
|
||||||
|
}
|
||||||
|
|
|
@ -15,21 +15,21 @@ import {
|
||||||
UserUpdatedEvent,
|
UserUpdatedEvent,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export async function created(user: User, timestamp?: number) {
|
async function created(user: User, timestamp?: number) {
|
||||||
const properties: UserCreatedEvent = {
|
const properties: UserCreatedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.USER_CREATED, properties, timestamp)
|
await publishEvent(Event.USER_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updated(user: User) {
|
async function updated(user: User) {
|
||||||
const properties: UserUpdatedEvent = {
|
const properties: UserUpdatedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.USER_UPDATED, properties)
|
await publishEvent(Event.USER_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleted(user: User) {
|
async function deleted(user: User) {
|
||||||
const properties: UserDeletedEvent = {
|
const properties: UserDeletedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ export async function deleted(user: User) {
|
||||||
|
|
||||||
// PERMISSIONS
|
// PERMISSIONS
|
||||||
|
|
||||||
export async function permissionAdminAssigned(user: User, timestamp?: number) {
|
async function permissionAdminAssigned(user: User, timestamp?: number) {
|
||||||
const properties: UserPermissionAssignedEvent = {
|
const properties: UserPermissionAssignedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
}
|
}
|
||||||
|
@ -49,17 +49,14 @@ export async function permissionAdminAssigned(user: User, timestamp?: number) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function permissionAdminRemoved(user: User) {
|
async function permissionAdminRemoved(user: User) {
|
||||||
const properties: UserPermissionRemovedEvent = {
|
const properties: UserPermissionRemovedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.USER_PERMISSION_ADMIN_REMOVED, properties)
|
await publishEvent(Event.USER_PERMISSION_ADMIN_REMOVED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function permissionBuilderAssigned(
|
async function permissionBuilderAssigned(user: User, timestamp?: number) {
|
||||||
user: User,
|
|
||||||
timestamp?: number
|
|
||||||
) {
|
|
||||||
const properties: UserPermissionAssignedEvent = {
|
const properties: UserPermissionAssignedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
}
|
}
|
||||||
|
@ -70,7 +67,7 @@ export async function permissionBuilderAssigned(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function permissionBuilderRemoved(user: User) {
|
async function permissionBuilderRemoved(user: User) {
|
||||||
const properties: UserPermissionRemovedEvent = {
|
const properties: UserPermissionRemovedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
}
|
}
|
||||||
|
@ -79,12 +76,12 @@ export async function permissionBuilderRemoved(user: User) {
|
||||||
|
|
||||||
// INVITE
|
// INVITE
|
||||||
|
|
||||||
export async function invited() {
|
async function invited() {
|
||||||
const properties: UserInvitedEvent = {}
|
const properties: UserInvitedEvent = {}
|
||||||
await publishEvent(Event.USER_INVITED, properties)
|
await publishEvent(Event.USER_INVITED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function inviteAccepted(user: User) {
|
async function inviteAccepted(user: User) {
|
||||||
const properties: UserInviteAcceptedEvent = {
|
const properties: UserInviteAcceptedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
}
|
}
|
||||||
|
@ -93,30 +90,46 @@ export async function inviteAccepted(user: User) {
|
||||||
|
|
||||||
// PASSWORD
|
// PASSWORD
|
||||||
|
|
||||||
export async function passwordForceReset(user: User) {
|
async function passwordForceReset(user: User) {
|
||||||
const properties: UserPasswordForceResetEvent = {
|
const properties: UserPasswordForceResetEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.USER_PASSWORD_FORCE_RESET, properties)
|
await publishEvent(Event.USER_PASSWORD_FORCE_RESET, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function passwordUpdated(user: User) {
|
async function passwordUpdated(user: User) {
|
||||||
const properties: UserPasswordUpdatedEvent = {
|
const properties: UserPasswordUpdatedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.USER_PASSWORD_UPDATED, properties)
|
await publishEvent(Event.USER_PASSWORD_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function passwordResetRequested(user: User) {
|
async function passwordResetRequested(user: User) {
|
||||||
const properties: UserPasswordResetRequestedEvent = {
|
const properties: UserPasswordResetRequestedEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.USER_PASSWORD_RESET_REQUESTED, properties)
|
await publishEvent(Event.USER_PASSWORD_RESET_REQUESTED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function passwordReset(user: User) {
|
async function passwordReset(user: User) {
|
||||||
const properties: UserPasswordResetEvent = {
|
const properties: UserPasswordResetEvent = {
|
||||||
userId: user._id as string,
|
userId: user._id as string,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.USER_PASSWORD_RESET, properties)
|
await publishEvent(Event.USER_PASSWORD_RESET, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
updated,
|
||||||
|
deleted,
|
||||||
|
permissionAdminAssigned,
|
||||||
|
permissionAdminRemoved,
|
||||||
|
permissionBuilderAssigned,
|
||||||
|
permissionBuilderRemoved,
|
||||||
|
invited,
|
||||||
|
inviteAccepted,
|
||||||
|
passwordForceReset,
|
||||||
|
passwordUpdated,
|
||||||
|
passwordResetRequested,
|
||||||
|
passwordReset,
|
||||||
|
}
|
||||||
|
|
|
@ -19,28 +19,28 @@ import {
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
|
|
||||||
export async function created(view: View, timestamp?: string | number) {
|
async function created(view: View, timestamp?: string | number) {
|
||||||
const properties: ViewCreatedEvent = {
|
const properties: ViewCreatedEvent = {
|
||||||
tableId: view.tableId,
|
tableId: view.tableId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.VIEW_CREATED, properties, timestamp)
|
await publishEvent(Event.VIEW_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function updated(view: View) {
|
async function updated(view: View) {
|
||||||
const properties: ViewUpdatedEvent = {
|
const properties: ViewUpdatedEvent = {
|
||||||
tableId: view.tableId,
|
tableId: view.tableId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.VIEW_UPDATED, properties)
|
await publishEvent(Event.VIEW_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleted(view: View) {
|
async function deleted(view: View) {
|
||||||
const properties: ViewDeletedEvent = {
|
const properties: ViewDeletedEvent = {
|
||||||
tableId: view.tableId,
|
tableId: view.tableId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.VIEW_DELETED, properties)
|
await publishEvent(Event.VIEW_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function exported(table: Table, format: TableExportFormat) {
|
async function exported(table: Table, format: TableExportFormat) {
|
||||||
const properties: ViewExportedEvent = {
|
const properties: ViewExportedEvent = {
|
||||||
tableId: table._id as string,
|
tableId: table._id as string,
|
||||||
format,
|
format,
|
||||||
|
@ -48,31 +48,28 @@ export async function exported(table: Table, format: TableExportFormat) {
|
||||||
await publishEvent(Event.VIEW_EXPORTED, properties)
|
await publishEvent(Event.VIEW_EXPORTED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function filterCreated(view: View, timestamp?: string | number) {
|
async function filterCreated(view: View, timestamp?: string | number) {
|
||||||
const properties: ViewFilterCreatedEvent = {
|
const properties: ViewFilterCreatedEvent = {
|
||||||
tableId: view.tableId,
|
tableId: view.tableId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.VIEW_FILTER_CREATED, properties, timestamp)
|
await publishEvent(Event.VIEW_FILTER_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function filterUpdated(view: View) {
|
async function filterUpdated(view: View) {
|
||||||
const properties: ViewFilterUpdatedEvent = {
|
const properties: ViewFilterUpdatedEvent = {
|
||||||
tableId: view.tableId,
|
tableId: view.tableId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.VIEW_FILTER_UPDATED, properties)
|
await publishEvent(Event.VIEW_FILTER_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function filterDeleted(view: View) {
|
async function filterDeleted(view: View) {
|
||||||
const properties: ViewFilterDeletedEvent = {
|
const properties: ViewFilterDeletedEvent = {
|
||||||
tableId: view.tableId,
|
tableId: view.tableId,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.VIEW_FILTER_DELETED, properties)
|
await publishEvent(Event.VIEW_FILTER_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function calculationCreated(
|
async function calculationCreated(view: View, timestamp?: string | number) {
|
||||||
view: View,
|
|
||||||
timestamp?: string | number
|
|
||||||
) {
|
|
||||||
const properties: ViewCalculationCreatedEvent = {
|
const properties: ViewCalculationCreatedEvent = {
|
||||||
tableId: view.tableId,
|
tableId: view.tableId,
|
||||||
calculation: view.calculation as ViewCalculation,
|
calculation: view.calculation as ViewCalculation,
|
||||||
|
@ -80,7 +77,7 @@ export async function calculationCreated(
|
||||||
await publishEvent(Event.VIEW_CALCULATION_CREATED, properties, timestamp)
|
await publishEvent(Event.VIEW_CALCULATION_CREATED, properties, timestamp)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function calculationUpdated(view: View) {
|
async function calculationUpdated(view: View) {
|
||||||
const properties: ViewCalculationUpdatedEvent = {
|
const properties: ViewCalculationUpdatedEvent = {
|
||||||
tableId: view.tableId,
|
tableId: view.tableId,
|
||||||
calculation: view.calculation as ViewCalculation,
|
calculation: view.calculation as ViewCalculation,
|
||||||
|
@ -88,10 +85,23 @@ export async function calculationUpdated(view: View) {
|
||||||
await publishEvent(Event.VIEW_CALCULATION_UPDATED, properties)
|
await publishEvent(Event.VIEW_CALCULATION_UPDATED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function calculationDeleted(existingView: View) {
|
async function calculationDeleted(existingView: View) {
|
||||||
const properties: ViewCalculationDeletedEvent = {
|
const properties: ViewCalculationDeletedEvent = {
|
||||||
tableId: existingView.tableId,
|
tableId: existingView.tableId,
|
||||||
calculation: existingView.calculation as ViewCalculation,
|
calculation: existingView.calculation as ViewCalculation,
|
||||||
}
|
}
|
||||||
await publishEvent(Event.VIEW_CALCULATION_DELETED, properties)
|
await publishEvent(Event.VIEW_CALCULATION_DELETED, properties)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
created,
|
||||||
|
updated,
|
||||||
|
deleted,
|
||||||
|
exported,
|
||||||
|
filterCreated,
|
||||||
|
filterUpdated,
|
||||||
|
filterDeleted,
|
||||||
|
calculationCreated,
|
||||||
|
calculationUpdated,
|
||||||
|
calculationDeleted,
|
||||||
|
}
|
||||||
|
|
|
@ -1,68 +1,42 @@
|
||||||
import errors from "./errors"
|
export * as events from "./events"
|
||||||
const errorClasses = errors.errors
|
export * as migrations from "./migrations"
|
||||||
import * as events from "./events"
|
export * as users from "./users"
|
||||||
import * as migrations from "./migrations"
|
export * as roles from "./security/roles"
|
||||||
import * as users from "./users"
|
export * as permissions from "./security/permissions"
|
||||||
import * as roles from "./security/roles"
|
export * as accounts from "./cloud/accounts"
|
||||||
import * as permissions from "./security/permissions"
|
export * as installation from "./installation"
|
||||||
import * as accounts from "./cloud/accounts"
|
export * as tenancy from "./tenancy"
|
||||||
import * as installation from "./installation"
|
export * as featureFlags from "./featureFlags"
|
||||||
import env from "./environment"
|
export * as sessions from "./security/sessions"
|
||||||
import * as tenancy from "./tenancy"
|
export * as deprovisioning from "./context/deprovision"
|
||||||
import * as featureFlags from "./featureFlags"
|
export * as auth from "./auth"
|
||||||
import * as sessions from "./security/sessions"
|
export * as constants from "./constants"
|
||||||
import * as deprovisioning from "./context/deprovision"
|
export * as logging from "./logging"
|
||||||
import * as auth from "./auth"
|
export * as middleware from "./middleware"
|
||||||
import * as constants from "./constants"
|
export * as plugins from "./plugin"
|
||||||
import * as logging from "./logging"
|
export * as encryption from "./security/encryption"
|
||||||
import * as pino from "./pino"
|
export * as queue from "./queue"
|
||||||
import * as middleware from "./middleware"
|
export * as db from "./db"
|
||||||
import * as plugins from "./plugin"
|
export * as context from "./context"
|
||||||
import * as encryption from "./security/encryption"
|
export * as cache from "./cache"
|
||||||
import * as queue from "./queue"
|
export * as objectStore from "./objectStore"
|
||||||
import * as db from "./db"
|
export * as redis from "./redis"
|
||||||
import * as context from "./context"
|
export * as utils from "./utils"
|
||||||
import * as cache from "./cache"
|
export * as errors from "./errors"
|
||||||
import * as objectStore from "./objectStore"
|
export { default as env } from "./environment"
|
||||||
import * as redis from "./redis"
|
|
||||||
import * as utils from "./utils"
|
|
||||||
|
|
||||||
const init = (opts: any = {}) => {
|
// expose error classes directly
|
||||||
|
export * from "./errors"
|
||||||
|
|
||||||
|
// expose constants directly
|
||||||
|
export * from "./constants"
|
||||||
|
|
||||||
|
// expose inner locks from redis directly
|
||||||
|
import * as redis from "./redis"
|
||||||
|
export const locks = redis.redlock
|
||||||
|
|
||||||
|
// expose package init function
|
||||||
|
import * as db from "./db"
|
||||||
|
export const init = (opts: any = {}) => {
|
||||||
db.init(opts.db)
|
db.init(opts.db)
|
||||||
}
|
}
|
||||||
|
|
||||||
const core = {
|
|
||||||
init,
|
|
||||||
db,
|
|
||||||
...constants,
|
|
||||||
redis,
|
|
||||||
locks: redis.redlock,
|
|
||||||
objectStore,
|
|
||||||
utils,
|
|
||||||
users,
|
|
||||||
cache,
|
|
||||||
auth,
|
|
||||||
constants,
|
|
||||||
migrations,
|
|
||||||
env,
|
|
||||||
accounts,
|
|
||||||
tenancy,
|
|
||||||
context,
|
|
||||||
featureFlags,
|
|
||||||
events,
|
|
||||||
sessions,
|
|
||||||
deprovisioning,
|
|
||||||
installation,
|
|
||||||
errors,
|
|
||||||
logging,
|
|
||||||
roles,
|
|
||||||
plugins,
|
|
||||||
...pino,
|
|
||||||
...errorClasses,
|
|
||||||
middleware,
|
|
||||||
encryption,
|
|
||||||
queue,
|
|
||||||
permissions,
|
|
||||||
}
|
|
||||||
|
|
||||||
export = core
|
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
import { Header } from "./constants"
|
||||||
|
import env from "./environment"
|
||||||
|
const correlator = require("correlation-id")
|
||||||
|
import { Options } from "pino-http"
|
||||||
|
import { IncomingMessage } from "http"
|
||||||
|
|
||||||
const NonErrors = ["AccountError"]
|
const NonErrors = ["AccountError"]
|
||||||
|
|
||||||
function isSuppressed(e?: any) {
|
function isSuppressed(e?: any) {
|
||||||
|
@ -29,8 +35,26 @@ export function logWarn(message: string) {
|
||||||
console.warn(`bb-warn: ${message}`)
|
console.warn(`bb-warn: ${message}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export function pinoSettings(): Options {
|
||||||
logAlert,
|
return {
|
||||||
logAlertWithInfo,
|
prettyPrint: {
|
||||||
logWarn,
|
levelFirst: true,
|
||||||
|
},
|
||||||
|
genReqId: correlator.getId,
|
||||||
|
level: env.LOG_LEVEL || "error",
|
||||||
|
autoLogging: {
|
||||||
|
ignore: (req: IncomingMessage) => !!req.url?.includes("/health"),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const setCorrelationHeader = (headers: any) => {
|
||||||
|
const correlationId = correlator.getId()
|
||||||
|
if (correlationId) {
|
||||||
|
headers[Header.CORRELATION_ID] = correlationId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const correlation = {
|
||||||
|
setHeader: setCorrelationHeader,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { BBContext } from "@budibase/types"
|
import { BBContext } from "@budibase/types"
|
||||||
|
|
||||||
export = async (ctx: BBContext, next: any) => {
|
export default async (ctx: BBContext, next: any) => {
|
||||||
if (
|
if (
|
||||||
!ctx.internal &&
|
!ctx.internal &&
|
||||||
(!ctx.user || !ctx.user.admin || !ctx.user.admin.global)
|
(!ctx.user || !ctx.user.admin || !ctx.user.admin.global)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { BBContext } from "@budibase/types"
|
import { BBContext } from "@budibase/types"
|
||||||
|
|
||||||
export = async (ctx: BBContext | any, next: any) => {
|
export default async (ctx: BBContext | any, next: any) => {
|
||||||
// Placeholder for audit log middleware
|
// Placeholder for audit log middleware
|
||||||
return next()
|
return next()
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ async function checkApiKey(apiKey: string, populateUser?: Function) {
|
||||||
* The tenancy modules should not be used here and it should be assumed that the tenancy context
|
* The tenancy modules should not be used here and it should be assumed that the tenancy context
|
||||||
* has not yet been populated.
|
* has not yet been populated.
|
||||||
*/
|
*/
|
||||||
export = function (
|
export default function (
|
||||||
noAuthPatterns: EndpointMatcher[] = [],
|
noAuthPatterns: EndpointMatcher[] = [],
|
||||||
opts: { publicAllowed?: boolean; populateUser?: Function } = {
|
opts: { publicAllowed?: boolean; populateUser?: Function } = {
|
||||||
publicAllowed: false,
|
publicAllowed: false,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { BBContext } from "@budibase/types"
|
import { BBContext } from "@budibase/types"
|
||||||
|
|
||||||
export = async (ctx: BBContext, next: any) => {
|
export default async (ctx: BBContext, next: any) => {
|
||||||
if (
|
if (
|
||||||
!ctx.internal &&
|
!ctx.internal &&
|
||||||
(!ctx.user || !ctx.user.builder || !ctx.user.builder.global)
|
(!ctx.user || !ctx.user.builder || !ctx.user.builder.global)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { BBContext } from "@budibase/types"
|
import { BBContext } from "@budibase/types"
|
||||||
|
|
||||||
export = async (ctx: BBContext, next: any) => {
|
export default async (ctx: BBContext, next: any) => {
|
||||||
if (
|
if (
|
||||||
!ctx.internal &&
|
!ctx.internal &&
|
||||||
(!ctx.user || !ctx.user.builder || !ctx.user.builder.global) &&
|
(!ctx.user || !ctx.user.builder || !ctx.user.builder.global) &&
|
||||||
|
|
|
@ -32,7 +32,7 @@ const INCLUDED_CONTENT_TYPES = [
|
||||||
* https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#synchronizer-token-pattern
|
* https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html#synchronizer-token-pattern
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export = function (
|
export default function (
|
||||||
opts: { noCsrfPatterns: EndpointMatcher[] } = { noCsrfPatterns: [] }
|
opts: { noCsrfPatterns: EndpointMatcher[] } = { noCsrfPatterns: [] }
|
||||||
) {
|
) {
|
||||||
const noCsrfOptions = buildMatcherRegex(opts.noCsrfPatterns)
|
const noCsrfOptions = buildMatcherRegex(opts.noCsrfPatterns)
|
||||||
|
|
|
@ -1,38 +1,19 @@
|
||||||
import * as jwt from "./passport/jwt"
|
export * as jwt from "./passport/jwt"
|
||||||
import * as local from "./passport/local"
|
export * as local from "./passport/local"
|
||||||
import * as google from "./passport/google"
|
export * as google from "./passport/google"
|
||||||
import * as oidc from "./passport/oidc"
|
export * as oidc from "./passport/oidc"
|
||||||
import { authError, ssoCallbackUrl } from "./passport/utils"
|
|
||||||
import authenticated from "./authenticated"
|
|
||||||
import auditLog from "./auditLog"
|
|
||||||
import tenancy from "./tenancy"
|
|
||||||
import internalApi from "./internalApi"
|
|
||||||
import * as datasourceGoogle from "./passport/datasource/google"
|
import * as datasourceGoogle from "./passport/datasource/google"
|
||||||
import csrf from "./csrf"
|
export const datasource = {
|
||||||
import adminOnly from "./adminOnly"
|
google: datasourceGoogle,
|
||||||
import builderOrAdmin from "./builderOrAdmin"
|
|
||||||
import builderOnly from "./builderOnly"
|
|
||||||
import * as joiValidator from "./joi-validator"
|
|
||||||
|
|
||||||
const pkg = {
|
|
||||||
google,
|
|
||||||
oidc,
|
|
||||||
jwt,
|
|
||||||
local,
|
|
||||||
authenticated,
|
|
||||||
auditLog,
|
|
||||||
tenancy,
|
|
||||||
authError,
|
|
||||||
internalApi,
|
|
||||||
ssoCallbackUrl,
|
|
||||||
datasource: {
|
|
||||||
google: datasourceGoogle,
|
|
||||||
},
|
|
||||||
csrf,
|
|
||||||
adminOnly,
|
|
||||||
builderOnly,
|
|
||||||
builderOrAdmin,
|
|
||||||
joiValidator,
|
|
||||||
}
|
}
|
||||||
|
export { authError, ssoCallbackUrl } from "./passport/utils"
|
||||||
export = pkg
|
export { default as authenticated } from "./authenticated"
|
||||||
|
export { default as auditLog } from "./auditLog"
|
||||||
|
export { default as tenancy } from "./tenancy"
|
||||||
|
export { default as internalApi } from "./internalApi"
|
||||||
|
export { default as csrf } from "./csrf"
|
||||||
|
export { default as adminOnly } from "./adminOnly"
|
||||||
|
export { default as builderOrAdmin } from "./builderOrAdmin"
|
||||||
|
export { default as builderOnly } from "./builderOnly"
|
||||||
|
export { default as logging } from "./logging"
|
||||||
|
export * as joiValidator from "./joi-validator"
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { BBContext } from "@budibase/types"
|
||||||
/**
|
/**
|
||||||
* API Key only endpoint.
|
* API Key only endpoint.
|
||||||
*/
|
*/
|
||||||
export = async (ctx: BBContext, next: any) => {
|
export default async (ctx: BBContext, next: any) => {
|
||||||
const apiKey = ctx.request.headers[Header.API_KEY]
|
const apiKey = ctx.request.headers[Header.API_KEY]
|
||||||
if (apiKey !== env.INTERNAL_API_KEY) {
|
if (apiKey !== env.INTERNAL_API_KEY) {
|
||||||
ctx.throw(403, "Unauthorized")
|
ctx.throw(403, "Unauthorized")
|
||||||
|
|
|
@ -0,0 +1,88 @@
|
||||||
|
const correlator = require("correlation-id")
|
||||||
|
import { Header } from "../constants"
|
||||||
|
import { v4 as uuid } from "uuid"
|
||||||
|
import * as context from "../context"
|
||||||
|
|
||||||
|
const debug = console.warn
|
||||||
|
const trace = console.trace
|
||||||
|
const log = console.log
|
||||||
|
const info = console.info
|
||||||
|
const warn = console.warn
|
||||||
|
const error = console.error
|
||||||
|
|
||||||
|
const getTenantId = () => {
|
||||||
|
let tenantId
|
||||||
|
try {
|
||||||
|
tenantId = context.getTenantId()
|
||||||
|
} catch (e: any) {
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
return tenantId
|
||||||
|
}
|
||||||
|
|
||||||
|
const getAppId = () => {
|
||||||
|
let appId
|
||||||
|
try {
|
||||||
|
appId = context.getAppId()
|
||||||
|
} catch (e) {
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
return appId
|
||||||
|
}
|
||||||
|
|
||||||
|
const getIdentityId = () => {
|
||||||
|
let identityId
|
||||||
|
try {
|
||||||
|
const identity = context.getIdentity()
|
||||||
|
identityId = identity?._id
|
||||||
|
} catch (e) {
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
return identityId
|
||||||
|
}
|
||||||
|
|
||||||
|
const print = (fn: any, data: any[]) => {
|
||||||
|
let message = ""
|
||||||
|
|
||||||
|
const correlationId = correlator.getId()
|
||||||
|
if (correlationId) {
|
||||||
|
message = message + `[correlationId=${correlator.getId()}]`
|
||||||
|
}
|
||||||
|
|
||||||
|
const tenantId = getTenantId()
|
||||||
|
if (tenantId) {
|
||||||
|
message = message + ` [tenantId=${tenantId}]`
|
||||||
|
}
|
||||||
|
|
||||||
|
const appId = getAppId()
|
||||||
|
if (appId) {
|
||||||
|
message = message + ` [appId=${appId}]`
|
||||||
|
}
|
||||||
|
|
||||||
|
const identityId = getIdentityId()
|
||||||
|
if (identityId) {
|
||||||
|
message = message + ` [identityId=${identityId}]`
|
||||||
|
}
|
||||||
|
|
||||||
|
fn(message, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
const logging = (ctx: any, next: any) => {
|
||||||
|
// use the provided correlation id header if present
|
||||||
|
let correlationId = ctx.headers[Header.CORRELATION_ID]
|
||||||
|
if (!correlationId) {
|
||||||
|
correlationId = uuid()
|
||||||
|
}
|
||||||
|
|
||||||
|
return correlator.withId(correlationId, () => {
|
||||||
|
console.debug = data => print(debug, data)
|
||||||
|
console.trace = data => print(trace, data)
|
||||||
|
console.log = data => print(log, data)
|
||||||
|
console.info = data => print(info, data)
|
||||||
|
console.warn = data => print(warn, data)
|
||||||
|
console.error = data => print(error, data)
|
||||||
|
return next()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default logging
|
|
@ -2,7 +2,6 @@ import fetch from "node-fetch"
|
||||||
import { authenticateThirdParty, SaveUserFunction } from "./third-party-common"
|
import { authenticateThirdParty, SaveUserFunction } from "./third-party-common"
|
||||||
import { ssoCallbackUrl } from "./utils"
|
import { ssoCallbackUrl } from "./utils"
|
||||||
import {
|
import {
|
||||||
Config,
|
|
||||||
ConfigType,
|
ConfigType,
|
||||||
OIDCInnerCfg,
|
OIDCInnerCfg,
|
||||||
Database,
|
Database,
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
TenantResolutionStrategy,
|
TenantResolutionStrategy,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
|
|
||||||
export = function (
|
export default function (
|
||||||
allowQueryStringPatterns: EndpointMatcher[],
|
allowQueryStringPatterns: EndpointMatcher[],
|
||||||
noTenancyPatterns: EndpointMatcher[],
|
noTenancyPatterns: EndpointMatcher[],
|
||||||
opts: { noTenancyRequired?: boolean } = { noTenancyRequired: false }
|
opts: { noTenancyRequired?: boolean } = { noTenancyRequired: false }
|
||||||
|
|
|
@ -88,7 +88,7 @@ export const runMigration = async (
|
||||||
|
|
||||||
await doWithDB(dbName, async (db: any) => {
|
await doWithDB(dbName, async (db: any) => {
|
||||||
try {
|
try {
|
||||||
const doc = await exports.getMigrationsDoc(db)
|
const doc = await getMigrationsDoc(db)
|
||||||
|
|
||||||
// the migration has already been run
|
// the migration has already been run
|
||||||
if (doc[migrationName]) {
|
if (doc[migrationName]) {
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
import env from "./environment"
|
|
||||||
|
|
||||||
export function pinoSettings() {
|
|
||||||
return {
|
|
||||||
prettyPrint: {
|
|
||||||
levelFirst: true,
|
|
||||||
},
|
|
||||||
level: env.LOG_LEVEL || "error",
|
|
||||||
autoLogging: {
|
|
||||||
ignore: (req: { url: string }) => req.url.includes("/health"),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -137,4 +137,4 @@ class InMemoryQueue {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export = InMemoryQueue
|
export default InMemoryQueue
|
||||||
|
|
|
@ -276,4 +276,4 @@ class RedisWrapper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export = RedisWrapper
|
export default RedisWrapper
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const redis = require("../redis/init")
|
const redis = require("../redis/init")
|
||||||
const { v4: uuidv4 } = require("uuid")
|
const { v4: uuidv4 } = require("uuid")
|
||||||
const { logWarn } = require("../logging")
|
const { logWarn } = require("../logging")
|
||||||
const env = require("../environment")
|
import env from "../environment"
|
||||||
import {
|
import {
|
||||||
Session,
|
Session,
|
||||||
ScannedSession,
|
ScannedSession,
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { structures } from "../../../tests"
|
import { structures } from "../../../tests"
|
||||||
import * as utils from "../../utils"
|
import * as utils from "../../utils"
|
||||||
import * as events from "../../events"
|
import * as events from "../../events"
|
||||||
import { DEFAULT_TENANT_ID } from "../../constants"
|
import * as db from "../../db"
|
||||||
|
import { DEFAULT_TENANT_ID, Header } from "../../constants"
|
||||||
import { doInTenant } from "../../context"
|
import { doInTenant } from "../../context"
|
||||||
|
|
||||||
describe("utils", () => {
|
describe("utils", () => {
|
||||||
|
@ -14,4 +15,95 @@ describe("utils", () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe("getAppIdFromCtx", () => {
|
||||||
|
it("gets appId from header", async () => {
|
||||||
|
const ctx = structures.koa.newContext()
|
||||||
|
const expected = db.generateAppID()
|
||||||
|
ctx.request.headers = {
|
||||||
|
[Header.APP_ID]: expected,
|
||||||
|
}
|
||||||
|
|
||||||
|
const actual = await utils.getAppIdFromCtx(ctx)
|
||||||
|
expect(actual).toBe(expected)
|
||||||
|
})
|
||||||
|
|
||||||
|
it("gets appId from body", async () => {
|
||||||
|
const ctx = structures.koa.newContext()
|
||||||
|
const expected = db.generateAppID()
|
||||||
|
ctx.request.body = {
|
||||||
|
appId: expected,
|
||||||
|
}
|
||||||
|
|
||||||
|
const actual = await utils.getAppIdFromCtx(ctx)
|
||||||
|
expect(actual).toBe(expected)
|
||||||
|
})
|
||||||
|
|
||||||
|
it("gets appId from path", async () => {
|
||||||
|
const ctx = structures.koa.newContext()
|
||||||
|
const expected = db.generateAppID()
|
||||||
|
ctx.path = `/apps/${expected}`
|
||||||
|
|
||||||
|
const actual = await utils.getAppIdFromCtx(ctx)
|
||||||
|
expect(actual).toBe(expected)
|
||||||
|
})
|
||||||
|
|
||||||
|
it("gets appId from url", async () => {
|
||||||
|
const ctx = structures.koa.newContext()
|
||||||
|
const expected = db.generateAppID()
|
||||||
|
const app = structures.apps.app(expected)
|
||||||
|
|
||||||
|
// set custom url
|
||||||
|
const appUrl = "custom-url"
|
||||||
|
app.url = `/${appUrl}`
|
||||||
|
ctx.path = `/app/${appUrl}`
|
||||||
|
|
||||||
|
// save the app
|
||||||
|
const database = db.getDB(expected)
|
||||||
|
await database.put(app)
|
||||||
|
|
||||||
|
const actual = await utils.getAppIdFromCtx(ctx)
|
||||||
|
expect(actual).toBe(expected)
|
||||||
|
})
|
||||||
|
|
||||||
|
it("doesn't get appId from url when previewing", async () => {
|
||||||
|
const ctx = structures.koa.newContext()
|
||||||
|
const appId = db.generateAppID()
|
||||||
|
const app = structures.apps.app(appId)
|
||||||
|
|
||||||
|
// set custom url
|
||||||
|
const appUrl = "preview"
|
||||||
|
app.url = `/${appUrl}`
|
||||||
|
ctx.path = `/app/${appUrl}`
|
||||||
|
|
||||||
|
// save the app
|
||||||
|
const database = db.getDB(appId)
|
||||||
|
await database.put(app)
|
||||||
|
|
||||||
|
const actual = await utils.getAppIdFromCtx(ctx)
|
||||||
|
expect(actual).toBe(undefined)
|
||||||
|
})
|
||||||
|
|
||||||
|
it("gets appId from referer", async () => {
|
||||||
|
const ctx = structures.koa.newContext()
|
||||||
|
const expected = db.generateAppID()
|
||||||
|
ctx.request.headers = {
|
||||||
|
referer: `http://test.com/builder/app/${expected}/design/screen_123/screens`,
|
||||||
|
}
|
||||||
|
|
||||||
|
const actual = await utils.getAppIdFromCtx(ctx)
|
||||||
|
expect(actual).toBe(expected)
|
||||||
|
})
|
||||||
|
|
||||||
|
it("doesn't get appId from referer when not builder", async () => {
|
||||||
|
const ctx = structures.koa.newContext()
|
||||||
|
const appId = db.generateAppID()
|
||||||
|
ctx.request.headers = {
|
||||||
|
referer: `http://test.com/foo/app/${appId}/bar`,
|
||||||
|
}
|
||||||
|
|
||||||
|
const actual = await utils.getAppIdFromCtx(ctx)
|
||||||
|
expect(actual).toBe(undefined)
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -25,13 +25,16 @@ const jwt = require("jsonwebtoken")
|
||||||
const APP_PREFIX = DocumentType.APP + SEPARATOR
|
const APP_PREFIX = DocumentType.APP + SEPARATOR
|
||||||
const PROD_APP_PREFIX = "/app/"
|
const PROD_APP_PREFIX = "/app/"
|
||||||
|
|
||||||
|
const BUILDER_PREVIEW_PATH = "/app/preview"
|
||||||
|
const BUILDER_REFERER_PREFIX = "/builder/app/"
|
||||||
|
|
||||||
function confirmAppId(possibleAppId: string | undefined) {
|
function confirmAppId(possibleAppId: string | undefined) {
|
||||||
return possibleAppId && possibleAppId.startsWith(APP_PREFIX)
|
return possibleAppId && possibleAppId.startsWith(APP_PREFIX)
|
||||||
? possibleAppId
|
? possibleAppId
|
||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
async function resolveAppUrl(ctx: Ctx) {
|
export async function resolveAppUrl(ctx: Ctx) {
|
||||||
const appUrl = ctx.path.split("/")[2]
|
const appUrl = ctx.path.split("/")[2]
|
||||||
let possibleAppUrl = `/${appUrl.toLowerCase()}`
|
let possibleAppUrl = `/${appUrl.toLowerCase()}`
|
||||||
|
|
||||||
|
@ -75,7 +78,7 @@ export function isServingApp(ctx: Ctx) {
|
||||||
*/
|
*/
|
||||||
export async function getAppIdFromCtx(ctx: Ctx) {
|
export async function getAppIdFromCtx(ctx: Ctx) {
|
||||||
// look in headers
|
// look in headers
|
||||||
const options = [ctx.headers[Header.APP_ID]]
|
const options = [ctx.request.headers[Header.APP_ID]]
|
||||||
let appId
|
let appId
|
||||||
for (let option of options) {
|
for (let option of options) {
|
||||||
appId = confirmAppId(option as string)
|
appId = confirmAppId(option as string)
|
||||||
|
@ -95,15 +98,23 @@ export async function getAppIdFromCtx(ctx: Ctx) {
|
||||||
appId = confirmAppId(pathId)
|
appId = confirmAppId(pathId)
|
||||||
}
|
}
|
||||||
|
|
||||||
// look in the referer
|
// lookup using custom url - prod apps only
|
||||||
const refererId = parseAppIdFromUrl(ctx.request.headers.referer)
|
// filter out the builder preview path which collides with the prod app path
|
||||||
if (!appId && refererId) {
|
// to ensure we don't load all apps excessively
|
||||||
appId = confirmAppId(refererId)
|
const isBuilderPreview = ctx.path.startsWith(BUILDER_PREVIEW_PATH)
|
||||||
|
const isViewingProdApp =
|
||||||
|
ctx.path.startsWith(PROD_APP_PREFIX) && !isBuilderPreview
|
||||||
|
if (!appId && isViewingProdApp) {
|
||||||
|
appId = confirmAppId(await resolveAppUrl(ctx))
|
||||||
}
|
}
|
||||||
|
|
||||||
// look in the url - prod app
|
// look in the referer - builder only
|
||||||
if (!appId && ctx.path.startsWith(PROD_APP_PREFIX)) {
|
// make sure this is performed after prod app url resolution, in case the
|
||||||
appId = confirmAppId(await resolveAppUrl(ctx))
|
// referer header is present from a builder redirect
|
||||||
|
const referer = ctx.request.headers.referer
|
||||||
|
if (!appId && referer?.includes(BUILDER_REFERER_PREFIX)) {
|
||||||
|
const refererId = parseAppIdFromUrl(ctx.request.headers.referer)
|
||||||
|
appId = confirmAppId(refererId)
|
||||||
}
|
}
|
||||||
|
|
||||||
return appId
|
return appId
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
export const getAccount = jest.fn()
|
const mockGetAccount = jest.fn()
|
||||||
export const getAccountByTenantId = jest.fn()
|
const mockGetAccountByTenantId = jest.fn()
|
||||||
export const getStatus = jest.fn()
|
const mockGetStatus = jest.fn()
|
||||||
|
|
||||||
jest.mock("../../../src/cloud/accounts", () => ({
|
jest.mock("../../../src/cloud/accounts", () => ({
|
||||||
getAccount,
|
getAccount: mockGetAccount,
|
||||||
getAccountByTenantId,
|
getAccountByTenantId: mockGetAccountByTenantId,
|
||||||
getStatus,
|
getStatus: mockGetStatus,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
export const getAccount = mockGetAccount
|
||||||
|
export const getAccountByTenantId = mockGetAccountByTenantId
|
||||||
|
export const getStatus = mockGetStatus
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
const processors = require("../../../src/events/processors")
|
import * as processors from "../../../src/events/processors"
|
||||||
|
import * as events from "../../../src/events"
|
||||||
|
|
||||||
jest.spyOn(processors.analyticsProcessor, "processEvent")
|
jest.spyOn(processors.analyticsProcessor, "processEvent")
|
||||||
|
|
||||||
const events = require("../../../src/events")
|
|
||||||
|
|
||||||
jest.spyOn(events.identification, "identifyTenantGroup")
|
jest.spyOn(events.identification, "identifyTenantGroup")
|
||||||
jest.spyOn(events.identification, "identifyUser")
|
jest.spyOn(events.identification, "identifyUser")
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
import { generator } from "."
|
||||||
|
import { App } from "@budibase/types"
|
||||||
|
import { DEFAULT_TENANT_ID, DocumentType } from "../../../src/constants"
|
||||||
|
|
||||||
|
export function app(id: string): App {
|
||||||
|
return {
|
||||||
|
_id: DocumentType.APP_METADATA,
|
||||||
|
appId: id,
|
||||||
|
type: "",
|
||||||
|
version: "0.0.1",
|
||||||
|
componentLibraries: [],
|
||||||
|
name: generator.name(),
|
||||||
|
url: `/custom-url`,
|
||||||
|
instance: {
|
||||||
|
_id: id,
|
||||||
|
},
|
||||||
|
tenantId: DEFAULT_TENANT_ID,
|
||||||
|
status: "",
|
||||||
|
template: undefined,
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,7 +3,8 @@ export * from "./common"
|
||||||
import Chance from "chance"
|
import Chance from "chance"
|
||||||
export const generator = new Chance()
|
export const generator = new Chance()
|
||||||
|
|
||||||
export * as koa from "./koa"
|
|
||||||
export * as accounts from "./accounts"
|
export * as accounts from "./accounts"
|
||||||
|
export * as apps from "./apps"
|
||||||
|
export * as koa from "./koa"
|
||||||
export * as licenses from "./licenses"
|
export * as licenses from "./licenses"
|
||||||
export * as plugins from "./plugins"
|
export * as plugins from "./plugins"
|
||||||
|
|
|
@ -5,9 +5,11 @@ export const newContext = (): BBContext => {
|
||||||
const ctx = createMockContext()
|
const ctx = createMockContext()
|
||||||
return {
|
return {
|
||||||
...ctx,
|
...ctx,
|
||||||
|
path: "/",
|
||||||
cookies: createMockCookies(),
|
cookies: createMockCookies(),
|
||||||
request: {
|
request: {
|
||||||
...ctx.request,
|
...ctx.request,
|
||||||
|
headers: {},
|
||||||
body: {},
|
body: {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"types": [ "node", "jest" ],
|
"types": [ "node", "jest" ],
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.js",
|
"**/*.js",
|
||||||
|
@ -22,6 +23,7 @@
|
||||||
"node_modules",
|
"node_modules",
|
||||||
"dist",
|
"dist",
|
||||||
"**/*.spec.ts",
|
"**/*.spec.ts",
|
||||||
"**/*.spec.js"
|
"**/*.spec.js",
|
||||||
|
"__mocks__"
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -12,6 +12,6 @@
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
"dist"
|
"dist",
|
||||||
]
|
]
|
||||||
}
|
}
|
|
@ -482,11 +482,6 @@
|
||||||
qs "^6.11.0"
|
qs "^6.11.0"
|
||||||
tough-cookie "^4.1.2"
|
tough-cookie "^4.1.2"
|
||||||
|
|
||||||
"@budibase/types@2.2.10-alpha.13":
|
|
||||||
version "2.2.10-alpha.13"
|
|
||||||
resolved "https://registry.yarnpkg.com/@budibase/types/-/types-2.2.10-alpha.13.tgz#abc1a5bd9295a0fa63db67912c6520d12e8d6f66"
|
|
||||||
integrity sha512-XRmLQXCLKdOADxEoGB3h4QOrHlPIqbk9jOSxyOK2RDQIy8NdQ+aXanPw3TEHkgrDIYxrClVcf4KXrujqNnrk6g==
|
|
||||||
|
|
||||||
"@cspotcode/source-map-support@^0.8.0":
|
"@cspotcode/source-map-support@^0.8.0":
|
||||||
version "0.8.1"
|
version "0.8.1"
|
||||||
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
|
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
|
||||||
|
@ -569,6 +564,13 @@
|
||||||
slash "^3.0.0"
|
slash "^3.0.0"
|
||||||
strip-ansi "^6.0.0"
|
strip-ansi "^6.0.0"
|
||||||
|
|
||||||
|
"@jest/create-cache-key-function@^27.4.2":
|
||||||
|
version "27.5.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-27.5.1.tgz#7448fae15602ea95c828f5eceed35c202a820b31"
|
||||||
|
integrity sha512-dmH1yW+makpTSURTy8VzdUwFnfQh1G8R+DxO2Ho2FFmBbKFEVm+3jWdvFhE2VqB/LATCTokkP0dotjyQyw5/AQ==
|
||||||
|
dependencies:
|
||||||
|
"@jest/types" "^27.5.1"
|
||||||
|
|
||||||
"@jest/environment@^28.1.3":
|
"@jest/environment@^28.1.3":
|
||||||
version "28.1.3"
|
version "28.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.3.tgz#abed43a6b040a4c24fdcb69eab1f97589b2d663e"
|
resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.3.tgz#abed43a6b040a4c24fdcb69eab1f97589b2d663e"
|
||||||
|
@ -703,6 +705,17 @@
|
||||||
slash "^3.0.0"
|
slash "^3.0.0"
|
||||||
write-file-atomic "^4.0.1"
|
write-file-atomic "^4.0.1"
|
||||||
|
|
||||||
|
"@jest/types@^27.5.1":
|
||||||
|
version "27.5.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80"
|
||||||
|
integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==
|
||||||
|
dependencies:
|
||||||
|
"@types/istanbul-lib-coverage" "^2.0.0"
|
||||||
|
"@types/istanbul-reports" "^3.0.0"
|
||||||
|
"@types/node" "*"
|
||||||
|
"@types/yargs" "^16.0.0"
|
||||||
|
chalk "^4.0.0"
|
||||||
|
|
||||||
"@jest/types@^28.1.1", "@jest/types@^28.1.3":
|
"@jest/types@^28.1.1", "@jest/types@^28.1.3":
|
||||||
version "28.1.3"
|
version "28.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.3.tgz#b05de80996ff12512bc5ceb1d208285a7d11748b"
|
resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.3.tgz#b05de80996ff12512bc5ceb1d208285a7d11748b"
|
||||||
|
@ -889,6 +902,80 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
"@sinonjs/commons" "^1.7.0"
|
"@sinonjs/commons" "^1.7.0"
|
||||||
|
|
||||||
|
"@swc/core-darwin-arm64@1.3.25":
|
||||||
|
version "1.3.25"
|
||||||
|
resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.25.tgz#01ce7b8a88b545a4fc5283ed6f96b22c5733d6c4"
|
||||||
|
integrity sha512-8PWAVcjTJyj2VrqPBFOIi2w2P0Z8kOCbzHW3+pe+bSXxfGMG0MKPl5U2IXhsEL0ovm4xSFlqW0yygpoP3MmRPw==
|
||||||
|
|
||||||
|
"@swc/core-darwin-x64@1.3.25":
|
||||||
|
version "1.3.25"
|
||||||
|
resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.25.tgz#9fad102c507011f42c5a5d1f84919b81ab96d7f8"
|
||||||
|
integrity sha512-5DHGiMYFEj5aa208tCjo7Sn5tiG4xPz+4gUiWVlglxqXFptkNim5xu/1G6VYm5Zk7dI5jJkjTU76GQG7IRvPug==
|
||||||
|
|
||||||
|
"@swc/core-linux-arm-gnueabihf@1.3.25":
|
||||||
|
version "1.3.25"
|
||||||
|
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.25.tgz#ecf3a34899fdbdc742523524caab29c0db97a6ad"
|
||||||
|
integrity sha512-YNfLxv9PhZk+jrJbpR1mMrYBUkufo0hiFv3S1OrX3l8edsIP4wPND5w9ZH0Oi898f6Jg9DBrY2zXJMQ+gWkbvA==
|
||||||
|
|
||||||
|
"@swc/core-linux-arm64-gnu@1.3.25":
|
||||||
|
version "1.3.25"
|
||||||
|
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.25.tgz#50524c9db2dbf874570e45f0a66e0283f02bc2d9"
|
||||||
|
integrity sha512-kS+spM5/xQ6QvWF1ms3byfjnhUlpjTfFwgCyHnIKgjvsYkDa+vkAIhKq6HuEdaTPaCRCjts0Zarhub1nClUU0g==
|
||||||
|
|
||||||
|
"@swc/core-linux-arm64-musl@1.3.25":
|
||||||
|
version "1.3.25"
|
||||||
|
resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.25.tgz#f04a3d3784cff14f96ad9901861485ec0fa14ebf"
|
||||||
|
integrity sha512-vM3D7LWmjotUAJ2D4F+L+dspFeWrcPNVh0o8TCoTOYCt8DPD5YsUKTpIgOsZ+gReeWUAnNTh0Btx5pGGVfajGA==
|
||||||
|
|
||||||
|
"@swc/core-linux-x64-gnu@1.3.25":
|
||||||
|
version "1.3.25"
|
||||||
|
resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.25.tgz#761fb020b8a0130e4dccc9c8dce355fa06df63f4"
|
||||||
|
integrity sha512-xUCLLMDlYa/zB8BftVa4SrxuVpcDxkltCfmBg5r2pZPVskhC5ZJsQZ/AvWNChoAB11shRhjTaWDlmxJEsa7TIg==
|
||||||
|
|
||||||
|
"@swc/core-linux-x64-musl@1.3.25":
|
||||||
|
version "1.3.25"
|
||||||
|
resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.25.tgz#f944ee48c972ebdcb3e6d6fd62d67eb98dbb1268"
|
||||||
|
integrity sha512-QzHU3BIaUVRSFNsUn3Qxx1vgtF/f5NqsFMAAPSq9Y8Yq5nrlc2t7cNuOROxHLbUqE+NPUp6+RglleJMoeWz5mA==
|
||||||
|
|
||||||
|
"@swc/core-win32-arm64-msvc@1.3.25":
|
||||||
|
version "1.3.25"
|
||||||
|
resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.25.tgz#af63ae850ef6e7322e8a5a0959529e96096239d2"
|
||||||
|
integrity sha512-77VSVtneVOAUL4zkRyQZ6pWVpTsVVdqwly/DKnRnloglGKxYuk5DG5MUBsL72Nnfv4OCHjZ27eI3NUrpLsUb2Q==
|
||||||
|
|
||||||
|
"@swc/core-win32-ia32-msvc@1.3.25":
|
||||||
|
version "1.3.25"
|
||||||
|
resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.25.tgz#96a869aa4b4c41c44c9c9893ac4aad68d1233022"
|
||||||
|
integrity sha512-kz0v3K3H6OPEZR3ry72Ad/6C5GrZBRRUk69K58LORQ8tZXQD3UGl85pUbQqyHl8fR5NU76Muxgovj9CI9iTHGA==
|
||||||
|
|
||||||
|
"@swc/core-win32-x64-msvc@1.3.25":
|
||||||
|
version "1.3.25"
|
||||||
|
resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.25.tgz#9035c11626653322a404f3f44af11a02d989094c"
|
||||||
|
integrity sha512-nmQOAzIpNRRnupWzkenJmW4i+h1M76cVNUqEU2MjmtesEkRZEGqv//jefXiyCP2zcbeLNLKiB2ptVJhpd1BvRA==
|
||||||
|
|
||||||
|
"@swc/core@^1.3.25":
|
||||||
|
version "1.3.25"
|
||||||
|
resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.25.tgz#53786ea51fac319684d6822de1738eb55b73a4b7"
|
||||||
|
integrity sha512-wqzvM/wu6OsTVYPMStOpm7kIQcPX3GoZ0sC85qzDdsCxmJ1rmItLAD91sXPUmmdk0XqPYjLgT9MRDEIP5woz4g==
|
||||||
|
optionalDependencies:
|
||||||
|
"@swc/core-darwin-arm64" "1.3.25"
|
||||||
|
"@swc/core-darwin-x64" "1.3.25"
|
||||||
|
"@swc/core-linux-arm-gnueabihf" "1.3.25"
|
||||||
|
"@swc/core-linux-arm64-gnu" "1.3.25"
|
||||||
|
"@swc/core-linux-arm64-musl" "1.3.25"
|
||||||
|
"@swc/core-linux-x64-gnu" "1.3.25"
|
||||||
|
"@swc/core-linux-x64-musl" "1.3.25"
|
||||||
|
"@swc/core-win32-arm64-msvc" "1.3.25"
|
||||||
|
"@swc/core-win32-ia32-msvc" "1.3.25"
|
||||||
|
"@swc/core-win32-x64-msvc" "1.3.25"
|
||||||
|
|
||||||
|
"@swc/jest@^0.2.24":
|
||||||
|
version "0.2.24"
|
||||||
|
resolved "https://registry.yarnpkg.com/@swc/jest/-/jest-0.2.24.tgz#35d9377ede049613cd5fdd6c24af2b8dcf622875"
|
||||||
|
integrity sha512-fwgxQbM1wXzyKzl1+IW0aGrRvAA8k0Y3NxFhKigbPjOJ4mCKnWEcNX9HQS3gshflcxq8YKhadabGUVfdwjCr6Q==
|
||||||
|
dependencies:
|
||||||
|
"@jest/create-cache-key-function" "^27.4.2"
|
||||||
|
jsonc-parser "^3.2.0"
|
||||||
|
|
||||||
"@szmarczak/http-timer@^1.1.2":
|
"@szmarczak/http-timer@^1.1.2":
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"
|
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"
|
||||||
|
@ -1096,6 +1183,15 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/koa" "*"
|
"@types/koa" "*"
|
||||||
|
|
||||||
|
"@types/koa-pino-logger@3.0.0":
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/koa-pino-logger/-/koa-pino-logger-3.0.0.tgz#275d4b000abc14b1928dc2e9ab476c8296a64b6a"
|
||||||
|
integrity sha512-sP+12JNX01q+nHpCRqkVIuLjaRemQEfDoFg0evpTnjUEI3jUI2ZrOkhQ5coxn3yVm2tedui/2YhlaPn/XrYNWA==
|
||||||
|
dependencies:
|
||||||
|
"@types/koa" "*"
|
||||||
|
"@types/pino" "*"
|
||||||
|
"@types/pino-http" "*"
|
||||||
|
|
||||||
"@types/koa@*", "@types/koa@2.13.4":
|
"@types/koa@*", "@types/koa@2.13.4":
|
||||||
version "2.13.4"
|
version "2.13.4"
|
||||||
resolved "https://registry.yarnpkg.com/@types/koa/-/koa-2.13.4.tgz#10620b3f24a8027ef5cbae88b393d1b31205726b"
|
resolved "https://registry.yarnpkg.com/@types/koa/-/koa-2.13.4.tgz#10620b3f24a8027ef5cbae88b393d1b31205726b"
|
||||||
|
@ -1143,6 +1239,44 @@
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.20.tgz#268f028b36eaf51181c3300252f605488c4f0650"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.20.tgz#268f028b36eaf51181c3300252f605488c4f0650"
|
||||||
integrity sha512-Q8KKwm9YqEmUBRsqJ2GWJDtXltBDxTdC4m5vTdXBolu2PeQh8LX+f6BTwU+OuXPu37fLxoN6gidqBmnky36FXA==
|
integrity sha512-Q8KKwm9YqEmUBRsqJ2GWJDtXltBDxTdC4m5vTdXBolu2PeQh8LX+f6BTwU+OuXPu37fLxoN6gidqBmnky36FXA==
|
||||||
|
|
||||||
|
"@types/pino-http@*", "@types/pino-http@5.8.1":
|
||||||
|
version "5.8.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/pino-http/-/pino-http-5.8.1.tgz#ebb194750ad2f9245c3028b5d2c4e6d64f685ba9"
|
||||||
|
integrity sha512-A9MW6VCnx5ii7s+Fs5aFIw+aSZcBCpsZ/atpxamu8tTsvWFacxSf2Hrn1Ohn1jkVRB/LiPGOapRXcFawDBnDnA==
|
||||||
|
dependencies:
|
||||||
|
"@types/pino" "6.3"
|
||||||
|
|
||||||
|
"@types/pino-pretty@*":
|
||||||
|
version "5.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/pino-pretty/-/pino-pretty-5.0.0.tgz#aa7a61cfd553b051764acfa0a49872f7a09a1722"
|
||||||
|
integrity sha512-N1uzqSzioqz8R3AkDbSJwcfDWeI3YMPNapSQQhnB2ISU4NYgUIcAh+hYT5ygqBM+klX4htpEhXMmoJv3J7GrdA==
|
||||||
|
dependencies:
|
||||||
|
pino-pretty "*"
|
||||||
|
|
||||||
|
"@types/pino-std-serializers@*":
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/pino-std-serializers/-/pino-std-serializers-4.0.0.tgz#1e28b80b554c8222858e99a4e0fc77fd070e10e8"
|
||||||
|
integrity sha512-gXfUZx2xIBbFYozGms53fT0nvkacx/+62c8iTxrEqH5PkIGAQvDbXg2774VWOycMPbqn5YJBQ3BMsg4Li3dWbg==
|
||||||
|
dependencies:
|
||||||
|
pino-std-serializers "*"
|
||||||
|
|
||||||
|
"@types/pino@*":
|
||||||
|
version "7.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/pino/-/pino-7.0.5.tgz#1c84a81b924a6a9e263dbb581dffdbad7a3c60c4"
|
||||||
|
integrity sha512-wKoab31pknvILkxAF8ss+v9iNyhw5Iu/0jLtRkUD74cNfOOLJNnqfFKAv0r7wVaTQxRZtWrMpGfShwwBjOcgcg==
|
||||||
|
dependencies:
|
||||||
|
pino "*"
|
||||||
|
|
||||||
|
"@types/pino@6.3":
|
||||||
|
version "6.3.12"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/pino/-/pino-6.3.12.tgz#4425db6ced806109c3df957100cba9dfcd73c228"
|
||||||
|
integrity sha512-dsLRTq8/4UtVSpJgl9aeqHvbh6pzdmjYD3C092SYgLD2TyoCqHpTJk6vp8DvCTGGc7iowZ2MoiYiVUUCcu7muw==
|
||||||
|
dependencies:
|
||||||
|
"@types/node" "*"
|
||||||
|
"@types/pino-pretty" "*"
|
||||||
|
"@types/pino-std-serializers" "*"
|
||||||
|
sonic-boom "^2.1.0"
|
||||||
|
|
||||||
"@types/pouchdb-adapter-cordova-sqlite@*":
|
"@types/pouchdb-adapter-cordova-sqlite@*":
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/@types/pouchdb-adapter-cordova-sqlite/-/pouchdb-adapter-cordova-sqlite-1.0.1.tgz#49e5ee6df7cc0c23196fcb340f43a560e74eb1d6"
|
resolved "https://registry.yarnpkg.com/@types/pouchdb-adapter-cordova-sqlite/-/pouchdb-adapter-cordova-sqlite-1.0.1.tgz#49e5ee6df7cc0c23196fcb340f43a560e74eb1d6"
|
||||||
|
@ -1367,6 +1501,13 @@
|
||||||
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b"
|
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b"
|
||||||
integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==
|
integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==
|
||||||
|
|
||||||
|
"@types/yargs@^16.0.0":
|
||||||
|
version "16.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.5.tgz#12cc86393985735a283e387936398c2f9e5f88e3"
|
||||||
|
integrity sha512-AxO/ADJOBFJScHbWhq2xAhlWP24rY4aCEG/NFaMvbT3X2MgRsLjhjQwsn0Zi5zn0LG9jUhCCZMeX9Dkuw6k+vQ==
|
||||||
|
dependencies:
|
||||||
|
"@types/yargs-parser" "*"
|
||||||
|
|
||||||
"@types/yargs@^17.0.8":
|
"@types/yargs@^17.0.8":
|
||||||
version "17.0.13"
|
version "17.0.13"
|
||||||
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.13.tgz#34cced675ca1b1d51fcf4d34c3c6f0fa142a5c76"
|
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.13.tgz#34cced675ca1b1d51fcf4d34c3c6f0fa142a5c76"
|
||||||
|
@ -1379,7 +1520,7 @@ abbrev@1:
|
||||||
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
|
||||||
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
|
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
|
||||||
|
|
||||||
abort-controller@3.0.0:
|
abort-controller@3.0.0, abort-controller@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
|
resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392"
|
||||||
integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==
|
integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==
|
||||||
|
@ -1543,6 +1684,11 @@ asynckit@^0.4.0:
|
||||||
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
|
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
|
||||||
integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
|
integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==
|
||||||
|
|
||||||
|
atomic-sleep@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b"
|
||||||
|
integrity sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==
|
||||||
|
|
||||||
aws-cloudfront-sign@2.2.0:
|
aws-cloudfront-sign@2.2.0:
|
||||||
version "2.2.0"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/aws-cloudfront-sign/-/aws-cloudfront-sign-2.2.0.tgz#3910f5a6d0d90fec07f2b4ef8ab07f3eefb5625d"
|
resolved "https://registry.yarnpkg.com/aws-cloudfront-sign/-/aws-cloudfront-sign-2.2.0.tgz#3910f5a6d0d90fec07f2b4ef8ab07f3eefb5625d"
|
||||||
|
@ -1735,6 +1881,13 @@ brace-expansion@^1.1.7:
|
||||||
balanced-match "^1.0.0"
|
balanced-match "^1.0.0"
|
||||||
concat-map "0.0.1"
|
concat-map "0.0.1"
|
||||||
|
|
||||||
|
brace-expansion@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
|
||||||
|
integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
|
||||||
|
dependencies:
|
||||||
|
balanced-match "^1.0.0"
|
||||||
|
|
||||||
braces@^3.0.2, braces@~3.0.2:
|
braces@^3.0.2, braces@~3.0.2:
|
||||||
version "3.0.2"
|
version "3.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
|
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
|
||||||
|
@ -1809,6 +1962,14 @@ buffer@^5.5.0, buffer@^5.6.0:
|
||||||
base64-js "^1.3.1"
|
base64-js "^1.3.1"
|
||||||
ieee754 "^1.1.13"
|
ieee754 "^1.1.13"
|
||||||
|
|
||||||
|
buffer@^6.0.3:
|
||||||
|
version "6.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
|
||||||
|
integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
|
||||||
|
dependencies:
|
||||||
|
base64-js "^1.3.1"
|
||||||
|
ieee754 "^1.2.1"
|
||||||
|
|
||||||
bull@4.10.1:
|
bull@4.10.1:
|
||||||
version "4.10.1"
|
version "4.10.1"
|
||||||
resolved "https://registry.yarnpkg.com/bull/-/bull-4.10.1.tgz#f14974b6089358b62b495a2cbf838aadc098e43f"
|
resolved "https://registry.yarnpkg.com/bull/-/bull-4.10.1.tgz#f14974b6089358b62b495a2cbf838aadc098e43f"
|
||||||
|
@ -1900,10 +2061,10 @@ chalk@^4.0.0, chalk@^4.1.0:
|
||||||
ansi-styles "^4.1.0"
|
ansi-styles "^4.1.0"
|
||||||
supports-color "^7.1.0"
|
supports-color "^7.1.0"
|
||||||
|
|
||||||
chance@1.1.3:
|
chance@1.1.8:
|
||||||
version "1.1.3"
|
version "1.1.8"
|
||||||
resolved "https://registry.yarnpkg.com/chance/-/chance-1.1.3.tgz#414f08634ee479c7a316b569050ea20751b82dd3"
|
resolved "https://registry.yarnpkg.com/chance/-/chance-1.1.8.tgz#5d6c2b78c9170bf6eb9df7acdda04363085be909"
|
||||||
integrity sha512-XeJsdoVAzDb1WRPRuMBesRSiWpW1uNTo5Fd7mYxPJsAfgX71+jfuCOHOdbyBz2uAUZ8TwKcXgWk3DMedFfJkbg==
|
integrity sha512-v7fi5Hj2VbR6dJEGRWLmJBA83LJMS47pkAbmROFxHWd9qmE1esHRZW8Clf1Fhzr3rjxnNZVCjOEv/ivFxeIMtg==
|
||||||
|
|
||||||
char-regex@^1.0.2:
|
char-regex@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
|
@ -2025,6 +2186,11 @@ color-support@^1.1.2:
|
||||||
resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
|
resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
|
||||||
integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==
|
integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==
|
||||||
|
|
||||||
|
colorette@^2.0.7:
|
||||||
|
version "2.0.19"
|
||||||
|
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798"
|
||||||
|
integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==
|
||||||
|
|
||||||
combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
|
combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
|
||||||
version "1.0.8"
|
version "1.0.8"
|
||||||
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
|
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
|
||||||
|
@ -2096,6 +2262,13 @@ core-util-is@~1.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85"
|
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85"
|
||||||
integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==
|
integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==
|
||||||
|
|
||||||
|
correlation-id@4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/correlation-id/-/correlation-id-4.0.0.tgz#c1d3038e5f30d7bfeae5728ff96f27a7506bc2c0"
|
||||||
|
integrity sha512-WvXtJBlovvOBKqTz/YwWP2gm6CXJZJArfGimp9s/ehmhJMPFbmnPMQe3K60Q9idGNixMvKojMjleyDhZEFdHfg==
|
||||||
|
dependencies:
|
||||||
|
uuid "^8.3.1"
|
||||||
|
|
||||||
create-require@^1.1.0:
|
create-require@^1.1.0:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
|
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
|
||||||
|
@ -2134,6 +2307,11 @@ dashdash@^1.12.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
assert-plus "^1.0.0"
|
assert-plus "^1.0.0"
|
||||||
|
|
||||||
|
dateformat@^4.6.3:
|
||||||
|
version "4.6.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5"
|
||||||
|
integrity sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==
|
||||||
|
|
||||||
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2:
|
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2:
|
||||||
version "4.3.4"
|
version "4.3.4"
|
||||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||||
|
@ -2400,6 +2578,11 @@ events@1.1.1:
|
||||||
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
|
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
|
||||||
integrity sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==
|
integrity sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==
|
||||||
|
|
||||||
|
events@^3.3.0:
|
||||||
|
version "3.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
|
||||||
|
integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==
|
||||||
|
|
||||||
execa@^5.0.0:
|
execa@^5.0.0:
|
||||||
version "5.1.1"
|
version "5.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
|
resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
|
||||||
|
@ -2446,6 +2629,11 @@ extsprintf@^1.2.0:
|
||||||
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07"
|
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07"
|
||||||
integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==
|
integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==
|
||||||
|
|
||||||
|
fast-copy@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fast-copy/-/fast-copy-3.0.0.tgz#875ebf33b13948ae012b6e51d33da5e6e7571ab8"
|
||||||
|
integrity sha512-4HzS+9pQ5Yxtv13Lhs1Z1unMXamBdn5nA4bEi1abYpDNSpSp7ODYQ1KPMF6nTatfEzgH6/zPvXKU1zvHiUjWlA==
|
||||||
|
|
||||||
fast-deep-equal@^3.1.1:
|
fast-deep-equal@^3.1.1:
|
||||||
version "3.1.3"
|
version "3.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
|
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
|
||||||
|
@ -2456,6 +2644,16 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
|
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
|
||||||
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
|
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
|
||||||
|
|
||||||
|
fast-redact@^3.1.1:
|
||||||
|
version "3.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/fast-redact/-/fast-redact-3.1.2.tgz#d58e69e9084ce9fa4c1a6fa98a3e1ecf5d7839aa"
|
||||||
|
integrity sha512-+0em+Iya9fKGfEQGcd62Yv6onjBmmhV1uh86XVfOU8VwAe6kaFdQCWI9s0/Nnugx5Vd9tdbZ7e6gE2tR9dzXdw==
|
||||||
|
|
||||||
|
fast-safe-stringify@^2.1.1:
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884"
|
||||||
|
integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==
|
||||||
|
|
||||||
fb-watchman@^2.0.0:
|
fb-watchman@^2.0.0:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85"
|
resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85"
|
||||||
|
@ -2674,6 +2872,17 @@ glob@^7.1.3, glob@^7.1.4:
|
||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
|
glob@^8.0.0:
|
||||||
|
version "8.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e"
|
||||||
|
integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==
|
||||||
|
dependencies:
|
||||||
|
fs.realpath "^1.0.0"
|
||||||
|
inflight "^1.0.4"
|
||||||
|
inherits "2"
|
||||||
|
minimatch "^5.0.1"
|
||||||
|
once "^1.3.0"
|
||||||
|
|
||||||
global-dirs@^3.0.0:
|
global-dirs@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.0.tgz#70a76fe84ea315ab37b1f5576cbde7d48ef72686"
|
resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.0.tgz#70a76fe84ea315ab37b1f5576cbde7d48ef72686"
|
||||||
|
@ -2760,6 +2969,14 @@ has@^1.0.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
function-bind "^1.1.1"
|
function-bind "^1.1.1"
|
||||||
|
|
||||||
|
help-me@^4.0.1:
|
||||||
|
version "4.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/help-me/-/help-me-4.2.0.tgz#50712bfd799ff1854ae1d312c36eafcea85b0563"
|
||||||
|
integrity sha512-TAOnTB8Tz5Dw8penUuzHVrKNKlCIbwwbHnXraNJxPwf8LRtE2HlM84RYuezMFcwOJmoYOCWVDyJ8TQGxn9PgxA==
|
||||||
|
dependencies:
|
||||||
|
glob "^8.0.0"
|
||||||
|
readable-stream "^3.6.0"
|
||||||
|
|
||||||
html-escaper@^2.0.0:
|
html-escaper@^2.0.0:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
|
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
|
||||||
|
@ -2823,7 +3040,7 @@ ieee754@1.1.13:
|
||||||
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"
|
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84"
|
||||||
integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==
|
integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==
|
||||||
|
|
||||||
ieee754@^1.1.13, ieee754@^1.1.4:
|
ieee754@^1.1.13, ieee754@^1.1.4, ieee754@^1.2.1:
|
||||||
version "1.2.1"
|
version "1.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
||||||
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
|
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
|
||||||
|
@ -3502,6 +3719,11 @@ join-component@^1.1.0:
|
||||||
resolved "https://registry.yarnpkg.com/join-component/-/join-component-1.1.0.tgz#b8417b750661a392bee2c2537c68b2a9d4977cd5"
|
resolved "https://registry.yarnpkg.com/join-component/-/join-component-1.1.0.tgz#b8417b750661a392bee2c2537c68b2a9d4977cd5"
|
||||||
integrity sha512-bF7vcQxbODoGK1imE2P9GS9aw4zD0Sd+Hni68IMZLj7zRnquH7dXUmMw9hDI5S/Jzt7q+IyTXN0rSg2GI0IKhQ==
|
integrity sha512-bF7vcQxbODoGK1imE2P9GS9aw4zD0Sd+Hni68IMZLj7zRnquH7dXUmMw9hDI5S/Jzt7q+IyTXN0rSg2GI0IKhQ==
|
||||||
|
|
||||||
|
joycon@^3.1.1:
|
||||||
|
version "3.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/joycon/-/joycon-3.1.1.tgz#bce8596d6ae808f8b68168f5fc69280996894f03"
|
||||||
|
integrity sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==
|
||||||
|
|
||||||
js-tokens@^4.0.0:
|
js-tokens@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
|
||||||
|
@ -3551,9 +3773,14 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
|
||||||
integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==
|
integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==
|
||||||
|
|
||||||
json5@^2.2.1:
|
json5@^2.2.1:
|
||||||
version "2.2.3"
|
version "2.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
|
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
|
||||||
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
|
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
|
||||||
|
|
||||||
|
jsonc-parser@^3.2.0:
|
||||||
|
version "3.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76"
|
||||||
|
integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==
|
||||||
|
|
||||||
jsonwebtoken@9.0.0:
|
jsonwebtoken@9.0.0:
|
||||||
version "9.0.0"
|
version "9.0.0"
|
||||||
|
@ -3995,6 +4222,13 @@ minimatch@^3.0.4, minimatch@^3.1.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion "^1.1.7"
|
brace-expansion "^1.1.7"
|
||||||
|
|
||||||
|
minimatch@^5.0.1:
|
||||||
|
version "5.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.2.tgz#0939d7d6f0898acbd1508abe534d1929368a8fff"
|
||||||
|
integrity sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==
|
||||||
|
dependencies:
|
||||||
|
brace-expansion "^2.0.1"
|
||||||
|
|
||||||
minimist@^1.2.0:
|
minimist@^1.2.0:
|
||||||
version "1.2.6"
|
version "1.2.6"
|
||||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
|
||||||
|
@ -4226,6 +4460,11 @@ object-inspect@^1.9.0:
|
||||||
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"
|
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"
|
||||||
integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==
|
integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==
|
||||||
|
|
||||||
|
on-exit-leak-free@^2.1.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/on-exit-leak-free/-/on-exit-leak-free-2.1.0.tgz#5c703c968f7e7f851885f6459bf8a8a57edc9cc4"
|
||||||
|
integrity sha512-VuCaZZAjReZ3vUwgOB8LxAosIurDiAW0s13rI1YwmaP++jvcxP77AWoQvenZebpCA2m8WC1/EosPYPMjnRAp/w==
|
||||||
|
|
||||||
on-finished@^2.3.0:
|
on-finished@^2.3.0:
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f"
|
resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f"
|
||||||
|
@ -4445,6 +4684,56 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1:
|
||||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
||||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
||||||
|
|
||||||
|
pino-abstract-transport@^1.0.0, pino-abstract-transport@v1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pino-abstract-transport/-/pino-abstract-transport-1.0.0.tgz#cc0d6955fffcadb91b7b49ef220a6cc111d48bb3"
|
||||||
|
integrity sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA==
|
||||||
|
dependencies:
|
||||||
|
readable-stream "^4.0.0"
|
||||||
|
split2 "^4.0.0"
|
||||||
|
|
||||||
|
pino-pretty@*:
|
||||||
|
version "9.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/pino-pretty/-/pino-pretty-9.1.1.tgz#e7d64c1db98266ca428ab56567b844ba780cd0e1"
|
||||||
|
integrity sha512-iJrnjgR4FWQIXZkUF48oNgoRI9BpyMhaEmihonHeCnZ6F50ZHAS4YGfGBT/ZVNsPmd+hzkIPGzjKdY08+/yAXw==
|
||||||
|
dependencies:
|
||||||
|
colorette "^2.0.7"
|
||||||
|
dateformat "^4.6.3"
|
||||||
|
fast-copy "^3.0.0"
|
||||||
|
fast-safe-stringify "^2.1.1"
|
||||||
|
help-me "^4.0.1"
|
||||||
|
joycon "^3.1.1"
|
||||||
|
minimist "^1.2.6"
|
||||||
|
on-exit-leak-free "^2.1.0"
|
||||||
|
pino-abstract-transport "^1.0.0"
|
||||||
|
pump "^3.0.0"
|
||||||
|
readable-stream "^4.0.0"
|
||||||
|
secure-json-parse "^2.4.0"
|
||||||
|
sonic-boom "^3.0.0"
|
||||||
|
strip-json-comments "^3.1.1"
|
||||||
|
|
||||||
|
pino-std-serializers@*, pino-std-serializers@^6.0.0:
|
||||||
|
version "6.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-6.1.0.tgz#307490fd426eefc95e06067e85d8558603e8e844"
|
||||||
|
integrity sha512-KO0m2f1HkrPe9S0ldjx7za9BJjeHqBku5Ch8JyxETxT8dEFGz1PwgrHaOQupVYitpzbFSYm7nnljxD8dik2c+g==
|
||||||
|
|
||||||
|
pino@*:
|
||||||
|
version "8.8.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pino/-/pino-8.8.0.tgz#1f0d6695a224aa06afc7ad60f2ccc4772d3b9233"
|
||||||
|
integrity sha512-cF8iGYeu2ODg2gIwgAHcPrtR63ILJz3f7gkogaHC/TXVVXxZgInmNYiIpDYEwgEkxZti2Se6P2W2DxlBIZe6eQ==
|
||||||
|
dependencies:
|
||||||
|
atomic-sleep "^1.0.0"
|
||||||
|
fast-redact "^3.1.1"
|
||||||
|
on-exit-leak-free "^2.1.0"
|
||||||
|
pino-abstract-transport v1.0.0
|
||||||
|
pino-std-serializers "^6.0.0"
|
||||||
|
process-warning "^2.0.0"
|
||||||
|
quick-format-unescaped "^4.0.3"
|
||||||
|
real-require "^0.2.0"
|
||||||
|
safe-stable-stringify "^2.3.1"
|
||||||
|
sonic-boom "^3.1.0"
|
||||||
|
thread-stream "^2.0.0"
|
||||||
|
|
||||||
pirates@^4.0.4:
|
pirates@^4.0.4:
|
||||||
version "4.0.5"
|
version "4.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b"
|
resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b"
|
||||||
|
@ -4707,6 +4996,16 @@ process-nextick-args@~2.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
|
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
|
||||||
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
|
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
|
||||||
|
|
||||||
|
process-warning@^2.0.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/process-warning/-/process-warning-2.1.0.tgz#1e60e3bfe8183033bbc1e702c2da74f099422d1a"
|
||||||
|
integrity sha512-9C20RLxrZU/rFnxWncDkuF6O999NdIf3E1ws4B0ZeY3sRVPzWBMsYDE2lxjxhiXxg464cQTgKUGm8/i6y2YGXg==
|
||||||
|
|
||||||
|
process@^0.11.10:
|
||||||
|
version "0.11.10"
|
||||||
|
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
|
||||||
|
integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==
|
||||||
|
|
||||||
prompts@^2.0.1:
|
prompts@^2.0.1:
|
||||||
version "2.4.2"
|
version "2.4.2"
|
||||||
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069"
|
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.2.tgz#7b57e73b3a48029ad10ebd44f74b01722a4cb069"
|
||||||
|
@ -4782,6 +5081,11 @@ querystringify@^2.1.1:
|
||||||
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6"
|
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6"
|
||||||
integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==
|
integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==
|
||||||
|
|
||||||
|
quick-format-unescaped@^4.0.3:
|
||||||
|
version "4.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz#93ef6dd8d3453cbc7970dd614fad4c5954d6b5a7"
|
||||||
|
integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==
|
||||||
|
|
||||||
range-parser@^1.2.0:
|
range-parser@^1.2.0:
|
||||||
version "1.2.1"
|
version "1.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
|
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
|
||||||
|
@ -4826,6 +5130,16 @@ readable-stream@1.1.14, readable-stream@^1.0.27-1:
|
||||||
string_decoder "^1.1.1"
|
string_decoder "^1.1.1"
|
||||||
util-deprecate "^1.0.1"
|
util-deprecate "^1.0.1"
|
||||||
|
|
||||||
|
readable-stream@^4.0.0:
|
||||||
|
version "4.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.3.0.tgz#0914d0c72db03b316c9733bb3461d64a3cc50cba"
|
||||||
|
integrity sha512-MuEnA0lbSi7JS8XM+WNJlWZkHAAdm7gETHdFK//Q/mChGyj2akEFtdLZh32jSdkWGbRwCW9pn6g3LWDdDeZnBQ==
|
||||||
|
dependencies:
|
||||||
|
abort-controller "^3.0.0"
|
||||||
|
buffer "^6.0.3"
|
||||||
|
events "^3.3.0"
|
||||||
|
process "^0.11.10"
|
||||||
|
|
||||||
readable-stream@~0.0.2:
|
readable-stream@~0.0.2:
|
||||||
version "0.0.4"
|
version "0.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-0.0.4.tgz#f32d76e3fb863344a548d79923007173665b3b8d"
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-0.0.4.tgz#f32d76e3fb863344a548d79923007173665b3b8d"
|
||||||
|
@ -4856,6 +5170,11 @@ readline-sync@^1.4.9:
|
||||||
resolved "https://registry.yarnpkg.com/readline-sync/-/readline-sync-1.4.10.tgz#41df7fbb4b6312d673011594145705bf56d8873b"
|
resolved "https://registry.yarnpkg.com/readline-sync/-/readline-sync-1.4.10.tgz#41df7fbb4b6312d673011594145705bf56d8873b"
|
||||||
integrity sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==
|
integrity sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==
|
||||||
|
|
||||||
|
real-require@^0.2.0:
|
||||||
|
version "0.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/real-require/-/real-require-0.2.0.tgz#209632dea1810be2ae063a6ac084fee7e33fba78"
|
||||||
|
integrity sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==
|
||||||
|
|
||||||
redis-commands@1.7.0:
|
redis-commands@1.7.0:
|
||||||
version "1.7.0"
|
version "1.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.7.0.tgz#15a6fea2d58281e27b1cd1acfb4b293e278c3a89"
|
resolved "https://registry.yarnpkg.com/redis-commands/-/redis-commands-1.7.0.tgz#15a6fea2d58281e27b1cd1acfb4b293e278c3a89"
|
||||||
|
@ -4990,6 +5309,11 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||||
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
||||||
|
|
||||||
|
safe-stable-stringify@^2.3.1:
|
||||||
|
version "2.4.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.2.tgz#ec7b037768098bf65310d1d64370de0dc02353aa"
|
||||||
|
integrity sha512-gMxvPJYhP0O9n2pvcfYfIuYgbledAOJFcqRThtPRmjscaipiwcwPPKLytpVzMkG2HAN87Qmo2d4PtGiri1dSLA==
|
||||||
|
|
||||||
safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
|
safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
||||||
|
@ -5010,6 +5334,11 @@ sax@>=0.1.1, sax@>=0.6.0:
|
||||||
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
|
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
|
||||||
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
|
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
|
||||||
|
|
||||||
|
secure-json-parse@^2.4.0:
|
||||||
|
version "2.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862"
|
||||||
|
integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==
|
||||||
|
|
||||||
semver-diff@^3.1.1:
|
semver-diff@^3.1.1:
|
||||||
version "3.1.1"
|
version "3.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b"
|
resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-3.1.1.tgz#05f77ce59f325e00e2706afd67bb506ddb1ca32b"
|
||||||
|
@ -5092,6 +5421,20 @@ slash@^3.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
|
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
|
||||||
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
|
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==
|
||||||
|
|
||||||
|
sonic-boom@^2.1.0:
|
||||||
|
version "2.8.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-2.8.0.tgz#c1def62a77425090e6ad7516aad8eb402e047611"
|
||||||
|
integrity sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==
|
||||||
|
dependencies:
|
||||||
|
atomic-sleep "^1.0.0"
|
||||||
|
|
||||||
|
sonic-boom@^3.0.0, sonic-boom@^3.1.0:
|
||||||
|
version "3.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-3.2.1.tgz#972ceab831b5840a08a002fa95a672008bda1c38"
|
||||||
|
integrity sha512-iITeTHxy3B9FGu8aVdiDXUVAcHMF9Ss0cCsAOo2HfCrmVGT3/DT5oYaeu0M/YKZDlKTvChEyPq0zI9Hf33EX6A==
|
||||||
|
dependencies:
|
||||||
|
atomic-sleep "^1.0.0"
|
||||||
|
|
||||||
source-map-support@0.5.13:
|
source-map-support@0.5.13:
|
||||||
version "0.5.13"
|
version "0.5.13"
|
||||||
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
|
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
|
||||||
|
@ -5122,6 +5465,11 @@ split2@^2.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
through2 "^2.0.2"
|
through2 "^2.0.2"
|
||||||
|
|
||||||
|
split2@^4.0.0:
|
||||||
|
version "4.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/split2/-/split2-4.1.0.tgz#101907a24370f85bb782f08adaabe4e281ecf809"
|
||||||
|
integrity sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==
|
||||||
|
|
||||||
sprintf-js@^1.1.1:
|
sprintf-js@^1.1.1:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673"
|
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673"
|
||||||
|
@ -5331,6 +5679,13 @@ test-exclude@^6.0.0:
|
||||||
glob "^7.1.4"
|
glob "^7.1.4"
|
||||||
minimatch "^3.0.4"
|
minimatch "^3.0.4"
|
||||||
|
|
||||||
|
thread-stream@^2.0.0:
|
||||||
|
version "2.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-2.2.0.tgz#310c03a253f729094ce5d4638ef5186dfa80a9e8"
|
||||||
|
integrity sha512-rUkv4/fnb4rqy/gGy7VuqK6wE1+1DOCOWy4RMeaV69ZHMP11tQKZvZSip1yTgrKCMZzEMcCL/bKfHvSfDHx+iQ==
|
||||||
|
dependencies:
|
||||||
|
real-require "^0.2.0"
|
||||||
|
|
||||||
through2@3.0.2:
|
through2@3.0.2:
|
||||||
version "3.0.2"
|
version "3.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4"
|
resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.2.tgz#99f88931cfc761ec7678b41d5d7336b5b6a07bf4"
|
||||||
|
@ -5624,7 +5979,7 @@ uuid@8.1.0:
|
||||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.1.0.tgz#6f1536eb43249f473abc6bd58ff983da1ca30d8d"
|
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.1.0.tgz#6f1536eb43249f473abc6bd58ff983da1ca30d8d"
|
||||||
integrity sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg==
|
integrity sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg==
|
||||||
|
|
||||||
uuid@8.3.2, uuid@^8.3.0, uuid@^8.3.2:
|
uuid@8.3.2, uuid@^8.3.0, uuid@^8.3.1, uuid@^8.3.2:
|
||||||
version "8.3.2"
|
version "8.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
|
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
|
||||||
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
|
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/bbui",
|
"name": "@budibase/bbui",
|
||||||
"description": "A UI solution used in the different Budibase projects.",
|
"description": "A UI solution used in the different Budibase projects.",
|
||||||
"version": "2.2.11-alpha.1",
|
"version": "2.2.12-alpha.16",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"module": "dist/bbui.es.js",
|
"module": "dist/bbui.es.js",
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@adobe/spectrum-css-workflow-icons": "1.2.1",
|
"@adobe/spectrum-css-workflow-icons": "1.2.1",
|
||||||
"@budibase/string-templates": "2.2.11-alpha.1",
|
"@budibase/string-templates": "2.2.12-alpha.16",
|
||||||
"@spectrum-css/actionbutton": "1.0.1",
|
"@spectrum-css/actionbutton": "1.0.1",
|
||||||
"@spectrum-css/actiongroup": "1.0.1",
|
"@spectrum-css/actiongroup": "1.0.1",
|
||||||
"@spectrum-css/avatar": "3.0.2",
|
"@spectrum-css/avatar": "3.0.2",
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -13,9 +13,9 @@ filterTests(["smoke", "all"], () => {
|
||||||
const datasource = "REST"
|
const datasource = "REST"
|
||||||
const restUrl = "https://api.openbrewerydb.org/breweries"
|
const restUrl = "https://api.openbrewerydb.org/breweries"
|
||||||
cy.selectExternalDatasource(datasource)
|
cy.selectExternalDatasource(datasource)
|
||||||
cy.createRestQuery("GET", restUrl, "/breweries")
|
cy.createRestQuery("GET", restUrl, "breweries")
|
||||||
cy.reload()
|
cy.reload()
|
||||||
cy.contains(".nav-item-content", "/breweries", { timeout: 20000 }).click()
|
cy.contains(".nav-item-content", "breweries", { timeout: 20000 }).click()
|
||||||
cy.contains(interact.SPECTRUM_TABS_ITEM, "Transformer", { timeout: 5000 }).click({ force: true })
|
cy.contains(interact.SPECTRUM_TABS_ITEM, "Transformer", { timeout: 5000 }).click({ force: true })
|
||||||
// Get Transformer Function from file
|
// Get Transformer Function from file
|
||||||
cy.readFile("cypress/support/queryLevelTransformerFunction.js").then(
|
cy.readFile("cypress/support/queryLevelTransformerFunction.js").then(
|
||||||
|
@ -44,9 +44,9 @@ filterTests(["smoke", "all"], () => {
|
||||||
const datasource = "REST"
|
const datasource = "REST"
|
||||||
const restUrl = "https://api.openbrewerydb.org/breweries"
|
const restUrl = "https://api.openbrewerydb.org/breweries"
|
||||||
cy.selectExternalDatasource(datasource)
|
cy.selectExternalDatasource(datasource)
|
||||||
cy.createRestQuery("GET", restUrl, "/breweries")
|
cy.createRestQuery("GET", restUrl, "breweries")
|
||||||
cy.reload()
|
cy.reload()
|
||||||
cy.contains(".nav-item-content", "/breweries", { timeout: 2000 }).click()
|
cy.contains(".nav-item-content", "breweries", { timeout: 2000 }).click()
|
||||||
cy.contains(interact.SPECTRUM_TABS_ITEM, "Transformer", { timeout: 5000 }).click({ force: true })
|
cy.contains(interact.SPECTRUM_TABS_ITEM, "Transformer", { timeout: 5000 }).click({ force: true })
|
||||||
// Get Transformer Function with Data from file
|
// Get Transformer Function with Data from file
|
||||||
cy.readFile(
|
cy.readFile(
|
||||||
|
@ -75,9 +75,9 @@ filterTests(["smoke", "all"], () => {
|
||||||
const datasource = "REST"
|
const datasource = "REST"
|
||||||
const restUrl = "https://api.openbrewerydb.org/breweries"
|
const restUrl = "https://api.openbrewerydb.org/breweries"
|
||||||
cy.selectExternalDatasource(datasource)
|
cy.selectExternalDatasource(datasource)
|
||||||
cy.createRestQuery("GET", restUrl, "/breweries")
|
cy.createRestQuery("GET", restUrl, "breweries")
|
||||||
cy.reload()
|
cy.reload()
|
||||||
cy.contains(".nav-item-content", "/breweries", { timeout: 2000 }).click()
|
cy.contains(".nav-item-content", "breweries", { timeout: 10000 }).click()
|
||||||
cy.contains(interact.SPECTRUM_TABS_ITEM, "Transformer", { timeout: 5000 }).click({ force: true })
|
cy.contains(interact.SPECTRUM_TABS_ITEM, "Transformer", { timeout: 5000 }).click({ force: true })
|
||||||
// Clear the code box and add "test"
|
// Clear the code box and add "test"
|
||||||
cy.get(interact.CODEMIRROR_TEXTAREA)
|
cy.get(interact.CODEMIRROR_TEXTAREA)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/builder",
|
"name": "@budibase/builder",
|
||||||
"version": "2.2.11-alpha.1",
|
"version": "2.2.12-alpha.16",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -71,10 +71,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "2.2.11-alpha.1",
|
"@budibase/bbui": "2.2.12-alpha.16",
|
||||||
"@budibase/client": "2.2.11-alpha.1",
|
"@budibase/client": "2.2.12-alpha.16",
|
||||||
"@budibase/frontend-core": "2.2.11-alpha.1",
|
"@budibase/frontend-core": "2.2.12-alpha.16",
|
||||||
"@budibase/string-templates": "2.2.11-alpha.1",
|
"@budibase/string-templates": "2.2.12-alpha.16",
|
||||||
"@sentry/browser": "5.19.1",
|
"@sentry/browser": "5.19.1",
|
||||||
"@spectrum-css/page": "^3.0.1",
|
"@spectrum-css/page": "^3.0.1",
|
||||||
"@spectrum-css/vars": "^3.0.1",
|
"@spectrum-css/vars": "^3.0.1",
|
||||||
|
|
|
@ -144,6 +144,11 @@
|
||||||
drawer.show()
|
drawer.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getQueryValue = queries => {
|
||||||
|
value = queries.find(q => q._id === value._id) || value
|
||||||
|
return value
|
||||||
|
}
|
||||||
|
|
||||||
const saveQueryParams = () => {
|
const saveQueryParams = () => {
|
||||||
handleSelected({
|
handleSelected({
|
||||||
...value,
|
...value,
|
||||||
|
@ -175,7 +180,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
<IntegrationQueryEditor
|
<IntegrationQueryEditor
|
||||||
height={200}
|
height={200}
|
||||||
query={value}
|
query={getQueryValue(queries)}
|
||||||
schema={fetchQueryDefinition(value)}
|
schema={fetchQueryDefinition(value)}
|
||||||
datasource={getQueryDatasource(value)}
|
datasource={getQueryDatasource(value)}
|
||||||
editable={false}
|
editable={false}
|
||||||
|
|
|
@ -117,10 +117,17 @@
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const cleanUrl = inputUrl =>
|
||||||
|
url
|
||||||
|
?.replace(/(http)|(https)|[{}:]/g, "")
|
||||||
|
?.replaceAll(".", "_")
|
||||||
|
?.replaceAll("/", " ")
|
||||||
|
?.trim() || inputUrl
|
||||||
|
|
||||||
function checkQueryName(inputUrl = null) {
|
function checkQueryName(inputUrl = null) {
|
||||||
if (query && (!query.name || query.flags.urlName)) {
|
if (query && (!query.name || query.flags.urlName)) {
|
||||||
query.flags.urlName = true
|
query.flags.urlName = true
|
||||||
query.name = url || inputUrl
|
query.name = cleanUrl(inputUrl)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,7 @@
|
||||||
{#if !query.fields.steps?.length}
|
{#if !query.fields.steps?.length}
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<Button
|
<Button
|
||||||
|
disabled={!editable}
|
||||||
secondary
|
secondary
|
||||||
slot="buttons"
|
slot="buttons"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
|
@ -131,6 +132,7 @@
|
||||||
{#if index > 0}
|
{#if index > 0}
|
||||||
<ActionButton
|
<ActionButton
|
||||||
quiet
|
quiet
|
||||||
|
disabled={!editable}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
updateEditorsOnSwap(index, index - 1)
|
updateEditorsOnSwap(index, index - 1)
|
||||||
const target = query.fields.steps[index - 1].key
|
const target = query.fields.steps[index - 1].key
|
||||||
|
@ -144,6 +146,7 @@
|
||||||
{#if index < query.fields.steps.length - 1}
|
{#if index < query.fields.steps.length - 1}
|
||||||
<ActionButton
|
<ActionButton
|
||||||
quiet
|
quiet
|
||||||
|
disabled={!editable}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
updateEditorsOnSwap(index, index + 1)
|
updateEditorsOnSwap(index, index + 1)
|
||||||
const target = query.fields.steps[index + 1].key
|
const target = query.fields.steps[index + 1].key
|
||||||
|
@ -156,6 +159,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<ActionButton
|
<ActionButton
|
||||||
|
disabled={!editable}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
updateEditorsOnDelete(index)
|
updateEditorsOnDelete(index)
|
||||||
query.fields.steps.splice(index, 1)
|
query.fields.steps.splice(index, 1)
|
||||||
|
@ -169,6 +173,7 @@
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="block-field">
|
<div class="block-field">
|
||||||
<Select
|
<Select
|
||||||
|
disabled={!editable}
|
||||||
value={step.key}
|
value={step.key}
|
||||||
options={schema.steps.map(s => s.key)}
|
options={schema.steps.map(s => s.key)}
|
||||||
on:change={({ detail }) => {
|
on:change={({ detail }) => {
|
||||||
|
@ -178,6 +183,7 @@
|
||||||
<Editor
|
<Editor
|
||||||
bind:this={stepEditors[index]}
|
bind:this={stepEditors[index]}
|
||||||
editorHeight={height / 2}
|
editorHeight={height / 2}
|
||||||
|
readOnly={!editable}
|
||||||
mode="json"
|
mode="json"
|
||||||
value={typeof step.value === "string"
|
value={typeof step.value === "string"
|
||||||
? step.value
|
? step.value
|
||||||
|
@ -194,9 +200,11 @@
|
||||||
<div class="separator" />
|
<div class="separator" />
|
||||||
{#if index === query.fields.steps.length - 1}
|
{#if index === query.fields.steps.length - 1}
|
||||||
<Icon
|
<Icon
|
||||||
|
disabled={!editable}
|
||||||
hoverable
|
hoverable
|
||||||
name="AddCircle"
|
name="AddCircle"
|
||||||
size="S"
|
size="S"
|
||||||
|
readOnly={!editable}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
query.fields.steps = [
|
query.fields.steps = [
|
||||||
...query.fields.steps,
|
...query.fields.steps,
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
[PluginSource.FILE]: [opt("File Upload")],
|
[PluginSource.FILE]: [opt("File Upload")],
|
||||||
}
|
}
|
||||||
let file
|
let file
|
||||||
let source = PluginSource.URL
|
let source = PluginSource.GITHUB
|
||||||
let dynamicValues = {}
|
let dynamicValues = {}
|
||||||
|
|
||||||
let validation
|
let validation
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/cli",
|
"name": "@budibase/cli",
|
||||||
"version": "2.2.11-alpha.1",
|
"version": "2.2.12-alpha.16",
|
||||||
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
"description": "Budibase CLI, for developers, self hosting and migrations.",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -26,9 +26,9 @@
|
||||||
"outputPath": "build"
|
"outputPath": "build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/backend-core": "2.2.11-alpha.1",
|
"@budibase/backend-core": "2.2.12-alpha.16",
|
||||||
"@budibase/string-templates": "2.2.11-alpha.1",
|
"@budibase/string-templates": "2.2.12-alpha.16",
|
||||||
"@budibase/types": "2.2.11-alpha.1",
|
"@budibase/types": "2.2.12-alpha.16",
|
||||||
"axios": "0.21.2",
|
"axios": "0.21.2",
|
||||||
"chalk": "4.1.0",
|
"chalk": "4.1.0",
|
||||||
"cli-progress": "3.11.2",
|
"cli-progress": "3.11.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/client",
|
"name": "@budibase/client",
|
||||||
"version": "2.2.11-alpha.1",
|
"version": "2.2.12-alpha.16",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"module": "dist/budibase-client.js",
|
"module": "dist/budibase-client.js",
|
||||||
"main": "dist/budibase-client.js",
|
"main": "dist/budibase-client.js",
|
||||||
|
@ -19,9 +19,9 @@
|
||||||
"dev:builder": "rollup -cw"
|
"dev:builder": "rollup -cw"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "2.2.11-alpha.1",
|
"@budibase/bbui": "2.2.12-alpha.16",
|
||||||
"@budibase/frontend-core": "2.2.11-alpha.1",
|
"@budibase/frontend-core": "2.2.12-alpha.16",
|
||||||
"@budibase/string-templates": "2.2.11-alpha.1",
|
"@budibase/string-templates": "2.2.12-alpha.16",
|
||||||
"@spectrum-css/button": "^3.0.3",
|
"@spectrum-css/button": "^3.0.3",
|
||||||
"@spectrum-css/card": "^3.0.3",
|
"@spectrum-css/card": "^3.0.3",
|
||||||
"@spectrum-css/divider": "^1.0.3",
|
"@spectrum-css/divider": "^1.0.3",
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/frontend-core",
|
"name": "@budibase/frontend-core",
|
||||||
"version": "2.2.11-alpha.1",
|
"version": "2.2.12-alpha.16",
|
||||||
"description": "Budibase frontend core libraries used in builder and client",
|
"description": "Budibase frontend core libraries used in builder and client",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
"svelte": "src/index.js",
|
"svelte": "src/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/bbui": "2.2.11-alpha.1",
|
"@budibase/bbui": "2.2.12-alpha.16",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"svelte": "^3.46.2"
|
"svelte": "^3.46.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/sdk",
|
"name": "@budibase/sdk",
|
||||||
"version": "2.2.11-alpha.1",
|
"version": "2.2.12-alpha.16",
|
||||||
"description": "Budibase Public API SDK",
|
"description": "Budibase Public API SDK",
|
||||||
"author": "Budibase",
|
"author": "Budibase",
|
||||||
"license": "MPL-2.0",
|
"license": "MPL-2.0",
|
||||||
|
|
|
@ -2,15 +2,18 @@ import { Config } from "@jest/types"
|
||||||
import * as fs from "fs"
|
import * as fs from "fs"
|
||||||
|
|
||||||
const config: Config.InitialOptions = {
|
const config: Config.InitialOptions = {
|
||||||
preset: "ts-jest",
|
|
||||||
testEnvironment: "node",
|
testEnvironment: "node",
|
||||||
setupFiles: ["./src/tests/jestSetup.ts"],
|
setupFiles: ["./src/tests/jestEnv.ts"],
|
||||||
|
setupFilesAfterEnv: ["./src/tests/jestSetup.ts"],
|
||||||
collectCoverageFrom: [
|
collectCoverageFrom: [
|
||||||
"src/**/*.{js,ts}",
|
"src/**/*.{js,ts}",
|
||||||
// The use of coverage with couchdb view functions breaks tests
|
// The use of coverage with couchdb view functions breaks tests
|
||||||
"!src/db/views/staticViews.*",
|
"!src/db/views/staticViews.*",
|
||||||
],
|
],
|
||||||
coverageReporters: ["lcov", "json", "clover"],
|
coverageReporters: ["lcov", "json", "clover"],
|
||||||
|
transform: {
|
||||||
|
"^.+\\.ts?$": "@swc/jest",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!process.env.CI) {
|
if (!process.env.CI) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@budibase/server",
|
"name": "@budibase/server",
|
||||||
"email": "hi@budibase.com",
|
"email": "hi@budibase.com",
|
||||||
"version": "2.2.11-alpha.1",
|
"version": "2.2.12-alpha.16",
|
||||||
"description": "Budibase Web Server",
|
"description": "Budibase Web Server",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -43,11 +43,11 @@
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apidevtools/swagger-parser": "10.0.3",
|
"@apidevtools/swagger-parser": "10.0.3",
|
||||||
"@budibase/backend-core": "2.2.11-alpha.1",
|
"@budibase/backend-core": "2.2.12-alpha.16",
|
||||||
"@budibase/client": "2.2.11-alpha.1",
|
"@budibase/client": "2.2.12-alpha.16",
|
||||||
"@budibase/pro": "2.2.11-alpha.1",
|
"@budibase/pro": "2.2.12-alpha.16",
|
||||||
"@budibase/string-templates": "2.2.11-alpha.1",
|
"@budibase/string-templates": "2.2.12-alpha.16",
|
||||||
"@budibase/types": "2.2.11-alpha.1",
|
"@budibase/types": "2.2.12-alpha.16",
|
||||||
"@bull-board/api": "3.7.0",
|
"@bull-board/api": "3.7.0",
|
||||||
"@bull-board/koa": "3.9.4",
|
"@bull-board/koa": "3.9.4",
|
||||||
"@elastic/elasticsearch": "7.10.0",
|
"@elastic/elasticsearch": "7.10.0",
|
||||||
|
@ -123,6 +123,8 @@
|
||||||
"@babel/preset-env": "7.16.11",
|
"@babel/preset-env": "7.16.11",
|
||||||
"@budibase/standard-components": "^0.9.139",
|
"@budibase/standard-components": "^0.9.139",
|
||||||
"@jest/test-sequencer": "24.9.0",
|
"@jest/test-sequencer": "24.9.0",
|
||||||
|
"@swc/core": "^1.3.25",
|
||||||
|
"@swc/jest": "^0.2.24",
|
||||||
"@types/apidoc": "0.50.0",
|
"@types/apidoc": "0.50.0",
|
||||||
"@types/bson": "4.2.0",
|
"@types/bson": "4.2.0",
|
||||||
"@types/global-agent": "2.1.1",
|
"@types/global-agent": "2.1.1",
|
||||||
|
|
|
@ -4,12 +4,12 @@ import { Thread, ThreadType } from "../../../threads"
|
||||||
import { save as saveDatasource } from "../datasource"
|
import { save as saveDatasource } from "../datasource"
|
||||||
import { RestImporter } from "./import"
|
import { RestImporter } from "./import"
|
||||||
import { invalidateDynamicVariables } from "../../../threads/utils"
|
import { invalidateDynamicVariables } from "../../../threads/utils"
|
||||||
import { QUERY_THREAD_TIMEOUT } from "../../../environment"
|
import env from "../../../environment"
|
||||||
import { quotas } from "@budibase/pro"
|
import { quotas } from "@budibase/pro"
|
||||||
import { events, context, utils, constants } from "@budibase/backend-core"
|
import { events, context, utils, constants } from "@budibase/backend-core"
|
||||||
|
|
||||||
const Runner = new Thread(ThreadType.QUERY, {
|
const Runner = new Thread(ThreadType.QUERY, {
|
||||||
timeoutMs: QUERY_THREAD_TIMEOUT || 10000,
|
timeoutMs: env.QUERY_THREAD_TIMEOUT || 10000,
|
||||||
})
|
})
|
||||||
|
|
||||||
// simple function to append "readable" to all read queries
|
// simple function to append "readable" to all read queries
|
||||||
|
|
|
@ -10,7 +10,7 @@ const {
|
||||||
NODE_MODULES_PATH,
|
NODE_MODULES_PATH,
|
||||||
TOP_LEVEL_PATH,
|
TOP_LEVEL_PATH,
|
||||||
} = require("../../../utilities/fileSystem")
|
} = require("../../../utilities/fileSystem")
|
||||||
const env = require("../../../environment")
|
import env from "../../../environment"
|
||||||
const { DocumentType } = require("../../../db/utils")
|
const { DocumentType } = require("../../../db/utils")
|
||||||
const { context, objectStore, utils } = require("@budibase/backend-core")
|
const { context, objectStore, utils } = require("@budibase/backend-core")
|
||||||
const AWS = require("aws-sdk")
|
const AWS = require("aws-sdk")
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { getRowParams, generateTableID } from "../../../db/utils"
|
||||||
import { FieldTypes } from "../../../constants"
|
import { FieldTypes } from "../../../constants"
|
||||||
import { TableSaveFunctions, hasTypeChanged, handleDataImport } from "./utils"
|
import { TableSaveFunctions, hasTypeChanged, handleDataImport } from "./utils"
|
||||||
import { context } from "@budibase/backend-core"
|
import { context } from "@budibase/backend-core"
|
||||||
import { isTest } from "../../../environment"
|
import env from "../../../environment"
|
||||||
import {
|
import {
|
||||||
cleanupAttachments,
|
cleanupAttachments,
|
||||||
fixAutoColumnSubType,
|
fixAutoColumnSubType,
|
||||||
|
@ -13,7 +13,6 @@ import { Table } from "@budibase/types"
|
||||||
import { quotas } from "@budibase/pro"
|
import { quotas } from "@budibase/pro"
|
||||||
import { isEqual } from "lodash"
|
import { isEqual } from "lodash"
|
||||||
import { cloneDeep } from "lodash/fp"
|
import { cloneDeep } from "lodash/fp"
|
||||||
import env from "../../../environment"
|
|
||||||
import sdk from "../../../sdk"
|
import sdk from "../../../sdk"
|
||||||
|
|
||||||
function checkAutoColumns(table: Table, oldTable: Table) {
|
function checkAutoColumns(table: Table, oldTable: Table) {
|
||||||
|
@ -164,7 +163,7 @@ export async function destroy(ctx: any) {
|
||||||
await db.remove(tableToDelete._id, tableToDelete._rev)
|
await db.remove(tableToDelete._id, tableToDelete._rev)
|
||||||
|
|
||||||
// remove table search index
|
// remove table search index
|
||||||
if (!isTest() || env.COUCH_DB_URL) {
|
if (!env.isTest() || env.COUCH_DB_URL) {
|
||||||
const currentIndexes = await db.getIndexes()
|
const currentIndexes = await db.getIndexes()
|
||||||
const existingIndex = currentIndexes.indexes.find(
|
const existingIndex = currentIndexes.indexes.find(
|
||||||
(existing: any) => existing.name === `search:${ctx.params.tableId}`
|
(existing: any) => existing.name === `search:${ctx.params.tableId}`
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const viewTemplate = require("../viewBuilder");
|
const viewTemplate = require("../viewBuilder").default;
|
||||||
|
|
||||||
describe("viewBuilder", () => {
|
describe("viewBuilder", () => {
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ function parseEmitExpression(field: string, groupBy: string) {
|
||||||
* filters: Array of filter objects containing predicates that are parsed into a JS expression
|
* filters: Array of filter objects containing predicates that are parsed into a JS expression
|
||||||
* calculation: an optional calculation to be performed over the view data.
|
* calculation: an optional calculation to be performed over the view data.
|
||||||
*/
|
*/
|
||||||
export = function ({
|
export default function ({
|
||||||
field,
|
field,
|
||||||
tableId,
|
tableId,
|
||||||
groupBy,
|
groupBy,
|
||||||
|
|
|
@ -6,4 +6,4 @@ const router: Router = new Router()
|
||||||
router.get("/api/bbtel", controller.isEnabled)
|
router.get("/api/bbtel", controller.isEnabled)
|
||||||
router.post("/api/bbtel/ping", controller.ping)
|
router.post("/api/bbtel/ping", controller.ping)
|
||||||
|
|
||||||
export = router
|
export default router
|
||||||
|
|
|
@ -9,4 +9,4 @@ router
|
||||||
.get("/api/keys", authorized(permissions.BUILDER), controller.fetch)
|
.get("/api/keys", authorized(permissions.BUILDER), controller.fetch)
|
||||||
.put("/api/keys/:key", authorized(permissions.BUILDER), controller.update)
|
.put("/api/keys/:key", authorized(permissions.BUILDER), controller.update)
|
||||||
|
|
||||||
export = router
|
export default router
|
||||||
|
|
|
@ -54,4 +54,4 @@ router
|
||||||
controller.destroy
|
controller.destroy
|
||||||
)
|
)
|
||||||
|
|
||||||
export = router
|
export default router
|
||||||
|
|
|
@ -5,4 +5,4 @@ const router: Router = new Router()
|
||||||
|
|
||||||
router.get("/api/self", controller.fetchSelf)
|
router.get("/api/self", controller.fetchSelf)
|
||||||
|
|
||||||
export = router
|
export default router
|
||||||
|
|
|
@ -84,4 +84,4 @@ router
|
||||||
controller.test
|
controller.test
|
||||||
)
|
)
|
||||||
|
|
||||||
export = router
|
export default router
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue