Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit efbba57

Browse files
chore(vendor): update @lightbasenl/backend
_This PR is created by sync and will be force-pushed daily. Overwriting any manual changes done to this PR._ - Allow custom function to check 2fa enabled (lightbasenl/platform-components#1352) (lightbasenl/platform-components@f69c14a) - feat(backend): various fixes for the TypeScript migration (lightbasenl/platform-components@9f6c1b0) - feat(backend): support passing user props to authTestCreateUser (lightbasenl/platform-components@a7f7fad) - chore(deps): Bump @xmldom/xmldom from 0.9.4 to 0.9.5 in the production group (lightbasenl/platform-components#1348) (lightbasenl/platform-components@4204470) - chore(deps): Bump rate-limiter-flexible from 5.0.3 to 5.0.4 in the production group (lightbasenl/platform-components#1346) (lightbasenl/platform-components@822c961) - chore(deps): Bump @xmldom/xmldom from 0.9.3 to 0.9.4 in the production group (lightbasenl/platform-components#1344) (lightbasenl/platform-components@5e34679) - fix(feature-flag): allow updating 'userValues' (lightbasenl/platform-components@bb290dd) - fix(feature-flag): use correct sql connection for fetching session (lightbasenl/platform-components@33e27e8) - chore(deps): bump xmldom (lightbasenl/platform-components@b1d5ba6) - chore: replace lint setup with @lightbase/eslint-config (lightbasenl/platform-components@c8e7656) - feat!(backend): feature flags per user (lightbasenl/platform-components#1341) (lightbasenl/platform-components@075e8cd) - feat(backend): add hook to be called in `authRequireUser` on a successful check (lightbasenl/platform-components@90f5223) - chore: make compatible with new and old lint configs (lightbasenl/platform-components@445035b) - chore(deps): Bump @lightbase/pull-through-cache from 0.2.0 to 0.2.1 in the production group (lightbasenl/platform-components#1326) (lightbasenl/platform-components@83e6a49) - chore(backend): remove duplicate check on `requiredPermissions` (lightbasenl/platform-components@387fa87) - feat(backend): support `oneOfRequiredPermissions` (lightbasenl/platform-components@f78adcc) - feat(feature-flag,multitenant): report cache events as Sentry metric (lightbasenl/platform-components@22ebc13)- Failed to execute `npx compas lint`. Sync is not able to correct this, so human checks and fixes are necessary for this PR.
1 parent 07e7822 commit efbba57

File tree

37 files changed

+266
-130
lines changed

37 files changed

+266
-130
lines changed

gen/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
import { storeGetStructure } from "@compas/store";
2+
import { featureFlagDefinition, permissions } from "../src/constants.js";
3+
import { extendWithAuthCustom } from "./auth.js";
4+
import { extendWithDatabase } from "./database.js";
5+
import { extendWithMail } from "./mail.js";
6+
import { extendWithScaffold } from "./scaffold.js";
7+
import { extendWithType } from "./type.js";
28
import {
39
authPermissions,
410
extendWithAuthAnonymousBased,
@@ -9,12 +15,6 @@ import {
915
extendWithFeatureFlag,
1016
extendWithManagement,
1117
} from "@lightbasenl/backend";
12-
import { featureFlagDefinition, permissions } from "../src/constants.js";
13-
import { extendWithAuthCustom } from "./auth.js";
14-
import { extendWithDatabase } from "./database.js";
15-
import { extendWithMail } from "./mail.js";
16-
import { extendWithScaffold } from "./scaffold.js";
17-
import { extendWithType } from "./type.js";
1818

1919
/**
2020
* Extend with compas additional/optional package structures

package-lock.json

Lines changed: 17 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/queue.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ import {
1010
queueWorkerCreate,
1111
queueWorkerRegisterCronJobs,
1212
} from "@compas/store";
13-
import {
14-
authEventNames,
15-
authJobNames,
16-
authPasswordBasedInvalidateResetTokens,
17-
managementInvalidateUsers,
18-
} from "@lightbasenl/backend";
1913
import {
2014
authAnonymousBasedUserRegisteredEvent,
2115
authPasswordBasedEmailUpdatedEvent,
@@ -29,6 +23,12 @@ import { injectServices } from "../src/service.js";
2923
import { serviceLogger } from "../src/services/logger.js";
3024
import { sql } from "../src/services/postgres.js";
3125
import { bucketName, s3Client } from "../src/services/s3.js";
26+
import {
27+
authEventNames,
28+
authJobNames,
29+
authPasswordBasedInvalidateResetTokens,
30+
managementInvalidateUsers,
31+
} from "@lightbasenl/backend";
3232

3333
mainFn(import.meta, main);
3434

src/auth/jobs.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export async function authAnonymousBasedUserRegisteredEvent(
3636
}
3737

3838
// TODO(platform): Act
39-
// eslint-disable-next-line no-unused-vars
39+
4040
const x = 5;
4141

4242
eventStop(event);
@@ -87,7 +87,7 @@ export async function authPasswordBasedUserRegisteredEvent(
8787
}
8888

8989
// TODO(platform): Act
90-
// eslint-disable-next-line no-unused-vars
90+
9191
const x = 5;
9292

9393
eventStop(event);
@@ -139,7 +139,7 @@ export async function authPasswordBasedForgotPasswordEvent(
139139
}
140140

141141
// TODO(platform): Act
142-
// eslint-disable-next-line no-unused-vars
142+
143143
const x = 5;
144144

145145
eventStop(event);
@@ -180,7 +180,7 @@ export async function authPasswordBasedPasswordUpdatedEvent(
180180
}
181181

182182
// TODO(platform): Act
183-
// eslint-disable-next-line no-unused-vars
183+
184184
const x = 5;
185185

186186
eventStop(event);
@@ -228,7 +228,7 @@ export async function authPasswordBasedEmailUpdatedEvent(event, sql, { data }) {
228228
}
229229

230230
// TODO(platform): Act
231-
// eslint-disable-next-line no-unused-vars
231+
232232
const x = 5;
233233

234234
eventStop(event);
@@ -269,7 +269,7 @@ export async function authPasswordBasedLoginVerifiedEvent(
269269
}
270270

271271
// TODO(platform): Act
272-
// eslint-disable-next-line no-unused-vars
272+
273273
const x = 5;
274274

275275
eventStop(event);
@@ -310,7 +310,7 @@ export async function authPasswordBasedPasswordResetEvent(
310310
}
311311

312312
// TODO(platform): Act
313-
// eslint-disable-next-line no-unused-vars
313+
314314
const x = 5;
315315

316316
eventStop(event);

src/mail/events.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export async function mailSendGeneric(event, email, payload) {
4242
* @param {function(MailAddressHeaders, T): MailTemplateResponse} template
4343
* @param {MailAddressHeaders} addresses
4444
* @param {T} [payload={}]
45-
* @param {import("@types/nodemailer").Attachment[]} [attachments]
45+
* @param {Array<import("@types/nodemailer").Attachment>} [attachments]
4646
* @returns {Promise<void>}
4747
*/
4848
async function mailSend(
@@ -92,9 +92,9 @@ async function mailSend(
9292
* Construct a mail header object for nodemailer
9393
*
9494
* @param {MailAddress} from
95-
* @param {MailAddress|MailAddress[]} to
96-
* @param {MailAddress[]|undefined} [cc]
97-
* @param {MailAddress[]|undefined} [bcc]
95+
* @param {MailAddress | Array<MailAddress>} to
96+
* @param {Array<MailAddress> | undefined} [cc]
97+
* @param {Array<MailAddress> | undefined} [bcc]
9898
* @returns {MailAddressHeaders}
9999
*/
100100
function constructMailAddressHeaders(from, to, cc, bcc) {

src/scaffold/controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { newEventFromEvent } from "@compas/stdlib";
2-
import { authCreateUser, multitenantRequireTenant } from "@lightbasenl/backend";
32
import { scaffoldHandlers } from "../generated/application/scaffold/controller.js";
43
import { sql } from "../services/postgres.js";
4+
import { authCreateUser, multitenantRequireTenant } from "@lightbasenl/backend";
55

66
// TODO(platform): remove this;
77
scaffoldHandlers.createUser = async (ctx) => {

src/services/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createBodyParser, getApp } from "@compas/server";
2-
import { backendGetConfig } from "@lightbasenl/backend";
32
import { router } from "../generated/application/common/router.js";
43
import { serviceLogger } from "./logger.js";
4+
import { backendGetConfig } from "@lightbasenl/backend";
55

66
/**
77
* @type {Application}

src/services/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { AppError, environment } from "@compas/stdlib";
55
* This method should be used as guard during startup to ensure non-unexpected
66
* code paths are hit during runtime.
77
*
8-
* @param {string[]} requiredEnvironmentVariables
8+
* @param {Array<string>} requiredEnvironmentVariables
99
* @returns {void}
1010
*/
1111
export function ensureEnvironmentVars(requiredEnvironmentVariables) {

src/services/lpc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { newEvent } from "@compas/stdlib";
2+
import { buildMandatoryRoles, permissions } from "../constants.js";
3+
import { serviceLogger } from "./logger.js";
24
import {
35
authPermissions,
46
backendInit,
57
backendInitServices,
68
} from "@lightbasenl/backend";
7-
import { buildMandatoryRoles, permissions } from "../constants.js";
8-
import { serviceLogger } from "./logger.js";
99

1010
/**
1111
* @returns {Promise<void>}

src/testing.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ import {
44
cleanupTestPostgresDatabase,
55
objectStorageRemoveBucket,
66
} from "@compas/store";
7-
import {
8-
authInjectTokenInterceptors,
9-
multitenantInjectAxios,
10-
} from "@lightbasenl/backend";
117
import axios from "axios";
128
import { axiosInterceptErrorAndWrapWithAppError } from "./generated/application/common/api-client.js";
139
import {
@@ -25,6 +21,10 @@ import {
2521
serviceS3EnsureBuckets,
2622
serviceS3Init,
2723
} from "./services/s3.js";
24+
import {
25+
authInjectTokenInterceptors,
26+
multitenantInjectAxios,
27+
} from "@lightbasenl/backend";
2828

2929
/**
3030
* Initialize all services based on an empty database and fresh s3 bucket.

0 commit comments

Comments
 (0)