-
Task
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
-
Future Sustainability
-
3
-
False
-
-
False
-
None
-
Unset
-
None
-
-
-
HCC Framework Sprint 53, HCC Framework Sprint 54
Prompt for human: Do not expect this to work as is. You will need to confirm and intervene where necessary.
Prompt for Claude Code:
This is a monorepo of clients. OpenAPI spec's defined in project.json serve as the source of truth. Open API generator uses the OpenAPI spec as input and outputs typescript files. The typescript files and then built to cjs and esm javascript files placed in the package's dist folder.
I want to update packages/compliance so that:
- generated typescript files and placed into the package's src folder
- add a clean-generate target to the project.json on which the generate target depends in order to clear previously generated files before a new generation
- add a clean-build target to the project.json on which the build target depends in order to clear previously generated files before a new build.
The packages/
{notifications, integrations, notifications}have already been updated and should serve as a reference for what I want. The steps are:
- Delete all folders apart from dist, src and tests
- Delete left over generated files ie. files not related to jest config, tsconfig
- Remove /dist path from package.json file
- In project.json:
- Add clean-generate target and generate dependsOn
- Add clean-build target and build dependsOn
- Add generate.options.outputPath
- Add build.options.inputPath
- Add src to the path in build.options.main
- Add a nx-release-publish target with packageRoot option set to {{
{projectRoot}
/dist}} so that nx release publish publishes from the dist folder and not the package root
- Update tsconfig.json, tsconfig.cjs.json and tsconfig.esm.json
- Update jest.config.ts and jest.integration.*.config.ts
- Regenerate and rebuild:
- {{rm -rf packages/compliance/
{dist,src}
}}
- npx nx run @redhat-cloud-services/compliance-client:generate
- npx nx run @redhat-cloud-services/compliance-client:build
- {{rm -rf packages/compliance/
{dist,src}
- Compare the folder, files and content in the dist folder to the latest published package @redhat-cloud-services/compliance-client using the OpenAPI spec defined in project.json as the source of truth
- Ensure exports in package.json is up to date
- Update tsconfig.base.json so that packages/compliance-client/src/index.ts
- Determine if this is a major, minor or patch version increment and help me with a suitable conventional commit message.
- blocks
-
RHCLOUD-43183 [javascript-clients] Clean old generated files before new generation
-
- Closed
-