@getexception/browser 0.1.28 → 0.1.29

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.
package/README.md CHANGED
@@ -74,11 +74,17 @@ This package targets modern browsers, is ESM and includes TypeScript declaration
74
74
  ## User ID, tags and manual capture
75
75
 
76
76
  After identifying the current user, call `GetException.setUser({ id: monitoringUserId })`.
77
- Use a technical string ID of up to 128 ASCII letters, digits, underscores or hyphens;
78
- never pass a name, email or credential. Call `setUser(null)` on logout and set the ID
77
+ Use a string ID, login or `login:sublogin` of up to 128 characters in total.
78
+ Each nonempty part accepts ASCII letters, digits, underscores or hyphens; at most
79
+ one colon separates the parts. Never pass a name, email or credential.
80
+ The value is stored unchanged, without hashing, and is visible to members with
81
+ project access. A login is not anonymous. Call `setUser(null)` on logout and set the ID
79
82
  again when restoring a session. Only `id` is accepted; invalid IDs clear the previous
80
83
  value. Closing the SDK clears its scope. The server stores the ID with the event.
81
84
 
85
+ Composite IDs require the updated SDK and server. This support is not yet published;
86
+ SDK `0.1.28` discards an ID containing a colon while still sending the error.
87
+
82
88
  The Owner allows tag names in Project settings. The application supplies values
83
89
  after SDK initialization:
84
90
 
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ var __export = (target, all) => {
8
8
  import * as Sentry from "@getexception/sentry-browser";
9
9
 
10
10
  // packages/browser/package.json
11
- var version = "0.1.28";
11
+ var version = "0.1.29";
12
12
 
13
13
  // packages/browser/src/browser-context.ts
14
14
  function browserContext(userAgent) {
@@ -19873,7 +19873,8 @@ var tagNameSchema = external_exports.string().regex(/^[a-zA-Z][a-zA-Z0-9_]{0,31}
19873
19873
  (value) => !["constructor", "prototype", "__proto__"].includes(value)
19874
19874
  );
19875
19875
  var allowedTagsSchema = external_exports.array(tagNameSchema).max(EVENT_METADATA_LIMITS.tags).transform((values) => [...new Set(values)]);
19876
- var endUserIdSchema = external_exports.string().regex(/^[a-zA-Z0-9_-]{1,128}$/);
19876
+ var END_USER_ID_PATTERN = /^[a-zA-Z0-9_-]+(?::[a-zA-Z0-9_-]+)?(?![\s\S])/;
19877
+ var endUserIdSchema = external_exports.string().max(EVENT_METADATA_LIMITS.userId).regex(END_USER_ID_PATTERN);
19877
19878
  function sanitizeEndUserId(value) {
19878
19879
  return endUserIdSchema.safeParse(value).data;
19879
19880
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getexception/browser",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "Browser error monitoring for self-hosted GetException installations",
5
5
  "type": "module",
6
6
  "license": "MIT",