@naylence/runtime 0.4.5 → 0.4.6
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 +61 -22
- package/dist/browser/index.mjs +62 -23
- package/dist/cjs/naylence/fame/security/auth/authorization-profile-factory.js +55 -17
- package/dist/cjs/naylence/fame/security/default-security-manager-factory.js +4 -3
- package/dist/cjs/version.js +2 -2
- package/dist/esm/naylence/fame/security/auth/authorization-profile-factory.js +56 -18
- package/dist/esm/naylence/fame/security/default-security-manager-factory.js +4 -3
- package/dist/esm/version.js +2 -2
- package/dist/node/index.cjs +61 -22
- package/dist/node/index.mjs +62 -23
- package/dist/node/node.cjs +61 -22
- package/dist/node/node.mjs +62 -23
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/node/index.cjs
CHANGED
|
@@ -14,12 +14,12 @@ var fastify = require('fastify');
|
|
|
14
14
|
var websocketPlugin = require('@fastify/websocket');
|
|
15
15
|
|
|
16
16
|
// This file is auto-generated during build - do not edit manually
|
|
17
|
-
// Generated from package.json version: 0.4.
|
|
17
|
+
// Generated from package.json version: 0.4.6
|
|
18
18
|
/**
|
|
19
19
|
* The package version, injected at build time.
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
const VERSION = '0.4.
|
|
22
|
+
const VERSION = '0.4.6';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -21828,14 +21828,13 @@ const ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE$1 = 'FAME_JWT_REVERSE_AUTH_AUDIENCE';
|
|
|
21828
21828
|
const ENV_VAR_HMAC_SECRET$1 = 'FAME_HMAC_SECRET';
|
|
21829
21829
|
const DEFAULT_REVERSE_AUTH_ISSUER = 'reverse-auth.naylence.ai';
|
|
21830
21830
|
const DEFAULT_REVERSE_AUTH_AUDIENCE = 'dev.naylence.ai';
|
|
21831
|
-
const DEFAULT_VERIFIER_CONFIG = {
|
|
21832
|
-
type: 'JWKSJWTTokenVerifier',
|
|
21833
|
-
jwks_url: factory.Expressions.env(ENV_VAR_JWKS_URL$1),
|
|
21834
|
-
issuer: factory.Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
|
|
21835
|
-
};
|
|
21836
21831
|
const DEFAULT_PROFILE = {
|
|
21837
21832
|
type: 'DefaultAuthorizer',
|
|
21838
|
-
verifier:
|
|
21833
|
+
verifier: {
|
|
21834
|
+
type: 'JWKSJWTTokenVerifier',
|
|
21835
|
+
jwks_url: factory.Expressions.env(ENV_VAR_JWKS_URL$1),
|
|
21836
|
+
issuer: factory.Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
|
|
21837
|
+
},
|
|
21839
21838
|
};
|
|
21840
21839
|
const OAUTH2_PROFILE = {
|
|
21841
21840
|
type: 'OAuth2Authorizer',
|
|
@@ -21880,6 +21879,11 @@ const OAUTH2_CALLBACK_PROFILE = {
|
|
|
21880
21879
|
const NOOP_PROFILE$2 = {
|
|
21881
21880
|
type: 'NoopAuthorizer',
|
|
21882
21881
|
};
|
|
21882
|
+
const DEFAULT_VERIFIER_CONFIG = {
|
|
21883
|
+
type: 'JWKSJWTTokenVerifier',
|
|
21884
|
+
jwks_url: factory.Expressions.env(ENV_VAR_JWKS_URL$1),
|
|
21885
|
+
issuer: factory.Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
|
|
21886
|
+
};
|
|
21883
21887
|
const DEFAULT_POLICY_SOURCE = {
|
|
21884
21888
|
type: 'LocalFileAuthorizationPolicySource',
|
|
21885
21889
|
path: factory.Expressions.env(ENV_VAR_AUTH_POLICY_PATH, './auth-policy.yaml'),
|
|
@@ -21931,13 +21935,55 @@ class AuthorizationProfileFactory extends AuthorizerFactory {
|
|
|
21931
21935
|
logger$K.debug('enabling_authorization_profile', {
|
|
21932
21936
|
profile: normalized.profile,
|
|
21933
21937
|
});
|
|
21934
|
-
|
|
21938
|
+
// Extract CreateResourceOptions from factoryArgs - it's typically the last object with env/config/variables
|
|
21939
|
+
const createOptions = extractCreateResourceOptions(factoryArgs);
|
|
21940
|
+
// Only evaluate expressions if we have env/config/variables available
|
|
21941
|
+
let evaluatedConfig = profileConfig;
|
|
21942
|
+
const hasContext = createOptions.env || createOptions.config || createOptions.variables;
|
|
21943
|
+
if (hasContext) {
|
|
21944
|
+
// Build validation context from createOptions to evaluate expressions
|
|
21945
|
+
const validationContext = {
|
|
21946
|
+
env: createOptions.env,
|
|
21947
|
+
config: createOptions.config,
|
|
21948
|
+
variables: createOptions.variables,
|
|
21949
|
+
allowUnknownProperties: true,
|
|
21950
|
+
};
|
|
21951
|
+
// Evaluate expressions in the profile config
|
|
21952
|
+
const validationResult = factory.configValidator.validate(profileConfig, validationContext);
|
|
21953
|
+
if (!validationResult.valid) {
|
|
21954
|
+
const errorMessages = validationResult.errors
|
|
21955
|
+
.map((error) => `${error.path || 'root'}: ${error.message}`)
|
|
21956
|
+
.join('; ');
|
|
21957
|
+
throw new Error(`Failed to evaluate authorization profile configuration: ${errorMessages}`);
|
|
21958
|
+
}
|
|
21959
|
+
evaluatedConfig = validationResult.config ?? profileConfig;
|
|
21960
|
+
}
|
|
21961
|
+
const authorizer = await AuthorizerFactory.createAuthorizer(evaluatedConfig, hasContext ? { validate: false } : { factoryArgs } // Pass factoryArgs if no validation was done
|
|
21962
|
+
);
|
|
21935
21963
|
if (!authorizer) {
|
|
21936
21964
|
throw new Error(`Failed to create authorizer for profile: ${normalized.profile}`);
|
|
21937
21965
|
}
|
|
21938
21966
|
return authorizer;
|
|
21939
21967
|
}
|
|
21940
21968
|
}
|
|
21969
|
+
/**
|
|
21970
|
+
* Extracts CreateResourceOptions from factoryArgs.
|
|
21971
|
+
* The factory system passes CreateResourceOptions as an object in factoryArgs.
|
|
21972
|
+
*/
|
|
21973
|
+
function extractCreateResourceOptions(factoryArgs) {
|
|
21974
|
+
// Find the last object argument that looks like CreateResourceOptions
|
|
21975
|
+
for (let i = factoryArgs.length - 1; i >= 0; i--) {
|
|
21976
|
+
const arg = factoryArgs[i];
|
|
21977
|
+
if (arg && typeof arg === 'object' && !Array.isArray(arg)) {
|
|
21978
|
+
const candidate = arg;
|
|
21979
|
+
// Check if it has typical CreateResourceOptions properties
|
|
21980
|
+
if ('env' in candidate || 'config' in candidate || 'variables' in candidate || 'factoryArgs' in candidate) {
|
|
21981
|
+
return candidate;
|
|
21982
|
+
}
|
|
21983
|
+
}
|
|
21984
|
+
}
|
|
21985
|
+
return {};
|
|
21986
|
+
}
|
|
21941
21987
|
function normalizeConfig$w(config) {
|
|
21942
21988
|
if (!config) {
|
|
21943
21989
|
return { profile: PROFILE_NAME_OAUTH2 };
|
|
@@ -21949,21 +21995,13 @@ function normalizeConfig$w(config) {
|
|
|
21949
21995
|
return { profile: canonicalProfile };
|
|
21950
21996
|
}
|
|
21951
21997
|
function resolveProfileName$2(candidate) {
|
|
21952
|
-
|
|
21953
|
-
if (direct && factory.ExpressionEvaluator.isExpression(direct)) {
|
|
21954
|
-
const evaluated = factory.ExpressionEvaluator.evaluate(direct);
|
|
21955
|
-
direct = coerceProfileString$2(evaluated);
|
|
21956
|
-
}
|
|
21998
|
+
const direct = coerceProfileString$2(candidate.profile);
|
|
21957
21999
|
if (direct) {
|
|
21958
22000
|
return direct;
|
|
21959
22001
|
}
|
|
21960
22002
|
const legacyKeys = ['profile_name', 'profileName'];
|
|
21961
22003
|
for (const legacyKey of legacyKeys) {
|
|
21962
|
-
|
|
21963
|
-
if (legacyValue && factory.ExpressionEvaluator.isExpression(legacyValue)) {
|
|
21964
|
-
const evaluated = factory.ExpressionEvaluator.evaluate(legacyValue);
|
|
21965
|
-
legacyValue = coerceProfileString$2(evaluated);
|
|
21966
|
-
}
|
|
22004
|
+
const legacyValue = coerceProfileString$2(candidate[legacyKey]);
|
|
21967
22005
|
if (legacyValue) {
|
|
21968
22006
|
return legacyValue;
|
|
21969
22007
|
}
|
|
@@ -35965,7 +36003,7 @@ class DefaultSecurityManagerFactory extends SecurityManagerFactory {
|
|
|
35965
36003
|
}
|
|
35966
36004
|
if (!authorizer) {
|
|
35967
36005
|
authorizer =
|
|
35968
|
-
await DefaultSecurityManagerFactory.createAuthorizerFromConfig(config, policy);
|
|
36006
|
+
await DefaultSecurityManagerFactory.createAuthorizerFromConfig(config, policy, createOptions);
|
|
35969
36007
|
}
|
|
35970
36008
|
if (authorizer &&
|
|
35971
36009
|
eventListeners &&
|
|
@@ -36196,14 +36234,14 @@ class DefaultSecurityManagerFactory extends SecurityManagerFactory {
|
|
|
36196
36234
|
}
|
|
36197
36235
|
return null;
|
|
36198
36236
|
}
|
|
36199
|
-
static async createAuthorizerFromConfig(config, policy) {
|
|
36237
|
+
static async createAuthorizerFromConfig(config, policy, createOptions) {
|
|
36200
36238
|
let authorizerConfig = config.authorizer ?? null;
|
|
36201
36239
|
if (!authorizerConfig) {
|
|
36202
36240
|
authorizerConfig = config.authorizer_config ?? null;
|
|
36203
36241
|
}
|
|
36204
36242
|
if (authorizerConfig &&
|
|
36205
36243
|
DefaultSecurityManagerFactory.isConfigLike(authorizerConfig)) {
|
|
36206
|
-
return ((await AuthorizerFactory.createAuthorizer(authorizerConfig)) ?? null);
|
|
36244
|
+
return ((await AuthorizerFactory.createAuthorizer(authorizerConfig, createOptions ?? undefined)) ?? null);
|
|
36207
36245
|
}
|
|
36208
36246
|
try {
|
|
36209
36247
|
const requirements = policy.requirements?.();
|
|
@@ -36219,6 +36257,7 @@ class DefaultSecurityManagerFactory extends SecurityManagerFactory {
|
|
|
36219
36257
|
}
|
|
36220
36258
|
const tokenVerifier = new NoopTokenVerifier();
|
|
36221
36259
|
return ((await AuthorizerFactory.createAuthorizer(null, {
|
|
36260
|
+
...createOptions,
|
|
36222
36261
|
factoryArgs: [tokenVerifier],
|
|
36223
36262
|
})) ?? null);
|
|
36224
36263
|
}
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseAddressComponents, FlowFlags, FameAddress, DEFAULT_POLLING_TIMEOUT_MS, extractEnvelopeAndContext, createChannelMessage, generateId, createFameEnvelope, parseAddress, formatAddress, formatAddressFromComponents, FameResponseType, localDeliveryContext, Binding, DeliveryOriginType, makeResponse, isFameMessageResponse, parseRequest, makeRequest, DEFAULT_INVOKE_TIMEOUT_MILLIS, parseResponse, ConnectorState, ConnectorStateUtils, FameFabric, isFameMessageService, isFameRPCService, FameServiceProxy, generateIdAsync, snakeToCamelObject, getDefaultFameConfigResolver, setDefaultFameConfigResolver, SigningMaterial, AuthorizationContextSchema, FameDeliveryContextSchema, SecurityContextSchema, withFabric, FameEnvelopeSchema, SINK_CAPABILITY, FameFabricFactory, serializeEnvelope, createAuthorizationContext, deserializeEnvelope, FameChannelMessage } from '@naylence/core';
|
|
2
2
|
export * from '@naylence/core';
|
|
3
3
|
import { z, ZodError } from 'zod';
|
|
4
|
-
import { AbstractResourceFactory, createResource as createResource$1, createDefaultResource, registerFactory, Expressions, ExtensionManager, ExpressionEvaluationPolicy, Registry,
|
|
4
|
+
import { AbstractResourceFactory, createResource as createResource$1, createDefaultResource, registerFactory, Expressions, ExtensionManager, ExpressionEvaluationPolicy, Registry, configValidator } from '@naylence/factory';
|
|
5
5
|
import { sign, hashes, verify } from '@noble/ed25519';
|
|
6
6
|
import { sha256, sha512 } from '@noble/hashes/sha2.js';
|
|
7
7
|
import { chacha20poly1305 } from '@noble/ciphers/chacha.js';
|
|
@@ -13,12 +13,12 @@ import fastify from 'fastify';
|
|
|
13
13
|
import websocketPlugin from '@fastify/websocket';
|
|
14
14
|
|
|
15
15
|
// This file is auto-generated during build - do not edit manually
|
|
16
|
-
// Generated from package.json version: 0.4.
|
|
16
|
+
// Generated from package.json version: 0.4.6
|
|
17
17
|
/**
|
|
18
18
|
* The package version, injected at build time.
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
const VERSION = '0.4.
|
|
21
|
+
const VERSION = '0.4.6';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -21827,14 +21827,13 @@ const ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE$1 = 'FAME_JWT_REVERSE_AUTH_AUDIENCE';
|
|
|
21827
21827
|
const ENV_VAR_HMAC_SECRET$1 = 'FAME_HMAC_SECRET';
|
|
21828
21828
|
const DEFAULT_REVERSE_AUTH_ISSUER = 'reverse-auth.naylence.ai';
|
|
21829
21829
|
const DEFAULT_REVERSE_AUTH_AUDIENCE = 'dev.naylence.ai';
|
|
21830
|
-
const DEFAULT_VERIFIER_CONFIG = {
|
|
21831
|
-
type: 'JWKSJWTTokenVerifier',
|
|
21832
|
-
jwks_url: Expressions.env(ENV_VAR_JWKS_URL$1),
|
|
21833
|
-
issuer: Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
|
|
21834
|
-
};
|
|
21835
21830
|
const DEFAULT_PROFILE = {
|
|
21836
21831
|
type: 'DefaultAuthorizer',
|
|
21837
|
-
verifier:
|
|
21832
|
+
verifier: {
|
|
21833
|
+
type: 'JWKSJWTTokenVerifier',
|
|
21834
|
+
jwks_url: Expressions.env(ENV_VAR_JWKS_URL$1),
|
|
21835
|
+
issuer: Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
|
|
21836
|
+
},
|
|
21838
21837
|
};
|
|
21839
21838
|
const OAUTH2_PROFILE = {
|
|
21840
21839
|
type: 'OAuth2Authorizer',
|
|
@@ -21879,6 +21878,11 @@ const OAUTH2_CALLBACK_PROFILE = {
|
|
|
21879
21878
|
const NOOP_PROFILE$2 = {
|
|
21880
21879
|
type: 'NoopAuthorizer',
|
|
21881
21880
|
};
|
|
21881
|
+
const DEFAULT_VERIFIER_CONFIG = {
|
|
21882
|
+
type: 'JWKSJWTTokenVerifier',
|
|
21883
|
+
jwks_url: Expressions.env(ENV_VAR_JWKS_URL$1),
|
|
21884
|
+
issuer: Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
|
|
21885
|
+
};
|
|
21882
21886
|
const DEFAULT_POLICY_SOURCE = {
|
|
21883
21887
|
type: 'LocalFileAuthorizationPolicySource',
|
|
21884
21888
|
path: Expressions.env(ENV_VAR_AUTH_POLICY_PATH, './auth-policy.yaml'),
|
|
@@ -21930,13 +21934,55 @@ class AuthorizationProfileFactory extends AuthorizerFactory {
|
|
|
21930
21934
|
logger$K.debug('enabling_authorization_profile', {
|
|
21931
21935
|
profile: normalized.profile,
|
|
21932
21936
|
});
|
|
21933
|
-
|
|
21937
|
+
// Extract CreateResourceOptions from factoryArgs - it's typically the last object with env/config/variables
|
|
21938
|
+
const createOptions = extractCreateResourceOptions(factoryArgs);
|
|
21939
|
+
// Only evaluate expressions if we have env/config/variables available
|
|
21940
|
+
let evaluatedConfig = profileConfig;
|
|
21941
|
+
const hasContext = createOptions.env || createOptions.config || createOptions.variables;
|
|
21942
|
+
if (hasContext) {
|
|
21943
|
+
// Build validation context from createOptions to evaluate expressions
|
|
21944
|
+
const validationContext = {
|
|
21945
|
+
env: createOptions.env,
|
|
21946
|
+
config: createOptions.config,
|
|
21947
|
+
variables: createOptions.variables,
|
|
21948
|
+
allowUnknownProperties: true,
|
|
21949
|
+
};
|
|
21950
|
+
// Evaluate expressions in the profile config
|
|
21951
|
+
const validationResult = configValidator.validate(profileConfig, validationContext);
|
|
21952
|
+
if (!validationResult.valid) {
|
|
21953
|
+
const errorMessages = validationResult.errors
|
|
21954
|
+
.map((error) => `${error.path || 'root'}: ${error.message}`)
|
|
21955
|
+
.join('; ');
|
|
21956
|
+
throw new Error(`Failed to evaluate authorization profile configuration: ${errorMessages}`);
|
|
21957
|
+
}
|
|
21958
|
+
evaluatedConfig = validationResult.config ?? profileConfig;
|
|
21959
|
+
}
|
|
21960
|
+
const authorizer = await AuthorizerFactory.createAuthorizer(evaluatedConfig, hasContext ? { validate: false } : { factoryArgs } // Pass factoryArgs if no validation was done
|
|
21961
|
+
);
|
|
21934
21962
|
if (!authorizer) {
|
|
21935
21963
|
throw new Error(`Failed to create authorizer for profile: ${normalized.profile}`);
|
|
21936
21964
|
}
|
|
21937
21965
|
return authorizer;
|
|
21938
21966
|
}
|
|
21939
21967
|
}
|
|
21968
|
+
/**
|
|
21969
|
+
* Extracts CreateResourceOptions from factoryArgs.
|
|
21970
|
+
* The factory system passes CreateResourceOptions as an object in factoryArgs.
|
|
21971
|
+
*/
|
|
21972
|
+
function extractCreateResourceOptions(factoryArgs) {
|
|
21973
|
+
// Find the last object argument that looks like CreateResourceOptions
|
|
21974
|
+
for (let i = factoryArgs.length - 1; i >= 0; i--) {
|
|
21975
|
+
const arg = factoryArgs[i];
|
|
21976
|
+
if (arg && typeof arg === 'object' && !Array.isArray(arg)) {
|
|
21977
|
+
const candidate = arg;
|
|
21978
|
+
// Check if it has typical CreateResourceOptions properties
|
|
21979
|
+
if ('env' in candidate || 'config' in candidate || 'variables' in candidate || 'factoryArgs' in candidate) {
|
|
21980
|
+
return candidate;
|
|
21981
|
+
}
|
|
21982
|
+
}
|
|
21983
|
+
}
|
|
21984
|
+
return {};
|
|
21985
|
+
}
|
|
21940
21986
|
function normalizeConfig$w(config) {
|
|
21941
21987
|
if (!config) {
|
|
21942
21988
|
return { profile: PROFILE_NAME_OAUTH2 };
|
|
@@ -21948,21 +21994,13 @@ function normalizeConfig$w(config) {
|
|
|
21948
21994
|
return { profile: canonicalProfile };
|
|
21949
21995
|
}
|
|
21950
21996
|
function resolveProfileName$2(candidate) {
|
|
21951
|
-
|
|
21952
|
-
if (direct && ExpressionEvaluator.isExpression(direct)) {
|
|
21953
|
-
const evaluated = ExpressionEvaluator.evaluate(direct);
|
|
21954
|
-
direct = coerceProfileString$2(evaluated);
|
|
21955
|
-
}
|
|
21997
|
+
const direct = coerceProfileString$2(candidate.profile);
|
|
21956
21998
|
if (direct) {
|
|
21957
21999
|
return direct;
|
|
21958
22000
|
}
|
|
21959
22001
|
const legacyKeys = ['profile_name', 'profileName'];
|
|
21960
22002
|
for (const legacyKey of legacyKeys) {
|
|
21961
|
-
|
|
21962
|
-
if (legacyValue && ExpressionEvaluator.isExpression(legacyValue)) {
|
|
21963
|
-
const evaluated = ExpressionEvaluator.evaluate(legacyValue);
|
|
21964
|
-
legacyValue = coerceProfileString$2(evaluated);
|
|
21965
|
-
}
|
|
22003
|
+
const legacyValue = coerceProfileString$2(candidate[legacyKey]);
|
|
21966
22004
|
if (legacyValue) {
|
|
21967
22005
|
return legacyValue;
|
|
21968
22006
|
}
|
|
@@ -35964,7 +36002,7 @@ class DefaultSecurityManagerFactory extends SecurityManagerFactory {
|
|
|
35964
36002
|
}
|
|
35965
36003
|
if (!authorizer) {
|
|
35966
36004
|
authorizer =
|
|
35967
|
-
await DefaultSecurityManagerFactory.createAuthorizerFromConfig(config, policy);
|
|
36005
|
+
await DefaultSecurityManagerFactory.createAuthorizerFromConfig(config, policy, createOptions);
|
|
35968
36006
|
}
|
|
35969
36007
|
if (authorizer &&
|
|
35970
36008
|
eventListeners &&
|
|
@@ -36195,14 +36233,14 @@ class DefaultSecurityManagerFactory extends SecurityManagerFactory {
|
|
|
36195
36233
|
}
|
|
36196
36234
|
return null;
|
|
36197
36235
|
}
|
|
36198
|
-
static async createAuthorizerFromConfig(config, policy) {
|
|
36236
|
+
static async createAuthorizerFromConfig(config, policy, createOptions) {
|
|
36199
36237
|
let authorizerConfig = config.authorizer ?? null;
|
|
36200
36238
|
if (!authorizerConfig) {
|
|
36201
36239
|
authorizerConfig = config.authorizer_config ?? null;
|
|
36202
36240
|
}
|
|
36203
36241
|
if (authorizerConfig &&
|
|
36204
36242
|
DefaultSecurityManagerFactory.isConfigLike(authorizerConfig)) {
|
|
36205
|
-
return ((await AuthorizerFactory.createAuthorizer(authorizerConfig)) ?? null);
|
|
36243
|
+
return ((await AuthorizerFactory.createAuthorizer(authorizerConfig, createOptions ?? undefined)) ?? null);
|
|
36206
36244
|
}
|
|
36207
36245
|
try {
|
|
36208
36246
|
const requirements = policy.requirements?.();
|
|
@@ -36218,6 +36256,7 @@ class DefaultSecurityManagerFactory extends SecurityManagerFactory {
|
|
|
36218
36256
|
}
|
|
36219
36257
|
const tokenVerifier = new NoopTokenVerifier();
|
|
36220
36258
|
return ((await AuthorizerFactory.createAuthorizer(null, {
|
|
36259
|
+
...createOptions,
|
|
36221
36260
|
factoryArgs: [tokenVerifier],
|
|
36222
36261
|
})) ?? null);
|
|
36223
36262
|
}
|
package/dist/node/node.cjs
CHANGED
|
@@ -4436,12 +4436,12 @@ async function ensureRuntimeFactoriesRegistered(registry = factory.Registry) {
|
|
|
4436
4436
|
}
|
|
4437
4437
|
|
|
4438
4438
|
// This file is auto-generated during build - do not edit manually
|
|
4439
|
-
// Generated from package.json version: 0.4.
|
|
4439
|
+
// Generated from package.json version: 0.4.6
|
|
4440
4440
|
/**
|
|
4441
4441
|
* The package version, injected at build time.
|
|
4442
4442
|
* @internal
|
|
4443
4443
|
*/
|
|
4444
|
-
const VERSION = '0.4.
|
|
4444
|
+
const VERSION = '0.4.6';
|
|
4445
4445
|
|
|
4446
4446
|
let initialized = false;
|
|
4447
4447
|
const runtimePlugin = {
|
|
@@ -23033,14 +23033,13 @@ const ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE$1 = 'FAME_JWT_REVERSE_AUTH_AUDIENCE';
|
|
|
23033
23033
|
const ENV_VAR_HMAC_SECRET$1 = 'FAME_HMAC_SECRET';
|
|
23034
23034
|
const DEFAULT_REVERSE_AUTH_ISSUER = 'reverse-auth.naylence.ai';
|
|
23035
23035
|
const DEFAULT_REVERSE_AUTH_AUDIENCE = 'dev.naylence.ai';
|
|
23036
|
-
const DEFAULT_VERIFIER_CONFIG = {
|
|
23037
|
-
type: 'JWKSJWTTokenVerifier',
|
|
23038
|
-
jwks_url: factory.Expressions.env(ENV_VAR_JWKS_URL$1),
|
|
23039
|
-
issuer: factory.Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
|
|
23040
|
-
};
|
|
23041
23036
|
const DEFAULT_PROFILE = {
|
|
23042
23037
|
type: 'DefaultAuthorizer',
|
|
23043
|
-
verifier:
|
|
23038
|
+
verifier: {
|
|
23039
|
+
type: 'JWKSJWTTokenVerifier',
|
|
23040
|
+
jwks_url: factory.Expressions.env(ENV_VAR_JWKS_URL$1),
|
|
23041
|
+
issuer: factory.Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
|
|
23042
|
+
},
|
|
23044
23043
|
};
|
|
23045
23044
|
const OAUTH2_PROFILE = {
|
|
23046
23045
|
type: 'OAuth2Authorizer',
|
|
@@ -23085,6 +23084,11 @@ const OAUTH2_CALLBACK_PROFILE = {
|
|
|
23085
23084
|
const NOOP_PROFILE$2 = {
|
|
23086
23085
|
type: 'NoopAuthorizer',
|
|
23087
23086
|
};
|
|
23087
|
+
const DEFAULT_VERIFIER_CONFIG = {
|
|
23088
|
+
type: 'JWKSJWTTokenVerifier',
|
|
23089
|
+
jwks_url: factory.Expressions.env(ENV_VAR_JWKS_URL$1),
|
|
23090
|
+
issuer: factory.Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
|
|
23091
|
+
};
|
|
23088
23092
|
const DEFAULT_POLICY_SOURCE = {
|
|
23089
23093
|
type: 'LocalFileAuthorizationPolicySource',
|
|
23090
23094
|
path: factory.Expressions.env(ENV_VAR_AUTH_POLICY_PATH, './auth-policy.yaml'),
|
|
@@ -23136,13 +23140,55 @@ class AuthorizationProfileFactory extends AuthorizerFactory {
|
|
|
23136
23140
|
logger$N.debug('enabling_authorization_profile', {
|
|
23137
23141
|
profile: normalized.profile,
|
|
23138
23142
|
});
|
|
23139
|
-
|
|
23143
|
+
// Extract CreateResourceOptions from factoryArgs - it's typically the last object with env/config/variables
|
|
23144
|
+
const createOptions = extractCreateResourceOptions(factoryArgs);
|
|
23145
|
+
// Only evaluate expressions if we have env/config/variables available
|
|
23146
|
+
let evaluatedConfig = profileConfig;
|
|
23147
|
+
const hasContext = createOptions.env || createOptions.config || createOptions.variables;
|
|
23148
|
+
if (hasContext) {
|
|
23149
|
+
// Build validation context from createOptions to evaluate expressions
|
|
23150
|
+
const validationContext = {
|
|
23151
|
+
env: createOptions.env,
|
|
23152
|
+
config: createOptions.config,
|
|
23153
|
+
variables: createOptions.variables,
|
|
23154
|
+
allowUnknownProperties: true,
|
|
23155
|
+
};
|
|
23156
|
+
// Evaluate expressions in the profile config
|
|
23157
|
+
const validationResult = factory.configValidator.validate(profileConfig, validationContext);
|
|
23158
|
+
if (!validationResult.valid) {
|
|
23159
|
+
const errorMessages = validationResult.errors
|
|
23160
|
+
.map((error) => `${error.path || 'root'}: ${error.message}`)
|
|
23161
|
+
.join('; ');
|
|
23162
|
+
throw new Error(`Failed to evaluate authorization profile configuration: ${errorMessages}`);
|
|
23163
|
+
}
|
|
23164
|
+
evaluatedConfig = validationResult.config ?? profileConfig;
|
|
23165
|
+
}
|
|
23166
|
+
const authorizer = await AuthorizerFactory.createAuthorizer(evaluatedConfig, hasContext ? { validate: false } : { factoryArgs } // Pass factoryArgs if no validation was done
|
|
23167
|
+
);
|
|
23140
23168
|
if (!authorizer) {
|
|
23141
23169
|
throw new Error(`Failed to create authorizer for profile: ${normalized.profile}`);
|
|
23142
23170
|
}
|
|
23143
23171
|
return authorizer;
|
|
23144
23172
|
}
|
|
23145
23173
|
}
|
|
23174
|
+
/**
|
|
23175
|
+
* Extracts CreateResourceOptions from factoryArgs.
|
|
23176
|
+
* The factory system passes CreateResourceOptions as an object in factoryArgs.
|
|
23177
|
+
*/
|
|
23178
|
+
function extractCreateResourceOptions(factoryArgs) {
|
|
23179
|
+
// Find the last object argument that looks like CreateResourceOptions
|
|
23180
|
+
for (let i = factoryArgs.length - 1; i >= 0; i--) {
|
|
23181
|
+
const arg = factoryArgs[i];
|
|
23182
|
+
if (arg && typeof arg === 'object' && !Array.isArray(arg)) {
|
|
23183
|
+
const candidate = arg;
|
|
23184
|
+
// Check if it has typical CreateResourceOptions properties
|
|
23185
|
+
if ('env' in candidate || 'config' in candidate || 'variables' in candidate || 'factoryArgs' in candidate) {
|
|
23186
|
+
return candidate;
|
|
23187
|
+
}
|
|
23188
|
+
}
|
|
23189
|
+
}
|
|
23190
|
+
return {};
|
|
23191
|
+
}
|
|
23146
23192
|
function normalizeConfig$w(config) {
|
|
23147
23193
|
if (!config) {
|
|
23148
23194
|
return { profile: PROFILE_NAME_OAUTH2 };
|
|
@@ -23154,21 +23200,13 @@ function normalizeConfig$w(config) {
|
|
|
23154
23200
|
return { profile: canonicalProfile };
|
|
23155
23201
|
}
|
|
23156
23202
|
function resolveProfileName$2(candidate) {
|
|
23157
|
-
|
|
23158
|
-
if (direct && factory.ExpressionEvaluator.isExpression(direct)) {
|
|
23159
|
-
const evaluated = factory.ExpressionEvaluator.evaluate(direct);
|
|
23160
|
-
direct = coerceProfileString$2(evaluated);
|
|
23161
|
-
}
|
|
23203
|
+
const direct = coerceProfileString$2(candidate.profile);
|
|
23162
23204
|
if (direct) {
|
|
23163
23205
|
return direct;
|
|
23164
23206
|
}
|
|
23165
23207
|
const legacyKeys = ['profile_name', 'profileName'];
|
|
23166
23208
|
for (const legacyKey of legacyKeys) {
|
|
23167
|
-
|
|
23168
|
-
if (legacyValue && factory.ExpressionEvaluator.isExpression(legacyValue)) {
|
|
23169
|
-
const evaluated = factory.ExpressionEvaluator.evaluate(legacyValue);
|
|
23170
|
-
legacyValue = coerceProfileString$2(evaluated);
|
|
23171
|
-
}
|
|
23209
|
+
const legacyValue = coerceProfileString$2(candidate[legacyKey]);
|
|
23172
23210
|
if (legacyValue) {
|
|
23173
23211
|
return legacyValue;
|
|
23174
23212
|
}
|
|
@@ -40722,7 +40760,7 @@ class DefaultSecurityManagerFactory extends SecurityManagerFactory {
|
|
|
40722
40760
|
}
|
|
40723
40761
|
if (!authorizer) {
|
|
40724
40762
|
authorizer =
|
|
40725
|
-
await DefaultSecurityManagerFactory.createAuthorizerFromConfig(config, policy);
|
|
40763
|
+
await DefaultSecurityManagerFactory.createAuthorizerFromConfig(config, policy, createOptions);
|
|
40726
40764
|
}
|
|
40727
40765
|
if (authorizer &&
|
|
40728
40766
|
eventListeners &&
|
|
@@ -40953,14 +40991,14 @@ class DefaultSecurityManagerFactory extends SecurityManagerFactory {
|
|
|
40953
40991
|
}
|
|
40954
40992
|
return null;
|
|
40955
40993
|
}
|
|
40956
|
-
static async createAuthorizerFromConfig(config, policy) {
|
|
40994
|
+
static async createAuthorizerFromConfig(config, policy, createOptions) {
|
|
40957
40995
|
let authorizerConfig = config.authorizer ?? null;
|
|
40958
40996
|
if (!authorizerConfig) {
|
|
40959
40997
|
authorizerConfig = config.authorizer_config ?? null;
|
|
40960
40998
|
}
|
|
40961
40999
|
if (authorizerConfig &&
|
|
40962
41000
|
DefaultSecurityManagerFactory.isConfigLike(authorizerConfig)) {
|
|
40963
|
-
return ((await AuthorizerFactory.createAuthorizer(authorizerConfig)) ?? null);
|
|
41001
|
+
return ((await AuthorizerFactory.createAuthorizer(authorizerConfig, createOptions ?? undefined)) ?? null);
|
|
40964
41002
|
}
|
|
40965
41003
|
try {
|
|
40966
41004
|
const requirements = policy.requirements?.();
|
|
@@ -40976,6 +41014,7 @@ class DefaultSecurityManagerFactory extends SecurityManagerFactory {
|
|
|
40976
41014
|
}
|
|
40977
41015
|
const tokenVerifier = new NoopTokenVerifier();
|
|
40978
41016
|
return ((await AuthorizerFactory.createAuthorizer(null, {
|
|
41017
|
+
...createOptions,
|
|
40979
41018
|
factoryArgs: [tokenVerifier],
|
|
40980
41019
|
})) ?? null);
|
|
40981
41020
|
}
|
package/dist/node/node.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FlowFlags, ConnectorState, generateId, ConnectorStateUtils, FameResponseType, createFameEnvelope, parseAddressComponents, FameAddress, DEFAULT_POLLING_TIMEOUT_MS, extractEnvelopeAndContext, createChannelMessage, parseAddress, formatAddress, formatAddressFromComponents, localDeliveryContext, Binding, DeliveryOriginType, makeResponse, isFameMessageResponse, parseRequest, makeRequest, DEFAULT_INVOKE_TIMEOUT_MILLIS, parseResponse, FameFabric, isFameMessageService, isFameRPCService, FameServiceProxy, generateIdAsync, snakeToCamelObject, getDefaultFameConfigResolver, setDefaultFameConfigResolver, SigningMaterial, AuthorizationContextSchema, FameDeliveryContextSchema, SecurityContextSchema, withFabric, FameEnvelopeSchema, serializeEnvelope, FameChannelMessage, deserializeEnvelope, SINK_CAPABILITY, FameFabricFactory, createAuthorizationContext } from '@naylence/core';
|
|
2
2
|
export * from '@naylence/core';
|
|
3
|
-
import { ExtensionManager, ExpressionEvaluationPolicy, AbstractResourceFactory, createResource as createResource$1, createDefaultResource, Registry, registerFactory, Expressions,
|
|
3
|
+
import { ExtensionManager, ExpressionEvaluationPolicy, AbstractResourceFactory, createResource as createResource$1, createDefaultResource, Registry, registerFactory, Expressions, configValidator } from '@naylence/factory';
|
|
4
4
|
import { z, ZodError } from 'zod';
|
|
5
5
|
import fs from 'node:fs';
|
|
6
6
|
import fsPromises from 'node:fs/promises';
|
|
@@ -4435,12 +4435,12 @@ async function ensureRuntimeFactoriesRegistered(registry = Registry) {
|
|
|
4435
4435
|
}
|
|
4436
4436
|
|
|
4437
4437
|
// This file is auto-generated during build - do not edit manually
|
|
4438
|
-
// Generated from package.json version: 0.4.
|
|
4438
|
+
// Generated from package.json version: 0.4.6
|
|
4439
4439
|
/**
|
|
4440
4440
|
* The package version, injected at build time.
|
|
4441
4441
|
* @internal
|
|
4442
4442
|
*/
|
|
4443
|
-
const VERSION = '0.4.
|
|
4443
|
+
const VERSION = '0.4.6';
|
|
4444
4444
|
|
|
4445
4445
|
let initialized = false;
|
|
4446
4446
|
const runtimePlugin = {
|
|
@@ -23032,14 +23032,13 @@ const ENV_VAR_JWT_REVERSE_AUTH_AUDIENCE$1 = 'FAME_JWT_REVERSE_AUTH_AUDIENCE';
|
|
|
23032
23032
|
const ENV_VAR_HMAC_SECRET$1 = 'FAME_HMAC_SECRET';
|
|
23033
23033
|
const DEFAULT_REVERSE_AUTH_ISSUER = 'reverse-auth.naylence.ai';
|
|
23034
23034
|
const DEFAULT_REVERSE_AUTH_AUDIENCE = 'dev.naylence.ai';
|
|
23035
|
-
const DEFAULT_VERIFIER_CONFIG = {
|
|
23036
|
-
type: 'JWKSJWTTokenVerifier',
|
|
23037
|
-
jwks_url: Expressions.env(ENV_VAR_JWKS_URL$1),
|
|
23038
|
-
issuer: Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
|
|
23039
|
-
};
|
|
23040
23035
|
const DEFAULT_PROFILE = {
|
|
23041
23036
|
type: 'DefaultAuthorizer',
|
|
23042
|
-
verifier:
|
|
23037
|
+
verifier: {
|
|
23038
|
+
type: 'JWKSJWTTokenVerifier',
|
|
23039
|
+
jwks_url: Expressions.env(ENV_VAR_JWKS_URL$1),
|
|
23040
|
+
issuer: Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
|
|
23041
|
+
},
|
|
23043
23042
|
};
|
|
23044
23043
|
const OAUTH2_PROFILE = {
|
|
23045
23044
|
type: 'OAuth2Authorizer',
|
|
@@ -23084,6 +23083,11 @@ const OAUTH2_CALLBACK_PROFILE = {
|
|
|
23084
23083
|
const NOOP_PROFILE$2 = {
|
|
23085
23084
|
type: 'NoopAuthorizer',
|
|
23086
23085
|
};
|
|
23086
|
+
const DEFAULT_VERIFIER_CONFIG = {
|
|
23087
|
+
type: 'JWKSJWTTokenVerifier',
|
|
23088
|
+
jwks_url: Expressions.env(ENV_VAR_JWKS_URL$1),
|
|
23089
|
+
issuer: Expressions.env(ENV_VAR_JWT_TRUSTED_ISSUER$1),
|
|
23090
|
+
};
|
|
23087
23091
|
const DEFAULT_POLICY_SOURCE = {
|
|
23088
23092
|
type: 'LocalFileAuthorizationPolicySource',
|
|
23089
23093
|
path: Expressions.env(ENV_VAR_AUTH_POLICY_PATH, './auth-policy.yaml'),
|
|
@@ -23135,13 +23139,55 @@ class AuthorizationProfileFactory extends AuthorizerFactory {
|
|
|
23135
23139
|
logger$N.debug('enabling_authorization_profile', {
|
|
23136
23140
|
profile: normalized.profile,
|
|
23137
23141
|
});
|
|
23138
|
-
|
|
23142
|
+
// Extract CreateResourceOptions from factoryArgs - it's typically the last object with env/config/variables
|
|
23143
|
+
const createOptions = extractCreateResourceOptions(factoryArgs);
|
|
23144
|
+
// Only evaluate expressions if we have env/config/variables available
|
|
23145
|
+
let evaluatedConfig = profileConfig;
|
|
23146
|
+
const hasContext = createOptions.env || createOptions.config || createOptions.variables;
|
|
23147
|
+
if (hasContext) {
|
|
23148
|
+
// Build validation context from createOptions to evaluate expressions
|
|
23149
|
+
const validationContext = {
|
|
23150
|
+
env: createOptions.env,
|
|
23151
|
+
config: createOptions.config,
|
|
23152
|
+
variables: createOptions.variables,
|
|
23153
|
+
allowUnknownProperties: true,
|
|
23154
|
+
};
|
|
23155
|
+
// Evaluate expressions in the profile config
|
|
23156
|
+
const validationResult = configValidator.validate(profileConfig, validationContext);
|
|
23157
|
+
if (!validationResult.valid) {
|
|
23158
|
+
const errorMessages = validationResult.errors
|
|
23159
|
+
.map((error) => `${error.path || 'root'}: ${error.message}`)
|
|
23160
|
+
.join('; ');
|
|
23161
|
+
throw new Error(`Failed to evaluate authorization profile configuration: ${errorMessages}`);
|
|
23162
|
+
}
|
|
23163
|
+
evaluatedConfig = validationResult.config ?? profileConfig;
|
|
23164
|
+
}
|
|
23165
|
+
const authorizer = await AuthorizerFactory.createAuthorizer(evaluatedConfig, hasContext ? { validate: false } : { factoryArgs } // Pass factoryArgs if no validation was done
|
|
23166
|
+
);
|
|
23139
23167
|
if (!authorizer) {
|
|
23140
23168
|
throw new Error(`Failed to create authorizer for profile: ${normalized.profile}`);
|
|
23141
23169
|
}
|
|
23142
23170
|
return authorizer;
|
|
23143
23171
|
}
|
|
23144
23172
|
}
|
|
23173
|
+
/**
|
|
23174
|
+
* Extracts CreateResourceOptions from factoryArgs.
|
|
23175
|
+
* The factory system passes CreateResourceOptions as an object in factoryArgs.
|
|
23176
|
+
*/
|
|
23177
|
+
function extractCreateResourceOptions(factoryArgs) {
|
|
23178
|
+
// Find the last object argument that looks like CreateResourceOptions
|
|
23179
|
+
for (let i = factoryArgs.length - 1; i >= 0; i--) {
|
|
23180
|
+
const arg = factoryArgs[i];
|
|
23181
|
+
if (arg && typeof arg === 'object' && !Array.isArray(arg)) {
|
|
23182
|
+
const candidate = arg;
|
|
23183
|
+
// Check if it has typical CreateResourceOptions properties
|
|
23184
|
+
if ('env' in candidate || 'config' in candidate || 'variables' in candidate || 'factoryArgs' in candidate) {
|
|
23185
|
+
return candidate;
|
|
23186
|
+
}
|
|
23187
|
+
}
|
|
23188
|
+
}
|
|
23189
|
+
return {};
|
|
23190
|
+
}
|
|
23145
23191
|
function normalizeConfig$w(config) {
|
|
23146
23192
|
if (!config) {
|
|
23147
23193
|
return { profile: PROFILE_NAME_OAUTH2 };
|
|
@@ -23153,21 +23199,13 @@ function normalizeConfig$w(config) {
|
|
|
23153
23199
|
return { profile: canonicalProfile };
|
|
23154
23200
|
}
|
|
23155
23201
|
function resolveProfileName$2(candidate) {
|
|
23156
|
-
|
|
23157
|
-
if (direct && ExpressionEvaluator.isExpression(direct)) {
|
|
23158
|
-
const evaluated = ExpressionEvaluator.evaluate(direct);
|
|
23159
|
-
direct = coerceProfileString$2(evaluated);
|
|
23160
|
-
}
|
|
23202
|
+
const direct = coerceProfileString$2(candidate.profile);
|
|
23161
23203
|
if (direct) {
|
|
23162
23204
|
return direct;
|
|
23163
23205
|
}
|
|
23164
23206
|
const legacyKeys = ['profile_name', 'profileName'];
|
|
23165
23207
|
for (const legacyKey of legacyKeys) {
|
|
23166
|
-
|
|
23167
|
-
if (legacyValue && ExpressionEvaluator.isExpression(legacyValue)) {
|
|
23168
|
-
const evaluated = ExpressionEvaluator.evaluate(legacyValue);
|
|
23169
|
-
legacyValue = coerceProfileString$2(evaluated);
|
|
23170
|
-
}
|
|
23208
|
+
const legacyValue = coerceProfileString$2(candidate[legacyKey]);
|
|
23171
23209
|
if (legacyValue) {
|
|
23172
23210
|
return legacyValue;
|
|
23173
23211
|
}
|
|
@@ -40721,7 +40759,7 @@ class DefaultSecurityManagerFactory extends SecurityManagerFactory {
|
|
|
40721
40759
|
}
|
|
40722
40760
|
if (!authorizer) {
|
|
40723
40761
|
authorizer =
|
|
40724
|
-
await DefaultSecurityManagerFactory.createAuthorizerFromConfig(config, policy);
|
|
40762
|
+
await DefaultSecurityManagerFactory.createAuthorizerFromConfig(config, policy, createOptions);
|
|
40725
40763
|
}
|
|
40726
40764
|
if (authorizer &&
|
|
40727
40765
|
eventListeners &&
|
|
@@ -40952,14 +40990,14 @@ class DefaultSecurityManagerFactory extends SecurityManagerFactory {
|
|
|
40952
40990
|
}
|
|
40953
40991
|
return null;
|
|
40954
40992
|
}
|
|
40955
|
-
static async createAuthorizerFromConfig(config, policy) {
|
|
40993
|
+
static async createAuthorizerFromConfig(config, policy, createOptions) {
|
|
40956
40994
|
let authorizerConfig = config.authorizer ?? null;
|
|
40957
40995
|
if (!authorizerConfig) {
|
|
40958
40996
|
authorizerConfig = config.authorizer_config ?? null;
|
|
40959
40997
|
}
|
|
40960
40998
|
if (authorizerConfig &&
|
|
40961
40999
|
DefaultSecurityManagerFactory.isConfigLike(authorizerConfig)) {
|
|
40962
|
-
return ((await AuthorizerFactory.createAuthorizer(authorizerConfig)) ?? null);
|
|
41000
|
+
return ((await AuthorizerFactory.createAuthorizer(authorizerConfig, createOptions ?? undefined)) ?? null);
|
|
40963
41001
|
}
|
|
40964
41002
|
try {
|
|
40965
41003
|
const requirements = policy.requirements?.();
|
|
@@ -40975,6 +41013,7 @@ class DefaultSecurityManagerFactory extends SecurityManagerFactory {
|
|
|
40975
41013
|
}
|
|
40976
41014
|
const tokenVerifier = new NoopTokenVerifier();
|
|
40977
41015
|
return ((await AuthorizerFactory.createAuthorizer(null, {
|
|
41016
|
+
...createOptions,
|
|
40978
41017
|
factoryArgs: [tokenVerifier],
|
|
40979
41018
|
})) ?? null);
|
|
40980
41019
|
}
|
package/dist/types/version.d.ts
CHANGED