@zuplo/cli 7.7.10 → 7.7.11

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 (34) hide show
  1. package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts.map +1 -1
  2. package/node_modules/@posthog/core/dist/posthog-core-stateless.js +2 -1
  3. package/node_modules/@posthog/core/dist/posthog-core-stateless.mjs +2 -1
  4. package/node_modules/@posthog/core/dist/utils/index.d.ts +1 -0
  5. package/node_modules/@posthog/core/dist/utils/index.d.ts.map +1 -1
  6. package/node_modules/@posthog/core/dist/utils/index.js +35 -18
  7. package/node_modules/@posthog/core/dist/utils/index.mjs +1 -0
  8. package/node_modules/@posthog/core/dist/utils/retry-after.d.ts.map +1 -1
  9. package/node_modules/@posthog/core/dist/utils/retry-after.js +7 -3
  10. package/node_modules/@posthog/core/dist/utils/retry-after.mjs +7 -3
  11. package/node_modules/@posthog/core/package.json +2 -2
  12. package/node_modules/@posthog/core/src/posthog-core-stateless.ts +2 -1
  13. package/node_modules/@posthog/core/src/utils/index.ts +1 -0
  14. package/node_modules/@posthog/core/src/utils/retry-after.ts +11 -6
  15. package/node_modules/@posthog/types/dist/index.d.ts +1 -1
  16. package/node_modules/@posthog/types/dist/index.d.ts.map +1 -1
  17. package/node_modules/@posthog/types/dist/posthog-config.d.ts +65 -1
  18. package/node_modules/@posthog/types/dist/posthog-config.d.ts.map +1 -1
  19. package/node_modules/@posthog/types/package.json +1 -1
  20. package/node_modules/@posthog/types/src/index.ts +4 -0
  21. package/node_modules/@posthog/types/src/posthog-config.ts +69 -1
  22. package/node_modules/@zuplo/core/package.json +1 -1
  23. package/node_modules/@zuplo/graphql/package.json +1 -1
  24. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  25. package/node_modules/@zuplo/otel/package.json +1 -1
  26. package/node_modules/@zuplo/runtime/out/esm/{chunk-M3VFT3HF.js → chunk-6EJ3W3BS.js} +80 -80
  27. package/node_modules/@zuplo/runtime/out/esm/chunk-6EJ3W3BS.js.map +1 -0
  28. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  29. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  30. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
  31. package/node_modules/@zuplo/runtime/package.json +1 -1
  32. package/package.json +11 -11
  33. package/node_modules/@zuplo/runtime/out/esm/chunk-M3VFT3HF.js.map +0 -1
  34. /package/node_modules/@zuplo/runtime/out/esm/{chunk-M3VFT3HF.js.LEGAL.txt → chunk-6EJ3W3BS.js.LEGAL.txt} +0 -0
@@ -1111,8 +1111,59 @@ export interface LogsConfig extends LogCaptureOptions {
1111
1111
  captureConsoleLogs?: boolean
1112
1112
  }
1113
1113
 
1114
+ /** The request a network metric describes. */
1115
+ export interface NetworkMetricsRequest {
1116
+ /** The full request URL, including the query string. */
1117
+ url: string
1118
+ /** The HTTP method in upper case, e.g. 'GET'. */
1119
+ method: string
1120
+ }
1121
+
1122
+ /** How a network request ended. */
1123
+ export interface NetworkMetricsResponse {
1124
+ /** The HTTP status code. `undefined` when the request failed before a response arrived. */
1125
+ status: number | undefined
1126
+ /**
1127
+ * How long the request took, in milliseconds. The end boundary follows the
1128
+ * transport: a `fetch` is measured to its response headers, an
1129
+ * `XMLHttpRequest` to the end of its response body.
1130
+ */
1131
+ durationMs: number
1132
+ }
1133
+
1134
+ /**
1135
+ * Options for automatic HTTP and HTTPS `fetch` and `XMLHttpRequest` duration
1136
+ * metrics. Recording never changes the request or its settlement. Fetch returns
1137
+ * a derived promise so rejected requests remain observable to the caller.
1138
+ */
1139
+ export interface NetworkMetricsConfig {
1140
+ /**
1141
+ * The metric name. A string is used for every request. A function is
1142
+ * called once per request; return a falsy value to skip that request.
1143
+ *
1144
+ * @default 'http.client.request.duration'
1145
+ */
1146
+ name?: string | ((request: NetworkMetricsRequest) => string | null | undefined)
1147
+ /**
1148
+ * Adds attributes to each recorded request. The result is merged over the
1149
+ * default attributes (`method`, `host`, `path`, `status_class`), so it can
1150
+ * also replace them, e.g. to set `path` to a route template.
1151
+ * Keep attribute values low-cardinality.
1152
+ *
1153
+ * The default `path` replaces each all-digit or uuid-like segment with
1154
+ * `:id`. Ids that carry a prefix or suffix, such as `order-123` or
1155
+ * `38217.pdf`, are kept as they are, so return your own `path` for
1156
+ * those routes.
1157
+ *
1158
+ * `status_class` is `2xx`, `3xx`, `4xx` or `5xx`, or `missing` when no
1159
+ * response arrived.
1160
+ */
1161
+ attributes?: (request: NetworkMetricsRequest, response: NetworkMetricsResponse) => MetricAttributes | undefined
1162
+ }
1163
+
1114
1164
  /**
1115
1165
  * Options for the posthog.metrics API (count, gauge, histogram).
1166
+ * Shared by every SDK; browser-only options live in `BrowserMetricsConfig`.
1116
1167
  */
1117
1168
  export interface MetricsConfig {
1118
1169
  /**
@@ -1165,6 +1216,23 @@ export interface MetricsConfig {
1165
1216
  beforeSend?: BeforeSendMetricFn | BeforeSendMetricFn[]
1166
1217
  }
1167
1218
 
1219
+ /**
1220
+ * Metrics configuration options for the browser SDK. Adds the options that
1221
+ * only the browser SDK implements to the shared metrics options.
1222
+ */
1223
+ export interface BrowserMetricsConfig extends MetricsConfig {
1224
+ /**
1225
+ * Record the duration of every HTTP or HTTPS `fetch` and `XMLHttpRequest` as
1226
+ * a histogram. `true` uses the defaults. Requests to PostHog itself and URLs
1227
+ * with other protocols are not recorded. Each transport is measured to the
1228
+ * boundary its API exposes: a `fetch` to its response headers, an
1229
+ * `XMLHttpRequest` to the end of its response body.
1230
+ *
1231
+ * @default undefined
1232
+ */
1233
+ network?: boolean | NetworkMetricsConfig
1234
+ }
1235
+
1168
1236
  // See https://nextjs.org/docs/app/api-reference/functions/fetch#fetchurl-options
1169
1237
  type NextOptions = { revalidate: false | 0 | number; tags: string[] }
1170
1238
 
@@ -1545,7 +1613,7 @@ export interface PostHogConfig {
1545
1613
  *
1546
1614
  * @default undefined
1547
1615
  */
1548
- metrics?: MetricsConfig
1616
+ metrics?: BrowserMetricsConfig
1549
1617
 
1550
1618
  /**
1551
1619
  * Determines whether PostHog should disable all conversations functionality.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/core",
3
- "version": "7.7.10",
3
+ "version": "7.7.11",
4
4
  "repository": "https://github.com/zuplo/zuplo",
5
5
  "author": "Zuplo, Inc.",
6
6
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/graphql",
3
3
  "type": "module",
4
- "version": "7.7.10",
4
+ "version": "7.7.11",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
@@ -2,7 +2,7 @@
2
2
  "name": "@zuplo/openapi-tools",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "7.7.10",
5
+ "version": "7.7.11",
6
6
  "description": "Tooling for OpenAPI files",
7
7
  "repository": {
8
8
  "type": "git",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/otel",
3
3
  "type": "module",
4
- "version": "7.7.10",
4
+ "version": "7.7.11",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {