@argos-ci/core 2.9.2 → 2.10.0
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.cjs +11 -12
- package/dist/index.d.ts +140 -23
- package/dist/index.js +1032 -0
- package/package.json +11 -12
- package/dist/index.mjs +0 -1039
package/dist/index.cjs
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
exports.upload = async (...args)=>{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return upload(...args);
|
|
1
|
+
exports.upload = async (...args) => {
|
|
2
|
+
const { upload } = await import("./index.js");
|
|
3
|
+
return upload(...args);
|
|
5
4
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
|
|
6
|
+
exports.finalize = async (...args) => {
|
|
7
|
+
const { finalize } = await import("./index.js");
|
|
8
|
+
return finalize(...args);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
|
|
11
|
+
exports.readConfig = async (...args) => {
|
|
12
|
+
const { readConfig } = await import("./index.js");
|
|
13
|
+
return readConfig(...args);
|
|
15
14
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as _argos_ci_util from '@argos-ci/util';
|
|
2
|
+
import { ArgosAPISchema } from '@argos-ci/api-client';
|
|
3
|
+
|
|
2
4
|
type BuildMetadata = ArgosAPISchema.components["schemas"]["BuildMetadata"];
|
|
3
5
|
interface UploadParameters {
|
|
4
6
|
/**
|
|
@@ -80,25 +82,25 @@ interface UploadParameters {
|
|
|
80
82
|
*/
|
|
81
83
|
declare function upload(params: UploadParameters): Promise<{
|
|
82
84
|
build: {
|
|
83
|
-
id:
|
|
85
|
+
id: ArgosAPISchema.components["schemas"]["BuildId"];
|
|
84
86
|
number: number;
|
|
85
|
-
status: "accepted" | "rejected" | "stable" | "diffDetected" | "expired" | "pending" | "progress" | "error" | "aborted";
|
|
87
|
+
status: ("accepted" | "rejected") | ("stable" | "diffDetected") | ("expired" | "pending" | "progress" | "error" | "aborted");
|
|
86
88
|
url: string;
|
|
87
89
|
notification: {
|
|
88
90
|
description: string;
|
|
89
91
|
context: string;
|
|
90
92
|
github: {
|
|
91
|
-
state: "pending" | "
|
|
93
|
+
state: "pending" | "success" | "error" | "failure";
|
|
92
94
|
};
|
|
93
95
|
gitlab: {
|
|
94
|
-
state: "pending" | "
|
|
96
|
+
state: "pending" | "running" | "success" | "failed" | "canceled";
|
|
95
97
|
};
|
|
96
98
|
} | null;
|
|
97
99
|
};
|
|
98
100
|
screenshots: {
|
|
99
101
|
hash: string;
|
|
100
102
|
optimizedPath: string;
|
|
101
|
-
metadata:
|
|
103
|
+
metadata: _argos_ci_util.ScreenshotMetadata | null;
|
|
102
104
|
threshold: number | null;
|
|
103
105
|
baseName: string | null;
|
|
104
106
|
pwTrace: {
|
|
@@ -109,6 +111,134 @@ declare function upload(params: UploadParameters): Promise<{
|
|
|
109
111
|
path: string;
|
|
110
112
|
}[];
|
|
111
113
|
}>;
|
|
114
|
+
|
|
115
|
+
interface components {
|
|
116
|
+
schemas: {
|
|
117
|
+
/** @description SHA1 hash */
|
|
118
|
+
Sha1Hash: string;
|
|
119
|
+
/** @description SHA256 hash */
|
|
120
|
+
Sha256Hash: string;
|
|
121
|
+
/** @description Build */
|
|
122
|
+
Build: {
|
|
123
|
+
id: components["schemas"]["BuildId"];
|
|
124
|
+
/** @description The build number */
|
|
125
|
+
number: number;
|
|
126
|
+
/** @description The status of the build */
|
|
127
|
+
status: ("accepted" | "rejected") | ("stable" | "diffDetected") | ("expired" | "pending" | "progress" | "error" | "aborted");
|
|
128
|
+
/**
|
|
129
|
+
* Format: uri
|
|
130
|
+
* @description The URL of the build
|
|
131
|
+
*/
|
|
132
|
+
url: string;
|
|
133
|
+
/** @description The notification payload for the build */
|
|
134
|
+
notification: {
|
|
135
|
+
description: string;
|
|
136
|
+
context: string;
|
|
137
|
+
github: {
|
|
138
|
+
/** @enum {string} */
|
|
139
|
+
state: "pending" | "success" | "error" | "failure";
|
|
140
|
+
};
|
|
141
|
+
gitlab: {
|
|
142
|
+
/** @enum {string} */
|
|
143
|
+
state: "pending" | "running" | "success" | "failed" | "canceled";
|
|
144
|
+
};
|
|
145
|
+
} | null;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* @description A unique identifier for the build
|
|
149
|
+
* @example 12345
|
|
150
|
+
*/
|
|
151
|
+
BuildId: string;
|
|
152
|
+
/** @description Error response */
|
|
153
|
+
Error: {
|
|
154
|
+
error: string;
|
|
155
|
+
details?: {
|
|
156
|
+
message: string;
|
|
157
|
+
}[];
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* @description A unique identifier for the build
|
|
161
|
+
* @example 12345
|
|
162
|
+
*/
|
|
163
|
+
buildId: string;
|
|
164
|
+
/** @description Screenshot input */
|
|
165
|
+
ScreenshotInput: {
|
|
166
|
+
key: string;
|
|
167
|
+
name: string;
|
|
168
|
+
baseName?: string | null;
|
|
169
|
+
metadata?: {
|
|
170
|
+
url?: string;
|
|
171
|
+
viewport?: {
|
|
172
|
+
width: number;
|
|
173
|
+
height: number;
|
|
174
|
+
};
|
|
175
|
+
/** @enum {string} */
|
|
176
|
+
colorScheme?: "light" | "dark";
|
|
177
|
+
/** @enum {string} */
|
|
178
|
+
mediaType?: "screen" | "print";
|
|
179
|
+
test?: {
|
|
180
|
+
id?: string;
|
|
181
|
+
title: string;
|
|
182
|
+
titlePath: string[];
|
|
183
|
+
retries?: number;
|
|
184
|
+
retry?: number;
|
|
185
|
+
repeat?: number;
|
|
186
|
+
location?: {
|
|
187
|
+
file: string;
|
|
188
|
+
line: number;
|
|
189
|
+
column: number;
|
|
190
|
+
};
|
|
191
|
+
} | null;
|
|
192
|
+
browser?: {
|
|
193
|
+
name: string;
|
|
194
|
+
version: string;
|
|
195
|
+
};
|
|
196
|
+
automationLibrary: {
|
|
197
|
+
name: string;
|
|
198
|
+
version: string;
|
|
199
|
+
};
|
|
200
|
+
sdk: {
|
|
201
|
+
name: string;
|
|
202
|
+
version: string;
|
|
203
|
+
};
|
|
204
|
+
} | null;
|
|
205
|
+
pwTraceKey?: string | null;
|
|
206
|
+
threshold?: number | null;
|
|
207
|
+
};
|
|
208
|
+
/** @description Build metadata */
|
|
209
|
+
BuildMetadata: {
|
|
210
|
+
testReport?: {
|
|
211
|
+
/** @enum {string} */
|
|
212
|
+
status: "passed" | "failed" | "timedout" | "interrupted";
|
|
213
|
+
stats?: {
|
|
214
|
+
startTime?: string;
|
|
215
|
+
duration?: number;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
/** @description Project */
|
|
220
|
+
Project: {
|
|
221
|
+
id: string;
|
|
222
|
+
defaultBaseBranch: string;
|
|
223
|
+
hasRemoteContentAccess: boolean;
|
|
224
|
+
};
|
|
225
|
+
/** @description Page information */
|
|
226
|
+
PageInfo: {
|
|
227
|
+
/** @description Total number of items */
|
|
228
|
+
total: number;
|
|
229
|
+
/** @description Current page number */
|
|
230
|
+
page: number;
|
|
231
|
+
/** @description Number of items per page */
|
|
232
|
+
perPage: number;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
responses: never;
|
|
236
|
+
parameters: never;
|
|
237
|
+
requestBodies: never;
|
|
238
|
+
headers: never;
|
|
239
|
+
pathItems: never;
|
|
240
|
+
}
|
|
241
|
+
|
|
112
242
|
type FinalizeParameters = {
|
|
113
243
|
parallel?: {
|
|
114
244
|
nonce: string;
|
|
@@ -118,23 +248,9 @@ type FinalizeParameters = {
|
|
|
118
248
|
* Finalize pending builds.
|
|
119
249
|
*/
|
|
120
250
|
declare function finalize(params: FinalizeParameters): Promise<{
|
|
121
|
-
builds:
|
|
122
|
-
id: string;
|
|
123
|
-
number: number;
|
|
124
|
-
status: "accepted" | "rejected" | "stable" | "diffDetected" | "expired" | "pending" | "progress" | "error" | "aborted";
|
|
125
|
-
url: string;
|
|
126
|
-
notification: {
|
|
127
|
-
description: string;
|
|
128
|
-
context: string;
|
|
129
|
-
github: {
|
|
130
|
-
state: "pending" | "error" | "success" | "failure";
|
|
131
|
-
};
|
|
132
|
-
gitlab: {
|
|
133
|
-
state: "pending" | "success" | "running" | "failed" | "canceled";
|
|
134
|
-
};
|
|
135
|
-
} | null;
|
|
136
|
-
}[];
|
|
251
|
+
builds: components["schemas"]["Build"][];
|
|
137
252
|
}>;
|
|
253
|
+
|
|
138
254
|
interface Config {
|
|
139
255
|
apiBaseUrl: string;
|
|
140
256
|
commit: string;
|
|
@@ -160,4 +276,5 @@ interface Config {
|
|
|
160
276
|
threshold: number | null;
|
|
161
277
|
}
|
|
162
278
|
declare function readConfig(options?: Partial<Config>): Promise<Config>;
|
|
163
|
-
|
|
279
|
+
|
|
280
|
+
export { type Config, type FinalizeParameters, type UploadParameters, finalize, readConfig, upload };
|