@ceon-oy/monitor-sdk 1.1.3 → 1.1.5
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.js +18 -5
- package/dist/index.mjs +18 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -96,7 +96,8 @@ var MonitorClient = class {
|
|
|
96
96
|
if (!["https:", "http:"].includes(url.protocol)) {
|
|
97
97
|
throw new Error("[MonitorClient] Endpoint must use HTTP or HTTPS protocol");
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
const devEnvironments = ["development", "dev", "test", "local"];
|
|
100
|
+
if (url.protocol === "http:" && !devEnvironments.includes(config.environment || "")) {
|
|
100
101
|
if (!config.allowInsecureHttp) {
|
|
101
102
|
throw new Error("[MonitorClient] HTTP endpoints require allowInsecureHttp: true in non-development environments");
|
|
102
103
|
}
|
|
@@ -567,8 +568,14 @@ var MonitorClient = class {
|
|
|
567
568
|
return [];
|
|
568
569
|
}
|
|
569
570
|
try {
|
|
570
|
-
const fsModule = await import(
|
|
571
|
-
|
|
571
|
+
const fsModule = await import(
|
|
572
|
+
/* webpackIgnore: true */
|
|
573
|
+
"fs"
|
|
574
|
+
);
|
|
575
|
+
const pathModule = await import(
|
|
576
|
+
/* webpackIgnore: true */
|
|
577
|
+
"path"
|
|
578
|
+
);
|
|
572
579
|
const fs = fsModule.default || fsModule;
|
|
573
580
|
const path = pathModule.default || pathModule;
|
|
574
581
|
const baseDir = process.cwd();
|
|
@@ -878,8 +885,14 @@ var MonitorClient = class {
|
|
|
878
885
|
let path;
|
|
879
886
|
let fs;
|
|
880
887
|
try {
|
|
881
|
-
const pathModule = await import(
|
|
882
|
-
|
|
888
|
+
const pathModule = await import(
|
|
889
|
+
/* webpackIgnore: true */
|
|
890
|
+
"path"
|
|
891
|
+
);
|
|
892
|
+
const fsModule = await import(
|
|
893
|
+
/* webpackIgnore: true */
|
|
894
|
+
"fs"
|
|
895
|
+
);
|
|
883
896
|
path = pathModule;
|
|
884
897
|
fs = fsModule;
|
|
885
898
|
} catch {
|
package/dist/index.mjs
CHANGED
|
@@ -60,7 +60,8 @@ var MonitorClient = class {
|
|
|
60
60
|
if (!["https:", "http:"].includes(url.protocol)) {
|
|
61
61
|
throw new Error("[MonitorClient] Endpoint must use HTTP or HTTPS protocol");
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
const devEnvironments = ["development", "dev", "test", "local"];
|
|
64
|
+
if (url.protocol === "http:" && !devEnvironments.includes(config.environment || "")) {
|
|
64
65
|
if (!config.allowInsecureHttp) {
|
|
65
66
|
throw new Error("[MonitorClient] HTTP endpoints require allowInsecureHttp: true in non-development environments");
|
|
66
67
|
}
|
|
@@ -531,8 +532,14 @@ var MonitorClient = class {
|
|
|
531
532
|
return [];
|
|
532
533
|
}
|
|
533
534
|
try {
|
|
534
|
-
const fsModule = await import(
|
|
535
|
-
|
|
535
|
+
const fsModule = await import(
|
|
536
|
+
/* webpackIgnore: true */
|
|
537
|
+
"fs"
|
|
538
|
+
);
|
|
539
|
+
const pathModule = await import(
|
|
540
|
+
/* webpackIgnore: true */
|
|
541
|
+
"path"
|
|
542
|
+
);
|
|
536
543
|
const fs = fsModule.default || fsModule;
|
|
537
544
|
const path = pathModule.default || pathModule;
|
|
538
545
|
const baseDir = process.cwd();
|
|
@@ -842,8 +849,14 @@ var MonitorClient = class {
|
|
|
842
849
|
let path;
|
|
843
850
|
let fs;
|
|
844
851
|
try {
|
|
845
|
-
const pathModule = await import(
|
|
846
|
-
|
|
852
|
+
const pathModule = await import(
|
|
853
|
+
/* webpackIgnore: true */
|
|
854
|
+
"path"
|
|
855
|
+
);
|
|
856
|
+
const fsModule = await import(
|
|
857
|
+
/* webpackIgnore: true */
|
|
858
|
+
"fs"
|
|
859
|
+
);
|
|
847
860
|
path = pathModule;
|
|
848
861
|
fs = fsModule;
|
|
849
862
|
} catch {
|
package/package.json
CHANGED