@meistrari/auth-core 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import { ssoClient } from '@better-auth/sso/client';
5
5
  import { createAccessControl } from 'better-auth/plugins/access';
6
6
  import { defaultStatements } from 'better-auth/plugins/organization/access';
7
7
 
8
- const version = "1.1.0";
8
+ const version = "1.1.1";
9
9
 
10
10
  const statements = {
11
11
  ...defaultStatements,
@@ -78,6 +78,8 @@ const customEndpointsPluginClient = () => {
78
78
  };
79
79
  };
80
80
  function createAPIClient(apiUrl, headers) {
81
+ const serviceName = typeof process !== "undefined" ? process.env.SERVICE_NAME : "";
82
+ const userAgent = `auth-sdk:core:${version}${serviceName ? `@${serviceName}` : ""}`;
81
83
  return createAuthClient({
82
84
  baseURL: apiUrl,
83
85
  plugins: [
@@ -112,7 +114,7 @@ function createAPIClient(apiUrl, headers) {
112
114
  fetchOptions: {
113
115
  credentials: "include",
114
116
  headers: {
115
- "User-Agent": `auth-sdk:core:${version}`,
117
+ "User-Agent": userAgent,
116
118
  ...headers
117
119
  },
118
120
  throw: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/auth-core",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {