@authup/server-core 1.0.0-beta.61 → 1.0.0-beta.62

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.
Files changed (133) hide show
  1. package/dist/adapters/database/domains/client-scope/entity.d.ts.map +1 -1
  2. package/dist/adapters/database/domains/client-scope/entity.mjs +16 -8
  3. package/dist/adapters/database/domains/client-scope/entity.mjs.map +1 -1
  4. package/dist/adapters/database/domains/identity-provider-account/entity.d.ts.map +1 -1
  5. package/dist/adapters/database/domains/identity-provider-account/entity.mjs +1 -1
  6. package/dist/adapters/database/domains/identity-provider-account/entity.mjs.map +1 -1
  7. package/dist/adapters/database/migrations/mysql/1786631686318-SortIndexesAndAccountUniqueness.d.ts +50 -0
  8. package/dist/adapters/database/migrations/mysql/1786631686318-SortIndexesAndAccountUniqueness.d.ts.map +1 -0
  9. package/dist/adapters/database/migrations/mysql/1786631686318-SortIndexesAndAccountUniqueness.mjs +86 -0
  10. package/dist/adapters/database/migrations/mysql/1786631686318-SortIndexesAndAccountUniqueness.mjs.map +1 -0
  11. package/dist/adapters/database/migrations/postgres/1786631686318-SortIndexesAndAccountUniqueness.d.ts +42 -0
  12. package/dist/adapters/database/migrations/postgres/1786631686318-SortIndexesAndAccountUniqueness.d.ts.map +1 -0
  13. package/dist/adapters/database/migrations/postgres/1786631686318-SortIndexesAndAccountUniqueness.mjs +80 -0
  14. package/dist/adapters/database/migrations/postgres/1786631686318-SortIndexesAndAccountUniqueness.mjs.map +1 -0
  15. package/dist/adapters/http/adapters/oauth2/grant-types/utils/credentials.mjs +1 -1
  16. package/dist/adapters/http/adapters/oauth2/grant-types/utils/guess.mjs +1 -1
  17. package/dist/adapters/http/controllers/entities/client/module.mjs +2 -2
  18. package/dist/adapters/http/controllers/entities/identity-provider/module.d.ts +3 -5
  19. package/dist/adapters/http/controllers/entities/identity-provider/module.d.ts.map +1 -1
  20. package/dist/adapters/http/controllers/entities/identity-provider/module.mjs +54 -82
  21. package/dist/adapters/http/controllers/entities/identity-provider/module.mjs.map +1 -1
  22. package/dist/adapters/http/controllers/entities/identity-provider/types.d.ts +6 -4
  23. package/dist/adapters/http/controllers/entities/identity-provider/types.d.ts.map +1 -1
  24. package/dist/adapters/http/controllers/entities/realm/module.mjs +2 -2
  25. package/dist/adapters/http/controllers/entities/session/module.mjs +2 -2
  26. package/dist/adapters/http/controllers/entities/user/module.mjs +2 -2
  27. package/dist/adapters/http/controllers/entities/user-authenticator/module.mjs +2 -2
  28. package/dist/adapters/http/controllers/workflows/authorize/module.d.ts.map +1 -1
  29. package/dist/adapters/http/controllers/workflows/authorize/module.mjs +9 -5
  30. package/dist/adapters/http/controllers/workflows/authorize/module.mjs.map +1 -1
  31. package/dist/adapters/http/controllers/workflows/token/utils/extract.mjs +2 -1
  32. package/dist/adapters/http/controllers/workflows/token/utils/extract.mjs.map +1 -1
  33. package/dist/adapters/http/middleware/built-in/assets.mjs +1 -1
  34. package/dist/adapters/http/request/helpers/param-id.d.ts.map +1 -1
  35. package/dist/adapters/http/request/helpers/param-id.mjs +2 -1
  36. package/dist/adapters/http/request/helpers/param-id.mjs.map +1 -1
  37. package/dist/adapters/http/ui/account-console/module.mjs +1 -1
  38. package/dist/adapters/http/ui/auth-console/http-client.mjs +1 -1
  39. package/dist/adapters/http/ui/auth-console/module.mjs +1 -1
  40. package/dist/adapters/http/ui/console-packages/module.d.ts +1 -1
  41. package/dist/adapters/http/ui/console-packages/module.mjs +2 -2
  42. package/dist/adapters/http/ui/console-packages/module.mjs.map +1 -1
  43. package/dist/adapters/http/ui/shared/html.d.ts.map +1 -1
  44. package/dist/adapters/http/ui/shared/html.mjs +1 -0
  45. package/dist/adapters/http/ui/shared/html.mjs.map +1 -1
  46. package/dist/app/modules/config/read/env.mjs +1 -1
  47. package/dist/app/modules/database/repositories/event/repository.d.ts +2 -2
  48. package/dist/app/modules/database/repositories/event/repository.d.ts.map +1 -1
  49. package/dist/app/modules/database/repositories/event/repository.mjs +23 -6
  50. package/dist/app/modules/database/repositories/event/repository.mjs.map +1 -1
  51. package/dist/app/modules/database/repositories/identity-provider-account/repository.d.ts.map +1 -1
  52. package/dist/app/modules/database/repositories/identity-provider-account/repository.mjs +9 -1
  53. package/dist/app/modules/database/repositories/identity-provider-account/repository.mjs.map +1 -1
  54. package/dist/app/modules/http/modules/controller.d.ts.map +1 -1
  55. package/dist/app/modules/http/modules/controller.mjs +16 -5
  56. package/dist/app/modules/http/modules/controller.mjs.map +1 -1
  57. package/dist/app/modules/identity/module.d.ts.map +1 -1
  58. package/dist/app/modules/identity/module.mjs +6 -3
  59. package/dist/app/modules/identity/module.mjs.map +1 -1
  60. package/dist/app/modules/identity/repositories/user.d.ts +1 -0
  61. package/dist/app/modules/identity/repositories/user.d.ts.map +1 -1
  62. package/dist/app/modules/identity/repositories/user.mjs +3 -0
  63. package/dist/app/modules/identity/repositories/user.mjs.map +1 -1
  64. package/dist/app/modules/oauth2/repositories/authorize/state/repository.d.ts +1 -2
  65. package/dist/app/modules/oauth2/repositories/authorize/state/repository.d.ts.map +1 -1
  66. package/dist/app/modules/oauth2/repositories/authorize/state/repository.mjs +7 -16
  67. package/dist/app/modules/oauth2/repositories/authorize/state/repository.mjs.map +1 -1
  68. package/dist/app/modules/runtime/module.mjs +2 -2
  69. package/dist/cli/commands/migration.mjs +1 -1
  70. package/dist/core/entities/client-scope/schema.d.ts.map +1 -1
  71. package/dist/core/entities/client-scope/schema.mjs +16 -1
  72. package/dist/core/entities/client-scope/schema.mjs.map +1 -1
  73. package/dist/core/entities/event/constants.d.ts +9 -0
  74. package/dist/core/entities/event/constants.d.ts.map +1 -1
  75. package/dist/core/entities/event/constants.mjs +9 -1
  76. package/dist/core/entities/event/constants.mjs.map +1 -1
  77. package/dist/core/entities/event/index.mjs +2 -2
  78. package/dist/core/entities/event/types.d.ts +11 -2
  79. package/dist/core/entities/event/types.d.ts.map +1 -1
  80. package/dist/core/entities/identity-provider-account/types.d.ts +6 -0
  81. package/dist/core/entities/identity-provider-account/types.d.ts.map +1 -1
  82. package/dist/core/entities/identity-provider-account/types.mjs.map +1 -1
  83. package/dist/core/entities/index.mjs +2 -2
  84. package/dist/core/identity/entities/user/types.d.ts +1 -0
  85. package/dist/core/identity/entities/user/types.d.ts.map +1 -1
  86. package/dist/core/identity/index.mjs +10 -10
  87. package/dist/core/identity/provider/account/module.d.ts +3 -0
  88. package/dist/core/identity/provider/account/module.d.ts.map +1 -1
  89. package/dist/core/identity/provider/account/module.mjs +54 -27
  90. package/dist/core/identity/provider/account/module.mjs.map +1 -1
  91. package/dist/core/identity/provider/account/types.d.ts +7 -0
  92. package/dist/core/identity/provider/account/types.d.ts.map +1 -1
  93. package/dist/core/identity/provider/authentication/index.mjs +1 -1
  94. package/dist/core/identity/provider/index.mjs +10 -10
  95. package/dist/core/index.mjs +14 -12
  96. package/dist/core/oauth2/authorization/code-request/verifier/module.d.ts.map +1 -1
  97. package/dist/core/oauth2/authorization/code-request/verifier/module.mjs +7 -1
  98. package/dist/core/oauth2/authorization/code-request/verifier/module.mjs.map +1 -1
  99. package/dist/core/oauth2/authorization/state/module.mjs +1 -2
  100. package/dist/core/oauth2/authorization/state/module.mjs.map +1 -1
  101. package/dist/core/oauth2/authorization/state/types.d.ts +5 -2
  102. package/dist/core/oauth2/authorization/state/types.d.ts.map +1 -1
  103. package/dist/core/oauth2/end-session/service.d.ts.map +1 -1
  104. package/dist/core/oauth2/end-session/service.mjs +1 -0
  105. package/dist/core/oauth2/end-session/service.mjs.map +1 -1
  106. package/dist/core/oauth2/federated-login/index.d.ts +3 -0
  107. package/dist/core/oauth2/federated-login/index.d.ts.map +1 -0
  108. package/dist/core/oauth2/federated-login/index.mjs +6 -0
  109. package/dist/core/oauth2/federated-login/module.d.ts +20 -0
  110. package/dist/core/oauth2/federated-login/module.d.ts.map +1 -0
  111. package/dist/core/oauth2/federated-login/module.mjs +137 -0
  112. package/dist/core/oauth2/federated-login/module.mjs.map +1 -0
  113. package/dist/core/oauth2/federated-login/types.d.ts +138 -0
  114. package/dist/core/oauth2/federated-login/types.d.ts.map +1 -0
  115. package/dist/core/oauth2/federated-login/types.mjs +31 -0
  116. package/dist/core/oauth2/federated-login/types.mjs.map +1 -0
  117. package/dist/core/oauth2/index.d.ts +1 -0
  118. package/dist/core/oauth2/index.d.ts.map +1 -1
  119. package/dist/core/oauth2/index.mjs +4 -1
  120. package/dist/core/provisioning/entities/policy/validator.d.ts.map +1 -1
  121. package/dist/core/provisioning/entities/policy/validator.mjs +2 -1
  122. package/dist/core/provisioning/entities/policy/validator.mjs.map +1 -1
  123. package/dist/core/provisioning/entities/realm/wildcard-validator.d.ts.map +1 -1
  124. package/dist/core/provisioning/entities/realm/wildcard-validator.mjs +2 -1
  125. package/dist/core/provisioning/entities/realm/wildcard-validator.mjs.map +1 -1
  126. package/dist/core/security/policy/evaluator.mjs.map +1 -1
  127. package/dist/node_modules/@ebec/core/dist/index.mjs +130 -0
  128. package/dist/node_modules/@ebec/core/dist/index.mjs.map +1 -0
  129. package/dist/swagger.json +30 -2
  130. package/dist/utils/error.d.ts.map +1 -1
  131. package/dist/utils/error.mjs +5 -6
  132. package/dist/utils/error.mjs.map +1 -1
  133. package/package.json +28 -28
package/dist/swagger.json CHANGED
@@ -428,6 +428,19 @@
428
428
  }
429
429
  ]
430
430
  },
431
+ "caseSensitive": {
432
+ "anyOf": [
433
+ {
434
+ "type": "array",
435
+ "items": {
436
+ "type": "string"
437
+ }
438
+ },
439
+ {
440
+ "type": "null"
441
+ }
442
+ ]
443
+ },
431
444
  "allowed": {
432
445
  "anyOf": [
433
446
  {
@@ -444,6 +457,7 @@
444
457
  },
445
458
  "required": [
446
459
  "indexed",
460
+ "caseSensitive",
447
461
  "allowed"
448
462
  ],
449
463
  "type": "object",
@@ -9667,7 +9681,14 @@
9667
9681
  "content": {
9668
9682
  "application/json": {
9669
9683
  "schema": {
9670
- "$ref": "#/components/schemas/Response"
9684
+ "anyOf": [
9685
+ {
9686
+ "type": "string"
9687
+ },
9688
+ {
9689
+ "$ref": "#/components/schemas/Response"
9690
+ }
9691
+ ]
9671
9692
  }
9672
9693
  }
9673
9694
  }
@@ -9700,7 +9721,14 @@
9700
9721
  "content": {
9701
9722
  "application/json": {
9702
9723
  "schema": {
9703
- "$ref": "#/components/schemas/Response"
9724
+ "anyOf": [
9725
+ {
9726
+ "type": "string"
9727
+ },
9728
+ {
9729
+ "$ref": "#/components/schemas/Response"
9730
+ }
9731
+ ]
9704
9732
  }
9705
9733
  }
9706
9734
  }
@@ -1 +1 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/utils/error.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,WAAW,EAKd,MAAM,gBAAgB,CAAC;AAQxB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAgGzD;AA0ED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CA8BvE"}
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/utils/error.ts"],"names":[],"mappings":"AAOA,OAAO,EACH,WAAW,EAKd,MAAM,gBAAgB,CAAC;AAQxB;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CA8FzD;AA0ED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CA8BvE"}
@@ -5,9 +5,9 @@ import { hasOwnProperty, isObject } from "@authup/kit";
5
5
  import { AuthupError, ErrorCode, codeFromHttpStatus, isAuthupError, normalizeError } from "@authup/errors";
6
6
  import { CodecError, ParseError } from "@rapiq/core";
7
7
  import { buildErrorMessageForAttributes, isValidupError, stringifyPath } from "validup";
8
- import { EntityRelationLookupError } from "typeorm-extension";
9
- import { isClientError } from "hapic";
10
8
  import { isHTTPError } from "@ebec/http";
9
+ import { isClientError } from "hapic";
10
+ import { EntityRelationLookupError } from "typeorm-extension";
11
11
  //#region src/utils/error.ts
12
12
  /**
13
13
  * Normalize an unknown error to an AuthupError. Recognised shapes:
@@ -32,13 +32,12 @@ import { isHTTPError } from "@ebec/http";
32
32
  });
33
33
  if (isValidupError(input)) {
34
34
  const paths = input.issues.map((issue) => stringifyPath(issue.path));
35
- const error = new AuthupError({
35
+ return new AuthupError({
36
36
  code: ErrorCode.BAD_REQUEST,
37
37
  stack: input.stack,
38
- message: input.message || buildErrorMessageForAttributes(paths)
38
+ message: input.message || buildErrorMessageForAttributes(paths),
39
+ issues: input.issues
39
40
  });
40
- error.issues.push(...input.issues);
41
- return error;
42
41
  }
43
42
  if (input instanceof ParseError || input instanceof CodecError) return new AuthupError({
44
43
  code: ErrorCode.BAD_REQUEST,
@@ -1 +1 @@
1
- {"version":3,"file":"error.mjs","names":["AuthupError","ErrorCode","codeFromHttpStatus","isAuthupError","normalizeError","isHTTPError","isClientError","CodecError","ParseError","EntityRelationLookupError","buildErrorMessageForAttributes","isValidupError","stringifyPath","hasOwnProperty","isObject","sanitizeError","input","code","ENTITY_RELATION_INVALID","message","stack","paths","issues","map","issue","path","error","BAD_REQUEST","push","UPSTREAM_ERROR","status","undefined","ENTITY_CONFLICT","STORAGE_INSUFFICIENT","INTERNAL_ERROR","DESCRIBE_BODY_MAX_LENGTH","DESCRIBE_CAUSE_MAX_DEPTH","DESCRIBE_CAUSE_KEYS","describeBody","value","JSON","stringify","String","Object","prototype","toString","call","length","substring","describeCauseLink","name","parts","details","key","join","describeCauseChain","links","seen","Set","current","cause","has","add","describeError","headline","lines","response","body","data","causes"],"sources":["../../src/utils/error.ts"],"sourcesContent":["/*\n * Copyright (c) 2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport {\n AuthupError,\n ErrorCode,\n codeFromHttpStatus,\n isAuthupError,\n normalizeError,\n} from '@authup/errors';\nimport { isHTTPError } from '@ebec/http';\nimport { isClientError } from 'hapic';\nimport { CodecError, ParseError } from '@rapiq/core';\nimport { EntityRelationLookupError } from 'typeorm-extension';\nimport { buildErrorMessageForAttributes, isValidupError, stringifyPath } from 'validup';\nimport { hasOwnProperty, isObject } from '@authup/kit';\n\n/**\n * Normalize an unknown error to an AuthupError. Recognised shapes:\n *\n * 1. AuthupError instance → returned as-is\n * 2. EntityRelationLookupError → BAD_REQUEST AuthupError\n * 3. validup Issue error → BAD_REQUEST AuthupError carrying issues\n * 4. rapiq ParseError / CodecError → BAD_REQUEST AuthupError (client wire query)\n * 5. hapic ClientError → UPSTREAM_ERROR AuthupError (outbound call)\n * 6. foreign @ebec/http HTTPError → AuthupError with the closest semantic code\n * 7. driver error w/ a recognised code → ENTITY_CONFLICT or STORAGE_INSUFFICIENT\n * 8. anything else → INTERNAL_ERROR AuthupError\n *\n * The HTTP-status concern is handled separately by `httpStatusFromCode` in\n * the adapter — this function only assigns a semantic `code`.\n */\nexport function sanitizeError(input: unknown): AuthupError {\n if (isAuthupError(input)) {\n return input;\n }\n\n if (input instanceof EntityRelationLookupError) {\n return new AuthupError({\n code: ErrorCode.ENTITY_RELATION_INVALID,\n message: input.message,\n stack: input.stack,\n });\n }\n\n if (isValidupError(input)) {\n const paths = input.issues.map((issue) => stringifyPath(issue.path));\n const error = new AuthupError({\n code: ErrorCode.BAD_REQUEST,\n stack: input.stack,\n message: input.message || buildErrorMessageForAttributes(paths),\n });\n\n error.issues.push(...input.issues);\n return error;\n }\n\n if (input instanceof ParseError || input instanceof CodecError) {\n return new AuthupError({\n code: ErrorCode.BAD_REQUEST,\n message: input.message,\n stack: input.stack,\n });\n }\n\n /**\n * An outbound call failed. This branch MUST precede the `isHTTPError`\n * one below: a hapic `HttpResponseError` extends `BaseError` and carries\n * the upstream `status`, so the duck guard matches it and would mirror\n * that status onto our own response. An upstream 400 would then read as\n * \"your request was malformed\" when the caller's request was fine.\n *\n * The message is deliberately dropped rather than forwarded: hapic\n * embeds the outbound method and URL in it (`400 Bad Request (POST\n * https://idp.example.com/token)`), which must not reach the caller.\n * `describeError` is what carries the detail, into the log only.\n */\n if (isClientError(input)) {\n return new AuthupError({\n code: ErrorCode.UPSTREAM_ERROR,\n message: 'A request to an upstream service failed.',\n stack: input.stack,\n });\n }\n\n if (isHTTPError(input)) {\n return new AuthupError({\n code: codeFromHttpStatus(input.status),\n message: input.message,\n stack: input.stack,\n });\n }\n\n if (isObject(input)) {\n const code = hasOwnProperty(input, 'code') &&\n typeof input.code === 'string' ?\n input.code :\n undefined;\n\n /**\n * @see https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html\n */\n switch (code) {\n case '23505':\n case 'ER_DUP_ENTRY':\n case 'SQLITE_CONSTRAINT_UNIQUE': {\n return new AuthupError({\n code: ErrorCode.ENTITY_CONFLICT,\n message: 'An entry with some unique attributes already exists.',\n stack: input.stack as string | undefined,\n });\n }\n case 'ER_DISK_FULL':\n return new AuthupError({\n code: ErrorCode.STORAGE_INSUFFICIENT,\n message: 'No database operation possible, due to the lack of free disk space.',\n stack: input.stack as string | undefined,\n });\n }\n\n return new AuthupError({\n code: ErrorCode.INTERNAL_ERROR,\n message: input.message as string | undefined,\n stack: input.stack as string | undefined,\n });\n }\n\n return new AuthupError({ code: ErrorCode.INTERNAL_ERROR });\n}\n\nconst DESCRIBE_BODY_MAX_LENGTH = 1024;\nconst DESCRIBE_CAUSE_MAX_DEPTH = 5;\n\n// Fields node attaches to a syscall error. Without them a transport failure\n// reads as a bare \"connect ECONNREFUSED\" with no way back to the reason.\nconst DESCRIBE_CAUSE_KEYS = ['code', 'errno', 'syscall', 'address', 'port'] as const;\n\nfunction describeBody(input: unknown): string | undefined {\n let value: string;\n\n if (typeof input === 'string') {\n value = input;\n } else {\n try {\n value = JSON.stringify(input) ?? String(input);\n } catch {\n // A body that cannot be serialized (circular, a stream) is\n // still worth naming by shape.\n value = Object.prototype.toString.call(input);\n }\n }\n\n if (value.length === 0) {\n return undefined;\n }\n\n if (value.length > DESCRIBE_BODY_MAX_LENGTH) {\n return `${value.substring(0, DESCRIBE_BODY_MAX_LENGTH)}… (truncated)`;\n }\n\n return value;\n}\n\nfunction describeCauseLink(input: object): string {\n const error = input as Error;\n const name = typeof error.name === 'string' ? error.name : 'Error';\n const parts: string[] = [`${name}: ${error.message}`];\n\n const details: string[] = [];\n for (const key of DESCRIBE_CAUSE_KEYS) {\n const value = (input as Record<string, unknown>)[key];\n if (typeof value === 'string' || typeof value === 'number') {\n details.push(`${key}=${value}`);\n }\n }\n\n if (details.length > 0) {\n parts.push(`(${details.join(' ')})`);\n }\n\n return parts.join(' ');\n}\n\nfunction describeCauseChain(input: unknown): string | undefined {\n const links: string[] = [];\n const seen = new Set<unknown>();\n\n let current: unknown = isObject(input) ? (input as { cause?: unknown }).cause : undefined;\n\n while (isObject(current) && !seen.has(current) && links.length < DESCRIBE_CAUSE_MAX_DEPTH) {\n seen.add(current);\n links.push(describeCauseLink(current));\n current = (current as { cause?: unknown }).cause;\n }\n\n if (links.length === 0) {\n return undefined;\n }\n\n return links.join(' <- ');\n}\n\n/**\n * Render an error for the LOG. It is the counterpart of `@authup/errors`'\n * `serializeError`, which renders one for the response.\n *\n * The detail an outbound failure carries never survives `sanitizeError`\n * (by design: upstream internals must not reach the caller), and\n * `Error.cause` is non-enumerable, so a plain serialization drops it too.\n * Both were therefore already gone by the time anything was written,\n * which left a refused connection and an upstream `invalid_request`\n * indistinguishable in the log.\n *\n * Everything not present is omitted, so an ordinary error still renders\n * as its bare message.\n */\nexport function describeError(input: unknown, headline?: string): string {\n const error = normalizeError(input);\n\n const lines: string[] = [];\n if (headline) {\n lines.push(headline);\n }\n lines.push(error.message);\n\n // hapic attaches the decoded body to the response through a getter, so\n // it is non-enumerable and only reachable by an explicit read.\n if (isClientError(error) && error.response) {\n lines.push(` upstream status: ${error.response.status}`);\n\n const body = describeBody(error.response.data);\n if (body) {\n lines.push(` upstream body: ${body}`);\n }\n }\n\n const causes = describeCauseChain(error);\n if (causes) {\n lines.push(` cause: ${causes}`);\n }\n\n if (error.stack) {\n lines.push(` stack: ${error.stack}`);\n }\n\n return lines.join('\\n');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;GAoCA,SAAgBe,cAAcC,OAAc;CACxC,IAAIb,cAAca,KAAAA,GACd,OAAOA;CAGX,IAAIA,iBAAiBP,2BACjB,OAAO,IAAIT,YAAY;EACnBiB,MAAMhB,UAAUiB;EAChBC,SAASH,MAAMG;EACfC,OAAOJ,MAAMI;CACjB,CAAA;CAGJ,IAAIT,eAAeK,KAAAA,GAAQ;EACvB,MAAMK,QAAQL,MAAMM,OAAOC,KAAKC,UAAUZ,cAAcY,MAAMC,IAAI,CAAA;EAClE,MAAMC,QAAQ,IAAI1B,YAAY;GAC1BiB,MAAMhB,UAAU0B;GAChBP,OAAOJ,MAAMI;GACbD,SAASH,MAAMG,WAAWT,+BAA+BW,KAAAA;EAC7D,CAAA;EAEAK,MAAMJ,OAAOM,KAAI,GAAIZ,MAAMM,MAAM;EACjC,OAAOI;CACX;CAEA,IAAIV,iBAAiBR,cAAcQ,iBAAiBT,YAChD,OAAO,IAAIP,YAAY;EACnBiB,MAAMhB,UAAU0B;EAChBR,SAASH,MAAMG;EACfC,OAAOJ,MAAMI;CACjB,CAAA;;;;;;;;;;;;IAeJ,IAAId,cAAcU,KAAAA,GACd,OAAO,IAAIhB,YAAY;EACnBiB,MAAMhB,UAAU4B;EAChBV,SAAS;EACTC,OAAOJ,MAAMI;CACjB,CAAA;CAGJ,IAAIf,YAAYW,KAAAA,GACZ,OAAO,IAAIhB,YAAY;EACnBiB,MAAMf,mBAAmBc,MAAMc,MAAM;EACrCX,SAASH,MAAMG;EACfC,OAAOJ,MAAMI;CACjB,CAAA;CAGJ,IAAIN,SAASE,KAAAA,GAAQ;;;KASjB,QARaH,eAAeG,OAAO,MAAA,KACnC,OAAOA,MAA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KAAK,IAAA;AACtB"}
1
+ {"version":3,"file":"error.mjs","names":["AuthupError","ErrorCode","codeFromHttpStatus","isAuthupError","normalizeError","isHTTPError","isClientError","CodecError","ParseError","EntityRelationLookupError","buildErrorMessageForAttributes","isValidupError","stringifyPath","hasOwnProperty","isObject","sanitizeError","input","code","ENTITY_RELATION_INVALID","message","stack","paths","issues","map","issue","path","BAD_REQUEST","UPSTREAM_ERROR","status","undefined","ENTITY_CONFLICT","STORAGE_INSUFFICIENT","INTERNAL_ERROR","DESCRIBE_BODY_MAX_LENGTH","DESCRIBE_CAUSE_MAX_DEPTH","DESCRIBE_CAUSE_KEYS","describeBody","value","JSON","stringify","String","Object","prototype","toString","call","length","substring","describeCauseLink","error","name","parts","details","key","push","join","describeCauseChain","links","seen","Set","current","cause","has","add","describeError","headline","lines","response","body","data","causes"],"sources":["../../src/utils/error.ts"],"sourcesContent":["/*\n * Copyright (c) 2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport {\n AuthupError,\n ErrorCode,\n codeFromHttpStatus,\n isAuthupError,\n normalizeError,\n} from '@authup/errors';\nimport { isHTTPError } from '@ebec/http';\nimport { isClientError } from 'hapic';\nimport { CodecError, ParseError } from '@rapiq/core';\nimport { EntityRelationLookupError } from 'typeorm-extension';\nimport { buildErrorMessageForAttributes, isValidupError, stringifyPath } from 'validup';\nimport { hasOwnProperty, isObject } from '@authup/kit';\n\n/**\n * Normalize an unknown error to an AuthupError. Recognised shapes:\n *\n * 1. AuthupError instance → returned as-is\n * 2. EntityRelationLookupError → BAD_REQUEST AuthupError\n * 3. validup Issue error → BAD_REQUEST AuthupError carrying issues\n * 4. rapiq ParseError / CodecError → BAD_REQUEST AuthupError (client wire query)\n * 5. hapic ClientError → UPSTREAM_ERROR AuthupError (outbound call)\n * 6. foreign @ebec/http HTTPError → AuthupError with the closest semantic code\n * 7. driver error w/ a recognised code → ENTITY_CONFLICT or STORAGE_INSUFFICIENT\n * 8. anything else → INTERNAL_ERROR AuthupError\n *\n * The HTTP-status concern is handled separately by `httpStatusFromCode` in\n * the adapter — this function only assigns a semantic `code`.\n */\nexport function sanitizeError(input: unknown): AuthupError {\n if (isAuthupError(input)) {\n return input;\n }\n\n if (input instanceof EntityRelationLookupError) {\n return new AuthupError({\n code: ErrorCode.ENTITY_RELATION_INVALID,\n message: input.message,\n stack: input.stack,\n });\n }\n\n if (isValidupError(input)) {\n const paths = input.issues.map((issue) => stringifyPath(issue.path));\n return new AuthupError({\n code: ErrorCode.BAD_REQUEST,\n stack: input.stack,\n message: input.message || buildErrorMessageForAttributes(paths),\n issues: input.issues,\n });\n }\n\n if (input instanceof ParseError || input instanceof CodecError) {\n return new AuthupError({\n code: ErrorCode.BAD_REQUEST,\n message: input.message,\n stack: input.stack,\n });\n }\n\n /**\n * An outbound call failed. This branch MUST precede the `isHTTPError`\n * one below: a hapic `HttpResponseError` extends `BaseError` and carries\n * the upstream `status`, so the duck guard matches it and would mirror\n * that status onto our own response. An upstream 400 would then read as\n * \"your request was malformed\" when the caller's request was fine.\n *\n * The message is deliberately dropped rather than forwarded: hapic\n * embeds the outbound method and URL in it (`400 Bad Request (POST\n * https://idp.example.com/token)`), which must not reach the caller.\n * `describeError` is what carries the detail, into the log only.\n */\n if (isClientError(input)) {\n return new AuthupError({\n code: ErrorCode.UPSTREAM_ERROR,\n message: 'A request to an upstream service failed.',\n stack: input.stack,\n });\n }\n\n if (isHTTPError(input)) {\n return new AuthupError({\n code: codeFromHttpStatus(input.status),\n message: input.message,\n stack: input.stack,\n });\n }\n\n if (isObject(input)) {\n const code = hasOwnProperty(input, 'code') &&\n typeof input.code === 'string' ?\n input.code :\n undefined;\n\n /**\n * @see https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html\n */\n switch (code) {\n case '23505':\n case 'ER_DUP_ENTRY':\n case 'SQLITE_CONSTRAINT_UNIQUE': {\n return new AuthupError({\n code: ErrorCode.ENTITY_CONFLICT,\n message: 'An entry with some unique attributes already exists.',\n stack: input.stack as string | undefined,\n });\n }\n case 'ER_DISK_FULL':\n return new AuthupError({\n code: ErrorCode.STORAGE_INSUFFICIENT,\n message: 'No database operation possible, due to the lack of free disk space.',\n stack: input.stack as string | undefined,\n });\n }\n\n return new AuthupError({\n code: ErrorCode.INTERNAL_ERROR,\n message: input.message as string | undefined,\n stack: input.stack as string | undefined,\n });\n }\n\n return new AuthupError({ code: ErrorCode.INTERNAL_ERROR });\n}\n\nconst DESCRIBE_BODY_MAX_LENGTH = 1024;\nconst DESCRIBE_CAUSE_MAX_DEPTH = 5;\n\n// Fields node attaches to a syscall error. Without them a transport failure\n// reads as a bare \"connect ECONNREFUSED\" with no way back to the reason.\nconst DESCRIBE_CAUSE_KEYS = ['code', 'errno', 'syscall', 'address', 'port'] as const;\n\nfunction describeBody(input: unknown): string | undefined {\n let value: string;\n\n if (typeof input === 'string') {\n value = input;\n } else {\n try {\n value = JSON.stringify(input) ?? String(input);\n } catch {\n // A body that cannot be serialized (circular, a stream) is\n // still worth naming by shape.\n value = Object.prototype.toString.call(input);\n }\n }\n\n if (value.length === 0) {\n return undefined;\n }\n\n if (value.length > DESCRIBE_BODY_MAX_LENGTH) {\n return `${value.substring(0, DESCRIBE_BODY_MAX_LENGTH)}… (truncated)`;\n }\n\n return value;\n}\n\nfunction describeCauseLink(input: object): string {\n const error = input as Error;\n const name = typeof error.name === 'string' ? error.name : 'Error';\n const parts: string[] = [`${name}: ${error.message}`];\n\n const details: string[] = [];\n for (const key of DESCRIBE_CAUSE_KEYS) {\n const value = (input as Record<string, unknown>)[key];\n if (typeof value === 'string' || typeof value === 'number') {\n details.push(`${key}=${value}`);\n }\n }\n\n if (details.length > 0) {\n parts.push(`(${details.join(' ')})`);\n }\n\n return parts.join(' ');\n}\n\nfunction describeCauseChain(input: unknown): string | undefined {\n const links: string[] = [];\n const seen = new Set<unknown>();\n\n let current: unknown = isObject(input) ? (input as { cause?: unknown }).cause : undefined;\n\n while (isObject(current) && !seen.has(current) && links.length < DESCRIBE_CAUSE_MAX_DEPTH) {\n seen.add(current);\n links.push(describeCauseLink(current));\n current = (current as { cause?: unknown }).cause;\n }\n\n if (links.length === 0) {\n return undefined;\n }\n\n return links.join(' <- ');\n}\n\n/**\n * Render an error for the LOG. It is the counterpart of `@authup/errors`'\n * `serializeError`, which renders one for the response.\n *\n * The detail an outbound failure carries never survives `sanitizeError`\n * (by design: upstream internals must not reach the caller), and\n * `Error.cause` is non-enumerable, so a plain serialization drops it too.\n * Both were therefore already gone by the time anything was written,\n * which left a refused connection and an upstream `invalid_request`\n * indistinguishable in the log.\n *\n * Everything not present is omitted, so an ordinary error still renders\n * as its bare message.\n */\nexport function describeError(input: unknown, headline?: string): string {\n const error = normalizeError(input);\n\n const lines: string[] = [];\n if (headline) {\n lines.push(headline);\n }\n lines.push(error.message);\n\n // hapic attaches the decoded body to the response through a getter, so\n // it is non-enumerable and only reachable by an explicit read.\n if (isClientError(error) && error.response) {\n lines.push(` upstream status: ${error.response.status}`);\n\n const body = describeBody(error.response.data);\n if (body) {\n lines.push(` upstream body: ${body}`);\n }\n }\n\n const causes = describeCauseChain(error);\n if (causes) {\n lines.push(` cause: ${causes}`);\n }\n\n if (error.stack) {\n lines.push(` stack: ${error.stack}`);\n }\n\n return lines.join('\\n');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;GAoCA,SAAgBe,cAAcC,OAAc;CACxC,IAAIb,cAAca,KAAAA,GACd,OAAOA;CAGX,IAAIA,iBAAiBP,2BACjB,OAAO,IAAIT,YAAY;EACnBiB,MAAMhB,UAAUiB;EAChBC,SAASH,MAAMG;EACfC,OAAOJ,MAAMI;CACjB,CAAA;CAGJ,IAAIT,eAAeK,KAAAA,GAAQ;EACvB,MAAMK,QAAQL,MAAMM,OAAOC,KAAKC,UAAUZ,cAAcY,MAAMC,IAAI,CAAA;EAClE,OAAO,IAAIzB,YAAY;GACnBiB,MAAMhB,UAAUyB;GAChBN,OAAOJ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tB;;;;;;;;;;;;;;GAgBA,SAAgBS,cAAc/C,OAAgBgD,UAAiB;CAC3D,MAAMhB,QAAQ5C,eAAeY,KAAAA;CAE7B,MAAMiD,QAAkB,CAAA;CACxB,IAAID,UACAC,MAAMZ,KAAKW,QAAAA;CAEfC,MAAMZ,KAAKL,MAAM7B,OAAO;CAIxB,IAAIb,cAAc0C,KAAAA,KAAUA,MAAMkB,UAAU;EACxCD,MAAMZ,KAAK,sBAAsBL,MAAMkB,SAAStC,QAAQ;EAExD,MAAMuC,OAAO/B,aAAaY,MAAMkB,SAASE,IAAI;EAC7C,IAAID,MACAF,MAAMZ,KAAK,sBAAsBc,MAAM;CAE/C;CAEA,MAAME,SAASd,mBAAmBP,KAAAA;CAClC,IAAIqB,QACAJ,MAAMZ,KAAK,sBAAsBgB,QAAQ;CAG7C,IAAIrB,MAAM5B,OACN6C,MAAMZ,KAAK,sBAAsBL,MAAM5B,OAAO;CAGlD,OAAO6C,MAAMX,KAAK,IAAA;AACtB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@authup/server-core",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.61",
4
+ "version": "1.0.0-beta.62",
5
5
  "description": "This is a standalone application.",
6
6
  "license": "AGPL-3.0-only",
7
7
  "main": "dist/index.mjs",
@@ -67,24 +67,24 @@
67
67
  },
68
68
  "homepage": "https://github.com/authup/authup#readme",
69
69
  "dependencies": {
70
- "@authup/access": "^1.0.0-beta.61",
71
- "@authup/client-account-console": "^1.0.0-beta.61",
72
- "@authup/client-auth-console": "^1.0.0-beta.61",
73
- "@authup/core-http-kit": "^1.0.0-beta.61",
74
- "@authup/core-kit": "^1.0.0-beta.61",
75
- "@authup/errors": "^1.0.0-beta.61",
76
- "@authup/i18n": "^1.0.0-beta.61",
77
- "@authup/kit": "^1.0.0-beta.61",
78
- "@authup/server-kit": "^1.0.0-beta.61",
79
- "@authup/specs": "^1.0.0-beta.61",
70
+ "@authup/access": "^1.0.0-beta.62",
71
+ "@authup/client-account-console": "^1.0.0-beta.62",
72
+ "@authup/client-auth-console": "^1.0.0-beta.62",
73
+ "@authup/core-http-kit": "^1.0.0-beta.62",
74
+ "@authup/core-kit": "^1.0.0-beta.62",
75
+ "@authup/errors": "^1.0.0-beta.62",
76
+ "@authup/i18n": "^1.0.0-beta.62",
77
+ "@authup/kit": "^1.0.0-beta.62",
78
+ "@authup/server-kit": "^1.0.0-beta.62",
79
+ "@authup/specs": "^1.0.0-beta.62",
80
80
  "@ebec/http": "^4.2.0",
81
- "@hapic/oauth2": "^4.0.1",
81
+ "@hapic/oauth2": "^4.0.2",
82
82
  "@peculiar/x509": "^2.0.0",
83
- "@rapiq/adapter-memory": "^2.1.0",
84
- "@rapiq/adapter-sql": "^2.1.0",
85
- "@rapiq/adapter-typeorm": "^2.1.0",
86
- "@rapiq/codec-url": "^2.1.0",
87
- "@rapiq/core": "^2.1.0",
83
+ "@rapiq/adapter-memory": "^2.2.0",
84
+ "@rapiq/adapter-sql": "^2.2.0",
85
+ "@rapiq/adapter-typeorm": "^2.2.0",
86
+ "@rapiq/codec-url": "^2.2.0",
87
+ "@rapiq/core": "^2.2.0",
88
88
  "@routup/assets": "^5.0.0",
89
89
  "@routup/basic": "^3.0.0",
90
90
  "@routup/cors": "^2.0.0",
@@ -94,8 +94,8 @@
94
94
  "@routup/rate-limit": "^4.0.0",
95
95
  "@routup/swagger-ui": "^4.0.0",
96
96
  "@simplewebauthn/server": "^13.3.2",
97
- "@validup/zod": "^1.0.0",
98
- "better-sqlite3": "^13.0.2",
97
+ "@validup/zod": "^2.0.1",
98
+ "better-sqlite3": "^13.0.3",
99
99
  "change-case": "^5.4.4",
100
100
  "citty": "^0.2.2",
101
101
  "confinity": "^2.0.1",
@@ -103,16 +103,16 @@
103
103
  "dycraft": "^1.1.0",
104
104
  "eldin": "^1.3.0",
105
105
  "envix": "^1.5.0",
106
- "hapic": "^3.0.1",
106
+ "hapic": "^3.0.2",
107
107
  "ilingo": "^6.1.0",
108
108
  "ldapjs": "^3.0.7",
109
109
  "locter": "^4.0.0",
110
- "mysql2": "^3.23.2",
110
+ "mysql2": "^3.23.3",
111
111
  "node-cron": "^4.6.0",
112
- "nodemailer": "^9.0.4",
112
+ "nodemailer": "^9.0.5",
113
113
  "orkos": "^1.1.1",
114
114
  "otpauth": "^9.5.1",
115
- "pg": "^8.22.0",
115
+ "pg": "^8.23.0",
116
116
  "prom-client": "^15.1.3",
117
117
  "qrcode": "^1.5.4",
118
118
  "reflect-metadata": "^0.2.2",
@@ -120,15 +120,15 @@
120
120
  "smob": "^1.6.1",
121
121
  "tsyringe": "^4.10.0",
122
122
  "typeorm": "1.1.0",
123
- "typeorm-extension": "^4.0.0-beta.3",
123
+ "typeorm-extension": "^4.1.0",
124
124
  "uncrypto": "^0.1.3",
125
- "validup": "^1.0.0",
125
+ "validup": "^2.0.1",
126
126
  "zod": "^4.4.3"
127
127
  },
128
128
  "devDependencies": {
129
- "@authup/server-test-kit": "^1.0.0-beta.61",
129
+ "@authup/server-test-kit": "^1.0.0-beta.62",
130
130
  "@faker-js/faker": "^10.5.0",
131
- "@trapi/cli": "^2.0.4",
131
+ "@trapi/cli": "^2.0.5",
132
132
  "@types/ldapjs": "^3.0.6",
133
133
  "@types/nodemailer": "^8.0.0",
134
134
  "@types/qrcode": "^1.5.6",
@@ -139,7 +139,7 @@
139
139
  "testcontainers": "^12.1.0",
140
140
  "ts-node": "^10.8.2",
141
141
  "unplugin-swc": "^1.5.10",
142
- "vite": "^8.1.3",
142
+ "vite": "^8.2.1",
143
143
  "vitest": "^4.0.14"
144
144
  },
145
145
  "publishConfig": {