gemi 0.4.96 → 0.4.97

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 (94) hide show
  1. package/dist/app/index.js +1 -1
  2. package/dist/auth/AuthenticationServiceContainer.d.ts +1 -1
  3. package/dist/auth/AuthenticationServiceContainer.d.ts.map +1 -1
  4. package/dist/chunk-16e332f85eb5447c.js +4 -0
  5. package/dist/{chunk-06aefbff279f50c9.js.map → chunk-16e332f85eb5447c.js.map} +6 -6
  6. package/dist/chunk-1fa979880960fe7a.js +11 -0
  7. package/dist/{chunk-4fd884c939d51b55.js.map → chunk-1fa979880960fe7a.js.map} +5 -5
  8. package/dist/chunk-23556f614d648677.js +7 -0
  9. package/dist/chunk-23556f614d648677.js.map +65 -0
  10. package/dist/{chunk-4e831e5a834074e3.js → chunk-2b057d120d3e2288.js} +2 -2
  11. package/dist/{chunk-4e831e5a834074e3.js.map → chunk-2b057d120d3e2288.js.map} +1 -1
  12. package/dist/chunk-2e57c40ceaac60c2.js +4 -0
  13. package/dist/{chunk-65c54c2165bb4928.js.map → chunk-2e57c40ceaac60c2.js.map} +5 -5
  14. package/dist/chunk-31e1d73a34421a5b.js +4 -0
  15. package/dist/{chunk-305f6e55379f20ff.js.map → chunk-31e1d73a34421a5b.js.map} +2 -2
  16. package/dist/chunk-53884af8a953deb7.js +3 -0
  17. package/dist/chunk-53884af8a953deb7.js.map +16 -0
  18. package/dist/chunk-72261e13831ada52.js +4 -0
  19. package/dist/{chunk-9ff3d7096b6de8eb.js.map → chunk-72261e13831ada52.js.map} +2 -2
  20. package/dist/chunk-797989fd6dd03d3e.js +4 -0
  21. package/dist/{chunk-b84d011a2972c7d1.js.map → chunk-797989fd6dd03d3e.js.map} +3 -3
  22. package/dist/chunk-860a94f3e2c4139f.js +4 -0
  23. package/dist/{chunk-a2e671dfae678108.js.map → chunk-860a94f3e2c4139f.js.map} +2 -2
  24. package/dist/chunk-8cdd9673266b7058.js +4 -0
  25. package/dist/{chunk-7b16cefa5673a3f4.js.map → chunk-8cdd9673266b7058.js.map} +2 -2
  26. package/dist/{chunk-9f9e21f9fd0d6af1.js → chunk-a0a73bf4d58b0b0b.js} +2 -2
  27. package/dist/{chunk-9f9e21f9fd0d6af1.js.map → chunk-a0a73bf4d58b0b0b.js.map} +1 -1
  28. package/dist/chunk-a0c7eacf736f38e3.js +4 -0
  29. package/dist/{chunk-9d6f95b10961ceca.js.map → chunk-a0c7eacf736f38e3.js.map} +2 -2
  30. package/dist/chunk-a32dc07245e51d1d.js +4 -0
  31. package/dist/chunk-a32dc07245e51d1d.js.map +11 -0
  32. package/dist/chunk-ae350f23e76a92c8.js +18 -0
  33. package/dist/{chunk-494a2450e30c899a.js.map → chunk-ae350f23e76a92c8.js.map} +7 -31
  34. package/dist/chunk-b451a72475db69ef.js +4 -0
  35. package/dist/chunk-b451a72475db69ef.js.map +10 -0
  36. package/dist/{chunk-e4961d79807acd3d.js → chunk-b9c722a5cdfab5dd.js} +2 -2
  37. package/dist/{chunk-e4961d79807acd3d.js.map → chunk-b9c722a5cdfab5dd.js.map} +3 -3
  38. package/dist/chunk-d437e2b6b4671cbb.js +8 -0
  39. package/dist/{chunk-93d32568bfaacebd.js.map → chunk-d437e2b6b4671cbb.js.map} +2 -2
  40. package/dist/chunk-e78cce2c4522cf91.js +4 -0
  41. package/dist/{chunk-96c6805b32f75c42.js.map → chunk-e78cce2c4522cf91.js.map} +2 -2
  42. package/dist/chunk-ebe083591d3f0e78.js +4 -0
  43. package/dist/{chunk-6cdbaa7465aaef09.js.map → chunk-ebe083591d3f0e78.js.map} +6 -6
  44. package/dist/email/index.js +1 -1
  45. package/dist/facades/index.js +2 -2
  46. package/dist/facades/index.js.map +7 -7
  47. package/dist/http/I18nServiceContainer.d.ts +1 -1
  48. package/dist/http/I18nServiceContainer.d.ts.map +1 -1
  49. package/dist/http/index.js +2 -2
  50. package/dist/http/index.js.map +4 -4
  51. package/dist/kernel/Kernel.d.ts +0 -1
  52. package/dist/kernel/Kernel.d.ts.map +1 -1
  53. package/dist/kernel/index.js +2 -2
  54. package/dist/kernel/index.js.map +3 -3
  55. package/dist/services/ServiceContainer.d.ts +1 -1
  56. package/dist/services/ServiceContainer.d.ts.map +1 -1
  57. package/dist/services/email/EmailServiceContainer.d.ts +1 -1
  58. package/dist/services/email/EmailServiceContainer.d.ts.map +1 -1
  59. package/dist/services/file-storage/FileStorageServiceContainer.d.ts +1 -1
  60. package/dist/services/file-storage/FileStorageServiceContainer.d.ts.map +1 -1
  61. package/dist/services/index.js +5 -5
  62. package/dist/services/index.js.map +4 -3
  63. package/dist/services/middleware/MiddlewareServiceContainer.d.ts +1 -1
  64. package/dist/services/middleware/MiddlewareServiceContainer.d.ts.map +1 -1
  65. package/dist/services/pubsub/BroadcastingServiceContainer.d.ts +1 -1
  66. package/dist/services/pubsub/BroadcastingServiceContainer.d.ts.map +1 -1
  67. package/dist/services/rate-limiter/RateLimiterServiceContainer.d.ts +1 -1
  68. package/dist/services/rate-limiter/RateLimiterServiceContainer.d.ts.map +1 -1
  69. package/dist/services/router/ApiRouterServiceContainer.d.ts +1 -1
  70. package/dist/services/router/ApiRouterServiceContainer.d.ts.map +1 -1
  71. package/dist/services/router/ViewRouterServiceContainer.d.ts +1 -1
  72. package/dist/services/router/ViewRouterServiceContainer.d.ts.map +1 -1
  73. package/package.json +1 -1
  74. package/dist/chunk-06aefbff279f50c9.js +0 -4
  75. package/dist/chunk-305f6e55379f20ff.js +0 -4
  76. package/dist/chunk-494a2450e30c899a.js +0 -20
  77. package/dist/chunk-4fd884c939d51b55.js +0 -11
  78. package/dist/chunk-65c54c2165bb4928.js +0 -4
  79. package/dist/chunk-6cdbaa7465aaef09.js +0 -4
  80. package/dist/chunk-7b16cefa5673a3f4.js +0 -4
  81. package/dist/chunk-93d32568bfaacebd.js +0 -8
  82. package/dist/chunk-96c6805b32f75c42.js +0 -4
  83. package/dist/chunk-9d6f95b10961ceca.js +0 -4
  84. package/dist/chunk-9ff3d7096b6de8eb.js +0 -4
  85. package/dist/chunk-a2e671dfae678108.js +0 -4
  86. package/dist/chunk-a94767d96cb1d7f7.js +0 -5
  87. package/dist/chunk-a94767d96cb1d7f7.js.map +0 -64
  88. package/dist/chunk-a988b2cb693f62e1.js +0 -3
  89. package/dist/chunk-a988b2cb693f62e1.js.map +0 -15
  90. package/dist/chunk-b84d011a2972c7d1.js +0 -4
  91. package/dist/chunk-cfd40bd89f15836a.js +0 -4
  92. package/dist/chunk-cfd40bd89f15836a.js.map +0 -11
  93. package/dist/chunk-dcaff8a82f35729b.js +0 -4
  94. package/dist/chunk-dcaff8a82f35729b.js.map +0 -16
@@ -6,7 +6,7 @@ import { AsyncLocalStorage } from "async_hooks";
6
6
  type PublishCallback = (...args: PublishArgs) => void;
7
7
  export declare class BroadcastingServiceContainer extends ServiceContainer {
8
8
  service: BroadcastingServiceProvider;
9
- name: string;
9
+ static _name: string;
10
10
  publishCb: PublishCallback;
11
11
  context: AsyncLocalStorage<{
12
12
  headers: Headers;
@@ -1 +1 @@
1
- {"version":3,"file":"BroadcastingServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/pubsub/BroadcastingServiceContainer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,KAAK,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;AAEtD,qBAAa,4BAA6B,SAAQ,gBAAgB;IAQ7C,OAAO,EAAE,2BAA2B;IAPvD,IAAI,SAAkC;IACtC,SAAS,EAAE,eAAe,CAAC;IAC3B,OAAO;iBACI,OAAO;iBACP,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;OACzB;gBAEc,OAAO,EAAE,2BAA2B;IAIvD,SAAS,CAAC,EAAE,EAAE,eAAe;IAI7B,OAAO,CAAC,GAAG,IAAI,EAAE,WAAW;IAKtB,aAAa,CACjB,EAAE,EAAE,eAAe,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,EACzC,OAAO,EAAE,MAAM,GAAG,MAAM;IAgC1B,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,YAAY;CAYvC"}
1
+ {"version":3,"file":"BroadcastingServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/pubsub/BroadcastingServiceContainer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,KAAK,eAAe,GAAG,CAAC,GAAG,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;AAEtD,qBAAa,4BAA6B,SAAQ,gBAAgB;IAS7C,OAAO,EAAE,2BAA2B;IARvD,MAAM,CAAC,KAAK,SAAkC;IAE9C,SAAS,EAAE,eAAe,CAAC;IAC3B,OAAO;iBACI,OAAO;iBACP,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;OACzB;gBAEc,OAAO,EAAE,2BAA2B;IAIvD,SAAS,CAAC,EAAE,EAAE,eAAe;IAI7B,OAAO,CAAC,GAAG,IAAI,EAAE,WAAW;IAKtB,aAAa,CACjB,EAAE,EAAE,eAAe,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,EACzC,OAAO,EAAE,MAAM,GAAG,MAAM;IAgC1B,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,YAAY;CAYvC"}
@@ -2,7 +2,7 @@ import { ServiceContainer } from "../ServiceContainer";
2
2
  import { RateLimiterServiceProvider } from "./RateLimiterServiceProvider";
3
3
  export declare class RateLimiterServiceContainer extends ServiceContainer {
4
4
  service: RateLimiterServiceProvider;
5
- name: string;
5
+ static _name: string;
6
6
  constructor(service: RateLimiterServiceProvider);
7
7
  }
8
8
  //# sourceMappingURL=RateLimiterServiceContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RateLimiterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/rate-limiter/RateLimiterServiceContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,qBAAa,2BAA4B,SAAQ,gBAAgB;IAG5C,OAAO,EAAE,0BAA0B;IAFtD,IAAI,SAAiC;gBAElB,OAAO,EAAE,0BAA0B;CAGvD"}
1
+ {"version":3,"file":"RateLimiterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/rate-limiter/RateLimiterServiceContainer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,qBAAa,2BAA4B,SAAQ,gBAAgB;IAG5C,OAAO,EAAE,0BAA0B;IAFtD,MAAM,CAAC,KAAK,SAAiC;gBAE1B,OAAO,EAAE,0BAA0B;CAGvD"}
@@ -3,7 +3,7 @@ import { ApiRouterServiceProvider } from "./ApiRouterServiceProvider";
3
3
  import { type FlatApiRoutes } from "./createFlatApiRoutes";
4
4
  export declare class ApiRouterServiceContainer extends ServiceContainer {
5
5
  service: ApiRouterServiceProvider;
6
- name: string;
6
+ static _name: string;
7
7
  flatRoutes: FlatApiRoutes;
8
8
  constructor(service: ApiRouterServiceProvider);
9
9
  getRouteHandlerAndParams(req: Request): {
@@ -1 +1 @@
1
- {"version":3,"file":"ApiRouterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/router/ApiRouterServiceContainer.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEhF,qBAAa,yBAA0B,SAAQ,gBAAgB;IAI1C,OAAO,EAAE,wBAAwB;IAHpD,IAAI,SAA+B;IACnC,UAAU,EAAE,aAAa,CAAM;gBAEZ,OAAO,EAAE,wBAAwB;IAS7C,wBAAwB,CAAC,GAAG,EAAE,OAAO;;;;IAuBtC,kBAAkB,CAAC,IAAI,EAAE,MAAM;IAyB/B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IA+BxC,gBAAgB,CAAC,GAAG,EAAE,OAAO;CAsDpC"}
1
+ {"version":3,"file":"ApiRouterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/router/ApiRouterServiceContainer.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEhF,qBAAa,yBAA0B,SAAQ,gBAAgB;IAK1C,OAAO,EAAE,wBAAwB;IAJpD,MAAM,CAAC,KAAK,SAA+B;IAE3C,UAAU,EAAE,aAAa,CAAM;gBAEZ,OAAO,EAAE,wBAAwB;IAS7C,wBAAwB,CAAC,GAAG,EAAE,OAAO;;;;IAuBtC,kBAAkB,CAAC,IAAI,EAAE,MAAM;IAyB/B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IA+BxC,gBAAgB,CAAC,GAAG,EAAE,OAAO;CAsDpC"}
@@ -4,7 +4,7 @@ import { ServiceContainer } from "../ServiceContainer";
4
4
  import type { ComponentTree } from "../../client/types";
5
5
  export declare class ViewRouterServiceContainer extends ServiceContainer {
6
6
  service: ViewRouterServiceProvider;
7
- name: string;
7
+ static _name: string;
8
8
  flatViewRoutes: FlatViewRoutes;
9
9
  routeManifest: Record<string, string[]>;
10
10
  componentTree: ComponentTree;
@@ -1 +1 @@
1
- {"version":3,"file":"ViewRouterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/router/ViewRouterServiceContainer.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAOxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAMvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,qBAAa,0BAA2B,SAAQ,gBAAgB;IAS3C,OAAO,EAAE,yBAAyB;IARrD,IAAI,SAAgC;IAEpC,cAAc,EAAE,cAAc,CAAM;IACpC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAM;IAC7C,aAAa,EAAE,aAAa,CAAM;IAClC,iBAAiB,EAAE,MAAM,EAAE,CAAM;IACjC,UAAU,EAAE,GAAG,CAAQ;gBAEJ,OAAO,EAAE,yBAAyB;IAarD,IAAI;IAEE,iBAAiB,CAAC,GAAG,EAAE,OAAO,gCAwLZ;QACpB,MAAM,EAAE,GAAG,EAAE,CAAC;QACd,aAAa,EAAE,GAAG,CAAC;QACnB,gBAAgB,EAAE,MAAM,EAAE,CAAC;QAC3B,OAAO,EAAE,MAAM,CAAC;KACjB;CAwBJ"}
1
+ {"version":3,"file":"ViewRouterServiceContainer.d.ts","sourceRoot":"","sources":["../../../services/router/ViewRouterServiceContainer.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAOxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAMvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAIxD,qBAAa,0BAA2B,SAAQ,gBAAgB;IAS3C,OAAO,EAAE,yBAAyB;IARrD,MAAM,CAAC,KAAK,SAAgC;IAE5C,cAAc,EAAE,cAAc,CAAM;IACpC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAM;IAC7C,aAAa,EAAE,aAAa,CAAM;IAClC,iBAAiB,EAAE,MAAM,EAAE,CAAM;IACjC,UAAU,EAAE,GAAG,CAAQ;gBAEJ,OAAO,EAAE,yBAAyB;IAarD,IAAI;IAEE,iBAAiB,CAAC,GAAG,EAAE,OAAO,gCAwLZ;QACpB,MAAM,EAAE,GAAG,EAAE,CAAC;QACd,aAAa,EAAE,GAAG,CAAC;QACnB,gBAAgB,EAAE,MAAM,EAAE,CAAC;QAC3B,OAAO,EAAE,MAAM,CAAC;KACjB;CAwBJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemi",
3
- "version": "0.4.96",
3
+ "version": "0.4.97",
4
4
  "devDependencies": {
5
5
  "@babel/parser": "^7.25.4",
6
6
  "@repo/eslint-config": "*",
@@ -1,4 +0,0 @@
1
- // @bun
2
- import"./chunk-0d97333b6af9fc45.js";import"./chunk-9f9e21f9fd0d6af1.js";import{Gb as i,Hb as f} from"./chunk-a988b2cb693f62e1.js";import{Nb as y,Ob as K,Pb as E,Sb as C,Tb as N} from"./chunk-4e831e5a834074e3.js";var F=(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 L=300000,_="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var I={},M=async(e)=>{const{SSOOIDCClient:r}=await import("./chunk-305f6e55379f20ff.js");if(I[e])return I[e];const s=new r({region:e});return I[e]=s,s};var H=async(e,r)=>{const{CreateTokenCommand:s}=await import("./chunk-305f6e55379f20ff.js");return(await M(r)).send(new s({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))};var v=(e)=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new f(`Token is expired. ${_}`,!1)};var m=(e,r,s=!1)=>{if(typeof r==="undefined")throw new f(`Value not present for '${e}' in SSO Token${s?". Cannot refresh":""}. ${_}`,!1)};import{promises as W} from"fs";var{writeFile:j}=W,b=(e,r)=>{const s=K(e),t=JSON.stringify(r,null,2);return j(s,t)};var G=new Date(0),U=(e={})=>async()=>{e.logger?.debug("@aws-sdk/token-providers - fromSso");const r=await N(e),s=y(e),t=r[s];if(!t)throw new f(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!t.sso_session)throw new f(`Profile '${s}' is missing required property 'sso_session'.`);const a=t.sso_session,c=(await C(e))[a];if(!c)throw new f(`Sso session '${a}' could not be found in shared credentials file.`,!1);for(let n of["sso_start_url","sso_region"])if(!c[n])throw new f(`Sso session '${a}' is missing required property '${n}'.`,!1);const{sso_start_url:p,sso_region:S}=c;let o;try{o=await E(a)}catch(n){throw new f(`The SSO session token associated with profile=${s} was not found or is invalid. ${_}`,!1)}m("accessToken",o.accessToken),m("expiresAt",o.expiresAt);const{accessToken:x,expiresAt:u}=o,l={token:x,expiration:new Date(u)};if(l.expiration.getTime()-Date.now()>L)return l;if(Date.now()-G.getTime()<30000)return v(l),l;m("clientId",o.clientId,!0),m("clientSecret",o.clientSecret,!0),m("refreshToken",o.refreshToken,!0);try{G.setTime(Date.now());const n=await H(o,S);m("accessToken",n.accessToken),m("expiresIn",n.expiresIn);const h=new Date(Date.now()+n.expiresIn*1000);try{await b(a,{...o,accessToken:n.accessToken,expiresAt:h.toISOString(),refreshToken:n.refreshToken})}catch(O){}return{token:n.accessToken,expiration:h}}catch(n){return v(l),l}};var T=!1,P=async({ssoStartUrl:e,ssoSession:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoClient:d,clientConfig:c,profile:p,logger:S})=>{let o;const x="To refresh this SSO session run aws sso login with the corresponding profile.";if(r)try{const g=await U({profile:p})();o={accessToken:g.token,expiresAt:new Date(g.expiration).toISOString()}}catch(g){throw new i(g.message,{tryNextLink:T,logger:S})}else try{o=await E(e)}catch(g){throw new i("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:T,logger:S})}if(new Date(o.expiresAt).getTime()-Date.now()<=0)throw new i("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:T,logger:S});const{accessToken:u}=o,{SSOClient:l,GetRoleCredentialsCommand:n}=await import("./chunk-9ff3d7096b6de8eb.js"),h=d||new l(Object.assign({},c??{},{region:c?.region??t}));let O;try{O=await h.send(new n({accountId:s,roleName:a,accessToken:u}))}catch(g){throw new i(g,{tryNextLink:T,logger:S})}const{roleCredentials:{accessKeyId:w,secretAccessKey:k,sessionToken:R,expiration:D,credentialScope:A,accountId:$}={}}=O;if(!w||!k||!R||!D)throw new i("SSO returns an invalid temporary credential.",{tryNextLink:T,logger:S});return{accessKeyId:w,secretAccessKey:k,sessionToken:R,expiration:new Date(D),...A&&{credentialScope:A},...$&&{accountId:$}}};var q=(e,r)=>{const{sso_start_url:s,sso_account_id:t,sso_region:a,sso_role_name:d}=e;if(!s||!t||!a||!d)throw new i('Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", '+`"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:r});return e};var Ee=(e={})=>async()=>{e.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:r,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoSession:d}=e,{ssoClient:c}=e,p=y(e);if(!r&&!s&&!t&&!a&&!d){const o=(await N(e))[p];if(!o)throw new i(`Profile ${p} was not found.`,{logger:e.logger});if(!F(o))throw new i(`Profile ${p} is not configured with SSO credentials.`,{logger:e.logger});if(o?.sso_session){const w=(await C(e))[o.sso_session],k=` configurations in profile ${p} and sso-session ${o.sso_session}`;if(t&&t!==w.sso_region)throw new i("Conflicting SSO region"+k,{tryNextLink:!1,logger:e.logger});if(r&&r!==w.sso_start_url)throw new i("Conflicting SSO start_url"+k,{tryNextLink:!1,logger:e.logger});o.sso_region=w.sso_region,o.sso_start_url=w.sso_start_url}const{sso_start_url:x,sso_account_id:u,sso_region:l,sso_role_name:n,sso_session:h}=q(o,e.logger);return P({ssoStartUrl:x,ssoSession:h,ssoAccountId:u,ssoRegion:l,ssoRoleName:n,ssoClient:c,clientConfig:e.clientConfig,profile:p})}else if(!r||!s||!t||!a)throw new i('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:e.logger});else return P({ssoStartUrl:r,ssoSession:d,ssoAccountId:s,ssoRegion:t,ssoRoleName:a,ssoClient:c,clientConfig:e.clientConfig,profile:p})};export{q as validateSsoProfile,F as isSsoProfile,Ee as fromSSO};
3
-
4
- //# debugId=06AEFBFF279F50C964756e2164756e21
@@ -1,4 +0,0 @@
1
- // @bun
2
- import"./chunk-7b16cefa5673a3f4.js";import{J as $} from"./chunk-0d97333b6af9fc45.js";import"./chunk-28ec4c2b20e69deb.js";import{$ as cr,Aa as Ze,Ba as He,Ca as Ne,Da as _e,Ea as lr,Fa as hr,X as ee,Y as re,Z as or,_ as dr,aa as yr,da as H,ea as ar,fa as Ie,ga as Re,ha as Pe,ia as Te,ja as mr,ka as Ke,la as Me,ma as Be,na as Le,oa as wr,pa as kr,ra as E,sa as S,ta as vr,ua as Qe,va as Xe,wa as Er,xa as Ye,ya as Sr,za as U} from"./chunk-494a2450e30c899a.js";import{Bb as I,Ga as er,Ha as rr,Na as je,Pa as Fe,Qa as De,Ra as tr,Sa as Ue,Ta as qe,Wa as Ve,Xa as We,bb as v,cb as t,db as Wr,fb as _,gb as b,hb as j,ib as F,jb as h,qb as $r,rb as a,sb as Fr,tb as fe,ub as Ae,vb as sr,wb as ir,yb as d,zb as o} from"./chunk-a94767d96cb1d7f7.js";import"./chunk-9f9e21f9fd0d6af1.js";import{Db as R,Eb as xe} from"./chunk-dcaff8a82f35729b.js";import"./chunk-a988b2cb693f62e1.js";import{Lb as ge} from"./chunk-4fd884c939d51b55.js";import"./chunk-4e831e5a834074e3.js";var P=$(H(),1);var se=$(U(),1);var Br=function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:e.region},propertiesExtractor:(s,r)=>({signingProperties:{config:s,context:r}})}},Z=function(e){return{schemeId:"smithy.api#noAuth"}},ie=async(e,s,r)=>{return{operation:ee(s).operation,region:await re(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},le=(e)=>{const s=[];switch(e.operation){case"CreateToken":{s.push(Z(e));break}case"RegisterClient":{s.push(Z(e));break}case"StartDeviceAuthorization":{s.push(Z(e));break}default:s.push(Br(e))}return s},he=(e)=>{return{...se.resolveAwsSdkSigV4Config(e)}};var ne=(e)=>{return{...e,useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},k={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var oe={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc 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-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"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 sso-oidc"},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/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",peerDependencies:{"@aws-sdk/client-sts":"^3.654.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-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}};var pe=$(U(),1);var ze=$(U(),1),Ge=$(H(),1);var de={["required"]:!1,type:"String"},ce={["required"]:!0,default:!1,type:"Boolean"},ye={["ref"]:"Endpoint"},ve={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},m={},te={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},Se={["ref"]:"PartitionResult"},ae={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[Se,"supportsDualStack"]}]},me=[ve],we=[Ee],ke=[{["ref"]:"Region"}],Qr={version:"1.0",parameters:{Region:de,UseDualStack:ce,UseFIPS:ce,Endpoint:de},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[ye]}],rules:[{conditions:me,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:we,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:ye,properties:m,headers:m},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ke}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ke,assign:"PartitionResult"}],rules:[{conditions:[ve,Ee],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,te]},ae],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:me,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[te,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Se,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:m,headers:m},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:we,rules:[{conditions:[ae],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},$e=Qr;var Xr=new Ie({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),be=(e,s={})=>{return Xr.get(e,()=>Pe($e,{endpointParams:e,logger:s.logger}))};Re.aws=Te;var Je=(e)=>{return{apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??Ue,base64Encoder:e?.base64Encoder??qe,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??be,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??le,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new ze.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new Ge.NoAuthSigner}],logger:e?.logger??new De,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??xe,utf8Decoder:e?.utf8Decoder??je,utf8Encoder:e?.utf8Encoder??Fe}};var Ce=(e)=>{Ae(process.version);const s=_e(e),r=()=>s().then(fe),i=Je(e);return pe.emitWarningIfUnsupportedVersion(process.version),{...i,...e,runtime:"node",defaultsMode:s,bodyLengthChecker:e?.bodyLengthChecker??Ne,credentialDefaultProvider:e?.credentialDefaultProvider??ge,defaultUserAgentProvider:e?.defaultUserAgentProvider??Ze({serviceId:i.serviceId,clientVersion:oe.version}),maxAttempts:e?.maxAttempts??R(Xe),region:e?.region??R(Be,Le),requestHandler:Ve.create(e?.requestHandler??r),retryMode:e?.retryMode??R({...Ye,default:async()=>(await r()).retryMode||Qe}),sha256:e?.sha256??He.bind(null,"sha256"),streamCollector:e?.streamCollector??We,useDualstackEndpoint:e?.useDualstackEndpoint??R(Ke),useFipsEndpoint:e?.useFipsEndpoint??R(Me)}};var Oe=(e)=>{const s=e.httpAuthSchemes;let{httpAuthSchemeProvider:r,credentials:i}=e;return{setHttpAuthScheme(l){const n=s.findIndex((T)=>T.schemeId===l.schemeId);if(n===-1)s.push(l);else s.splice(n,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){r=l},httpAuthSchemeProvider(){return r},setCredentials(l){i=l},credentials(){return i}}},ue=(e)=>{return{httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()}};var q=(e)=>e,nr=(e,s)=>{const r={...q(lr(e)),...q(sr(e)),...q(er(e)),...q(Oe(e))};return s.forEach((i)=>i.configure(r)),{...e,...hr(r),...ir(r),...rr(r),...ue(r)}};class N extends tr{constructor(...[e]){const s=Ce(e||{}),r=ne(s),i=ar(r),l=Er(i),n=wr(l),T=or(n),Ar=vr(T),Kr=he(Ar),u=nr(Kr,e?.extensions||[]);super(u);this.config=u,this.middlewareStack.use(mr(this.config)),this.middlewareStack.use(Sr(this.config)),this.middlewareStack.use(kr(this.config)),this.middlewareStack.use(dr(this.config)),this.middlewareStack.use(cr(this.config)),this.middlewareStack.use(yr(this.config)),this.middlewareStack.use(P.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:ie,identityProviderConfigProvider:async(Mr)=>new P.DefaultIdentityProviderConfig({"aws.auth#sigv4":Mr.credentials})})),this.middlewareStack.use(P.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}class c extends $r{constructor(e){super(e);Object.setPrototypeOf(this,c.prototype)}}class x extends c{constructor(e){super({name:"AccessDeniedException",$fault:"client",...e});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,x.prototype),this.error=e.error,this.error_description=e.error_description}}class z extends c{constructor(e){super({name:"AuthorizationPendingException",$fault:"client",...e});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,z.prototype),this.error=e.error,this.error_description=e.error_description}}class G extends c{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,G.prototype),this.error=e.error,this.error_description=e.error_description}}class J extends c{constructor(e){super({name:"InternalServerException",$fault:"server",...e});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,J.prototype),this.error=e.error,this.error_description=e.error_description}}class V extends c{constructor(e){super({name:"InvalidClientException",$fault:"client",...e});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,V.prototype),this.error=e.error,this.error_description=e.error_description}}class W extends c{constructor(e){super({name:"InvalidGrantException",$fault:"client",...e});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,W.prototype),this.error=e.error,this.error_description=e.error_description}}class f extends c{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,f.prototype),this.error=e.error,this.error_description=e.error_description}}class A extends c{constructor(e){super({name:"InvalidScopeException",$fault:"client",...e});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,A.prototype),this.error=e.error,this.error_description=e.error_description}}class K extends c{constructor(e){super({name:"SlowDownException",$fault:"client",...e});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,K.prototype),this.error=e.error,this.error_description=e.error_description}}class M extends c{constructor(e){super({name:"UnauthorizedClientException",$fault:"client",...e});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,M.prototype),this.error=e.error,this.error_description=e.error_description}}class B extends c{constructor(e){super({name:"UnsupportedGrantTypeException",$fault:"client",...e});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,B.prototype),this.error=e.error,this.error_description=e.error_description}}class L extends c{constructor(e){super({name:"InvalidRequestRegionException",$fault:"client",...e});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,L.prototype),this.error=e.error,this.error_description=e.error_description,this.endpoint=e.endpoint,this.region=e.region}}class Q extends c{constructor(e){super({name:"InvalidClientMetadataException",$fault:"client",...e});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,Q.prototype),this.error=e.error,this.error_description=e.error_description}}class X extends c{constructor(e){super({name:"InvalidRedirectUriException",$fault:"client",...e});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,X.prototype),this.error=e.error,this.error_description=e.error_description}}var Ir=(e)=>({...e,...e.clientSecret&&{clientSecret:t},...e.refreshToken&&{refreshToken:t},...e.codeVerifier&&{codeVerifier:t}}),Rr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),Pr=(e)=>({...e,...e.refreshToken&&{refreshToken:t},...e.assertion&&{assertion:t},...e.subjectToken&&{subjectToken:t},...e.codeVerifier&&{codeVerifier:t}}),Tr=(e)=>({...e,...e.accessToken&&{accessToken:t},...e.refreshToken&&{refreshToken:t},...e.idToken&&{idToken:t}}),br=(e)=>({...e,...e.clientSecret&&{clientSecret:t}}),jr=(e)=>({...e,...e.clientSecret&&{clientSecret:t}});var w=$(U(),1),D=$(H(),1);var Dr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},Ur=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/token");const l=d({[hs]:[,"t"]});let n;return n=JSON.stringify(o(e,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(T)=>I(T),subjectToken:[],subjectTokenType:[]})),r.m("POST").h(i).q(l).b(n),r.build()},qr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/client/register");let l;return l=JSON.stringify(o(e,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(n)=>I(n),issuerUrl:[],redirectUris:(n)=>I(n),scopes:(n)=>I(n)})),r.m("POST").h(i).b(l),r.build()},xr=async(e,s)=>{const r=D.requestBuilder(e,s),i={"content-type":"application/json"};r.bp("/device_authorization");let l;return l=JSON.stringify(o(e,{clientId:[],clientSecret:[],startUrl:[]})),r.m("POST").h(i).b(l),r.build()},zr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,refreshToken:h,tokenType:h});return Object.assign(r,l),r},Gr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{accessToken:h,expiresIn:b,idToken:h,issuedTokenType:h,refreshToken:h,scope:I,tokenType:h});return Object.assign(r,l),r},Jr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{authorizationEndpoint:h,clientId:h,clientIdIssuedAt:_,clientSecret:h,clientSecretExpiresAt:_,tokenEndpoint:h});return Object.assign(r,l),r},Vr=async(e,s)=>{if(e.statusCode!==200&&e.statusCode>=300)return Y(e,s);const r=d({$metadata:y(e)}),i=j(F(await w.parseJsonBody(e.body,s)),"body"),l=o(i,{deviceCode:h,expiresIn:b,interval:b,userCode:h,verificationUri:h,verificationUriComplete:h});return Object.assign(r,l),r},Y=async(e,s)=>{const r={...e,body:await w.parseJsonErrorBody(e.body,s)},i=w.loadRestJsonErrorCode(e,r.body);switch(i){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await Zr(r,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await Hr(r,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await Nr(r,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await _r(r,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await pr(r,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await gr(r,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await ur(r,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await rs(r,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await ss(r,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await is(r,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ls(r,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await es(r,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await Cr(r,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await Or(r,s);default:const l=r.body;return Yr({output:e,parsedBody:l,errorCode:i})}},Yr=Fr(c),Zr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new x({$metadata:y(e),...r});return a(n,e.body)},Hr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new z({$metadata:y(e),...r});return a(n,e.body)},Nr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new G({$metadata:y(e),...r});return a(n,e.body)},_r=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new J({$metadata:y(e),...r});return a(n,e.body)},pr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new V({$metadata:y(e),...r});return a(n,e.body)},Cr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new Q({$metadata:y(e),...r});return a(n,e.body)},gr=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new W({$metadata:y(e),...r});return a(n,e.body)},Or=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new X({$metadata:y(e),...r});return a(n,e.body)},ur=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new f({$metadata:y(e),...r});return a(n,e.body)},es=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{endpoint:h,error:h,error_description:h,region:h});Object.assign(r,l);const n=new L({$metadata:y(e),...r});return a(n,e.body)},rs=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new A({$metadata:y(e),...r});return a(n,e.body)},ss=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new K({$metadata:y(e),...r});return a(n,e.body)},is=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new M({$metadata:y(e),...r});return a(n,e.body)},ls=async(e,s)=>{const r=d({}),i=e.body,l=o(i,{error:h,error_description:h});Object.assign(r,l);const n=new B({$metadata:y(e),...r});return a(n,e.body)},y=(e)=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]});var hs="aws_iam";class p extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(Ir,Rr).ser(Dr).de(zr).build(){}class C extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(Pr,Tr).ser(Ur).de(Gr).build(){}class g extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,br).ser(qr).de(Jr).build(){}class O extends v.classBuilder().ep(k).m(function(e,s,r,i){return[E(r,this.serialize,this.deserialize),S(r,e.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(jr,void 0).ser(xr).de(Vr).build(){}var ns={CreateTokenCommand:p,CreateTokenWithIAMCommand:C,RegisterClientCommand:g,StartDeviceAuthorizationCommand:O};class fr extends N{}Wr(ns,fr);export{tr as __Client,B as UnsupportedGrantTypeException,M as UnauthorizedClientException,jr as StartDeviceAuthorizationRequestFilterSensitiveLog,O as StartDeviceAuthorizationCommand,K as SlowDownException,c as SSOOIDCServiceException,N as SSOOIDCClient,fr as SSOOIDC,br as RegisterClientResponseFilterSensitiveLog,g as RegisterClientCommand,A as InvalidScopeException,L as InvalidRequestRegionException,f as InvalidRequestException,X as InvalidRedirectUriException,W as InvalidGrantException,Q as InvalidClientMetadataException,V as InvalidClientException,J as InternalServerException,G as ExpiredTokenException,Tr as CreateTokenWithIAMResponseFilterSensitiveLog,Pr as CreateTokenWithIAMRequestFilterSensitiveLog,C as CreateTokenWithIAMCommand,Rr as CreateTokenResponseFilterSensitiveLog,Ir as CreateTokenRequestFilterSensitiveLog,p as CreateTokenCommand,z as AuthorizationPendingException,x as AccessDeniedException,v as $Command};
3
-
4
- //# debugId=305F6E55379F20FF64756e2164756e21