Skip to content

Commit b626091

Browse files
authored
Include full dist output in published NPM package (#22)
* Rename test contract target in CI configuration and update Makefile script * Fix: Include full dist output in published package * Feat: Add domain, event, and helper exports in index.ts and update version to 1.0.2
1 parent b9cc9a1 commit b626091

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

packages/events/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
"ts-node": "^10.9.2",
1616
"typescript": "^5.7.3"
1717
},
18-
"main": "src/index.ts",
18+
"main": "dist/index.js",
1919
"name": "@nhsdigital/nhs-notify-event-schemas-letter-rendering",
2020
"publishConfig": {
2121
"registry": "https://npm.pkg.github.com"
2222
},
23-
"public": false,
23+
"private": false,
2424
"repository": "[email protected]:NHSDigital/nhs-notify-standards.git",
2525
"scripts": {
26-
"build": "tsc -p tsconfig.build.json",
26+
"build": "rm -f *.tsbuildinfo && tsc -p tsconfig.build.json",
2727
"dev": "ts-node src/index.ts",
2828
"gen:asyncapi": "mkdir -p ./dist/asyncapi && ts-node src/cli/bundle-asyncapi.ts",
2929
"gen:jsonschema": "ts-node src/cli/generate-json.ts",
@@ -33,12 +33,12 @@
3333
"lint:schema": "spectral lint client-config/client-config.yaml",
3434
"prebuild": "rm -rf dist && npm run gen:asyncapi",
3535
"pregen:asyncapi": "npm run gen:jsonschema",
36-
"pregen:jsonschema": "rm -rf ./client-config/json",
36+
"pregen:jsonschema": "rm -rf ./schemas/domain/*.json ./schemas/events/*.json",
3737
"prelint:schema": "npm run gen:jsonschema",
3838
"start": "node dist/index.js",
3939
"test": "jest",
4040
"test:unit": "jest",
41-
"prepublishOnly": "npm run build"
41+
"prepare": "npm run build"
4242
},
43-
"version": "1.0.0"
43+
"version": "1.0.2"
4444
}

packages/events/src/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Domain exports
2+
export * from "./domain/common";
3+
export * from "./domain/letter-request";
4+
5+
// Event exports
6+
export * from "./events/event-envelope";
7+
export * from "./events/letter-request-prepared-event";
8+
9+
// Helper exports
10+
export * from "./helpers/id-ref";

packages/events/tsconfig.build.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"compilerOptions": {
3+
"noEmit": false,
34
"outDir": "dist",
45
"rootDir": "src"
56
},
67
"exclude": [
78
"node_modules",
89
"dist",
9-
"**/__tests__/*",
1010
"src/cli",
11-
"jest.config.ts"
11+
"src/**/__tests__"
1212
],
1313
"extends": "./tsconfig.json",
1414
"include": [

0 commit comments

Comments
 (0)