@bigbinary/neeto-playwright-commons 3.3.4 → 3.3.6

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/index.cjs.js CHANGED
@@ -4442,7 +4442,7 @@ var asking = {
4442
4442
  keyStop: 0,
4443
4443
  step: 0
4444
4444
  };
4445
- var auth = {
4445
+ var auth$1 = {
4446
4446
  arity: -2,
4447
4447
  flags: [
4448
4448
  "noscript",
@@ -6976,7 +6976,7 @@ var require$$0$3 = {
6976
6976
  acl: acl,
6977
6977
  append: append,
6978
6978
  asking: asking,
6979
- auth: auth,
6979
+ auth: auth$1,
6980
6980
  bgrewriteaof: bgrewriteaof,
6981
6981
  bgsave: bgsave,
6982
6982
  bitcount: bitcount,
@@ -17611,45 +17611,49 @@ class GooglePage extends IntegrationBase {
17611
17611
  .click();
17612
17612
  await test.expect(signInHeading).toBeHidden({ timeout: 10_000 });
17613
17613
  };
17614
- loginToGoogle = () => withCookieCache("google", this.page.context(), async () => {
17615
- if (ramda.isNil(process.env.GOOGLE_LOGIN_EMAIL) ||
17616
- ramda.isNil(process.env.GOOGLE_LOGIN_PASSWORD)) {
17617
- throw new Error("ENV variable GOOGLE_LOGIN_EMAIL or GOOGLE_LOGIN_PASSWORD is not properly configured");
17618
- }
17619
- await this.page.goto(THIRD_PARTY_ROUTES.google.signin, {
17620
- timeout: 20_000,
17621
- });
17622
- await this.page
17623
- .getByLabel(GOOGLE_LOGIN_TEXTS.emailOrPhone)
17624
- .pressSequentially(process.env.GOOGLE_LOGIN_EMAIL, { delay: 10 });
17625
- await this.page
17626
- .getByRole("button", { name: GOOGLE_LOGIN_TEXTS.next })
17627
- .click();
17628
- await this.page.waitForLoadState("load", { timeout: 25_000 });
17629
- await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.password));
17630
- await test.expect(this.page.getByText(GOOGLE_LOGIN_TEXTS.showPassword)).toBeVisible({ timeout: 10_000 });
17631
- await this.page
17632
- .getByLabel(GOOGLE_LOGIN_TEXTS.enterYourPassword)
17633
- .pressSequentially(process.env.GOOGLE_LOGIN_PASSWORD, {
17634
- delay: 10,
17635
- timeout: 20_000,
17636
- });
17637
- await this.page.getByLabel(GOOGLE_LOGIN_TEXTS.showPassword).click();
17638
- await this.page
17639
- .getByRole("button", { name: GOOGLE_LOGIN_TEXTS.next })
17640
- .click();
17641
- this.page
17642
- .url()
17643
- .includes(THIRD_PARTY_ROUTES.google.challengeSelection) &&
17644
- (await this.page
17645
- .locator(GOOGLE_LOGIN_SELECTORS.totpChallengeSelector)
17646
- .click());
17647
- await this.page.waitForLoadState("load", { timeout: 25_000 });
17648
- await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.totpChallenge));
17649
- await this.enterTotpCode();
17650
- await this.page.waitForLoadState("load", { timeout: 25_000 });
17651
- await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.myAccount));
17652
- }, ["google.com"]);
17614
+ loginToGoogle = async () => {
17615
+ if (IS_DEV_ENV)
17616
+ return;
17617
+ return withCookieCache("google", this.page.context(), async () => {
17618
+ if (ramda.isNil(process.env.GOOGLE_LOGIN_EMAIL) ||
17619
+ ramda.isNil(process.env.GOOGLE_LOGIN_PASSWORD)) {
17620
+ throw new Error("ENV variable GOOGLE_LOGIN_EMAIL or GOOGLE_LOGIN_PASSWORD is not properly configured");
17621
+ }
17622
+ await this.page.goto(THIRD_PARTY_ROUTES.google.signin, {
17623
+ timeout: 20_000,
17624
+ });
17625
+ await this.page
17626
+ .getByLabel(GOOGLE_LOGIN_TEXTS.emailOrPhone)
17627
+ .pressSequentially(process.env.GOOGLE_LOGIN_EMAIL, { delay: 10 });
17628
+ await this.page
17629
+ .getByRole("button", { name: GOOGLE_LOGIN_TEXTS.next })
17630
+ .click();
17631
+ await this.page.waitForLoadState("load", { timeout: 25_000 });
17632
+ await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.password));
17633
+ await test.expect(this.page.getByText(GOOGLE_LOGIN_TEXTS.showPassword)).toBeVisible({ timeout: 10_000 });
17634
+ await this.page
17635
+ .getByLabel(GOOGLE_LOGIN_TEXTS.enterYourPassword)
17636
+ .pressSequentially(process.env.GOOGLE_LOGIN_PASSWORD, {
17637
+ delay: 10,
17638
+ timeout: 20_000,
17639
+ });
17640
+ await this.page.getByLabel(GOOGLE_LOGIN_TEXTS.showPassword).click();
17641
+ await this.page
17642
+ .getByRole("button", { name: GOOGLE_LOGIN_TEXTS.next })
17643
+ .click();
17644
+ this.page
17645
+ .url()
17646
+ .includes(THIRD_PARTY_ROUTES.google.challengeSelection) &&
17647
+ (await this.page
17648
+ .locator(GOOGLE_LOGIN_SELECTORS.totpChallengeSelector)
17649
+ .click());
17650
+ await this.page.waitForLoadState("load", { timeout: 25_000 });
17651
+ await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.totpChallenge));
17652
+ await this.enterTotpCode();
17653
+ await this.page.waitForLoadState("load", { timeout: 25_000 });
17654
+ await this.page.waitForURL(new RegExp(THIRD_PARTY_ROUTES.google.myAccount));
17655
+ }, ["google.com"]);
17656
+ };
17653
17657
  enterTotpCode = async () => {
17654
17658
  let previousToken = null;
17655
17659
  const codeInput = this.page.getByLabel(GOOGLE_LOGIN_TEXTS.enterCode);
@@ -17678,6 +17682,8 @@ class GooglePage extends IntegrationBase {
17678
17682
  }).toPass({ timeout: 2 * 60 * 1000 });
17679
17683
  };
17680
17684
  logoutFromGoogle = async () => {
17685
+ if (IS_DEV_ENV)
17686
+ return;
17681
17687
  await this.page.goto(THIRD_PARTY_ROUTES.google.myAccount, {
17682
17688
  timeout: 20_000,
17683
17689
  });
@@ -65795,7 +65801,7 @@ function isWhitespace(c) {
65795
65801
  * The first dimension represents selectors separated by commas (eg. `sub1, sub2`),
65796
65802
  * the second contains the relevant tokens for that selector.
65797
65803
  */
65798
- function parse$3(selector) {
65804
+ function parse$4(selector) {
65799
65805
  const subselects = [];
65800
65806
  const endIndex = parseSelector(subselects, `${selector}`, 0);
65801
65807
  if (endIndex < selector.length) {
@@ -66272,7 +66278,7 @@ var es = /*#__PURE__*/Object.freeze({
66272
66278
  IgnoreCaseMode: IgnoreCaseMode,
66273
66279
  get SelectorType () { return SelectorType; },
66274
66280
  isTraversal: isTraversal,
66275
- parse: parse$3,
66281
+ parse: parse$4,
66276
66282
  stringify: stringify
66277
66283
  });
66278
66284
 
@@ -66624,16 +66630,16 @@ var filters = {};
66624
66630
 
66625
66631
  var lib$2 = {};
66626
66632
 
66627
- var parse$2 = {};
66633
+ var parse$3 = {};
66628
66634
 
66629
66635
  var hasRequiredParse$1;
66630
66636
 
66631
66637
  function requireParse$1 () {
66632
- if (hasRequiredParse$1) return parse$2;
66638
+ if (hasRequiredParse$1) return parse$3;
66633
66639
  hasRequiredParse$1 = 1;
66634
66640
  // Following http://www.w3.org/TR/css3-selectors/#nth-child-pseudo
66635
- Object.defineProperty(parse$2, "__esModule", { value: true });
66636
- parse$2.parse = void 0;
66641
+ Object.defineProperty(parse$3, "__esModule", { value: true });
66642
+ parse$3.parse = void 0;
66637
66643
  // Whitespace as per https://www.w3.org/TR/selectors-3/#lex is " \t\r\n\f"
66638
66644
  var whitespace = new Set([9, 10, 12, 13, 32]);
66639
66645
  var ZERO = "0".charCodeAt(0);
@@ -66705,9 +66711,9 @@ function requireParse$1 () {
66705
66711
  }
66706
66712
  }
66707
66713
  }
66708
- parse$2.parse = parse;
66714
+ parse$3.parse = parse;
66709
66715
 
66710
- return parse$2;
66716
+ return parse$3;
66711
66717
  }
66712
66718
 
66713
66719
  var compile = {};
@@ -69350,20 +69356,20 @@ function requireHtml () {
69350
69356
  return html;
69351
69357
  }
69352
69358
 
69353
- var parse$1 = {};
69359
+ var parse$2 = {};
69354
69360
 
69355
69361
  var hasRequiredParse;
69356
69362
 
69357
69363
  function requireParse () {
69358
- if (hasRequiredParse) return parse$1;
69364
+ if (hasRequiredParse) return parse$2;
69359
69365
  hasRequiredParse = 1;
69360
69366
  (function (exports$1) {
69361
69367
  Object.defineProperty(exports$1, "__esModule", { value: true });
69362
69368
  exports$1.default = void 0;
69363
69369
  var html_1 = /*@__PURE__*/ requireHtml();
69364
69370
  Object.defineProperty(exports$1, "default", { enumerable: true, get: function () { return html_1.parse; } });
69365
- } (parse$1));
69366
- return parse$1;
69371
+ } (parse$2));
69372
+ return parse$2;
69367
69373
  }
69368
69374
 
69369
69375
  var valid = {};
@@ -117817,27 +117823,1371 @@ const getBasicInfoTestData = () => ({
117817
117823
  imageName: "sample.png",
117818
117824
  });
117819
117825
 
117826
+ function getUserAgent() {
117827
+ if (typeof navigator === "object" && "userAgent" in navigator) {
117828
+ return navigator.userAgent;
117829
+ }
117830
+
117831
+ if (typeof process === "object" && process.version !== undefined) {
117832
+ return `Node.js/${process.version.substr(1)} (${process.platform}; ${
117833
+ process.arch
117834
+ })`;
117835
+ }
117836
+
117837
+ return "<environment undetectable>";
117838
+ }
117839
+
117840
+ // @ts-check
117841
+
117842
+ function register(state, name, method, options) {
117843
+ if (typeof method !== "function") {
117844
+ throw new Error("method for before hook must be a function");
117845
+ }
117846
+
117847
+ if (!options) {
117848
+ options = {};
117849
+ }
117850
+
117851
+ if (Array.isArray(name)) {
117852
+ return name.reverse().reduce((callback, name) => {
117853
+ return register.bind(null, state, name, callback, options);
117854
+ }, method)();
117855
+ }
117856
+
117857
+ return Promise.resolve().then(() => {
117858
+ if (!state.registry[name]) {
117859
+ return method(options);
117860
+ }
117861
+
117862
+ return state.registry[name].reduce((method, registered) => {
117863
+ return registered.hook.bind(null, method, options);
117864
+ }, method)();
117865
+ });
117866
+ }
117867
+
117868
+ // @ts-check
117869
+
117870
+ function addHook(state, kind, name, hook) {
117871
+ const orig = hook;
117872
+ if (!state.registry[name]) {
117873
+ state.registry[name] = [];
117874
+ }
117875
+
117876
+ if (kind === "before") {
117877
+ hook = (method, options) => {
117878
+ return Promise.resolve()
117879
+ .then(orig.bind(null, options))
117880
+ .then(method.bind(null, options));
117881
+ };
117882
+ }
117883
+
117884
+ if (kind === "after") {
117885
+ hook = (method, options) => {
117886
+ let result;
117887
+ return Promise.resolve()
117888
+ .then(method.bind(null, options))
117889
+ .then((result_) => {
117890
+ result = result_;
117891
+ return orig(result, options);
117892
+ })
117893
+ .then(() => {
117894
+ return result;
117895
+ });
117896
+ };
117897
+ }
117898
+
117899
+ if (kind === "error") {
117900
+ hook = (method, options) => {
117901
+ return Promise.resolve()
117902
+ .then(method.bind(null, options))
117903
+ .catch((error) => {
117904
+ return orig(error, options);
117905
+ });
117906
+ };
117907
+ }
117908
+
117909
+ state.registry[name].push({
117910
+ hook: hook,
117911
+ orig: orig,
117912
+ });
117913
+ }
117914
+
117915
+ // @ts-check
117916
+
117917
+ function removeHook(state, name, method) {
117918
+ if (!state.registry[name]) {
117919
+ return;
117920
+ }
117921
+
117922
+ const index = state.registry[name]
117923
+ .map((registered) => {
117924
+ return registered.orig;
117925
+ })
117926
+ .indexOf(method);
117927
+
117928
+ if (index === -1) {
117929
+ return;
117930
+ }
117931
+
117932
+ state.registry[name].splice(index, 1);
117933
+ }
117934
+
117935
+ // @ts-check
117936
+
117937
+
117938
+ // bind with array of arguments: https://stackoverflow.com/a/21792913
117939
+ const bind = Function.bind;
117940
+ const bindable = bind.bind(bind);
117941
+
117942
+ function bindApi(hook, state, name) {
117943
+ const removeHookRef = bindable(removeHook, null).apply(
117944
+ null,
117945
+ [state]
117946
+ );
117947
+ hook.api = { remove: removeHookRef };
117948
+ hook.remove = removeHookRef;
117949
+ ["before", "error", "after", "wrap"].forEach((kind) => {
117950
+ const args = [state, kind];
117951
+ hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args);
117952
+ });
117953
+ }
117954
+
117955
+ function Collection() {
117956
+ const state = {
117957
+ registry: {},
117958
+ };
117959
+
117960
+ const hook = register.bind(null, state);
117961
+ bindApi(hook, state);
117962
+
117963
+ return hook;
117964
+ }
117965
+
117966
+ var Hook = { Collection };
117967
+
117968
+ // pkg/dist-src/defaults.js
117969
+
117970
+ // pkg/dist-src/version.js
117971
+ var VERSION$3 = "0.0.0-development";
117972
+
117973
+ // pkg/dist-src/defaults.js
117974
+ var userAgent = `octokit-endpoint.js/${VERSION$3} ${getUserAgent()}`;
117975
+ var DEFAULTS = {
117976
+ method: "GET",
117977
+ baseUrl: "https://api.github.com",
117978
+ headers: {
117979
+ accept: "application/vnd.github.v3+json",
117980
+ "user-agent": userAgent
117981
+ },
117982
+ mediaType: {
117983
+ format: ""
117984
+ }
117985
+ };
117986
+
117987
+ // pkg/dist-src/util/lowercase-keys.js
117988
+ function lowercaseKeys(object) {
117989
+ if (!object) {
117990
+ return {};
117991
+ }
117992
+ return Object.keys(object).reduce((newObj, key) => {
117993
+ newObj[key.toLowerCase()] = object[key];
117994
+ return newObj;
117995
+ }, {});
117996
+ }
117997
+
117998
+ // pkg/dist-src/util/is-plain-object.js
117999
+ function isPlainObject$1(value) {
118000
+ if (typeof value !== "object" || value === null) return false;
118001
+ if (Object.prototype.toString.call(value) !== "[object Object]") return false;
118002
+ const proto = Object.getPrototypeOf(value);
118003
+ if (proto === null) return true;
118004
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
118005
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
118006
+ }
118007
+
118008
+ // pkg/dist-src/util/merge-deep.js
118009
+ function mergeDeep(defaults, options) {
118010
+ const result = Object.assign({}, defaults);
118011
+ Object.keys(options).forEach((key) => {
118012
+ if (isPlainObject$1(options[key])) {
118013
+ if (!(key in defaults)) Object.assign(result, { [key]: options[key] });
118014
+ else result[key] = mergeDeep(defaults[key], options[key]);
118015
+ } else {
118016
+ Object.assign(result, { [key]: options[key] });
118017
+ }
118018
+ });
118019
+ return result;
118020
+ }
118021
+
118022
+ // pkg/dist-src/util/remove-undefined-properties.js
118023
+ function removeUndefinedProperties(obj) {
118024
+ for (const key in obj) {
118025
+ if (obj[key] === void 0) {
118026
+ delete obj[key];
118027
+ }
118028
+ }
118029
+ return obj;
118030
+ }
118031
+
118032
+ // pkg/dist-src/merge.js
118033
+ function merge$1(defaults, route, options) {
118034
+ if (typeof route === "string") {
118035
+ let [method, url] = route.split(" ");
118036
+ options = Object.assign(url ? { method, url } : { url: method }, options);
118037
+ } else {
118038
+ options = Object.assign({}, route);
118039
+ }
118040
+ options.headers = lowercaseKeys(options.headers);
118041
+ removeUndefinedProperties(options);
118042
+ removeUndefinedProperties(options.headers);
118043
+ const mergedOptions = mergeDeep(defaults || {}, options);
118044
+ if (options.url === "/graphql") {
118045
+ if (defaults && defaults.mediaType.previews?.length) {
118046
+ mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(
118047
+ (preview) => !mergedOptions.mediaType.previews.includes(preview)
118048
+ ).concat(mergedOptions.mediaType.previews);
118049
+ }
118050
+ mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, ""));
118051
+ }
118052
+ return mergedOptions;
118053
+ }
118054
+
118055
+ // pkg/dist-src/util/add-query-parameters.js
118056
+ function addQueryParameters(url, parameters) {
118057
+ const separator = /\?/.test(url) ? "&" : "?";
118058
+ const names = Object.keys(parameters);
118059
+ if (names.length === 0) {
118060
+ return url;
118061
+ }
118062
+ return url + separator + names.map((name) => {
118063
+ if (name === "q") {
118064
+ return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
118065
+ }
118066
+ return `${name}=${encodeURIComponent(parameters[name])}`;
118067
+ }).join("&");
118068
+ }
118069
+
118070
+ // pkg/dist-src/util/extract-url-variable-names.js
118071
+ var urlVariableRegex = /\{[^{}}]+\}/g;
118072
+ function removeNonChars(variableName) {
118073
+ return variableName.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
118074
+ }
118075
+ function extractUrlVariableNames(url) {
118076
+ const matches = url.match(urlVariableRegex);
118077
+ if (!matches) {
118078
+ return [];
118079
+ }
118080
+ return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);
118081
+ }
118082
+
118083
+ // pkg/dist-src/util/omit.js
118084
+ function omit(object, keysToOmit) {
118085
+ const result = { __proto__: null };
118086
+ for (const key of Object.keys(object)) {
118087
+ if (keysToOmit.indexOf(key) === -1) {
118088
+ result[key] = object[key];
118089
+ }
118090
+ }
118091
+ return result;
118092
+ }
118093
+
118094
+ // pkg/dist-src/util/url-template.js
118095
+ function encodeReserved(str) {
118096
+ return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {
118097
+ if (!/%[0-9A-Fa-f]/.test(part)) {
118098
+ part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
118099
+ }
118100
+ return part;
118101
+ }).join("");
118102
+ }
118103
+ function encodeUnreserved(str) {
118104
+ return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
118105
+ return "%" + c.charCodeAt(0).toString(16).toUpperCase();
118106
+ });
118107
+ }
118108
+ function encodeValue(operator, value, key) {
118109
+ value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value);
118110
+ if (key) {
118111
+ return encodeUnreserved(key) + "=" + value;
118112
+ } else {
118113
+ return value;
118114
+ }
118115
+ }
118116
+ function isDefined(value) {
118117
+ return value !== void 0 && value !== null;
118118
+ }
118119
+ function isKeyOperator(operator) {
118120
+ return operator === ";" || operator === "&" || operator === "?";
118121
+ }
118122
+ function getValues(context, operator, key, modifier) {
118123
+ var value = context[key], result = [];
118124
+ if (isDefined(value) && value !== "") {
118125
+ if (typeof value === "string" || typeof value === "number" || typeof value === "bigint" || typeof value === "boolean") {
118126
+ value = value.toString();
118127
+ if (modifier && modifier !== "*") {
118128
+ value = value.substring(0, parseInt(modifier, 10));
118129
+ }
118130
+ result.push(
118131
+ encodeValue(operator, value, isKeyOperator(operator) ? key : "")
118132
+ );
118133
+ } else {
118134
+ if (modifier === "*") {
118135
+ if (Array.isArray(value)) {
118136
+ value.filter(isDefined).forEach(function(value2) {
118137
+ result.push(
118138
+ encodeValue(operator, value2, isKeyOperator(operator) ? key : "")
118139
+ );
118140
+ });
118141
+ } else {
118142
+ Object.keys(value).forEach(function(k) {
118143
+ if (isDefined(value[k])) {
118144
+ result.push(encodeValue(operator, value[k], k));
118145
+ }
118146
+ });
118147
+ }
118148
+ } else {
118149
+ const tmp = [];
118150
+ if (Array.isArray(value)) {
118151
+ value.filter(isDefined).forEach(function(value2) {
118152
+ tmp.push(encodeValue(operator, value2));
118153
+ });
118154
+ } else {
118155
+ Object.keys(value).forEach(function(k) {
118156
+ if (isDefined(value[k])) {
118157
+ tmp.push(encodeUnreserved(k));
118158
+ tmp.push(encodeValue(operator, value[k].toString()));
118159
+ }
118160
+ });
118161
+ }
118162
+ if (isKeyOperator(operator)) {
118163
+ result.push(encodeUnreserved(key) + "=" + tmp.join(","));
118164
+ } else if (tmp.length !== 0) {
118165
+ result.push(tmp.join(","));
118166
+ }
118167
+ }
118168
+ }
118169
+ } else {
118170
+ if (operator === ";") {
118171
+ if (isDefined(value)) {
118172
+ result.push(encodeUnreserved(key));
118173
+ }
118174
+ } else if (value === "" && (operator === "&" || operator === "?")) {
118175
+ result.push(encodeUnreserved(key) + "=");
118176
+ } else if (value === "") {
118177
+ result.push("");
118178
+ }
118179
+ }
118180
+ return result;
118181
+ }
118182
+ function parseUrl(template) {
118183
+ return {
118184
+ expand: expand.bind(null, template)
118185
+ };
118186
+ }
118187
+ function expand(template, context) {
118188
+ var operators = ["+", "#", ".", "/", ";", "?", "&"];
118189
+ template = template.replace(
118190
+ /\{([^\{\}]+)\}|([^\{\}]+)/g,
118191
+ function(_, expression, literal) {
118192
+ if (expression) {
118193
+ let operator = "";
118194
+ const values = [];
118195
+ if (operators.indexOf(expression.charAt(0)) !== -1) {
118196
+ operator = expression.charAt(0);
118197
+ expression = expression.substr(1);
118198
+ }
118199
+ expression.split(/,/g).forEach(function(variable) {
118200
+ var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
118201
+ values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
118202
+ });
118203
+ if (operator && operator !== "+") {
118204
+ var separator = ",";
118205
+ if (operator === "?") {
118206
+ separator = "&";
118207
+ } else if (operator !== "#") {
118208
+ separator = operator;
118209
+ }
118210
+ return (values.length !== 0 ? operator : "") + values.join(separator);
118211
+ } else {
118212
+ return values.join(",");
118213
+ }
118214
+ } else {
118215
+ return encodeReserved(literal);
118216
+ }
118217
+ }
118218
+ );
118219
+ if (template === "/") {
118220
+ return template;
118221
+ } else {
118222
+ return template.replace(/\/$/, "");
118223
+ }
118224
+ }
118225
+
118226
+ // pkg/dist-src/parse.js
118227
+ function parse$1(options) {
118228
+ let method = options.method.toUpperCase();
118229
+ let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
118230
+ let headers = Object.assign({}, options.headers);
118231
+ let body;
118232
+ let parameters = omit(options, [
118233
+ "method",
118234
+ "baseUrl",
118235
+ "url",
118236
+ "headers",
118237
+ "request",
118238
+ "mediaType"
118239
+ ]);
118240
+ const urlVariableNames = extractUrlVariableNames(url);
118241
+ url = parseUrl(url).expand(parameters);
118242
+ if (!/^http/.test(url)) {
118243
+ url = options.baseUrl + url;
118244
+ }
118245
+ const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl");
118246
+ const remainingParameters = omit(parameters, omittedParameters);
118247
+ const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
118248
+ if (!isBinaryRequest) {
118249
+ if (options.mediaType.format) {
118250
+ headers.accept = headers.accept.split(/,/).map(
118251
+ (format) => format.replace(
118252
+ /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,
118253
+ `application/vnd$1$2.${options.mediaType.format}`
118254
+ )
118255
+ ).join(",");
118256
+ }
118257
+ if (url.endsWith("/graphql")) {
118258
+ if (options.mediaType.previews?.length) {
118259
+ const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g) || [];
118260
+ headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
118261
+ const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
118262
+ return `application/vnd.github.${preview}-preview${format}`;
118263
+ }).join(",");
118264
+ }
118265
+ }
118266
+ }
118267
+ if (["GET", "HEAD"].includes(method)) {
118268
+ url = addQueryParameters(url, remainingParameters);
118269
+ } else {
118270
+ if ("data" in remainingParameters) {
118271
+ body = remainingParameters.data;
118272
+ } else {
118273
+ if (Object.keys(remainingParameters).length) {
118274
+ body = remainingParameters;
118275
+ }
118276
+ }
118277
+ }
118278
+ if (!headers["content-type"] && typeof body !== "undefined") {
118279
+ headers["content-type"] = "application/json; charset=utf-8";
118280
+ }
118281
+ if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
118282
+ body = "";
118283
+ }
118284
+ return Object.assign(
118285
+ { method, url, headers },
118286
+ typeof body !== "undefined" ? { body } : null,
118287
+ options.request ? { request: options.request } : null
118288
+ );
118289
+ }
118290
+
118291
+ // pkg/dist-src/endpoint-with-defaults.js
118292
+ function endpointWithDefaults(defaults, route, options) {
118293
+ return parse$1(merge$1(defaults, route, options));
118294
+ }
118295
+
118296
+ // pkg/dist-src/with-defaults.js
118297
+ function withDefaults$2(oldDefaults, newDefaults) {
118298
+ const DEFAULTS2 = merge$1(oldDefaults, newDefaults);
118299
+ const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);
118300
+ return Object.assign(endpoint2, {
118301
+ DEFAULTS: DEFAULTS2,
118302
+ defaults: withDefaults$2.bind(null, DEFAULTS2),
118303
+ merge: merge$1.bind(null, DEFAULTS2),
118304
+ parse: parse$1
118305
+ });
118306
+ }
118307
+
118308
+ // pkg/dist-src/index.js
118309
+ var endpoint = withDefaults$2(null, DEFAULTS);
118310
+
118311
+ var fastContentTypeParse = {};
118312
+
118313
+ var hasRequiredFastContentTypeParse;
118314
+
118315
+ function requireFastContentTypeParse () {
118316
+ if (hasRequiredFastContentTypeParse) return fastContentTypeParse;
118317
+ hasRequiredFastContentTypeParse = 1;
118318
+
118319
+ const NullObject = function NullObject () { };
118320
+ NullObject.prototype = Object.create(null);
118321
+
118322
+ /**
118323
+ * RegExp to match *( ";" parameter ) in RFC 7231 sec 3.1.1.1
118324
+ *
118325
+ * parameter = token "=" ( token / quoted-string )
118326
+ * token = 1*tchar
118327
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*"
118328
+ * / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
118329
+ * / DIGIT / ALPHA
118330
+ * ; any VCHAR, except delimiters
118331
+ * quoted-string = DQUOTE *( qdtext / quoted-pair ) DQUOTE
118332
+ * qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text
118333
+ * obs-text = %x80-FF
118334
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
118335
+ */
118336
+ const paramRE = /; *([!#$%&'*+.^\w`|~-]+)=("(?:[\v\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\v\u0020-\u00ff])*"|[!#$%&'*+.^\w`|~-]+) */gu;
118337
+
118338
+ /**
118339
+ * RegExp to match quoted-pair in RFC 7230 sec 3.2.6
118340
+ *
118341
+ * quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )
118342
+ * obs-text = %x80-FF
118343
+ */
118344
+ const quotedPairRE = /\\([\v\u0020-\u00ff])/gu;
118345
+
118346
+ /**
118347
+ * RegExp to match type in RFC 7231 sec 3.1.1.1
118348
+ *
118349
+ * media-type = type "/" subtype
118350
+ * type = token
118351
+ * subtype = token
118352
+ */
118353
+ const mediaTypeRE = /^[!#$%&'*+.^\w|~-]+\/[!#$%&'*+.^\w|~-]+$/u;
118354
+
118355
+ // default ContentType to prevent repeated object creation
118356
+ const defaultContentType = { type: '', parameters: new NullObject() };
118357
+ Object.freeze(defaultContentType.parameters);
118358
+ Object.freeze(defaultContentType);
118359
+
118360
+ /**
118361
+ * Parse media type to object.
118362
+ *
118363
+ * @param {string|object} header
118364
+ * @return {Object}
118365
+ * @public
118366
+ */
118367
+
118368
+ function parse (header) {
118369
+ if (typeof header !== 'string') {
118370
+ throw new TypeError('argument header is required and must be a string')
118371
+ }
118372
+
118373
+ let index = header.indexOf(';');
118374
+ const type = index !== -1
118375
+ ? header.slice(0, index).trim()
118376
+ : header.trim();
118377
+
118378
+ if (mediaTypeRE.test(type) === false) {
118379
+ throw new TypeError('invalid media type')
118380
+ }
118381
+
118382
+ const result = {
118383
+ type: type.toLowerCase(),
118384
+ parameters: new NullObject()
118385
+ };
118386
+
118387
+ // parse parameters
118388
+ if (index === -1) {
118389
+ return result
118390
+ }
118391
+
118392
+ let key;
118393
+ let match;
118394
+ let value;
118395
+
118396
+ paramRE.lastIndex = index;
118397
+
118398
+ while ((match = paramRE.exec(header))) {
118399
+ if (match.index !== index) {
118400
+ throw new TypeError('invalid parameter format')
118401
+ }
118402
+
118403
+ index += match[0].length;
118404
+ key = match[1].toLowerCase();
118405
+ value = match[2];
118406
+
118407
+ if (value[0] === '"') {
118408
+ // remove quotes and escapes
118409
+ value = value
118410
+ .slice(1, value.length - 1);
118411
+
118412
+ quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'));
118413
+ }
118414
+
118415
+ result.parameters[key] = value;
118416
+ }
118417
+
118418
+ if (index !== header.length) {
118419
+ throw new TypeError('invalid parameter format')
118420
+ }
118421
+
118422
+ return result
118423
+ }
118424
+
118425
+ function safeParse (header) {
118426
+ if (typeof header !== 'string') {
118427
+ return defaultContentType
118428
+ }
118429
+
118430
+ let index = header.indexOf(';');
118431
+ const type = index !== -1
118432
+ ? header.slice(0, index).trim()
118433
+ : header.trim();
118434
+
118435
+ if (mediaTypeRE.test(type) === false) {
118436
+ return defaultContentType
118437
+ }
118438
+
118439
+ const result = {
118440
+ type: type.toLowerCase(),
118441
+ parameters: new NullObject()
118442
+ };
118443
+
118444
+ // parse parameters
118445
+ if (index === -1) {
118446
+ return result
118447
+ }
118448
+
118449
+ let key;
118450
+ let match;
118451
+ let value;
118452
+
118453
+ paramRE.lastIndex = index;
118454
+
118455
+ while ((match = paramRE.exec(header))) {
118456
+ if (match.index !== index) {
118457
+ return defaultContentType
118458
+ }
118459
+
118460
+ index += match[0].length;
118461
+ key = match[1].toLowerCase();
118462
+ value = match[2];
118463
+
118464
+ if (value[0] === '"') {
118465
+ // remove quotes and escapes
118466
+ value = value
118467
+ .slice(1, value.length - 1);
118468
+
118469
+ quotedPairRE.test(value) && (value = value.replace(quotedPairRE, '$1'));
118470
+ }
118471
+
118472
+ result.parameters[key] = value;
118473
+ }
118474
+
118475
+ if (index !== header.length) {
118476
+ return defaultContentType
118477
+ }
118478
+
118479
+ return result
118480
+ }
118481
+
118482
+ fastContentTypeParse.default = { parse, safeParse };
118483
+ fastContentTypeParse.parse = parse;
118484
+ fastContentTypeParse.safeParse = safeParse;
118485
+ fastContentTypeParse.defaultContentType = defaultContentType;
118486
+ return fastContentTypeParse;
118487
+ }
118488
+
118489
+ var fastContentTypeParseExports = requireFastContentTypeParse();
118490
+
118491
+ const intRegex = /^-?\d+$/;
118492
+ const noiseValue = /^-?\d+n+$/; // Noise - strings that match the custom format before being converted to it
118493
+ const originalStringify = JSON.stringify;
118494
+ const originalParse = JSON.parse;
118495
+ const customFormat = /^-?\d+n$/;
118496
+
118497
+ const bigIntsStringify = /([\[:])?"(-?\d+)n"($|([\\n]|\s)*(\s|[\\n])*[,\}\]])/g;
118498
+ const noiseStringify =
118499
+ /([\[:])?("-?\d+n+)n("$|"([\\n]|\s)*(\s|[\\n])*[,\}\]])/g;
118500
+
118501
+ /** @typedef {(key: string, value: any, context?: { source: string }) => any} Reviver */
118502
+
118503
+ /**
118504
+ * Function to serialize value to a JSON string.
118505
+ * Converts BigInt values to a custom format (strings with digits and "n" at the end) and then converts them to proper big integers in a JSON string.
118506
+ * @param {*} value - The value to convert to a JSON string.
118507
+ * @param {(Function|Array<string>|null)} [replacer] - A function that alters the behavior of the stringification process, or an array of strings to indicate properties to exclude.
118508
+ * @param {(string|number)} [space] - A string or number to specify indentation or pretty-printing.
118509
+ * @returns {string} The JSON string representation.
118510
+ */
118511
+ const JSONStringify = (value, replacer, space) => {
118512
+ if ("rawJSON" in JSON) {
118513
+ return originalStringify(
118514
+ value,
118515
+ (key, value) => {
118516
+ if (typeof value === "bigint") return JSON.rawJSON(value.toString());
118517
+
118518
+ if (Array.isArray(replacer) && replacer.includes(key)) return value;
118519
+
118520
+ return value;
118521
+ },
118522
+ space,
118523
+ );
118524
+ }
118525
+
118526
+ if (!value) return originalStringify(value, replacer, space);
118527
+
118528
+ const convertedToCustomJSON = originalStringify(
118529
+ value,
118530
+ (key, value) => {
118531
+ const isNoise =
118532
+ typeof value === "string" && Boolean(value.match(noiseValue));
118533
+
118534
+ if (isNoise) return value.toString() + "n"; // Mark noise values with additional "n" to offset the deletion of one "n" during the processing
118535
+
118536
+ if (typeof value === "bigint") return value.toString() + "n";
118537
+
118538
+ if (Array.isArray(replacer) && replacer.includes(key)) return value;
118539
+
118540
+ return value;
118541
+ },
118542
+ space,
118543
+ );
118544
+ const processedJSON = convertedToCustomJSON.replace(
118545
+ bigIntsStringify,
118546
+ "$1$2$3",
118547
+ ); // Delete one "n" off the end of every BigInt value
118548
+ const denoisedJSON = processedJSON.replace(noiseStringify, "$1$2$3"); // Remove one "n" off the end of every noisy string
118549
+
118550
+ return denoisedJSON;
118551
+ };
118552
+
118553
+ /**
118554
+ * Support for JSON.parse's context.source feature detection.
118555
+ * @type {boolean}
118556
+ */
118557
+ const isContextSourceSupported = () =>
118558
+ JSON.parse("1", (_, __, context) => !!context && context.source === "1");
118559
+
118560
+ /**
118561
+ * Convert marked big numbers to BigInt
118562
+ * @type {Reviver}
118563
+ */
118564
+ const convertMarkedBigIntsReviver = (key, value, context, userReviver) => {
118565
+ const isCustomFormatBigInt =
118566
+ typeof value === "string" && value.match(customFormat);
118567
+ if (isCustomFormatBigInt) return BigInt(value.slice(0, -1));
118568
+
118569
+ const isNoiseValue = typeof value === "string" && value.match(noiseValue);
118570
+ if (isNoiseValue) return value.slice(0, -1);
118571
+
118572
+ return value;
118573
+ };
118574
+
118575
+ /**
118576
+ * Faster (2x) and simpler function to parse JSON.
118577
+ * Based on JSON.parse's context.source feature, which is not universally available now.
118578
+ * Does not support the legacy custom format, used in the first version of this library.
118579
+ */
118580
+ const JSONParseV2 = (text, reviver) => {
118581
+ return JSON.parse(text, (key, value, context) => {
118582
+ const isBigNumber =
118583
+ typeof value === "number" &&
118584
+ (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER);
118585
+ const isInt = context && intRegex.test(context.source);
118586
+ const isBigInt = isBigNumber && isInt;
118587
+
118588
+ if (isBigInt) return BigInt(context.source);
118589
+
118590
+ return value;
118591
+ });
118592
+ };
118593
+
118594
+ const MAX_INT = Number.MAX_SAFE_INTEGER.toString();
118595
+ const MAX_DIGITS = MAX_INT.length;
118596
+ const stringsOrLargeNumbers =
118597
+ /"(?:\\.|[^"])*"|-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][+-]?[0-9]+)?/g;
118598
+ const noiseValueWithQuotes = /^"-?\d+n+"$/; // Noise - strings that match the custom format before being converted to it
118599
+
118600
+ /**
118601
+ * Function to parse JSON.
118602
+ * If JSON has number values greater than Number.MAX_SAFE_INTEGER, we convert those values to a custom format, then parse them to BigInt values.
118603
+ * Other types of values are not affected and parsed as native JSON.parse() would parse them.
118604
+ */
118605
+ const JSONParse = (text, reviver) => {
118606
+ if (!text) return originalParse(text, reviver);
118607
+
118608
+ if (isContextSourceSupported()) return JSONParseV2(text); // Shortcut to a faster (2x) and simpler version
118609
+
118610
+ // Find and mark big numbers with "n"
118611
+ const serializedData = text.replace(
118612
+ stringsOrLargeNumbers,
118613
+ (text, digits, fractional, exponential) => {
118614
+ const isString = text[0] === '"';
118615
+ const isNoise = isString && Boolean(text.match(noiseValueWithQuotes));
118616
+
118617
+ if (isNoise) return text.substring(0, text.length - 1) + 'n"'; // Mark noise values with additional "n" to offset the deletion of one "n" during the processing
118618
+
118619
+ const isFractionalOrExponential = fractional || exponential;
118620
+ const isLessThanMaxSafeInt =
118621
+ digits &&
118622
+ (digits.length < MAX_DIGITS ||
118623
+ (digits.length === MAX_DIGITS && digits <= MAX_INT)); // With a fixed number of digits, we can correctly use lexicographical comparison to do a numeric comparison
118624
+
118625
+ if (isString || isFractionalOrExponential || isLessThanMaxSafeInt)
118626
+ return text;
118627
+
118628
+ return '"' + text + 'n"';
118629
+ },
118630
+ );
118631
+
118632
+ return originalParse(serializedData, (key, value, context) =>
118633
+ convertMarkedBigIntsReviver(key, value),
118634
+ );
118635
+ };
118636
+
118637
+ class RequestError extends Error {
118638
+ name;
118639
+ /**
118640
+ * http status code
118641
+ */
118642
+ status;
118643
+ /**
118644
+ * Request options that lead to the error.
118645
+ */
118646
+ request;
118647
+ /**
118648
+ * Response object if a response was received
118649
+ */
118650
+ response;
118651
+ constructor(message, statusCode, options) {
118652
+ super(message, { cause: options.cause });
118653
+ this.name = "HttpError";
118654
+ this.status = Number.parseInt(statusCode);
118655
+ if (Number.isNaN(this.status)) {
118656
+ this.status = 0;
118657
+ }
118658
+ /* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist */
118659
+ if ("response" in options) {
118660
+ this.response = options.response;
118661
+ }
118662
+ const requestCopy = Object.assign({}, options.request);
118663
+ if (options.request.headers.authorization) {
118664
+ requestCopy.headers = Object.assign({}, options.request.headers, {
118665
+ authorization: options.request.headers.authorization.replace(
118666
+ /(?<! ) .*$/,
118667
+ " [REDACTED]"
118668
+ )
118669
+ });
118670
+ }
118671
+ requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
118672
+ this.request = requestCopy;
118673
+ }
118674
+ }
118675
+
118676
+ // pkg/dist-src/index.js
118677
+
118678
+ // pkg/dist-src/version.js
118679
+ var VERSION$2 = "10.0.8";
118680
+
118681
+ // pkg/dist-src/defaults.js
118682
+ var defaults_default = {
118683
+ headers: {
118684
+ "user-agent": `octokit-request.js/${VERSION$2} ${getUserAgent()}`
118685
+ }
118686
+ };
118687
+
118688
+ // pkg/dist-src/is-plain-object.js
118689
+ function isPlainObject(value) {
118690
+ if (typeof value !== "object" || value === null) return false;
118691
+ if (Object.prototype.toString.call(value) !== "[object Object]") return false;
118692
+ const proto = Object.getPrototypeOf(value);
118693
+ if (proto === null) return true;
118694
+ const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
118695
+ return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
118696
+ }
118697
+ var noop$1 = () => "";
118698
+ async function fetchWrapper(requestOptions) {
118699
+ const fetch = requestOptions.request?.fetch || globalThis.fetch;
118700
+ if (!fetch) {
118701
+ throw new Error(
118702
+ "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
118703
+ );
118704
+ }
118705
+ const log = requestOptions.request?.log || console;
118706
+ const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
118707
+ const body = isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body) ? JSONStringify(requestOptions.body) : requestOptions.body;
118708
+ const requestHeaders = Object.fromEntries(
118709
+ Object.entries(requestOptions.headers).map(([name, value]) => [
118710
+ name,
118711
+ String(value)
118712
+ ])
118713
+ );
118714
+ let fetchResponse;
118715
+ try {
118716
+ fetchResponse = await fetch(requestOptions.url, {
118717
+ method: requestOptions.method,
118718
+ body,
118719
+ redirect: requestOptions.request?.redirect,
118720
+ headers: requestHeaders,
118721
+ signal: requestOptions.request?.signal,
118722
+ // duplex must be set if request.body is ReadableStream or Async Iterables.
118723
+ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
118724
+ ...requestOptions.body && { duplex: "half" }
118725
+ });
118726
+ } catch (error) {
118727
+ let message = "Unknown Error";
118728
+ if (error instanceof Error) {
118729
+ if (error.name === "AbortError") {
118730
+ error.status = 500;
118731
+ throw error;
118732
+ }
118733
+ message = error.message;
118734
+ if (error.name === "TypeError" && "cause" in error) {
118735
+ if (error.cause instanceof Error) {
118736
+ message = error.cause.message;
118737
+ } else if (typeof error.cause === "string") {
118738
+ message = error.cause;
118739
+ }
118740
+ }
118741
+ }
118742
+ const requestError = new RequestError(message, 500, {
118743
+ request: requestOptions
118744
+ });
118745
+ requestError.cause = error;
118746
+ throw requestError;
118747
+ }
118748
+ const status = fetchResponse.status;
118749
+ const url = fetchResponse.url;
118750
+ const responseHeaders = {};
118751
+ for (const [key, value] of fetchResponse.headers) {
118752
+ responseHeaders[key] = value;
118753
+ }
118754
+ const octokitResponse = {
118755
+ url,
118756
+ status,
118757
+ headers: responseHeaders,
118758
+ data: ""
118759
+ };
118760
+ if ("deprecation" in responseHeaders) {
118761
+ const matches = responseHeaders.link && responseHeaders.link.match(/<([^<>]+)>; rel="deprecation"/);
118762
+ const deprecationLink = matches && matches.pop();
118763
+ log.warn(
118764
+ `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
118765
+ );
118766
+ }
118767
+ if (status === 204 || status === 205) {
118768
+ return octokitResponse;
118769
+ }
118770
+ if (requestOptions.method === "HEAD") {
118771
+ if (status < 400) {
118772
+ return octokitResponse;
118773
+ }
118774
+ throw new RequestError(fetchResponse.statusText, status, {
118775
+ response: octokitResponse,
118776
+ request: requestOptions
118777
+ });
118778
+ }
118779
+ if (status === 304) {
118780
+ octokitResponse.data = await getResponseData(fetchResponse);
118781
+ throw new RequestError("Not modified", status, {
118782
+ response: octokitResponse,
118783
+ request: requestOptions
118784
+ });
118785
+ }
118786
+ if (status >= 400) {
118787
+ octokitResponse.data = await getResponseData(fetchResponse);
118788
+ throw new RequestError(toErrorMessage(octokitResponse.data), status, {
118789
+ response: octokitResponse,
118790
+ request: requestOptions
118791
+ });
118792
+ }
118793
+ octokitResponse.data = parseSuccessResponseBody ? await getResponseData(fetchResponse) : fetchResponse.body;
118794
+ return octokitResponse;
118795
+ }
118796
+ async function getResponseData(response) {
118797
+ const contentType = response.headers.get("content-type");
118798
+ if (!contentType) {
118799
+ return response.text().catch(noop$1);
118800
+ }
118801
+ const mimetype = fastContentTypeParseExports.safeParse(contentType);
118802
+ if (isJSONResponse(mimetype)) {
118803
+ let text = "";
118804
+ try {
118805
+ text = await response.text();
118806
+ return JSONParse(text);
118807
+ } catch (err) {
118808
+ return text;
118809
+ }
118810
+ } else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") {
118811
+ return response.text().catch(noop$1);
118812
+ } else {
118813
+ return response.arrayBuffer().catch(
118814
+ /* v8 ignore next -- @preserve */
118815
+ () => new ArrayBuffer(0)
118816
+ );
118817
+ }
118818
+ }
118819
+ function isJSONResponse(mimetype) {
118820
+ return mimetype.type === "application/json" || mimetype.type === "application/scim+json";
118821
+ }
118822
+ function toErrorMessage(data) {
118823
+ if (typeof data === "string") {
118824
+ return data;
118825
+ }
118826
+ if (data instanceof ArrayBuffer) {
118827
+ return "Unknown error";
118828
+ }
118829
+ if ("message" in data) {
118830
+ const suffix = "documentation_url" in data ? ` - ${data.documentation_url}` : "";
118831
+ return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${data.message}${suffix}`;
118832
+ }
118833
+ return `Unknown error: ${JSON.stringify(data)}`;
118834
+ }
118835
+
118836
+ // pkg/dist-src/with-defaults.js
118837
+ function withDefaults$1(oldEndpoint, newDefaults) {
118838
+ const endpoint2 = oldEndpoint.defaults(newDefaults);
118839
+ const newApi = function(route, parameters) {
118840
+ const endpointOptions = endpoint2.merge(route, parameters);
118841
+ if (!endpointOptions.request || !endpointOptions.request.hook) {
118842
+ return fetchWrapper(endpoint2.parse(endpointOptions));
118843
+ }
118844
+ const request2 = (route2, parameters2) => {
118845
+ return fetchWrapper(
118846
+ endpoint2.parse(endpoint2.merge(route2, parameters2))
118847
+ );
118848
+ };
118849
+ Object.assign(request2, {
118850
+ endpoint: endpoint2,
118851
+ defaults: withDefaults$1.bind(null, endpoint2)
118852
+ });
118853
+ return endpointOptions.request.hook(request2, endpointOptions);
118854
+ };
118855
+ return Object.assign(newApi, {
118856
+ endpoint: endpoint2,
118857
+ defaults: withDefaults$1.bind(null, endpoint2)
118858
+ });
118859
+ }
118860
+
118861
+ // pkg/dist-src/index.js
118862
+ var request = withDefaults$1(endpoint, defaults_default);
118863
+ /* v8 ignore next -- @preserve */
118864
+ /* v8 ignore else -- @preserve */
118865
+
118866
+ // pkg/dist-src/index.js
118867
+
118868
+ // pkg/dist-src/version.js
118869
+ var VERSION$1 = "0.0.0-development";
118870
+
118871
+ // pkg/dist-src/error.js
118872
+ function _buildMessageForResponseErrors(data) {
118873
+ return `Request failed due to following response errors:
118874
+ ` + data.errors.map((e) => ` - ${e.message}`).join("\n");
118875
+ }
118876
+ var GraphqlResponseError = class extends Error {
118877
+ constructor(request2, headers, response) {
118878
+ super(_buildMessageForResponseErrors(response));
118879
+ this.request = request2;
118880
+ this.headers = headers;
118881
+ this.response = response;
118882
+ this.errors = response.errors;
118883
+ this.data = response.data;
118884
+ if (Error.captureStackTrace) {
118885
+ Error.captureStackTrace(this, this.constructor);
118886
+ }
118887
+ }
118888
+ name = "GraphqlResponseError";
118889
+ errors;
118890
+ data;
118891
+ };
118892
+
118893
+ // pkg/dist-src/graphql.js
118894
+ var NON_VARIABLE_OPTIONS = [
118895
+ "method",
118896
+ "baseUrl",
118897
+ "url",
118898
+ "headers",
118899
+ "request",
118900
+ "query",
118901
+ "mediaType",
118902
+ "operationName"
118903
+ ];
118904
+ var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
118905
+ var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
118906
+ function graphql(request2, query, options) {
118907
+ if (options) {
118908
+ if (typeof query === "string" && "query" in options) {
118909
+ return Promise.reject(
118910
+ new Error(`[@octokit/graphql] "query" cannot be used as variable name`)
118911
+ );
118912
+ }
118913
+ for (const key in options) {
118914
+ if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
118915
+ return Promise.reject(
118916
+ new Error(
118917
+ `[@octokit/graphql] "${key}" cannot be used as variable name`
118918
+ )
118919
+ );
118920
+ }
118921
+ }
118922
+ const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;
118923
+ const requestOptions = Object.keys(
118924
+ parsedOptions
118925
+ ).reduce((result, key) => {
118926
+ if (NON_VARIABLE_OPTIONS.includes(key)) {
118927
+ result[key] = parsedOptions[key];
118928
+ return result;
118929
+ }
118930
+ if (!result.variables) {
118931
+ result.variables = {};
118932
+ }
118933
+ result.variables[key] = parsedOptions[key];
118934
+ return result;
118935
+ }, {});
118936
+ const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;
118937
+ if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
118938
+ requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
118939
+ }
118940
+ return request2(requestOptions).then((response) => {
118941
+ if (response.data.errors) {
118942
+ const headers = {};
118943
+ for (const key of Object.keys(response.headers)) {
118944
+ headers[key] = response.headers[key];
118945
+ }
118946
+ throw new GraphqlResponseError(
118947
+ requestOptions,
118948
+ headers,
118949
+ response.data
118950
+ );
118951
+ }
118952
+ return response.data.data;
118953
+ });
118954
+ }
118955
+
118956
+ // pkg/dist-src/with-defaults.js
118957
+ function withDefaults(request2, newDefaults) {
118958
+ const newRequest = request2.defaults(newDefaults);
118959
+ const newApi = (query, options) => {
118960
+ return graphql(newRequest, query, options);
118961
+ };
118962
+ return Object.assign(newApi, {
118963
+ defaults: withDefaults.bind(null, newRequest),
118964
+ endpoint: newRequest.endpoint
118965
+ });
118966
+ }
118967
+
118968
+ // pkg/dist-src/index.js
118969
+ withDefaults(request, {
118970
+ headers: {
118971
+ "user-agent": `octokit-graphql.js/${VERSION$1} ${getUserAgent()}`
118972
+ },
118973
+ method: "POST",
118974
+ url: "/graphql"
118975
+ });
118976
+ function withCustomRequest(customRequest) {
118977
+ return withDefaults(customRequest, {
118978
+ method: "POST",
118979
+ url: "/graphql"
118980
+ });
118981
+ }
118982
+
118983
+ // pkg/dist-src/is-jwt.js
118984
+ var b64url = "(?:[a-zA-Z0-9_-]+)";
118985
+ var sep = "\\.";
118986
+ var jwtRE = new RegExp(`^${b64url}${sep}${b64url}${sep}${b64url}$`);
118987
+ var isJWT = jwtRE.test.bind(jwtRE);
118988
+
118989
+ // pkg/dist-src/auth.js
118990
+ async function auth(token) {
118991
+ const isApp = isJWT(token);
118992
+ const isInstallation = token.startsWith("v1.") || token.startsWith("ghs_");
118993
+ const isUserToServer = token.startsWith("ghu_");
118994
+ const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
118995
+ return {
118996
+ type: "token",
118997
+ token,
118998
+ tokenType
118999
+ };
119000
+ }
119001
+
119002
+ // pkg/dist-src/with-authorization-prefix.js
119003
+ function withAuthorizationPrefix(token) {
119004
+ if (token.split(/\./).length === 3) {
119005
+ return `bearer ${token}`;
119006
+ }
119007
+ return `token ${token}`;
119008
+ }
119009
+
119010
+ // pkg/dist-src/hook.js
119011
+ async function hook(token, request, route, parameters) {
119012
+ const endpoint = request.endpoint.merge(
119013
+ route,
119014
+ parameters
119015
+ );
119016
+ endpoint.headers.authorization = withAuthorizationPrefix(token);
119017
+ return request(endpoint);
119018
+ }
119019
+
119020
+ // pkg/dist-src/index.js
119021
+ var createTokenAuth = function createTokenAuth2(token) {
119022
+ if (!token) {
119023
+ throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
119024
+ }
119025
+ if (typeof token !== "string") {
119026
+ throw new Error(
119027
+ "[@octokit/auth-token] Token passed to createTokenAuth is not a string"
119028
+ );
119029
+ }
119030
+ token = token.replace(/^(token|bearer) +/i, "");
119031
+ return Object.assign(auth.bind(null, token), {
119032
+ hook: hook.bind(null, token)
119033
+ });
119034
+ };
119035
+
119036
+ const VERSION = "7.0.6";
119037
+
119038
+ const noop = () => {
119039
+ };
119040
+ const consoleWarn = console.warn.bind(console);
119041
+ const consoleError = console.error.bind(console);
119042
+ function createLogger(logger = {}) {
119043
+ if (typeof logger.debug !== "function") {
119044
+ logger.debug = noop;
119045
+ }
119046
+ if (typeof logger.info !== "function") {
119047
+ logger.info = noop;
119048
+ }
119049
+ if (typeof logger.warn !== "function") {
119050
+ logger.warn = consoleWarn;
119051
+ }
119052
+ if (typeof logger.error !== "function") {
119053
+ logger.error = consoleError;
119054
+ }
119055
+ return logger;
119056
+ }
119057
+ const userAgentTrail = `octokit-core.js/${VERSION} ${getUserAgent()}`;
119058
+ class Octokit {
119059
+ static VERSION = VERSION;
119060
+ static defaults(defaults) {
119061
+ const OctokitWithDefaults = class extends this {
119062
+ constructor(...args) {
119063
+ const options = args[0] || {};
119064
+ if (typeof defaults === "function") {
119065
+ super(defaults(options));
119066
+ return;
119067
+ }
119068
+ super(
119069
+ Object.assign(
119070
+ {},
119071
+ defaults,
119072
+ options,
119073
+ options.userAgent && defaults.userAgent ? {
119074
+ userAgent: `${options.userAgent} ${defaults.userAgent}`
119075
+ } : null
119076
+ )
119077
+ );
119078
+ }
119079
+ };
119080
+ return OctokitWithDefaults;
119081
+ }
119082
+ static plugins = [];
119083
+ /**
119084
+ * Attach a plugin (or many) to your Octokit instance.
119085
+ *
119086
+ * @example
119087
+ * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
119088
+ */
119089
+ static plugin(...newPlugins) {
119090
+ const currentPlugins = this.plugins;
119091
+ const NewOctokit = class extends this {
119092
+ static plugins = currentPlugins.concat(
119093
+ newPlugins.filter((plugin) => !currentPlugins.includes(plugin))
119094
+ );
119095
+ };
119096
+ return NewOctokit;
119097
+ }
119098
+ constructor(options = {}) {
119099
+ const hook = new Hook.Collection();
119100
+ const requestDefaults = {
119101
+ baseUrl: request.endpoint.DEFAULTS.baseUrl,
119102
+ headers: {},
119103
+ request: Object.assign({}, options.request, {
119104
+ // @ts-ignore internal usage only, no need to type
119105
+ hook: hook.bind(null, "request")
119106
+ }),
119107
+ mediaType: {
119108
+ previews: [],
119109
+ format: ""
119110
+ }
119111
+ };
119112
+ requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail;
119113
+ if (options.baseUrl) {
119114
+ requestDefaults.baseUrl = options.baseUrl;
119115
+ }
119116
+ if (options.previews) {
119117
+ requestDefaults.mediaType.previews = options.previews;
119118
+ }
119119
+ if (options.timeZone) {
119120
+ requestDefaults.headers["time-zone"] = options.timeZone;
119121
+ }
119122
+ this.request = request.defaults(requestDefaults);
119123
+ this.graphql = withCustomRequest(this.request).defaults(requestDefaults);
119124
+ this.log = createLogger(options.log);
119125
+ this.hook = hook;
119126
+ if (!options.authStrategy) {
119127
+ if (!options.auth) {
119128
+ this.auth = async () => ({
119129
+ type: "unauthenticated"
119130
+ });
119131
+ } else {
119132
+ const auth = createTokenAuth(options.auth);
119133
+ hook.wrap("request", auth.hook);
119134
+ this.auth = auth;
119135
+ }
119136
+ } else {
119137
+ const { authStrategy, ...otherOptions } = options;
119138
+ const auth = authStrategy(
119139
+ Object.assign(
119140
+ {
119141
+ request: this.request,
119142
+ log: this.log,
119143
+ // we pass the current octokit instance as well as its constructor options
119144
+ // to allow for authentication strategies that return a new octokit instance
119145
+ // that shares the same internal state as the current one. The original
119146
+ // requirement for this was the "event-octokit" authentication strategy
119147
+ // of https://github.com/probot/octokit-auth-probot.
119148
+ octokit: this,
119149
+ octokitOptions: otherOptions
119150
+ },
119151
+ options.auth
119152
+ )
119153
+ );
119154
+ hook.wrap("request", auth.hook);
119155
+ this.auth = auth;
119156
+ }
119157
+ const classConstructor = this.constructor;
119158
+ for (let i = 0; i < classConstructor.plugins.length; ++i) {
119159
+ Object.assign(this, classConstructor.plugins[i](this, options));
119160
+ }
119161
+ }
119162
+ // assigned during constructor
119163
+ request;
119164
+ graphql;
119165
+ log;
119166
+ hook;
119167
+ // TODO: type `octokit.auth` based on passed options.authStrategy
119168
+ auth;
119169
+ }
119170
+
117820
119171
  const isGithubIssueOpen = async (issueLinks) => {
117821
- const issueStates = await Promise.all(issueLinks.map(async (issueLink) => {
119172
+ const octokit = new Octokit({
119173
+ auth: process.env.GITHUB_TOKEN,
119174
+ });
119175
+ const issueStatuses = await Promise.all(issueLinks.map(issueLink => {
117822
119176
  const issueSuffix = issueLink.split("github.com/").at(-1);
119177
+ console.log(issueSuffix);
117823
119178
  if (!issueSuffix)
117824
119179
  return null;
117825
119180
  const [owner, repo, _, issueNumber] = issueSuffix.split("/");
117826
- if (!owner || !repo || !issueNumber)
117827
- return null;
117828
- const response = await fetch(`https://api.github.com/repos/${owner}/${repo}/issues/${issueNumber}`, {
119181
+ return octokit.request(`GET /repos/{owner}/{repo}/issues/{issueNumber}`, {
119182
+ owner,
119183
+ repo,
119184
+ issueNumber,
117829
119185
  headers: {
117830
- accept: "application/vnd.github+json",
117831
- authorization: `token ${process.env.GITHUB_TOKEN}`,
117832
- "x-github-api-version": "2022-11-28",
119186
+ "X-GitHub-Api-Version": "2022-11-28",
117833
119187
  },
117834
119188
  });
117835
- if (!response.ok)
117836
- return null;
117837
- const issue = await response.json();
117838
- return issue.state;
117839
119189
  }));
117840
- return issueStates.some(state => state === "open");
119190
+ return issueStatuses.some(issueStatus => issueStatus?.data?.state === "open");
117841
119191
  };
117842
119192
 
117843
119193
  class HelpAndProfilePage {
@@ -118359,29 +119709,33 @@ class MicrosoftPage extends IntegrationBase {
118359
119709
  }))
118360
119710
  .pressSequentially(process.env.MICROSOFT_LOGIN_PASSWORD, { delay: 15 });
118361
119711
  };
118362
- loginToMicrosoft = () => withCookieCache("microsoft", this.page.context(), async () => {
118363
- if (ramda.isNil(process.env.MICROSOFT_LOGIN_EMAIL) ||
118364
- ramda.isNil(process.env.MICROSOFT_LOGIN_PASSWORD) ||
118365
- ramda.isNil(process.env.MICROSOFT_2FA_SECRET_KEY)) {
118366
- throw new Error("ENV variable MICROSOFT_LOGIN_EMAIL or MICROSOFT_LOGIN_PASSWORD or MICROSOFT_2FA_SECRET_KEY is not properly configured");
118367
- }
118368
- await this.page.goto(THIRD_PARTY_ROUTES.microsoft.login);
118369
- await this.enterEmail();
118370
- await this.page
118371
- .getByRole("button", { name: MICROSOFT_LOGIN_TEXTS.next })
118372
- .click();
118373
- await this.enterPassword();
118374
- await this.page
118375
- .getByRole("button", { name: MICROSOFT_LOGIN_TEXTS.signIn })
118376
- .click();
118377
- await this.page
118378
- .getByRole("button", {
118379
- name: MICROSOFT_LOGIN_TEXTS.useVerificationCode,
118380
- })
118381
- .click();
118382
- await this.enterTotpCode();
118383
- await this.staySignedIn();
118384
- }, ["microsoft.com", "live.com", "microsoftonline.com"]);
119712
+ loginToMicrosoft = async () => {
119713
+ if (IS_DEV_ENV)
119714
+ return;
119715
+ return withCookieCache("microsoft", this.page.context(), async () => {
119716
+ if (ramda.isNil(process.env.MICROSOFT_LOGIN_EMAIL) ||
119717
+ ramda.isNil(process.env.MICROSOFT_LOGIN_PASSWORD) ||
119718
+ ramda.isNil(process.env.MICROSOFT_2FA_SECRET_KEY)) {
119719
+ throw new Error("ENV variable MICROSOFT_LOGIN_EMAIL or MICROSOFT_LOGIN_PASSWORD or MICROSOFT_2FA_SECRET_KEY is not properly configured");
119720
+ }
119721
+ await this.page.goto(THIRD_PARTY_ROUTES.microsoft.login);
119722
+ await this.enterEmail();
119723
+ await this.page
119724
+ .getByRole("button", { name: MICROSOFT_LOGIN_TEXTS.next })
119725
+ .click();
119726
+ await this.enterPassword();
119727
+ await this.page
119728
+ .getByRole("button", { name: MICROSOFT_LOGIN_TEXTS.signIn })
119729
+ .click();
119730
+ await this.page
119731
+ .getByRole("button", {
119732
+ name: MICROSOFT_LOGIN_TEXTS.useVerificationCode,
119733
+ })
119734
+ .click();
119735
+ await this.enterTotpCode();
119736
+ await this.staySignedIn();
119737
+ }, ["microsoft.com", "live.com", "microsoftonline.com"]);
119738
+ };
118385
119739
  enterTotpCode = async () => {
118386
119740
  const verifyBtn = this.page.getByRole("button", {
118387
119741
  name: MICROSOFT_LOGIN_TEXTS.verify,
@@ -124899,17 +126253,17 @@ class EmailDeliveryUtils {
124899
126253
  };
124900
126254
  }
124901
126255
 
124902
- var main = {exports: {}};
126256
+ var main$1 = {exports: {}};
124903
126257
 
124904
126258
  var version = "17.3.1";
124905
126259
  var require$$4 = {
124906
126260
  version: version};
124907
126261
 
124908
- var hasRequiredMain;
126262
+ var hasRequiredMain$1;
124909
126263
 
124910
- function requireMain () {
124911
- if (hasRequiredMain) return main.exports;
124912
- hasRequiredMain = 1;
126264
+ function requireMain$1 () {
126265
+ if (hasRequiredMain$1) return main$1.exports;
126266
+ hasRequiredMain$1 = 1;
124913
126267
  const fs$1 = fs;
124914
126268
  const path$1 = path;
124915
126269
  const os$1 = os;
@@ -125332,20 +126686,130 @@ function requireMain () {
125332
126686
  populate
125333
126687
  };
125334
126688
 
125335
- main.exports.configDotenv = DotenvModule.configDotenv;
125336
- main.exports._configVault = DotenvModule._configVault;
125337
- main.exports._parseVault = DotenvModule._parseVault;
125338
- main.exports.config = DotenvModule.config;
125339
- main.exports.decrypt = DotenvModule.decrypt;
125340
- main.exports.parse = DotenvModule.parse;
125341
- main.exports.populate = DotenvModule.populate;
126689
+ main$1.exports.configDotenv = DotenvModule.configDotenv;
126690
+ main$1.exports._configVault = DotenvModule._configVault;
126691
+ main$1.exports._parseVault = DotenvModule._parseVault;
126692
+ main$1.exports.config = DotenvModule.config;
126693
+ main$1.exports.decrypt = DotenvModule.decrypt;
126694
+ main$1.exports.parse = DotenvModule.parse;
126695
+ main$1.exports.populate = DotenvModule.populate;
126696
+
126697
+ main$1.exports = DotenvModule;
126698
+ return main$1.exports;
126699
+ }
126700
+
126701
+ var mainExports$1 = requireMain$1();
126702
+ var dotenv = /*@__PURE__*/getDefaultExportFromCjs(mainExports$1);
126703
+
126704
+ var main = {};
126705
+
126706
+ var hasRequiredMain;
126707
+
126708
+ function requireMain () {
126709
+ if (hasRequiredMain) return main;
126710
+ hasRequiredMain = 1;
126711
+
126712
+ function _resolveEscapeSequences (value) {
126713
+ return value.replace(/\\\$/g, '$')
126714
+ }
126715
+
126716
+ function expandValue (value, processEnv, runningParsed) {
126717
+ const env = { ...runningParsed, ...processEnv }; // process.env wins
126718
+
126719
+ const regex = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g;
126720
+
126721
+ let result = value;
126722
+ let match;
126723
+ const seen = new Set(); // self-referential checker
126724
+
126725
+ while ((match = regex.exec(result)) !== null) {
126726
+ seen.add(result);
126727
+
126728
+ const [template, bracedExpression, unbracedExpression] = match;
126729
+ const expression = bracedExpression || unbracedExpression;
126730
+
126731
+ // match the operators `:+`, `+`, `:-`, and `-`
126732
+ const opRegex = /(:\+|\+|:-|-)/;
126733
+ // find first match
126734
+ const opMatch = expression.match(opRegex);
126735
+ const splitter = opMatch ? opMatch[0] : null;
126736
+
126737
+ const r = expression.split(splitter);
126738
+
126739
+ let defaultValue;
126740
+ let value;
126741
+
126742
+ const key = r.shift();
126743
+
126744
+ if ([':+', '+'].includes(splitter)) {
126745
+ defaultValue = env[key] ? r.join(splitter) : '';
126746
+ value = null;
126747
+ } else {
126748
+ defaultValue = r.join(splitter);
126749
+ value = env[key];
126750
+ }
126751
+
126752
+ if (value) {
126753
+ // self-referential check
126754
+ if (seen.has(value)) {
126755
+ result = result.replace(template, defaultValue);
126756
+ } else {
126757
+ result = result.replace(template, value);
126758
+ }
126759
+ } else {
126760
+ result = result.replace(template, defaultValue);
126761
+ }
126762
+
126763
+ // if the result equaled what was in process.env and runningParsed then stop expanding
126764
+ if (result === runningParsed[key]) {
126765
+ break
126766
+ }
126767
+
126768
+ regex.lastIndex = 0; // reset regex search position to re-evaluate after each replacement
126769
+ }
126770
+
126771
+ return result
126772
+ }
126773
+
126774
+ function expand (options) {
126775
+ // for use with progressive expansion
126776
+ const runningParsed = {};
126777
+
126778
+ let processEnv = process.env;
126779
+ if (options && options.processEnv != null) {
126780
+ processEnv = options.processEnv;
126781
+ }
126782
+
126783
+ // dotenv.config() ran before this so the assumption is process.env has already been set
126784
+ for (const key in options.parsed) {
126785
+ let value = options.parsed[key];
126786
+
126787
+ // short-circuit scenario: process.env was already set prior to the file value
126788
+ if (processEnv[key] && processEnv[key] !== value) {
126789
+ value = processEnv[key];
126790
+ } else {
126791
+ value = expandValue(value, processEnv, runningParsed);
126792
+ }
126793
+
126794
+ options.parsed[key] = _resolveEscapeSequences(value);
126795
+
126796
+ // for use with progressive expansion
126797
+ runningParsed[key] = _resolveEscapeSequences(value);
126798
+ }
126799
+
126800
+ for (const processKey in options.parsed) {
126801
+ processEnv[processKey] = options.parsed[processKey];
126802
+ }
126803
+
126804
+ return options
126805
+ }
125342
126806
 
125343
- main.exports = DotenvModule;
125344
- return main.exports;
126807
+ main.expand = expand;
126808
+ return main;
125345
126809
  }
125346
126810
 
125347
126811
  var mainExports = requireMain();
125348
- var dotenv = /*@__PURE__*/getDefaultExportFromCjs(mainExports);
126812
+ var dotenvExpand = /*@__PURE__*/getDefaultExportFromCjs(mainExports);
125349
126813
 
125350
126814
  const E2E_TEST_DIR = "e2e/tests";
125351
126815
  const LOG_PREFIX = "[playwright.config]";
@@ -125406,11 +126870,11 @@ const parseSpecPatterns = () => {
125406
126870
  };
125407
126871
 
125408
126872
  // @ts-check
126873
+ const loadEnv = (path) => dotenvExpand.expand(dotenv.config({ path, quiet: true }));
125409
126874
  const envBasePath = "./e2e/config/.env";
125410
126875
  const envLocalPath = `${envBasePath}.local`;
125411
126876
  const reporterPackageName = "@bigbinary/neeto-playwright-reporter";
125412
126877
  process.env.TEST_ENV = process.env.TEST_ENV ?? ENVIRONMENT.development;
125413
- const loadEnv = (path) => dotenv.config({ path, quiet: true });
125414
126878
  loadEnv(`${envBasePath}.${process.env.TEST_ENV}`);
125415
126879
  fs__namespace.existsSync(envLocalPath) && loadEnv(envLocalPath);
125416
126880
  const playdashStagingConfig = {