@naylence/runtime 0.3.6-test.108 → 0.3.7
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.
- package/dist/browser/index.cjs +98 -61
- package/dist/browser/index.mjs +98 -61
- package/dist/cjs/_env-shim.js +2 -1
- package/dist/cjs/naylence/fame/config/extended-fame-config.js +2 -1
- package/dist/cjs/naylence/fame/connector/broadcast-channel-connector-factory.js +8 -4
- package/dist/cjs/naylence/fame/connector/broadcast-channel-connector.browser.js +13 -6
- package/dist/cjs/naylence/fame/connector/broadcast-channel-listener-factory.js +3 -1
- package/dist/cjs/naylence/fame/connector/broadcast-channel-listener.js +2 -6
- package/dist/cjs/naylence/fame/connector/inpage-connector-factory.js +2 -1
- package/dist/cjs/naylence/fame/connector/inpage-connector.js +13 -6
- package/dist/cjs/naylence/fame/connector/inpage-listener-factory.js +4 -4
- package/dist/cjs/naylence/fame/connector/inpage-listener.js +5 -2
- package/dist/cjs/naylence/fame/grants/broadcast-channel-connection-grant.js +6 -3
- package/dist/cjs/naylence/fame/grants/inpage-connection-grant.js +4 -2
- package/dist/cjs/naylence/fame/http/oauth2-token-router.js +9 -9
- package/dist/cjs/naylence/fame/node/admission/default-node-attach-client.js +6 -3
- package/dist/cjs/naylence/fame/node/upstream-session-manager.js +9 -6
- package/dist/cjs/naylence/fame/security/auth/oauth2-pkce-token-provider-factory.js +10 -6
- package/dist/cjs/naylence/fame/security/auth/oauth2-pkce-token-provider.js +1 -2
- package/dist/cjs/naylence/fame/security/default-security-manager.js +2 -1
- package/dist/cjs/naylence/fame/security/trust-store/noop-trust-store-provider-factory.js +2 -2
- package/dist/cjs/naylence/fame/security/trust-store/trust-store-provider-factory.js +2 -2
- package/dist/cjs/version.js +2 -2
- package/dist/esm/_env-shim.js +2 -1
- package/dist/esm/browser.js +2 -2
- package/dist/esm/naylence/fame/config/extended-fame-config.js +2 -1
- package/dist/esm/naylence/fame/connector/broadcast-channel-connector-factory.js +8 -4
- package/dist/esm/naylence/fame/connector/broadcast-channel-connector.browser.js +13 -6
- package/dist/esm/naylence/fame/connector/broadcast-channel-listener-factory.js +3 -1
- package/dist/esm/naylence/fame/connector/broadcast-channel-listener.js +2 -6
- package/dist/esm/naylence/fame/connector/index.js +2 -2
- package/dist/esm/naylence/fame/connector/inpage-connector-factory.js +2 -1
- package/dist/esm/naylence/fame/connector/inpage-connector.js +13 -6
- package/dist/esm/naylence/fame/connector/inpage-listener-factory.js +4 -4
- package/dist/esm/naylence/fame/connector/inpage-listener.js +5 -2
- package/dist/esm/naylence/fame/grants/broadcast-channel-connection-grant.js +6 -3
- package/dist/esm/naylence/fame/grants/inpage-connection-grant.js +4 -2
- package/dist/esm/naylence/fame/http/oauth2-token-router.js +9 -9
- package/dist/esm/naylence/fame/node/admission/default-node-attach-client.js +6 -3
- package/dist/esm/naylence/fame/node/upstream-session-manager.js +9 -6
- package/dist/esm/naylence/fame/security/auth/oauth2-pkce-token-provider-factory.js +10 -6
- package/dist/esm/naylence/fame/security/auth/oauth2-pkce-token-provider.js +1 -2
- package/dist/esm/naylence/fame/security/default-security-manager.js +2 -1
- package/dist/esm/naylence/fame/security/index.js +1 -1
- package/dist/esm/naylence/fame/security/trust-store/noop-trust-store-provider-factory.js +3 -3
- package/dist/esm/naylence/fame/security/trust-store/trust-store-provider-factory.js +3 -3
- package/dist/esm/version.js +2 -2
- package/dist/node/index.cjs +96 -60
- package/dist/node/index.mjs +96 -60
- package/dist/node/node.cjs +105 -69
- package/dist/node/node.mjs +105 -69
- package/dist/types/browser.d.ts +2 -2
- package/dist/types/naylence/fame/connector/index.d.ts +2 -2
- package/dist/types/naylence/fame/security/index.d.ts +1 -1
- package/dist/types/naylence/fame/security/trust-store/noop-trust-store-provider-factory.d.ts +3 -3
- package/dist/types/naylence/fame/security/trust-store/trust-store-provider-factory.d.ts +4 -4
- package/dist/types/naylence/fame/security/trust-store/trust-store-provider.d.ts +5 -5
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,9 @@ function normalizeConfig(config) {
|
|
|
17
17
|
: DEFAULT_CHANNEL;
|
|
18
18
|
const rawInbox = record.inboxCapacity ?? record['inbox_capacity'];
|
|
19
19
|
let inboxCapacity = DEFAULT_INBOX_CAPACITY;
|
|
20
|
-
if (typeof rawInbox === 'number' &&
|
|
20
|
+
if (typeof rawInbox === 'number' &&
|
|
21
|
+
Number.isFinite(rawInbox) &&
|
|
22
|
+
rawInbox > 0) {
|
|
21
23
|
inboxCapacity = Math.floor(rawInbox);
|
|
22
24
|
}
|
|
23
25
|
else if (typeof rawInbox === 'string') {
|
|
@@ -45,9 +47,7 @@ export class InPageListenerFactory extends TransportListenerFactory {
|
|
|
45
47
|
}
|
|
46
48
|
async create(config, ...factoryArgs) {
|
|
47
49
|
const normalized = normalizeConfig(config);
|
|
48
|
-
const [{ InPageListener }] = await Promise.all([
|
|
49
|
-
getInPageListenerModule(),
|
|
50
|
-
]);
|
|
50
|
+
const [{ InPageListener }] = await Promise.all([getInPageListenerModule()]);
|
|
51
51
|
void factoryArgs;
|
|
52
52
|
return new InPageListener({
|
|
53
53
|
channelName: normalized.channelName,
|
|
@@ -69,7 +69,9 @@ export class InPageListener extends TransportListener {
|
|
|
69
69
|
typeof channelCandidate === 'string' && channelCandidate.trim().length > 0
|
|
70
70
|
? channelCandidate.trim()
|
|
71
71
|
: DEFAULT_CHANNEL;
|
|
72
|
-
const normalizedCapacity = typeof inboxCandidate === 'number' &&
|
|
72
|
+
const normalizedCapacity = typeof inboxCandidate === 'number' &&
|
|
73
|
+
Number.isFinite(inboxCandidate) &&
|
|
74
|
+
inboxCandidate > 0
|
|
73
75
|
? Math.floor(inboxCandidate)
|
|
74
76
|
: DEFAULT_INBOX_CAPACITY;
|
|
75
77
|
this._inboxCapacity = normalizedCapacity;
|
|
@@ -344,7 +346,8 @@ export class InPageListener extends TransportListener {
|
|
|
344
346
|
if (grant.type === INPAGE_CONNECTION_GRANT_TYPE) {
|
|
345
347
|
return inPageGrantToConnectorConfig(grant);
|
|
346
348
|
}
|
|
347
|
-
if (typeof grant
|
|
349
|
+
if (typeof grant
|
|
350
|
+
?.toConnectorConfig === 'function') {
|
|
348
351
|
return grant.toConnectorConfig();
|
|
349
352
|
}
|
|
350
353
|
throw new Error(`Unsupported grant type: ${grant.type}`);
|
|
@@ -41,14 +41,16 @@ export function normalizeBroadcastChannelConnectionGrant(candidate) {
|
|
|
41
41
|
type,
|
|
42
42
|
purpose,
|
|
43
43
|
};
|
|
44
|
-
const channelValue = candidate.channelName ??
|
|
44
|
+
const channelValue = candidate.channelName ??
|
|
45
|
+
candidate['channel_name'];
|
|
45
46
|
if (channelValue !== undefined) {
|
|
46
47
|
if (typeof channelValue !== 'string' || channelValue.trim().length === 0) {
|
|
47
48
|
throw new TypeError('BroadcastChannelConnectionGrant "channelName" must be a non-empty string when provided');
|
|
48
49
|
}
|
|
49
50
|
result.channelName = channelValue.trim();
|
|
50
51
|
}
|
|
51
|
-
const inboxValue = candidate.inboxCapacity ??
|
|
52
|
+
const inboxValue = candidate.inboxCapacity ??
|
|
53
|
+
candidate['inbox_capacity'];
|
|
52
54
|
if (inboxValue !== undefined) {
|
|
53
55
|
if (typeof inboxValue !== 'number' ||
|
|
54
56
|
!Number.isFinite(inboxValue) ||
|
|
@@ -57,7 +59,8 @@ export function normalizeBroadcastChannelConnectionGrant(candidate) {
|
|
|
57
59
|
}
|
|
58
60
|
result.inboxCapacity = Math.floor(inboxValue);
|
|
59
61
|
}
|
|
60
|
-
const windowValue = candidate.initialWindow ??
|
|
62
|
+
const windowValue = candidate.initialWindow ??
|
|
63
|
+
candidate['initial_window'];
|
|
61
64
|
if (windowValue !== undefined) {
|
|
62
65
|
if (typeof windowValue !== 'number' ||
|
|
63
66
|
!Number.isFinite(windowValue) ||
|
|
@@ -36,14 +36,16 @@ export function normalizeInPageConnectionGrant(candidate) {
|
|
|
36
36
|
type,
|
|
37
37
|
purpose,
|
|
38
38
|
};
|
|
39
|
-
const channelValue = candidate.channelName ??
|
|
39
|
+
const channelValue = candidate.channelName ??
|
|
40
|
+
candidate['channel_name'];
|
|
40
41
|
if (channelValue !== undefined) {
|
|
41
42
|
if (typeof channelValue !== 'string' || channelValue.trim().length === 0) {
|
|
42
43
|
throw new TypeError('InPageConnectionGrant "channelName" must be a non-empty string when provided');
|
|
43
44
|
}
|
|
44
45
|
result.channelName = channelValue.trim();
|
|
45
46
|
}
|
|
46
|
-
const inboxValue = candidate.inboxCapacity ??
|
|
47
|
+
const inboxValue = candidate.inboxCapacity ??
|
|
48
|
+
candidate['inbox_capacity'];
|
|
47
49
|
if (inboxValue !== undefined) {
|
|
48
50
|
if (typeof inboxValue !== 'number' ||
|
|
49
51
|
!Number.isFinite(inboxValue) ||
|
|
@@ -419,7 +419,9 @@ function parseCookies(cookieHeader) {
|
|
|
419
419
|
if (!cookieHeader) {
|
|
420
420
|
return {};
|
|
421
421
|
}
|
|
422
|
-
return cookieHeader
|
|
422
|
+
return cookieHeader
|
|
423
|
+
.split(';')
|
|
424
|
+
.reduce((acc, entry) => {
|
|
423
425
|
const [rawName, ...rawValueParts] = entry.split('=');
|
|
424
426
|
const name = rawName?.trim();
|
|
425
427
|
if (!name) {
|
|
@@ -567,10 +569,7 @@ function setNoCacheHeaders(res) {
|
|
|
567
569
|
res.set('Pragma', 'no-cache');
|
|
568
570
|
}
|
|
569
571
|
function respondInvalidClient(res) {
|
|
570
|
-
res
|
|
571
|
-
.status(401)
|
|
572
|
-
.set('WWW-Authenticate', 'Basic')
|
|
573
|
-
.json({
|
|
572
|
+
res.status(401).set('WWW-Authenticate', 'Basic').json({
|
|
574
573
|
error: 'invalid_client',
|
|
575
574
|
error_description: 'Invalid client credentials',
|
|
576
575
|
});
|
|
@@ -607,10 +606,10 @@ export function createOAuth2TokenRouter(options) {
|
|
|
607
606
|
DEFAULT_JWT_ALGORITHM;
|
|
608
607
|
const allowedScopes = getAllowedScopes(configAllowedScopes);
|
|
609
608
|
const resolvedTokenTtlSec = tokenTtlSec ?? 3600;
|
|
610
|
-
const enablePkce = coerceBoolean(process.env[ENV_VAR_ENABLE_PKCE]) ??
|
|
611
|
-
(configEnablePkce ?? true);
|
|
609
|
+
const enablePkce = coerceBoolean(process.env[ENV_VAR_ENABLE_PKCE]) ?? configEnablePkce ?? true;
|
|
612
610
|
const allowPublicClients = coerceBoolean(process.env[ENV_VAR_ALLOW_PUBLIC_CLIENTS]) ??
|
|
613
|
-
|
|
611
|
+
configAllowPublicClients ??
|
|
612
|
+
true;
|
|
614
613
|
const authorizationCodeTtlSec = ensurePositiveInteger(coerceNumber(process.env[ENV_VAR_AUTHORIZATION_CODE_TTL]) ??
|
|
615
614
|
configAuthorizationCodeTtlSec) ?? DEFAULT_AUTHORIZATION_CODE_TTL_SEC;
|
|
616
615
|
const devLoginExplicitlyEnabled = coerceBoolean(process.env[ENV_VAR_ENABLE_DEV_LOGIN]) ??
|
|
@@ -625,7 +624,8 @@ export function createOAuth2TokenRouter(options) {
|
|
|
625
624
|
configDevLoginCookieName ??
|
|
626
625
|
DEFAULT_SESSION_COOKIE_NAME;
|
|
627
626
|
const devLoginSecureCookie = coerceBoolean(process.env[ENV_VAR_SESSION_SECURE_COOKIE]) ??
|
|
628
|
-
|
|
627
|
+
configDevLoginSecureCookie ??
|
|
628
|
+
false;
|
|
629
629
|
const devLoginTitle = coerceString(process.env[ENV_VAR_LOGIN_TITLE]) ??
|
|
630
630
|
configDevLoginTitle ??
|
|
631
631
|
DEFAULT_LOGIN_TITLE;
|
|
@@ -19,7 +19,8 @@ export class DefaultNodeAttachClient {
|
|
|
19
19
|
const interimHandler = async (envelope, context) => {
|
|
20
20
|
if (this.inHandshake) {
|
|
21
21
|
// Filter: only buffer frames related to our systemId or frames without systemId info
|
|
22
|
-
const frameSystemId = envelope.frame
|
|
22
|
+
const frameSystemId = envelope.frame
|
|
23
|
+
?.systemId;
|
|
23
24
|
if (!frameSystemId || frameSystemId === this.expectedSystemId) {
|
|
24
25
|
this.buffer.push(envelope);
|
|
25
26
|
}
|
|
@@ -215,7 +216,8 @@ export class DefaultNodeAttachClient {
|
|
|
215
216
|
const deadline = Date.now() + this.timeoutMs;
|
|
216
217
|
while (Date.now() < deadline) {
|
|
217
218
|
// Allow both STARTED and PAUSED states (PAUSED = tab hidden but connection alive)
|
|
218
|
-
if (connector.state !== ConnectorState.STARTED &&
|
|
219
|
+
if (connector.state !== ConnectorState.STARTED &&
|
|
220
|
+
connector.state !== ConnectorState.PAUSED) {
|
|
219
221
|
let errorMessage = 'Connector closed while waiting for NodeAttachAck';
|
|
220
222
|
if (connector.closeCode !== undefined) {
|
|
221
223
|
errorMessage += ` (code=${connector.closeCode}`;
|
|
@@ -239,7 +241,8 @@ export class DefaultNodeAttachClient {
|
|
|
239
241
|
if (envelope.frame.type === 'NodeAttach') {
|
|
240
242
|
logger.debug('handshake_ignoring_concurrent_attach', {
|
|
241
243
|
frame_type: envelope.frame.type,
|
|
242
|
-
frame_system_id: envelope.frame?.systemId ??
|
|
244
|
+
frame_system_id: envelope.frame?.systemId ??
|
|
245
|
+
'unknown',
|
|
243
246
|
});
|
|
244
247
|
}
|
|
245
248
|
else {
|
|
@@ -320,7 +320,7 @@ export class UpstreamSessionManager extends TaskSpawner {
|
|
|
320
320
|
const callbackGrants = this.node.gatherSupportedCallbackGrants();
|
|
321
321
|
logger.debug('callback_grants_before_augmentation', {
|
|
322
322
|
count: callbackGrants.length,
|
|
323
|
-
types: callbackGrants.map(g => g.type),
|
|
323
|
+
types: callbackGrants.map((g) => g.type),
|
|
324
324
|
});
|
|
325
325
|
// Check if we should create a broadcast callback grant before processing connection grants
|
|
326
326
|
// This prevents adding duplicate broadcast grants
|
|
@@ -334,11 +334,12 @@ export class UpstreamSessionManager extends TaskSpawner {
|
|
|
334
334
|
});
|
|
335
335
|
// Include admission client's connection grants as callback grants
|
|
336
336
|
// This ensures DirectAdmissionClient grants are available for grant selection
|
|
337
|
-
if (welcome.frame.connectionGrants &&
|
|
337
|
+
if (welcome.frame.connectionGrants &&
|
|
338
|
+
Array.isArray(welcome.frame.connectionGrants)) {
|
|
338
339
|
for (const grant of welcome.frame.connectionGrants) {
|
|
339
340
|
if (grant && typeof grant === 'object') {
|
|
340
341
|
// Avoid duplicates by checking if grant already exists
|
|
341
|
-
const isDuplicate = callbackGrants.some(existing => JSON.stringify(existing) === JSON.stringify(grant));
|
|
342
|
+
const isDuplicate = callbackGrants.some((existing) => JSON.stringify(existing) === JSON.stringify(grant));
|
|
342
343
|
if (!isDuplicate) {
|
|
343
344
|
callbackGrants.push(grant);
|
|
344
345
|
logger.debug('added_connection_grant_as_callback', {
|
|
@@ -355,7 +356,8 @@ export class UpstreamSessionManager extends TaskSpawner {
|
|
|
355
356
|
}
|
|
356
357
|
// Add broadcast grant after connection grants to ensure we don't duplicate
|
|
357
358
|
// any broadcast grants that may have been in connectionGrants
|
|
358
|
-
if (broadcastCallbackGrant &&
|
|
359
|
+
if (broadcastCallbackGrant &&
|
|
360
|
+
this.shouldAdvertiseBroadcastGrant(grant, callbackGrants)) {
|
|
359
361
|
callbackGrants.push(broadcastCallbackGrant);
|
|
360
362
|
logger.debug('added_broadcast_callback_grant');
|
|
361
363
|
}
|
|
@@ -364,7 +366,7 @@ export class UpstreamSessionManager extends TaskSpawner {
|
|
|
364
366
|
}
|
|
365
367
|
logger.debug('callback_grants_after_augmentation', {
|
|
366
368
|
count: callbackGrants.length,
|
|
367
|
-
types: callbackGrants.map(g => g.type),
|
|
369
|
+
types: callbackGrants.map((g) => g.type),
|
|
368
370
|
});
|
|
369
371
|
const attachInfo = await this.attachClient.attach(this.node, this.outboundOriginType, connector, welcome.frame, this.wrappedHandler, this.getKeys() ?? undefined, callbackGrants);
|
|
370
372
|
this.targetSystemId = attachInfo.targetSystemId ?? null;
|
|
@@ -606,7 +608,8 @@ export class UpstreamSessionManager extends TaskSpawner {
|
|
|
606
608
|
continue;
|
|
607
609
|
}
|
|
608
610
|
// Reset ack time if just resumed from pause (prevents immediate timeout)
|
|
609
|
-
if (previousState === ConnectorState.PAUSED &&
|
|
611
|
+
if (previousState === ConnectorState.PAUSED &&
|
|
612
|
+
currentState === ConnectorState.STARTED) {
|
|
610
613
|
logger.debug('connector_just_resumed_resetting_ack_time', {
|
|
611
614
|
previous_state: previousState,
|
|
612
615
|
current_state: currentState,
|
|
@@ -58,19 +58,23 @@ function normalizeConfig(config) {
|
|
|
58
58
|
normalized.clientSecretConfig = normalizeSecretSource(clientSecretSource);
|
|
59
59
|
}
|
|
60
60
|
const audienceCandidate = candidate.audience ?? candidate.aud;
|
|
61
|
-
if (typeof audienceCandidate === 'string' &&
|
|
61
|
+
if (typeof audienceCandidate === 'string' &&
|
|
62
|
+
audienceCandidate.trim().length > 0) {
|
|
62
63
|
normalized.audience = audienceCandidate.trim();
|
|
63
64
|
}
|
|
64
65
|
const codeChallengeMethod = candidate.codeChallengeMethod ?? candidate.code_challenge_method;
|
|
65
|
-
if (typeof codeChallengeMethod === 'string' &&
|
|
66
|
+
if (typeof codeChallengeMethod === 'string' &&
|
|
67
|
+
codeChallengeMethod.trim().length > 0) {
|
|
66
68
|
normalized.codeChallengeMethod = codeChallengeMethod.trim();
|
|
67
69
|
}
|
|
68
70
|
const codeVerifierLength = candidate.codeVerifierLength ?? candidate.code_verifier_length;
|
|
69
|
-
if (typeof codeVerifierLength === 'number' &&
|
|
71
|
+
if (typeof codeVerifierLength === 'number' &&
|
|
72
|
+
Number.isFinite(codeVerifierLength)) {
|
|
70
73
|
normalized.codeVerifierLength = codeVerifierLength;
|
|
71
74
|
}
|
|
72
75
|
const clockSkewSeconds = candidate.clockSkewSeconds ?? candidate.clock_skew_seconds;
|
|
73
|
-
if (typeof clockSkewSeconds === 'number' &&
|
|
76
|
+
if (typeof clockSkewSeconds === 'number' &&
|
|
77
|
+
Number.isFinite(clockSkewSeconds)) {
|
|
74
78
|
normalized.clockSkewSeconds = clockSkewSeconds;
|
|
75
79
|
}
|
|
76
80
|
const loginHintParam = candidate.loginHintParam ?? candidate.login_hint_param;
|
|
@@ -115,8 +119,8 @@ export class OAuth2PkceTokenProviderFactory extends TokenProviderFactory {
|
|
|
115
119
|
options.audience = normalized.audience;
|
|
116
120
|
}
|
|
117
121
|
if (normalized.codeChallengeMethod) {
|
|
118
|
-
options.codeChallengeMethod =
|
|
119
|
-
.toUpperCase();
|
|
122
|
+
options.codeChallengeMethod =
|
|
123
|
+
normalized.codeChallengeMethod.toUpperCase();
|
|
120
124
|
}
|
|
121
125
|
if (normalized.codeVerifierLength) {
|
|
122
126
|
options.codeVerifierLength = normalized.codeVerifierLength;
|
|
@@ -64,8 +64,7 @@ function normalizeOptions(raw) {
|
|
|
64
64
|
const scopes = normalizeScopes(camel.scopes) ??
|
|
65
65
|
normalizeScopes(snake.scopes ?? snake.scope) ??
|
|
66
66
|
DEFAULT_SCOPES.slice();
|
|
67
|
-
const audience = coerceString(camel.audience) ??
|
|
68
|
-
coerceString(snake.audience ?? snake.aud);
|
|
67
|
+
const audience = coerceString(camel.audience) ?? coerceString(snake.audience ?? snake.aud);
|
|
69
68
|
const fetchImpl = (camel.fetchImpl ?? snake.fetch_impl);
|
|
70
69
|
const clockSkewSeconds = coerceNumber(camel.clockSkewSeconds) ??
|
|
71
70
|
coerceNumber(snake.clock_skew_seconds) ??
|
|
@@ -504,7 +504,8 @@ export class DefaultSecurityManager {
|
|
|
504
504
|
const hasSignature = Boolean(envelope.sec?.sig);
|
|
505
505
|
if (!hasSignature) {
|
|
506
506
|
const nodeSid = node.sid;
|
|
507
|
-
const envelopeSid = envelope
|
|
507
|
+
const envelopeSid = envelope
|
|
508
|
+
.sid;
|
|
508
509
|
const isLocalUnsignedSelfEnvelope = localContext.originType === DeliveryOriginType.LOCAL &&
|
|
509
510
|
typeof nodeSid === 'string' &&
|
|
510
511
|
nodeSid.length > 0 &&
|
|
@@ -47,7 +47,7 @@ export * from './signing/envelope-signer.js';
|
|
|
47
47
|
export * from './signing/envelope-verifier.js';
|
|
48
48
|
export { SigningConfig as SigningConfigClass, } from './signing/signing-config.js';
|
|
49
49
|
export { canonicalJson, decodeBase64Url, frameDigest, immutableHeaders, } from './signing/eddsa-signer-verifier.js';
|
|
50
|
-
export { encodeUtf8
|
|
50
|
+
export { encodeUtf8 } from './signing/eddsa-utils.js';
|
|
51
51
|
export { EdDSAEnvelopeSigner, } from './signing/eddsa-envelope-signer.js';
|
|
52
52
|
export * from './crypto/providers/crypto-provider.js';
|
|
53
53
|
export * from './crypto/providers/default-crypto-provider.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { NoopTrustStoreProvider, TrustStoreProviderFactory, TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE, } from
|
|
1
|
+
import { NoopTrustStoreProvider, TrustStoreProviderFactory, TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE, } from './trust-store-provider-factory.js';
|
|
2
2
|
export const FACTORY_META = {
|
|
3
3
|
base: TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE,
|
|
4
|
-
key:
|
|
4
|
+
key: 'NoopTrustStoreProvider',
|
|
5
5
|
isDefault: true,
|
|
6
6
|
priority: 10,
|
|
7
7
|
};
|
|
8
8
|
export class NoopTrustStoreProviderFactory extends TrustStoreProviderFactory {
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
|
-
this.type =
|
|
11
|
+
this.type = 'NoopTrustStoreProvider';
|
|
12
12
|
this.isDefault = true;
|
|
13
13
|
this.priority = 10;
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AbstractResourceFactory, createDefaultResource, createResource, } from
|
|
2
|
-
const DEFAULT_UNCONFIGURED_MESSAGE =
|
|
3
|
-
export const TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE =
|
|
1
|
+
import { AbstractResourceFactory, createDefaultResource, createResource, } from '@naylence/factory';
|
|
2
|
+
const DEFAULT_UNCONFIGURED_MESSAGE = 'Trust store is not configured. Set FAME_CA_CERTS to a PEM value, a file path, a data URI, or an HTTPS bundle URL.';
|
|
3
|
+
export const TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE = 'TrustStoreProviderFactory';
|
|
4
4
|
export class TrustStoreProviderFactory extends AbstractResourceFactory {
|
|
5
5
|
createUnconfiguredProvider(reason) {
|
|
6
6
|
return new NoopTrustStoreProvider(reason ?? DEFAULT_UNCONFIGURED_MESSAGE);
|
package/dist/esm/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated during build - do not edit manually
|
|
2
|
-
// Generated from package.json version: 0.3.
|
|
2
|
+
// Generated from package.json version: 0.3.7
|
|
3
3
|
/**
|
|
4
4
|
* The package version, injected at build time.
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export const VERSION = '0.3.
|
|
7
|
+
export const VERSION = '0.3.7';
|