@wix/cli 1.1.168 → 1.1.170

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/build/{ConnectWixVibeCommand-HPHN2ABB.js → ConnectWixVibeCommand-Q6HKX3QQ.js} +5 -5
  2. package/build/{chunk-A4TMXK2F.js → DevCommand-CPE5YZ3A.js} +1326 -1178
  3. package/build/DevCommand-CPE5YZ3A.js.map +1 -0
  4. package/build/{EnvPullCommand-B45GH674.js → EnvPullCommand-2CEYL4OE.js} +3 -3
  5. package/build/{EnvRemoveCommand-WAAFZXEM.js → EnvRemoveCommand-CISQNNQ6.js} +2 -2
  6. package/build/{EnvSetCommand-DGULE6YD.js → EnvSetCommand-ZJOIW426.js} +2 -2
  7. package/build/{GenerateCommand-JS7SZSLT.js → GenerateCommand-NXA6EG5K.js} +3 -3
  8. package/build/{LoginCommand-WCUYNCM6.js → LoginCommand-ZNGSWUC4.js} +2 -2
  9. package/build/{PreviewCommand-BBUW3L7G.js → PreviewCommand-2FAXJTIC.js} +4 -5
  10. package/build/{PromoteCommand-4NZE6NOD.js → PromoteCommand-OOBVTIQG.js} +5 -6
  11. package/build/PromoteCommand-OOBVTIQG.js.map +1 -0
  12. package/build/{ReleaseCommand-45W4CMHG.js → ReleaseCommand-VAO5I7ND.js} +29 -41
  13. package/build/ReleaseCommand-VAO5I7ND.js.map +1 -0
  14. package/build/{TranslationPullCommand-GVBRFVDY.js → TranslationPullCommand-I5R5CQX6.js} +3 -3
  15. package/build/{TranslationPushCommand-C2ZH4EYL.js → TranslationPushCommand-FF636U6C.js} +3 -3
  16. package/build/{chunk-BTOUC5RL.js → chunk-4VPH7IPB.js} +13 -3
  17. package/build/chunk-4VPH7IPB.js.map +1 -0
  18. package/build/{chunk-QSWUV64A.js → chunk-GJR445ET.js} +2 -2
  19. package/build/{chunk-YUTDXWGL.js → chunk-GWIV2MUG.js} +2 -2
  20. package/build/{chunk-YUTDXWGL.js.map → chunk-GWIV2MUG.js.map} +1 -1
  21. package/build/{chunk-ESAVWXDC.js → chunk-HNBL2TIV.js} +1 -4
  22. package/build/chunk-HNBL2TIV.js.map +1 -0
  23. package/build/{chunk-G442ZP7D.js → chunk-KP4B6J6V.js} +2 -2
  24. package/build/{chunk-MBDDT26N.js → chunk-NKFKI5QG.js} +45 -51
  25. package/build/chunk-NKFKI5QG.js.map +1 -0
  26. package/build/{chunk-BDI4FLJH.js → chunk-OUSNXB4Y.js} +2 -2
  27. package/build/{chunk-CK4W2NGR.js → chunk-PEWZZDIF.js} +14 -3
  28. package/build/chunk-PEWZZDIF.js.map +1 -0
  29. package/build/chunk-Q2PALYEZ.js +810 -0
  30. package/build/chunk-Q2PALYEZ.js.map +1 -0
  31. package/build/{chunk-P4U4LOOZ.js → chunk-VFMUVMEB.js} +2 -2
  32. package/build/{chunk-Q42D7CS5.js → chunk-XPLEOWFP.js} +22 -16
  33. package/build/chunk-XPLEOWFP.js.map +1 -0
  34. package/build/{chunk-4KQAGG4P.js → chunk-YZ4UFXM6.js} +2 -2
  35. package/build/{env-pull-PDCCV73E.js → env-pull-BZWGRQQO.js} +4 -4
  36. package/build/index.js +9 -9
  37. package/build/{preview-BUIC246I.js → preview-TLNTYO7B.js} +5 -6
  38. package/build/{preview-BUIC246I.js.map → preview-TLNTYO7B.js.map} +1 -1
  39. package/build/{render-command-HQWSRXQY.js → render-command-6YBX3NU3.js} +13 -3
  40. package/build/render-command-6YBX3NU3.js.map +1 -0
  41. package/build/{render-command-XK7NJBLU.js → render-command-KQ4IDPLN.js} +2 -2
  42. package/build/{render-command-WC3PIVG6.js → render-command-MU7YBPHN.js} +13 -3
  43. package/build/render-command-MU7YBPHN.js.map +1 -0
  44. package/build/{render-command-HVRPA6GI.js → render-command-PV4UUGJI.js} +3 -3
  45. package/build/{render-command-B5XE53F2.js → render-command-TBSJTMV6.js} +2 -2
  46. package/build/{run-command-7Q5VEPRE.js → run-command-APAJAUCI.js} +2 -2
  47. package/build/{src-RPHE47HP.js → src-OI432PPT.js} +2 -2
  48. package/build/{src-4JJH6PL5.js → src-PTASZH6I.js} +6 -6
  49. package/build/{src-UJUSXG2K.js → src-UJLFJRCE.js} +7 -7
  50. package/build/{src-FAK26WZW.js → src-ZBR6LJQI.js} +27 -35
  51. package/build/{src-FAK26WZW.js.map → src-ZBR6LJQI.js.map} +1 -1
  52. package/build/{translation-pull-4XGXVQRG.js → translation-pull-UY4GMO2F.js} +4 -4
  53. package/build/{translation-push-TXHUNGP2.js → translation-push-YPS3CBGN.js} +4 -4
  54. package/package.json +2 -2
  55. package/templates/astro/service-plugin/staff-sorting-provider/files/plugin.ts.ejs +1 -1
  56. package/build/DevCommand-OMP45WN2.js +0 -946
  57. package/build/DevCommand-OMP45WN2.js.map +0 -1
  58. package/build/PromoteCommand-4NZE6NOD.js.map +0 -1
  59. package/build/ReleaseCommand-45W4CMHG.js.map +0 -1
  60. package/build/chunk-A4TMXK2F.js.map +0 -1
  61. package/build/chunk-BTOUC5RL.js.map +0 -1
  62. package/build/chunk-CK4W2NGR.js.map +0 -1
  63. package/build/chunk-ESAVWXDC.js.map +0 -1
  64. package/build/chunk-MBDDT26N.js.map +0 -1
  65. package/build/chunk-Q42D7CS5.js.map +0 -1
  66. package/build/render-command-HQWSRXQY.js.map +0 -1
  67. package/build/render-command-WC3PIVG6.js.map +0 -1
  68. /package/build/{ConnectWixVibeCommand-HPHN2ABB.js.map → ConnectWixVibeCommand-Q6HKX3QQ.js.map} +0 -0
  69. /package/build/{EnvPullCommand-B45GH674.js.map → EnvPullCommand-2CEYL4OE.js.map} +0 -0
  70. /package/build/{EnvRemoveCommand-WAAFZXEM.js.map → EnvRemoveCommand-CISQNNQ6.js.map} +0 -0
  71. /package/build/{EnvSetCommand-DGULE6YD.js.map → EnvSetCommand-ZJOIW426.js.map} +0 -0
  72. /package/build/{GenerateCommand-JS7SZSLT.js.map → GenerateCommand-NXA6EG5K.js.map} +0 -0
  73. /package/build/{LoginCommand-WCUYNCM6.js.map → LoginCommand-ZNGSWUC4.js.map} +0 -0
  74. /package/build/{PreviewCommand-BBUW3L7G.js.map → PreviewCommand-2FAXJTIC.js.map} +0 -0
  75. /package/build/{TranslationPullCommand-GVBRFVDY.js.map → TranslationPullCommand-I5R5CQX6.js.map} +0 -0
  76. /package/build/{TranslationPushCommand-C2ZH4EYL.js.map → TranslationPushCommand-FF636U6C.js.map} +0 -0
  77. /package/build/{chunk-QSWUV64A.js.map → chunk-GJR445ET.js.map} +0 -0
  78. /package/build/{chunk-G442ZP7D.js.map → chunk-KP4B6J6V.js.map} +0 -0
  79. /package/build/{chunk-BDI4FLJH.js.map → chunk-OUSNXB4Y.js.map} +0 -0
  80. /package/build/{chunk-P4U4LOOZ.js.map → chunk-VFMUVMEB.js.map} +0 -0
  81. /package/build/{chunk-4KQAGG4P.js.map → chunk-YZ4UFXM6.js.map} +0 -0
  82. /package/build/{env-pull-PDCCV73E.js.map → env-pull-BZWGRQQO.js.map} +0 -0
  83. /package/build/{render-command-XK7NJBLU.js.map → render-command-KQ4IDPLN.js.map} +0 -0
  84. /package/build/{render-command-HVRPA6GI.js.map → render-command-PV4UUGJI.js.map} +0 -0
  85. /package/build/{render-command-B5XE53F2.js.map → render-command-TBSJTMV6.js.map} +0 -0
  86. /package/build/{run-command-7Q5VEPRE.js.map → run-command-APAJAUCI.js.map} +0 -0
  87. /package/build/{src-RPHE47HP.js.map → src-OI432PPT.js.map} +0 -0
  88. /package/build/{src-4JJH6PL5.js.map → src-PTASZH6I.js.map} +0 -0
  89. /package/build/{src-UJUSXG2K.js.map → src-UJLFJRCE.js.map} +0 -0
  90. /package/build/{translation-pull-4XGXVQRG.js.map → translation-pull-UY4GMO2F.js.map} +0 -0
  91. /package/build/{translation-push-TXHUNGP2.js.map → translation-push-YPS3CBGN.js.map} +0 -0
@@ -1,8 +1,40 @@
1
1
  import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
+ import {
4
+ useTunnel
5
+ } from "./chunk-R3BR7GCO.js";
6
+ import {
7
+ useMetasiteManagerClient,
8
+ useWixCliAppBi
9
+ } from "./chunk-HNBL2TIV.js";
10
+ import {
11
+ RedirectLink,
12
+ useARMClient,
13
+ useUpdateDeploymentTopology
14
+ } from "./chunk-Q2PALYEZ.js";
3
15
  import {
4
16
  useDevCenterClient
5
- } from "./chunk-4KQAGG4P.js";
17
+ } from "./chunk-YZ4UFXM6.js";
18
+ import {
19
+ PlatformLink
20
+ } from "./chunk-J6S3EQQP.js";
21
+ import {
22
+ OnboardingState,
23
+ useVeloClient
24
+ } from "./chunk-WK2TZLIJ.js";
25
+ import "./chunk-DCYBYMTU.js";
26
+ import "./chunk-MVBGFP6D.js";
27
+ import "./chunk-KA7B5CAK.js";
28
+ import "./chunk-X7A3443W.js";
29
+ import {
30
+ createPackageManager,
31
+ getRepoType
32
+ } from "./chunk-JDIZDTXS.js";
33
+ import {
34
+ execa
35
+ } from "./chunk-2R5BII2J.js";
36
+ import "./chunk-W54PG6O5.js";
37
+ import "./chunk-YLWTNITT.js";
6
38
  import {
7
39
  AlgorithmType,
8
40
  ComponentType,
@@ -11,10 +43,12 @@ import {
11
43
  EmbeddedScriptPlacement,
12
44
  PanelMode,
13
45
  Width,
14
- deploymentTopologySchema,
15
- getDeploymentTopologyPath,
46
+ devMetadataSchema,
47
+ getDevLogPath,
48
+ looseComponentSchema,
49
+ parseLooseAppManifest,
16
50
  useProjectModel
17
- } from "./chunk-CK4W2NGR.js";
51
+ } from "./chunk-PEWZZDIF.js";
18
52
  import {
19
53
  useHttpClient
20
54
  } from "./chunk-4B4USTTE.js";
@@ -23,16 +57,17 @@ import {
23
57
  } from "./chunk-K7CPZ76V.js";
24
58
  import {
25
59
  BiProvider,
60
+ ErrorViewer,
61
+ SiteAuthProvider,
26
62
  TimeoutError,
27
- isHttpError,
28
- isHttpValidationError,
29
63
  openBrowser,
30
64
  pRetry,
31
65
  pWaitFor,
32
66
  resolveUrl,
33
67
  serializer,
34
68
  useBiLogger,
35
- useDebugLog
69
+ useDebugLog,
70
+ useErrorReporter
36
71
  } from "./chunk-EC2JRUEW.js";
37
72
  import {
38
73
  wixCliAction,
@@ -43,17 +78,19 @@ import {
43
78
  Trans,
44
79
  useTranslation
45
80
  } from "./chunk-NDLMWKGS.js";
81
+ import "./chunk-KJ37XZQA.js";
46
82
  import {
47
83
  Alert,
48
84
  Badge,
49
85
  Box_default,
86
+ ConfirmInput,
50
87
  Key,
51
- Link,
52
- PointerSmallIcon,
88
+ PointerIcon,
53
89
  SelectInput,
54
90
  SelectOptionAvailability,
55
91
  Spinner,
56
92
  Text,
93
+ createRendererToString,
57
94
  useAsync,
58
95
  useAsyncCallback,
59
96
  useExit,
@@ -62,10 +99,21 @@ import {
62
99
  import {
63
100
  require_react
64
101
  } from "./chunk-YAIN7HW3.js";
102
+ import {
103
+ stripAnsi
104
+ } from "./chunk-SQ3KPTIH.js";
105
+ import "./chunk-Z4MHKCET.js";
106
+ import "./chunk-C4SUTB4O.js";
107
+ import {
108
+ readUserConfig,
109
+ updateUserConfig
110
+ } from "./chunk-5CKH3OMW.js";
111
+ import "./chunk-Q5T35E2T.js";
65
112
  import {
66
113
  getTestOverrides
67
114
  } from "./chunk-SYNCBTVP.js";
68
115
  import {
116
+ outputDir,
69
117
  pathExists,
70
118
  readJson,
71
119
  writeJson
@@ -2998,9 +3046,9 @@ ${trace}`);
2998
3046
  function isMemberExpressionLike(node) {
2999
3047
  return (0, _index.isMemberExpression)(node) || (0, _index.isMetaProperty)(node);
3000
3048
  }
3001
- function matchesPattern(member, match9, allowPartial) {
3049
+ function matchesPattern(member, match13, allowPartial) {
3002
3050
  if (!isMemberExpressionLike(member)) return false;
3003
- const parts = Array.isArray(match9) ? match9 : match9.split(".");
3051
+ const parts = Array.isArray(match13) ? match13 : match13.split(".");
3004
3052
  const nodes = [];
3005
3053
  let node;
3006
3054
  for (node = member; isMemberExpressionLike(node); node = (_object = node.object) != null ? _object : node.meta) {
@@ -3040,8 +3088,8 @@ ${trace}`);
3040
3088
  });
3041
3089
  exports2.default = buildMatchMemberExpression;
3042
3090
  var _matchesPattern = require_matchesPattern();
3043
- function buildMatchMemberExpression(match9, allowPartial) {
3044
- const parts = match9.split(".");
3091
+ function buildMatchMemberExpression(match13, allowPartial) {
3092
+ const parts = match13.split(".");
3045
3093
  return (member) => (0, _matchesPattern.default)(member, parts, allowPartial);
3046
3094
  }
3047
3095
  }
@@ -3076,9 +3124,9 @@ ${trace}`);
3076
3124
  Object.defineProperty(exports2, "__esModule", {
3077
3125
  value: true
3078
3126
  });
3079
- exports2.default = isType2;
3127
+ exports2.default = isType3;
3080
3128
  var _index = require_definitions();
3081
- function isType2(nodeType, targetType) {
3129
+ function isType3(nodeType, targetType) {
3082
3130
  if (nodeType === targetType) return true;
3083
3131
  if (nodeType == null) return false;
3084
3132
  if (_index.ALIAS_KEYS[targetType]) return false;
@@ -3471,8 +3519,8 @@ ${trace}`);
3471
3519
  default:
3472
3520
  if (ch >= 48 && ch <= 55) {
3473
3521
  const startPos = pos2 - 1;
3474
- const match9 = /^[0-7]+/.exec(input.slice(startPos, pos2 + 2));
3475
- let octalStr = match9[0];
3522
+ const match13 = /^[0-7]+/.exec(input.slice(startPos, pos2 + 2));
3523
+ let octalStr = match13[0];
3476
3524
  let octal = parseInt(octalStr, 8);
3477
3525
  if (octal > 255) {
3478
3526
  octalStr = octalStr.slice(0, -1);
@@ -4340,9 +4388,9 @@ ${errors.join("\n")}`);
4340
4388
  }
4341
4389
  }),
4342
4390
  validate: process.env.BABEL_TYPES_8_BREAKING ? function(parent, key2, node) {
4343
- const match9 = /\.(\w+)$/.exec(key2.toString());
4344
- if (!match9) return;
4345
- const [, parentKey] = match9;
4391
+ const match13 = /\.(\w+)$/.exec(key2.toString());
4392
+ if (!match13) return;
4393
+ const [, parentKey] = match13;
4346
4394
  const nonComp = {
4347
4395
  computed: false
4348
4396
  };
@@ -4671,9 +4719,9 @@ ${errors.join("\n")}`);
4671
4719
  }
4672
4720
  }),
4673
4721
  validate: process.env.BABEL_TYPES_8_BREAKING ? function(parent, key2) {
4674
- const match9 = /(\w+)\[(\d+)\]/.exec(key2.toString());
4675
- if (!match9) throw new Error("Internal Babel error: malformed key.");
4676
- const [, listKey, index] = match9;
4722
+ const match13 = /(\w+)\[(\d+)\]/.exec(key2.toString());
4723
+ if (!match13) throw new Error("Internal Babel error: malformed key.");
4724
+ const [, listKey, index] = match13;
4677
4725
  if (parent[listKey].length > +index + 1) {
4678
4726
  throw new TypeError(`RestElement must be last element of ${listKey}`);
4679
4727
  }
@@ -12390,7 +12438,7 @@ Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
12390
12438
  name += (0, _helperValidatorIdentifier.isIdentifierChar)(c2.codePointAt(0)) ? c2 : "-";
12391
12439
  }
12392
12440
  name = name.replace(/^[-0-9]+/, "");
12393
- name = name.replace(/[-\s]+(.)?/g, function(match9, c2) {
12441
+ name = name.replace(/[-\s]+(.)?/g, function(match13, c2) {
12394
12442
  return c2 ? c2.toUpperCase() : "";
12395
12443
  });
12396
12444
  if (!(0, _isValidIdentifier.default)(name)) {
@@ -19692,8 +19740,8 @@ ${str}
19692
19740
  default:
19693
19741
  if (ch >= 48 && ch <= 55) {
19694
19742
  const startPos = pos2 - 1;
19695
- const match9 = /^[0-7]+/.exec(input.slice(startPos, pos2 + 2));
19696
- let octalStr = match9[0];
19743
+ const match13 = /^[0-7]+/.exec(input.slice(startPos, pos2 + 2));
19744
+ let octalStr = match13[0];
19697
19745
  let octal = parseInt(octalStr, 8);
19698
19746
  if (octal > 255) {
19699
19747
  octalStr = octalStr.slice(0, -1);
@@ -28891,16 +28939,16 @@ ${str}
28891
28939
  value: true
28892
28940
  });
28893
28941
  exports2.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g;
28894
- exports2.matchToToken = function(match9) {
28895
- var token2 = { type: "invalid", value: match9[0], closed: void 0 };
28896
- if (match9[1]) token2.type = "string", token2.closed = !!(match9[3] || match9[4]);
28897
- else if (match9[5]) token2.type = "comment";
28898
- else if (match9[6]) token2.type = "comment", token2.closed = !!match9[7];
28899
- else if (match9[8]) token2.type = "regex";
28900
- else if (match9[9]) token2.type = "number";
28901
- else if (match9[10]) token2.type = "name";
28902
- else if (match9[11]) token2.type = "punctuator";
28903
- else if (match9[12]) token2.type = "whitespace";
28942
+ exports2.matchToToken = function(match13) {
28943
+ var token2 = { type: "invalid", value: match13[0], closed: void 0 };
28944
+ if (match13[1]) token2.type = "string", token2.closed = !!(match13[3] || match13[4]);
28945
+ else if (match13[5]) token2.type = "comment";
28946
+ else if (match13[6]) token2.type = "comment", token2.closed = !!match13[7];
28947
+ else if (match13[8]) token2.type = "regex";
28948
+ else if (match13[9]) token2.type = "number";
28949
+ else if (match13[10]) token2.type = "name";
28950
+ else if (match13[11]) token2.type = "punctuator";
28951
+ else if (match13[12]) token2.type = "whitespace";
28904
28952
  return token2;
28905
28953
  };
28906
28954
  }
@@ -28965,11 +29013,11 @@ ${str}
28965
29013
  return token2.type;
28966
29014
  };
28967
29015
  tokenize = function* (text) {
28968
- let match9;
28969
- while (match9 = jsTokens.default.exec(text)) {
28970
- const token2 = jsTokens.matchToToken(match9);
29016
+ let match13;
29017
+ while (match13 = jsTokens.default.exec(text)) {
29018
+ const token2 = jsTokens.matchToToken(match13);
28971
29019
  yield {
28972
- type: getTokenType(token2, match9.index, text),
29020
+ type: getTokenType(token2, match13.index, text),
28973
29021
  value: token2.value
28974
29022
  };
28975
29023
  }
@@ -31233,14 +31281,14 @@ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toS
31233
31281
  if (str.length > 100) {
31234
31282
  return;
31235
31283
  }
31236
- var match9 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
31284
+ var match13 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
31237
31285
  str
31238
31286
  );
31239
- if (!match9) {
31287
+ if (!match13) {
31240
31288
  return;
31241
31289
  }
31242
- var n = parseFloat(match9[1]);
31243
- var type = (match9[2] || "ms").toLowerCase();
31290
+ var n = parseFloat(match13[1]);
31291
+ var type = (match13[2] || "ms").toLowerCase();
31244
31292
  switch (type) {
31245
31293
  case "years":
31246
31294
  case "year":
@@ -31370,19 +31418,19 @@ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toS
31370
31418
  args.unshift("%O");
31371
31419
  }
31372
31420
  let index = 0;
31373
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match9, format) => {
31374
- if (match9 === "%%") {
31421
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match13, format) => {
31422
+ if (match13 === "%%") {
31375
31423
  return "%";
31376
31424
  }
31377
31425
  index++;
31378
31426
  const formatter = createDebug.formatters[format];
31379
31427
  if (typeof formatter === "function") {
31380
31428
  const val = args[index];
31381
- match9 = formatter.call(self2, val);
31429
+ match13 = formatter.call(self2, val);
31382
31430
  args.splice(index, 1);
31383
31431
  index--;
31384
31432
  }
31385
- return match9;
31433
+ return match13;
31386
31434
  });
31387
31435
  createDebug.formatArgs.call(self2, args);
31388
31436
  const logFn = self2.log || createDebug.log;
@@ -31616,12 +31664,12 @@ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toS
31616
31664
  args.splice(1, 0, c2, "color: inherit");
31617
31665
  let index = 0;
31618
31666
  let lastC = 0;
31619
- args[0].replace(/%[a-zA-Z%]/g, (match9) => {
31620
- if (match9 === "%%") {
31667
+ args[0].replace(/%[a-zA-Z%]/g, (match13) => {
31668
+ if (match13 === "%%") {
31621
31669
  return;
31622
31670
  }
31623
31671
  index++;
31624
- if (match9 === "%c") {
31672
+ if (match13 === "%c") {
31625
31673
  lastC = index;
31626
31674
  }
31627
31675
  });
@@ -34243,13 +34291,13 @@ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toS
34243
34291
  return /^[.?#]/.test(input);
34244
34292
  }
34245
34293
  function parseAbsoluteUrl(input) {
34246
- const match9 = urlRegex.exec(input);
34247
- return makeUrl(match9[1], match9[2] || "", match9[3], match9[4] || "", match9[5] || "/", match9[6] || "", match9[7] || "");
34294
+ const match13 = urlRegex.exec(input);
34295
+ return makeUrl(match13[1], match13[2] || "", match13[3], match13[4] || "", match13[5] || "/", match13[6] || "", match13[7] || "");
34248
34296
  }
34249
34297
  function parseFileUrl(input) {
34250
- const match9 = fileRegex.exec(input);
34251
- const path = match9[2];
34252
- return makeUrl("file:", "", match9[1] || "", "", isAbsolutePath(path) ? path : "/" + path, match9[3] || "", match9[4] || "");
34298
+ const match13 = fileRegex.exec(input);
34299
+ const path = match13[2];
34300
+ return makeUrl("file:", "", match13[1] || "", "", isAbsolutePath(path) ? path : "/" + path, match13[3] || "", match13[4] || "");
34253
34301
  }
34254
34302
  function makeUrl(scheme, user, host, port, path, query, hash) {
34255
34303
  return {
@@ -35762,7 +35810,7 @@ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toS
35762
35810
  return false;
35763
35811
  }
35764
35812
  }
35765
- function isType2(node) {
35813
+ function isType3(node) {
35766
35814
  return isLiteral(node) || isObjectExpression(node) || isArrayExpression(node) || isIdentifier(node) || isMemberExpression(node);
35767
35815
  }
35768
35816
  var nodes = exports2.nodes = {
@@ -35798,7 +35846,7 @@ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toS
35798
35846
  VariableDeclaration(node) {
35799
35847
  for (let i = 0; i < node.declarations.length; i++) {
35800
35848
  const declar = node.declarations[i];
35801
- let enabled = isHelper(declar.id) && !isType2(declar.init);
35849
+ let enabled = isHelper(declar.id) && !isType3(declar.init);
35802
35850
  if (!enabled && declar.init) {
35803
35851
  const state = crawl(declar.init);
35804
35852
  enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
@@ -43379,7 +43427,7 @@ ${" ".repeat(indentSize)}`);
43379
43427
  isIdentifier,
43380
43428
  isLiteral,
43381
43429
  isStringLiteral,
43382
- isType: isType2,
43430
+ isType: isType3,
43383
43431
  matchesPattern: _matchesPattern
43384
43432
  } = _t;
43385
43433
  function matchesPattern(pattern, allowPartial) {
@@ -43409,7 +43457,7 @@ ${" ".repeat(indentSize)}`);
43409
43457
  };
43410
43458
  }
43411
43459
  function isNodeType(type) {
43412
- return isType2(this.type, type);
43460
+ return isType3(this.type, type);
43413
43461
  }
43414
43462
  function canHaveVariableDeclarationOrExpression() {
43415
43463
  return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
@@ -43665,13 +43713,13 @@ ${" ".repeat(indentSize)}`);
43665
43713
  for (const prop of props) {
43666
43714
  if (!prop.isProperty()) continue;
43667
43715
  const key2 = prop.get("key");
43668
- let match9 = prop.isnt("computed") && key2.isIdentifier({
43716
+ let match13 = prop.isnt("computed") && key2.isIdentifier({
43669
43717
  name: targetName
43670
43718
  });
43671
- match9 = match9 || key2.isLiteral({
43719
+ match13 = match13 || key2.isLiteral({
43672
43720
  value: targetName
43673
43721
  });
43674
- if (match9) return prop.get("value").resolve(dangerous, resolved);
43722
+ if (match13) return prop.get("value").resolve(dangerous, resolved);
43675
43723
  }
43676
43724
  } else if (target.isArrayExpression() && !isNaN(+targetName)) {
43677
43725
  const elems = target.get("elements");
@@ -45259,8 +45307,8 @@ ${" ".repeat(indentSize)}`);
45259
45307
  }
45260
45308
  } while (++i2);
45261
45309
  };
45262
- SemVer.prototype.inc = function(release2, identifier) {
45263
- switch (release2) {
45310
+ SemVer.prototype.inc = function(release, identifier) {
45311
+ switch (release) {
45264
45312
  case "premajor":
45265
45313
  this.prerelease.length = 0;
45266
45314
  this.patch = 0;
@@ -45336,20 +45384,20 @@ ${" ".repeat(indentSize)}`);
45336
45384
  }
45337
45385
  break;
45338
45386
  default:
45339
- throw new Error("invalid increment argument: " + release2);
45387
+ throw new Error("invalid increment argument: " + release);
45340
45388
  }
45341
45389
  this.format();
45342
45390
  this.raw = this.version;
45343
45391
  return this;
45344
45392
  };
45345
45393
  exports2.inc = inc;
45346
- function inc(version, release2, loose, identifier) {
45394
+ function inc(version, release, loose, identifier) {
45347
45395
  if (typeof loose === "string") {
45348
45396
  identifier = loose;
45349
45397
  loose = void 0;
45350
45398
  }
45351
45399
  try {
45352
- return new SemVer(version, loose).inc(release2, identifier).version;
45400
+ return new SemVer(version, loose).inc(release, identifier).version;
45353
45401
  } catch (er) {
45354
45402
  return null;
45355
45403
  }
@@ -46087,23 +46135,23 @@ ${" ".repeat(indentSize)}`);
46087
46135
  return null;
46088
46136
  }
46089
46137
  options = options || {};
46090
- var match9 = null;
46138
+ var match13 = null;
46091
46139
  if (!options.rtl) {
46092
- match9 = version.match(safeRe[t.COERCE]);
46140
+ match13 = version.match(safeRe[t.COERCE]);
46093
46141
  } else {
46094
46142
  var next;
46095
- while ((next = safeRe[t.COERCERTL].exec(version)) && (!match9 || match9.index + match9[0].length !== version.length)) {
46096
- if (!match9 || next.index + next[0].length !== match9.index + match9[0].length) {
46097
- match9 = next;
46143
+ while ((next = safeRe[t.COERCERTL].exec(version)) && (!match13 || match13.index + match13[0].length !== version.length)) {
46144
+ if (!match13 || next.index + next[0].length !== match13.index + match13[0].length) {
46145
+ match13 = next;
46098
46146
  }
46099
46147
  safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
46100
46148
  }
46101
46149
  safeRe[t.COERCERTL].lastIndex = -1;
46102
46150
  }
46103
- if (match9 === null) {
46151
+ if (match13 === null) {
46104
46152
  return null;
46105
46153
  }
46106
- return parse3(match9[2] + "." + (match9[3] || "0") + "." + (match9[4] || "0"), options);
46154
+ return parse3(match13[2] + "." + (match13[3] || "0") + "." + (match13[4] || "0"), options);
46107
46155
  }
46108
46156
  }
46109
46157
  });
@@ -49189,16 +49237,16 @@ ${" ".repeat(indentSize)}`);
49189
49237
  let pkg = null;
49190
49238
  const directories = [];
49191
49239
  let isPackage = true;
49192
- let dirname = _path().dirname(filepath);
49193
- while (!pkg && _path().basename(dirname) !== "node_modules") {
49194
- directories.push(dirname);
49195
- pkg = yield* readConfigPackage(_path().join(dirname, PACKAGE_FILENAME));
49196
- const nextLoc = _path().dirname(dirname);
49197
- if (dirname === nextLoc) {
49240
+ let dirname2 = _path().dirname(filepath);
49241
+ while (!pkg && _path().basename(dirname2) !== "node_modules") {
49242
+ directories.push(dirname2);
49243
+ pkg = yield* readConfigPackage(_path().join(dirname2, PACKAGE_FILENAME));
49244
+ const nextLoc = _path().dirname(dirname2);
49245
+ if (dirname2 === nextLoc) {
49198
49246
  isPackage = false;
49199
49247
  break;
49200
49248
  }
49201
- dirname = nextLoc;
49249
+ dirname2 = nextLoc;
49202
49250
  }
49203
49251
  return {
49204
49252
  filepath,
@@ -51312,11 +51360,11 @@ ${" ".repeat(indentSize)}`);
51312
51360
  }
51313
51361
  for (var name in all) {
51314
51362
  var type = all[name];
51315
- var match9 = query.match(type.regexp);
51316
- if (match9) {
51363
+ var match13 = query.match(type.regexp);
51364
+ if (match13) {
51317
51365
  node.type = name;
51318
51366
  for (var i = 0; i < type.matches.length; i++) {
51319
- node[type.matches[i]] = match9[i + 1];
51367
+ node[type.matches[i]] = match13[i + 1];
51320
51368
  }
51321
51369
  return node;
51322
51370
  }
@@ -52447,8 +52495,8 @@ ${" ".repeat(indentSize)}`);
52447
52495
  }
52448
52496
  }
52449
52497
  }
52450
- browserslist.nodeVersions = jsReleases.map(function(release2) {
52451
- return release2.version;
52498
+ browserslist.nodeVersions = jsReleases.map(function(release) {
52499
+ return release.version;
52452
52500
  });
52453
52501
  })();
52454
52502
  module2.exports = browserslist;
@@ -53514,8 +53562,8 @@ ${" ".repeat(indentSize)}`);
53514
53562
  }
53515
53563
  } while (++i2);
53516
53564
  };
53517
- SemVer.prototype.inc = function(release2, identifier) {
53518
- switch (release2) {
53565
+ SemVer.prototype.inc = function(release, identifier) {
53566
+ switch (release) {
53519
53567
  case "premajor":
53520
53568
  this.prerelease.length = 0;
53521
53569
  this.patch = 0;
@@ -53591,20 +53639,20 @@ ${" ".repeat(indentSize)}`);
53591
53639
  }
53592
53640
  break;
53593
53641
  default:
53594
- throw new Error("invalid increment argument: " + release2);
53642
+ throw new Error("invalid increment argument: " + release);
53595
53643
  }
53596
53644
  this.format();
53597
53645
  this.raw = this.version;
53598
53646
  return this;
53599
53647
  };
53600
53648
  exports2.inc = inc;
53601
- function inc(version, release2, loose, identifier) {
53649
+ function inc(version, release, loose, identifier) {
53602
53650
  if (typeof loose === "string") {
53603
53651
  identifier = loose;
53604
53652
  loose = void 0;
53605
53653
  }
53606
53654
  try {
53607
- return new SemVer(version, loose).inc(release2, identifier).version;
53655
+ return new SemVer(version, loose).inc(release, identifier).version;
53608
53656
  } catch (er) {
53609
53657
  return null;
53610
53658
  }
@@ -54342,23 +54390,23 @@ ${" ".repeat(indentSize)}`);
54342
54390
  return null;
54343
54391
  }
54344
54392
  options = options || {};
54345
- var match9 = null;
54393
+ var match13 = null;
54346
54394
  if (!options.rtl) {
54347
- match9 = version.match(safeRe[t.COERCE]);
54395
+ match13 = version.match(safeRe[t.COERCE]);
54348
54396
  } else {
54349
54397
  var next;
54350
- while ((next = safeRe[t.COERCERTL].exec(version)) && (!match9 || match9.index + match9[0].length !== version.length)) {
54351
- if (!match9 || next.index + next[0].length !== match9.index + match9[0].length) {
54352
- match9 = next;
54398
+ while ((next = safeRe[t.COERCERTL].exec(version)) && (!match13 || match13.index + match13[0].length !== version.length)) {
54399
+ if (!match13 || next.index + next[0].length !== match13.index + match13[0].length) {
54400
+ match13 = next;
54353
54401
  }
54354
54402
  safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
54355
54403
  }
54356
54404
  safeRe[t.COERCERTL].lastIndex = -1;
54357
54405
  }
54358
- if (match9 === null) {
54406
+ if (match13 === null) {
54359
54407
  return null;
54360
54408
  }
54361
- return parse3(match9[2] + "." + (match9[3] || "0") + "." + (match9[4] || "0"), options);
54409
+ return parse3(match13[2] + "." + (match13[3] || "0") + "." + (match13[4] || "0"), options);
54362
54410
  }
54363
54411
  }
54364
54412
  });
@@ -55810,44 +55858,44 @@ getting parsed as 6.1, which can lead to unexpected behavior.
55810
55858
  function* handlerOf(value2) {
55811
55859
  return value2;
55812
55860
  }
55813
- function optionsWithResolvedBrowserslistConfigFile(options, dirname) {
55861
+ function optionsWithResolvedBrowserslistConfigFile(options, dirname2) {
55814
55862
  if (typeof options.browserslistConfigFile === "string") {
55815
- options.browserslistConfigFile = (0, _resolveTargets.resolveBrowserslistConfigFile)(options.browserslistConfigFile, dirname);
55863
+ options.browserslistConfigFile = (0, _resolveTargets.resolveBrowserslistConfigFile)(options.browserslistConfigFile, dirname2);
55816
55864
  }
55817
55865
  return options;
55818
55866
  }
55819
- function createCachedDescriptors(dirname, options, alias) {
55867
+ function createCachedDescriptors(dirname2, options, alias) {
55820
55868
  const {
55821
55869
  plugins,
55822
55870
  presets,
55823
55871
  passPerPreset
55824
55872
  } = options;
55825
55873
  return {
55826
- options: optionsWithResolvedBrowserslistConfigFile(options, dirname),
55827
- plugins: plugins ? () => createCachedPluginDescriptors(plugins, dirname)(alias) : () => handlerOf([]),
55828
- presets: presets ? () => createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset) : () => handlerOf([])
55874
+ options: optionsWithResolvedBrowserslistConfigFile(options, dirname2),
55875
+ plugins: plugins ? () => createCachedPluginDescriptors(plugins, dirname2)(alias) : () => handlerOf([]),
55876
+ presets: presets ? () => createCachedPresetDescriptors(presets, dirname2)(alias)(!!passPerPreset) : () => handlerOf([])
55829
55877
  };
55830
55878
  }
55831
- function createUncachedDescriptors(dirname, options, alias) {
55879
+ function createUncachedDescriptors(dirname2, options, alias) {
55832
55880
  return {
55833
- options: optionsWithResolvedBrowserslistConfigFile(options, dirname),
55834
- plugins: (0, _functional.once)(() => createPluginDescriptors(options.plugins || [], dirname, alias)),
55835
- presets: (0, _functional.once)(() => createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset))
55881
+ options: optionsWithResolvedBrowserslistConfigFile(options, dirname2),
55882
+ plugins: (0, _functional.once)(() => createPluginDescriptors(options.plugins || [], dirname2, alias)),
55883
+ presets: (0, _functional.once)(() => createPresetDescriptors(options.presets || [], dirname2, alias, !!options.passPerPreset))
55836
55884
  };
55837
55885
  }
55838
55886
  var PRESET_DESCRIPTOR_CACHE = /* @__PURE__ */ new WeakMap();
55839
55887
  var createCachedPresetDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => {
55840
- const dirname = cache.using((dir) => dir);
55888
+ const dirname2 = cache.using((dir) => dir);
55841
55889
  return (0, _caching.makeStrongCacheSync)((alias) => (0, _caching.makeStrongCache)(function* (passPerPreset) {
55842
- const descriptors = yield* createPresetDescriptors(items, dirname, alias, passPerPreset);
55890
+ const descriptors = yield* createPresetDescriptors(items, dirname2, alias, passPerPreset);
55843
55891
  return descriptors.map((desc) => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc));
55844
55892
  }));
55845
55893
  });
55846
55894
  var PLUGIN_DESCRIPTOR_CACHE = /* @__PURE__ */ new WeakMap();
55847
55895
  var createCachedPluginDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => {
55848
- const dirname = cache.using((dir) => dir);
55896
+ const dirname2 = cache.using((dir) => dir);
55849
55897
  return (0, _caching.makeStrongCache)(function* (alias) {
55850
- const descriptors = yield* createPluginDescriptors(items, dirname, alias);
55898
+ const descriptors = yield* createPluginDescriptors(items, dirname2, alias);
55851
55899
  return descriptors.map((desc) => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc));
55852
55900
  });
55853
55901
  });
@@ -55877,14 +55925,14 @@ getting parsed as 6.1, which can lead to unexpected behavior.
55877
55925
  }
55878
55926
  return desc;
55879
55927
  }
55880
- function* createPresetDescriptors(items, dirname, alias, passPerPreset) {
55881
- return yield* createDescriptors("preset", items, dirname, alias, passPerPreset);
55928
+ function* createPresetDescriptors(items, dirname2, alias, passPerPreset) {
55929
+ return yield* createDescriptors("preset", items, dirname2, alias, passPerPreset);
55882
55930
  }
55883
- function* createPluginDescriptors(items, dirname, alias) {
55884
- return yield* createDescriptors("plugin", items, dirname, alias);
55931
+ function* createPluginDescriptors(items, dirname2, alias) {
55932
+ return yield* createDescriptors("plugin", items, dirname2, alias);
55885
55933
  }
55886
- function* createDescriptors(type, items, dirname, alias, ownPass) {
55887
- const descriptors = yield* _gensync().all(items.map((item, index) => createDescriptor(item, dirname, {
55934
+ function* createDescriptors(type, items, dirname2, alias, ownPass) {
55935
+ const descriptors = yield* _gensync().all(items.map((item, index) => createDescriptor(item, dirname2, {
55888
55936
  type,
55889
55937
  alias: `${alias}$${index}`,
55890
55938
  ownPass: !!ownPass
@@ -55892,7 +55940,7 @@ getting parsed as 6.1, which can lead to unexpected behavior.
55892
55940
  assertNoDuplicates(descriptors);
55893
55941
  return descriptors;
55894
55942
  }
55895
- function* createDescriptor(pair, dirname, {
55943
+ function* createDescriptor(pair, dirname2, {
55896
55944
  type,
55897
55945
  alias,
55898
55946
  ownPass
@@ -55922,7 +55970,7 @@ getting parsed as 6.1, which can lead to unexpected behavior.
55922
55970
  ({
55923
55971
  filepath,
55924
55972
  value: value2
55925
- } = yield* resolver(value2, dirname));
55973
+ } = yield* resolver(value2, dirname2));
55926
55974
  file = {
55927
55975
  request,
55928
55976
  resolved: filepath
@@ -55949,7 +55997,7 @@ getting parsed as 6.1, which can lead to unexpected behavior.
55949
55997
  alias: filepath || alias,
55950
55998
  value: value2,
55951
55999
  options,
55952
- dirname,
56000
+ dirname: dirname2,
55953
56001
  ownPass,
55954
56002
  file
55955
56003
  };
@@ -55993,10 +56041,10 @@ getting parsed as 6.1, which can lead to unexpected behavior.
55993
56041
  return new ConfigItem(desc);
55994
56042
  }
55995
56043
  function* createConfigItem(value2, {
55996
- dirname = ".",
56044
+ dirname: dirname2 = ".",
55997
56045
  type
55998
56046
  } = {}) {
55999
- const descriptor = yield* (0, _configDescriptors.createDescriptor)(value2, _path().resolve(dirname), {
56047
+ const descriptor = yield* (0, _configDescriptors.createDescriptor)(value2, _path().resolve(dirname2), {
56000
56048
  type,
56001
56049
  alias: "programmatic item"
56002
56050
  });
@@ -56604,8 +56652,8 @@ To be a valid ${type}, its name and options should be wrapped in a pair of brack
56604
56652
  function escapeRegExp(string) {
56605
56653
  return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
56606
56654
  }
56607
- function pathToPattern(pattern, dirname) {
56608
- const parts = _path().resolve(dirname, pattern).split(_path().sep);
56655
+ function pathToPattern(pattern, dirname2) {
56656
+ const parts = _path().resolve(dirname2, pattern).split(_path().sep);
56609
56657
  return new RegExp(["^", ...parts.map((part, i) => {
56610
56658
  const last = i === parts.length - 1;
56611
56659
  if (part === "**") return last ? starStarPatLast : starStarPat;
@@ -56944,10 +56992,10 @@ ${content}`;
56944
56992
  });
56945
56993
  }
56946
56994
  function buildRootDescriptors({
56947
- dirname,
56995
+ dirname: dirname2,
56948
56996
  options
56949
56997
  }, alias, descriptors) {
56950
- return descriptors(dirname, options, alias);
56998
+ return descriptors(dirname2, options, alias);
56951
56999
  }
56952
57000
  function buildProgrammaticLogger(_, context, baseLogger) {
56953
57001
  var _context$caller;
@@ -56960,31 +57008,31 @@ ${content}`;
56960
57008
  });
56961
57009
  }
56962
57010
  function buildEnvDescriptors({
56963
- dirname,
57011
+ dirname: dirname2,
56964
57012
  options
56965
57013
  }, alias, descriptors, envName) {
56966
57014
  var _options$env;
56967
57015
  const opts = (_options$env = options.env) == null ? void 0 : _options$env[envName];
56968
- return opts ? descriptors(dirname, opts, `${alias}.env["${envName}"]`) : null;
57016
+ return opts ? descriptors(dirname2, opts, `${alias}.env["${envName}"]`) : null;
56969
57017
  }
56970
57018
  function buildOverrideDescriptors({
56971
- dirname,
57019
+ dirname: dirname2,
56972
57020
  options
56973
57021
  }, alias, descriptors, index) {
56974
57022
  var _options$overrides;
56975
57023
  const opts = (_options$overrides = options.overrides) == null ? void 0 : _options$overrides[index];
56976
57024
  if (!opts) throw new Error("Assertion failure - missing override");
56977
- return descriptors(dirname, opts, `${alias}.overrides[${index}]`);
57025
+ return descriptors(dirname2, opts, `${alias}.overrides[${index}]`);
56978
57026
  }
56979
57027
  function buildOverrideEnvDescriptors({
56980
- dirname,
57028
+ dirname: dirname2,
56981
57029
  options
56982
57030
  }, alias, descriptors, index, envName) {
56983
57031
  var _options$overrides2, _override$env;
56984
57032
  const override = (_options$overrides2 = options.overrides) == null ? void 0 : _options$overrides2[index];
56985
57033
  if (!override) throw new Error("Assertion failure - missing override");
56986
57034
  const opts = (_override$env = override.env) == null ? void 0 : _override$env[envName];
56987
- return opts ? descriptors(dirname, opts, `${alias}.overrides[${index}].env["${envName}"]`) : null;
57035
+ return opts ? descriptors(dirname2, opts, `${alias}.overrides[${index}].env["${envName}"]`) : null;
56988
57036
  }
56989
57037
  function makeChainWalker({
56990
57038
  root: root2,
@@ -56995,18 +57043,18 @@ ${content}`;
56995
57043
  }) {
56996
57044
  return function* chainWalker(input, context, files = /* @__PURE__ */ new Set(), baseLogger) {
56997
57045
  const {
56998
- dirname
57046
+ dirname: dirname2
56999
57047
  } = input;
57000
57048
  const flattenedConfigs = [];
57001
57049
  const rootOpts = root2(input);
57002
- if (configIsApplicable(rootOpts, dirname, context, input.filepath)) {
57050
+ if (configIsApplicable(rootOpts, dirname2, context, input.filepath)) {
57003
57051
  flattenedConfigs.push({
57004
57052
  config: rootOpts,
57005
57053
  envName: void 0,
57006
57054
  index: void 0
57007
57055
  });
57008
57056
  const envOpts = env(input, context.envName);
57009
- if (envOpts && configIsApplicable(envOpts, dirname, context, input.filepath)) {
57057
+ if (envOpts && configIsApplicable(envOpts, dirname2, context, input.filepath)) {
57010
57058
  flattenedConfigs.push({
57011
57059
  config: envOpts,
57012
57060
  envName: context.envName,
@@ -57015,14 +57063,14 @@ ${content}`;
57015
57063
  }
57016
57064
  (rootOpts.options.overrides || []).forEach((_, index) => {
57017
57065
  const overrideOps = overrides(input, index);
57018
- if (configIsApplicable(overrideOps, dirname, context, input.filepath)) {
57066
+ if (configIsApplicable(overrideOps, dirname2, context, input.filepath)) {
57019
57067
  flattenedConfigs.push({
57020
57068
  config: overrideOps,
57021
57069
  index,
57022
57070
  envName: void 0
57023
57071
  });
57024
57072
  const overrideEnvOpts = overridesEnv(input, index, context.envName);
57025
- if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context, input.filepath)) {
57073
+ if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname2, context, input.filepath)) {
57026
57074
  flattenedConfigs.push({
57027
57075
  config: overrideEnvOpts,
57028
57076
  index,
@@ -57039,7 +57087,7 @@ ${content}`;
57039
57087
  only
57040
57088
  }
57041
57089
  }
57042
- }) => shouldIgnore(context, ignore, only, dirname))) {
57090
+ }) => shouldIgnore(context, ignore, only, dirname2))) {
57043
57091
  return null;
57044
57092
  }
57045
57093
  const chain = emptyChain();
@@ -57049,7 +57097,7 @@ ${content}`;
57049
57097
  index,
57050
57098
  envName
57051
57099
  } of flattenedConfigs) {
57052
- if (!(yield* mergeExtendsChain(chain, config.options, dirname, context, files, baseLogger))) {
57100
+ if (!(yield* mergeExtendsChain(chain, config.options, dirname2, context, files, baseLogger))) {
57053
57101
  return null;
57054
57102
  }
57055
57103
  logger(config, index, envName);
@@ -57058,9 +57106,9 @@ ${content}`;
57058
57106
  return chain;
57059
57107
  };
57060
57108
  }
57061
- function* mergeExtendsChain(chain, opts, dirname, context, files, baseLogger) {
57109
+ function* mergeExtendsChain(chain, opts, dirname2, context, files, baseLogger) {
57062
57110
  if (opts.extends === void 0) return true;
57063
- const file = yield* (0, _index.loadConfig)(opts.extends, dirname, context.envName, context.caller);
57111
+ const file = yield* (0, _index.loadConfig)(opts.extends, dirname2, context.envName, context.caller);
57064
57112
  if (files.has(file)) {
57065
57113
  throw new Error(`Configuration cycle detected loading ${file.filepath}.
57066
57114
  File already loaded following the config chain:
@@ -57153,12 +57201,12 @@ File already loaded following the config chain:
57153
57201
  }
57154
57202
  function configIsApplicable({
57155
57203
  options
57156
- }, dirname, context, configName) {
57157
- return (options.test === void 0 || configFieldIsApplicable(context, options.test, dirname, configName)) && (options.include === void 0 || configFieldIsApplicable(context, options.include, dirname, configName)) && (options.exclude === void 0 || !configFieldIsApplicable(context, options.exclude, dirname, configName));
57204
+ }, dirname2, context, configName) {
57205
+ return (options.test === void 0 || configFieldIsApplicable(context, options.test, dirname2, configName)) && (options.include === void 0 || configFieldIsApplicable(context, options.include, dirname2, configName)) && (options.exclude === void 0 || !configFieldIsApplicable(context, options.exclude, dirname2, configName));
57158
57206
  }
57159
- function configFieldIsApplicable(context, test, dirname, configName) {
57207
+ function configFieldIsApplicable(context, test, dirname2, configName) {
57160
57208
  const patterns = Array.isArray(test) ? test : [test];
57161
- return matchesPatterns(context, patterns, dirname, configName);
57209
+ return matchesPatterns(context, patterns, dirname2, configName);
57162
57210
  }
57163
57211
  function ignoreListReplacer(_key, value2) {
57164
57212
  if (value2 instanceof RegExp) {
@@ -57166,19 +57214,19 @@ File already loaded following the config chain:
57166
57214
  }
57167
57215
  return value2;
57168
57216
  }
57169
- function shouldIgnore(context, ignore, only, dirname) {
57170
- if (ignore && matchesPatterns(context, ignore, dirname)) {
57217
+ function shouldIgnore(context, ignore, only, dirname2) {
57218
+ if (ignore && matchesPatterns(context, ignore, dirname2)) {
57171
57219
  var _context$filename;
57172
- const message = `No config is applied to "${(_context$filename = context.filename) != null ? _context$filename : "(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(ignore, ignoreListReplacer)}\` from "${dirname}"`;
57220
+ const message = `No config is applied to "${(_context$filename = context.filename) != null ? _context$filename : "(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(ignore, ignoreListReplacer)}\` from "${dirname2}"`;
57173
57221
  debug(message);
57174
57222
  if (context.showConfig) {
57175
57223
  console.log(message);
57176
57224
  }
57177
57225
  return true;
57178
57226
  }
57179
- if (only && !matchesPatterns(context, only, dirname)) {
57227
+ if (only && !matchesPatterns(context, only, dirname2)) {
57180
57228
  var _context$filename2;
57181
- const message = `No config is applied to "${(_context$filename2 = context.filename) != null ? _context$filename2 : "(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(only, ignoreListReplacer)}\` from "${dirname}"`;
57229
+ const message = `No config is applied to "${(_context$filename2 = context.filename) != null ? _context$filename2 : "(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(only, ignoreListReplacer)}\` from "${dirname2}"`;
57182
57230
  debug(message);
57183
57231
  if (context.showConfig) {
57184
57232
  console.log(message);
@@ -57187,13 +57235,13 @@ File already loaded following the config chain:
57187
57235
  }
57188
57236
  return false;
57189
57237
  }
57190
- function matchesPatterns(context, patterns, dirname, configName) {
57191
- return patterns.some((pattern) => matchPattern(pattern, dirname, context.filename, context, configName));
57238
+ function matchesPatterns(context, patterns, dirname2, configName) {
57239
+ return patterns.some((pattern) => matchPattern(pattern, dirname2, context.filename, context, configName));
57192
57240
  }
57193
- function matchPattern(pattern, dirname, pathToTest, context, configName) {
57241
+ function matchPattern(pattern, dirname2, pathToTest, context, configName) {
57194
57242
  if (typeof pattern === "function") {
57195
57243
  return !!(0, _rewriteStackTrace.endHiddenCallStack)(pattern)(pathToTest, {
57196
- dirname,
57244
+ dirname: dirname2,
57197
57245
  envName: context.envName,
57198
57246
  caller: context.caller
57199
57247
  });
@@ -57202,7 +57250,7 @@ File already loaded following the config chain:
57202
57250
  throw new _configError.default(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`, configName);
57203
57251
  }
57204
57252
  if (typeof pattern === "string") {
57205
- pattern = (0, _patternToRegex.default)(pattern, dirname);
57253
+ pattern = (0, _patternToRegex.default)(pattern, dirname2);
57206
57254
  }
57207
57255
  return pattern.test(pathToTest);
57208
57256
  }
@@ -57621,7 +57669,7 @@ One of the following config files must be in the directory tree: "${_index.ROOT_
57621
57669
  var makeDescriptorLoader = (apiFactory) => (0, _caching.makeWeakCache)(function* ({
57622
57670
  value: value2,
57623
57671
  options,
57624
- dirname,
57672
+ dirname: dirname2,
57625
57673
  alias
57626
57674
  }, cache) {
57627
57675
  if (options === false) throw new Error("Assertion failure");
@@ -57632,7 +57680,7 @@ One of the following config files must be in the directory tree: "${_index.ROOT_
57632
57680
  const factory = (0, _async.maybeAsync)(value2, `You appear to be using an async plugin/preset, but Babel has been called synchronously`);
57633
57681
  const api = Object.assign({}, context, apiFactory(cache, externalDependencies));
57634
57682
  try {
57635
- item = yield* factory(api, options, dirname);
57683
+ item = yield* factory(api, options, dirname2);
57636
57684
  } catch (e) {
57637
57685
  if (alias) {
57638
57686
  e.message += ` (While processing: ${JSON.stringify(alias)})`;
@@ -57661,7 +57709,7 @@ One of the following config files must be in the directory tree: "${_index.ROOT_
57661
57709
  return {
57662
57710
  value: item,
57663
57711
  options,
57664
- dirname,
57712
+ dirname: dirname2,
57665
57713
  alias,
57666
57714
  externalDependencies: (0, _deepArray.finalize)(externalDependencies)
57667
57715
  };
@@ -57671,7 +57719,7 @@ One of the following config files must be in the directory tree: "${_index.ROOT_
57671
57719
  var instantiatePlugin = (0, _caching.makeWeakCache)(function* ({
57672
57720
  value: value2,
57673
57721
  options,
57674
- dirname,
57722
+ dirname: dirname2,
57675
57723
  alias,
57676
57724
  externalDependencies
57677
57725
  }, cache) {
@@ -57686,7 +57734,7 @@ One of the following config files must be in the directory tree: "${_index.ROOT_
57686
57734
  alias: `${alias}$inherits`,
57687
57735
  value: plugin.inherits,
57688
57736
  options,
57689
- dirname
57737
+ dirname: dirname2
57690
57738
  };
57691
57739
  const inherits = yield* (0, _async.forwardAsync)(loadPluginDescriptor, (run) => {
57692
57740
  return cache.invalidate((data) => run(inheritsDescriptor, data));
@@ -57733,14 +57781,14 @@ One of the following config files must be in the directory tree: "${_index.ROOT_
57733
57781
  };
57734
57782
  var instantiatePreset = (0, _caching.makeWeakCacheSync)(({
57735
57783
  value: value2,
57736
- dirname,
57784
+ dirname: dirname2,
57737
57785
  alias,
57738
57786
  externalDependencies
57739
57787
  }) => {
57740
57788
  return {
57741
57789
  options: (0, _options.validate)("preset", value2),
57742
57790
  alias,
57743
- dirname,
57791
+ dirname: dirname2,
57744
57792
  externalDependencies
57745
57793
  };
57746
57794
  });
@@ -58805,8 +58853,8 @@ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
58805
58853
  const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);
58806
58854
  if (typeof options.filename === "string" && lastComment) {
58807
58855
  try {
58808
- const match9 = EXTERNAL_SOURCEMAP_REGEX.exec(lastComment);
58809
- const inputMapContent = _fs().readFileSync(_path().resolve(_path().dirname(options.filename), match9[1]), "utf8");
58856
+ const match13 = EXTERNAL_SOURCEMAP_REGEX.exec(lastComment);
58857
+ const inputMapContent = _fs().readFileSync(_path().resolve(_path().dirname(options.filename), match13[1]), "utf8");
58810
58858
  inputMap = _convertSourceMap().fromJSON(inputMapContent);
58811
58859
  } catch (err) {
58812
58860
  debug("discarding unknown file input sourcemap", err);
@@ -59376,14 +59424,14 @@ Did you specify these with the most recent transformation maps first?`
59376
59424
  });
59377
59425
  }
59378
59426
  function declare(builder) {
59379
- return (api, options, dirname) => {
59427
+ return (api, options, dirname2) => {
59380
59428
  let clonedApi;
59381
59429
  for (const name of Object.keys(apiPolyfills)) {
59382
59430
  if (api[name]) continue;
59383
59431
  clonedApi != null ? clonedApi : clonedApi = copyApiObject(api);
59384
59432
  clonedApi[name] = apiPolyfills[name](clonedApi);
59385
59433
  }
59386
- return builder(clonedApi != null ? clonedApi : api, options || {}, dirname);
59434
+ return builder(clonedApi != null ? clonedApi : api, options || {}, dirname2);
59387
59435
  };
59388
59436
  }
59389
59437
  var declarePreset = exports2.declarePreset = declare;
@@ -63110,8 +63158,8 @@ If you have already enabled that plugin (or '@babel/preset-typescript'), make su
63110
63158
  }
63111
63159
  } while (++i2);
63112
63160
  };
63113
- SemVer.prototype.inc = function(release2, identifier) {
63114
- switch (release2) {
63161
+ SemVer.prototype.inc = function(release, identifier) {
63162
+ switch (release) {
63115
63163
  case "premajor":
63116
63164
  this.prerelease.length = 0;
63117
63165
  this.patch = 0;
@@ -63187,20 +63235,20 @@ If you have already enabled that plugin (or '@babel/preset-typescript'), make su
63187
63235
  }
63188
63236
  break;
63189
63237
  default:
63190
- throw new Error("invalid increment argument: " + release2);
63238
+ throw new Error("invalid increment argument: " + release);
63191
63239
  }
63192
63240
  this.format();
63193
63241
  this.raw = this.version;
63194
63242
  return this;
63195
63243
  };
63196
63244
  exports2.inc = inc;
63197
- function inc(version, release2, loose, identifier) {
63245
+ function inc(version, release, loose, identifier) {
63198
63246
  if (typeof loose === "string") {
63199
63247
  identifier = loose;
63200
63248
  loose = void 0;
63201
63249
  }
63202
63250
  try {
63203
- return new SemVer(version, loose).inc(release2, identifier).version;
63251
+ return new SemVer(version, loose).inc(release, identifier).version;
63204
63252
  } catch (er) {
63205
63253
  return null;
63206
63254
  }
@@ -63938,23 +63986,23 @@ If you have already enabled that plugin (or '@babel/preset-typescript'), make su
63938
63986
  return null;
63939
63987
  }
63940
63988
  options = options || {};
63941
- var match9 = null;
63989
+ var match13 = null;
63942
63990
  if (!options.rtl) {
63943
- match9 = version.match(safeRe[t.COERCE]);
63991
+ match13 = version.match(safeRe[t.COERCE]);
63944
63992
  } else {
63945
63993
  var next;
63946
- while ((next = safeRe[t.COERCERTL].exec(version)) && (!match9 || match9.index + match9[0].length !== version.length)) {
63947
- if (!match9 || next.index + next[0].length !== match9.index + match9[0].length) {
63948
- match9 = next;
63994
+ while ((next = safeRe[t.COERCERTL].exec(version)) && (!match13 || match13.index + match13[0].length !== version.length)) {
63995
+ if (!match13 || next.index + next[0].length !== match13.index + match13[0].length) {
63996
+ match13 = next;
63949
63997
  }
63950
63998
  safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
63951
63999
  }
63952
64000
  safeRe[t.COERCERTL].lastIndex = -1;
63953
64001
  }
63954
- if (match9 === null) {
64002
+ if (match13 === null) {
63955
64003
  return null;
63956
64004
  }
63957
- return parse3(match9[2] + "." + (match9[3] || "0") + "." + (match9[4] || "0"), options);
64005
+ return parse3(match13[2] + "." + (match13[3] || "0") + "." + (match13[4] || "0"), options);
63958
64006
  }
63959
64007
  }
63960
64008
  });
@@ -66096,23 +66144,23 @@ packageExtensions:
66096
66144
  };
66097
66145
  });
66098
66146
  function findConfigUpwards(rootDir) {
66099
- let dirname = rootDir;
66147
+ let dirname2 = rootDir;
66100
66148
  for (; ; ) {
66101
66149
  for (const filename of ROOT_CONFIG_FILENAMES) {
66102
- if (_fs().existsSync(_path().join(dirname, filename))) {
66103
- return dirname;
66150
+ if (_fs().existsSync(_path().join(dirname2, filename))) {
66151
+ return dirname2;
66104
66152
  }
66105
66153
  }
66106
- const nextDir = _path().dirname(dirname);
66107
- if (dirname === nextDir) break;
66108
- dirname = nextDir;
66154
+ const nextDir = _path().dirname(dirname2);
66155
+ if (dirname2 === nextDir) break;
66156
+ dirname2 = nextDir;
66109
66157
  }
66110
66158
  return null;
66111
66159
  }
66112
66160
  function* findRelativeConfig(packageData, envName, caller) {
66113
66161
  let config = null;
66114
66162
  let ignore = null;
66115
- const dirname = _path().dirname(packageData.filepath);
66163
+ const dirname2 = _path().dirname(packageData.filepath);
66116
66164
  for (const loc of packageData.directories) {
66117
66165
  if (!config) {
66118
66166
  var _packageData$pkg;
@@ -66122,7 +66170,7 @@ packageExtensions:
66122
66170
  const ignoreLoc = _path().join(loc, BABELIGNORE_FILENAME);
66123
66171
  ignore = yield* readIgnoreConfig(ignoreLoc);
66124
66172
  if (ignore) {
66125
- debug("Found ignore %o from %o.", ignore.filepath, dirname);
66173
+ debug("Found ignore %o from %o.", ignore.filepath, dirname2);
66126
66174
  }
66127
66175
  }
66128
66176
  }
@@ -66131,26 +66179,26 @@ packageExtensions:
66131
66179
  ignore
66132
66180
  };
66133
66181
  }
66134
- function findRootConfig(dirname, envName, caller) {
66135
- return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller);
66182
+ function findRootConfig(dirname2, envName, caller) {
66183
+ return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname2, envName, caller);
66136
66184
  }
66137
- function* loadOneConfig(names, dirname, envName, caller, previousConfig = null) {
66138
- const configs = yield* _gensync().all(names.map((filename) => readConfig(_path().join(dirname, filename), envName, caller)));
66185
+ function* loadOneConfig(names, dirname2, envName, caller, previousConfig = null) {
66186
+ const configs = yield* _gensync().all(names.map((filename) => readConfig(_path().join(dirname2, filename), envName, caller)));
66139
66187
  const config = configs.reduce((previousConfig2, config2) => {
66140
66188
  if (config2 && previousConfig2) {
66141
66189
  throw new _configError.default(`Multiple configuration files found. Please remove one:
66142
66190
  - ${_path().basename(previousConfig2.filepath)}
66143
66191
  - ${config2.filepath}
66144
- from ${dirname}`);
66192
+ from ${dirname2}`);
66145
66193
  }
66146
66194
  return config2 || previousConfig2;
66147
66195
  }, previousConfig);
66148
66196
  if (config) {
66149
- debug("Found configuration %o from %o.", config.filepath, dirname);
66197
+ debug("Found configuration %o from %o.", config.filepath, dirname2);
66150
66198
  }
66151
66199
  return config;
66152
66200
  }
66153
- function* loadConfig(name, dirname, envName, caller) {
66201
+ function* loadConfig(name, dirname2, envName, caller) {
66154
66202
  const filepath = (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? __require.resolve : (r, {
66155
66203
  paths: [b]
66156
66204
  }, M = __require("module")) => {
@@ -66160,13 +66208,13 @@ from ${dirname}`);
66160
66208
  f.code = "MODULE_NOT_FOUND";
66161
66209
  throw f;
66162
66210
  })(name, {
66163
- paths: [dirname]
66211
+ paths: [dirname2]
66164
66212
  });
66165
66213
  const conf = yield* readConfig(filepath, envName, caller);
66166
66214
  if (!conf) {
66167
66215
  throw new _configError.default(`Config file contains no configuration data`, filepath);
66168
66216
  }
66169
- debug("Loaded config %o from %o.", name, dirname);
66217
+ debug("Loaded config %o from %o.", name, dirname2);
66170
66218
  return conf;
66171
66219
  }
66172
66220
  function readConfig(filepath, envName, caller) {
@@ -66186,10 +66234,10 @@ from ${dirname}`);
66186
66234
  return readConfigJSON5(filepath);
66187
66235
  }
66188
66236
  }
66189
- function* resolveShowConfigPath(dirname) {
66237
+ function* resolveShowConfigPath(dirname2) {
66190
66238
  const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;
66191
66239
  if (targetPath != null) {
66192
- const absolutePath = _path().resolve(dirname, targetPath);
66240
+ const absolutePath = _path().resolve(dirname2, targetPath);
66193
66241
  const stats = yield* fs.stat(absolutePath);
66194
66242
  if (!stats.isFile()) {
66195
66243
  throw new Error(`${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`);
@@ -66724,13 +66772,13 @@ module.exports = function(api) {
66724
66772
  var encodedSeparatorRegEx = /%2f|%5c/i;
66725
66773
  var emittedPackageWarnings = /* @__PURE__ */ new Set();
66726
66774
  var doubleSlashRegEx = /[/\\]{2}/;
66727
- function emitInvalidSegmentDeprecation(target, request, match9, packageJsonUrl, internal, base, isTarget) {
66775
+ function emitInvalidSegmentDeprecation(target, request, match13, packageJsonUrl, internal, base, isTarget) {
66728
66776
  if (_process().noDeprecation) {
66729
66777
  return;
66730
66778
  }
66731
66779
  const pjsonPath = (0, _url().fileURLToPath)(packageJsonUrl);
66732
66780
  const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;
66733
- _process().emitWarning(`Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match9 ? "" : `matched to "${match9}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, _url().fileURLToPath)(base)}` : ""}.`, "DeprecationWarning", "DEP0166");
66781
+ _process().emitWarning(`Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match13 ? "" : `matched to "${match13}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, _url().fileURLToPath)(base)}` : ""}.`, "DeprecationWarning", "DEP0166");
66734
66782
  }
66735
66783
  function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
66736
66784
  if (_process().noDeprecation) {
@@ -66840,16 +66888,16 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
66840
66888
  function exportsNotFound(subpath, packageJsonUrl, base) {
66841
66889
  return new ERR_PACKAGE_PATH_NOT_EXPORTED((0, _url().fileURLToPath)(new (_url()).URL(".", packageJsonUrl)), subpath, base && (0, _url().fileURLToPath)(base));
66842
66890
  }
66843
- function throwInvalidSubpath(request, match9, packageJsonUrl, internal, base) {
66844
- const reason = `request is not a valid match in pattern "${match9}" for the "${internal ? "imports" : "exports"}" resolution of ${(0, _url().fileURLToPath)(packageJsonUrl)}`;
66891
+ function throwInvalidSubpath(request, match13, packageJsonUrl, internal, base) {
66892
+ const reason = `request is not a valid match in pattern "${match13}" for the "${internal ? "imports" : "exports"}" resolution of ${(0, _url().fileURLToPath)(packageJsonUrl)}`;
66845
66893
  throw new ERR_INVALID_MODULE_SPECIFIER(request, reason, base && (0, _url().fileURLToPath)(base));
66846
66894
  }
66847
66895
  function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {
66848
66896
  target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`;
66849
66897
  return new ERR_INVALID_PACKAGE_TARGET((0, _url().fileURLToPath)(new (_url()).URL(".", packageJsonUrl)), subpath, target, internal, base && (0, _url().fileURLToPath)(base));
66850
66898
  }
66851
- function resolvePackageTargetString(target, subpath, match9, packageJsonUrl, base, pattern, internal, isPathMap, conditions) {
66852
- if (subpath !== "" && !pattern && target[target.length - 1] !== "/") throw invalidPackageTarget(match9, target, packageJsonUrl, internal, base);
66899
+ function resolvePackageTargetString(target, subpath, match13, packageJsonUrl, base, pattern, internal, isPathMap, conditions) {
66900
+ if (subpath !== "" && !pattern && target[target.length - 1] !== "/") throw invalidPackageTarget(match13, target, packageJsonUrl, internal, base);
66853
66901
  if (!target.startsWith("./")) {
66854
66902
  if (internal && !target.startsWith("../") && !target.startsWith("/")) {
66855
66903
  let isURL2 = false;
@@ -66863,33 +66911,33 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
66863
66911
  return packageResolve(exportTarget, packageJsonUrl, conditions);
66864
66912
  }
66865
66913
  }
66866
- throw invalidPackageTarget(match9, target, packageJsonUrl, internal, base);
66914
+ throw invalidPackageTarget(match13, target, packageJsonUrl, internal, base);
66867
66915
  }
66868
66916
  if (invalidSegmentRegEx.exec(target.slice(2)) !== null) {
66869
66917
  if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) {
66870
66918
  if (!isPathMap) {
66871
- const request = pattern ? match9.replace("*", () => subpath) : match9 + subpath;
66919
+ const request = pattern ? match13.replace("*", () => subpath) : match13 + subpath;
66872
66920
  const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target;
66873
- emitInvalidSegmentDeprecation(resolvedTarget, request, match9, packageJsonUrl, internal, base, true);
66921
+ emitInvalidSegmentDeprecation(resolvedTarget, request, match13, packageJsonUrl, internal, base, true);
66874
66922
  }
66875
66923
  } else {
66876
- throw invalidPackageTarget(match9, target, packageJsonUrl, internal, base);
66924
+ throw invalidPackageTarget(match13, target, packageJsonUrl, internal, base);
66877
66925
  }
66878
66926
  }
66879
66927
  const resolved = new (_url()).URL(target, packageJsonUrl);
66880
66928
  const resolvedPath = resolved.pathname;
66881
66929
  const packagePath = new (_url()).URL(".", packageJsonUrl).pathname;
66882
- if (!resolvedPath.startsWith(packagePath)) throw invalidPackageTarget(match9, target, packageJsonUrl, internal, base);
66930
+ if (!resolvedPath.startsWith(packagePath)) throw invalidPackageTarget(match13, target, packageJsonUrl, internal, base);
66883
66931
  if (subpath === "") return resolved;
66884
66932
  if (invalidSegmentRegEx.exec(subpath) !== null) {
66885
- const request = pattern ? match9.replace("*", () => subpath) : match9 + subpath;
66933
+ const request = pattern ? match13.replace("*", () => subpath) : match13 + subpath;
66886
66934
  if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) {
66887
66935
  if (!isPathMap) {
66888
66936
  const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call(patternRegEx, target, () => subpath) : target;
66889
- emitInvalidSegmentDeprecation(resolvedTarget, request, match9, packageJsonUrl, internal, base, false);
66937
+ emitInvalidSegmentDeprecation(resolvedTarget, request, match13, packageJsonUrl, internal, base, false);
66890
66938
  }
66891
66939
  } else {
66892
- throwInvalidSubpath(request, match9, packageJsonUrl, internal, base);
66940
+ throwInvalidSubpath(request, match13, packageJsonUrl, internal, base);
66893
66941
  }
66894
66942
  }
66895
66943
  if (pattern) {
@@ -66978,14 +67026,14 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
66978
67026
  }
66979
67027
  return isConditionalSugar;
66980
67028
  }
66981
- function emitTrailingSlashPatternDeprecation(match9, pjsonUrl, base) {
67029
+ function emitTrailingSlashPatternDeprecation(match13, pjsonUrl, base) {
66982
67030
  if (_process().noDeprecation) {
66983
67031
  return;
66984
67032
  }
66985
67033
  const pjsonPath = (0, _url().fileURLToPath)(pjsonUrl);
66986
- if (emittedPackageWarnings.has(pjsonPath + "|" + match9)) return;
66987
- emittedPackageWarnings.add(pjsonPath + "|" + match9);
66988
- _process().emitWarning(`Use of deprecated trailing slash pattern mapping "${match9}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, _url().fileURLToPath)(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155");
67034
+ if (emittedPackageWarnings.has(pjsonPath + "|" + match13)) return;
67035
+ emittedPackageWarnings.add(pjsonPath + "|" + match13);
67036
+ _process().emitWarning(`Use of deprecated trailing slash pattern mapping "${match13}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, _url().fileURLToPath)(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155");
66989
67037
  }
66990
67038
  function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) {
66991
67039
  let exports3 = packageConfig.exports;
@@ -67350,25 +67398,25 @@ Default "index" lookups for the main are deprecated for ES modules.`, "Deprecati
67350
67398
  var OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;
67351
67399
  var resolvePlugin = exports2.resolvePlugin = resolveStandardizedName.bind(null, "plugin");
67352
67400
  var resolvePreset = exports2.resolvePreset = resolveStandardizedName.bind(null, "preset");
67353
- function* loadPlugin(name, dirname) {
67401
+ function* loadPlugin(name, dirname2) {
67354
67402
  const {
67355
67403
  filepath,
67356
67404
  loader
67357
- } = resolvePlugin(name, dirname, yield* (0, _async.isAsync)());
67405
+ } = resolvePlugin(name, dirname2, yield* (0, _async.isAsync)());
67358
67406
  const value2 = yield* requireModule("plugin", loader, filepath);
67359
- debug("Loaded plugin %o from %o.", name, dirname);
67407
+ debug("Loaded plugin %o from %o.", name, dirname2);
67360
67408
  return {
67361
67409
  filepath,
67362
67410
  value: value2
67363
67411
  };
67364
67412
  }
67365
- function* loadPreset(name, dirname) {
67413
+ function* loadPreset(name, dirname2) {
67366
67414
  const {
67367
67415
  filepath,
67368
67416
  loader
67369
- } = resolvePreset(name, dirname, yield* (0, _async.isAsync)());
67417
+ } = resolvePreset(name, dirname2, yield* (0, _async.isAsync)());
67370
67418
  const value2 = yield* requireModule("preset", loader, filepath);
67371
- debug("Loaded preset %o from %o.", name, dirname);
67419
+ debug("Loaded preset %o from %o.", name, dirname2);
67372
67420
  return {
67373
67421
  filepath,
67374
67422
  value: value2
@@ -67418,9 +67466,9 @@ to your top-level package.json.
67418
67466
  `;
67419
67467
  throw error;
67420
67468
  }
67421
- function tryRequireResolve(id, dirname) {
67469
+ function tryRequireResolve(id, dirname2) {
67422
67470
  try {
67423
- if (dirname) {
67471
+ if (dirname2) {
67424
67472
  return {
67425
67473
  error: null,
67426
67474
  value: (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? __require.resolve : (r, {
@@ -67432,7 +67480,7 @@ to your top-level package.json.
67432
67480
  f.code = "MODULE_NOT_FOUND";
67433
67481
  throw f;
67434
67482
  })(id, {
67435
- paths: [dirname]
67483
+ paths: [dirname2]
67436
67484
  })
67437
67485
  };
67438
67486
  } else {
@@ -67461,19 +67509,19 @@ to your top-level package.json.
67461
67509
  };
67462
67510
  }
67463
67511
  }
67464
- function resolveStandardizedNameForRequire(type, name, dirname) {
67512
+ function resolveStandardizedNameForRequire(type, name, dirname2) {
67465
67513
  const it = resolveAlternativesHelper(type, name);
67466
67514
  let res = it.next();
67467
67515
  while (!res.done) {
67468
- res = it.next(tryRequireResolve(res.value, dirname));
67516
+ res = it.next(tryRequireResolve(res.value, dirname2));
67469
67517
  }
67470
67518
  return {
67471
67519
  loader: "require",
67472
67520
  filepath: res.value
67473
67521
  };
67474
67522
  }
67475
- function resolveStandardizedNameForImport(type, name, dirname) {
67476
- const parentUrl = (0, _url().pathToFileURL)(_path().join(dirname, "./babel-virtual-resolve-base.js")).href;
67523
+ function resolveStandardizedNameForImport(type, name, dirname2) {
67524
+ const parentUrl = (0, _url().pathToFileURL)(_path().join(dirname2, "./babel-virtual-resolve-base.js")).href;
67477
67525
  const it = resolveAlternativesHelper(type, name);
67478
67526
  let res = it.next();
67479
67527
  while (!res.done) {
@@ -67484,21 +67532,21 @@ to your top-level package.json.
67484
67532
  filepath: (0, _url().fileURLToPath)(res.value)
67485
67533
  };
67486
67534
  }
67487
- function resolveStandardizedName(type, name, dirname, allowAsync) {
67535
+ function resolveStandardizedName(type, name, dirname2, allowAsync) {
67488
67536
  if (!_moduleTypes.supportsESM || !allowAsync) {
67489
- return resolveStandardizedNameForRequire(type, name, dirname);
67537
+ return resolveStandardizedNameForRequire(type, name, dirname2);
67490
67538
  }
67491
67539
  try {
67492
- const resolved = resolveStandardizedNameForImport(type, name, dirname);
67540
+ const resolved = resolveStandardizedNameForImport(type, name, dirname2);
67493
67541
  if (!(0, _fs().existsSync)(resolved.filepath)) {
67494
- throw Object.assign(new Error(`Could not resolve "${name}" in file ${dirname}.`), {
67542
+ throw Object.assign(new Error(`Could not resolve "${name}" in file ${dirname2}.`), {
67495
67543
  type: "MODULE_NOT_FOUND"
67496
67544
  });
67497
67545
  }
67498
67546
  return resolved;
67499
67547
  } catch (e) {
67500
67548
  try {
67501
- return resolveStandardizedNameForRequire(type, name, dirname);
67549
+ return resolveStandardizedNameForRequire(type, name, dirname2);
67502
67550
  } catch (e2) {
67503
67551
  if (e.type === "MODULE_NOT_FOUND") throw e;
67504
67552
  if (e2.type === "MODULE_NOT_FOUND") throw e2;
@@ -67972,9 +68020,9 @@ to your top-level package.json.
67972
68020
  var _transformAst = require_transform_ast();
67973
68021
  var _parse = require_parse3();
67974
68022
  var version = exports2.version = "7.28.4";
67975
- var resolvePlugin = (name, dirname) => resolvers.resolvePlugin(name, dirname, false).filepath;
68023
+ var resolvePlugin = (name, dirname2) => resolvers.resolvePlugin(name, dirname2, false).filepath;
67976
68024
  exports2.resolvePlugin = resolvePlugin;
67977
- var resolvePreset = (name, dirname) => resolvers.resolvePreset(name, dirname, false).filepath;
68025
+ var resolvePreset = (name, dirname2) => resolvers.resolvePreset(name, dirname2, false).filepath;
67978
68026
  exports2.resolvePreset = resolvePreset;
67979
68027
  var DEFAULT_EXTENSIONS = exports2.DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]);
67980
68028
  {
@@ -68783,8 +68831,8 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
68783
68831
  * @returns {Promise} A promise that resolves when the release has been created.
68784
68832
  * @memberof SentryReleases
68785
68833
  */
68786
- async new(release2, options) {
68787
- const args = ["releases", "new", release2].concat(helper.getProjectFlagsFromOptions(options));
68834
+ async new(release, options) {
68835
+ const args = ["releases", "new", release].concat(helper.getProjectFlagsFromOptions(options));
68788
68836
  return this.execute(args, null);
68789
68837
  }
68790
68838
  /**
@@ -68808,7 +68856,7 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
68808
68856
  * @returns {Promise} A promise that resolves when the commits have been associated
68809
68857
  * @memberof SentryReleases
68810
68858
  */
68811
- async setCommits(release2, options) {
68859
+ async setCommits(release, options) {
68812
68860
  if (!options || !options.auto && (!options.repo || !options.commit)) {
68813
68861
  throw new Error("options.auto, or options.repo and options.commit must be specified");
68814
68862
  }
@@ -68823,7 +68871,7 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
68823
68871
  if (options.ignoreMissing) {
68824
68872
  commitFlags.push("--ignore-missing");
68825
68873
  }
68826
- return this.execute(["releases", "set-commits", release2].concat(commitFlags), false);
68874
+ return this.execute(["releases", "set-commits", release].concat(commitFlags), false);
68827
68875
  }
68828
68876
  /**
68829
68877
  * Marks this release as complete. This should be called once all artifacts has been
@@ -68833,8 +68881,8 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
68833
68881
  * @returns {Promise} A promise that resolves when the release has been finalized.
68834
68882
  * @memberof SentryReleases
68835
68883
  */
68836
- async finalize(release2) {
68837
- return this.execute(["releases", "finalize", release2], null);
68884
+ async finalize(release) {
68885
+ return this.execute(["releases", "finalize", release], null);
68838
68886
  }
68839
68887
  /**
68840
68888
  * Creates a unique, deterministic version identifier based on the project type and
@@ -68882,7 +68930,7 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
68882
68930
  * @returns {Promise} A promise that resolves when the upload has completed successfully.
68883
68931
  * @memberof SentryReleases
68884
68932
  */
68885
- async uploadSourceMaps(release2, options) {
68933
+ async uploadSourceMaps(release, options) {
68886
68934
  if (!options || !options.include || !Array.isArray(options.include)) {
68887
68935
  throw new Error(
68888
68936
  "`options.include` must be a valid array of paths and/or path descriptor objects."
@@ -68907,7 +68955,7 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
68907
68955
  if (!newOptions.ignoreFile && !newOptions.ignore) {
68908
68956
  newOptions.ignore = DEFAULT_IGNORE;
68909
68957
  }
68910
- const args = ["sourcemaps", "upload"].concat(helper.getProjectFlagsFromOptions(options)).concat(["--release", release2]);
68958
+ const args = ["sourcemaps", "upload"].concat(helper.getProjectFlagsFromOptions(options)).concat(["--release", release]);
68911
68959
  return uploadPaths.map(
68912
68960
  (path) => (
68913
68961
  // `execute()` is async and thus we're returning a promise here
@@ -68927,8 +68975,8 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
68927
68975
  * @returns {Promise} A promise that resolves when the list comes back from the server.
68928
68976
  * @memberof SentryReleases
68929
68977
  */
68930
- async listDeploys(release2) {
68931
- return this.execute(["releases", "deploys", release2, "list"], null);
68978
+ async listDeploys(release) {
68979
+ return this.execute(["releases", "deploys", release, "list"], null);
68932
68980
  }
68933
68981
  /**
68934
68982
  * Creates a new release deployment. This should be called after the release has been
@@ -68952,11 +69000,11 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
68952
69000
  * @returns {Promise} A promise that resolves when the deploy has been created.
68953
69001
  * @memberof SentryReleases
68954
69002
  */
68955
- async newDeploy(release2, options) {
69003
+ async newDeploy(release, options) {
68956
69004
  if (!options || !options.env) {
68957
69005
  throw new Error("options.env must be a valid name");
68958
69006
  }
68959
- const args = ["releases", "deploys", release2, "new"];
69007
+ const args = ["releases", "deploys", release, "new"];
68960
69008
  return this.execute(helper.prepareCommand(args, DEPLOYS_SCHEMA, options), null);
68961
69009
  }
68962
69010
  /**
@@ -70001,7 +70049,7 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
70001
70049
  var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
70002
70050
  exports2.makeRe = makeRe;
70003
70051
  exports2.minimatch.makeRe = exports2.makeRe;
70004
- var match9 = (list, pattern, options = {}) => {
70052
+ var match13 = (list, pattern, options = {}) => {
70005
70053
  const mm = new Minimatch(pattern, options);
70006
70054
  list = list.filter((f) => mm.match(f));
70007
70055
  if (mm.options.nonull && !list.length) {
@@ -70009,7 +70057,7 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
70009
70057
  }
70010
70058
  return list;
70011
70059
  };
70012
- exports2.match = match9;
70060
+ exports2.match = match13;
70013
70061
  exports2.minimatch.match = exports2.match;
70014
70062
  var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
70015
70063
  var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
@@ -74472,7 +74520,7 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
74472
74520
  const dirs = /* @__PURE__ */ new Set();
74473
74521
  const queue = [entry];
74474
74522
  let processing = 0;
74475
- const process2 = () => {
74523
+ const process22 = () => {
74476
74524
  let paused = false;
74477
74525
  while (!paused) {
74478
74526
  const dir = queue.shift();
@@ -74513,9 +74561,9 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
74513
74561
  }
74514
74562
  }
74515
74563
  if (paused && !results.flowing) {
74516
- results.once("drain", process2);
74564
+ results.once("drain", process22);
74517
74565
  } else if (!sync) {
74518
- process2();
74566
+ process22();
74519
74567
  }
74520
74568
  };
74521
74569
  let sync = true;
@@ -74523,7 +74571,7 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
74523
74571
  sync = false;
74524
74572
  }
74525
74573
  };
74526
- process2();
74574
+ process22();
74527
74575
  return results;
74528
74576
  }
74529
74577
  streamSync(entry = this.cwd, opts = {}) {
@@ -74541,7 +74589,7 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
74541
74589
  }
74542
74590
  const queue = [entry];
74543
74591
  let processing = 0;
74544
- const process2 = () => {
74592
+ const process22 = () => {
74545
74593
  let paused = false;
74546
74594
  while (!paused) {
74547
74595
  const dir = queue.shift();
@@ -74575,9 +74623,9 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
74575
74623
  }
74576
74624
  }
74577
74625
  if (paused && !results.flowing)
74578
- results.once("drain", process2);
74626
+ results.once("drain", process22);
74579
74627
  };
74580
- process2();
74628
+ process22();
74581
74629
  return results;
74582
74630
  }
74583
74631
  chdir(path = this.cwd) {
@@ -76793,10 +76841,10 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
76793
76841
  });
76794
76842
  }
76795
76843
  let shouldIndentNextCharacter = options.indentStart !== false;
76796
- const replacer = (match9) => {
76797
- if (shouldIndentNextCharacter) return `${indentStr}${match9}`;
76844
+ const replacer = (match13) => {
76845
+ if (shouldIndentNextCharacter) return `${indentStr}${match13}`;
76798
76846
  shouldIndentNextCharacter = true;
76799
- return match9;
76847
+ return match13;
76800
76848
  };
76801
76849
  this.intro = this.intro.replace(pattern, replacer);
76802
76850
  let charIndex = 0;
@@ -77184,44 +77232,44 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
77184
77232
  return this.original !== this.toString();
77185
77233
  }
77186
77234
  _replaceRegexp(searchValue, replacement) {
77187
- function getReplacement(match9, str) {
77235
+ function getReplacement(match13, str) {
77188
77236
  if (typeof replacement === "string") {
77189
77237
  return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => {
77190
77238
  if (i === "$") return "$";
77191
- if (i === "&") return match9[0];
77239
+ if (i === "&") return match13[0];
77192
77240
  const num = +i;
77193
- if (num < match9.length) return match9[+i];
77241
+ if (num < match13.length) return match13[+i];
77194
77242
  return `$${i}`;
77195
77243
  });
77196
77244
  } else {
77197
- return replacement(...match9, match9.index, str, match9.groups);
77245
+ return replacement(...match13, match13.index, str, match13.groups);
77198
77246
  }
77199
77247
  }
77200
77248
  function matchAll(re, str) {
77201
- let match9;
77249
+ let match13;
77202
77250
  const matches = [];
77203
- while (match9 = re.exec(str)) {
77204
- matches.push(match9);
77251
+ while (match13 = re.exec(str)) {
77252
+ matches.push(match13);
77205
77253
  }
77206
77254
  return matches;
77207
77255
  }
77208
77256
  if (searchValue.global) {
77209
77257
  const matches = matchAll(searchValue, this.original);
77210
- matches.forEach((match9) => {
77211
- if (match9.index != null)
77258
+ matches.forEach((match13) => {
77259
+ if (match13.index != null)
77212
77260
  this.overwrite(
77213
- match9.index,
77214
- match9.index + match9[0].length,
77215
- getReplacement(match9, this.original)
77261
+ match13.index,
77262
+ match13.index + match13[0].length,
77263
+ getReplacement(match13, this.original)
77216
77264
  );
77217
77265
  });
77218
77266
  } else {
77219
- const match9 = this.original.match(searchValue);
77220
- if (match9 && match9.index != null)
77267
+ const match13 = this.original.match(searchValue);
77268
+ if (match13 && match13.index != null)
77221
77269
  this.overwrite(
77222
- match9.index,
77223
- match9.index + match9[0].length,
77224
- getReplacement(match9, this.original)
77270
+ match13.index,
77271
+ match13.index + match13[0].length,
77272
+ getReplacement(match13, this.original)
77225
77273
  );
77226
77274
  }
77227
77275
  return this;
@@ -77425,8 +77473,8 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
77425
77473
  trailingNewline = source2.content.lastChar() === "\n";
77426
77474
  });
77427
77475
  if (this.intro) {
77428
- this.intro = indentStr + this.intro.replace(/^[^\n]/gm, (match9, index) => {
77429
- return index > 0 ? indentStr + match9 : match9;
77476
+ this.intro = indentStr + this.intro.replace(/^[^\n]/gm, (match13, index) => {
77477
+ return index > 0 ? indentStr + match13 : match13;
77430
77478
  });
77431
77479
  }
77432
77480
  return this;
@@ -77707,8 +77755,8 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
77707
77755
  exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
77708
77756
  exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
77709
77757
  exports2.removeBackslashes = (str) => {
77710
- return str.replace(REGEX_REMOVE_BACKSLASH, (match9) => {
77711
- return match9 === "\\" ? "" : match9;
77758
+ return str.replace(REGEX_REMOVE_BACKSLASH, (match13) => {
77759
+ return match13 === "\\" ? "" : match13;
77712
77760
  });
77713
77761
  };
77714
77762
  exports2.supportsLookbehinds = () => {
@@ -78325,10 +78373,10 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
78325
78373
  push2({ type: "text", value: value2 });
78326
78374
  continue;
78327
78375
  }
78328
- const match9 = /^\\+/.exec(remaining());
78376
+ const match13 = /^\\+/.exec(remaining());
78329
78377
  let slashes = 0;
78330
- if (match9 && match9[0].length > 2) {
78331
- slashes = match9[0].length;
78378
+ if (match13 && match13[0].length > 2) {
78379
+ slashes = match13[0].length;
78332
78380
  state.index += slashes;
78333
78381
  if (slashes % 2 !== 0) {
78334
78382
  value2 += "\\";
@@ -78616,10 +78664,10 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
78616
78664
  if (value2 === "$" || value2 === "^") {
78617
78665
  value2 = `\\${value2}`;
78618
78666
  }
78619
- const match9 = REGEX_NON_SPECIAL_CHARS.exec(remaining());
78620
- if (match9) {
78621
- value2 += match9[0];
78622
- state.index += match9[0].length;
78667
+ const match13 = REGEX_NON_SPECIAL_CHARS.exec(remaining());
78668
+ if (match13) {
78669
+ value2 += match13[0];
78670
+ state.index += match13[0].length;
78623
78671
  }
78624
78672
  push2({ type: "text", value: value2 });
78625
78673
  continue;
@@ -78830,11 +78878,11 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
78830
78878
  case "**/.*":
78831
78879
  return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
78832
78880
  default: {
78833
- const match9 = /^(.*?)\.(\w+)$/.exec(str);
78834
- if (!match9) return;
78835
- const source3 = create(match9[1]);
78881
+ const match13 = /^(.*?)\.(\w+)$/.exec(str);
78882
+ if (!match13) return;
78883
+ const source3 = create(match13[1]);
78836
78884
  if (!source3) return;
78837
- return source3 + DOT_LITERAL + match9[2];
78885
+ return source3 + DOT_LITERAL + match13[2];
78838
78886
  }
78839
78887
  }
78840
78888
  };
@@ -78884,8 +78932,8 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
78884
78932
  isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
78885
78933
  }
78886
78934
  const matcher = (input, returnObject = false) => {
78887
- const { isMatch, match: match9, output } = picomatch.test(input, regex, options, { glob, posix });
78888
- const result = { glob, state, regex, posix, input, output, match: match9, isMatch };
78935
+ const { isMatch, match: match13, output } = picomatch.test(input, regex, options, { glob, posix });
78936
+ const result = { glob, state, regex, posix, input, output, match: match13, isMatch };
78889
78937
  if (typeof opts.onResult === "function") {
78890
78938
  opts.onResult(result);
78891
78939
  }
@@ -78919,20 +78967,20 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
78919
78967
  }
78920
78968
  const opts = options || {};
78921
78969
  const format = opts.format || (posix ? utils.toPosixSlashes : null);
78922
- let match9 = input === glob;
78923
- let output = match9 && format ? format(input) : input;
78924
- if (match9 === false) {
78970
+ let match13 = input === glob;
78971
+ let output = match13 && format ? format(input) : input;
78972
+ if (match13 === false) {
78925
78973
  output = format ? format(input) : input;
78926
- match9 = output === glob;
78974
+ match13 = output === glob;
78927
78975
  }
78928
- if (match9 === false || opts.capture === true) {
78976
+ if (match13 === false || opts.capture === true) {
78929
78977
  if (opts.matchBase === true || opts.basename === true) {
78930
- match9 = picomatch.matchBase(input, regex, options, posix);
78978
+ match13 = picomatch.matchBase(input, regex, options, posix);
78931
78979
  } else {
78932
- match9 = regex.exec(output);
78980
+ match13 = regex.exec(output);
78933
78981
  }
78934
78982
  }
78935
- return { isMatch: Boolean(match9), match: match9, output };
78983
+ return { isMatch: Boolean(match13), match: match13, output };
78936
78984
  };
78937
78985
  picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
78938
78986
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
@@ -79433,8 +79481,8 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
79433
79481
  exports2.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
79434
79482
  exports2.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
79435
79483
  exports2.removeBackslashes = (str) => {
79436
- return str.replace(REGEX_REMOVE_BACKSLASH, (match9) => {
79437
- return match9 === "\\" ? "" : match9;
79484
+ return str.replace(REGEX_REMOVE_BACKSLASH, (match13) => {
79485
+ return match13 === "\\" ? "" : match13;
79438
79486
  });
79439
79487
  };
79440
79488
  exports2.supportsLookbehinds = () => {
@@ -80051,10 +80099,10 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
80051
80099
  push2({ type: "text", value: value2 });
80052
80100
  continue;
80053
80101
  }
80054
- const match9 = /^\\+/.exec(remaining());
80102
+ const match13 = /^\\+/.exec(remaining());
80055
80103
  let slashes = 0;
80056
- if (match9 && match9[0].length > 2) {
80057
- slashes = match9[0].length;
80104
+ if (match13 && match13[0].length > 2) {
80105
+ slashes = match13[0].length;
80058
80106
  state.index += slashes;
80059
80107
  if (slashes % 2 !== 0) {
80060
80108
  value2 += "\\";
@@ -80342,10 +80390,10 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
80342
80390
  if (value2 === "$" || value2 === "^") {
80343
80391
  value2 = `\\${value2}`;
80344
80392
  }
80345
- const match9 = REGEX_NON_SPECIAL_CHARS.exec(remaining());
80346
- if (match9) {
80347
- value2 += match9[0];
80348
- state.index += match9[0].length;
80393
+ const match13 = REGEX_NON_SPECIAL_CHARS.exec(remaining());
80394
+ if (match13) {
80395
+ value2 += match13[0];
80396
+ state.index += match13[0].length;
80349
80397
  }
80350
80398
  push2({ type: "text", value: value2 });
80351
80399
  continue;
@@ -80556,11 +80604,11 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
80556
80604
  case "**/.*":
80557
80605
  return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
80558
80606
  default: {
80559
- const match9 = /^(.*?)\.(\w+)$/.exec(str);
80560
- if (!match9) return;
80561
- const source3 = create(match9[1]);
80607
+ const match13 = /^(.*?)\.(\w+)$/.exec(str);
80608
+ if (!match13) return;
80609
+ const source3 = create(match13[1]);
80562
80610
  if (!source3) return;
80563
- return source3 + DOT_LITERAL + match9[2];
80611
+ return source3 + DOT_LITERAL + match13[2];
80564
80612
  }
80565
80613
  }
80566
80614
  };
@@ -80610,8 +80658,8 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
80610
80658
  isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
80611
80659
  }
80612
80660
  const matcher = (input, returnObject = false) => {
80613
- const { isMatch, match: match9, output } = picomatch.test(input, regex, options, { glob, posix });
80614
- const result = { glob, state, regex, posix, input, output, match: match9, isMatch };
80661
+ const { isMatch, match: match13, output } = picomatch.test(input, regex, options, { glob, posix });
80662
+ const result = { glob, state, regex, posix, input, output, match: match13, isMatch };
80615
80663
  if (typeof opts.onResult === "function") {
80616
80664
  opts.onResult(result);
80617
80665
  }
@@ -80645,20 +80693,20 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
80645
80693
  }
80646
80694
  const opts = options || {};
80647
80695
  const format = opts.format || (posix ? utils.toPosixSlashes : null);
80648
- let match9 = input === glob;
80649
- let output = match9 && format ? format(input) : input;
80650
- if (match9 === false) {
80696
+ let match13 = input === glob;
80697
+ let output = match13 && format ? format(input) : input;
80698
+ if (match13 === false) {
80651
80699
  output = format ? format(input) : input;
80652
- match9 = output === glob;
80700
+ match13 = output === glob;
80653
80701
  }
80654
- if (match9 === false || opts.capture === true) {
80702
+ if (match13 === false || opts.capture === true) {
80655
80703
  if (opts.matchBase === true || opts.basename === true) {
80656
- match9 = picomatch.matchBase(input, regex, options, posix);
80704
+ match13 = picomatch.matchBase(input, regex, options, posix);
80657
80705
  } else {
80658
- match9 = regex.exec(output);
80706
+ match13 = regex.exec(output);
80659
80707
  }
80660
80708
  }
80661
- return { isMatch: Boolean(match9), match: match9, output };
80709
+ return { isMatch: Boolean(match13), match: match13, output };
80662
80710
  };
80663
80711
  picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
80664
80712
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
@@ -80817,10 +80865,10 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
80817
80865
  if (typeof str !== "string" || str === "") {
80818
80866
  return false;
80819
80867
  }
80820
- var match9;
80821
- while (match9 = /(\\).|([@?!+*]\(.*\))/g.exec(str)) {
80822
- if (match9[2]) return true;
80823
- str = str.slice(match9.index + match9[0].length);
80868
+ var match13;
80869
+ while (match13 = /(\\).|([@?!+*]\(.*\))/g.exec(str)) {
80870
+ if (match13[2]) return true;
80871
+ str = str.slice(match13.index + match13[0].length);
80824
80872
  }
80825
80873
  return false;
80826
80874
  };
@@ -82635,9 +82683,9 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
82635
82683
  if (this.fsw.closed) {
82636
82684
  return;
82637
82685
  }
82638
- const dirname = sysPath.dirname(file);
82686
+ const dirname2 = sysPath.dirname(file);
82639
82687
  const basename = sysPath.basename(file);
82640
- const parent = this.fsw._getWatchedDir(dirname);
82688
+ const parent = this.fsw._getWatchedDir(dirname2);
82641
82689
  let prevStats = stats;
82642
82690
  if (parent.has(basename)) return;
82643
82691
  const listener = async (path, newStats) => {
@@ -82659,7 +82707,7 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
82659
82707
  prevStats = newStats2;
82660
82708
  }
82661
82709
  } catch (error) {
82662
- this.fsw._remove(dirname, basename);
82710
+ this.fsw._remove(dirname2, basename);
82663
82711
  }
82664
82712
  } else if (parent.has(basename)) {
82665
82713
  const at = newStats.atimeMs;
@@ -84566,17 +84614,17 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
84566
84614
  for (; ; ) {
84567
84615
  skipWhiteSpace.lastIndex = start;
84568
84616
  start += skipWhiteSpace.exec(this.input)[0].length;
84569
- var match9 = literal2.exec(this.input.slice(start));
84570
- if (!match9) {
84617
+ var match13 = literal2.exec(this.input.slice(start));
84618
+ if (!match13) {
84571
84619
  return false;
84572
84620
  }
84573
- if ((match9[1] || match9[2]) === "use strict") {
84574
- skipWhiteSpace.lastIndex = start + match9[0].length;
84621
+ if ((match13[1] || match13[2]) === "use strict") {
84622
+ skipWhiteSpace.lastIndex = start + match13[0].length;
84575
84623
  var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length;
84576
84624
  var next = this.input.charAt(end);
84577
84625
  return next === ";" || next === "}" || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "=");
84578
84626
  }
84579
- start += match9[0].length;
84627
+ start += match13[0].length;
84580
84628
  skipWhiteSpace.lastIndex = start;
84581
84629
  start += skipWhiteSpace.exec(this.input)[0].length;
84582
84630
  if (this.input[start] === ";") {
@@ -90022,17 +90070,17 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
90022
90070
  var streamChunksOfRawSource = (source2, onChunk, onSource, onName) => {
90023
90071
  let line2 = 1;
90024
90072
  const matches = splitIntoLines(source2);
90025
- let match9;
90026
- for (match9 of matches) {
90027
- onChunk(match9, line2, 0, -1, -1, -1, -1);
90073
+ let match13;
90074
+ for (match13 of matches) {
90075
+ onChunk(match13, line2, 0, -1, -1, -1, -1);
90028
90076
  line2++;
90029
90077
  }
90030
- return matches.length === 0 || match9.endsWith("\n") ? {
90078
+ return matches.length === 0 || match13.endsWith("\n") ? {
90031
90079
  generatedLine: matches.length + 1,
90032
90080
  generatedColumn: 0
90033
90081
  } : {
90034
90082
  generatedLine: matches.length,
90035
- generatedColumn: match9.length
90083
+ generatedColumn: match13.length
90036
90084
  };
90037
90085
  };
90038
90086
  module2.exports = (source2, onChunk, onSource, onName, finalSource) => {
@@ -90466,19 +90514,19 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
90466
90514
  let line2 = 1;
90467
90515
  let column2 = 0;
90468
90516
  if (matches !== null) {
90469
- for (const match9 of matches) {
90470
- const isEndOfLine = match9.endsWith("\n");
90471
- if (isEndOfLine && match9.length === 1) {
90472
- if (!finalSource) onChunk(match9, line2, column2, -1, -1, -1, -1);
90517
+ for (const match13 of matches) {
90518
+ const isEndOfLine = match13.endsWith("\n");
90519
+ if (isEndOfLine && match13.length === 1) {
90520
+ if (!finalSource) onChunk(match13, line2, column2, -1, -1, -1, -1);
90473
90521
  } else {
90474
- const chunk = finalSource ? void 0 : match9;
90522
+ const chunk = finalSource ? void 0 : match13;
90475
90523
  onChunk(chunk, line2, column2, 0, line2, column2, -1);
90476
90524
  }
90477
90525
  if (isEndOfLine) {
90478
90526
  line2++;
90479
90527
  column2 = 0;
90480
90528
  } else {
90481
- column2 += match9.length;
90529
+ column2 += match13.length;
90482
90530
  }
90483
90531
  }
90484
90532
  }
@@ -90501,18 +90549,18 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
90501
90549
  } else {
90502
90550
  let line2 = 1;
90503
90551
  const matches = splitIntoLines(this._value);
90504
- let match9;
90505
- for (match9 of matches) {
90506
- onChunk(finalSource ? void 0 : match9, line2, 0, 0, line2, 0, -1);
90552
+ let match13;
90553
+ for (match13 of matches) {
90554
+ onChunk(finalSource ? void 0 : match13, line2, 0, 0, line2, 0, -1);
90507
90555
  line2++;
90508
90556
  }
90509
- return matches.length === 0 || match9.endsWith("\n") ? {
90557
+ return matches.length === 0 || match13.endsWith("\n") ? {
90510
90558
  generatedLine: matches.length + 1,
90511
90559
  generatedColumn: 0,
90512
90560
  source: finalSource ? this._value : void 0
90513
90561
  } : {
90514
90562
  generatedLine: matches.length,
90515
- generatedColumn: match9.length,
90563
+ generatedColumn: match13.length,
90516
90564
  source: finalSource ? this._value : void 0
90517
90565
  };
90518
90566
  }
@@ -92785,13 +92833,13 @@ It seems like none of the "@sentry/cli" package's optional dependencies got inst
92785
92833
  return input.startsWith("/");
92786
92834
  }
92787
92835
  function parseAbsoluteUrl(input) {
92788
- const match9 = urlRegex.exec(input);
92836
+ const match13 = urlRegex.exec(input);
92789
92837
  return {
92790
- scheme: match9[1],
92791
- user: match9[2] || "",
92792
- host: match9[3],
92793
- port: match9[4] || "",
92794
- path: match9[5] || "/",
92838
+ scheme: match13[1],
92839
+ user: match13[2] || "",
92840
+ host: match13[3],
92841
+ port: match13[4] || "",
92842
+ path: match13[5] || "/",
92795
92843
  relativePath: false
92796
92844
  };
92797
92845
  }
@@ -94107,10 +94155,10 @@ Did you specify these with the most recent transformation maps first?`);
94107
94155
  const obj = {};
94108
94156
  let lines = src.toString();
94109
94157
  lines = lines.replace(/\r\n?/mg, "\n");
94110
- let match9;
94111
- while ((match9 = LINE.exec(lines)) != null) {
94112
- const key2 = match9[1];
94113
- let value2 = match9[2] || "";
94158
+ let match13;
94159
+ while ((match13 = LINE.exec(lines)) != null) {
94160
+ const key2 = match13[1];
94161
+ let value2 = match13[2] || "";
94114
94162
  value2 = value2.trim();
94115
94163
  const maybeQuote = value2[0];
94116
94164
  value2 = value2.replace(/^(['"`])([\s\S]*)\1$/mg, "$2");
@@ -95307,14 +95355,14 @@ Did you specify these with the most recent transformation maps first?`);
95307
95355
  return `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ""}@${host}${port ? `:${port}` : ""}/${path2 ? `${path2}/` : path2}${projectId}`;
95308
95356
  }
95309
95357
  function dsnFromString2(str) {
95310
- const match9 = DSN_REGEX.exec(str);
95311
- if (!match9) {
95358
+ const match13 = DSN_REGEX.exec(str);
95359
+ if (!match13) {
95312
95360
  consoleSandbox(() => {
95313
95361
  console.error(`Invalid Sentry Dsn: ${str}`);
95314
95362
  });
95315
95363
  return void 0;
95316
95364
  }
95317
- const [protocol, publicKey, pass = "", host = "", port = "", lastPath = ""] = match9.slice(1);
95365
+ const [protocol, publicKey, pass = "", host = "", port = "", lastPath = ""] = match13.slice(1);
95318
95366
  let path2 = "";
95319
95367
  let projectId = lastPath;
95320
95368
  const split = projectId.split("/");
@@ -98476,12 +98524,12 @@ ${JSON.stringify(itemHeaders)}
98476
98524
  });
98477
98525
  }
98478
98526
  function applyClientOptions(event, options) {
98479
- const { environment, release: release2, dist, maxValueLength = 250 } = options;
98527
+ const { environment, release, dist, maxValueLength = 250 } = options;
98480
98528
  if (!("environment" in event)) {
98481
98529
  event.environment = "environment" in options ? environment : DEFAULT_ENVIRONMENT;
98482
98530
  }
98483
- if (event.release === void 0 && release2 !== void 0) {
98484
- event.release = release2;
98531
+ if (event.release === void 0 && release !== void 0) {
98532
+ event.release = release;
98485
98533
  }
98486
98534
  if (event.dist === void 0 && dist !== void 0) {
98487
98535
  event.dist = dist;
@@ -99461,12 +99509,12 @@ Reason: ${reason}`
99461
99509
  }
99462
99510
  /** Method that initialises an instance of SessionFlusher on Client */
99463
99511
  initSessionFlusher() {
99464
- const { release: release2, environment } = this._options;
99465
- if (!release2) {
99512
+ const { release, environment } = this._options;
99513
+ if (!release) {
99466
99514
  DEBUG_BUILD && logger.warn("Cannot initialise an instance of SessionFlusher if no release is provided!");
99467
99515
  } else {
99468
99516
  this._sessionFlusher = new SessionFlusher(this, {
99469
- release: release2,
99517
+ release,
99470
99518
  environment
99471
99519
  });
99472
99520
  }
@@ -99485,12 +99533,12 @@ Reason: ${reason}`
99485
99533
  return id;
99486
99534
  }
99487
99535
  const options = this.getOptions();
99488
- const { release: release2, environment, tunnel } = options;
99536
+ const { release, environment, tunnel } = options;
99489
99537
  const serializedCheckIn = {
99490
99538
  check_in_id: id,
99491
99539
  monitor_slug: checkIn.monitorSlug,
99492
99540
  status: checkIn.status,
99493
- release: release2,
99541
+ release,
99494
99542
  environment
99495
99543
  };
99496
99544
  if ("duration" in checkIn) {
@@ -99665,9 +99713,9 @@ Reason: ${reason}`
99665
99713
  version = version.slice(1);
99666
99714
  }
99667
99715
  var regex = /^[\^~]?(\d+)(\.\d+)?(\.\d+)?(-.+)?/;
99668
- var match9 = version.match(regex);
99669
- if (match9) {
99670
- return parseInt(match9[1], 10);
99716
+ var match13 = version.match(regex);
99717
+ if (match13) {
99718
+ return parseInt(match13[1], 10);
99671
99719
  }
99672
99720
  var coerced = parseInt(version, 10);
99673
99721
  if (!Number.isNaN(coerced)) {
@@ -99801,8 +99849,8 @@ Reason: ${reason}`
99801
99849
  return possibleReleaseNameOfGitProvider || possibleReleaseNameOfCiProvidersWithSpecificEnvVar || possibleReleaseNameOfCiProvidersWithGenericEnvVar || gitRevision();
99802
99850
  }
99803
99851
  function generateGlobalInjectorCode(_ref2) {
99804
- var release2 = _ref2.release, injectBuildInformation = _ref2.injectBuildInformation;
99805
- var code = "{\n let _global =\n typeof window !== 'undefined' ?\n window :\n typeof global !== 'undefined' ?\n global :\n typeof globalThis !== 'undefined' ?\n globalThis :\n typeof self !== 'undefined' ?\n self :\n {};\n\n _global.SENTRY_RELEASE={id:".concat(JSON.stringify(release2), "};");
99852
+ var release = _ref2.release, injectBuildInformation = _ref2.injectBuildInformation;
99853
+ var code = "{\n let _global =\n typeof window !== 'undefined' ?\n window :\n typeof global !== 'undefined' ?\n global :\n typeof globalThis !== 'undefined' ?\n globalThis :\n typeof self !== 'undefined' ?\n self :\n {};\n\n _global.SENTRY_RELEASE={id:".concat(JSON.stringify(release), "};");
99806
99854
  if (injectBuildInformation) {
99807
99855
  var buildInfo = getBuildInformation$1();
99808
99856
  code += "\n _global.SENTRY_BUILD_INFO=".concat(JSON.stringify(buildInfo), ";");
@@ -100116,20 +100164,20 @@ Reason: ${reason}`
100116
100164
  }
100117
100165
  function setTelemetryDataOnScope(options, scope, buildTool) {
100118
100166
  var _options$_metaOptions;
100119
- var org = options.org, project = options.project, release2 = options.release, errorHandler = options.errorHandler, sourcemaps = options.sourcemaps, reactComponentAnnotation = options.reactComponentAnnotation;
100120
- scope.setTag("upload-legacy-sourcemaps", !!release2.uploadLegacySourcemaps);
100121
- if (release2.uploadLegacySourcemaps) {
100122
- scope.setTag("uploadLegacySourcemapsEntries", Array.isArray(release2.uploadLegacySourcemaps) ? release2.uploadLegacySourcemaps.length : 1);
100167
+ var org = options.org, project = options.project, release = options.release, errorHandler = options.errorHandler, sourcemaps = options.sourcemaps, reactComponentAnnotation = options.reactComponentAnnotation;
100168
+ scope.setTag("upload-legacy-sourcemaps", !!release.uploadLegacySourcemaps);
100169
+ if (release.uploadLegacySourcemaps) {
100170
+ scope.setTag("uploadLegacySourcemapsEntries", Array.isArray(release.uploadLegacySourcemaps) ? release.uploadLegacySourcemaps.length : 1);
100123
100171
  }
100124
100172
  scope.setTag("module-metadata", !!options.moduleMetadata);
100125
100173
  scope.setTag("inject-build-information", !!options._experiments.injectBuildInformation);
100126
- if (release2.setCommits) {
100127
- scope.setTag("set-commits", release2.setCommits.auto === true ? "auto" : "manual");
100174
+ if (release.setCommits) {
100175
+ scope.setTag("set-commits", release.setCommits.auto === true ? "auto" : "manual");
100128
100176
  } else {
100129
100177
  scope.setTag("set-commits", "undefined");
100130
100178
  }
100131
- scope.setTag("finalize-release", release2.finalize);
100132
- scope.setTag("deploy-options", !!release2.deploy);
100179
+ scope.setTag("finalize-release", release.finalize);
100180
+ scope.setTag("deploy-options", !!release.deploy);
100133
100181
  scope.setTag("custom-error-handler", !!errorHandler);
100134
100182
  scope.setTag("sourcemaps-assets", !!(sourcemaps !== null && sourcemaps !== void 0 && sourcemaps.assets));
100135
100183
  scope.setTag("delete-after-upload", !!(sourcemaps !== null && sourcemaps !== void 0 && sourcemaps.filesToDeleteAfterUpload));
@@ -100155,11 +100203,11 @@ Reason: ${reason}`
100155
100203
  function _allowedToSendTelemetry() {
100156
100204
  _allowedToSendTelemetry = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee(options) {
100157
100205
  var _cliInfo$split$, _cliInfo$split$$repla;
100158
- var silent, org, project, authToken, url2, headers, telemetry, release2, cli, cliInfo, cliInfoUrl;
100206
+ var silent, org, project, authToken, url2, headers, telemetry, release, cli, cliInfo, cliInfoUrl;
100159
100207
  return _regeneratorRuntime().wrap(function _callee$(_context) {
100160
100208
  while (1) switch (_context.prev = _context.next) {
100161
100209
  case 0:
100162
- silent = options.silent, org = options.org, project = options.project, authToken = options.authToken, url2 = options.url, headers = options.headers, telemetry = options.telemetry, release2 = options.release;
100210
+ silent = options.silent, org = options.org, project = options.project, authToken = options.authToken, url2 = options.url, headers = options.headers, telemetry = options.telemetry, release = options.release;
100163
100211
  if (!(telemetry === false)) {
100164
100212
  _context.next = 3;
100165
100213
  break;
@@ -100177,7 +100225,7 @@ Reason: ${reason}`
100177
100225
  authToken,
100178
100226
  org,
100179
100227
  project,
100180
- vcsRemote: release2.vcsRemote,
100228
+ vcsRemote: release.vcsRemote,
100181
100229
  silent,
100182
100230
  headers
100183
100231
  });
@@ -100322,9 +100370,9 @@ Reason: ${reason}`
100322
100370
  return _prepareBundleForDebugIdUpload.apply(this, arguments);
100323
100371
  }
100324
100372
  function determineDebugIdFromBundleSource(code) {
100325
- var match9 = code.match(/sentry-dbid-([0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12})/);
100326
- if (match9) {
100327
- return match9[1];
100373
+ var match13 = code.match(/sentry-dbid-([0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12})/);
100374
+ if (match13) {
100375
+ return match13[1];
100328
100376
  } else {
100329
100377
  return void 0;
100330
100378
  }
@@ -100578,9 +100626,9 @@ Reason: ${reason}`
100578
100626
  }
100579
100627
  var shouldSendTelemetry = allowedToSendTelemetry(options);
100580
100628
  var _createSentryInstance = createSentryInstance(options, shouldSendTelemetry, bundlerPluginMetaContext.buildTool), sentryScope = _createSentryInstance.sentryScope, sentryClient = _createSentryInstance.sentryClient;
100581
- var _sentryClient$getOpti = sentryClient.getOptions(), release2 = _sentryClient$getOpti.release, _sentryClient$getOpti2 = _sentryClient$getOpti.environment, environment = _sentryClient$getOpti2 === void 0 ? DEFAULT_ENVIRONMENT : _sentryClient$getOpti2;
100629
+ var _sentryClient$getOpti = sentryClient.getOptions(), release = _sentryClient$getOpti.release, _sentryClient$getOpti2 = _sentryClient$getOpti.environment, environment = _sentryClient$getOpti2 === void 0 ? DEFAULT_ENVIRONMENT : _sentryClient$getOpti2;
100582
100630
  var sentrySession = makeSession({
100583
- release: release2,
100631
+ release,
100584
100632
  environment
100585
100633
  });
100586
100634
  sentryScope.setSession(sentrySession);
@@ -101485,9 +101533,9 @@ Reason: ${reason}`
101485
101533
  var ms = new MagicString__default["default"](code, {
101486
101534
  filename: chunk.fileName
101487
101535
  });
101488
- var match9 = (_code$match = code.match(COMMENT_USE_STRICT_REGEX)) === null || _code$match === void 0 ? void 0 : _code$match[0];
101489
- if (match9) {
101490
- ms.appendLeft(match9.length, codeToInject);
101536
+ var match13 = (_code$match = code.match(COMMENT_USE_STRICT_REGEX)) === null || _code$match === void 0 ? void 0 : _code$match[0];
101537
+ if (match13) {
101538
+ ms.appendLeft(match13.length, codeToInject);
101491
101539
  } else {
101492
101540
  ms.prepend(codeToInject);
101493
101541
  }
@@ -101517,9 +101565,9 @@ Reason: ${reason}`
101517
101565
  var ms = new MagicString__default["default"](code, {
101518
101566
  filename: chunk.fileName
101519
101567
  });
101520
- var match9 = (_code$match2 = code.match(COMMENT_USE_STRICT_REGEX)) === null || _code$match2 === void 0 ? void 0 : _code$match2[0];
101521
- if (match9) {
101522
- ms.appendLeft(match9.length, injectionCode);
101568
+ var match13 = (_code$match2 = code.match(COMMENT_USE_STRICT_REGEX)) === null || _code$match2 === void 0 ? void 0 : _code$match2[0];
101569
+ if (match13) {
101570
+ ms.appendLeft(match13.length, injectionCode);
101523
101571
  } else {
101524
101572
  ms.prepend(injectionCode);
101525
101573
  }
@@ -101541,7 +101589,7 @@ Reason: ${reason}`
101541
101589
  return {
101542
101590
  writeBundle: function writeBundle(outputOptions, bundle) {
101543
101591
  return _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee4() {
101544
- var outputDir, _buildArtifacts, _buildArtifacts2;
101592
+ var outputDir2, _buildArtifacts, _buildArtifacts2;
101545
101593
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
101546
101594
  while (1) switch (_context4.prev = _context4.next) {
101547
101595
  case 0:
@@ -101550,7 +101598,7 @@ Reason: ${reason}`
101550
101598
  _context4.next = 10;
101551
101599
  break;
101552
101600
  }
101553
- outputDir = outputOptions.dir;
101601
+ outputDir2 = outputOptions.dir;
101554
101602
  _context4.next = 5;
101555
101603
  return glob.glob(
101556
101604
  ["/**/*.js", "/**/*.mjs", "/**/*.cjs", "/**/*.js.map", "/**/*.mjs.map", "/**/*.cjs.map"].map(function(q) {
@@ -101558,7 +101606,7 @@ Reason: ${reason}`
101558
101606
  }),
101559
101607
  // We want to allow query and hashes strings at the end of files
101560
101608
  {
101561
- root: outputDir,
101609
+ root: outputDir2,
101562
101610
  absolute: true,
101563
101611
  nodir: true
101564
101612
  }
@@ -105928,24 +105976,24 @@ Reason: ${reason}`
105928
105976
  });
105929
105977
  module2.exports = __toCommonJS2(vite_exports);
105930
105978
  var import_vite_plugin = require_cjs5();
105931
- var import_zod4 = require_zod();
105932
- var providerSchema = import_zod4.z.discriminatedUnion("type", [
105933
- import_zod4.z.object({
105934
- type: import_zod4.z.literal("SENTRY"),
105935
- sentryOptions: import_zod4.z.object({
105936
- dsn: import_zod4.z.string().url()
105979
+ var import_zod3 = require_zod();
105980
+ var providerSchema = import_zod3.z.discriminatedUnion("type", [
105981
+ import_zod3.z.object({
105982
+ type: import_zod3.z.literal("SENTRY"),
105983
+ sentryOptions: import_zod3.z.object({
105984
+ dsn: import_zod3.z.string().url()
105937
105985
  })
105938
105986
  }),
105939
- import_zod4.z.object({
105940
- type: import_zod4.z.literal("PANORAMA"),
105941
- panoramaOptions: import_zod4.z.object({
105942
- sentry: import_zod4.z.object({
105943
- dsn: import_zod4.z.string().url()
105987
+ import_zod3.z.object({
105988
+ type: import_zod3.z.literal("PANORAMA"),
105989
+ panoramaOptions: import_zod3.z.object({
105990
+ sentry: import_zod3.z.object({
105991
+ dsn: import_zod3.z.string().url()
105944
105992
  }).optional(),
105945
- project: import_zod4.z.object({
105946
- groupId: import_zod4.z.string(),
105947
- artifactId: import_zod4.z.string(),
105948
- fingerprint: import_zod4.z.string()
105993
+ project: import_zod3.z.object({
105994
+ groupId: import_zod3.z.string(),
105995
+ artifactId: import_zod3.z.string(),
105996
+ fingerprint: import_zod3.z.string()
105949
105997
  })
105950
105998
  })
105951
105999
  })
@@ -105981,10 +106029,10 @@ ${error.errors.map(formatZodIssue).join("\n")}`,
105981
106029
  const pluginOrArray = (0, import_vite_plugin.sentryVitePlugin)({
105982
106030
  silent,
105983
106031
  debug,
105984
- moduleMetadata: ({ release: release2 }) => ({
106032
+ moduleMetadata: ({ release }) => ({
105985
106033
  appId,
105986
106034
  dsn,
105987
- release: release2,
106035
+ release,
105988
106036
  ...extra
105989
106037
  })
105990
106038
  });
@@ -106140,11 +106188,11 @@ ${error.errors.map(formatZodIssue).join("\n")}`,
106140
106188
  };
106141
106189
  }
106142
106190
  function dsnFromString(str) {
106143
- const match9 = SENTRY_DSN_REGEX.exec(str);
106144
- if (!match9) {
106191
+ const match13 = SENTRY_DSN_REGEX.exec(str);
106192
+ if (!match13) {
106145
106193
  throw new Error("Invalid DSN");
106146
106194
  }
106147
- const [protocol, publicKey, pass = "", host = "", port = "", lastPath = ""] = match9.slice(1);
106195
+ const [protocol, publicKey, pass = "", host = "", port = "", lastPath = ""] = match13.slice(1);
106148
106196
  let path = "";
106149
106197
  let projectId = lastPath;
106150
106198
  const split = projectId.split("/");
@@ -106255,619 +106303,268 @@ window.sentryOnLoad = function () {
106255
106303
  }
106256
106304
  });
106257
106305
 
106258
- // ../arm-client/src/useARMClient.ts
106306
+ // ../cli-astro-commands/src/components/DevCommand/index.ts
106259
106307
  init_esm_shims();
106260
- var import_react = __toESM(require_react(), 1);
106261
106308
 
106262
- // ../arm-client/src/client.ts
106309
+ // ../cli-astro-commands/src/components/DevCommand/DevCommand.tsx
106263
106310
  init_esm_shims();
106311
+ var import_react28 = __toESM(require_react(), 1);
106264
106312
 
106265
- // ../../node_modules/@wix/ambassador-ctp-gradual-rollout-v1-app-config/build/es/http.impl.js
106313
+ // ../cli-astro-commands/src/components/DevCommand/utils/runAstroDev.ts
106266
106314
  init_esm_shims();
106267
- var _commitComponentOverrideRequest = {};
106268
- var _commitComponentOverrideResponse = {};
106269
- var _createAppReleaseRequest = {};
106270
- var _createAppReleaseResponse = {};
106271
- var _createComponentsRequest = {};
106272
- var _createComponentsResponse = {};
106273
- var _promoteAppVersionFromDraftToProductionRequest = {};
106274
- var _promoteAppVersionFromDraftToProductionResponse = {};
106275
- var _updateAppReleaseRequest = {};
106276
- var _updateAppReleaseResponse = {};
106277
- function resolveComWixCtpAppsReleaseManagerServiceUrl(opts) {
106278
- var domainToMappings = {
106279
- "api._api_base_domain_": [
106280
- {
106281
- srcPath: "/apps-release-manager-service-web",
106282
- destPath: ""
106283
- }
106284
- ],
106285
- "bo._base_domain_": [
106286
- {
106287
- srcPath: "/apps-release-manager-service-web",
106288
- destPath: ""
106289
- }
106290
- ],
106291
- "wixbo.ai": [
106292
- {
106293
- srcPath: "/apps-release-manager-service-web",
106294
- destPath: ""
106295
- }
106296
- ],
106297
- "wix-bo.com": [
106298
- {
106299
- srcPath: "/apps-release-manager-service-web",
106300
- destPath: ""
106301
- }
106302
- ],
106303
- "www._base_domain_": [
106304
- {
106305
- srcPath: "/apps-release-manager-service-web/artifacts-release-manager/app-releases",
106306
- destPath: "/artifacts-release-manager/app-releases"
106307
- },
106308
- {
106309
- srcPath: "/_api/apps-release-manager-service-web/artifacts-release-manager/app-releases",
106310
- destPath: "/artifacts-release-manager/app-releases"
106311
- },
106312
- {
106313
- srcPath: "/apps-release-manager-service-web/apps/create",
106314
- destPath: "/apps/create"
106315
- },
106316
- {
106317
- srcPath: "/apps-release-manager-service-web/apps/promote",
106318
- destPath: "/apps/promote"
106319
- },
106320
- {
106321
- srcPath: "/apps-release-manager-service-web/apps/tags",
106322
- destPath: "/apps/tags"
106323
- },
106324
- {
106325
- srcPath: "/apps-release-manager-service-web/apps/create-components",
106326
- destPath: "/apps/create-components"
106327
- },
106328
- {
106329
- srcPath: "/apps-release-manager-service-web/apps/commit",
106330
- destPath: "/apps/commit"
106331
- },
106332
- {
106333
- srcPath: "/apps-release-manager-service-web/apps/promote-app-version",
106334
- destPath: "/apps/promote-app-version"
106335
- }
106336
- ],
106337
- "manage._base_domain_": [
106338
- {
106339
- srcPath: "/apps-release-manager-service-web/apps/promote",
106340
- destPath: "/apps/promote"
106341
- },
106342
- {
106343
- srcPath: "/apps-release-manager-service-web/apps/create",
106344
- destPath: "/apps/create"
106345
- },
106346
- {
106347
- srcPath: "/apps-release-manager-service-web/apps/tags",
106348
- destPath: "/apps/tags"
106349
- },
106350
- {
106351
- srcPath: "/apps-release-manager-service-web/apps/create-components",
106352
- destPath: "/apps/create-components"
106353
- },
106354
- {
106355
- srcPath: "/apps-release-manager-service-web/apps/commit",
106356
- destPath: "/apps/commit"
106357
- },
106358
- {
106359
- srcPath: "/apps-release-manager-service-web/apps/promote-app-version",
106360
- destPath: "/apps/promote-app-version"
106361
- },
106362
- {
106363
- srcPath: "/apps-release-manager-service-web/apps/release",
106364
- destPath: "/apps/release"
106365
- }
106366
- ]
106367
- };
106368
- return resolveUrl(Object.assign(opts, { domainToMappings }));
106369
- }
106370
- function createAppRelease(payload) {
106371
- var _a = serializer(_createAppReleaseRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
106372
- var fromRes = serializer(_createAppReleaseResponse, {}).fromJSON;
106373
- function __createAppRelease(_a2) {
106374
- var host = _a2.host;
106375
- var serializedData = toReq(payload);
106376
- var metadata = {
106377
- entityFqdn: "wix.ctp.gradual_rollout.v1.app_config",
106378
- method: "POST",
106379
- methodFqn: "com.wix.ctp.AppsReleaseManagerService.CreateAppRelease",
106380
- migrationOptions: {
106381
- optInTransformResponse: true
106382
- },
106383
- url: resolveComWixCtpAppsReleaseManagerServiceUrl({
106384
- protoPath: "/apps/create/{appId}",
106385
- data: serializedData,
106386
- host
106387
- }),
106388
- data: serializedData,
106389
- transformResponse: fromRes
106390
- };
106391
- return metadata;
106392
- }
106393
- __createAppRelease.fromReq = fromReq;
106394
- __createAppRelease.__isAmbassador = true;
106395
- return __createAppRelease;
106396
- }
106397
- function updateAppRelease(payload) {
106398
- var _a = serializer(_updateAppReleaseRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
106399
- var fromRes = serializer(_updateAppReleaseResponse, {}).fromJSON;
106400
- function __updateAppRelease(_a2) {
106401
- var host = _a2.host;
106402
- var serializedData = toReq(payload);
106403
- var metadata = {
106404
- entityFqdn: "wix.ctp.gradual_rollout.v1.app_config",
106405
- method: "PUT",
106406
- methodFqn: "com.wix.ctp.AppsReleaseManagerService.UpdateAppRelease",
106407
- migrationOptions: {
106408
- optInTransformResponse: true
106409
- },
106410
- url: resolveComWixCtpAppsReleaseManagerServiceUrl({
106411
- protoPath: "/apps/tags/{tag}",
106412
- data: serializedData,
106413
- host
106414
- }),
106415
- data: serializedData,
106416
- transformResponse: fromRes
106417
- };
106418
- return metadata;
106419
- }
106420
- __updateAppRelease.fromReq = fromReq;
106421
- __updateAppRelease.__isAmbassador = true;
106422
- return __updateAppRelease;
106423
- }
106424
- function createComponents(payload) {
106425
- var _a = serializer(_createComponentsRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
106426
- var fromRes = serializer(_createComponentsResponse, {}).fromJSON;
106427
- function __createComponents(_a2) {
106428
- var host = _a2.host;
106429
- var serializedData = toReq(payload);
106430
- var metadata = {
106431
- entityFqdn: "wix.ctp.gradual_rollout.v1.app_config",
106432
- method: "POST",
106433
- methodFqn: "com.wix.ctp.AppsReleaseManagerService.CreateComponents",
106434
- migrationOptions: {
106435
- optInTransformResponse: true
106436
- },
106437
- url: resolveComWixCtpAppsReleaseManagerServiceUrl({
106438
- protoPath: "/apps/create-components/{appId}",
106439
- data: serializedData,
106440
- host
106441
- }),
106442
- data: serializedData,
106443
- transformResponse: fromRes
106444
- };
106445
- return metadata;
106315
+ var EVENT_LINE = "line";
106316
+ var EVENT_SERVER_ADDRESS = "server_address";
106317
+ function runAstroDev({
106318
+ packageManager,
106319
+ projectFolder,
106320
+ port,
106321
+ allowedHosts
106322
+ }) {
106323
+ const binaryArgs = ["astro", "dev"];
106324
+ if (port) {
106325
+ binaryArgs.push("--port", `${port}`);
106446
106326
  }
106447
- __createComponents.fromReq = fromReq;
106448
- __createComponents.__isAmbassador = true;
106449
- return __createComponents;
106450
- }
106451
- function commitComponentOverride(payload) {
106452
- var _a = serializer(_commitComponentOverrideRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
106453
- var fromRes = serializer(_commitComponentOverrideResponse, {}).fromJSON;
106454
- function __commitComponentOverride(_a2) {
106455
- var host = _a2.host;
106456
- var serializedData = toReq(payload);
106457
- var metadata = {
106458
- entityFqdn: "wix.ctp.gradual_rollout.v1.app_config",
106459
- method: "POST",
106460
- methodFqn: "com.wix.ctp.AppsReleaseManagerService.CommitComponentOverride",
106461
- migrationOptions: {
106462
- optInTransformResponse: true
106463
- },
106464
- url: resolveComWixCtpAppsReleaseManagerServiceUrl({
106465
- protoPath: "/apps/commit/{appId}/{componentOverrideId}",
106466
- data: serializedData,
106467
- host
106468
- }),
106469
- data: serializedData,
106470
- transformResponse: fromRes
106471
- };
106472
- return metadata;
106473
- }
106474
- __commitComponentOverride.fromReq = fromReq;
106475
- __commitComponentOverride.__isAmbassador = true;
106476
- return __commitComponentOverride;
106477
- }
106478
- function promoteAppVersionFromDraftToProduction(payload) {
106479
- var _a = serializer(_promoteAppVersionFromDraftToProductionRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
106480
- var fromRes = serializer(_promoteAppVersionFromDraftToProductionResponse, {}).fromJSON;
106481
- function __promoteAppVersionFromDraftToProduction(_a2) {
106482
- var host = _a2.host;
106483
- var serializedData = toReq(payload);
106484
- var metadata = {
106485
- entityFqdn: "wix.ctp.gradual_rollout.v1.app_config",
106486
- method: "POST",
106487
- methodFqn: "com.wix.ctp.AppsReleaseManagerService.PromoteAppVersionFromDraftToProduction",
106488
- migrationOptions: {
106489
- optInTransformResponse: true
106490
- },
106491
- url: resolveComWixCtpAppsReleaseManagerServiceUrl({
106492
- protoPath: "/apps/promote-app-version/{appId}/{createNewMajor}/{latestMajor}",
106493
- data: serializedData,
106494
- host
106495
- }),
106496
- data: serializedData,
106497
- transformResponse: fromRes
106498
- };
106499
- return metadata;
106327
+ if (allowedHosts) {
106328
+ binaryArgs.push("--allowed-hosts", allowedHosts);
106500
106329
  }
106501
- __promoteAppVersionFromDraftToProduction.fromReq = fromReq;
106502
- __promoteAppVersionFromDraftToProduction.__isAmbassador = true;
106503
- return __promoteAppVersionFromDraftToProduction;
106504
- }
106505
-
106506
- // ../../node_modules/@wix/ambassador-ctp-gradual-rollout-v1-baas-release/build/es/http.impl.js
106507
- init_esm_shims();
106508
- var _releaseRequest = {};
106509
- var _releaseResponse = {};
106510
- function resolveComWixCtpAppsReleaseManagerBassServiceUrl(opts) {
106511
- var domainToMappings = {
106512
- "api._api_base_domain_": [
106513
- {
106514
- srcPath: "/apps-release-manager-service-web",
106515
- destPath: ""
106516
- }
106517
- ],
106518
- "bo._base_domain_": [
106519
- {
106520
- srcPath: "/apps-release-manager-service-web",
106521
- destPath: ""
106522
- }
106523
- ],
106524
- "wixbo.ai": [
106525
- {
106526
- srcPath: "/apps-release-manager-service-web",
106527
- destPath: ""
106528
- }
106529
- ],
106530
- "wix-bo.com": [
106531
- {
106532
- srcPath: "/apps-release-manager-service-web",
106533
- destPath: ""
106534
- }
106535
- ],
106536
- "www._base_domain_": [
106537
- {
106538
- srcPath: "/apps-release-manager-service-web/artifacts-release-manager/app-releases",
106539
- destPath: "/artifacts-release-manager/app-releases"
106540
- },
106541
- {
106542
- srcPath: "/_api/apps-release-manager-service-web/artifacts-release-manager/app-releases",
106543
- destPath: "/artifacts-release-manager/app-releases"
106544
- },
106545
- {
106546
- srcPath: "/apps-release-manager-service-web/apps/create",
106547
- destPath: "/apps/create"
106548
- },
106549
- {
106550
- srcPath: "/apps-release-manager-service-web/apps/promote",
106551
- destPath: "/apps/promote"
106552
- },
106553
- {
106554
- srcPath: "/apps-release-manager-service-web/apps/tags",
106555
- destPath: "/apps/tags"
106556
- },
106557
- {
106558
- srcPath: "/apps-release-manager-service-web/apps/create-components",
106559
- destPath: "/apps/create-components"
106560
- },
106561
- {
106562
- srcPath: "/apps-release-manager-service-web/apps/commit",
106563
- destPath: "/apps/commit"
106564
- },
106565
- {
106566
- srcPath: "/apps-release-manager-service-web/apps/promote-app-version",
106567
- destPath: "/apps/promote-app-version"
106568
- }
106569
- ],
106570
- "manage._base_domain_": [
106571
- {
106572
- srcPath: "/apps-release-manager-service-web/apps/promote",
106573
- destPath: "/apps/promote"
106574
- },
106575
- {
106576
- srcPath: "/apps-release-manager-service-web/apps/create",
106577
- destPath: "/apps/create"
106578
- },
106579
- {
106580
- srcPath: "/apps-release-manager-service-web/apps/tags",
106581
- destPath: "/apps/tags"
106582
- },
106583
- {
106584
- srcPath: "/apps-release-manager-service-web/apps/create-components",
106585
- destPath: "/apps/create-components"
106586
- },
106587
- {
106588
- srcPath: "/apps-release-manager-service-web/apps/commit",
106589
- destPath: "/apps/commit"
106590
- },
106591
- {
106592
- srcPath: "/apps-release-manager-service-web/apps/promote-app-version",
106593
- destPath: "/apps/promote-app-version"
106594
- },
106595
- {
106596
- srcPath: "/apps-release-manager-service-web/apps/release",
106597
- destPath: "/apps/release"
106330
+ const { file, args } = packageManager.getRunBinaryCmd(binaryArgs);
106331
+ const result = execa(file, args, {
106332
+ cwd: projectFolder,
106333
+ stdio: "pipe",
106334
+ env: { FORCE_COLOR: "1" },
106335
+ cleanup: true,
106336
+ windowsHide: false
106337
+ });
106338
+ let stdoutBuffer = "";
106339
+ result.stdout?.on("data", (chunk) => {
106340
+ stdoutBuffer += chunk.toString();
106341
+ const lines = stdoutBuffer.split("\n");
106342
+ stdoutBuffer = lines.pop() ?? "";
106343
+ for (const line of lines) {
106344
+ result.stdout?.emit(EVENT_LINE, line);
106345
+ if (line.includes("http://")) {
106346
+ const match13 = /(http:\/\/[^\s]+)/.exec(line);
106347
+ if (match13?.[1]) {
106348
+ const address = stripAnsi(match13[1]).trim();
106349
+ result.stdout?.emit(EVENT_SERVER_ADDRESS, address);
106350
+ }
106598
106351
  }
106599
- ]
106600
- };
106601
- return resolveUrl(Object.assign(opts, { domainToMappings }));
106602
- }
106603
- function release(payload) {
106604
- var _a = serializer(_releaseRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
106605
- var fromRes = serializer(_releaseResponse, {}).fromJSON;
106606
- function __release(_a2) {
106607
- var host = _a2.host;
106608
- var serializedData = toReq(payload);
106609
- var metadata = {
106610
- entityFqdn: "wix.ctp.gradual_rollout.v1.baas_release",
106611
- method: "POST",
106612
- methodFqn: "com.wix.ctp.AppsReleaseManagerBassService.Release",
106613
- migrationOptions: {
106614
- optInTransformResponse: true
106615
- },
106616
- url: resolveComWixCtpAppsReleaseManagerBassServiceUrl({
106617
- protoPath: "/apps/release/{appId}/{componentOverrideId}",
106618
- data: serializedData,
106619
- host
106620
- }),
106621
- data: serializedData,
106622
- transformResponse: fromRes
106623
- };
106624
- return metadata;
106625
- }
106626
- __release.fromReq = fromReq;
106627
- __release.__isAmbassador = true;
106628
- return __release;
106352
+ }
106353
+ });
106354
+ let stdErrBuffer = "";
106355
+ result.stderr?.on("data", (chunk) => {
106356
+ stdErrBuffer += chunk.toString();
106357
+ const lines = stdErrBuffer.split("\n");
106358
+ stdErrBuffer = lines.pop() ?? "";
106359
+ for (const line of lines) {
106360
+ result.stderr?.emit(EVENT_LINE, line);
106361
+ }
106362
+ });
106363
+ return result;
106629
106364
  }
106630
106365
 
106631
- // ../arm-client/src/client.ts
106632
- var import_variant = __toESM(require_lib(), 1);
106633
-
106634
- // ../arm-client/src/isTrustedInternalErr.ts
106366
+ // ../cli-astro-commands/src/components/DevCommand/utils/useAstroLogger.tsx
106635
106367
  init_esm_shims();
106636
- function isTrustedInternalErr(e) {
106637
- if (isHttpError(e)) {
106638
- const appError = e.response?.data?.details?.applicationError;
106639
- if (appError?.description) {
106640
- let errDescription;
106641
- try {
106642
- errDescription = JSON.parse(appError.description);
106643
- } catch {
106644
- }
106645
- return errDescription?.results?.some(
106646
- (result) => result.error?.startsWith("scriptAsset is not supported")
106647
- );
106648
- }
106649
- }
106650
- return false;
106651
- }
106368
+ var import_react2 = __toESM(require_react(), 1);
106652
106369
 
106653
- // ../arm-client/src/schemas.ts
106370
+ // ../cli-astro-commands/src/components/DevCommand/utils/createAstroLogger.tsx
106654
106371
  init_esm_shims();
106655
- var promoteAppVersionFromDraftToProductionSchema = external_exports.object({
106656
- fullVersion: external_exports.string()
106657
- });
106658
- var commitComponentOverrideSchema = external_exports.object({
106659
- nextMajor: external_exports.string(),
106660
- nextMinor: external_exports.string().optional()
106661
- });
106662
- var createAppReleaseSchema = external_exports.object({
106663
- tag: external_exports.string()
106664
- });
106665
- var releaseArm2Schema = external_exports.object({
106666
- releaseBaseUrl: external_exports.string()
106372
+ var import_react = __toESM(require_react(), 1);
106373
+ var dateTimeFormat = new Intl.DateTimeFormat([], {
106374
+ hour: "2-digit",
106375
+ minute: "2-digit",
106376
+ second: "2-digit",
106377
+ hour12: false
106667
106378
  });
106379
+ function createAstroLogger(options) {
106380
+ const { isPrefixed, onLog } = options;
106381
+ const renderer = createRendererToString({ stripAnsi: false });
106382
+ const formatMessage = (prefixed, msg) => {
106383
+ return prefixed ? /* @__PURE__ */ import_react.default.createElement(Text, null, /* @__PURE__ */ import_react.default.createElement(Text, null, dateTimeFormat.format(/* @__PURE__ */ new Date()), " "), /* @__PURE__ */ import_react.default.createElement(Text, { skin: "info" }, "[wix] "), /* @__PURE__ */ import_react.default.createElement(Text, null, msg)) : msg;
106384
+ };
106385
+ const log = (msg) => {
106386
+ const formatedMessage = formatMessage(isPrefixed, msg);
106387
+ const stringToLog = typeof formatedMessage === "string" ? formatedMessage : renderer.render(formatedMessage);
106388
+ onLog?.(stringToLog);
106389
+ setTimeout(() => console.log(stringToLog), 0);
106390
+ };
106391
+ return { log };
106392
+ }
106668
106393
 
106669
- // ../arm-client/src/client.ts
106670
- var { AppPermissionDenied } = CliErrorCode;
106671
- var UpdateAppReleaseData = (0, import_variant.variant)({
106672
- TagNotFound: (0, import_variant.fields)(),
106673
- TagUpdated: {}
106394
+ // ../cli-astro-commands/src/components/DevCommand/utils/devLogStream.tsx
106395
+ init_esm_shims();
106396
+ import { EOL } from "node:os";
106397
+ import { createWriteStream } from "node:fs";
106398
+ import { PassThrough } from "node:stream";
106399
+ import { pipeline } from "node:stream/promises";
106400
+ import { dirname } from "node:path";
106401
+ var streamCache = /* @__PURE__ */ new Map();
106402
+ var createNoopStream = () => ({
106403
+ write: () => {
106404
+ },
106405
+ close: () => {
106406
+ },
106407
+ isClosed: () => true
106674
106408
  });
106675
- var ARMClient = class {
106676
- constructor(httpClient) {
106677
- this.httpClient = httpClient;
106678
- const { minRetryTimeout, retries } = getTestOverrides();
106679
- this.retryOptions = {
106680
- maxTimeout: 3 * 1e3,
106681
- minTimeout: minRetryTimeout,
106682
- retries: retries ?? 3
106683
- };
106684
- }
106685
- retryOptions;
106686
- createComponents = async (appId, componentConfigs, projectId) => {
106687
- try {
106688
- await this.httpClient.request(
106689
- createComponents({ appId, componentConfigs, projectId })
106690
- );
106691
- } catch (e) {
106692
- if (isHttpError(e) && e.response?.status === 403) {
106693
- throw new CliError({
106694
- cause: e,
106695
- code: AppPermissionDenied({ appId })
106696
- });
106697
- }
106698
- throw new CliError({
106699
- cause: e,
106700
- code: CliErrorCode.FailedToCreateComponents()
106701
- });
106702
- }
106703
- };
106704
- createAppRelease = async (manifest, projectId) => {
106705
- try {
106706
- const { data } = await pRetry(
106707
- () => this.httpClient.request(
106708
- createAppRelease({
106709
- appId: manifest.appId,
106710
- componentConfigs: manifest.components,
106711
- projectId
106712
- })
106713
- ),
106714
- this.retryOptions
106715
- );
106716
- return createAppReleaseSchema.parse(data).tag;
106717
- } catch (e) {
106718
- if (isHttpError(e)) {
106719
- if (e.response?.status === 403) {
106720
- throw new CliError({
106721
- cause: e,
106722
- code: AppPermissionDenied({ appId: manifest.appId })
106723
- });
106724
- }
106725
- if (e.response?.status === 400 && isHttpValidationError(e)) {
106726
- throw new CliError({
106727
- cause: e,
106728
- code: CliErrorCode.AppReleaseConfigViolations({
106729
- violations: e.response.data.details.validationError.fieldViolations
106730
- })
106731
- });
106409
+ var getDevLogStream = async (options) => {
106410
+ const { filePath } = options;
106411
+ const entry = streamCache.get(filePath);
106412
+ if (entry && !entry.stream.isClosed()) {
106413
+ entry.refCount++;
106414
+ return {
106415
+ write: (msg) => entry.stream.write(msg),
106416
+ release: () => {
106417
+ entry.refCount--;
106418
+ if (entry.refCount === 0) {
106419
+ entry.stream.close();
106420
+ streamCache.delete(filePath);
106732
106421
  }
106733
106422
  }
106734
- if (isTrustedInternalErr(e)) {
106735
- throw new CliError({
106736
- cause: e,
106737
- code: CliErrorCode.TrustedAppIsNotMarkedAsInternal()
106738
- });
106423
+ };
106424
+ }
106425
+ let stream;
106426
+ try {
106427
+ stream = await createDevLogStream(options);
106428
+ } catch {
106429
+ stream = createNoopStream();
106430
+ }
106431
+ const newEntry = { stream, refCount: 1 };
106432
+ streamCache.set(filePath, newEntry);
106433
+ return {
106434
+ write: (msg) => newEntry.stream.write(msg),
106435
+ release: () => {
106436
+ newEntry.refCount--;
106437
+ if (newEntry.refCount === 0) {
106438
+ newEntry.stream.close();
106439
+ streamCache.delete(filePath);
106739
106440
  }
106740
- throw new CliError({
106741
- cause: e,
106742
- code: CliErrorCode.FailedToCreateAppRelease()
106743
- });
106744
106441
  }
106745
106442
  };
106746
- createLooseAppRelease = async (manifest, projectId) => {
106747
- return this.createAppRelease(manifest, projectId);
106748
- };
106749
- updateAppRelease = async (manifest, tag) => {
106750
- try {
106751
- await pRetry(
106752
- () => this.httpClient.request(
106753
- updateAppRelease({
106754
- appId: manifest.appId,
106755
- componentConfigs: manifest.components,
106756
- tag
106757
- })
106758
- ),
106759
- this.retryOptions
106760
- );
106761
- return UpdateAppReleaseData.TagUpdated();
106762
- } catch (e) {
106763
- if (isHttpError(e)) {
106764
- if (e.response?.status === 404) {
106765
- return UpdateAppReleaseData.TagNotFound({ cause: e });
106766
- }
106767
- if (e.response?.status === 403) {
106768
- throw new CliError({
106769
- cause: e,
106770
- code: AppPermissionDenied({ appId: manifest.appId })
106771
- });
106772
- }
106773
- if (e.response?.status === 400 && isHttpValidationError(e)) {
106774
- throw new CliError({
106775
- cause: e,
106776
- code: CliErrorCode.AppReleaseConfigViolations({
106777
- violations: e.response.data.details.validationError.fieldViolations
106778
- })
106779
- });
106780
- }
106781
- }
106782
- if (isTrustedInternalErr(e)) {
106783
- throw new CliError({
106784
- cause: e,
106785
- code: CliErrorCode.TrustedAppIsNotMarkedAsInternal()
106786
- });
106787
- }
106788
- throw new CliError({
106789
- cause: e,
106790
- code: CliErrorCode.FailedToUpdateAppRelease()
106791
- });
106443
+ };
106444
+ var createDevLogStream = async ({ filePath }) => {
106445
+ await outputDir(dirname(filePath));
106446
+ const source = new PassThrough();
106447
+ const fileStream = createWriteStream(filePath, { flags: "w" });
106448
+ let closed = false;
106449
+ const isClosed = () => closed;
106450
+ pipeline(source, fileStream).catch(() => {
106451
+ if (!closed) {
106452
+ closed = true;
106792
106453
  }
106793
- };
106794
- updateLooseAppRelease = async (manifest, tag) => {
106795
- return this.updateAppRelease(manifest, tag);
106796
- };
106797
- createDraftVersion = async (appId, tag) => {
106798
- try {
106799
- const { data } = await this.httpClient.request(
106800
- commitComponentOverride({
106801
- appId,
106802
- componentOverrideId: tag
106803
- })
106804
- );
106805
- return commitComponentOverrideSchema.parse(data);
106806
- } catch (cause) {
106807
- throw new CliError({
106808
- cause,
106809
- code: CliErrorCode.FailedToCreateDraftVersion()
106810
- });
106454
+ });
106455
+ const write = (msg) => {
106456
+ if (closed) {
106457
+ return;
106811
106458
  }
106459
+ source.write(stripAnsi(msg).concat(EOL));
106812
106460
  };
106813
- releaseDraftVersion = async (appId, options) => {
106814
- try {
106815
- const { data } = await this.httpClient.request(
106816
- promoteAppVersionFromDraftToProduction({
106817
- appId,
106818
- createNewMajor: options.createNewMajor,
106819
- latestMajor: options.latestMajor,
106820
- notes: options.notes
106821
- })
106822
- );
106823
- const { fullVersion } = promoteAppVersionFromDraftToProductionSchema.parse(data);
106824
- return { releasedVersion: fullVersion };
106825
- } catch (cause) {
106826
- throw new CliError({
106827
- cause,
106828
- code: CliErrorCode.FailedToReleaseDraftVersion()
106829
- });
106461
+ const close = () => {
106462
+ if (closed) {
106463
+ return;
106830
106464
  }
106465
+ closed = true;
106466
+ source.end();
106831
106467
  };
106832
- release = async (appId, componentOverrideId, options) => {
106833
- try {
106834
- const { comment, createMinorVersion } = options;
106835
- const { data } = await this.httpClient.request(
106836
- release({
106837
- appId,
106838
- componentOverrideId,
106839
- createMinorVersion,
106840
- notes: comment
106841
- })
106842
- );
106843
- return releaseArm2Schema.parse(data).releaseBaseUrl;
106844
- } catch (e) {
106845
- throw new CliError({
106846
- cause: e,
106847
- code: CliErrorCode.FailedToReleaseHeadlessProject()
106848
- });
106849
- }
106468
+ return {
106469
+ write,
106470
+ close,
106471
+ isClosed
106850
106472
  };
106851
106473
  };
106852
106474
 
106853
- // ../arm-client/src/useARMClient.ts
106854
- function useARMClient() {
106855
- const httpClient = useHttpClient({ type: "backoffice" });
106856
- const client = (0, import_react.useMemo)(() => new ARMClient(httpClient), [httpClient]);
106857
- return usePanoramaMethodLogger(client);
106475
+ // ../cli-astro-commands/src/components/DevCommand/utils/useAstroLogger.tsx
106476
+ var useAstroLogger = ({
106477
+ isPrefixed = true
106478
+ } = {}) => {
106479
+ const {
106480
+ model: { projectFolder }
106481
+ } = useProjectModel();
106482
+ const streamRef = (0, import_react2.useRef)();
106483
+ const logger = (0, import_react2.useMemo)(
106484
+ () => createAstroLogger({
106485
+ isPrefixed,
106486
+ onLog: (msg) => {
106487
+ streamRef.current?.write(msg);
106488
+ }
106489
+ }),
106490
+ [isPrefixed]
106491
+ );
106492
+ (0, import_react2.useEffect)(() => {
106493
+ let shouldCleanStream = false;
106494
+ void getDevLogStream({
106495
+ filePath: getDevLogPath(projectFolder)
106496
+ }).then((devLogStream) => {
106497
+ if (shouldCleanStream) {
106498
+ devLogStream.release();
106499
+ return;
106500
+ }
106501
+ streamRef.current = devLogStream;
106502
+ });
106503
+ return () => {
106504
+ shouldCleanStream = true;
106505
+ streamRef.current?.release();
106506
+ };
106507
+ }, [projectFolder]);
106508
+ return logger;
106509
+ };
106510
+
106511
+ // ../cli-astro-commands/src/components/DevCommand/hooks/useFetchDevMetadata.ts
106512
+ init_esm_shims();
106513
+ function useFetchDevMetadata() {
106514
+ const http = useHttpClient({ type: "standalone" });
106515
+ return useAsyncCallback(async (_, serverLocalUrl) => {
106516
+ const url = new URL("/_wix/dev-metadata.json", serverLocalUrl);
106517
+ try {
106518
+ const { data } = await http.get(url.toString());
106519
+ return {
106520
+ devMetadata: devMetadataSchema.parse(data),
106521
+ serverLocalUrl
106522
+ };
106523
+ } catch {
106524
+ return {
106525
+ devMetadata: null,
106526
+ serverLocalUrl
106527
+ };
106528
+ }
106529
+ });
106858
106530
  }
106859
106531
 
106860
- // ../arm-client/src/index.ts
106532
+ // ../cli-astro-commands/src/components/DevCommand/SiteDevFlow.tsx
106533
+ init_esm_shims();
106534
+ var import_react21 = __toESM(require_react(), 1);
106535
+ var import_variant14 = __toESM(require_lib(), 1);
106536
+
106537
+ // ../cli-astro-commands/src/components/DevCommand/DevScreenBorder.tsx
106538
+ init_esm_shims();
106539
+ var import_react3 = __toESM(require_react(), 1);
106540
+ var DevScreenBorder = ({ children }) => {
106541
+ return /* @__PURE__ */ import_react3.default.createElement(
106542
+ Box_default,
106543
+ {
106544
+ flexDirection: "column",
106545
+ borderTop: true,
106546
+ borderLeft: false,
106547
+ borderBottom: false,
106548
+ borderRight: false,
106549
+ borderStyle: "round",
106550
+ borderColor: "blueBright",
106551
+ width: "95%"
106552
+ },
106553
+ children
106554
+ );
106555
+ };
106556
+
106557
+ // ../cli-astro-commands/src/site/index.ts
106861
106558
  init_esm_shims();
106862
106559
 
106863
106560
  // ../cli-astro-commands/src/site/SiteProvider.tsx
106864
106561
  init_esm_shims();
106865
- var import_react13 = __toESM(require_react(), 1);
106866
- var import_variant10 = __toESM(require_lib(), 1);
106562
+ var import_react15 = __toESM(require_react(), 1);
106563
+ var import_variant9 = __toESM(require_lib(), 1);
106867
106564
 
106868
106565
  // ../cli-app-definitions/src/index.ts
106869
106566
  init_esm_shims();
106870
- var import_variant2 = __toESM(require_lib(), 1);
106567
+ var import_variant = __toESM(require_lib(), 1);
106871
106568
  import { join } from "node:path";
106872
106569
  var import_monitoring_buildtime = __toESM(require_build(), 1);
106873
106570
  var GIT_IGNORED_DIR = ".wix";
@@ -107151,7 +106848,7 @@ var embeddedScriptConfigSchema = external_exports.object({
107151
106848
  "An enum indicating where in the page's DOM the HTML code will be injected."
107152
106849
  )
107153
106850
  }).strict();
107154
- var PlatformType = (0, import_variant2.variant)({
106851
+ var PlatformType = (0, import_variant.variant)({
107155
106852
  Site: {},
107156
106853
  Editor: {},
107157
106854
  Dashboard: {},
@@ -107462,16 +107159,16 @@ async function saveAppConfig(projectFolder, config) {
107462
107159
 
107463
107160
  // ../cli-astro-commands/src/site/ResolveSite.tsx
107464
107161
  init_esm_shims();
107465
- var import_react11 = __toESM(require_react(), 1);
107466
- var import_variant8 = __toESM(require_lib(), 1);
107162
+ var import_react13 = __toESM(require_react(), 1);
107163
+ var import_variant7 = __toESM(require_lib(), 1);
107467
107164
 
107468
107165
  // ../cli-site-selector/src/index.ts
107469
107166
  init_esm_shims();
107470
107167
 
107471
107168
  // ../cli-site-selector/src/SiteSelector.tsx
107472
107169
  init_esm_shims();
107473
- var import_react10 = __toESM(require_react(), 1);
107474
- var import_variant7 = __toESM(require_lib(), 1);
107170
+ var import_react12 = __toESM(require_react(), 1);
107171
+ var import_variant6 = __toESM(require_lib(), 1);
107475
107172
 
107476
107173
  // ../site-list-client/src/index.ts
107477
107174
  init_esm_shims();
@@ -107695,21 +107392,21 @@ var SiteListClient = class {
107695
107392
 
107696
107393
  // ../site-list-client/src/useSiteListClient.ts
107697
107394
  init_esm_shims();
107698
- var import_react2 = __toESM(require_react(), 1);
107395
+ var import_react4 = __toESM(require_react(), 1);
107699
107396
  function useSiteListClient() {
107700
107397
  const httpClient = useHttpClient({ type: "backoffice" });
107701
- const client = (0, import_react2.useMemo)(() => new SiteListClient(httpClient), [httpClient]);
107398
+ const client = (0, import_react4.useMemo)(() => new SiteListClient(httpClient), [httpClient]);
107702
107399
  return usePanoramaMethodLogger(client);
107703
107400
  }
107704
107401
 
107705
107402
  // ../cli-site-selector/src/SiteTypeSelect.tsx
107706
107403
  init_esm_shims();
107707
- var import_react4 = __toESM(require_react(), 1);
107708
- var import_variant3 = __toESM(require_lib(), 1);
107404
+ var import_react6 = __toESM(require_react(), 1);
107405
+ var import_variant2 = __toESM(require_lib(), 1);
107709
107406
 
107710
107407
  // ../cli-site-selector/src/bi.ts
107711
107408
  init_esm_shims();
107712
- var import_react3 = __toESM(require_react(), 1);
107409
+ var import_react5 = __toESM(require_react(), 1);
107713
107410
  function siteSelectorBiEvents(biLogger) {
107714
107411
  return {
107715
107412
  cliAction: ({
@@ -107744,7 +107441,7 @@ function siteSelectorBiEvents(biLogger) {
107744
107441
  }
107745
107442
  function useSiteSelectorBi() {
107746
107443
  const biLogger = useBiLogger();
107747
- return (0, import_react3.useMemo)(() => siteSelectorBiEvents(biLogger), [biLogger]);
107444
+ return (0, import_react5.useMemo)(() => siteSelectorBiEvents(biLogger), [biLogger]);
107748
107445
  }
107749
107446
 
107750
107447
  // ../cli-site-selector/src/SiteTypeSelect.tsx
@@ -107764,13 +107461,13 @@ var SiteTypeSelect = ({ onSubmit, onError, sites }) => {
107764
107461
  });
107765
107462
  onSubmit(option.value);
107766
107463
  };
107767
- return (0, import_variant3.match)(status, {
107464
+ return (0, import_variant2.match)(status, {
107768
107465
  Error: () => null,
107769
- Loading: () => /* @__PURE__ */ import_react4.default.createElement(Spinner, { text: t("general.loading") }),
107466
+ Loading: () => /* @__PURE__ */ import_react6.default.createElement(Spinner, { text: t("general.loading") }),
107770
107467
  Success: ({ result: [devSitesCount, devSitesLimit] }) => {
107771
107468
  const isDevSitesLimitReached = devSitesCount >= devSitesLimit;
107772
107469
  const userHasNoSites = sites.length === 0;
107773
- return /* @__PURE__ */ import_react4.default.createElement(
107470
+ return /* @__PURE__ */ import_react6.default.createElement(
107774
107471
  SelectInput,
107775
107472
  {
107776
107473
  label: t("site_type_select.label"),
@@ -107801,17 +107498,17 @@ var SiteTypeSelect = ({ onSubmit, onError, sites }) => {
107801
107498
 
107802
107499
  // ../cli-site-selector/src/CreateDevSite.tsx
107803
107500
  init_esm_shims();
107804
- var import_react7 = __toESM(require_react(), 1);
107805
- var import_variant5 = __toESM(require_lib(), 1);
107501
+ var import_react9 = __toESM(require_react(), 1);
107502
+ var import_variant4 = __toESM(require_lib(), 1);
107806
107503
 
107807
107504
  // ../cli-site-selector/src/WaitForAppToBeInstalled.tsx
107808
107505
  init_esm_shims();
107809
- var import_react6 = __toESM(require_react(), 1);
107810
- var import_variant4 = __toESM(require_lib(), 1);
107506
+ var import_react8 = __toESM(require_react(), 1);
107507
+ var import_variant3 = __toESM(require_lib(), 1);
107811
107508
 
107812
107509
  // ../cli-site-selector/src/OpenBrowser.tsx
107813
107510
  init_esm_shims();
107814
- var import_react5 = __toESM(require_react(), 1);
107511
+ var import_react7 = __toESM(require_react(), 1);
107815
107512
  var OpenBrowser = ({ siteId, appId }) => {
107816
107513
  const { t } = useTranslation();
107817
107514
  const bi = useSiteSelectorBi();
@@ -107827,17 +107524,17 @@ var OpenBrowser = ({ siteId, appId }) => {
107827
107524
  );
107828
107525
  }
107829
107526
  });
107830
- return /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement(Trans, { i18nKey: "install_app_on_site.warning" }), /* @__PURE__ */ import_react5.default.createElement(
107527
+ return /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(Trans, { i18nKey: "install_app_on_site.warning" }), /* @__PURE__ */ import_react7.default.createElement(
107831
107528
  Trans,
107832
107529
  {
107833
107530
  i18nKey: "install_app_on_site.warning.instructions",
107834
- components: [/* @__PURE__ */ import_react5.default.createElement(Key, { value: "Enter" })]
107531
+ components: [/* @__PURE__ */ import_react7.default.createElement(Key, { value: "Enter" })]
107835
107532
  }
107836
107533
  ));
107837
107534
  };
107838
107535
 
107839
107536
  // ../cli-site-selector/src/WaitForAppToBeInstalled.tsx
107840
- var AppInstallData = (0, import_variant4.variant)({
107537
+ var AppInstallData = (0, import_variant3.variant)({
107841
107538
  Success: {},
107842
107539
  Canceled: {}
107843
107540
  });
@@ -107853,11 +107550,11 @@ var WaitForAppToBeInstalled = ({
107853
107550
  const { isAppInstalled } = useDevCenterClient({ siteId: site.id });
107854
107551
  const { status } = useAsync(
107855
107552
  async ({ signal }) => {
107856
- const { pollInterval } = getTestOverrides();
107553
+ const { pollInterval: pollInterval2 } = getTestOverrides();
107857
107554
  try {
107858
107555
  await pWaitFor(() => isAppInstalled(appId), {
107859
107556
  // Polling interval is set to 6.5 seconds to avoid rate limiting (429)
107860
- interval: pollInterval ?? 6500,
107557
+ interval: pollInterval2 ?? 6500,
107861
107558
  timeout: {
107862
107559
  milliseconds: 60 * 1e3 * 2,
107863
107560
  signal
@@ -107881,16 +107578,16 @@ var WaitForAppToBeInstalled = ({
107881
107578
  {
107882
107579
  onError,
107883
107580
  onSuccess: (result) => {
107884
- if ((0, import_variant4.isType)(result, AppInstallData.Success)) {
107581
+ if ((0, import_variant3.isType)(result, AppInstallData.Success)) {
107885
107582
  onSubmit();
107886
107583
  }
107887
107584
  }
107888
107585
  }
107889
107586
  );
107890
- return (0, import_variant4.match)(status, {
107587
+ return (0, import_variant3.match)(status, {
107891
107588
  Error: () => null,
107892
- Loading: () => /* @__PURE__ */ import_react6.default.createElement(OpenBrowser, { siteId: site.id, appId }),
107893
- Success: () => /* @__PURE__ */ import_react6.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react6.default.createElement(Badge, { skin: "success" }, /* @__PURE__ */ import_react6.default.createElement(Trans, { i18nKey: "general.success" })), " ", /* @__PURE__ */ import_react6.default.createElement(Trans, { i18nKey: "install_app_on_site.finished_successfully" }))
107589
+ Loading: () => /* @__PURE__ */ import_react8.default.createElement(OpenBrowser, { siteId: site.id, appId }),
107590
+ Success: () => /* @__PURE__ */ import_react8.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react8.default.createElement(Badge, { skin: "success" }, /* @__PURE__ */ import_react8.default.createElement(Trans, { i18nKey: "general.success" })), " ", /* @__PURE__ */ import_react8.default.createElement(Trans, { i18nKey: "install_app_on_site.finished_successfully" }))
107894
107591
  });
107895
107592
  };
107896
107593
 
@@ -107902,18 +107599,18 @@ var CreateDevSite = ({
107902
107599
  onError
107903
107600
  }) => {
107904
107601
  const { t } = useTranslation();
107905
- return (0, import_variant5.match)(status, {
107602
+ return (0, import_variant4.match)(status, {
107906
107603
  NotRequested: () => null,
107907
107604
  Error: () => null,
107908
- Loading: () => /* @__PURE__ */ import_react7.default.createElement(Spinner, { text: t("create_dev_site.loading") }),
107909
- Success: ({ result }) => /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(
107605
+ Loading: () => /* @__PURE__ */ import_react9.default.createElement(Spinner, { text: t("create_dev_site.loading") }),
107606
+ Success: ({ result }) => /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, /* @__PURE__ */ import_react9.default.createElement(
107910
107607
  Trans,
107911
107608
  {
107912
107609
  i18nKey: "create_dev_site.success",
107913
- components: [/* @__PURE__ */ import_react7.default.createElement(Text, { skin: "success", bold: true })],
107610
+ components: [/* @__PURE__ */ import_react9.default.createElement(Text, { skin: "success", bold: true })],
107914
107611
  values: { name: result.displayName }
107915
107612
  }
107916
- ), /* @__PURE__ */ import_react7.default.createElement(
107613
+ ), /* @__PURE__ */ import_react9.default.createElement(
107917
107614
  WaitForAppToBeInstalled,
107918
107615
  {
107919
107616
  appId,
@@ -107927,16 +107624,16 @@ var CreateDevSite = ({
107927
107624
 
107928
107625
  // ../cli-site-selector/src/SelectExistingSite.tsx
107929
107626
  init_esm_shims();
107930
- var import_react9 = __toESM(require_react(), 1);
107931
- var import_variant6 = __toESM(require_lib(), 1);
107627
+ var import_react11 = __toESM(require_react(), 1);
107628
+ var import_variant5 = __toESM(require_lib(), 1);
107932
107629
 
107933
107630
  // ../cli-site-selector/src/SiteListSelect.tsx
107934
107631
  init_esm_shims();
107935
- var import_react8 = __toESM(require_react(), 1);
107632
+ var import_react10 = __toESM(require_react(), 1);
107936
107633
  var SiteListSelect = ({ onSubmit, sites }) => {
107937
107634
  const { t } = useTranslation();
107938
107635
  const bi = useSiteSelectorBi();
107939
- const handleSubmit = (0, import_react8.useCallback)(
107636
+ const handleSubmit = (0, import_react10.useCallback)(
107940
107637
  (option) => {
107941
107638
  bi.cliFlowStepAnswered({
107942
107639
  question: t("site_list_select.label"),
@@ -107946,7 +107643,7 @@ var SiteListSelect = ({ onSubmit, sites }) => {
107946
107643
  },
107947
107644
  [bi, onSubmit, t]
107948
107645
  );
107949
- return /* @__PURE__ */ import_react8.default.createElement(
107646
+ return /* @__PURE__ */ import_react10.default.createElement(
107950
107647
  SelectInput,
107951
107648
  {
107952
107649
  label: t("site_list_select.label"),
@@ -107973,14 +107670,14 @@ var CheckAppInstalledOnSite = ({ appId, site, onSubmit, onError }) => {
107973
107670
  }
107974
107671
  }
107975
107672
  });
107976
- return (0, import_variant6.match)(status, {
107673
+ return (0, import_variant5.match)(status, {
107977
107674
  Error: () => null,
107978
- Loading: () => /* @__PURE__ */ import_react9.default.createElement(Spinner, { text: t("general.loading") }),
107675
+ Loading: () => /* @__PURE__ */ import_react11.default.createElement(Spinner, { text: t("general.loading") }),
107979
107676
  Success: ({ result: isInstalled }) => {
107980
107677
  if (isInstalled) {
107981
107678
  return null;
107982
107679
  }
107983
- return /* @__PURE__ */ import_react9.default.createElement(
107680
+ return /* @__PURE__ */ import_react11.default.createElement(
107984
107681
  WaitForAppToBeInstalled,
107985
107682
  {
107986
107683
  appId,
@@ -107998,16 +107695,16 @@ var SelectExistingSite = ({
107998
107695
  onSubmit,
107999
107696
  onError
108000
107697
  }) => {
108001
- const [siteToInstallAppOn, setSiteToInstallAppOn] = (0, import_react9.useState)(
107698
+ const [siteToInstallAppOn, setSiteToInstallAppOn] = (0, import_react11.useState)(
108002
107699
  null
108003
107700
  );
108004
- return /* @__PURE__ */ import_react9.default.createElement(import_react9.default.Fragment, null, /* @__PURE__ */ import_react9.default.createElement(
107701
+ return /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement(
108005
107702
  SiteListSelect,
108006
107703
  {
108007
107704
  onSubmit: (site) => setSiteToInstallAppOn(site),
108008
107705
  sites
108009
107706
  }
108010
- ), siteToInstallAppOn && /* @__PURE__ */ import_react9.default.createElement(
107707
+ ), siteToInstallAppOn && /* @__PURE__ */ import_react11.default.createElement(
108011
107708
  CheckAppInstalledOnSite,
108012
107709
  {
108013
107710
  appId,
@@ -108042,7 +107739,7 @@ var SiteSelector = ({
108042
107739
  onSubmit,
108043
107740
  onError
108044
107741
  }) => {
108045
- const [siteType, setSiteType] = (0, import_react10.useState)(null);
107742
+ const [siteType, setSiteType] = (0, import_react12.useState)(null);
108046
107743
  const { createDevSite } = useDevCenterClient();
108047
107744
  const siteListClient = useSiteListClient();
108048
107745
  const { status } = useAsync(
@@ -108067,17 +107764,17 @@ var SiteSelector = ({
108067
107764
  void createSite.execute();
108068
107765
  }
108069
107766
  }
108070
- return /* @__PURE__ */ import_react10.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react10.default.createElement(I18nProvider, { messages: messages_default }, (0, import_variant7.match)(status, {
107767
+ return /* @__PURE__ */ import_react12.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react12.default.createElement(I18nProvider, { messages: messages_default }, (0, import_variant6.match)(status, {
108071
107768
  Error: () => null,
108072
- Loading: () => /* @__PURE__ */ import_react10.default.createElement(Spinner, { text: /* @__PURE__ */ import_react10.default.createElement(Trans, { i18nKey: "general.loading" }) }),
108073
- Success: ({ result: sites }) => /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement(
107769
+ Loading: () => /* @__PURE__ */ import_react12.default.createElement(Spinner, { text: /* @__PURE__ */ import_react12.default.createElement(Trans, { i18nKey: "general.loading" }) }),
107770
+ Success: ({ result: sites }) => /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement(
108074
107771
  SiteTypeSelect,
108075
107772
  {
108076
107773
  onSubmit: handleSelectSiteType,
108077
107774
  onError,
108078
107775
  sites
108079
107776
  }
108080
- ), siteType === "create-dev-site" && /* @__PURE__ */ import_react10.default.createElement(
107777
+ ), siteType === "create-dev-site" && /* @__PURE__ */ import_react12.default.createElement(
108081
107778
  CreateDevSite,
108082
107779
  {
108083
107780
  status: createSite.status,
@@ -108085,7 +107782,7 @@ var SiteSelector = ({
108085
107782
  onSubmit,
108086
107783
  onError
108087
107784
  }
108088
- ), siteType === "select-existing-site" && /* @__PURE__ */ import_react10.default.createElement(
107785
+ ), siteType === "select-existing-site" && /* @__PURE__ */ import_react12.default.createElement(
108089
107786
  SelectExistingSite,
108090
107787
  {
108091
107788
  sites,
@@ -108102,11 +107799,11 @@ var ResolveSite = ({ state, onSubmit }) => {
108102
107799
  const exit = useExit();
108103
107800
  const { model } = useProjectModel();
108104
107801
  const biLogger = useBiLogger();
108105
- return /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, (0, import_variant8.match)(state, {
108106
- NotConfigured: (0, import_variant8.constant)(
108107
- /* @__PURE__ */ import_react11.default.createElement(Alert, { type: "insight" }, "You don't have a Development Site currently configured")
107802
+ return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, (0, import_variant7.match)(state, {
107803
+ NotConfigured: (0, import_variant7.constant)(
107804
+ /* @__PURE__ */ import_react13.default.createElement(Alert, { type: "insight" }, "You don't have a Development Site currently configured")
108108
107805
  )
108109
- }), /* @__PURE__ */ import_react11.default.createElement(
107806
+ }), /* @__PURE__ */ import_react13.default.createElement(
108110
107807
  SiteSelector,
108111
107808
  {
108112
107809
  appId: model.config.appId,
@@ -108119,15 +107816,15 @@ var ResolveSite = ({ state, onSubmit }) => {
108119
107816
 
108120
107817
  // ../cli-astro-commands/src/site/context.ts
108121
107818
  init_esm_shims();
108122
- var import_react12 = __toESM(require_react(), 1);
108123
- var SiteContext = (0, import_react12.createContext)(null);
107819
+ var import_react14 = __toESM(require_react(), 1);
107820
+ var SiteContext = (0, import_react14.createContext)(null);
108124
107821
 
108125
107822
  // ../cli-astro-commands/src/site/site-state.ts
108126
107823
  init_esm_shims();
108127
- var import_variant9 = __toESM(require_lib(), 1);
108128
- var SiteState = (0, import_variant9.variant)({
107824
+ var import_variant8 = __toESM(require_lib(), 1);
107825
+ var SiteState = (0, import_variant8.variant)({
108129
107826
  NotConfigured: {},
108130
- Resolved: (0, import_variant9.fields)()
107827
+ Resolved: (0, import_variant8.fields)()
108131
107828
  });
108132
107829
 
108133
107830
  // ../cli-astro-commands/src/site/SiteProvider.tsx
@@ -108141,7 +107838,7 @@ var SiteProvider = ({ children }) => {
108141
107838
  const siteId = config.projectType === "Site" ? config.siteId : (await readAppConfig(projectFolder, writeDebugLog))?.siteId;
108142
107839
  return siteId ? SiteState.Resolved({ siteId }) : SiteState.NotConfigured();
108143
107840
  }, []);
108144
- const setSite = (0, import_react13.useCallback)(
107841
+ const setSite = (0, import_react15.useCallback)(
108145
107842
  async (siteId) => {
108146
107843
  try {
108147
107844
  await saveAppConfig(projectFolder, { siteId });
@@ -108157,17 +107854,17 @@ var SiteProvider = ({ children }) => {
108157
107854
  },
108158
107855
  [merge, projectFolder]
108159
107856
  );
108160
- const handleResolveSite = (0, import_react13.useCallback)(
107857
+ const handleResolveSite = (0, import_react15.useCallback)(
108161
107858
  (siteId) => setSite(siteId).catch(exit),
108162
107859
  [exit, setSite]
108163
107860
  );
108164
- return (0, import_variant10.match)(status, {
107861
+ return (0, import_variant9.match)(status, {
108165
107862
  Error: () => null,
108166
- Loading: () => /* @__PURE__ */ import_react13.default.createElement(Spinner, { text: "Resolving development site..." }),
107863
+ Loading: () => /* @__PURE__ */ import_react15.default.createElement(Spinner, { text: "Resolving development site..." }),
108167
107864
  Success: ({ result: state }) => {
108168
- return (0, import_variant10.match)(state, {
108169
- NotConfigured: (variant5) => /* @__PURE__ */ import_react13.default.createElement(ResolveSite, { state: variant5, onSubmit: handleResolveSite }),
108170
- Resolved: ({ siteId }) => /* @__PURE__ */ import_react13.default.createElement(
107865
+ return (0, import_variant9.match)(state, {
107866
+ NotConfigured: (variant6) => /* @__PURE__ */ import_react15.default.createElement(ResolveSite, { state: variant6, onSubmit: handleResolveSite }),
107867
+ Resolved: ({ siteId }) => /* @__PURE__ */ import_react15.default.createElement(
108171
107868
  SiteContext.Provider,
108172
107869
  {
108173
107870
  value: {
@@ -108184,144 +107881,595 @@ var SiteProvider = ({ children }) => {
108184
107881
 
108185
107882
  // ../cli-astro-commands/src/site/useSite.ts
108186
107883
  init_esm_shims();
108187
- var import_react14 = __toESM(require_react(), 1);
107884
+ var import_react16 = __toESM(require_react(), 1);
108188
107885
  function useSite() {
108189
- const context = (0, import_react14.useContext)(SiteContext);
107886
+ const context = (0, import_react16.useContext)(SiteContext);
108190
107887
  if (context == null) {
108191
107888
  throw new Error("useSite() cannot be used without an <SiteProvider>");
108192
107889
  }
108193
107890
  return context;
108194
107891
  }
108195
107892
 
108196
- // ../cli-astro-commands/src/components/PlatformLink/RedirectLink.tsx
107893
+ // ../cli-astro-commands/src/components/DevCommand/SiteDev.tsx
108197
107894
  init_esm_shims();
108198
- var import_react15 = __toESM(require_react(), 1);
107895
+ var import_react20 = __toESM(require_react(), 1);
107896
+ var import_variant13 = __toESM(require_lib(), 1);
107897
+
107898
+ // ../cli-astro-commands/src/components/DevCommand/hooks/useDevCenterUpdater.ts
107899
+ init_esm_shims();
107900
+ var import_react18 = __toESM(require_react(), 1);
108199
107901
  var import_variant11 = __toESM(require_lib(), 1);
108200
- import { URL as URL2 } from "node:url";
108201
- var createAppInstallerUrl = (redirectUrl, options) => {
108202
- const { appId, versionOverrideId } = options;
108203
- const installerUrl = new URL2(`https://www.wix.com/app-installer`);
108204
- installerUrl.searchParams.append("appId", appId);
108205
- installerUrl.searchParams.append("versionOverrideId", versionOverrideId);
108206
- installerUrl.searchParams.append("postInstallationUrl", redirectUrl);
108207
- return installerUrl.toString();
108208
- };
108209
- var createRedirectLink = (options) => {
108210
- const { platform, tenantId, appId, versionOverrideId } = options;
108211
- const url = new URL2("https://dev.wix.com/wix-cli-redirect-service/redirect");
108212
- url.searchParams.append("platform", platform);
108213
- if (versionOverrideId) {
108214
- url.searchParams.append("versionOverrideId", versionOverrideId);
107902
+
107903
+ // ../cli-astro-commands/src/components/DevCommand/hooks/useFetchAppManifest.ts
107904
+ init_esm_shims();
107905
+ var import_react17 = __toESM(require_react(), 1);
107906
+
107907
+ // ../cli-astro-commands/src/components/DevCommand/utils/isTunnelRequired.ts
107908
+ init_esm_shims();
107909
+ function isTunnelRequired(appManifest) {
107910
+ for (const extension of appManifest.components) {
107911
+ const knownAppManifest = parseKnownExtensionManifest(extension);
107912
+ if (knownAppManifest != null && knownAppManifest.compType === ComponentType.WEBHOOK) {
107913
+ return !URL.canParse(knownAppManifest.compData.webhook.callbackUrl);
107914
+ }
107915
+ }
107916
+ return false;
107917
+ }
107918
+ function parseKnownExtensionManifest(extensionManifest) {
107919
+ const appManifestResult = looseComponentSchema.safeParse(extensionManifest);
107920
+ if (appManifestResult.error) {
107921
+ return null;
108215
107922
  }
108216
- if (!tenantId) {
108217
- return createAppInstallerUrl(url.toString(), {
108218
- appId: options.appId,
108219
- versionOverrideId: options.versionOverrideId
107923
+ return appManifestResult.data;
107924
+ }
107925
+
107926
+ // ../cli-astro-commands/src/components/DevCommand/hooks/useFetchAppManifest.ts
107927
+ function useFetchAppManifest() {
107928
+ const http = useHttpClient({ type: "standalone" });
107929
+ return (0, import_react17.useCallback)(
107930
+ async (serverLocalUrl, devMetadata, baseUrl, tunnelUrl) => {
107931
+ const url = new URL("/_wix/app-manifest.json", serverLocalUrl);
107932
+ const { data: text } = await http.get(url.toString(), {
107933
+ responseType: "text",
107934
+ transitional: {
107935
+ silentJSONParsing: true,
107936
+ forcedJSONParsing: false,
107937
+ clarifyTimeoutError: false
107938
+ },
107939
+ disableWixHeaders: true
107940
+ });
107941
+ if (devMetadata != null) {
107942
+ const placeholders = /* @__PURE__ */ new Map();
107943
+ placeholders.set(devMetadata.staticsUrlPlaceholder, baseUrl);
107944
+ placeholders.set(devMetadata.serverUrlPlaceholder, tunnelUrl);
107945
+ return {
107946
+ manifest: parseLooseAppManifest(text, placeholders),
107947
+ isTunnelRequired: text.includes(devMetadata.serverUrlPlaceholder)
107948
+ };
107949
+ }
107950
+ const manifestV1 = parseLooseAppManifest(text);
107951
+ return {
107952
+ manifest: manifestV1,
107953
+ isTunnelRequired: isTunnelRequired(manifestV1)
107954
+ };
107955
+ },
107956
+ [http]
107957
+ );
107958
+ }
107959
+
107960
+ // ../cli-astro-commands/src/components/DevCommand/hooks/checkManifestForChanges.ts
107961
+ init_esm_shims();
107962
+ var import_variant10 = __toESM(require_lib(), 1);
107963
+ import { isDeepStrictEqual } from "node:util";
107964
+ var ManifestUpdateResult = (0, import_variant10.variant)({
107965
+ Changed: (0, import_variant10.fields)(),
107966
+ Unchanged: {}
107967
+ });
107968
+ function checkManifestForChanges(previous, latest) {
107969
+ if (previous == null) {
107970
+ return ManifestUpdateResult.Changed({
107971
+ shouldDistributeClientUpdate: false
108220
107972
  });
108221
107973
  }
108222
- if (tenantId) {
108223
- url.searchParams.append("tenantId", tenantId);
107974
+ if (isDeepStrictEqual(previous, latest)) {
107975
+ return ManifestUpdateResult.Unchanged();
108224
107976
  }
108225
- url.searchParams.append("appId", appId);
108226
- return url.toString();
108227
- };
108228
- var RedirectLink = ({
108229
- platform,
108230
- armTag,
108231
- tenantId
108232
- }) => {
108233
- const { model } = useProjectModel();
108234
- const label = (0, import_variant11.match)(platform, {
108235
- editor: () => "Editor",
108236
- dashboard: () => "Dashboard",
108237
- site: () => "Site"
107977
+ const oldComponentsMap = new Map(
107978
+ previous.components.map((comp) => [comp.compId, comp])
107979
+ );
107980
+ const changedComponents = latest.components.filter((newComp) => {
107981
+ const oldComp = oldComponentsMap.get(newComp.compId);
107982
+ return !isDeepStrictEqual(newComp, oldComp);
108238
107983
  });
108239
- const url = createRedirectLink({
108240
- platform,
108241
- appId: model.config.appId,
108242
- versionOverrideId: armTag,
108243
- tenantId
107984
+ const editorComponentsChanged = changedComponents.filter(
107985
+ (comp) => comp.compType === ComponentType.PANEL || comp.compType === ComponentType.EDITOR_REACT_COMPONENT
107986
+ );
107987
+ return ManifestUpdateResult.Changed({
107988
+ shouldDistributeClientUpdate: editorComponentsChanged.length > 0
108244
107989
  });
108245
- return /* @__PURE__ */ import_react15.default.createElement(Box_default, { marginRight: 1 }, /* @__PURE__ */ import_react15.default.createElement(PointerSmallIcon, null), /* @__PURE__ */ import_react15.default.createElement(Box_default, { marginLeft: 1 }, /* @__PURE__ */ import_react15.default.createElement(Link, { url }, label)));
107990
+ }
107991
+
107992
+ // ../cli-astro-commands/src/components/DevCommand/hooks/useDevCenterUpdater.ts
107993
+ var { pollInterval } = getTestOverrides();
107994
+ var useDevCenterUpdater = ({
107995
+ serverLocalUrl,
107996
+ serverExposedUrl,
107997
+ devMetadata
107998
+ }) => {
107999
+ const [devArmTag, setDevArmTag] = (0, import_react18.useState)();
108000
+ const [manifest, setManifest] = (0, import_react18.useState)(null);
108001
+ const writeToDebugLog = useDebugLog();
108002
+ const { siteId } = useSite();
108003
+ const exit = useExit();
108004
+ const metasiteManagerClient = useMetasiteManagerClient({ siteId });
108005
+ const {
108006
+ model: { config, projectFolder, releaseAppId }
108007
+ } = useProjectModel();
108008
+ const { appId, projectType } = config;
108009
+ const logger = useAstroLogger({ isPrefixed: true });
108010
+ const arm = useARMClient();
108011
+ const updateDeploymentTopology = useUpdateDeploymentTopology(siteId);
108012
+ const openTunnel = useTunnel();
108013
+ const tunnelUrl = (0, import_react18.useRef)();
108014
+ const [tunnelRequired, setTunnelRequired] = (0, import_react18.useState)(false);
108015
+ const fetchAppManifest = useFetchAppManifest();
108016
+ const updateDevCenter = (0, import_react18.useCallback)(
108017
+ async (latestManifest, isTunnelRequired2) => {
108018
+ const baseUrl = serverExposedUrl ?? serverLocalUrl;
108019
+ const manifestUpdateResult = checkManifestForChanges(
108020
+ manifest,
108021
+ latestManifest
108022
+ );
108023
+ if ((0, import_variant11.isType)(manifestUpdateResult, "Unchanged")) {
108024
+ return manifestUpdateResult;
108025
+ }
108026
+ if (!serverExposedUrl && !tunnelUrl.current && isTunnelRequired2) {
108027
+ const config2 = await readUserConfig();
108028
+ if (!config2.tunneling) {
108029
+ setTunnelRequired(true);
108030
+ return ManifestUpdateResult.Unchanged();
108031
+ }
108032
+ const serverLocalPort = parseInt(new URL(serverLocalUrl).port, 10);
108033
+ const tunnel = await openTunnel(serverLocalPort);
108034
+ tunnelUrl.current = tunnel.url;
108035
+ return ManifestUpdateResult.Unchanged();
108036
+ }
108037
+ const appConfig = await readAppConfig(projectFolder);
108038
+ let updatedDevArmTag = appConfig?.devArmTag;
108039
+ if (!updatedDevArmTag) {
108040
+ updatedDevArmTag = await arm.createLooseAppRelease(
108041
+ latestManifest,
108042
+ releaseAppId
108043
+ );
108044
+ } else {
108045
+ const updateState = await arm.updateLooseAppRelease(
108046
+ latestManifest,
108047
+ updatedDevArmTag
108048
+ );
108049
+ if (!(0, import_variant11.isType)(updateState, "TagUpdated")) {
108050
+ updatedDevArmTag = await arm.createLooseAppRelease(
108051
+ latestManifest,
108052
+ releaseAppId
108053
+ );
108054
+ }
108055
+ }
108056
+ if (updatedDevArmTag !== appConfig?.devArmTag) {
108057
+ await saveAppConfig(projectFolder, { devArmTag: updatedDevArmTag });
108058
+ }
108059
+ if ((0, import_variant11.isType)(manifestUpdateResult, "Changed") && manifestUpdateResult.shouldDistributeClientUpdate) {
108060
+ await metasiteManagerClient.distributeClientUpdate(appId);
108061
+ }
108062
+ setManifest(latestManifest);
108063
+ setDevArmTag(updatedDevArmTag);
108064
+ await updateDeploymentTopology({
108065
+ siteUrl: projectType === "Site" ? baseUrl : void 0,
108066
+ armTag: updatedDevArmTag,
108067
+ environment: "development"
108068
+ });
108069
+ return manifestUpdateResult;
108070
+ },
108071
+ [
108072
+ releaseAppId,
108073
+ manifest,
108074
+ metasiteManagerClient,
108075
+ serverLocalUrl,
108076
+ serverExposedUrl,
108077
+ arm,
108078
+ projectFolder,
108079
+ appId,
108080
+ updateDeploymentTopology,
108081
+ openTunnel,
108082
+ projectType
108083
+ ]
108084
+ );
108085
+ const [timer, setTimer] = (0, import_react18.useState)(Date.now());
108086
+ (0, import_react18.useEffect)(() => {
108087
+ let disposed = false;
108088
+ async function fetchAndUpdate() {
108089
+ const baseUrl = serverExposedUrl ?? serverLocalUrl;
108090
+ const { manifest: manifest2, isTunnelRequired: isTunnelRequired2 } = await fetchAppManifest(
108091
+ serverLocalUrl,
108092
+ devMetadata,
108093
+ baseUrl,
108094
+ tunnelUrl.current ?? baseUrl
108095
+ );
108096
+ try {
108097
+ const result = await updateDevCenter(manifest2, isTunnelRequired2);
108098
+ if ((0, import_variant11.isType)(result, "Changed")) {
108099
+ logger.log(
108100
+ "App Manifest updated. Refresh existing browser tabs to view the latest changes."
108101
+ );
108102
+ }
108103
+ } catch (error) {
108104
+ setManifest(manifest2);
108105
+ logger.log("Failed to update App Manifest");
108106
+ logger.log(`${error}`);
108107
+ writeToDebugLog(error);
108108
+ throw error;
108109
+ }
108110
+ }
108111
+ void fetchAndUpdate().catch((error) => {
108112
+ if (error instanceof Error && error.name === "TrustedAppIsNotMarkedAsInternal") {
108113
+ exit(error);
108114
+ }
108115
+ }).finally(() => {
108116
+ if (!disposed) {
108117
+ setTimeout(() => setTimer(Date.now()), pollInterval ?? 1e3);
108118
+ }
108119
+ });
108120
+ return () => {
108121
+ disposed = true;
108122
+ };
108123
+ }, [timer]);
108124
+ return { tunnelRequired, devArmTag };
108246
108125
  };
108247
108126
 
108248
- // ../cli-astro-commands/src/hooks/useUpdateDeploymentTopology.ts
108127
+ // ../cli-astro-commands/src/components/DevCommand/TunnelingConsent.tsx
108249
108128
  init_esm_shims();
108250
- function useUpdateDeploymentTopology(siteId) {
108129
+ var import_react19 = __toESM(require_react(), 1);
108130
+ var import_variant12 = __toESM(require_lib(), 1);
108131
+ var TunnelingConsent = ({ required, children }) => {
108132
+ const exit = useExit();
108133
+ const [approved, setApproved] = (0, import_react19.useState)();
108134
+ const { status } = useAsync(async () => {
108135
+ const config = await readUserConfig();
108136
+ if (config.tunneling) {
108137
+ setApproved(true);
108138
+ }
108139
+ return config;
108140
+ }, []);
108141
+ if (!required || approved) {
108142
+ return children;
108143
+ }
108144
+ return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, (0, import_variant12.match)(status, {
108145
+ Success: () => /* @__PURE__ */ import_react19.default.createElement(
108146
+ ConfirmInput,
108147
+ {
108148
+ label: "To proceed, we'll set up a secure tunnel from your machine for development purposes",
108149
+ initialValue: true,
108150
+ onSubmit: async (approved2) => {
108151
+ setApproved(approved2);
108152
+ await updateUserConfig({ tunneling: approved2 });
108153
+ if (!approved2) {
108154
+ exit();
108155
+ }
108156
+ }
108157
+ }
108158
+ ),
108159
+ Error: () => null,
108160
+ Loading: () => null
108161
+ }), approved === false && /* @__PURE__ */ import_react19.default.createElement(Text, { skin: "error" }, "Operation aborted. Tunneling is necessary to run your application."));
108162
+ };
108163
+
108164
+ // ../cli-astro-commands/src/components/DevCommand/SiteDev.tsx
108165
+ var SiteDev = ({
108166
+ serverLocalUrl,
108167
+ serverExposedUrl,
108168
+ devMetadata
108169
+ }) => {
108170
+ const { siteId } = useSite();
108251
108171
  const {
108252
- model: { projectFolder, config }
108172
+ model: {
108173
+ config: { appId }
108174
+ }
108253
108175
  } = useProjectModel();
108254
- return useAsyncCallback(async (_, props) => {
108255
- const { environment, siteUrl, armTag } = props;
108256
- const _siteUrl = siteUrl ?? createRedirectLink({
108176
+ const { tunnelRequired, devArmTag } = useDevCenterUpdater({
108177
+ serverLocalUrl,
108178
+ serverExposedUrl,
108179
+ devMetadata
108180
+ });
108181
+ const veloClient = useVeloClient();
108182
+ const { status: gitHubOnboardingStatus } = useAsync(
108183
+ () => veloClient.getGitHubOnboardingStatus(appId),
108184
+ [appId]
108185
+ );
108186
+ return /* @__PURE__ */ import_react20.default.createElement(import_react20.default.Fragment, null, /* @__PURE__ */ import_react20.default.createElement(Text, null, "Development environment ready"), /* @__PURE__ */ import_react20.default.createElement(Box_default, { rowGap: 1, marginY: 1, flexDirection: "column" }, /* @__PURE__ */ import_react20.default.createElement(TunnelingConsent, { required: tunnelRequired }, /* @__PURE__ */ import_react20.default.createElement(Text, null, "Open the preview on:"), /* @__PURE__ */ import_react20.default.createElement(Box_default, { paddingLeft: 2, flexDirection: "column" }, /* @__PURE__ */ import_react20.default.createElement(PlatformLink, { url: serverLocalUrl, label: "Site" }), devArmTag ? /* @__PURE__ */ import_react20.default.createElement(
108187
+ PlatformLink,
108188
+ {
108189
+ url: `https://manage.wix.com/dashboard/${siteId}?apps-override=${devArmTag}`,
108190
+ label: "Dashboard"
108191
+ }
108192
+ ) : /* @__PURE__ */ import_react20.default.createElement(Spinner, { text: "Preparing your dashboard..." }), (0, import_variant13.match)(gitHubOnboardingStatus, {
108193
+ Success: ({ result }) => result?.status === OnboardingState.GITHUB_ENABLED && /* @__PURE__ */ import_react20.default.createElement(
108194
+ PlatformLink,
108195
+ {
108196
+ url: `https://vibe.wix.com/projects/${siteId}`,
108197
+ label: "Editor"
108198
+ }
108199
+ ),
108200
+ Error: () => null,
108201
+ Loading: () => null
108202
+ })))));
108203
+ };
108204
+
108205
+ // ../cli-astro-commands/src/components/DevCommand/SiteDevFlow.tsx
108206
+ var SiteDevFlow = ({
108207
+ devMetadataStatus,
108208
+ serverExposedUrl
108209
+ }) => {
108210
+ const { siteId } = useSite();
108211
+ return /* @__PURE__ */ import_react21.default.createElement(SiteAuthProvider, { siteId }, (0, import_variant14.match)(devMetadataStatus, {
108212
+ NotRequested: () => /* @__PURE__ */ import_react21.default.createElement(Spinner, { text: "Starting dev environment..." }),
108213
+ Error: () => null,
108214
+ Loading: () => /* @__PURE__ */ import_react21.default.createElement(Spinner, { text: "Checking dev environment settings..." }),
108215
+ Success: ({ result: { devMetadata, serverLocalUrl } }) => /* @__PURE__ */ import_react21.default.createElement(DevScreenBorder, null, /* @__PURE__ */ import_react21.default.createElement(
108216
+ SiteDev,
108217
+ {
108218
+ devMetadata,
108219
+ serverLocalUrl,
108220
+ serverExposedUrl
108221
+ }
108222
+ ))
108223
+ }));
108224
+ };
108225
+
108226
+ // ../cli-astro-commands/src/components/DevCommand/AppDevFlow.tsx
108227
+ init_esm_shims();
108228
+ var import_react27 = __toESM(require_react(), 1);
108229
+ var import_variant17 = __toESM(require_lib(), 1);
108230
+
108231
+ // ../cli-astro-commands/src/components/DevCommand/app-flow/AppDev.tsx
108232
+ init_esm_shims();
108233
+ var import_react26 = __toESM(require_react(), 1);
108234
+ var import_variant16 = __toESM(require_lib(), 1);
108235
+
108236
+ // ../cli-astro-commands/src/components/DevCommand/app-flow/screen-state.ts
108237
+ init_esm_shims();
108238
+ var import_variant15 = __toESM(require_lib(), 1);
108239
+ var ScreenState = (0, import_variant15.variant)({
108240
+ Home: {},
108241
+ SiteSelector: {}
108242
+ });
108243
+
108244
+ // ../cli-astro-commands/src/components/DevCommand/app-flow/SiteSelectorScreen.tsx
108245
+ init_esm_shims();
108246
+ var import_react23 = __toESM(require_react(), 1);
108247
+
108248
+ // ../cli-astro-commands/src/components/CloseScreen/index.tsx
108249
+ init_esm_shims();
108250
+
108251
+ // ../cli-astro-commands/src/components/CloseScreen/CloseScreen.tsx
108252
+ init_esm_shims();
108253
+ var import_react22 = __toESM(require_react(), 1);
108254
+ var CloseScreen = ({ onClose }) => {
108255
+ const bi = useWixCliAppBi();
108256
+ use_input_default((_, key) => {
108257
+ if (key.escape) {
108258
+ bi.cliAction({
108259
+ question: "Press to close",
108260
+ questionKey: "general.close_screen",
108261
+ action: "close",
108262
+ key: "esc"
108263
+ });
108264
+ onClose();
108265
+ }
108266
+ });
108267
+ return /* @__PURE__ */ import_react22.default.createElement(Text, { skin: "secondary" }, "Press", /* @__PURE__ */ import_react22.default.createElement(Key, { value: "esc", skin: "secondary" }), "to close");
108268
+ };
108269
+
108270
+ // ../cli-astro-commands/src/components/DevCommand/app-flow/SiteSelectorScreen.tsx
108271
+ var SiteSelectorScreen = ({ onScreenChange }) => {
108272
+ const { model } = useProjectModel();
108273
+ const biLogger = useBiLogger();
108274
+ const { siteId, setSite } = useSite();
108275
+ const { reportError } = useErrorReporter();
108276
+ const [error, setError] = (0, import_react23.useState)(null);
108277
+ const handleError = (0, import_react23.useCallback)(
108278
+ (error2) => {
108279
+ reportError(error2);
108280
+ setError(error2);
108281
+ },
108282
+ [reportError, setError]
108283
+ );
108284
+ const handleSubmit = (0, import_react23.useCallback)(
108285
+ async (site) => {
108286
+ try {
108287
+ await setSite(site.id);
108288
+ onScreenChange(ScreenState.Home());
108289
+ } catch (e) {
108290
+ handleError(e);
108291
+ }
108292
+ },
108293
+ [setSite, onScreenChange, handleError]
108294
+ );
108295
+ return /* @__PURE__ */ import_react23.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ import_react23.default.createElement(Box_default, { gap: 1 }, /* @__PURE__ */ import_react23.default.createElement(PointerIcon, null), /* @__PURE__ */ import_react23.default.createElement(Text, null, "Current Development Site: ", siteId)), /* @__PURE__ */ import_react23.default.createElement(Box_default, { flexDirection: "column" }, /* @__PURE__ */ import_react23.default.createElement(
108296
+ SiteSelector,
108297
+ {
108298
+ appId: model.config.appId,
108299
+ biLogger,
108300
+ onSubmit: handleSubmit,
108301
+ onError: handleError
108302
+ }
108303
+ ), error ? /* @__PURE__ */ import_react23.default.createElement(
108304
+ ErrorViewer,
108305
+ {
108306
+ error,
108307
+ systemErrorOverride: /* @__PURE__ */ import_react23.default.createElement(Alert, { type: "error" }, "Failed to change Development Site!")
108308
+ }
108309
+ ) : null), /* @__PURE__ */ import_react23.default.createElement(CloseScreen, { onClose: () => onScreenChange(ScreenState.Home()) }));
108310
+ };
108311
+
108312
+ // ../cli-astro-commands/src/components/DevCommand/app-flow/HomeScreen.tsx
108313
+ init_esm_shims();
108314
+ var import_react25 = __toESM(require_react(), 1);
108315
+ import process2 from "node:process";
108316
+
108317
+ // ../cli-astro-commands/src/components/DevCommand/app-flow/SwitchSite.tsx
108318
+ init_esm_shims();
108319
+ var import_react24 = __toESM(require_react(), 1);
108320
+ var SwitchSite = ({ onScreenChange }) => {
108321
+ const bi = useWixCliAppBi();
108322
+ use_input_default(async (input) => {
108323
+ if (input === "c") {
108324
+ bi.cliAction({
108325
+ question: "Switch Dev Site",
108326
+ questionKey: "dev_command.dev_site.change",
108327
+ action: "change_site",
108328
+ key: input
108329
+ });
108330
+ onScreenChange(ScreenState.SiteSelector());
108331
+ }
108332
+ });
108333
+ return /* @__PURE__ */ import_react24.default.createElement(Text, { skin: "secondary" }, "(Press ", /* @__PURE__ */ import_react24.default.createElement(Key, { value: "C", skin: "secondary" }), " to switch)");
108334
+ };
108335
+
108336
+ // ../cli-astro-commands/src/components/DevCommand/app-flow/HomeScreen.tsx
108337
+ var HomeScreen = ({
108338
+ onScreenChange,
108339
+ devArmTag
108340
+ }) => {
108341
+ const { siteId } = useSite();
108342
+ return /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement(Box_default, { gap: 1 }, /* @__PURE__ */ import_react25.default.createElement(Text, null, "Current Dev Site:"), /* @__PURE__ */ import_react25.default.createElement(Text, { bold: true, skin: "info" }, siteId), process2.stdin.isTTY && /* @__PURE__ */ import_react25.default.createElement(SwitchSite, { onScreenChange })), /* @__PURE__ */ import_react25.default.createElement(Box_default, { paddingTop: 1, paddingBottom: 1, flexDirection: "column" }, /* @__PURE__ */ import_react25.default.createElement(Text, null, "Open the preview on:"), /* @__PURE__ */ import_react25.default.createElement(Box_default, { paddingLeft: 2, flexDirection: "column" }, devArmTag ? /* @__PURE__ */ import_react25.default.createElement(import_react25.default.Fragment, null, /* @__PURE__ */ import_react25.default.createElement(
108343
+ RedirectLink,
108344
+ {
108257
108345
  platform: "site",
108258
- appId: config.appId,
108259
- versionOverrideId: armTag,
108260
- ...siteId ? {
108261
- tenantId: siteId
108262
- } : null
108263
- });
108264
- const editorUrl = config.projectType === "App" ? createRedirectLink({
108346
+ versionOverrideId: devArmTag,
108347
+ siteId
108348
+ }
108349
+ ), /* @__PURE__ */ import_react25.default.createElement(
108350
+ RedirectLink,
108351
+ {
108265
108352
  platform: "editor",
108266
- appId: config.appId,
108267
- versionOverrideId: armTag,
108268
- ...siteId ? {
108269
- tenantId: siteId
108270
- } : null
108271
- }) : void 0;
108272
- const dashboardUrl = config.projectType === "App" ? createRedirectLink({
108353
+ versionOverrideId: devArmTag,
108354
+ siteId
108355
+ }
108356
+ ), /* @__PURE__ */ import_react25.default.createElement(
108357
+ RedirectLink,
108358
+ {
108273
108359
  platform: "dashboard",
108274
- appId: config.appId,
108275
- versionOverrideId: armTag,
108276
- ...siteId ? {
108277
- tenantId: siteId
108278
- } : null
108279
- }) : `https://manage.wix.com/dashboard/${siteId}?apps-override=${armTag}`;
108280
- const topology = await readDeploymentTopology(projectFolder);
108281
- topology[environment] = {
108282
- id: armTag,
108283
- ..._siteUrl ? {
108284
- site: {
108285
- main: _siteUrl
108286
- }
108287
- } : {},
108288
- ...dashboardUrl ? {
108289
- dashboard: {
108290
- main: dashboardUrl
108291
- }
108292
- } : {},
108293
- ...editorUrl ? {
108294
- editor: {
108295
- main: editorUrl
108296
- }
108297
- } : {}
108298
- };
108299
- const path = getDeploymentTopologyPath(projectFolder);
108300
- await writeJson(path, topology, { spaces: 2 });
108360
+ versionOverrideId: devArmTag,
108361
+ siteId
108362
+ }
108363
+ )) : /* @__PURE__ */ import_react25.default.createElement(Spinner, { text: "Preparing your dashboard..." }))));
108364
+ };
108365
+
108366
+ // ../cli-astro-commands/src/components/DevCommand/app-flow/AppDev.tsx
108367
+ var AppDev = ({
108368
+ serverLocalUrl,
108369
+ serverExposedUrl,
108370
+ devMetadata
108371
+ }) => {
108372
+ const [screen, setScreen] = (0, import_react26.useState)(ScreenState.Home());
108373
+ const { tunnelRequired, devArmTag } = useDevCenterUpdater({
108374
+ serverLocalUrl,
108375
+ serverExposedUrl,
108376
+ devMetadata
108301
108377
  });
108302
- }
108303
- async function readDeploymentTopology(projectFolder) {
108304
- const path = getDeploymentTopologyPath(projectFolder);
108305
- if (await pathExists(path)) {
108306
- try {
108307
- const deployment = await readJson(path);
108308
- return deploymentTopologySchema.parse(deployment);
108309
- } catch {
108378
+ return /* @__PURE__ */ import_react26.default.createElement(TunnelingConsent, { required: tunnelRequired }, (0, import_variant16.match)(screen, {
108379
+ Home: () => /* @__PURE__ */ import_react26.default.createElement(HomeScreen, { onScreenChange: setScreen, devArmTag }),
108380
+ SiteSelector: () => /* @__PURE__ */ import_react26.default.createElement(SiteSelectorScreen, { onScreenChange: setScreen })
108381
+ }));
108382
+ };
108383
+
108384
+ // ../cli-astro-commands/src/components/DevCommand/AppDevFlow.tsx
108385
+ var AppDevFlow = ({
108386
+ devMetadataStatus,
108387
+ serverExposedUrl
108388
+ }) => {
108389
+ return (0, import_variant17.match)(devMetadataStatus, {
108390
+ NotRequested: () => /* @__PURE__ */ import_react27.default.createElement(Spinner, { text: "Starting dev environment..." }),
108391
+ Error: () => null,
108392
+ Loading: () => /* @__PURE__ */ import_react27.default.createElement(Spinner, { text: "Checking dev environment settings..." }),
108393
+ Success: ({ result: { devMetadata, serverLocalUrl } }) => {
108394
+ return /* @__PURE__ */ import_react27.default.createElement(DevScreenBorder, null, /* @__PURE__ */ import_react27.default.createElement(
108395
+ AppDev,
108396
+ {
108397
+ serverLocalUrl,
108398
+ serverExposedUrl,
108399
+ devMetadata
108400
+ }
108401
+ ));
108310
108402
  }
108311
- }
108312
- return {};
108313
- }
108403
+ });
108404
+ };
108314
108405
 
108406
+ // ../cli-astro-commands/src/components/DevCommand/DevCommand.tsx
108407
+ var DevCommand = ({
108408
+ port,
108409
+ allowedHosts,
108410
+ serverExposedUrl
108411
+ }) => {
108412
+ const {
108413
+ model: { config, projectFolder }
108414
+ } = useProjectModel();
108415
+ const exit = useExit();
108416
+ const logger = useAstroLogger({ isPrefixed: false });
108417
+ const astroProcess = (0, import_react28.useRef)();
108418
+ const fetchDevMetadataAction = useFetchDevMetadata();
108419
+ useAsync(async () => {
108420
+ const repoType = await getRepoType(projectFolder);
108421
+ const packageManager = await createPackageManager(repoType);
108422
+ const astro = runAstroDev({
108423
+ packageManager,
108424
+ projectFolder,
108425
+ port,
108426
+ allowedHosts
108427
+ });
108428
+ astroProcess.current = astro;
108429
+ astro.stdout?.once(EVENT_SERVER_ADDRESS, (address) => {
108430
+ void fetchDevMetadataAction.execute(address);
108431
+ });
108432
+ astro.stdout?.on(EVENT_LINE, (line) => logger.log(line));
108433
+ astro.stderr?.on(EVENT_LINE, (line) => logger.log(line));
108434
+ void astro.on("exit", () => {
108435
+ astroProcess.current?.stdout?.destroy();
108436
+ astroProcess.current?.stderr?.destroy();
108437
+ astroProcess.current?.stdin?.end();
108438
+ astroProcess.current = void 0;
108439
+ exit(
108440
+ new CliError({
108441
+ cause: void 0,
108442
+ code: CliErrorCode.DevCommandFailed()
108443
+ })
108444
+ );
108445
+ });
108446
+ }, []);
108447
+ (0, import_react28.useEffect)(() => {
108448
+ return () => {
108449
+ if (astroProcess.current?.pid) {
108450
+ try {
108451
+ astroProcess.current.kill("SIGTERM");
108452
+ } catch {
108453
+ }
108454
+ }
108455
+ };
108456
+ }, []);
108457
+ return /* @__PURE__ */ import_react28.default.createElement(SiteProvider, null, config.projectType === "Site" ? /* @__PURE__ */ import_react28.default.createElement(
108458
+ SiteDevFlow,
108459
+ {
108460
+ devMetadataStatus: fetchDevMetadataAction.status,
108461
+ serverExposedUrl
108462
+ }
108463
+ ) : /* @__PURE__ */ import_react28.default.createElement(
108464
+ AppDevFlow,
108465
+ {
108466
+ devMetadataStatus: fetchDevMetadataAction.status,
108467
+ serverExposedUrl
108468
+ }
108469
+ ));
108470
+ };
108315
108471
  export {
108316
- useARMClient,
108317
- readAppConfig,
108318
- saveAppConfig,
108319
- SiteSelector,
108320
- SiteProvider,
108321
- createRedirectLink,
108322
- RedirectLink,
108323
- useUpdateDeploymentTopology,
108324
- useSite
108472
+ DevCommand
108325
108473
  };
108326
108474
  /*! Bundled license information:
108327
108475
 
@@ -108377,4 +108525,4 @@ export {
108377
108525
  *)
108378
108526
  *)
108379
108527
  */
108380
- //# sourceMappingURL=chunk-A4TMXK2F.js.map
108528
+ //# sourceMappingURL=DevCommand-CPE5YZ3A.js.map