@dev-blinq/cucumber-js 1.0.16 → 1.0.18

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,4 +1,4 @@
1
- import FormData from "form-data";
1
+ import FormData from 'form-data';
2
2
  declare class RunUploadService {
3
3
  private runsApiBaseURL;
4
4
  private accessToken;
@@ -11,35 +11,36 @@ class RunUploadService {
11
11
  this.accessToken = accessToken;
12
12
  }
13
13
  async createRunDocument(name) {
14
- const runDocResult = await axios_1.default.post(this.runsApiBaseURL + "/cucumber-runs/create", {
15
- name: name ? name : "TEST",
14
+ const runDocResult = await axios_1.default.post(this.runsApiBaseURL + '/cucumber-runs/create', {
15
+ name: name ? name : 'TEST',
16
16
  }, {
17
17
  headers: {
18
- Authorization: "Bearer " + this.accessToken,
19
- "x-source": "cucumber_js"
18
+ Authorization: 'Bearer ' + this.accessToken,
19
+ 'x-source': 'cucumber_js',
20
20
  },
21
21
  });
22
22
  if (runDocResult.status !== 200) {
23
- throw new Error("Failed to create run document in the server");
23
+ throw new Error('Failed to create run document in the server');
24
24
  }
25
25
  if (runDocResult.data.status !== true) {
26
- throw new Error("Failed to create run document in the server");
26
+ throw new Error('Failed to create run document in the server');
27
27
  }
28
28
  return runDocResult.data.run;
29
29
  }
30
30
  async upload(formData) {
31
- const response = await axios_1.default.post(this.runsApiBaseURL + "/cucumber-runs/upload", formData, {
31
+ const response = await axios_1.default.post(this.runsApiBaseURL + '/cucumber-runs/upload', formData, {
32
32
  headers: {
33
33
  ...formData.getHeaders(),
34
- Authorization: "Bearer " + this.accessToken,
35
- "x-source": "cucumber_js"
34
+ Authorization: 'Bearer ' + this.accessToken,
35
+ 'Response-Type': 'arraybuffer',
36
+ 'x-source': 'cucumber_js',
36
37
  },
37
38
  });
38
39
  if (response.status !== 200) {
39
- throw new Error("Failed to upload run to the server");
40
+ throw new Error('Failed to upload run to the server');
40
41
  }
41
42
  if (response.data.status !== true) {
42
- throw new Error("Failed to upload run to the server");
43
+ throw new Error('Failed to upload run to the server');
43
44
  }
44
45
  }
45
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upload_serivce.js","sourceRoot":"","sources":["../../../src/formatter/helpers/upload_serivce.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,MAAM,gBAAgB;IAClB,YAAoB,cAAqB,EAAU,WAAkB;QAAjD,mBAAc,GAAd,cAAc,CAAO;QAAU,gBAAW,GAAX,WAAW,CAAO;IACrE,CAAC;IACD,KAAK,CAAC,iBAAiB,CAAC,IAAW;QACjC,MAAM,YAAY,GAAG,MAAM,eAAK,CAAC,IAAI,CACnC,IAAI,CAAC,cAAc,GAAG,uBAAuB,EAC7C;YACE,IAAI,EAAE,IAAI,CAAA,CAAC,CAAA,IAAI,CAAA,CAAC,CAAC,MAAM;SACxB,EACD;YACE,OAAO,EAAE;gBACP,aAAa,EAAE,SAAS,GAAG,IAAI,CAAC,WAAW;gBAC3C,UAAU,EAAC,aAAa;aACzB;SACF,CACF,CAAC;QACF,IAAG,YAAY,CAAC,MAAM,KAAK,GAAG,EAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;SAChE;QACD,IAAG,YAAY,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,EAAC;YACnC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;SAChE;QACD,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,CAAA;IAC9B,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,QAAiB;QAC1B,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,uBAAuB,EAAE,QAAQ,EAAE;YACvF,OAAO,EAAE;gBACP,GAAG,QAAQ,CAAC,UAAU,EAAE;gBACxB,aAAa,EAAE,SAAS,GAAG,IAAI,CAAC,WAAW;gBAC3C,UAAU,EAAC,aAAa;aACzB;SACF,CAAC,CAAA;QACF,IAAG,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAC;YACzB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;SACvD;QACD,IAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,EAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;SACvD;IACP,CAAC;CACJ;AACO,4CAAgB","sourcesContent":["import axios from \"axios\";\nimport FormData from \"form-data\";\nclass RunUploadService {\n constructor(private runsApiBaseURL:string, private accessToken:string){\n }\n async createRunDocument(name:string){\n const runDocResult = await axios.post(\n this.runsApiBaseURL + \"/cucumber-runs/create\",\n {\n name: name?name: \"TEST\",\n },\n {\n headers: {\n Authorization: \"Bearer \" + this.accessToken,\n \"x-source\":\"cucumber_js\"\n },\n }\n );\n if(runDocResult.status !== 200){\n throw new Error(\"Failed to create run document in the server\");\n }\n if(runDocResult.data.status !== true){\n throw new Error(\"Failed to create run document in the server\");\n }\n return runDocResult.data.run\n }\n async upload(formData:FormData){\n const response = await axios.post(this.runsApiBaseURL + \"/cucumber-runs/upload\", formData, {\n headers: {\n ...formData.getHeaders(),\n Authorization: \"Bearer \" + this.accessToken,\n \"x-source\":\"cucumber_js\"\n },\n })\n if(response.status !== 200){\n throw new Error(\"Failed to upload run to the server\");\n }\n if(response.data.status !== true){\n throw new Error(\"Failed to upload run to the server\");\n }\n }\n}\nexport {RunUploadService}"]}
1
+ {"version":3,"file":"upload_serivce.js","sourceRoot":"","sources":["../../../src/formatter/helpers/upload_serivce.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AAEzB,MAAM,gBAAgB;IACpB,YAAoB,cAAsB,EAAU,WAAmB;QAAnD,mBAAc,GAAd,cAAc,CAAQ;QAAU,gBAAW,GAAX,WAAW,CAAQ;IAAG,CAAC;IAC3E,KAAK,CAAC,iBAAiB,CAAC,IAAY;QAClC,MAAM,YAAY,GAAG,MAAM,eAAK,CAAC,IAAI,CACnC,IAAI,CAAC,cAAc,GAAG,uBAAuB,EAC7C;YACE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM;SAC3B,EACD;YACE,OAAO,EAAE;gBACP,aAAa,EAAE,SAAS,GAAG,IAAI,CAAC,WAAW;gBAC3C,UAAU,EAAE,aAAa;aAC1B;SACF,CACF,CAAA;QACD,IAAI,YAAY,CAAC,MAAM,KAAK,GAAG,EAAE;YAC/B,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAA;SAC/D;QACD,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE;YACrC,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAA;SAC/D;QACD,OAAO,YAAY,CAAC,IAAI,CAAC,GAAG,CAAA;IAC9B,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,QAAkB;QAC7B,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,IAAI,CAC/B,IAAI,CAAC,cAAc,GAAG,uBAAuB,EAC7C,QAAQ,EACR;YACE,OAAO,EAAE;gBACP,GAAG,QAAQ,CAAC,UAAU,EAAE;gBACxB,aAAa,EAAE,SAAS,GAAG,IAAI,CAAC,WAAW;gBAC3C,eAAe,EAAE,aAAa;gBAC9B,UAAU,EAAE,aAAa;aAC1B;SACF,CACF,CAAA;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;YAC3B,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAA;SACtD;QACD,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE;YACjC,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAA;SACtD;IACH,CAAC;CACF;AACQ,4CAAgB","sourcesContent":["import axios from 'axios'\nimport FormData from 'form-data'\nclass RunUploadService {\n constructor(private runsApiBaseURL: string, private accessToken: string) {}\n async createRunDocument(name: string) {\n const runDocResult = await axios.post(\n this.runsApiBaseURL + '/cucumber-runs/create',\n {\n name: name ? name : 'TEST',\n },\n {\n headers: {\n Authorization: 'Bearer ' + this.accessToken,\n 'x-source': 'cucumber_js',\n },\n }\n )\n if (runDocResult.status !== 200) {\n throw new Error('Failed to create run document in the server')\n }\n if (runDocResult.data.status !== true) {\n throw new Error('Failed to create run document in the server')\n }\n return runDocResult.data.run\n }\n async upload(formData: FormData) {\n const response = await axios.post(\n this.runsApiBaseURL + '/cucumber-runs/upload',\n formData,\n {\n headers: {\n ...formData.getHeaders(),\n Authorization: 'Bearer ' + this.accessToken,\n 'Response-Type': 'arraybuffer',\n 'x-source': 'cucumber_js',\n },\n }\n )\n if (response.status !== 200) {\n throw new Error('Failed to upload run to the server')\n }\n if (response.data.status !== true) {\n throw new Error('Failed to upload run to the server')\n }\n }\n}\nexport { RunUploadService }\n"]}
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "1.0.16";
1
+ export declare const version = "1.0.18";
package/lib/version.js CHANGED
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
4
  // Generated by genversion.
5
- exports.version = '1.0.16';
5
+ exports.version = '1.0.18';
6
6
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,2BAA2B;AACd,QAAA,OAAO,GAAG,QAAQ,CAAA","sourcesContent":["// Generated by genversion.\nexport const version = '1.0.16'\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":";;;AAAA,2BAA2B;AACd,QAAA,OAAO,GAAG,QAAQ,CAAA","sourcesContent":["// Generated by genversion.\nexport const version = '1.0.18'\n"]}
package/package.json CHANGED
@@ -8,9 +8,7 @@
8
8
  "gherkin",
9
9
  "tests"
10
10
  ],
11
-
12
- "version": "1.0.16",
13
-
11
+ "version": "1.0.18",
14
12
  "homepage": "https://github.com/blinq-io/cucumber-js",
15
13
  "author": "blinq.io",
16
14
  "contributors": [
@@ -191,4 +189,4 @@
191
189
  "bin/",
192
190
  "lib/"
193
191
  ]
194
- }
192
+ }