@onecx/accelerator 5.47.1 → 5.47.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onecx/accelerator",
3
- "version": "5.47.1",
3
+ "version": "5.47.2",
4
4
  "license": "Apache-2.0",
5
5
  "peerDependencies": {
6
6
  "tslib": "^2.6.3",
package/src/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export * from './lib/topic/syncable-topic';
3
3
  export * from './lib/topic/topic-publisher';
4
4
  export * from './lib/utils/path.utils';
5
5
  export * from './lib/utils/date.utils';
6
+ export * from './lib/utils/is-test.utils';
package/src/index.js CHANGED
@@ -6,4 +6,5 @@ tslib_1.__exportStar(require("./lib/topic/syncable-topic"), exports);
6
6
  tslib_1.__exportStar(require("./lib/topic/topic-publisher"), exports);
7
7
  tslib_1.__exportStar(require("./lib/utils/path.utils"), exports);
8
8
  tslib_1.__exportStar(require("./lib/utils/date.utils"), exports);
9
+ tslib_1.__exportStar(require("./lib/utils/is-test.utils"), exports);
9
10
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/accelerator/src/index.ts"],"names":[],"mappings":";;;AAAA,4DAAiC;AACjC,qEAA0C;AAC1C,sEAA2C;AAC3C,iEAAsC;AACtC,iEAAsC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/accelerator/src/index.ts"],"names":[],"mappings":";;;AAAA,4DAAiC;AACjC,qEAA0C;AAC1C,sEAA2C;AAC3C,iEAAsC;AACtC,iEAAsC;AACtC,oEAAyC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Utility function to determine if the code is running in a test environment.
3
+ * It checks for the presence of Jasmine or Jest environment variables.
4
+ *
5
+ * @returns {boolean} - Returns true if running in a test environment, otherwise false.
6
+ */
7
+ export declare function isTest(): boolean;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTest = isTest;
4
+ /**
5
+ * Utility function to determine if the code is running in a test environment.
6
+ * It checks for the presence of Jasmine or Jest environment variables.
7
+ *
8
+ * @returns {boolean} - Returns true if running in a test environment, otherwise false.
9
+ */
10
+ function isTest() {
11
+ if (typeof globalThis.jasmine !== 'undefined') {
12
+ return true;
13
+ }
14
+ if (typeof process !== 'undefined' && process.env?.["JEST_WORKER_ID"] !== undefined) {
15
+ return true;
16
+ }
17
+ return false;
18
+ }
19
+ //# sourceMappingURL=is-test.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-test.utils.js","sourceRoot":"","sources":["../../../../../../libs/accelerator/src/lib/utils/is-test.utils.ts"],"names":[],"mappings":";;AAMA,wBAQC;AAdD;;;;;GAKG;AACH,SAAgB,MAAM;IACpB,IAAG,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAG,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC,KAAK,SAAS,EAAE,CAAC;QACnF,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}