@ultrst-armada/kloks 1.26.3 → 1.26.5

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 (267) hide show
  1. package/README.md +39 -0
  2. package/index.d.ts +16 -10
  3. package/index.js +3 -0
  4. package/package.json +60 -7
  5. package/packages/audio-midi/dist/{audioClipEngine-BOT33JKI.js → audioClipEngine-LKZRWTJ3.js} +2 -2
  6. package/packages/audio-midi/dist/{audioInputManager-BLDGGLAR.js → audioInputManager-5BNHLOJM.js} +1 -1
  7. package/packages/audio-midi/dist/{chunk-N55BWOC6.js → chunk-M4JFGTHE.js} +1 -1
  8. package/packages/audio-midi/dist/{chunk-3GRGELA4.js → chunk-OUOFTYHY.js} +50 -11
  9. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Compressor/manifest.json +7 -0
  10. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Delay/manifest.json +7 -0
  11. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Equalizer/manifest.json +7 -0
  12. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Limiter/manifest.json +7 -0
  13. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/MultibandCompressor/manifest.json +7 -0
  14. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Reverb/manifest.json +7 -0
  15. package/packages/audio-midi/dist/engine/audio/entities/AudioEffects/functionalities/Saturation/manifest.json +7 -0
  16. package/packages/audio-midi/dist/index.d.ts +10 -1
  17. package/packages/audio-midi/dist/index.js +36 -20
  18. package/packages/audio-midi/package.json +8 -0
  19. package/packages/backend/dist/ai-models/index.js +2 -2
  20. package/packages/backend/dist/ai-routing/index.js +3 -3
  21. package/packages/backend/dist/api/BaseApiRoute.d.ts +1 -1
  22. package/packages/backend/dist/api/index.js +1 -1
  23. package/packages/backend/dist/auth/CanonicalAuthClient.d.ts +6 -6
  24. package/packages/backend/dist/auth/index.js +2 -1
  25. package/packages/backend/dist/chunk-2Y2EXYDK.js +0 -0
  26. package/packages/backend/dist/{chunk-3S2NSIFA.js → chunk-3FZSYSJC.js} +16 -10
  27. package/packages/backend/dist/chunk-5F5V7NAG.js +54 -0
  28. package/packages/backend/dist/{chunk-WAQDOIGQ.js → chunk-BVXGUHLZ.js} +1 -1
  29. package/packages/backend/dist/chunk-DAG2L4RN.js +0 -0
  30. package/packages/backend/dist/{chunk-KPZQUA7R.js → chunk-G7PPVOFP.js} +16 -53
  31. package/packages/backend/dist/{chunk-GKQ42CYW.js → chunk-H6ET362U.js} +3 -3
  32. package/packages/backend/dist/chunk-HUY4272L.js +69 -0
  33. package/packages/backend/dist/chunk-JQKKMUCT.js +0 -0
  34. package/packages/backend/dist/{chunk-PT6J6UEU.js → chunk-LMAU62ZG.js} +4 -4
  35. package/packages/backend/dist/{chunk-EDKCP5CQ.js → chunk-MZK362U4.js} +16 -16
  36. package/packages/backend/dist/{chunk-U4UI6KK4.js → chunk-NGEB3CF5.js} +3 -35
  37. package/packages/backend/dist/{chunk-3VWBZEMG.js → chunk-NTKUQVCQ.js} +4 -5
  38. package/packages/backend/dist/chunk-NY2SQOXI.js +34 -0
  39. package/packages/backend/dist/{chunk-JOTDEFRG.js → chunk-OXEP3AP6.js} +5 -4
  40. package/packages/backend/dist/chunk-RABSY2JU.js +0 -0
  41. package/packages/backend/dist/{chunk-GWCLYVJT.js → chunk-RFPGUJAZ.js} +9 -9
  42. package/packages/backend/dist/{chunk-TWCEVES2.js → chunk-WC6EPW3A.js} +1 -1
  43. package/packages/backend/dist/{chunk-FU6TYLI2.js → chunk-Y5ENDXU2.js} +72 -129
  44. package/packages/backend/dist/{chunk-EO5VUYYU.js → chunk-Y7ZE6D5H.js} +4 -4
  45. package/packages/backend/dist/{chunk-RCCQ7IRM.js → chunk-ZBNSK26X.js} +2 -2
  46. package/packages/backend/dist/control-plane/AuditLogger.d.ts +1 -1
  47. package/packages/backend/dist/control-plane/ControlPlaneManager.d.ts +1 -1
  48. package/packages/backend/dist/control-plane/index.js +1 -1
  49. package/packages/backend/dist/core/dynamicRouteResolver.d.ts +1 -1
  50. package/packages/backend/dist/core/routesCore.d.ts +1 -1
  51. package/packages/backend/dist/core/vercelTransformer.d.ts +1 -1
  52. package/packages/backend/dist/core/workspaceCore.d.ts +2 -2
  53. package/packages/backend/dist/data/BaseDataProvider.d.ts +1 -1
  54. package/packages/backend/dist/development/index.js +30 -17
  55. package/packages/backend/dist/development/playwrightInspectionService.js +1 -2
  56. package/packages/backend/dist/development/webContainerService.js +1 -2
  57. package/packages/backend/dist/index.d.ts +4 -24
  58. package/packages/backend/dist/index.js +12 -4655
  59. package/packages/backend/dist/krnl-ai-services.d.ts +9 -9
  60. package/packages/backend/dist/krnl-ai-services.js +5 -6
  61. package/packages/backend/dist/krnl-services.js +8 -7
  62. package/packages/backend/dist/node.d.ts +28 -0
  63. package/packages/backend/dist/node.js +4761 -0
  64. package/packages/backend/dist/resourceEngine/BaseResourceFetcher.d.ts +3 -3
  65. package/packages/backend/dist/resourceEngine/CloudflareResourceFetcher.d.ts +3 -3
  66. package/packages/backend/dist/resourceEngine/ResourceFetcherRegistry.d.ts +5 -5
  67. package/packages/backend/dist/resourceEngine/VercelResourceFetcher.d.ts +3 -3
  68. package/packages/backend/dist/resourceEngine/adapters/CloudflareResourceAdapter.d.ts +2 -2
  69. package/packages/backend/dist/resourceEngine/adapters/VercelResourceAdapter.d.ts +2 -2
  70. package/packages/backend/dist/resourceEngine/calculator/UniversalResourceCalculator.d.ts +1 -1
  71. package/packages/backend/dist/resourceEngine/calculator/types.d.ts +1 -1
  72. package/packages/backend/dist/resourceEngine/index.d.ts +6 -6
  73. package/packages/backend/dist/resourceEngine/types/depm/entities.d.ts +2 -2
  74. package/packages/backend/dist/resourceEngine/types.d.ts +1 -1
  75. package/packages/backend/dist/resourceEngine/weightEngine/helpers.d.ts +1 -1
  76. package/packages/backend/dist/resourceEngine/weightEngine/index.d.ts +2 -2
  77. package/packages/backend/dist/resourceEngine/weightEngine/weightEngine.d.ts +1 -1
  78. package/packages/backend/dist/resourceEngine/weightEngine.d.ts +1 -1
  79. package/packages/backend/dist/server/services/assetPoolService/assetPoolService.d.ts +3 -3
  80. package/packages/backend/dist/server/services/projectService/projectService.d.ts +3 -3
  81. package/packages/backend/dist/services/index.d.ts +2 -10
  82. package/packages/backend/dist/services/index.js +1 -37
  83. package/packages/backend/dist/services/node.d.ts +10 -0
  84. package/packages/backend/dist/services/node.js +38 -0
  85. package/packages/backend/dist/srkl/index.js +1 -1
  86. package/packages/backend/dist/storage/BaseStorageAdapter.d.ts +1 -1
  87. package/packages/backend/dist/storage/S3Adapter.d.ts +5 -0
  88. package/packages/backend/dist/storage/googleDriveSdk.d.ts +1 -7
  89. package/packages/backend/dist/storage/index.d.ts +1 -10
  90. package/packages/backend/dist/storage/index.js +5 -40
  91. package/packages/backend/dist/storage/node.d.ts +14 -0
  92. package/packages/backend/dist/storage/node.js +66 -0
  93. package/packages/backend/dist/workspace/WorkspaceCloneSyncEngine.d.ts +1 -1
  94. package/packages/backend/dist/workspace/index.d.ts +1 -5
  95. package/packages/backend/dist/workspace/index.js +4 -24
  96. package/packages/backend/dist/workspace/node.d.ts +8 -0
  97. package/packages/backend/dist/workspace/node.js +30 -0
  98. package/packages/backend/package.json +35 -3
  99. package/packages/functions/dist/base-DDYO-DzM.d.ts +64 -0
  100. package/packages/functions/dist/base.d.ts +1 -0
  101. package/packages/functions/dist/base.js +6 -0
  102. package/packages/functions/dist/chunk-6EHIZHO4.js +555 -0
  103. package/packages/functions/dist/chunk-Z4LM5TOJ.js +114 -0
  104. package/packages/functions/dist/index.d.ts +4 -373
  105. package/packages/functions/dist/index.js +53 -1693
  106. package/packages/functions/dist/node.d.ts +110 -0
  107. package/packages/functions/dist/node.js +442 -0
  108. package/packages/functions/dist/portable.d.ts +207 -0
  109. package/packages/functions/dist/portable.js +94 -0
  110. package/packages/functions/package.json +23 -1
  111. package/packages/{functions/dist/chunk-K6H7T3EP.js → services/dist/chunk-P54QSKOQ.js} +1 -3
  112. package/packages/{state-graph/dist/dist-es-TLPJYZTE.js → services/dist/dist-es-2P6LFFZL.js} +1 -1
  113. package/packages/{state-graph/dist/dist-es-5IACWOIO.js → services/dist/dist-es-OZCE67MW.js} +1 -1
  114. package/packages/services/dist/{dist-es-3DGJJFOU.js → dist-es-RUJB3ALN.js} +3 -3
  115. package/packages/{state-graph/dist/dist-es-QZ6GKMM7.js → services/dist/dist-es-SSJGP5AI.js} +4 -4
  116. package/packages/services/dist/{loadSso-M3ZIZDGO.js → loadSso-3PZYFUB7.js} +1 -1
  117. package/packages/{functions/dist/signin-YXALFRYB.js → services/dist/signin-WYPGSXHF.js} +1 -1
  118. package/packages/{state-graph/dist/sso-oidc-NXFKRL6O.js → services/dist/sso-oidc-PQMIMLJU.js} +1 -1
  119. package/packages/{state-graph/dist/sts-MICPT37B.js → services/dist/sts-Z7LR3AZH.js} +1 -1
  120. package/packages/state-graph/dist/browser.d.ts +8 -18
  121. package/packages/state-graph/dist/browser.js +334 -23
  122. package/packages/state-graph/dist/browser.test.d.ts +1 -0
  123. package/packages/state-graph/dist/{chunk-KG6QYS26.js → chunk-5KP74NMF.js} +80 -80
  124. package/packages/state-graph/dist/{chunk-4UVGXFEM.js → chunk-LVULR5M4.js} +1 -1
  125. package/packages/state-graph/dist/{chunk-S22PMERU.js → chunk-OXUDG6HE.js} +1 -1
  126. package/packages/state-graph/dist/{chunk-2CQQGFMF.js → chunk-UKTICGGV.js} +2616 -432
  127. package/packages/state-graph/dist/domain/index.js +2 -3
  128. package/packages/state-graph/dist/engine/AudioConcepts.d.ts +1 -1
  129. package/packages/state-graph/dist/engine/GraphConcepts.d.ts +1 -1
  130. package/packages/state-graph/dist/engine/core/archetypes/audioArchetypes.d.ts +1 -1
  131. package/packages/state-graph/dist/engine/core/archetypes/effectArchetypes.d.ts +1 -1
  132. package/packages/state-graph/dist/engine/core/archetypes/primitiveArchetypes.d.ts +1 -1
  133. package/packages/state-graph/dist/engine/core/archetypes/routingArchetypes.d.ts +1 -1
  134. package/packages/state-graph/dist/engine/core/archetypes/triggerModuleArchetypes.d.ts +1 -1
  135. package/packages/state-graph/dist/engine/core/assets/containerSprites.d.ts +1 -1
  136. package/packages/state-graph/dist/engine/core/assets/effectSprites.d.ts +1 -1
  137. package/packages/state-graph/dist/engine/core/assets/primitiveSprites.d.ts +1 -1
  138. package/packages/state-graph/dist/engine/core/assets/routingSprites.d.ts +1 -1
  139. package/packages/state-graph/dist/engine/core/canonicalIo/CanonicalAudioInputEndpoint.d.ts +1 -1
  140. package/packages/state-graph/dist/engine/core/canonicalIo/CanonicalMidiInputEndpoint.d.ts +1 -1
  141. package/packages/state-graph/dist/engine/core/canonicalIo/topLevelIoRegistry.d.ts +6 -6
  142. package/packages/state-graph/dist/engine/core/canonicalIo/types.d.ts +1 -1
  143. package/packages/state-graph/dist/engine/core/graphDataService.d.ts +1 -1
  144. package/packages/state-graph/dist/engine/core/hierarchy/index.d.ts +11 -11
  145. package/packages/state-graph/dist/engine/core/hierarchy/nodes/GraphNodeParent.d.ts +3 -3
  146. package/packages/state-graph/dist/engine/core/hierarchy/nodes/GraphNodeTypes.d.ts +1 -1
  147. package/packages/state-graph/dist/engine/core/hierarchy/sockets/GraphSocketParent.d.ts +2 -2
  148. package/packages/state-graph/dist/engine/core/hierarchy/sockets/GraphSocketTypes.d.ts +1 -1
  149. package/packages/state-graph/dist/engine/core/hierarchy/ui/UIElementBase.d.ts +3 -3
  150. package/packages/state-graph/dist/engine/core/hierarchy/wires/GraphWireParent.d.ts +2 -2
  151. package/packages/state-graph/dist/engine/core/hierarchy/wires/GraphWireTypes.d.ts +1 -1
  152. package/packages/state-graph/dist/engine/core/nodeArchetypeRegistry.d.ts +1 -1
  153. package/packages/state-graph/dist/engine/core/socketRegistry/containersSockets.d.ts +1 -1
  154. package/packages/state-graph/dist/engine/core/socketRegistry/customRegistry.d.ts +1 -1
  155. package/packages/state-graph/dist/engine/core/socketRegistry/landmarksSockets.d.ts +1 -1
  156. package/packages/state-graph/dist/engine/core/socketRegistry/primitivesSockets.d.ts +1 -1
  157. package/packages/state-graph/dist/engine/core/socketRegistry/processorsSockets.d.ts +1 -1
  158. package/packages/state-graph/dist/engine/core/sockets/arrangementControlSockets.d.ts +1 -1
  159. package/packages/state-graph/dist/engine/core/sockets/audioSockets.d.ts +1 -1
  160. package/packages/state-graph/dist/engine/core/sockets/folderButtonSockets.d.ts +1 -1
  161. package/packages/state-graph/dist/engine/core/sockets/moduleSockets.d.ts +1 -1
  162. package/packages/state-graph/dist/engine/core/sockets/playbackSockets.d.ts +1 -1
  163. package/packages/state-graph/dist/engine/core/sockets/primitiveSockets.d.ts +1 -1
  164. package/packages/state-graph/dist/engine/core/sockets/routingSockets.d.ts +1 -1
  165. package/packages/state-graph/dist/engine/core/sockets/samplerSockets.d.ts +1 -1
  166. package/packages/state-graph/dist/engine/core/sockets/stripSockets.d.ts +1 -1
  167. package/packages/state-graph/dist/engine/functions/arrangementFactory.d.ts +1 -1
  168. package/packages/state-graph/dist/engine/functions/codeNodeParser/codeNodeParser.d.ts +2 -2
  169. package/packages/state-graph/dist/engine/functions/codeNodeParser/helpers.d.ts +1 -1
  170. package/packages/state-graph/dist/engine/functions/connection/portMatching.d.ts +1 -1
  171. package/packages/state-graph/dist/engine/functions/connection/signalCompatibility/helpers.d.ts +1 -1
  172. package/packages/state-graph/dist/engine/functions/connection/signalCompatibility/signalCompatibility.d.ts +1 -1
  173. package/packages/state-graph/dist/engine/functions/connection/signalCompatibility.d.ts +1 -1
  174. package/packages/state-graph/dist/engine/functions/connection/wireValidation.d.ts +1 -1
  175. package/packages/state-graph/dist/engine/functions/containerClipSync.d.ts +1 -1
  176. package/packages/state-graph/dist/engine/functions/containerFactory/containerFactory.d.ts +1 -1
  177. package/packages/state-graph/dist/engine/functions/effectLogic.d.ts +1 -1
  178. package/packages/state-graph/dist/engine/functions/graphManager/graphManager.d.ts +1 -1
  179. package/packages/state-graph/dist/engine/functions/graphManager.d.ts +1 -1
  180. package/packages/state-graph/dist/engine/functions/nodeFactory/nodeFactory.d.ts +8 -8
  181. package/packages/state-graph/dist/engine/functions/nodeFactory.d.ts +2 -2
  182. package/packages/state-graph/dist/engine/functions/signalTable/audioMidiSignals.d.ts +1 -1
  183. package/packages/state-graph/dist/engine/functions/signalTable/canonicalEffectsTable.d.ts +1 -1
  184. package/packages/state-graph/dist/engine/functions/signalTable/dataSignals.d.ts +1 -1
  185. package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner/helpers.d.ts +1 -1
  186. package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner/socketCompatibilitySpawner.d.ts +1 -1
  187. package/packages/state-graph/dist/engine/functions/socketCompatibilitySpawner.d.ts +1 -1
  188. package/packages/state-graph/dist/engine/functions/spawnNodeFactory.d.ts +1 -1
  189. package/packages/state-graph/dist/engine/predictive/predictiveGraphEngine/helpers.d.ts +1 -1
  190. package/packages/state-graph/dist/engine/predictive/predictiveGraphEngine.d.ts +2 -2
  191. package/packages/state-graph/dist/engine/types/auth.d.ts +1 -1
  192. package/packages/state-graph/dist/engine/types/hardwareBus.d.ts +1 -1
  193. package/packages/state-graph/dist/engine/types/legacyTypes.d.ts +1 -1
  194. package/packages/state-graph/dist/engine/types/nodesArrangement.d.ts +2 -2
  195. package/packages/state-graph/dist/engine/types/nodesAudio.d.ts +5 -5
  196. package/packages/state-graph/dist/engine/types/nodesControl.d.ts +2 -2
  197. package/packages/state-graph/dist/engine/types/nodesPlayback.d.ts +2 -2
  198. package/packages/state-graph/dist/engine/types/nodesPrimitives.d.ts +6 -6
  199. package/packages/state-graph/dist/engine/types/nodesRouting.d.ts +2 -2
  200. package/packages/state-graph/dist/engine/types/sceneData.d.ts +2 -2
  201. package/packages/state-graph/dist/engine/types/sceneState.d.ts +4 -4
  202. package/packages/state-graph/dist/engine/types/signals.d.ts +2 -2
  203. package/packages/state-graph/dist/engine/types/stripsTypes.d.ts +2 -2
  204. package/packages/state-graph/dist/index.js +110 -2850
  205. package/packages/state-graph/dist/rules/index.js +0 -1
  206. package/packages/state-graph/dist/spatial/index.js +0 -1
  207. package/packages/state-graph/dist/state/index.js +0 -1
  208. package/packages/state-graph/dist/store/CommandApi.d.ts +2 -2
  209. package/packages/state-graph/dist/store/index.js +2 -3
  210. package/packages/state-graph/package.json +7 -2
  211. package/scripts/normalize-package-declarations.mjs +63 -0
  212. package/packages/backend/dist/chunk-SXDYW3QA.js +0 -579
  213. package/packages/functions/dist/bowser-F6LIZBYW.js +0 -2821
  214. package/packages/functions/dist/chunk-34KJBG4F.js +0 -357
  215. package/packages/functions/dist/chunk-EAQYK3U2.js +0 -41
  216. package/packages/functions/dist/chunk-IOAPEUC7.js +0 -3424
  217. package/packages/functions/dist/chunk-J64ZDIIX.js +0 -2753
  218. package/packages/functions/dist/chunk-N3MSTUJN.js +0 -4785
  219. package/packages/functions/dist/chunk-VP26OHBN.js +0 -480
  220. package/packages/functions/dist/chunk-VRLVLNLG.js +0 -1727
  221. package/packages/functions/dist/dist-TKZ5TDRN.js +0 -1124
  222. package/packages/functions/dist/dist-W7ZJS3LZ.js +0 -899
  223. package/packages/functions/dist/dist-es-3DGJJFOU.js +0 -338
  224. package/packages/functions/dist/dist-es-5IACWOIO.js +0 -69
  225. package/packages/functions/dist/dist-es-BWLDIBIA.js +0 -47
  226. package/packages/functions/dist/dist-es-DO3F4OBN.js +0 -377
  227. package/packages/functions/dist/dist-es-NN7AKU7P.js +0 -175
  228. package/packages/functions/dist/dist-es-QZ6GKMM7.js +0 -220
  229. package/packages/functions/dist/dist-es-R3VEGXOP.js +0 -87
  230. package/packages/functions/dist/dist-es-TLPJYZTE.js +0 -294
  231. package/packages/functions/dist/event-streams-DRE6QVD6.js +0 -940
  232. package/packages/functions/dist/loadSso-M3ZIZDGO.js +0 -586
  233. package/packages/functions/dist/multipart-parser-YYFFJ4QD.js +0 -371
  234. package/packages/functions/dist/src-2QCYQXYH.js +0 -1396
  235. package/packages/functions/dist/sso-oidc-NXFKRL6O.js +0 -847
  236. package/packages/functions/dist/sts-MICPT37B.js +0 -1253
  237. package/packages/functions/dist/transformers.node-R6VHTGC2.js +0 -43879
  238. package/packages/services/dist/chunk-K6H7T3EP.js +0 -1991
  239. package/packages/services/dist/dist-es-5IACWOIO.js +0 -69
  240. package/packages/services/dist/dist-es-QZ6GKMM7.js +0 -220
  241. package/packages/services/dist/dist-es-TLPJYZTE.js +0 -294
  242. package/packages/services/dist/signin-YXALFRYB.js +0 -831
  243. package/packages/services/dist/sso-oidc-NXFKRL6O.js +0 -847
  244. package/packages/services/dist/sts-MICPT37B.js +0 -1253
  245. package/packages/state-graph/dist/bowser-F6LIZBYW.js +0 -2821
  246. package/packages/state-graph/dist/chunk-34KJBG4F.js +0 -357
  247. package/packages/state-graph/dist/chunk-EAQYK3U2.js +0 -41
  248. package/packages/state-graph/dist/chunk-IOAPEUC7.js +0 -3424
  249. package/packages/state-graph/dist/chunk-J64ZDIIX.js +0 -2753
  250. package/packages/state-graph/dist/chunk-K6H7T3EP.js +0 -1991
  251. package/packages/state-graph/dist/chunk-N3MSTUJN.js +0 -4785
  252. package/packages/state-graph/dist/chunk-VP26OHBN.js +0 -480
  253. package/packages/state-graph/dist/chunk-VRLVLNLG.js +0 -1727
  254. package/packages/state-graph/dist/dist-TKZ5TDRN.js +0 -1124
  255. package/packages/state-graph/dist/dist-W7ZJS3LZ.js +0 -899
  256. package/packages/state-graph/dist/dist-es-3DGJJFOU.js +0 -338
  257. package/packages/state-graph/dist/dist-es-BWLDIBIA.js +0 -47
  258. package/packages/state-graph/dist/dist-es-DO3F4OBN.js +0 -377
  259. package/packages/state-graph/dist/dist-es-NN7AKU7P.js +0 -175
  260. package/packages/state-graph/dist/dist-es-R3VEGXOP.js +0 -87
  261. package/packages/state-graph/dist/event-streams-DRE6QVD6.js +0 -940
  262. package/packages/state-graph/dist/loadSso-M3ZIZDGO.js +0 -586
  263. package/packages/state-graph/dist/multipart-parser-YYFFJ4QD.js +0 -371
  264. package/packages/state-graph/dist/signin-YXALFRYB.js +0 -831
  265. package/packages/state-graph/dist/src-2QCYQXYH.js +0 -1396
  266. package/packages/state-graph/dist/transformers.node-R6VHTGC2.js +0 -43879
  267. package/packages/backend/dist/{chunk-LMWXONZG.js → chunk-EREYT3WJ.js} +3 -3
@@ -1,220 +0,0 @@
1
- import {
2
- setCredentialFeature
3
- } from "./chunk-IOAPEUC7.js";
4
- import {
5
- CredentialsProviderError,
6
- chain,
7
- getProfileName,
8
- parseKnownFiles
9
- } from "./chunk-J64ZDIIX.js";
10
- import "./chunk-VRLVLNLG.js";
11
- import "./chunk-EAQYK3U2.js";
12
-
13
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.27/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveCredentialSource.js
14
- var resolveCredentialSource = (credentialSource, profileName, logger) => {
15
- const sourceProvidersMap = {
16
- EcsContainer: async (options) => {
17
- const { fromHttp } = await import("./dist-es-NN7AKU7P.js");
18
- const { fromContainerMetadata } = await import("./dist-es-DO3F4OBN.js");
19
- logger?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer");
20
- return async () => chain(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);
21
- },
22
- Ec2InstanceMetadata: async (options) => {
23
- logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");
24
- const { fromInstanceMetadata } = await import("./dist-es-DO3F4OBN.js");
25
- return async () => fromInstanceMetadata(options)().then(setNamedProvider);
26
- },
27
- Environment: async (options) => {
28
- logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");
29
- const { fromEnv } = await import("./dist-es-BWLDIBIA.js");
30
- return async () => fromEnv(options)().then(setNamedProvider);
31
- }
32
- };
33
- if (credentialSource in sourceProvidersMap) {
34
- return sourceProvidersMap[credentialSource];
35
- } else {
36
- throw new CredentialsProviderError(`Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`, { logger });
37
- }
38
- };
39
- var setNamedProvider = (creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_NAMED_PROVIDER", "p");
40
-
41
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.27/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js
42
- var isAssumeRoleProfile = (arg, { profile = "default", logger } = {}) => {
43
- return Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1 && ["undefined", "string"].indexOf(typeof arg.external_id) > -1 && ["undefined", "string"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger }));
44
- };
45
- var isAssumeRoleWithSourceProfile = (arg, { profile, logger }) => {
46
- const withSourceProfile = typeof arg.source_profile === "string" && typeof arg.credential_source === "undefined";
47
- if (withSourceProfile) {
48
- logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);
49
- }
50
- return withSourceProfile;
51
- };
52
- var isCredentialSourceProfile = (arg, { profile, logger }) => {
53
- const withProviderProfile = typeof arg.credential_source === "string" && typeof arg.source_profile === "undefined";
54
- if (withProviderProfile) {
55
- logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);
56
- }
57
- return withProviderProfile;
58
- };
59
- var resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData2) => {
60
- options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");
61
- const profileData = profiles[profileName];
62
- const { source_profile, region } = profileData;
63
- if (!options.roleAssumer) {
64
- const { getDefaultRoleAssumer } = await import("./sts-MICPT37B.js");
65
- options.roleAssumer = getDefaultRoleAssumer({
66
- ...options.clientConfig,
67
- credentialProviderLogger: options.logger,
68
- parentClientConfig: {
69
- ...callerClientConfig,
70
- ...options?.parentClientConfig,
71
- region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region
72
- }
73
- }, options.clientPlugins);
74
- }
75
- if (source_profile && source_profile in visitedProfiles) {
76
- throw new CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${getProfileName(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(", "), { logger: options.logger });
77
- }
78
- options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`);
79
- const sourceCredsProvider = source_profile ? resolveProfileData2(source_profile, profiles, options, callerClientConfig, {
80
- ...visitedProfiles,
81
- [source_profile]: true
82
- }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();
83
- if (isCredentialSourceWithoutRoleArn(profileData)) {
84
- return sourceCredsProvider.then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
85
- } else {
86
- const params = {
87
- RoleArn: profileData.role_arn,
88
- RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,
89
- ExternalId: profileData.external_id,
90
- DurationSeconds: parseInt(profileData.duration_seconds || "3600", 10)
91
- };
92
- const { mfa_serial } = profileData;
93
- if (mfa_serial) {
94
- if (!options.mfaCodeProvider) {
95
- throw new CredentialsProviderError(`Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`, { logger: options.logger, tryNextLink: false });
96
- }
97
- params.SerialNumber = mfa_serial;
98
- params.TokenCode = await options.mfaCodeProvider(mfa_serial);
99
- }
100
- const sourceCreds = await sourceCredsProvider;
101
- return options.roleAssumer(sourceCreds, params).then((creds) => setCredentialFeature(creds, "CREDENTIALS_PROFILE_SOURCE_PROFILE", "o"));
102
- }
103
- };
104
- var isCredentialSourceWithoutRoleArn = (section) => {
105
- return !section.role_arn && !!section.credential_source;
106
- };
107
-
108
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.27/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveLoginCredentials.js
109
- var isLoginProfile = (data) => {
110
- return Boolean(data && data.login_session);
111
- };
112
- var resolveLoginCredentials = async (profileName, options, callerClientConfig) => {
113
- const { fromLoginCredentials } = await import("./dist-es-TLPJYZTE.js");
114
- const credentials = await fromLoginCredentials({
115
- ...options,
116
- profile: profileName
117
- })({ callerClientConfig });
118
- return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC");
119
- };
120
-
121
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.27/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js
122
- var isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string";
123
- var resolveProcessCredentials = async (options, profile) => {
124
- const { fromProcess } = await import("./dist-es-R3VEGXOP.js");
125
- const credentials = await fromProcess({
126
- ...options,
127
- profile
128
- })();
129
- return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_PROCESS", "v");
130
- };
131
-
132
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.27/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveSsoCredentials.js
133
- var resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => {
134
- const { fromSSO } = await import("./dist-es-3DGJJFOU.js");
135
- return fromSSO({
136
- profile,
137
- logger: options.logger,
138
- parentClientConfig: options.parentClientConfig,
139
- clientConfig: options.clientConfig
140
- })({
141
- callerClientConfig
142
- }).then((creds) => {
143
- if (profileData.sso_session) {
144
- return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r");
145
- } else {
146
- return setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO_LEGACY", "t");
147
- }
148
- });
149
- };
150
- var isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string");
151
-
152
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.27/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveStaticCredentials.js
153
- var isStaticCredsProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.aws_access_key_id === "string" && typeof arg.aws_secret_access_key === "string" && ["undefined", "string"].indexOf(typeof arg.aws_session_token) > -1 && ["undefined", "string"].indexOf(typeof arg.aws_account_id) > -1;
154
- var resolveStaticCredentials = async (profile, options) => {
155
- options?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");
156
- const credentials = {
157
- accessKeyId: profile.aws_access_key_id,
158
- secretAccessKey: profile.aws_secret_access_key,
159
- sessionToken: profile.aws_session_token,
160
- ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },
161
- ...profile.aws_account_id && { accountId: profile.aws_account_id }
162
- };
163
- return setCredentialFeature(credentials, "CREDENTIALS_PROFILE", "n");
164
- };
165
-
166
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.27/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveWebIdentityCredentials.js
167
- var isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1;
168
- var resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => {
169
- const { fromTokenFile } = await import("./dist-es-5IACWOIO.js");
170
- const credentials = await fromTokenFile({
171
- webIdentityTokenFile: profile.web_identity_token_file,
172
- roleArn: profile.role_arn,
173
- roleSessionName: profile.role_session_name,
174
- roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,
175
- logger: options.logger,
176
- parentClientConfig: options.parentClientConfig
177
- })({
178
- callerClientConfig
179
- });
180
- return setCredentialFeature(credentials, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q");
181
- };
182
-
183
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.27/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js
184
- var resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {
185
- const data = profiles[profileName];
186
- if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {
187
- return resolveStaticCredentials(data, options);
188
- }
189
- if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {
190
- return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData);
191
- }
192
- if (isStaticCredsProfile(data)) {
193
- return resolveStaticCredentials(data, options);
194
- }
195
- if (isWebIdentityProfile(data)) {
196
- return resolveWebIdentityCredentials(data, options, callerClientConfig);
197
- }
198
- if (isProcessProfile(data)) {
199
- return resolveProcessCredentials(options, profileName);
200
- }
201
- if (isSsoProfile(data)) {
202
- return await resolveSsoCredentials(profileName, data, options, callerClientConfig);
203
- }
204
- if (isLoginProfile(data)) {
205
- return resolveLoginCredentials(profileName, options, callerClientConfig);
206
- }
207
- throw new CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger });
208
- };
209
-
210
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-ini@3.973.27/node_modules/@aws-sdk/credential-provider-ini/dist-es/fromIni.js
211
- var fromIni = (init = {}) => async ({ callerClientConfig } = {}) => {
212
- init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");
213
- const profiles = await parseKnownFiles(init);
214
- return resolveProfileData(getProfileName({
215
- profile: init.profile ?? callerClientConfig?.profile
216
- }), profiles, init, callerClientConfig);
217
- };
218
- export {
219
- fromIni
220
- };
@@ -1,87 +0,0 @@
1
- import {
2
- setCredentialFeature
3
- } from "./chunk-IOAPEUC7.js";
4
- import {
5
- CredentialsProviderError,
6
- externalDataInterceptor,
7
- getProfileName,
8
- parseKnownFiles
9
- } from "./chunk-J64ZDIIX.js";
10
- import "./chunk-VRLVLNLG.js";
11
- import "./chunk-EAQYK3U2.js";
12
-
13
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.972.82/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js
14
- import { exec } from "child_process";
15
- import { promisify } from "util";
16
-
17
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.972.82/node_modules/@aws-sdk/credential-provider-process/dist-es/getValidatedProcessCredentials.js
18
- var getValidatedProcessCredentials = (profileName, data, profiles) => {
19
- if (data.Version !== 1) {
20
- throw Error(`Profile ${profileName} credential_process did not return Version 1.`);
21
- }
22
- if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) {
23
- throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);
24
- }
25
- if (data.Expiration) {
26
- const currentTime = /* @__PURE__ */ new Date();
27
- const expireTime = new Date(data.Expiration);
28
- if (expireTime < currentTime) {
29
- throw Error(`Profile ${profileName} credential_process returned expired credentials.`);
30
- }
31
- }
32
- let accountId = data.AccountId;
33
- if (!accountId && profiles?.[profileName]?.aws_account_id) {
34
- accountId = profiles[profileName].aws_account_id;
35
- }
36
- const credentials = {
37
- accessKeyId: data.AccessKeyId,
38
- secretAccessKey: data.SecretAccessKey,
39
- ...data.SessionToken && { sessionToken: data.SessionToken },
40
- ...data.Expiration && { expiration: new Date(data.Expiration) },
41
- ...data.CredentialScope && { credentialScope: data.CredentialScope },
42
- ...accountId && { accountId }
43
- };
44
- setCredentialFeature(credentials, "CREDENTIALS_PROCESS", "w");
45
- return credentials;
46
- };
47
-
48
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.972.82/node_modules/@aws-sdk/credential-provider-process/dist-es/resolveProcessCredentials.js
49
- var resolveProcessCredentials = async (profileName, profiles, logger) => {
50
- const profile = profiles[profileName];
51
- if (profiles[profileName]) {
52
- const credentialProcess = profile["credential_process"];
53
- if (credentialProcess !== void 0) {
54
- const execPromise = promisify(externalDataInterceptor?.getTokenRecord?.().exec ?? exec);
55
- try {
56
- const { stdout } = await execPromise(credentialProcess);
57
- let data;
58
- try {
59
- data = JSON.parse(stdout.trim());
60
- } catch {
61
- throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);
62
- }
63
- return getValidatedProcessCredentials(profileName, data, profiles);
64
- } catch (error) {
65
- throw new CredentialsProviderError(error.message, { logger });
66
- }
67
- } else {
68
- throw new CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });
69
- }
70
- } else {
71
- throw new CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {
72
- logger
73
- });
74
- }
75
- };
76
-
77
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-process@3.972.82/node_modules/@aws-sdk/credential-provider-process/dist-es/fromProcess.js
78
- var fromProcess = (init = {}) => async ({ callerClientConfig } = {}) => {
79
- init.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");
80
- const profiles = await parseKnownFiles(init);
81
- return resolveProcessCredentials(getProfileName({
82
- profile: init.profile ?? callerClientConfig?.profile
83
- }), profiles, init.logger);
84
- };
85
- export {
86
- fromProcess
87
- };
@@ -1,294 +0,0 @@
1
- import {
2
- setCredentialFeature
3
- } from "./chunk-IOAPEUC7.js";
4
- import {
5
- CredentialsProviderError,
6
- getProfileName,
7
- parseKnownFiles
8
- } from "./chunk-J64ZDIIX.js";
9
- import {
10
- HttpRequest
11
- } from "./chunk-VRLVLNLG.js";
12
- import "./chunk-EAQYK3U2.js";
13
-
14
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-login@3.972.89/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js
15
- import { createHash, createPrivateKey, createPublicKey, sign } from "crypto";
16
- import { promises as fs } from "fs";
17
- import { homedir } from "os";
18
- import { dirname, join } from "path";
19
- var LoginCredentialsFetcher = class _LoginCredentialsFetcher {
20
- profileData;
21
- init;
22
- callerClientConfig;
23
- static REFRESH_THRESHOLD = 5 * 60 * 1e3;
24
- constructor(profileData, init, callerClientConfig) {
25
- this.profileData = profileData;
26
- this.init = init;
27
- this.callerClientConfig = callerClientConfig;
28
- }
29
- async loadCredentials() {
30
- const token = await this.loadToken();
31
- if (!token) {
32
- throw new CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger });
33
- }
34
- const accessToken = token.accessToken;
35
- const now = Date.now();
36
- const expiryTime = new Date(accessToken.expiresAt).getTime();
37
- const timeUntilExpiry = expiryTime - now;
38
- if (timeUntilExpiry <= _LoginCredentialsFetcher.REFRESH_THRESHOLD) {
39
- return this.refresh(token);
40
- }
41
- return this.toCredentials(token.accessToken);
42
- }
43
- get logger() {
44
- return this.init?.logger;
45
- }
46
- get loginSession() {
47
- return this.profileData.login_session;
48
- }
49
- toCredentials(token) {
50
- return {
51
- accessKeyId: token.accessKeyId,
52
- secretAccessKey: token.secretAccessKey,
53
- sessionToken: token.sessionToken,
54
- accountId: token.accountId,
55
- expiration: new Date(token.expiresAt)
56
- };
57
- }
58
- async refresh(token) {
59
- const diskToken = await this.loadToken().catch(() => token);
60
- const now = Date.now();
61
- const diskExpiry = new Date(diskToken.accessToken.expiresAt).getTime();
62
- const tokenExpiry = new Date(token.accessToken.expiresAt).getTime();
63
- const freshToken = diskExpiry <= now && tokenExpiry > now ? token : diskToken;
64
- const freshExpiry = new Date(freshToken.accessToken.expiresAt).getTime();
65
- if (freshExpiry - Date.now() > _LoginCredentialsFetcher.REFRESH_THRESHOLD) {
66
- return this.toCredentials(freshToken.accessToken);
67
- }
68
- const { SigninClient, CreateOAuth2TokenCommand } = await import("./signin-YXALFRYB.js");
69
- const { logger, userAgentAppId } = this.callerClientConfig ?? {};
70
- const isH2 = (requestHandler2) => {
71
- return requestHandler2?.metadata?.handlerProtocol === "h2";
72
- };
73
- const requestHandler = isH2(this.callerClientConfig?.requestHandler) ? void 0 : this.callerClientConfig?.requestHandler;
74
- const region = this.profileData.region ?? await this.callerClientConfig?.region?.() ?? process.env.AWS_REGION;
75
- const client = new SigninClient({
76
- credentials: {
77
- accessKeyId: "",
78
- secretAccessKey: ""
79
- },
80
- region,
81
- requestHandler,
82
- logger,
83
- userAgentAppId,
84
- ...this.init?.clientConfig
85
- });
86
- this.createDPoPInterceptor(client.middlewareStack);
87
- const commandInput = {
88
- tokenInput: {
89
- clientId: freshToken.clientId,
90
- refreshToken: freshToken.refreshToken,
91
- grantType: "refresh_token"
92
- }
93
- };
94
- try {
95
- const response = await client.send(new CreateOAuth2TokenCommand(commandInput));
96
- const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {};
97
- const { refreshToken, expiresIn } = response.tokenOutput ?? {};
98
- if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) {
99
- throw new CredentialsProviderError("Token refresh response missing required fields", {
100
- logger: this.logger,
101
- tryNextLink: false
102
- });
103
- }
104
- const expiresInMs = (expiresIn ?? 900) * 1e3;
105
- const expiration = new Date(Date.now() + expiresInMs);
106
- const updatedToken = {
107
- ...freshToken,
108
- accessToken: {
109
- ...freshToken.accessToken,
110
- accessKeyId,
111
- secretAccessKey,
112
- sessionToken,
113
- expiresAt: expiration.toISOString()
114
- },
115
- refreshToken
116
- };
117
- await this.saveToken(updatedToken);
118
- return this.toCredentials(updatedToken.accessToken);
119
- } catch (error) {
120
- if (error.name === "AccessDeniedException") {
121
- const errorType = error.error;
122
- let message;
123
- switch (errorType) {
124
- case "TOKEN_EXPIRED":
125
- message = "Your session has expired. Please reauthenticate.";
126
- break;
127
- case "USER_CREDENTIALS_CHANGED":
128
- message = "Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password.";
129
- break;
130
- case "INSUFFICIENT_PERMISSIONS":
131
- message = "Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action.";
132
- break;
133
- default:
134
- message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \`aws login\``;
135
- }
136
- throw new CredentialsProviderError(message, {
137
- logger: this.logger,
138
- tryNextLink: false
139
- });
140
- }
141
- const tokenExpiry2 = new Date(freshToken.accessToken.expiresAt).getTime();
142
- if (tokenExpiry2 > Date.now()) {
143
- this.logger?.warn?.(`Failed to refresh token: ${String(error)}. Using existing token until expiry.`);
144
- return this.toCredentials(freshToken.accessToken);
145
- }
146
- throw new CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger });
147
- }
148
- }
149
- async loadToken() {
150
- const tokenFilePath = this.getTokenFilePath();
151
- try {
152
- const tokenData = await fs.readFile(tokenFilePath, "utf8");
153
- const token = JSON.parse(tokenData);
154
- const missingFields = ["accessToken", "clientId", "refreshToken", "dpopKey"].filter((k) => !token[k]);
155
- if (!token.accessToken?.accountId) {
156
- missingFields.push("accountId");
157
- }
158
- if (missingFields.length > 0) {
159
- throw new CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, {
160
- logger: this.logger,
161
- tryNextLink: false
162
- });
163
- }
164
- return token;
165
- } catch (error) {
166
- throw new CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, {
167
- logger: this.logger,
168
- tryNextLink: false
169
- });
170
- }
171
- }
172
- async saveToken(token) {
173
- const tokenFilePath = this.getTokenFilePath();
174
- const directory = dirname(tokenFilePath);
175
- try {
176
- await fs.mkdir(directory, { recursive: true });
177
- } catch (error) {
178
- }
179
- await fs.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
180
- }
181
- getTokenFilePath() {
182
- const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join(homedir(), ".aws", "login", "cache");
183
- const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
184
- const loginSessionSha256 = createHash("sha256").update(loginSessionBytes).digest("hex");
185
- return join(directory, `${loginSessionSha256}.json`);
186
- }
187
- derToRawSignature(derSignature) {
188
- let offset = 2;
189
- if (derSignature[offset] !== 2) {
190
- throw new Error("Invalid DER signature");
191
- }
192
- offset++;
193
- const rLength = derSignature[offset++];
194
- let r = derSignature.subarray(offset, offset + rLength);
195
- offset += rLength;
196
- if (derSignature[offset] !== 2) {
197
- throw new Error("Invalid DER signature");
198
- }
199
- offset++;
200
- const sLength = derSignature[offset++];
201
- let s = derSignature.subarray(offset, offset + sLength);
202
- r = r[0] === 0 ? r.subarray(1) : r;
203
- s = s[0] === 0 ? s.subarray(1) : s;
204
- const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]);
205
- const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]);
206
- return Buffer.concat([rPadded, sPadded]);
207
- }
208
- createDPoPInterceptor(middlewareStack) {
209
- middlewareStack.add((next) => async (args) => {
210
- if (HttpRequest.isInstance(args.request)) {
211
- const request = args.request;
212
- const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : ""}${request.path}`;
213
- const dpop = await this.generateDpop(request.method, actualEndpoint);
214
- request.headers = {
215
- ...request.headers,
216
- DPoP: dpop
217
- };
218
- }
219
- return next(args);
220
- }, {
221
- step: "finalizeRequest",
222
- name: "dpopInterceptor",
223
- override: true
224
- });
225
- }
226
- async generateDpop(method = "POST", endpoint) {
227
- const token = await this.loadToken();
228
- try {
229
- const privateKey = createPrivateKey({
230
- key: token.dpopKey,
231
- format: "pem",
232
- type: "sec1"
233
- });
234
- const publicKey = createPublicKey(privateKey);
235
- const publicDer = publicKey.export({ format: "der", type: "spki" });
236
- let pointStart = -1;
237
- for (let i = 0; i < publicDer.length; i++) {
238
- if (publicDer[i] === 4) {
239
- pointStart = i;
240
- break;
241
- }
242
- }
243
- const x = publicDer.slice(pointStart + 1, pointStart + 33);
244
- const y = publicDer.slice(pointStart + 33, pointStart + 65);
245
- const header = {
246
- alg: "ES256",
247
- typ: "dpop+jwt",
248
- jwk: {
249
- kty: "EC",
250
- crv: "P-256",
251
- x: x.toString("base64url"),
252
- y: y.toString("base64url")
253
- }
254
- };
255
- const payload = {
256
- jti: crypto.randomUUID(),
257
- htm: method,
258
- htu: endpoint,
259
- iat: Math.floor(Date.now() / 1e3)
260
- };
261
- const headerB64 = Buffer.from(JSON.stringify(header)).toString("base64url");
262
- const payloadB64 = Buffer.from(JSON.stringify(payload)).toString("base64url");
263
- const message = `${headerB64}.${payloadB64}`;
264
- const asn1Signature = sign("sha256", Buffer.from(message), privateKey);
265
- const rawSignature = this.derToRawSignature(asn1Signature);
266
- const signatureB64 = rawSignature.toString("base64url");
267
- return `${message}.${signatureB64}`;
268
- } catch (error) {
269
- throw new CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false });
270
- }
271
- }
272
- };
273
-
274
- // ../../node_modules/.pnpm/@aws-sdk+credential-provider-login@3.972.89/node_modules/@aws-sdk/credential-provider-login/dist-es/fromLoginCredentials.js
275
- var fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => {
276
- init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials");
277
- const profiles = await parseKnownFiles(init || {});
278
- const profileName = getProfileName({
279
- profile: init?.profile ?? callerClientConfig?.profile
280
- });
281
- const profile = profiles[profileName];
282
- if (!profile?.login_session) {
283
- throw new CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, {
284
- tryNextLink: true,
285
- logger: init?.logger
286
- });
287
- }
288
- const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig);
289
- const credentials = await fetcher.loadCredentials();
290
- return setCredentialFeature(credentials, "CREDENTIALS_LOGIN", "AD");
291
- };
292
- export {
293
- fromLoginCredentials
294
- };