@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/browser/index.cjs
CHANGED
|
@@ -525,12 +525,12 @@ async function ensureRuntimeFactoriesRegistered(registry = factory.Registry) {
|
|
|
525
525
|
}
|
|
526
526
|
|
|
527
527
|
// This file is auto-generated during build - do not edit manually
|
|
528
|
-
// Generated from package.json version: 0.4.
|
|
528
|
+
// Generated from package.json version: 0.4.8
|
|
529
529
|
/**
|
|
530
530
|
* The package version, injected at build time.
|
|
531
531
|
* @internal
|
|
532
532
|
*/
|
|
533
|
-
const VERSION = '0.4.
|
|
533
|
+
const VERSION = '0.4.8';
|
|
534
534
|
|
|
535
535
|
let initialized = false;
|
|
536
536
|
const runtimePlugin = {
|
|
@@ -3561,6 +3561,58 @@ class InMemoryFanoutBroker extends TaskSpawner {
|
|
|
3561
3561
|
}
|
|
3562
3562
|
}
|
|
3563
3563
|
|
|
3564
|
+
const registry = new Map();
|
|
3565
|
+
function normalizeKey$1(value, label) {
|
|
3566
|
+
if (typeof value !== 'string') {
|
|
3567
|
+
throw new Error(`${label} must be a non-empty string`);
|
|
3568
|
+
}
|
|
3569
|
+
const trimmed = value.trim();
|
|
3570
|
+
if (!trimmed) {
|
|
3571
|
+
throw new Error(`${label} must be a non-empty string`);
|
|
3572
|
+
}
|
|
3573
|
+
return trimmed;
|
|
3574
|
+
}
|
|
3575
|
+
function cloneConfig(value) {
|
|
3576
|
+
return JSON.parse(JSON.stringify(value));
|
|
3577
|
+
}
|
|
3578
|
+
function registerProfile(baseType, name, config, options) {
|
|
3579
|
+
const normalizedBase = normalizeKey$1(baseType, 'baseType');
|
|
3580
|
+
const normalizedName = normalizeKey$1(name, 'profile name');
|
|
3581
|
+
if (!config || typeof config !== 'object' || Array.isArray(config)) {
|
|
3582
|
+
throw new Error(`Profile '${normalizedName}' config must be an object`);
|
|
3583
|
+
}
|
|
3584
|
+
const profiles = registry.get(normalizedBase) ?? new Map();
|
|
3585
|
+
if (profiles.has(normalizedName) && options?.allowOverride !== true) {
|
|
3586
|
+
const sourceLabel = options?.source ? ` (${options.source})` : '';
|
|
3587
|
+
throw new Error(`Profile '${normalizedName}' already registered for ${normalizedBase}${sourceLabel}`);
|
|
3588
|
+
}
|
|
3589
|
+
profiles.set(normalizedName, config);
|
|
3590
|
+
registry.set(normalizedBase, profiles);
|
|
3591
|
+
}
|
|
3592
|
+
function getProfile(baseType, name) {
|
|
3593
|
+
const normalizedBase = normalizeKey$1(baseType, 'baseType');
|
|
3594
|
+
const normalizedName = normalizeKey$1(name, 'profile name');
|
|
3595
|
+
const profiles = registry.get(normalizedBase);
|
|
3596
|
+
if (!profiles) {
|
|
3597
|
+
return null;
|
|
3598
|
+
}
|
|
3599
|
+
const profile = profiles.get(normalizedName);
|
|
3600
|
+
return profile ? cloneConfig(profile) : null;
|
|
3601
|
+
}
|
|
3602
|
+
function listProfiles(baseType) {
|
|
3603
|
+
const normalizedBase = normalizeKey$1(baseType, 'baseType');
|
|
3604
|
+
const profiles = registry.get(normalizedBase);
|
|
3605
|
+
return profiles ? Array.from(profiles.keys()) : [];
|
|
3606
|
+
}
|
|
3607
|
+
function clearProfiles(baseType) {
|
|
3608
|
+
if (!baseType) {
|
|
3609
|
+
registry.clear();
|
|
3610
|
+
return;
|
|
3611
|
+
}
|
|
3612
|
+
const normalizedBase = normalizeKey$1(baseType, 'baseType');
|
|
3613
|
+
registry.delete(normalizedBase);
|
|
3614
|
+
}
|
|
3615
|
+
|
|
3564
3616
|
class InMemoryKeyValueStore {
|
|
3565
3617
|
constructor() {
|
|
3566
3618
|
this.store = new Map();
|
|
@@ -4202,15 +4254,8 @@ const INDEXEDDB_PROFILE_CONFIG = {
|
|
|
4202
4254
|
({
|
|
4203
4255
|
dbDirectory: factory.Expressions.env(ENV_VAR_STORAGE_DB_DIRECTORY, './data/sqlite'),
|
|
4204
4256
|
masterKey: factory.Expressions.env(ENV_VAR_STORAGE_MASTER_KEY)});
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
[PROFILE_NAME_MEMORY]: MEMORY_PROFILE_CONFIG,
|
|
4208
|
-
[PROFILE_NAME_INDEXEDDB]: INDEXEDDB_PROFILE_CONFIG,
|
|
4209
|
-
};
|
|
4210
|
-
// Extended profile map - can be augmented by Node.js environment
|
|
4211
|
-
const PROFILE_MAP$7 = {
|
|
4212
|
-
...BASE_PROFILE_MAP,
|
|
4213
|
-
};
|
|
4257
|
+
registerProfile(STORAGE_PROVIDER_FACTORY_BASE_TYPE, PROFILE_NAME_MEMORY, MEMORY_PROFILE_CONFIG, { source: 'storage-profile-factory' });
|
|
4258
|
+
registerProfile(STORAGE_PROVIDER_FACTORY_BASE_TYPE, PROFILE_NAME_INDEXEDDB, INDEXEDDB_PROFILE_CONFIG, { source: 'storage-profile-factory' });
|
|
4214
4259
|
class StorageProfileFactory extends StorageProviderFactory {
|
|
4215
4260
|
constructor() {
|
|
4216
4261
|
super(...arguments);
|
|
@@ -4223,9 +4268,9 @@ class StorageProfileFactory extends StorageProviderFactory {
|
|
|
4223
4268
|
type: 'StorageProfile',
|
|
4224
4269
|
});
|
|
4225
4270
|
const profileName = (parsed.profile ?? PROFILE_NAME_MEMORY).toLowerCase();
|
|
4226
|
-
const profileConfig =
|
|
4271
|
+
const profileConfig = getProfile(STORAGE_PROVIDER_FACTORY_BASE_TYPE, profileName);
|
|
4227
4272
|
if (!profileConfig) {
|
|
4228
|
-
throw new Error(`Unknown storage profile '${profileName}'. Supported profiles: ${
|
|
4273
|
+
throw new Error(`Unknown storage profile '${profileName}'. Supported profiles: ${listProfiles(STORAGE_PROVIDER_FACTORY_BASE_TYPE).join(', ')}`);
|
|
4229
4274
|
}
|
|
4230
4275
|
const createOptions = {
|
|
4231
4276
|
...options,
|
|
@@ -16193,11 +16238,9 @@ const DEFAULT_PROFILE$1 = {
|
|
|
16193
16238
|
const TOKEN_SUBJECT_PROFILE = {
|
|
16194
16239
|
type: 'TokenSubjectNodeIdentityPolicy',
|
|
16195
16240
|
};
|
|
16196
|
-
|
|
16197
|
-
|
|
16198
|
-
|
|
16199
|
-
[PROFILE_NAME_TOKEN_SUBJECT_ALIAS]: TOKEN_SUBJECT_PROFILE,
|
|
16200
|
-
};
|
|
16241
|
+
registerProfile(NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE, PROFILE_NAME_DEFAULT$1, DEFAULT_PROFILE$1, { source: 'node-identity-policy-profile-factory' });
|
|
16242
|
+
registerProfile(NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE, PROFILE_NAME_TOKEN_SUBJECT, TOKEN_SUBJECT_PROFILE, { source: 'node-identity-policy-profile-factory' });
|
|
16243
|
+
registerProfile(NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE, PROFILE_NAME_TOKEN_SUBJECT_ALIAS, TOKEN_SUBJECT_PROFILE, { source: 'node-identity-policy-profile-factory' });
|
|
16201
16244
|
const FACTORY_META$19 = {
|
|
16202
16245
|
base: NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE,
|
|
16203
16246
|
key: 'NodeIdentityPolicyProfile',
|
|
@@ -16234,14 +16277,11 @@ function normalizeConfig$x(config) {
|
|
|
16234
16277
|
return { profile: normalizedProfile };
|
|
16235
16278
|
}
|
|
16236
16279
|
function resolveProfileConfig$5(profileName) {
|
|
16237
|
-
const profile =
|
|
16280
|
+
const profile = getProfile(NODE_IDENTITY_POLICY_FACTORY_BASE_TYPE, profileName);
|
|
16238
16281
|
if (!profile) {
|
|
16239
16282
|
throw new Error(`Unknown node identity policy profile: ${profileName}`);
|
|
16240
16283
|
}
|
|
16241
|
-
return
|
|
16242
|
-
}
|
|
16243
|
-
function deepClone$5(value) {
|
|
16244
|
-
return JSON.parse(JSON.stringify(value));
|
|
16284
|
+
return profile;
|
|
16245
16285
|
}
|
|
16246
16286
|
|
|
16247
16287
|
var nodeIdentityPolicyProfileFactory = /*#__PURE__*/Object.freeze({
|
|
@@ -22007,14 +22047,12 @@ const POLICY_LOCALFILE_PROFILE = {
|
|
|
22007
22047
|
verifier: DEFAULT_VERIFIER_CONFIG,
|
|
22008
22048
|
policySource: DEFAULT_POLICY_SOURCE,
|
|
22009
22049
|
};
|
|
22010
|
-
|
|
22011
|
-
|
|
22012
|
-
|
|
22013
|
-
|
|
22014
|
-
|
|
22015
|
-
|
|
22016
|
-
[PROFILE_NAME_NOOP$2]: NOOP_PROFILE$2,
|
|
22017
|
-
};
|
|
22050
|
+
registerProfile(AUTHORIZER_FACTORY_BASE_TYPE, PROFILE_NAME_DEFAULT, DEFAULT_PROFILE, { source: 'authorization-profile-factory' });
|
|
22051
|
+
registerProfile(AUTHORIZER_FACTORY_BASE_TYPE, PROFILE_NAME_OAUTH2, OAUTH2_PROFILE, { source: 'authorization-profile-factory' });
|
|
22052
|
+
registerProfile(AUTHORIZER_FACTORY_BASE_TYPE, PROFILE_NAME_OAUTH2_GATED, OAUTH2_GATED_PROFILE, { source: 'authorization-profile-factory' });
|
|
22053
|
+
registerProfile(AUTHORIZER_FACTORY_BASE_TYPE, PROFILE_NAME_OAUTH2_CALLBACK, OAUTH2_CALLBACK_PROFILE, { source: 'authorization-profile-factory' });
|
|
22054
|
+
registerProfile(AUTHORIZER_FACTORY_BASE_TYPE, PROFILE_NAME_POLICY_LOCALFILE, POLICY_LOCALFILE_PROFILE, { source: 'authorization-profile-factory' });
|
|
22055
|
+
registerProfile(AUTHORIZER_FACTORY_BASE_TYPE, PROFILE_NAME_NOOP$2, NOOP_PROFILE$2, { source: 'authorization-profile-factory' });
|
|
22018
22056
|
const PROFILE_ALIASES$1 = {
|
|
22019
22057
|
jwt: PROFILE_NAME_DEFAULT,
|
|
22020
22058
|
jwks: PROFILE_NAME_DEFAULT,
|
|
@@ -22133,14 +22171,11 @@ function canonicalizeProfileName$1(value) {
|
|
|
22133
22171
|
return PROFILE_ALIASES$1[normalized] ?? normalized;
|
|
22134
22172
|
}
|
|
22135
22173
|
function resolveProfileConfig$4(profileName) {
|
|
22136
|
-
const profile =
|
|
22174
|
+
const profile = getProfile(AUTHORIZER_FACTORY_BASE_TYPE, profileName);
|
|
22137
22175
|
if (!profile) {
|
|
22138
22176
|
throw new Error(`Unknown authorization profile: ${profileName}`);
|
|
22139
22177
|
}
|
|
22140
|
-
return
|
|
22141
|
-
}
|
|
22142
|
-
function deepClone$4(value) {
|
|
22143
|
-
return JSON.parse(JSON.stringify(value));
|
|
22178
|
+
return profile;
|
|
22144
22179
|
}
|
|
22145
22180
|
|
|
22146
22181
|
var authorizationProfileFactory = /*#__PURE__*/Object.freeze({
|
|
@@ -29944,14 +29979,12 @@ const OPEN_PROFILE$1 = {
|
|
|
29944
29979
|
profile: factory.Expressions.env(ENV_VAR_AUTHORIZATION_PROFILE, 'noop'),
|
|
29945
29980
|
},
|
|
29946
29981
|
};
|
|
29947
|
-
|
|
29948
|
-
|
|
29949
|
-
|
|
29950
|
-
|
|
29951
|
-
|
|
29952
|
-
|
|
29953
|
-
[PROFILE_NAME_OPEN$1]: OPEN_PROFILE$1,
|
|
29954
|
-
};
|
|
29982
|
+
registerProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, PROFILE_NAME_OVERLAY, OVERLAY_PROFILE, { source: 'node-security-profile-factory' });
|
|
29983
|
+
registerProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, PROFILE_NAME_OVERLAY_CALLBACK, OVERLAY_CALLBACK_PROFILE, { source: 'node-security-profile-factory' });
|
|
29984
|
+
registerProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, PROFILE_NAME_STRICT_OVERLAY, STRICT_OVERLAY_PROFILE, { source: 'node-security-profile-factory' });
|
|
29985
|
+
registerProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, PROFILE_NAME_GATED, GATED_PROFILE, { source: 'node-security-profile-factory' });
|
|
29986
|
+
registerProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, PROFILE_NAME_GATED_CALLBACK, GATED_CALLBACK_PROFILE, { source: 'node-security-profile-factory' });
|
|
29987
|
+
registerProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, PROFILE_NAME_OPEN$1, OPEN_PROFILE$1, { source: 'node-security-profile-factory' });
|
|
29955
29988
|
const FACTORY_META$13 = {
|
|
29956
29989
|
base: SECURITY_MANAGER_FACTORY_BASE_TYPE,
|
|
29957
29990
|
key: 'SecurityProfile',
|
|
@@ -30058,14 +30091,11 @@ function normalizeProfile(config) {
|
|
|
30058
30091
|
return value.toLowerCase();
|
|
30059
30092
|
}
|
|
30060
30093
|
function resolveProfileConfig$3(profileName) {
|
|
30061
|
-
const template =
|
|
30094
|
+
const template = getProfile(SECURITY_MANAGER_FACTORY_BASE_TYPE, profileName);
|
|
30062
30095
|
if (!template) {
|
|
30063
30096
|
throw new Error(`Unknown security profile: ${profileName}`);
|
|
30064
30097
|
}
|
|
30065
|
-
return
|
|
30066
|
-
}
|
|
30067
|
-
function deepClone$3(value) {
|
|
30068
|
-
return JSON.parse(JSON.stringify(value));
|
|
30098
|
+
return template;
|
|
30069
30099
|
}
|
|
30070
30100
|
|
|
30071
30101
|
var nodeSecurityProfileFactory = /*#__PURE__*/Object.freeze({
|
|
@@ -33990,10 +34020,8 @@ const AT_LEAST_ONCE_PROFILE = {
|
|
|
33990
34020
|
const AT_MOST_ONCE_PROFILE = {
|
|
33991
34021
|
type: 'AtMostOnceDeliveryPolicy',
|
|
33992
34022
|
};
|
|
33993
|
-
|
|
33994
|
-
|
|
33995
|
-
[PROFILE_NAME_AT_MOST_ONCE]: AT_MOST_ONCE_PROFILE,
|
|
33996
|
-
};
|
|
34023
|
+
registerProfile(DELIVERY_POLICY_FACTORY_BASE_TYPE, PROFILE_NAME_AT_LEAST_ONCE, AT_LEAST_ONCE_PROFILE, { source: 'delivery-profile-factory' });
|
|
34024
|
+
registerProfile(DELIVERY_POLICY_FACTORY_BASE_TYPE, PROFILE_NAME_AT_MOST_ONCE, AT_MOST_ONCE_PROFILE, { source: 'delivery-profile-factory' });
|
|
33997
34025
|
class DeliveryProfileFactory extends DeliveryPolicyFactory {
|
|
33998
34026
|
constructor() {
|
|
33999
34027
|
super(...arguments);
|
|
@@ -34042,14 +34070,11 @@ function coerceProfileString$1(value) {
|
|
|
34042
34070
|
return trimmed.length > 0 ? trimmed : null;
|
|
34043
34071
|
}
|
|
34044
34072
|
function resolveProfileConfig$2(profileName) {
|
|
34045
|
-
const profile =
|
|
34073
|
+
const profile = getProfile(DELIVERY_POLICY_FACTORY_BASE_TYPE, profileName);
|
|
34046
34074
|
if (!profile) {
|
|
34047
34075
|
throw new Error(`Unknown delivery profile: ${profileName}`);
|
|
34048
34076
|
}
|
|
34049
|
-
return
|
|
34050
|
-
}
|
|
34051
|
-
function deepClone$2(value) {
|
|
34052
|
-
return JSON.parse(JSON.stringify(value));
|
|
34077
|
+
return profile;
|
|
34053
34078
|
}
|
|
34054
34079
|
const FACTORY_META$S = {
|
|
34055
34080
|
base: DELIVERY_POLICY_FACTORY_BASE_TYPE,
|
|
@@ -34486,20 +34511,18 @@ const NOOP_PROFILE$1 = {
|
|
|
34486
34511
|
auto_accept_logicals: true,
|
|
34487
34512
|
autoAcceptLogicals: true,
|
|
34488
34513
|
};
|
|
34489
|
-
|
|
34490
|
-
|
|
34491
|
-
|
|
34492
|
-
|
|
34493
|
-
|
|
34494
|
-
|
|
34495
|
-
|
|
34496
|
-
|
|
34497
|
-
|
|
34498
|
-
|
|
34499
|
-
|
|
34500
|
-
|
|
34501
|
-
[PROFILE_NAME_NONE]: NOOP_PROFILE$1,
|
|
34502
|
-
};
|
|
34514
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_WELCOME, WELCOME_SERVICE_PROFILE, { source: 'admission-profile-factory' });
|
|
34515
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_WELCOME_PKCE, WELCOME_SERVICE_PKCE_PROFILE, { source: 'admission-profile-factory' });
|
|
34516
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_WELCOME_PKCE_ALIAS, WELCOME_SERVICE_PKCE_PROFILE, { source: 'admission-profile-factory' });
|
|
34517
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_DIRECT, DIRECT_PROFILE, { source: 'admission-profile-factory' });
|
|
34518
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_DIRECT_PKCE, DIRECT_PKCE_PROFILE, { source: 'admission-profile-factory' });
|
|
34519
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_DIRECT_PKCE_ALIAS, DIRECT_PKCE_PROFILE, { source: 'admission-profile-factory' });
|
|
34520
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_DIRECT_HTTP, DIRECT_HTTP_PROFILE, { source: 'admission-profile-factory' });
|
|
34521
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_DIRECT_INPAGE, DIRECT_INPAGE_PROFILE, { source: 'admission-profile-factory' });
|
|
34522
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_DIRECT_INPAGE_ALIAS, DIRECT_INPAGE_PROFILE, { source: 'admission-profile-factory' });
|
|
34523
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_OPEN, OPEN_PROFILE, { source: 'admission-profile-factory' });
|
|
34524
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_NOOP$1, NOOP_PROFILE$1, { source: 'admission-profile-factory' });
|
|
34525
|
+
registerProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, PROFILE_NAME_NONE, NOOP_PROFILE$1, { source: 'admission-profile-factory' });
|
|
34503
34526
|
const FACTORY_META$Q = {
|
|
34504
34527
|
base: ADMISSION_CLIENT_FACTORY_BASE_TYPE,
|
|
34505
34528
|
key: 'AdmissionProfile',
|
|
@@ -34536,14 +34559,11 @@ function normalizeConfig$p(config) {
|
|
|
34536
34559
|
return { profile: normalizedProfile };
|
|
34537
34560
|
}
|
|
34538
34561
|
function resolveProfileConfig$1(profileName) {
|
|
34539
|
-
const profile =
|
|
34562
|
+
const profile = getProfile(ADMISSION_CLIENT_FACTORY_BASE_TYPE, profileName);
|
|
34540
34563
|
if (!profile) {
|
|
34541
34564
|
throw new Error(`Unknown admission profile: ${profileName}`);
|
|
34542
34565
|
}
|
|
34543
|
-
return
|
|
34544
|
-
}
|
|
34545
|
-
function deepClone$1(value) {
|
|
34546
|
-
return JSON.parse(JSON.stringify(value));
|
|
34566
|
+
return profile;
|
|
34547
34567
|
}
|
|
34548
34568
|
|
|
34549
34569
|
var admissionProfileFactory = /*#__PURE__*/Object.freeze({
|
|
@@ -38869,6 +38889,11 @@ const STICKY_HRW_PROFILE = {
|
|
|
38869
38889
|
const DEVELOPMENT_PROFILE$1 = {
|
|
38870
38890
|
type: 'RoundRobinLoadBalancingStrategy',
|
|
38871
38891
|
};
|
|
38892
|
+
registerProfile(LOAD_BALANCING_STRATEGY_FACTORY_BASE, PROFILE_NAME_RANDOM, RANDOM_PROFILE, { source: 'load-balancing-profile-factory' });
|
|
38893
|
+
registerProfile(LOAD_BALANCING_STRATEGY_FACTORY_BASE, PROFILE_NAME_ROUND_ROBIN, ROUND_ROBIN_PROFILE, { source: 'load-balancing-profile-factory' });
|
|
38894
|
+
registerProfile(LOAD_BALANCING_STRATEGY_FACTORY_BASE, PROFILE_NAME_HRW, HRW_PROFILE, { source: 'load-balancing-profile-factory' });
|
|
38895
|
+
registerProfile(LOAD_BALANCING_STRATEGY_FACTORY_BASE, PROFILE_NAME_STICKY_HRW, STICKY_HRW_PROFILE, { source: 'load-balancing-profile-factory' });
|
|
38896
|
+
registerProfile(LOAD_BALANCING_STRATEGY_FACTORY_BASE, PROFILE_NAME_DEVELOPMENT$1, DEVELOPMENT_PROFILE$1, { source: 'load-balancing-profile-factory' });
|
|
38872
38897
|
const FACTORY_META$7 = {
|
|
38873
38898
|
base: LOAD_BALANCING_STRATEGY_FACTORY_BASE,
|
|
38874
38899
|
key: 'LoadBalancingProfile',
|
|
@@ -38923,20 +38948,11 @@ class LoadBalancingProfileFactory extends LoadBalancingStrategyFactory {
|
|
|
38923
38948
|
return undefined;
|
|
38924
38949
|
}
|
|
38925
38950
|
resolveProfile(profile) {
|
|
38926
|
-
|
|
38927
|
-
|
|
38928
|
-
|
|
38929
|
-
case PROFILE_NAME_ROUND_ROBIN:
|
|
38930
|
-
return ROUND_ROBIN_PROFILE;
|
|
38931
|
-
case PROFILE_NAME_HRW:
|
|
38932
|
-
return HRW_PROFILE;
|
|
38933
|
-
case PROFILE_NAME_STICKY_HRW:
|
|
38934
|
-
return STICKY_HRW_PROFILE;
|
|
38935
|
-
case PROFILE_NAME_DEVELOPMENT$1:
|
|
38936
|
-
return DEVELOPMENT_PROFILE$1;
|
|
38937
|
-
default:
|
|
38938
|
-
throw new Error(`Unknown load balancing profile: ${profile}`);
|
|
38951
|
+
const strategyConfig = getProfile(LOAD_BALANCING_STRATEGY_FACTORY_BASE, profile);
|
|
38952
|
+
if (!strategyConfig) {
|
|
38953
|
+
throw new Error(`Unknown load balancing profile: ${profile}`);
|
|
38939
38954
|
}
|
|
38955
|
+
return strategyConfig;
|
|
38940
38956
|
}
|
|
38941
38957
|
}
|
|
38942
38958
|
|
|
@@ -39105,13 +39121,11 @@ const HYBRID_ONLY_PROFILE = {
|
|
|
39105
39121
|
type: 'HybridPathRoutingPolicy',
|
|
39106
39122
|
loadBalancingStrategy: { type: 'HRWLoadBalancingStrategy' },
|
|
39107
39123
|
};
|
|
39108
|
-
|
|
39109
|
-
|
|
39110
|
-
|
|
39111
|
-
|
|
39112
|
-
|
|
39113
|
-
[PROFILE_NAME_HYBRID_ONLY]: HYBRID_ONLY_PROFILE,
|
|
39114
|
-
};
|
|
39124
|
+
registerProfile(ROUTING_POLICY_FACTORY_BASE, PROFILE_NAME_DEVELOPMENT, DEVELOPMENT_PROFILE, { source: 'routing-profile-factory' });
|
|
39125
|
+
registerProfile(ROUTING_POLICY_FACTORY_BASE, PROFILE_NAME_PRODUCTION, PRODUCTION_PROFILE, { source: 'routing-profile-factory' });
|
|
39126
|
+
registerProfile(ROUTING_POLICY_FACTORY_BASE, PROFILE_NAME_BASIC, BASIC_PROFILE, { source: 'routing-profile-factory' });
|
|
39127
|
+
registerProfile(ROUTING_POLICY_FACTORY_BASE, PROFILE_NAME_CAPABILITY_AWARE, CAPABILITY_AWARE_PROFILE, { source: 'routing-profile-factory' });
|
|
39128
|
+
registerProfile(ROUTING_POLICY_FACTORY_BASE, PROFILE_NAME_HYBRID_ONLY, HYBRID_ONLY_PROFILE, { source: 'routing-profile-factory' });
|
|
39115
39129
|
const FACTORY_META$3 = {
|
|
39116
39130
|
base: ROUTING_POLICY_FACTORY_BASE,
|
|
39117
39131
|
key: 'RoutingProfile',
|
|
@@ -39166,7 +39180,7 @@ class RoutingProfileFactory extends RoutingPolicyFactory {
|
|
|
39166
39180
|
return undefined;
|
|
39167
39181
|
}
|
|
39168
39182
|
getProfileConfig(profile) {
|
|
39169
|
-
const routingConfig =
|
|
39183
|
+
const routingConfig = getProfile(ROUTING_POLICY_FACTORY_BASE, profile);
|
|
39170
39184
|
if (!routingConfig) {
|
|
39171
39185
|
throw new Error('Unknown routing profile');
|
|
39172
39186
|
}
|
|
@@ -39716,10 +39730,8 @@ const OPEN_TELEMETRY_PROFILE = {
|
|
|
39716
39730
|
serviceName: factory.Expressions.env(ENV_VAR_TELEMETRY_SERVICE_NAME, 'naylence-service'),
|
|
39717
39731
|
headers: {},
|
|
39718
39732
|
};
|
|
39719
|
-
|
|
39720
|
-
|
|
39721
|
-
[PROFILE_NAME_OPEN_TELEMETRY]: OPEN_TELEMETRY_PROFILE,
|
|
39722
|
-
};
|
|
39733
|
+
registerProfile(TRACE_EMITTER_FACTORY_BASE_TYPE, PROFILE_NAME_NOOP, NOOP_PROFILE, { source: 'trace-emitter-profile-factory' });
|
|
39734
|
+
registerProfile(TRACE_EMITTER_FACTORY_BASE_TYPE, PROFILE_NAME_OPEN_TELEMETRY, OPEN_TELEMETRY_PROFILE, { source: 'trace-emitter-profile-factory' });
|
|
39723
39735
|
const FACTORY_META = {
|
|
39724
39736
|
base: TRACE_EMITTER_FACTORY_BASE_TYPE,
|
|
39725
39737
|
key: 'TraceEmitterProfile',
|
|
@@ -39788,14 +39800,11 @@ function canonicalizeProfileName(value) {
|
|
|
39788
39800
|
return PROFILE_ALIASES[normalized] ?? normalized;
|
|
39789
39801
|
}
|
|
39790
39802
|
function resolveProfileConfig(profileName) {
|
|
39791
|
-
const profile =
|
|
39803
|
+
const profile = getProfile(TRACE_EMITTER_FACTORY_BASE_TYPE, profileName);
|
|
39792
39804
|
if (!profile) {
|
|
39793
39805
|
throw new Error(`Unknown trace emitter profile: ${profileName}`);
|
|
39794
39806
|
}
|
|
39795
|
-
return
|
|
39796
|
-
}
|
|
39797
|
-
function deepClone(value) {
|
|
39798
|
-
return JSON.parse(JSON.stringify(value));
|
|
39807
|
+
return profile;
|
|
39799
39808
|
}
|
|
39800
39809
|
|
|
39801
39810
|
var traceEmitterProfileFactory = /*#__PURE__*/Object.freeze({
|
|
@@ -44059,6 +44068,7 @@ exports.broadcastChannelGrantToConnectorConfig = broadcastChannelGrantToConnecto
|
|
|
44059
44068
|
exports.camelToSnakeCase = camelToSnakeCase;
|
|
44060
44069
|
exports.canonicalJson = canonicalJson;
|
|
44061
44070
|
exports.capitalizeFirstLetter = capitalizeFirstLetter;
|
|
44071
|
+
exports.clearProfiles = clearProfiles;
|
|
44062
44072
|
exports.color = color;
|
|
44063
44073
|
exports.compareCryptoLevels = compareCryptoLevels;
|
|
44064
44074
|
exports.compileGlobOnlyScopeRequirement = compileGlobOnlyScopeRequirement;
|
|
@@ -44105,6 +44115,7 @@ exports.getFameRoot = getFameRoot;
|
|
|
44105
44115
|
exports.getKeyProvider = getKeyProvider;
|
|
44106
44116
|
exports.getKeyStore = getKeyStore;
|
|
44107
44117
|
exports.getLogger = getLogger;
|
|
44118
|
+
exports.getProfile = getProfile;
|
|
44108
44119
|
exports.hasCryptoSupport = hasCryptoSupport;
|
|
44109
44120
|
exports.hostnameToLogical = hostnameToLogical;
|
|
44110
44121
|
exports.hostnamesToLogicals = hostnamesToLogicals;
|
|
@@ -44133,6 +44144,7 @@ exports.isTokenProvider = isTokenProvider;
|
|
|
44133
44144
|
exports.isTokenValid = isTokenValid;
|
|
44134
44145
|
exports.isWebSocketConnectionGrant = isWebSocketConnectionGrant;
|
|
44135
44146
|
exports.jsonDumps = jsonDumps;
|
|
44147
|
+
exports.listProfiles = listProfiles;
|
|
44136
44148
|
exports.logicalPatternsToDnsConstraints = logicalPatternsToDnsConstraints;
|
|
44137
44149
|
exports.logicalToHostname = logicalToHostname;
|
|
44138
44150
|
exports.logicalsToHostnames = logicalsToHostnames;
|
|
@@ -44167,6 +44179,7 @@ exports.prettyModel = prettyModel$1;
|
|
|
44167
44179
|
exports.registerDefaultFactories = registerDefaultFactories;
|
|
44168
44180
|
exports.registerDefaultKeyStoreFactory = registerDefaultKeyStoreFactory;
|
|
44169
44181
|
exports.registerNodePlacementStrategyFactory = registerNodePlacementStrategyFactory;
|
|
44182
|
+
exports.registerProfile = registerProfile;
|
|
44170
44183
|
exports.registerRuntimeFactories = registerRuntimeFactories;
|
|
44171
44184
|
exports.requireCryptoSupport = requireCryptoSupport;
|
|
44172
44185
|
exports.retryWithBackoff = retryWithBackoff;
|