@naylence/agent-sdk 0.3.4-test.714 → 0.3.4-test.716
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.js +46 -6
- package/dist/browser/index.js.map +1 -1
- package/dist/cjs/naylence/agent/configs.d.ts +3 -3
- package/dist/cjs/naylence/agent/configs.js +42 -3
- package/dist/cjs/naylence/agent/configs.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/naylence/agent/configs.d.ts +3 -3
- package/dist/esm/naylence/agent/configs.js +42 -3
- package/dist/esm/naylence/agent/configs.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +2 -2
- package/dist/types/naylence/agent/configs.d.ts +3 -3
- package/dist/types/naylence/agent/configs.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -15671,12 +15671,12 @@
|
|
|
15671
15671
|
// --- END ENV SHIM ---
|
|
15672
15672
|
|
|
15673
15673
|
// This file is auto-generated during build - do not edit manually
|
|
15674
|
-
// Generated from package.json version: 0.3.5-test.
|
|
15674
|
+
// Generated from package.json version: 0.3.5-test.916
|
|
15675
15675
|
/**
|
|
15676
15676
|
* The package version, injected at build time.
|
|
15677
15677
|
* @internal
|
|
15678
15678
|
*/
|
|
15679
|
-
const VERSION$1 = '0.3.5-test.
|
|
15679
|
+
const VERSION$1 = '0.3.5-test.916';
|
|
15680
15680
|
|
|
15681
15681
|
/**
|
|
15682
15682
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -45942,7 +45942,8 @@
|
|
|
45942
45942
|
candidate.profileName.trim().length > 0
|
|
45943
45943
|
? candidate.profileName
|
|
45944
45944
|
: PROFILE_NAME_DIRECT;
|
|
45945
|
-
|
|
45945
|
+
const normalizedProfile = profileValue.trim().toLowerCase();
|
|
45946
|
+
return { profile: normalizedProfile };
|
|
45946
45947
|
}
|
|
45947
45948
|
function resolveProfileConfig(profileName) {
|
|
45948
45949
|
const profile = PROFILE_MAP$1[profileName];
|
|
@@ -55748,8 +55749,47 @@
|
|
|
55748
55749
|
}
|
|
55749
55750
|
|
|
55750
55751
|
const SENTINEL_PORT = 8000;
|
|
55752
|
+
const ENV_PLUGIN_KEY = 'FAME_PLUGINS';
|
|
55753
|
+
const DEFAULT_PLUGINS = ['@naylence/runtime'];
|
|
55754
|
+
function getEnvRecords() {
|
|
55755
|
+
const records = [];
|
|
55756
|
+
if (typeof globalThis !== 'undefined') {
|
|
55757
|
+
const candidateProcess = globalThis.process;
|
|
55758
|
+
if (candidateProcess?.env && typeof candidateProcess.env === 'object') {
|
|
55759
|
+
records.push(candidateProcess.env);
|
|
55760
|
+
}
|
|
55761
|
+
const browserEnv = globalThis.__ENV__;
|
|
55762
|
+
if (browserEnv && typeof browserEnv === 'object') {
|
|
55763
|
+
records.push(browserEnv);
|
|
55764
|
+
}
|
|
55765
|
+
}
|
|
55766
|
+
return records;
|
|
55767
|
+
}
|
|
55768
|
+
function parseEnvPluginList(raw) {
|
|
55769
|
+
if (typeof raw !== 'string' || raw.trim().length === 0) {
|
|
55770
|
+
return [];
|
|
55771
|
+
}
|
|
55772
|
+
return raw
|
|
55773
|
+
.split(/[,\s]+/u)
|
|
55774
|
+
.map((entry) => entry.trim())
|
|
55775
|
+
.filter((entry) => entry.length > 0);
|
|
55776
|
+
}
|
|
55777
|
+
function computeConfiguredPlugins() {
|
|
55778
|
+
const resolved = new Set();
|
|
55779
|
+
for (const plugin of DEFAULT_PLUGINS) {
|
|
55780
|
+
resolved.add(plugin);
|
|
55781
|
+
}
|
|
55782
|
+
for (const record of getEnvRecords()) {
|
|
55783
|
+
const raw = record?.[ENV_PLUGIN_KEY];
|
|
55784
|
+
for (const plugin of parseEnvPluginList(raw)) {
|
|
55785
|
+
resolved.add(plugin);
|
|
55786
|
+
}
|
|
55787
|
+
}
|
|
55788
|
+
return Array.from(resolved);
|
|
55789
|
+
}
|
|
55790
|
+
const COMMON_PLUGINS = computeConfiguredPlugins();
|
|
55751
55791
|
const CLIENT_CONFIG = {
|
|
55752
|
-
plugins:
|
|
55792
|
+
plugins: COMMON_PLUGINS,
|
|
55753
55793
|
node: {
|
|
55754
55794
|
security: {
|
|
55755
55795
|
type: 'SecurityProfile',
|
|
@@ -55770,7 +55810,7 @@
|
|
|
55770
55810
|
},
|
|
55771
55811
|
};
|
|
55772
55812
|
const NODE_CONFIG = {
|
|
55773
|
-
plugins:
|
|
55813
|
+
plugins: COMMON_PLUGINS,
|
|
55774
55814
|
node: {
|
|
55775
55815
|
type: 'Node',
|
|
55776
55816
|
id: '${env:FAME_NODE_ID:}',
|
|
@@ -55795,7 +55835,7 @@
|
|
|
55795
55835
|
},
|
|
55796
55836
|
};
|
|
55797
55837
|
const SENTINEL_CONFIG = {
|
|
55798
|
-
plugins:
|
|
55838
|
+
plugins: COMMON_PLUGINS,
|
|
55799
55839
|
node: {
|
|
55800
55840
|
type: 'Sentinel',
|
|
55801
55841
|
id: '${env:FAME_NODE_ID:}',
|