PR comments - still experiencing build issues.
This commit is contained in:
parent
242a529b2e
commit
4c44b7a224
|
@ -1,7 +1,7 @@
|
||||||
import { AsyncLocalStorage } from "async_hooks"
|
import { AsyncLocalStorage } from "async_hooks"
|
||||||
import { ContextMap } from "./constants"
|
import { ContextMap } from "./constants"
|
||||||
|
|
||||||
export class Context {
|
export default class Context {
|
||||||
static storage = new AsyncLocalStorage<ContextMap>()
|
static storage = new AsyncLocalStorage<ContextMap>()
|
||||||
|
|
||||||
static run(context: ContextMap, func: any) {
|
static run(context: ContextMap, func: any) {
|
|
@ -8,7 +8,7 @@ import {
|
||||||
getDB,
|
getDB,
|
||||||
PouchLike,
|
PouchLike,
|
||||||
} from "../db"
|
} from "../db"
|
||||||
import { Context } from "./localStorage"
|
import Context from "./Context"
|
||||||
import { IdentityContext } from "@budibase/types"
|
import { IdentityContext } from "@budibase/types"
|
||||||
import { DEFAULT_TENANT_ID as _DEFAULT_TENANT_ID } from "../constants"
|
import { DEFAULT_TENANT_ID as _DEFAULT_TENANT_ID } from "../constants"
|
||||||
import { ContextMap } from "./constants"
|
import { ContextMap } from "./constants"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export * from "./connections"
|
export * from "./connections"
|
||||||
export * from "./pouchLike"
|
export * from "./PouchLike"
|
||||||
export * from "./utils"
|
export * from "./utils"
|
||||||
export { init, getPouch, getPouchDB, closePouchDB } from "./pouchDB"
|
export { init, getPouch, getPouchDB, closePouchDB } from "./pouchDB"
|
||||||
|
|
|
@ -5,3 +5,4 @@ export * from "./views"
|
||||||
export * from "./constants"
|
export * from "./constants"
|
||||||
export * from "./conversions"
|
export * from "./conversions"
|
||||||
export * from "./tenancy"
|
export * from "./tenancy"
|
||||||
|
export { PouchLike } from "./couch"
|
||||||
|
|
|
@ -21,10 +21,9 @@ import * as middleware from "./middleware"
|
||||||
import plugins from "./plugin"
|
import plugins from "./plugin"
|
||||||
import encryption from "./security/encryption"
|
import encryption from "./security/encryption"
|
||||||
import * as queue from "./queue"
|
import * as queue from "./queue"
|
||||||
import * as types from "./types"
|
import * as db from "./db"
|
||||||
|
|
||||||
// mimic the outer package exports
|
// mimic the outer package exports
|
||||||
import * as db from "./db"
|
|
||||||
import * as objectStore from "./pkg/objectStore"
|
import * as objectStore from "./pkg/objectStore"
|
||||||
import * as utils from "./pkg/utils"
|
import * as utils from "./pkg/utils"
|
||||||
import redis from "./pkg/redis"
|
import redis from "./pkg/redis"
|
||||||
|
@ -68,7 +67,6 @@ const core = {
|
||||||
encryption,
|
encryption,
|
||||||
queue,
|
queue,
|
||||||
permissions,
|
permissions,
|
||||||
...types,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export = core
|
export = core
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
export { PouchLike } from "./db"
|
|
|
@ -3,9 +3,9 @@ import {
|
||||||
getUsersByAppParams,
|
getUsersByAppParams,
|
||||||
getProdAppID,
|
getProdAppID,
|
||||||
generateAppUserID,
|
generateAppUserID,
|
||||||
} from "./db/utils"
|
queryGlobalView,
|
||||||
import { queryGlobalView } from "./db/views"
|
UNICODE_MAX,
|
||||||
import { UNICODE_MAX } from "./db/constants"
|
} from "./db"
|
||||||
import { BulkDocsResponse, User } from "@budibase/types"
|
import { BulkDocsResponse, User } from "@budibase/types"
|
||||||
import { getGlobalDB } from "./context"
|
import { getGlobalDB } from "./context"
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"types": [ "node", "jest" ],
|
"types": [ "node", "jest" ],
|
||||||
"outDir": "dist"
|
"outDir": "dist",
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.js",
|
"**/*.js",
|
||||||
|
|
|
@ -9,9 +9,13 @@ import {
|
||||||
checkDebounce,
|
checkDebounce,
|
||||||
setDebounce,
|
setDebounce,
|
||||||
} from "../utilities/redis"
|
} from "../utilities/redis"
|
||||||
import { db as dbCore, cache, permissions } from "@budibase/backend-core"
|
import {
|
||||||
|
db as dbCore,
|
||||||
|
cache,
|
||||||
|
permissions,
|
||||||
|
PouchLike,
|
||||||
|
} from "@budibase/backend-core"
|
||||||
import { BBContext } from "@budibase/types"
|
import { BBContext } from "@budibase/types"
|
||||||
import { PouchLike } from "@budibase/backend-core/src/db"
|
|
||||||
|
|
||||||
const DEBOUNCE_TIME_SEC = 30
|
const DEBOUNCE_TIME_SEC = 30
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { BBContext } from "@budibase/types"
|
||||||
|
|
||||||
// if added as a middleware will stop requests unless builder is in self host mode
|
// if added as a middleware will stop requests unless builder is in self host mode
|
||||||
// or cloud is in self host
|
// or cloud is in self host
|
||||||
module.exports = async (ctx: BBContext, next: any) => {
|
export = async (ctx: BBContext, next: any) => {
|
||||||
if (env.SELF_HOSTED) {
|
if (env.SELF_HOSTED) {
|
||||||
await next()
|
await next()
|
||||||
return
|
return
|
||||||
|
|
|
@ -479,7 +479,7 @@ export const bulkDelete = async (
|
||||||
(user: RowResponse<User>) => {
|
(user: RowResponse<User>) => {
|
||||||
return user.doc
|
return user.doc
|
||||||
}
|
}
|
||||||
) as User[]
|
)
|
||||||
|
|
||||||
// Delete from DB
|
// Delete from DB
|
||||||
const toDelete = usersToDelete.map(user => ({
|
const toDelete = usersToDelete.map(user => ({
|
||||||
|
|
|
@ -142,7 +142,7 @@ async function buildEmail(
|
||||||
* @return {Promise<object|null>} returns the SMTP configuration if it exists
|
* @return {Promise<object|null>} returns the SMTP configuration if it exists
|
||||||
*/
|
*/
|
||||||
async function getSmtpConfiguration(
|
async function getSmtpConfiguration(
|
||||||
db: PouchLike,
|
db: dbCore.PouchLike,
|
||||||
workspaceId?: string,
|
workspaceId?: string,
|
||||||
automation?: boolean
|
automation?: boolean
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
"skipLibCheck": true,
|
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"lib": ["es2020"],
|
"lib": ["es2020"],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"outDir": "dist",
|
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"types": [ "node", "jest"],
|
"types": [ "node", "jest" ],
|
||||||
|
"outDir": "dist",
|
||||||
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*"
|
"src/**/*"
|
||||||
|
|
Loading…
Reference in New Issue