gemi 0.4.124 → 0.4.126

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 (153) hide show
  1. package/dist/app/App.d.ts +3 -0
  2. package/dist/app/App.d.ts.map +1 -1
  3. package/dist/app/index.js +2 -2
  4. package/dist/app/index.js.map +3 -3
  5. package/dist/auth/AuthenticationServiceProvider.d.ts +2 -0
  6. package/dist/auth/AuthenticationServiceProvider.d.ts.map +1 -1
  7. package/dist/bin/index.js +430 -430
  8. package/dist/broadcasting/index.d.ts +2 -0
  9. package/dist/broadcasting/index.d.ts.map +1 -0
  10. package/dist/broadcasting/index.js +1 -1
  11. package/dist/chunk-1qw2v7pp.js +20 -0
  12. package/dist/{chunk-m1838202.js.map → chunk-1qw2v7pp.js.map} +8 -11
  13. package/dist/chunk-2h3dg6ak.js +4 -0
  14. package/dist/{chunk-5bsvn385.js.map → chunk-2h3dg6ak.js.map} +2 -2
  15. package/dist/chunk-2srb036m.js +4 -0
  16. package/dist/{chunk-6wj5qxwf.js.map → chunk-2srb036m.js.map} +1 -1
  17. package/dist/chunk-3sgwee0d.js +4 -0
  18. package/dist/{chunk-9vb54d71.js.map → chunk-3sgwee0d.js.map} +2 -2
  19. package/dist/chunk-49eas1md.js +4 -0
  20. package/dist/{chunk-93r4rez6.js.map → chunk-49eas1md.js.map} +2 -2
  21. package/dist/chunk-4rgtv394.js +4 -0
  22. package/dist/{chunk-j618jvh4.js.map → chunk-4rgtv394.js.map} +4 -4
  23. package/dist/chunk-5e4ahq43.js +4 -0
  24. package/dist/{chunk-cw23pjra.js.map → chunk-5e4ahq43.js.map} +6 -6
  25. package/dist/chunk-5vx2z0tr.js +4 -0
  26. package/dist/{chunk-t6cspqr4.js.map → chunk-5vx2z0tr.js.map} +2 -2
  27. package/dist/chunk-716jpkxk.js +22 -0
  28. package/dist/chunk-716jpkxk.js.map +10 -0
  29. package/dist/chunk-75wm7ysh.js +11 -0
  30. package/dist/{chunk-hddz9z7a.js.map → chunk-75wm7ysh.js.map} +5 -5
  31. package/dist/chunk-7sn2drtt.js +5 -0
  32. package/dist/chunk-7sn2drtt.js.map +64 -0
  33. package/dist/chunk-7vggss3r.js +4 -0
  34. package/dist/{chunk-kqyj62v4.js.map → chunk-7vggss3r.js.map} +2 -2
  35. package/dist/chunk-99h5xbnm.js +4 -0
  36. package/dist/{chunk-gz4h6jsy.js.map → chunk-99h5xbnm.js.map} +2 -2
  37. package/dist/chunk-a0zzg1ga.js +3 -0
  38. package/dist/chunk-a0zzg1ga.js.map +16 -0
  39. package/dist/chunk-cqn3123n.js +3 -0
  40. package/dist/{chunk-1we4kcb2.js.map → chunk-cqn3123n.js.map} +2 -2
  41. package/dist/chunk-h64zrvbm.js +4 -0
  42. package/dist/chunk-h64zrvbm.js.map +10 -0
  43. package/dist/chunk-hxntatg7.js +4 -0
  44. package/dist/chunk-hxntatg7.js.map +10 -0
  45. package/dist/chunk-jtv3vbyw.js +4 -0
  46. package/dist/{chunk-dq276gmc.js.map → chunk-jtv3vbyw.js.map} +2 -2
  47. package/dist/chunk-mkwkxzth.js +4 -0
  48. package/dist/{chunk-ksckhxbt.js.map → chunk-mkwkxzth.js.map} +5 -5
  49. package/dist/chunk-mr2ew71j.js +4 -0
  50. package/dist/{chunk-m7wq4g1v.js.map → chunk-mr2ew71j.js.map} +6 -6
  51. package/dist/chunk-qcdwj08x.js +8 -0
  52. package/dist/{chunk-9xeqzq5a.js.map → chunk-qcdwj08x.js.map} +2 -2
  53. package/dist/chunk-qf0qr76c.js +4 -0
  54. package/dist/{chunk-8vjfr0mp.js.map → chunk-qf0qr76c.js.map} +2 -2
  55. package/dist/chunk-sdejryyp.js +4 -0
  56. package/dist/{chunk-3ynep2h9.js.map → chunk-sdejryyp.js.map} +1 -1
  57. package/dist/chunk-tmp6k3re.js +4 -0
  58. package/dist/{chunk-2c4nwgcj.js.map → chunk-tmp6k3re.js.map} +2 -2
  59. package/dist/chunk-tq3grsay.js +4 -0
  60. package/dist/chunk-tq3grsay.js.map +14 -0
  61. package/dist/chunk-w1t51rk3.js +4 -0
  62. package/dist/{chunk-34x1c2ey.js.map → chunk-w1t51rk3.js.map} +4 -4
  63. package/dist/chunk-wdx058ey.js +4 -0
  64. package/dist/{chunk-d7hn6b85.js.map → chunk-wdx058ey.js.map} +2 -2
  65. package/dist/chunk-yd2678ws.js +4 -0
  66. package/dist/{chunk-ycz2czq7.js.map → chunk-yd2678ws.js.map} +4 -4
  67. package/dist/client/index.js.map +1 -1
  68. package/dist/client/rpc.d.ts +2 -3
  69. package/dist/client/rpc.d.ts.map +1 -1
  70. package/dist/client/useRoute.d.ts +1 -1
  71. package/dist/email/index.js +2 -2
  72. package/dist/email/index.js.map +2 -2
  73. package/dist/facades/Broadcast.d.ts.map +1 -1
  74. package/dist/facades/index.js +2 -2
  75. package/dist/facades/index.js.map +11 -11
  76. package/dist/http/AuthenticationMiddlware.d.ts +1 -1
  77. package/dist/http/AuthenticationMiddlware.d.ts.map +1 -1
  78. package/dist/http/CacheMiddleware.d.ts +5 -0
  79. package/dist/http/CacheMiddleware.d.ts.map +1 -0
  80. package/dist/http/HttpRequest.d.ts +2 -1
  81. package/dist/http/HttpRequest.d.ts.map +1 -1
  82. package/dist/http/I18nServiceContainer.d.ts +1 -0
  83. package/dist/http/I18nServiceContainer.d.ts.map +1 -1
  84. package/dist/http/Middleware.d.ts +3 -3
  85. package/dist/http/Middleware.d.ts.map +1 -1
  86. package/dist/http/MiddlewareServiceProvider.d.ts +2 -1
  87. package/dist/http/MiddlewareServiceProvider.d.ts.map +1 -1
  88. package/dist/http/RateLimitMiddleware.d.ts +1 -2
  89. package/dist/http/RateLimitMiddleware.d.ts.map +1 -1
  90. package/dist/http/index.d.ts +1 -0
  91. package/dist/http/index.d.ts.map +1 -1
  92. package/dist/http/index.js +2 -2
  93. package/dist/http/index.js.map +9 -8
  94. package/dist/kernel/Kernel.d.ts +3 -1
  95. package/dist/kernel/Kernel.d.ts.map +1 -1
  96. package/dist/kernel/index.js +2 -2
  97. package/dist/kernel/index.js.map +3 -3
  98. package/dist/server/index.js +5 -5
  99. package/dist/server/index.js.map +4 -5
  100. package/dist/services/index.d.ts +2 -0
  101. package/dist/services/index.d.ts.map +1 -1
  102. package/dist/services/index.js +12 -3
  103. package/dist/services/index.js.map +23 -9
  104. package/dist/services/logging/LoggingRouter.d.ts +1 -0
  105. package/dist/services/logging/LoggingRouter.d.ts.map +1 -1
  106. package/dist/services/logging/LoggingServiceContainer.d.ts +1 -1
  107. package/dist/services/logging/LoggingServiceContainer.d.ts.map +1 -1
  108. package/dist/services/middleware/MiddlewareServiceContainer.d.ts +2 -2
  109. package/dist/services/middleware/MiddlewareServiceContainer.d.ts.map +1 -1
  110. package/dist/services/queue/Job.d.ts +11 -0
  111. package/dist/services/queue/Job.d.ts.map +1 -0
  112. package/dist/services/queue/QueueServiceContainer.d.ts +24 -0
  113. package/dist/services/queue/QueueServiceContainer.d.ts.map +1 -0
  114. package/dist/services/queue/QueueServiceProvider.d.ts +8 -0
  115. package/dist/services/queue/QueueServiceProvider.d.ts.map +1 -0
  116. package/dist/services/queue/queueWorker.d.ts +2 -0
  117. package/dist/services/queue/queueWorker.d.ts.map +1 -0
  118. package/dist/services/router/ApiRouterServiceContainer.d.ts +2 -1
  119. package/dist/services/router/ApiRouterServiceContainer.d.ts.map +1 -1
  120. package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
  121. package/package.json +1 -2
  122. package/dist/chunk-1we4kcb2.js +0 -3
  123. package/dist/chunk-2c4nwgcj.js +0 -4
  124. package/dist/chunk-34x1c2ey.js +0 -4
  125. package/dist/chunk-39kxd828.js +0 -4
  126. package/dist/chunk-39kxd828.js.map +0 -10
  127. package/dist/chunk-3ynep2h9.js +0 -4
  128. package/dist/chunk-5bsvn385.js +0 -4
  129. package/dist/chunk-6wj5qxwf.js +0 -4
  130. package/dist/chunk-8vjfr0mp.js +0 -4
  131. package/dist/chunk-93r4rez6.js +0 -4
  132. package/dist/chunk-9vb54d71.js +0 -4
  133. package/dist/chunk-9xeqzq5a.js +0 -8
  134. package/dist/chunk-cw23pjra.js +0 -4
  135. package/dist/chunk-d7hn6b85.js +0 -4
  136. package/dist/chunk-dq276gmc.js +0 -4
  137. package/dist/chunk-g290rywa.js +0 -5
  138. package/dist/chunk-g290rywa.js.map +0 -65
  139. package/dist/chunk-g31vhvsw.js +0 -3
  140. package/dist/chunk-g31vhvsw.js.map +0 -15
  141. package/dist/chunk-gz4h6jsy.js +0 -4
  142. package/dist/chunk-hddz9z7a.js +0 -11
  143. package/dist/chunk-j618jvh4.js +0 -4
  144. package/dist/chunk-k4rg25z3.js +0 -4
  145. package/dist/chunk-k4rg25z3.js.map +0 -16
  146. package/dist/chunk-kqyj62v4.js +0 -4
  147. package/dist/chunk-ksckhxbt.js +0 -4
  148. package/dist/chunk-m1838202.js +0 -20
  149. package/dist/chunk-m7wq4g1v.js +0 -4
  150. package/dist/chunk-t6cspqr4.js +0 -4
  151. package/dist/chunk-wrm0pxh2.js +0 -4
  152. package/dist/chunk-wrm0pxh2.js.map +0 -14
  153. package/dist/chunk-ycz2czq7.js +0 -4
@@ -1,14 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../services/router/createFlatViewRoutes.ts", "../services/router/ViewRouterServiceContainer.ts", "../services/router/createRouteManifest.ts", "../services/router/createComponentTree.ts", "../client/helpers/flattenComponentTree.ts"],
4
- "sourcesContent": [
5
- "import { HttpRequest } from \"../../http\";\nimport type { ViewRoutes } from \"../../http/ViewRouter\";\n\nexport type ViewRouteExec = (req: HttpRequest<any, any>) => any; // TODO: fix type\n\nexport type FlatViewRoutes = Record<\n string,\n { exec: ViewRouteExec[]; middleware: (string | any)[] }\n>;\n\nexport function createFlatViewRoutes(routes: ViewRoutes) {\n const flatRoutes: FlatViewRoutes = {};\n\n for (const [routePath, viewConfigOrViewRouter] of Object.entries(routes)) {\n if (\"run\" in viewConfigOrViewRouter) {\n const route = viewConfigOrViewRouter;\n\n if (\"children\" in route) {\n const children = new route.children();\n const result = createFlatViewRoutes(children.routes);\n\n for (const [path, { exec, middleware }] of Object.entries(result)) {\n const key = routePath === \"/\" ? path : `${routePath}${path}`;\n const _key = path === \"/\" && routePath !== \"/\" ? routePath : key;\n\n flatRoutes[_key] = {\n exec: [route.run.bind(route), ...exec],\n middleware: [...route.middlewares, ...middleware],\n };\n }\n } else {\n flatRoutes[routePath] = {\n exec: [route.run.bind(route)],\n middleware: route.middlewares,\n };\n }\n } else {\n const router = new viewConfigOrViewRouter();\n const result = createFlatViewRoutes(router.routes);\n for (const [path, { exec, middleware }] of Object.entries(result)) {\n const key = routePath === \"/\" ? path : `${routePath}${path}`;\n const _key = path === \"/\" && routePath !== \"/\" ? routePath : key;\n flatRoutes[_key] = {\n exec,\n middleware: [...router.middlewares, ...middleware],\n };\n }\n }\n }\n\n return Object.fromEntries(\n Object.entries(flatRoutes).sort(([a], [b]) => {\n const x = a.split(\"/\").length + a.split(\":\").length;\n const y = b.split(\"/\").length + b.split(\":\").length;\n return x - y;\n }),\n );\n}\n",
6
- "import { HttpRequest } from \"../../http\";\nimport { Cookie } from \"../../http/Cookie\";\nimport { GEMI_REQUEST_BREAKER_ERROR } from \"../../http/Error\";\nimport { RequestContext } from \"../../http/requestContext\";\nimport type { RouterMiddleware } from \"../../http/Router\";\nimport {\n createFlatViewRoutes,\n FlatViewRoutes,\n type ViewRouteExec,\n} from \"./createFlatViewRoutes\";\nimport { ViewRouterServiceProvider } from \"./ViewRouterServiceProvider\";\n// @ts-ignore\nimport { renderToReadableStream } from \"react-dom/server.browser\";\nimport { createElement, Fragment } from \"react\";\n\n// @ts-ignore\nimport { URLPattern } from \"urlpattern-polyfill/urlpattern\";\nimport { ServiceContainer } from \"../ServiceContainer\";\nimport type { ViewRoutes } from \"../../http/ViewRouter\";\nimport { AuthViewRouter } from \"../../auth/AuthenticationServiceProvider\";\nimport { createRouteManifest } from \"./createRouteManifest\";\nimport { createComponentTree } from \"./createComponentTree\";\nimport { flattenComponentTree } from \"../../client/helpers/flattenComponentTree\";\nimport type { ComponentTree } from \"../../client/types\";\nimport { I18nServiceContainer } from \"../../http/I18nServiceContainer\";\nimport { MiddlewareServiceContainer } from \"../middleware/MiddlewareServiceContainer\";\n\nexport class ViewRouterServiceContainer extends ServiceContainer {\n static _name = \"ViewRouterServiceContainer\";\n\n flatViewRoutes: FlatViewRoutes = {};\n routeManifest: Record<string, string[]> = {};\n componentTree: ComponentTree = [];\n flatComponentTree: string[] = [];\n root: any = null;\n\n constructor(public service: ViewRouterServiceProvider) {\n super();\n const routes: ViewRoutes = {\n \"/\": service.rootRouter,\n \"/auth\": AuthViewRouter,\n };\n this.flatViewRoutes = createFlatViewRoutes(routes);\n this.routeManifest = createRouteManifest(routes);\n this.componentTree = createComponentTree(routes);\n this.flatComponentTree = flattenComponentTree(this.componentTree);\n this.root = service.root;\n }\n\n boot() {}\n\n async handleViewRequest(req: Request) {\n const url = new URL(req.url);\n const isViewDataRequest = url.searchParams.get(\"json\");\n\n let pageData: {\n cookies: Set<Cookie>;\n headers: Headers;\n currentPathName: string;\n data: Record<string, any>;\n prefetchedData: Record<string, any>;\n user: any; // TODO: fix type\n params: Record<string, any>;\n } | null = null;\n\n let httpRequest: HttpRequest | null = null;\n\n try {\n let handlers: ViewRouteExec[] = [];\n let middlewares: (RouterMiddleware | string)[] = [];\n let currentPathName: null | string = null;\n let params: Record<string, any> = {};\n\n for (const [pathname, handler] of Object.entries(this.flatViewRoutes)) {\n const pattern = new URLPattern({ pathname });\n if (pattern.test({ pathname: url.pathname })) {\n currentPathName = pathname;\n params = pattern.exec({ pathname: url.pathname })?.pathname.groups!;\n handlers = handler.exec;\n middlewares = handler.middleware;\n break;\n }\n }\n\n httpRequest = new HttpRequest(req, params, \"view\");\n await this.service.onRequestStart(httpRequest);\n const { data, cookies, headers, user, prefetchedData } =\n await RequestContext.run(httpRequest, async () => {\n const ctx = RequestContext.getStore();\n ctx.setRequest(httpRequest);\n\n await MiddlewareServiceContainer.use().runMiddleware(\n middlewares,\n currentPathName,\n );\n\n const data = await Promise.all([\n ...handlers.map((fn) => fn(httpRequest as any)),\n ...Array.from(ctx.prefetchPromiseQueue).map((fn) => fn()),\n ]);\n\n const cookies = ctx.cookies;\n const headers = ctx.headers;\n const prefetchedResources = ctx.prefetchedResources;\n\n return {\n data,\n cookies,\n headers,\n user: ctx.user,\n prefetchedData: Object.fromEntries(prefetchedResources.entries()),\n };\n });\n\n pageData = {\n data,\n prefetchedData,\n currentPathName,\n user,\n params,\n cookies,\n headers,\n };\n } catch (err) {\n if (err.kind === GEMI_REQUEST_BREAKER_ERROR) {\n if (isViewDataRequest) {\n const { status = 400, data, directive, headers } = err.payload.api;\n return new Response(JSON.stringify({ data, directive }), {\n headers,\n status,\n });\n } else {\n const { status = 400, error } = err.payload.view;\n return new Response(error?.message, {\n ...err.payload.view,\n status,\n });\n }\n } else {\n this.service.onRequestFail(httpRequest, err);\n throw err;\n }\n }\n\n const { data, params, currentPathName, user, cookies } = pageData;\n\n const viewData = data.reduce((acc, data) => {\n return {\n ...acc,\n ...data,\n };\n }, {});\n\n const i18nServiceContainer = I18nServiceContainer.use();\n const isI18nEnabled = i18nServiceContainer.isEnabled;\n let i18n: Record<string, any> = {};\n if (isI18nEnabled) {\n const locale = i18nServiceContainer.detectLocale(\n new HttpRequest(req, params as any),\n );\n const translations = i18nServiceContainer.getPageTranslations(\n locale,\n currentPathName,\n );\n\n i18n = {\n supportedLocales: i18nServiceContainer.supportedLocales,\n currentLocale: locale,\n dictionary: {\n [locale]: translations,\n },\n };\n }\n\n if (isViewDataRequest) {\n const headers = new Headers();\n headers.set(\"Content-Type\", \"application/json\");\n\n cookies.forEach((cookie) =>\n headers.append(\"Set-Cookie\", cookie.toString()),\n );\n\n headers.append(\n \"Cache-Control\",\n user\n ? \"private, no-cache, no-store, max-age=0, must-revalidate\"\n : \"public, max-age=864000, must-revalidate\",\n );\n\n await this.service.onRequestEnd(httpRequest);\n\n return new Response(\n JSON.stringify({\n data: {\n [url.pathname]: viewData,\n },\n prefetchedData: pageData.prefetchedData,\n i18n,\n is404: !currentPathName,\n }),\n {\n headers,\n },\n );\n }\n\n const headers = new Headers();\n headers.set(\"Content-Type\", \"text/html\");\n headers.set(\n \"Cache-Control\",\n user\n ? \"private, no-cache, no-store, max-age=0, must-revalidate\"\n : \"public, max-age=864000, must-revalidate\",\n );\n headers.set(\"ETag\", 'W/\"' + Math.random().toString(36).substring(7) + '\"');\n\n pageData.cookies.forEach((cookie) =>\n headers.append(\"Set-Cookie\", cookie.toString()),\n );\n\n const result = {\n kind: \"view\",\n data: {\n pageData: {\n [url.pathname]: viewData,\n },\n prefetchedData: pageData.prefetchedData,\n i18n,\n auth: { user },\n routeManifest: this.routeManifest,\n router: {\n pathname: currentPathName,\n params,\n currentPath: url.pathname,\n searchParams: url.search,\n is404: !currentPathName ? true : false,\n },\n componentTree: [[\"404\", []], ...this.componentTree],\n },\n head: {},\n };\n const Root = this.root;\n return async (params: {\n styles: any[];\n viewImportMap: any;\n bootstrapModules: string[];\n loaders: string;\n }) => {\n const { bootstrapModules, loaders, styles, viewImportMap } = params;\n const stream = await renderToReadableStream(\n createElement(Fragment, {\n children: [\n styles,\n createElement(Root, {\n data: result.data,\n viewImportMap,\n }),\n ],\n }),\n {\n bootstrapScriptContent: `window.__GEMI_DATA__ = ${JSON.stringify(result.data)}; window.loaders=${loaders}`,\n bootstrapModules,\n },\n );\n\n await this.service.onRequestEnd(httpRequest);\n return new Response(stream, {\n status: !currentPathName ? 404 : 200,\n headers,\n });\n };\n }\n}\n",
7
- "import type { ViewRoutes } from \"../../http/ViewRouter\";\n\nexport function createRouteManifest(routes: ViewRoutes) {\n const routeManifest: Record<string, string[]> = {};\n for (const [routePath, routeHandler] of Object.entries(routes)) {\n if (\"run\" in routeHandler) {\n const viewPath = routeHandler.viewPath;\n\n if (\"children\" in routeHandler) {\n routeManifest[routePath] = [viewPath];\n }\n\n if (\"children\" in routeHandler) {\n const children = new routeHandler.children();\n const manifest = createRouteManifest(children.routes);\n for (const [path, viewPaths] of Object.entries(manifest)) {\n const key = routePath === \"/\" ? path : `${routePath}${path}`;\n const _key = path === \"/\" && routePath !== \"/\" ? routePath : key;\n routeManifest[_key] = [viewPath, ...viewPaths];\n }\n } else {\n routeManifest[routePath] = [viewPath];\n }\n } else {\n const router = new routeHandler();\n\n const manifest = createRouteManifest(router.routes);\n for (const [path, viewPaths] of Object.entries(manifest)) {\n const key = routePath === \"/\" ? path : `${routePath}${path}`;\n const _key = path === \"/\" && routePath !== \"/\" ? routePath : key;\n routeManifest[_key] = viewPaths;\n }\n }\n }\n\n return routeManifest;\n}\n",
8
- "import type { ComponentTree } from \"../../client/types\";\nimport type { ViewRoutes } from \"../../http/ViewRouter\";\n\nexport function createComponentTree(routes: ViewRoutes): ComponentTree {\n const componentTree: ComponentTree = [];\n\n for (const [_, routeHandler] of Object.entries(routes)) {\n if (\"run\" in routeHandler) {\n const viewPath = routeHandler.viewPath;\n if (\"children\" in routeHandler) {\n const router = new routeHandler.children();\n const branch = createComponentTree(router.routes);\n componentTree.push([viewPath, branch]);\n } else {\n componentTree.push([viewPath, []]);\n }\n } else {\n const router = new routeHandler();\n const branch = createComponentTree(router.routes);\n componentTree.push(...branch);\n }\n }\n\n return componentTree;\n}\n",
9
- "import type { ComponentTree } from \"../types\";\n\nexport function flattenComponentTree(componentTree: ComponentTree): string[] {\n let out: string[] = [];\n for (const [root, branches] of componentTree) {\n out.push(root, ...flattenComponentTree(branches).flat());\n }\n return Array.from(new Set(out));\n}\n"
10
- ],
11
- "mappings": "0MAUO,EAAS,LAAoB,LAAC,EAAoB,CACvD,MAAM,EAA6B,CAAC,EAEpC,QAAY,EAAW,KAA2B,OAAO,QAAQ,CAAM,EACrE,GAAI,QAAS,EAAwB,CACnC,MAAM,EAAQ,EAEd,GAAI,aAAc,EAAO,CACvB,MAAM,EAAW,IAAI,EAAM,SACrB,EAAS,EAAqB,EAAS,MAAM,EAEnD,QA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SACT,KAAK,UAAU,CACb,KAAM,EACH,EAAI,UAAW,CAClB,EACA,eAAgB,EAAS,eACzB,OACA,OAAQ,CACV,CAAC,EACD,CACE,SACF,CACF,EAGF,MAAM,EAAU,IAAI,QACpB,EAAQ,IAAI,eAAgB,WAAW,EACvC,EAAQ,IACN,gBACA,EACI,0DACA,yCACN,EACA,EAAQ,IAAI,OAAQ,MAAQ,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,UAAU,CAAC,EAAI,GAAG,EAEzE,EAAS,QAAQ,QAAQ,CAAC,IACxB,EAAQ,OAAO,aAAc,EAAO,SAAS,CAAC,CAChD,EAEA,MAAM,EAAS,CACb,KAAM,OACN,KAAM,CACJ,SAAU,EACP,EAAI,UAAW,CAClB,EACA,eAAgB,EAAS,eACzB,OACA,KAAM,CAAE,MAAK,EACb,cAAe,KAAK,cACpB,OAAQ,CACN,SAAU,EACV,SACA,YAAa,EAAI,SACjB,aAAc,EAAI,OAClB,OAAQ,EAAkB,GAAO,EACnC,EACA,cAAe,CAAC,CAAC,MAAO,CAAC,CAAC,EAAG,GAAG,KAAK,aAAa,CACpD,EACA,KAAM,CAAC,CACT,EACM,EAAO,KAAK,KAClB,MAAO,OAAO,IAKR,CACJ,MAAQ,mBAAkB,UAAS,SAAQ,iBAAkB,EACvD,EAAS,MAAM,EACnB,EAAc,EAAU,CACtB,SAAU,CACR,EACA,EAAc,EAAM,CAClB,KAAM,EAAO,KACb,eACF,CAAC,CACH,CACF,CAAC,EACD,CACE,uBAAwB,0BAA0B,KAAK,UAAU,EAAO,IAAI,qBAAqB,IACjG,kBACF,CACF,EAGA,OADA,MAAM,KAAK,QAAQ,aAAa,CAAW,EACpC,IAAI,SAAS,EAAQ,CAC1B,QAAS,EAAkB,IAAM,IACjC,SACF,CAAC,GAGP",
12
- "debugId": "9EE9AC75FB2C367664756E2164756E21",
13
- "names": []
14
- }
@@ -1,4 +0,0 @@
1
- // @bun
2
- import"./chunk-9vb54d71.js";import{K as b}from"./chunk-6wj5qxwf.js";import"./chunk-d7hn6b85.js";import{$ as U0,Aa as ul,Ba as tl,Ca as h0,Da as l0,Ea as D0,Fa as E0,W as Gl,X as Il,Y as K0,Z as F0,_ as B0,da as Qh,ea as Q0,fa as Ml,ga as zl,ha as Nl,ia as Wl,ja as X0,ka as xl,la as il,ma as cl,na as el,oa as Y0,pa as Z0,ra as F,sa as B,ta as $0,ua as pl,va as nl,wa as V0,xa as ol,ya as P0,za as Gh}from"./chunk-m1838202.js";import{Ga as S0,Ha as H0,Ia as L0,Na as Al,Pa as Ll,Qa as Rl,Ra as y0,Sa as jl,Ta as al,Wa as fl,Xa as Cl,bb as K,cb as Sh,db as hw,hb as R0,jb as H,lb as u,ob as j0,qb as q0,rb as T,sb as a0,tb as Ol,ub as gl,vb as m0,wb as J0,xb as eh}from"./chunk-g290rywa.js";import"./chunk-8vjfr0mp.js";import{Eb as f,Fb as sl}from"./chunk-k4rg25z3.js";import"./chunk-g31vhvsw.js";import{Mb as Xh}from"./chunk-hddz9z7a.js";import"./chunk-1we4kcb2.js";var C=b(Qh(),1);var dl=b(Gh(),1);function Ew(h){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:h.region},propertiesExtractor:(w,l)=>({signingProperties:{config:w,context:l}})}}function wl(h){return{schemeId:"smithy.api#noAuth"}}var Sl=async(h,w,l)=>{return{operation:Gl(w).operation,region:await Il(h.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Hl=(h)=>{const w=[];switch(h.operation){case"AssumeRoleWithSAML":{w.push(wl(h));break}case"AssumeRoleWithWebIdentity":{w.push(wl(h));break}default:w.push(Ew(h))}return w},kw=(h)=>({...h,stsClientCtor:A}),ml=(h)=>{const w=kw(h);return{...dl.resolveAwsSdkSigV4Config(w)}};var Jl=(h)=>{return{...h,useDualstackEndpoint:h.useDualstackEndpoint??!1,useFipsEndpoint:h.useFipsEndpoint??!1,useGlobalEndpoint:h.useGlobalEndpoint??!1,defaultSigningName:"sts"}},D={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 Dl={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.654.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.654.0","@aws-sdk/core":"3.654.0","@aws-sdk/credential-provider-node":"3.654.0","@aws-sdk/middleware-host-header":"3.654.0","@aws-sdk/middleware-logger":"3.654.0","@aws-sdk/middleware-recursion-detection":"3.654.0","@aws-sdk/middleware-user-agent":"3.654.0","@aws-sdk/region-config-resolver":"3.654.0","@aws-sdk/types":"3.654.0","@aws-sdk/util-endpoints":"3.654.0","@aws-sdk/util-user-agent-browser":"3.654.0","@aws-sdk/util-user-agent-node":"3.654.0","@smithy/config-resolver":"^3.0.8","@smithy/core":"^2.4.3","@smithy/fetch-http-handler":"^3.2.7","@smithy/hash-node":"^3.0.6","@smithy/invalid-dependency":"^3.0.6","@smithy/middleware-content-length":"^3.0.8","@smithy/middleware-endpoint":"^3.1.3","@smithy/middleware-retry":"^3.0.18","@smithy/middleware-serde":"^3.0.6","@smithy/middleware-stack":"^3.0.6","@smithy/node-config-provider":"^3.1.7","@smithy/node-http-handler":"^3.2.2","@smithy/protocol-http":"^4.1.3","@smithy/smithy-client":"^3.3.2","@smithy/types":"^3.4.2","@smithy/url-parser":"^3.0.6","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.18","@smithy/util-defaults-mode-node":"^3.0.18","@smithy/util-endpoints":"^2.1.2","@smithy/util-middleware":"^3.0.6","@smithy/util-retry":"^3.0.6","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}};var Ih=b(Gh(),1);var w0=b(Qh(),1);var rl=b(Gh(),1),_l=b(Qh(),1);var El={["required"]:!1,["type"]:"String"},yh={["required"]:!0,default:!1,["type"]:"Boolean"},Yl={["ref"]:"Endpoint"},kl={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},J={["ref"]:"Region"},Kl={["fn"]:"aws.partition",["argv"]:[J],assign:"PartitionResult"},Zl={["ref"]:"UseFIPS"},$l={["ref"]:"UseDualStack"},E={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},Y={},Fl={conditions:[{["fn"]:"stringEquals",["argv"]:[J,"aws-global"]}],["endpoint"]:E,["type"]:"endpoint"},Vl={["fn"]:"booleanEquals",["argv"]:[Zl,!0]},Pl={["fn"]:"booleanEquals",["argv"]:[$l,!0]},Bl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},ql={["ref"]:"PartitionResult"},Ul={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[ql,"supportsDualStack"]}]},yl=[{["fn"]:"isSet",["argv"]:[Yl]}],Ql=[Vl],Xl=[Pl],Fw={version:"1.0",parameters:{Region:El,UseDualStack:yh,UseFIPS:yh,Endpoint:El,UseGlobalEndpoint:yh},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:yl},kl,Kl,{["fn"]:"booleanEquals",["argv"]:[Zl,!1]},{["fn"]:"booleanEquals",["argv"]:[$l,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-northeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-south-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ap-southeast-2"]}],endpoint:E,["type"]:"endpoint"},Fl,{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"ca-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-central-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-north-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"eu-west-3"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"sa-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-east-2"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-1"]}],endpoint:E,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[J,"us-west-2"]}],endpoint:E,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:Y},["type"]:"endpoint"}],["type"]:"tree"},{conditions:yl,rules:[{conditions:Ql,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:Xl,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:Yl,properties:Y,headers:Y},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[kl],rules:[{conditions:[Kl],rules:[{conditions:[Vl,Pl],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Bl]},Ul],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Y,headers:Y},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:Ql,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Bl,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[ql,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Y,headers:Y},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Y,headers:Y},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:Xl,rules:[{conditions:[Ul],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Y,headers:Y},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},Fl,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:Y,headers:Y},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},vl=Fw;var Bw=new Ml({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]}),Tl=(h,w={})=>{return Bw.get(h,()=>Nl(vl,{endpointParams:h,logger:w.logger}))};zl.aws=Wl;var bl=(h)=>{return{apiVersion:"2011-06-15",base64Decoder:h?.base64Decoder??jl,base64Encoder:h?.base64Encoder??al,disableHostPrefix:h?.disableHostPrefix??!1,endpointProvider:h?.endpointProvider??Tl,extensions:h?.extensions??[],httpAuthSchemeProvider:h?.httpAuthSchemeProvider??Hl,httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(w)=>w.getIdentityProvider("aws.auth#sigv4"),signer:new rl.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(w)=>w.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new _l.NoAuthSigner}],logger:h?.logger??new Rl,serviceId:h?.serviceId??"STS",urlParser:h?.urlParser??sl,utf8Decoder:h?.utf8Decoder??Al,utf8Encoder:h?.utf8Encoder??Ll}};var G0=(h)=>{gl(process.version);const w=l0(h),l=()=>w().then(Ol),G=bl(h);return Ih.emitWarningIfUnsupportedVersion(process.version),{...G,...h,runtime:"node",defaultsMode:w,bodyLengthChecker:h?.bodyLengthChecker??h0,credentialDefaultProvider:h?.credentialDefaultProvider??Xh,defaultUserAgentProvider:h?.defaultUserAgentProvider??ul({serviceId:G.serviceId,clientVersion:Dl.version}),httpAuthSchemes:h?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(I)=>I.getIdentityProvider("aws.auth#sigv4")||(async(S)=>await Xh(S?.__config||{})()),signer:new Ih.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(I)=>I.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new w0.NoAuthSigner}],maxAttempts:h?.maxAttempts??f(nl),region:h?.region??f(cl,el),requestHandler:fl.create(h?.requestHandler??l),retryMode:h?.retryMode??f({...ol,default:async()=>(await l()).retryMode||pl}),sha256:h?.sha256??tl.bind(null,"sha256"),streamCollector:h?.streamCollector??Cl,useDualstackEndpoint:h?.useDualstackEndpoint??f(xl),useFipsEndpoint:h?.useFipsEndpoint??f(il)}};var I0=(h)=>{const w=h.httpAuthSchemes;let{httpAuthSchemeProvider:l,credentials:G}=h;return{setHttpAuthScheme(I){const S=w.findIndex((d)=>d.schemeId===I.schemeId);if(S===-1)w.push(I);else w.splice(S,1,I)},httpAuthSchemes(){return w},setHttpAuthSchemeProvider(I){l=I},httpAuthSchemeProvider(){return l},setCredentials(I){G=I},credentials(){return G}}},d0=(h)=>{return{httpAuthSchemes:h.httpAuthSchemes(),httpAuthSchemeProvider:h.httpAuthSchemeProvider(),credentials:h.credentials()}};var dh=(h)=>h,k0=(h,w)=>{const l={...dh(D0(h)),...dh(m0(h)),...dh(S0(h)),...dh(I0(h))};return w.forEach((G)=>G.configure(l)),{...h,...E0(l),...J0(l),...H0(l),...d0(l)}};class A extends y0{constructor(...[h]){const w=G0(h||{}),l=Jl(w),G=Q0(l),I=V0(G),S=Y0(I),d=K0(S),X=$0(d),M=ml(X),q=k0(M,h?.extensions||[]);super(q);this.config=q,this.middlewareStack.use(X0(this.config)),this.middlewareStack.use(P0(this.config)),this.middlewareStack.use(Z0(this.config)),this.middlewareStack.use(F0(this.config)),this.middlewareStack.use(B0(this.config)),this.middlewareStack.use(U0(this.config)),this.middlewareStack.use(C.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Sl,identityProviderConfigProvider:async(n)=>new C.DefaultIdentityProviderConfig({"aws.auth#sigv4":n.credentials})})),this.middlewareStack.use(C.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class Q extends q0{constructor(h){super(h);Object.setPrototypeOf(this,Q.prototype)}}class Hh extends Q{constructor(h){super({name:"ExpiredTokenException",$fault:"client",...h});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,Hh.prototype)}}class mh extends Q{constructor(h){super({name:"MalformedPolicyDocumentException",$fault:"client",...h});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,mh.prototype)}}class Jh extends Q{constructor(h){super({name:"PackedPolicyTooLargeException",$fault:"client",...h});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,Jh.prototype)}}class Dh extends Q{constructor(h){super({name:"RegionDisabledException",$fault:"client",...h});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,Dh.prototype)}}class Eh extends Q{constructor(h){super({name:"IDPRejectedClaimException",$fault:"client",...h});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,Eh.prototype)}}class kh extends Q{constructor(h){super({name:"InvalidIdentityTokenException",$fault:"client",...h});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,kh.prototype)}}class Kh extends Q{constructor(h){super({name:"IDPCommunicationErrorException",$fault:"client",...h});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,Kh.prototype)}}class Fh extends Q{constructor(h){super({name:"InvalidAuthorizationMessageException",$fault:"client",...h});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,Fh.prototype)}}var o=(h)=>({...h,...h.SecretAccessKey&&{SecretAccessKey:Sh}}),v0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),M0=(h)=>({...h,...h.SAMLAssertion&&{SAMLAssertion:Sh}}),z0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),N0=(h)=>({...h,...h.WebIdentityToken&&{WebIdentityToken:Sh}}),W0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),T0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}}),A0=(h)=>({...h,...h.Credentials&&{Credentials:o(h.Credentials)}});var v=b(Gh(),1);var s0=async(h,w)=>{const l=j;let G;return G=_({...Pw(h,w),[s]:lG,[r]:a}),R(w,l,"/",void 0,G)},r0=async(h,w)=>{const l=j;let G;return G=_({...qw(h,w),[s]:wG,[r]:a}),R(w,l,"/",void 0,G)},_0=async(h,w)=>{const l=j;let G;return G=_({...vw(h,w),[s]:GG,[r]:a}),R(w,l,"/",void 0,G)},b0=async(h,w)=>{const l=j;let G;return G=_({...Mw(h,w),[s]:IG,[r]:a}),R(w,l,"/",void 0,G)},f0=async(h,w)=>{const l=j;let G;return G=_({...zw(h,w),[s]:dG,[r]:a}),R(w,l,"/",void 0,G)},C0=async(h,w)=>{const l=j;let G;return G=_({...Nw(h,w),[s]:SG,[r]:a}),R(w,l,"/",void 0,G)},O0=async(h,w)=>{const l=j;let G;return G=_({...Ww(h,w),[s]:HG,[r]:a}),R(w,l,"/",void 0,G)},g0=async(h,w)=>{const l=j;let G;return G=_({...Tw(h,w),[s]:mG,[r]:a}),R(w,l,"/",void 0,G)},x0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await v.parseXmlBody(h.body,w);let G={};return G=sw(l.AssumeRoleResult,w),{$metadata:k(h),...G}},i0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await v.parseXmlBody(h.body,w);let G={};return G=rw(l.AssumeRoleWithSAMLResult,w),{$metadata:k(h),...G}},c0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await v.parseXmlBody(h.body,w);let G={};return G=_w(l.AssumeRoleWithWebIdentityResult,w),{$metadata:k(h),...G}},e0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await v.parseXmlBody(h.body,w);let G={};return G=bw(l.DecodeAuthorizationMessageResult,w),{$metadata:k(h),...G}},p0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await v.parseXmlBody(h.body,w);let G={};return G=Ow(l.GetAccessKeyInfoResult,w),{$metadata:k(h),...G}},n0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await v.parseXmlBody(h.body,w);let G={};return G=gw(l.GetCallerIdentityResult,w),{$metadata:k(h),...G}},o0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await v.parseXmlBody(h.body,w);let G={};return G=xw(l.GetFederationTokenResult,w),{$metadata:k(h),...G}},u0=async(h,w)=>{if(h.statusCode>=300)return L(h,w);const l=await v.parseXmlBody(h.body,w);let G={};return G=iw(l.GetSessionTokenResult,w),{$metadata:k(h),...G}},L=async(h,w)=>{const l={...h,body:await v.parseXmlErrorBody(h.body,w)},G=JG(h,l.body);switch(G){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Uw(l,w);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Zw(l,w);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await $w(l,w);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Vw(l,w);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Qw(l,w);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Yw(l,w);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await yw(l,w);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Xw(l,w);default:const I=l.body;return hG({output:h,parsedBody:I.Error,errorCode:G})}},Uw=async(h,w)=>{const l=h.body,G=fw(l.Error,w),I=new Hh({$metadata:k(h),...G});return T(I,l)},yw=async(h,w)=>{const l=h.body,G=cw(l.Error,w),I=new Kh({$metadata:k(h),...G});return T(I,l)},Qw=async(h,w)=>{const l=h.body,G=ew(l.Error,w),I=new Eh({$metadata:k(h),...G});return T(I,l)},Xw=async(h,w)=>{const l=h.body,G=pw(l.Error,w),I=new Fh({$metadata:k(h),...G});return T(I,l)},Yw=async(h,w)=>{const l=h.body,G=nw(l.Error,w),I=new kh({$metadata:k(h),...G});return T(I,l)},Zw=async(h,w)=>{const l=h.body,G=ow(l.Error,w),I=new mh({$metadata:k(h),...G});return T(I,l)},$w=async(h,w)=>{const l=h.body,G=uw(l.Error,w),I=new Jh({$metadata:k(h),...G});return T(I,l)},Vw=async(h,w)=>{const l=h.body,G=tw(l.Error,w),I=new Dh({$metadata:k(h),...G});return T(I,l)},Pw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[$]!=null){const G=Bh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,S])=>{const d=`PolicyArns.${I}`;l[d]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const G=t0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,S])=>{const d=`Tags.${I}`;l[d]=S})}if(h[Oh]!=null){const G=aw(h[Oh],w);if(h[Oh]?.length===0)l.TransitiveTagKeys=[];Object.entries(G).forEach(([I,S])=>{const d=`TransitiveTagKeys.${I}`;l[d]=S})}if(h[Ph]!=null)l[Ph]=h[Ph];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];if(h[P]!=null)l[P]=h[P];if(h[Rh]!=null){const G=Rw(h[Rh],w);if(h[Rh]?.length===0)l.ProvidedContexts=[];Object.entries(G).forEach(([I,S])=>{const d=`ProvidedContexts.${I}`;l[d]=S})}return l},qw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[Ah]!=null)l[Ah]=h[Ah];if(h[_h]!=null)l[_h]=h[_h];if(h[$]!=null){const G=Bh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,S])=>{const d=`PolicyArns.${I}`;l[d]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},vw=(h,w)=>{const l={};if(h[W]!=null)l[W]=h[W];if(h[i]!=null)l[i]=h[i];if(h[ih]!=null)l[ih]=h[ih];if(h[jh]!=null)l[jh]=h[jh];if(h[$]!=null){const G=Bh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,S])=>{const d=`PolicyArns.${I}`;l[d]=S})}if(h[Z]!=null)l[Z]=h[Z];if(h[y]!=null)l[y]=h[y];return l},Mw=(h,w)=>{const l={};if(h[qh]!=null)l[qh]=h[qh];return l},zw=(h,w)=>{const l={};if(h[O]!=null)l[O]=h[O];return l},Nw=(h,w)=>{return{}},Ww=(h,w)=>{const l={};if(h[Wh]!=null)l[Wh]=h[Wh];if(h[Z]!=null)l[Z]=h[Z];if(h[$]!=null){const G=Bh(h[$],w);if(h[$]?.length===0)l.PolicyArns=[];Object.entries(G).forEach(([I,S])=>{const d=`PolicyArns.${I}`;l[d]=S})}if(h[y]!=null)l[y]=h[y];if(h[e]!=null){const G=t0(h[e],w);if(h[e]?.length===0)l.Tags=[];Object.entries(G).forEach(([I,S])=>{const d=`Tags.${I}`;l[d]=S})}return l},Tw=(h,w)=>{const l={};if(h[y]!=null)l[y]=h[y];if(h[c]!=null)l[c]=h[c];if(h[p]!=null)l[p]=h[p];return l},Bh=(h,w)=>{const l={};let G=1;for(let I of h){if(I===null)continue;const S=Aw(I,w);Object.entries(S).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},Aw=(h,w)=>{const l={};if(h[ch]!=null)l[ch]=h[ch];return l},Lw=(h,w)=>{const l={};if(h[Lh]!=null)l[Lh]=h[Lh];if(h[Zh]!=null)l[Zh]=h[Zh];return l},Rw=(h,w)=>{const l={};let G=1;for(let I of h){if(I===null)continue;const S=Lw(I,w);Object.entries(S).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},jw=(h,w)=>{const l={};if(h[Nh]!=null)l[Nh]=h[Nh];if(h[xh]!=null)l[xh]=h[xh];return l},aw=(h,w)=>{const l={};let G=1;for(let I of h){if(I===null)continue;l[`member.${G}`]=I,G++}return l},t0=(h,w)=>{const l={};let G=1;for(let I of h){if(I===null)continue;const S=jw(I,w);Object.entries(S).forEach(([d,X])=>{l[`member.${G}.${d}`]=X}),G++}return l},ph=(h,w)=>{const l={};if(h[Yh]!=null)l[Yh]=H(h[Yh]);if(h[N]!=null)l[N]=H(h[N]);return l},sw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[z]!=null)l[z]=ph(h[z],w);if(h[V]!=null)l[V]=u(h[V]);if(h[P]!=null)l[P]=H(h[P]);return l},rw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[z]!=null)l[z]=ph(h[z],w);if(h[V]!=null)l[V]=u(h[V]);if(h[sh]!=null)l[sh]=H(h[sh]);if(h[fh]!=null)l[fh]=H(h[fh]);if(h[zh]!=null)l[zh]=H(h[zh]);if(h[x]!=null)l[x]=H(h[x]);if(h[Th]!=null)l[Th]=H(h[Th]);if(h[P]!=null)l[P]=H(h[P]);return l},_w=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[bh]!=null)l[bh]=H(h[bh]);if(h[z]!=null)l[z]=ph(h[z],w);if(h[V]!=null)l[V]=u(h[V]);if(h[ah]!=null)l[ah]=H(h[ah]);if(h[x]!=null)l[x]=H(h[x]);if(h[P]!=null)l[P]=H(h[P]);return l},t=(h,w)=>{const l={};if(h[O]!=null)l[O]=H(h[O]);if(h[rh]!=null)l[rh]=H(h[rh]);if(h[Ch]!=null)l[Ch]=H(h[Ch]);if(h[Vh]!=null)l[Vh]=R0(j0(h[Vh]));return l},bw=(h,w)=>{const l={};if(h[$h]!=null)l[$h]=H(h[$h]);return l},fw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},Cw=(h,w)=>{const l={};if(h[Mh]!=null)l[Mh]=H(h[Mh]);if(h[N]!=null)l[N]=H(h[N]);return l},Ow=(h,w)=>{const l={};if(h[g]!=null)l[g]=H(h[g]);return l},gw=(h,w)=>{const l={};if(h[gh]!=null)l[gh]=H(h[gh]);if(h[g]!=null)l[g]=H(h[g]);if(h[N]!=null)l[N]=H(h[N]);return l},xw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);if(h[vh]!=null)l[vh]=Cw(h[vh],w);if(h[V]!=null)l[V]=u(h[V]);return l},iw=(h,w)=>{const l={};if(h[U]!=null)l[U]=t(h[U],w);return l},cw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},ew=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},pw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},nw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},ow=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},uw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},tw=(h,w)=>{const l={};if(h[m]!=null)l[m]=H(h[m]);return l},k=(h)=>({httpStatusCode:h.statusCode,requestId:h.headers["x-amzn-requestid"]??h.headers["x-amzn-request-id"]??h.headers["x-amz-request-id"],extendedRequestId:h.headers["x-amz-id-2"],cfId:h.headers["x-amz-cf-id"]});var hG=a0(Q),R=async(h,w,l,G,I)=>{const{hostname:S,protocol:d="https",port:X,path:M}=await h.endpoint(),q={protocol:d,hostname:S,port:X,method:"POST",path:M.endsWith("/")?M.slice(0,-1)+l:M+l,headers:w};if(G!==void 0)q.hostname=G;if(I!==void 0)q.body=I;return new L0(q)},j={"content-type":"application/x-www-form-urlencoded"},a="2011-06-15",s="Action",O="AccessKeyId",lG="AssumeRole",Yh="AssumedRoleId",z="AssumedRoleUser",wG="AssumeRoleWithSAML",GG="AssumeRoleWithWebIdentity",g="Account",N="Arn",x="Audience",U="Credentials",Zh="ContextAssertion",IG="DecodeAuthorizationMessage",$h="DecodedMessage",y="DurationSeconds",Vh="Expiration",Ph="ExternalId",qh="EncodedMessage",vh="FederatedUser",Mh="FederatedUserId",dG="GetAccessKeyInfo",SG="GetCallerIdentity",HG="GetFederationToken",mG="GetSessionToken",zh="Issuer",Nh="Key",Wh="Name",Th="NameQualifier",Z="Policy",$="PolicyArns",Ah="PrincipalArn",Lh="ProviderArn",Rh="ProvidedContexts",jh="ProviderId",V="PackedPolicySize",ah="Provider",W="RoleArn",i="RoleSessionName",sh="Subject",rh="SecretAccessKey",_h="SAMLAssertion",bh="SubjectFromWebIdentityToken",P="SourceIdentity",c="SerialNumber",fh="SubjectType",Ch="SessionToken",e="Tags",p="TokenCode",Oh="TransitiveTagKeys",gh="UserId",r="Version",xh="Value",ih="WebIdentityToken",ch="arn",m="message",_=(h)=>Object.entries(h).map(([w,l])=>eh(w)+"="+eh(l)).join("&"),JG=(h,w)=>{if(w.Error?.Code!==void 0)return w.Error.Code;if(h.statusCode==404)return"NotFound"};class hh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,v0).ser(s0).de(x0).build(){}class nh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(M0,z0).ser(r0).de(i0).build(){}class lh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(N0,W0).ser(_0).de(c0).build(){}class oh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(b0).de(e0).build(){}class uh extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(f0).de(p0).build(){}class th extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(C0).de(n0).build(){}class hl extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,T0).ser(O0).de(o0).build(){}class ll extends K.classBuilder().ep(D).m(function(h,w,l,G){return[F(l,this.serialize,this.deserialize),B(l,h.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,A0).ser(g0).de(u0).build(){}var DG={AssumeRoleCommand:hh,AssumeRoleWithSAMLCommand:nh,AssumeRoleWithWebIdentityCommand:lh,DecodeAuthorizationMessageCommand:oh,GetAccessKeyInfoCommand:uh,GetCallerIdentityCommand:th,GetFederationTokenCommand:hl,GetSessionTokenCommand:ll};class lw extends A{}hw(DG,lw);var ww="us-east-1",Gw=(h)=>{if(typeof h?.Arn==="string"){const w=h.Arn.split(":");if(w.length>4&&w[4]!=="")return w[4]}return},Iw=async(h,w,l)=>{const G=typeof h==="function"?await h():h,I=typeof w==="function"?await w():w;return l?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${G} (provider)`,`${I} (parent client)`,`${ww} (STS default)`),G??I??ww},dw=(h,w)=>{let l,G;return async(I,S)=>{if(G=I,!l){const{logger:q=h?.parentClientConfig?.logger,region:n,requestHandler:wh=h?.parentClientConfig?.requestHandler,credentialProviderLogger:Uh}=h,Jw=await Iw(n,h?.parentClientConfig?.region,Uh),Dw=!Hw(wh);l=new w({credentialDefaultProvider:()=>async()=>G,region:Jw,requestHandler:Dw?wh:void 0,logger:q})}const{Credentials:d,AssumedRoleUser:X}=await l.send(new hh(S));if(!d||!d.AccessKeyId||!d.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${S.RoleArn}`);const M=Gw(X);return{accessKeyId:d.AccessKeyId,secretAccessKey:d.SecretAccessKey,sessionToken:d.SessionToken,expiration:d.Expiration,...d.CredentialScope&&{credentialScope:d.CredentialScope},...M&&{accountId:M}}}},Sw=(h,w)=>{let l;return async(G)=>{if(!l){const{logger:X=h?.parentClientConfig?.logger,region:M,requestHandler:q=h?.parentClientConfig?.requestHandler,credentialProviderLogger:n}=h,wh=await Iw(M,h?.parentClientConfig?.region,n),Uh=!Hw(q);l=new w({region:wh,requestHandler:Uh?q:void 0,logger:X})}const{Credentials:I,AssumedRoleUser:S}=await l.send(new lh(G));if(!I||!I.AccessKeyId||!I.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${G.RoleArn}`);const d=Gw(S);return{accessKeyId:I.AccessKeyId,secretAccessKey:I.SecretAccessKey,sessionToken:I.SessionToken,expiration:I.Expiration,...I.CredentialScope&&{credentialScope:I.CredentialScope},...d&&{accountId:d}}}};var Hw=(h)=>{return h?.metadata?.handlerProtocol==="h2"};var mw=(h,w)=>{if(!w)return h;else return class l extends h{constructor(G){super(G);for(let I of w)this.middlewareStack.use(I)}}},EG=(h={},w)=>dw(h,mw(A,w)),kG=(h={},w)=>Sw(h,mw(A,w)),sd=(h)=>(w)=>h({roleAssumer:EG(w),roleAssumerWithWebIdentity:kG(w),...w});export{kG as getDefaultRoleAssumerWithWebIdentity,EG as getDefaultRoleAssumer,sd as decorateDefaultCredentialProvider,y0 as __Client,Q as STSServiceException,A as STSClient,lw as STS,Dh as RegionDisabledException,Jh as PackedPolicyTooLargeException,mh as MalformedPolicyDocumentException,kh as InvalidIdentityTokenException,Fh as InvalidAuthorizationMessageException,Eh as IDPRejectedClaimException,Kh as IDPCommunicationErrorException,A0 as GetSessionTokenResponseFilterSensitiveLog,ll as GetSessionTokenCommand,T0 as GetFederationTokenResponseFilterSensitiveLog,hl as GetFederationTokenCommand,th as GetCallerIdentityCommand,uh as GetAccessKeyInfoCommand,Hh as ExpiredTokenException,oh as DecodeAuthorizationMessageCommand,o as CredentialsFilterSensitiveLog,W0 as AssumeRoleWithWebIdentityResponseFilterSensitiveLog,N0 as AssumeRoleWithWebIdentityRequestFilterSensitiveLog,lh as AssumeRoleWithWebIdentityCommand,z0 as AssumeRoleWithSAMLResponseFilterSensitiveLog,M0 as AssumeRoleWithSAMLRequestFilterSensitiveLog,nh as AssumeRoleWithSAMLCommand,v0 as AssumeRoleResponseFilterSensitiveLog,hh as AssumeRoleCommand,K as $Command};
3
-
4
- //# debugId=9D7DDC0A614437B264756E2164756E21