Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pr_closed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
echo "version_changed=true" >> $GITHUB_OUTPUT
fi

test-contract-provider:
test-contract:
name: "Test contracts (provider)"
needs: check-event-schemas-version-change
if: needs.check-event-schemas-version-change.outputs.version_changed == 'true'
Expand All @@ -85,15 +85,15 @@ jobs:
- name: "Install dependencies"
run: npm ci
- name: "Run provider contract tests"
run: make test-contract-provider
run: make test-contract
env:
GITHUB_PACKAGES_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-event-schemas:
name: Publish event schemas package to GitHub package registry
needs:
- check-event-schemas-version-change
- test-contract-provider
- test-contract
if: needs.check-event-schemas-version-change.outputs.version_changed == 'true'
runs-on: ubuntu-latest
permissions:
Expand Down
12 changes: 6 additions & 6 deletions packages/events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"ts-node": "^10.9.2",
"typescript": "^5.7.3"
},
"main": "src/index.ts",
"main": "dist/index.js",
"name": "@nhsdigital/nhs-notify-event-schemas-letter-rendering",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"public": false,
"private": false,
"repository": "git@github.com:NHSDigital/nhs-notify-standards.git",
"scripts": {
"build": "tsc -p tsconfig.build.json",
"build": "rm -f *.tsbuildinfo && tsc -p tsconfig.build.json",
"dev": "ts-node src/index.ts",
"gen:asyncapi": "mkdir -p ./dist/asyncapi && ts-node src/cli/bundle-asyncapi.ts",
"gen:jsonschema": "ts-node src/cli/generate-json.ts",
Expand All @@ -33,12 +33,12 @@
"lint:schema": "spectral lint client-config/client-config.yaml",
"prebuild": "rm -rf dist && npm run gen:asyncapi",
"pregen:asyncapi": "npm run gen:jsonschema",
"pregen:jsonschema": "rm -rf ./client-config/json",
"pregen:jsonschema": "rm -rf ./schemas/domain/*.json ./schemas/events/*.json",
"prelint:schema": "npm run gen:jsonschema",
"start": "node dist/index.js",
"test": "jest",
"test:unit": "jest",
"prepublishOnly": "npm run build"
"prepare": "npm run build"
},
"version": "1.0.0"
"version": "1.0.2"
}
10 changes: 10 additions & 0 deletions packages/events/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Domain exports
export * from "./domain/common";
export * from "./domain/letter-request";

// Event exports
export * from "./events/event-envelope";
export * from "./events/letter-request-prepared-event";

// Helper exports
export * from "./helpers/id-ref";
4 changes: 2 additions & 2 deletions packages/events/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"compilerOptions": {
"noEmit": false,
"outDir": "dist",
"rootDir": "src"
},
"exclude": [
"node_modules",
"dist",
"**/__tests__/*",
"src/cli",
"jest.config.ts"
"src/**/__tests__"
],
"extends": "./tsconfig.json",
"include": [
Expand Down
8 changes: 4 additions & 4 deletions scripts/tests/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ test: # Run all the test tasks @Testing
_test:
set -e
script="./scripts/tests/${name}.sh"
if [ -e "$${script}" ]; then
exec $${script}
else
echo "make test-${name} not implemented: $${script} not found" >&2
if [ -e "$${script}" ]; then \
exec $${script}; \
else \
echo "make test-${name} not implemented: $${script} not found" >&2; \
fi

${VERBOSE}.SILENT: \
Expand Down
Loading