@naylence/runtime 0.3.5-test.920 → 0.3.5-test.922

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.
@@ -98,12 +98,12 @@ installProcessEnvShim();
98
98
  // --- END ENV SHIM ---
99
99
 
100
100
  // This file is auto-generated during build - do not edit manually
101
- // Generated from package.json version: 0.3.5-test.920
101
+ // Generated from package.json version: 0.3.5-test.922
102
102
  /**
103
103
  * The package version, injected at build time.
104
104
  * @internal
105
105
  */
106
- const VERSION = '0.3.5-test.920';
106
+ const VERSION = '0.3.5-test.922';
107
107
 
108
108
  /**
109
109
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -683,15 +683,22 @@ function getInitialLogLevel() {
683
683
  return exports.LogLevel.OFF;
684
684
  }
685
685
  // Check FAME_LOG_LEVEL environment variable
686
- if (isNode && typeof process !== 'undefined' && process.env.FAME_LOG_LEVEL) {
686
+ let envLevel;
687
+ if (isNode && typeof process !== 'undefined') {
688
+ envLevel = process.env.FAME_LOG_LEVEL;
689
+ }
690
+ else if (typeof window !== 'undefined' && window.__ENV__) {
691
+ envLevel = window.__ENV__.FAME_LOG_LEVEL;
692
+ }
693
+ if (envLevel) {
687
694
  try {
688
- const envLevel = process.env.FAME_LOG_LEVEL.trim().toUpperCase();
695
+ const normalized = envLevel.trim().toUpperCase();
689
696
  // Direct enum name match (e.g., "DEBUG", "INFO")
690
- if (envLevel in exports.LogLevel) {
691
- return exports.LogLevel[envLevel];
697
+ if (normalized in exports.LogLevel) {
698
+ return exports.LogLevel[normalized];
692
699
  }
693
700
  // Try alternative mappings
694
- if (envLevel === 'WARN')
701
+ if (normalized === 'WARN')
695
702
  return exports.LogLevel.WARNING;
696
703
  }
697
704
  catch {
@@ -25238,6 +25245,111 @@ class SigningConfig {
25238
25245
  }
25239
25246
  }
25240
25247
 
25248
+ function hasBuffer() {
25249
+ return typeof Buffer !== 'undefined';
25250
+ }
25251
+ function readStringProperty(source, ...names) {
25252
+ if (!source || typeof source !== 'object') {
25253
+ return undefined;
25254
+ }
25255
+ for (const name of names) {
25256
+ const value = source[name];
25257
+ if (typeof value === 'string' && value.length > 0) {
25258
+ return value;
25259
+ }
25260
+ }
25261
+ return undefined;
25262
+ }
25263
+ function decodePem(pem) {
25264
+ const base64 = pem
25265
+ .replace(/-----BEGIN[^-]+-----/g, '')
25266
+ .replace(/-----END[^-]+-----/g, '')
25267
+ .replace(/\s+/g, '');
25268
+ if (typeof atob === 'function') {
25269
+ const binary = atob(base64);
25270
+ const bytes = new Uint8Array(binary.length);
25271
+ for (let i = 0; i < binary.length; i += 1) {
25272
+ bytes[i] = binary.charCodeAt(i);
25273
+ }
25274
+ return bytes;
25275
+ }
25276
+ if (hasBuffer()) {
25277
+ return Uint8Array.from(Buffer.from(base64, 'base64'));
25278
+ }
25279
+ throw new Error('Base64 decoding is not available in this environment');
25280
+ }
25281
+ function readLength(data, offset) {
25282
+ const initial = data[offset];
25283
+ if (initial === undefined) {
25284
+ throw new Error('Unexpected end of ASN.1 data');
25285
+ }
25286
+ if ((initial & 0x80) === 0) {
25287
+ return { length: initial, nextOffset: offset + 1 };
25288
+ }
25289
+ const lengthOfLength = initial & 0x7f;
25290
+ if (lengthOfLength === 0 || lengthOfLength > 4) {
25291
+ throw new Error('Unsupported ASN.1 length encoding');
25292
+ }
25293
+ let length = 0;
25294
+ let position = offset + 1;
25295
+ for (let i = 0; i < lengthOfLength; i += 1) {
25296
+ const byte = data[position];
25297
+ if (byte === undefined) {
25298
+ throw new Error('Unexpected end of ASN.1 data');
25299
+ }
25300
+ length = (length << 8) | byte;
25301
+ position += 1;
25302
+ }
25303
+ return { length, nextOffset: position };
25304
+ }
25305
+ function readElement(data, offset, tag) {
25306
+ if (data[offset] !== tag) {
25307
+ throw new Error(`Unexpected ASN.1 tag: expected 0x${tag.toString(16)}, got 0x${(data[offset] ?? 0).toString(16)}`);
25308
+ }
25309
+ const { length, nextOffset } = readLength(data, offset + 1);
25310
+ const contentOffset = nextOffset;
25311
+ return {
25312
+ length,
25313
+ contentOffset,
25314
+ nextOffset: contentOffset + length,
25315
+ };
25316
+ }
25317
+ function parseEd25519PrivateKey(pem) {
25318
+ const raw = decodePem(pem);
25319
+ if (raw.length === 32) {
25320
+ return raw.slice();
25321
+ }
25322
+ // Handle PKCS#8 structure defined in RFC 8410
25323
+ const sequence = readElement(raw, 0, 0x30);
25324
+ const version = readElement(raw, sequence.contentOffset, 0x02);
25325
+ let offset = version.nextOffset;
25326
+ const algorithm = readElement(raw, offset, 0x30);
25327
+ offset = algorithm.nextOffset;
25328
+ const privateKey = readElement(raw, offset, 0x04);
25329
+ const privateContent = raw.subarray(privateKey.contentOffset, privateKey.contentOffset + privateKey.length);
25330
+ if (privateContent.length === 32) {
25331
+ return privateContent.slice();
25332
+ }
25333
+ if (privateContent.length >= 34 && privateContent[0] === 0x04) {
25334
+ const innerLength = privateContent[1];
25335
+ if (innerLength !== 32 || privateContent.length < innerLength + 2) {
25336
+ throw new Error('Unexpected Ed25519 private key length');
25337
+ }
25338
+ return privateContent.subarray(2, 34);
25339
+ }
25340
+ throw new Error('Unsupported Ed25519 private key structure');
25341
+ }
25342
+ const textEncoder = typeof TextEncoder !== 'undefined' ? new TextEncoder() : undefined;
25343
+ function encodeUtf8(value) {
25344
+ if (textEncoder) {
25345
+ return textEncoder.encode(value);
25346
+ }
25347
+ if (hasBuffer()) {
25348
+ return Uint8Array.from(Buffer.from(value, 'utf8'));
25349
+ }
25350
+ throw new Error('No UTF-8 encoder available in this environment');
25351
+ }
25352
+
25241
25353
  const logger$x = getLogger('naylence.fame.security.auth.jwt_token_issuer');
25242
25354
  let joseModulePromise = null;
25243
25355
  async function requireJose() {
@@ -39345,111 +39457,6 @@ var sharedSecretTokenVerifier = /*#__PURE__*/Object.freeze({
39345
39457
  SharedSecretTokenVerifier: SharedSecretTokenVerifier
39346
39458
  });
39347
39459
 
39348
- function hasBuffer() {
39349
- return typeof Buffer !== 'undefined';
39350
- }
39351
- function readStringProperty(source, ...names) {
39352
- if (!source || typeof source !== 'object') {
39353
- return undefined;
39354
- }
39355
- for (const name of names) {
39356
- const value = source[name];
39357
- if (typeof value === 'string' && value.length > 0) {
39358
- return value;
39359
- }
39360
- }
39361
- return undefined;
39362
- }
39363
- function decodePem(pem) {
39364
- const base64 = pem
39365
- .replace(/-----BEGIN[^-]+-----/g, '')
39366
- .replace(/-----END[^-]+-----/g, '')
39367
- .replace(/\s+/g, '');
39368
- if (typeof atob === 'function') {
39369
- const binary = atob(base64);
39370
- const bytes = new Uint8Array(binary.length);
39371
- for (let i = 0; i < binary.length; i += 1) {
39372
- bytes[i] = binary.charCodeAt(i);
39373
- }
39374
- return bytes;
39375
- }
39376
- if (hasBuffer()) {
39377
- return Uint8Array.from(Buffer.from(base64, 'base64'));
39378
- }
39379
- throw new Error('Base64 decoding is not available in this environment');
39380
- }
39381
- function readLength(data, offset) {
39382
- const initial = data[offset];
39383
- if (initial === undefined) {
39384
- throw new Error('Unexpected end of ASN.1 data');
39385
- }
39386
- if ((initial & 0x80) === 0) {
39387
- return { length: initial, nextOffset: offset + 1 };
39388
- }
39389
- const lengthOfLength = initial & 0x7f;
39390
- if (lengthOfLength === 0 || lengthOfLength > 4) {
39391
- throw new Error('Unsupported ASN.1 length encoding');
39392
- }
39393
- let length = 0;
39394
- let position = offset + 1;
39395
- for (let i = 0; i < lengthOfLength; i += 1) {
39396
- const byte = data[position];
39397
- if (byte === undefined) {
39398
- throw new Error('Unexpected end of ASN.1 data');
39399
- }
39400
- length = (length << 8) | byte;
39401
- position += 1;
39402
- }
39403
- return { length, nextOffset: position };
39404
- }
39405
- function readElement(data, offset, tag) {
39406
- if (data[offset] !== tag) {
39407
- throw new Error(`Unexpected ASN.1 tag: expected 0x${tag.toString(16)}, got 0x${(data[offset] ?? 0).toString(16)}`);
39408
- }
39409
- const { length, nextOffset } = readLength(data, offset + 1);
39410
- const contentOffset = nextOffset;
39411
- return {
39412
- length,
39413
- contentOffset,
39414
- nextOffset: contentOffset + length,
39415
- };
39416
- }
39417
- function parseEd25519PrivateKey(pem) {
39418
- const raw = decodePem(pem);
39419
- if (raw.length === 32) {
39420
- return raw.slice();
39421
- }
39422
- // Handle PKCS#8 structure defined in RFC 8410
39423
- const sequence = readElement(raw, 0, 0x30);
39424
- const version = readElement(raw, sequence.contentOffset, 0x02);
39425
- let offset = version.nextOffset;
39426
- const algorithm = readElement(raw, offset, 0x30);
39427
- offset = algorithm.nextOffset;
39428
- const privateKey = readElement(raw, offset, 0x04);
39429
- const privateContent = raw.subarray(privateKey.contentOffset, privateKey.contentOffset + privateKey.length);
39430
- if (privateContent.length === 32) {
39431
- return privateContent.slice();
39432
- }
39433
- if (privateContent.length >= 34 && privateContent[0] === 0x04) {
39434
- const innerLength = privateContent[1];
39435
- if (innerLength !== 32 || privateContent.length < innerLength + 2) {
39436
- throw new Error('Unexpected Ed25519 private key length');
39437
- }
39438
- return privateContent.subarray(2, 34);
39439
- }
39440
- throw new Error('Unsupported Ed25519 private key structure');
39441
- }
39442
- const textEncoder = typeof TextEncoder !== 'undefined' ? new TextEncoder() : undefined;
39443
- function encodeUtf8(value) {
39444
- if (textEncoder) {
39445
- return textEncoder.encode(value);
39446
- }
39447
- if (hasBuffer()) {
39448
- return Uint8Array.from(Buffer.from(value, 'utf8'));
39449
- }
39450
- throw new Error('No UTF-8 encoder available in this environment');
39451
- }
39452
-
39453
39460
  if (!ed25519.hashes.sha512) {
39454
39461
  ed25519.hashes.sha512 = (message) => sha2_js.sha512(message);
39455
39462
  }
@@ -40010,6 +40017,7 @@ exports.assertGrant = assertGrant;
40010
40017
  exports.basicConfig = basicConfig;
40011
40018
  exports.broadcastChannelGrantToConnectorConfig = broadcastChannelGrantToConnectorConfig;
40012
40019
  exports.camelToSnakeCase = camelToSnakeCase;
40020
+ exports.canonicalJson = canonicalJson;
40013
40021
  exports.capitalizeFirstLetter = capitalizeFirstLetter;
40014
40022
  exports.color = color;
40015
40023
  exports.compareCryptoLevels = compareCryptoLevels;
@@ -40029,12 +40037,14 @@ exports.createX25519Keypair = createX25519Keypair;
40029
40037
  exports.credentialToString = credentialToString;
40030
40038
  exports.currentTraceId = currentTraceId$1;
40031
40039
  exports.debounce = debounce;
40040
+ exports.decodeBase64Url = decodeBase64Url;
40032
40041
  exports.decodeFameDataPayload = decodeFameDataPayload;
40033
40042
  exports.deepMerge = deepMerge;
40034
40043
  exports.defaultJsonEncoder = defaultJsonEncoder;
40035
40044
  exports.delay = delay;
40036
40045
  exports.dropEmpty = dropEmpty;
40037
40046
  exports.enableLogging = enableLogging;
40047
+ exports.encodeUtf8 = encodeUtf8;
40038
40048
  exports.ensureRuntimeFactoriesRegistered = ensureRuntimeFactoriesRegistered;
40039
40049
  exports.extractId = extractId;
40040
40050
  exports.extractPoolAddressBase = extractPoolAddressBase;
@@ -40042,6 +40052,7 @@ exports.extractPoolBase = extractPoolBase;
40042
40052
  exports.filterKeysByUse = filterKeysByUse;
40043
40053
  exports.formatTimestamp = formatTimestamp;
40044
40054
  exports.formatTimestampForConsole = formatTimestampForConsole$1;
40055
+ exports.frameDigest = frameDigest;
40045
40056
  exports.getCurrentEnvelope = getCurrentEnvelope;
40046
40057
  exports.getFameRoot = getFameRoot;
40047
40058
  exports.getKeyProvider = getKeyProvider;
@@ -40051,6 +40062,7 @@ exports.hasCryptoSupport = hasCryptoSupport;
40051
40062
  exports.hostnameToLogical = hostnameToLogical;
40052
40063
  exports.hostnamesToLogicals = hostnamesToLogicals;
40053
40064
  exports.httpGrantToConnectorConfig = httpGrantToConnectorConfig;
40065
+ exports.immutableHeaders = immutableHeaders;
40054
40066
  exports.inPageGrantToConnectorConfig = inPageGrantToConnectorConfig;
40055
40067
  exports.isAuthInjectionStrategy = isAuthInjectionStrategy;
40056
40068
  exports.isBroadcastChannelConnectionGrant = isBroadcastChannelConnectionGrant;
@@ -96,12 +96,12 @@ installProcessEnvShim();
96
96
  // --- END ENV SHIM ---
97
97
 
98
98
  // This file is auto-generated during build - do not edit manually
99
- // Generated from package.json version: 0.3.5-test.920
99
+ // Generated from package.json version: 0.3.5-test.922
100
100
  /**
101
101
  * The package version, injected at build time.
102
102
  * @internal
103
103
  */
104
- const VERSION = '0.3.5-test.920';
104
+ const VERSION = '0.3.5-test.922';
105
105
 
106
106
  /**
107
107
  * Fame protocol specific error classes with WebSocket close codes and proper inheritance.
@@ -681,15 +681,22 @@ function getInitialLogLevel() {
681
681
  return LogLevel.OFF;
682
682
  }
683
683
  // Check FAME_LOG_LEVEL environment variable
684
- if (isNode && typeof process !== 'undefined' && process.env.FAME_LOG_LEVEL) {
684
+ let envLevel;
685
+ if (isNode && typeof process !== 'undefined') {
686
+ envLevel = process.env.FAME_LOG_LEVEL;
687
+ }
688
+ else if (typeof window !== 'undefined' && window.__ENV__) {
689
+ envLevel = window.__ENV__.FAME_LOG_LEVEL;
690
+ }
691
+ if (envLevel) {
685
692
  try {
686
- const envLevel = process.env.FAME_LOG_LEVEL.trim().toUpperCase();
693
+ const normalized = envLevel.trim().toUpperCase();
687
694
  // Direct enum name match (e.g., "DEBUG", "INFO")
688
- if (envLevel in LogLevel) {
689
- return LogLevel[envLevel];
695
+ if (normalized in LogLevel) {
696
+ return LogLevel[normalized];
690
697
  }
691
698
  // Try alternative mappings
692
- if (envLevel === 'WARN')
699
+ if (normalized === 'WARN')
693
700
  return LogLevel.WARNING;
694
701
  }
695
702
  catch {
@@ -25236,6 +25243,111 @@ class SigningConfig {
25236
25243
  }
25237
25244
  }
25238
25245
 
25246
+ function hasBuffer() {
25247
+ return typeof Buffer !== 'undefined';
25248
+ }
25249
+ function readStringProperty(source, ...names) {
25250
+ if (!source || typeof source !== 'object') {
25251
+ return undefined;
25252
+ }
25253
+ for (const name of names) {
25254
+ const value = source[name];
25255
+ if (typeof value === 'string' && value.length > 0) {
25256
+ return value;
25257
+ }
25258
+ }
25259
+ return undefined;
25260
+ }
25261
+ function decodePem(pem) {
25262
+ const base64 = pem
25263
+ .replace(/-----BEGIN[^-]+-----/g, '')
25264
+ .replace(/-----END[^-]+-----/g, '')
25265
+ .replace(/\s+/g, '');
25266
+ if (typeof atob === 'function') {
25267
+ const binary = atob(base64);
25268
+ const bytes = new Uint8Array(binary.length);
25269
+ for (let i = 0; i < binary.length; i += 1) {
25270
+ bytes[i] = binary.charCodeAt(i);
25271
+ }
25272
+ return bytes;
25273
+ }
25274
+ if (hasBuffer()) {
25275
+ return Uint8Array.from(Buffer.from(base64, 'base64'));
25276
+ }
25277
+ throw new Error('Base64 decoding is not available in this environment');
25278
+ }
25279
+ function readLength(data, offset) {
25280
+ const initial = data[offset];
25281
+ if (initial === undefined) {
25282
+ throw new Error('Unexpected end of ASN.1 data');
25283
+ }
25284
+ if ((initial & 0x80) === 0) {
25285
+ return { length: initial, nextOffset: offset + 1 };
25286
+ }
25287
+ const lengthOfLength = initial & 0x7f;
25288
+ if (lengthOfLength === 0 || lengthOfLength > 4) {
25289
+ throw new Error('Unsupported ASN.1 length encoding');
25290
+ }
25291
+ let length = 0;
25292
+ let position = offset + 1;
25293
+ for (let i = 0; i < lengthOfLength; i += 1) {
25294
+ const byte = data[position];
25295
+ if (byte === undefined) {
25296
+ throw new Error('Unexpected end of ASN.1 data');
25297
+ }
25298
+ length = (length << 8) | byte;
25299
+ position += 1;
25300
+ }
25301
+ return { length, nextOffset: position };
25302
+ }
25303
+ function readElement(data, offset, tag) {
25304
+ if (data[offset] !== tag) {
25305
+ throw new Error(`Unexpected ASN.1 tag: expected 0x${tag.toString(16)}, got 0x${(data[offset] ?? 0).toString(16)}`);
25306
+ }
25307
+ const { length, nextOffset } = readLength(data, offset + 1);
25308
+ const contentOffset = nextOffset;
25309
+ return {
25310
+ length,
25311
+ contentOffset,
25312
+ nextOffset: contentOffset + length,
25313
+ };
25314
+ }
25315
+ function parseEd25519PrivateKey(pem) {
25316
+ const raw = decodePem(pem);
25317
+ if (raw.length === 32) {
25318
+ return raw.slice();
25319
+ }
25320
+ // Handle PKCS#8 structure defined in RFC 8410
25321
+ const sequence = readElement(raw, 0, 0x30);
25322
+ const version = readElement(raw, sequence.contentOffset, 0x02);
25323
+ let offset = version.nextOffset;
25324
+ const algorithm = readElement(raw, offset, 0x30);
25325
+ offset = algorithm.nextOffset;
25326
+ const privateKey = readElement(raw, offset, 0x04);
25327
+ const privateContent = raw.subarray(privateKey.contentOffset, privateKey.contentOffset + privateKey.length);
25328
+ if (privateContent.length === 32) {
25329
+ return privateContent.slice();
25330
+ }
25331
+ if (privateContent.length >= 34 && privateContent[0] === 0x04) {
25332
+ const innerLength = privateContent[1];
25333
+ if (innerLength !== 32 || privateContent.length < innerLength + 2) {
25334
+ throw new Error('Unexpected Ed25519 private key length');
25335
+ }
25336
+ return privateContent.subarray(2, 34);
25337
+ }
25338
+ throw new Error('Unsupported Ed25519 private key structure');
25339
+ }
25340
+ const textEncoder = typeof TextEncoder !== 'undefined' ? new TextEncoder() : undefined;
25341
+ function encodeUtf8(value) {
25342
+ if (textEncoder) {
25343
+ return textEncoder.encode(value);
25344
+ }
25345
+ if (hasBuffer()) {
25346
+ return Uint8Array.from(Buffer.from(value, 'utf8'));
25347
+ }
25348
+ throw new Error('No UTF-8 encoder available in this environment');
25349
+ }
25350
+
25239
25351
  const logger$x = getLogger('naylence.fame.security.auth.jwt_token_issuer');
25240
25352
  let joseModulePromise = null;
25241
25353
  async function requireJose() {
@@ -39343,111 +39455,6 @@ var sharedSecretTokenVerifier = /*#__PURE__*/Object.freeze({
39343
39455
  SharedSecretTokenVerifier: SharedSecretTokenVerifier
39344
39456
  });
39345
39457
 
39346
- function hasBuffer() {
39347
- return typeof Buffer !== 'undefined';
39348
- }
39349
- function readStringProperty(source, ...names) {
39350
- if (!source || typeof source !== 'object') {
39351
- return undefined;
39352
- }
39353
- for (const name of names) {
39354
- const value = source[name];
39355
- if (typeof value === 'string' && value.length > 0) {
39356
- return value;
39357
- }
39358
- }
39359
- return undefined;
39360
- }
39361
- function decodePem(pem) {
39362
- const base64 = pem
39363
- .replace(/-----BEGIN[^-]+-----/g, '')
39364
- .replace(/-----END[^-]+-----/g, '')
39365
- .replace(/\s+/g, '');
39366
- if (typeof atob === 'function') {
39367
- const binary = atob(base64);
39368
- const bytes = new Uint8Array(binary.length);
39369
- for (let i = 0; i < binary.length; i += 1) {
39370
- bytes[i] = binary.charCodeAt(i);
39371
- }
39372
- return bytes;
39373
- }
39374
- if (hasBuffer()) {
39375
- return Uint8Array.from(Buffer.from(base64, 'base64'));
39376
- }
39377
- throw new Error('Base64 decoding is not available in this environment');
39378
- }
39379
- function readLength(data, offset) {
39380
- const initial = data[offset];
39381
- if (initial === undefined) {
39382
- throw new Error('Unexpected end of ASN.1 data');
39383
- }
39384
- if ((initial & 0x80) === 0) {
39385
- return { length: initial, nextOffset: offset + 1 };
39386
- }
39387
- const lengthOfLength = initial & 0x7f;
39388
- if (lengthOfLength === 0 || lengthOfLength > 4) {
39389
- throw new Error('Unsupported ASN.1 length encoding');
39390
- }
39391
- let length = 0;
39392
- let position = offset + 1;
39393
- for (let i = 0; i < lengthOfLength; i += 1) {
39394
- const byte = data[position];
39395
- if (byte === undefined) {
39396
- throw new Error('Unexpected end of ASN.1 data');
39397
- }
39398
- length = (length << 8) | byte;
39399
- position += 1;
39400
- }
39401
- return { length, nextOffset: position };
39402
- }
39403
- function readElement(data, offset, tag) {
39404
- if (data[offset] !== tag) {
39405
- throw new Error(`Unexpected ASN.1 tag: expected 0x${tag.toString(16)}, got 0x${(data[offset] ?? 0).toString(16)}`);
39406
- }
39407
- const { length, nextOffset } = readLength(data, offset + 1);
39408
- const contentOffset = nextOffset;
39409
- return {
39410
- length,
39411
- contentOffset,
39412
- nextOffset: contentOffset + length,
39413
- };
39414
- }
39415
- function parseEd25519PrivateKey(pem) {
39416
- const raw = decodePem(pem);
39417
- if (raw.length === 32) {
39418
- return raw.slice();
39419
- }
39420
- // Handle PKCS#8 structure defined in RFC 8410
39421
- const sequence = readElement(raw, 0, 0x30);
39422
- const version = readElement(raw, sequence.contentOffset, 0x02);
39423
- let offset = version.nextOffset;
39424
- const algorithm = readElement(raw, offset, 0x30);
39425
- offset = algorithm.nextOffset;
39426
- const privateKey = readElement(raw, offset, 0x04);
39427
- const privateContent = raw.subarray(privateKey.contentOffset, privateKey.contentOffset + privateKey.length);
39428
- if (privateContent.length === 32) {
39429
- return privateContent.slice();
39430
- }
39431
- if (privateContent.length >= 34 && privateContent[0] === 0x04) {
39432
- const innerLength = privateContent[1];
39433
- if (innerLength !== 32 || privateContent.length < innerLength + 2) {
39434
- throw new Error('Unexpected Ed25519 private key length');
39435
- }
39436
- return privateContent.subarray(2, 34);
39437
- }
39438
- throw new Error('Unsupported Ed25519 private key structure');
39439
- }
39440
- const textEncoder = typeof TextEncoder !== 'undefined' ? new TextEncoder() : undefined;
39441
- function encodeUtf8(value) {
39442
- if (textEncoder) {
39443
- return textEncoder.encode(value);
39444
- }
39445
- if (hasBuffer()) {
39446
- return Uint8Array.from(Buffer.from(value, 'utf8'));
39447
- }
39448
- throw new Error('No UTF-8 encoder available in this environment');
39449
- }
39450
-
39451
39458
  if (!hashes.sha512) {
39452
39459
  hashes.sha512 = (message) => sha512(message);
39453
39460
  }
@@ -39825,4 +39832,4 @@ var websocketTransportProvisioner = /*#__PURE__*/Object.freeze({
39825
39832
  WebSocketTransportProvisionerFactory: WebSocketTransportProvisionerFactory
39826
39833
  });
39827
39834
 
39828
- export { ADMISSION_CLIENT_FACTORY_BASE_TYPE, ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE, AUTHORIZER_FACTORY_BASE_TYPE, AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE, AnsiColor, AsyncLock, AttachmentKeyValidator, AuthInjectionStrategyFactory, AuthorizerFactory, BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE, FACTORY_META$Y as BROADCAST_CHANNEL_CONNECTOR_FACTORY_META, BROADCAST_CHANNEL_CONNECTOR_TYPE, FACTORY_META$W as BROADCAST_CHANNEL_LISTENER_FACTORY_META, BackPressureFull, BaseAsyncConnector, BaseNodeEventListener, BindingManager, BindingStoreEntryRecord, BroadcastChannelConnector, BroadcastChannelConnectorFactory, BroadcastChannelListener, BroadcastChannelListenerFactory, BrowserAutoKeyCredentialProvider, BrowserWrappedKeyCredentialProvider, CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE, CRYPTO_LEVEL_SECURITY_ORDER, CertificateManagerFactory, ConnectorConfigDefaults, ConnectorFactory, ConsoleMetricsEmitter, CryptoLevel, FACTORY_META$_ as DEFAULT_WELCOME_FACTORY_META, DefaultCryptoProvider, DefaultKeyManager, DefaultSecurityManager, DefaultSecurityPolicy, DefaultWelcomeService, DefaultWelcomeServiceFactory, DevFixedKeyCredentialProvider, ENCRYPTION_MANAGER_FACTORY_BASE_TYPE, ENVELOPE_SIGNER_FACTORY_BASE_TYPE, ENVELOPE_VERIFIER_FACTORY_BASE_TYPE, ENV_VAR_DEFAULT_ENCRYPTION_LEVEL, ENV_VAR_HMAC_SECRET, ENV_VAR_JWKS_URL, ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$1 as ENV_VAR_JWT_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, ENV_VAR_JWT_TRUSTED_ISSUER, ENV_VAR_SHOW_ENVELOPES$1 as ENV_VAR_SHOW_ENVELOPES, EncryptedKeyValueStore, EncryptedStorageProviderBase, EncryptedValue, EncryptionConfiguration, EncryptionManagerFactory, EncryptionResult, EncryptionStatus, EnvCredentialProvider, EnvelopeContext, EnvelopeListenerManager, EnvelopeSecurityHandler, EnvelopeSignerFactory, EnvelopeVerifierFactory, FACTORY_META$$ as FACTORY_META, FIXED_PREFIX_LEN, FameAuthorizedDeliveryContextSchema, FameConnectError, FameEnvironmentContext, FameError, FameMessageTooLarge, FameNode, FameNodeAuthorizationContextSchema, FameProtocolError, FameTransportClose, FlowController, GRANT_PURPOSE_NODE_ATTACH, HTTP_CONNECTION_GRANT_TYPE, HTTP_STATELESS_CONNECTOR_TYPE, INPAGE_CONNECTION_GRANT_TYPE, FACTORY_META$Z as INPAGE_CONNECTOR_FACTORY_META, INPAGE_CONNECTOR_TYPE, FACTORY_META$X as INPAGE_LISTENER_FACTORY_META, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, InPageConnectorFactory, InPageListener, InPageListenerFactory, IndexedDBKeyValueStore, IndexedDBStorageProvider, InvalidPassphraseError, JWKValidationError, KEY_MANAGER_FACTORY_BASE_TYPE, KEY_STORE_FACTORY_BASE_TYPE, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MemoryMetricsEmitter, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodePlacementStrategyFactory, NoneCredentialProvider, NoopEncryptionManager, NoopKeyValidator, NotAuthorized, PROFILE_NAME_GATED, PROFILE_NAME_GATED_CALLBACK, PROFILE_NAME_OPEN$1 as PROFILE_NAME_OPEN, PROFILE_NAME_OVERLAY, PROFILE_NAME_OVERLAY_CALLBACK, PROFILE_NAME_STRICT_OVERLAY, PromptCredentialProvider, REPLICA_STICKINESS_MANAGER_FACTORY_BASE_TYPE, REQUIRED_FIELDS_BY_KTY, ReplicaStickinessManagerFactory, RootSessionManager, RouteManager, RpcMixin, RpcProxy, SEALED_ENVELOPE_NONCE_LENGTH, SEALED_ENVELOPE_OVERHEAD, SEALED_ENVELOPE_PRIVATE_KEY_LENGTH, SEALED_ENVELOPE_PUBLIC_KEY_LENGTH, SEALED_ENVELOPE_TAG_LENGTH, SECURE_CHANNEL_MANAGER_FACTORY_BASE_TYPE, SECURITY_MANAGER_FACTORY_BASE_TYPE, SECURITY_POLICY_FACTORY_BASE_TYPE, STORAGE_PROVIDER_FACTORY_BASE_TYPE, SecretSource, SecretStoreCredentialProvider, SecureChannelFrameHandler, SecureChannelManagerFactory, SecurityAction, SecurityRequirements, Sentinel, SentinelFactory, SessionKeyCredentialProvider, SignaturePolicy, SigningConfig as SigningConfigClass, SigningConfiguration, SimpleLoadBalancerStickinessManager, SimpleLoadBalancerStickinessManagerFactory, StaticCredentialProvider, StorageAESEncryptionManager, TOKEN_ISSUER_FACTORY_BASE_TYPE, TOKEN_PROVIDER_FACTORY_BASE_TYPE, TOKEN_VERIFIER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportProvisionerFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createLogicalUri, createNodeDeliveryContext, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, getCurrentEnvelope, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isInPageConnectionGrant, isNodeLike, isPlainObject$3 as isPlainObject, isPoolAddress, isPoolLogical, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeSecretSource, normalizeSecurityRequirements, normalizeSigningConfig, normalizeWebSocketConnectionGrant, objectToBytes, operation, parseSealedEnvelope, pinoTransport, prettyModel$1 as prettyModel, registerDefaultFactories, registerDefaultKeyStoreFactory, registerNodePlacementStrategyFactory, registerRuntimeFactories, requireCryptoSupport, retryWithBackoff, safeColor, sealedDecrypt, sealedEncrypt, secureDigest, setKeyStore, showEnvelopes$1 as showEnvelopes, sleep, snakeToCamelCase, stringifyNonPrimitives, supportsColor, throttle, urlsafeBase64Decode, urlsafeBase64Encode, validateCacheTtlSec, validateEncryptionKey, validateHostLogical, validateHostLogicals, validateJwkComplete, validateJwkStructure, validateJwkUseField, validateJwtTokenTtlSec, validateKeyCorrelationTtlSec, validateLogical, validateLogicalSegment, validateOAuth2TtlSec, validateSigningKey, validateTtlSec, waitForAll, waitForAllSettled, waitForAny, websocketGrantToConnectorConfig, withEnvelopeContext, withEnvelopeContextAsync, withLegacySnakeCaseKeys, withLock, withTimeout };
39835
+ export { ADMISSION_CLIENT_FACTORY_BASE_TYPE, ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE, AUTHORIZER_FACTORY_BASE_TYPE, AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE, AnsiColor, AsyncLock, AttachmentKeyValidator, AuthInjectionStrategyFactory, AuthorizerFactory, BROADCAST_CHANNEL_CONNECTION_GRANT_TYPE, FACTORY_META$Y as BROADCAST_CHANNEL_CONNECTOR_FACTORY_META, BROADCAST_CHANNEL_CONNECTOR_TYPE, FACTORY_META$W as BROADCAST_CHANNEL_LISTENER_FACTORY_META, BackPressureFull, BaseAsyncConnector, BaseNodeEventListener, BindingManager, BindingStoreEntryRecord, BroadcastChannelConnector, BroadcastChannelConnectorFactory, BroadcastChannelListener, BroadcastChannelListenerFactory, BrowserAutoKeyCredentialProvider, BrowserWrappedKeyCredentialProvider, CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE, CRYPTO_LEVEL_SECURITY_ORDER, CertificateManagerFactory, ConnectorConfigDefaults, ConnectorFactory, ConsoleMetricsEmitter, CryptoLevel, FACTORY_META$_ as DEFAULT_WELCOME_FACTORY_META, DefaultCryptoProvider, DefaultKeyManager, DefaultSecurityManager, DefaultSecurityPolicy, DefaultWelcomeService, DefaultWelcomeServiceFactory, DevFixedKeyCredentialProvider, ENCRYPTION_MANAGER_FACTORY_BASE_TYPE, ENVELOPE_SIGNER_FACTORY_BASE_TYPE, ENVELOPE_VERIFIER_FACTORY_BASE_TYPE, ENV_VAR_DEFAULT_ENCRYPTION_LEVEL, ENV_VAR_HMAC_SECRET, ENV_VAR_JWKS_URL, ENV_VAR_JWT_ALGORITHM, ENV_VAR_JWT_AUDIENCE$1 as ENV_VAR_JWT_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE, ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER, ENV_VAR_JWT_TRUSTED_ISSUER, ENV_VAR_SHOW_ENVELOPES$1 as ENV_VAR_SHOW_ENVELOPES, EncryptedKeyValueStore, EncryptedStorageProviderBase, EncryptedValue, EncryptionConfiguration, EncryptionManagerFactory, EncryptionResult, EncryptionStatus, EnvCredentialProvider, EnvelopeContext, EnvelopeListenerManager, EnvelopeSecurityHandler, EnvelopeSignerFactory, EnvelopeVerifierFactory, FACTORY_META$$ as FACTORY_META, FIXED_PREFIX_LEN, FameAuthorizedDeliveryContextSchema, FameConnectError, FameEnvironmentContext, FameError, FameMessageTooLarge, FameNode, FameNodeAuthorizationContextSchema, FameProtocolError, FameTransportClose, FlowController, GRANT_PURPOSE_NODE_ATTACH, HTTP_CONNECTION_GRANT_TYPE, HTTP_STATELESS_CONNECTOR_TYPE, INPAGE_CONNECTION_GRANT_TYPE, FACTORY_META$Z as INPAGE_CONNECTOR_FACTORY_META, INPAGE_CONNECTOR_TYPE, FACTORY_META$X as INPAGE_LISTENER_FACTORY_META, InMemoryBinding, InMemoryFanoutBroker, InMemoryKeyValueStore, InMemoryReadWriteChannel, InMemoryStorageProvider, InPageConnector, InPageConnectorFactory, InPageListener, InPageListenerFactory, IndexedDBKeyValueStore, IndexedDBStorageProvider, InvalidPassphraseError, JWKValidationError, KEY_MANAGER_FACTORY_BASE_TYPE, KEY_STORE_FACTORY_BASE_TYPE, KeyInfo, KeyManagementHandler, KeyManagerFactory, KeyStore, KeyStoreFactory, KeyValidationError, LOAD_BALANCER_STICKINESS_MANAGER_FACTORY_BASE_TYPE, LoadBalancerStickinessManagerFactory, LogLevel, LogLevelNames, MemoryMetricsEmitter, NODE_LIKE_FACTORY_BASE_TYPE, NODE_PLACEMENT_STRATEGY_FACTORY_BASE_TYPE, NoOpMetricsEmitter, NoSecurityPolicy, NodeFactory, NodePlacementStrategyFactory, NoneCredentialProvider, NoopEncryptionManager, NoopKeyValidator, NotAuthorized, PROFILE_NAME_GATED, PROFILE_NAME_GATED_CALLBACK, PROFILE_NAME_OPEN$1 as PROFILE_NAME_OPEN, PROFILE_NAME_OVERLAY, PROFILE_NAME_OVERLAY_CALLBACK, PROFILE_NAME_STRICT_OVERLAY, PromptCredentialProvider, REPLICA_STICKINESS_MANAGER_FACTORY_BASE_TYPE, REQUIRED_FIELDS_BY_KTY, ReplicaStickinessManagerFactory, RootSessionManager, RouteManager, RpcMixin, RpcProxy, SEALED_ENVELOPE_NONCE_LENGTH, SEALED_ENVELOPE_OVERHEAD, SEALED_ENVELOPE_PRIVATE_KEY_LENGTH, SEALED_ENVELOPE_PUBLIC_KEY_LENGTH, SEALED_ENVELOPE_TAG_LENGTH, SECURE_CHANNEL_MANAGER_FACTORY_BASE_TYPE, SECURITY_MANAGER_FACTORY_BASE_TYPE, SECURITY_POLICY_FACTORY_BASE_TYPE, STORAGE_PROVIDER_FACTORY_BASE_TYPE, SecretSource, SecretStoreCredentialProvider, SecureChannelFrameHandler, SecureChannelManagerFactory, SecurityAction, SecurityRequirements, Sentinel, SentinelFactory, SessionKeyCredentialProvider, SignaturePolicy, SigningConfig as SigningConfigClass, SigningConfiguration, SimpleLoadBalancerStickinessManager, SimpleLoadBalancerStickinessManagerFactory, StaticCredentialProvider, StorageAESEncryptionManager, TOKEN_ISSUER_FACTORY_BASE_TYPE, TOKEN_PROVIDER_FACTORY_BASE_TYPE, TOKEN_VERIFIER_FACTORY_BASE_TYPE, TRANSPORT_PROVISIONER_FACTORY_BASE_TYPE, TaskSpawner, TokenIssuerFactory, TokenProviderFactory, TokenVerifierFactory, TransportProvisionerFactory, TtlValidationError, UpstreamSessionManager, VALID_CURVES_BY_KTY, VALID_KEY_USES, VERSION, WEBSOCKET_CONNECTION_GRANT_TYPE, WELCOME_SERVICE_FACTORY_BASE_TYPE, WebSocketCloseCode, WebSocketConnector, WebSocketState, WelcomeServiceFactory, _NoopFlowController, __runtimePluginLoader, addEnvelopeFields, addLogLevel, addTimestamp, assertConnectionGrant, assertGrant, basicConfig, broadcastChannelGrantToConnectorConfig, camelToSnakeCase, canonicalJson, capitalizeFirstLetter, color, compareCryptoLevels, compiledPathPattern, consoleTransport, convertWildcardLogicalToDnsConstraint, createConnectorConfig, createEd25519Keypair, createHostLogicalUri, createLogicalUri, createNodeDeliveryContext, createResource, createRpcProxy, createRsaKeypair, createTransportCloseError, createX25519Keypair, credentialToString, currentTraceId$1 as currentTraceId, debounce, decodeBase64Url, decodeFameDataPayload, deepMerge, defaultJsonEncoder, delay, dropEmpty, enableLogging, encodeUtf8, ensureRuntimeFactoriesRegistered, extractId, extractPoolAddressBase, extractPoolBase, filterKeysByUse, formatTimestamp, formatTimestampForConsole$1 as formatTimestampForConsole, frameDigest, getCurrentEnvelope, getFameRoot, getKeyProvider, getKeyStore, getLogger, hasCryptoSupport, hostnameToLogical, hostnamesToLogicals, httpGrantToConnectorConfig, immutableHeaders, inPageGrantToConnectorConfig, isAuthInjectionStrategy, isBroadcastChannelConnectionGrant, isConnectionGrant, isConnectorConfig, isEnvelopeLoggingEnabled, isFameError, isFameErrorType, isGrant, isHttpConnectionGrant, isInPageConnectionGrant, isNodeLike, isPlainObject$3 as isPlainObject, isPoolAddress, isPoolLogical, isRegisterable, isTokenExpired, isTokenProvider, isTokenValid, isWebSocketConnectionGrant, jsonDumps, logicalPatternsToDnsConstraints, logicalToHostname, logicalsToHostnames, matchesPoolAddress, matchesPoolLogical, maybeAwait, nodeWelcomeRouter, nodeWelcomeRouterPlugin, normalizeBroadcastChannelConnectionGrant, normalizeEncryptionConfig, normalizeEnvelopeSnapshot, normalizeHttpConnectionGrant, normalizeInPageConnectionGrant, normalizeInboundCryptoRules, normalizeInboundSigningRules, normalizeOutboundCryptoRules, normalizeOutboundSigningRules, normalizePath, normalizeResponseCryptoRules, normalizeResponseSigningRules, normalizeSecretSource, normalizeSecurityRequirements, normalizeSigningConfig, normalizeWebSocketConnectionGrant, objectToBytes, operation, parseSealedEnvelope, pinoTransport, prettyModel$1 as prettyModel, registerDefaultFactories, registerDefaultKeyStoreFactory, registerNodePlacementStrategyFactory, registerRuntimeFactories, requireCryptoSupport, retryWithBackoff, safeColor, sealedDecrypt, sealedEncrypt, secureDigest, setKeyStore, showEnvelopes$1 as showEnvelopes, sleep, snakeToCamelCase, stringifyNonPrimitives, supportsColor, throttle, urlsafeBase64Decode, urlsafeBase64Encode, validateCacheTtlSec, validateEncryptionKey, validateHostLogical, validateHostLogicals, validateJwkComplete, validateJwkStructure, validateJwkUseField, validateJwtTokenTtlSec, validateKeyCorrelationTtlSec, validateLogical, validateLogicalSegment, validateOAuth2TtlSec, validateSigningKey, validateTtlSec, waitForAll, waitForAllSettled, waitForAny, websocketGrantToConnectorConfig, withEnvelopeContext, withEnvelopeContextAsync, withLegacySnakeCaseKeys, withLock, withTimeout };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PROFILE_NAME_OPEN = exports.PROFILE_NAME_GATED_CALLBACK = exports.PROFILE_NAME_GATED = exports.PROFILE_NAME_OVERLAY_CALLBACK = exports.PROFILE_NAME_OVERLAY = exports.PROFILE_NAME_STRICT_OVERLAY = exports.ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE = exports.ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER = exports.ENV_VAR_HMAC_SECRET = exports.ENV_VAR_DEFAULT_ENCRYPTION_LEVEL = exports.ENV_VAR_JWKS_URL = exports.ENV_VAR_JWT_AUDIENCE = exports.ENV_VAR_JWT_ALGORITHM = exports.ENV_VAR_JWT_TRUSTED_ISSUER = exports.CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE = exports.SigningConfigClass = exports.SECURITY_MANAGER_FACTORY_BASE_TYPE = exports.SECURITY_POLICY_FACTORY_BASE_TYPE = exports.KEY_STORE_FACTORY_BASE_TYPE = exports.ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE = exports.KEY_MANAGER_FACTORY_BASE_TYPE = exports.SecureChannelManagerFactory = exports.SECURE_CHANNEL_MANAGER_FACTORY_BASE_TYPE = exports.ENCRYPTION_MANAGER_FACTORY_BASE_TYPE = exports.CertificateManagerFactory = exports.CERTIFICATE_MANAGER_FACTORY_BASE_TYPE = exports.TokenProviderFactory = exports.TOKEN_PROVIDER_FACTORY_BASE_TYPE = exports.TokenVerifierFactory = exports.TOKEN_VERIFIER_FACTORY_BASE_TYPE = exports.TokenIssuerFactory = exports.TOKEN_ISSUER_FACTORY_BASE_TYPE = exports.AuthInjectionStrategyFactory = exports.AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE = exports.AuthorizerFactory = exports.AUTHORIZER_FACTORY_BASE_TYPE = void 0;
3
+ exports.PROFILE_NAME_OPEN = exports.PROFILE_NAME_GATED_CALLBACK = exports.PROFILE_NAME_GATED = exports.PROFILE_NAME_OVERLAY_CALLBACK = exports.PROFILE_NAME_OVERLAY = exports.PROFILE_NAME_STRICT_OVERLAY = exports.ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE = exports.ENV_VAR_JWT_REVERSE_AUTH_TRUSTED_ISSUER = exports.ENV_VAR_HMAC_SECRET = exports.ENV_VAR_DEFAULT_ENCRYPTION_LEVEL = exports.ENV_VAR_JWKS_URL = exports.ENV_VAR_JWT_AUDIENCE = exports.ENV_VAR_JWT_ALGORITHM = exports.ENV_VAR_JWT_TRUSTED_ISSUER = exports.CREDENTIAL_PROVIDER_FACTORY_BASE_TYPE = exports.encodeUtf8 = exports.immutableHeaders = exports.frameDigest = exports.decodeBase64Url = exports.canonicalJson = exports.SigningConfigClass = exports.SECURITY_MANAGER_FACTORY_BASE_TYPE = exports.SECURITY_POLICY_FACTORY_BASE_TYPE = exports.KEY_STORE_FACTORY_BASE_TYPE = exports.ATTACHMENT_KEY_VALIDATOR_FACTORY_BASE_TYPE = exports.KEY_MANAGER_FACTORY_BASE_TYPE = exports.SecureChannelManagerFactory = exports.SECURE_CHANNEL_MANAGER_FACTORY_BASE_TYPE = exports.ENCRYPTION_MANAGER_FACTORY_BASE_TYPE = exports.CertificateManagerFactory = exports.CERTIFICATE_MANAGER_FACTORY_BASE_TYPE = exports.TokenProviderFactory = exports.TOKEN_PROVIDER_FACTORY_BASE_TYPE = exports.TokenVerifierFactory = exports.TOKEN_VERIFIER_FACTORY_BASE_TYPE = exports.TokenIssuerFactory = exports.TOKEN_ISSUER_FACTORY_BASE_TYPE = exports.AuthInjectionStrategyFactory = exports.AUTH_INJECTION_STRATEGY_FACTORY_BASE_TYPE = exports.AuthorizerFactory = exports.AUTHORIZER_FACTORY_BASE_TYPE = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  tslib_1.__exportStar(require("./auth/authorizer.js"), exports);
6
6
  var authorizer_factory_js_1 = require("./auth/authorizer-factory.js");
@@ -69,6 +69,13 @@ tslib_1.__exportStar(require("./signing/envelope-signer.js"), exports);
69
69
  tslib_1.__exportStar(require("./signing/envelope-verifier.js"), exports);
70
70
  var signing_config_js_1 = require("./signing/signing-config.js");
71
71
  Object.defineProperty(exports, "SigningConfigClass", { enumerable: true, get: function () { return signing_config_js_1.SigningConfig; } });
72
+ var eddsa_signer_verifier_js_1 = require("./signing/eddsa-signer-verifier.js");
73
+ Object.defineProperty(exports, "canonicalJson", { enumerable: true, get: function () { return eddsa_signer_verifier_js_1.canonicalJson; } });
74
+ Object.defineProperty(exports, "decodeBase64Url", { enumerable: true, get: function () { return eddsa_signer_verifier_js_1.decodeBase64Url; } });
75
+ Object.defineProperty(exports, "frameDigest", { enumerable: true, get: function () { return eddsa_signer_verifier_js_1.frameDigest; } });
76
+ Object.defineProperty(exports, "immutableHeaders", { enumerable: true, get: function () { return eddsa_signer_verifier_js_1.immutableHeaders; } });
77
+ var eddsa_utils_js_1 = require("./signing/eddsa-utils.js");
78
+ Object.defineProperty(exports, "encodeUtf8", { enumerable: true, get: function () { return eddsa_utils_js_1.encodeUtf8; } });
72
79
  tslib_1.__exportStar(require("./crypto/providers/crypto-provider.js"), exports);
73
80
  tslib_1.__exportStar(require("./crypto/providers/default-crypto-provider.js"), exports);
74
81
  tslib_1.__exportStar(require("./credential/credential-provider.js"), exports);
@@ -301,15 +301,22 @@ function getInitialLogLevel() {
301
301
  return logging_types_js_1.LogLevel.OFF;
302
302
  }
303
303
  // Check FAME_LOG_LEVEL environment variable
304
- if (logging_types_js_1.isNode && typeof process !== 'undefined' && process.env.FAME_LOG_LEVEL) {
304
+ let envLevel;
305
+ if (logging_types_js_1.isNode && typeof process !== 'undefined') {
306
+ envLevel = process.env.FAME_LOG_LEVEL;
307
+ }
308
+ else if (typeof window !== 'undefined' && window.__ENV__) {
309
+ envLevel = window.__ENV__.FAME_LOG_LEVEL;
310
+ }
311
+ if (envLevel) {
305
312
  try {
306
- const envLevel = process.env.FAME_LOG_LEVEL.trim().toUpperCase();
313
+ const normalized = envLevel.trim().toUpperCase();
307
314
  // Direct enum name match (e.g., "DEBUG", "INFO")
308
- if (envLevel in logging_types_js_1.LogLevel) {
309
- return logging_types_js_1.LogLevel[envLevel];
315
+ if (normalized in logging_types_js_1.LogLevel) {
316
+ return logging_types_js_1.LogLevel[normalized];
310
317
  }
311
318
  // Try alternative mappings
312
- if (envLevel === 'WARN')
319
+ if (normalized === 'WARN')
313
320
  return logging_types_js_1.LogLevel.WARNING;
314
321
  }
315
322
  catch {
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  // This file is auto-generated during build - do not edit manually
3
- // Generated from package.json version: 0.3.5-test.920
3
+ // Generated from package.json version: 0.3.5-test.922
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.VERSION = void 0;
6
6
  /**
7
7
  * The package version, injected at build time.
8
8
  * @internal
9
9
  */
10
- exports.VERSION = '0.3.5-test.920';
10
+ exports.VERSION = '0.3.5-test.922';