Fixing a typescript issue in server.
This commit is contained in:
parent
7852960a03
commit
4b23a78bc9
|
@ -222,6 +222,7 @@ exports.getAllDbs = async () => {
|
|||
/**
|
||||
* Lots of different points in the system need to find the full list of apps, this will
|
||||
* enumerate the entire CouchDB cluster and get the list of databases (every app).
|
||||
*
|
||||
* @return {Promise<object[]>} returns the app information document stored in each app database.
|
||||
*/
|
||||
exports.getAllApps = async ({ dev, all, idsOnly } = {}) => {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,12 +1,11 @@
|
|||
// @ts-ignore
|
||||
import { getGlobalDB, getTenantId } from "@budibase/backend-core/tenancy"
|
||||
// @ts-ignore
|
||||
import { getAllApps } from "@budibase/backend-core/db"
|
||||
import { getUsageQuotaDoc } from "../../../utilities/usageQuota"
|
||||
|
||||
export const run = async () => {
|
||||
const db = getGlobalDB()
|
||||
// get app count
|
||||
// @ts-ignore
|
||||
const devApps = await getAllApps({ dev: true })
|
||||
const appCount = devApps ? devApps.length : 0
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
// @ts-ignore
|
||||
import { getGlobalDB, getTenantId } from "@budibase/backend-core/tenancy"
|
||||
// @ts-ignore
|
||||
import { getAllApps } from "@budibase/backend-core/db"
|
||||
import { getUsageQuotaDoc } from "../../../utilities/usageQuota"
|
||||
import { getUniqueRows } from "../../../utilities/usageQuota/rows"
|
||||
|
@ -8,7 +6,9 @@ import { getUniqueRows } from "../../../utilities/usageQuota/rows"
|
|||
export const run = async () => {
|
||||
const db = getGlobalDB()
|
||||
// get all rows in all apps
|
||||
// @ts-ignore
|
||||
const allApps = await getAllApps({ all: true })
|
||||
// @ts-ignore
|
||||
const appIds = allApps ? allApps.map((app: { appId: any }) => app.appId) : []
|
||||
const rows = await getUniqueRows(appIds)
|
||||
const rowCount = rows ? rows.length : 0
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
declare module "@budibase/backend-core"
|
||||
declare module "@budibase/backend-core/tenancy"
|
||||
declare module "@budibase/backend-core/db"
|
|
@ -12,7 +12,8 @@
|
|||
"incremental": true
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*"
|
||||
"./src/**/*",
|
||||
"./src/module.d.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
|
|
Loading…
Reference in New Issue