@punks/backend-entity-manager 0.0.506 → 0.0.509

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,12 @@ export declare enum UserCreationError {
5
5
  export type UserCreationInput<TUserRegistrationInfo, TUserContext extends IAuthUserContext> = {
6
6
  email: string;
7
7
  userName: string;
8
- password: string;
8
+ /**
9
+ * Password for the user account.
10
+ * - Required for standard email/password authentication
11
+ * - Should be omitted (undefined) when using passwordless OAuth login
12
+ */
13
+ password?: string;
9
14
  registrationInfo: TUserRegistrationInfo;
10
15
  context?: TUserContext;
11
16
  verified?: boolean;
package/dist/esm/index.js CHANGED
@@ -23798,7 +23798,7 @@ let UserCreationHandler = class UserCreationHandler {
23798
23798
  error: UserCreationError.UserAlreadyExists,
23799
23799
  };
23800
23800
  }
23801
- if (user && !user.verified) {
23801
+ if (user && !user.verified && input.password) {
23802
23802
  const passwordHash = await this.createPasswordHash(input.password, user.id);
23803
23803
  await this.services.getUsersService().update(user.id, {
23804
23804
  passwordHash,
@@ -23812,10 +23812,11 @@ let UserCreationHandler = class UserCreationHandler {
23812
23812
  };
23813
23813
  }
23814
23814
  const newUser = await this.createUser(input.email, input.userName, input.registrationInfo, input.context);
23815
- const passwordHash = await this.createPasswordHash(input.password, newUser.id);
23816
23815
  await this.services.getUsersService().update(newUser.id, {
23817
- passwordHash,
23818
- passwordUpdateTimestamp: new Date(),
23816
+ ...(input.password && {
23817
+ passwordHash: await this.createPasswordHash(input.password, newUser.id),
23818
+ passwordUpdateTimestamp: new Date(),
23819
+ }),
23819
23820
  verified: input.verified ?? true,
23820
23821
  });
23821
23822
  this.logger.debug(`New user created: ${input.email} - ${input.userName}`, {
@@ -42003,7 +42004,9 @@ let AwsJobsProvider = class AwsJobsProvider {
42003
42004
  instanceId,
42004
42005
  jobUid: definition.uid,
42005
42006
  overrides: {
42006
- command: awsInvocationParams.startCommand?.map((x) => replacePlaceholders(replacePayload(x, payload), commandPlaceholders)),
42007
+ command: awsInvocationParams.startCommand
42008
+ ?.map((x) => replacePlaceholders(replacePayload(x, payload), commandPlaceholders))
42009
+ .filter((x) => x?.trim()),
42007
42010
  batchComputeEnvironment: awsInfrastructureParams.batchComputeEnvironment,
42008
42011
  },
42009
42012
  variables: input.variables,