gemi 0.51.0 → 0.52.0

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 (188) hide show
  1. package/dist/app/index.js +1 -1
  2. package/dist/bin/gemi.js +30 -1
  3. package/dist/bin/gemi.js.map +4 -4
  4. package/dist/broadcasting/index.js +1 -1
  5. package/dist/bun/plugin.js +1 -1
  6. package/dist/bun/preload.js +1 -1
  7. package/dist/{chunk-5v36t9j3.js → chunk-092pj2j2.js} +3 -3
  8. package/dist/{chunk-5v36t9j3.js.map → chunk-092pj2j2.js.map} +1 -1
  9. package/dist/{chunk-zwpx6z5f.js → chunk-0h3jr9d9.js} +2 -2
  10. package/dist/{chunk-8zd6d5nd.js.map → chunk-0h3jr9d9.js.map} +1 -1
  11. package/dist/{chunk-98sj7tkf.js → chunk-0tbwn6er.js} +3 -3
  12. package/dist/{chunk-98sj7tkf.js.map → chunk-0tbwn6er.js.map} +1 -1
  13. package/dist/{chunk-hwwp6x2s.js → chunk-1ab1ptq5.js} +2 -2
  14. package/dist/{chunk-hwwp6x2s.js.map → chunk-1ab1ptq5.js.map} +1 -1
  15. package/dist/{chunk-eby61053.js → chunk-1ce7veh9.js} +3 -3
  16. package/dist/{chunk-eby61053.js.map → chunk-1ce7veh9.js.map} +1 -1
  17. package/dist/{chunk-dk01r6se.js → chunk-23g7qdpg.js} +2 -2
  18. package/dist/{chunk-dk01r6se.js.map → chunk-23g7qdpg.js.map} +1 -1
  19. package/dist/{chunk-fs091xz7.js → chunk-2gw6cyyj.js} +2 -2
  20. package/dist/{chunk-fs091xz7.js.map → chunk-2gw6cyyj.js.map} +1 -1
  21. package/dist/chunk-2qn472j4.js +5 -0
  22. package/dist/{chunk-8gb1w19q.js.map → chunk-2qn472j4.js.map} +1 -1
  23. package/dist/{chunk-pkzj7c5w.js → chunk-2sfz64xh.js} +2 -2
  24. package/dist/{chunk-pkzj7c5w.js.map → chunk-2sfz64xh.js.map} +1 -1
  25. package/dist/{chunk-q0xq0pt0.js → chunk-2yth3kk2.js} +4 -4
  26. package/dist/{chunk-q0xq0pt0.js.map → chunk-2yth3kk2.js.map} +1 -1
  27. package/dist/{chunk-gdegb5t0.js → chunk-38ma6gg3.js} +2 -2
  28. package/dist/{chunk-gdegb5t0.js.map → chunk-38ma6gg3.js.map} +1 -1
  29. package/dist/{chunk-8vnbvfmd.js → chunk-3y9nf09k.js} +2 -2
  30. package/dist/{chunk-8vnbvfmd.js.map → chunk-3y9nf09k.js.map} +1 -1
  31. package/dist/{chunk-8zd6d5nd.js → chunk-4e61qbp4.js} +2 -2
  32. package/dist/{chunk-zwpx6z5f.js.map → chunk-4e61qbp4.js.map} +1 -1
  33. package/dist/{chunk-nbx9mgmr.js → chunk-4t6a82fh.js} +2 -2
  34. package/dist/{chunk-nbx9mgmr.js.map → chunk-4t6a82fh.js.map} +1 -1
  35. package/dist/{chunk-mrf9tjev.js → chunk-53e48ce8.js} +2 -2
  36. package/dist/{chunk-mrf9tjev.js.map → chunk-53e48ce8.js.map} +1 -1
  37. package/dist/{chunk-j33n723q.js → chunk-5s45prj5.js} +3 -3
  38. package/dist/{chunk-j33n723q.js.map → chunk-5s45prj5.js.map} +1 -1
  39. package/dist/{chunk-16bnbtyn.js → chunk-68w225rv.js} +2 -2
  40. package/dist/{chunk-16bnbtyn.js.map → chunk-68w225rv.js.map} +1 -1
  41. package/dist/{chunk-rxeyhwqz.js → chunk-69w4egkg.js} +3 -3
  42. package/dist/{chunk-rxeyhwqz.js.map → chunk-69w4egkg.js.map} +1 -1
  43. package/dist/{chunk-8m3wq94b.js → chunk-6scjrbw7.js} +2 -2
  44. package/dist/{chunk-8m3wq94b.js.map → chunk-6scjrbw7.js.map} +1 -1
  45. package/dist/{chunk-asgfqcwd.js → chunk-88pq4gmf.js} +2 -2
  46. package/dist/{chunk-asgfqcwd.js.map → chunk-88pq4gmf.js.map} +1 -1
  47. package/dist/{chunk-p0z35s59.js → chunk-8p6rqegw.js} +1 -1
  48. package/dist/{chunk-5t2c9194.js → chunk-a0sy9f9x.js} +1 -1
  49. package/dist/{chunk-g4gjn481.js → chunk-cmq5t8p9.js} +3 -3
  50. package/dist/{chunk-g4gjn481.js.map → chunk-cmq5t8p9.js.map} +1 -1
  51. package/dist/{chunk-zznpmnp7.js → chunk-d1ahbza9.js} +3 -3
  52. package/dist/{chunk-zznpmnp7.js.map → chunk-d1ahbza9.js.map} +1 -1
  53. package/dist/{chunk-an6nq9yd.js → chunk-ebcgdv00.js} +3 -3
  54. package/dist/{chunk-an6nq9yd.js.map → chunk-ebcgdv00.js.map} +1 -1
  55. package/dist/{chunk-3z4nwzvp.js → chunk-et0j6jx8.js} +3 -3
  56. package/dist/{chunk-3z4nwzvp.js.map → chunk-et0j6jx8.js.map} +1 -1
  57. package/dist/chunk-f29vd5mc.js +5 -0
  58. package/dist/{chunk-45c8sqb7.js.map → chunk-f29vd5mc.js.map} +2 -2
  59. package/dist/{chunk-gvf1d636.js → chunk-faa987e4.js} +2 -2
  60. package/dist/{chunk-gvf1d636.js.map → chunk-faa987e4.js.map} +1 -1
  61. package/dist/{chunk-6wm9bsz9.js → chunk-h5g05qwb.js} +2 -2
  62. package/dist/{chunk-6wm9bsz9.js.map → chunk-h5g05qwb.js.map} +1 -1
  63. package/dist/{chunk-x80n922n.js → chunk-h7jv3ame.js} +2 -2
  64. package/dist/{chunk-x80n922n.js.map → chunk-h7jv3ame.js.map} +1 -1
  65. package/dist/chunk-ha7n1c94.js +7 -0
  66. package/dist/{chunk-bm6q0q1q.js.map → chunk-ha7n1c94.js.map} +3 -3
  67. package/dist/chunk-hbycemy5.js +6 -0
  68. package/dist/{chunk-ygpzyxr6.js.map → chunk-hbycemy5.js.map} +2 -2
  69. package/dist/{chunk-3fcgg506.js → chunk-j1knf8gv.js} +3 -3
  70. package/dist/{chunk-3fcgg506.js.map → chunk-j1knf8gv.js.map} +1 -1
  71. package/dist/chunk-jdfe4dmh.js +5 -0
  72. package/dist/chunk-jdfe4dmh.js.map +30 -0
  73. package/dist/{chunk-1sbm38g3.js → chunk-kaxvw75w.js} +3 -3
  74. package/dist/{chunk-1sbm38g3.js.map → chunk-kaxvw75w.js.map} +1 -1
  75. package/dist/{chunk-c4r1zh9q.js → chunk-km6x37ws.js} +4 -4
  76. package/dist/{chunk-c4r1zh9q.js.map → chunk-km6x37ws.js.map} +1 -1
  77. package/dist/{chunk-eyvtf769.js → chunk-kxzwem3g.js} +2 -2
  78. package/dist/{chunk-eyvtf769.js.map → chunk-kxzwem3g.js.map} +1 -1
  79. package/dist/{chunk-hnw1jy86.js → chunk-msz8rngs.js} +2 -2
  80. package/dist/{chunk-hnw1jy86.js.map → chunk-msz8rngs.js.map} +1 -1
  81. package/dist/chunk-mt2755rs.js +5 -0
  82. package/dist/{chunk-g0w87jtw.js.map → chunk-mt2755rs.js.map} +4 -3
  83. package/dist/chunk-p22rkf1g.js +8 -0
  84. package/dist/chunk-p22rkf1g.js.map +11 -0
  85. package/dist/{chunk-kv8p4h79.js → chunk-q09mmr05.js} +3 -3
  86. package/dist/{chunk-kv8p4h79.js.map → chunk-q09mmr05.js.map} +1 -1
  87. package/dist/chunk-qj4mmner.js +4 -0
  88. package/dist/{chunk-6x6gb7zg.js.map → chunk-qj4mmner.js.map} +3 -3
  89. package/dist/{chunk-d3tf618w.js → chunk-qx6sahe0.js} +2 -2
  90. package/dist/{chunk-d3tf618w.js.map → chunk-qx6sahe0.js.map} +1 -1
  91. package/dist/{chunk-w7fpm2pw.js → chunk-qyaqg07q.js} +2 -2
  92. package/dist/{chunk-w7fpm2pw.js.map → chunk-qyaqg07q.js.map} +1 -1
  93. package/dist/{chunk-a6w4tpwz.js → chunk-rq770c71.js} +2 -2
  94. package/dist/{chunk-a6w4tpwz.js.map → chunk-rq770c71.js.map} +1 -1
  95. package/dist/{chunk-zezdm4ep.js → chunk-t4n25km9.js} +3 -3
  96. package/dist/{chunk-zezdm4ep.js.map → chunk-t4n25km9.js.map} +1 -1
  97. package/dist/chunk-tmk4zfz9.js +33 -0
  98. package/dist/chunk-tmk4zfz9.js.map +18 -0
  99. package/dist/{chunk-k4mjcvsm.js → chunk-ttzkn1qd.js} +2 -2
  100. package/dist/{chunk-k4mjcvsm.js.map → chunk-ttzkn1qd.js.map} +1 -1
  101. package/dist/{chunk-94k8pjmf.js → chunk-tztqkat2.js} +3 -3
  102. package/dist/{chunk-94k8pjmf.js.map → chunk-tztqkat2.js.map} +1 -1
  103. package/dist/{chunk-ybqftmjx.js → chunk-vnjvd82s.js} +2 -2
  104. package/dist/{chunk-ybqftmjx.js.map → chunk-vnjvd82s.js.map} +1 -1
  105. package/dist/{chunk-0k5jhyry.js → chunk-xsmt86n3.js} +2 -2
  106. package/dist/{chunk-0k5jhyry.js.map → chunk-xsmt86n3.js.map} +1 -1
  107. package/dist/{chunk-ntr81h76.js → chunk-z4q1ty6w.js} +2 -2
  108. package/dist/{chunk-ntr81h76.js.map → chunk-z4q1ty6w.js.map} +1 -1
  109. package/dist/{chunk-53w1njqz.js → chunk-zhsaz9cr.js} +1 -1
  110. package/dist/config/index.js +1 -1
  111. package/dist/console/Command.d.ts +143 -0
  112. package/dist/console/Command.d.ts.map +1 -0
  113. package/dist/console/CommandRegistry.d.ts +46 -0
  114. package/dist/console/CommandRegistry.d.ts.map +1 -0
  115. package/dist/console/builder.d.ts +115 -0
  116. package/dist/console/builder.d.ts.map +1 -0
  117. package/dist/console/builder.test-d.d.ts +2 -0
  118. package/dist/console/builder.test-d.d.ts.map +1 -0
  119. package/dist/console/config.d.ts +40 -0
  120. package/dist/console/config.d.ts.map +1 -0
  121. package/dist/console/context.d.ts +90 -0
  122. package/dist/console/context.d.ts.map +1 -0
  123. package/dist/console/errors.d.ts +19 -0
  124. package/dist/console/errors.d.ts.map +1 -0
  125. package/dist/console/parse.d.ts +65 -0
  126. package/dist/console/parse.d.ts.map +1 -0
  127. package/dist/console/run.d.ts +2 -0
  128. package/dist/console/run.d.ts.map +1 -0
  129. package/dist/console/run.js +16 -0
  130. package/dist/console/run.js.map +14 -0
  131. package/dist/console/runner.d.ts +41 -0
  132. package/dist/console/runner.d.ts.map +1 -0
  133. package/dist/console/usage.d.ts +7 -0
  134. package/dist/console/usage.d.ts.map +1 -0
  135. package/dist/container/index.js +2 -2
  136. package/dist/container/index.js.map +1 -1
  137. package/dist/database/index.js +2 -2
  138. package/dist/database/index.js.map +1 -1
  139. package/dist/email/index.js +2 -2
  140. package/dist/email/index.js.map +2 -2
  141. package/dist/facades/index.js +2 -2
  142. package/dist/facades/index.js.map +1 -1
  143. package/dist/foundation/index.js +2 -2
  144. package/dist/foundation/index.js.map +1 -1
  145. package/dist/http/ViewRouter.d.ts.map +1 -1
  146. package/dist/http/index.js +2 -2
  147. package/dist/http/index.js.map +1 -1
  148. package/dist/i18n/index.js +2 -2
  149. package/dist/i18n/index.js.map +2 -2
  150. package/dist/kernel/Kernel.d.ts +29 -0
  151. package/dist/kernel/Kernel.d.ts.map +1 -1
  152. package/dist/kernel/index.js +3 -3
  153. package/dist/kernel/index.js.map +3 -3
  154. package/dist/orm/compile/nested-writes.d.ts +11 -3
  155. package/dist/orm/compile/nested-writes.d.ts.map +1 -1
  156. package/dist/orm/index.js +3 -3
  157. package/dist/orm/index.js.map +4 -4
  158. package/dist/server/index.js +2 -2
  159. package/dist/server/index.js.map +1 -1
  160. package/dist/services/cron/ScheduleServiceProvider.d.ts.map +1 -1
  161. package/dist/services/discovery.d.ts +15 -0
  162. package/dist/services/discovery.d.ts.map +1 -1
  163. package/dist/services/index.d.ts +8 -1
  164. package/dist/services/index.d.ts.map +1 -1
  165. package/dist/services/index.js +11 -11
  166. package/dist/services/index.js.map +2 -2
  167. package/dist/support/Service.d.ts +90 -0
  168. package/dist/support/Service.d.ts.map +1 -0
  169. package/dist/support/discover.d.ts +9 -1
  170. package/dist/support/discover.d.ts.map +1 -1
  171. package/dist/support/index.d.ts +1 -0
  172. package/dist/support/index.d.ts.map +1 -1
  173. package/dist/support/index.js +2 -2
  174. package/dist/support/index.js.map +4 -3
  175. package/package.json +2 -1
  176. package/dist/chunk-45c8sqb7.js +0 -5
  177. package/dist/chunk-6fym5bfg.js +0 -23
  178. package/dist/chunk-6fym5bfg.js.map +0 -36
  179. package/dist/chunk-6x6gb7zg.js +0 -4
  180. package/dist/chunk-8gb1w19q.js +0 -5
  181. package/dist/chunk-bm6q0q1q.js +0 -7
  182. package/dist/chunk-g0w87jtw.js +0 -5
  183. package/dist/chunk-j4rkk01q.js +0 -5
  184. package/dist/chunk-j4rkk01q.js.map +0 -10
  185. package/dist/chunk-ygpzyxr6.js +0 -6
  186. /package/dist/{chunk-p0z35s59.js.map → chunk-8p6rqegw.js.map} +0 -0
  187. /package/dist/{chunk-5t2c9194.js.map → chunk-a0sy9f9x.js.map} +0 -0
  188. /package/dist/{chunk-53w1njqz.js.map → chunk-zhsaz9cr.js.map} +0 -0
@@ -7,6 +7,6 @@
7
7
  "import type { SqlDialect } from \"./dialect\";\nimport {\n InvalidArgumentError,\n UnsupportedQueryError,\n} from \"./errors\";\nimport {\n type Fragment,\n bindValues,\n concat,\n joinFragments,\n param,\n render,\n sql as text,\n} from \"./compile/fragment\";\nimport { jsonTextParameter, retypeJsonParameters } from \"./json-param\";\n\n/**\n * SQL fragments as first-class values: `sql`, `join`, `empty`, and one door out.\n *\n * The ORM deliberately does not implement every SQL shape — `distinct`, cursor\n * pagination, window functions, recursive CTEs. That is the right call, but it\n * is only half a decision: the shapes it declines have to have somewhere to go,\n * and \"drop to raw SQL\" is not an answer if raw SQL cannot be *composed*.\n *\n * `DB.sql` — Bun's tagged template — covers a single self-contained statement,\n * and that is genuinely all it covers. The shape it cannot express is the common\n * one: a predicate list built conditionally, passed around as a value, and\n * interpolated into a larger statement.\n *\n * ```ts\n * const filters = []\n * if (q) filters.push(sql`name ilike ${`%${q}%`}`)\n * if (organizationId) filters.push(sql`\"organizationId\" = ${organizationId}`)\n *\n * const where = filters.length ? sql`where ${join(filters, \" and \")}` : empty\n * const rows = await DB.query(sql`select * from \"Product\" ${where} limit ${20}`)\n * ```\n *\n * ## This is the compiler's own `Fragment`, made public\n *\n * Not a parallel mechanism. `compile/fragment.ts` has held exactly this shape\n * since iteration 1 — text plus positional binders, composable, never\n * concatenating a value into the text — because that is what invariant 2 needs\n * internally. Reusing it means a public fragment binds by the same rule the\n * compiler's own SQL does, and it means the parameter ceiling, the placeholder\n * numbering and the dialect split are all already handled rather than\n * reimplemented one door down.\n *\n * **Placeholders are assigned at assembly, not at authoring.** SQLite writes\n * `?` and Postgres writes `$1`, `$2`, and a fragment does not know where in the\n * final statement it will land — so `sql` records a *position* and `render`\n * turns it into a placeholder once the whole statement exists. That is what lets\n * the same fragment be nested, reused twice in one statement, or built before\n * the dialect is even known.\n */\n\n/**\n * A composable piece of SQL. Its values are bound parameters, never text.\n *\n * Opaque on purpose: an application builds one with `sql`, combines it with\n * `join`, and hands it to `DB.query` / `DB.execute`. Reading `.text` off it is\n * not part of the contract — it holds parameter *markers* rather than the\n * dialect's placeholders, so it is not the statement that runs.\n */\nexport type SqlFragment = Fragment;\n\n/**\n * Every fragment this module has produced.\n *\n * **Identity, not shape, and the difference is a SQL injection.** `interpolate`\n * splices a fragment as text and binds everything else, so \"is this a fragment\"\n * decides whether a value reaches the statement or a parameter. Asking the\n * *shape* — a `text` string and a `binders` array — makes that decision\n * answerable by anything that can name two properties, and `{\"text\": \"…\",\n * \"binders\": []}` is two lines of JSON:\n *\n * ```ts\n * const body = await request.json()\n * await DB.query(sql`select \"email\" from \"User\" where \"email\" = ${body.email}`)\n * // body.email = { text: `'' union select \"password\" from \"User\"`, binders: [] }\n * // -> select \"email\" from \"User\" where \"email\" = '' union select \"password\" from \"User\"\n * ```\n *\n * That is the intended call site with the intended safe value, and it returned\n * the password column out of a statement selecting only `email`. The internal\n * `Fragment` never had the problem because nothing outside `compile/` could\n * construct one; making the type public is what turned \"text plus binders\" from\n * an implementation detail into a shape an attacker can name. `unsafeSql` is\n * built so that reaching for the escape hatch is a decision — a structural check\n * is a second, unmarked door beside it.\n *\n * A `WeakSet` the module owns cannot be forged: membership is granted only by\n * the constructors below. It registers the *returned* object rather than\n * stamping a property, because `concat` and `joinFragments` return fresh objects\n * — a marker property on the inputs would not survive them, and the version that\n * cannot drift is the one that brands what actually comes out.\n */\nconst FRAGMENTS = new WeakSet<object>();\n\nfunction brand(fragment: Fragment): SqlFragment {\n FRAGMENTS.add(fragment);\n return fragment;\n}\n\n/** Whether a value is a fragment *this module made*, so it splices rather than binds. */\nfunction isFragment(value: unknown): value is Fragment {\n return typeof value === \"object\" && value !== null && FRAGMENTS.has(value);\n}\n\n/**\n * A SQL fragment. Every `${value}` is bound as a parameter; a `${fragment}` is\n * spliced in, carrying its own parameters with it.\n *\n * ```ts\n * sql`where \"id\" = ${id}` // \"id\" = $1, with id bound\n * sql`where ${sql`\"a\" = ${1}`} and ${sql`\"b\" = ${2}`}` // nests to any depth\n * ```\n *\n * An interpolated **array** is bound as one value, not expanded — that is what\n * Postgres's `= any($1)` wants, and it is the only reading that does not depend\n * on the dialect. For a comma-separated list of placeholders, say so with\n * `join`.\n *\n * A value at a `::jsonb` cast the caller wrote is the one parameter with a type\n * behind it, and it is bound as **JSON text** so that the statement means what\n * the same statement meant under Prisma's `$executeRaw`:\n *\n * ```ts\n * sql`… set payload = payload || ${JSON.stringify(patch)}::jsonb` // merges\n * ```\n *\n * Without that the driver would JSON-encode the string and the column would\n * hold the document as a jsonb *string* — which `||` appends as an array\n * element rather than merging. `json-param.ts` has the measurements.\n */\nexport function sql(\n strings: TemplateStringsArray,\n ...values: unknown[]\n): SqlFragment {\n // A defensive check rather than a type error, because the interesting misuse\n // is `sql(userInput)` — a plain call with a string, which would otherwise\n // reach `strings.raw` as `undefined` and produce a fragment of `undefined`\n // text rather than an error. It is also the shape somebody reaches for when\n // they want the escape hatch and have not found `unsafeSql`.\n if (!Array.isArray(strings) || !(\"raw\" in (strings as object))) {\n throw new UnsupportedQueryError(\n \"sql\",\n \"DB\",\n \"sql\",\n `'sql' is a tagged template — write sql\\`select 1\\`, not sql(\"select 1\"). ` +\n `To put text that is not a value into a statement, use 'unsafeSql', ` +\n `and read what it says first.`,\n );\n }\n\n const parts: Fragment[] = [];\n\n for (let i = 0; i < strings.length; i++) {\n parts.push(text(strings[i]));\n if (i < values.length) parts.push(interpolate(values[i]));\n }\n\n return brand(concat(...parts));\n}\n\n/**\n * Fragments — or values — joined by a separator, the way `Array.join` reads.\n *\n * ```ts\n * join(filters, \" and \") // a and b and c\n * join([sql`\"a\" asc`, sql`\"b\" desc`]) // \"a\" asc, \"b\" desc\n * join(ids) // $1, $2, $3 — each bound\n * ```\n *\n * An **empty list produces `empty`**, not a separator and not a syntax error, so\n * `join` composes with a list that turned out to have nothing in it. That is the\n * case a caller forgets, and it is the one that would otherwise emit `where ` and\n * fail at the database rather than here.\n *\n * ## The separator is text, so it is not a free string\n *\n * It goes between the fragments *in the statement*, which makes it the one other\n * place a string could reach the SQL — and this module's whole claim is that\n * `unsafeSql` is **the** door. So a plain-string separator has to be glue and\n * nothing else: whitespace, commas, or a boolean connective. Anything more\n * expressive is legitimate and has to say so:\n *\n * ```ts\n * join(filters, \" and \") // fine\n * join(parts, unsafeSql(\") and (\")) // fine, and visibly a decision\n * join(ids, request.query.sep) // refused\n * ```\n *\n * A **blocklist would not do**, which is why this is an allowlist. The obvious\n * one — reject quotes, semicolons and comment markers — lets this through:\n *\n * join([1, 2], \") or 1=1 union select password from Users where 1=(1\")\n *\n * No quote, no `--`, still an injection. There is no sound way to say \"this\n * arbitrary text is safe glue\", so the rule is that glue is a small closed set\n * and everything else is a fragment somebody built on purpose.\n */\nexport function join(\n values: readonly unknown[],\n separator: string | SqlFragment = \", \",\n): SqlFragment {\n if (!Array.isArray(values)) {\n throw new InvalidArgumentError(\n \"join\",\n \"DB\",\n \"sql\",\n `Expected an array of fragments or values, got ${typeof values}.`,\n );\n }\n if (values.length === 0) return empty;\n\n const parts = values.map(interpolate);\n\n if (isFragment(separator)) {\n const woven: Fragment[] = [];\n for (let i = 0; i < parts.length; i++) {\n if (i > 0) woven.push(separator);\n woven.push(parts[i]);\n }\n return brand(concat(...woven));\n }\n\n assertGlue(separator);\n return brand(joinFragments(parts, separator));\n}\n\n/**\n * Whitespace and commas, or a boolean connective surrounded by whitespace.\n *\n * Deliberately small. Every separator a composed statement actually needs is in\n * here — `\", \"`, `\" and \"`, `\" or \"`, `\" \"` — and everything outside it is\n * expressive enough to change what the statement *does*, which is the property\n * that makes it a `unsafeSql` decision rather than a string argument.\n */\nconst GLUE = /^[\\s,]*$|^\\s*(?:and|or)\\s*$/i;\n\nfunction assertGlue(separator: unknown): void {\n if (typeof separator === \"string\" && GLUE.test(separator)) return;\n\n throw new InvalidArgumentError(\n \"join\",\n \"DB\",\n \"sql\",\n typeof separator === \"string\"\n ? `A separator is written into the SQL text, so it may only be glue: ` +\n `whitespace, commas, or 'and' / 'or'. Got ` +\n `${JSON.stringify(separator)}. If that is deliberate, say so with ` +\n `unsafeSql(...) — and never build one from anything that came from ` +\n `outside the program.`\n : `Expected a separator string or a fragment, got ${\n separator === null ? \"null\" : typeof separator\n }.`,\n );\n}\n\n/**\n * The fragment that contributes nothing.\n *\n * The point of it is that `where ${empty}` and `where ${filter}` are the same\n * expression — a conditional predicate is a value, not a branch around the\n * statement. Frozen, because it is shared by every caller and a fragment is read\n * as immutable everywhere else.\n */\nexport const empty: SqlFragment = brand(\n Object.freeze({ text: \"\", binders: Object.freeze([]) as [] }),\n);\n\n/**\n * **Text straight into the SQL, with no parameter around it.** The one door in\n * this ORM through which a value reaches the statement text.\n *\n * Everything else in the compiler exists to make this impossible — identifiers\n * come from the generated schema, values are bound — so reaching for it should\n * feel like reaching for it. **Never give it a value that came from a request, a\n * form, a URL, a header, a queue payload or a database row.** There is no\n * escaping here and there will not be: escaping that is \"usually right\" is worse\n * than none, because it survives review.\n *\n * ## Why it exists at all, since that is the fair question\n *\n * Plan quality can depend on *not* parameterising. A partial index declared as\n *\n * ```sql\n * create index … on \"Job\" (…) where \"name\" is distinct from 'reaper'\n * ```\n *\n * is only usable if the planner can prove the query's predicate matches the\n * index's. A bound parameter is opaque at plan time, so `where \"name\" is\n * distinct from $1` does not match — and the query falls back to a sequential\n * scan over the whole table. The constant has to be *in the text*:\n *\n * ```ts\n * const REAPER = unsafeSql(`'reaper'`) // a literal in this file, never input\n * await DB.query(sql`\n * select … from \"Job\" where \"name\" is distinct from ${REAPER} …\n * `)\n * ```\n *\n * A builder with no escape hatch cannot express that at any price, and the\n * workaround — hand-writing the whole statement — loses composition for every\n * other part of it.\n *\n * The same applies to the other things that cannot be parameters in SQL:\n * identifiers, a sort direction, a table name chosen from a fixed set in code.\n * All of them share the rule above — the value is written in the source file, or\n * chosen from a set written in the source file, never passed in.\n */\nexport function unsafeSql(literal: string): SqlFragment {\n if (typeof literal !== \"string\") {\n throw new InvalidArgumentError(\n \"unsafeSql\",\n \"DB\",\n \"sql\",\n `Expected a string literal, got ${\n Array.isArray(literal) ? \"an array\" : typeof literal\n }. 'unsafeSql' is a plain call, not a tagged template — a template would ` +\n `interpolate values into the SQL text, which is the one thing it must ` +\n `never do.`,\n );\n }\n return brand(text(literal));\n}\n\n/**\n * A fragment as the statement a driver can run: the dialect's placeholders in\n * the text, and the values in the order they appear.\n *\n * Separate from the executing, and exported, because it is the half that is a\n * pure function of `(fragment, dialect)` — so a test can assert what a\n * composition emits on both dialects without a database anywhere near it, which\n * is exactly how the rest of the compiler is tested.\n *\n * `render` also applies the parameter ceiling here, which matters more for a\n * hand-built fragment than for a compiled plan: `join(ids)` over a\n * request-derived list is one placeholder per element on SQLite, and 40 000 of\n * them is a driver error rather than a clear one.\n */\nexport function renderFragment(\n fragment: SqlFragment,\n dialect: SqlDialect,\n operation = \"query\",\n): { text: string; values: unknown[] } {\n if (!isFragment(fragment)) {\n throw new InvalidArgumentError(\n operation,\n \"DB\",\n operation,\n `Expected a fragment built with 'sql', got ${\n fragment === null ? \"null\" : typeof fragment\n }. A plain string is not accepted here on purpose — it would be the one ` +\n `path into the SQL text that nobody had to think about.`,\n );\n }\n\n // The one thing a raw parameter can be *told* about its type: a `::jsonb` the\n // caller wrote onto their own placeholder. Where there is one, the parameter\n // is retyped through `text` and its value serialised, because Bun otherwise\n // JSON-encodes a string bound to a `jsonb` parameter and stores the document\n // as a jsonb *string* where Prisma stored the object. See `json-param.ts` —\n // the mechanism, the measurements, and why a string is not serialised here\n // while `fieldParam` serialises one.\n //\n // The dialect is passed because this is not universal, and the reason is\n // narrower than it looks: `::` is Postgres-only syntax, but `cast(? as json)`\n // *parses and runs* on SQLite, where it means NUMERIC affinity — so retyping\n // it would rewrite a working statement into `cast(? as text)::json`, which\n // SQLite cannot parse. `typesParametersFromStatement` is false there.\n const json = retypeJsonParameters(fragment, dialect);\n\n const rendered = render(json.fragment, dialect, { model: \"DB\", operation });\n return {\n text: rendered.text,\n // `encodeUntyped` and not `encode`: there is no field here to ask, which is\n // the whole difference between a fragment's parameters and a compiled\n // plan's. It normalises the two JavaScript types whose SQL form the ORM has\n // already decided — a `Date` and a boolean — so a raw statement compares\n // against ORM-written rows on both dialects rather than only on Postgres.\n values: bindValues(rendered.binders)(undefined).map((value, index) =>\n json.jsonParameters.has(index)\n ? jsonTextParameter(value, operation)\n : value === null || value === undefined\n ? (value ?? null)\n : dialect.encodeUntyped(value),\n ),\n };\n}\n\n/**\n * One interpolated slot: a fragment splices, anything else binds.\n *\n * The binder ignores both its arguments. A compiled plan's binders read the\n * *call's* argument tree, because one plan serves many calls; a fragment is\n * built per call and closes over the value it was given, which is the whole\n * difference between the compiler's fragments and these.\n */\nfunction interpolate(value: unknown): Fragment {\n if (isFragment(value)) return value;\n return param(() => value);\n}\n"
8
8
  ],
9
9
  "mappings": ";wLACA,sBAAS,oBAmFF,IAAM,EAAa,IAAI,EAavB,SAAS,CAAkB,EAA+B,CAC/D,OAAO,EAAW,SAAS,GAAG,GAUzB,SAAS,CAAqB,EAAW,CAC9C,OAAO,EAAW,SAAS,GAAG,YAAc,EAgBvC,SAAS,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SACrB,MAAM,IAAI,EACR,YACA,KACA,MACA,kCACE,MAAM,QAAQ,CAAO,EAAI,WAAa,OAAO,iFAE7C,gFAEJ,EAEF,OAAO,EAAM,EAAK,CAAO,CAAC,EAiBrB,SAAS,EAAc,CAC5B,EACA,EACA,EAAY,QACyB,CACrC,GAAI,CAAC,EAAW,CAAQ,EACtB,MAAM,IAAI,EACR,EACA,KACA,EACA,6CACE,IAAa,KAAO,OAAS,OAAO,gFAEpC,wDACJ,EAgBF,IAAM,EAAO,EAAqB,EAAU,CAAO,EAE7C,EAAW,EAAO,EAAK,SAAU,EAAS,CAAE,MAAO,KAAM,WAAU,CAAC,EAC1E,MAAO,CACL,KAAM,EAAS,KAMf,OAAQ,EAAW,EAAS,OAAO,EAAE,MAAS,EAAE,IAAI,CAAC,EAAO,IAC1D,EAAK,eAAe,IAAI,CAAK,EACzB,EAAkB,EAAO,CAAS,EAClC,IAAU,MAAQ,IAAU,OACzB,GAAS,KACV,EAAQ,cAAc,CAAK,CACnC,CACF,EAWF,SAAS,CAAW,CAAC,EAA0B,CAC7C,GAAI,EAAW,CAAK,EAAG,OAAO,EAC9B,OAAO,EAAM,IAAM,CAAK",
10
- "debugId": "1BB8E88169ADF3D464756E2164756E21",
10
+ "debugId": "34A0266685FB589164756E2164756E21",
11
11
  "names": []
12
12
  }
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{c as D,d as v}from"./chunk-hbycemy5.js";import"./chunk-ppt296ye.js";import{Eb as q}from"./chunk-ha7n1c94.js";import{$b as P,cc as V}from"./chunk-km6x37ws.js";import"./chunk-et0j6jx8.js";import"./chunk-1ce7veh9.js";import"./chunk-qj4mmner.js";import"./chunk-0tbwn6er.js";import"./chunk-4t6a82fh.js";import"./chunk-3y9nf09k.js";import"./chunk-88pq4gmf.js";import"./chunk-mt2755rs.js";import"./chunk-qyaqg07q.js";import"./chunk-0h3jr9d9.js";import{join as E}from"path";import{Duplex as o}from"stream";import{constants as T,createBrotliCompress as l,createGzip as n}from"zlib";var i=["br","gzip"],t=1024,a=5,s=19,r=6;function e($){if($===void 0)return 1;if(!/^\d+(\.\d{0,3})?$/.test($.trim()))return 1;let J=Number($.trim());return Number.isFinite(J)?Math.min(J,1):1}function JJ($){if($===null||$===void 0)return null;let J=new Map;for(let H of $.split(",")){let[Z,...X]=H.split(";"),j=Z.trim().toLowerCase();if(j==="")continue;let x=1;for(let K of X){let O=K.indexOf("=");if(O===-1)continue;if(K.slice(0,O).trim().toLowerCase()==="q"){x=e(K.slice(O+1));break}}J.set(j,x)}return J}function $J($,J=i){let H=JJ($);if(!H)return null;let Z=H.get("*"),X=null,j=0;for(let x of J){let K=H.get(x)??Z??0;if(K>j)X=x,j=K}return X}function HJ($,J){if(!$)return!1;return $.split(",").some((H)=>H.trim().toLowerCase().split("=")[0].trim()===J)}function UJ($,J){if($==="HEAD")return!1;if(!J.body)return!1;if(J.status<200||J.status===204||J.status===206||J.status===304)return!1;if(J.headers.has("Content-Range"))return!1;let H=J.headers.get("Content-Type");if(!H||!/^\s*text\/html\s*(;|$)/i.test(H))return!1;let Z=J.headers.get("Content-Encoding");if(Z&&Z.trim().toLowerCase()!=="identity")return!1;if(HJ(J.headers.get("Cache-Control"),"no-transform"))return!1;let X=J.headers.get("Content-Length");if(X!==null&&Number(X)<t)return!1;return!0}function ZJ($){let J=$==="br"?l({params:{[T.BROTLI_PARAM_QUALITY]:a,[T.BROTLI_PARAM_LGWIN]:s},flush:T.BROTLI_OPERATION_FLUSH}):n({level:r,flush:T.Z_SYNC_FLUSH});return o.toWeb(J)}function zJ($){let J=$.get("Vary");if(!J){$.set("Vary","Accept-Encoding");return}let H=J.split(",").map((Z)=>Z.trim().toLowerCase());if(H.includes("*")||H.includes("accept-encoding"))return;$.append("Vary","Accept-Encoding")}function F($,J){if(!UJ($.method,J))return J;let H=new Headers(J.headers);zJ(H);let Z=$J($.headers.get("Accept-Encoding"));if(!Z)return new Response(J.body,{status:J.status,statusText:J.statusText,headers:H});let X;try{X=ZJ(Z)}catch{return new Response(J.body,{status:J.status,statusText:J.statusText,headers:H})}return H.set("Content-Encoding",Z),H.delete("Content-Length"),new Response(J.body.pipeThrough(X),{status:J.status,statusText:J.statusText,headers:H})}function y($){let J=$.toString(),H=new Bun.CryptoHasher("sha1");return H.update(J),H.digest("hex")}if(!globalThis.URLPattern)globalThis.URLPattern=P;import{exists as GJ}from"fs/promises";var g="app/client.tsx";function w($){let J=$["app/client.tsx"]?.file;if(!J)return;return{module:`/${J}`,preload:S($,"app/client.tsx")}}function S($,J){let H=[],Z=new Set,X=(j)=>{if(Z.has(j))return;Z.add(j);let x=$[j];if(!x?.file)return;H.push(`/${x.file}`);for(let K of x.imports??[])X(K)};return X(J),H}var I=q(),XJ=E(I,"app"),L=E(I,"dist");async function VJ($,J){let H=await import(`${L}/client/.vite/manifest.json`),Z=await import(`${L}/server/.vite/manifest.json`);process.env.ROOT_DIR=I,process.env.APP_DIR=XJ,process.env.DIST_DIR=L;let X={},j={},x={},K={},O={},f=(U,G)=>`"${U}": () => import("${G}")`,k=[];for(let U of["404",...$.getFlatComponentTree.call($)]){let G=Z[`app/views/${U}.tsx`];if(!G?.file){console.log(`Server file not found for ${U}`),console.log(G);let W=Object.keys(Z),A=`app/views/${U}.tsx`;console.log(`${A} not found in server manifest`),console.log(W)}let Q=await import(`${process.env.DIST_DIR}/server/${G?.file}`);X[U]=Q.default,j[U]=Q.OpenGraph,x[U]=Q;let z=H[`app/views/${U}.tsx`];if(z?.css&&z?.css.length>0)K[U]=z?.css;if(z)k.push(f(U,`/${z?.file}`)),O[U]=S(H,`app/views/${U}.tsx`)}let u=`{${k.join(",")}}`,N=w(H);if(!N)console.error(`Client manifest has no "${g}" entry \u2014 dist/client is incomplete, so documents will render but never hydrate.`);let m=H["app/client.tsx"]?.css??[],h=(await Promise.all(m.map((U)=>Bun.file(`${L}/client/${U}`).text()))).join(`
3
+ `),c=new P({pathname:"/*.:filetype(png|txt|js|css|jpg|svg|jpeg|avif|webp|ico|ttf|map)"});async function p(U){let{pathname:G}=new URL(U.url),Q=G.startsWith("/.well-known"),z=c.test({pathname:G})||Q,W=G.startsWith("/api");if(z&&!W){let A=new URL(U.url),b=U.url.replace(A.origin,"").split("?")[0],B=`${L}/client${b.replace("/assets/assets","/assets")}`,C=await GJ(B);if(!C&&A.pathname.includes(".js"))return new Response(`if(caches){caches?.delete("${B}")}window.location.reload();export {}`,{headers:{"Content-Type":"application/javascript"}});if(!C){if(G===V||G.startsWith(`${V}/`))return new Response("Not found",{status:404});return await R(U,G)}try{let Y=Bun.file(B),_=y(Y.lastModified);return new Response(Y.stream(),{headers:{"Content-Type":Y.type,"Cache-Control":"public, max-age=31536000, must-revalidate","Content-Length":String(Y.size),ETag:_}})}catch(Y){return $.onException?.(Y),new Response("Not found",{status:404})}}return await R(U,G)}async function R(U,G){let Q=$.fetch.bind($);try{let z=await Q(U);if(z instanceof Response)return z;else{let W=[];return W.push({content:h}),await z({getStyles:async(b)=>{if(!b)return D([]);for(let B of b){let C=H[`app/views/${B}.tsx`];for(let Y of C?.css??[]){let _=Bun.file(`${process.env.DIST_DIR}/client/${Y}`);W.push({id:Y,content:await _.text()})}}return D(W)},clientEntry:N,modulePreloadManifest:O,loaders:u,viewImportMap:X,viewModules:x,ogMap:j,cssManifest:K})}}catch(z){if(console.error(z),G.startsWith("/api"))return new Response(JSON.stringify({error:z.message}),{status:500,headers:{"Content-Type":"application/json"}});return $.onException?.(z),new Response(z.stack,{status:500})}}let d=(process.env.GEMI_COMPRESSION??"auto").toLowerCase()!=="off",M=Bun.serve({maxRequestBodySize:10737418240,fetch:async(U,G)=>{if(!U.headers.get("x-forwarded-for")){let z=G.requestIP(U);if(z)U.headers.set("x-forwarded-for",z.address)}let Q=await J(U,p);return d?F(U,Q):Q},idleTimeout:Number(process.env.SERVER_IDLE_TIMEOUT??10),port:process.env.PORT||5173});return v({port:M.port,rootDir:I}),M}export{VJ as httpProd};
4
+
5
+ //# debugId=853AC08B0003403364756E2164756E21
@@ -8,7 +8,7 @@
8
8
  "import { URLPattern } from \"./dist/urlpattern.js\";\n\nexport { URLPattern };\n\nif (!globalThis.URLPattern) {\n globalThis.URLPattern = URLPattern;\n}\n",
9
9
  "/** The subset of a Vite manifest entry this module reads. */\nexport interface ViteManifestChunk {\n file: string;\n imports?: string[];\n dynamicImports?: string[];\n}\n\nexport type ViteManifest = Record<string, ViteManifestChunk>;\n\n/** Vite's manifest key for the module that boots hydration. */\nexport const CLIENT_ENTRY_KEY = \"app/client.tsx\";\n\n/**\n * How the shell boots hydration in production: `module` is imported from the\n * bootstrap script, `preload` is every chunk that import pulls in — see\n * `clientEntry` in `ViewRouteDispatcher` for why the entry does not go through\n * React's `bootstrapModules`.\n *\n * `undefined` when the manifest has no client entry, which means a `dist/`\n * interrupted between the server and client build passes. Degrading beats\n * throwing here: this runs at boot, so a deref would take down API routes,\n * static assets and health checks over what is only a document concern, and\n * the dispatcher already renders a shell that simply does not hydrate.\n */\nexport function createClientEntry(\n manifest: ViteManifest,\n): { module: string; preload: string[] } | undefined {\n const file = manifest[CLIENT_ENTRY_KEY]?.file;\n if (!file) {\n return undefined;\n }\n return {\n module: `/${file}`,\n preload: collectModulePreloads(manifest, CLIENT_ENTRY_KEY),\n };\n}\n\n/**\n * Every chunk URL that importing `entryKey` pulls in, itself first.\n *\n * The browser can only discover these one parse at a time — it learns about a\n * chunk's static imports after the chunk has arrived and been parsed — so a\n * `layout -> view -> child component` graph costs one round trip per level.\n * Handing the whole list to the shell as `modulepreload` hints turns that\n * chain into one parallel fetch (#352).\n *\n * `dynamicImports` are deliberately left out: those are the pieces the app\n * asked to load lazily, and preloading them would download code the current\n * route may never render.\n */\nexport function collectModulePreloads(manifest: ViteManifest, entryKey: string): string[] {\n const urls: string[] = [];\n // Chunk graphs are cyclic often enough (two chunks importing each other\n // through a shared module) that walking them without a visited set hangs.\n const visited = new Set<string>();\n\n const walk = (key: string) => {\n if (visited.has(key)) return;\n visited.add(key);\n const chunk = manifest[key];\n if (!chunk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AAI,qBAAuB,EAAE,EACzD,KAAM,QAAQ,IAAI,MAAQ,IAC5B,CAAC,EAID,OAFA,EAAmB,CAAE,KAAM,EAAO,KAAM,SAAQ,CAAC,EAE1C",
12
+ "debugId": "853AC08B0003403364756E2164756E21",
13
13
  "names": []
14
14
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{a as ps}from"./chunk-8zd6d5nd.js";import{$ as Oo,U as Se,W as X,X as qs,Y as Fs,Z as Ws,aa as Ko,ba as as,ca as ws,da as gt,ea as Us,fa as lo,ga as Qt,ha as ls,ia as Es,ja as Ps,ka as ys,la as Zr,ma as ro}from"./chunk-rxeyhwqz.js";import{na as us}from"./chunk-an6nq9yd.js";import"./chunk-zezdm4ep.js";import{Aa as k,pa as $o,qa as Jr,sa as cs,wa as dt}from"./chunk-q0xq0pt0.js";import{Ba as hs}from"./chunk-3fcgg506.js";import{Ca as Bs}from"./chunk-zznpmnp7.js";import{Fa as Hr}from"./chunk-dk01r6se.js";import{Ga as Xr}from"./chunk-kv8p4h79.js";import"./chunk-94k8pjmf.js";import"./chunk-1sbm38g3.js";import{Ja as ds}from"./chunk-5v36t9j3.js";import{Ie as y}from"./chunk-zwpx6z5f.js";var Z=y(($e)=>{Object.defineProperty($e,"__esModule",{value:!0});$e.resolveHttpAuthSchemeConfig=$e.resolveStsAuthConfig=$e.defaultSTSHttpAuthSchemeProvider=$e.defaultSTSHttpAuthSchemeParametersProvider=void 0;var bo=X(),J=$o(),ho=C(),No=async(e,t,r)=>{return{operation:(0,J.getSmithyContext)(t).operation,region:await(0,J.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};$e.defaultSTSHttpAuthSchemeParametersProvider=No;function qo(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Fo(e){return{schemeId:"smithy.api#noAuth"}}var Wo=(e)=>{let t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(Fo(e));break}default:t.push(qo(e))}return t};$e.defaultSTSHttpAuthSchemeProvider=Wo;var wo=(e)=>Object.assign(e,{stsClientCtor:ho.STSClient});$e.resolveStsAuthConfig=wo;var Uo=(e)=>{let t=$e.resolveStsAuthConfig(e),r=(0,bo.resolveAwsSdkSigV4Config)(t);return Object.assign(r,{authSchemePreference:(0,J.normalizeProvider)(e.authSchemePreference??[])})};$e.resolveHttpAuthSchemeConfig=Uo});var f=y((Ne)=>{Object.defineProperty(Ne,"__esModule",{value:!0});Ne.commonParams=Ne.resolveClientEndpointParameters=void 0;var Lo=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"})};Ne.resolveClientEndpointParameters=Lo;Ne.commonParams={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var et=y((Ce)=>{Object.defineProperty(Ce,"__esModule",{value:!0});Ce.ruleSet=void 0;var Ve="required",o="type",n="fn",i="argv",v="ref",Fe=!1,ee=!0,S="booleanEquals",p="stringEquals",ze="sigv4",Be="sts",ge="us-east-1",c="endpoint",We="https://sts.{Region}.{PartitionResult#dnsSuffix}",R="tree",M="error",oe="getAttr",we={[Ve]:!1,[o]:"string"},te={[Ve]:!0,default:!1,[o]:"boolean"},Qe={[v]:"Endpoint"},Ue={[n]:"isSet",[i]:[{[v]:"Region"}]},l={[v]:"Region"},Me={[n]:"aws.partition",[i]:[l],assign:"PartitionResult"},Ye={[v]:"UseFIPS"},He={[v]:"UseDualStack"},P={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:ze,signingName:Be,signingRegion:ge}]},headers:{}},_={},ke={conditions:[{[n]:p,[i]:[l,"aws-global"]}],[c]:P,[o]:c},Je={[n]:S,[i]:[Ye,!0]},Xe={[n]:S,[i]:[He,!0]},Le={[n]:oe,[i]:[{[v]:"PartitionResult"},"supportsFIPS"]},Ze={[v]:"PartitionResult"},je={[n]:S,[i]:[!0,{[n]:oe,[i]:[Ze,"supportsDualStack"]}]},Ge=[{[n]:"isSet",[i]:[Qe]}],Oe=[Je],Ke=[Xe],Go={version:"1.0",parameters:{Region:we,UseDualStack:te,UseFIPS:te,Endpoint:we,UseGlobalEndpoint:te},rules:[{conditions:[{[n]:S,[i]:[{[v]:"UseGlobalEndpoint"},ee]},{[n]:"not",[i]:Ge},Ue,Me,{[n]:S,[i]:[Ye,Fe]},{[n]:S,[i]:[He,Fe]}],rules:[{conditions:[{[n]:p,[i]:[l,"ap-northeast-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"ap-south-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"ap-southeast-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"ap-southeast-2"]}],endpoint:P,[o]:c},ke,{conditions:[{[n]:p,[i]:[l,"ca-central-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-central-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-north-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-west-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-west-2"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-west-3"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"sa-east-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,ge]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"us-east-2"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"us-west-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"us-west-2"]}],endpoint:P,[o]:c},{endpoint:{url:We,properties:{authSchemes:[{name:ze,signingName:Be,signingRegion:"{Region}"}]},headers:_},[o]:c}],[o]:R},{conditions:Ge,rules:[{conditions:Oe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[o]:M},{conditions:Ke,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[o]:M},{endpoint:{url:Qe,properties:_,headers:_},[o]:c}],[o]:R},{conditions:[Ue],rules:[{conditions:[Me],rules:[{conditions:[Je,Xe],rules:[{conditions:[{[n]:S,[i]:[ee,Le]},je],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:_,headers:_},[o]:c}],[o]:R},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[o]:M}],[o]:R},{conditions:Oe,rules:[{conditions:[{[n]:S,[i]:[Le,ee]}],rules:[{conditions:[{[n]:p,[i]:[{[n]:oe,[i]:[Ze,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:_,headers:_},[o]:c},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:_,headers:_},[o]:c}],[o]:R},{error:"FIPS is enabled but this partition does not support FIPS",[o]:M}],[o]:R},{conditions:Ke,rules:[{conditions:[je],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:_,headers:_},[o]:c}],[o]:R},{error:"DualStack is enabled but this partition does not support DualStack",[o]:M}],[o]:R},ke,{endpoint:{url:We,properties:_,headers:_},[o]:c}],[o]:R}],[o]:R},{error:"Invalid Configuration: Missing Region",[o]:M}]};Ce.ruleSet=Go});var rt=y((tt)=>{Object.defineProperty(tt,"__esModule",{value:!0});tt.defaultEndpointResolver=void 0;var Vo=Ko(),re=Oo(),zo=et(),Bo=new re.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),go=(e,t={})=>{return Bo.get(e,()=>(0,re.resolveEndpoint)(zo.ruleSet,{endpointParams:e,logger:t.logger}))};tt.defaultEndpointResolver=go;re.customEndpointFunctions.aws=Vo.awsEndpointFunctions});var O=y((ne)=>{Object.defineProperty(ne,"__esModule",{value:!0});ne.STSServiceException=ne.__ServiceException=void 0;var st=k();Object.defineProperty(ne,"__ServiceException",{enumerable:!0,get:function(){return st.ServiceException}});class se extends st.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,se.prototype)}}ne.STSServiceException=se});var Ee=y((it)=>{Object.defineProperty(it,"__esModule",{value:!0});it.IDPCommunicationErrorException=it.InvalidIdentityTokenException=it.IDPRejectedClaimException=it.RegionDisabledException=it.PackedPolicyTooLargeException=it.MalformedPolicyDocumentException=it.ExpiredTokenException=void 0;var A=O();class ie extends A.STSServiceException{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,ie.prototype)}}it.ExpiredTokenException=ie;class ce extends A.STSServiceException{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e});Object.setPrototypeOf(this,ce.prototype)}}it.MalformedPolicyDocumentException=ce;class de extends A.STSServiceException{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e});Object.setPrototypeOf(this,de.prototype)}}it.PackedPolicyTooLargeException=de;class ae extends A.STSServiceException{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e});Object.setPrototypeOf(this,ae.prototype)}}it.RegionDisabledException=ae;class ue extends A.STSServiceException{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e});Object.setPrototypeOf(this,ue.prototype)}}it.IDPRejectedClaimException=ue;class pe extends A.STSServiceException{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e});Object.setPrototypeOf(this,pe.prototype)}}it.InvalidIdentityTokenException=pe;class le extends A.STSServiceException{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e});Object.setPrototypeOf(this,le.prototype)}}it.IDPCommunicationErrorException=le});var Te=y((Tt)=>{Object.defineProperty(Tt,"__esModule",{value:!0});Tt.AssumeRoleWithWebIdentity$=Tt.AssumeRole$=Tt.Tag$=Tt.ProvidedContext$=Tt.PolicyDescriptorType$=Tt.Credentials$=Tt.AssumeRoleWithWebIdentityResponse$=Tt.AssumeRoleWithWebIdentityRequest$=Tt.AssumeRoleResponse$=Tt.AssumeRoleRequest$=Tt.AssumedRoleUser$=Tt.errorTypeRegistries=Tt.RegionDisabledException$=Tt.PackedPolicyTooLargeException$=Tt.MalformedPolicyDocumentException$=Tt.InvalidIdentityTokenException$=Tt.IDPRejectedClaimException$=Tt.IDPCommunicationErrorException$=Tt.ExpiredTokenException$=Tt.STSServiceException$=void 0;var Co="Arn",fo="AccessKeyId",er="AssumeRole",tr="AssumedRoleId",or="AssumeRoleRequest",rr="AssumeRoleResponse",Pe="AssumedRoleUser",sr="AssumeRoleWithWebIdentity",nr="AssumeRoleWithWebIdentityRequest",ir="AssumeRoleWithWebIdentityResponse",cr="Audience",ye="Credentials",dr="ContextAssertion",at="DurationSeconds",ar="Expiration",ur="ExternalId",pr="ExpiredTokenException",lr="IDPCommunicationErrorException",Er="IDPRejectedClaimException",Pr="InvalidIdentityTokenException",yr="Key",_r="MalformedPolicyDocumentException",ut="Policy",pt="PolicyArns",Ir="ProviderArn",Rr="ProvidedContexts",Tr="ProvidedContextsListType",Sr="ProvidedContext",vr="PolicyDescriptorType",xr="ProviderId",lt="PackedPolicySize",Dr="PackedPolicyTooLargeException",mr="Provider",Et="RoleArn",Ar="RegionDisabledException",Pt="RoleSessionName",$r="SecretAccessKey",br="SubjectFromWebIdentityToken",_e="SourceIdentity",hr="SerialNumber",Nr="SessionToken",qr="Tags",Fr="TokenCode",Wr="TransitiveTagKeys",wr="Tag",Ur="Value",Mr="WebIdentityToken",kr="arn",Lr="accessKeySecretType",$="awsQueryError",b="client",jr="clientTokenType",h="error",N="httpError",q="message",Gr="policyDescriptorListType",yt="smithy.ts.sdk.synthetic.com.amazonaws.sts",Or="tagListType",d="com.amazonaws.sts",_t=dt(),F=Ee(),Kr=O(),It=_t.TypeRegistry.for(yt);Tt.STSServiceException$=[-3,yt,"STSServiceException",0,[],[]];It.registerError(Tt.STSServiceException$,Kr.STSServiceException);var x=_t.TypeRegistry.for(d);Tt.ExpiredTokenException$=[-3,d,pr,{[$]:["ExpiredTokenException",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.ExpiredTokenException$,F.ExpiredTokenException);Tt.IDPCommunicationErrorException$=[-3,d,lr,{[$]:["IDPCommunicationError",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.IDPCommunicationErrorException$,F.IDPCommunicationErrorException);Tt.IDPRejectedClaimException$=[-3,d,Er,{[$]:["IDPRejectedClaim",403],[h]:b,[N]:403},[q],[0]];x.registerError(Tt.IDPRejectedClaimException$,F.IDPRejectedClaimException);Tt.InvalidIdentityTokenException$=[-3,d,Pr,{[$]:["InvalidIdentityToken",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.InvalidIdentityTokenException$,F.InvalidIdentityTokenException);Tt.MalformedPolicyDocumentException$=[-3,d,_r,{[$]:["MalformedPolicyDocument",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.MalformedPolicyDocumentException$,F.MalformedPolicyDocumentException);Tt.PackedPolicyTooLargeException$=[-3,d,Dr,{[$]:["PackedPolicyTooLarge",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.PackedPolicyTooLargeException$,F.PackedPolicyTooLargeException);Tt.RegionDisabledException$=[-3,d,Ar,{[$]:["RegionDisabledException",403],[h]:b,[N]:403},[q],[0]];x.registerError(Tt.RegionDisabledException$,F.RegionDisabledException);Tt.errorTypeRegistries=[It,x];var Vr=[0,d,Lr,8,0],zr=[0,d,jr,8,0];Tt.AssumedRoleUser$=[3,d,Pe,0,[tr,Co],[0,0],2];Tt.AssumeRoleRequest$=[3,d,or,0,[Et,Pt,pt,ut,at,qr,Wr,ur,hr,Fr,_e,Rr],[0,0,()=>Rt,0,1,()=>gr,64,0,0,0,0,()=>Br],2];Tt.AssumeRoleResponse$=[3,d,rr,0,[ye,Pe,lt,_e],[[()=>Tt.Credentials$,0],()=>Tt.AssumedRoleUser$,1,0]];Tt.AssumeRoleWithWebIdentityRequest$=[3,d,nr,0,[Et,Pt,Mr,xr,pt,ut,at],[0,0,[()=>zr,0],0,()=>Rt,0,1],3];Tt.AssumeRoleWithWebIdentityResponse$=[3,d,ir,0,[ye,br,Pe,lt,mr,cr,_e],[[()=>Tt.Credentials$,0],0,()=>Tt.AssumedRoleUser$,1,0,0,0]];Tt.Credentials$=[3,d,ye,0,[fo,$r,Nr,ar],[0,[()=>Vr,0],0,4],4];Tt.PolicyDescriptorType$=[3,d,vr,0,[kr],[0]];Tt.ProvidedContext$=[3,d,Sr,0,[Ir,dr],[0,0]];Tt.Tag$=[3,d,wr,0,[yr,Ur],[0,0],2];var Rt=[1,d,Gr,0,()=>Tt.PolicyDescriptorType$],Br=[1,d,Tr,0,()=>Tt.ProvidedContext$],gr=[1,d,Or,0,()=>Tt.Tag$];Tt.AssumeRole$=[9,d,er,0,()=>Tt.AssumeRoleRequest$,()=>Tt.AssumeRoleResponse$];Tt.AssumeRoleWithWebIdentity$=[9,d,sr,0,()=>Tt.AssumeRoleWithWebIdentityRequest$,()=>Tt.AssumeRoleWithWebIdentityResponse$]});var Ot=y((jt)=>{Object.defineProperty(jt,"__esModule",{value:!0});jt.getRuntimeConfig=void 0;var Cr=X(),fr=Zr(),es=Se(),ts=k(),os=Xr(),kt=Jr(),Lt=Hr(),rs=Z(),ss=rt(),ns=Te(),is=(e)=>{return{apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??kt.fromBase64,base64Encoder:e?.base64Encoder??kt.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ss.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??rs.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Cr.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(t)=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new es.NoAuthSigner}],logger:e?.logger??new ts.NoOpLogger,protocol:e?.protocol??fr.AwsQueryProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:ns.errorTypeRegistries,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??os.parseUrl,utf8Decoder:e?.utf8Decoder??Lt.fromUtf8,utf8Encoder:e?.utf8Encoder??Lt.toUtf8}};jt.getRuntimeConfig=is});var Jt=y((Yt)=>{Object.defineProperty(Yt,"__esModule",{value:!0});Yt.getRuntimeConfig=void 0;var _s=ds(),Is=_s.__importDefault(ps()),ve=X(),Kt=ls(),K=gt(),Rs=Se(),Ts=Es(),Vt=Qt(),W=us(),zt=cs(),Bt=k(),Ss=Ps(),vs=ys(),xs=as(),Ds=Ot(),ms=(e)=>{(0,Bt.emitWarningIfUnsupportedVersion)(process.version);let t=(0,vs.resolveDefaultsModeConfig)(e),r=()=>t().then(Bt.loadConfigsForDefaultMode),a=(0,Ds.getRuntimeConfig)(e);(0,ve.emitWarningIfUnsupportedVersion)(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,W.loadConfig)(ve.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,s),bodyLengthChecker:e?.bodyLengthChecker??Ss.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Kt.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:Is.default.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(E)=>E.getIdentityProvider("aws.auth#sigv4")||(async(u)=>await e.credentialDefaultProvider(u?.__config||{})()),signer:new ve.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(E)=>E.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rs.NoAuthSigner}],maxAttempts:e?.maxAttempts??(0,W.loadConfig)(Vt.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,W.loadConfig)(K.NODE_REGION_CONFIG_OPTIONS,{...K.NODE_REGION_CONFIG_FILE_OPTIONS,...s}),requestHandler:zt.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,W.loadConfig)({...Vt.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||xs.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Ts.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??zt.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,W.loadConfig)(K.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,s),useFipsEndpoint:e?.useFipsEndpoint??(0,W.loadConfig)(K.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,s),userAgentAppId:e?.userAgentAppId??(0,W.loadConfig)(Kt.NODE_APP_ID_CONFIG_OPTIONS,s)}};Yt.getRuntimeConfig=ms});var Ct=y((Xt)=>{Object.defineProperty(Xt,"__esModule",{value:!0});Xt.resolveHttpAuthRuntimeConfig=Xt.getHttpAuthExtensionConfiguration=void 0;var As=(e)=>{let{httpAuthSchemes:t,httpAuthSchemeProvider:r,credentials:a}=e;return{setHttpAuthScheme(s){let E=t.findIndex((u)=>u.schemeId===s.schemeId);if(E===-1)t.push(s);else t.splice(E,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){a=s},credentials(){return a}}};Xt.getHttpAuthExtensionConfiguration=As;var $s=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};Xt.resolveHttpAuthRuntimeConfig=$s});var io=y((so)=>{Object.defineProperty(so,"__esModule",{value:!0});so.resolveRuntimeExtensions=void 0;var ft=ro(),eo=hs(),to=k(),oo=Ct(),Ns=(e,t)=>{let r=Object.assign((0,ft.getAwsRegionExtensionConfiguration)(e),(0,to.getDefaultExtensionConfiguration)(e),(0,eo.getHttpHandlerExtensionConfiguration)(e),(0,oo.getHttpAuthExtensionConfiguration)(e));return t.forEach((a)=>a.configure(r)),Object.assign(e,(0,ft.resolveAwsRegionExtensionConfiguration)(r),(0,to.resolveDefaultRuntimeConfig)(r),(0,eo.resolveHttpHandlerRuntimeConfig)(r),(0,oo.resolveHttpAuthRuntimeConfig)(r))};so.resolveRuntimeExtensions=Ns});var C=y((De)=>{Object.defineProperty(De,"__esModule",{value:!0});De.STSClient=De.__Client=void 0;var co=qs(),Ms=Fs(),ks=Ws(),ao=ws(),Ls=gt(),xe=Se(),js=dt(),Gs=Us(),Os=lo(),uo=Qt(),Eo=k();Object.defineProperty(De,"__Client",{enumerable:!0,get:function(){return Eo.Client}});var po=Z(),Ks=f(),Vs=Jt(),zs=io();class Po extends Eo.Client{config;constructor(...[e]){let t=(0,Vs.getRuntimeConfig)(e||{});super(t);this.initConfig=t;let r=(0,Ks.resolveClientEndpointParameters)(t),a=(0,ao.resolveUserAgentConfig)(r),s=(0,uo.resolveRetryConfig)(a),E=(0,Ls.resolveRegionConfig)(s),u=(0,co.resolveHostHeaderConfig)(E),T=(0,Os.resolveEndpointConfig)(u),D=(0,po.resolveHttpAuthSchemeConfig)(T),m=(0,zs.resolveRuntimeExtensions)(D,e?.extensions||[]);this.config=m,this.middlewareStack.use((0,js.getSchemaSerdePlugin)(this.config)),this.middlewareStack.use((0,ao.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,uo.getRetryPlugin)(this.config)),this.middlewareStack.use((0,Gs.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,co.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,Ms.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,ks.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,xe.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:po.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(U)=>new xe.DefaultIdentityProviderConfig({"aws.auth#sigv4":U.credentials})})),this.middlewareStack.use((0,xe.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}}De.STSClient=Po});var nn=y((I)=>{var w=C(),z=k(),_o=lo(),Io=f(),L=Te(),V=Ee(),me=Bs(),gs=ro(),Qs=O();class B extends z.Command.classBuilder().ep(Io.commonParams).m(function(e,t,r,a){return[_o.getEndpointPlugin(r,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(L.AssumeRole$).build(){}class g extends z.Command.classBuilder().ep(Io.commonParams).m(function(e,t,r,a){return[_o.getEndpointPlugin(r,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(L.AssumeRoleWithWebIdentity$).build(){}var Ys={AssumeRoleCommand:B,AssumeRoleWithWebIdentityCommand:g};class Ae extends w.STSClient{}z.createAggregatedClient(Ys,Ae);var Ro=(e)=>{if(typeof e?.Arn==="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}return},To=async(e,t,r,a={})=>{let s=typeof e==="function"?await e():e,E=typeof t==="function"?await t():t,u="",T=s??E??(u=await gs.stsRegionDefaultResolver(a)());return r?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${s} (credential provider clientConfig)`,`${E} (contextual client)`,`${u} (STS default: AWS_REGION, profile region, or us-east-1)`),T},Hs=(e,t)=>{let r,a;return async(s,E)=>{if(a=s,!r){let{logger:U=e?.parentClientConfig?.logger,profile:j=e?.parentClientConfig?.profile,region:Q,requestHandler:G=e?.parentClientConfig?.requestHandler,credentialProviderLogger:Y,userAgentAppId:H=e?.parentClientConfig?.userAgentAppId}=e,mo=await To(Q,e?.parentClientConfig?.region,Y,{logger:U,profile:j}),Ao=!So(G);r=new t({...e,userAgentAppId:H,profile:j,credentialDefaultProvider:()=>async()=>a,region:mo,requestHandler:Ao?G:void 0,logger:U})}let{Credentials:u,AssumedRoleUser:T}=await r.send(new B(E));if(!u||!u.AccessKeyId||!u.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${E.RoleArn}`);let D=Ro(T),m={accessKeyId:u.AccessKeyId,secretAccessKey:u.SecretAccessKey,sessionToken:u.SessionToken,expiration:u.Expiration,...u.CredentialScope&&{credentialScope:u.CredentialScope},...D&&{accountId:D}};return me.setCredentialFeature(m,"CREDENTIALS_STS_ASSUME_ROLE","i"),m}},Js=(e,t)=>{let r;return async(a)=>{if(!r){let{logger:D=e?.parentClientConfig?.logger,profile:m=e?.parentClientConfig?.profile,region:U,requestHandler:j=e?.parentClientConfig?.requestHandler,credentialProviderLogger:Q,userAgentAppId:G=e?.parentClientConfig?.userAgentAppId}=e,Y=await To(U,e?.parentClientConfig?.region,Q,{logger:D,profile:m}),H=!So(j);r=new t({...e,userAgentAppId:G,profile:m,region:Y,requestHandler:H?j:void 0,logger:D})}let{Credentials:s,AssumedRoleUser:E}=await r.send(new g(a));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${a.RoleArn}`);let u=Ro(E),T={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,...s.CredentialScope&&{credentialScope:s.CredentialScope},...u&&{accountId:u}};if(u)me.setCredentialFeature(T,"RESOLVED_ACCOUNT_ID","T");return me.setCredentialFeature(T,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),T}},So=(e)=>{return e?.metadata?.handlerProtocol==="h2"},vo=(e,t)=>{if(!t)return e;else return class extends e{constructor(a){super(a);for(let s of t)this.middlewareStack.use(s)}}},xo=(e={},t)=>Hs(e,vo(w.STSClient,t)),Do=(e={},t)=>Js(e,vo(w.STSClient,t)),Xs=(e)=>(t)=>e({roleAssumer:xo(t),roleAssumerWithWebIdentity:Do(t),...t});I.$Command=z.Command;I.STSServiceException=Qs.STSServiceException;I.AssumeRoleCommand=B;I.AssumeRoleWithWebIdentityCommand=g;I.STS=Ae;I.decorateDefaultCredentialProvider=Xs;I.getDefaultRoleAssumer=xo;I.getDefaultRoleAssumerWithWebIdentity=Do;Object.prototype.hasOwnProperty.call(w,"__proto__")&&!Object.prototype.hasOwnProperty.call(I,"__proto__")&&Object.defineProperty(I,"__proto__",{enumerable:!0,value:w.__proto__});Object.keys(w).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(I,e))I[e]=w[e]});Object.prototype.hasOwnProperty.call(L,"__proto__")&&!Object.prototype.hasOwnProperty.call(I,"__proto__")&&Object.defineProperty(I,"__proto__",{enumerable:!0,value:L.__proto__});Object.keys(L).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(I,e))I[e]=L[e]});Object.prototype.hasOwnProperty.call(V,"__proto__")&&!Object.prototype.hasOwnProperty.call(I,"__proto__")&&Object.defineProperty(I,"__proto__",{enumerable:!0,value:V.__proto__});Object.keys(V).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(I,e))I[e]=V[e]})});export default nn();
2
+ import{a as ps}from"./chunk-4e61qbp4.js";import{$ as Oo,U as Se,W as X,X as qs,Y as Fs,Z as Ws,aa as Ko,ba as as,ca as ws,da as gt,ea as Us,fa as lo,ga as Qt,ha as ls,ia as Es,ja as Ps,ka as ys,la as Zr,ma as ro}from"./chunk-69w4egkg.js";import{na as $o,oa as Jr,qa as cs,ua as dt,ya as k}from"./chunk-2yth3kk2.js";import{za as hs}from"./chunk-j1knf8gv.js";import{Aa as Bs}from"./chunk-d1ahbza9.js";import{Fa as Hr}from"./chunk-23g7qdpg.js";import{Ga as us}from"./chunk-ebcgdv00.js";import{Ha as Xr}from"./chunk-q09mmr05.js";import"./chunk-t4n25km9.js";import"./chunk-tztqkat2.js";import"./chunk-kaxvw75w.js";import{La as ds}from"./chunk-092pj2j2.js";import{Qe as y}from"./chunk-0h3jr9d9.js";var Z=y(($e)=>{Object.defineProperty($e,"__esModule",{value:!0});$e.resolveHttpAuthSchemeConfig=$e.resolveStsAuthConfig=$e.defaultSTSHttpAuthSchemeProvider=$e.defaultSTSHttpAuthSchemeParametersProvider=void 0;var bo=X(),J=$o(),ho=C(),No=async(e,t,r)=>{return{operation:(0,J.getSmithyContext)(t).operation,region:await(0,J.normalizeProvider)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}};$e.defaultSTSHttpAuthSchemeParametersProvider=No;function qo(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(t,r)=>({signingProperties:{config:t,context:r}})}}function Fo(e){return{schemeId:"smithy.api#noAuth"}}var Wo=(e)=>{let t=[];switch(e.operation){case"AssumeRoleWithWebIdentity":{t.push(Fo(e));break}default:t.push(qo(e))}return t};$e.defaultSTSHttpAuthSchemeProvider=Wo;var wo=(e)=>Object.assign(e,{stsClientCtor:ho.STSClient});$e.resolveStsAuthConfig=wo;var Uo=(e)=>{let t=$e.resolveStsAuthConfig(e),r=(0,bo.resolveAwsSdkSigV4Config)(t);return Object.assign(r,{authSchemePreference:(0,J.normalizeProvider)(e.authSchemePreference??[])})};$e.resolveHttpAuthSchemeConfig=Uo});var f=y((Ne)=>{Object.defineProperty(Ne,"__esModule",{value:!0});Ne.commonParams=Ne.resolveClientEndpointParameters=void 0;var Lo=(e)=>{return Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,useGlobalEndpoint:e.useGlobalEndpoint??!1,defaultSigningName:"sts"})};Ne.resolveClientEndpointParameters=Lo;Ne.commonParams={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var et=y((Ce)=>{Object.defineProperty(Ce,"__esModule",{value:!0});Ce.ruleSet=void 0;var Ve="required",o="type",n="fn",i="argv",v="ref",Fe=!1,ee=!0,S="booleanEquals",p="stringEquals",ze="sigv4",Be="sts",ge="us-east-1",c="endpoint",We="https://sts.{Region}.{PartitionResult#dnsSuffix}",R="tree",M="error",oe="getAttr",we={[Ve]:!1,[o]:"string"},te={[Ve]:!0,default:!1,[o]:"boolean"},Qe={[v]:"Endpoint"},Ue={[n]:"isSet",[i]:[{[v]:"Region"}]},l={[v]:"Region"},Me={[n]:"aws.partition",[i]:[l],assign:"PartitionResult"},Ye={[v]:"UseFIPS"},He={[v]:"UseDualStack"},P={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:ze,signingName:Be,signingRegion:ge}]},headers:{}},_={},ke={conditions:[{[n]:p,[i]:[l,"aws-global"]}],[c]:P,[o]:c},Je={[n]:S,[i]:[Ye,!0]},Xe={[n]:S,[i]:[He,!0]},Le={[n]:oe,[i]:[{[v]:"PartitionResult"},"supportsFIPS"]},Ze={[v]:"PartitionResult"},je={[n]:S,[i]:[!0,{[n]:oe,[i]:[Ze,"supportsDualStack"]}]},Ge=[{[n]:"isSet",[i]:[Qe]}],Oe=[Je],Ke=[Xe],Go={version:"1.0",parameters:{Region:we,UseDualStack:te,UseFIPS:te,Endpoint:we,UseGlobalEndpoint:te},rules:[{conditions:[{[n]:S,[i]:[{[v]:"UseGlobalEndpoint"},ee]},{[n]:"not",[i]:Ge},Ue,Me,{[n]:S,[i]:[Ye,Fe]},{[n]:S,[i]:[He,Fe]}],rules:[{conditions:[{[n]:p,[i]:[l,"ap-northeast-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"ap-south-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"ap-southeast-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"ap-southeast-2"]}],endpoint:P,[o]:c},ke,{conditions:[{[n]:p,[i]:[l,"ca-central-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-central-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-north-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-west-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-west-2"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"eu-west-3"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"sa-east-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,ge]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"us-east-2"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"us-west-1"]}],endpoint:P,[o]:c},{conditions:[{[n]:p,[i]:[l,"us-west-2"]}],endpoint:P,[o]:c},{endpoint:{url:We,properties:{authSchemes:[{name:ze,signingName:Be,signingRegion:"{Region}"}]},headers:_},[o]:c}],[o]:R},{conditions:Ge,rules:[{conditions:Oe,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[o]:M},{conditions:Ke,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[o]:M},{endpoint:{url:Qe,properties:_,headers:_},[o]:c}],[o]:R},{conditions:[Ue],rules:[{conditions:[Me],rules:[{conditions:[Je,Xe],rules:[{conditions:[{[n]:S,[i]:[ee,Le]},je],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:_,headers:_},[o]:c}],[o]:R},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[o]:M}],[o]:R},{conditions:Oe,rules:[{conditions:[{[n]:S,[i]:[Le,ee]}],rules:[{conditions:[{[n]:p,[i]:[{[n]:oe,[i]:[Ze,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:_,headers:_},[o]:c},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:_,headers:_},[o]:c}],[o]:R},{error:"FIPS is enabled but this partition does not support FIPS",[o]:M}],[o]:R},{conditions:Ke,rules:[{conditions:[je],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:_,headers:_},[o]:c}],[o]:R},{error:"DualStack is enabled but this partition does not support DualStack",[o]:M}],[o]:R},ke,{endpoint:{url:We,properties:_,headers:_},[o]:c}],[o]:R}],[o]:R},{error:"Invalid Configuration: Missing Region",[o]:M}]};Ce.ruleSet=Go});var rt=y((tt)=>{Object.defineProperty(tt,"__esModule",{value:!0});tt.defaultEndpointResolver=void 0;var Vo=Ko(),re=Oo(),zo=et(),Bo=new re.EndpointCache({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),go=(e,t={})=>{return Bo.get(e,()=>(0,re.resolveEndpoint)(zo.ruleSet,{endpointParams:e,logger:t.logger}))};tt.defaultEndpointResolver=go;re.customEndpointFunctions.aws=Vo.awsEndpointFunctions});var O=y((ne)=>{Object.defineProperty(ne,"__esModule",{value:!0});ne.STSServiceException=ne.__ServiceException=void 0;var st=k();Object.defineProperty(ne,"__ServiceException",{enumerable:!0,get:function(){return st.ServiceException}});class se extends st.ServiceException{constructor(e){super(e);Object.setPrototypeOf(this,se.prototype)}}ne.STSServiceException=se});var Ee=y((it)=>{Object.defineProperty(it,"__esModule",{value:!0});it.IDPCommunicationErrorException=it.InvalidIdentityTokenException=it.IDPRejectedClaimException=it.RegionDisabledException=it.PackedPolicyTooLargeException=it.MalformedPolicyDocumentException=it.ExpiredTokenException=void 0;var A=O();class ie extends A.STSServiceException{name="ExpiredTokenException";$fault="client";constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});Object.setPrototypeOf(this,ie.prototype)}}it.ExpiredTokenException=ie;class ce extends A.STSServiceException{name="MalformedPolicyDocumentException";$fault="client";constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e});Object.setPrototypeOf(this,ce.prototype)}}it.MalformedPolicyDocumentException=ce;class de extends A.STSServiceException{name="PackedPolicyTooLargeException";$fault="client";constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e});Object.setPrototypeOf(this,de.prototype)}}it.PackedPolicyTooLargeException=de;class ae extends A.STSServiceException{name="RegionDisabledException";$fault="client";constructor(e){super({name:"RegionDisabledException",$fault:"client",...e});Object.setPrototypeOf(this,ae.prototype)}}it.RegionDisabledException=ae;class ue extends A.STSServiceException{name="IDPRejectedClaimException";$fault="client";constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e});Object.setPrototypeOf(this,ue.prototype)}}it.IDPRejectedClaimException=ue;class pe extends A.STSServiceException{name="InvalidIdentityTokenException";$fault="client";constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e});Object.setPrototypeOf(this,pe.prototype)}}it.InvalidIdentityTokenException=pe;class le extends A.STSServiceException{name="IDPCommunicationErrorException";$fault="client";constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e});Object.setPrototypeOf(this,le.prototype)}}it.IDPCommunicationErrorException=le});var Te=y((Tt)=>{Object.defineProperty(Tt,"__esModule",{value:!0});Tt.AssumeRoleWithWebIdentity$=Tt.AssumeRole$=Tt.Tag$=Tt.ProvidedContext$=Tt.PolicyDescriptorType$=Tt.Credentials$=Tt.AssumeRoleWithWebIdentityResponse$=Tt.AssumeRoleWithWebIdentityRequest$=Tt.AssumeRoleResponse$=Tt.AssumeRoleRequest$=Tt.AssumedRoleUser$=Tt.errorTypeRegistries=Tt.RegionDisabledException$=Tt.PackedPolicyTooLargeException$=Tt.MalformedPolicyDocumentException$=Tt.InvalidIdentityTokenException$=Tt.IDPRejectedClaimException$=Tt.IDPCommunicationErrorException$=Tt.ExpiredTokenException$=Tt.STSServiceException$=void 0;var Co="Arn",fo="AccessKeyId",er="AssumeRole",tr="AssumedRoleId",or="AssumeRoleRequest",rr="AssumeRoleResponse",Pe="AssumedRoleUser",sr="AssumeRoleWithWebIdentity",nr="AssumeRoleWithWebIdentityRequest",ir="AssumeRoleWithWebIdentityResponse",cr="Audience",ye="Credentials",dr="ContextAssertion",at="DurationSeconds",ar="Expiration",ur="ExternalId",pr="ExpiredTokenException",lr="IDPCommunicationErrorException",Er="IDPRejectedClaimException",Pr="InvalidIdentityTokenException",yr="Key",_r="MalformedPolicyDocumentException",ut="Policy",pt="PolicyArns",Ir="ProviderArn",Rr="ProvidedContexts",Tr="ProvidedContextsListType",Sr="ProvidedContext",vr="PolicyDescriptorType",xr="ProviderId",lt="PackedPolicySize",Dr="PackedPolicyTooLargeException",mr="Provider",Et="RoleArn",Ar="RegionDisabledException",Pt="RoleSessionName",$r="SecretAccessKey",br="SubjectFromWebIdentityToken",_e="SourceIdentity",hr="SerialNumber",Nr="SessionToken",qr="Tags",Fr="TokenCode",Wr="TransitiveTagKeys",wr="Tag",Ur="Value",Mr="WebIdentityToken",kr="arn",Lr="accessKeySecretType",$="awsQueryError",b="client",jr="clientTokenType",h="error",N="httpError",q="message",Gr="policyDescriptorListType",yt="smithy.ts.sdk.synthetic.com.amazonaws.sts",Or="tagListType",d="com.amazonaws.sts",_t=dt(),F=Ee(),Kr=O(),It=_t.TypeRegistry.for(yt);Tt.STSServiceException$=[-3,yt,"STSServiceException",0,[],[]];It.registerError(Tt.STSServiceException$,Kr.STSServiceException);var x=_t.TypeRegistry.for(d);Tt.ExpiredTokenException$=[-3,d,pr,{[$]:["ExpiredTokenException",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.ExpiredTokenException$,F.ExpiredTokenException);Tt.IDPCommunicationErrorException$=[-3,d,lr,{[$]:["IDPCommunicationError",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.IDPCommunicationErrorException$,F.IDPCommunicationErrorException);Tt.IDPRejectedClaimException$=[-3,d,Er,{[$]:["IDPRejectedClaim",403],[h]:b,[N]:403},[q],[0]];x.registerError(Tt.IDPRejectedClaimException$,F.IDPRejectedClaimException);Tt.InvalidIdentityTokenException$=[-3,d,Pr,{[$]:["InvalidIdentityToken",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.InvalidIdentityTokenException$,F.InvalidIdentityTokenException);Tt.MalformedPolicyDocumentException$=[-3,d,_r,{[$]:["MalformedPolicyDocument",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.MalformedPolicyDocumentException$,F.MalformedPolicyDocumentException);Tt.PackedPolicyTooLargeException$=[-3,d,Dr,{[$]:["PackedPolicyTooLarge",400],[h]:b,[N]:400},[q],[0]];x.registerError(Tt.PackedPolicyTooLargeException$,F.PackedPolicyTooLargeException);Tt.RegionDisabledException$=[-3,d,Ar,{[$]:["RegionDisabledException",403],[h]:b,[N]:403},[q],[0]];x.registerError(Tt.RegionDisabledException$,F.RegionDisabledException);Tt.errorTypeRegistries=[It,x];var Vr=[0,d,Lr,8,0],zr=[0,d,jr,8,0];Tt.AssumedRoleUser$=[3,d,Pe,0,[tr,Co],[0,0],2];Tt.AssumeRoleRequest$=[3,d,or,0,[Et,Pt,pt,ut,at,qr,Wr,ur,hr,Fr,_e,Rr],[0,0,()=>Rt,0,1,()=>gr,64,0,0,0,0,()=>Br],2];Tt.AssumeRoleResponse$=[3,d,rr,0,[ye,Pe,lt,_e],[[()=>Tt.Credentials$,0],()=>Tt.AssumedRoleUser$,1,0]];Tt.AssumeRoleWithWebIdentityRequest$=[3,d,nr,0,[Et,Pt,Mr,xr,pt,ut,at],[0,0,[()=>zr,0],0,()=>Rt,0,1],3];Tt.AssumeRoleWithWebIdentityResponse$=[3,d,ir,0,[ye,br,Pe,lt,mr,cr,_e],[[()=>Tt.Credentials$,0],0,()=>Tt.AssumedRoleUser$,1,0,0,0]];Tt.Credentials$=[3,d,ye,0,[fo,$r,Nr,ar],[0,[()=>Vr,0],0,4],4];Tt.PolicyDescriptorType$=[3,d,vr,0,[kr],[0]];Tt.ProvidedContext$=[3,d,Sr,0,[Ir,dr],[0,0]];Tt.Tag$=[3,d,wr,0,[yr,Ur],[0,0],2];var Rt=[1,d,Gr,0,()=>Tt.PolicyDescriptorType$],Br=[1,d,Tr,0,()=>Tt.ProvidedContext$],gr=[1,d,Or,0,()=>Tt.Tag$];Tt.AssumeRole$=[9,d,er,0,()=>Tt.AssumeRoleRequest$,()=>Tt.AssumeRoleResponse$];Tt.AssumeRoleWithWebIdentity$=[9,d,sr,0,()=>Tt.AssumeRoleWithWebIdentityRequest$,()=>Tt.AssumeRoleWithWebIdentityResponse$]});var Ot=y((jt)=>{Object.defineProperty(jt,"__esModule",{value:!0});jt.getRuntimeConfig=void 0;var Cr=X(),fr=Zr(),es=Se(),ts=k(),os=Xr(),kt=Jr(),Lt=Hr(),rs=Z(),ss=rt(),ns=Te(),is=(e)=>{return{apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??kt.fromBase64,base64Encoder:e?.base64Encoder??kt.toBase64,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??ss.defaultEndpointResolver,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??rs.defaultSTSHttpAuthSchemeProvider,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(t)=>t.getIdentityProvider("aws.auth#sigv4"),signer:new Cr.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(t)=>t.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new es.NoAuthSigner}],logger:e?.logger??new ts.NoOpLogger,protocol:e?.protocol??fr.AwsQueryProtocol,protocolSettings:e?.protocolSettings??{defaultNamespace:"com.amazonaws.sts",errorTypeRegistries:ns.errorTypeRegistries,xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/",version:"2011-06-15",serviceTarget:"AWSSecurityTokenServiceV20110615"},serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??os.parseUrl,utf8Decoder:e?.utf8Decoder??Lt.fromUtf8,utf8Encoder:e?.utf8Encoder??Lt.toUtf8}};jt.getRuntimeConfig=is});var Jt=y((Yt)=>{Object.defineProperty(Yt,"__esModule",{value:!0});Yt.getRuntimeConfig=void 0;var _s=ds(),Is=_s.__importDefault(ps()),ve=X(),Kt=ls(),K=gt(),Rs=Se(),Ts=Es(),Vt=Qt(),W=us(),zt=cs(),Bt=k(),Ss=Ps(),vs=ys(),xs=as(),Ds=Ot(),ms=(e)=>{(0,Bt.emitWarningIfUnsupportedVersion)(process.version);let t=(0,vs.resolveDefaultsModeConfig)(e),r=()=>t().then(Bt.loadConfigsForDefaultMode),a=(0,Ds.getRuntimeConfig)(e);(0,ve.emitWarningIfUnsupportedVersion)(process.version);let s={profile:e?.profile,logger:a.logger};return{...a,...e,runtime:"node",defaultsMode:t,authSchemePreference:e?.authSchemePreference??(0,W.loadConfig)(ve.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,s),bodyLengthChecker:e?.bodyLengthChecker??Ss.calculateBodyLength,defaultUserAgentProvider:e?.defaultUserAgentProvider??(0,Kt.createDefaultUserAgentProvider)({serviceId:a.serviceId,clientVersion:Is.default.version}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(E)=>E.getIdentityProvider("aws.auth#sigv4")||(async(u)=>await e.credentialDefaultProvider(u?.__config||{})()),signer:new ve.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(E)=>E.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Rs.NoAuthSigner}],maxAttempts:e?.maxAttempts??(0,W.loadConfig)(Vt.NODE_MAX_ATTEMPT_CONFIG_OPTIONS,e),region:e?.region??(0,W.loadConfig)(K.NODE_REGION_CONFIG_OPTIONS,{...K.NODE_REGION_CONFIG_FILE_OPTIONS,...s}),requestHandler:zt.NodeHttpHandler.create(e?.requestHandler??r),retryMode:e?.retryMode??(0,W.loadConfig)({...Vt.NODE_RETRY_MODE_CONFIG_OPTIONS,default:async()=>(await r()).retryMode||xs.DEFAULT_RETRY_MODE},e),sha256:e?.sha256??Ts.Hash.bind(null,"sha256"),streamCollector:e?.streamCollector??zt.streamCollector,useDualstackEndpoint:e?.useDualstackEndpoint??(0,W.loadConfig)(K.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,s),useFipsEndpoint:e?.useFipsEndpoint??(0,W.loadConfig)(K.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,s),userAgentAppId:e?.userAgentAppId??(0,W.loadConfig)(Kt.NODE_APP_ID_CONFIG_OPTIONS,s)}};Yt.getRuntimeConfig=ms});var Ct=y((Xt)=>{Object.defineProperty(Xt,"__esModule",{value:!0});Xt.resolveHttpAuthRuntimeConfig=Xt.getHttpAuthExtensionConfiguration=void 0;var As=(e)=>{let{httpAuthSchemes:t,httpAuthSchemeProvider:r,credentials:a}=e;return{setHttpAuthScheme(s){let E=t.findIndex((u)=>u.schemeId===s.schemeId);if(E===-1)t.push(s);else t.splice(E,1,s)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(s){r=s},httpAuthSchemeProvider(){return r},setCredentials(s){a=s},credentials(){return a}}};Xt.getHttpAuthExtensionConfiguration=As;var $s=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};Xt.resolveHttpAuthRuntimeConfig=$s});var io=y((so)=>{Object.defineProperty(so,"__esModule",{value:!0});so.resolveRuntimeExtensions=void 0;var ft=ro(),eo=hs(),to=k(),oo=Ct(),Ns=(e,t)=>{let r=Object.assign((0,ft.getAwsRegionExtensionConfiguration)(e),(0,to.getDefaultExtensionConfiguration)(e),(0,eo.getHttpHandlerExtensionConfiguration)(e),(0,oo.getHttpAuthExtensionConfiguration)(e));return t.forEach((a)=>a.configure(r)),Object.assign(e,(0,ft.resolveAwsRegionExtensionConfiguration)(r),(0,to.resolveDefaultRuntimeConfig)(r),(0,eo.resolveHttpHandlerRuntimeConfig)(r),(0,oo.resolveHttpAuthRuntimeConfig)(r))};so.resolveRuntimeExtensions=Ns});var C=y((De)=>{Object.defineProperty(De,"__esModule",{value:!0});De.STSClient=De.__Client=void 0;var co=qs(),Ms=Fs(),ks=Ws(),ao=ws(),Ls=gt(),xe=Se(),js=dt(),Gs=Us(),Os=lo(),uo=Qt(),Eo=k();Object.defineProperty(De,"__Client",{enumerable:!0,get:function(){return Eo.Client}});var po=Z(),Ks=f(),Vs=Jt(),zs=io();class Po extends Eo.Client{config;constructor(...[e]){let t=(0,Vs.getRuntimeConfig)(e||{});super(t);this.initConfig=t;let r=(0,Ks.resolveClientEndpointParameters)(t),a=(0,ao.resolveUserAgentConfig)(r),s=(0,uo.resolveRetryConfig)(a),E=(0,Ls.resolveRegionConfig)(s),u=(0,co.resolveHostHeaderConfig)(E),T=(0,Os.resolveEndpointConfig)(u),D=(0,po.resolveHttpAuthSchemeConfig)(T),m=(0,zs.resolveRuntimeExtensions)(D,e?.extensions||[]);this.config=m,this.middlewareStack.use((0,js.getSchemaSerdePlugin)(this.config)),this.middlewareStack.use((0,ao.getUserAgentPlugin)(this.config)),this.middlewareStack.use((0,uo.getRetryPlugin)(this.config)),this.middlewareStack.use((0,Gs.getContentLengthPlugin)(this.config)),this.middlewareStack.use((0,co.getHostHeaderPlugin)(this.config)),this.middlewareStack.use((0,Ms.getLoggerPlugin)(this.config)),this.middlewareStack.use((0,ks.getRecursionDetectionPlugin)(this.config)),this.middlewareStack.use((0,xe.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config,{httpAuthSchemeParametersProvider:po.defaultSTSHttpAuthSchemeParametersProvider,identityProviderConfigProvider:async(U)=>new xe.DefaultIdentityProviderConfig({"aws.auth#sigv4":U.credentials})})),this.middlewareStack.use((0,xe.getHttpSigningPlugin)(this.config))}destroy(){super.destroy()}}De.STSClient=Po});var nn=y((I)=>{var w=C(),z=k(),_o=lo(),Io=f(),L=Te(),V=Ee(),me=Bs(),gs=ro(),Qs=O();class B extends z.Command.classBuilder().ep(Io.commonParams).m(function(e,t,r,a){return[_o.getEndpointPlugin(r,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").sc(L.AssumeRole$).build(){}class g extends z.Command.classBuilder().ep(Io.commonParams).m(function(e,t,r,a){return[_o.getEndpointPlugin(r,e.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").sc(L.AssumeRoleWithWebIdentity$).build(){}var Ys={AssumeRoleCommand:B,AssumeRoleWithWebIdentityCommand:g};class Ae extends w.STSClient{}z.createAggregatedClient(Ys,Ae);var Ro=(e)=>{if(typeof e?.Arn==="string"){let t=e.Arn.split(":");if(t.length>4&&t[4]!=="")return t[4]}return},To=async(e,t,r,a={})=>{let s=typeof e==="function"?await e():e,E=typeof t==="function"?await t():t,u="",T=s??E??(u=await gs.stsRegionDefaultResolver(a)());return r?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${s} (credential provider clientConfig)`,`${E} (contextual client)`,`${u} (STS default: AWS_REGION, profile region, or us-east-1)`),T},Hs=(e,t)=>{let r,a;return async(s,E)=>{if(a=s,!r){let{logger:U=e?.parentClientConfig?.logger,profile:j=e?.parentClientConfig?.profile,region:Q,requestHandler:G=e?.parentClientConfig?.requestHandler,credentialProviderLogger:Y,userAgentAppId:H=e?.parentClientConfig?.userAgentAppId}=e,mo=await To(Q,e?.parentClientConfig?.region,Y,{logger:U,profile:j}),Ao=!So(G);r=new t({...e,userAgentAppId:H,profile:j,credentialDefaultProvider:()=>async()=>a,region:mo,requestHandler:Ao?G:void 0,logger:U})}let{Credentials:u,AssumedRoleUser:T}=await r.send(new B(E));if(!u||!u.AccessKeyId||!u.SecretAccessKey)throw Error(`Invalid response from STS.assumeRole call with role ${E.RoleArn}`);let D=Ro(T),m={accessKeyId:u.AccessKeyId,secretAccessKey:u.SecretAccessKey,sessionToken:u.SessionToken,expiration:u.Expiration,...u.CredentialScope&&{credentialScope:u.CredentialScope},...D&&{accountId:D}};return me.setCredentialFeature(m,"CREDENTIALS_STS_ASSUME_ROLE","i"),m}},Js=(e,t)=>{let r;return async(a)=>{if(!r){let{logger:D=e?.parentClientConfig?.logger,profile:m=e?.parentClientConfig?.profile,region:U,requestHandler:j=e?.parentClientConfig?.requestHandler,credentialProviderLogger:Q,userAgentAppId:G=e?.parentClientConfig?.userAgentAppId}=e,Y=await To(U,e?.parentClientConfig?.region,Q,{logger:D,profile:m}),H=!So(j);r=new t({...e,userAgentAppId:G,profile:m,region:Y,requestHandler:H?j:void 0,logger:D})}let{Credentials:s,AssumedRoleUser:E}=await r.send(new g(a));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${a.RoleArn}`);let u=Ro(E),T={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,...s.CredentialScope&&{credentialScope:s.CredentialScope},...u&&{accountId:u}};if(u)me.setCredentialFeature(T,"RESOLVED_ACCOUNT_ID","T");return me.setCredentialFeature(T,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),T}},So=(e)=>{return e?.metadata?.handlerProtocol==="h2"},vo=(e,t)=>{if(!t)return e;else return class extends e{constructor(a){super(a);for(let s of t)this.middlewareStack.use(s)}}},xo=(e={},t)=>Hs(e,vo(w.STSClient,t)),Do=(e={},t)=>Js(e,vo(w.STSClient,t)),Xs=(e)=>(t)=>e({roleAssumer:xo(t),roleAssumerWithWebIdentity:Do(t),...t});I.$Command=z.Command;I.STSServiceException=Qs.STSServiceException;I.AssumeRoleCommand=B;I.AssumeRoleWithWebIdentityCommand=g;I.STS=Ae;I.decorateDefaultCredentialProvider=Xs;I.getDefaultRoleAssumer=xo;I.getDefaultRoleAssumerWithWebIdentity=Do;Object.prototype.hasOwnProperty.call(w,"__proto__")&&!Object.prototype.hasOwnProperty.call(I,"__proto__")&&Object.defineProperty(I,"__proto__",{enumerable:!0,value:w.__proto__});Object.keys(w).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(I,e))I[e]=w[e]});Object.prototype.hasOwnProperty.call(L,"__proto__")&&!Object.prototype.hasOwnProperty.call(I,"__proto__")&&Object.defineProperty(I,"__proto__",{enumerable:!0,value:L.__proto__});Object.keys(L).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(I,e))I[e]=L[e]});Object.prototype.hasOwnProperty.call(V,"__proto__")&&!Object.prototype.hasOwnProperty.call(I,"__proto__")&&Object.defineProperty(I,"__proto__",{enumerable:!0,value:V.__proto__});Object.keys(V).forEach(function(e){if(e!=="default"&&!Object.prototype.hasOwnProperty.call(I,e))I[e]=V[e]})});export default nn();
3
3
 
4
- //# debugId=7A22E3B060A4AB2564756E2164756E21
4
+ //# debugId=4D4C568D28CEE3D664756E2164756E21
@@ -17,6 +17,6 @@
17
17
  "'use strict';\n\nvar STSClient = require('./STSClient');\nvar smithyClient = require('@smithy/smithy-client');\nvar middlewareEndpoint = require('@smithy/middleware-endpoint');\nvar EndpointParameters = require('./endpoint/EndpointParameters');\nvar schemas_0 = require('./schemas/schemas_0');\nvar errors = require('./models/errors');\nvar client = require('@aws-sdk/core/client');\nvar regionConfigResolver = require('@aws-sdk/region-config-resolver');\nvar STSServiceException = require('./models/STSServiceException');\n\nclass AssumeRoleCommand extends smithyClient.Command\n .classBuilder()\n .ep(EndpointParameters.commonParams)\n .m(function (Command, cs, config, o) {\n return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRole\", {})\n .n(\"STSClient\", \"AssumeRoleCommand\")\n .sc(schemas_0.AssumeRole$)\n .build() {\n}\n\nclass AssumeRoleWithWebIdentityCommand extends smithyClient.Command\n .classBuilder()\n .ep(EndpointParameters.commonParams)\n .m(function (Command, cs, config, o) {\n return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];\n})\n .s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoleWithWebIdentity\", {})\n .n(\"STSClient\", \"AssumeRoleWithWebIdentityCommand\")\n .sc(schemas_0.AssumeRoleWithWebIdentity$)\n .build() {\n}\n\nconst commands = {\n AssumeRoleCommand,\n AssumeRoleWithWebIdentityCommand,\n};\nclass STS extends STSClient.STSClient {\n}\nsmithyClient.createAggregatedClient(commands, STS);\n\nconst getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {\n if (typeof assumedRoleUser?.Arn === \"string\") {\n const arnComponents = assumedRoleUser.Arn.split(\":\");\n if (arnComponents.length > 4 && arnComponents[4] !== \"\") {\n return arnComponents[4];\n }\n }\n return undefined;\n};\nconst resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {\n const region = typeof _region === \"function\" ? await _region() : _region;\n const parentRegion = typeof _parentRegion === \"function\" ? await _parentRegion() : _parentRegion;\n let stsDefaultRegion = \"\";\n const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());\n credentialProviderLogger?.debug?.(\"@aws-sdk/client-sts::resolveRegion\", \"accepting first of:\", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);\n return resolvedRegion;\n};\nconst getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {\n let stsClient;\n let closureSourceCreds;\n return async (sourceCreds, params) => {\n closureSourceCreds = sourceCreds;\n if (!stsClient) {\n const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId, } = stsOptions;\n const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {\n logger,\n profile,\n });\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient({\n ...stsOptions,\n userAgentAppId,\n profile,\n credentialDefaultProvider: () => async () => closureSourceCreds,\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,\n logger: logger,\n });\n }\n const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);\n const credentials = {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n ...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),\n ...(accountId && { accountId }),\n };\n client.setCredentialFeature(credentials, \"CREDENTIALS_STS_ASSUME_ROLE\", \"i\");\n return credentials;\n };\n};\nconst getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => {\n let stsClient;\n return async (params) => {\n if (!stsClient) {\n const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId, } = stsOptions;\n const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {\n logger,\n profile,\n });\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient({\n ...stsOptions,\n userAgentAppId,\n profile,\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,\n logger: logger,\n });\n }\n const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);\n const credentials = {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n ...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),\n ...(accountId && { accountId }),\n };\n if (accountId) {\n client.setCredentialFeature(credentials, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n client.setCredentialFeature(credentials, \"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID\", \"k\");\n return credentials;\n };\n};\nconst isH2 = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n};\n\nconst getCustomizableStsClientCtor = (baseCtor, customizations) => {\n if (!customizations)\n return baseCtor;\n else\n return class CustomizableSTSClient extends baseCtor {\n constructor(config) {\n super(config);\n for (const customization of customizations) {\n this.middlewareStack.use(customization);\n }\n }\n };\n};\nconst getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));\nconst getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));\nconst decorateDefaultCredentialProvider = (provider) => (input) => provider({\n roleAssumer: getDefaultRoleAssumer(input),\n roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),\n ...input,\n});\n\nexports.$Command = smithyClient.Command;\nexports.STSServiceException = STSServiceException.STSServiceException;\nexports.AssumeRoleCommand = AssumeRoleCommand;\nexports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;\nexports.STS = STS;\nexports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;\nexports.getDefaultRoleAssumer = getDefaultRoleAssumer;\nexports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;\nObject.prototype.hasOwnProperty.call(STSClient, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: STSClient['__proto__']\n });\n\nObject.keys(STSClient).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = STSClient[k];\n});\nObject.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: schemas_0['__proto__']\n });\n\nObject.keys(schemas_0).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];\n});\nObject.prototype.hasOwnProperty.call(errors, '__proto__') &&\n !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&\n Object.defineProperty(exports, '__proto__', {\n enumerable: true,\n value: errors['__proto__']\n });\n\nObject.keys(errors).forEach(function (k) {\n if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];\n});\n"
18
18
  ],
19
19
  "mappings": ";2wBACA,CAAO,SAAe,HAAS,OAAc,LAAE,AAAO,JAAK,LAAC,JACpD,yBAAsC,kBAA+B,8BAA2C,8CAAkD,OAC1K,IAAM,OACA,OACA,OACA,GAA6C,MAAO,EAAQ,EAAS,IAAU,CACjF,MAAO,CACH,WAAY,EAAG,EAAkB,k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AAK,EAAS,WAAW,GAC1D,OAAO,eAAe,EAAS,YAAa,CACxC,WAAY,GACZ,MAAO,EAAU,SACrB,CAAC,EAEL,OAAO,KAAK,CAAS,EAAE,QAAQ,QAAS,CAAC,EAAG,CACxC,GAAI,IAAM,WAAa,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,CAAC,EAAG,EAAQ,GAAK,EAAU,GACpG,EACD,OAAO,UAAU,eAAe,KAAK,EAAW,WAAW,GACvD,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,WAAW,GAC1D,OAAO,eAAe,EAAS,YAAa,CACxC,WAAY,GACZ,MAAO,EAAU,SACrB,CAAC,EAEL,OAAO,KAAK,CAAS,EAAE,QAAQ,QAAS,CAAC,EAAG,CACxC,GAAI,IAAM,WAAa,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,CAAC,EAAG,EAAQ,GAAK,EAAU,GACpG,EACD,OAAO,UAAU,eAAe,KAAK,EAAQ,WAAW,GACpD,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,WAAW,GAC1D,OAAO,eAAe,EAAS,YAAa,CACxC,WAAY,GACZ,MAAO,EAAO,SAClB,CAAC,EAEL,OAAO,KAAK,CAAM,EAAE,QAAQ,QAAS,CAAC,EAAG,CACrC,GAAI,IAAM,WAAa,CAAC,OAAO,UAAU,eAAe,KAAK,EAAS,CAAC,EAAG,EAAQ,GAAK,EAAO,GACjG",
20
- "debugId": "7A22E3B060A4AB2564756E2164756E21",
20
+ "debugId": "4D4C568D28CEE3D664756E2164756E21",
21
21
  "names": []
22
22
  }
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{oa as _}from"./chunk-zezdm4ep.js";import{Ba as ue}from"./chunk-3fcgg506.js";import{Ca as w}from"./chunk-zznpmnp7.js";import"./chunk-94k8pjmf.js";import{Ia as l}from"./chunk-1sbm38g3.js";import{He as o,Le as d}from"./chunk-zwpx6z5f.js";var g=o(_(),1);var ie=o(l(),1);var O=o(w(),1),R=o(l(),1),J=o(_(),1);var j=o(w(),1),E=o(l(),1),U=(e,s,t)=>{let n={EcsContainer:async(r)=>{let{fromHttp:a}=await import("./chunk-0k5jhyry.js"),{fromContainerMetadata:c}=await import("./chunk-eyvtf769.js");return t?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>E.chain(a(r??{}),c(r))().then(L)},Ec2InstanceMetadata:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:a}=await import("./chunk-eyvtf769.js");return async()=>a(r)().then(L)},Environment:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:a}=await import("./chunk-p0z35s59.js");return async()=>a(r)().then(L)}};if(e in n)return n[e];else throw new E.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:t})},L=(e)=>j.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var N=(e,{profile:s="default",logger:t}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(he(e,{profile:s,logger:t})||ye(e,{profile:s,logger:t}))},he=(e,{profile:s,logger:t})=>{let n=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(n)t?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return n},ye=(e,{profile:s,logger:t})=>{let n=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(n)t?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return n},v=async(e,s,t,n,r={},a)=>{t.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let c=s[e],{source_profile:h,region:I}=c;if(!t.roleAssumer){let{getDefaultRoleAssumer:i}=await import("./chunk-gvf1d636.js").then((m)=>o(m.default,1));t.roleAssumer=i({...t.clientConfig,credentialProviderLogger:t.logger,parentClientConfig:{...n,...t?.parentClientConfig,region:I??t?.parentClientConfig?.region??n?.region}},t.clientPlugins)}if(h&&h in r)throw new R.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${J.getProfileName(t)}. Profiles visited: `+Object.keys(r).join(", "),{logger:t.logger});t.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${h?`source_profile=[${h}]`:`profile=[${e}]`}`);let T=h?a(h,s,t,n,{...r,[h]:!0},G(s[h]??{})):(await U(c.credential_source,e,t.logger)(t))();if(G(c))return T.then((i)=>O.setCredentialFeature(i,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let i={RoleArn:c.role_arn,RoleSessionName:c.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:c.external_id,DurationSeconds:parseInt(c.duration_seconds||"3600",10)},{mfa_serial:u}=c;if(u){if(!t.mfaCodeProvider)throw new R.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:t.logger,tryNextLink:!1});i.SerialNumber=u,i.TokenCode=await t.mfaCodeProvider(u)}let y=await T;return t.roleAssumer(y,i).then((m)=>O.setCredentialFeature(m,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},G=(e)=>{return!e.role_arn&&!!e.credential_source};var V=o(w(),1);var C=o(w(),1),X=o(l(),1),K=o(_(),1);var k=o(l(),1),W=o(ue(),1),z=o(_(),1);import{createHash as de,createPrivateKey as we,createPublicKey as ke,sign as me}from"crypto";import{promises as D}from"fs";import{homedir as fe}from"os";import{dirname as Ie,join as Y}from"path";class b{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300000;constructor(e,s,t){this.profileData=e,this.init=s,this.callerClientConfig=t}async loadCredentials(){let e=await this.loadToken();if(!e)throw new k.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let s=e.accessToken,t=Date.now();if(new Date(s.expiresAt).getTime()-t<=b.REFRESH_THRESHOLD)return this.refresh(e);return{accessKeyId:s.accessKeyId,secretAccessKey:s.secretAccessKey,sessionToken:s.sessionToken,accountId:s.accountId,expiration:new Date(s.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(e){let{SigninClient:s,CreateOAuth2TokenCommand:t}=await import("./chunk-ybqftmjx.js").then((m)=>o(m.default,1)),{logger:n,userAgentAppId:r}=this.callerClientConfig??{},c=((i)=>{return i?.metadata?.handlerProtocol==="h2"})(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,h=this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,I=new s({credentials:{accessKeyId:"",secretAccessKey:""},region:h,requestHandler:c,logger:n,userAgentAppId:r,...this.init?.clientConfig});this.createDPoPInterceptor(I.middlewareStack);let T={tokenInput:{clientId:e.clientId,refreshToken:e.refreshToken,grantType:"refresh_token"}};try{let i=await I.send(new t(T)),{accessKeyId:u,secretAccessKey:y,sessionToken:m}=i.tokenOutput?.accessToken??{},{refreshToken:x,expiresIn:H}=i.tokenOutput??{};if(!u||!y||!m||!x)throw new k.CredentialsProviderError("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let A=(H??900)*1000,f=new Date(Date.now()+A),q={...e,accessToken:{...e.accessToken,accessKeyId:u,secretAccessKey:y,sessionToken:m,expiresAt:f.toISOString()},refreshToken:x};await this.saveToken(q);let S=q.accessToken;return{accessKeyId:S.accessKeyId,secretAccessKey:S.secretAccessKey,sessionToken:S.sessionToken,accountId:S.accountId,expiration:f}}catch(i){if(i.name==="AccessDeniedException"){let u=i.error,y;switch(u){case"TOKEN_EXPIRED":y="Your session has expired. Please reauthenticate.";break;case"USER_CREDENTIALS_CHANGED":y="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case"INSUFFICIENT_PERMISSIONS":y="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:y=`Failed to refresh token: ${String(i)}. Please re-authenticate using \`aws login\``}throw new k.CredentialsProviderError(y,{logger:this.logger,tryNextLink:!1})}throw new k.CredentialsProviderError(`Failed to refresh token: ${String(i)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let e=this.getTokenFilePath();try{let s;try{s=await z.readFile(e,{ignoreCache:this.init?.ignoreCache})}catch{s=await D.readFile(e,"utf8")}let t=JSON.parse(s),n=["accessToken","clientId","refreshToken","dpopKey"].filter((r)=>!t[r]);if(!t.accessToken?.accountId)n.push("accountId");if(n.length>0)throw new k.CredentialsProviderError(`Token validation failed, missing fields: ${n.join(", ")}`,{logger:this.logger,tryNextLink:!1});return t}catch(s){throw new k.CredentialsProviderError(`Failed to load token from ${e}: ${String(s)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(e){let s=this.getTokenFilePath(),t=Ie(s);try{await D.mkdir(t,{recursive:!0})}catch(n){}await D.writeFile(s,JSON.stringify(e,null,2),"utf8")}getTokenFilePath(){let e=process.env.AWS_LOGIN_CACHE_DIRECTORY??Y(fe(),".aws","login","cache"),s=Buffer.from(this.loginSession,"utf8"),t=de("sha256").update(s).digest("hex");return Y(e,`${t}.json`)}derToRawSignature(e){let s=2;if(e[s]!==2)throw Error("Invalid DER signature");s++;let t=e[s++],n=e.subarray(s,s+t);if(s+=t,e[s]!==2)throw Error("Invalid DER signature");s++;let r=e[s++],a=e.subarray(s,s+r);n=n[0]===0?n.subarray(1):n,a=a[0]===0?a.subarray(1):a;let c=Buffer.concat([Buffer.alloc(32-n.length),n]),h=Buffer.concat([Buffer.alloc(32-a.length),a]);return Buffer.concat([c,h])}createDPoPInterceptor(e){e.add((s)=>async(t)=>{if(W.HttpRequest.isInstance(t.request)){let n=t.request,r=`${n.protocol}//${n.hostname}${n.port?`:${n.port}`:""}${n.path}`,a=await this.generateDpop(n.method,r);n.headers={...n.headers,DPoP:a}}return s(t)},{step:"finalizeRequest",name:"dpopInterceptor",override:!0})}async generateDpop(e="POST",s){let t=await this.loadToken();try{let n=we({key:t.dpopKey,format:"pem",type:"sec1"}),a=ke(n).export({format:"der",type:"spki"}),c=-1;for(let f=0;f<a.length;f++)if(a[f]===4){c=f;break}let h=a.slice(c+1,c+33),I=a.slice(c+33,c+65),T={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:h.toString("base64url"),y:I.toString("base64url")}},i={jti:crypto.randomUUID(),htm:e,htu:s,iat:Math.floor(Date.now()/1000)},u=Buffer.from(JSON.stringify(T)).toString("base64url"),y=Buffer.from(JSON.stringify(i)).toString("base64url"),m=`${u}.${y}`,x=me("sha256",Buffer.from(m),n),A=this.derToRawSignature(x).toString("base64url");return`${m}.${A}`}catch(n){throw new k.CredentialsProviderError(`Failed to generate Dpop proof: ${n instanceof Error?n.message:String(n)}`,{logger:this.logger,tryNextLink:!1})}}}var Q=(e)=>async({callerClientConfig:s}={})=>{e?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let t=await K.parseKnownFiles(e||{}),n=K.getProfileName({profile:e?.profile??s?.profile}),r=t[n];if(!r?.login_session)throw new X.CredentialsProviderError(`Profile ${n} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});let c=await new b(r,e,s).loadCredentials();return C.setCredentialFeature(c,"CREDENTIALS_LOGIN","AD")};var Z=(e)=>{return Boolean(e&&e.login_session)},M=async(e,s,t)=>{let n=await Q({...s,profile:e})({callerClientConfig:t});return V.setCredentialFeature(n,"CREDENTIALS_PROFILE_LOGIN","AC")};var p=o(w(),1),ee=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",te=async(e,s)=>import("./chunk-d3tf618w.js").then(({fromProcess:t})=>t({...e,profile:s})().then((n)=>p.setCredentialFeature(n,"CREDENTIALS_PROFILE_PROCESS","v")));var $=o(w(),1),se=async(e,s,t={},n)=>{let{fromSSO:r}=await import("./chunk-pkzj7c5w.js");return r({profile:e,logger:t.logger,parentClientConfig:t.parentClientConfig,clientConfig:t.clientConfig})({callerClientConfig:n}).then((a)=>{if(s.sso_session)return $.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO","r");else return $.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},ne=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var ce=o(w(),1),P=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,F=async(e,s)=>{s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let t={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return ce.setCredentialFeature(t,"CREDENTIALS_PROFILE","n")};var re=o(w(),1),ae=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,oe=async(e,s,t)=>import("./chunk-16bnbtyn.js").then(({fromTokenFile:n})=>n({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})({callerClientConfig:t}).then((r)=>re.setCredentialFeature(r,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var B=async(e,s,t,n,r={},a=!1)=>{let c=s[e];if(Object.keys(r).length>0&&P(c))return F(c,t);if(a||N(c,{profile:e,logger:t.logger}))return v(e,s,t,n,r,B);if(P(c))return F(c,t);if(ae(c))return oe(c,t,n);if(ee(c))return te(t,e);if(ne(c))return await se(e,c,t,n);if(Z(c))return M(e,t,n);throw new ie.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:t.logger})};var Ne=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let t=await g.parseKnownFiles(e);return B(g.getProfileName({profile:e.profile??s?.profile}),t,e,s)};export{Ne as fromIni};
2
+ import{za as ue}from"./chunk-j1knf8gv.js";import{Aa as w}from"./chunk-d1ahbza9.js";import{Ia as _}from"./chunk-t4n25km9.js";import"./chunk-tztqkat2.js";import{Ka as l}from"./chunk-kaxvw75w.js";import{Pe as o,Te as d}from"./chunk-0h3jr9d9.js";var g=o(_(),1);var ie=o(l(),1);var O=o(w(),1),R=o(l(),1),J=o(_(),1);var j=o(w(),1),E=o(l(),1),U=(e,s,t)=>{let n={EcsContainer:async(r)=>{let{fromHttp:a}=await import("./chunk-xsmt86n3.js"),{fromContainerMetadata:c}=await import("./chunk-kxzwem3g.js");return t?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>E.chain(a(r??{}),c(r))().then(L)},Ec2InstanceMetadata:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");let{fromInstanceMetadata:a}=await import("./chunk-kxzwem3g.js");return async()=>a(r)().then(L)},Environment:async(r)=>{t?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");let{fromEnv:a}=await import("./chunk-8p6rqegw.js");return async()=>a(r)().then(L)}};if(e in n)return n[e];else throw new E.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:t})},L=(e)=>j.setCredentialFeature(e,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var N=(e,{profile:s="default",logger:t}={})=>{return Boolean(e)&&typeof e==="object"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1&&["undefined","string"].indexOf(typeof e.external_id)>-1&&["undefined","string"].indexOf(typeof e.mfa_serial)>-1&&(he(e,{profile:s,logger:t})||ye(e,{profile:s,logger:t}))},he=(e,{profile:s,logger:t})=>{let n=typeof e.source_profile==="string"&&typeof e.credential_source>"u";if(n)t?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${e.source_profile}`);return n},ye=(e,{profile:s,logger:t})=>{let n=typeof e.credential_source==="string"&&typeof e.source_profile>"u";if(n)t?.debug?.(` ${s} isCredentialSourceProfile credential_source=${e.credential_source}`);return n},v=async(e,s,t,n,r={},a)=>{t.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");let c=s[e],{source_profile:h,region:I}=c;if(!t.roleAssumer){let{getDefaultRoleAssumer:i}=await import("./chunk-faa987e4.js").then((m)=>o(m.default,1));t.roleAssumer=i({...t.clientConfig,credentialProviderLogger:t.logger,parentClientConfig:{...n,...t?.parentClientConfig,region:I??t?.parentClientConfig?.region??n?.region}},t.clientPlugins)}if(h&&h in r)throw new R.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${J.getProfileName(t)}. Profiles visited: `+Object.keys(r).join(", "),{logger:t.logger});t.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${h?`source_profile=[${h}]`:`profile=[${e}]`}`);let T=h?a(h,s,t,n,{...r,[h]:!0},G(s[h]??{})):(await U(c.credential_source,e,t.logger)(t))();if(G(c))return T.then((i)=>O.setCredentialFeature(i,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{let i={RoleArn:c.role_arn,RoleSessionName:c.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:c.external_id,DurationSeconds:parseInt(c.duration_seconds||"3600",10)},{mfa_serial:u}=c;if(u){if(!t.mfaCodeProvider)throw new R.CredentialsProviderError(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:t.logger,tryNextLink:!1});i.SerialNumber=u,i.TokenCode=await t.mfaCodeProvider(u)}let y=await T;return t.roleAssumer(y,i).then((m)=>O.setCredentialFeature(m,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},G=(e)=>{return!e.role_arn&&!!e.credential_source};var V=o(w(),1);var C=o(w(),1),X=o(l(),1),K=o(_(),1);var k=o(l(),1),W=o(ue(),1),z=o(_(),1);import{createHash as de,createPrivateKey as we,createPublicKey as ke,sign as me}from"crypto";import{promises as D}from"fs";import{homedir as fe}from"os";import{dirname as Ie,join as Y}from"path";class b{profileData;init;callerClientConfig;static REFRESH_THRESHOLD=300000;constructor(e,s,t){this.profileData=e,this.init=s,this.callerClientConfig=t}async loadCredentials(){let e=await this.loadToken();if(!e)throw new k.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`,{tryNextLink:!1,logger:this.logger});let s=e.accessToken,t=Date.now();if(new Date(s.expiresAt).getTime()-t<=b.REFRESH_THRESHOLD)return this.refresh(e);return{accessKeyId:s.accessKeyId,secretAccessKey:s.secretAccessKey,sessionToken:s.sessionToken,accountId:s.accountId,expiration:new Date(s.expiresAt)}}get logger(){return this.init?.logger}get loginSession(){return this.profileData.login_session}async refresh(e){let{SigninClient:s,CreateOAuth2TokenCommand:t}=await import("./chunk-vnjvd82s.js").then((m)=>o(m.default,1)),{logger:n,userAgentAppId:r}=this.callerClientConfig??{},c=((i)=>{return i?.metadata?.handlerProtocol==="h2"})(this.callerClientConfig?.requestHandler)?void 0:this.callerClientConfig?.requestHandler,h=this.profileData.region??await this.callerClientConfig?.region?.()??process.env.AWS_REGION,I=new s({credentials:{accessKeyId:"",secretAccessKey:""},region:h,requestHandler:c,logger:n,userAgentAppId:r,...this.init?.clientConfig});this.createDPoPInterceptor(I.middlewareStack);let T={tokenInput:{clientId:e.clientId,refreshToken:e.refreshToken,grantType:"refresh_token"}};try{let i=await I.send(new t(T)),{accessKeyId:u,secretAccessKey:y,sessionToken:m}=i.tokenOutput?.accessToken??{},{refreshToken:x,expiresIn:H}=i.tokenOutput??{};if(!u||!y||!m||!x)throw new k.CredentialsProviderError("Token refresh response missing required fields",{logger:this.logger,tryNextLink:!1});let A=(H??900)*1000,f=new Date(Date.now()+A),q={...e,accessToken:{...e.accessToken,accessKeyId:u,secretAccessKey:y,sessionToken:m,expiresAt:f.toISOString()},refreshToken:x};await this.saveToken(q);let S=q.accessToken;return{accessKeyId:S.accessKeyId,secretAccessKey:S.secretAccessKey,sessionToken:S.sessionToken,accountId:S.accountId,expiration:f}}catch(i){if(i.name==="AccessDeniedException"){let u=i.error,y;switch(u){case"TOKEN_EXPIRED":y="Your session has expired. Please reauthenticate.";break;case"USER_CREDENTIALS_CHANGED":y="Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";break;case"INSUFFICIENT_PERMISSIONS":y="Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";break;default:y=`Failed to refresh token: ${String(i)}. Please re-authenticate using \`aws login\``}throw new k.CredentialsProviderError(y,{logger:this.logger,tryNextLink:!1})}throw new k.CredentialsProviderError(`Failed to refresh token: ${String(i)}. Please re-authenticate using aws login`,{logger:this.logger})}}async loadToken(){let e=this.getTokenFilePath();try{let s;try{s=await z.readFile(e,{ignoreCache:this.init?.ignoreCache})}catch{s=await D.readFile(e,"utf8")}let t=JSON.parse(s),n=["accessToken","clientId","refreshToken","dpopKey"].filter((r)=>!t[r]);if(!t.accessToken?.accountId)n.push("accountId");if(n.length>0)throw new k.CredentialsProviderError(`Token validation failed, missing fields: ${n.join(", ")}`,{logger:this.logger,tryNextLink:!1});return t}catch(s){throw new k.CredentialsProviderError(`Failed to load token from ${e}: ${String(s)}`,{logger:this.logger,tryNextLink:!1})}}async saveToken(e){let s=this.getTokenFilePath(),t=Ie(s);try{await D.mkdir(t,{recursive:!0})}catch(n){}await D.writeFile(s,JSON.stringify(e,null,2),"utf8")}getTokenFilePath(){let e=process.env.AWS_LOGIN_CACHE_DIRECTORY??Y(fe(),".aws","login","cache"),s=Buffer.from(this.loginSession,"utf8"),t=de("sha256").update(s).digest("hex");return Y(e,`${t}.json`)}derToRawSignature(e){let s=2;if(e[s]!==2)throw Error("Invalid DER signature");s++;let t=e[s++],n=e.subarray(s,s+t);if(s+=t,e[s]!==2)throw Error("Invalid DER signature");s++;let r=e[s++],a=e.subarray(s,s+r);n=n[0]===0?n.subarray(1):n,a=a[0]===0?a.subarray(1):a;let c=Buffer.concat([Buffer.alloc(32-n.length),n]),h=Buffer.concat([Buffer.alloc(32-a.length),a]);return Buffer.concat([c,h])}createDPoPInterceptor(e){e.add((s)=>async(t)=>{if(W.HttpRequest.isInstance(t.request)){let n=t.request,r=`${n.protocol}//${n.hostname}${n.port?`:${n.port}`:""}${n.path}`,a=await this.generateDpop(n.method,r);n.headers={...n.headers,DPoP:a}}return s(t)},{step:"finalizeRequest",name:"dpopInterceptor",override:!0})}async generateDpop(e="POST",s){let t=await this.loadToken();try{let n=we({key:t.dpopKey,format:"pem",type:"sec1"}),a=ke(n).export({format:"der",type:"spki"}),c=-1;for(let f=0;f<a.length;f++)if(a[f]===4){c=f;break}let h=a.slice(c+1,c+33),I=a.slice(c+33,c+65),T={alg:"ES256",typ:"dpop+jwt",jwk:{kty:"EC",crv:"P-256",x:h.toString("base64url"),y:I.toString("base64url")}},i={jti:crypto.randomUUID(),htm:e,htu:s,iat:Math.floor(Date.now()/1000)},u=Buffer.from(JSON.stringify(T)).toString("base64url"),y=Buffer.from(JSON.stringify(i)).toString("base64url"),m=`${u}.${y}`,x=me("sha256",Buffer.from(m),n),A=this.derToRawSignature(x).toString("base64url");return`${m}.${A}`}catch(n){throw new k.CredentialsProviderError(`Failed to generate Dpop proof: ${n instanceof Error?n.message:String(n)}`,{logger:this.logger,tryNextLink:!1})}}}var Q=(e)=>async({callerClientConfig:s}={})=>{e?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");let t=await K.parseKnownFiles(e||{}),n=K.getProfileName({profile:e?.profile??s?.profile}),r=t[n];if(!r?.login_session)throw new X.CredentialsProviderError(`Profile ${n} does not contain login_session.`,{tryNextLink:!0,logger:e?.logger});let c=await new b(r,e,s).loadCredentials();return C.setCredentialFeature(c,"CREDENTIALS_LOGIN","AD")};var Z=(e)=>{return Boolean(e&&e.login_session)},M=async(e,s,t)=>{let n=await Q({...s,profile:e})({callerClientConfig:t});return V.setCredentialFeature(n,"CREDENTIALS_PROFILE_LOGIN","AC")};var p=o(w(),1),ee=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.credential_process==="string",te=async(e,s)=>import("./chunk-qx6sahe0.js").then(({fromProcess:t})=>t({...e,profile:s})().then((n)=>p.setCredentialFeature(n,"CREDENTIALS_PROFILE_PROCESS","v")));var $=o(w(),1),se=async(e,s,t={},n)=>{let{fromSSO:r}=await import("./chunk-2sfz64xh.js");return r({profile:e,logger:t.logger,parentClientConfig:t.parentClientConfig,clientConfig:t.clientConfig})({callerClientConfig:n}).then((a)=>{if(s.sso_session)return $.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO","r");else return $.setCredentialFeature(a,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},ne=(e)=>e&&(typeof e.sso_start_url==="string"||typeof e.sso_account_id==="string"||typeof e.sso_session==="string"||typeof e.sso_region==="string"||typeof e.sso_role_name==="string");var ce=o(w(),1),P=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.aws_access_key_id==="string"&&typeof e.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1&&["undefined","string"].indexOf(typeof e.aws_account_id)>-1,F=async(e,s)=>{s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");let t={accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,...e.aws_credential_scope&&{credentialScope:e.aws_credential_scope},...e.aws_account_id&&{accountId:e.aws_account_id}};return ce.setCredentialFeature(t,"CREDENTIALS_PROFILE","n")};var re=o(w(),1),ae=(e)=>Boolean(e)&&typeof e==="object"&&typeof e.web_identity_token_file==="string"&&typeof e.role_arn==="string"&&["undefined","string"].indexOf(typeof e.role_session_name)>-1,oe=async(e,s,t)=>import("./chunk-68w225rv.js").then(({fromTokenFile:n})=>n({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})({callerClientConfig:t}).then((r)=>re.setCredentialFeature(r,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var B=async(e,s,t,n,r={},a=!1)=>{let c=s[e];if(Object.keys(r).length>0&&P(c))return F(c,t);if(a||N(c,{profile:e,logger:t.logger}))return v(e,s,t,n,r,B);if(P(c))return F(c,t);if(ae(c))return oe(c,t,n);if(ee(c))return te(t,e);if(ne(c))return await se(e,c,t,n);if(Z(c))return M(e,t,n);throw new ie.CredentialsProviderError(`Could not resolve credentials using profile: [${e}] in configuration/credentials file(s).`,{logger:t.logger})};var Ne=(e={})=>async({callerClientConfig:s}={})=>{e.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");let t=await g.parseKnownFiles(e);return B(g.getProfileName({profile:e.profile??s?.profile}),t,e,s)};export{Ne as fromIni};
3
3
 
4
- //# debugId=AEC3FC55C813611E64756E2164756E21
4
+ //# debugId=04C08269CB8E559264756E2164756E21
@@ -15,6 +15,6 @@
15
15
  "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nexport const isWebIdentityProfile = (arg) => Boolean(arg) &&\n typeof arg === \"object\" &&\n typeof arg.web_identity_token_file === \"string\" &&\n typeof arg.role_arn === \"string\" &&\n [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1;\nexport const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => import(\"@aws-sdk/credential-provider-web-identity\").then(({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.par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
2
- import{Ca as C}from"./chunk-zznpmnp7.js";import{Ia as A}from"./chunk-1sbm38g3.js";import{He as _}from"./chunk-zwpx6z5f.js";var S=_(C(),1),p=_(A(),1),N="AWS_ACCESS_KEY_ID",a="AWS_SECRET_ACCESS_KEY",i="AWS_SESSION_TOKEN",I="AWS_CREDENTIAL_EXPIRATION",d="AWS_CREDENTIAL_SCOPE",v="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[N],r=process.env[a],n=process.env[i],s=process.env[I],t=process.env[d],E=process.env[v];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new p.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{N,a as O,i as P,I as Q,d as R,v as S,T};
2
+ import{Aa as C}from"./chunk-d1ahbza9.js";import{Ka as A}from"./chunk-kaxvw75w.js";import{Pe as _}from"./chunk-0h3jr9d9.js";var S=_(C(),1),p=_(A(),1),N="AWS_ACCESS_KEY_ID",a="AWS_SECRET_ACCESS_KEY",i="AWS_SESSION_TOKEN",I="AWS_CREDENTIAL_EXPIRATION",d="AWS_CREDENTIAL_SCOPE",v="AWS_ACCOUNT_ID",T=(e)=>async()=>{e?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let o=process.env[N],r=process.env[a],n=process.env[i],s=process.env[I],t=process.env[d],E=process.env[v];if(o&&r){let c={accessKeyId:o,secretAccessKey:r,...n&&{sessionToken:n},...s&&{expiration:new Date(s)},...t&&{credentialScope:t},...E&&{accountId:E}};return S.setCredentialFeature(c,"CREDENTIALS_ENV_VARS","g"),c}throw new p.CredentialsProviderError("Unable to find environment variable credentials.",{logger:e?.logger})};export{N,a as O,i as P,I as Q,d as R,v as S,T};
3
3
 
4
- //# debugId=C0D54A4A23B8E16964756E2164756E21
4
+ //# debugId=1B20BB6DF013EFCC64756E2164756E21
@@ -5,6 +5,6 @@
5
5
  "import { setCredentialFeature } from \"@aws-sdk/core/client\";\nimport { CredentialsProviderError } from \"@smithy/property-provider\";\nexport const ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nexport const ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nexport const ENV_SESSION = \"AWS_SESSION_TOKEN\";\nexport const ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nexport const ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nexport const ENV_ACCOUNT_ID = \"AWS_ACCOUNT_ID\";\nexport const fromEnv = (init) => async () => {\n init?.logger?.debug(\"@aws-sdk/credential-provider-env - fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n const accountId = process.env[ENV_ACCOUNT_ID];\n if (accessKeyId && secretAccessKey) {\n const credentials = {\n accessKeyId,\n secretAccessKey,\n ...(sessionToken && { sessionToken }),\n ...(expiry && { expiration: new Date(expiry) }),\n ...(credentialScope && { credentialScope }),\n ...(accountId && { accountId }),\n };\n setCredentialFeature(credentials, \"CREDENTIALS_ENV_VARS\", \"g\");\n return credentials;\n }\n throw new CredentialsProviderError(\"Unable to find environment variable credentials.\", { logger: init?.logger });\n};\n"
6
6
  ],
7
7
  "mappings": ";uIAAA,SACA,KACa,EAAU,oBACV,EAAa,wBACb,EAAc,oBACd,EAAiB,4BACjB,EAAuB,uBACvB,EAAiB,iBACjB,EAAU,CAAC,IAAS,SAAY,CACzC,GAAM,QAAQ,MAAM,4CAA4C,EAChE,IAAM,EAAc,QAAQ,IAAI,GAC1B,EAAkB,QAAQ,IAAI,GAC9B,EAAe,QAAQ,IAAI,GAC3B,EAAS,QAAQ,IAAI,GACrB,EAAkB,QAAQ,IAAI,GAC9B,EAAY,QAAQ,IAAI,GAC9B,GAAI,GAAe,EAAiB,CAChC,IAAM,EAAc,CAChB,cACA,qBACI,GAAgB,CAAE,cAAa,KAC/B,GAAU,CAAE,WAAY,IAAI,KAAK,CAAM,CAAE,KACzC,GAAmB,CAAE,iBAAgB,KACrC,GAAa,CAAE,WAAU,CACjC,EAEA,OADA,uBAAqB,EAAa,uBAAwB,GAAG,EACtD,EAEX,MAAM,IAAI,2BAAyB,mDAAoD,CAAE,OAAQ,GAAM,MAAO,CAAC",
8
- "debugId": "C0D54A4A23B8E16964756E2164756E21",
8
+ "debugId": "1B20BB6DF013EFCC64756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ import{existsSync as $,readdirSync as B}from"fs";import{join as Y,relative as G}from"path";function J(K,Q=[]){let U=[],X=(H)=>{let z=G(K,H).split("\\").join("/");return Q.some((q)=>z===q||z.startsWith(`${q}/`))},V=(H)=>{for(let z of B(H,{withFileTypes:!0}).sort((q,Z)=>q.name<Z.name?-1:q.name>Z.name?1:0)){let q=Y(H,z.name);if(X(q))continue;if(z.isDirectory()){if(z.name.startsWith(".")||z.name==="node_modules")continue;if($(Y(q,"package.json")))continue;V(q);continue}if(!z.name.endsWith(".ts")&&!z.name.endsWith(".tsx"))continue;if(z.name.endsWith(".d.ts"))continue;if(/\.(test|test-d|spec|bench)\.tsx?$/.test(z.name))continue;U.push(q)}};if(!$(K))return U;return V(K),U}class A extends Error{constructor(K,Q){super(K,Q);this.name="DiscoveryError"}}async function W(K,Q,U=[],X){let V=new Set;for(let H of J(K,U)){let z;try{z=await import(H)}catch(q){throw new A(`${H} could not be imported, so the classes in it could not be discovered:
3
+ ${q.message}
4
+ List the classes explicitly in the config slice for this directory to skip the walk.`,{cause:q})}for(let q of Object.values(z)){if(typeof q==="function"&&q!==Q&&Object.prototype.isPrototypeOf.call(Q,q)){V.add(q);continue}X?.(q,H)}}return[...V]}function F(){return Y(process.cwd(),process.env.GEMI_PROJECT_DIR??"")}
5
+ export{J as Bb,A as Cb,W as Db,F as Eb};
6
+
7
+ //# debugId=A271C12B9933E36964756E2164756E21
@@ -2,9 +2,9 @@
2
2
  "version": 3,
3
3
  "sources": ["../support/discover.ts"],
4
4
  "sourcesContent": [
5
- "import { existsSync, readdirSync } from \"node:fs\";\nimport { join, relative } from \"node:path\";\n\n/**\n * Finding the classes an application declared and never imported — the walk\n * #322 and #323 both end at.\n *\n * ### Why it has to run the files\n *\n * A job that is written and not listed does not fail; it disappears.\n * `QueueManager.next` looks a dispatched name up in the map its config built and\n * skips what is not there, so the dispatch is simply lost. A cron drifts worse:\n * nothing is waiting on a tick, so a job that never fires reports nothing to\n * anyone. What both come down to is that `app/config/queue.ts` naming every\n * `Job` subclass is the *only* thing putting those classes in the module graph —\n * the list and the directory are two spellings of one set, kept in step by hand.\n *\n * The way out of that is to read the directory, and there is no static read that\n * will do: the class does not exist until its module has run. So **every file\n * walked here is imported**, and a file that *does something* when imported does\n * it here — at boot, in production, on every start. `gemi check models` makes\n * the same trade for the same reason and pays it once per CI run; a caller of\n * this pays it once per process.\n *\n * ### What that asks of a caller\n *\n * **Point it at a directory of class declarations, not at `app/`.** The skip\n * rules on `sourceFiles` drop what certainly is not one — tests, benchmarks,\n * `.d.ts`, vendored packages — and nothing else. Widening the guesses is how a\n * discovery pass ends up quietly covering less than the directory holds, which\n * is the same silence in a new place.\n *\n * **Let a broken file stop the boot.** `discoverClasses` rethrows an import\n * failure naming the file rather than dropping it and carrying on, for the same\n * reason: four classes found out of five looks exactly like five out of five.\n *\n * **Leave a way out.** Discovery is what should happen when an app said\n * nothing. An app that lists its classes explicitly must not reach this file at\n * all — that is the escape hatch for a directory holding something this cannot\n * import, and it is the sentence an error from here should point at.\n *\n * ### One more thing worth knowing\n *\n * This imports by absolute path, while the application imports the same files\n * through the `@/app/*` alias. Bun keys its module registry by the *resolved*\n * path, so those two specifiers land on one module: a job already reached from\n * a controller is not evaluated a second time here, and the class object is the\n * same one. `gemi build` leaves that true in production — `packages: \"external\"`\n * keeps the app's own code out of `dist/server/server.mjs` and resolves it from\n * source at runtime, exactly as `gemi dev` does.\n *\n * Nothing here depends on that holding, and deliberately: `QueueManager` and the\n * `Scheduler`'s cross-reload registry are both keyed by name rather than by\n * class identity, so a build that did inline the app's modules would produce a\n * duplicate class object and still register the right job. Worth knowing before\n * writing a registry keyed the other way.\n */\n\n/**\n * The files under `dir` that could declare a class.\n *\n * Everything underneath it, because apps do group classes into folders, minus\n * what cannot be one. Each of these is going to be *imported*, so the exclusions\n * are about what is certainly not source rather than about what is probably not:\n *\n * - **Declaration files.** `.d.ts` has no runtime module behind it.\n * - **Tests, type tests and benchmarks**, by the suffix a runner already\n * recognises.\n * - **Dot-directories and `node_modules`.**\n * - **Any directory holding a `package.json`.** That is a package that happens\n * to live here — a vendored client, a generated SDK — not this app's source,\n * and importing its entry point runs somebody else's module graph. The\n * template has two under `app/models`.\n *\n * `ignore` is the escape hatch for the rest: a path prefix, relative to `dir`,\n * naming a file or a directory of adjacent code that runs something on import.\n * Nothing is ignored by default.\n *\n * The order is the same on every run over the same tree, which matters because\n * the caller is going to import in it: entries are sorted per directory before\n * recursing, and `readdirSync` order is the filesystem's rather than\n * alphabetical — a tree written `A.ts` then `B.ts` reads back `B.ts` first on\n * the machines this was tested on. Sorting per directory rather than sorting the\n * finished list is deliberate: for a tree holding both `a.ts` and `a/b.ts`, this\n * emits `a/b.ts` first, because the directory sorts before the file.\n *\n * A directory that does not exist yields an empty list rather than throwing.\n * \"The app has no jobs yet\" is an ordinary state and not this function's to\n * complain about — but it is indistinguishable from \"the app's source did not\n * ship\", so a caller that boots on the answer owes the reader a word about which\n * one it got.\n */\nexport function sourceFiles(dir: string, ignore: string[] = []): string[] {\n const out: string[] = [];\n\n const ignored = (path: string) => {\n const rel = relative(dir, path).split(\"\\\\\").join(\"/\");\n return ignore.some(\n (pattern) => rel === pattern || rel.startsWith(`${pattern}/`),\n );\n };\n\n const walk = (current: string) => {\n for (const entry of readdirSync(current, { withFileTypes: true }).sort(\n (a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0),\n )) {\n const path = join(current, entry.name);\n if (ignored(path)) continue;\n\n if (entry.isDirectory()) {\n if (entry.name.startsWith(\".\") || entry.name === \"node_modules\")\n continue;\n if (existsSync(join(path, \"package.json\"))) continue;\n walk(path);\n continue;\n }\n\n if (!entry.name.endsWith(\".ts\") && !entry.name.endsWith(\".tsx\")) continue;\n if (entry.name.endsWith(\".d.ts\")) continue;\n if (/\\.(test|test-d|spec|bench)\\.tsx?$/.test(entry.name)) continue;\n\n out.push(path);\n }\n };\n\n if (!existsSync(dir)) return out;\n\n walk(dir);\n return out;\n}\n\n/**\n * A class, as much of one as this file can name. `abstract` so that a base an\n * app never instantiates directly is a legal argument.\n */\ntype ClassLike = abstract new (...args: never[]) => unknown;\n\n/**\n * A file that would not import, reported with the file that would not import.\n *\n * Separate from a bare rethrow because the stack of a failed dynamic import\n * names the module that failed to *resolve*, several frames deep, and says\n * nothing about the walk that asked for it — so the reader learns that some\n * `?raw` specifier is unresolvable without learning that discovery is what\n * imported it, or that listing the classes explicitly is how they get their boot\n * back.\n */\nexport class DiscoveryError extends Error {\n constructor(message: string, options?: { cause?: unknown }) {\n super(message, options);\n this.name = \"DiscoveryError\";\n }\n}\n\n/**\n * Every exported class under `dir` whose prototype chain reaches `base`.\n *\n * `base` is a parameter rather than an import so that this file names no\n * service and stays cheap to depend on — `bin/check-models.ts` uses the walker\n * above and is bundled into `dist/bin/gemi.js`, which is not somewhere gemi's\n * service layer should end up. It is also what lets a test hand in a base class\n * of its own instead of standing up a project that can resolve `gemi/services`.\n *\n * `base` itself is never returned. A directory whose files import their base\n * from a sibling — the shape an app reaches for when several jobs share a gate —\n * re-exports it as often as not, and a framework that scheduled the abstract\n * base along with its subclasses would be running a job nobody wrote.\n *\n * A class is returned once no matter how many exports name it. A barrel in the\n * directory re-exporting everything beside it is the ordinary case, and it makes\n * every class reachable twice.\n *\n * The order is the walk's, and within a file the module namespace's, which the\n * language sorts by name. So the answer is the same on every run — worth having\n * where the caller is a scheduler and the alternative is a boot order that\n * depends on the filesystem.\n *\n * @throws DiscoveryError if a walked file cannot be imported. Not a skip: a file\n * that will not load is a class the caller was going to be told about and now is\n * not, which is the failure discovery exists to remove.\n */\nexport async function discoverClasses<T extends ClassLike>(\n dir: string,\n base: T,\n ignore: string[] = [],\n): Promise<T[]> {\n const found = new Set<T>();\n\n for (const path of sourceFiles(dir, ignore)) {\n let module: Record<string, unknown>;\n\n try {\n module = (await import(path)) as Record<string, unknown>;\n } catch (error) {\n throw new DiscoveryError(\n `${path} could not be imported, so the classes in it could not be ` +\n `discovered:\\n ${(error as Error).message}\\n` +\n `List the classes explicitly in the config slice for this directory ` +\n `to skip the walk.`,\n { cause: error },\n );\n }\n\n for (const value of Object.values(module)) {\n if (typeof value !== \"function\" || value === base) continue;\n if (!Object.prototype.isPrototypeOf.call(base, value)) continue;\n found.add(value as unknown as T);\n }\n }\n\n return [...found];\n}\n\n/**\n * The directory an app's `app/` sits in, as the running process can know it.\n *\n * `ROOT_DIR` is the obvious answer and is not available: `Server.start` awaits\n * `waitForBoot()` — every provider's `register` and `boot` — and only then\n * imports the http layer that sets it. Anything resolving paths during boot is\n * earlier than the variable it would want.\n *\n * What it can use is the same rule `httpProd` computes `ROOT_DIR` with a moment\n * later, which is why that file now calls this instead of repeating it. `gemi\n * dev` and `gemi start` both spawn the server with no `cwd`, so the process\n * inherits the CLI's, and the CLI takes `process.cwd()` for the project root\n * itself — `bun/preload.ts` reads `gemi.config` from it on the same assumption.\n *\n * `httpDev` computes a bare `process.cwd()`, so it and `httpProd` already\n * disagree whenever `GEMI_PROJECT_DIR` is set. Nothing in this repo sets it and\n * `gemi start` ignores it when locating the built entry point, so the two rules\n * are the same rule for every configuration that runs today; the divergence is\n * older than this function and wants its own fix.\n */\nexport function projectRoot(): string {\n return join(process.cwd(), process.env.GEMI_PROJECT_DIR ?? \"\");\n}\n"
5
+ "import { existsSync, readdirSync } from \"node:fs\";\nimport { join, relative } from \"node:path\";\n\n/**\n * Finding the classes an application declared and never imported — the walk\n * #322 and #323 both end at.\n *\n * ### Why it has to run the files\n *\n * A job that is written and not listed does not fail; it disappears.\n * `QueueManager.next` looks a dispatched name up in the map its config built and\n * skips what is not there, so the dispatch is simply lost. A cron drifts worse:\n * nothing is waiting on a tick, so a job that never fires reports nothing to\n * anyone. What both come down to is that `app/config/queue.ts` naming every\n * `Job` subclass is the *only* thing putting those classes in the module graph —\n * the list and the directory are two spellings of one set, kept in step by hand.\n *\n * The way out of that is to read the directory, and there is no static read that\n * will do: the class does not exist until its module has run. So **every file\n * walked here is imported**, and a file that *does something* when imported does\n * it here — at boot, in production, on every start. `gemi check models` makes\n * the same trade for the same reason and pays it once per CI run; a caller of\n * this pays it once per process.\n *\n * ### What that asks of a caller\n *\n * **Point it at a directory of class declarations, not at `app/`.** The skip\n * rules on `sourceFiles` drop what certainly is not one — tests, benchmarks,\n * `.d.ts`, vendored packages — and nothing else. Widening the guesses is how a\n * discovery pass ends up quietly covering less than the directory holds, which\n * is the same silence in a new place.\n *\n * **Let a broken file stop the boot.** `discoverClasses` rethrows an import\n * failure naming the file rather than dropping it and carrying on, for the same\n * reason: four classes found out of five looks exactly like five out of five.\n *\n * **Leave a way out.** Discovery is what should happen when an app said\n * nothing. An app that lists its classes explicitly must not reach this file at\n * all — that is the escape hatch for a directory holding something this cannot\n * import, and it is the sentence an error from here should point at.\n *\n * ### One more thing worth knowing\n *\n * This imports by absolute path, while the application imports the same files\n * through the `@/app/*` alias. Bun keys its module registry by the *resolved*\n * path, so those two specifiers land on one module: a job already reached from\n * a controller is not evaluated a second time here, and the class object is the\n * same one. `gemi build` leaves that true in production — `packages: \"external\"`\n * keeps the app's own code out of `dist/server/server.mjs` and resolves it from\n * source at runtime, exactly as `gemi dev` does.\n *\n * Nothing here depends on that holding, and deliberately: `QueueManager` and the\n * `Scheduler`'s cross-reload registry are both keyed by name rather than by\n * class identity, so a build that did inline the app's modules would produce a\n * duplicate class object and still register the right job. Worth knowing before\n * writing a registry keyed the other way.\n */\n\n/**\n * The files under `dir` that could declare a class.\n *\n * Everything underneath it, because apps do group classes into folders, minus\n * what cannot be one. Each of these is going to be *imported*, so the exclusions\n * are about what is certainly not source rather than about what is probably not:\n *\n * - **Declaration files.** `.d.ts` has no runtime module behind it.\n * - **Tests, type tests and benchmarks**, by the suffix a runner already\n * recognises.\n * - **Dot-directories and `node_modules`.**\n * - **Any directory holding a `package.json`.** That is a package that happens\n * to live here — a vendored client, a generated SDK — not this app's source,\n * and importing its entry point runs somebody else's module graph. The\n * template has two under `app/models`.\n *\n * `ignore` is the escape hatch for the rest: a path prefix, relative to `dir`,\n * naming a file or a directory of adjacent code that runs something on import.\n * Nothing is ignored by default.\n *\n * The order is the same on every run over the same tree, which matters because\n * the caller is going to import in it: entries are sorted per directory before\n * recursing, and `readdirSync` order is the filesystem's rather than\n * alphabetical — a tree written `A.ts` then `B.ts` reads back `B.ts` first on\n * the machines this was tested on. Sorting per directory rather than sorting the\n * finished list is deliberate: for a tree holding both `a.ts` and `a/b.ts`, this\n * emits `a/b.ts` first, because the directory sorts before the file.\n *\n * A directory that does not exist yields an empty list rather than throwing.\n * \"The app has no jobs yet\" is an ordinary state and not this function's to\n * complain about — but it is indistinguishable from \"the app's source did not\n * ship\", so a caller that boots on the answer owes the reader a word about which\n * one it got.\n */\nexport function sourceFiles(dir: string, ignore: string[] = []): string[] {\n const out: string[] = [];\n\n const ignored = (path: string) => {\n const rel = relative(dir, path).split(\"\\\\\").join(\"/\");\n return ignore.some(\n (pattern) => rel === pattern || rel.startsWith(`${pattern}/`),\n );\n };\n\n const walk = (current: string) => {\n for (const entry of readdirSync(current, { withFileTypes: true }).sort(\n (a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0),\n )) {\n const path = join(current, entry.name);\n if (ignored(path)) continue;\n\n if (entry.isDirectory()) {\n if (entry.name.startsWith(\".\") || entry.name === \"node_modules\")\n continue;\n if (existsSync(join(path, \"package.json\"))) continue;\n walk(path);\n continue;\n }\n\n if (!entry.name.endsWith(\".ts\") && !entry.name.endsWith(\".tsx\")) continue;\n if (entry.name.endsWith(\".d.ts\")) continue;\n if (/\\.(test|test-d|spec|bench)\\.tsx?$/.test(entry.name)) continue;\n\n out.push(path);\n }\n };\n\n if (!existsSync(dir)) return out;\n\n walk(dir);\n return out;\n}\n\n/**\n * A class, as much of one as this file can name. `abstract` so that a base an\n * app never instantiates directly is a legal argument.\n */\ntype ClassLike = abstract new (...args: never[]) => unknown;\n\n/**\n * A file that would not import, reported with the file that would not import.\n *\n * Separate from a bare rethrow because the stack of a failed dynamic import\n * names the module that failed to *resolve*, several frames deep, and says\n * nothing about the walk that asked for it — so the reader learns that some\n * `?raw` specifier is unresolvable without learning that discovery is what\n * imported it, or that listing the classes explicitly is how they get their boot\n * back.\n */\nexport class DiscoveryError extends Error {\n constructor(message: string, options?: { cause?: unknown }) {\n super(message, options);\n this.name = \"DiscoveryError\";\n }\n}\n\n/**\n * Every exported class under `dir` whose prototype chain reaches `base`.\n *\n * `base` is a parameter rather than an import so that this file names no\n * service and stays cheap to depend on — `bin/check-models.ts` uses the walker\n * above and is bundled into `dist/bin/gemi.js`, which is not somewhere gemi's\n * service layer should end up. It is also what lets a test hand in a base class\n * of its own instead of standing up a project that can resolve `gemi/services`.\n *\n * `base` itself is never returned. A directory whose files import their base\n * from a sibling — the shape an app reaches for when several jobs share a gate —\n * re-exports it as often as not, and a framework that scheduled the abstract\n * base along with its subclasses would be running a job nobody wrote.\n *\n * A class is returned once no matter how many exports name it. A barrel in the\n * directory re-exporting everything beside it is the ordinary case, and it makes\n * every class reachable twice.\n *\n * The order is the walk's, and within a file the module namespace's, which the\n * language sorts by name. So the answer is the same on every run — worth having\n * where the caller is a scheduler and the alternative is a boot order that\n * depends on the filesystem.\n *\n * `onSkipped` is handed every export that did *not* match, with the file it came\n * from. Discovery's characteristic failure is a thing the author wrote and this\n * walk cannot see, and by the time an export has been discarded here the\n * information about why is gone — the caller is left holding \"four classes\"\n * where the directory holds five. A caller that can recognise its own\n * near-misses, as `discoverCommands` recognises a builder chain that was never\n * finished, uses this to say so by name instead.\n *\n * @throws DiscoveryError if a walked file cannot be imported. Not a skip: a file\n * that will not load is a class the caller was going to be told about and now is\n * not, which is the failure discovery exists to remove.\n */\nexport async function discoverClasses<T extends ClassLike>(\n dir: string,\n base: T,\n ignore: string[] = [],\n onSkipped?: (value: unknown, file: string) => void,\n): Promise<T[]> {\n const found = new Set<T>();\n\n for (const path of sourceFiles(dir, ignore)) {\n let module: Record<string, unknown>;\n\n try {\n module = (await import(path)) as Record<string, unknown>;\n } catch (error) {\n throw new DiscoveryError(\n `${path} could not be imported, so the classes in it could not be ` +\n `discovered:\\n ${(error as Error).message}\\n` +\n `List the classes explicitly in the config slice for this directory ` +\n `to skip the walk.`,\n { cause: error },\n );\n }\n\n for (const value of Object.values(module)) {\n if (\n typeof value === \"function\" &&\n value !== base &&\n Object.prototype.isPrototypeOf.call(base, value)\n ) {\n found.add(value as unknown as T);\n continue;\n }\n\n onSkipped?.(value, path);\n }\n }\n\n return [...found];\n}\n\n/**\n * The directory an app's `app/` sits in, as the running process can know it.\n *\n * `ROOT_DIR` is the obvious answer and is not available: `Server.start` awaits\n * `waitForBoot()` — every provider's `register` and `boot` — and only then\n * imports the http layer that sets it. Anything resolving paths during boot is\n * earlier than the variable it would want.\n *\n * What it can use is the same rule `httpProd` computes `ROOT_DIR` with a moment\n * later, which is why that file now calls this instead of repeating it. `gemi\n * dev` and `gemi start` both spawn the server with no `cwd`, so the process\n * inherits the CLI's, and the CLI takes `process.cwd()` for the project root\n * itself — `bun/preload.ts` reads `gemi.config` from it on the same assumption.\n *\n * `httpDev` computes a bare `process.cwd()`, so it and `httpProd` already\n * disagree whenever `GEMI_PROJECT_DIR` is set. Nothing in this repo sets it and\n * `gemi start` ignores it when locating the built entry point, so the two rules\n * are the same rule for every configuration that runs today; the divergence is\n * older than this function and wants its own fix.\n */\nexport function projectRoot(): string {\n return join(process.cwd(), process.env.GEMI_PROJECT_DIR ?? \"\");\n}\n"
6
6
  ],
7
- "mappings": ";AAAA,qBAAS,iBAAY,WACrB,eAAS,cAAM,aA2FR,SAAS,CAAW,CAAC,EAAa,EAAmB,CAAC,EAAa,CACxE,IAAM,EAAgB,CAAC,EAEjB,EAAU,CAAC,IAAiB,CAChC,IAAM,EAAM,EAAS,EAAK,CAAI,EAAE,MAAM,IAAI,EAAE,KAAK,GAAG,EACpD,OAAO,EAAO,KACZ,CAAC,IAAY,IAAQ,GAAW,EAAI,WAAW,GAAG,IAAU,CAC9D,GAGI,EAAO,CAAC,IAAoB,CAChC,QAAW,KAAS,EAAY,EAAS,CAAE,cAAe,EAAK,CAAC,EAAE,KAChE,CAAC,EAAG,IAAO,EAAE,KAAO,EAAE,KAAO,GAAK,EAAE,KAAO,EAAE,KAAO,EAAI,CAC1D,EAAG,CACD,IAAM,EAAO,EAAK,EAAS,EAAM,IAAI,EACrC,GAAI,EAAQ,CAAI,EAAG,SAEnB,GAAI,EAAM,YAAY,EAAG,CACvB,GAAI,EAAM,KAAK,WAAW,GAAG,GAAK,EAAM,OAAS,eAC/C,SACF,GAAI,EAAW,EAAK,EAAM,cAAc,CAAC,EAAG,SAC5C,EAAK,CAAI,EACT,SAGF,GAAI,CAAC,EAAM,KAAK,SAAS,KAAK,GAAK,CAAC,EAAM,KAAK,SAAS,MAAM,EAAG,SACjE,GAAI,EAAM,KAAK,SAAS,OAAO,EAAG,SAClC,GAAI,oCAAoC,KAAK,EAAM,IAAI,EAAG,SAE1D,EAAI,KAAK,CAAI,IAIjB,GAAI,CAAC,EAAW,CAAG,EAAG,OAAO,EAG7B,OADA,EAAK,CAAG,EACD,EAmBF,MAAM,UAAuB,KAAM,CACxC,WAAW,CAAC,EAAiB,EAA+B,CAC1D,MAAM,EAAS,CAAO,EACtB,KAAK,KAAO,iBAEhB,CA6BA,eA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S,eAC/C,SACF,GAAI,EAAW,EAAK,EAAM,cAAc,CAAC,EAAG,SAC5C,EAAK,CAAI,EACT,SAGF,GAAI,CAAC,EAAM,KAAK,SAAS,KAAK,GAAK,CAAC,EAAM,KAAK,SAAS,MAAM,EAAG,SACjE,GAAI,EAAM,KAAK,SAAS,OAAO,EAAG,SAClC,GAAI,oCAAoC,KAAK,EAAM,IAAI,EAAG,SAE1D,EAAI,KAAK,CAAI,IAIjB,GAAI,CAAC,EAAW,CAAG,EAAG,OAAO,EAG7B,OADA,EAAK,CAAG,EACD,EAmBF,MAAM,UAAuB,KAAM,CACxC,WAAW,CAAC,EAAiB,EAA+B,CAC1D,MAAM,EAAS,CAAO,EACtB,KAAK,KAAO,iBAEhB,CAqCA,eAAsB,CAAoC,CACxD,EACA,EACA,EAAmB,CAAC,EACpB,EACc,CACd,IAAM,EAAQ,IAAI,IAElB,QAAW,KAAQ,EAAY,EAAK,CAAM,EAAG,CAC3C,IAAI,EAEJ,GAAI,CACF,EAAU,MAAa,UACvB,MAAO,EAAO,CACd,MAAM,IAAI,EACR,GAAG;AAAA,MACoB,EAAgB;AAAA,sFAGvC,CAAE,MAAO,CAAM,CACjB,EAGF,QAAW,KAAS,OAAO,OAAO,CAAM,EAAG,CACzC,GACE,OAAO,IAAU,YACjB,IAAU,GACV,OAAO,UAAU,cAAc,KAAK,EAAM,CAAK,EAC/C,CACA,EAAM,IAAI,CAAqB,EAC/B,SAGF,IAAY,EAAO,CAAI,GAI3B,MAAO,CAAC,GAAG,CAAK,EAuBX,SAAS,CAAW,EAAW,CACpC,OAAO,EAAK,QAAQ,IAAI,EAAG,QAAQ,IAAI,kBAAoB,EAAE",
8
+ "debugId": "A271C12B9933E36964756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -0,0 +1,6 @@
1
+ // @bun
2
+ import{m as j}from"./chunk-ppt296ye.js";import{createElement as a}from"react";function y(i,n){let b=Object.keys(n).sort((u,s)=>s.length-u.length).map((u)=>u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r=new RegExp(b.join("|"),"g");return i.replace(r,(u)=>n[u])}async function L(i,n,b=[]){let r=[...b.map((t)=>`${i}/views/${t}.tsx`),`${i}/views/RootLayout.tsx`],u=new Set;for(let t of r){let e=n.moduleGraph.getModulesByFile(t);if(e)for(let l of e)u.add(l)}let s=[],p=[],d={};for(let t of u)if(t)for(let e of t.importedModules){if(e.file.includes("module.css"))d[e.file]=e.ssrTransformResult.map.sourcesContent.join("");if(e.file.includes(".css"))p.push(e.file)}for(let t of p){let e=await n.transformRequest(t+"?direct"),l=t.includes("module.css"),o="";if(l)o=y(d[t],e.default);s.push({isDev:!0,id:t,content:l?o:e.code})}return s.map((t,e)=>{return a("style",{key:e,type:"text/css","data-vite-dev-id":t.id,dangerouslySetInnerHTML:{__html:t.content}})})}async function N(i=[]){return i.map((n,b)=>{return a("style",{key:b,id:n?.id,type:"text/css",dangerouslySetInnerHTML:{__html:n.content}})})}import{existsSync as z}from"fs";import{basename as f}from"path";import{networkInterfaces as m}from"os";var h={name:"gemi",version:"0.52.0",private:!1,license:"MIT",author:"Enes Tufekci <enes@gemijs.dev>",repository:{type:"git",url:"git+https://github.com/nstfkc/gemi.git",directory:"packages/gemi"},bin:{gemi:"./dist/bin/gemi.js","gemi-orm-generator":"./dist/bin/orm-generator.js"},files:["dist/**/*"],module:!0,exports:{"./http":"./http/index.ts","./client":"./client/index.ts","./app":"./app/index.ts","./facades":"./facades/index.ts","./email":"./email/index.ts","./vite":"./dist/vite/index.mjs","./kernel":"./kernel/index.ts","./services":"./services/index.ts","./broadcasting":"./broadcasting/index.ts","./i18n":"./i18n/index.ts","./server":"./server/index.ts","./config":"./config/index.ts","./container":"./container/index.ts","./foundation":"./foundation/index.ts","./database":"./database/index.ts","./orm":"./orm/index.ts","./support":"./support/index.ts","./console/run":"./console/run.ts","./bun/preload":"./bun/preload.ts","./bun/plugin":"./bun/plugin.ts"},scripts:{lint:"oxlint",typecheck:"tsc --noEmit -p tsconfig.json",build:"NODE_ENV=production bun run build:core && bun run build:bin && bun run build:types && bun run build:client && bun run build:plugin && bun run build:client-types","build:core":"bun ./scripts/build.ts","build:bin":"bun build --outdir=./dist/bin --target=bun --external=vite --external=react-dom --external=react/jsx-runtime --external=bun --external=sharp --external=@azure/storage-blob --sourcemap ./bin/gemi.ts ./bin/orm-generator.ts && bun ./scripts/prepare-bin.ts","build:client":"vite build -c vite.client.config.mts","build:plugin":"vite build -c vite.plugin.config.mts","build:types":"tsc","build:client-types":"tsc -p tsconfig.browser.json",test:"bun --bun vitest","test:types":"vitest run --typecheck.only","build:publish":"bun scripts/build-publish.ts",prepublishOnly:"echo 'Do not publish from this directory \u2014 its exports point at TS source. Run: bun run build:publish, then publish from .publish/' && exit 1"},dependencies:{"@aws-sdk/client-s3":"^3.629.0","@aws-sdk/s3-request-presigner":"^3.629.0","ast-types":"^0.14.2",commander:"^12.1.0",history:"^5.3.0","jsx-email":"2.0.0-rc2.1",open:"^10.1.0","react-error-boundary":"^6.0.0",recast:"^0.23.9",resend:"^6.12.3",satori:"^0.12.2","temporal-polyfill":"^0.2.5","twitter-api-v2":"^1.20.2","urlpattern-polyfill":"^10.0.0",uuid:"^9.0.1"},devDependencies:{"@babel/parser":"^7.25.4","@prisma/generator-helper":"^6.5.0","@repo/typescript-config":"*","@testing-library/react":"^16.3.2","@types/bun":"^1.3.14","@types/eslint":"^8.56.5","@types/node":"^20.11.24","@types/react":"^19.0.2","@types/react-dom":"^19.0.2",eslint:"^8.57.0",jsdom:"^30.0.1",oxlint:"^1.39.0",react:"19.2.3","react-dom":"19.2.3",typescript:"^5.7.3",vitest:"^4.0.0"},peerDependencies:{"@azure/storage-blob":"^12.28.0",react:">=19","react-dom":">=19",sharp:"^0.34.2",vite:"^8.0.0"},peerDependenciesMeta:{"@azure/storage-blob":{optional:!0}}};var O=[" \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2557","\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\u2588\u2588\u2551","\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551\u255A\u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2551","\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u255D \u2588\u2588\u2551\u2588\u2588\u2551"," \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D"],T=Boolean(process.stdout.isTTY)&&!process.env.NO_COLOR,c=(i,n)=>T?`\x1B[${i}m${n}\x1B[0m`:n,k=(i)=>c("1",i),g=(i)=>c("2",i),x=(i)=>c("36",i),q=(i)=>c("32",i),_=(i)=>c("35",i);function E(){return h.version??"?"}function G(i){for(let n of Object.values(m()))for(let b of n??[])if((b.family==="IPv4"||b.family===4)&&!b.internal)return`http://${b.address}:${i}`;return null}function H(i){return j(i).filter((n)=>z(n)).map((n)=>f(n))}function A(i){let{port:n,rootDir:b}=i,r=`http://localhost:${n}`,u=G(n),s=H(b),p=(t,e)=>` ${q("\u279C")} ${k(t.padEnd(9))}${e}`,d=["",...O.map((t)=>_(t)),"",` ${g("gemi")} ${x(`v${E()}`)}`,"",p("Local:",x(r)),p("Network:",u?x(u):g("unavailable")),p("Env:",s.length?s.join(", "):g("none")),""];console.log(d.join(`
3
+ `))}
4
+ export{L as b,N as c,A as d};
5
+
6
+ //# debugId=2892EDBCD28AC72D64756E2164756E21