@ceon-oy/monitor-sdk 1.1.2 → 1.1.4
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/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +21 -5
- package/dist/index.mjs +21 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -341,6 +341,7 @@ declare class MonitorClient {
|
|
|
341
341
|
/**
|
|
342
342
|
* Run a command with a reliable timeout using spawn.
|
|
343
343
|
* More reliable than execSync timeout in containerized environments.
|
|
344
|
+
* Only works in Node.js environment (not browser/bundled).
|
|
344
345
|
*/
|
|
345
346
|
private runCommandWithTimeout;
|
|
346
347
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -341,6 +341,7 @@ declare class MonitorClient {
|
|
|
341
341
|
/**
|
|
342
342
|
* Run a command with a reliable timeout using spawn.
|
|
343
343
|
* More reliable than execSync timeout in containerized environments.
|
|
344
|
+
* Only works in Node.js environment (not browser/bundled).
|
|
344
345
|
*/
|
|
345
346
|
private runCommandWithTimeout;
|
|
346
347
|
/**
|
package/dist/index.js
CHANGED
|
@@ -567,8 +567,14 @@ var MonitorClient = class {
|
|
|
567
567
|
return [];
|
|
568
568
|
}
|
|
569
569
|
try {
|
|
570
|
-
const fsModule = await import(
|
|
571
|
-
|
|
570
|
+
const fsModule = await import(
|
|
571
|
+
/* webpackIgnore: true */
|
|
572
|
+
"fs"
|
|
573
|
+
);
|
|
574
|
+
const pathModule = await import(
|
|
575
|
+
/* webpackIgnore: true */
|
|
576
|
+
"path"
|
|
577
|
+
);
|
|
572
578
|
const fs = fsModule.default || fsModule;
|
|
573
579
|
const path = pathModule.default || pathModule;
|
|
574
580
|
const baseDir = process.cwd();
|
|
@@ -814,9 +820,13 @@ var MonitorClient = class {
|
|
|
814
820
|
/**
|
|
815
821
|
* Run a command with a reliable timeout using spawn.
|
|
816
822
|
* More reliable than execSync timeout in containerized environments.
|
|
823
|
+
* Only works in Node.js environment (not browser/bundled).
|
|
817
824
|
*/
|
|
818
825
|
async runCommandWithTimeout(command, args, options) {
|
|
819
|
-
const childProcess = await import(
|
|
826
|
+
const childProcess = await import(
|
|
827
|
+
/* webpackIgnore: true */
|
|
828
|
+
"child_process"
|
|
829
|
+
);
|
|
820
830
|
const { spawn } = childProcess;
|
|
821
831
|
return new Promise((resolve) => {
|
|
822
832
|
const proc = spawn(command, args, {
|
|
@@ -874,8 +884,14 @@ var MonitorClient = class {
|
|
|
874
884
|
let path;
|
|
875
885
|
let fs;
|
|
876
886
|
try {
|
|
877
|
-
const pathModule = await import(
|
|
878
|
-
|
|
887
|
+
const pathModule = await import(
|
|
888
|
+
/* webpackIgnore: true */
|
|
889
|
+
"path"
|
|
890
|
+
);
|
|
891
|
+
const fsModule = await import(
|
|
892
|
+
/* webpackIgnore: true */
|
|
893
|
+
"fs"
|
|
894
|
+
);
|
|
879
895
|
path = pathModule;
|
|
880
896
|
fs = fsModule;
|
|
881
897
|
} catch {
|
package/dist/index.mjs
CHANGED
|
@@ -531,8 +531,14 @@ var MonitorClient = class {
|
|
|
531
531
|
return [];
|
|
532
532
|
}
|
|
533
533
|
try {
|
|
534
|
-
const fsModule = await import(
|
|
535
|
-
|
|
534
|
+
const fsModule = await import(
|
|
535
|
+
/* webpackIgnore: true */
|
|
536
|
+
"fs"
|
|
537
|
+
);
|
|
538
|
+
const pathModule = await import(
|
|
539
|
+
/* webpackIgnore: true */
|
|
540
|
+
"path"
|
|
541
|
+
);
|
|
536
542
|
const fs = fsModule.default || fsModule;
|
|
537
543
|
const path = pathModule.default || pathModule;
|
|
538
544
|
const baseDir = process.cwd();
|
|
@@ -778,9 +784,13 @@ var MonitorClient = class {
|
|
|
778
784
|
/**
|
|
779
785
|
* Run a command with a reliable timeout using spawn.
|
|
780
786
|
* More reliable than execSync timeout in containerized environments.
|
|
787
|
+
* Only works in Node.js environment (not browser/bundled).
|
|
781
788
|
*/
|
|
782
789
|
async runCommandWithTimeout(command, args, options) {
|
|
783
|
-
const childProcess = await import(
|
|
790
|
+
const childProcess = await import(
|
|
791
|
+
/* webpackIgnore: true */
|
|
792
|
+
"child_process"
|
|
793
|
+
);
|
|
784
794
|
const { spawn } = childProcess;
|
|
785
795
|
return new Promise((resolve) => {
|
|
786
796
|
const proc = spawn(command, args, {
|
|
@@ -838,8 +848,14 @@ var MonitorClient = class {
|
|
|
838
848
|
let path;
|
|
839
849
|
let fs;
|
|
840
850
|
try {
|
|
841
|
-
const pathModule = await import(
|
|
842
|
-
|
|
851
|
+
const pathModule = await import(
|
|
852
|
+
/* webpackIgnore: true */
|
|
853
|
+
"path"
|
|
854
|
+
);
|
|
855
|
+
const fsModule = await import(
|
|
856
|
+
/* webpackIgnore: true */
|
|
857
|
+
"fs"
|
|
858
|
+
);
|
|
843
859
|
path = pathModule;
|
|
844
860
|
fs = fsModule;
|
|
845
861
|
} catch {
|
package/package.json
CHANGED