@scalemule/nextjs 0.1.28 → 0.1.30

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.
@@ -73,11 +73,13 @@ function extractClientContext(request) {
73
73
  const userAgent = headers.get("user-agent") || void 0;
74
74
  const deviceFingerprint = headers.get("x-device-fingerprint") || void 0;
75
75
  const referrer = headers.get("referer") || void 0;
76
+ const anonymousId = headers.get("x-anonymous-id") || void 0;
76
77
  return {
77
78
  ip,
78
79
  userAgent,
79
80
  deviceFingerprint,
80
- referrer
81
+ referrer,
82
+ anonymousId
81
83
  };
82
84
  }
83
85
  function buildClientContextHeaders(context) {
@@ -98,6 +100,9 @@ function buildClientContextHeaders(context) {
98
100
  if (context.referrer) {
99
101
  headers["X-Client-Referrer"] = context.referrer;
100
102
  }
103
+ if (context.anonymousId) {
104
+ headers["x-anonymous-id"] = context.anonymousId;
105
+ }
101
106
  return headers;
102
107
  }
103
108
 
@@ -71,11 +71,13 @@ function extractClientContext(request) {
71
71
  const userAgent = headers.get("user-agent") || void 0;
72
72
  const deviceFingerprint = headers.get("x-device-fingerprint") || void 0;
73
73
  const referrer = headers.get("referer") || void 0;
74
+ const anonymousId = headers.get("x-anonymous-id") || void 0;
74
75
  return {
75
76
  ip,
76
77
  userAgent,
77
78
  deviceFingerprint,
78
- referrer
79
+ referrer,
80
+ anonymousId
79
81
  };
80
82
  }
81
83
  function buildClientContextHeaders(context) {
@@ -96,6 +98,9 @@ function buildClientContextHeaders(context) {
96
98
  if (context.referrer) {
97
99
  headers["X-Client-Referrer"] = context.referrer;
98
100
  }
101
+ if (context.anonymousId) {
102
+ headers["x-anonymous-id"] = context.anonymousId;
103
+ }
99
104
  return headers;
100
105
  }
101
106
 
@@ -1,6 +1,6 @@
1
- import { S as ServerConfig } from '../webhook-handler-C_bKDevj.mjs';
2
- export { a as ScaleMuleServer, V as VideoFailedEvent, b as VideoReadyEvent, c as VideoTranscodedEvent, d as VideoUploadedEvent, W as WebhookEvent, e as WebhookRoutesConfig, f as createServerClient, g as createWebhookHandler, h as createWebhookRoutes, p as parseWebhookEvent, r as registerVideoWebhook, i as resolveGatewayUrl, v as verifyWebhookSignature } from '../webhook-handler-C_bKDevj.mjs';
3
- import { p as ClientContext, A as ApiError } from '../index-zQloSkpW.mjs';
1
+ import { S as ServerConfig } from '../webhook-handler-DN4WBjbm.mjs';
2
+ export { a as ScaleMuleServer, V as VideoFailedEvent, b as VideoReadyEvent, c as VideoTranscodedEvent, d as VideoUploadedEvent, W as WebhookEvent, e as WebhookRoutesConfig, f as createServerClient, g as createWebhookHandler, h as createWebhookRoutes, p as parseWebhookEvent, r as registerVideoWebhook, i as resolveGatewayUrl, v as verifyWebhookSignature } from '../webhook-handler-DN4WBjbm.mjs';
3
+ import { p as ClientContext, A as ApiError } from '../index-Tq5WdDfS.mjs';
4
4
  export { L as LedveryRoutesConfig, a as LedverySessionData, S as SM_LEDVERY_ACCESS_TOKEN_COOKIE, b as SM_LEDVERY_ID_TOKEN_COOKIE, c as SM_LEDVERY_NONCE_COOKIE, d as SM_LEDVERY_PKCE_VERIFIER_COOKIE, e as SM_LEDVERY_STATE_COOKIE, f as createLedveryRoutes, g as getLedverySession } from '../ledvery-CxPzZpxP.mjs';
5
5
  import { NextRequest, NextResponse } from 'next/server';
6
6
  import '@scalemule/money';
@@ -1,6 +1,6 @@
1
- import { S as ServerConfig } from '../webhook-handler-D4uulN2T.js';
2
- export { a as ScaleMuleServer, V as VideoFailedEvent, b as VideoReadyEvent, c as VideoTranscodedEvent, d as VideoUploadedEvent, W as WebhookEvent, e as WebhookRoutesConfig, f as createServerClient, g as createWebhookHandler, h as createWebhookRoutes, p as parseWebhookEvent, r as registerVideoWebhook, i as resolveGatewayUrl, v as verifyWebhookSignature } from '../webhook-handler-D4uulN2T.js';
3
- import { p as ClientContext, A as ApiError } from '../index-zQloSkpW.js';
1
+ import { S as ServerConfig } from '../webhook-handler-Cfa7-yKN.js';
2
+ export { a as ScaleMuleServer, V as VideoFailedEvent, b as VideoReadyEvent, c as VideoTranscodedEvent, d as VideoUploadedEvent, W as WebhookEvent, e as WebhookRoutesConfig, f as createServerClient, g as createWebhookHandler, h as createWebhookRoutes, p as parseWebhookEvent, r as registerVideoWebhook, i as resolveGatewayUrl, v as verifyWebhookSignature } from '../webhook-handler-Cfa7-yKN.js';
3
+ import { p as ClientContext, A as ApiError } from '../index-Tq5WdDfS.js';
4
4
  export { L as LedveryRoutesConfig, a as LedverySessionData, S as SM_LEDVERY_ACCESS_TOKEN_COOKIE, b as SM_LEDVERY_ID_TOKEN_COOKIE, c as SM_LEDVERY_NONCE_COOKIE, d as SM_LEDVERY_PKCE_VERIFIER_COOKIE, e as SM_LEDVERY_STATE_COOKIE, f as createLedveryRoutes, g as getLedverySession } from '../ledvery-CxPzZpxP.js';
5
5
  import { NextRequest, NextResponse } from 'next/server';
6
6
  import '@scalemule/money';