@decaf-ts/integrations 0.1.1 → 0.1.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.
@@ -1,2 +1,2 @@
1
- var e,o;e=this,o=(e,o,r,t)=>{"use strict";e.COMMIT="9134d75",e.FULL_VERSION="0.1.0-9134d75",e.PACKAGE_NAME="@decaf-ts/integrations",e.VERSION="0.1.0",e.execWithLogging=async(e,d,i,s=r.LogLevel.info)=>(i.debug("Executing: "+e),new Promise((r,c)=>{const n=o.exec(e,d);let a="",l="";n.stdout?.on("data",e=>{a+=e,i[s](e.trim())}),n.stderr?.on("data",e=>{l+=e,i.error(e.trim())}),n.on("close",e=>{0===e?(i.silly("Command completed successfully"),r({stdout:a,stderr:l})):(i.critical("Command failed with code "+e,l),c(new t.InternalError(`Command failed with code ${e}: ${l}`)))}),n.on("error",e=>{i.critical("Command execution error",e),c(e)})}))},"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("child_process"),require("@decaf-ts/logging"),require("@decaf-ts/db-decorators")):"function"==typeof define&&define.amd?define(["exports","child_process","@decaf-ts/logging","@decaf-ts/db-decorators"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).integrations={},e.childProcess,e.decafTsLogging,e.decafTsDbDecorators);
1
+ var e,o;e=this,o=(e,o,r,i)=>{"use strict";e.COMMIT="3666be9",e.FULL_VERSION="0.1.1-3666be9",e.PACKAGE_NAME="@decaf-ts/integrations",e.VERSION="0.1.1",e.execWithLogging=async(e,n,t,s=r.LogLevel.info)=>(t.debug("Executing: "+e),new Promise((r,d)=>{const c=o.exec(e,n),a=[],l=[];c.stdout?.on("data",e=>{a.push(e),t[s](e.trim())}),c.stderr?.on("data",e=>{l.push(e),t.error(e.trim())}),c.on("close",e=>{0===e?(t.silly("Command completed successfully"),r({stdout:a.join("\n"),stderr:l.join("\n")})):(t.critical(`Command failed with code ${e}:\n ${l.join("\n")}`),d(new i.InternalError(`Command failed with code ${e}: ${l.join("\n")}`)))}),c.on("error",e=>{t.critical("Command execution error",e),d(e)})}))},"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("child_process"),require("@decaf-ts/logging"),require("@decaf-ts/db-decorators")):"function"==typeof define&&define.amd?define(["exports","child_process","@decaf-ts/logging","@decaf-ts/db-decorators"],o):o((e="undefined"!=typeof globalThis?globalThis:e||self).integrations={},e.childProcess,e.decafTsLogging,e.decafTsDbDecorators);
2
2
  //# sourceMappingURL=integrations.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"integrations.cjs","sources":["../src/index.ts","../src/utils.ts"],"sourcesContent":[null,null],"names":["async","command","options","log","level","LogLevel","info","debug","Promise","resolve","reject","child","exec","stdout","stderr","on","data","trim","error","code","silly","critical","InternalError","err"],"mappings":"mDASsB,4BAEM,kCAEQ,wBANL,gCCExBA,MACLC,EACAC,EACAC,EACAC,EAAkBC,EAAAA,SAASC,QAE3BH,EAAII,MAAM,cAAcN,GAEjB,IAAIO,QAAQ,CAACC,EAASC,KAC3B,MAAMC,EAAQC,EAAAA,KAAKX,EAASC,GAE5B,IAAIW,EAAS,GACTC,EAAS,GAEbH,EAAME,QAAQE,GAAG,OAASC,IACxBH,GAAUG,EACVb,EAAIC,GAAOY,EAAKC,UAGlBN,EAAMG,QAAQC,GAAG,OAASC,IACxBF,GAAUE,EACVb,EAAIe,MAAMF,EAAKC,UAGjBN,EAAMI,GAAG,QAAUI,IACJ,IAATA,GACFhB,EAAIiB,MAAM,kCACVX,EAAQ,CAAEI,SAAQC,aAElBX,EAAIkB,SAAS,4BAA4BF,EAAQL,GACjDJ,EACE,IAAIY,EAAAA,cAAc,4BAA4BH,MAASL,SAK7DH,EAAMI,GAAG,QAAUQ,IACjBpB,EAAIkB,SAAS,0BAA2BE,GACxCb,EAAOa"}
1
+ {"version":3,"file":"integrations.cjs","sources":["../src/index.ts","../src/utils.ts"],"sourcesContent":[null,null],"names":["async","command","options","log","level","LogLevel","info","debug","Promise","resolve","reject","child","exec","stdout","stderr","on","data","push","trim","error","code","silly","join","critical","InternalError","err"],"mappings":"mDASsB,4BAEM,kCAEQ,wBANL,gCCExBA,MACLC,EACAC,EACAC,EACAC,EAAkBC,EAAAA,SAASC,QAE3BH,EAAII,MAAM,cAAcN,GAEjB,IAAIO,QAAQ,CAACC,EAASC,KAC3B,MAAMC,EAAQC,EAAAA,KAAKX,EAASC,GAEtBW,EAAmB,GACnBC,EAAmB,GAEzBH,EAAME,QAAQE,GAAG,OAASC,IACxBH,EAAOI,KAAKD,GACZb,EAAIC,GAAOY,EAAKE,UAGlBP,EAAMG,QAAQC,GAAG,OAASC,IACxBF,EAAOG,KAAKD,GACZb,EAAIgB,MAAMH,EAAKE,UAGjBP,EAAMI,GAAG,QAAUK,IACJ,IAATA,GACFjB,EAAIkB,MAAM,kCACVZ,EAAQ,CAAEI,OAAQA,EAAOS,KAAK,MAAOR,OAAQA,EAAOQ,KAAK,UAEzDnB,EAAIoB,SACF,4BAA4BH,QAAWN,EAAOQ,KAAK,SAErDZ,EACE,IAAIc,EAAAA,cACF,4BAA4BJ,MAASN,EAAOQ,KAAK,aAMzDX,EAAMI,GAAG,QAAUU,IACjBtB,EAAIoB,SAAS,0BAA2BE,GACxCf,EAAOe"}
@@ -1,2 +1,2 @@
1
- import{exec as o}from"child_process";import{LogLevel as r}from"@decaf-ts/logging";import{InternalError as t}from"@decaf-ts/db-decorators";async function e(e,c,d,i=r.info){return d.debug("Executing: "+e),new Promise((r,n)=>{const m=o(e,c);let s="",a="";m.stdout?.on("data",o=>{s+=o,d[i](o.trim())}),m.stderr?.on("data",o=>{a+=o,d.error(o.trim())}),m.on("close",o=>{0===o?(d.silly("Command completed successfully"),r({stdout:s,stderr:a})):(d.critical("Command failed with code "+o,a),n(new t(`Command failed with code ${o}: ${a}`)))}),m.on("error",o=>{d.critical("Command execution error",o),n(o)})})}const c="##VERSION##",d="##COMMIT##",i="##FULL_VERSION##",n="##PACKAGE##";export{d as COMMIT,i as FULL_VERSION,n as PACKAGE_NAME,c as VERSION,e as execWithLogging};
1
+ import{exec as o}from"child_process";import{LogLevel as r}from"@decaf-ts/logging";import{InternalError as n}from"@decaf-ts/db-decorators";async function t(t,e,i,c=r.info){return i.debug("Executing: "+t),new Promise((r,d)=>{const s=o(t,e),m=[],a=[];s.stdout?.on("data",o=>{m.push(o),i[c](o.trim())}),s.stderr?.on("data",o=>{a.push(o),i.error(o.trim())}),s.on("close",o=>{0===o?(i.silly("Command completed successfully"),r({stdout:m.join("\n"),stderr:a.join("\n")})):(i.critical(`Command failed with code ${o}:\n ${a.join("\n")}`),d(new n(`Command failed with code ${o}: ${a.join("\n")}`)))}),s.on("error",o=>{i.critical("Command execution error",o),d(o)})})}const e="##VERSION##",i="##COMMIT##",c="##FULL_VERSION##",d="##PACKAGE##";export{i as COMMIT,c as FULL_VERSION,d as PACKAGE_NAME,e as VERSION,t as execWithLogging};
2
2
  //# sourceMappingURL=integrations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"integrations.js","sources":["../src/utils.ts","../src/index.ts"],"sourcesContent":[null,null],"names":["async","execWithLogging","command","options","log","level","LogLevel","info","debug","Promise","resolve","reject","child","exec","stdout","stderr","on","data","trim","error","code","silly","critical","InternalError","err","VERSION","COMMIT","FULL_VERSION","PACKAGE_NAME"],"mappings":"0IASOA,eAAeC,EACpBC,EACAC,EACAC,EACAC,EAAkBC,EAASC,MAI3B,OAFAH,EAAII,MAAM,cAAcN,GAEjB,IAAIO,QAAQ,CAACC,EAASC,KAC3B,MAAMC,EAAQC,EAAKX,EAASC,GAE5B,IAAIW,EAAS,GACTC,EAAS,GAEbH,EAAME,QAAQE,GAAG,OAASC,IACxBH,GAAUG,EACVb,EAAIC,GAAOY,EAAKC,UAGlBN,EAAMG,QAAQC,GAAG,OAASC,IACxBF,GAAUE,EACVb,EAAIe,MAAMF,EAAKC,UAGjBN,EAAMI,GAAG,QAAUI,IACJ,IAATA,GACFhB,EAAIiB,MAAM,kCACVX,EAAQ,CAAEI,SAAQC,aAElBX,EAAIkB,SAAS,4BAA4BF,EAAQL,GACjDJ,EACE,IAAIY,EAAc,4BAA4BH,MAASL,SAK7DH,EAAMI,GAAG,QAAUQ,IACjBpB,EAAIkB,SAAS,0BAA2BE,GACxCb,EAAOa,MAGb,CC3CO,MAAMC,EAAkB,cAElBC,EAAS,aAETC,EAAe,mBAEfC,EAAuB"}
1
+ {"version":3,"file":"integrations.js","sources":["../src/utils.ts","../src/index.ts"],"sourcesContent":[null,null],"names":["async","execWithLogging","command","options","log","level","LogLevel","info","debug","Promise","resolve","reject","child","exec","stdout","stderr","on","data","push","trim","error","code","silly","join","critical","InternalError","err","VERSION","COMMIT","FULL_VERSION","PACKAGE_NAME"],"mappings":"0IASOA,eAAeC,EACpBC,EACAC,EACAC,EACAC,EAAkBC,EAASC,MAI3B,OAFAH,EAAII,MAAM,cAAcN,GAEjB,IAAIO,QAAQ,CAACC,EAASC,KAC3B,MAAMC,EAAQC,EAAKX,EAASC,GAEtBW,EAAmB,GACnBC,EAAmB,GAEzBH,EAAME,QAAQE,GAAG,OAASC,IACxBH,EAAOI,KAAKD,GACZb,EAAIC,GAAOY,EAAKE,UAGlBP,EAAMG,QAAQC,GAAG,OAASC,IACxBF,EAAOG,KAAKD,GACZb,EAAIgB,MAAMH,EAAKE,UAGjBP,EAAMI,GAAG,QAAUK,IACJ,IAATA,GACFjB,EAAIkB,MAAM,kCACVZ,EAAQ,CAAEI,OAAQA,EAAOS,KAAK,MAAOR,OAAQA,EAAOQ,KAAK,UAEzDnB,EAAIoB,SACF,4BAA4BH,QAAWN,EAAOQ,KAAK,SAErDZ,EACE,IAAIc,EACF,4BAA4BJ,MAASN,EAAOQ,KAAK,aAMzDX,EAAMI,GAAG,QAAUU,IACjBtB,EAAIoB,SAAS,0BAA2BE,GACxCf,EAAOe,MAGb,CC/CO,MAAMC,EAAkB,cAElBC,EAAS,aAETC,EAAe,mBAEfC,EAAuB"}
package/jest.config.cjs CHANGED
@@ -1,8 +1,9 @@
1
- /* eslint-disable no-undef */
2
- module.exports = {
3
- displayName: "Decaf Integrations",
1
+ const config = {
4
2
  verbose: true,
5
- transform: {
3
+ // eslint-disable-next-line no-undef
4
+ rootDir: __dirname,
5
+ testEnvironment: "node",
6
+ transform: {
6
7
  "^.+\\.ts?$": [
7
8
  "ts-jest",
8
9
  {
@@ -17,32 +18,20 @@ module.exports = {
17
18
  },
18
19
  ],
19
20
  },
20
- testEnvironment: "node",
21
+ testRegex: "/tests/.*\\.(test|spec)\\.(ts|tsx)$",
22
+ transformIgnorePatterns: ["node_modules/(uuid)/.*"],
21
23
  moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
22
- collectCoverage: true,
23
- coverageDirectory: "./workdocs/coverage",
24
- collectCoverageFrom: [
25
- "src/**/*.{ts,tsx}",
26
- "!src/**/*.d.ts",
27
- ],
28
- coverageReporters: ["json-summary", "text-summary", "text", "html"],
29
- reporters: [
30
- "default",
31
- [
32
- "jest-junit",
33
- {
34
- outputDirectory: "./workdocs/coverage",
35
- outputName: "junit-report.xml",
36
- },
37
- ],
38
- ],
39
- watchman: false,
24
+ coverageDirectory: "./workdocs/reports/coverage",
25
+ collectCoverage: false,
26
+ collectCoverageFrom: ["src/**/*.{js,jsx,ts,tsx}", "!src/bin/**/*.ts"],
27
+ reporters: ["default"],
40
28
  moduleNameMapper: {
41
- "^\\.\\.\\/\\.\\.\\/lib\\/keycloak(.*)$": "<rootDir>/../integrations/src/keycloak\\1",
29
+ "^\\.\\.\\/\\.\\.\\/lib\\/keycloak(.*)$":
30
+ "<rootDir>/../integrations/src/keycloak\\1",
42
31
  },
43
32
  extensionsToTreatAsEsm: [".ts"],
44
33
  preset: "ts-jest/presets/default-esm",
45
- testMatch: ["**/tests/**/*.test.ts"],
46
- testPathIgnorePatterns: ["/node_modules/", "/lib/"],
47
- testTimeout: 30000,
48
34
  };
35
+
36
+ // eslint-disable-next-line no-undef
37
+ module.exports = config;
package/lib/cjs/index.cjs CHANGED
@@ -21,9 +21,9 @@ exports.PACKAGE_NAME = exports.FULL_VERSION = exports.COMMIT = exports.VERSION =
21
21
  * @description Exposes the package utilities and build-time version metadata for `@decaf-ts/integrations`.
22
22
  */
23
23
  __exportStar(require("./utils.cjs"), exports);
24
- exports.VERSION = "0.1.0";
25
- exports.COMMIT = "9134d75";
26
- exports.FULL_VERSION = "0.1.0-9134d75";
24
+ exports.VERSION = "0.1.1";
25
+ exports.COMMIT = "3666be9";
26
+ exports.FULL_VERSION = "0.1.1-3666be9";
27
27
  exports.PACKAGE_NAME = "@decaf-ts/integrations";
28
28
  //# sourceMappingURL=index.js.map
29
29
  //# sourceMappingURL=index.js.map
package/lib/cjs/utils.cjs CHANGED
@@ -13,24 +13,24 @@ async function execWithLogging(command, options, log, level = logging_1.LogLevel
13
13
  log.debug(`Executing: ${command}`);
14
14
  return new Promise((resolve, reject) => {
15
15
  const child = (0, child_process_1.exec)(command, options);
16
- let stdout = "";
17
- let stderr = "";
16
+ const stdout = [];
17
+ const stderr = [];
18
18
  child.stdout?.on("data", (data) => {
19
- stdout += data;
19
+ stdout.push(data);
20
20
  log[level](data.trim());
21
21
  });
22
22
  child.stderr?.on("data", (data) => {
23
- stderr += data;
23
+ stderr.push(data);
24
24
  log.error(data.trim());
25
25
  });
26
26
  child.on("close", (code) => {
27
27
  if (code === 0) {
28
28
  log.silly(`Command completed successfully`);
29
- resolve({ stdout, stderr });
29
+ resolve({ stdout: stdout.join("\n"), stderr: stderr.join("\n") });
30
30
  }
31
31
  else {
32
- log.critical(`Command failed with code ${code}`, stderr);
33
- reject(new db_decorators_1.InternalError(`Command failed with code ${code}: ${stderr}`));
32
+ log.critical(`Command failed with code ${code}:\n ${stderr.join("\n")}`);
33
+ reject(new db_decorators_1.InternalError(`Command failed with code ${code}: ${stderr.join("\n")}`));
34
34
  }
35
35
  });
36
36
  child.on("error", (err) => {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["utils.js"],"names":[],"mappings":";;AAQA,0CA6BC;AAr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;QACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YACvB,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;gBACb,GAAG,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;gBAC5C,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACtE,CAAC;iBACI,CAAC;gBACF,GAAG,CAAC,QAAQ,CAAC,4BAA4B,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACzE,MAAM,CAAC,IAAI,6BAAa,CAAC,4BAA4B,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YACxF,CAAC;QACL,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;YACtB,GAAG,CAAC,QAAQ,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC;YAC7C,MAAM,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC;AACD,iCAAiC"}
package/lib/esm/index.js CHANGED
@@ -4,8 +4,8 @@
4
4
  * @description Exposes the package utilities and build-time version metadata for `@decaf-ts/integrations`.
5
5
  */
6
6
  export * from "./utils.js";
7
- export const VERSION = "0.1.0";
8
- export const COMMIT = "9134d75";
9
- export const FULL_VERSION = "0.1.0-9134d75";
7
+ export const VERSION = "0.1.1";
8
+ export const COMMIT = "3666be9";
9
+ export const FULL_VERSION = "0.1.1-3666be9";
10
10
  export const PACKAGE_NAME = "@decaf-ts/integrations";
11
11
  //# sourceMappingURL=index.js.map
package/lib/esm/utils.js CHANGED
@@ -10,24 +10,24 @@ export async function execWithLogging(command, options, log, level = LogLevel.in
10
10
  log.debug(`Executing: ${command}`);
11
11
  return new Promise((resolve, reject) => {
12
12
  const child = exec(command, options);
13
- let stdout = "";
14
- let stderr = "";
13
+ const stdout = [];
14
+ const stderr = [];
15
15
  child.stdout?.on("data", (data) => {
16
- stdout += data;
16
+ stdout.push(data);
17
17
  log[level](data.trim());
18
18
  });
19
19
  child.stderr?.on("data", (data) => {
20
- stderr += data;
20
+ stderr.push(data);
21
21
  log.error(data.trim());
22
22
  });
23
23
  child.on("close", (code) => {
24
24
  if (code === 0) {
25
25
  log.silly(`Command completed successfully`);
26
- resolve({ stdout, stderr });
26
+ resolve({ stdout: stdout.join("\n"), stderr: stderr.join("\n") });
27
27
  }
28
28
  else {
29
- log.critical(`Command failed with code ${code}`, stderr);
30
- reject(new InternalError(`Command failed with code ${code}: ${stderr}`));
29
+ log.critical(`Command failed with code ${code}:\n ${stderr.join("\n")}`);
30
+ reject(new InternalError(`Command failed with code ${code}: ${stderr.join("\n")}`));
31
31
  }
32
32
  });
33
33
  child.on("error", (err) => {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAU,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,OAAe,EACf,OAAwB,EACxB,GAAW,EACX,QAAkB,QAAQ,CAAC,IAAI;IAE/B,GAAG,CAAC,KAAK,CAAC,cAAc,OAAO,EAAE,CAAC,CAAC;IAEnC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAErC,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,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AAM,CAAC;gBACN,GAAG,CAAC,QAAQ,CACV,4BAA4B,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC3D,CAAC;gBACF,MAAM,CACJ,IAAI,aAAa,CACf,4BAA4B,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACzD,CACF,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAU,EAAE,EAAE;YAC/B,GAAG,CAAC,QAAQ,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC;YAC7C,MAAM,CAAC,GAAG,CAAC,CAAC;QACd,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -5,6 +5,6 @@
5
5
  */
6
6
  export * from "./utils.d.cts";
7
7
  export declare const VERSION: string;
8
- export declare const COMMIT = "9134d75";
9
- export declare const FULL_VERSION = "0.1.0-9134d75";
8
+ export declare const COMMIT = "3666be9";
9
+ export declare const FULL_VERSION = "0.1.1-3666be9";
10
10
  export declare const PACKAGE_NAME: string;
@@ -5,6 +5,6 @@
5
5
  */
6
6
  export * from "./utils.d.mts";
7
7
  export declare const VERSION: string;
8
- export declare const COMMIT = "9134d75";
9
- export declare const FULL_VERSION = "0.1.0-9134d75";
8
+ export declare const COMMIT = "3666be9";
9
+ export declare const FULL_VERSION = "0.1.1-3666be9";
10
10
  export declare const PACKAGE_NAME: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/integrations",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.mts",
@@ -143,7 +143,7 @@
143
143
  "test:e2e": "jest --testPathPatterns=\"/tests/(e2e)\" --passWithNoTests --detectOpenHandles",
144
144
  "test:all": "jest --testPathPatterns=\"/tests\" --passWithNoTests",
145
145
  "test:circular": "dpdm -T --no-warning --no-tree ./src/index.ts",
146
- "coverage": "rimraf ./workdocs/reports/data/*.json && npm run test:all -- --coverage --config=$(pwd)/../workdocs/reports/jest.coverage.config.js",
146
+ "coverage": "rimraf ./workdocs/reports/data/*.json && npm run test:all -- --coverage --config=./workdocs/reports/jest.coverage.config.cjs",
147
147
  "lint": "eslint .",
148
148
  "lint-fix": "eslint --fix .",
149
149
  "prepare-pr": "npm run lint-fix && npm run build:prod && npm run coverage && npm run docs",