Skip to content

Commit ff5a7a1

Browse files
committed
feat: merge main into migration branch
2 parents a205bfc + aa0f089 commit ff5a7a1

File tree

102 files changed

+12086
-31269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+12086
-31269
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ test-results.xml
1010
.env
1111
.idea/
1212
.vscode/
13+
.aws-sam/
14+
env.sh
15+
output.txt

.nycrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
"all": true,
1111
"include": [
1212
"src/**/*.js"
13+
],
14+
"exclude": [
15+
"src/index-local.js"
1316
]
1417
}

CHANGELOG.md

+517
Large diffs are not rendered by default.

README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -545,4 +545,21 @@ Here's how messages flow between workers in a step-based audit:
545545
}
546546
```
547547

548-
Each message preserves the `auditContext` to maintain the step chain. The `next` field determines which step runs next, while `auditId` and `fullAuditRef` track the audit state across workers.
548+
Each message preserves the `auditContext` to maintain the step chain. The `next` field determines which step runs next, while `auditId` and `fullAuditRef` track the audit state across workers.
549+
550+
## Run Audits locally
551+
552+
You can run the audit locally using AWS SAM and Docker.
553+
554+
1. Ensure you have [Docker](https://docs.docker.com/desktop/setup/install/mac-install/), [AWS SAM](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html) and [jq](https://jqlang.org/) installed.
555+
2. Login to AWS using KLAM and login with your AWS CLI.
556+
3. To provide secrets to the audit, please run `./populate-env.sh` once. It will fetch all secrets from the AWS Secret Manager.
557+
4. To run the audit locally, execute the following commands:
558+
```bash
559+
source env.sh
560+
npm run local-build
561+
npm run local-run
562+
```
563+
5. Starting point of the execution is `src/index-local.js`. Output of the audit can be found in `output.txt`.
564+
565+
If you need to add additional secrets, make sure to adjust the Lambda `template.yml` accordingly.

package-lock.json

+2,274-29,678
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+29-24
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adobe/spacecat-audit-worker",
3-
"version": "1.55.0",
3+
"version": "1.68.16",
44
"description": "SpaceCat Audit Worker",
55
"main": "src/index.js",
66
"type": "module",
@@ -20,7 +20,9 @@
2020
"deploy": "hedy -v --deploy --aws-deploy-bucket=spacecat-prod-deploy --pkgVersion=latest",
2121
"deploy-ci": "hedy -v --deploy --pkgVersion=ci$CI_BUILD_NUM -l latest --aws-deploy-bucket=spacecat-dev-deploy --cleanup-ci=24h",
2222
"deploy-secrets": "hedy --aws-update-secrets --params-file=secrets/secrets.env",
23-
"prepare": "husky"
23+
"prepare": "husky",
24+
"local-build": "sam build",
25+
"local-run": "sam local invoke -l output.txt"
2426
},
2527
"wsk": {
2628
"target": "aws",
@@ -37,7 +39,9 @@
3739
"nodeVersion": 22,
3840
"static": [
3941
"static/prompts/broken-backlinks.prompt",
40-
"static/prompts/broken-backlinks-followup.prompt"
42+
"static/prompts/broken-backlinks-followup.prompt",
43+
"static/prompts/structured-data-suggest.prompt",
44+
"static/prompts/image-alt-text.prompt"
4145
]
4246
},
4347
"repository": {
@@ -57,43 +61,44 @@
5761
"reporter-options": "configFile=.mocha-multi.json"
5862
},
5963
"dependencies": {
60-
"@adobe/fetch": "4.1.11",
64+
"@adobe/fetch": "4.2.0",
6165
"@adobe/helix-shared-secrets": "2.2.10",
6266
"@adobe/helix-shared-wrap": "2.0.2",
6367
"@adobe/helix-status": "10.1.5",
64-
"@adobe/helix-universal": "5.0.8",
65-
"@adobe/helix-universal-logger": "3.0.23",
66-
"@adobe/spacecat-shared-ahrefs-client": "1.6.7",
67-
"@adobe/spacecat-shared-data-access": "2.7.1",
68-
"@adobe/spacecat-shared-google-client": "1.4.10",
69-
"@adobe/spacecat-shared-gpt-client": "1.5.0",
70-
"@adobe/spacecat-shared-http-utils": "1.9.8",
71-
"@adobe/spacecat-shared-rum-api-client": "2.21.1",
68+
"@adobe/helix-universal": "5.0.9",
69+
"@adobe/helix-universal-logger": "3.0.24",
70+
"@adobe/spacecat-shared-ahrefs-client": "1.6.12",
71+
"@adobe/spacecat-shared-data-access": "2.13.1",
72+
"@adobe/spacecat-shared-google-client": "1.4.15",
73+
"@adobe/spacecat-shared-gpt-client": "1.5.4",
74+
"@adobe/spacecat-shared-http-utils": "1.9.12",
75+
"@adobe/spacecat-shared-rum-api-client": "2.22.0",
7276
"@adobe/spacecat-shared-rum-api-client-v1": "npm:@adobe/[email protected]",
73-
"@adobe/spacecat-shared-utils": "1.32.0",
74-
"@aws-sdk/client-s3": "3.749.0",
75-
"@aws-sdk/client-lambda": "3.749.0",
76-
"@aws-sdk/credential-provider-node": "3.749.0",
77-
"@aws-sdk/client-sqs": "3.749.0",
77+
"@adobe/spacecat-shared-utils": "1.35.0",
78+
"@aws-sdk/client-s3": "3.758.0",
79+
"@aws-sdk/client-lambda": "3.758.0",
80+
"@aws-sdk/credential-provider-node": "3.758.0",
81+
"@aws-sdk/client-sqs": "3.758.0",
7882
"aws-xray-sdk": "3.10.3",
79-
"@aws-sdk/s3-request-presigner": "3.749.0",
83+
"@aws-sdk/s3-request-presigner": "3.758.0",
84+
"cheerio": "1.0.0",
8085
"diff": "7.0.0",
8186
"jsdom": "26.0.0",
8287
"urijs": "1.19.11"
8388
},
8489
"devDependencies": {
8590
"@adobe/eslint-config-helix": "2.0.9",
8691
"@adobe/helix-deploy": "https://gitpkg.now.sh/alinarublea/helix-deploy?test-deploy",
87-
"@adobe/helix-universal": "5.0.8",
88-
"@adobe/semantic-release-coralogix": "1.1.34",
92+
"@adobe/helix-universal": "5.0.9",
93+
"@adobe/semantic-release-coralogix": "1.1.35",
8994
"@adobe/semantic-release-skms-cmr": "1.1.5",
90-
"@redocly/cli": "1.29.0",
95+
"@redocly/cli": "1.33.0",
9196
"@semantic-release/changelog": "6.0.3",
9297
"@semantic-release/exec": "7.0.3",
9398
"@semantic-release/git": "10.0.1",
9499
"@semantic-release/npm": "12.0.1",
95-
"@typescript-eslint/eslint-plugin": "8.24.0",
96-
"@typescript-eslint/parser": "8.24.0",
100+
"@typescript-eslint/eslint-plugin": "8.26.0",
101+
"@typescript-eslint/parser": "8.26.0",
97102
"c8": "10.1.3",
98103
"chai": "5.2.0",
99104
"chai-as-promised": "8.0.1",
@@ -111,7 +116,7 @@
111116
"semantic-release": "24.2.3",
112117
"sinon": "19.0.2",
113118
"sinon-chai": "4.0.0",
114-
"typescript": "5.7.3",
119+
"typescript": "5.8.2",
115120
"yaml": "2.7.0"
116121
},
117122
"lint-staged": {

populate-env.sh

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Define the secret name and region
4+
SECRET_NAME="/helix-deploy/spacecat-services/audit-worker/ci"
5+
REGION="us-east-1"
6+
7+
# Retrieve the secret from AWS Secrets Manager
8+
SECRET_JSON=$(aws secretsmanager get-secret-value --secret-id $SECRET_NAME --region $REGION --query SecretString --output text)
9+
10+
touch env.sh
11+
12+
# Parse the JSON and write to env.sh
13+
echo "$SECRET_JSON" | jq -r 'to_entries | .[] | "export \(.key)=\(.value | @sh)"' >> env.sh
14+
15+
echo "env.sh file has been populated with secrets from AWS Secrets Manager."

renovate.json5

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"enabled": false,
34
"extends": [
45
"local>adobe-rnd/spacecat-audit-worker"
56
],

0 commit comments

Comments
 (0)