@h-ai/core 0.1.0-alpha.72 → 0.1.0-alpha.74

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/dist/browser.js CHANGED
@@ -1,5 +1,5 @@
1
- import { __commonJS, __toESM, createCore, i18n, err, HaiCommonError, requestContext, sanitize, emitLogRecord, sanitizeLogFields } from './chunk-DDLLZZYU.js';
2
- export { CoreConfigSchema, EnvSchema, HaiCommonError, HaiConfigError, LogFormatSchema, LogLevelSchema, LoggingConfigSchema, err, ok } from './chunk-DDLLZZYU.js';
1
+ import { __commonJS, __toESM, createCore, i18n, err, HaiCommonError, requestContext, sanitize, emitLogRecord, sanitizeLogFields } from './chunk-JFTGUOMK.js';
2
+ export { CoreConfigSchema, EnvSchema, HaiCommonError, HaiConfigError, LogFormatSchema, LogLevelSchema, LoggingConfigSchema, err, ok } from './chunk-JFTGUOMK.js';
3
3
 
4
4
  // ../../node_modules/loglevel/lib/loglevel.js
5
5
  var require_loglevel = __commonJS({
@@ -20000,14 +20000,14 @@ var typeUtils = {
20000
20000
  };
20001
20001
 
20002
20002
  // src/utils/core-util-sanitize.ts
20003
- var CREDENTIAL_TEXT = /\b(?:Bearer|Basic)\s+[\w.~+/-]+=*|\b(?:[\w-]*[_-])?(?:password|passwd|passcode|secret|token|session(?:[_-]?id)?|authorization|cookie|csrf|credential|api[_-]?key|private[_-]?key|(?:access|refresh|id|csrf)token|(?:otp|totp|verification|verify|captcha|sms|email|auth|one[_-]?time|two[_-]?factor)[_-]?code)(?:\\?["'])?\s*[:=]\s*(?:(?:Bearer|Basic)\s+)?(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\\"(?:[^\\]|\\\\\\\\|\\\\\\"|\\\\[^"\\])*\\"|[^\s,;&}\]]+)/gi;
20003
+ var CREDENTIAL_TEXT = /\b(?:Bearer|Basic)\s+[\w.~+/-]+=*|\b(?:[\w-]*[_-])?(?:password|passwd|passcode|secret|token|session(?:[_-]?id)?|authorization|cookie|csrf|credential|captcha|reauthentication|ticket|api[_-]?key|private[_-]?key|(?:access|refresh|id|csrf)token|(?:otp|totp|verification|verify|captcha|sms|email|auth|one[_-]?time|two[_-]?factor)[_-]?code)(?:\\?["'])?\s*[:=]\s*(?:(?:Bearer|Basic)\s+)?(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\\"(?:[^\\]|\\\\\\\\|\\\\\\"|\\\\[^"\\])*\\"|[^\s,;&}\]]+)/gi;
20004
20004
  function sanitizeText(text, secretValues = []) {
20005
20005
  let result = text;
20006
20006
  for (const value of [...new Set(secretValues)].filter(Boolean).sort((a, b) => b.length - a.length))
20007
20007
  result = result.replaceAll(value, "[REDACTED]");
20008
20008
  return result.replace(/\b[a-z][a-z\d+.-]*:\/\/[^\s<>"']+/gi, (url2) => sanitizeUrl(url2)).replace(CREDENTIAL_TEXT, (match) => match.includes("[REDACTED") ? match : "[REDACTED]");
20009
20009
  }
20010
- var DEFAULT_SENSITIVE_KEY_REGEX = /(?:^|_)(?:pass|passcode|password|secret|authorization|cookie|otp|session|token)$|(?:^|_)(?:otp|totp|verification|verify|captcha|sms|email|auth|one_time|two_factor)_code$|(?:^|_)private_key$|(?:^|_)access_key(?:_id|_secret)?$|(?:^|_)secret_access_key$|(?:^|_)api(?:_[a-z0-9]+)*_key$|^apikey$/i;
20010
+ var DEFAULT_SENSITIVE_KEY_REGEX = /(?:^|_)(?:pass|passcode|password|secret|authorization|cookie|otp|captcha|reauthentication|ticket|session|token)$|(?:^|_)(?:otp|totp|verification|verify|captcha|sms|email|auth|one_time|two_factor)_code$|(?:^|_)private_key$|(?:^|_)access_key(?:_id|_secret)?$|(?:^|_)secret_access_key$|(?:^|_)api(?:_[a-z0-9]+)*_key$|^apikey$/i;
20011
20011
  var DEFAULT_SENSITIVE_REPLACEMENT = "[REDACTED]";
20012
20012
  var URL_LIKE_KEY_REGEX = /(?:^|_)(?:url|uri|endpoint)(?:_|$)/;
20013
20013
  var SENSITIVE_KEY_CACHE_LIMIT = 512;
@@ -21297,5 +21297,5 @@ function createCore(loggerFns) {
21297
21297
  }
21298
21298
 
21299
21299
  export { CoreConfigSchema, EnvSchema, HaiCommonError, HaiConfigError, LogFormatSchema, LogLevelSchema, LoggingConfigSchema, __commonJS, __toESM, createCore, emitLogRecord, err, i18n, installRequestContext, installRequestLocales, ok, requestContext, sanitize, sanitizeLogFields, typeUtils };
21300
- //# sourceMappingURL=chunk-DDLLZZYU.js.map
21301
- //# sourceMappingURL=chunk-DDLLZZYU.js.map
21300
+ //# sourceMappingURL=chunk-JFTGUOMK.js.map
21301
+ //# sourceMappingURL=chunk-JFTGUOMK.js.map