@naylence/agent-sdk 0.3.4-test.713 → 0.3.4-test.714
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
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) {
|