@nsshunt/stsutils 1.19.97 → 1.19.98

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/index.cjs CHANGED
@@ -396,117 +396,10 @@ var edbaction = /* @__PURE__ */ function(edbaction) {
396
396
  return edbaction;
397
397
  }({});
398
398
  //#endregion
399
- //#region src/errorhandling.ts
400
- function GetErrorPayload(errorCode, details = null) {
401
- return {
402
- error: errorCode.code,
403
- error_description: errorCode.description,
404
- timestamp: Date.now(),
405
- details
406
- };
407
- }
408
- //#endregion
409
399
  //#region src/sleep.ts
410
400
  async function Sleep(milliseconds = 1e3) {
411
401
  return new Promise((resolve) => setTimeout(resolve, milliseconds));
412
402
  }
413
- async function JestSleep() {
414
- return Sleep(100);
415
- }
416
- //#endregion
417
- //#region src/oauth2terms.ts
418
- var OAuth2ParameterType = /* @__PURE__ */ function(OAuth2ParameterType) {
419
- OAuth2ParameterType["AUDIENCE"] = "AUDIENCE";
420
- OAuth2ParameterType["CLIENT_ID"] = "client_id";
421
- OAuth2ParameterType["CLIENT_SECRET"] = "client_secret";
422
- OAuth2ParameterType["RESPONSE_TYPE"] = "response_type";
423
- OAuth2ParameterType["SCOPE"] = "scope";
424
- OAuth2ParameterType["STATE"] = "state";
425
- OAuth2ParameterType["REDIRECT_URI"] = "redirect_uri";
426
- OAuth2ParameterType["ERROR"] = "error";
427
- OAuth2ParameterType["ERROR_DESCRIPTION"] = "error_description";
428
- OAuth2ParameterType["ERROR_CODES"] = "error_codes";
429
- OAuth2ParameterType["ERROR_URI"] = "error_uri";
430
- OAuth2ParameterType["GRANT_TYPE"] = "grant_type";
431
- OAuth2ParameterType["CODE"] = "code";
432
- OAuth2ParameterType["ACCESS_TOKEN"] = "access_token";
433
- OAuth2ParameterType["TOKEN_TYPE"] = "token_type";
434
- OAuth2ParameterType["EXPIRES_IN"] = "expires_in";
435
- OAuth2ParameterType["USERNAME"] = "username";
436
- OAuth2ParameterType["PASSWORD"] = "password";
437
- OAuth2ParameterType["REFRESH_TOKEN"] = "refresh_token";
438
- OAuth2ParameterType["RESPONSE_MODE"] = "response_mode";
439
- OAuth2ParameterType["TIMESTAMP"] = "timestamp";
440
- OAuth2ParameterType["TRACE_ID"] = "trace_id";
441
- OAuth2ParameterType["CORRELATION_ID"] = "correlation_id";
442
- return OAuth2ParameterType;
443
- }({});
444
- var OIDCStandardClaim = /* @__PURE__ */ function(OIDCStandardClaim) {
445
- OIDCStandardClaim["SUB"] = "sub";
446
- OIDCStandardClaim["NAME"] = "name";
447
- OIDCStandardClaim["GIVEN_NAME"] = "given_name";
448
- OIDCStandardClaim["FAMILY_NAME"] = "family_name";
449
- OIDCStandardClaim["MIDDLE_NAME"] = "middle_name";
450
- OIDCStandardClaim["NICKNAME"] = "nickname";
451
- OIDCStandardClaim["PREFERRED_USERNAME"] = "preferred_username";
452
- OIDCStandardClaim["PROFILE"] = "profile";
453
- OIDCStandardClaim["PICTURE"] = "picture";
454
- OIDCStandardClaim["WEBSITE"] = "website";
455
- OIDCStandardClaim["EMAIL"] = "email";
456
- OIDCStandardClaim["EMAIL_VERIFIED"] = "email_verified";
457
- OIDCStandardClaim["GENDER"] = "gender";
458
- OIDCStandardClaim["BIRTHDATE"] = "birthdate";
459
- OIDCStandardClaim["ZONEINFO"] = "zoneinfo";
460
- OIDCStandardClaim["LOCALE"] = "locale";
461
- OIDCStandardClaim["PHONE_NUMBER"] = "phone_number";
462
- OIDCStandardClaim["PHONE_NUMBER_VERIFIED"] = "phone_number_verified";
463
- OIDCStandardClaim["ADDRESS"] = "address";
464
- OIDCStandardClaim["CLIENT_SECRET"] = "client_secret";
465
- OIDCStandardClaim["NONCE"] = "nonce";
466
- return OIDCStandardClaim;
467
- }({});
468
- var OIDCAddressClaim = /* @__PURE__ */ function(OIDCAddressClaim) {
469
- OIDCAddressClaim["FORMATTED"] = "formatted";
470
- OIDCAddressClaim["STREET_ADDRESS"] = "street_address";
471
- OIDCAddressClaim["LOCALITY"] = "locality";
472
- OIDCAddressClaim["REGION"] = "region";
473
- OIDCAddressClaim["COUNTRY"] = "country";
474
- return OIDCAddressClaim;
475
- }({});
476
- var OAuth2ParameterErrorType = class {
477
- static NOT_EQUAL = {
478
- code: "STS_OAUTH2_ERR_0001",
479
- description: "Parameter values not equal."
480
- };
481
- static NOT_PRESENT = {
482
- code: "STS_OAUTH2_ERR_0002",
483
- description: "Parameter not provided."
484
- };
485
- static INVALID_FORMAT = {
486
- code: "STS_OAUTH2_ERR_0003",
487
- description: "Parameter value format invalid."
488
- };
489
- static EXPIRED = {
490
- code: "STS_OAUTH2_ERR_0004",
491
- description: "Parameter value expired."
492
- };
493
- };
494
- function compareParameterTypes(source1, source2, authParameterTypes) {
495
- const errors = [];
496
- for (let i = 0; i < authParameterTypes.length; i++) {
497
- const authParameterType = authParameterTypes[i];
498
- if (source1[i].localeCompare(source2[i]) !== 0) {
499
- const error = {
500
- error: OAuth2ParameterErrorType.NOT_EQUAL.code,
501
- error_description: OAuth2ParameterErrorType.NOT_EQUAL.description,
502
- timestamp: Date.now(),
503
- details: `${OAuth2ParameterErrorType.NOT_EQUAL.description}: Parameter: [${authParameterType}]`
504
- };
505
- errors.push(error);
506
- }
507
- }
508
- return errors;
509
- }
510
403
  //#endregion
511
404
  //#region src/stsAxiosConfig.ts
512
405
  var STSAxiosConfig = class {
@@ -753,16 +646,9 @@ var AgentManager = class {
753
646
  var isNode = typeof process !== "undefined" && typeof process.release !== "undefined" && process.release.name === "node";
754
647
  //#endregion
755
648
  exports.CheckValidChar = CheckValidChar;
756
- exports.GetErrorPayload = GetErrorPayload;
757
- exports.JestSleep = JestSleep;
758
649
  exports.ModelDelimeter = ModelDelimeter;
759
- exports.OAuth2ParameterErrorType = OAuth2ParameterErrorType;
760
- exports.OAuth2ParameterType = OAuth2ParameterType;
761
- exports.OIDCAddressClaim = OIDCAddressClaim;
762
- exports.OIDCStandardClaim = OIDCStandardClaim;
763
650
  exports.STSAxiosConfig = STSAxiosConfig;
764
651
  exports.Sleep = Sleep;
765
- exports.compareParameterTypes = compareParameterTypes;
766
652
  exports.createAgentManager = createAgentManager;
767
653
  exports.defaultLogger = defaultLogger;
768
654
  exports.edbaction = edbaction;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["styles","#url","#method","#headers","#timeout","#data","#withCredentials","#agentManager","#options","#SetupResetInterval","#agentResetInterval","#requestCount","#httpsAgent","#GetAgentOptions","#httpAgent"],"sources":["../node_modules/chalk/source/vendor/ansi-styles/index.js","../node_modules/chalk/source/vendor/supports-color/browser.js","../node_modules/chalk/source/utilities.js","../node_modules/chalk/source/index.js","../src/commonTypes.ts","../src/dataAccessTypes.ts","../src/errorhandling.ts","../src/sleep.ts","../src/oauth2terms.ts","../src/stsAxiosConfig.ts","../src/agentManager.ts","../src/index.ts"],"sourcesContent":["const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","/* eslint-env browser */\n\nconst level = (() => {\n\tif (!('navigator' in globalThis)) {\n\t\treturn 0;\n\t}\n\n\tif (globalThis.navigator.userAgentData) {\n\t\tconst brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');\n\t\tif (brand && brand.version > 93) {\n\t\t\treturn 3;\n\t\t}\n\t}\n\n\tif (/\\b(Chrome|Chromium)\\//.test(globalThis.navigator.userAgent)) {\n\t\treturn 1;\n\t}\n\n\treturn 0;\n})();\n\nconst colorSupport = level !== 0 && {\n\tlevel,\n\thasBasic: true,\n\thas256: level >= 2,\n\thas16m: level >= 3,\n};\n\nconst supportsColor = {\n\tstdout: colorSupport,\n\tstderr: colorSupport,\n};\n\nexport default supportsColor;\n","// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n","import ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\nimport { // eslint-disable-line import/order\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn ansiStyles[type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));\n\t}\n\n\treturn ansiStyles[type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n","/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\n/* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF\nimport chalk from 'chalk'\n\nexport interface JSONObject {\n [x: string]: any | JSONObject | undefined\n}\n\nexport enum ModelDelimeter {\n\tROOT = '_',\n\tSEPERATOR = '|',\n\tCOMPONENT_SEPERATOR = '@',\n\tNID_SEPERATOR = '^' // This seperator splits the static and dynamic part of a context string (nid). Used for creating payload header for size optimisation.\n}\n\nexport const CheckValidChar = (checkParams: string[][]): void => {\n const invalidChars = [ \n ModelDelimeter.ROOT, \n ModelDelimeter.SEPERATOR, \n ModelDelimeter.COMPONENT_SEPERATOR, \n ModelDelimeter.NID_SEPERATOR\n ];\n\n checkParams.forEach(param => {\n invalidChars.forEach(char => {\n if (param[1].includes(char)) {\n throw new Error(`Invalid character inside [${param[0]}:${param[1]}], no [${char}] allowed`);\n }\n });\n });\n}\n\n// npm logging levels are prioritized from 0 to 6 (highest to lowest). This from Winston logger.\nexport interface ISTSLogger {\n error(message: any): void;\n warn(message: any): void;\n info(message: any): void;\n http(message: any): void;\n verbose(message: any): void;\n debug(message: any): void;\n silly(message: any): void;\n}\n\nexport const defaultLogger: ISTSLogger = {\n debug(message) {\n console.log(chalk.grey(`debug: ${message}`));\n },\n error(message) {\n console.log(chalk.red(`error: ${message}`));\n },\n http(message) {\n console.log(chalk.cyan(`http: ${message}`));\n },\n info(message) {\n console.log(chalk.white(`info: ${message}`));\n },\n silly(message) {\n console.log(chalk.yellow(`silly: ${message}`));\n },\n verbose(message) {\n console.log(chalk.green(`verbose: ${message}`));\n },\n warn(message) {\n console.log(chalk.magenta(`warn: ${message}`));\n }\n}\n\nexport const emptyLogger: ISTSLogger = {\n debug(message) { },\n error(message) { },\n http(message) { },\n info(message) { },\n silly(message) { },\n verbose(message) { },\n warn(message) { }\n}\n\nexport interface IGenericMessageProcessorPayload {\n header: string\n messageId: string\n senderId: string\n senderRole: string\n requestPayload: JSONObject\n responsePayload: JSONObject\n pid: string\n messageType: 'REQUEST' | 'RESPONSE'\n}\n\nexport interface IGenericMessageProcessorWorkerRecord {\n messageId: string\n senderId: string\n requestPayload: IGenericMessageProcessorPayload\n responses: Record<string, IGenericMessageProcessorPayload> // The key here will be the pid\n startTime: number\n endTime: number\n timeout: NodeJS.Timeout | null\n callBack: (payload: IGenericMessageProcessorPayload, options: any) => void\n errorCallBack: (payload: IGenericMessageProcessorPayload, option: any) => void\n}\n\nexport interface GenericMessageManagerOptions {\n logger: ISTSLogger\n requestResponseMessageTimeout: number\n namespace: string\n role: 'SERVER' | 'CLIENT'\n groups: string[]\n messageSender: (payload: IGenericMessageProcessorPayload, options: any) => void\n ProcessRequestMessage: (payload: IGenericMessageProcessorPayload, options: any) => Promise<JSONObject>\n ProcessResponseMessage?: (reesponses: Record<string, IGenericMessageProcessorPayload>, options: any) => Promise<boolean>\n messageReceiverStart: (options: any) => void\n messageReceiverStop: (options: any) => void\n}\n\nexport interface IWebWorderMessageHandlerOptions {\n logger: ISTSLogger\n role: 'SERVER' | 'CLIENT'\n namespace: string\n groups: string[]\n ignoreEvents?: string[]\n messagePort: any // MessagePort;\n context?: JSONObject\n}\n","import { StatusCodes } from 'http-status-codes'\n\nimport { JSONObject } from './commonTypes.js'\n\nexport enum edbaction {\n created = 1,\n updated = 2,\n deleted = 3\n}\n\nexport interface IDBResource<T> {\n oid: string\n resname: string\n resdesc: T\n vnum: string\n validfrom: string\n validto: string | null\n dbaction: edbaction\n dbactionuser: string\n}\n\nexport interface IDBEntity<T> {\n oid: string\n resourceoid: string,\n entname: string\n entvalue: T\n vnum: string\n validfrom: string\n validto: string | null\n dbaction: edbaction\n dbactionuser: string\n}\n\nexport interface IDBFilters {\n resname?: string\n entname?: string\n resvnum?: string\n entvnum?: string\n filter?: string\n incdel?: string\n startdate?: string\n enddate?: string\n resenddate?: string\n dbaction?: string\n dbactionuser?: string\n limit?: string\n}\n\nexport interface IAccessLayerErrorDetail {\n status: StatusCodes\n error: Error\n errorMessage: string\n operation: string\n}\n\nexport interface IDBOptions {\n filters?: IDBFilters\n useCache?: boolean\n useMultipleDatabases?: boolean\n limit?: number\n errorOnBatchUpdate?: boolean\n}\n\nexport interface IDBReturnData<T> {\n status: StatusCodes\n operation: string,\n detail: IDBReturnData<T>[] | IDBResource<T>[] | IDBResource<T> | IDBEntity<T>[] | IDBEntity<T> | T | null\n options: IDBOptions\n error?: IAccessLayerErrorDetail\n}\n\nexport interface IDBSearchOptions {\n queryFunctionName: string\n searchParameters: JSONObject\n returnsResourceList: boolean\n}\n","export type errorCode = {\n\tcode: string\n\tdescription: string\n}\n\nexport type errorPayload = {\n\terror: string,\n\terror_description: string,\n\ttimestamp: number,\n\t//trace_id: \"255d1aef-8c98-452f-ac51-23d051240864\", //@@\n\t//correlation_id: \"fb3d2015-bc17-4bb9-bb85-30c5cf1aaaa7\", //@@\n\tdetails?: unknown\n}\n\nexport function GetErrorPayload(errorCode: errorCode, details: unknown = null): errorPayload {\n return {\n error: errorCode.code,\n error_description: errorCode.description,\n timestamp: Date.now(),\n //trace_id: \"255d1aef-8c98-452f-ac51-23d051240864\", //@@\n //correlation_id: \"fb3d2015-bc17-4bb9-bb85-30c5cf1aaaa7\", //@@\n details: details\n }\n}\n","export async function Sleep(milliseconds = 1000): Promise<void> { \n return new Promise(resolve => setTimeout(resolve, milliseconds))\n}\n \n// poolsleep is required to avoid JEST reporting unclosed handles during shutdown of all tests\nexport async function JestSleep(): Promise<void> {\n return Sleep(100);\n}\n","import { errorCode, errorPayload } from './errorhandling.js'\n\n// Ref: https://datatracker.ietf.org/doc/html/rfc6749#appendix-A\nexport enum OAuth2ParameterType {\n\tAUDIENCE = 'AUDIENCE', // STS Extension\n\tCLIENT_ID = 'client_id',\n\tCLIENT_SECRET = 'client_secret',\n\tRESPONSE_TYPE = 'response_type',\n\tSCOPE = 'scope',\n\tSTATE = 'state',\n\tREDIRECT_URI = 'redirect_uri',\n\tERROR = 'error',\n\tERROR_DESCRIPTION = 'error_description',\n\tERROR_CODES = 'error_codes', // STS Extension\n\tERROR_URI = 'error_uri',\n\tGRANT_TYPE = 'grant_type',\n\tCODE = 'code',\n\tACCESS_TOKEN = 'access_token',\n\tTOKEN_TYPE = 'token_type',\n\tEXPIRES_IN = 'expires_in',\n\tUSERNAME = 'username',\n\tPASSWORD = 'password',\n\tREFRESH_TOKEN = 'refresh_token',\n\tRESPONSE_MODE = 'response_mode', // STS Extension\n\tTIMESTAMP = 'timestamp', // STS Extension\n\tTRACE_ID = 'trace_id', // STS Extension\n\tCORRELATION_ID = 'correlation_id' // STS Extension\n}\n\n// Auth0 claim usage;\n// aud - api identifier\n// scope - list (space separated) of api permissions\n\n// Claims (Auth0)\n// https://auth0.com/docs/secure/tokens/json-web-tokens/json-web-token-claims\n\n// Reserved claims (IANA)\n// https://www.iana.org/assignments/jwt/jwt.xhtml#claims\n\n// Example scopes and claims (Auth0)\n// https://auth0.com/docs/get-started/apis/scopes/sample-use-cases-scopes-and-claims\n\n// OIDC Claims and Scopes\n// https://openid.net/specs/openid-connect-core-1_0.html#Claims\n// https://developer.okta.com/blog/2017/07/25/oidc-primer-part-1#:~:text=Simply%20put%2C%20claims%20are%20name,information%20asserted%20about%20an%20Entity.%E2%80%9D\n\n// OIDC Standard Claims\n// https://openid.net/specs/openid-connect-core-1_0.html#Claims\n// https://developer.okta.com/blog/2017/07/25/oidc-primer-part-1#:~:text=Simply%20put%2C%20claims%20are%20name,information%20asserted%20about%20an%20Entity.%E2%80%9D\nexport enum OIDCStandardClaim {\n\tSUB = 'sub',\n\tNAME = 'name',\n\tGIVEN_NAME = 'given_name',\n\tFAMILY_NAME = 'family_name',\n\tMIDDLE_NAME = 'middle_name',\n\tNICKNAME = 'nickname',\n\tPREFERRED_USERNAME = 'preferred_username',\n\tPROFILE = 'profile',\n\tPICTURE = 'picture',\n\tWEBSITE = 'website',\n\tEMAIL = 'email',\n\tEMAIL_VERIFIED = 'email_verified',\n\tGENDER = 'gender',\n\tBIRTHDATE = 'birthdate',\n\tZONEINFO = 'zoneinfo',\n\tLOCALE = 'locale',\n\tPHONE_NUMBER = 'phone_number',\n\tPHONE_NUMBER_VERIFIED = 'phone_number_verified',\n\tADDRESS = 'address',\n\tCLIENT_SECRET = 'client_secret',\n\tNONCE = 'nonce' // STS Extension\n}\n\nexport enum OIDCAddressClaim {\n\tFORMATTED = 'formatted',\n\tSTREET_ADDRESS = 'street_address',\n\tLOCALITY = 'locality',\n\tREGION = 'region',\n\tCOUNTRY = 'country'\n}\n\nexport class OAuth2ParameterErrorType {\n static readonly NOT_EQUAL: errorCode = {\n code: 'STS_OAUTH2_ERR_0001',\n description: 'Parameter values not equal.'\n }\n static readonly NOT_PRESENT: errorCode = {\n code: 'STS_OAUTH2_ERR_0002',\n description: 'Parameter not provided.'\n }\n static readonly INVALID_FORMAT: errorCode = {\n code: 'STS_OAUTH2_ERR_0003',\n description: 'Parameter value format invalid.'\n }\n static readonly EXPIRED: errorCode = {\n code: 'STS_OAUTH2_ERR_0004',\n description: 'Parameter value expired.'\n }\n}\n\nexport function compareParameterTypes(source1: string[], source2: string[], authParameterTypes: OAuth2ParameterType[]): errorPayload[] {\n const errors: errorPayload[] = [ ];\n for (let i=0 ; i < authParameterTypes.length; i++) {\n const authParameterType = authParameterTypes[i];\n if (source1[i].localeCompare(source2[i]) !== 0) {\n const error: errorPayload = {\n error: OAuth2ParameterErrorType.NOT_EQUAL.code,\n error_description: OAuth2ParameterErrorType.NOT_EQUAL.description,\n timestamp: Date.now(),\n details: `${OAuth2ParameterErrorType.NOT_EQUAL.description}: Parameter: [${authParameterType}]`\n }\n errors.push(error);\n }\n }\n return errors;\n}\n","import { JSONObject } from './commonTypes.js'\nimport { IAgentManager } from './agentManager.js'\n\nexport class STSAxiosConfig {\n #url: string;\n #method: string;\n #headers?: JSONObject;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n #data?: any;\n #agentManager?: IAgentManager;\n #timeout?: number;\n #withCredentials?: boolean;\n\n constructor(url: string, method: string, headers?: JSONObject, timeout?: number) {\n this.#url = url\n this.#method = method\n if (headers !== undefined) {\n this.#headers = headers;\n }\n if (timeout !== undefined) {\n this.#timeout = timeout;\n }\n }\n\n /**\n * \n * @param cookies this.#headers['Cookie'] = cookies.join('; ')\n * @returns \n */\n withCookies(cookies: string[]) {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Cookie'] = cookies.join('; ')\n return this;\n }\n\n /**\n * \n * @param data Add data to the body\n * @returns \n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n withData(data: any) {\n this.#data = data;\n return this;\n }\n\n // 'Content-Type': 'application/json'\n\n /**\n * \n * @param accesssToken \n * @param stsUserId \n * @returns this.#headers['Authorization'] = 'Bearer ' + accesssToken; and this.#headers['x-sts_user_id'] = stsUserId;\n */\n withAuthHeaders(accesssToken: string, stsUserId?: string) {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Authorization'] = 'Bearer ' + accesssToken;\n if (stsUserId) {\n this.#headers['x-sts_user_id'] = stsUserId;\n }\n return this;\n }\n\n /**\n * \n * @param headers Add headers to the existing header\n * @returns \n */\n withHeaders(headers: JSONObject) {\n this.#headers = {\n ...(this.#headers ?? {}),\n ...headers\n };\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/fhir+json';\n */\n withApplicationFhirAndJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/fhir+json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/merge-patch+json';\n */\n withApplicationMergePatchAndJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/merge-patch+json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/json-patch+json';\n */\n withApplicationJsonPatchAndJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/json-patch+json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/json';\n */\n withApplicationJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/json';\n */\n withDefaultHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/json';\n return this;\n }\n\n /**\n * \n * @returns \n */\n withCredentials() {\n this.#withCredentials = true;\n return this;\n }\n\n /**\n * \n * @param timeout Add a connection timeout\n * @returns \n */\n withTimeout(timeout: number) {\n this.#timeout = timeout;\n return this;\n }\n\n /**\n * \n * @param agentManager Add the agent manager for each rest call. Only for nodejs not browser.\n * @returns \n */\n withAgentManager(agentManager: IAgentManager) {\n this.#agentManager = agentManager;\n return this;\n }\n\n /**\n * @returns Returns axios config object\n */\n get config(): JSONObject {\n const retVal: JSONObject = {\n url: this.#url,\n method: this.#method\n }\n if (this.#headers) {\n retVal.headers = this.#headers;\n }\n if (this.#agentManager !== undefined) {\n if (this.#agentManager.IsHttps(this.#url)) {\n retVal.httpsAgent = this.#agentManager.GetAgent(this.#url)\n } else {\n retVal.httpAgent = this.#agentManager.GetAgent(this.#url)\n }\n }\n if (this.#data !== undefined) {\n retVal.data = this.#data;\n }\n if (this.#timeout !== undefined) {\n retVal.timeout = this.#timeout;\n }\n if (this.#withCredentials !== undefined && this.#withCredentials === true) {\n retVal.withCredentials = true;\n }\n return retVal;\n }\n}\n","export interface IAgentOptions {\n keepAlive: boolean\n maxSockets: number\n maxTotalSockets: number\n maxFreeSockets: number\n timeout: number\n rejectUnauthorized?: boolean\n}\n\nexport interface IAgentManagerOptions {\n httpAgentFactory: (options: IAgentOptions) => unknown\n httpsAgentFactory: (options: IAgentOptions) => unknown\n agentOptions?: IAgentOptions\n agentResetInterval?: number\n agentResetCount?: number\n}\n\nexport interface IAgentManager {\n get agentResetInterval(): number | undefined\n get agentResetCount(): number | undefined\n UpdateAgentResetInterval(val: number): void\n UpdateAgentResetCount(val: number): void\n IncRequestCount(): void\n IsHttps(protocol: string): boolean\n GetAgent(protocol: string): unknown\n ResetAgent(): void\n Terminate(): void\n}\n\nexport function createAgentManager(agentManagerOptions: IAgentManagerOptions): IAgentManager {\n return new AgentManager(agentManagerOptions);\n}\n\nclass AgentManager implements IAgentManager {\n #options: IAgentManagerOptions;\n #agentResetInterval: NodeJS.Timeout | null = null;\n #requestCount: number = 0;\n #httpAgent: unknown = undefined;\n #httpsAgent: unknown = undefined;\n\n constructor(agentManagerOptions: IAgentManagerOptions) {\n this.#options = agentManagerOptions;\n if (this.#options.agentResetInterval) {\n this.#SetupResetInterval();\n }\n }\n\n get agentResetInterval(): number | undefined {\n return this.#options.agentResetInterval;\n }\n\n UpdateAgentResetInterval(val: number): void {\n if (this.#agentResetInterval) {\n clearTimeout(this.#agentResetInterval);\n }\n this.#options.agentResetInterval = val;\n this.#SetupResetInterval();\n }\n\n get agentResetCount(): number | undefined {\n return this.#options.agentResetCount;\n }\n\n UpdateAgentResetCount(val: number): void {\n this.#options.agentResetCount = val;\n }\n\n #SetupResetInterval = () => {\n if (this.#options.agentResetInterval && this.#options.agentResetInterval > 0) {\n this.#agentResetInterval = setTimeout(() => {\n this.ResetAgent();\n this.#SetupResetInterval();\n }, this.#options.agentResetInterval).unref();\n }\n }\n\n IncRequestCount(): void {\n this.#requestCount++;\n if (this.#options.agentResetCount) {\n if ((this.#requestCount % this.#options.agentResetCount) === 0) {\n this.ResetAgent();\n }\n }\n }\n\n IsHttps(protocol: string): boolean {\n if (protocol.toLowerCase().startsWith('https:')) {\n return true;\n }\n return false;\n }\n\n #GetAgentOptions = (https: boolean): IAgentOptions => {\n let options: IAgentOptions;\n if (this.#options.agentOptions) {\n options = {\n keepAlive: this.#options.agentOptions.keepAlive,\n maxSockets: this.#options.agentOptions.maxSockets,\n maxTotalSockets: this.#options.agentOptions.maxTotalSockets,\n maxFreeSockets: this.#options.agentOptions.maxFreeSockets,\n timeout: this.#options.agentOptions.timeout\n }\n if (https === true) {\n options.rejectUnauthorized = this.#options.agentOptions.rejectUnauthorized // Allows self signed certs in non production mode(s)\n }\n } else {\n // Defaults\n options = {\n keepAlive: true,\n maxSockets: 10,\n maxTotalSockets: 20,\n maxFreeSockets: 256,\n timeout: 30000,\n rejectUnauthorized: false\n };\n }\n return options;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n GetAgent(protocol: string): any {\n if (protocol.toLowerCase().startsWith('https:')) {\n if (!this.#httpsAgent) {\n //this.#httpsAgent = new https.Agent(this.#GetAgentOptions(true));\n this.#httpsAgent = this.#options.httpsAgentFactory(this.#GetAgentOptions(true));\n }\n return this.#httpsAgent;\n } else if (protocol.toLowerCase().startsWith('http:')) {\n if (!this.#httpAgent) {\n //this.#httpAgent = new http.Agent(this.#GetAgentOptions(false));\n this.#httpAgent = this.#options.httpAgentFactory(this.#GetAgentOptions(false));\n }\n return this.#httpAgent;\n } else {\n return null;\n }\n }\n\n ResetAgent(): void {\n this.#httpAgent = null;\n this.#httpsAgent = null;\n }\n\n Terminate(): void {\n if (this.#agentResetInterval) {\n clearTimeout(this.#agentResetInterval);\n this.#agentResetInterval = null;\n }\n\n if (this.#httpAgent) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.#httpAgent as any).destroy();\n this.#httpAgent = null;\n }\n\n if (this.#httpsAgent) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.#httpsAgent as any).destroy();\n this.#httpsAgent = null;\n }\n }\n}","export * from './commonTypes.js'\nexport * from './dataAccessTypes.js'\nexport * from './errorhandling.js'\nexport * from './sleep.js'\nexport * from './oauth2terms.js'\nexport * from './stsAxiosConfig.js'\nexport * from './agentManager.js'\n\nexport const isNode =\n typeof process !== 'undefined' &&\n typeof process.release !== 'undefined' &&\n process.release.name === 'node';\n "],"x_google_ignoreList":[0,1,2,3],"mappings":";;AAAA,IAAM,yBAAyB;AAE/B,IAAM,cAAc,SAAS,OAAM,SAAQ,UAAU,OAAO,OAAO;AAEnE,IAAM,eAAe,SAAS,OAAM,SAAQ,UAAU,KAAK,OAAO,KAAK,KAAK;AAE5E,IAAM,eAAe,SAAS,OAAO,KAAK,OAAO,SAAS,UAAU,KAAK,OAAO,KAAK,IAAI,GAAG,MAAM,GAAG,KAAK;AAE1G,IAAMA,WAAS;CACd,UAAU;EACT,OAAO,CAAC,GAAG,EAAE;EAEb,MAAM,CAAC,GAAG,GAAG;EACb,KAAK,CAAC,GAAG,GAAG;EACZ,QAAQ,CAAC,GAAG,GAAG;EACf,WAAW,CAAC,GAAG,GAAG;EAClB,UAAU,CAAC,IAAI,GAAG;EAClB,SAAS,CAAC,GAAG,GAAG;EAChB,QAAQ,CAAC,GAAG,GAAG;EACf,eAAe,CAAC,GAAG,GAAG;EACtB;CACD,OAAO;EACN,OAAO,CAAC,IAAI,GAAG;EACf,KAAK,CAAC,IAAI,GAAG;EACb,OAAO,CAAC,IAAI,GAAG;EACf,QAAQ,CAAC,IAAI,GAAG;EAChB,MAAM,CAAC,IAAI,GAAG;EACd,SAAS,CAAC,IAAI,GAAG;EACjB,MAAM,CAAC,IAAI,GAAG;EACd,OAAO,CAAC,IAAI,GAAG;EAGf,aAAa,CAAC,IAAI,GAAG;EACrB,MAAM,CAAC,IAAI,GAAG;EACd,MAAM,CAAC,IAAI,GAAG;EACd,WAAW,CAAC,IAAI,GAAG;EACnB,aAAa,CAAC,IAAI,GAAG;EACrB,cAAc,CAAC,IAAI,GAAG;EACtB,YAAY,CAAC,IAAI,GAAG;EACpB,eAAe,CAAC,IAAI,GAAG;EACvB,YAAY,CAAC,IAAI,GAAG;EACpB,aAAa,CAAC,IAAI,GAAG;EACrB;CAC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out","#data","#withCredentials","#agentManager","#options","#SetupResetInterval","#agentResetInterval","#requestCount","#httpsAgent","#GetAgentOptions","#httpAgent"],"sources":["../node_modules/chalk/source/vendor/ansi-styles/index.js","../node_modules/chalk/source/vendor/supports-color/browser.js","../node_modules/chalk/source/utilities.js","../node_modules/chalk/source/index.js","../src/commonTypes.ts","../src/dataAccessTypes.ts","../src/sleep.ts","../src/stsAxiosConfig.ts","../src/agentManager.ts","../src/index.ts"],"sourcesContent":["const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","/* eslint-env browser */\n\nconst level = (() => {\n\tif (!('navigator' in globalThis)) {\n\t\treturn 0;\n\t}\n\n\tif (globalThis.navigator.userAgentData) {\n\t\tconst brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');\n\t\tif (brand && brand.version > 93) {\n\t\t\treturn 3;\n\t\t}\n\t}\n\n\tif (/\\b(Chrome|Chromium)\\//.test(globalThis.navigator.userAgent)) {\n\t\treturn 1;\n\t}\n\n\treturn 0;\n})();\n\nconst colorSupport = level !== 0 && {\n\tlevel,\n\thasBasic: true,\n\thas256: level >= 2,\n\thas16m: level >= 3,\n};\n\nconst supportsColor = {\n\tstdout: colorSupport,\n\tstderr: colorSupport,\n};\n\nexport default supportsColor;\n","// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n","import ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\nimport { // eslint-disable-line import/order\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn ansiStyles[type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));\n\t}\n\n\treturn ansiStyles[type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n","/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\n/* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF\nimport chalk from 'chalk'\n\nexport interface JSONObject {\n [x: string]: any | JSONObject | undefined\n}\n\nexport enum ModelDelimeter {\n\tROOT = '_',\n\tSEPERATOR = '|',\n\tCOMPONENT_SEPERATOR = '@',\n\tNID_SEPERATOR = '^' // This seperator splits the static and dynamic part of a context string (nid). Used for creating payload header for size optimisation.\n}\n\nexport const CheckValidChar = (checkParams: string[][]): void => {\n const invalidChars = [ \n ModelDelimeter.ROOT, \n ModelDelimeter.SEPERATOR, \n ModelDelimeter.COMPONENT_SEPERATOR, \n ModelDelimeter.NID_SEPERATOR\n ];\n\n checkParams.forEach(param => {\n invalidChars.forEach(char => {\n if (param[1].includes(char)) {\n throw new Error(`Invalid character inside [${param[0]}:${param[1]}], no [${char}] allowed`);\n }\n });\n });\n}\n\n// npm logging levels are prioritized from 0 to 6 (highest to lowest). This from Winston logger.\nexport interface ISTSLogger {\n error(message: any): void;\n warn(message: any): void;\n info(message: any): void;\n http(message: any): void;\n verbose(message: any): void;\n debug(message: any): void;\n silly(message: any): void;\n}\n\nexport const defaultLogger: ISTSLogger = {\n debug(message) {\n console.log(chalk.grey(`debug: ${message}`));\n },\n error(message) {\n console.log(chalk.red(`error: ${message}`));\n },\n http(message) {\n console.log(chalk.cyan(`http: ${message}`));\n },\n info(message) {\n console.log(chalk.white(`info: ${message}`));\n },\n silly(message) {\n console.log(chalk.yellow(`silly: ${message}`));\n },\n verbose(message) {\n console.log(chalk.green(`verbose: ${message}`));\n },\n warn(message) {\n console.log(chalk.magenta(`warn: ${message}`));\n }\n}\n\nexport const emptyLogger: ISTSLogger = {\n debug(message) { },\n error(message) { },\n http(message) { },\n info(message) { },\n silly(message) { },\n verbose(message) { },\n warn(message) { }\n}\n","import { StatusCodes } from 'http-status-codes'\n\nimport { JSONObject } from './commonTypes.js'\n\n//@@ These should be moved into the stsrest01client\nexport enum edbaction {\n created = 1,\n updated = 2,\n deleted = 3\n}\n\nexport interface IDBResource<T> {\n oid: string\n resname: string\n resdesc: T\n vnum: string\n validfrom: string\n validto: string | null\n dbaction: edbaction\n dbactionuser: string\n}\n\nexport interface IDBEntity<T> {\n oid: string\n resourceoid: string,\n entname: string\n entvalue: T\n vnum: string\n validfrom: string\n validto: string | null\n dbaction: edbaction\n dbactionuser: string\n}\n\nexport interface IDBFilters {\n resname?: string\n entname?: string\n resvnum?: string\n entvnum?: string\n filter?: string\n incdel?: string\n startdate?: string\n enddate?: string\n resenddate?: string\n dbaction?: string\n dbactionuser?: string\n limit?: string\n}\n\nexport interface IAccessLayerErrorDetail {\n status: StatusCodes\n error: Error\n errorMessage: string\n operation: string\n}\n\nexport interface IDBOptions {\n filters?: IDBFilters\n useCache?: boolean\n useMultipleDatabases?: boolean\n limit?: number\n errorOnBatchUpdate?: boolean\n}\n\nexport interface IDBReturnData<T> {\n status: StatusCodes\n operation: string,\n detail: IDBReturnData<T>[] | IDBResource<T>[] | IDBResource<T> | IDBEntity<T>[] | IDBEntity<T> | T | null\n options: IDBOptions\n error?: IAccessLayerErrorDetail\n}\n\nexport interface IDBSearchOptions {\n queryFunctionName: string\n searchParameters: JSONObject\n returnsResourceList: boolean\n}\n","export async function Sleep(milliseconds = 1000): Promise<void> { \n return new Promise(resolve => setTimeout(resolve, milliseconds))\n}\n","import { JSONObject } from './commonTypes.js'\nimport { IAgentManager } from './agentManager.js'\n\nexport class STSAxiosConfig {\n #url: string;\n #method: string;\n #headers?: JSONObject;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n #data?: any;\n #agentManager?: IAgentManager;\n #timeout?: number;\n #withCredentials?: boolean;\n\n constructor(url: string, method: string, headers?: JSONObject, timeout?: number) {\n this.#url = url\n this.#method = method\n if (headers !== undefined) {\n this.#headers = headers;\n }\n if (timeout !== undefined) {\n this.#timeout = timeout;\n }\n }\n\n /**\n * \n * @param cookies this.#headers['Cookie'] = cookies.join('; ')\n * @returns \n */\n withCookies(cookies: string[]) {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Cookie'] = cookies.join('; ')\n return this;\n }\n\n /**\n * \n * @param data Add data to the body\n * @returns \n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n withData(data: any) {\n this.#data = data;\n return this;\n }\n\n // 'Content-Type': 'application/json'\n\n /**\n * \n * @param accesssToken \n * @param stsUserId \n * @returns this.#headers['Authorization'] = 'Bearer ' + accesssToken; and this.#headers['x-sts_user_id'] = stsUserId;\n */\n withAuthHeaders(accesssToken: string, stsUserId?: string) {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Authorization'] = 'Bearer ' + accesssToken;\n if (stsUserId) {\n this.#headers['x-sts_user_id'] = stsUserId;\n }\n return this;\n }\n\n /**\n * \n * @param headers Add headers to the existing header\n * @returns \n */\n withHeaders(headers: JSONObject) {\n this.#headers = {\n ...(this.#headers ?? {}),\n ...headers\n };\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/fhir+json';\n */\n withApplicationFhirAndJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/fhir+json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/merge-patch+json';\n */\n withApplicationMergePatchAndJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/merge-patch+json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/json-patch+json';\n */\n withApplicationJsonPatchAndJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/json-patch+json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/json';\n */\n withApplicationJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/json';\n */\n withDefaultHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/json';\n return this;\n }\n\n /**\n * \n * @returns \n */\n withCredentials() {\n this.#withCredentials = true;\n return this;\n }\n\n /**\n * \n * @param timeout Add a connection timeout\n * @returns \n */\n withTimeout(timeout: number) {\n this.#timeout = timeout;\n return this;\n }\n\n /**\n * \n * @param agentManager Add the agent manager for each rest call. Only for nodejs not browser.\n * @returns \n */\n withAgentManager(agentManager: IAgentManager) {\n this.#agentManager = agentManager;\n return this;\n }\n\n /**\n * @returns Returns axios config object\n */\n get config(): JSONObject {\n const retVal: JSONObject = {\n url: this.#url,\n method: this.#method\n }\n if (this.#headers) {\n retVal.headers = this.#headers;\n }\n if (this.#agentManager !== undefined) {\n if (this.#agentManager.IsHttps(this.#url)) {\n retVal.httpsAgent = this.#agentManager.GetAgent(this.#url)\n } else {\n retVal.httpAgent = this.#agentManager.GetAgent(this.#url)\n }\n }\n if (this.#data !== undefined) {\n retVal.data = this.#data;\n }\n if (this.#timeout !== undefined) {\n retVal.timeout = this.#timeout;\n }\n if (this.#withCredentials !== undefined && this.#withCredentials === true) {\n retVal.withCredentials = true;\n }\n return retVal;\n }\n}\n","export interface IAgentOptions {\n keepAlive: boolean\n maxSockets: number\n maxTotalSockets: number\n maxFreeSockets: number\n timeout: number\n rejectUnauthorized?: boolean\n}\n\nexport interface IAgentManagerOptions {\n httpAgentFactory: (options: IAgentOptions) => unknown\n httpsAgentFactory: (options: IAgentOptions) => unknown\n agentOptions?: IAgentOptions\n agentResetInterval?: number\n agentResetCount?: number\n}\n\nexport interface IAgentManager {\n get agentResetInterval(): number | undefined\n get agentResetCount(): number | undefined\n UpdateAgentResetInterval(val: number): void\n UpdateAgentResetCount(val: number): void\n IncRequestCount(): void\n IsHttps(protocol: string): boolean\n GetAgent(protocol: string): unknown\n ResetAgent(): void\n Terminate(): void\n}\n\nexport function createAgentManager(agentManagerOptions: IAgentManagerOptions): IAgentManager {\n return new AgentManager(agentManagerOptions);\n}\n\nclass AgentManager implements IAgentManager {\n #options: IAgentManagerOptions;\n #agentResetInterval: NodeJS.Timeout | null = null;\n #requestCount: number = 0;\n #httpAgent: unknown = undefined;\n #httpsAgent: unknown = undefined;\n\n constructor(agentManagerOptions: IAgentManagerOptions) {\n this.#options = agentManagerOptions;\n if (this.#options.agentResetInterval) {\n this.#SetupResetInterval();\n }\n }\n\n get agentResetInterval(): number | undefined {\n return this.#options.agentResetInterval;\n }\n\n UpdateAgentResetInterval(val: number): void {\n if (this.#agentResetInterval) {\n clearTimeout(this.#agentResetInterval);\n }\n this.#options.agentResetInterval = val;\n this.#SetupResetInterval();\n }\n\n get agentResetCount(): number | undefined {\n return this.#options.agentResetCount;\n }\n\n UpdateAgentResetCount(val: number): void {\n this.#options.agentResetCount = val;\n }\n\n #SetupResetInterval = () => {\n if (this.#options.agentResetInterval && this.#options.agentResetInterval > 0) {\n this.#agentResetInterval = setTimeout(() => {\n this.ResetAgent();\n this.#SetupResetInterval();\n }, this.#options.agentResetInterval).unref();\n }\n }\n\n IncRequestCount(): void {\n this.#requestCount++;\n if (this.#options.agentResetCount) {\n if ((this.#requestCount % this.#options.agentResetCount) === 0) {\n this.ResetAgent();\n }\n }\n }\n\n IsHttps(protocol: string): boolean {\n if (protocol.toLowerCase().startsWith('https:')) {\n return true;\n }\n return false;\n }\n\n #GetAgentOptions = (https: boolean): IAgentOptions => {\n let options: IAgentOptions;\n if (this.#options.agentOptions) {\n options = {\n keepAlive: this.#options.agentOptions.keepAlive,\n maxSockets: this.#options.agentOptions.maxSockets,\n maxTotalSockets: this.#options.agentOptions.maxTotalSockets,\n maxFreeSockets: this.#options.agentOptions.maxFreeSockets,\n timeout: this.#options.agentOptions.timeout\n }\n if (https === true) {\n options.rejectUnauthorized = this.#options.agentOptions.rejectUnauthorized // Allows self signed certs in non production mode(s)\n }\n } else {\n // Defaults\n options = {\n keepAlive: true,\n maxSockets: 10,\n maxTotalSockets: 20,\n maxFreeSockets: 256,\n timeout: 30000,\n rejectUnauthorized: false\n };\n }\n return options;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n GetAgent(protocol: string): any {\n if (protocol.toLowerCase().startsWith('https:')) {\n if (!this.#httpsAgent) {\n //this.#httpsAgent = new https.Agent(this.#GetAgentOptions(true));\n this.#httpsAgent = this.#options.httpsAgentFactory(this.#GetAgentOptions(true));\n }\n return this.#httpsAgent;\n } else if (protocol.toLowerCase().startsWith('http:')) {\n if (!this.#httpAgent) {\n //this.#httpAgent = new http.Agent(this.#GetAgentOptions(false));\n this.#httpAgent = this.#options.httpAgentFactory(this.#GetAgentOptions(false));\n }\n return this.#httpAgent;\n } else {\n return null;\n }\n }\n\n ResetAgent(): void {\n this.#httpAgent = null;\n this.#httpsAgent = null;\n }\n\n Terminate(): void {\n if (this.#agentResetInterval) {\n clearTimeout(this.#agentResetInterval);\n this.#agentResetInterval = null;\n }\n\n if (this.#httpAgent) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.#httpAgent as any).destroy();\n this.#httpAgent = null;\n }\n\n if (this.#httpsAgent) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.#httpsAgent as any).destroy();\n this.#httpsAgent = null;\n }\n }\n}","export * from './commonTypes.js'\nexport * from './dataAccessTypes.js'\nexport * from './sleep.js'\nexport * from './stsAxiosConfig.js'\nexport * from './agentManager.js'\n\nexport const isNode =\n typeof process !== 'undefined' &&\n typeof process.release !== 'undefined' &&\n process.release.name === 'node';\n "],"x_google_ignoreList":[0,1,2,3],"mappings":";;AAAA,IAAM,yBAAyB;AAE/B,IAAM,cAAc,SAAS,OAAM,SAAQ,UAAU,OAAO,OAAO;AAEnE,IAAM,eAAe,SAAS,OAAM,SAAQ,UAAU,KAAK,OAAO,KAAK,KAAK;AAE5E,IAAM,eAAe,SAAS,OAAO,KAAK,OAAO,SAAS,UAAU,KAAK,OAAO,KAAK,IAAI,GAAG,MAAM,GAAG,KAAK;AAE1G,IAAMA,WAAS;CACd,UAAU;EACT,OAAO,CAAC,GAAG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B,SAAA,WAAyB,SAAS;AACnC,SAAA,aAAmB;;;;;;ACxJ/B,IAAa,SACX,OAAO,YAAY,eACnB,OAAO,QAAQ,YAAY,eAC3B,QAAQ,QAAQ,SAAS"}
package/dist/index.mjs CHANGED
@@ -395,117 +395,10 @@ var edbaction = /* @__PURE__ */ function(edbaction) {
395
395
  return edbaction;
396
396
  }({});
397
397
  //#endregion
398
- //#region src/errorhandling.ts
399
- function GetErrorPayload(errorCode, details = null) {
400
- return {
401
- error: errorCode.code,
402
- error_description: errorCode.description,
403
- timestamp: Date.now(),
404
- details
405
- };
406
- }
407
- //#endregion
408
398
  //#region src/sleep.ts
409
399
  async function Sleep(milliseconds = 1e3) {
410
400
  return new Promise((resolve) => setTimeout(resolve, milliseconds));
411
401
  }
412
- async function JestSleep() {
413
- return Sleep(100);
414
- }
415
- //#endregion
416
- //#region src/oauth2terms.ts
417
- var OAuth2ParameterType = /* @__PURE__ */ function(OAuth2ParameterType) {
418
- OAuth2ParameterType["AUDIENCE"] = "AUDIENCE";
419
- OAuth2ParameterType["CLIENT_ID"] = "client_id";
420
- OAuth2ParameterType["CLIENT_SECRET"] = "client_secret";
421
- OAuth2ParameterType["RESPONSE_TYPE"] = "response_type";
422
- OAuth2ParameterType["SCOPE"] = "scope";
423
- OAuth2ParameterType["STATE"] = "state";
424
- OAuth2ParameterType["REDIRECT_URI"] = "redirect_uri";
425
- OAuth2ParameterType["ERROR"] = "error";
426
- OAuth2ParameterType["ERROR_DESCRIPTION"] = "error_description";
427
- OAuth2ParameterType["ERROR_CODES"] = "error_codes";
428
- OAuth2ParameterType["ERROR_URI"] = "error_uri";
429
- OAuth2ParameterType["GRANT_TYPE"] = "grant_type";
430
- OAuth2ParameterType["CODE"] = "code";
431
- OAuth2ParameterType["ACCESS_TOKEN"] = "access_token";
432
- OAuth2ParameterType["TOKEN_TYPE"] = "token_type";
433
- OAuth2ParameterType["EXPIRES_IN"] = "expires_in";
434
- OAuth2ParameterType["USERNAME"] = "username";
435
- OAuth2ParameterType["PASSWORD"] = "password";
436
- OAuth2ParameterType["REFRESH_TOKEN"] = "refresh_token";
437
- OAuth2ParameterType["RESPONSE_MODE"] = "response_mode";
438
- OAuth2ParameterType["TIMESTAMP"] = "timestamp";
439
- OAuth2ParameterType["TRACE_ID"] = "trace_id";
440
- OAuth2ParameterType["CORRELATION_ID"] = "correlation_id";
441
- return OAuth2ParameterType;
442
- }({});
443
- var OIDCStandardClaim = /* @__PURE__ */ function(OIDCStandardClaim) {
444
- OIDCStandardClaim["SUB"] = "sub";
445
- OIDCStandardClaim["NAME"] = "name";
446
- OIDCStandardClaim["GIVEN_NAME"] = "given_name";
447
- OIDCStandardClaim["FAMILY_NAME"] = "family_name";
448
- OIDCStandardClaim["MIDDLE_NAME"] = "middle_name";
449
- OIDCStandardClaim["NICKNAME"] = "nickname";
450
- OIDCStandardClaim["PREFERRED_USERNAME"] = "preferred_username";
451
- OIDCStandardClaim["PROFILE"] = "profile";
452
- OIDCStandardClaim["PICTURE"] = "picture";
453
- OIDCStandardClaim["WEBSITE"] = "website";
454
- OIDCStandardClaim["EMAIL"] = "email";
455
- OIDCStandardClaim["EMAIL_VERIFIED"] = "email_verified";
456
- OIDCStandardClaim["GENDER"] = "gender";
457
- OIDCStandardClaim["BIRTHDATE"] = "birthdate";
458
- OIDCStandardClaim["ZONEINFO"] = "zoneinfo";
459
- OIDCStandardClaim["LOCALE"] = "locale";
460
- OIDCStandardClaim["PHONE_NUMBER"] = "phone_number";
461
- OIDCStandardClaim["PHONE_NUMBER_VERIFIED"] = "phone_number_verified";
462
- OIDCStandardClaim["ADDRESS"] = "address";
463
- OIDCStandardClaim["CLIENT_SECRET"] = "client_secret";
464
- OIDCStandardClaim["NONCE"] = "nonce";
465
- return OIDCStandardClaim;
466
- }({});
467
- var OIDCAddressClaim = /* @__PURE__ */ function(OIDCAddressClaim) {
468
- OIDCAddressClaim["FORMATTED"] = "formatted";
469
- OIDCAddressClaim["STREET_ADDRESS"] = "street_address";
470
- OIDCAddressClaim["LOCALITY"] = "locality";
471
- OIDCAddressClaim["REGION"] = "region";
472
- OIDCAddressClaim["COUNTRY"] = "country";
473
- return OIDCAddressClaim;
474
- }({});
475
- var OAuth2ParameterErrorType = class {
476
- static NOT_EQUAL = {
477
- code: "STS_OAUTH2_ERR_0001",
478
- description: "Parameter values not equal."
479
- };
480
- static NOT_PRESENT = {
481
- code: "STS_OAUTH2_ERR_0002",
482
- description: "Parameter not provided."
483
- };
484
- static INVALID_FORMAT = {
485
- code: "STS_OAUTH2_ERR_0003",
486
- description: "Parameter value format invalid."
487
- };
488
- static EXPIRED = {
489
- code: "STS_OAUTH2_ERR_0004",
490
- description: "Parameter value expired."
491
- };
492
- };
493
- function compareParameterTypes(source1, source2, authParameterTypes) {
494
- const errors = [];
495
- for (let i = 0; i < authParameterTypes.length; i++) {
496
- const authParameterType = authParameterTypes[i];
497
- if (source1[i].localeCompare(source2[i]) !== 0) {
498
- const error = {
499
- error: OAuth2ParameterErrorType.NOT_EQUAL.code,
500
- error_description: OAuth2ParameterErrorType.NOT_EQUAL.description,
501
- timestamp: Date.now(),
502
- details: `${OAuth2ParameterErrorType.NOT_EQUAL.description}: Parameter: [${authParameterType}]`
503
- };
504
- errors.push(error);
505
- }
506
- }
507
- return errors;
508
- }
509
402
  //#endregion
510
403
  //#region src/stsAxiosConfig.ts
511
404
  var STSAxiosConfig = class {
@@ -751,6 +644,6 @@ var AgentManager = class {
751
644
  //#region src/index.ts
752
645
  var isNode = typeof process !== "undefined" && typeof process.release !== "undefined" && process.release.name === "node";
753
646
  //#endregion
754
- export { CheckValidChar, GetErrorPayload, JestSleep, ModelDelimeter, OAuth2ParameterErrorType, OAuth2ParameterType, OIDCAddressClaim, OIDCStandardClaim, STSAxiosConfig, Sleep, compareParameterTypes, createAgentManager, defaultLogger, edbaction, emptyLogger, isNode };
647
+ export { CheckValidChar, ModelDelimeter, STSAxiosConfig, Sleep, createAgentManager, defaultLogger, edbaction, emptyLogger, isNode };
755
648
 
756
649
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["styles","#url","#method","#headers","#timeout","#data","#withCredentials","#agentManager","#options","#SetupResetInterval","#agentResetInterval","#requestCount","#httpsAgent","#GetAgentOptions","#httpAgent"],"sources":["../node_modules/chalk/source/vendor/ansi-styles/index.js","../node_modules/chalk/source/vendor/supports-color/browser.js","../node_modules/chalk/source/utilities.js","../node_modules/chalk/source/index.js","../src/commonTypes.ts","../src/dataAccessTypes.ts","../src/errorhandling.ts","../src/sleep.ts","../src/oauth2terms.ts","../src/stsAxiosConfig.ts","../src/agentManager.ts","../src/index.ts"],"sourcesContent":["const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","/* eslint-env browser */\n\nconst level = (() => {\n\tif (!('navigator' in globalThis)) {\n\t\treturn 0;\n\t}\n\n\tif (globalThis.navigator.userAgentData) {\n\t\tconst brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');\n\t\tif (brand && brand.version > 93) {\n\t\t\treturn 3;\n\t\t}\n\t}\n\n\tif (/\\b(Chrome|Chromium)\\//.test(globalThis.navigator.userAgent)) {\n\t\treturn 1;\n\t}\n\n\treturn 0;\n})();\n\nconst colorSupport = level !== 0 && {\n\tlevel,\n\thasBasic: true,\n\thas256: level >= 2,\n\thas16m: level >= 3,\n};\n\nconst supportsColor = {\n\tstdout: colorSupport,\n\tstderr: colorSupport,\n};\n\nexport default supportsColor;\n","// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n","import ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\nimport { // eslint-disable-line import/order\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn ansiStyles[type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));\n\t}\n\n\treturn ansiStyles[type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n","/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\n/* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF\nimport chalk from 'chalk'\n\nexport interface JSONObject {\n [x: string]: any | JSONObject | undefined\n}\n\nexport enum ModelDelimeter {\n\tROOT = '_',\n\tSEPERATOR = '|',\n\tCOMPONENT_SEPERATOR = '@',\n\tNID_SEPERATOR = '^' // This seperator splits the static and dynamic part of a context string (nid). Used for creating payload header for size optimisation.\n}\n\nexport const CheckValidChar = (checkParams: string[][]): void => {\n const invalidChars = [ \n ModelDelimeter.ROOT, \n ModelDelimeter.SEPERATOR, \n ModelDelimeter.COMPONENT_SEPERATOR, \n ModelDelimeter.NID_SEPERATOR\n ];\n\n checkParams.forEach(param => {\n invalidChars.forEach(char => {\n if (param[1].includes(char)) {\n throw new Error(`Invalid character inside [${param[0]}:${param[1]}], no [${char}] allowed`);\n }\n });\n });\n}\n\n// npm logging levels are prioritized from 0 to 6 (highest to lowest). This from Winston logger.\nexport interface ISTSLogger {\n error(message: any): void;\n warn(message: any): void;\n info(message: any): void;\n http(message: any): void;\n verbose(message: any): void;\n debug(message: any): void;\n silly(message: any): void;\n}\n\nexport const defaultLogger: ISTSLogger = {\n debug(message) {\n console.log(chalk.grey(`debug: ${message}`));\n },\n error(message) {\n console.log(chalk.red(`error: ${message}`));\n },\n http(message) {\n console.log(chalk.cyan(`http: ${message}`));\n },\n info(message) {\n console.log(chalk.white(`info: ${message}`));\n },\n silly(message) {\n console.log(chalk.yellow(`silly: ${message}`));\n },\n verbose(message) {\n console.log(chalk.green(`verbose: ${message}`));\n },\n warn(message) {\n console.log(chalk.magenta(`warn: ${message}`));\n }\n}\n\nexport const emptyLogger: ISTSLogger = {\n debug(message) { },\n error(message) { },\n http(message) { },\n info(message) { },\n silly(message) { },\n verbose(message) { },\n warn(message) { }\n}\n\nexport interface IGenericMessageProcessorPayload {\n header: string\n messageId: string\n senderId: string\n senderRole: string\n requestPayload: JSONObject\n responsePayload: JSONObject\n pid: string\n messageType: 'REQUEST' | 'RESPONSE'\n}\n\nexport interface IGenericMessageProcessorWorkerRecord {\n messageId: string\n senderId: string\n requestPayload: IGenericMessageProcessorPayload\n responses: Record<string, IGenericMessageProcessorPayload> // The key here will be the pid\n startTime: number\n endTime: number\n timeout: NodeJS.Timeout | null\n callBack: (payload: IGenericMessageProcessorPayload, options: any) => void\n errorCallBack: (payload: IGenericMessageProcessorPayload, option: any) => void\n}\n\nexport interface GenericMessageManagerOptions {\n logger: ISTSLogger\n requestResponseMessageTimeout: number\n namespace: string\n role: 'SERVER' | 'CLIENT'\n groups: string[]\n messageSender: (payload: IGenericMessageProcessorPayload, options: any) => void\n ProcessRequestMessage: (payload: IGenericMessageProcessorPayload, options: any) => Promise<JSONObject>\n ProcessResponseMessage?: (reesponses: Record<string, IGenericMessageProcessorPayload>, options: any) => Promise<boolean>\n messageReceiverStart: (options: any) => void\n messageReceiverStop: (options: any) => void\n}\n\nexport interface IWebWorderMessageHandlerOptions {\n logger: ISTSLogger\n role: 'SERVER' | 'CLIENT'\n namespace: string\n groups: string[]\n ignoreEvents?: string[]\n messagePort: any // MessagePort;\n context?: JSONObject\n}\n","import { StatusCodes } from 'http-status-codes'\n\nimport { JSONObject } from './commonTypes.js'\n\nexport enum edbaction {\n created = 1,\n updated = 2,\n deleted = 3\n}\n\nexport interface IDBResource<T> {\n oid: string\n resname: string\n resdesc: T\n vnum: string\n validfrom: string\n validto: string | null\n dbaction: edbaction\n dbactionuser: string\n}\n\nexport interface IDBEntity<T> {\n oid: string\n resourceoid: string,\n entname: string\n entvalue: T\n vnum: string\n validfrom: string\n validto: string | null\n dbaction: edbaction\n dbactionuser: string\n}\n\nexport interface IDBFilters {\n resname?: string\n entname?: string\n resvnum?: string\n entvnum?: string\n filter?: string\n incdel?: string\n startdate?: string\n enddate?: string\n resenddate?: string\n dbaction?: string\n dbactionuser?: string\n limit?: string\n}\n\nexport interface IAccessLayerErrorDetail {\n status: StatusCodes\n error: Error\n errorMessage: string\n operation: string\n}\n\nexport interface IDBOptions {\n filters?: IDBFilters\n useCache?: boolean\n useMultipleDatabases?: boolean\n limit?: number\n errorOnBatchUpdate?: boolean\n}\n\nexport interface IDBReturnData<T> {\n status: StatusCodes\n operation: string,\n detail: IDBReturnData<T>[] | IDBResource<T>[] | IDBResource<T> | IDBEntity<T>[] | IDBEntity<T> | T | null\n options: IDBOptions\n error?: IAccessLayerErrorDetail\n}\n\nexport interface IDBSearchOptions {\n queryFunctionName: string\n searchParameters: JSONObject\n returnsResourceList: boolean\n}\n","export type errorCode = {\n\tcode: string\n\tdescription: string\n}\n\nexport type errorPayload = {\n\terror: string,\n\terror_description: string,\n\ttimestamp: number,\n\t//trace_id: \"255d1aef-8c98-452f-ac51-23d051240864\", //@@\n\t//correlation_id: \"fb3d2015-bc17-4bb9-bb85-30c5cf1aaaa7\", //@@\n\tdetails?: unknown\n}\n\nexport function GetErrorPayload(errorCode: errorCode, details: unknown = null): errorPayload {\n return {\n error: errorCode.code,\n error_description: errorCode.description,\n timestamp: Date.now(),\n //trace_id: \"255d1aef-8c98-452f-ac51-23d051240864\", //@@\n //correlation_id: \"fb3d2015-bc17-4bb9-bb85-30c5cf1aaaa7\", //@@\n details: details\n }\n}\n","export async function Sleep(milliseconds = 1000): Promise<void> { \n return new Promise(resolve => setTimeout(resolve, milliseconds))\n}\n \n// poolsleep is required to avoid JEST reporting unclosed handles during shutdown of all tests\nexport async function JestSleep(): Promise<void> {\n return Sleep(100);\n}\n","import { errorCode, errorPayload } from './errorhandling.js'\n\n// Ref: https://datatracker.ietf.org/doc/html/rfc6749#appendix-A\nexport enum OAuth2ParameterType {\n\tAUDIENCE = 'AUDIENCE', // STS Extension\n\tCLIENT_ID = 'client_id',\n\tCLIENT_SECRET = 'client_secret',\n\tRESPONSE_TYPE = 'response_type',\n\tSCOPE = 'scope',\n\tSTATE = 'state',\n\tREDIRECT_URI = 'redirect_uri',\n\tERROR = 'error',\n\tERROR_DESCRIPTION = 'error_description',\n\tERROR_CODES = 'error_codes', // STS Extension\n\tERROR_URI = 'error_uri',\n\tGRANT_TYPE = 'grant_type',\n\tCODE = 'code',\n\tACCESS_TOKEN = 'access_token',\n\tTOKEN_TYPE = 'token_type',\n\tEXPIRES_IN = 'expires_in',\n\tUSERNAME = 'username',\n\tPASSWORD = 'password',\n\tREFRESH_TOKEN = 'refresh_token',\n\tRESPONSE_MODE = 'response_mode', // STS Extension\n\tTIMESTAMP = 'timestamp', // STS Extension\n\tTRACE_ID = 'trace_id', // STS Extension\n\tCORRELATION_ID = 'correlation_id' // STS Extension\n}\n\n// Auth0 claim usage;\n// aud - api identifier\n// scope - list (space separated) of api permissions\n\n// Claims (Auth0)\n// https://auth0.com/docs/secure/tokens/json-web-tokens/json-web-token-claims\n\n// Reserved claims (IANA)\n// https://www.iana.org/assignments/jwt/jwt.xhtml#claims\n\n// Example scopes and claims (Auth0)\n// https://auth0.com/docs/get-started/apis/scopes/sample-use-cases-scopes-and-claims\n\n// OIDC Claims and Scopes\n// https://openid.net/specs/openid-connect-core-1_0.html#Claims\n// https://developer.okta.com/blog/2017/07/25/oidc-primer-part-1#:~:text=Simply%20put%2C%20claims%20are%20name,information%20asserted%20about%20an%20Entity.%E2%80%9D\n\n// OIDC Standard Claims\n// https://openid.net/specs/openid-connect-core-1_0.html#Claims\n// https://developer.okta.com/blog/2017/07/25/oidc-primer-part-1#:~:text=Simply%20put%2C%20claims%20are%20name,information%20asserted%20about%20an%20Entity.%E2%80%9D\nexport enum OIDCStandardClaim {\n\tSUB = 'sub',\n\tNAME = 'name',\n\tGIVEN_NAME = 'given_name',\n\tFAMILY_NAME = 'family_name',\n\tMIDDLE_NAME = 'middle_name',\n\tNICKNAME = 'nickname',\n\tPREFERRED_USERNAME = 'preferred_username',\n\tPROFILE = 'profile',\n\tPICTURE = 'picture',\n\tWEBSITE = 'website',\n\tEMAIL = 'email',\n\tEMAIL_VERIFIED = 'email_verified',\n\tGENDER = 'gender',\n\tBIRTHDATE = 'birthdate',\n\tZONEINFO = 'zoneinfo',\n\tLOCALE = 'locale',\n\tPHONE_NUMBER = 'phone_number',\n\tPHONE_NUMBER_VERIFIED = 'phone_number_verified',\n\tADDRESS = 'address',\n\tCLIENT_SECRET = 'client_secret',\n\tNONCE = 'nonce' // STS Extension\n}\n\nexport enum OIDCAddressClaim {\n\tFORMATTED = 'formatted',\n\tSTREET_ADDRESS = 'street_address',\n\tLOCALITY = 'locality',\n\tREGION = 'region',\n\tCOUNTRY = 'country'\n}\n\nexport class OAuth2ParameterErrorType {\n static readonly NOT_EQUAL: errorCode = {\n code: 'STS_OAUTH2_ERR_0001',\n description: 'Parameter values not equal.'\n }\n static readonly NOT_PRESENT: errorCode = {\n code: 'STS_OAUTH2_ERR_0002',\n description: 'Parameter not provided.'\n }\n static readonly INVALID_FORMAT: errorCode = {\n code: 'STS_OAUTH2_ERR_0003',\n description: 'Parameter value format invalid.'\n }\n static readonly EXPIRED: errorCode = {\n code: 'STS_OAUTH2_ERR_0004',\n description: 'Parameter value expired.'\n }\n}\n\nexport function compareParameterTypes(source1: string[], source2: string[], authParameterTypes: OAuth2ParameterType[]): errorPayload[] {\n const errors: errorPayload[] = [ ];\n for (let i=0 ; i < authParameterTypes.length; i++) {\n const authParameterType = authParameterTypes[i];\n if (source1[i].localeCompare(source2[i]) !== 0) {\n const error: errorPayload = {\n error: OAuth2ParameterErrorType.NOT_EQUAL.code,\n error_description: OAuth2ParameterErrorType.NOT_EQUAL.description,\n timestamp: Date.now(),\n details: `${OAuth2ParameterErrorType.NOT_EQUAL.description}: Parameter: [${authParameterType}]`\n }\n errors.push(error);\n }\n }\n return errors;\n}\n","import { JSONObject } from './commonTypes.js'\nimport { IAgentManager } from './agentManager.js'\n\nexport class STSAxiosConfig {\n #url: string;\n #method: string;\n #headers?: JSONObject;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n #data?: any;\n #agentManager?: IAgentManager;\n #timeout?: number;\n #withCredentials?: boolean;\n\n constructor(url: string, method: string, headers?: JSONObject, timeout?: number) {\n this.#url = url\n this.#method = method\n if (headers !== undefined) {\n this.#headers = headers;\n }\n if (timeout !== undefined) {\n this.#timeout = timeout;\n }\n }\n\n /**\n * \n * @param cookies this.#headers['Cookie'] = cookies.join('; ')\n * @returns \n */\n withCookies(cookies: string[]) {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Cookie'] = cookies.join('; ')\n return this;\n }\n\n /**\n * \n * @param data Add data to the body\n * @returns \n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n withData(data: any) {\n this.#data = data;\n return this;\n }\n\n // 'Content-Type': 'application/json'\n\n /**\n * \n * @param accesssToken \n * @param stsUserId \n * @returns this.#headers['Authorization'] = 'Bearer ' + accesssToken; and this.#headers['x-sts_user_id'] = stsUserId;\n */\n withAuthHeaders(accesssToken: string, stsUserId?: string) {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Authorization'] = 'Bearer ' + accesssToken;\n if (stsUserId) {\n this.#headers['x-sts_user_id'] = stsUserId;\n }\n return this;\n }\n\n /**\n * \n * @param headers Add headers to the existing header\n * @returns \n */\n withHeaders(headers: JSONObject) {\n this.#headers = {\n ...(this.#headers ?? {}),\n ...headers\n };\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/fhir+json';\n */\n withApplicationFhirAndJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/fhir+json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/merge-patch+json';\n */\n withApplicationMergePatchAndJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/merge-patch+json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/json-patch+json';\n */\n withApplicationJsonPatchAndJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/json-patch+json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/json';\n */\n withApplicationJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/json';\n */\n withDefaultHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/json';\n return this;\n }\n\n /**\n * \n * @returns \n */\n withCredentials() {\n this.#withCredentials = true;\n return this;\n }\n\n /**\n * \n * @param timeout Add a connection timeout\n * @returns \n */\n withTimeout(timeout: number) {\n this.#timeout = timeout;\n return this;\n }\n\n /**\n * \n * @param agentManager Add the agent manager for each rest call. Only for nodejs not browser.\n * @returns \n */\n withAgentManager(agentManager: IAgentManager) {\n this.#agentManager = agentManager;\n return this;\n }\n\n /**\n * @returns Returns axios config object\n */\n get config(): JSONObject {\n const retVal: JSONObject = {\n url: this.#url,\n method: this.#method\n }\n if (this.#headers) {\n retVal.headers = this.#headers;\n }\n if (this.#agentManager !== undefined) {\n if (this.#agentManager.IsHttps(this.#url)) {\n retVal.httpsAgent = this.#agentManager.GetAgent(this.#url)\n } else {\n retVal.httpAgent = this.#agentManager.GetAgent(this.#url)\n }\n }\n if (this.#data !== undefined) {\n retVal.data = this.#data;\n }\n if (this.#timeout !== undefined) {\n retVal.timeout = this.#timeout;\n }\n if (this.#withCredentials !== undefined && this.#withCredentials === true) {\n retVal.withCredentials = true;\n }\n return retVal;\n }\n}\n","export interface IAgentOptions {\n keepAlive: boolean\n maxSockets: number\n maxTotalSockets: number\n maxFreeSockets: number\n timeout: number\n rejectUnauthorized?: boolean\n}\n\nexport interface IAgentManagerOptions {\n httpAgentFactory: (options: IAgentOptions) => unknown\n httpsAgentFactory: (options: IAgentOptions) => unknown\n agentOptions?: IAgentOptions\n agentResetInterval?: number\n agentResetCount?: number\n}\n\nexport interface IAgentManager {\n get agentResetInterval(): number | undefined\n get agentResetCount(): number | undefined\n UpdateAgentResetInterval(val: number): void\n UpdateAgentResetCount(val: number): void\n IncRequestCount(): void\n IsHttps(protocol: string): boolean\n GetAgent(protocol: string): unknown\n ResetAgent(): void\n Terminate(): void\n}\n\nexport function createAgentManager(agentManagerOptions: IAgentManagerOptions): IAgentManager {\n return new AgentManager(agentManagerOptions);\n}\n\nclass AgentManager implements IAgentManager {\n #options: IAgentManagerOptions;\n #agentResetInterval: NodeJS.Timeout | null = null;\n #requestCount: number = 0;\n #httpAgent: unknown = undefined;\n #httpsAgent: unknown = undefined;\n\n constructor(agentManagerOptions: IAgentManagerOptions) {\n this.#options = agentManagerOptions;\n if (this.#options.agentResetInterval) {\n this.#SetupResetInterval();\n }\n }\n\n get agentResetInterval(): number | undefined {\n return this.#options.agentResetInterval;\n }\n\n UpdateAgentResetInterval(val: number): void {\n if (this.#agentResetInterval) {\n clearTimeout(this.#agentResetInterval);\n }\n this.#options.agentResetInterval = val;\n this.#SetupResetInterval();\n }\n\n get agentResetCount(): number | undefined {\n return this.#options.agentResetCount;\n }\n\n UpdateAgentResetCount(val: number): void {\n this.#options.agentResetCount = val;\n }\n\n #SetupResetInterval = () => {\n if (this.#options.agentResetInterval && this.#options.agentResetInterval > 0) {\n this.#agentResetInterval = setTimeout(() => {\n this.ResetAgent();\n this.#SetupResetInterval();\n }, this.#options.agentResetInterval).unref();\n }\n }\n\n IncRequestCount(): void {\n this.#requestCount++;\n if (this.#options.agentResetCount) {\n if ((this.#requestCount % this.#options.agentResetCount) === 0) {\n this.ResetAgent();\n }\n }\n }\n\n IsHttps(protocol: string): boolean {\n if (protocol.toLowerCase().startsWith('https:')) {\n return true;\n }\n return false;\n }\n\n #GetAgentOptions = (https: boolean): IAgentOptions => {\n let options: IAgentOptions;\n if (this.#options.agentOptions) {\n options = {\n keepAlive: this.#options.agentOptions.keepAlive,\n maxSockets: this.#options.agentOptions.maxSockets,\n maxTotalSockets: this.#options.agentOptions.maxTotalSockets,\n maxFreeSockets: this.#options.agentOptions.maxFreeSockets,\n timeout: this.#options.agentOptions.timeout\n }\n if (https === true) {\n options.rejectUnauthorized = this.#options.agentOptions.rejectUnauthorized // Allows self signed certs in non production mode(s)\n }\n } else {\n // Defaults\n options = {\n keepAlive: true,\n maxSockets: 10,\n maxTotalSockets: 20,\n maxFreeSockets: 256,\n timeout: 30000,\n rejectUnauthorized: false\n };\n }\n return options;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n GetAgent(protocol: string): any {\n if (protocol.toLowerCase().startsWith('https:')) {\n if (!this.#httpsAgent) {\n //this.#httpsAgent = new https.Agent(this.#GetAgentOptions(true));\n this.#httpsAgent = this.#options.httpsAgentFactory(this.#GetAgentOptions(true));\n }\n return this.#httpsAgent;\n } else if (protocol.toLowerCase().startsWith('http:')) {\n if (!this.#httpAgent) {\n //this.#httpAgent = new http.Agent(this.#GetAgentOptions(false));\n this.#httpAgent = this.#options.httpAgentFactory(this.#GetAgentOptions(false));\n }\n return this.#httpAgent;\n } else {\n return null;\n }\n }\n\n ResetAgent(): void {\n this.#httpAgent = null;\n this.#httpsAgent = null;\n }\n\n Terminate(): void {\n if (this.#agentResetInterval) {\n clearTimeout(this.#agentResetInterval);\n this.#agentResetInterval = null;\n }\n\n if (this.#httpAgent) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.#httpAgent as any).destroy();\n this.#httpAgent = null;\n }\n\n if (this.#httpsAgent) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.#httpsAgent as any).destroy();\n this.#httpsAgent = null;\n }\n }\n}","export * from './commonTypes.js'\nexport * from './dataAccessTypes.js'\nexport * from './errorhandling.js'\nexport * from './sleep.js'\nexport * from './oauth2terms.js'\nexport * from './stsAxiosConfig.js'\nexport * from './agentManager.js'\n\nexport const isNode =\n typeof process !== 'undefined' &&\n typeof process.release !== 'undefined' &&\n process.release.name === 'node';\n "],"x_google_ignore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,MAAA,QAAc,cAAc;AAC5B,aAAU;IACN,WAAW,MAAA,QAAc,aAAa;IACtC,YAAY,MAAA,QAAc,aAAa;IACvC,iBAAiB,MAAA,QAAc,aAAa;IAC5C,gBAAgB,MAAA,QAAc,aAAa;IAC3C,SAAS,MAAA,QAAc,aAAa;IACvC;AACD,OAAI,UAAU,KACV,SAAQ,qBAAqB,MAAA,QAAc,aAAa;QAI5D,WAAU;GACN,WAAW;GACX,YAAY;GACZ,iBAAiB;GACjB,gBAAgB;GAChB,SAAS;GACT,oBAAoB;GACvB;AAEL,SAAO;;CAIX,SAAS,UAAuB;AAC5B,MAAI,SAAS,aAAa,CAAC,WAAW,SAAS,EAAE;AAC7C,OAAI,CAAC,MAAA,WAED,OAAA,aAAmB,MAAA,QAAc,kBAAkB,MAAA,gBAAsB,KAAK,CAAC;AAEnF,UAAO,MAAA;aACA,SAAS,aAAa,CAAC,WAAW,QAAQ,EAAE;AACnD,OAAI,CAAC,MAAA,UAED,OAAA,YAAkB,MAAA,QAAc,iBAAiB,MAAA,gBAAsB,MAAM,CAAC;AAElF,UAAO,MAAA;QAEP,QAAO;;CAIf,aAAmB;AACf,QAAA,YAAkB;AAClB,QAAA,aAAmB;;CAGvB,YAAkB;AACd,MAAI,MAAA,oBAA0B;AAC1B,gBAAa,MAAA,mBAAyB;AACtC,SAAA,qBAA2B;;AAG/B,MAAI,MAAA,WAAiB;AAEhB,SAAA,UAAwB,SAAS;AAClC,SAAA,YAAkB;;AAGtB,MAAI,MAAA,YAAkB;AAEjB,SAAA,WAAyB,SAAS;AACnC,SAAA,aAAmB;;;;;;ACtJ/B,IAAa,SACX,OAAO,YAAY,eACnB,OAAO,QAAQ,YAAY,eAC3B,QAAQ,QAAQ,SAAS"}
1
+ {"version":3,"file":"index.mjs","names":["styles","#url","#method","#headers","#timeout","#data","#withCredentials","#agentManager","#options","#SetupResetInterval","#agentResetInterval","#requestCount","#httpsAgent","#GetAgentOptions","#httpAgent"],"sources":["../node_modules/chalk/source/vendor/ansi-styles/index.js","../node_modules/chalk/source/vendor/supports-color/browser.js","../node_modules/chalk/source/utilities.js","../node_modules/chalk/source/index.js","../src/commonTypes.ts","../src/dataAccessTypes.ts","../src/sleep.ts","../src/stsAxiosConfig.ts","../src/agentManager.ts","../src/index.ts"],"sourcesContent":["const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","/* eslint-env browser */\n\nconst level = (() => {\n\tif (!('navigator' in globalThis)) {\n\t\treturn 0;\n\t}\n\n\tif (globalThis.navigator.userAgentData) {\n\t\tconst brand = navigator.userAgentData.brands.find(({brand}) => brand === 'Chromium');\n\t\tif (brand && brand.version > 93) {\n\t\t\treturn 3;\n\t\t}\n\t}\n\n\tif (/\\b(Chrome|Chromium)\\//.test(globalThis.navigator.userAgent)) {\n\t\treturn 1;\n\t}\n\n\treturn 0;\n})();\n\nconst colorSupport = level !== 0 && {\n\tlevel,\n\thasBasic: true,\n\thas256: level >= 2,\n\thas16m: level >= 3,\n};\n\nconst supportsColor = {\n\tstdout: colorSupport,\n\tstderr: colorSupport,\n};\n\nexport default supportsColor;\n","// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n","import ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\nimport { // eslint-disable-line import/order\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn ansiStyles[type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));\n\t}\n\n\treturn ansiStyles[type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n","/* eslint @typescript-eslint/no-explicit-any: 0 */ // --> OFF\n/* eslint @typescript-eslint/no-unused-vars: 0 */ // --> OFF\nimport chalk from 'chalk'\n\nexport interface JSONObject {\n [x: string]: any | JSONObject | undefined\n}\n\nexport enum ModelDelimeter {\n\tROOT = '_',\n\tSEPERATOR = '|',\n\tCOMPONENT_SEPERATOR = '@',\n\tNID_SEPERATOR = '^' // This seperator splits the static and dynamic part of a context string (nid). Used for creating payload header for size optimisation.\n}\n\nexport const CheckValidChar = (checkParams: string[][]): void => {\n const invalidChars = [ \n ModelDelimeter.ROOT, \n ModelDelimeter.SEPERATOR, \n ModelDelimeter.COMPONENT_SEPERATOR, \n ModelDelimeter.NID_SEPERATOR\n ];\n\n checkParams.forEach(param => {\n invalidChars.forEach(char => {\n if (param[1].includes(char)) {\n throw new Error(`Invalid character inside [${param[0]}:${param[1]}], no [${char}] allowed`);\n }\n });\n });\n}\n\n// npm logging levels are prioritized from 0 to 6 (highest to lowest). This from Winston logger.\nexport interface ISTSLogger {\n error(message: any): void;\n warn(message: any): void;\n info(message: any): void;\n http(message: any): void;\n verbose(message: any): void;\n debug(message: any): void;\n silly(message: any): void;\n}\n\nexport const defaultLogger: ISTSLogger = {\n debug(message) {\n console.log(chalk.grey(`debug: ${message}`));\n },\n error(message) {\n console.log(chalk.red(`error: ${message}`));\n },\n http(message) {\n console.log(chalk.cyan(`http: ${message}`));\n },\n info(message) {\n console.log(chalk.white(`info: ${message}`));\n },\n silly(message) {\n console.log(chalk.yellow(`silly: ${message}`));\n },\n verbose(message) {\n console.log(chalk.green(`verbose: ${message}`));\n },\n warn(message) {\n console.log(chalk.magenta(`warn: ${message}`));\n }\n}\n\nexport const emptyLogger: ISTSLogger = {\n debug(message) { },\n error(message) { },\n http(message) { },\n info(message) { },\n silly(message) { },\n verbose(message) { },\n warn(message) { }\n}\n","import { StatusCodes } from 'http-status-codes'\n\nimport { JSONObject } from './commonTypes.js'\n\n//@@ These should be moved into the stsrest01client\nexport enum edbaction {\n created = 1,\n updated = 2,\n deleted = 3\n}\n\nexport interface IDBResource<T> {\n oid: string\n resname: string\n resdesc: T\n vnum: string\n validfrom: string\n validto: string | null\n dbaction: edbaction\n dbactionuser: string\n}\n\nexport interface IDBEntity<T> {\n oid: string\n resourceoid: string,\n entname: string\n entvalue: T\n vnum: string\n validfrom: string\n validto: string | null\n dbaction: edbaction\n dbactionuser: string\n}\n\nexport interface IDBFilters {\n resname?: string\n entname?: string\n resvnum?: string\n entvnum?: string\n filter?: string\n incdel?: string\n startdate?: string\n enddate?: string\n resenddate?: string\n dbaction?: string\n dbactionuser?: string\n limit?: string\n}\n\nexport interface IAccessLayerErrorDetail {\n status: StatusCodes\n error: Error\n errorMessage: string\n operation: string\n}\n\nexport interface IDBOptions {\n filters?: IDBFilters\n useCache?: boolean\n useMultipleDatabases?: boolean\n limit?: number\n errorOnBatchUpdate?: boolean\n}\n\nexport interface IDBReturnData<T> {\n status: StatusCodes\n operation: string,\n detail: IDBReturnData<T>[] | IDBResource<T>[] | IDBResource<T> | IDBEntity<T>[] | IDBEntity<T> | T | null\n options: IDBOptions\n error?: IAccessLayerErrorDetail\n}\n\nexport interface IDBSearchOptions {\n queryFunctionName: string\n searchParameters: JSONObject\n returnsResourceList: boolean\n}\n","export async function Sleep(milliseconds = 1000): Promise<void> { \n return new Promise(resolve => setTimeout(resolve, milliseconds))\n}\n","import { JSONObject } from './commonTypes.js'\nimport { IAgentManager } from './agentManager.js'\n\nexport class STSAxiosConfig {\n #url: string;\n #method: string;\n #headers?: JSONObject;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n #data?: any;\n #agentManager?: IAgentManager;\n #timeout?: number;\n #withCredentials?: boolean;\n\n constructor(url: string, method: string, headers?: JSONObject, timeout?: number) {\n this.#url = url\n this.#method = method\n if (headers !== undefined) {\n this.#headers = headers;\n }\n if (timeout !== undefined) {\n this.#timeout = timeout;\n }\n }\n\n /**\n * \n * @param cookies this.#headers['Cookie'] = cookies.join('; ')\n * @returns \n */\n withCookies(cookies: string[]) {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Cookie'] = cookies.join('; ')\n return this;\n }\n\n /**\n * \n * @param data Add data to the body\n * @returns \n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n withData(data: any) {\n this.#data = data;\n return this;\n }\n\n // 'Content-Type': 'application/json'\n\n /**\n * \n * @param accesssToken \n * @param stsUserId \n * @returns this.#headers['Authorization'] = 'Bearer ' + accesssToken; and this.#headers['x-sts_user_id'] = stsUserId;\n */\n withAuthHeaders(accesssToken: string, stsUserId?: string) {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Authorization'] = 'Bearer ' + accesssToken;\n if (stsUserId) {\n this.#headers['x-sts_user_id'] = stsUserId;\n }\n return this;\n }\n\n /**\n * \n * @param headers Add headers to the existing header\n * @returns \n */\n withHeaders(headers: JSONObject) {\n this.#headers = {\n ...(this.#headers ?? {}),\n ...headers\n };\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/fhir+json';\n */\n withApplicationFhirAndJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/fhir+json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/merge-patch+json';\n */\n withApplicationMergePatchAndJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/merge-patch+json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/json-patch+json';\n */\n withApplicationJsonPatchAndJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/json-patch+json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/json';\n */\n withApplicationJsonContentTypeHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/json';\n return this;\n }\n\n /**\n * \n * @returns this.#headers['Content-Type'] = 'application/json';\n */\n withDefaultHeaders() {\n if (!this.#headers) {\n this.#headers = { };\n }\n this.#headers['Content-Type'] = 'application/json';\n return this;\n }\n\n /**\n * \n * @returns \n */\n withCredentials() {\n this.#withCredentials = true;\n return this;\n }\n\n /**\n * \n * @param timeout Add a connection timeout\n * @returns \n */\n withTimeout(timeout: number) {\n this.#timeout = timeout;\n return this;\n }\n\n /**\n * \n * @param agentManager Add the agent manager for each rest call. Only for nodejs not browser.\n * @returns \n */\n withAgentManager(agentManager: IAgentManager) {\n this.#agentManager = agentManager;\n return this;\n }\n\n /**\n * @returns Returns axios config object\n */\n get config(): JSONObject {\n const retVal: JSONObject = {\n url: this.#url,\n method: this.#method\n }\n if (this.#headers) {\n retVal.headers = this.#headers;\n }\n if (this.#agentManager !== undefined) {\n if (this.#agentManager.IsHttps(this.#url)) {\n retVal.httpsAgent = this.#agentManager.GetAgent(this.#url)\n } else {\n retVal.httpAgent = this.#agentManager.GetAgent(this.#url)\n }\n }\n if (this.#data !== undefined) {\n retVal.data = this.#data;\n }\n if (this.#timeout !== undefined) {\n retVal.timeout = this.#timeout;\n }\n if (this.#withCredentials !== undefined && this.#withCredentials === true) {\n retVal.withCredentials = true;\n }\n return retVal;\n }\n}\n","export interface IAgentOptions {\n keepAlive: boolean\n maxSockets: number\n maxTotalSockets: number\n maxFreeSockets: number\n timeout: number\n rejectUnauthorized?: boolean\n}\n\nexport interface IAgentManagerOptions {\n httpAgentFactory: (options: IAgentOptions) => unknown\n httpsAgentFactory: (options: IAgentOptions) => unknown\n agentOptions?: IAgentOptions\n agentResetInterval?: number\n agentResetCount?: number\n}\n\nexport interface IAgentManager {\n get agentResetInterval(): number | undefined\n get agentResetCount(): number | undefined\n UpdateAgentResetInterval(val: number): void\n UpdateAgentResetCount(val: number): void\n IncRequestCount(): void\n IsHttps(protocol: string): boolean\n GetAgent(protocol: string): unknown\n ResetAgent(): void\n Terminate(): void\n}\n\nexport function createAgentManager(agentManagerOptions: IAgentManagerOptions): IAgentManager {\n return new AgentManager(agentManagerOptions);\n}\n\nclass AgentManager implements IAgentManager {\n #options: IAgentManagerOptions;\n #agentResetInterval: NodeJS.Timeout | null = null;\n #requestCount: number = 0;\n #httpAgent: unknown = undefined;\n #httpsAgent: unknown = undefined;\n\n constructor(agentManagerOptions: IAgentManagerOptions) {\n this.#options = agentManagerOptions;\n if (this.#options.agentResetInterval) {\n this.#SetupResetInterval();\n }\n }\n\n get agentResetInterval(): number | undefined {\n return this.#options.agentResetInterval;\n }\n\n UpdateAgentResetInterval(val: number): void {\n if (this.#agentResetInterval) {\n clearTimeout(this.#agentResetInterval);\n }\n this.#options.agentResetInterval = val;\n this.#SetupResetInterval();\n }\n\n get agentResetCount(): number | undefined {\n return this.#options.agentResetCount;\n }\n\n UpdateAgentResetCount(val: number): void {\n this.#options.agentResetCount = val;\n }\n\n #SetupResetInterval = () => {\n if (this.#options.agentResetInterval && this.#options.agentResetInterval > 0) {\n this.#agentResetInterval = setTimeout(() => {\n this.ResetAgent();\n this.#SetupResetInterval();\n }, this.#options.agentResetInterval).unref();\n }\n }\n\n IncRequestCount(): void {\n this.#requestCount++;\n if (this.#options.agentResetCount) {\n if ((this.#requestCount % this.#options.agentResetCount) === 0) {\n this.ResetAgent();\n }\n }\n }\n\n IsHttps(protocol: string): boolean {\n if (protocol.toLowerCase().startsWith('https:')) {\n return true;\n }\n return false;\n }\n\n #GetAgentOptions = (https: boolean): IAgentOptions => {\n let options: IAgentOptions;\n if (this.#options.agentOptions) {\n options = {\n keepAlive: this.#options.agentOptions.keepAlive,\n maxSockets: this.#options.agentOptions.maxSockets,\n maxTotalSockets: this.#options.agentOptions.maxTotalSockets,\n maxFreeSockets: this.#options.agentOptions.maxFreeSockets,\n timeout: this.#options.agentOptions.timeout\n }\n if (https === true) {\n options.rejectUnauthorized = this.#options.agentOptions.rejectUnauthorized // Allows self signed certs in non production mode(s)\n }\n } else {\n // Defaults\n options = {\n keepAlive: true,\n maxSockets: 10,\n maxTotalSockets: 20,\n maxFreeSockets: 256,\n timeout: 30000,\n rejectUnauthorized: false\n };\n }\n return options;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n GetAgent(protocol: string): any {\n if (protocol.toLowerCase().startsWith('https:')) {\n if (!this.#httpsAgent) {\n //this.#httpsAgent = new https.Agent(this.#GetAgentOptions(true));\n this.#httpsAgent = this.#options.httpsAgentFactory(this.#GetAgentOptions(true));\n }\n return this.#httpsAgent;\n } else if (protocol.toLowerCase().startsWith('http:')) {\n if (!this.#httpAgent) {\n //this.#httpAgent = new http.Agent(this.#GetAgentOptions(false));\n this.#httpAgent = this.#options.httpAgentFactory(this.#GetAgentOptions(false));\n }\n return this.#httpAgent;\n } else {\n return null;\n }\n }\n\n ResetAgent(): void {\n this.#httpAgent = null;\n this.#httpsAgent = null;\n }\n\n Terminate(): void {\n if (this.#agentResetInterval) {\n clearTimeout(this.#agentResetInterval);\n this.#agentResetInterval = null;\n }\n\n if (this.#httpAgent) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.#httpAgent as any).destroy();\n this.#httpAgent = null;\n }\n\n if (this.#httpsAgent) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (this.#httpsAgent as any).destroy();\n this.#httpsAgent = null;\n }\n }\n}","export * from './commonTypes.js'\nexport * from './dataAccessTypes.js'\nexport * from './sleep.js'\nexport * from './stsAxiosConfig.js'\nexport * from './agentManager.js'\n\nexport const isNode =\n typeof process !== 'undefined' &&\n typeof process.release !== 'undefined' &&\n process.release.name === 'node';\n "],"x_google_ignoreList":[0,1,2,3],"mappings":";AAAA,IAAM,yBAAyB;AAE/B,IAAM,cAAc,SAAS,OAAM,SAAQ,UAAU,OAAO,OAAO;AAEnE,IAAM,eAAe,SAAS,OAAM,SAAQ,UAAU,KAAK,OAAO,KAAK,KAAK;AAE5E,IAAM,eAAe,SAAS,OAAO,KAAK,OAAO,SAAS,UAAU,KAAK,OAAO,KAAK,IAAI,GAAG,MAAM,GAAG,KAAK;AAE1G,IAAMA,WAAS;CACd,UAAU;EACT,OAAO,CAAC,GAAG,EAAE;EAEb,MAAM,CAAC,GAAG,GAAG;EACb,KAAK,CAAC,GAAG,GAAG;EACZ,QAAQ,CAAC,GAAG,GAAG;EACf,WAA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AC3B,QAAQ,QAAQ,SAAS"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nsshunt/stsutils",
3
- "version": "1.19.97",
3
+ "version": "1.19.98",
4
4
  "description": "STS Utils",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -19,46 +19,4 @@ export interface ISTSLogger {
19
19
  }
20
20
  export declare const defaultLogger: ISTSLogger;
21
21
  export declare const emptyLogger: ISTSLogger;
22
- export interface IGenericMessageProcessorPayload {
23
- header: string;
24
- messageId: string;
25
- senderId: string;
26
- senderRole: string;
27
- requestPayload: JSONObject;
28
- responsePayload: JSONObject;
29
- pid: string;
30
- messageType: 'REQUEST' | 'RESPONSE';
31
- }
32
- export interface IGenericMessageProcessorWorkerRecord {
33
- messageId: string;
34
- senderId: string;
35
- requestPayload: IGenericMessageProcessorPayload;
36
- responses: Record<string, IGenericMessageProcessorPayload>;
37
- startTime: number;
38
- endTime: number;
39
- timeout: NodeJS.Timeout | null;
40
- callBack: (payload: IGenericMessageProcessorPayload, options: any) => void;
41
- errorCallBack: (payload: IGenericMessageProcessorPayload, option: any) => void;
42
- }
43
- export interface GenericMessageManagerOptions {
44
- logger: ISTSLogger;
45
- requestResponseMessageTimeout: number;
46
- namespace: string;
47
- role: 'SERVER' | 'CLIENT';
48
- groups: string[];
49
- messageSender: (payload: IGenericMessageProcessorPayload, options: any) => void;
50
- ProcessRequestMessage: (payload: IGenericMessageProcessorPayload, options: any) => Promise<JSONObject>;
51
- ProcessResponseMessage?: (reesponses: Record<string, IGenericMessageProcessorPayload>, options: any) => Promise<boolean>;
52
- messageReceiverStart: (options: any) => void;
53
- messageReceiverStop: (options: any) => void;
54
- }
55
- export interface IWebWorderMessageHandlerOptions {
56
- logger: ISTSLogger;
57
- role: 'SERVER' | 'CLIENT';
58
- namespace: string;
59
- groups: string[];
60
- ignoreEvents?: string[];
61
- messagePort: any;
62
- context?: JSONObject;
63
- }
64
22
  //# sourceMappingURL=commonTypes.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CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,WAAW,EAAE,GAAG,CAAA;IAChB,OAAO,CAAC,EAAE,UAAU,CAAA;CACvB"}
1
+ {"version":3,"file":"commonTypes.d.ts","sourceRoot":"","sources":["../src/commonTypes.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,UAAU;IACvB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,GAAG,UAAU,GAAG,SAAS,CAAA;CAC5C;AAED,oBAAY,cAAc;IACzB,IAAI,MAAM;IACV,SAAS,MAAM;IACf,mBAAmB,MAAM;IACzB,aAAa,MAAM;CACnB;AAED,eAAO,MAAM,cAAc,GAAI,aAAa,MAAM,EAAE,EAAE,KAAG,IAexD,CAAA;AAGD,MAAM,WAAW,UAAU;IACvB,KAAK,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;IAC1B,IAAI,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC;CAC7B;AAED,eAAO,MAAM,aAAa,EAAE,UAsB3B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,UAQzB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"dataAccessTypes.d.ts","sourceRoot":"","sources":["../src/dataAccessTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,oBAAY,SAAS;IACjB,OAAO,IAAI;IACX,OAAO,IAAI;IACX,OAAO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Aa,CAAC,CAAC;IAC5B,MAAM,EAAE,WAAW,CAAA;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;IACzG,OAAO,EAAE,UAAU,CAAA;IACnB,KAAK,CAAC,EAAE,uBAAuB,CAAA;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC7B,iBAAiB,EAAE,MAAM,CAAA;IACzB,gBAAgB,EAAE,UAAU,CAAA;IAC5B,mBAAmB,EAAE,OAAO,CAAA;CAC/B"}
package/types/index.d.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  export * from './commonTypes.js';
2
2
  export * from './dataAccessTypes.js';
3
- export * from './errorhandling.js';
4
3
  export * from './sleep.js';
5
- export * from './oauth2terms.js';
6
4
  export * from './stsAxiosConfig.js';
7
5
  export * from './agentManager.js';
8
6
  export declare const isNode: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AAEjC,eAAO,MAAM,MAAM,SAGc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,YAAY,CAAA;AAC1B,cAAc,qBAAqB,CAAA;AACnC,cAAc,mBAAmB,CAAA;AAEjC,eAAO,MAAM,MAAM,SAGc,CAAC"}
package/types/sleep.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  export declare function Sleep(milliseconds?: number): Promise<void>;
2
- export declare function JestSleep(): Promise<void>;
3
2
  //# sourceMappingURL=sleep.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../src/sleep.ts"],"names":[],"mappings":"AAAA,wBAAsB,KAAK,CAAC,YAAY,SAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D;AAGD,wBAAsB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAE/C"}
1
+ {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../src/sleep.ts"],"names":[],"mappings":"AAAA,wBAAsB,KAAK,CAAC,YAAY,SAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9D"}
@@ -1,12 +0,0 @@
1
- export type errorCode = {
2
- code: string;
3
- description: string;
4
- };
5
- export type errorPayload = {
6
- error: string;
7
- error_description: string;
8
- timestamp: number;
9
- details?: unknown;
10
- };
11
- export declare function GetErrorPayload(errorCode: errorCode, details?: unknown): errorPayload;
12
- //# sourceMappingURL=errorhandling.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorhandling.d.ts","sourceRoot":"","sources":["../src/errorhandling.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAGlB,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,GAAE,OAAc,GAAG,YAAY,CAS3F"}
@@ -1,64 +0,0 @@
1
- import { errorCode, errorPayload } from './errorhandling.js';
2
- export declare enum OAuth2ParameterType {
3
- AUDIENCE = "AUDIENCE",// STS Extension
4
- CLIENT_ID = "client_id",
5
- CLIENT_SECRET = "client_secret",
6
- RESPONSE_TYPE = "response_type",
7
- SCOPE = "scope",
8
- STATE = "state",
9
- REDIRECT_URI = "redirect_uri",
10
- ERROR = "error",
11
- ERROR_DESCRIPTION = "error_description",
12
- ERROR_CODES = "error_codes",// STS Extension
13
- ERROR_URI = "error_uri",
14
- GRANT_TYPE = "grant_type",
15
- CODE = "code",
16
- ACCESS_TOKEN = "access_token",
17
- TOKEN_TYPE = "token_type",
18
- EXPIRES_IN = "expires_in",
19
- USERNAME = "username",
20
- PASSWORD = "password",
21
- REFRESH_TOKEN = "refresh_token",
22
- RESPONSE_MODE = "response_mode",// STS Extension
23
- TIMESTAMP = "timestamp",// STS Extension
24
- TRACE_ID = "trace_id",// STS Extension
25
- CORRELATION_ID = "correlation_id"
26
- }
27
- export declare enum OIDCStandardClaim {
28
- SUB = "sub",
29
- NAME = "name",
30
- GIVEN_NAME = "given_name",
31
- FAMILY_NAME = "family_name",
32
- MIDDLE_NAME = "middle_name",
33
- NICKNAME = "nickname",
34
- PREFERRED_USERNAME = "preferred_username",
35
- PROFILE = "profile",
36
- PICTURE = "picture",
37
- WEBSITE = "website",
38
- EMAIL = "email",
39
- EMAIL_VERIFIED = "email_verified",
40
- GENDER = "gender",
41
- BIRTHDATE = "birthdate",
42
- ZONEINFO = "zoneinfo",
43
- LOCALE = "locale",
44
- PHONE_NUMBER = "phone_number",
45
- PHONE_NUMBER_VERIFIED = "phone_number_verified",
46
- ADDRESS = "address",
47
- CLIENT_SECRET = "client_secret",
48
- NONCE = "nonce"
49
- }
50
- export declare enum OIDCAddressClaim {
51
- FORMATTED = "formatted",
52
- STREET_ADDRESS = "street_address",
53
- LOCALITY = "locality",
54
- REGION = "region",
55
- COUNTRY = "country"
56
- }
57
- export declare class OAuth2ParameterErrorType {
58
- static readonly NOT_EQUAL: errorCode;
59
- static readonly NOT_PRESENT: errorCode;
60
- static readonly INVALID_FORMAT: errorCode;
61
- static readonly EXPIRED: errorCode;
62
- }
63
- export declare function compareParameterTypes(source1: string[], source2: string[], authParameterTypes: OAuth2ParameterType[]): errorPayload[];
64
- //# sourceMappingURL=oauth2terms.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"oauth2terms.d.ts","sourceRoot":"","sources":["../src/oauth2terms.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAG5D,oBAAY,mBAAmB;IAC9B,QAAQ,aAAa,CAAE,gBAAgB;IACvC,SAAS,cAAc;IACvB,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,KAAK,UAAU;IACf,KAAK,UAAU;IACf,YAAY,iBAAiB;IAC7B,KAAK,UAAU;IACf,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB,CAAE,gBAAgB;IAC7C,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB,CAAE,gBAAgB;IACjD,SAAS,cAAc,CAAE,gBAAgB;IACzC,QAAQ,aAAa,CAAE,gBAAgB;IACvC,cAAc,mBAAmB;CACjC;AAsBD,oBAAY,iBAAiB;IAC5B,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,kBAAkB,uBAAuB;IACzC,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,cAAc,mBAAmB;IACjC,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,YAAY,iBAAiB;I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