@supernovaio/cli 1.1.0 → 1.1.1

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 (295) hide show
  1. package/dist/commands/publish-documentation.js +25 -3
  2. package/dist/utils/figma-tokens-data-loader.js +51 -49
  3. package/node_modules/@supernova-studio/pulsar-core/build/main/pulsar-core.js +2 -2
  4. package/node_modules/@supernova-studio/pulsar-core/package.json +8 -26
  5. package/node_modules/@supernova-studio/pulsar-language/build/main/language/src/extensions/dsm/DSMBridge.d.ts +4 -0
  6. package/node_modules/@supernova-studio/pulsar-language/build/main/pulsar-language.js +1 -1
  7. package/node_modules/@supernova-studio/pulsar-language/package.json +7 -22
  8. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKDocumentation.d.ts +4 -4
  9. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/data/SDKDataCore.d.ts +2 -2
  10. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/exports.d.ts +1 -0
  11. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationPageBlock.d.ts +11 -4
  12. package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockAssetGroup.d.ts +25 -0
  13. package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockGuideline.d.ts +11 -0
  14. package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockGuidelineProps.d.ts +17 -0
  15. package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockGuidelines.d.ts +8 -0
  16. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockImage.d.ts +2 -0
  17. package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationPageBlockSwatch.d.ts +9 -0
  18. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationPageBlockType.d.ts +3 -0
  19. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/markdown-transform/SDKToolsMarkdownTransformBlock.d.ts +6 -0
  20. package/node_modules/@supernovaio/supernova-sdk/build/sdk-typescript/tsconfig.tsbuildinfo +6395 -0
  21. package/node_modules/@supernovaio/supernova-sdk/build/supernova-sdk-typescript.js +1 -1
  22. package/node_modules/@supernovaio/supernova-sdk/build/supernova-sdk-typescript.js.map +1 -1
  23. package/node_modules/@supernovaio/supernova-sdk/package.json +7 -8
  24. package/node_modules/axios/CHANGELOG.md +895 -746
  25. package/node_modules/axios/README.md +37 -42
  26. package/node_modules/axios/dist/axios.js +1168 -299
  27. package/node_modules/axios/dist/axios.js.map +1 -1
  28. package/node_modules/axios/dist/axios.min.js +1 -1
  29. package/node_modules/axios/dist/axios.min.js.map +1 -1
  30. package/node_modules/axios/dist/browser/axios.cjs +810 -315
  31. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  32. package/node_modules/axios/dist/esm/axios.js +810 -315
  33. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  34. package/node_modules/axios/dist/esm/axios.min.js +1 -1
  35. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  36. package/node_modules/axios/dist/node/axios.cjs +824 -396
  37. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  38. package/node_modules/axios/index.d.cts +5 -2
  39. package/node_modules/axios/index.d.ts +5 -2
  40. package/node_modules/axios/lib/adapters/adapters.js +3 -1
  41. package/node_modules/axios/lib/adapters/fetch.js +229 -0
  42. package/node_modules/axios/lib/adapters/http.js +27 -17
  43. package/node_modules/axios/lib/adapters/xhr.js +36 -99
  44. package/node_modules/axios/lib/cancel/CancelToken.js +14 -0
  45. package/node_modules/axios/lib/core/Axios.js +9 -6
  46. package/node_modules/axios/lib/core/AxiosError.js +5 -2
  47. package/node_modules/axios/lib/core/AxiosHeaders.js +4 -0
  48. package/node_modules/axios/lib/defaults/index.js +7 -2
  49. package/node_modules/axios/lib/env/data.js +1 -1
  50. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +3 -51
  51. package/node_modules/axios/lib/helpers/composeSignals.js +48 -0
  52. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +1 -1
  53. package/node_modules/axios/lib/helpers/progressEventReducer.js +44 -0
  54. package/node_modules/axios/lib/helpers/resolveConfig.js +57 -0
  55. package/node_modules/axios/lib/helpers/throttle.js +30 -19
  56. package/node_modules/axios/lib/helpers/trackStream.js +87 -0
  57. package/node_modules/axios/lib/platform/common/utils.js +9 -5
  58. package/node_modules/axios/lib/utils.js +40 -3
  59. package/node_modules/axios/package.json +4 -3
  60. package/node_modules/{@supernovaio/supernova-sdk/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.d.ts.map +1 -1
  61. package/node_modules/{@supernovaio/supernova-sdk/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.js +2 -2
  62. package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  63. package/node_modules/{@supernovaio/supernova-sdk/node_modules/https-proxy-agent → https-proxy-agent}/package.json +2 -2
  64. package/oclif.manifest.json +1 -1
  65. package/package.json +108 -108
  66. package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/README.md +0 -95
  67. package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/dist/index.d.ts +0 -38
  68. package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/dist/index.d.ts.map +0 -1
  69. package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/dist/index.js +0 -112
  70. package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/dist/index.js.map +0 -1
  71. package/node_modules/@supernova-studio/pulsar-core/node_modules/agent-base/package.json +0 -49
  72. package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/README.md +0 -97
  73. package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/dist/index.d.ts +0 -46
  74. package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/dist/index.d.ts.map +0 -1
  75. package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/dist/index.js +0 -174
  76. package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/dist/index.js.map +0 -1
  77. package/node_modules/@supernova-studio/pulsar-core/node_modules/https-proxy-agent/package.json +0 -50
  78. package/node_modules/@supernova-studio/pulsar-language/node_modules/agent-base/dist/helpers.d.ts +0 -15
  79. package/node_modules/@supernova-studio/pulsar-language/node_modules/agent-base/dist/helpers.d.ts.map +0 -1
  80. package/node_modules/@supernova-studio/pulsar-language/node_modules/agent-base/dist/helpers.js +0 -66
  81. package/node_modules/@supernova-studio/pulsar-language/node_modules/agent-base/dist/helpers.js.map +0 -1
  82. package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/index.d.ts.map +0 -1
  83. package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/index.js +0 -175
  84. package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/index.js.map +0 -1
  85. package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -15
  86. package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +0 -1
  87. package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -101
  88. package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
  89. package/node_modules/@supernova-studio/pulsar-language/node_modules/https-proxy-agent/package.json +0 -50
  90. package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/LICENSE +0 -22
  91. package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/README.md +0 -69
  92. package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/helpers.d.ts +0 -15
  93. package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/helpers.d.ts.map +0 -1
  94. package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/helpers.js +0 -66
  95. package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/helpers.js.map +0 -1
  96. package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/index.d.ts +0 -41
  97. package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/index.d.ts.map +0 -1
  98. package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/index.js +0 -175
  99. package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/dist/index.js.map +0 -1
  100. package/node_modules/@supernovaio/supernova-sdk/node_modules/agent-base/package.json +0 -49
  101. package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/LICENSE +0 -22
  102. package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/README.md +0 -70
  103. package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/index.d.ts +0 -47
  104. package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/index.js.map +0 -1
  105. package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -15
  106. package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +0 -1
  107. package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -101
  108. package/node_modules/@supernovaio/supernova-sdk/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
  109. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/browser-bundle.d.ts +0 -0
  110. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKBrand.d.ts +0 -0
  111. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKBrandWriter.d.ts +0 -0
  112. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKDesignSystem.d.ts +0 -0
  113. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKDesignSystemVersion.d.ts +0 -0
  114. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKDesignSystemVersionWriter.d.ts +0 -0
  115. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKSupernova.d.ts +0 -0
  116. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/SDKWorkspace.d.ts +0 -0
  117. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/data/SDKConfiguration.d.ts +0 -0
  118. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/data/SDKDataBridge.d.ts +0 -0
  119. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/errors/SDKSupernovaError.d.ts +0 -0
  120. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKAssetGroupResolver.d.ts +0 -0
  121. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKComponentResolver.d.ts +0 -0
  122. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKDesignComponentGroupResolver.d.ts +0 -0
  123. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKDocumentationItemResolver.d.ts +0 -0
  124. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKTokenGroupResolver.d.ts +0 -0
  125. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/core/resolvers/SDKTokenResolver.d.ts +0 -0
  126. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/index.d.ts +0 -0
  127. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/assets/SDKAsset.d.ts +0 -0
  128. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/assets/SDKRenderedAsset.d.ts +0 -0
  129. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/components/SDKComponent.d.ts +0 -0
  130. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/components/SDKDesignComponent.d.ts +0 -0
  131. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationConfiguration.d.ts +0 -0
  132. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationGroup.d.ts +0 -0
  133. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationItem.d.ts +0 -0
  134. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationPage.d.ts +0 -0
  135. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationPageAsset.d.ts +0 -0
  136. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationRichText.d.ts +0 -0
  137. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationRichTextSpan.d.ts +0 -0
  138. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/SDKDocumentationRichTextSpanAttribute.d.ts +0 -0
  139. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockAsset.d.ts +0 -0
  140. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockAssets.d.ts +0 -0
  141. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockCallout.d.ts +0 -0
  142. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockCode.d.ts +0 -0
  143. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockColumn.d.ts +0 -0
  144. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockColumnItem.d.ts +0 -0
  145. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockCustom.d.ts +0 -0
  146. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockDivider.d.ts +0 -0
  147. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedFigma.d.ts +0 -0
  148. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedGeneric.d.ts +0 -0
  149. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedLink.d.ts +0 -0
  150. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedStorybook.d.ts +0 -0
  151. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockEmbedYoutube.d.ts +0 -0
  152. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockFrame.d.ts +0 -0
  153. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockFrames.d.ts +0 -0
  154. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockHeading.d.ts +0 -0
  155. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockOrderedList.d.ts +0 -0
  156. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockQuote.d.ts +0 -0
  157. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockRenderCode.d.ts +0 -0
  158. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockShortcut.d.ts +0 -0
  159. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockShortcuts.d.ts +0 -0
  160. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTab.d.ts +0 -0
  161. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTabItem.d.ts +0 -0
  162. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTable.d.ts +0 -0
  163. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTableCell.d.ts +0 -0
  164. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTableColumn.d.ts +0 -0
  165. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTableRow.d.ts +0 -0
  166. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockText.d.ts +0 -0
  167. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockToken.d.ts +0 -0
  168. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTokenGroup.d.ts +0 -0
  169. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockTokenList.d.ts +0 -0
  170. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/blocks/SDKDocumentationPageBlockUnorderedList.d.ts +0 -0
  171. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/builder/SDKDocumentationBlockBuilder.d.ts +0 -0
  172. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/configuration/SDKDocumentationItemConfiguration.d.ts +0 -0
  173. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/documentation/configuration/SDKDocumentationItemHeader.d.ts +0 -0
  174. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/SDKElementDataView.d.ts +0 -0
  175. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/SDKElementDataViewColumn.d.ts +0 -0
  176. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/SDKElementProperty.d.ts +0 -0
  177. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/SDKElementPropertyOption.d.ts +0 -0
  178. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/elements/values/SDKElementPropertyValue.d.ts +0 -0
  179. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKAlignment.d.ts +0 -0
  180. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKAssetFormat.d.ts +0 -0
  181. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKAssetScale.d.ts +0 -0
  182. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKAssetScaleType.d.ts +0 -0
  183. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKBlurType.d.ts +0 -0
  184. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKBorderPosition.d.ts +0 -0
  185. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationCalloutType.d.ts +0 -0
  186. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationEnvironment.d.ts +0 -0
  187. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationGroupBehavior.d.ts +0 -0
  188. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationHeadingType.d.ts +0 -0
  189. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationItemType.d.ts +0 -0
  190. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationPageAssetType.d.ts +0 -0
  191. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKDocumentationPageBlockThemeType.d.ts +0 -0
  192. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKFrameAlignment.d.ts +0 -0
  193. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKFrameLayout.d.ts +0 -0
  194. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKGradientType.d.ts +0 -0
  195. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKRichTextSpanAttributeType.d.ts +0 -0
  196. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKShadowType.d.ts +0 -0
  197. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKSourceType.d.ts +0 -0
  198. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKTextCase.d.ts +0 -0
  199. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKTextDecoration.d.ts +0 -0
  200. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKTokenType.d.ts +0 -0
  201. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/enums/SDKUnit.d.ts +0 -0
  202. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/SDKExporter.d.ts +0 -0
  203. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/custom_blocks/SDKExporterCustomBlock.d.ts +0 -0
  204. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/custom_blocks/SDKExporterCustomBlockProperty.d.ts +0 -0
  205. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/custom_blocks/SDKExporterCustomBlockVariant.d.ts +0 -0
  206. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/exporters/custom_properties/SDKExporterConfigurationProperty.d.ts +0 -0
  207. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/groups/SDKAssetGroup.d.ts +0 -0
  208. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/groups/SDKDesignComponentGroup.d.ts +0 -0
  209. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/groups/SDKTokenGroup.d.ts +0 -0
  210. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKDesignComponentOrigin.d.ts +0 -0
  211. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKFrameOrigin.d.ts +0 -0
  212. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKSize.d.ts +0 -0
  213. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKSource.d.ts +0 -0
  214. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKTokenOrigin.d.ts +0 -0
  215. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/support/SDKWorkspaceNPMRegistry.d.ts +0 -0
  216. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/themes/SDKThemeUtilities.d.ts +0 -0
  217. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/themes/SDKTokenTheme.d.ts +5 -5
  218. package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/themes/SDKTokenThemeOverride.d.ts +5 -5
  219. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKBlurToken.d.ts +0 -0
  220. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKBorderToken.d.ts +0 -0
  221. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKColorToken.d.ts +0 -0
  222. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKFontToken.d.ts +0 -0
  223. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKGenericToken.d.ts +0 -0
  224. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKGradientToken.d.ts +0 -0
  225. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKMeasureToken.d.ts +0 -0
  226. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKRadiusToken.d.ts +0 -0
  227. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKShadowToken.d.ts +0 -0
  228. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKTextToken.d.ts +0 -0
  229. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKToken.d.ts +0 -0
  230. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKTokenCompator.d.ts +0 -0
  231. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKTokenValue.d.ts +0 -0
  232. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/SDKTypographyToken.d.ts +0 -0
  233. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/remote/SDKRemoteTokenData.d.ts +0 -0
  234. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/remote/SDKRemoteTokenModel.d.ts +0 -0
  235. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/tokens/remote/SDKRemoteTokenValue.d.ts +0 -0
  236. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/model/users/SDKUser.d.ts +0 -0
  237. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Brand.spec.d.ts +0 -0
  238. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Components.spec.d.ts +0 -0
  239. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/DesignSystem.spec.d.ts +0 -0
  240. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/DesignSystemVersion.spec.d.ts +0 -0
  241. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Documentation.spec.d.ts +0 -0
  242. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Supernova.spec.d.ts +0 -0
  243. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Theme.spec.d.ts +0 -0
  244. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Accessors/Workspace.spec.d.ts +0 -0
  245. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Tooling/PluginFigmaTokens.spec.d.ts +0 -0
  246. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Tooling/PluginJSONBuilder.spec.d.ts +0 -0
  247. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Tooling/ToolDocSearch.spec.d.ts +0 -0
  248. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/Tooling/ToolMarkdownTransform.spec.d.ts +0 -0
  249. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tests/helpers.d.ts +0 -0
  250. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +0 -0
  251. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTJSONConverter.d.ts +0 -0
  252. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTJSONGroupBuilder.d.ts +0 -0
  253. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTJSONLoader.d.ts +0 -0
  254. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTJSONParser.d.ts +0 -0
  255. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTMapLoader.d.ts +0 -0
  256. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTMapResolver.d.ts +0 -0
  257. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTThemeMerger.d.ts +0 -0
  258. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTTokenGroupTreeMerger.d.ts +0 -0
  259. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTTokenMerger.d.ts +0 -0
  260. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTTokenReferenceResolver.d.ts +0 -0
  261. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/SDKDTTokenSetResolver.d.ts +0 -0
  262. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/collection/SDKDTTokenCollection.d.ts +0 -0
  263. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/expression/SDKDTExpressionParser.d.ts +0 -0
  264. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/tree/SDKDTGroupTree.d.ts +0 -0
  265. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/tree/SDKDTGroupTreeNode.d.ts +0 -0
  266. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/design-tokens/utilities/tree/SDKDTParentChildMapping.d.ts +0 -0
  267. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/json-builder/SDKToolsJSONBuilder.d.ts +0 -0
  268. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/json-builder/elements-transformers/SDKToolsJSONElementFigmaTokensTransformer.d.ts +0 -0
  269. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/json-builder/elements-transformers/SDKToolsJSONElementStyleDictionaryTransformer.d.ts +0 -0
  270. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +0 -0
  271. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/markdown-transform/SDKToolsMarkdownTransform.d.ts +0 -0
  272. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/markdown-transform/SDKToolsMarkdownTransformCustomBlock.d.ts +0 -0
  273. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/markdown-transform/SDKToolsMarkdownTransformUtil.d.ts +0 -0
  274. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/search-index/SDKToolsDocSearch.d.ts +0 -0
  275. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/tools/token-transform/SDKToolsTokenTransform.d.ts +0 -0
  276. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/utils/FlowUtils.d.ts +0 -0
  277. /package/node_modules/@supernovaio/supernova-sdk/build/{Typescript → sdk-typescript}/src/utils/StringUtils.d.ts +0 -0
  278. /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/LICENSE +0 -0
  279. /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/README.md +0 -0
  280. /package/node_modules/{@supernova-studio/pulsar-core/node_modules/agent-base → agent-base}/dist/helpers.d.ts +0 -0
  281. /package/node_modules/{@supernova-studio/pulsar-core/node_modules/agent-base → agent-base}/dist/helpers.d.ts.map +0 -0
  282. /package/node_modules/{@supernova-studio/pulsar-core/node_modules/agent-base → agent-base}/dist/helpers.js +0 -0
  283. /package/node_modules/{@supernova-studio/pulsar-core/node_modules/agent-base → agent-base}/dist/helpers.js.map +0 -0
  284. /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/dist/index.d.ts +0 -0
  285. /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/dist/index.d.ts.map +0 -0
  286. /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/dist/index.js +0 -0
  287. /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/dist/index.js.map +0 -0
  288. /package/node_modules/{@supernova-studio/pulsar-language/node_modules/agent-base → agent-base}/package.json +0 -0
  289. /package/node_modules/{@supernova-studio/pulsar-language/node_modules/https-proxy-agent → https-proxy-agent}/LICENSE +0 -0
  290. /package/node_modules/{@supernova-studio/pulsar-language/node_modules/https-proxy-agent → https-proxy-agent}/README.md +0 -0
  291. /package/node_modules/{@supernova-studio/pulsar-language/node_modules/https-proxy-agent → https-proxy-agent}/dist/index.d.ts +0 -0
  292. /package/node_modules/{@supernova-studio/pulsar-core/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.d.ts +0 -0
  293. /package/node_modules/{@supernova-studio/pulsar-core/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.d.ts.map +0 -0
  294. /package/node_modules/{@supernova-studio/pulsar-core/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.js +0 -0
  295. /package/node_modules/{@supernova-studio/pulsar-core/node_modules/https-proxy-agent → https-proxy-agent}/dist/parse-proxy-response.js.map +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAG7B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAMrD,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,MAAM,QAAQ,IAAI,MAAM,CAAC,EAAE,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE/E,KAAK,cAAc,GAAG;IACrB,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IACnD,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CACpD,CAAC;AAEF,KAAK,WAAW,CAAC,CAAC,IAAI;KACpB,CAAC,IAAI,MAAM,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,GAC/C,cAAc,CAAC,CAAC,CAAC,GACjB,KAAK;CACR,CAAC,MAAM,cAAc,CAAC,CAAC;AAExB,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GACrD,IAAI,CAAC,YAAY,GAAG;IACnB,OAAO,CAAC,EAAE,mBAAmB,GAAG,CAAC,MAAM,mBAAmB,CAAC,CAAC;CAC5D,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,qBAAa,eAAe,CAAC,GAAG,SAAS,MAAM,CAAE,SAAQ,KAAK;IAC7D,MAAM,CAAC,SAAS,6BAA8B;IAE9C,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC;IACpB,YAAY,EAAE,mBAAmB,GAAG,CAAC,MAAM,mBAAmB,CAAC,CAAC;IAChE,WAAW,EAAE,GAAG,CAAC,iBAAiB,GAAG,GAAG,CAAC,iBAAiB,CAAC;gBAE/C,KAAK,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,sBAAsB,CAAC,GAAG,CAAC;IA0BhE;;;OAGG;IACG,OAAO,CACZ,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,IAAI,EAAE,gBAAgB,GACpB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;CAyGtB"}
@@ -1,174 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.HttpsProxyAgent = void 0;
30
- const net = __importStar(require("net"));
31
- const tls = __importStar(require("tls"));
32
- const assert_1 = __importDefault(require("assert"));
33
- const debug_1 = __importDefault(require("debug"));
34
- const agent_base_1 = require("agent-base");
35
- const parse_proxy_response_1 = require("./parse-proxy-response");
36
- const debug = (0, debug_1.default)('https-proxy-agent');
37
- /**
38
- * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
39
- * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
40
- *
41
- * Outgoing HTTP requests are first tunneled through the proxy server using the
42
- * `CONNECT` HTTP request method to establish a connection to the proxy server,
43
- * and then the proxy server connects to the destination target and issues the
44
- * HTTP request from the proxy server.
45
- *
46
- * `https:` requests have their socket connection upgraded to TLS once
47
- * the connection to the proxy server has been established.
48
- */
49
- class HttpsProxyAgent extends agent_base_1.Agent {
50
- constructor(proxy, opts) {
51
- super(opts);
52
- this.options = { path: undefined };
53
- this.proxy = typeof proxy === 'string' ? new URL(proxy) : proxy;
54
- this.proxyHeaders = opts?.headers ?? {};
55
- debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href);
56
- // Trim off the brackets from IPv6 addresses
57
- const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, '');
58
- const port = this.proxy.port
59
- ? parseInt(this.proxy.port, 10)
60
- : this.proxy.protocol === 'https:'
61
- ? 443
62
- : 80;
63
- this.connectOpts = {
64
- // Attempt to negotiate http/1.1 for proxy servers that support http/2
65
- ALPNProtocols: ['http/1.1'],
66
- ...(opts ? omit(opts, 'headers') : null),
67
- host,
68
- port,
69
- };
70
- }
71
- /**
72
- * Called when the node-core HTTP client library is creating a
73
- * new HTTP request.
74
- */
75
- async connect(req, opts) {
76
- const { proxy } = this;
77
- if (!opts.host) {
78
- throw new TypeError('No "host" provided');
79
- }
80
- // Create a socket connection to the proxy server.
81
- let socket;
82
- if (proxy.protocol === 'https:') {
83
- debug('Creating `tls.Socket`: %o', this.connectOpts);
84
- const servername = this.connectOpts.servername || this.connectOpts.host;
85
- socket = tls.connect({
86
- ...this.connectOpts,
87
- servername: servername && net.isIP(servername) ? undefined : servername
88
- });
89
- }
90
- else {
91
- debug('Creating `net.Socket`: %o', this.connectOpts);
92
- socket = net.connect(this.connectOpts);
93
- }
94
- const headers = typeof this.proxyHeaders === 'function'
95
- ? this.proxyHeaders()
96
- : { ...this.proxyHeaders };
97
- const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
98
- let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`;
99
- // Inject the `Proxy-Authorization` header if necessary.
100
- if (proxy.username || proxy.password) {
101
- const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
102
- headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`;
103
- }
104
- headers.Host = `${host}:${opts.port}`;
105
- if (!headers['Proxy-Connection']) {
106
- headers['Proxy-Connection'] = this.keepAlive
107
- ? 'Keep-Alive'
108
- : 'close';
109
- }
110
- for (const name of Object.keys(headers)) {
111
- payload += `${name}: ${headers[name]}\r\n`;
112
- }
113
- const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);
114
- socket.write(`${payload}\r\n`);
115
- const { connect, buffered } = await proxyResponsePromise;
116
- req.emit('proxyConnect', connect);
117
- this.emit('proxyConnect', connect, req);
118
- if (connect.statusCode === 200) {
119
- req.once('socket', resume);
120
- if (opts.secureEndpoint) {
121
- // The proxy is connecting to a TLS server, so upgrade
122
- // this socket connection to a TLS connection.
123
- debug('Upgrading socket connection to TLS');
124
- const servername = opts.servername || opts.host;
125
- return tls.connect({
126
- ...omit(opts, 'host', 'path', 'port'),
127
- socket,
128
- servername: net.isIP(servername) ? undefined : servername,
129
- });
130
- }
131
- return socket;
132
- }
133
- // Some other status code that's not 200... need to re-play the HTTP
134
- // header "data" events onto the socket once the HTTP machinery is
135
- // attached so that the node core `http` can parse and handle the
136
- // error status code.
137
- // Close the original socket, and a new "fake" socket is returned
138
- // instead, so that the proxy doesn't get the HTTP request
139
- // written to it (which may contain `Authorization` headers or other
140
- // sensitive data).
141
- //
142
- // See: https://hackerone.com/reports/541502
143
- socket.destroy();
144
- const fakeSocket = new net.Socket({ writable: false });
145
- fakeSocket.readable = true;
146
- // Need to wait for the "socket" event to re-play the "data" events.
147
- req.once('socket', (s) => {
148
- debug('Replaying proxy buffer for failed request');
149
- (0, assert_1.default)(s.listenerCount('data') > 0);
150
- // Replay the "buffered" Buffer onto the fake `socket`, since at
151
- // this point the HTTP module machinery has been hooked up for
152
- // the user.
153
- s.push(buffered);
154
- s.push(null);
155
- });
156
- return fakeSocket;
157
- }
158
- }
159
- HttpsProxyAgent.protocols = ['http', 'https'];
160
- exports.HttpsProxyAgent = HttpsProxyAgent;
161
- function resume(socket) {
162
- socket.resume();
163
- }
164
- function omit(obj, ...keys) {
165
- const ret = {};
166
- let key;
167
- for (key in obj) {
168
- if (!keys.includes(key)) {
169
- ret[key] = obj[key];
170
- }
171
- }
172
- return ret;
173
- }
174
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,yCAA2B;AAE3B,oDAA4B;AAC5B,kDAAgC;AAEhC,2CAAqD;AACrD,iEAA4D;AAE5D,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,mBAAmB,CAAC,CAAC;AAqB/C;;;;;;;;;;;GAWG;AACH,MAAa,eAAoC,SAAQ,kBAAK;IAO7D,YAAY,KAAgB,E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,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;YACxB,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;SACpB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"}
@@ -1,50 +0,0 @@
1
- {
2
- "name": "https-proxy-agent",
3
- "version": "7.0.2",
4
- "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
5
- "main": "./dist/index.js",
6
- "types": "./dist/index.d.ts",
7
- "files": [
8
- "dist"
9
- ],
10
- "repository": {
11
- "type": "git",
12
- "url": "https://github.com/TooTallNate/proxy-agents.git",
13
- "directory": "packages/https-proxy-agent"
14
- },
15
- "keywords": [
16
- "https",
17
- "proxy",
18
- "endpoint",
19
- "agent"
20
- ],
21
- "author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
22
- "license": "MIT",
23
- "dependencies": {
24
- "agent-base": "^7.0.2",
25
- "debug": "4"
26
- },
27
- "devDependencies": {
28
- "@types/async-retry": "^1.4.5",
29
- "@types/debug": "4",
30
- "@types/jest": "^29.5.1",
31
- "@types/node": "^14.18.45",
32
- "async-listen": "^3.0.0",
33
- "async-retry": "^1.3.3",
34
- "jest": "^29.5.0",
35
- "ts-jest": "^29.1.0",
36
- "typescript": "^5.0.4",
37
- "proxy": "2.1.1",
38
- "tsconfig": "0.0.0"
39
- },
40
- "engines": {
41
- "node": ">= 14"
42
- },
43
- "scripts": {
44
- "build": "tsc",
45
- "test": "jest --env node --verbose --bail test/test.ts",
46
- "test-e2e": "jest --env node --verbose --bail test/e2e.test.ts",
47
- "lint": "eslint --ext .ts",
48
- "pack": "node ../../scripts/pack.mjs"
49
- }
50
- }
@@ -1,15 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
- /// <reference types="node" />
5
- /// <reference types="node" />
6
- import * as http from 'http';
7
- import * as https from 'https';
8
- import type { Readable } from 'stream';
9
- export type ThenableRequest = http.ClientRequest & {
10
- then: Promise<http.IncomingMessage>['then'];
11
- };
12
- export declare function toBuffer(stream: Readable): Promise<Buffer>;
13
- export declare function json(stream: Readable): Promise<any>;
14
- export declare function req(url: string | URL, opts?: https.RequestOptions): ThenableRequest;
15
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,aAAa,GAAG;IAClD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;CAC5C,CAAC;AAEF,wBAAsB,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAQhE;AAGD,wBAAsB,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAUzD;AAED,wBAAgB,GAAG,CAClB,GAAG,EAAE,MAAM,GAAG,GAAG,EACjB,IAAI,GAAE,KAAK,CAAC,cAAmB,GAC7B,eAAe,CAcjB"}
@@ -1,66 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.req = exports.json = exports.toBuffer = void 0;
27
- const http = __importStar(require("http"));
28
- const https = __importStar(require("https"));
29
- async function toBuffer(stream) {
30
- let length = 0;
31
- const chunks = [];
32
- for await (const chunk of stream) {
33
- length += chunk.length;
34
- chunks.push(chunk);
35
- }
36
- return Buffer.concat(chunks, length);
37
- }
38
- exports.toBuffer = toBuffer;
39
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
- async function json(stream) {
41
- const buf = await toBuffer(stream);
42
- const str = buf.toString('utf8');
43
- try {
44
- return JSON.parse(str);
45
- }
46
- catch (_err) {
47
- const err = _err;
48
- err.message += ` (input: ${str})`;
49
- throw err;
50
- }
51
- }
52
- exports.json = json;
53
- function req(url, opts = {}) {
54
- const href = typeof url === 'string' ? url : url.href;
55
- const req = (href.startsWith('https:') ? https : http).request(url, opts);
56
- const promise = new Promise((resolve, reject) => {
57
- req
58
- .once('response', resolve)
59
- .once('error', reject)
60
- .end();
61
- });
62
- req.then = promise.then.bind(promise);
63
- return req;
64
- }
65
- exports.req = req;
66
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,6CAA+B;AAOxB,KAAK,UAAU,QAAQ,CAAC,MAAgB;IAC9C,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK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,eAAe,CAAC,GAAG,SAAS,MAAM,CAAE,SAAQ,KAAK;IAC7D,MAAM,CAAC,SAAS,6BAA8B;IAE9C,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC;IACpB,YAAY,EAAE,mBAAmB,GAAG,CAAC,MAAM,mBAAmB,CAAC,CAAC;IAChE,WAAW,EAAE,GAAG,CAAC,iBAAiB,GAAG,GAAG,CAAC,iBAAiB,CAAC;gBAE/C,KAAK,EAAE,GAAG,GAAG,GAAG,EAAE,IAAI,CAAC,EAAE,sBAAsB,CAAC,GAAG,CAAC;IA0BhE;;;OAGG;IACG,OAAO,CACZ,GAAG,EAAE,IAAI,CAAC,aAAa,EACvB,IAAI,EAAE,gBAAgB,GACpB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;CA2GtB"}
@@ -1,175 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.HttpsProxyAgent = void 0;
30
- const net = __importStar(require("net"));
31
- const tls = __importStar(require("tls"));
32
- const assert_1 = __importDefault(require("assert"));
33
- const debug_1 = __importDefault(require("debug"));
34
- const agent_base_1 = require("agent-base");
35
- const url_1 = require("url");
36
- const parse_proxy_response_1 = require("./parse-proxy-response");
37
- const debug = (0, debug_1.default)('https-proxy-agent');
38
- /**
39
- * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
40
- * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
41
- *
42
- * Outgoing HTTP requests are first tunneled through the proxy server using the
43
- * `CONNECT` HTTP request method to establish a connection to the proxy server,
44
- * and then the proxy server connects to the destination target and issues the
45
- * HTTP request from the proxy server.
46
- *
47
- * `https:` requests have their socket connection upgraded to TLS once
48
- * the connection to the proxy server has been established.
49
- */
50
- class HttpsProxyAgent extends agent_base_1.Agent {
51
- constructor(proxy, opts) {
52
- super(opts);
53
- this.options = { path: undefined };
54
- this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy;
55
- this.proxyHeaders = opts?.headers ?? {};
56
- debug('Creating new HttpsProxyAgent instance: %o', this.proxy.href);
57
- // Trim off the brackets from IPv6 addresses
58
- const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, '');
59
- const port = this.proxy.port
60
- ? parseInt(this.proxy.port, 10)
61
- : this.proxy.protocol === 'https:'
62
- ? 443
63
- : 80;
64
- this.connectOpts = {
65
- // Attempt to negotiate http/1.1 for proxy servers that support http/2
66
- ALPNProtocols: ['http/1.1'],
67
- ...(opts ? omit(opts, 'headers') : null),
68
- host,
69
- port,
70
- };
71
- }
72
- /**
73
- * Called when the node-core HTTP client library is creating a
74
- * new HTTP request.
75
- */
76
- async connect(req, opts) {
77
- const { proxy } = this;
78
- if (!opts.host) {
79
- throw new TypeError('No "host" provided');
80
- }
81
- // Create a socket connection to the proxy server.
82
- let socket;
83
- if (proxy.protocol === 'https:') {
84
- debug('Creating `tls.Socket`: %o', this.connectOpts);
85
- const servername = this.connectOpts.servername || this.connectOpts.host;
86
- socket = tls.connect({
87
- ...this.connectOpts,
88
- servername: servername && net.isIP(servername) ? undefined : servername,
89
- });
90
- }
91
- else {
92
- debug('Creating `net.Socket`: %o', this.connectOpts);
93
- socket = net.connect(this.connectOpts);
94
- }
95
- const headers = typeof this.proxyHeaders === 'function'
96
- ? this.proxyHeaders()
97
- : { ...this.proxyHeaders };
98
- const host = net.isIPv6(opts.host) ? `[${opts.host}]` : opts.host;
99
- let payload = `CONNECT ${host}:${opts.port} HTTP/1.1\r\n`;
100
- // Inject the `Proxy-Authorization` header if necessary.
101
- if (proxy.username || proxy.password) {
102
- const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`;
103
- headers['Proxy-Authorization'] = `Basic ${Buffer.from(auth).toString('base64')}`;
104
- }
105
- headers.Host = `${host}:${opts.port}`;
106
- if (!headers['Proxy-Connection']) {
107
- headers['Proxy-Connection'] = this.keepAlive
108
- ? 'Keep-Alive'
109
- : 'close';
110
- }
111
- for (const name of Object.keys(headers)) {
112
- payload += `${name}: ${headers[name]}\r\n`;
113
- }
114
- const proxyResponsePromise = (0, parse_proxy_response_1.parseProxyResponse)(socket);
115
- socket.write(`${payload}\r\n`);
116
- const { connect, buffered } = await proxyResponsePromise;
117
- req.emit('proxyConnect', connect);
118
- this.emit('proxyConnect', connect, req);
119
- if (connect.statusCode === 200) {
120
- req.once('socket', resume);
121
- if (opts.secureEndpoint) {
122
- // The proxy is connecting to a TLS server, so upgrade
123
- // this socket connection to a TLS connection.
124
- debug('Upgrading socket connection to TLS');
125
- const servername = opts.servername || opts.host;
126
- return tls.connect({
127
- ...omit(opts, 'host', 'path', 'port'),
128
- socket,
129
- servername: net.isIP(servername) ? undefined : servername,
130
- });
131
- }
132
- return socket;
133
- }
134
- // Some other status code that's not 200... need to re-play the HTTP
135
- // header "data" events onto the socket once the HTTP machinery is
136
- // attached so that the node core `http` can parse and handle the
137
- // error status code.
138
- // Close the original socket, and a new "fake" socket is returned
139
- // instead, so that the proxy doesn't get the HTTP request
140
- // written to it (which may contain `Authorization` headers or other
141
- // sensitive data).
142
- //
143
- // See: https://hackerone.com/reports/541502
144
- socket.destroy();
145
- const fakeSocket = new net.Socket({ writable: false });
146
- fakeSocket.readable = true;
147
- // Need to wait for the "socket" event to re-play the "data" events.
148
- req.once('socket', (s) => {
149
- debug('Replaying proxy buffer for failed request');
150
- (0, assert_1.default)(s.listenerCount('data') > 0);
151
- // Replay the "buffered" Buffer onto the fake `socket`, since at
152
- // this point the HTTP module machinery has been hooked up for
153
- // the user.
154
- s.push(buffered);
155
- s.push(null);
156
- });
157
- return fakeSocket;
158
- }
159
- }
160
- HttpsProxyAgent.protocols = ['http', 'https'];
161
- exports.HttpsProxyAgent = HttpsProxyAgent;
162
- function resume(socket) {
163
- socket.resume();
164
- }
165
- function omit(obj, ...keys) {
166
- const ret = {};
167
- let key;
168
- for (key in obj) {
169
- if (!keys.includes(key)) {
170
- ret[key] = obj[key];
171
- }
172
- }
173
- return ret;
174
- }
175
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,yCAA2B;AAE3B,oDAA4B;AAC5B,kDAAgC;AAChC,2CAAqD;AACrD,6BAA0B;AAC1B,iEAA4D;AAG5D,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,mBAAmB,CAAC,CAAC;AAqB/C;;;;;;;;;;;GAWG;AACH,MAAa,eAAoC,SAAQ,kBAAK;IAO7D,YAAY,KAAgB,EAAE,IAAkC;QAC/D,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,OAAO,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC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,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
- import { IncomingHttpHeaders } from 'http';
5
- import { Readable } from 'stream';
6
- export interface ConnectResponse {
7
- statusCode: number;
8
- statusText: string;
9
- headers: IncomingHttpHeaders;
10
- }
11
- export declare function parseProxyResponse(socket: Readable): Promise<{
12
- connect: ConnectResponse;
13
- buffered: Buffer;
14
- }>;
15
- //# sourceMappingURL=parse-proxy-response.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-proxy-response.d.ts","sourceRoot":"","sources":["../src/parse-proxy-response.ts"],"names":[],"mappings":";;;AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAIlC,MAAM,WAAW,eAAe;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,mBAAmB,CAAC;CAC7B;AAED,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,QAAQ,GACd,OAAO,CAAC;IAAE,OAAO,EAAE,eAAe,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAyGzD"}
@@ -1,101 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.parseProxyResponse = void 0;
7
- const debug_1 = __importDefault(require("debug"));
8
- const debug = (0, debug_1.default)('https-proxy-agent:parse-proxy-response');
9
- function parseProxyResponse(socket) {
10
- return new Promise((resolve, reject) => {
11
- // we need to buffer any HTTP traffic that happens with the proxy before we get
12
- // the CONNECT response, so that if the response is anything other than an "200"
13
- // response code, then we can re-play the "data" events on the socket once the
14
- // HTTP parser is hooked up...
15
- let buffersLength = 0;
16
- const buffers = [];
17
- function read() {
18
- const b = socket.read();
19
- if (b)
20
- ondata(b);
21
- else
22
- socket.once('readable', read);
23
- }
24
- function cleanup() {
25
- socket.removeListener('end', onend);
26
- socket.removeListener('error', onerror);
27
- socket.removeListener('readable', read);
28
- }
29
- function onend() {
30
- cleanup();
31
- debug('onend');
32
- reject(new Error('Proxy connection ended before receiving CONNECT response'));
33
- }
34
- function onerror(err) {
35
- cleanup();
36
- debug('onerror %o', err);
37
- reject(err);
38
- }
39
- function ondata(b) {
40
- buffers.push(b);
41
- buffersLength += b.length;
42
- const buffered = Buffer.concat(buffers, buffersLength);
43
- const endOfHeaders = buffered.indexOf('\r\n\r\n');
44
- if (endOfHeaders === -1) {
45
- // keep buffering
46
- debug('have not received end of HTTP headers yet...');
47
- read();
48
- return;
49
- }
50
- const headerParts = buffered
51
- .slice(0, endOfHeaders)
52
- .toString('ascii')
53
- .split('\r\n');
54
- const firstLine = headerParts.shift();
55
- if (!firstLine) {
56
- socket.destroy();
57
- return reject(new Error('No header received from proxy CONNECT response'));
58
- }
59
- const firstLineParts = firstLine.split(' ');
60
- const statusCode = +firstLineParts[1];
61
- const statusText = firstLineParts.slice(2).join(' ');
62
- const headers = {};
63
- for (const header of headerParts) {
64
- if (!header)
65
- continue;
66
- const firstColon = header.indexOf(':');
67
- if (firstColon === -1) {
68
- socket.destroy();
69
- return reject(new Error(`Invalid header from proxy CONNECT response: "${header}"`));
70
- }
71
- const key = header.slice(0, firstColon).toLowerCase();
72
- const value = header.slice(firstColon + 1).trimStart();
73
- const current = headers[key];
74
- if (typeof current === 'string') {
75
- headers[key] = [current, value];
76
- }
77
- else if (Array.isArray(current)) {
78
- current.push(value);
79
- }
80
- else {
81
- headers[key] = value;
82
- }
83
- }
84
- debug('got proxy server response: %o %o', firstLine, headers);
85
- cleanup();
86
- resolve({
87
- connect: {
88
- statusCode,
89
- statusText,
90
- headers,
91
- },
92
- buffered,
93
- });
94
- }
95
- socket.on('error', onerror);
96
- socket.on('end', onend);
97
- read();
98
- });
99
- }
100
- exports.parseProxyResponse = parseProxyResponse;
101
- //# sourceMappingURL=parse-proxy-response.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-proxy-response.js","sourceRoot":"","sources":["../src/parse-proxy-response.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAgC;AAIhC,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,wCAAwC,CAAC,CAAC;AAQpE,SAAgB,kBAAkB,CACjC,MAAgB;IAEhB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,+EAA+E;QAC/E,gFAAgF;QAChF,8EAA8E;QAC9E,8BAA8B;QAC9B,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,SAAS,IAAI;YACZ,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC;gBAAE,MAAM,CAAC,CAAC,CAAC,CAAC;;gBACZ,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC;QAED,SAAS,OAAO;YACf,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACpC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACzC,CAAC;QAED,SAAS,KAAK;YACb,OAAO,EAAE,CAAC;YACV,KAAK,CAAC,OAAO,CAAC,CAAC;YACf,MAAM,CACL,IAAI,KAAK,CACR,0DAA0D,CAC1D,CACD,CAAC;QACH,CAAC;QAED,SAAS,OAAO,CAAC,GAAU;YAC1B,OAAO,EAAE,CAAC;YACV,KAAK,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;YACzB,MAAM,CAAC,GAAG,CAAC,CAAC;QACb,CAAC;QAED,SAAS,MAAM,CAAC,CAAS;YACxB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC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