@jini-ai/provider-plugins 0.7.2 → 0.7.3-next.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 (254) hide show
  1. package/CHANGELOG.md +2 -4
  2. package/README.md +1 -1
  3. package/catalog.json +20 -20
  4. package/dist/observability-opentelemetry/contract.d.ts +114 -0
  5. package/dist/observability-opentelemetry/contract.js +1 -0
  6. package/dist/observability-opentelemetry/otel-port.d.ts +31 -0
  7. package/dist/observability-opentelemetry/otel-port.js +187 -0
  8. package/package.json +26 -18
  9. package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +3 -3
  10. package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_provider-plugins/package-license.json +1 -1
  11. package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/README.md +1 -1
  12. package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +6 -16
  13. package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_provider-plugins/package-license.json +1 -1
  14. package/plugins/analytics-posthog/0.7.3-next.1/server/consent-adapter.mjs +1 -0
  15. package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/server/index.mjs +73 -90
  16. package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/client/provider.js +16 -16
  17. package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +4 -10
  18. package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_provider-plugins/package-license.json +1 -1
  19. package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/client/provider.js +47 -47
  20. package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +5 -11
  21. package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_provider-plugins/package-license.json +1 -1
  22. package/plugins/fixture-provider/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +3 -3
  23. package/plugins/fixture-provider/0.7.3-next.1/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
  24. package/plugins/formspree/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +3 -3
  25. package/plugins/formspree/0.7.3-next.1/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
  26. package/plugins/google-forms/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +3 -3
  27. package/plugins/google-forms/0.7.3-next.1/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
  28. package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/README.md +1 -1
  29. package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +6 -15
  30. package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_core/package-license.json +1 -1
  31. package/plugins/observability-opentelemetry/0.7.3-next.1/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
  32. package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/server/index.mjs +246 -1190
  33. package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/README.md +1 -1
  34. package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +6 -10
  35. package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_core/package-license.json +1 -1
  36. package/plugins/observability-sentry/0.7.3-next.1/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
  37. package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/server/index.mjs +85 -1045
  38. package/plugins/payments-stripe/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +4 -9
  39. package/plugins/payments-stripe/0.7.3-next.1/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
  40. package/plugins/payments-stripe/{0.7.2 → 0.7.3-next.1}/server/index.mjs +64 -63
  41. package/plugins/analytics-posthog/0.7.2/licenses/_jini-ai_cookie-consent/LICENSE-SOURCE +0 -1
  42. package/plugins/analytics-posthog/0.7.2/licenses/_jini-ai_cookie-consent/package-license.json +0 -5
  43. package/plugins/analytics-posthog/0.7.2/licenses/_jini-ai_core/package-license.json +0 -5
  44. package/plugins/analytics-posthog/0.7.2/licenses/_jini-ai_diagnostics/package-license.json +0 -5
  45. package/plugins/analytics-posthog/0.7.2/licenses/js-tokens/LICENSE +0 -21
  46. package/plugins/analytics-posthog/0.7.2/licenses/js-tokens/package-license.json +0 -5
  47. package/plugins/analytics-posthog/0.7.2/server/consent-adapter.mjs +0 -1
  48. package/plugins/charts-echarts/0.7.2/licenses/_jini-ai_ui/LICENSE-SOURCE +0 -1
  49. package/plugins/charts-echarts/0.7.2/licenses/_jini-ai_ui/package-license.json +0 -5
  50. package/plugins/charts-echarts/0.7.2/licenses/zod/LICENSE +0 -21
  51. package/plugins/charts-echarts/0.7.2/licenses/zod/package-license.json +0 -5
  52. package/plugins/charts-recharts/0.7.2/licenses/_jini-ai_ui/LICENSE-SOURCE +0 -1
  53. package/plugins/charts-recharts/0.7.2/licenses/_jini-ai_ui/package-license.json +0 -5
  54. package/plugins/charts-recharts/0.7.2/licenses/zod/LICENSE +0 -21
  55. package/plugins/charts-recharts/0.7.2/licenses/zod/package-license.json +0 -5
  56. package/plugins/fixture-provider/0.7.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
  57. package/plugins/formspree/0.7.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
  58. package/plugins/google-forms/0.7.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
  59. package/plugins/observability-opentelemetry/0.7.2/licenses/_jini-ai_diagnostics/package-license.json +0 -5
  60. package/plugins/observability-opentelemetry/0.7.2/licenses/_jini-ai_plugins/LICENSE +0 -201
  61. package/plugins/observability-opentelemetry/0.7.2/licenses/_jini-ai_plugins/LICENSE-SOURCE +0 -1
  62. package/plugins/observability-opentelemetry/0.7.2/licenses/_jini-ai_plugins/package-license.json +0 -5
  63. package/plugins/observability-opentelemetry/0.7.2/licenses/_jini-ai_provider-plugins/LICENSE +0 -201
  64. package/plugins/observability-opentelemetry/0.7.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
  65. package/plugins/observability-opentelemetry/0.7.2/licenses/js-tokens/LICENSE +0 -21
  66. package/plugins/observability-opentelemetry/0.7.2/licenses/js-tokens/package-license.json +0 -5
  67. package/plugins/observability-opentelemetry/0.7.2/licenses/semver/LICENSE +0 -15
  68. package/plugins/observability-opentelemetry/0.7.2/licenses/semver/package-license.json +0 -5
  69. package/plugins/observability-sentry/0.7.2/LICENSE +0 -201
  70. package/plugins/observability-sentry/0.7.2/licenses/_jini-ai_core/LICENSE +0 -201
  71. package/plugins/observability-sentry/0.7.2/licenses/_jini-ai_diagnostics/LICENSE +0 -201
  72. package/plugins/observability-sentry/0.7.2/licenses/_jini-ai_diagnostics/package-license.json +0 -5
  73. package/plugins/observability-sentry/0.7.2/licenses/_jini-ai_provider-plugins/LICENSE +0 -201
  74. package/plugins/observability-sentry/0.7.2/licenses/_jini-ai_provider-plugins/NOTICE +0 -28
  75. package/plugins/observability-sentry/0.7.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
  76. package/plugins/observability-sentry/0.7.2/licenses/js-tokens/LICENSE +0 -21
  77. package/plugins/observability-sentry/0.7.2/licenses/js-tokens/package-license.json +0 -5
  78. package/plugins/payments-stripe/0.7.2/LICENSE +0 -201
  79. package/plugins/payments-stripe/0.7.2/NOTICE +0 -28
  80. package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_commerce/LICENSE +0 -201
  81. package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_commerce/NOTICE +0 -28
  82. package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_commerce/package-license.json +0 -5
  83. package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_core/LICENSE +0 -201
  84. package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_core/package-license.json +0 -5
  85. package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_provider-plugins/LICENSE +0 -201
  86. package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_provider-plugins/NOTICE +0 -28
  87. package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
  88. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/CHANGELOG.md +0 -0
  89. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/LICENSE +0 -0
  90. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/NOTICE +0 -0
  91. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/README.md +0 -0
  92. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
  93. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
  94. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse/LICENSE +0 -0
  95. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse/LICENSE-SOURCE +0 -0
  96. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse/SOURCE +0 -0
  97. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse/package-license.json +0 -0
  98. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse-core/LICENSE +0 -0
  99. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse-core/LICENSE-SOURCE +0 -0
  100. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse-core/SOURCE +0 -0
  101. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse-core/package-license.json +0 -0
  102. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/mustache/LICENSE +0 -0
  103. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/mustache/package-license.json +0 -0
  104. /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/server/index.mjs +0 -0
  105. /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/CHANGELOG.md +0 -0
  106. /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/LICENSE +0 -0
  107. /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/NOTICE +0 -0
  108. /package/plugins/analytics-posthog/{0.7.2/licenses/_jini-ai_cookie-consent → 0.7.3-next.1/licenses/_jini-ai_provider-plugins}/LICENSE +0 -0
  109. /package/plugins/analytics-posthog/{0.7.2/licenses/_jini-ai_cookie-consent → 0.7.3-next.1/licenses/_jini-ai_provider-plugins}/NOTICE +0 -0
  110. /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/_posthog_core/LICENSE +0 -0
  111. /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/_posthog_core/package-license.json +0 -0
  112. /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/posthog-js/LICENSE +0 -0
  113. /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/posthog-js/package-license.json +0 -0
  114. /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/posthog-node/LICENSE +0 -0
  115. /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/posthog-node/package-license.json +0 -0
  116. /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/server/posthog-browser.js +0 -0
  117. /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/client/styles.css +0 -0
  118. /package/plugins/{analytics-posthog/0.7.2/licenses/_jini-ai_core → charts-echarts/0.7.3-next.1/licenses/_jini-ai_provider-plugins}/LICENSE +0 -0
  119. /package/plugins/{analytics-posthog/0.7.2 → charts-echarts/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
  120. /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/echarts/LICENSE +0 -0
  121. /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/echarts/NOTICE +0 -0
  122. /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/echarts/package-license.json +0 -0
  123. /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/tslib/LICENSE.txt +0 -0
  124. /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/tslib/package-license.json +0 -0
  125. /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/zrender/LICENSE +0 -0
  126. /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/zrender/package-license.json +0 -0
  127. /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/server/index.mjs +0 -0
  128. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/client/styles.css +0 -0
  129. /package/plugins/{analytics-posthog/0.7.2/licenses/_jini-ai_diagnostics → charts-recharts/0.7.3-next.1/licenses/_jini-ai_provider-plugins}/LICENSE +0 -0
  130. /package/plugins/{charts-echarts/0.7.2 → charts-recharts/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
  131. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/_reduxjs_toolkit/LICENSE +0 -0
  132. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/_reduxjs_toolkit/package-license.json +0 -0
  133. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/clsx/license +0 -0
  134. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/clsx/package-license.json +0 -0
  135. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-array/LICENSE +0 -0
  136. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-array/package-license.json +0 -0
  137. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-color/LICENSE +0 -0
  138. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-color/package-license.json +0 -0
  139. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-format/LICENSE +0 -0
  140. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-format/package-license.json +0 -0
  141. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-interpolate/LICENSE +0 -0
  142. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-interpolate/package-license.json +0 -0
  143. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-path/LICENSE +0 -0
  144. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-path/package-license.json +0 -0
  145. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-scale/LICENSE +0 -0
  146. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-scale/package-license.json +0 -0
  147. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-shape/LICENSE +0 -0
  148. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-shape/package-license.json +0 -0
  149. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-time/LICENSE +0 -0
  150. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-time/package-license.json +0 -0
  151. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-time-format/LICENSE +0 -0
  152. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-time-format/package-license.json +0 -0
  153. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/decimal.js-light/LICENCE.md +0 -0
  154. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/decimal.js-light/package-license.json +0 -0
  155. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/es-toolkit/LICENSE +0 -0
  156. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/es-toolkit/package-license.json +0 -0
  157. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/eventemitter3/LICENSE +0 -0
  158. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/eventemitter3/package-license.json +0 -0
  159. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/immer/LICENSE +0 -0
  160. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/immer/package-license.json +0 -0
  161. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/internmap/LICENSE +0 -0
  162. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/internmap/package-license.json +0 -0
  163. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react/LICENSE +0 -0
  164. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react/package-license.json +0 -0
  165. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react-dom/LICENSE +0 -0
  166. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react-dom/package-license.json +0 -0
  167. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react-is/LICENSE +0 -0
  168. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react-is/package-license.json +0 -0
  169. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react-redux/LICENSE.md +0 -0
  170. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react-redux/package-license.json +0 -0
  171. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/recharts/LICENSE +0 -0
  172. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/recharts/package-license.json +0 -0
  173. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/redux/LICENSE.md +0 -0
  174. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/redux/package-license.json +0 -0
  175. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/redux-thunk/LICENSE.md +0 -0
  176. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/redux-thunk/package-license.json +0 -0
  177. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/reselect/LICENSE +0 -0
  178. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/reselect/package-license.json +0 -0
  179. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/scheduler/LICENSE +0 -0
  180. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/scheduler/package-license.json +0 -0
  181. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/tiny-invariant/LICENSE +0 -0
  182. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/tiny-invariant/package-license.json +0 -0
  183. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/use-sync-external-store/LICENSE +0 -0
  184. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/use-sync-external-store/package-license.json +0 -0
  185. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/victory-vendor/LICENSE.txt +0 -0
  186. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/victory-vendor/package-license.json +0 -0
  187. /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/server/index.mjs +0 -0
  188. /package/plugins/{analytics-posthog/0.7.2 → fixture-provider/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
  189. /package/plugins/{charts-echarts/0.7.2/licenses/_jini-ai_ui → fixture-provider/0.7.3-next.1/licenses/_jini-ai_provider-plugins}/NOTICE +0 -0
  190. /package/plugins/fixture-provider/{0.7.2 → 0.7.3-next.1}/server/index.mjs +0 -0
  191. /package/plugins/{charts-echarts/0.7.2 → formspree/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
  192. /package/plugins/{charts-recharts/0.7.2 → formspree/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
  193. /package/plugins/formspree/{0.7.2 → 0.7.3-next.1}/server/index.mjs +0 -0
  194. /package/plugins/{charts-echarts/0.7.2/licenses/_jini-ai_ui → google-forms/0.7.3-next.1/licenses/_jini-ai_provider-plugins}/LICENSE +0 -0
  195. /package/plugins/{charts-recharts/0.7.2/licenses/_jini-ai_ui → google-forms/0.7.3-next.1/licenses/_jini-ai_provider-plugins}/NOTICE +0 -0
  196. /package/plugins/google-forms/{0.7.2 → 0.7.3-next.1}/server/index.mjs +0 -0
  197. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/CHANGELOG.md +0 -0
  198. /package/plugins/{charts-recharts/0.7.2/licenses/_jini-ai_provider-plugins → observability-opentelemetry/0.7.3-next.1}/LICENSE +0 -0
  199. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/NOTICE +0 -0
  200. /package/plugins/{charts-recharts/0.7.2/licenses/_jini-ai_ui → observability-opentelemetry/0.7.3-next.1/licenses/_jini-ai_core}/LICENSE +0 -0
  201. /package/plugins/{fixture-provider/0.7.2 → observability-opentelemetry/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
  202. /package/plugins/{fixture-provider/0.7.2 → observability-opentelemetry/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
  203. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_api/LICENSE +0 -0
  204. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_api/package-license.json +0 -0
  205. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_api-logs/LICENSE +0 -0
  206. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_api-logs/package-license.json +0 -0
  207. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_context-async-hooks/LICENSE +0 -0
  208. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_context-async-hooks/package-license.json +0 -0
  209. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_core/LICENSE +0 -0
  210. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_core/package-license.json +0 -0
  211. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_otlp-exporter-base/LICENSE +0 -0
  212. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_otlp-exporter-base/package-license.json +0 -0
  213. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_otlp-transformer/LICENSE +0 -0
  214. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_otlp-transformer/package-license.json +0 -0
  215. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_resources/LICENSE +0 -0
  216. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_resources/package-license.json +0 -0
  217. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-metrics/LICENSE +0 -0
  218. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-metrics/package-license.json +0 -0
  219. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-trace/LICENSE +0 -0
  220. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-trace/package-license.json +0 -0
  221. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-trace-base/LICENSE +0 -0
  222. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-trace-base/package-license.json +0 -0
  223. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-trace-node/LICENSE +0 -0
  224. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-trace-node/package-license.json +0 -0
  225. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_semantic-conventions/LICENSE +0 -0
  226. /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_semantic-conventions/package-license.json +0 -0
  227. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/CHANGELOG.md +0 -0
  228. /package/plugins/{formspree/0.7.2/licenses/_jini-ai_provider-plugins → observability-sentry/0.7.3-next.1}/LICENSE +0 -0
  229. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/NOTICE +0 -0
  230. /package/plugins/{google-forms/0.7.2/licenses/_jini-ai_provider-plugins → observability-sentry/0.7.3-next.1/licenses/_jini-ai_core}/LICENSE +0 -0
  231. /package/plugins/{observability-opentelemetry/0.7.2 → observability-sentry/0.7.3-next.1/licenses/_jini-ai_provider-plugins}/LICENSE +0 -0
  232. /package/plugins/{formspree/0.7.2 → observability-sentry/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
  233. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_api/LICENSE +0 -0
  234. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_api/package-license.json +0 -0
  235. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_conventions/LICENSE +0 -0
  236. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_conventions/package-license.json +0 -0
  237. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_core/LICENSE +0 -0
  238. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_core/package-license.json +0 -0
  239. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_node/LICENSE +0 -0
  240. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_node/package-license.json +0 -0
  241. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_opentelemetry/LICENSE +0 -0
  242. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_opentelemetry/package-license.json +0 -0
  243. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_server-runtime-injection/LICENSE +0 -0
  244. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_server-runtime-injection/LICENSE-SOURCE +0 -0
  245. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_server-runtime-injection/package-license.json +0 -0
  246. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_server-utils/LICENSE +0 -0
  247. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_server-utils/LICENSE-SOURCE +0 -0
  248. /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_server-utils/package-license.json +0 -0
  249. /package/plugins/payments-stripe/{0.7.2 → 0.7.3-next.1}/CHANGELOG.md +0 -0
  250. /package/plugins/{observability-opentelemetry/0.7.2/licenses/_jini-ai_core → payments-stripe/0.7.3-next.1}/LICENSE +0 -0
  251. /package/plugins/{google-forms/0.7.2/licenses/_jini-ai_provider-plugins → payments-stripe/0.7.3-next.1}/NOTICE +0 -0
  252. /package/plugins/payments-stripe/{0.7.2 → 0.7.3-next.1}/README.md +0 -0
  253. /package/plugins/{observability-opentelemetry/0.7.2/licenses/_jini-ai_diagnostics → payments-stripe/0.7.3-next.1/licenses/_jini-ai_provider-plugins}/LICENSE +0 -0
  254. /package/plugins/{observability-opentelemetry/0.7.2 → payments-stripe/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
@@ -0,0 +1 @@
1
+ function u({attributes:e},r={}){let t={};for(let o of["site_id","release","environment"]){let n=e[o];n&&(t[o]=n)}return t}function g({apiKey:e,siteId:r,release:t,environment:o},n={}){return JSON.stringify({api_key:e,event:"$pageview",properties:{distinct_id:"visitor:ephemeral",$process_person_profile:!1,$geoip_disable:!0,surface:"site",...u({attributes:{site_id:r,release:t,environment:o}})}})}async function _({config:e,signal:r,ports:t},o={}){return await(t.request??fetch)(e.host+"/e/",{method:"POST",credentials:"omit",referrerPolicy:"no-referrer",headers:{"content-type":"application/json"},body:g(e),signal:r}).catch(()=>{}),{revoke:()=>!0}}var p={cookies:["ph_","__ph"],local:["ph_","__ph"]},f="jini_consent",m=["$event_type","$el_tag_name","$browser","$browser_version","$os","$device_type","$lib","$lib_version","$viewport_width","$viewport_height","distinct_id","$device_id","$session_id","$window_id","$is_identified"];function y({path:e},r={}){return(e||"/").split("/").map(t=>{let o;try{o=decodeURIComponent(t)}catch{return":redacted"}return/@|[a-f0-9]{32,}|[\w-]{40,}/i.test(o)?":redacted":t}).join("/")}function P(e){return e.split(";").slice(0,32).map(r=>{let t=/^[a-z][a-z0-9-]*/i.exec(r);return t?t[0]+(r.match(/:nth-(?:child|of-type)\(\d+\)/g)??[]).join(""):""}).filter(Boolean).join(";")}function h(e){return e.slice(0,32).filter(r=>!!r&&/^[a-z][a-z0-9-]*$/i.test(String(r.tag_name??""))).map(r=>{let t={tag_name:r.tag_name};for(let o of["nth_child","nth_of_type"])Number.isInteger(r[o])&&r[o]>0&&(t[o]=r[o]);return t})}function v({event:e,location:r,siteId:t,release:o,environment:n},a={}){let i=e.properties??{},s={};for(let d of m)i[d]!==void 0&&(s[d]=i[d]);return s.$process_person_profile=!0,s.$pathname=y({path:r.pathname}),s.$current_url=r.origin+String(s.$pathname),s.$host=r.hostname,typeof i.$elements_chain=="string"&&(s.$elements_chain=P(i.$elements_chain)),Array.isArray(i.$elements)&&(s.$elements=h(i.$elements)),e.event==="$identify"&&(s.$set={}),Object.assign(s,u({attributes:{site_id:t,release:o,environment:n}}),{surface:"site"}),e.properties=s,e}function S(e,r,t){return{api_host:e.host,persistence:"localStorage+cookie",disable_persistence:!1,persistence_name:`jini_site_${e.siteId||"site"}`,person_profiles:"identified_only",disable_compression:!0,request_batching:!1,mask_all_element_attributes:!0,mask_all_text:!0,autocapture:{capture_copied_text:!1},capture_pageview:"history_change",capture_pageleave:!1,disable_session_recording:!e.sessionReplay,session_recording:{maskAllInputs:!0,maskTextSelector:"*"},disable_surveys:!0,advanced_disable_feature_flags:!0,advanced_disable_flags:!0,disable_web_experiments:!0,capture_performance:!1,capture_heatmaps:!1,capture_dead_clicks:!1,disable_external_dependency_loading:!0,enable_recording_console_log:!1,capture_exceptions:!1,ip:!1,before_send:o=>t.aborted?null:v({event:o,location:r.location,siteId:e.siteId,release:e.release,environment:e.environment}),loaded:o=>{let n=o.get_distinct_id();t.aborted||o.identify(n.startsWith("visitor:")?n:`visitor:${n}`)}}}function b({src:e,integrity:r,doc:t},{importModule:o=n=>import(n)}={}){let n=t.createElement("script");return n.type="module",n.integrity=r,n.src=e,new Promise((a,i)=>{n.onload=()=>a(),n.onerror=()=>i(new Error("The analytics SDK failed its integrity check or did not load.")),t.head.append(n)}).then(()=>o(n.src)).then(a=>a.default)}function k({ports:e},r={}){let t=null;function o({state:n,purge:a},i={}){if(!(n.analyticsLevel==="full"||!e.doc))try{a({doc:e.doc,storage:p})}catch{}}return{onState:o,id:"posthog",kind:"consent-adapter",category:"analytics",supportsAnonymous:!0,storage:p,async grant({config:n,state:a,signal:i,purge:s}){if(i.aborted||(o({state:a,purge:s}),a.analyticsLevel==="none"))return null;if(a.analyticsLevel==="anonymous")return _({config:n,signal:i,ports:e});let d;try{d=await e.loadSdk({src:n.sdk,integrity:n.integrity})}catch{return null}if(i.aborted)return null;let c=S(n,e,i);t?t.set_config(c):t=d.init(n.apiKey,c,f);let l=t;return{revoke(){return l.stopSessionRecording?.(),l.set_config({disable_persistence:!0,autocapture:!1,capture_pageview:!1,disable_session_recording:!0,before_send:()=>null}),!n.sessionReplay}}}}}function $(){let e=globalThis;return{loadSdk:({src:r,integrity:t})=>b({src:r,integrity:t,doc:e.document}),get location(){return e.location},get doc(){return e.document}}}var C=k({ports:$()});export{p as POSTHOG_STORAGE,g as anonymousPageview,k as createPostHogConsentAdapter,C as default,b as loadVerifiedSdk,u as postHogBrowserAttributes,y as safePath,v as sanitizeEvent};
@@ -4499,12 +4499,12 @@ var PostHogMetrics = class {
4499
4499
  }
4500
4500
  drainWindow() {
4501
4501
  if (0 === this._series.size) return null;
4502
- const window2 = this._series;
4502
+ const window = this._series;
4503
4503
  this._series = /* @__PURE__ */ new Map();
4504
4504
  this._seriesCapWarned = false;
4505
4505
  this._typeByName = /* @__PURE__ */ new Map();
4506
4506
  this._typeCollisionWarned = /* @__PURE__ */ new Set();
4507
- return this._buildPayload(window2);
4507
+ return this._buildPayload(window);
4508
4508
  }
4509
4509
  reset() {
4510
4510
  this._generation++;
@@ -4637,13 +4637,13 @@ var PostHogMetrics = class {
4637
4637
  async _doFlush() {
4638
4638
  this._flushTimer.clear();
4639
4639
  if (0 === this._series.size) return;
4640
- const window2 = this._series;
4640
+ const window = this._series;
4641
4641
  this._series = /* @__PURE__ */ new Map();
4642
4642
  this._seriesCapWarned = false;
4643
4643
  this._typeByName = /* @__PURE__ */ new Map();
4644
4644
  this._typeCollisionWarned = /* @__PURE__ */ new Set();
4645
4645
  const generation = this._generation;
4646
- const outcome = await this._instance._sendMetricsBatch(this._buildPayload(window2));
4646
+ const outcome = await this._instance._sendMetricsBatch(this._buildPayload(window));
4647
4647
  if (generation !== this._generation) return;
4648
4648
  this._retryAfter.record(outcome);
4649
4649
  if ("retry-later" === outcome.kind) {
@@ -4658,7 +4658,7 @@ var PostHogMetrics = class {
4658
4658
  case "ok":
4659
4659
  return;
4660
4660
  case "retry-later":
4661
- this._mergeWindowBack(window2);
4661
+ this._mergeWindowBack(window);
4662
4662
  this._flushTimer.armNoEarlierThan(this._nextFlushDelay());
4663
4663
  return;
4664
4664
  case "too-large":
@@ -4669,13 +4669,13 @@ var PostHogMetrics = class {
4669
4669
  return;
4670
4670
  }
4671
4671
  }
4672
- _buildPayload(window2) {
4673
- return buildOtlpMetricsPayload(this._buildMetrics(window2), buildMetricsResourceAttributes(this._config, this._instance.getLibraryId(), this._instance.getLibraryVersion()), this._instance.getLibraryId(), this._instance.getLibraryVersion());
4672
+ _buildPayload(window) {
4673
+ return buildOtlpMetricsPayload(this._buildMetrics(window), buildMetricsResourceAttributes(this._config, this._instance.getLibraryId(), this._instance.getLibraryVersion()), this._instance.getLibraryId(), this._instance.getLibraryVersion());
4674
4674
  }
4675
- _buildMetrics(window2) {
4675
+ _buildMetrics(window) {
4676
4676
  const nowNano = msToUnixNano(Date.now());
4677
4677
  const byMetric = /* @__PURE__ */ new Map();
4678
- for (const state of window2.values()) {
4678
+ for (const state of window.values()) {
4679
4679
  const metricKey = seriesKey(state.type, state.name, state.unit, void 0);
4680
4680
  let metric = byMetric.get(metricKey);
4681
4681
  if (!metric) {
@@ -4737,8 +4737,8 @@ var PostHogMetrics = class {
4737
4737
  }
4738
4738
  return Array.from(byMetric.values());
4739
4739
  }
4740
- _mergeWindowBack(window2) {
4741
- for (const [key, old] of window2) {
4740
+ _mergeWindowBack(window) {
4741
+ for (const [key, old] of window) {
4742
4742
  const current = this._series.get(key);
4743
4743
  if (!current) {
4744
4744
  if (this._admitNewSeries()) this._series.set(key, old);
@@ -8953,28 +8953,8 @@ var PostHog = class extends PostHogBackendClient {
8953
8953
  }
8954
8954
  };
8955
8955
 
8956
- // ../diagnostics/dist/observability/delivery.js
8957
- var ERROR_CLASSES = /* @__PURE__ */ new Set(["Error", "TypeError", "RangeError", "TimeoutError", "AbortError", "OTLPExporterError", "PluginProviderError"]);
8958
- function httpStatus(value) {
8959
- if (typeof value !== "number" || !Number.isInteger(value))
8960
- return void 0;
8961
- return value >= 100 && value <= 599 ? value : void 0;
8962
- }
8963
- function describeTelemetryFailure({ error }, _options = {}) {
8964
- if (typeof error !== "object" || error === null)
8965
- return { errorClass: "Error" };
8966
- try {
8967
- const value = error;
8968
- const errorClass = typeof value.name === "string" && ERROR_CLASSES.has(value.name) ? value.name : "Error";
8969
- const statusCode = httpStatus(value.statusCode ?? value.status ?? value.code);
8970
- return { errorClass, ...statusCode === void 0 ? {} : { statusCode } };
8971
- } catch {
8972
- return { errorClass: "Error" };
8973
- }
8974
- }
8975
-
8976
8956
  // src/telemetry-reporter.ts
8977
- function createProviderTelemetryReporter({ endpoint }, optional = {}) {
8957
+ function createProviderTelemetryReporter({ endpoint, describeTelemetryFailure }, optional = {}) {
8978
8958
  const host = URL.canParse(endpoint) ? new URL(endpoint).hostname : "invalid-endpoint";
8979
8959
  return {
8980
8960
  initialized({ message }, _options = {}) {
@@ -8993,8 +8973,8 @@ function createProviderTelemetryReporter({ endpoint }, optional = {}) {
8993
8973
  }
8994
8974
 
8995
8975
  // src/analytics-posthog/posthog.ts
8996
- function createPostHogProductAnalyticsAdapter({ config }, options = {}) {
8997
- const reporter = createProviderTelemetryReporter({ endpoint: config.host }, options);
8976
+ function createPostHogProductAnalyticsAdapter({ config, describeTelemetryFailure }, options = {}) {
8977
+ const reporter = createProviderTelemetryReporter({ endpoint: config.host, describeTelemetryFailure }, options);
8998
8978
  const client = new PostHog(config.apiKey, {
8999
8979
  host: config.host,
9000
8980
  flushAt: options.flushAt ?? 20,
@@ -9003,18 +8983,7 @@ function createPostHogProductAnalyticsAdapter({ config }, options = {}) {
9003
8983
  enableExceptionAutocapture: false,
9004
8984
  ...options.fetch ? { fetch: options.fetch } : {}
9005
8985
  });
9006
- const send = client.fetch.bind(client);
9007
- client.fetch = async (url, init) => {
9008
- if (options.signal?.aborted) return { status: 200, text: async () => "", json: async () => ({}) };
9009
- try {
9010
- const response = await send(url, init);
9011
- reporter.result({ phase: "export", outcome: response.status >= 200 && response.status < 300 ? "ok" : "failed", error: { status: response.status } });
9012
- return response;
9013
- } catch (error) {
9014
- reporter.result({ phase: "export", outcome: "failed", error });
9015
- throw error;
9016
- }
9017
- };
8986
+ instrumentPostHogFetch(client, reporter, options);
9018
8987
  client.on("error", (error) => reporter.result({ phase: "export", outcome: "failed", error: error instanceof Error ? error.cause ?? error : error }));
9019
8988
  reporter.initialized({ message: "PostHog reporting" });
9020
8989
  const attributes = config.attribution?.attributes;
@@ -9066,6 +9035,20 @@ function createPostHogProductAnalyticsAdapter({ config }, options = {}) {
9066
9035
  }
9067
9036
  } };
9068
9037
  }
9038
+ function instrumentPostHogFetch(client, reporter, options) {
9039
+ const send = client.fetch.bind(client);
9040
+ client.fetch = async (url, init) => {
9041
+ if (options.signal?.aborted) return { status: 200, text: async () => "", json: async () => ({}) };
9042
+ try {
9043
+ const response = await send(url, init);
9044
+ reporter.result({ phase: "export", outcome: response.status >= 200 && response.status < 300 ? "ok" : "failed", error: { status: response.status } });
9045
+ return response;
9046
+ } catch (error) {
9047
+ reporter.result({ phase: "export", outcome: "failed", error });
9048
+ throw error;
9049
+ }
9050
+ };
9051
+ }
9069
9052
 
9070
9053
  // src/attribution.ts
9071
9054
  var EMPTY = Object.freeze({ attributes: Object.freeze({}), groups: Object.freeze({}), tags: Object.freeze([]) });
@@ -9084,42 +9067,27 @@ function attributionOf(value) {
9084
9067
  return { attributes: stringMap(attributes, "attributes"), groups: stringMap(groups, "groups"), tags: [...tags ?? []] };
9085
9068
  }
9086
9069
 
9070
+ // src/analytics-posthog/configuration.ts
9071
+ var PostHogProviderConfigError = class extends Error {
9072
+ code = "analytics_posthog_context_missing";
9073
+ details;
9074
+ constructor(required, _optional = {}) {
9075
+ super("The PostHog analytics provider was started without the telemetry helper it needs, so it will not send anything. Restart the app; if this keeps happening, copy the details into a bug report.");
9076
+ this.name = "PostHogProviderConfigError";
9077
+ this.details = required.details;
9078
+ }
9079
+ };
9080
+ function readPostHogTelemetry({ describeTelemetryFailure }, _optional = {}) {
9081
+ if (typeof describeTelemetryFailure !== "function") throw new PostHogProviderConfigError({ details: "optional.describeTelemetryFailure is missing" });
9082
+ return describeTelemetryFailure;
9083
+ }
9084
+
9087
9085
  // src/analytics-posthog/browser.ts
9088
9086
  import { readFile as readFile2 } from "node:fs/promises";
9089
9087
 
9090
9088
  // src/analytics-posthog/consent.ts
9091
9089
  import { readFile } from "node:fs/promises";
9092
9090
 
9093
- // ../cookie-consent/dist/client/dom.js
9094
- function expireEverywhere(doc, name) {
9095
- const parts = (doc.defaultView?.location.hostname ?? "").split(".");
9096
- const expired = `${name}=; Path=/; Max-Age=0`;
9097
- doc.cookie = expired;
9098
- for (let i = 0; i < parts.length - 1; i++)
9099
- doc.cookie = `${expired}; Domain=.${parts.slice(i).join(".")}`;
9100
- }
9101
- function purge(doc, storage) {
9102
- if (!storage)
9103
- return;
9104
- for (const part of doc.cookie.split(/;\s*/)) {
9105
- const name = part.split("=")[0];
9106
- if (storage.cookies?.some((p) => name.startsWith(p)))
9107
- expireEverywhere(doc, name);
9108
- }
9109
- try {
9110
- const local = doc.defaultView.localStorage;
9111
- for (const key of Object.keys(local))
9112
- if (storage.local?.some((p) => key.startsWith(p)))
9113
- local.removeItem(key);
9114
- } catch {
9115
- }
9116
- }
9117
-
9118
- // ../cookie-consent/dist/client/runtime.js
9119
- function purgeStorage({ doc, storage }, _optional = {}) {
9120
- purge(doc, storage);
9121
- }
9122
-
9123
9091
  // src/analytics-posthog/consent-adapter.ts
9124
9092
  function postHogBrowserAttributes({ attributes }, _optional = {}) {
9125
9093
  const projected = {};
@@ -9258,10 +9226,10 @@ function loadVerifiedSdk({ src, integrity, doc }, { importModule = (url) => impo
9258
9226
  }
9259
9227
  function createPostHogConsentAdapter({ ports }, _optional = {}) {
9260
9228
  let client = null;
9261
- function onState({ state }, _optional2 = {}) {
9229
+ function onState({ state, purge }, _optional2 = {}) {
9262
9230
  if (state.analyticsLevel === "full" || !ports.doc) return;
9263
9231
  try {
9264
- purgeStorage({ doc: ports.doc, storage: POSTHOG_STORAGE });
9232
+ purge({ doc: ports.doc, storage: POSTHOG_STORAGE });
9265
9233
  } catch {
9266
9234
  }
9267
9235
  }
@@ -9272,9 +9240,9 @@ function createPostHogConsentAdapter({ ports }, _optional = {}) {
9272
9240
  category: "analytics",
9273
9241
  supportsAnonymous: true,
9274
9242
  storage: POSTHOG_STORAGE,
9275
- async grant({ config, state, signal }) {
9243
+ async grant({ config, state, signal, purge }) {
9276
9244
  if (signal.aborted) return null;
9277
- onState({ state });
9245
+ onState({ state, purge });
9278
9246
  if (state.analyticsLevel === "none") return null;
9279
9247
  if (state.analyticsLevel === "anonymous") return grantAnonymous({ config, signal, ports });
9280
9248
  let sdk;
@@ -9298,7 +9266,7 @@ function createPostHogConsentAdapter({ ports }, _optional = {}) {
9298
9266
  }
9299
9267
  };
9300
9268
  }
9301
- function browserPorts2() {
9269
+ function browserPorts() {
9302
9270
  const page = globalThis;
9303
9271
  return {
9304
9272
  loadSdk: ({ src, integrity }) => loadVerifiedSdk({ src, integrity, doc: page.document }),
@@ -9310,7 +9278,7 @@ function browserPorts2() {
9310
9278
  }
9311
9279
  };
9312
9280
  }
9313
- var consent_adapter_default = createPostHogConsentAdapter({ ports: browserPorts2() });
9281
+ var consent_adapter_default = createPostHogConsentAdapter({ ports: browserPorts() });
9314
9282
 
9315
9283
  // src/analytics-posthog/consent.ts
9316
9284
  var POSTHOG_BROWSER_VERSION = "1.260.2";
@@ -9397,7 +9365,11 @@ function postHogBrowserContribution(required, { request = fetch, loadAsset = ()
9397
9365
  if (method !== "POST") return { status: 404, body: "" };
9398
9366
  return forwardCollectorEvent({ host: required.host, path, body, contentType }, { request });
9399
9367
  } },
9400
- source: `function(options){
9368
+ source: postHogEventSanitizers(config) + postHogPersistenceRetirement() + postHogEventAdmission() + postHogClientStartup() + postHogConsentTransition()
9369
+ };
9370
+ }
9371
+ function postHogEventSanitizers(config) {
9372
+ return `function(options){
9401
9373
  var config=${config}, current='pending', client=null, loading=null, generation=0;
9402
9374
  function retire(){
9403
9375
  if(!client)return;
@@ -9430,7 +9402,10 @@ function postHogBrowserContribution(required, { request = fetch, loadAsset = ()
9430
9402
  return safe;
9431
9403
  });
9432
9404
  }
9433
- function clearPersistence(){
9405
+ `;
9406
+ }
9407
+ function postHogPersistenceRetirement() {
9408
+ return ` function clearPersistence(){
9434
9409
  // posthog-js stores a named persistence as 'ph_'+persistence_name (no suffix); the token
9435
9410
  // form is the SDK default for clients created before the named instance.
9436
9411
  var names=['ph_jini_'+config.surface+'_'+(config.attributes.site_id||'site'),'ph_'+config.apiKey+'_posthog'];
@@ -9442,7 +9417,10 @@ function postHogBrowserContribution(required, { request = fetch, loadAsset = ()
9442
9417
  document.cookie=name+'=; Max-Age=0; Path=/'+(domain?'; Domain='+domain:'');
9443
9418
  });});
9444
9419
  }
9445
- function fullProperties(event,props,safe){
9420
+ `;
9421
+ }
9422
+ function postHogEventAdmission() {
9423
+ return ` function fullProperties(event,props,safe){
9446
9424
  ['distinct_id','$device_id','$session_id','$window_id','$is_identified'].forEach(function(name){if(props[name]!==undefined)safe[name]=props[name];});
9447
9425
  safe.$pathname=safePath(location.pathname);safe.$current_url=location.origin+safe.$pathname;
9448
9426
  safe.$host=location.hostname;
@@ -9467,7 +9445,10 @@ function postHogBrowserContribution(required, { request = fetch, loadAsset = ()
9467
9445
  event.properties=safe;
9468
9446
  return event;
9469
9447
  }
9470
- function start(sdk,mode,version){
9448
+ `;
9449
+ }
9450
+ function postHogClientStartup() {
9451
+ return ` function start(sdk,mode,version){
9471
9452
  if(version!==generation||mode!==current)return;
9472
9453
  var full=mode==='full';
9473
9454
  var settings={
@@ -9496,7 +9477,10 @@ function postHogBrowserContribution(required, { request = fetch, loadAsset = ()
9496
9477
  disable_session_recording:!config.sessionReplay});
9497
9478
  client=sdk.init(config.apiKey,settings,'jini_browser_'+config.surface+'_'+version);
9498
9479
  }
9499
- return function(mode){
9480
+ `;
9481
+ }
9482
+ function postHogConsentTransition() {
9483
+ return ` return function(mode){
9500
9484
  if(mode===current)return;
9501
9485
  current=mode;generation+=1;
9502
9486
  retire();
@@ -9507,8 +9491,7 @@ function postHogBrowserContribution(required, { request = fetch, loadAsset = ()
9507
9491
  if(!loading)loading=(options&&options.loadSdk?options.loadSdk():import(config.sdk)).then(function(module){return module.default;});
9508
9492
  loading.then(function(sdk){start(sdk,mode,version);}).catch(function(){loading=null;});
9509
9493
  };
9510
- }`
9511
- };
9494
+ }`;
9512
9495
  }
9513
9496
 
9514
9497
  // src/analytics-posthog/index.ts
@@ -9519,7 +9502,7 @@ var nonEmpty = (value, name) => {
9519
9502
  function createPostHogProvider(required, optional = {}) {
9520
9503
  const config = { enabled: true, apiKey: nonEmpty(required.apiKey, "apiKey"), host: nonEmpty(required.host, "host"), attribution: attributionOf(required.attribution), includePromptsAndResponses: required.includePromptsAndResponses === "true" };
9521
9504
  validatePostHogBrowserConfig(config);
9522
- const { port, dispose } = createPostHogProductAnalyticsAdapter({ config }, optional);
9505
+ const { port, dispose } = createPostHogProductAnalyticsAdapter({ config, describeTelemetryFailure: readPostHogTelemetry({ describeTelemetryFailure: optional.describeTelemetryFailure }) }, optional);
9523
9506
  const sessionReplay = required.sessionReplay === "true";
9524
9507
  const attributes = postHogBrowserAttributes({ attributes: config.attribution.attributes });
9525
9508
  return { port: {