@mastra/auth-studio 1.3.11-alpha.0 → 1.3.11-alpha.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.
@@ -1,5 +1,4 @@
1
- import { i as IMastraLogger, u as RegisteredLogger } from "../index-Biaf3BmX.js";
2
- //#region src/base/MastraBase.d.ts
1
+ import { i as IMastraLogger, u as RegisteredLogger } from "../index-TNVgGNjs.js";
3
2
  export declare class MastraBase {
4
3
  #private;
5
4
  component: RegisteredLogger;
@@ -26,5 +25,4 @@ export declare class MastraBase {
26
25
  */
27
26
  __setLogger(logger: IMastraLogger): void;
28
27
  }
29
- //#endregion
30
28
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,4 @@
1
1
  import { Transform } from "stream";
2
- //#region src/logger/adapter.d.ts
3
2
  /**
4
3
  * OpenTelemetry-compatible trace correlation fields, injected at the top
5
4
  * level of a logger's native record.
@@ -91,8 +90,6 @@ declare function exportTrackedException(ctx: LoggerAdapterContext | undefined, e
91
90
  * so the derived record preserves all context from the native call.
92
91
  */
93
92
  declare function buildLogRecordData(args: unknown[]): Record<string, unknown> | undefined;
94
- //#endregion
95
- //#region src/logger/index.d.ts
96
93
  declare const RegisteredLogger: {
97
94
  readonly AGENT: 'AGENT';
98
95
  readonly OBSERVABILITY: 'OBSERVABILITY';
@@ -314,6 +311,5 @@ declare class ConsoleLogger extends MastraLogger {
314
311
  hasMore: boolean;
315
312
  }>;
316
313
  }
317
- //#endregion
318
314
  export { buildLogRecordData as _, LogFilter as a, LoggerTransport as c, createCustomTransport as d, AdaptableLogger as f, TraceFields as g, LoggerAdapterOptions as h, IMastraLogger as i, MastraLogger as l, LoggerAdapterContext as m, ConsoleLogger as n, LogFilterContext as o, AdapterLogSink as p, ConsoleLoggerOptions as r, LogLevel as s, BaseLogMessage as t, RegisteredLogger as u, exportTrackedException as v, isAdaptableLogger as y };
319
- //# sourceMappingURL=index-Biaf3BmX.d.ts.map
315
+ //# sourceMappingURL=index-TNVgGNjs.d.ts.map
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let fs = require("fs");
3
3
  let path = require("path");
4
- //#region ../../packages/_internals/auth/dist/types/index.js
4
+ // ../../packages/_internals/auth/dist/types/index.js
5
5
  function headerFromPlainObject(headers, name) {
6
6
  const normalizedName = name.toLowerCase();
7
7
  const matchingKey = Object.keys(headers).find((key) => key.toLowerCase() === normalizedName);
@@ -25,8 +25,7 @@ function getWebRequest(request) {
25
25
  if (request instanceof Request) return request;
26
26
  return request.raw instanceof Request ? request.raw : void 0;
27
27
  }
28
- //#endregion
29
- //#region ../../packages/_internal-core/dist/logger/index.js
28
+ // ../../packages/_internal-core/dist/logger/index.js
30
29
  /**
31
30
  * Export a tracked exception through the adapter sink, mirroring the
32
31
  * DualLogger dual-write shape (`errorId`/`domain`/`category`/`details`/`cause`
@@ -259,8 +258,7 @@ var ConsoleLogger = class ConsoleLogger extends MastraLogger {
259
258
  };
260
259
  }
261
260
  };
262
- //#endregion
263
- //#region ../../packages/_internal-core/dist/base/index.js
261
+ // ../../packages/_internal-core/dist/base/index.js
264
262
  var MastraBase = class {
265
263
  component = RegisteredLogger.LLM;
266
264
  logger;
@@ -294,8 +292,7 @@ var MastraBase = class {
294
292
  this.logger = "child" in logger && typeof logger.child === "function" ? logger.child({ component: this.component }) : logger;
295
293
  }
296
294
  };
297
- //#endregion
298
- //#region ../../packages/_internals/auth/dist/provider/index.js
295
+ // ../../packages/_internals/auth/dist/provider/index.js
299
296
  var MastraAuthProvider = class extends MastraBase {
300
297
  protected;
301
298
  public;
@@ -307,7 +304,7 @@ var MastraAuthProvider = class extends MastraBase {
307
304
  if (options?.authorizeUser) this.authorizeUser = options.authorizeUser.bind(this);
308
305
  this.protected = options?.protected;
309
306
  this.public = options?.public;
310
- this.mapUserToResourceId = options?.mapUserToResourceId;
307
+ if (options?.mapUserToResourceId) this.mapUserToResourceId = options.mapUserToResourceId;
311
308
  }
312
309
  registerOptions(opts) {
313
310
  if (opts?.authorizeUser) this.authorizeUser = opts.authorizeUser.bind(this);
@@ -316,8 +313,7 @@ var MastraAuthProvider = class extends MastraBase {
316
313
  if (opts?.public) this.public = opts.public;
317
314
  }
318
315
  };
319
- //#endregion
320
- //#region ../../packages/_internals/auth/dist/ee-XRuijAiF.js
316
+ // ../../packages/_internals/auth/dist/ee-CnZdF0Vm.js
321
317
  /**
322
318
  * FGA enforcement utility for checking fine-grained authorization.
323
319
  *
@@ -426,8 +422,7 @@ function resolvePermissionsFromMapping(roles, mapping) {
426
422
  * @license Mastra Enterprise License - see ee/LICENSE
427
423
  * @packageDocumentation
428
424
  */
429
- //#endregion
430
- //#region src/index.ts
425
+ // src/index.ts
431
426
  const DEFAULT_SESSION_MAX_AGE_SECONDS = 1209600;
432
427
  /**
433
428
  * Name of the sealed session cookie on the shared API. Used for server-to-server
@@ -1190,7 +1185,6 @@ var MastraRBACStudio = class {
1190
1185
  return permissions.some((required) => userPermissions.some((p) => matchesPermission(p, required)));
1191
1186
  }
1192
1187
  };
1193
- //#endregion
1194
1188
  exports.HOST_SESSION_COOKIE_NAME = HOST_SESSION_COOKIE_NAME;
1195
1189
  exports.LEGACY_SESSION_COOKIE_NAME = LEGACY_SESSION_COOKIE_NAME;
1196
1190
  exports.MastraAuthStudio = MastraAuthStudio;