@naylence/agent-sdk 0.3.4-test.713 → 0.3.4-test.715
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 +123 -5
- 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.915
|
|
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.915';
|
|
15680
15680
|
|
|
15681
15681
|
/**
|
|
15682
15682
|
* Fame protocol specific error classes with WebSocket close codes and proper inheritance.
|
|
@@ -27726,6 +27726,80 @@
|
|
|
27726
27726
|
}
|
|
27727
27727
|
})();
|
|
27728
27728
|
let cachedNodeRequire = typeof require === 'function' ? require : null;
|
|
27729
|
+
function createFsShim() {
|
|
27730
|
+
if (!isNode) {
|
|
27731
|
+
return null;
|
|
27732
|
+
}
|
|
27733
|
+
const processBinding = process.binding;
|
|
27734
|
+
if (typeof processBinding !== 'function') {
|
|
27735
|
+
return null;
|
|
27736
|
+
}
|
|
27737
|
+
try {
|
|
27738
|
+
const fsBinding = processBinding('fs');
|
|
27739
|
+
if (!fsBinding || typeof fsBinding.readFileUtf8 !== 'function') {
|
|
27740
|
+
return null;
|
|
27741
|
+
}
|
|
27742
|
+
const shim = {
|
|
27743
|
+
readFileSync: (...args) => {
|
|
27744
|
+
const [pathOrDescriptor, options] = args;
|
|
27745
|
+
if (typeof pathOrDescriptor !== 'string') {
|
|
27746
|
+
throw new Error('FS shim only supports string file paths');
|
|
27747
|
+
}
|
|
27748
|
+
let encoding;
|
|
27749
|
+
if (typeof options === 'string') {
|
|
27750
|
+
encoding = options;
|
|
27751
|
+
}
|
|
27752
|
+
else if (options &&
|
|
27753
|
+
typeof options === 'object' &&
|
|
27754
|
+
'encoding' in options &&
|
|
27755
|
+
typeof options.encoding === 'string') {
|
|
27756
|
+
encoding = options.encoding;
|
|
27757
|
+
}
|
|
27758
|
+
const data = fsBinding.readFileUtf8(pathOrDescriptor, 0);
|
|
27759
|
+
if (!encoding) {
|
|
27760
|
+
return typeof Buffer !== 'undefined'
|
|
27761
|
+
? Buffer.from(data, 'utf-8')
|
|
27762
|
+
: data;
|
|
27763
|
+
}
|
|
27764
|
+
const lowered = encoding.toLowerCase();
|
|
27765
|
+
if (lowered === 'utf-8' || lowered === 'utf8') {
|
|
27766
|
+
return data;
|
|
27767
|
+
}
|
|
27768
|
+
if (typeof Buffer === 'undefined') {
|
|
27769
|
+
throw new Error(`Buffer API is not available to convert encoding ${String(encoding)}`);
|
|
27770
|
+
}
|
|
27771
|
+
return Buffer.from(data, 'utf-8').toString(encoding);
|
|
27772
|
+
},
|
|
27773
|
+
existsSync: (...args) => {
|
|
27774
|
+
const [pathLike] = args;
|
|
27775
|
+
if (typeof pathLike !== 'string') {
|
|
27776
|
+
return false;
|
|
27777
|
+
}
|
|
27778
|
+
if (typeof fsBinding.existsSync === 'function') {
|
|
27779
|
+
try {
|
|
27780
|
+
return Boolean(fsBinding.existsSync(pathLike));
|
|
27781
|
+
}
|
|
27782
|
+
catch {
|
|
27783
|
+
// fall through to the internal stat fallback
|
|
27784
|
+
}
|
|
27785
|
+
}
|
|
27786
|
+
if (typeof fsBinding.internalModuleStat === 'function') {
|
|
27787
|
+
try {
|
|
27788
|
+
return (fsBinding.internalModuleStat(pathLike) >= 0);
|
|
27789
|
+
}
|
|
27790
|
+
catch {
|
|
27791
|
+
return false;
|
|
27792
|
+
}
|
|
27793
|
+
}
|
|
27794
|
+
return false;
|
|
27795
|
+
},
|
|
27796
|
+
};
|
|
27797
|
+
return shim;
|
|
27798
|
+
}
|
|
27799
|
+
catch {
|
|
27800
|
+
return null;
|
|
27801
|
+
}
|
|
27802
|
+
}
|
|
27729
27803
|
function fileUrlToPath(url) {
|
|
27730
27804
|
try {
|
|
27731
27805
|
const parsed = new URL(url);
|
|
@@ -27788,6 +27862,11 @@
|
|
|
27788
27862
|
throw new Error(`Unable to load file system module: ${error instanceof Error ? error.message : String(error)}`);
|
|
27789
27863
|
}
|
|
27790
27864
|
}
|
|
27865
|
+
const shim = createFsShim();
|
|
27866
|
+
if (shim) {
|
|
27867
|
+
cachedFsModule = shim;
|
|
27868
|
+
return cachedFsModule;
|
|
27869
|
+
}
|
|
27791
27870
|
throw new Error('File system module is not accessible in this environment');
|
|
27792
27871
|
}
|
|
27793
27872
|
function readConfigFile(filePath) {
|
|
@@ -55669,8 +55748,47 @@
|
|
|
55669
55748
|
}
|
|
55670
55749
|
|
|
55671
55750
|
const SENTINEL_PORT = 8000;
|
|
55751
|
+
const ENV_PLUGIN_KEY = 'FAME_PLUGINS';
|
|
55752
|
+
const DEFAULT_PLUGINS = ['@naylence/runtime'];
|
|
55753
|
+
function getEnvRecords() {
|
|
55754
|
+
const records = [];
|
|
55755
|
+
if (typeof globalThis !== 'undefined') {
|
|
55756
|
+
const candidateProcess = globalThis.process;
|
|
55757
|
+
if (candidateProcess?.env && typeof candidateProcess.env === 'object') {
|
|
55758
|
+
records.push(candidateProcess.env);
|
|
55759
|
+
}
|
|
55760
|
+
const browserEnv = globalThis.__ENV__;
|
|
55761
|
+
if (browserEnv && typeof browserEnv === 'object') {
|
|
55762
|
+
records.push(browserEnv);
|
|
55763
|
+
}
|
|
55764
|
+
}
|
|
55765
|
+
return records;
|
|
55766
|
+
}
|
|
55767
|
+
function parseEnvPluginList(raw) {
|
|
55768
|
+
if (typeof raw !== 'string' || raw.trim().length === 0) {
|
|
55769
|
+
return [];
|
|
55770
|
+
}
|
|
55771
|
+
return raw
|
|
55772
|
+
.split(/[,\s]+/u)
|
|
55773
|
+
.map((entry) => entry.trim())
|
|
55774
|
+
.filter((entry) => entry.length > 0);
|
|
55775
|
+
}
|
|
55776
|
+
function computeConfiguredPlugins() {
|
|
55777
|
+
const resolved = new Set();
|
|
55778
|
+
for (const plugin of DEFAULT_PLUGINS) {
|
|
55779
|
+
resolved.add(plugin);
|
|
55780
|
+
}
|
|
55781
|
+
for (const record of getEnvRecords()) {
|
|
55782
|
+
const raw = record?.[ENV_PLUGIN_KEY];
|
|
55783
|
+
for (const plugin of parseEnvPluginList(raw)) {
|
|
55784
|
+
resolved.add(plugin);
|
|
55785
|
+
}
|
|
55786
|
+
}
|
|
55787
|
+
return Array.from(resolved);
|
|
55788
|
+
}
|
|
55789
|
+
const COMMON_PLUGINS = computeConfiguredPlugins();
|
|
55672
55790
|
const CLIENT_CONFIG = {
|
|
55673
|
-
plugins:
|
|
55791
|
+
plugins: COMMON_PLUGINS,
|
|
55674
55792
|
node: {
|
|
55675
55793
|
security: {
|
|
55676
55794
|
type: 'SecurityProfile',
|
|
@@ -55691,7 +55809,7 @@
|
|
|
55691
55809
|
},
|
|
55692
55810
|
};
|
|
55693
55811
|
const NODE_CONFIG = {
|
|
55694
|
-
plugins:
|
|
55812
|
+
plugins: COMMON_PLUGINS,
|
|
55695
55813
|
node: {
|
|
55696
55814
|
type: 'Node',
|
|
55697
55815
|
id: '${env:FAME_NODE_ID:}',
|
|
@@ -55716,7 +55834,7 @@
|
|
|
55716
55834
|
},
|
|
55717
55835
|
};
|
|
55718
55836
|
const SENTINEL_CONFIG = {
|
|
55719
|
-
plugins:
|
|
55837
|
+
plugins: COMMON_PLUGINS,
|
|
55720
55838
|
node: {
|
|
55721
55839
|
type: 'Sentinel',
|
|
55722
55840
|
id: '${env:FAME_NODE_ID:}',
|