@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.
- package/CHANGELOG.md +2 -4
- package/README.md +1 -1
- package/catalog.json +20 -20
- package/dist/observability-opentelemetry/contract.d.ts +114 -0
- package/dist/observability-opentelemetry/contract.js +1 -0
- package/dist/observability-opentelemetry/otel-port.d.ts +31 -0
- package/dist/observability-opentelemetry/otel-port.js +187 -0
- package/package.json +26 -18
- package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +3 -3
- package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_provider-plugins/package-license.json +1 -1
- package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/README.md +1 -1
- package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +6 -16
- package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_provider-plugins/package-license.json +1 -1
- package/plugins/analytics-posthog/0.7.3-next.1/server/consent-adapter.mjs +1 -0
- package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/server/index.mjs +73 -90
- package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/client/provider.js +16 -16
- package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +4 -10
- package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_provider-plugins/package-license.json +1 -1
- package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/client/provider.js +47 -47
- package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +5 -11
- package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_provider-plugins/package-license.json +1 -1
- package/plugins/fixture-provider/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +3 -3
- package/plugins/fixture-provider/0.7.3-next.1/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/formspree/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +3 -3
- package/plugins/formspree/0.7.3-next.1/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/google-forms/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +3 -3
- package/plugins/google-forms/0.7.3-next.1/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/README.md +1 -1
- package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +6 -15
- package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_core/package-license.json +1 -1
- package/plugins/observability-opentelemetry/0.7.3-next.1/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/server/index.mjs +246 -1190
- package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/README.md +1 -1
- package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +6 -10
- package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_core/package-license.json +1 -1
- package/plugins/observability-sentry/0.7.3-next.1/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/server/index.mjs +85 -1045
- package/plugins/payments-stripe/{0.7.2 → 0.7.3-next.1}/jini.plugin.json +4 -9
- package/plugins/payments-stripe/0.7.3-next.1/licenses/_jini-ai_provider-plugins/package-license.json +5 -0
- package/plugins/payments-stripe/{0.7.2 → 0.7.3-next.1}/server/index.mjs +64 -63
- package/plugins/analytics-posthog/0.7.2/licenses/_jini-ai_cookie-consent/LICENSE-SOURCE +0 -1
- package/plugins/analytics-posthog/0.7.2/licenses/_jini-ai_cookie-consent/package-license.json +0 -5
- package/plugins/analytics-posthog/0.7.2/licenses/_jini-ai_core/package-license.json +0 -5
- package/plugins/analytics-posthog/0.7.2/licenses/_jini-ai_diagnostics/package-license.json +0 -5
- package/plugins/analytics-posthog/0.7.2/licenses/js-tokens/LICENSE +0 -21
- package/plugins/analytics-posthog/0.7.2/licenses/js-tokens/package-license.json +0 -5
- package/plugins/analytics-posthog/0.7.2/server/consent-adapter.mjs +0 -1
- package/plugins/charts-echarts/0.7.2/licenses/_jini-ai_ui/LICENSE-SOURCE +0 -1
- package/plugins/charts-echarts/0.7.2/licenses/_jini-ai_ui/package-license.json +0 -5
- package/plugins/charts-echarts/0.7.2/licenses/zod/LICENSE +0 -21
- package/plugins/charts-echarts/0.7.2/licenses/zod/package-license.json +0 -5
- package/plugins/charts-recharts/0.7.2/licenses/_jini-ai_ui/LICENSE-SOURCE +0 -1
- package/plugins/charts-recharts/0.7.2/licenses/_jini-ai_ui/package-license.json +0 -5
- package/plugins/charts-recharts/0.7.2/licenses/zod/LICENSE +0 -21
- package/plugins/charts-recharts/0.7.2/licenses/zod/package-license.json +0 -5
- package/plugins/fixture-provider/0.7.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
- package/plugins/formspree/0.7.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
- package/plugins/google-forms/0.7.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
- package/plugins/observability-opentelemetry/0.7.2/licenses/_jini-ai_diagnostics/package-license.json +0 -5
- package/plugins/observability-opentelemetry/0.7.2/licenses/_jini-ai_plugins/LICENSE +0 -201
- package/plugins/observability-opentelemetry/0.7.2/licenses/_jini-ai_plugins/LICENSE-SOURCE +0 -1
- package/plugins/observability-opentelemetry/0.7.2/licenses/_jini-ai_plugins/package-license.json +0 -5
- package/plugins/observability-opentelemetry/0.7.2/licenses/_jini-ai_provider-plugins/LICENSE +0 -201
- package/plugins/observability-opentelemetry/0.7.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
- package/plugins/observability-opentelemetry/0.7.2/licenses/js-tokens/LICENSE +0 -21
- package/plugins/observability-opentelemetry/0.7.2/licenses/js-tokens/package-license.json +0 -5
- package/plugins/observability-opentelemetry/0.7.2/licenses/semver/LICENSE +0 -15
- package/plugins/observability-opentelemetry/0.7.2/licenses/semver/package-license.json +0 -5
- package/plugins/observability-sentry/0.7.2/LICENSE +0 -201
- package/plugins/observability-sentry/0.7.2/licenses/_jini-ai_core/LICENSE +0 -201
- package/plugins/observability-sentry/0.7.2/licenses/_jini-ai_diagnostics/LICENSE +0 -201
- package/plugins/observability-sentry/0.7.2/licenses/_jini-ai_diagnostics/package-license.json +0 -5
- package/plugins/observability-sentry/0.7.2/licenses/_jini-ai_provider-plugins/LICENSE +0 -201
- package/plugins/observability-sentry/0.7.2/licenses/_jini-ai_provider-plugins/NOTICE +0 -28
- package/plugins/observability-sentry/0.7.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
- package/plugins/observability-sentry/0.7.2/licenses/js-tokens/LICENSE +0 -21
- package/plugins/observability-sentry/0.7.2/licenses/js-tokens/package-license.json +0 -5
- package/plugins/payments-stripe/0.7.2/LICENSE +0 -201
- package/plugins/payments-stripe/0.7.2/NOTICE +0 -28
- package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_commerce/LICENSE +0 -201
- package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_commerce/NOTICE +0 -28
- package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_commerce/package-license.json +0 -5
- package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_core/LICENSE +0 -201
- package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_core/package-license.json +0 -5
- package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_provider-plugins/LICENSE +0 -201
- package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_provider-plugins/NOTICE +0 -28
- package/plugins/payments-stripe/0.7.2/licenses/_jini-ai_provider-plugins/package-license.json +0 -5
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/CHANGELOG.md +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/LICENSE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/NOTICE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/README.md +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse/LICENSE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse/LICENSE-SOURCE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse/SOURCE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse/package-license.json +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse-core/LICENSE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse-core/LICENSE-SOURCE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse-core/SOURCE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/langfuse-core/package-license.json +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/mustache/LICENSE +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/licenses/mustache/package-license.json +0 -0
- /package/plugins/ai-trace-langfuse/{0.7.2 → 0.7.3-next.1}/server/index.mjs +0 -0
- /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/CHANGELOG.md +0 -0
- /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/LICENSE +0 -0
- /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/NOTICE +0 -0
- /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
- /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
- /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/_posthog_core/LICENSE +0 -0
- /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/_posthog_core/package-license.json +0 -0
- /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/posthog-js/LICENSE +0 -0
- /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/posthog-js/package-license.json +0 -0
- /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/posthog-node/LICENSE +0 -0
- /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/licenses/posthog-node/package-license.json +0 -0
- /package/plugins/analytics-posthog/{0.7.2 → 0.7.3-next.1}/server/posthog-browser.js +0 -0
- /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/client/styles.css +0 -0
- /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
- /package/plugins/{analytics-posthog/0.7.2 → charts-echarts/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/echarts/LICENSE +0 -0
- /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/echarts/NOTICE +0 -0
- /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/echarts/package-license.json +0 -0
- /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/tslib/LICENSE.txt +0 -0
- /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/tslib/package-license.json +0 -0
- /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/zrender/LICENSE +0 -0
- /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/licenses/zrender/package-license.json +0 -0
- /package/plugins/charts-echarts/{0.7.2 → 0.7.3-next.1}/server/index.mjs +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/client/styles.css +0 -0
- /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
- /package/plugins/{charts-echarts/0.7.2 → charts-recharts/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/_reduxjs_toolkit/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/_reduxjs_toolkit/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/clsx/license +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/clsx/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-array/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-array/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-color/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-color/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-format/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-format/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-interpolate/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-interpolate/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-path/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-path/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-scale/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-scale/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-shape/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-shape/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-time/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-time/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-time-format/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/d3-time-format/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/decimal.js-light/LICENCE.md +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/decimal.js-light/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/es-toolkit/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/es-toolkit/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/eventemitter3/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/eventemitter3/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/immer/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/immer/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/internmap/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/internmap/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react-dom/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react-dom/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react-is/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react-is/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react-redux/LICENSE.md +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/react-redux/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/recharts/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/recharts/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/redux/LICENSE.md +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/redux/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/redux-thunk/LICENSE.md +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/redux-thunk/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/reselect/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/reselect/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/scheduler/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/scheduler/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/tiny-invariant/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/tiny-invariant/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/use-sync-external-store/LICENSE +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/use-sync-external-store/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/victory-vendor/LICENSE.txt +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/licenses/victory-vendor/package-license.json +0 -0
- /package/plugins/charts-recharts/{0.7.2 → 0.7.3-next.1}/server/index.mjs +0 -0
- /package/plugins/{analytics-posthog/0.7.2 → fixture-provider/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /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
- /package/plugins/fixture-provider/{0.7.2 → 0.7.3-next.1}/server/index.mjs +0 -0
- /package/plugins/{charts-echarts/0.7.2 → formspree/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/{charts-recharts/0.7.2 → formspree/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/formspree/{0.7.2 → 0.7.3-next.1}/server/index.mjs +0 -0
- /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
- /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
- /package/plugins/google-forms/{0.7.2 → 0.7.3-next.1}/server/index.mjs +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/CHANGELOG.md +0 -0
- /package/plugins/{charts-recharts/0.7.2/licenses/_jini-ai_provider-plugins → observability-opentelemetry/0.7.3-next.1}/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/NOTICE +0 -0
- /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
- /package/plugins/{fixture-provider/0.7.2 → observability-opentelemetry/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/LICENSE +0 -0
- /package/plugins/{fixture-provider/0.7.2 → observability-opentelemetry/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_api/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_api/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_api-logs/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_api-logs/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_context-async-hooks/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_context-async-hooks/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_core/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_core/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_otlp-exporter-base/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_otlp-exporter-base/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_otlp-transformer/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_otlp-transformer/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_resources/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_resources/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-metrics/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-metrics/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-trace/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-trace/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-trace-base/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-trace-base/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-trace-node/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_sdk-trace-node/package-license.json +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_semantic-conventions/LICENSE +0 -0
- /package/plugins/observability-opentelemetry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_semantic-conventions/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/CHANGELOG.md +0 -0
- /package/plugins/{formspree/0.7.2/licenses/_jini-ai_provider-plugins → observability-sentry/0.7.3-next.1}/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/NOTICE +0 -0
- /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
- /package/plugins/{observability-opentelemetry/0.7.2 → observability-sentry/0.7.3-next.1/licenses/_jini-ai_provider-plugins}/LICENSE +0 -0
- /package/plugins/{formspree/0.7.2 → observability-sentry/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_api/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_opentelemetry_api/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_conventions/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_conventions/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_core/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_core/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_node/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_node/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_opentelemetry/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_opentelemetry/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_server-runtime-injection/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_server-runtime-injection/LICENSE-SOURCE +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_server-runtime-injection/package-license.json +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_server-utils/LICENSE +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_server-utils/LICENSE-SOURCE +0 -0
- /package/plugins/observability-sentry/{0.7.2 → 0.7.3-next.1}/licenses/_sentry_server-utils/package-license.json +0 -0
- /package/plugins/payments-stripe/{0.7.2 → 0.7.3-next.1}/CHANGELOG.md +0 -0
- /package/plugins/{observability-opentelemetry/0.7.2/licenses/_jini-ai_core → payments-stripe/0.7.3-next.1}/LICENSE +0 -0
- /package/plugins/{google-forms/0.7.2/licenses/_jini-ai_provider-plugins → payments-stripe/0.7.3-next.1}/NOTICE +0 -0
- /package/plugins/payments-stripe/{0.7.2 → 0.7.3-next.1}/README.md +0 -0
- /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
- /package/plugins/{observability-opentelemetry/0.7.2 → payments-stripe/0.7.3-next.1}/licenses/_jini-ai_provider-plugins/NOTICE +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "payments-stripe",
|
|
3
3
|
"name": "Stripe payments provider",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.3-next.1",
|
|
5
5
|
"sdkRange": "^0.1.0 || ^1.0.0",
|
|
6
6
|
"engine": 1,
|
|
7
7
|
"tier": "tier-3",
|
|
8
8
|
"extensions": {
|
|
9
|
-
"
|
|
9
|
+
"jini": {
|
|
10
10
|
"id": "jini/payments-stripe"
|
|
11
11
|
},
|
|
12
12
|
"open-marketing": {
|
|
@@ -59,14 +59,9 @@
|
|
|
59
59
|
"LICENSE": "sha256-9d95806a26532623360eb84bb17d298f394b55ef73fb4c0796d99b4319b2b0da",
|
|
60
60
|
"NOTICE": "sha256-41f25c5b9af4c8e8e98e2a7c658b3922253c760686e17e0ef7fa003fae83cb95",
|
|
61
61
|
"README.md": "sha256-61af4851370194e9b1a2e2c26227ccb43a3048416a683b348a6ed9ecf240ae13",
|
|
62
|
-
"licenses/_jini-ai_commerce/LICENSE": "sha256-c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4",
|
|
63
|
-
"licenses/_jini-ai_commerce/NOTICE": "sha256-613e1d6b4e14e9364c7146a8c6780fa0a6469f988c06e2f92b63c8b9a40529fa",
|
|
64
|
-
"licenses/_jini-ai_commerce/package-license.json": "sha256-8005330c5b6009893be65d11f1935bc97268c4c56a82a9f30f0783efaca855ff",
|
|
65
|
-
"licenses/_jini-ai_core/LICENSE": "sha256-9d95806a26532623360eb84bb17d298f394b55ef73fb4c0796d99b4319b2b0da",
|
|
66
|
-
"licenses/_jini-ai_core/package-license.json": "sha256-16c768c96e17f2009906c03f6883be640666aedffa39d34249af3472d60c8b23",
|
|
67
62
|
"licenses/_jini-ai_provider-plugins/LICENSE": "sha256-9d95806a26532623360eb84bb17d298f394b55ef73fb4c0796d99b4319b2b0da",
|
|
68
63
|
"licenses/_jini-ai_provider-plugins/NOTICE": "sha256-41f25c5b9af4c8e8e98e2a7c658b3922253c760686e17e0ef7fa003fae83cb95",
|
|
69
|
-
"licenses/_jini-ai_provider-plugins/package-license.json": "sha256-
|
|
70
|
-
"server/index.mjs": "sha256-
|
|
64
|
+
"licenses/_jini-ai_provider-plugins/package-license.json": "sha256-0347d68a3392cbffcbd8519003b438ec698ab263201e4c8a84dc34196368a434",
|
|
65
|
+
"server/index.mjs": "sha256-7e073314c783773c0e5b3d09e3072b485884ae568226c0052aa770f827f5257b"
|
|
71
66
|
}
|
|
72
67
|
}
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import { createRequire as __jiniCreateRequire } from "node:module"; const require = __jiniCreateRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return {
|
|
19
|
-
code,
|
|
20
|
-
message,
|
|
21
|
-
retryable: optional.retryable ?? false,
|
|
22
|
-
...optional.providerStatus === void 0 ? {} : { providerStatus: optional.providerStatus }
|
|
23
|
-
};
|
|
3
|
+
// src/payments-stripe/configuration.ts
|
|
4
|
+
var HELPERS = ["paymentError", "moneyProblem"];
|
|
5
|
+
var StripeProviderConfigError = class extends Error {
|
|
6
|
+
code = "payments_stripe_context_missing";
|
|
7
|
+
details;
|
|
8
|
+
constructor(required, _optional = {}) {
|
|
9
|
+
super("The Stripe payment provider was started without the payment helpers it needs, so it cannot take payments. Restart the app; if this keeps happening, copy the details into a bug report.");
|
|
10
|
+
this.name = "StripeProviderConfigError";
|
|
11
|
+
this.details = required.details;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
function readStripeContext({ context }, _optional = {}) {
|
|
15
|
+
const record4 = context !== null && typeof context === "object" ? context : {};
|
|
16
|
+
const missing = HELPERS.filter((name) => typeof record4[name] !== "function");
|
|
17
|
+
if (missing.length > 0) throw new StripeProviderConfigError({ details: `optional.context is missing: ${missing.join(", ")}` });
|
|
18
|
+
return { paymentError: record4.paymentError, moneyProblem: record4.moneyProblem };
|
|
24
19
|
}
|
|
25
20
|
|
|
26
21
|
// src/payments-stripe/amount.ts
|
|
@@ -45,14 +40,14 @@ var STRIPE_CURRENCIES = [
|
|
|
45
40
|
"USD"
|
|
46
41
|
];
|
|
47
42
|
var supported = new Set(STRIPE_CURRENCIES);
|
|
48
|
-
function toStripeAmount({ money }, _optional = {}) {
|
|
49
|
-
if (!supported.has(money.currency) || moneyProblem({ money }, { allowZero: true }) !== null) return null;
|
|
43
|
+
function toStripeAmount({ money, errors }, _optional = {}) {
|
|
44
|
+
if (!supported.has(money.currency) || errors.moneyProblem({ money }, { allowZero: true }) !== null) return null;
|
|
50
45
|
return { amount: money.minorUnits, currency: money.currency.toLowerCase() };
|
|
51
46
|
}
|
|
52
|
-
function fromStripeAmount({ amount, currency }, _optional = {}) {
|
|
47
|
+
function fromStripeAmount({ amount, currency, errors }, _optional = {}) {
|
|
53
48
|
if (typeof amount !== "number" || typeof currency !== "string") return null;
|
|
54
49
|
const money = { minorUnits: amount, currency: currency.toUpperCase() };
|
|
55
|
-
return toStripeAmount({ money }) === null ? null : money;
|
|
50
|
+
return toStripeAmount({ money, errors }) === null ? null : money;
|
|
56
51
|
}
|
|
57
52
|
|
|
58
53
|
// src/payments-stripe/http.ts
|
|
@@ -74,16 +69,16 @@ function rejectionCode({ status, type }, _optional = {}) {
|
|
|
74
69
|
if (type === "card_error") return "DECLINED";
|
|
75
70
|
return STATUS_CODES[status] ?? null;
|
|
76
71
|
}
|
|
77
|
-
function stripeOutcome({ status, json }, _optional = {}) {
|
|
72
|
+
function stripeOutcome({ status, json, errors }, _optional = {}) {
|
|
78
73
|
const value = record({ value: json });
|
|
79
74
|
if (status >= 200 && status < 300 && value !== null) return { kind: "ok", value };
|
|
80
75
|
const code = rejectionCode({ status, type: record({ value: value?.error })?.type });
|
|
81
|
-
return { kind: code === null ? "unknown" : "rejected", error: paymentError(
|
|
76
|
+
return { kind: code === null ? "unknown" : "rejected", error: errors.paymentError(
|
|
82
77
|
{ code: code ?? "PROVIDER_ERROR", message: "payment provider request did not confirm success" },
|
|
83
78
|
{ retryable: code === null || status === 429, providerStatus: status }
|
|
84
79
|
) };
|
|
85
80
|
}
|
|
86
|
-
async function stripeRequest({ ctx, method, path }, optional = {}) {
|
|
81
|
+
async function stripeRequest({ ctx, method, path, errors }, optional = {}) {
|
|
87
82
|
const headers = { Authorization: `Bearer ${ctx.credentials.secretKey}`, "Stripe-Version": "2024-06-20" };
|
|
88
83
|
if (optional.idempotencyKey !== void 0) headers["Idempotency-Key"] = optional.idempotencyKey;
|
|
89
84
|
const body = optional.form === void 0 ? void 0 : new URLSearchParams(optional.form.map(([key, value]) => [key, value])).toString();
|
|
@@ -103,9 +98,9 @@ async function stripeRequest({ ctx, method, path }, optional = {}) {
|
|
|
103
98
|
} catch {
|
|
104
99
|
json = null;
|
|
105
100
|
}
|
|
106
|
-
return stripeOutcome({ status: response.status, json });
|
|
101
|
+
return stripeOutcome({ status: response.status, json, errors });
|
|
107
102
|
} catch {
|
|
108
|
-
return { kind: "unknown", error: paymentError(
|
|
103
|
+
return { kind: "unknown", error: errors.paymentError(
|
|
109
104
|
{ code: "TRANSPORT_ERROR", message: "payment provider request could not be confirmed" },
|
|
110
105
|
{ retryable: true }
|
|
111
106
|
) };
|
|
@@ -113,10 +108,10 @@ async function stripeRequest({ ctx, method, path }, optional = {}) {
|
|
|
113
108
|
}
|
|
114
109
|
|
|
115
110
|
// src/payments-stripe/checkout-session.ts
|
|
116
|
-
function checkoutSessionForm({ req, ctx }, _optional = {}) {
|
|
117
|
-
if (toStripeAmount({ money: req.amount }) === null) return null;
|
|
111
|
+
function checkoutSessionForm({ req, ctx, errors }, _optional = {}) {
|
|
112
|
+
if (toStripeAmount({ money: req.amount, errors }) === null) return null;
|
|
118
113
|
const line = req.line ?? { description: `Payment ${req.correlationId}`, quantity: 1, unitAmount: req.amount };
|
|
119
|
-
const unit = toStripeAmount({ money: line.unitAmount });
|
|
114
|
+
const unit = toStripeAmount({ money: line.unitAmount, errors });
|
|
120
115
|
if (unit === null) return null;
|
|
121
116
|
const form = [
|
|
122
117
|
["mode", "payment"],
|
|
@@ -135,20 +130,23 @@ function checkoutSessionForm({ req, ctx }, _optional = {}) {
|
|
|
135
130
|
);
|
|
136
131
|
return form;
|
|
137
132
|
}
|
|
138
|
-
async function createCheckoutSession({ req, ctx }, _optional = {}) {
|
|
139
|
-
const form = checkoutSessionForm({ req, ctx });
|
|
140
|
-
if (form === null) return { kind: "rejected", error: paymentError({ code: "CURRENCY_UNSUPPORTED", message: "unsupported checkout currency or amount" }) };
|
|
141
|
-
const result = await stripeRequest({ ctx, method: "POST", path: "/v1/checkout/sessions" }, { form, idempotencyKey: req.idempotencyKey });
|
|
133
|
+
async function createCheckoutSession({ req, ctx, errors }, _optional = {}) {
|
|
134
|
+
const form = checkoutSessionForm({ req, ctx, errors });
|
|
135
|
+
if (form === null) return { kind: "rejected", error: errors.paymentError({ code: "CURRENCY_UNSUPPORTED", message: "unsupported checkout currency or amount" }) };
|
|
136
|
+
const result = await stripeRequest({ ctx, method: "POST", path: "/v1/checkout/sessions", errors }, { form, idempotencyKey: req.idempotencyKey });
|
|
142
137
|
if (result.kind !== "ok") return result;
|
|
138
|
+
return checkoutSessionOutcome({ req, result, errors });
|
|
139
|
+
}
|
|
140
|
+
function checkoutSessionOutcome({ req, result, errors }, _optional = {}) {
|
|
143
141
|
const { id, url, amount_total, currency } = result.value;
|
|
144
142
|
if (typeof id !== "string" || id.length === 0 || typeof url !== "string" || url.length === 0) return {
|
|
145
143
|
kind: "unknown",
|
|
146
|
-
error: paymentError({ code: "PROVIDER_ERROR", message: "checkout session response incomplete" }, { retryable: true })
|
|
144
|
+
error: errors.paymentError({ code: "PROVIDER_ERROR", message: "checkout session response incomplete" }, { retryable: true })
|
|
147
145
|
};
|
|
148
|
-
const amount = fromStripeAmount({ amount: amount_total, currency });
|
|
146
|
+
const amount = fromStripeAmount({ amount: amount_total, currency, errors });
|
|
149
147
|
if (amount === null || amount.minorUnits !== req.amount.minorUnits || amount.currency !== req.amount.currency) return {
|
|
150
148
|
kind: "rejected",
|
|
151
|
-
error: paymentError({ code: "INVALID_REQUEST", message: "checkout session total differs from intent" })
|
|
149
|
+
error: errors.paymentError({ code: "INVALID_REQUEST", message: "checkout session total differs from intent" })
|
|
152
150
|
};
|
|
153
151
|
return { kind: "ok", value: {
|
|
154
152
|
evidence: { providerRef: id, correlationId: req.correlationId, status: "requires_action", amount, refunds: [], disputes: [] },
|
|
@@ -164,18 +162,21 @@ function record2({ value }, _optional = {}) {
|
|
|
164
162
|
function invalidIdentity({ session, mode }, _optional = {}) {
|
|
165
163
|
return session.object !== "checkout.session" || session.mode !== "payment" || session.livemode !== (mode === "live");
|
|
166
164
|
}
|
|
165
|
+
function completedSessionStatus({ session }, _optional = {}) {
|
|
166
|
+
if (session.payment_status === "paid") return "succeeded";
|
|
167
|
+
if (session.payment_status !== "unpaid") return null;
|
|
168
|
+
const pi = record2({ value: session.payment_intent });
|
|
169
|
+
return FAILED_PI_STATUSES.has(pi.status) ? "failed" : "pending";
|
|
170
|
+
}
|
|
167
171
|
function sessionStatus({ session, eventType }, _optional = {}) {
|
|
168
172
|
if (eventType === "checkout.session.async_payment_failed") return "failed";
|
|
169
173
|
if (eventType === "checkout.session.async_payment_succeeded") return session.payment_status === "paid" ? "succeeded" : null;
|
|
170
174
|
if (session.status === "open") return "requires_action";
|
|
171
175
|
if (session.status === "expired") return "canceled";
|
|
172
176
|
if (session.status !== "complete") return null;
|
|
173
|
-
|
|
174
|
-
if (session.payment_status !== "unpaid") return null;
|
|
175
|
-
const pi = record2({ value: session.payment_intent });
|
|
176
|
-
return FAILED_PI_STATUSES.has(pi.status) ? "failed" : "pending";
|
|
177
|
+
return completedSessionStatus({ session });
|
|
177
178
|
}
|
|
178
|
-
function readSession({ object, mode }, optional = {}) {
|
|
179
|
+
function readSession({ object, mode, errors }, optional = {}) {
|
|
179
180
|
const session = record2({ value: object });
|
|
180
181
|
const correlationId = record2({ value: session.metadata }).jini_payment_id;
|
|
181
182
|
if (correlationId === void 0) return { kind: "foreign" };
|
|
@@ -185,7 +186,7 @@ function readSession({ object, mode }, optional = {}) {
|
|
|
185
186
|
reason: "invalid checkout session identity or mode"
|
|
186
187
|
};
|
|
187
188
|
const status = sessionStatus({ session, eventType: optional.eventType });
|
|
188
|
-
const amount = fromStripeAmount({ amount: session.amount_total, currency: session.currency });
|
|
189
|
+
const amount = fromStripeAmount({ amount: session.amount_total, currency: session.currency, errors });
|
|
189
190
|
if (status === null || amount === null) return { kind: "id_only", sessionId: session.id };
|
|
190
191
|
return { kind: "evidence", evidence: { providerRef: session.id, correlationId, status, amount, refunds: [], disputes: [] } };
|
|
191
192
|
}
|
|
@@ -225,7 +226,7 @@ function readEnvelope({ event }, _optional = {}) {
|
|
|
225
226
|
if (object === null) return null;
|
|
226
227
|
return { id, type, created, livemode: envelope.livemode, object };
|
|
227
228
|
}
|
|
228
|
-
function translateStripeEvent({ event, mode }, _optional = {}) {
|
|
229
|
+
function translateStripeEvent({ event, mode, errors }, _optional = {}) {
|
|
229
230
|
const supportedEvents = /* @__PURE__ */ new Set([
|
|
230
231
|
"checkout.session.completed",
|
|
231
232
|
"checkout.session.expired",
|
|
@@ -236,7 +237,7 @@ function translateStripeEvent({ event, mode }, _optional = {}) {
|
|
|
236
237
|
if (envelope === null || !Number.isFinite(envelope.created * 1e3)) return { kind: "malformed", reason: "invalid event envelope" };
|
|
237
238
|
if (envelope.livemode !== (mode === "live")) return { kind: "malformed", reason: "event mode differs from account" };
|
|
238
239
|
if (!supportedEvents.has(envelope.type)) return { kind: "ignored" };
|
|
239
|
-
const reading = readSession({ object: envelope.object, mode }, { eventType: envelope.type });
|
|
240
|
+
const reading = readSession({ object: envelope.object, mode, errors }, { eventType: envelope.type });
|
|
240
241
|
if (reading.kind === "foreign") return { kind: "ignored" };
|
|
241
242
|
if (reading.kind === "malformed") return reading;
|
|
242
243
|
const providerRef = reading.kind === "id_only" ? reading.sessionId : reading.evidence.providerRef;
|
|
@@ -256,32 +257,32 @@ var STRIPE_CAPABILITIES = {
|
|
|
256
257
|
confirmation: ["redirect"],
|
|
257
258
|
currencies: STRIPE_CURRENCIES
|
|
258
259
|
};
|
|
259
|
-
var
|
|
260
|
-
const result = await stripeRequest({ ctx, method: "GET", path: `/v1/checkout/sessions/${encodeURIComponent(providerRef)}?expand%5B%5D=payment_intent
|
|
260
|
+
var createRetrieve = ({ errors }) => async ({ providerRef, ctx }, _optional = {}) => {
|
|
261
|
+
const result = await stripeRequest({ ctx, method: "GET", path: `/v1/checkout/sessions/${encodeURIComponent(providerRef)}?expand%5B%5D=payment_intent`, errors });
|
|
261
262
|
if (result.kind !== "ok") return result;
|
|
262
|
-
const reading = readSession({ object: result.value, mode: ctx.account.mode });
|
|
263
|
+
const reading = readSession({ object: result.value, mode: ctx.account.mode, errors });
|
|
263
264
|
if (reading.kind !== "evidence" || reading.evidence.providerRef !== providerRef) return {
|
|
264
265
|
kind: "unknown",
|
|
265
|
-
error: paymentError({ code: "PROVIDER_ERROR", message: "checkout session evidence could not be confirmed" }, { retryable: true })
|
|
266
|
+
error: errors.paymentError({ code: "PROVIDER_ERROR", message: "checkout session evidence could not be confirmed" }, { retryable: true })
|
|
266
267
|
};
|
|
267
268
|
return { kind: "ok", value: reading.evidence };
|
|
268
269
|
};
|
|
269
|
-
var
|
|
270
|
+
var createVerifyWebhook = ({ errors }) => async ({ rawBody, headers, ctx }, _optional = {}) => {
|
|
270
271
|
if (!verifyStripeSignature({ rawBody, header: headers["stripe-signature"], secret: ctx.credentials.webhookSecret ?? "", nowMs: ctx.now() })) return {
|
|
271
272
|
kind: "rejected",
|
|
272
|
-
error: paymentError({ code: "SIGNATURE_INVALID", message: "invalid webhook signature" })
|
|
273
|
+
error: errors.paymentError({ code: "SIGNATURE_INVALID", message: "invalid webhook signature" })
|
|
273
274
|
};
|
|
274
275
|
let event;
|
|
275
276
|
try {
|
|
276
277
|
event = JSON.parse(Buffer.from(rawBody).toString("utf8"));
|
|
277
278
|
} catch {
|
|
278
|
-
return { kind: "rejected", error: paymentError({ code: "INVALID_REQUEST", message: "invalid webhook JSON" }) };
|
|
279
|
+
return { kind: "rejected", error: errors.paymentError({ code: "INVALID_REQUEST", message: "invalid webhook JSON" }) };
|
|
279
280
|
}
|
|
280
|
-
const translated = translateStripeEvent({ event, mode: ctx.account.mode });
|
|
281
|
-
if (translated.kind === "malformed") return { kind: "rejected", error: paymentError({ code: "INVALID_REQUEST", message: translated.reason }) };
|
|
281
|
+
const translated = translateStripeEvent({ event, mode: ctx.account.mode, errors });
|
|
282
|
+
if (translated.kind === "malformed") return { kind: "rejected", error: errors.paymentError({ code: "INVALID_REQUEST", message: translated.reason }) };
|
|
282
283
|
return { kind: "ok", value: translated.kind === "ignored" ? [] : translated.facts };
|
|
283
284
|
};
|
|
284
|
-
function createStripePaymentProvider(
|
|
285
|
+
function createStripePaymentProvider({ errors }, _optional = {}) {
|
|
285
286
|
return {
|
|
286
287
|
id: "stripe",
|
|
287
288
|
displayName: "Stripe",
|
|
@@ -289,15 +290,15 @@ function createStripePaymentProvider(_required, _optional = {}) {
|
|
|
289
290
|
capabilities: STRIPE_CAPABILITIES,
|
|
290
291
|
// Stripe retains keys for at least 24 hours; stop an hour before pruning can create a new charge.
|
|
291
292
|
intentReplayWindowMs: 23 * 60 * 60 * 1e3,
|
|
292
|
-
createIntent: (required, _optional2 = {}) => createCheckoutSession(required),
|
|
293
|
-
retrieve,
|
|
294
|
-
verifyWebhook
|
|
293
|
+
createIntent: (required, _optional2 = {}) => createCheckoutSession({ ...required, errors }),
|
|
294
|
+
retrieve: createRetrieve({ errors }),
|
|
295
|
+
verifyWebhook: createVerifyWebhook({ errors })
|
|
295
296
|
};
|
|
296
297
|
}
|
|
297
298
|
|
|
298
299
|
// src/payments-stripe/index.ts
|
|
299
|
-
function createStripeProvider(_required,
|
|
300
|
-
return { port: createStripePaymentProvider({}), dispose: (_required2,
|
|
300
|
+
function createStripeProvider(_required, optional = {}) {
|
|
301
|
+
return { port: createStripePaymentProvider({ errors: readStripeContext({ context: optional.context }) }), dispose: (_required2, _optional = {}) => {
|
|
301
302
|
} };
|
|
302
303
|
}
|
|
303
304
|
var index_default = {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
License text copied from @jini-ai/core@0.7.2 (same repository and declared license).
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Simon Lydell
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function g(e,o){let t=(e.defaultView?.location.hostname??"").split("."),r=`${o}=; Path=/; Max-Age=0`;e.cookie=r;for(let n=0;n<t.length-1;n++)e.cookie=`${r}; Domain=.${t.slice(n).join(".")}`}function u(e,o){if(o){for(let t of e.cookie.split(/;\s*/)){let r=t.split("=")[0];o.cookies?.some(n=>r.startsWith(n))&&g(e,r)}try{let t=e.defaultView.localStorage;for(let r of Object.keys(t))o.local?.some(n=>r.startsWith(n))&&t.removeItem(r)}catch{}}}function l({doc:e,storage:o},t={}){u(e,o)}function f({attributes:e},o={}){let t={};for(let r of["site_id","release","environment"]){let n=e[r];n&&(t[r]=n)}return t}function h({apiKey:e,siteId:o,release:t,environment:r},n={}){return JSON.stringify({api_key:e,event:"$pageview",properties:{distinct_id:"visitor:ephemeral",$process_person_profile:!1,$geoip_disable:!0,surface:"site",...f({attributes:{site_id:o,release:t,environment:r}})}})}async function y({config:e,signal:o,ports:t},r={}){return await(t.request??fetch)(e.host+"/e/",{method:"POST",credentials:"omit",referrerPolicy:"no-referrer",headers:{"content-type":"application/json"},body:h(e),signal:o}).catch(()=>{}),{revoke:()=>!0}}var p={cookies:["ph_","__ph"],local:["ph_","__ph"]},_="jini_consent",v=["$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 b({path:e},o={}){return(e||"/").split("/").map(t=>{let r;try{r=decodeURIComponent(t)}catch{return":redacted"}return/@|[a-f0-9]{32,}|[\w-]{40,}/i.test(r)?":redacted":t}).join("/")}function P(e){return e.split(";").slice(0,32).map(o=>{let t=/^[a-z][a-z0-9-]*/i.exec(o);return t?t[0]+(o.match(/:nth-(?:child|of-type)\(\d+\)/g)??[]).join(""):""}).filter(Boolean).join(";")}function S(e){return e.slice(0,32).filter(o=>!!o&&/^[a-z][a-z0-9-]*$/i.test(String(o.tag_name??""))).map(o=>{let t={tag_name:o.tag_name};for(let r of["nth_child","nth_of_type"])Number.isInteger(o[r])&&o[r]>0&&(t[r]=o[r]);return t})}function C({event:e,location:o,siteId:t,release:r,environment:n},a={}){let s=e.properties??{},i={};for(let c of v)s[c]!==void 0&&(i[c]=s[c]);return i.$process_person_profile=!0,i.$pathname=b({path:o.pathname}),i.$current_url=o.origin+String(i.$pathname),i.$host=o.hostname,typeof s.$elements_chain=="string"&&(i.$elements_chain=P(s.$elements_chain)),Array.isArray(s.$elements)&&(i.$elements=S(s.$elements)),e.event==="$identify"&&(i.$set={}),Object.assign(i,f({attributes:{site_id:t,release:r,environment:n}}),{surface:"site"}),e.properties=i,e}function k(e,o,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:r=>t.aborted?null:C({event:r,location:o.location,siteId:e.siteId,release:e.release,environment:e.environment}),loaded:r=>{let n=r.get_distinct_id();t.aborted||r.identify(n.startsWith("visitor:")?n:`visitor:${n}`)}}}function E({src:e,integrity:o,doc:t},{importModule:r=n=>import(n)}={}){let n=t.createElement("script");return n.type="module",n.integrity=o,n.src=e,new Promise((a,s)=>{n.onload=()=>a(),n.onerror=()=>s(new Error("The analytics SDK failed its integrity check or did not load.")),t.head.append(n)}).then(()=>r(n.src)).then(a=>a.default)}function x({ports:e},o={}){let t=null;function r({state:n},a={}){if(!(n.analyticsLevel==="full"||!e.doc))try{l({doc:e.doc,storage:p})}catch{}}return{onState:r,id:"posthog",kind:"consent-adapter",category:"analytics",supportsAnonymous:!0,storage:p,async grant({config:n,state:a,signal:s}){if(s.aborted||(r({state:a}),a.analyticsLevel==="none"))return null;if(a.analyticsLevel==="anonymous")return y({config:n,signal:s,ports:e});let i;try{i=await e.loadSdk({src:n.sdk,integrity:n.integrity})}catch{return null}if(s.aborted)return null;let c=k(n,e,s);t?t.set_config(c):t=i.init(n.apiKey,c,_);let d=t;return{revoke(){return d.stopSessionRecording?.(),d.set_config({disable_persistence:!0,autocapture:!1,capture_pageview:!1,disable_session_recording:!0,before_send:()=>null}),!n.sessionReplay}}}}}function w(){let e=globalThis;return{loadSdk:({src:o,integrity:t})=>E({src:o,integrity:t,doc:e.document}),get location(){return e.location},get doc(){return e.document}}}var q=x({ports:w()});export{p as POSTHOG_STORAGE,h as anonymousPageview,x as createPostHogConsentAdapter,q as default,E as loadVerifiedSdk,f as postHogBrowserAttributes,b as safePath,C as sanitizeEvent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
License text copied from @jini-ai/provider-plugins@0.7.2 (same repository and declared license).
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Colin McDonnell
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
License text copied from @jini-ai/provider-plugins@0.7.2 (same repository and declared license).
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Colin McDonnell
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|