@makaio/framework 1.0.0-dev-1783940945655 → 1.0.0-dev-1783975608971

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 (142) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/{account-identity-BYfeWLe-.mjs → account-identity-CP4DC0DL.mjs} +1 -1
  3. package/dist/{adapter-nl_xz9dz.mjs → adapter-B9vVBwli.mjs} +1 -1
  4. package/dist/adapter-subsystem/index.d.mts +10 -0
  5. package/dist/adapter-subsystem/index.mjs +1 -1
  6. package/dist/adapters/node.mjs +1 -1
  7. package/dist/authority-state-bootstrap-CEuKScnL.mjs +1 -0
  8. package/dist/bus/index.d.mts +31 -31
  9. package/dist/bus/index.mjs +1 -1
  10. package/dist/{canonical-model-CVRCW9h7.mjs → canonical-model-C31NaBJs.mjs} +1 -1
  11. package/dist/{client-BkpLM8Fx.mjs → client-CzPCSeyE.mjs} +1 -1
  12. package/dist/clients/index.d.mts +5 -5
  13. package/dist/contracts/adapter/index.d.mts +1 -1
  14. package/dist/contracts/adapter/index.mjs +1 -1
  15. package/dist/contracts/canonical-model/index.d.mts +1 -1
  16. package/dist/contracts/canonical-model/index.mjs +1 -1
  17. package/dist/contracts/client/index.d.mts +1 -1
  18. package/dist/contracts/client/index.mjs +1 -1
  19. package/dist/contracts/extension/index.d.mts +2 -2
  20. package/dist/contracts/extension/index.mjs +1 -1
  21. package/dist/contracts/facet/index.d.mts +1 -1
  22. package/dist/contracts/harness/index.d.mts +1 -1
  23. package/dist/contracts/index.d.mts +221 -153
  24. package/dist/contracts/index.mjs +1 -1
  25. package/dist/contracts/materialization/index.d.mts +1 -1
  26. package/dist/contracts/native-session-supervisor/index.d.mts +2 -2
  27. package/dist/contracts/native-session-supervisor/index.mjs +1 -1
  28. package/dist/contracts/session/index.d.mts +3 -3
  29. package/dist/contracts/session/index.mjs +1 -1
  30. package/dist/contracts/shared/index.d.mts +1 -1
  31. package/dist/contracts/variant/index.d.mts +1 -1
  32. package/dist/contracts/workflow/index.d.mts +3 -3
  33. package/dist/contracts/workflow/index.mjs +1 -1
  34. package/dist/{detached-extension-handle-CTaQoolf.mjs → detached-extension-handle-vDK194QV.mjs} +1 -1
  35. package/dist/drizzle/0026_m_mrgvi7fq.sql +16 -0
  36. package/dist/drizzle/0027_m_mrgw0uzg.sql +1 -0
  37. package/dist/drizzle/0028_m_mrgx04i1.sql +1 -0
  38. package/dist/drizzle/0029_terminal-authority.sql +1 -0
  39. package/dist/drizzle/meta/_journal.json +28 -0
  40. package/dist/{extension-D4iKUUMG.mjs → extension-Cgg45Xk1.mjs} +1 -1
  41. package/dist/git/index.mjs +8 -8
  42. package/dist/{index-D5IEq4_E.d.mts → index-BH145jWk.d.mts} +9 -7
  43. package/dist/{index-BcejR1Jc.d.mts → index-BORQLrT7.d.mts} +1 -1
  44. package/dist/{index-CB2XTzvd.d.mts → index-Bbr5LEUc.d.mts} +1 -1
  45. package/dist/{index-5s_dN3cg2.d.mts → index-BmsPH78f2.d.mts} +33 -5
  46. package/dist/{index-BtL7ONuM.d.mts → index-C6LZOiDv.d.mts} +149 -1
  47. package/dist/{index-DlUPWOh4.d.mts → index-CCX4veeR.d.mts} +2859 -692
  48. package/dist/{index-DxatNFz7.d.mts → index-CMTNBuo6.d.mts} +16 -16
  49. package/dist/{index-CVs0Qxks.d.mts → index-CSxfU0tB.d.mts} +4 -4
  50. package/dist/{index-Cw3cjGAT.d.mts → index-ChSwb11f.d.mts} +7 -7
  51. package/dist/{index-Lp0T_V1W.d.mts → index-CidZvQ-c.d.mts} +3 -3
  52. package/dist/{index-p6dWV52m.d.mts → index-Cq6rXKae.d.mts} +379 -379
  53. package/dist/{index-DNc1yLQs.d.mts → index-DHGW7dFf.d.mts} +8 -8
  54. package/dist/{index-C9Q1E8Y-.d.mts → index-DMQlLz2W.d.mts} +34 -34
  55. package/dist/{index-iJP-l15K.d.mts → index-DXBiCH2y.d.mts} +27 -1
  56. package/dist/{index-CW6-0k3Z.d.mts → index-DlAfs3RD.d.mts} +105 -105
  57. package/dist/{index-sCOlgPyj.d.mts → index-DpZbaS7y.d.mts} +388 -388
  58. package/dist/{index-Do7Wgio_2.d.mts → index-MTvmxwiu2.d.mts} +1 -1
  59. package/dist/{index-BsEvzFey.d.mts → index-kqxUXYe7.d.mts} +6 -6
  60. package/dist/kernel/extension/index.d.mts +1 -1
  61. package/dist/kernel/index.d.mts +2 -2
  62. package/dist/kernel/observability/index.d.mts +1 -1
  63. package/dist/{lib-DymjnkAP.mjs → lib-DktBDEoY.mjs} +1 -1
  64. package/dist/{load-extensions-BtUrq2_t.mjs → load-extensions-nqL5WAKj.mjs} +1 -1
  65. package/dist/mcp-http-server/index.d.mts +27 -90
  66. package/dist/mcp-http-server/index.mjs +1 -1
  67. package/dist/{namespace-CfgtqUWS.d.mts → namespace-BoA6u44C.d.mts} +156 -156
  68. package/dist/{namespace-D3SQQgxa2.d.mts → namespace-CukqFYHf2.d.mts} +1 -1
  69. package/dist/{namespace-CQBSXm1U.d.mts → namespace-TLkZRkcU.d.mts} +20 -20
  70. package/dist/{namespace-CpyL93kW.d.mts → namespace-dgNmx9g3.d.mts} +27 -27
  71. package/dist/{namespace-CGgOLxiW2.d.mts → namespace-rO-C2Dgu2.d.mts} +2 -2
  72. package/dist/{native-session-supervisor-CdtVGWA9.mjs → native-session-supervisor-Bgz-Q1WH.mjs} +1 -1
  73. package/dist/package-BYpWkSuQ.mjs +1 -0
  74. package/dist/package-CsFFT9iR.mjs +7 -0
  75. package/dist/{package-CdBiknf3.d.mts → package-DG9GSY8M.d.mts} +52 -1
  76. package/dist/package.json +1 -1
  77. package/dist/{profile-D2m94ZYD.mjs → profile-BRi6K6am.mjs} +1 -1
  78. package/dist/rules/index.mjs +1 -1
  79. package/dist/runtime-node/extension-validation.mjs +1 -1
  80. package/dist/runtime-node/index.d.mts +4 -89
  81. package/dist/runtime-node/index.mjs +24 -24
  82. package/dist/runtime-node/makaio-config.mjs +1 -1
  83. package/dist/runtime-node/workflow-worker/index.d.mts +2 -2
  84. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  85. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
  86. package/dist/{schema-BnTOFCdU.d.mts → schema-CxN7d_MU.d.mts} +1 -1
  87. package/dist/{schemas--uwN5dfK2.d.mts → schemas-CIO03KSD2.d.mts} +11 -11
  88. package/dist/{schemas-n9Ff6_RX.mjs → schemas-DyJHJ8Pm.mjs} +1 -1
  89. package/dist/{schemas-C17AifUQ.d.mts → schemas-OaBqeEUT.d.mts} +156 -156
  90. package/dist/schemas-th_nuC5t.mjs +1 -0
  91. package/dist/semver-D3Y7uMEb.mjs +1 -0
  92. package/dist/service-base/index.d.mts +4 -3
  93. package/dist/service-base/index.mjs +1 -1
  94. package/dist/services/agent-runtime/index.d.mts +2 -2
  95. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  96. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  97. package/dist/services/execution-target/index.d.mts +1 -1
  98. package/dist/services/filesystem/namespace.d.mts +6 -6
  99. package/dist/services/filesystem/schemas.d.mts +3 -3
  100. package/dist/services/harness/index.d.mts +3 -3
  101. package/dist/services/index.d.mts +100 -100
  102. package/dist/services/index.mjs +1 -1
  103. package/dist/services/session/index.d.mts +5 -5
  104. package/dist/services/session/messages/namespace.d.mts +1 -1
  105. package/dist/services/session/session-events/namespace.d.mts +1 -1
  106. package/dist/services/session/storage/namespace.d.mts +1 -1
  107. package/dist/services/session/storage/schema.d.mts +1 -1
  108. package/dist/services/settings/namespace.d.mts +8 -8
  109. package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
  110. package/dist/services/subagent/index.d.mts +2 -2
  111. package/dist/services/subagent/index.mjs +1 -1
  112. package/dist/services/subagent-template/index.d.mts +2 -2
  113. package/dist/services/subagent-template/namespace.d.mts +1 -1
  114. package/dist/services/subagent-template/schemas.d.mts +1 -1
  115. package/dist/services/tools/index.mjs +1 -1
  116. package/dist/{session-lRd8HZNZ.mjs → session-BxWogVkD.mjs} +1 -1
  117. package/dist/storage/drizzle/index.d.mts +8 -1
  118. package/dist/storage/drizzle/index.mjs +1 -1
  119. package/dist/tools/index.d.mts +1 -1
  120. package/dist/{tools-C8vqn1KY.mjs → tools-PC_L6g2m.mjs} +1 -1
  121. package/dist/{transition-Bfe8VVc1.d.mts → transition-CwUIm1hJ.d.mts} +8 -0
  122. package/dist/{types-q95p55BF.d.mts → types-DQsYUZwa.d.mts} +578 -267
  123. package/dist/ui-components/index.d.mts +4 -4
  124. package/dist/{version-C1-VD-XL.mjs → version-BbWrAPld.mjs} +1 -1
  125. package/dist/workflow-DFJYGjq_.mjs +1 -0
  126. package/dist/workflow-engine/index.d.mts +670 -67
  127. package/dist/workflow-engine/index.mjs +1 -1
  128. package/dist/workflow-engine/package.d.mts +1 -1
  129. package/dist/workflow-engine/package.mjs +1 -1
  130. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  131. package/dist/workflow-worker-BEFjCccX.mjs +1 -0
  132. package/package.json +10 -9
  133. package/dist/loop-gate-handlers-0a3dIY8O.mjs +0 -1
  134. package/dist/package-0gVhAVkO.mjs +0 -7
  135. package/dist/package-BwvGaKwn.mjs +0 -1
  136. package/dist/schemas-D6lj9NMg.mjs +0 -1
  137. package/dist/semver-BccS1s9R.mjs +0 -1
  138. package/dist/workflow-CvVAZ89A.mjs +0 -1
  139. package/dist/workflow-worker-CudfEstp.mjs +0 -1
  140. /package/dist/{await-trigger-D623tvig.mjs → await-trigger-DP-fTQc4.mjs} +0 -0
  141. /package/dist/{descriptor-to-package-D5SWf6TL.mjs → descriptor-to-package-Rs-OjOQU.mjs} +0 -0
  142. /package/dist/{esm-oHhRYTEn.mjs → esm-C_WW4-pP.mjs} +0 -0
@@ -2071,7 +2071,7 @@ declare const sessionStorageSchema: _$_makaio_storage_drizzle0.DialectSchema<{
2071
2071
  tableName: "sessions";
2072
2072
  dataType: "string";
2073
2073
  columnType: "SQLiteText";
2074
- data: "fork" | "branch" | "subagent" | "compress" | "rewrite" | "coordinator" | "aside";
2074
+ data: "fork" | "subagent" | "compress" | "branch" | "rewrite" | "coordinator" | "aside";
2075
2075
  driverParam: string;
2076
2076
  notNull: false;
2077
2077
  hasDefault: false;
@@ -168,9 +168,9 @@ type ContainerRuntime = z.infer<typeof ContainerRuntimeSchema>;
168
168
  * Container state.
169
169
  */
170
170
  declare const ContainerStateSchema: z.ZodEnum<{
171
+ created: "created";
171
172
  running: "running";
172
173
  stopped: "stopped";
173
- created: "created";
174
174
  destroyed: "destroyed";
175
175
  }>;
176
176
  type ContainerState = z.infer<typeof ContainerStateSchema>;
@@ -381,9 +381,9 @@ type StatusRequest = z.infer<typeof StatusRequestSchema>;
381
381
  */
382
382
  declare const StatusResponseSchema: z.ZodObject<{
383
383
  state: z.ZodEnum<{
384
+ created: "created";
384
385
  running: "running";
385
386
  stopped: "stopped";
386
- created: "created";
387
387
  destroyed: "destroyed";
388
388
  }>;
389
389
  sessionId: z.ZodString;
@@ -587,9 +587,9 @@ declare const DockerNamespace: _$_makaio_core0.BusNamespaceDefinition<"docker",
587
587
  }, z.core.$strip>;
588
588
  response: z.ZodObject<{
589
589
  state: z.ZodEnum<{
590
+ created: "created";
590
591
  running: "running";
591
592
  stopped: "stopped";
592
- created: "created";
593
593
  destroyed: "destroyed";
594
594
  }>;
595
595
  sessionId: z.ZodString;
@@ -774,9 +774,9 @@ declare const DockerSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
774
774
  }, z.core.$strip>;
775
775
  response: z.ZodObject<{
776
776
  state: z.ZodEnum<{
777
+ created: "created";
777
778
  running: "running";
778
779
  stopped: "stopped";
779
- created: "created";
780
780
  destroyed: "destroyed";
781
781
  }>;
782
782
  sessionId: z.ZodString;
@@ -959,9 +959,9 @@ declare const ContainerSpawnNamespace: _$_makaio_core0.BusNamespaceDefinition<"d
959
959
  }, _$zod_v4_core0.$strip>;
960
960
  response: _$zod.ZodObject<{
961
961
  state: _$zod.ZodEnum<{
962
+ created: "created";
962
963
  running: "running";
963
964
  stopped: "stopped";
964
- created: "created";
965
965
  destroyed: "destroyed";
966
966
  }>;
967
967
  sessionId: _$zod.ZodString;
@@ -1142,9 +1142,9 @@ declare const ContainerSpawnSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core
1142
1142
  }, _$zod_v4_core0.$strip>;
1143
1143
  response: _$zod.ZodObject<{
1144
1144
  state: _$zod.ZodEnum<{
1145
+ created: "created";
1145
1146
  running: "running";
1146
1147
  stopped: "stopped";
1147
- created: "created";
1148
1148
  destroyed: "destroyed";
1149
1149
  }>;
1150
1150
  sessionId: _$zod.ZodString;
@@ -1,2 +1,2 @@
1
- import { a as ExtensionCoordinatorOptions, c as KernelMakaioExtension, i as ContributionProcessor, l as RuntimeCapability, n as filterEligibleExtensions, o as ExtensionRuntimeSurface, r as ExtensionCoordinator, s as KernelExtensionContext, t as coalesceExtensionOverrides, u as RuntimeEnvironment } from "../../index-BcejR1Jc.mjs";
1
+ import { a as ExtensionCoordinatorOptions, c as KernelMakaioExtension, i as ContributionProcessor, l as RuntimeCapability, n as filterEligibleExtensions, o as ExtensionRuntimeSurface, r as ExtensionCoordinator, s as KernelExtensionContext, t as coalesceExtensionOverrides, u as RuntimeEnvironment } from "../../index-BORQLrT7.mjs";
2
2
  export { ContributionProcessor, ExtensionCoordinator, ExtensionCoordinatorOptions, ExtensionRuntimeSurface, KernelExtensionContext, KernelMakaioExtension, RuntimeCapability, RuntimeEnvironment, coalesceExtensionOverrides, filterEligibleExtensions };
@@ -1,5 +1,5 @@
1
- import { c as ExtensionInfo, f as ServiceInfo, i as ComponentInfo, l as ExtensionInfoSchema, n as ExtensionSubjects, o as ComponentState, p as ServiceInfoSchema, s as ComponentStateSchema, t as ExtensionNamespace } from "../index-DxatNFz7.mjs";
2
- import { c as KernelMakaioExtension, i as ContributionProcessor, l as RuntimeCapability, n as filterEligibleExtensions, o as ExtensionRuntimeSurface, r as ExtensionCoordinator, s as KernelExtensionContext, t as coalesceExtensionOverrides, u as RuntimeEnvironment } from "../index-BcejR1Jc.mjs";
1
+ import { c as ExtensionInfo, f as ServiceInfo, i as ComponentInfo, l as ExtensionInfoSchema, n as ExtensionSubjects, o as ComponentState, p as ServiceInfoSchema, s as ComponentStateSchema, t as ExtensionNamespace } from "../index-CMTNBuo6.mjs";
2
+ import { c as KernelMakaioExtension, i as ContributionProcessor, l as RuntimeCapability, n as filterEligibleExtensions, o as ExtensionRuntimeSurface, r as ExtensionCoordinator, s as KernelExtensionContext, t as coalesceExtensionOverrides, u as RuntimeEnvironment } from "../index-BORQLrT7.mjs";
3
3
  import { i as WindowStyle, n as WindowRegistration, r as WindowRegistry, t as STYLE_DEFAULTS } from "../window-registry-WsWu-rcK.mjs";
4
4
  import { a as KernelSchemas, i as setWorkflowTriggerTypeRegistry, n as KernelSubjects, r as getWorkflowTriggerTypeRegistry, t as KernelNamespace } from "../index-FDyqQIt5.mjs";
5
5
  import { a as MachineIdentity, c as StorageProvider, i as IdentityProvider, n as NoTransportProvider, o as TransportProvider, r as MemoryStorageProvider, s as StorageCleanup, t as EphemeralIdentityProvider } from "../index-DoLdETfR.mjs";
@@ -1,2 +1,2 @@
1
- import { a as ComponentInfoSchema, c as ExtensionInfo, d as ExtensionWarningEntrySchema, f as ServiceInfo, i as ComponentInfo, l as ExtensionInfoSchema, n as ExtensionSubjects, o as ComponentState, p as ServiceInfoSchema, r as ComponentIdentitySchema, s as ComponentStateSchema, t as ExtensionNamespace, u as ExtensionWarningEntry } from "../../index-DxatNFz7.mjs";
1
+ import { a as ComponentInfoSchema, c as ExtensionInfo, d as ExtensionWarningEntrySchema, f as ServiceInfo, i as ComponentInfo, l as ExtensionInfoSchema, n as ExtensionSubjects, o as ComponentState, p as ServiceInfoSchema, r as ComponentIdentitySchema, s as ComponentStateSchema, t as ExtensionNamespace, u as ExtensionWarningEntry } from "../../index-CMTNBuo6.mjs";
2
2
  export { ComponentIdentitySchema, ComponentInfo, ComponentInfoSchema, ComponentState, ComponentStateSchema, ExtensionInfo, ExtensionInfoSchema, ExtensionNamespace, ExtensionSubjects, ExtensionWarningEntry, ExtensionWarningEntrySchema, ServiceInfo, ServiceInfoSchema };
@@ -1,2 +1,2 @@
1
- import{a as e,i as t,t as n}from"./chunk-DTipWd-i.mjs";import{a as r,i,n as a,o,r as s,s as c,t as l}from"./lib-DIVnpS8e.mjs";import{n as u,r as d,t as f}from"./lib-ClRTNIuz.mjs";var p=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BaseCommand=void 0;let t=o();e.BaseCommand=class extends t.Command{constructor(){super(...arguments),this.cwd=t.Option.String(`--cwd`,{hidden:!0})}validateAndExecute(){if(this.cwd!==void 0)throw new t.UsageError(`The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path`);return super.validateAndExecute()}}})),m=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WorkspaceRequiredError=void 0;let t=l(),n=f(),r=o();e.WorkspaceRequiredError=class extends r.UsageError{constructor(e,r){let i=n.ppath.relative(e,r),a=n.ppath.join(e,t.Manifest.fileName);super(`This command can only be run from within a workspace of your project (${i} isn't a workspace of ${a}).`)}}})),h=n(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),g=n(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),_=n(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=h(),a=g();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},_=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};_(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),_(`NUMERICIDENTIFIERLOOSE`,`\\d+`),_(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),_(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),_(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),_(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),_(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),_(`BUILDIDENTIFIER`,`${f}+`),_(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),_(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),_(`FULL`,`^${c[u.FULLPLAIN]}$`),_(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),_(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),_(`GTLT`,`((?:<|>)?=?)`),_(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),_(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),_(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),_(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),_(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),_(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),_(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),_(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),_(`COERCERTL`,c[u.COERCE],!0),_(`COERCERTLFULL`,c[u.COERCEFULL],!0),_(`LONETILDE`,`(?:~>?)`),_(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,_(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),_(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),_(`LONECARET`,`(?:\\^)`),_(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,_(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),_(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),_(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),_(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),_(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,_(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),_(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),_(`STAR`,`(<|>)?=?\\s*\\*`),_(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),_(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),v=n(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),y=n(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),b=n(((e,t)=>{let n=g(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=h(),{safeRe:a,t:o}=_(),s=v(),{compareIdentifiers:c}=y();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),x=n(((e,t)=>{let n=b();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),S=n(((e,t)=>{let n=x();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),C=n(((e,t)=>{let n=x();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),w=n(((e,t)=>{let n=b();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),T=n(((e,t)=>{let n=x();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),E=n(((e,t)=>{let n=b();t.exports=(e,t)=>new n(e,t).major})),D=n(((e,t)=>{let n=b();t.exports=(e,t)=>new n(e,t).minor})),O=n(((e,t)=>{let n=b();t.exports=(e,t)=>new n(e,t).patch})),k=n(((e,t)=>{let n=x();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),A=n(((e,t)=>{let n=b();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),j=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(t,e,r)})),M=n(((e,t)=>{let n=A();t.exports=(e,t)=>n(e,t,!0)})),N=n(((e,t)=>{let n=b();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),P=n(((e,t)=>{let n=N();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),F=n(((e,t)=>{let n=N();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),I=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(e,t,r)>0})),L=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(e,t,r)<0})),R=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(e,t,r)===0})),z=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(e,t,r)!==0})),B=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(e,t,r)>=0})),V=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(e,t,r)<=0})),H=n(((e,t)=>{let n=R(),r=z(),i=I(),a=B(),o=L(),s=V();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),U=n(((e,t)=>{let n=b(),r=x(),{safeRe:i,t:a}=_();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),W=n(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),G=n(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!y(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&x(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,N(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let h=e.split(` `).map(e=>C(e,this.options)).join(` `).split(/\s+/).map(e=>M(e,this.options));i&&(h=h.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,h);let g=new Map,_=h.map(e=>new a(e,this.options));for(let e of _){if(y(e))return[e];g.set(e.value,e)}g.size>1&&g.has(``)&&g.delete(``);let v=[...g.values()];return r.set(t,v),v}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>S(e,n)&&t.set.some(t=>S(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}};let r=new(W()),i=v(),a=K(),o=g(),s=b(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=_(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=h(),y=e=>e.value===`<0.0.0-0`,x=e=>e.value===``,S=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},C=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=D(e,t),o(`caret`,e),e=T(e,t),o(`tildes`,e),e=k(e,t),o(`xrange`,e),e=j(e,t),o(`stars`,e),e),w=e=>!e||e.toLowerCase()===`x`||e===`*`,T=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(` `),E=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return w(n)?s=``:w(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:w(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},D=(e,t)=>e.trim().split(/\s+/).map(e=>O(e,t)).join(` `),O=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return w(n)?c=``:w(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:w(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},k=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>A(e,t)).join(` `)),A=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=w(i),u=l||w(a),d=u||w(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},j=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),M=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),N=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=w(r)?``:w(i)?`>=${r}.0.0${e?`-0`:``}`:w(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=w(l)?``:w(u)?`<${+l+1}.0.0-0`:w(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),K=n(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=v(),{safeRe:i,t:a}=_(),o=H(),s=g(),c=b(),l=G()})),q=n(((e,t)=>{let n=G();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),J=n(((e,t)=>{let n=G();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),ee=n(((e,t)=>{let n=b(),r=G();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),te=n(((e,t)=>{let n=b(),r=G();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),ne=n(((e,t)=>{let n=b(),r=G(),i=I();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),re=n(((e,t)=>{let n=G();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),Y=n(((e,t)=>{let n=b(),r=K(),{ANY:i}=r,a=G(),o=q(),s=I(),c=L(),l=V(),u=B();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),ie=n(((e,t)=>{let n=Y();t.exports=(e,t,r)=>n(e,t,`>`,r)})),ae=n(((e,t)=>{let n=Y();t.exports=(e,t,r)=>n(e,t,`<`,r)})),oe=n(((e,t)=>{let n=G();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),se=n(((e,t)=>{let n=q(),r=A();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),ce=n(((e,t)=>{let n=G(),r=K(),{ANY:i}=r,a=q(),o=A(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),le=n(((e,t)=>{let n=_(),r=h(),i=b(),a=y();t.exports={parse:x(),valid:S(),clean:C(),inc:w(),diff:T(),major:E(),minor:D(),patch:O(),prerelease:k(),compare:A(),rcompare:j(),compareLoose:M(),compareBuild:N(),sort:P(),rsort:F(),gt:I(),lt:L(),eq:R(),neq:z(),gte:B(),lte:V(),cmp:H(),coerce:U(),Comparator:K(),Range:G(),satisfies:q(),toComparators:J(),maxSatisfying:ee(),minSatisfying:te(),minVersion:ne(),validRange:re(),outside:Y(),gtr:ie(),ltr:ae(),intersects:oe(),simplifyRange:se(),subset:ce(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}})),X=n((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.getDynamicLibs=void 0;let n=(u(),e(d)),i=n.__importStar($()),p=n.__importStar(l()),m=n.__importStar(f()),h=n.__importStar(s()),g=n.__importStar(r()),_=n.__importStar(a()),v=n.__importStar(o()),y=n.__importStar(le()),b=n.__importStar(c());t.getDynamicLibs=()=>new Map([[`@yarnpkg/cli`,i],[`@yarnpkg/core`,p],[`@yarnpkg/fslib`,m],[`@yarnpkg/libzip`,h],[`@yarnpkg/parsers`,g],[`@yarnpkg/shell`,_],[`clipanion`,v],[`semver`,y],[`typanion`,b]])})),ue=n(((e,t)=>{t.exports={name:`@yarnpkg/cli`,version:`4.16.0`,license:`BSD-2-Clause`,main:`./lib/index.js`,exports:{".":`./lib/index.js`,"./package.json":`./package.json`},dependencies:{"@yarnpkg/core":`^4.8.0`,"@yarnpkg/fslib":`^3.1.5`,"@yarnpkg/libzip":`^3.2.2`,"@yarnpkg/parsers":`^3.0.3`,"@yarnpkg/plugin-catalog":`^1.0.2`,"@yarnpkg/plugin-compat":`^4.0.12`,"@yarnpkg/plugin-constraints":`^4.0.5`,"@yarnpkg/plugin-dlx":`^4.0.2`,"@yarnpkg/plugin-essentials":`^4.6.0`,"@yarnpkg/plugin-exec":`^3.1.0`,"@yarnpkg/plugin-file":`^3.0.2`,"@yarnpkg/plugin-git":`^3.2.0`,"@yarnpkg/plugin-github":`^3.0.2`,"@yarnpkg/plugin-http":`^3.0.3`,"@yarnpkg/plugin-init":`^4.1.2`,"@yarnpkg/plugin-interactive-tools":`^4.1.0`,"@yarnpkg/plugin-jsr":`^1.1.1`,"@yarnpkg/plugin-link":`^3.0.2`,"@yarnpkg/plugin-nm":`^4.0.9`,"@yarnpkg/plugin-npm":`^3.6.0`,"@yarnpkg/plugin-npm-cli":`^4.5.0`,"@yarnpkg/plugin-pack":`^4.0.4`,"@yarnpkg/plugin-patch":`^4.0.4`,"@yarnpkg/plugin-pnp":`^4.1.7`,"@yarnpkg/plugin-pnpm":`^2.2.0`,"@yarnpkg/plugin-stage":`^4.0.2`,"@yarnpkg/plugin-typescript":`^4.1.3`,"@yarnpkg/plugin-version":`^4.2.0`,"@yarnpkg/plugin-workspace-tools":`^4.1.7`,"@yarnpkg/shell":`^4.1.3`,"ci-info":`^4.0.0`,clipanion:`^4.0.0-rc.2`,semver:`^7.1.2`,tslib:`^2.4.0`,typanion:`^3.14.0`},devDependencies:{"@types/semver":`^7.1.0`,"@yarnpkg/builder":`^4.2.3`,"@yarnpkg/monorepo":`^0.0.0`,"@yarnpkg/pnpify":`^4.1.6`},peerDependencies:{"@yarnpkg/core":`^4.8.0`},scripts:{postpack:`rm -rf lib`,prepack:`run build:compile "$(pwd)"`,"build:cli+hook":`run build:pnp:hook && builder build bundle`,"build:cli":`builder build bundle`,"run:cli":`builder run`,"update-local":`run build:cli --no-git-hash && rsync -a --delete bundles/ bin/`},publishConfig:{main:`./lib/index.js`,bin:null,exports:{".":`./lib/index.js`,"./package.json":`./package.json`}},files:[`/lib/**/*`,`!/lib/pluginConfiguration.*`,`!/lib/cli.*`],"@yarnpkg/builder":{bundles:{standard:[`@yarnpkg/plugin-essentials`,`@yarnpkg/plugin-catalog`,`@yarnpkg/plugin-compat`,`@yarnpkg/plugin-constraints`,`@yarnpkg/plugin-dlx`,`@yarnpkg/plugin-exec`,`@yarnpkg/plugin-file`,`@yarnpkg/plugin-git`,`@yarnpkg/plugin-github`,`@yarnpkg/plugin-http`,`@yarnpkg/plugin-init`,`@yarnpkg/plugin-interactive-tools`,`@yarnpkg/plugin-jsr`,`@yarnpkg/plugin-link`,`@yarnpkg/plugin-nm`,`@yarnpkg/plugin-npm`,`@yarnpkg/plugin-npm-cli`,`@yarnpkg/plugin-pack`,`@yarnpkg/plugin-patch`,`@yarnpkg/plugin-pnp`,`@yarnpkg/plugin-pnpm`,`@yarnpkg/plugin-stage`,`@yarnpkg/plugin-typescript`,`@yarnpkg/plugin-version`,`@yarnpkg/plugin-workspace-tools`]}},repository:{type:`git`,url:`git+https://github.com/yarnpkg/berry.git`,directory:`packages/yarnpkg-cli`},engines:{node:`>=18.12.0`}}})),Z=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getPluginConfiguration=a;let r=(u(),e(d)).__importDefault(ue()),i=X();function a(){let e=new Set;for(let t of r.default[`@yarnpkg/builder`].bundles.standard)e.add(t);let n=(0,i.getDynamicLibs)();for(let r of e)n.set(r,t(r).default);return{plugins:e,modules:n}}})),de=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.openWorkspace=r;let t=l(),n=m();async function r(e,r){let{project:i,workspace:a}=await t.Project.find(e,r);if(!a)throw new n.WorkspaceRequiredError(i.cwd,r);return a}})),Q=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.pluginCommands=void 0,e.pluginCommands=new Map([])})),fe=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getCli=x,e.runExit=S;let n=l(),r=f(),a=t(`child_process`),s=i(),c=o(),u=Q(),d=Z();function p({cwd:e,pluginConfiguration:t}){let r=new c.Cli({binaryLabel:`Yarn Package Manager`,binaryName:`yarn`,binaryVersion:n.YarnVersion??`<unknown>`});return Object.assign(r,{defaultContext:{...c.Cli.defaultContext,cwd:e,plugins:t,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr}})}function m(e){if(n.miscUtils.parseOptionalBoolean(process.env.YARN_IGNORE_NODE))return!0;let t=process.versions.node,r=`>=18.12.0`;if(n.semverUtils.satisfiesWithPrereleases(t,r))return!0;let i=new c.UsageError(`This tool requires a Node version compatible with ${r} (got ${t}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);return c.Cli.defaultContext.stdout.write(e.error(i)),!1}async function h({selfPath:e,pluginConfiguration:t}){return await n.Configuration.find(r.npath.toPortablePath(process.cwd()),t,{strict:!1,usePathCheck:e})}function g(e,t,{yarnPath:n}){if(!r.xfs.existsSync(n))return e.error(Error(`The "yarn-path" option has been set, but the specified location doesn't exist (${n}).`)),1;process.on(`SIGINT`,()=>{});let i={stdio:`inherit`,env:{...process.env,YARN_IGNORE_PATH:`1`}};try{(0,a.execFileSync)(process.execPath,[r.npath.fromPortablePath(n),...t],i)}catch(e){return e.status??1}return 0}function _(e,t){let n=null,i=t;return t.length>=2&&t[0]===`--cwd`?(n=r.npath.toPortablePath(t[1]),i=t.slice(2)):t.length>=1&&t[0].startsWith(`--cwd=`)?(n=r.npath.toPortablePath(t[0].slice(6)),i=t.slice(1)):t[0]===`add`&&t[t.length-2]===`--cwd`&&(n=r.npath.toPortablePath(t[t.length-1]),i=t.slice(0,t.length-2)),e.defaultContext.cwd=n===null?r.ppath.cwd():r.ppath.resolve(n),i}function v(e,{configuration:t}){if(!t.get(`enableTelemetry`)||s.isCI||!process.stdout.isTTY)return;n.Configuration.telemetry=new n.TelemetryManager(t,`puba9cdc10ec5790a2cf4969dd413a47270`);let r=/^@yarnpkg\/plugin-(.*)$/;for(let e of t.plugins.keys())u.pluginCommands.has(e.match(r)?.[1]??``)&&n.Configuration.telemetry?.reportPluginName(e);e.binaryVersion&&n.Configuration.telemetry.reportVersion(e.binaryVersion)}function y(e,{configuration:t}){for(let n of t.plugins.values())for(let t of n.commands||[])e.register(t)}async function b(e,t,{selfPath:r,pluginConfiguration:i}){if(!m(e))return 1;let a=await h({selfPath:r,pluginConfiguration:i}),o=a.get(`yarnPath`),s=a.get(`ignorePath`);if(o&&!s)return g(e,t,{yarnPath:o});delete process.env.YARN_IGNORE_PATH;let c=_(e,t);v(e,{configuration:a}),y(e,{configuration:a});let l=e.process(c,e.defaultContext);return l.help||n.Configuration.telemetry?.reportCommandName(l.path.join(` `)),await e.run(l,e.defaultContext)}async function x({cwd:e=r.ppath.cwd(),pluginConfiguration:t=(0,d.getPluginConfiguration)()}={}){let n=p({cwd:e,pluginConfiguration:t});return y(n,{configuration:await h({pluginConfiguration:t,selfPath:null})}),n}async function S(e,{cwd:t=r.ppath.cwd(),selfPath:n,pluginConfiguration:i}){let a=p({cwd:t,pluginConfiguration:i});function o(){c.Cli.defaultContext.stdout.write(`ERROR: Yarn is terminating due to an unexpected empty event loop.
1
+ import{a as e,i as t,t as n}from"./chunk-DTipWd-i.mjs";import{a as r,i,n as a,o,r as s,s as c,t as l}from"./lib-DIVnpS8e.mjs";import{n as u,r as d,t as f}from"./lib-ClRTNIuz.mjs";var p=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BaseCommand=void 0;let t=o();e.BaseCommand=class extends t.Command{constructor(){super(...arguments),this.cwd=t.Option.String(`--cwd`,{hidden:!0})}validateAndExecute(){if(this.cwd!==void 0)throw new t.UsageError(`The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path`);return super.validateAndExecute()}}})),m=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.WorkspaceRequiredError=void 0;let t=l(),n=f(),r=o();e.WorkspaceRequiredError=class extends r.UsageError{constructor(e,r){let i=n.ppath.relative(e,r),a=n.ppath.join(e,t.Manifest.fileName);super(`This command can only be run from within a workspace of your project (${i} isn't a workspace of ${a}).`)}}})),h=n(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),g=n(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),_=n(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=h(),a=g();e=t.exports={};let o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},_=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};_(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),_(`NUMERICIDENTIFIERLOOSE`,`\\d+`),_(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),_(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),_(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),_(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),_(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),_(`BUILDIDENTIFIER`,`${f}+`),_(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),_(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),_(`FULL`,`^${c[u.FULLPLAIN]}$`),_(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),_(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),_(`GTLT`,`((?:<|>)?=?)`),_(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),_(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),_(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),_(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),_(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),_(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),_(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),_(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),_(`COERCERTL`,c[u.COERCE],!0),_(`COERCERTLFULL`,c[u.COERCEFULL],!0),_(`LONETILDE`,`(?:~>?)`),_(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,_(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),_(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),_(`LONECARET`,`(?:\\^)`),_(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,_(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),_(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),_(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),_(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),_(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,_(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),_(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),_(`STAR`,`(<|>)?=?\\s*\\*`),_(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),_(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),v=n(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),y=n(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),b=n(((e,t)=>{let n=g(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=h(),{safeRe:a,t:o}=_(),s=v(),{compareIdentifiers:c}=y();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),x=n(((e,t)=>{let n=b();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),S=n(((e,t)=>{let n=x();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),C=n(((e,t)=>{let n=x();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),w=n(((e,t)=>{let n=b();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),T=n(((e,t)=>{let n=x();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),E=n(((e,t)=>{let n=b();t.exports=(e,t)=>new n(e,t).major})),D=n(((e,t)=>{let n=b();t.exports=(e,t)=>new n(e,t).minor})),O=n(((e,t)=>{let n=b();t.exports=(e,t)=>new n(e,t).patch})),k=n(((e,t)=>{let n=x();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),A=n(((e,t)=>{let n=b();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),j=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(t,e,r)})),M=n(((e,t)=>{let n=A();t.exports=(e,t)=>n(e,t,!0)})),N=n(((e,t)=>{let n=b();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),P=n(((e,t)=>{let n=N();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),F=n(((e,t)=>{let n=N();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),I=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(e,t,r)>0})),L=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(e,t,r)<0})),R=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(e,t,r)===0})),z=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(e,t,r)!==0})),B=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(e,t,r)>=0})),V=n(((e,t)=>{let n=A();t.exports=(e,t,r)=>n(e,t,r)<=0})),H=n(((e,t)=>{let n=R(),r=z(),i=I(),a=B(),o=L(),s=V();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),U=n(((e,t)=>{let n=b(),r=x(),{safeRe:i,t:a}=_();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),W=n(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),G=n(((e,t)=>{let n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!y(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&x(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,N(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let h=e.split(` `).map(e=>C(e,this.options)).join(` `).split(/\s+/).map(e=>M(e,this.options));i&&(h=h.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,h);let g=new Map,_=h.map(e=>new a(e,this.options));for(let e of _){if(y(e))return[e];g.set(e.value,e)}g.size>1&&g.has(``)&&g.delete(``);let v=[...g.values()];return r.set(t,v),v}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>S(e,n)&&t.set.some(t=>S(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}};let r=new(W()),i=v(),a=K(),o=g(),s=b(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=_(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=h(),y=e=>e.value===`<0.0.0-0`,x=e=>e.value===``,S=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},C=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=D(e,t),o(`caret`,e),e=T(e,t),o(`tildes`,e),e=k(e,t),o(`xrange`,e),e=j(e,t),o(`stars`,e),e),w=e=>!e||e.toLowerCase()===`x`||e===`*`,T=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(` `),E=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return w(n)?s=``:w(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:w(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},D=(e,t)=>e.trim().split(/\s+/).map(e=>O(e,t)).join(` `),O=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return w(n)?c=``:w(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:w(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},k=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>A(e,t)).join(` `)),A=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=w(i),u=l||w(a),d=u||w(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},j=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),M=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),N=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=w(r)?``:w(i)?`>=${r}.0.0${e?`-0`:``}`:w(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=w(l)?``:w(u)?`<${+l+1}.0.0-0`:w(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),K=n(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let r=v(),{safeRe:i,t:a}=_(),o=H(),s=g(),c=b(),l=G()})),q=n(((e,t)=>{let n=G();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),J=n(((e,t)=>{let n=G();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),ee=n(((e,t)=>{let n=b(),r=G();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),te=n(((e,t)=>{let n=b(),r=G();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),ne=n(((e,t)=>{let n=b(),r=G(),i=I();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),re=n(((e,t)=>{let n=G();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),Y=n(((e,t)=>{let n=b(),r=K(),{ANY:i}=r,a=G(),o=q(),s=I(),c=L(),l=V(),u=B();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),ie=n(((e,t)=>{let n=Y();t.exports=(e,t,r)=>n(e,t,`>`,r)})),ae=n(((e,t)=>{let n=Y();t.exports=(e,t,r)=>n(e,t,`<`,r)})),oe=n(((e,t)=>{let n=G();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),se=n(((e,t)=>{let n=q(),r=A();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),ce=n(((e,t)=>{let n=G(),r=K(),{ANY:i}=r,a=q(),o=A(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),le=n(((e,t)=>{let n=_(),r=h(),i=b(),a=y();t.exports={parse:x(),valid:S(),clean:C(),inc:w(),diff:T(),major:E(),minor:D(),patch:O(),prerelease:k(),compare:A(),rcompare:j(),compareLoose:M(),compareBuild:N(),sort:P(),rsort:F(),gt:I(),lt:L(),eq:R(),neq:z(),gte:B(),lte:V(),cmp:H(),coerce:U(),Comparator:K(),Range:G(),satisfies:q(),toComparators:J(),maxSatisfying:ee(),minSatisfying:te(),minVersion:ne(),validRange:re(),outside:Y(),gtr:ie(),ltr:ae(),intersects:oe(),simplifyRange:se(),subset:ce(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}})),X=n((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.getDynamicLibs=void 0;let n=(u(),e(d)),i=n.__importStar($()),p=n.__importStar(l()),m=n.__importStar(f()),h=n.__importStar(s()),g=n.__importStar(r()),_=n.__importStar(a()),v=n.__importStar(o()),y=n.__importStar(le()),b=n.__importStar(c());t.getDynamicLibs=()=>new Map([[`@yarnpkg/cli`,i],[`@yarnpkg/core`,p],[`@yarnpkg/fslib`,m],[`@yarnpkg/libzip`,h],[`@yarnpkg/parsers`,g],[`@yarnpkg/shell`,_],[`clipanion`,v],[`semver`,y],[`typanion`,b]])})),ue=n(((e,t)=>{t.exports={name:`@yarnpkg/cli`,version:`4.17.1`,license:`BSD-2-Clause`,main:`./lib/index.js`,exports:{".":`./lib/index.js`,"./package.json":`./package.json`},dependencies:{"@yarnpkg/core":`^4.9.0`,"@yarnpkg/fslib":`^3.1.5`,"@yarnpkg/libzip":`^3.2.2`,"@yarnpkg/parsers":`^3.0.3`,"@yarnpkg/plugin-catalog":`^1.0.2`,"@yarnpkg/plugin-compat":`^4.0.13`,"@yarnpkg/plugin-constraints":`^4.0.5`,"@yarnpkg/plugin-dlx":`^4.0.2`,"@yarnpkg/plugin-essentials":`^4.6.1`,"@yarnpkg/plugin-exec":`^3.1.0`,"@yarnpkg/plugin-file":`^3.0.2`,"@yarnpkg/plugin-git":`^3.2.0`,"@yarnpkg/plugin-github":`^3.0.2`,"@yarnpkg/plugin-http":`^3.0.3`,"@yarnpkg/plugin-init":`^4.1.2`,"@yarnpkg/plugin-interactive-tools":`^4.1.0`,"@yarnpkg/plugin-jsr":`^1.1.1`,"@yarnpkg/plugin-link":`^3.0.2`,"@yarnpkg/plugin-nm":`^4.1.0`,"@yarnpkg/plugin-npm":`^3.7.0`,"@yarnpkg/plugin-npm-cli":`^4.5.0`,"@yarnpkg/plugin-pack":`^4.0.4`,"@yarnpkg/plugin-patch":`^4.0.5`,"@yarnpkg/plugin-pnp":`^4.2.0`,"@yarnpkg/plugin-pnpm":`^2.3.0`,"@yarnpkg/plugin-stage":`^4.0.2`,"@yarnpkg/plugin-typescript":`^4.1.3`,"@yarnpkg/plugin-version":`^4.2.0`,"@yarnpkg/plugin-workspace-tools":`^4.1.7`,"@yarnpkg/shell":`^4.1.3`,"ci-info":`^4.0.0`,clipanion:`^4.0.0-rc.2`,semver:`^7.1.2`,tslib:`^2.4.0`,typanion:`^3.14.0`},devDependencies:{"@types/semver":`^7.1.0`,"@yarnpkg/builder":`^4.2.3`,"@yarnpkg/monorepo":`^0.0.0`,"@yarnpkg/pnpify":`^4.1.6`},peerDependencies:{"@yarnpkg/core":`^4.9.0`},scripts:{postpack:`rm -rf lib`,prepack:`run build:compile "$(pwd)"`,"build:cli+hook":`run build:pnp:hook && builder build bundle`,"build:cli":`builder build bundle`,"run:cli":`builder run`,"update-local":`run build:cli --no-git-hash && rsync -a --delete bundles/ bin/`},publishConfig:{main:`./lib/index.js`,bin:null,exports:{".":`./lib/index.js`,"./package.json":`./package.json`}},files:[`/lib/**/*`,`!/lib/pluginConfiguration.*`,`!/lib/cli.*`],"@yarnpkg/builder":{bundles:{standard:[`@yarnpkg/plugin-essentials`,`@yarnpkg/plugin-catalog`,`@yarnpkg/plugin-compat`,`@yarnpkg/plugin-constraints`,`@yarnpkg/plugin-dlx`,`@yarnpkg/plugin-exec`,`@yarnpkg/plugin-file`,`@yarnpkg/plugin-git`,`@yarnpkg/plugin-github`,`@yarnpkg/plugin-http`,`@yarnpkg/plugin-init`,`@yarnpkg/plugin-interactive-tools`,`@yarnpkg/plugin-jsr`,`@yarnpkg/plugin-link`,`@yarnpkg/plugin-nm`,`@yarnpkg/plugin-npm`,`@yarnpkg/plugin-npm-cli`,`@yarnpkg/plugin-pack`,`@yarnpkg/plugin-patch`,`@yarnpkg/plugin-pnp`,`@yarnpkg/plugin-pnpm`,`@yarnpkg/plugin-stage`,`@yarnpkg/plugin-typescript`,`@yarnpkg/plugin-version`,`@yarnpkg/plugin-workspace-tools`]}},repository:{type:`git`,url:`git+https://github.com/yarnpkg/berry.git`,directory:`packages/yarnpkg-cli`},engines:{node:`>=18.12.0`}}})),Z=n((n=>{Object.defineProperty(n,`__esModule`,{value:!0}),n.getPluginConfiguration=a;let r=(u(),e(d)).__importDefault(ue()),i=X();function a(){let e=new Set;for(let t of r.default[`@yarnpkg/builder`].bundles.standard)e.add(t);let n=(0,i.getDynamicLibs)();for(let r of e)n.set(r,t(r).default);return{plugins:e,modules:n}}})),de=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.openWorkspace=r;let t=l(),n=m();async function r(e,r){let{project:i,workspace:a}=await t.Project.find(e,r);if(!a)throw new n.WorkspaceRequiredError(i.cwd,r);return a}})),Q=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.pluginCommands=void 0,e.pluginCommands=new Map([])})),fe=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getCli=x,e.runExit=S;let n=l(),r=f(),a=t(`child_process`),s=i(),c=o(),u=Q(),d=Z();function p({cwd:e,pluginConfiguration:t}){let r=new c.Cli({binaryLabel:`Yarn Package Manager`,binaryName:`yarn`,binaryVersion:n.YarnVersion??`<unknown>`});return Object.assign(r,{defaultContext:{...c.Cli.defaultContext,cwd:e,plugins:t,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr}})}function m(e){if(n.miscUtils.parseOptionalBoolean(process.env.YARN_IGNORE_NODE))return!0;let t=process.versions.node,r=`>=18.12.0`;if(n.semverUtils.satisfiesWithPrereleases(t,r))return!0;let i=new c.UsageError(`This tool requires a Node version compatible with ${r} (got ${t}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);return c.Cli.defaultContext.stdout.write(e.error(i)),!1}async function h({selfPath:e,pluginConfiguration:t}){return await n.Configuration.find(r.npath.toPortablePath(process.cwd()),t,{strict:!1,usePathCheck:e})}function g(e,t,{yarnPath:n}){if(!r.xfs.existsSync(n))return e.error(Error(`The "yarn-path" option has been set, but the specified location doesn't exist (${n}).`)),1;process.on(`SIGINT`,()=>{});let i={stdio:`inherit`,env:{...process.env,YARN_IGNORE_PATH:`1`}};try{(0,a.execFileSync)(process.execPath,[r.npath.fromPortablePath(n),...t],i)}catch(e){return e.status??1}return 0}function _(e,t){let n=null,i=t;return t.length>=2&&t[0]===`--cwd`?(n=r.npath.toPortablePath(t[1]),i=t.slice(2)):t.length>=1&&t[0].startsWith(`--cwd=`)?(n=r.npath.toPortablePath(t[0].slice(6)),i=t.slice(1)):t[0]===`add`&&t[t.length-2]===`--cwd`&&(n=r.npath.toPortablePath(t[t.length-1]),i=t.slice(0,t.length-2)),e.defaultContext.cwd=n===null?r.ppath.cwd():r.ppath.resolve(n),i}function v(e,{configuration:t}){if(!t.get(`enableTelemetry`)||s.isCI||!process.stdout.isTTY)return;n.Configuration.telemetry=new n.TelemetryManager(t,`puba9cdc10ec5790a2cf4969dd413a47270`);let r=/^@yarnpkg\/plugin-(.*)$/;for(let e of t.plugins.keys())u.pluginCommands.has(e.match(r)?.[1]??``)&&n.Configuration.telemetry?.reportPluginName(e);e.binaryVersion&&n.Configuration.telemetry.reportVersion(e.binaryVersion)}function y(e,{configuration:t}){for(let n of t.plugins.values())for(let t of n.commands||[])e.register(t)}async function b(e,t,{selfPath:r,pluginConfiguration:i}){if(!m(e))return 1;let a=await h({selfPath:r,pluginConfiguration:i}),o=a.get(`yarnPath`),s=a.get(`ignorePath`);if(o&&!s)return g(e,t,{yarnPath:o});delete process.env.YARN_IGNORE_PATH;let c=_(e,t);v(e,{configuration:a}),y(e,{configuration:a});let l=e.process(c,e.defaultContext);return l.help||n.Configuration.telemetry?.reportCommandName(l.path.join(` `)),await e.run(l,e.defaultContext)}async function x({cwd:e=r.ppath.cwd(),pluginConfiguration:t=(0,d.getPluginConfiguration)()}={}){let n=p({cwd:e,pluginConfiguration:t});return y(n,{configuration:await h({pluginConfiguration:t,selfPath:null})}),n}async function S(e,{cwd:t=r.ppath.cwd(),selfPath:n,pluginConfiguration:i}){let a=p({cwd:t,pluginConfiguration:i});function o(){c.Cli.defaultContext.stdout.write(`ERROR: Yarn is terminating due to an unexpected empty event loop.
2
2
  Please report this issue at https://github.com/yarnpkg/berry/issues.`)}process.once(`beforeExit`,o);try{process.exitCode=42,process.exitCode=await b(a,e,{selfPath:n,pluginConfiguration:i})}catch(e){c.Cli.defaultContext.stdout.write(a.error(e)),process.exitCode=1}finally{process.off(`beforeExit`,o),await r.xfs.rmtempPromise()}}})),$=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.pluginCommands=e.runExit=e.getCli=e.openWorkspace=e.getPluginConfiguration=e.getDynamicLibs=e.WorkspaceRequiredError=e.BaseCommand=void 0;var t=p();Object.defineProperty(e,`BaseCommand`,{enumerable:!0,get:function(){return t.BaseCommand}});var n=m();Object.defineProperty(e,`WorkspaceRequiredError`,{enumerable:!0,get:function(){return n.WorkspaceRequiredError}});var r=X();Object.defineProperty(e,`getDynamicLibs`,{enumerable:!0,get:function(){return r.getDynamicLibs}});var i=Z();Object.defineProperty(e,`getPluginConfiguration`,{enumerable:!0,get:function(){return i.getPluginConfiguration}});var a=de();Object.defineProperty(e,`openWorkspace`,{enumerable:!0,get:function(){return a.openWorkspace}});var o=fe();Object.defineProperty(e,`getCli`,{enumerable:!0,get:function(){return o.getCli}}),Object.defineProperty(e,`runExit`,{enumerable:!0,get:function(){return o.runExit}});var s=Q();Object.defineProperty(e,`pluginCommands`,{enumerable:!0,get:function(){return s.pluginCommands}})}));export default $();export{};
@@ -1 +1 @@
1
- import{t as e}from"./descriptor-to-package-D5SWf6TL.mjs";import{pathToFileURL as t}from"node:url";import*as n from"node:path";import*as r from"node:fs";import{versionSatisfies as i}from"@makaio/framework/contracts";async function a(e,t){let{frameworkVersion:n,importModule:r=S}=t,i=[],a=new Map,s;for(let t of e){let{descriptor:e,extensionPath:c}=t,l=`[extensions] ${e.name}@${e.version}`;if(!u(t,n))continue;if(e.execution===`detached`){let t;try{s??=(await import(`./detached-extension-handle-CTaQoolf.mjs`)).createDetachedExtensionPackage,t=s(e,c)}catch(e){console.warn(`${l}: failed to synthesize detached extension package:`,e instanceof Error?e.message:e);continue}i.push(t),e.config?.defaults&&a.set(e.name,e.config.defaults);continue}if(!e.entrypoints.server){!e.entrypoints.browser&&!e.entrypoints.cli&&console.warn(`${l}: no executable entrypoint declared, skipping`);continue}let d;if(t.preloadedModule)d=t.preloadedModule;else try{let t=_(`server`,e.entrypoints.server,c);if(!t){console.warn(`${l}: server entrypoint could not be resolved within extension directory, skipping`);continue}d=await r(t)}catch(e){console.warn(`${l}: failed to import server entry:`,e instanceof Error?e.message:e);continue}let f=o(d.default,e.name,l);f&&(i.push(...f),e.config?.defaults&&a.set(e.name,e.config.defaults))}return{packages:i,configDefaults:a}}function o(e,t,n){if(Array.isArray(e)){let r=[],i=new Set;for(let t of e){if(!f(t)){console.warn(`${n}: default export array contains an invalid MakaioExtension, skipping`);return}if(i.has(t.name)){console.warn(`${n}: default export array contains duplicate package name '${t.name}', skipping`);return}i.add(t.name),r.push(t)}if(!r.some(e=>e.name===t)){console.warn(`${n}: default export array must include a package named '${t}' to match descriptor identity, skipping`);return}if(r.some(e=>e.name!==t&&!e.name.startsWith(`${t}.`))){console.warn(`${n}: default export array contains package names outside descriptor namespace '${t}', skipping`);return}return r}if(!f(e)){console.warn(`${n}: default export is not a valid MakaioExtension or MakaioExtension[], skipping`);return}if(e.name!==t){console.warn(`${n}: imported package name '${e.name}' does not match descriptor name '${t}', skipping`);return}return[e]}async function s(e,t,n){let{importModule:r=S,frameworkVersion:i}=n,a=new Map(t.map(e=>[e.name,e])),o=new Map;for(let t of e){let e=c(t,i);if(!e)continue;let n=`[extensions] ${t.descriptor.name}@${t.descriptor.version}`,s=a.get(t.descriptor.name);if(s?.cli)continue;let u=await d(t,e,n,r);if(!u)continue;if(!p(u.default)){console.warn(`${n}: default export is not a valid CliContribution, skipping`);continue}let f=t.descriptor.cli?.name??t.descriptor.name;if(u.default.name!==f){console.warn(`${n}: imported CLI contribution name '${u.default.name}' does not match descriptor CLI name '${f}', skipping`);continue}if(s){a.set(t.descriptor.name,{...s,cli:u.default});continue}if(t.descriptor.entrypoints?.server||t.descriptor.entrypoints?.browser){console.warn(`${n}: server or browser entry is present but no package was loaded, skipping CLI-only synthesis`);continue}a.set(t.descriptor.name,l(t,u.default)),t.descriptor.config?.defaults&&o.set(t.descriptor.name,t.descriptor.config.defaults)}return{packages:[...a.values()],configDefaults:o}}function c(e,t){if(u(e,t)&&e.descriptor.execution!==`detached`)return e.descriptor.entrypoints?.cli}function l(t,n){return{...e(t.descriptor),cli:n}}function u(e,t){let{descriptor:n}=e,r=`[extensions] ${n.name}@${n.version}`;try{return i(t,n.makaio.framework)?!0:(console.warn(`${r}: requires framework ${n.makaio.framework}, current is ${t}, skipping`),!1)}catch(e){return console.warn(`${r}: invalid version metadata (framework=${t}, range=${n.makaio.framework}), skipping:`,e instanceof Error?e.message:e),!1}}async function d(e,t,n,r){try{let i=_(`cli`,t,e.extensionPath);if(!i){console.warn(`${n}: cli entrypoint has no resolvable candidate within extension directory, skipping`);return}return await r(i)}catch(e){console.warn(`${n}: failed to import cli entry:`,e instanceof Error?e.message:e);return}}function f(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.name==`string`&&typeof t.displayName==`string`&&typeof t.version==`string`}function p(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.name!=`string`||typeof t.description!=`string`||!Array.isArray(t.subcommands)||`interactive`in t&&t.interactive!==void 0&&typeof t.interactive!=`function`?!1:t.subcommands.length===0?typeof t.interactive==`function`:t.subcommands.every(m)}function m(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.name==`string`&&typeof t.description==`string`&&h(t.schema)&&typeof t.handler==`function`}function h(e){return typeof e==`object`&&!!e&&typeof e.safeParse==`function`}function g(e,t){return t===!0?e:t}function _(e,t,r){if(!n.isAbsolute(r))return;let i=g(e,t),a=x(r),o=n.resolve(r,`src`,`${i}.ts`);if(y(o,a))return o;let s=n.resolve(r,`dist`,`${i}.mjs`);if(y(s,a))return s}function v(e,t){let n=x(t);return b(x(e),n)}function y(e,t){try{return b(r.realpathSync(e),t)}catch{return!1}}function b(e,t){return e.startsWith(t+n.sep)}function x(e){let t=n.resolve(e);try{return r.realpathSync(t)}catch{return t}}async function S(e){return await import(t(e).href)}export{f as a,_ as c,u as i,g as n,v as o,p as r,a as s,s as t};
1
+ import{t as e}from"./descriptor-to-package-Rs-OjOQU.mjs";import{pathToFileURL as t}from"node:url";import*as n from"node:path";import*as r from"node:fs";import{versionSatisfies as i}from"@makaio/framework/contracts";async function a(e,t){let{frameworkVersion:n,importModule:r=S}=t,i=[],a=new Map,s;for(let t of e){let{descriptor:e,extensionPath:c}=t,l=`[extensions] ${e.name}@${e.version}`;if(!u(t,n))continue;if(e.execution===`detached`){let t;try{s??=(await import(`./detached-extension-handle-vDK194QV.mjs`)).createDetachedExtensionPackage,t=s(e,c)}catch(e){console.warn(`${l}: failed to synthesize detached extension package:`,e instanceof Error?e.message:e);continue}i.push(t),e.config?.defaults&&a.set(e.name,e.config.defaults);continue}if(!e.entrypoints.server){!e.entrypoints.browser&&!e.entrypoints.cli&&console.warn(`${l}: no executable entrypoint declared, skipping`);continue}let d;if(t.preloadedModule)d=t.preloadedModule;else try{let t=_(`server`,e.entrypoints.server,c);if(!t){console.warn(`${l}: server entrypoint could not be resolved within extension directory, skipping`);continue}d=await r(t)}catch(e){console.warn(`${l}: failed to import server entry:`,e instanceof Error?e.message:e);continue}let f=o(d.default,e.name,l);f&&(i.push(...f),e.config?.defaults&&a.set(e.name,e.config.defaults))}return{packages:i,configDefaults:a}}function o(e,t,n){if(Array.isArray(e)){let r=[],i=new Set;for(let t of e){if(!f(t)){console.warn(`${n}: default export array contains an invalid MakaioExtension, skipping`);return}if(i.has(t.name)){console.warn(`${n}: default export array contains duplicate package name '${t.name}', skipping`);return}i.add(t.name),r.push(t)}if(!r.some(e=>e.name===t)){console.warn(`${n}: default export array must include a package named '${t}' to match descriptor identity, skipping`);return}if(r.some(e=>e.name!==t&&!e.name.startsWith(`${t}.`))){console.warn(`${n}: default export array contains package names outside descriptor namespace '${t}', skipping`);return}return r}if(!f(e)){console.warn(`${n}: default export is not a valid MakaioExtension or MakaioExtension[], skipping`);return}if(e.name!==t){console.warn(`${n}: imported package name '${e.name}' does not match descriptor name '${t}', skipping`);return}return[e]}async function s(e,t,n){let{importModule:r=S,frameworkVersion:i}=n,a=new Map(t.map(e=>[e.name,e])),o=new Map;for(let t of e){let e=c(t,i);if(!e)continue;let n=`[extensions] ${t.descriptor.name}@${t.descriptor.version}`,s=a.get(t.descriptor.name);if(s?.cli)continue;let u=await d(t,e,n,r);if(!u)continue;if(!p(u.default)){console.warn(`${n}: default export is not a valid CliContribution, skipping`);continue}let f=t.descriptor.cli?.name??t.descriptor.name;if(u.default.name!==f){console.warn(`${n}: imported CLI contribution name '${u.default.name}' does not match descriptor CLI name '${f}', skipping`);continue}if(s){a.set(t.descriptor.name,{...s,cli:u.default});continue}if(t.descriptor.entrypoints?.server||t.descriptor.entrypoints?.browser){console.warn(`${n}: server or browser entry is present but no package was loaded, skipping CLI-only synthesis`);continue}a.set(t.descriptor.name,l(t,u.default)),t.descriptor.config?.defaults&&o.set(t.descriptor.name,t.descriptor.config.defaults)}return{packages:[...a.values()],configDefaults:o}}function c(e,t){if(u(e,t)&&e.descriptor.execution!==`detached`)return e.descriptor.entrypoints?.cli}function l(t,n){return{...e(t.descriptor),cli:n}}function u(e,t){let{descriptor:n}=e,r=`[extensions] ${n.name}@${n.version}`;try{return i(t,n.makaio.framework)?!0:(console.warn(`${r}: requires framework ${n.makaio.framework}, current is ${t}, skipping`),!1)}catch(e){return console.warn(`${r}: invalid version metadata (framework=${t}, range=${n.makaio.framework}), skipping:`,e instanceof Error?e.message:e),!1}}async function d(e,t,n,r){try{let i=_(`cli`,t,e.extensionPath);if(!i){console.warn(`${n}: cli entrypoint has no resolvable candidate within extension directory, skipping`);return}return await r(i)}catch(e){console.warn(`${n}: failed to import cli entry:`,e instanceof Error?e.message:e);return}}function f(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.name==`string`&&typeof t.displayName==`string`&&typeof t.version==`string`}function p(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.name!=`string`||typeof t.description!=`string`||!Array.isArray(t.subcommands)||`interactive`in t&&t.interactive!==void 0&&typeof t.interactive!=`function`?!1:t.subcommands.length===0?typeof t.interactive==`function`:t.subcommands.every(m)}function m(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.name==`string`&&typeof t.description==`string`&&h(t.schema)&&typeof t.handler==`function`}function h(e){return typeof e==`object`&&!!e&&typeof e.safeParse==`function`}function g(e,t){return t===!0?e:t}function _(e,t,r){if(!n.isAbsolute(r))return;let i=g(e,t),a=x(r),o=n.resolve(r,`src`,`${i}.ts`);if(y(o,a))return o;let s=n.resolve(r,`dist`,`${i}.mjs`);if(y(s,a))return s}function v(e,t){let n=x(t);return b(x(e),n)}function y(e,t){try{return b(r.realpathSync(e),t)}catch{return!1}}function b(e,t){return e.startsWith(t+n.sep)}function x(e){let t=n.resolve(e);try{return r.realpathSync(t)}catch{return t}}async function S(e){return await import(t(e).href)}export{f as a,_ as c,u as i,g as n,v as o,p as r,a as s,s as t};
@@ -188,116 +188,56 @@ declare function resolveMcpTools(bus: IMakaioBus, options?: McpToolDiscoveryOpti
188
188
  */
189
189
  declare function toolInfoToMcpTool(tool: ToolInfo, mcpName: string): McpToolDefinition;
190
190
  //#endregion
191
- //#region subsystems/mcp-http-server/src/server.d.ts
192
- /** Query parameter name used by adapters to pass the session ID when custom headers are not available. */
193
- declare const ADAPTER_SESSION_ID_PARAM = "adapterSessionId";
194
- /** HTTP header name that carries the adapter session ID after query-param promotion. */
195
- declare const ADAPTER_SESSION_ID_HEADER = "x-adapter-session-id";
196
- /**
197
- * Options for configuring MCP server startup.
198
- */
199
- interface McpServerOptions {
200
- /** Required. Defaults to `'stdio'` when using {@link startMcpServer}. */
191
+ //#region subsystems/mcp-http-server/src/server-options.d.ts
192
+ /** Resolve session-stable context overrides for an adapter session. */
193
+ type ResolveContextOverrides = (adapterSessionId: string | undefined) => ToolExecutionContextOverrides | undefined;
194
+ /** Shared timeout option for MCP tool execution. */
195
+ interface ToolExecutionTimeoutOption {
196
+ /** Positive timeout in milliseconds, bounded to 30 minutes. */
197
+ toolExecutionTimeoutMs?: number;
198
+ }
199
+ /** Options for configuring MCP server startup. */
200
+ interface McpServerOptions extends ToolExecutionTimeoutOption {
201
201
  transport: 'stdio' | 'http';
202
- /** Port for HTTP transport. When omitted or 0, OS assigns an available port. */
203
202
  port?: number;
204
- /** Agent context for HTTP transport routing. */
205
203
  agentContext?: McpAgentContext$1;
206
- /** Optional MCP tool discovery customization. */
207
204
  toolDiscovery?: McpToolDiscoveryOptions;
208
- /**
209
- * Optional callback invoked exactly once when the stdio transport closes.
210
- *
211
- * Fired on whichever of these happens first: the client detaches (stdin EOF),
212
- * the SDK transport fires its own `onclose` hook, or an explicit
213
- * {@link StdioMcpServerHandle.close} call completes. Subsequent triggers are
214
- * suppressed so the callback is guaranteed to fire at most once.
215
- *
216
- * Only consulted for `transport: 'stdio'`; ignored for HTTP.
217
- */
205
+ resolveContextOverrides?: ResolveContextOverrides;
218
206
  onclose?: () => void;
219
207
  }
220
- /**
221
- * Result returned by {@link startMcpServer} for the stdio transport.
222
- */
208
+ /** Result returned for the stdio transport. */
223
209
  interface StdioMcpServerHandle {
224
- /** Gracefully close the MCP server and stdio transport. */
225
210
  close: () => Promise<void>;
226
211
  }
227
- /**
228
- * Result returned by {@link startHttpMcpServer}.
229
- */
212
+ /** Result returned for the HTTP transport. */
230
213
  interface HttpMcpServerHandle {
231
- /** OS-assigned port the HTTP server is listening on. */
232
214
  port: number;
233
- /** Context registry for registering/unregistering agent sessions. */
234
215
  contextRegistry: IMcpContextRegistry;
235
- /** Gracefully close the HTTP server and MCP transport. */
236
216
  close: () => Promise<void>;
237
217
  }
238
- /**
239
- * Callback that resolves session-stable context overrides for a given
240
- * adapter session ID.
241
- *
242
- * Invoked on every tool-call request. When the session is found, its
243
- * return value overrides the default fallback context
244
- * `{ cwd: process.cwd(), sessionId }`. When the session is unknown or
245
- * the header is absent, returning `undefined` keeps the fallback.
246
- * @param adapterSessionId - The adapter session ID extracted from request
247
- * headers, or `undefined` when the header is absent.
248
- * @returns Resolved context overrides, or `undefined` to use the fallback.
249
- */
250
- type ResolveContextOverrides = (adapterSessionId: string | undefined) => ToolExecutionContextOverrides | undefined;
251
- /**
252
- * Options for {@link createMcpServer}.
253
- */
254
- interface CreateMcpServerOptions {
255
- /** Registry for resolving agent context by adapterSessionId. When present, the `approve` tool is exposed. */
218
+ /** Options for creating the transport-independent MCP server. */
219
+ interface CreateMcpServerOptions extends ToolExecutionTimeoutOption {
256
220
  contextRegistry?: IMcpContextRegistry;
257
- /** Optional tool discovery customization. */
258
221
  toolDiscovery?: McpToolDiscoveryOptions;
259
- /** Optional callback to resolve session-stable context overrides from an adapter session ID at tool-call time. */
260
222
  resolveContextOverrides?: ResolveContextOverrides;
261
223
  }
262
- /**
263
- * Transport-agnostic options shared by {@link createHttpMcpHandler},
264
- * {@link createFetchMcpHandler}, and {@link startHttpMcpServer}. These fields configure the MCP server and its
265
- * attached transport without prescribing how the resulting handler is mounted
266
- * onto an HTTP stack.
267
- */
268
- interface HttpMcpHandlerOptions {
269
- /** Agent context for HTTP transport routing. */
224
+ /** Transport-independent HTTP MCP handler options. */
225
+ interface HttpMcpHandlerOptions extends ToolExecutionTimeoutOption {
270
226
  agentContext?: McpAgentContext$1;
271
- /** Optional MCP tool discovery customization. */
272
227
  toolDiscovery?: McpToolDiscoveryOptions;
273
- /**
274
- * Optional callback invoked when the underlying MCP transport closes.
275
- *
276
- * Called synchronously by the MCP SDK's transport `onclose` hook — that is,
277
- * after {@link HttpMcpHandlerHandle.close}, {@link FetchMcpHandlerHandle.close},
278
- * or {@link HttpMcpServerHandle.close}
279
- * has been called and the transport has finished tearing down. Intended for
280
- * best-effort resource cleanup (e.g. flushing session registries) without
281
- * blocking the close path.
282
- *
283
- * When used via {@link startHttpMcpServer}, the callback fires after the MCP
284
- * transport closes, which occurs during the combined server-and-transport
285
- * teardown initiated by {@link HttpMcpServerHandle.close}.
286
- */
287
228
  onclose?: () => void;
288
- /** Optional callback for session-stable context override resolution. */
289
229
  resolveContextOverrides?: ResolveContextOverrides;
290
230
  }
291
- /**
292
- * Options accepted by {@link startHttpMcpServer}.
293
- *
294
- * Extends {@link HttpMcpHandlerOptions} with `port`, which controls which
295
- * TCP port the internally-created `http.Server` listens on.
296
- */
231
+ /** Options for starting a standalone HTTP MCP server. */
297
232
  interface HttpMcpServerOptions extends HttpMcpHandlerOptions {
298
- /** Port for HTTP transport. When omitted or 0, OS assigns an available port. */
299
233
  port?: number;
300
234
  }
235
+ //#endregion
236
+ //#region subsystems/mcp-http-server/src/server.d.ts
237
+ /** Query parameter name used by adapters to pass the session ID when custom headers are not available. */
238
+ declare const ADAPTER_SESSION_ID_PARAM = "adapterSessionId";
239
+ /** HTTP header name that carries the adapter session ID after query-param promotion. */
240
+ declare const ADAPTER_SESSION_ID_HEADER = "x-adapter-session-id";
301
241
  /**
302
242
  * Result returned by {@link createHttpMcpHandler}.
303
243
  *
@@ -329,11 +269,6 @@ interface HttpMcpHandlerHandle {
329
269
  *
330
270
  * **Freshness contract:** Tool lists are resolved fresh on every MCP `tools/list` and
331
271
  * `tools/call` request. There is no caching between calls.
332
- *
333
- * **Side-effect:** Subscribes to {@link ToolSubjects.registryChanged} on `bus` and
334
- * sends `notifications/tools/list_changed` to connected MCP clients on each emission.
335
- * Calling `server.close()` unsubscribes this listener; connected transport closure
336
- * also reaches the same idempotent cleanup through the SDK's `onclose` hook.
337
272
  * @param bus - Bus instance for tool execution and approval RPC.
338
273
  * @param sessionId - Session identifier for tool execution context.
339
274
  * @param options - Optional server configuration.
@@ -456,7 +391,9 @@ declare function startHttpMcpServer(bus: IMakaioBus, options?: HttpMcpServerOpti
456
391
  * For the stdio transport, returns a {@link StdioMcpServerHandle} whose
457
392
  * `close()` method gracefully tears down the MCP server. Pass
458
393
  * `options.onclose` to receive a single callback when the transport closes for
459
- * any reason (client detach via stdin EOF, or explicit `handle.close()`).
394
+ * any reason (client detach via stdin EOF, or explicit `handle.close()`). Pass
395
+ * `options.resolveContextOverrides` to resolve current execution context on
396
+ * every tool call, including calls after client reconnects.
460
397
  * Signal handling is intentionally left to the composition root — library code
461
398
  * must not own process-global resources such as `process.on('SIGINT')`.
462
399
  * @param bus - Bus instance.