@naylence/runtime 0.4.6 → 0.4.8
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 +120 -107
- package/dist/browser/index.mjs +117 -108
- package/dist/cjs/naylence/fame/delivery/delivery-profile-factory.js +5 -9
- package/dist/cjs/naylence/fame/index.js +1 -0
- package/dist/cjs/naylence/fame/node/admission/admission-profile-factory.js +15 -19
- package/dist/cjs/naylence/fame/node/node-identity-policy-profile-factory.js +6 -10
- package/dist/cjs/naylence/fame/profile/index.js +8 -0
- package/dist/cjs/naylence/fame/profile/profile-registry.js +57 -0
- package/dist/cjs/naylence/fame/security/auth/authorization-profile-factory.js +9 -13
- package/dist/cjs/naylence/fame/security/node-security-profile-factory.js +9 -13
- package/dist/cjs/naylence/fame/sentinel/load-balancing/load-balancing-profile-factory.js +10 -13
- package/dist/cjs/naylence/fame/sentinel/routing-profile-factory.js +7 -8
- package/dist/cjs/naylence/fame/storage/storage-profile-factory.js +8 -12
- package/dist/cjs/naylence/fame/telemetry/trace-emitter-profile-factory.js +5 -9
- package/dist/cjs/runtime-isomorphic.js +1 -0
- package/dist/cjs/version.js +2 -2
- package/dist/esm/naylence/fame/delivery/delivery-profile-factory.js +5 -9
- package/dist/esm/naylence/fame/index.js +1 -0
- package/dist/esm/naylence/fame/node/admission/admission-profile-factory.js +15 -19
- package/dist/esm/naylence/fame/node/node-identity-policy-profile-factory.js +6 -10
- package/dist/esm/naylence/fame/profile/index.js +1 -0
- package/dist/esm/naylence/fame/profile/profile-registry.js +51 -0
- package/dist/esm/naylence/fame/security/auth/authorization-profile-factory.js +9 -13
- package/dist/esm/naylence/fame/security/node-security-profile-factory.js +9 -13
- package/dist/esm/naylence/fame/sentinel/load-balancing/load-balancing-profile-factory.js +10 -13
- package/dist/esm/naylence/fame/sentinel/routing-profile-factory.js +7 -8
- package/dist/esm/naylence/fame/storage/storage-profile-factory.js +8 -12
- package/dist/esm/naylence/fame/telemetry/trace-emitter-profile-factory.js +5 -9
- package/dist/esm/runtime-isomorphic.js +1 -0
- package/dist/esm/version.js +2 -2
- package/dist/node/index.cjs +120 -107
- package/dist/node/index.mjs +117 -108
- package/dist/node/node.cjs +123 -108
- package/dist/node/node.mjs +120 -109
- package/dist/types/naylence/fame/index.d.ts +1 -0
- package/dist/types/naylence/fame/profile/index.d.ts +2 -0
- package/dist/types/naylence/fame/profile/profile-registry.d.ts +9 -0
- package/dist/types/runtime-isomorphic.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
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.8
|
|
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.8';
|
|
4445
4445
|
|
|
4446
4446
|
let initialized = false;
|
|
4447
4447
|
const runtimePlugin = {
|
|
@@ -5035,6 +5035,58 @@ function getSqliteStorageProviderModule() {
|
|
|
5035
5035
|
}
|
|
5036
5036
|
registerStorageProviderFactory('SQLiteStorageProvider', SQLiteStorageProviderFactory);
|
|
5037
5037
|
|
|
5038
|
+
const registry = new Map();
|
|
5039
|
+
function normalizeKey$1(value, label) {
|
|
5040
|
+
if (typeof value !== 'string') {
|
|
5041
|
+
throw new Error(`${label} must be a non-empty string`);
|
|
5042
|
+
}
|
|
5043
|
+
const trimmed = value.trim();
|
|
5044
|
+
if (!trimmed) {
|
|
5045
|
+
throw new Error(`${label} must be a non-empty string`);
|
|
5046
|
+
}
|
|
5047
|
+
return trimmed;
|
|
5048
|
+
}
|
|
5049
|
+
function cloneConfig(value) {
|
|
5050
|
+
return JSON.parse(JSON.stringify(value));
|
|
5051
|
+
}
|
|
5052
|
+
function registerProfile(baseType, name, config, options) {
|
|
5053
|
+
const normalizedBase = normalizeKey$1(baseType, 'baseType');
|
|
5054
|
+
const normalizedName = normalizeKey$1(name, 'profile name');
|
|
5055
|
+
if (!config || typeof config !== 'object' || Array.isArray(config)) {
|
|
5056
|
+
throw new Error(`Profile '${normalizedName}' config must be an object`);
|
|
5057
|
+
}
|
|
5058
|
+
const profiles = registry.get(normalizedBase) ?? new Map();
|
|
5059
|
+
if (profiles.has(normalizedName) && options?.allowOverride !== true) {
|
|
5060
|
+
const sourceLabel = options?.source ? ` (${options.source})` : '';
|
|
5061
|
+
throw new Error(`Profile '${normalizedName}' already registered for ${normalizedBase}${sourceLabel}`);
|
|
5062
|
+
}
|
|
5063
|
+
profiles.set(normalizedName, config);
|
|
5064
|
+
registry.set(normalizedBase, profiles);
|
|
5065
|
+
}
|
|
5066
|
+
function getProfile(baseType, name) {
|
|
5067
|
+
const normalizedBase = normalizeKey$1(baseType, 'baseType');
|
|
5068
|
+
const normalizedName = normalizeKey$1(name, 'profile name');
|
|
5069
|
+
const profiles = registry.get(normalizedBase);
|
|
5070
|
+
if (!profiles) {
|
|
5071
|
+
return null;
|
|
5072
|
+
}
|
|
5073
|
+
const profile = profiles.get(normalizedName);
|
|
5074
|
+
return profile ? cloneConfig(profile) : null;
|
|
5075
|
+
}
|
|
5076
|
+
function listProfiles(baseType) {
|
|
5077
|
+
const normalizedBase = normalizeKey$1(baseType, 'baseType');
|
|
5078
|
+
const profiles = registry.get(normalizedBase);
|
|
5079
|
+
return profiles ? Array.from(profiles.keys()) : [];
|
|
5080
|
+
}
|
|
5081
|
+
function clearProfiles(baseType) {
|
|
5082
|
+
if (!baseType) {
|
|
5083
|
+
registry.clear();
|
|
5084
|
+
return;
|
|
5085
|
+
}
|
|
5086
|
+
const normalizedBase = normalizeKey$1(baseType, 'baseType');
|
|
5087
|
+
registry.delete(normalizedBase);
|
|
5088
|
+
}
|
|
5089
|
+
|
|
5038
5090
|
const ENV_VAR_STORAGE_DB_DIRECTORY = 'FAME_STORAGE_DB_DIRECTORY';
|
|
5039
5091
|
const ENV_VAR_STORAGE_MASTER_KEY = 'FAME_STORAGE_MASTER_KEY';
|
|
5040
5092
|
const ENV_VAR_STORAGE_ENCRYPTED = 'FAME_STORAGE_ENCRYPTED';
|
|
@@ -5071,18 +5123,13 @@ const ENCRYPTED_SQLITE_PROFILE_CONFIG = {
|
|
|
5071
5123
|
masterKey: factory.Expressions.env(ENV_VAR_STORAGE_MASTER_KEY),
|
|
5072
5124
|
isCached: true,
|
|
5073
5125
|
};
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
[PROFILE_NAME_MEMORY]: MEMORY_PROFILE_CONFIG,
|
|
5077
|
-
[PROFILE_NAME_INDEXEDDB]: INDEXEDDB_PROFILE_CONFIG,
|
|
5078
|
-
};
|
|
5079
|
-
// Extended profile map - can be augmented by Node.js environment
|
|
5080
|
-
const PROFILE_MAP$7 = {
|
|
5081
|
-
...BASE_PROFILE_MAP,
|
|
5082
|
-
};
|
|
5126
|
+
registerProfile(STORAGE_PROVIDER_FACTORY_BASE_TYPE, PROFILE_NAME_MEMORY, MEMORY_PROFILE_CONFIG, { source: 'storage-profile-factory' });
|
|
5127
|
+
registerProfile(STORAGE_PROVIDER_FACTORY_BASE_TYPE, PROFILE_NAME_INDEXEDDB, INDEXEDDB_PROFILE_CONFIG, { source: 'storage-profile-factory' });
|
|
5083
5128
|
// Function to register additional profiles (used by Node.js build)
|
|
5084
5129
|
function registerStorageProfile(name, config) {
|
|
5085
|
-
|
|
5130
|
+
registerProfile(STORAGE_PROVIDER_FACTORY_BASE_TYPE, name, config, {
|
|
5131
|
+
source: 'storage-profile-factory',
|
|
5132
|
+
});
|
|
5086
5133
|
}
|
|
5087
5134
|
// Export the SQLite configs so they can be registered from node-index.ts
|
|
5088
5135
|
const SQLITE_PROFILES = {
|
|
@@ -5101,9 +5148,9 @@ class StorageProfileFactory extends StorageProviderFactory {
|
|
|
5101
5148
|
type: 'StorageProfile',
|
|
5102
5149
|
});
|
|
5103
5150
|
const profileName = (parsed.profile ?? PROFILE_NAME_MEMORY).toLowerCase();
|
|
5104
|
-
const profileConfig =
|
|
5151
|
+
const profileConfig = getProfile(STORAGE_PROVIDER_FACTORY_BASE_TYPE, profileName);
|
|
5105
5152
|
if (!profileConfig) {
|
|
5106
|
-
throw new Error(`Unknown storage profile '${profileName}'. Supported profiles: ${
|
|
5153
|
+
throw new Error(`Unknown storage profile '${profileName}'. Supported profiles: ${listProfiles(STORAGE_PROVIDER_FACTORY_BASE_TYPE).join(', ')}`);
|
|
5107
5154
|
}
|
|
5108
5155
|
const createOptions = {
|
|
5109
5156
|
...options,
|
|
@@ -17805,11 +17852,9 @@ const DEFAULT_PROFILE$1 = {
|
|
|
17805
17852
|
const TOKEN_SUBJECT_PROFILE = {
|
|
17806
17853
|
type: 'TokenSubjectNodeIdentityPolicy',
|
|
17807
17854
|
};
|
|
17808
|
-
|
|
17809
|
-
|
|
17810
|
-
|
|
17811
|
-
[PROFILE_NAME_TOKEN_SUBJECT_ALIAS]: TOKEN_SUBJECT_PROFILE,
|
|
17812
|
-
};
|
|
17855
|
+
registerProfile(NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE, PROFILE_NAME_DEFAULT$1, DEFAULT_PROFILE$1, { source: 'node-identity-policy-profile-factory' });
|
|
17856
|
+
registerProfile(NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE, PROFILE_NAME_TOKEN_SUBJECT, TOKEN_SUBJECT_PROFILE, { source: 'node-identity-policy-profile-factory' });
|
|
17857
|
+
registerProfile(NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE, PROFILE_NAME_TOKEN_SUBJECT_ALIAS, TOKEN_SUBJECT_PROFILE, { source: 'node-identity-policy-profile-factory' });
|
|
17813
17858
|
const FACTORY_META$18 = {
|
|
17814
17859
|
base: NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE,
|
|
17815
17860
|
key: 'NodeIdentityPolicyProfile',
|
|
@@ -17846,14 +17891,11 @@ function normalizeConfig$x(config) {
|
|
|
17846
17891
|
return { profile: normalizedProfile };
|
|
17847
17892
|
}
|
|
17848
17893
|
function resolveProfileConfig$5(profileName) {
|
|
17849
|
-
const profile =
|
|
17894
|
+
const profile = getProfile(NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE, profileName);
|
|
17850
17895
|
if (!profile) {
|
|
17851
17896
|
throw new Error(`Unknown node identity policy profile: ${profileName}`);
|
|
17852
17897
|
}
|
|
17853
|
-
return
|
|
17854
|
-
}
|
|
17855
|
-
function deepClone$5(value) {
|
|
17856
|
-
return JSON.parse(JSON.stringify(value));
|
|
17898
|
+
return profile;
|
|
17857
17899
|
}
|
|
17858
17900
|
|
|
17859
17901
|
var nodeIdentityPolicyProfileFactory = /*#__PURE__*/Object.freeze({
|
|
@@ -23099,14 +23141,12 @@ const POLICY_LOCALFILE_PROFILE = {
|
|
|
23099
23141
|
verifier: DEFAULT_VERIFIER_CONFIG,
|
|
23100
23142
|
policySource: DEFAULT_POLICY_SOURCE,
|
|
23101
23143
|
};
|
|
23102
|
-
|
|
23103
|
-
|
|
23104
|
-
|
|
23105
|
-
|
|
23106
|
-
|
|
23107
|
-
|
|
23108
|
-
[PROFILE_NAME_NOOP$2]: NOOP_PROFILE$2,
|
|
23109
|
-
};
|
|
23144
|
+
registerProfile(AUTHORIZER_FACTORY_BASE_TYPE, PROFILE_NAME_DEFAULT, DEFAULT_PROFILE, { source: 'authorization-profile-factory' });
|
|
23145
|
+
registerProfile(AUTHORIZER_FACTORY_BASE_TYPE, PROFILE_NAME_OAUTH2, OAUTH2_PROFILE, { source: 'authorization-profile-factory' });
|
|
23146
|
+
registerProfile(AUTHORIZER_FACTORY_BASE_TYPE, PROFILE_NAME_OAUTH2_GATED, OAUTH2_GATED_PROFILE, { source: 'authorization-profile-factory' });
|
|
23147
|
+
registerProfile(AUTHORIZER_FACTORY_BASE_TYPE, PROFILE_NAME_OAUTH2_CALLBACK, OAUTH2_CALLBACK_PROFILE, { source: 'authorization-profile-factory' });
|
|
23148
|
+
registerProfile(AUTHORIZER_FACTORY_BASE_TYPE, PROFILE_NAME_POLICY_LOCALFILE, POLICY_LOCALFILE_PROFILE, { source: 'authorization-profile-factory' });
|
|
23149
|
+
registerProfile(AUTHORIZER_FACTORY_BASE_TYPE, PROFILE_NAME_NOOP$2, NOOP_PROFILE$2, { source: 'authorization-profile-factory' });
|
|
23110
23150
|
const PROFILE_ALIASES$1 = {
|
|
23111
23151
|
jwt: PROFILE_NAME_DEFAULT,
|
|
23112
23152
|
jwks: PROFILE_NAME_DEFAULT,
|
|
@@ -23225,14 +23265,11 @@ function canonicalizeProfileName$1(value) {
|
|
|
23225
23265
|
return PROFILE_ALIASES$1[normalized] ?? normalized;
|
|
23226
23266
|
}
|
|
23227
23267
|
function resolveProfileConfig$4(profileName) {
|
|
23228
|
-
const profile =
|
|
23268
|
+
const profile = getProfile(AUTHORIZER_FACTORY_BASE_TYPE, profileName);
|
|
23229
23269
|
if (!profile) {
|
|
23230
23270
|
throw new Error(`Unknown authorization profile: ${profileName}`);
|
|
23231
23271
|
}
|
|
23232
|
-
return
|
|
23233
|
-
}
|
|
23234
|
-
function deepClone$4(value) {
|
|
23235
|
-
return JSON.parse(JSON.stringify(value));
|
|
23272
|
+
return profile;
|
|
23236
23273
|
}
|
|
23237
23274
|
|
|
23238
23275
|
var authorizationProfileFactory = /*#__PURE__*/Object.freeze({
|
|
@@ -31051,14 +31088,12 @@ const OPEN_PROFILE$1 = {
|
|
|
31051
31088
|
profile: factory.Expressions.env(ENV_VAR_AUTHORIZATION_PROFILE, 'noop'),
|
|
31052
31089
|
},
|
|
31053
31090
|
};
|
|
31054
|
-
|
|
31055
|
-
|
|
31056
|
-
|
|
31057
|
-
|
|
31058
|
-
|
|
31059
|
-
|
|
31060
|
-
[PROFILE_NAME_OPEN$1]: OPEN_PROFILE$1,
|
|
31061
|
-
};
|
|
31091
|
+
registerProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, PROFILE_NAME_OVERLAY, OVERLAY_PROFILE, { source: 'node-security-profile-factory' });
|
|
31092
|
+
registerProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, PROFILE_NAME_OVERLAY_CALLBACK, OVERLAY_CALLBACK_PROFILE, { source: 'node-security-profile-factory' });
|
|
31093
|
+
registerProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, PROFILE_NAME_STRICT_OVERLAY, STRICT_OVERLAY_PROFILE, { source: 'node-security-profile-factory' });
|
|
31094
|
+
registerProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, PROFILE_NAME_GATED, GATED_PROFILE, { source: 'node-security-profile-factory' });
|
|
31095
|
+
registerProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, PROFILE_NAME_GATED_CALLBACK, GATED_CALLBACK_PROFILE, { source: 'node-security-profile-factory' });
|
|
31096
|
+
registerProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, PROFILE_NAME_OPEN$1, OPEN_PROFILE$1, { source: 'node-security-profile-factory' });
|
|
31062
31097
|
const FACTORY_META$12 = {
|
|
31063
31098
|
base: SECURITY_MANAGER_FACTORY_BASE_TYPE,
|
|
31064
31099
|
key: 'SecurityProfile',
|
|
@@ -31165,14 +31200,11 @@ function normalizeProfile(config) {
|
|
|
31165
31200
|
return value.toLowerCase();
|
|
31166
31201
|
}
|
|
31167
31202
|
function resolveProfileConfig$3(profileName) {
|
|
31168
|
-
const template =
|
|
31203
|
+
const template = getProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, profileName);
|
|
31169
31204
|
if (!template) {
|
|
31170
31205
|
throw new Error(`Unknown security profile: ${profileName}`);
|
|
31171
31206
|
}
|
|
31172
|
-
return
|
|
31173
|
-
}
|
|
31174
|
-
function deepClone$3(value) {
|
|
31175
|
-
return JSON.parse(JSON.stringify(value));
|
|
31207
|
+
return template;
|
|
31176
31208
|
}
|
|
31177
31209
|
|
|
31178
31210
|
var nodeSecurityProfileFactory = /*#__PURE__*/Object.freeze({
|
|
@@ -37509,10 +37541,8 @@ const AT_LEAST_ONCE_PROFILE = {
|
|
|
37509
37541
|
const AT_MOST_ONCE_PROFILE = {
|
|
37510
37542
|
type: 'AtMostOnceDeliveryPolicy',
|
|
37511
37543
|
};
|
|
37512
|
-
|
|
37513
|
-
|
|
37514
|
-
[PROFILE_NAME_AT_MOST_ONCE]: AT_MOST_ONCE_PROFILE,
|
|
37515
|
-
};
|
|
37544
|
+
registerProfile(DELIVERY_POLICY_FACTORY_BASE_TYPE, PROFILE_NAME_AT_LEAST_ONCE, AT_LEAST_ONCE_PROFILE, { source: 'delivery-profile-factory' });
|
|
37545
|
+
registerProfile(DELIVERY_POLICY_FACTORY_BASE_TYPE, PROFILE_NAME_AT_MOST_ONCE, AT_MOST_ONCE_PROFILE, { source: 'delivery-profile-factory' });
|
|
37516
37546
|
class DeliveryProfileFactory extends DeliveryPolicyFactory {
|
|
37517
37547
|
constructor() {
|
|
37518
37548
|
super(...arguments);
|
|
@@ -37561,14 +37591,11 @@ function coerceProfileString$1(value) {
|
|
|
37561
37591
|
return trimmed.length > 0 ? trimmed : null;
|
|
37562
37592
|
}
|
|
37563
37593
|
function resolveProfileConfig$2(profileName) {
|
|
37564
|
-
const profile =
|
|
37594
|
+
const profile = getProfile(DELIVERY_POLICY_FACTORY_BASE_TYPE, profileName);
|
|
37565
37595
|
if (!profile) {
|
|
37566
37596
|
throw new Error(`Unknown delivery profile: ${profileName}`);
|
|
37567
37597
|
}
|
|
37568
|
-
return
|
|
37569
|
-
}
|
|
37570
|
-
function deepClone$2(value) {
|
|
37571
|
-
return JSON.parse(JSON.stringify(value));
|
|
37598
|
+
return profile;
|
|
37572
37599
|
}
|
|
37573
37600
|
const FACTORY_META$R = {
|
|
37574
37601
|
base: DELIVERY_POLICY_FACTORY_BASE_TYPE,
|
|
@@ -37793,20 +37820,18 @@ const NOOP_PROFILE$1 = {
|
|
|
37793
37820
|
auto_accept_logicals: true,
|
|
37794
37821
|
autoAcceptLogicals: true,
|
|
37795
37822
|
};
|
|
37796
|
-
|
|
37797
|
-
|
|
37798
|
-
|
|
37799
|
-
|
|
37800
|
-
|
|
37801
|
-
|
|
37802
|
-
|
|
37803
|
-
|
|
37804
|
-
|
|
37805
|
-
|
|
37806
|
-
|
|
37807
|
-
|
|
37808
|
-
[PROFILE_NAME_NONE]: NOOP_PROFILE$1,
|
|
37809
|
-
};
|
|
37823
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_WELCOME, WELCOME_SERVICE_PROFILE, { source: 'admission-profile-factory' });
|
|
37824
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_WELCOME_PKCE, WELCOME_SERVICE_PKCE_PROFILE, { source: 'admission-profile-factory' });
|
|
37825
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_WELCOME_PKCE_ALIAS, WELCOME_SERVICE_PKCE_PROFILE, { source: 'admission-profile-factory' });
|
|
37826
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_DIRECT, DIRECT_PROFILE, { source: 'admission-profile-factory' });
|
|
37827
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_DIRECT_PKCE, DIRECT_PKCE_PROFILE, { source: 'admission-profile-factory' });
|
|
37828
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_DIRECT_PKCE_ALIAS, DIRECT_PKCE_PROFILE, { source: 'admission-profile-factory' });
|
|
37829
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_DIRECT_HTTP, DIRECT_HTTP_PROFILE, { source: 'admission-profile-factory' });
|
|
37830
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_DIRECT_INPAGE, DIRECT_INPAGE_PROFILE, { source: 'admission-profile-factory' });
|
|
37831
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_DIRECT_INPAGE_ALIAS, DIRECT_INPAGE_PROFILE, { source: 'admission-profile-factory' });
|
|
37832
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_OPEN, OPEN_PROFILE, { source: 'admission-profile-factory' });
|
|
37833
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_NOOP$1, NOOP_PROFILE$1, { source: 'admission-profile-factory' });
|
|
37834
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_NONE, NOOP_PROFILE$1, { source: 'admission-profile-factory' });
|
|
37810
37835
|
const FACTORY_META$Q = {
|
|
37811
37836
|
base: ADMISSION_CLIENT_FACTORY_BASE_TYPE,
|
|
37812
37837
|
key: 'AdmissionProfile',
|
|
@@ -37843,14 +37868,11 @@ function normalizeConfig$p(config) {
|
|
|
37843
37868
|
return { profile: normalizedProfile };
|
|
37844
37869
|
}
|
|
37845
37870
|
function resolveProfileConfig$1(profileName) {
|
|
37846
|
-
const profile =
|
|
37871
|
+
const profile = getProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, profileName);
|
|
37847
37872
|
if (!profile) {
|
|
37848
37873
|
throw new Error(`Unknown admission profile: ${profileName}`);
|
|
37849
37874
|
}
|
|
37850
|
-
return
|
|
37851
|
-
}
|
|
37852
|
-
function deepClone$1(value) {
|
|
37853
|
-
return JSON.parse(JSON.stringify(value));
|
|
37875
|
+
return profile;
|
|
37854
37876
|
}
|
|
37855
37877
|
|
|
37856
37878
|
var admissionProfileFactory = /*#__PURE__*/Object.freeze({
|
|
@@ -42177,6 +42199,11 @@ const STICKY_HRW_PROFILE = {
|
|
|
42177
42199
|
const DEVELOPMENT_PROFILE$1 = {
|
|
42178
42200
|
type: 'RoundRobinLoadBalancingStrategy',
|
|
42179
42201
|
};
|
|
42202
|
+
registerProfile(LOAD_BALANCING_STRATEGY_FACTORY_BASE, PROFILE_NAME_RANDOM, RANDOM_PROFILE, { source: 'load-balancing-profile-factory' });
|
|
42203
|
+
registerProfile(LOAD_BALANCING_STRATEGY_FACTORY_BASE, PROFILE_NAME_ROUND_ROBIN, ROUND_ROBIN_PROFILE, { source: 'load-balancing-profile-factory' });
|
|
42204
|
+
registerProfile(LOAD_BALANCING_STRATEGY_FACTORY_BASE, PROFILE_NAME_HRW, HRW_PROFILE, { source: 'load-balancing-profile-factory' });
|
|
42205
|
+
registerProfile(LOAD_BALANCING_STRATEGY_FACTORY_BASE, PROFILE_NAME_STICKY_HRW, STICKY_HRW_PROFILE, { source: 'load-balancing-profile-factory' });
|
|
42206
|
+
registerProfile(LOAD_BALANCING_STRATEGY_FACTORY_BASE, PROFILE_NAME_DEVELOPMENT$1, DEVELOPMENT_PROFILE$1, { source: 'load-balancing-profile-factory' });
|
|
42180
42207
|
const FACTORY_META$7 = {
|
|
42181
42208
|
base: LOAD_BALANCING_STRATEGY_FACTORY_BASE,
|
|
42182
42209
|
key: 'LoadBalancingProfile',
|
|
@@ -42231,20 +42258,11 @@ class LoadBalancingProfileFactory extends LoadBalancingStrategyFactory {
|
|
|
42231
42258
|
return undefined;
|
|
42232
42259
|
}
|
|
42233
42260
|
resolveProfile(profile) {
|
|
42234
|
-
|
|
42235
|
-
|
|
42236
|
-
|
|
42237
|
-
case PROFILE_NAME_ROUND_ROBIN:
|
|
42238
|
-
return ROUND_ROBIN_PROFILE;
|
|
42239
|
-
case PROFILE_NAME_HRW:
|
|
42240
|
-
return HRW_PROFILE;
|
|
42241
|
-
case PROFILE_NAME_STICKY_HRW:
|
|
42242
|
-
return STICKY_HRW_PROFILE;
|
|
42243
|
-
case PROFILE_NAME_DEVELOPMENT$1:
|
|
42244
|
-
return DEVELOPMENT_PROFILE$1;
|
|
42245
|
-
default:
|
|
42246
|
-
throw new Error(`Unknown load balancing profile: ${profile}`);
|
|
42261
|
+
const strategyConfig = getProfile(LOAD_BALANCING_STRATEGY_FACTORY_BASE, profile);
|
|
42262
|
+
if (!strategyConfig) {
|
|
42263
|
+
throw new Error(`Unknown load balancing profile: ${profile}`);
|
|
42247
42264
|
}
|
|
42265
|
+
return strategyConfig;
|
|
42248
42266
|
}
|
|
42249
42267
|
}
|
|
42250
42268
|
|
|
@@ -42413,13 +42431,11 @@ const HYBRID_ONLY_PROFILE = {
|
|
|
42413
42431
|
type: 'HybridPathRoutingPolicy',
|
|
42414
42432
|
loadBalancingStrategy: { type: 'HRWLoadBalancingStrategy' },
|
|
42415
42433
|
};
|
|
42416
|
-
|
|
42417
|
-
|
|
42418
|
-
|
|
42419
|
-
|
|
42420
|
-
|
|
42421
|
-
[PROFILE_NAME_HYBRID_ONLY]: HYBRID_ONLY_PROFILE,
|
|
42422
|
-
};
|
|
42434
|
+
registerProfile(ROUTING_POLICY_FACTORY_BASE, PROFILE_NAME_DEVELOPMENT, DEVELOPMENT_PROFILE, { source: 'routing-profile-factory' });
|
|
42435
|
+
registerProfile(ROUTING_POLICY_FACTORY_BASE, PROFILE_NAME_PRODUCTION, PRODUCTION_PROFILE, { source: 'routing-profile-factory' });
|
|
42436
|
+
registerProfile(ROUTING_POLICY_FACTORY_BASE, PROFILE_NAME_BASIC, BASIC_PROFILE, { source: 'routing-profile-factory' });
|
|
42437
|
+
registerProfile(ROUTING_POLICY_FACTORY_BASE, PROFILE_NAME_CAPABILITY_AWARE, CAPABILITY_AWARE_PROFILE, { source: 'routing-profile-factory' });
|
|
42438
|
+
registerProfile(ROUTING_POLICY_FACTORY_BASE, PROFILE_NAME_HYBRID_ONLY, HYBRID_ONLY_PROFILE, { source: 'routing-profile-factory' });
|
|
42423
42439
|
const FACTORY_META$3 = {
|
|
42424
42440
|
base: ROUTING_POLICY_FACTORY_BASE,
|
|
42425
42441
|
key: 'RoutingProfile',
|
|
@@ -42474,7 +42490,7 @@ class RoutingProfileFactory extends RoutingPolicyFactory {
|
|
|
42474
42490
|
return undefined;
|
|
42475
42491
|
}
|
|
42476
42492
|
getProfileConfig(profile) {
|
|
42477
|
-
const routingConfig =
|
|
42493
|
+
const routingConfig = getProfile(ROUTING_POLICY_FACTORY_BASE, profile);
|
|
42478
42494
|
if (!routingConfig) {
|
|
42479
42495
|
throw new Error('Unknown routing profile');
|
|
42480
42496
|
}
|
|
@@ -43025,10 +43041,8 @@ const OPEN_TELEMETRY_PROFILE = {
|
|
|
43025
43041
|
serviceName: factory.Expressions.env(ENV_VAR_TELEMETRY_SERVICE_NAME, 'naylence-service'),
|
|
43026
43042
|
headers: {},
|
|
43027
43043
|
};
|
|
43028
|
-
|
|
43029
|
-
|
|
43030
|
-
[PROFILE_NAME_OPEN_TELEMETRY]: OPEN_TELEMETRY_PROFILE,
|
|
43031
|
-
};
|
|
43044
|
+
registerProfile(TRACE_EMITTER_FACTORY_BASE_TYPE, PROFILE_NAME_NOOP, NOOP_PROFILE, { source: 'trace-emitter-profile-factory' });
|
|
43045
|
+
registerProfile(TRACE_EMITTER_FACTORY_BASE_TYPE, PROFILE_NAME_OPEN_TELEMETRY, OPEN_TELEMETRY_PROFILE, { source: 'trace-emitter-profile-factory' });
|
|
43032
43046
|
const FACTORY_META = {
|
|
43033
43047
|
base: TRACE_EMITTER_FACTORY_BASE_TYPE,
|
|
43034
43048
|
key: 'TraceEmitterProfile',
|
|
@@ -43097,14 +43111,11 @@ function canonicalizeProfileName(value) {
|
|
|
43097
43111
|
return PROFILE_ALIASES[normalized] ?? normalized;
|
|
43098
43112
|
}
|
|
43099
43113
|
function resolveProfileConfig(profileName) {
|
|
43100
|
-
const profile =
|
|
43114
|
+
const profile = getProfile(TRACE_EMITTER_FACTORY_BASE_TYPE, profileName);
|
|
43101
43115
|
if (!profile) {
|
|
43102
43116
|
throw new Error(`Unknown trace emitter profile: ${profileName}`);
|
|
43103
43117
|
}
|
|
43104
|
-
return
|
|
43105
|
-
}
|
|
43106
|
-
function deepClone(value) {
|
|
43107
|
-
return JSON.parse(JSON.stringify(value));
|
|
43118
|
+
return profile;
|
|
43108
43119
|
}
|
|
43109
43120
|
|
|
43110
43121
|
var traceEmitterProfileFactory = /*#__PURE__*/Object.freeze({
|
|
@@ -46219,6 +46230,7 @@ exports.broadcastChannelGrantToConnectorConfig = broadcastChannelGrantToConnecto
|
|
|
46219
46230
|
exports.camelToSnakeCase = camelToSnakeCase;
|
|
46220
46231
|
exports.canonicalJson = canonicalJson;
|
|
46221
46232
|
exports.capitalizeFirstLetter = capitalizeFirstLetter;
|
|
46233
|
+
exports.clearProfiles = clearProfiles;
|
|
46222
46234
|
exports.color = color;
|
|
46223
46235
|
exports.compareCryptoLevels = compareCryptoLevels;
|
|
46224
46236
|
exports.compileGlobOnlyScopeRequirement = compileGlobOnlyScopeRequirement;
|
|
@@ -46271,6 +46283,7 @@ exports.getInPageListenerInstance = getInPageListenerInstance;
|
|
|
46271
46283
|
exports.getKeyProvider = getKeyProvider;
|
|
46272
46284
|
exports.getKeyStore = getKeyStore;
|
|
46273
46285
|
exports.getLogger = getLogger;
|
|
46286
|
+
exports.getProfile = getProfile;
|
|
46274
46287
|
exports.getWebsocketListenerInstance = getWebsocketListenerInstance;
|
|
46275
46288
|
exports.hasCryptoSupport = hasCryptoSupport;
|
|
46276
46289
|
exports.hostnameToLogical = hostnameToLogical;
|
|
@@ -46300,6 +46313,7 @@ exports.isTokenProvider = isTokenProvider;
|
|
|
46300
46313
|
exports.isTokenValid = isTokenValid;
|
|
46301
46314
|
exports.isWebSocketConnectionGrant = isWebSocketConnectionGrant;
|
|
46302
46315
|
exports.jsonDumps = jsonDumps;
|
|
46316
|
+
exports.listProfiles = listProfiles;
|
|
46303
46317
|
exports.logicalPatternsToDnsConstraints = logicalPatternsToDnsConstraints;
|
|
46304
46318
|
exports.logicalToHostname = logicalToHostname;
|
|
46305
46319
|
exports.logicalsToHostnames = logicalsToHostnames;
|
|
@@ -46335,6 +46349,7 @@ exports.prettyModel = prettyModel$1;
|
|
|
46335
46349
|
exports.registerDefaultFactories = registerDefaultFactories;
|
|
46336
46350
|
exports.registerDefaultKeyStoreFactory = registerDefaultKeyStoreFactory;
|
|
46337
46351
|
exports.registerNodePlacementStrategyFactory = registerNodePlacementStrategyFactory;
|
|
46352
|
+
exports.registerProfile = registerProfile;
|
|
46338
46353
|
exports.registerRuntimeFactories = registerRuntimeFactories;
|
|
46339
46354
|
exports.requireCryptoSupport = requireCryptoSupport;
|
|
46340
46355
|
exports.retryWithBackoff = retryWithBackoff;
|