Compare commits

...

7 Commits

Author SHA1 Message Date
Sidharth Vinod
8ac0c7350b Merge branch 'develop' into sidv/argosInvestigation
* develop:
  chore: Rollback dompurify update range
  chore: Separate dompurify updates
  [autofix.ci] apply automated fixes
  chore(deps): update all patch dependencies
  chore(deps): update dependency eslint-plugin-unicorn to v56
  Revert "chore: Split newshape test"
  chore(deps): update eslint to v9.12.0
  chore(deps): update dependency express to v4.20.0 [security]
  chore(deps): update dependency vite to v5.4.6 [security]
2024-10-08 16:17:16 +05:30
Sidharth Vinod
d5bd6cd90c Bump version 2024-10-08 16:16:11 +05:30
Sidharth Vinod
a989d22255 test 2024-10-08 13:34:52 +05:30
Sidharth Vinod
f5a90ff6dc Merge branch 'develop' into sidv/argosInvestigation
* develop:
  fix: Argos index numbering
  Fix TypeScript dependencies
2024-10-08 13:28:39 +05:30
Sidharth Vinod
8885fe5129 Merge branch 'develop' into sidv/argosInvestigation
* develop:
  Upgrade @argos-ci
2024-10-08 12:51:41 +05:30
Sidharth Vinod
22274dba3c temp 2024-10-08 12:27:36 +05:30
Sidharth Vinod
bf04b94057 chore: Patch argos 2024-10-07 18:56:06 +05:30
5 changed files with 72 additions and 15 deletions

View File

@@ -133,7 +133,7 @@ jobs:
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
ARGOS_PARALLEL: true
ARGOS_PARALLEL_TOTAL: ${{ strategy.job-total }}
ARGOS_PARALLEL_INDEX: ${{ matrix.containers }}
ARGOS_PARALLEL_INDEX: ${{ strategy.job-index }}
SPLIT: ${{ strategy.job-total }}
SPLIT_INDEX: ${{ strategy.job-index }}
SPLIT_FILE: 'cypress/timings.json'

View File

@@ -64,7 +64,7 @@
},
"devDependencies": {
"@applitools/eyes-cypress": "^3.44.4",
"@argos-ci/cypress": "^2.2.2",
"@argos-ci/cypress": "^2.2.3",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.7",
"@cspell/eslint-plugin": "^8.8.4",

View File

@@ -0,0 +1,15 @@
diff --git a/dist/index.mjs b/dist/index.mjs
index 121ed29385ceca37f7cb6b7188709d7ec506dfa6..41092962ccde5177a261b816cffb55f6a1615d6e 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -25,6 +25,10 @@ class APIError extends Error {
*/ function throwAPIError(fetchResponse) {
const { error, response } = fetchResponse;
if (error && typeof error === "object" && "error" in error && typeof error.error === "string") {
+ const message = error.details?.[0]?.message;
+ if (message) {
+ throw new APIError(`${error.error}: ${message}`);
+ }
throw new APIError(error.error);
}
throw new APIError(`API error: ${response.status} ${response.statusText}`);

View File

@@ -0,0 +1,39 @@
diff --git a/dist/index.mjs b/dist/index.mjs
index 5cbaad945826960a6b77b44bf9661e1c2523c16d..6df2474578cdcf2b6d26330bd23dbb48a24ecafe 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -914,13 +914,7 @@ async function uploadFilesToS3(files) {
await uploadFilesToS3(uploadFiles);
// Update build
debug("Updating build");
- const uploadBuildResponse = await apiClient.PUT("/builds/{buildId}", {
- params: {
- path: {
- buildId: result.build.id
- }
- },
- body: {
+ const body = {
screenshots: screenshots.map((screenshot)=>({
key: screenshot.hash,
name: screenshot.name,
@@ -933,9 +927,18 @@ async function uploadFilesToS3(files) {
parallelTotal: config.parallelTotal,
parallelIndex: config.parallelIndex,
metadata: params.metadata
- }
+ };
+ const uploadBuildResponse = await apiClient.PUT("/builds/{buildId}", {
+ params: {
+ path: {
+ buildId: result.build.id
+ }
+ },
+ body
});
if (uploadBuildResponse.error) {
+ console.error(JSON.stringify({body, buildId: result.build.id}, null, 2))
+ console.error(JSON.stringify(uploadBuildResponse, null, 2))
throwAPIError(uploadBuildResponse);
}
return {

29
pnpm-lock.yaml generated
View File

@@ -17,8 +17,8 @@ importers:
specifier: ^3.44.4
version: 3.44.9(encoding@0.1.13)(typescript@5.4.5)
'@argos-ci/cypress':
specifier: ^2.2.2
version: 2.2.2(cypress@13.15.0)
specifier: ^2.2.3
version: 2.2.3(cypress@13.15.0)
'@changesets/changelog-github':
specifier: ^0.5.0
version: 0.5.0(encoding@0.1.13)
@@ -795,20 +795,20 @@ packages:
resolution: {integrity: sha512-qgJqx2yjlJBf79YyFehf1nSp4AXOdzJn3POQyg8CMWV0YH6HsjAfJjYaNrbXFcGYCSpPEJGhGehxC7GVKHX3YA==}
engines: {node: '>=12.13.0'}
'@argos-ci/api-client@0.5.0':
resolution: {integrity: sha512-syJJmvLtJKQYXDmGYRb+ZKpzpSk/dReqhZZm2tnWn7ThxHaJRJ7Wu3J5nqDpCP3LxoYCVfvV/dmfoJO0v8+PbQ==}
'@argos-ci/api-client@0.5.1':
resolution: {integrity: sha512-WlA/AqREpCteZJmJYLjGEi5v4cx3+Cx3/audR6aj6wJ959oMpKX5N/auI8M2DJI1xUqiE7/RIwYkojrYz6AwEg==}
engines: {node: '>=18.0.0'}
'@argos-ci/browser@2.1.4':
resolution: {integrity: sha512-GursnbWL01wN92hRgEsa0c55ih9Sp6qGeYIXFWP4o42FDzm98LbxIy2e1WS+ezP+gBwsSBEMBTGcGCSSmVzacg==}
engines: {node: '>=18.0.0'}
'@argos-ci/core@2.8.1':
resolution: {integrity: sha512-5ygruMnfQ3OY6LvywnwTycZFg6oTG5UYvPCVdwQiOh+8FgUZUyJge7QBVfeWW+qC0UXFMo+f3eTQ5YFvTwc0ZA==}
'@argos-ci/core@2.8.2':
resolution: {integrity: sha512-qEtHje4bZgqDd1XhjTya8NV+pHdtzPuR/sYAyyX53hb9PycfUj3TCZ1u5HfSGGeuFb3D7ctWuo5N7whXugFY8g==}
engines: {node: '>=18.0.0'}
'@argos-ci/cypress@2.2.2':
resolution: {integrity: sha512-lwXu6y5DcP4ufYQEom4JtHSHjIYul6+GB4pniC8S97mfXLYq6KITJD4JHbrnfIiQGuV1xNPIaBc4MWX+atFDuw==}
'@argos-ci/cypress@2.2.3':
resolution: {integrity: sha512-p3vvS/dmMvEVI9y8wwu/miFY0DLak0SH8nKYNe8VkAPHuR2XlA/7BuaCXH6ZxBgaOG83fJ4tbUWL7jY7JlGxpg==}
engines: {node: '>=18.0.0'}
peerDependencies:
cypress: ^12.0.0 || ^13.0.0
@@ -9832,15 +9832,18 @@ snapshots:
'@applitools/utils@1.7.4': {}
'@argos-ci/api-client@0.5.0':
'@argos-ci/api-client@0.5.1':
dependencies:
debug: 4.3.7(supports-color@8.1.1)
openapi-fetch: 0.11.3
transitivePeerDependencies:
- supports-color
'@argos-ci/browser@2.1.4': {}
'@argos-ci/core@2.8.1':
'@argos-ci/core@2.8.2':
dependencies:
'@argos-ci/api-client': 0.5.0
'@argos-ci/api-client': 0.5.1
'@argos-ci/util': 2.1.1
axios: 1.7.7(debug@4.3.7)
convict: 6.2.4
@@ -9851,10 +9854,10 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@argos-ci/cypress@2.2.2(cypress@13.15.0)':
'@argos-ci/cypress@2.2.3(cypress@13.15.0)':
dependencies:
'@argos-ci/browser': 2.1.4
'@argos-ci/core': 2.8.1
'@argos-ci/core': 2.8.2
'@argos-ci/util': 2.1.1
cypress: 13.15.0
cypress-wait-until: 3.0.2