cjs doesnt like knex default export

This commit is contained in:
Kristaps Fabians Geikins
2024-10-28 11:35:20 +02:00
parent 284e9968dc
commit 11fec3222a
7 changed files with 7 additions and 7 deletions
@@ -9,7 +9,7 @@ const {
const { beforeEachContext } = require(`@/test/hooks`)
const { Scopes } = require('@/modules/core/helpers/mainConstants')
const knex = require('@/db/knex')
const { knex } = require('@/db/knex')
const cryptoRandomString = require('crypto-random-string')
const {
getAppFactory,
@@ -14,7 +14,7 @@ const {
deleteServerOnlyInvitesFactory,
updateAllInviteTargetsFactory
} = require('@/modules/serverinvites/repositories/serverInvites')
const db = require('@/db/knex')
const { db } = require('@/db/knex')
const {
legacyCreateStreamFactory,
createStreamReturnRecordFactory
@@ -1,7 +1,7 @@
/* istanbul ignore file */
const crs = require('crypto-random-string')
const { range } = require('lodash')
const knex = require('@/db/knex')
const { knex } = require('@/db/knex')
const BlobStorage = () => knex('blob_storage')
const fakeIdGenerator = () => crs({ length: 10 })
@@ -7,7 +7,7 @@ const { sleep } = require('@/test/helpers')
const expect = chai.expect
const knex = require('@/db/knex')
const { knex } = require('@/db/knex')
const {
updateBranchAndNotifyFactory,
@@ -2,7 +2,7 @@
const expect = require('chai').expect
const { init } = require('@/app')
const knex = require('@/db/knex')
const { knex } = require('@/db/knex')
const { beforeEachContext } = require('@/test/hooks')
// NOTE:
@@ -1,6 +1,6 @@
const request = require('supertest')
const knex = require('@/db/knex')
const { knex } = require('@/db/knex')
const ResetTokens = () => knex('pwdreset_tokens')
const { beforeEachContext } = require('@/test/hooks')
@@ -1,4 +1,4 @@
const knex = require('@/db/knex')
const { knex } = require('@/db/knex')
const { logger } = require('@/logging/logging')
const roles = require('@/modules/core/roles.js')
const { Roles } = require('@speckle/shared')