@auxcode/auxta 1.3.33 → 1.3.35
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/build/cjs/AuxTA.d.ts +1 -0
- package/build/cjs/AuxTA.js +4 -2
- package/build/cjs/auxta/configs/config.d.ts +3 -0
- package/build/cjs/auxta/configs/config.js +4 -0
- package/build/cjs/auxta/models/upload.model.d.ts +4 -1
- package/build/cjs/auxta/models/upload.model.js +8 -1
- package/build/cjs/auxta/services/report.service.js +4 -3
- package/build/esm/AuxTA.d.ts +1 -0
- package/build/esm/AuxTA.js +4 -2
- package/build/esm/auxta/configs/config.d.ts +3 -0
- package/build/esm/auxta/configs/config.js +4 -0
- package/build/esm/auxta/models/upload.model.d.ts +4 -1
- package/build/esm/auxta/models/upload.model.js +8 -1
- package/build/esm/auxta/services/report.service.js +4 -3
- package/build/tsconfig-cjs.tsbuildinfo +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/build/cjs/AuxTA.d.ts
CHANGED
package/build/cjs/AuxTA.js
CHANGED
|
@@ -82,7 +82,7 @@ class AuxTA extends code_helper_1.FunctionHelper {
|
|
|
82
82
|
catch (e) {
|
|
83
83
|
console.log("Missing field in auxta.json:", e);
|
|
84
84
|
}
|
|
85
|
-
this.uploadModel = new upload_model_1.UploadModel(jsonConfig.organization, jsonConfig.baseURL, jsonConfig.digitalProduct, jsonConfig.environment);
|
|
85
|
+
this.uploadModel = new upload_model_1.UploadModel(jsonConfig.organization, jsonConfig.baseURL, jsonConfig.digitalProduct, jsonConfig.environment, jsonConfig.bucket);
|
|
86
86
|
}
|
|
87
87
|
catch (e) {
|
|
88
88
|
console.log("Missing or corrupted config: auxta.json. Searching in location:", file);
|
|
@@ -91,7 +91,7 @@ class AuxTA extends code_helper_1.FunctionHelper {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
else {
|
|
94
|
-
this.uploadModel = new upload_model_1.UploadModel('', '', '', '');
|
|
94
|
+
this.uploadModel = new upload_model_1.UploadModel('', '', '', '', '');
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
run(event, overrideConfig) {
|
|
@@ -118,6 +118,8 @@ class AuxTA extends code_helper_1.FunctionHelper {
|
|
|
118
118
|
this.uploadModel.environment = overrideConfig.environment;
|
|
119
119
|
if (overrideConfig.baseURL)
|
|
120
120
|
this.uploadModel.baseUrl = overrideConfig.baseURL;
|
|
121
|
+
if (overrideConfig.bucket)
|
|
122
|
+
this.uploadModel.bucket = overrideConfig.bucket;
|
|
121
123
|
this.config = (0, config_1.setupOverrideConfig)(overrideConfig);
|
|
122
124
|
}
|
|
123
125
|
}
|
|
@@ -5,6 +5,7 @@ export declare function setupConfig(jsonConfig: any): {
|
|
|
5
5
|
organization: string;
|
|
6
6
|
netlifyPath: string;
|
|
7
7
|
digitalProduct: string;
|
|
8
|
+
bucket: string;
|
|
8
9
|
token: string;
|
|
9
10
|
screenWidth: number;
|
|
10
11
|
screenHeight: number;
|
|
@@ -23,6 +24,7 @@ export declare function setupOverrideConfig(overrideConfig: any): {
|
|
|
23
24
|
organization: string;
|
|
24
25
|
netlifyPath: string;
|
|
25
26
|
digitalProduct: string;
|
|
27
|
+
bucket: string;
|
|
26
28
|
token: string;
|
|
27
29
|
screenWidth: number;
|
|
28
30
|
screenHeight: number;
|
|
@@ -41,6 +43,7 @@ export declare let config: {
|
|
|
41
43
|
organization: string;
|
|
42
44
|
netlifyPath: string;
|
|
43
45
|
digitalProduct: string;
|
|
46
|
+
bucket: string;
|
|
44
47
|
token: string;
|
|
45
48
|
screenWidth: number;
|
|
46
49
|
screenHeight: number;
|
|
@@ -8,6 +8,9 @@ function setupConfig(jsonConfig) {
|
|
|
8
8
|
if (!jsonConfig.digitalProduct)
|
|
9
9
|
throw new Error("digitalProduct");
|
|
10
10
|
exports.config.digitalProduct = jsonConfig.digitalProduct;
|
|
11
|
+
if (!jsonConfig.testsURL)
|
|
12
|
+
throw new Error("testsURL");
|
|
13
|
+
exports.config.bucket = jsonConfig.bucket;
|
|
11
14
|
if (!jsonConfig.testsURL)
|
|
12
15
|
throw new Error("testsURL");
|
|
13
16
|
exports.config.netlifyPath = (process.env.ENVIRONMENT == 'LOCAL') ? 'http://localhost:9999/' : jsonConfig.testsURL;
|
|
@@ -52,6 +55,7 @@ exports.config = {
|
|
|
52
55
|
organization: "",
|
|
53
56
|
netlifyPath: "",
|
|
54
57
|
digitalProduct: "",
|
|
58
|
+
bucket: "",
|
|
55
59
|
token: "",
|
|
56
60
|
screenWidth: 1920,
|
|
57
61
|
screenHeight: 1080,
|
|
@@ -4,15 +4,18 @@ export declare class UploadModel {
|
|
|
4
4
|
private _digitalProduct;
|
|
5
5
|
private _baseUrl;
|
|
6
6
|
private readonly _organization;
|
|
7
|
+
private _bucket;
|
|
7
8
|
private _environment;
|
|
8
9
|
private _currentSuite;
|
|
9
10
|
private _retries;
|
|
10
11
|
private _featureName;
|
|
11
12
|
private _scenarioName;
|
|
12
|
-
constructor(org: string, baseUrl: string, digitalProduct: string, environment: string);
|
|
13
|
+
constructor(org: string, baseUrl: string, digitalProduct: string, environment: string, bucket: string);
|
|
13
14
|
set currentSuite(value: string);
|
|
14
15
|
set retries(value: number);
|
|
15
16
|
get currentSuite(): string;
|
|
17
|
+
get bucket(): string;
|
|
18
|
+
set bucket(value: string);
|
|
16
19
|
get retries(): number;
|
|
17
20
|
get reportId(): string;
|
|
18
21
|
set reportId(value: string);
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UploadModel = void 0;
|
|
4
4
|
class UploadModel {
|
|
5
|
-
constructor(org, baseUrl, digitalProduct, environment) {
|
|
5
|
+
constructor(org, baseUrl, digitalProduct, environment, bucket) {
|
|
6
6
|
this._reportId = '';
|
|
7
7
|
this._nextSuites = [];
|
|
8
8
|
this._currentSuite = '';
|
|
9
9
|
this._retries = 0;
|
|
10
10
|
this._organization = org;
|
|
11
|
+
this._bucket = bucket;
|
|
11
12
|
this._digitalProduct = digitalProduct;
|
|
12
13
|
this._environment = environment;
|
|
13
14
|
this._baseUrl = baseUrl;
|
|
@@ -23,6 +24,12 @@ class UploadModel {
|
|
|
23
24
|
get currentSuite() {
|
|
24
25
|
return this._currentSuite;
|
|
25
26
|
}
|
|
27
|
+
get bucket() {
|
|
28
|
+
return this._bucket;
|
|
29
|
+
}
|
|
30
|
+
set bucket(value) {
|
|
31
|
+
this._bucket = value;
|
|
32
|
+
}
|
|
26
33
|
get retries() {
|
|
27
34
|
return this._retries;
|
|
28
35
|
}
|
|
@@ -43,7 +43,8 @@ function createEmptyReport(body) {
|
|
|
43
43
|
const token = yield auth();
|
|
44
44
|
return (yield axios_1.default.post(config_1.config.auxtaURL + "create-empty-report", {
|
|
45
45
|
environment: body.environment,
|
|
46
|
-
|
|
46
|
+
digitalProductToken: body.digitalProduct,
|
|
47
|
+
bucket: body.bucket,
|
|
47
48
|
start: new Date(),
|
|
48
49
|
url: body.baseUrl
|
|
49
50
|
}, headers(token))).data.reportId;
|
|
@@ -141,7 +142,7 @@ function postNotifications(body) {
|
|
|
141
142
|
let token = yield auth();
|
|
142
143
|
yield axios_1.default.post(`${config_1.config.auxtaURL}post-notification-after-run-background`, {
|
|
143
144
|
environmentName: body.environment,
|
|
144
|
-
|
|
145
|
+
digitalProductToken: body.digitalProduct,
|
|
145
146
|
organizationName: body.organization,
|
|
146
147
|
reportId: body.reportId,
|
|
147
148
|
}, headers(token));
|
|
@@ -153,7 +154,7 @@ function postNotificationsOnFail(body) {
|
|
|
153
154
|
let token = yield auth();
|
|
154
155
|
yield axios_1.default.post(`${config_1.config.auxtaURL}post-notifications-after-case-fail-background`, {
|
|
155
156
|
environmentName: body.environment,
|
|
156
|
-
|
|
157
|
+
digitalProductToken: body.digitalProduct,
|
|
157
158
|
organizationName: body.organization,
|
|
158
159
|
reportId: body.reportId,
|
|
159
160
|
featureName: body.featureName,
|
package/build/esm/AuxTA.d.ts
CHANGED
package/build/esm/AuxTA.js
CHANGED
|
@@ -53,7 +53,7 @@ class AuxTA extends FunctionHelper {
|
|
|
53
53
|
catch (e) {
|
|
54
54
|
console.log("Missing field in auxta.json:", e);
|
|
55
55
|
}
|
|
56
|
-
this.uploadModel = new UploadModel(jsonConfig.organization, jsonConfig.baseURL, jsonConfig.digitalProduct, jsonConfig.environment);
|
|
56
|
+
this.uploadModel = new UploadModel(jsonConfig.organization, jsonConfig.baseURL, jsonConfig.digitalProduct, jsonConfig.environment, jsonConfig.bucket);
|
|
57
57
|
}
|
|
58
58
|
catch (e) {
|
|
59
59
|
console.log("Missing or corrupted config: auxta.json. Searching in location:", file);
|
|
@@ -62,7 +62,7 @@ class AuxTA extends FunctionHelper {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
else {
|
|
65
|
-
this.uploadModel = new UploadModel('', '', '', '');
|
|
65
|
+
this.uploadModel = new UploadModel('', '', '', '', '');
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
run(event, overrideConfig) {
|
|
@@ -89,6 +89,8 @@ class AuxTA extends FunctionHelper {
|
|
|
89
89
|
this.uploadModel.environment = overrideConfig.environment;
|
|
90
90
|
if (overrideConfig.baseURL)
|
|
91
91
|
this.uploadModel.baseUrl = overrideConfig.baseURL;
|
|
92
|
+
if (overrideConfig.bucket)
|
|
93
|
+
this.uploadModel.bucket = overrideConfig.bucket;
|
|
92
94
|
this.config = setupOverrideConfig(overrideConfig);
|
|
93
95
|
}
|
|
94
96
|
}
|
|
@@ -5,6 +5,7 @@ export declare function setupConfig(jsonConfig: any): {
|
|
|
5
5
|
organization: string;
|
|
6
6
|
netlifyPath: string;
|
|
7
7
|
digitalProduct: string;
|
|
8
|
+
bucket: string;
|
|
8
9
|
token: string;
|
|
9
10
|
screenWidth: number;
|
|
10
11
|
screenHeight: number;
|
|
@@ -23,6 +24,7 @@ export declare function setupOverrideConfig(overrideConfig: any): {
|
|
|
23
24
|
organization: string;
|
|
24
25
|
netlifyPath: string;
|
|
25
26
|
digitalProduct: string;
|
|
27
|
+
bucket: string;
|
|
26
28
|
token: string;
|
|
27
29
|
screenWidth: number;
|
|
28
30
|
screenHeight: number;
|
|
@@ -41,6 +43,7 @@ export declare let config: {
|
|
|
41
43
|
organization: string;
|
|
42
44
|
netlifyPath: string;
|
|
43
45
|
digitalProduct: string;
|
|
46
|
+
bucket: string;
|
|
44
47
|
token: string;
|
|
45
48
|
screenWidth: number;
|
|
46
49
|
screenHeight: number;
|
|
@@ -5,6 +5,9 @@ export function setupConfig(jsonConfig) {
|
|
|
5
5
|
if (!jsonConfig.digitalProduct)
|
|
6
6
|
throw new Error("digitalProduct");
|
|
7
7
|
config.digitalProduct = jsonConfig.digitalProduct;
|
|
8
|
+
if (!jsonConfig.testsURL)
|
|
9
|
+
throw new Error("testsURL");
|
|
10
|
+
config.bucket = jsonConfig.bucket;
|
|
8
11
|
if (!jsonConfig.testsURL)
|
|
9
12
|
throw new Error("testsURL");
|
|
10
13
|
config.netlifyPath = (process.env.ENVIRONMENT == 'LOCAL') ? 'http://localhost:9999/' : jsonConfig.testsURL;
|
|
@@ -47,6 +50,7 @@ export let config = {
|
|
|
47
50
|
organization: "",
|
|
48
51
|
netlifyPath: "",
|
|
49
52
|
digitalProduct: "",
|
|
53
|
+
bucket: "",
|
|
50
54
|
token: "",
|
|
51
55
|
screenWidth: 1920,
|
|
52
56
|
screenHeight: 1080,
|
|
@@ -4,15 +4,18 @@ export declare class UploadModel {
|
|
|
4
4
|
private _digitalProduct;
|
|
5
5
|
private _baseUrl;
|
|
6
6
|
private readonly _organization;
|
|
7
|
+
private _bucket;
|
|
7
8
|
private _environment;
|
|
8
9
|
private _currentSuite;
|
|
9
10
|
private _retries;
|
|
10
11
|
private _featureName;
|
|
11
12
|
private _scenarioName;
|
|
12
|
-
constructor(org: string, baseUrl: string, digitalProduct: string, environment: string);
|
|
13
|
+
constructor(org: string, baseUrl: string, digitalProduct: string, environment: string, bucket: string);
|
|
13
14
|
set currentSuite(value: string);
|
|
14
15
|
set retries(value: number);
|
|
15
16
|
get currentSuite(): string;
|
|
17
|
+
get bucket(): string;
|
|
18
|
+
set bucket(value: string);
|
|
16
19
|
get retries(): number;
|
|
17
20
|
get reportId(): string;
|
|
18
21
|
set reportId(value: string);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export class UploadModel {
|
|
2
|
-
constructor(org, baseUrl, digitalProduct, environment) {
|
|
2
|
+
constructor(org, baseUrl, digitalProduct, environment, bucket) {
|
|
3
3
|
this._reportId = '';
|
|
4
4
|
this._nextSuites = [];
|
|
5
5
|
this._currentSuite = '';
|
|
6
6
|
this._retries = 0;
|
|
7
7
|
this._organization = org;
|
|
8
|
+
this._bucket = bucket;
|
|
8
9
|
this._digitalProduct = digitalProduct;
|
|
9
10
|
this._environment = environment;
|
|
10
11
|
this._baseUrl = baseUrl;
|
|
@@ -20,6 +21,12 @@ export class UploadModel {
|
|
|
20
21
|
get currentSuite() {
|
|
21
22
|
return this._currentSuite;
|
|
22
23
|
}
|
|
24
|
+
get bucket() {
|
|
25
|
+
return this._bucket;
|
|
26
|
+
}
|
|
27
|
+
set bucket(value) {
|
|
28
|
+
this._bucket = value;
|
|
29
|
+
}
|
|
23
30
|
get retries() {
|
|
24
31
|
return this._retries;
|
|
25
32
|
}
|
|
@@ -37,7 +37,8 @@ export function createEmptyReport(body) {
|
|
|
37
37
|
const token = yield auth();
|
|
38
38
|
return (yield axios.post(config.auxtaURL + "create-empty-report", {
|
|
39
39
|
environment: body.environment,
|
|
40
|
-
|
|
40
|
+
digitalProductToken: body.digitalProduct,
|
|
41
|
+
bucket: body.bucket,
|
|
41
42
|
start: new Date(),
|
|
42
43
|
url: body.baseUrl
|
|
43
44
|
}, headers(token))).data.reportId;
|
|
@@ -129,7 +130,7 @@ export function postNotifications(body) {
|
|
|
129
130
|
let token = yield auth();
|
|
130
131
|
yield axios.post(`${config.auxtaURL}post-notification-after-run-background`, {
|
|
131
132
|
environmentName: body.environment,
|
|
132
|
-
|
|
133
|
+
digitalProductToken: body.digitalProduct,
|
|
133
134
|
organizationName: body.organization,
|
|
134
135
|
reportId: body.reportId,
|
|
135
136
|
}, headers(token));
|
|
@@ -140,7 +141,7 @@ export function postNotificationsOnFail(body) {
|
|
|
140
141
|
let token = yield auth();
|
|
141
142
|
yield axios.post(`${config.auxtaURL}post-notifications-after-case-fail-background`, {
|
|
142
143
|
environmentName: body.environment,
|
|
143
|
-
|
|
144
|
+
digitalProductToken: body.digitalProduct,
|
|
144
145
|
organizationName: body.organization,
|
|
145
146
|
reportId: body.reportId,
|
|
146
147
|
featureName: body.featureName,
|