Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-43169

[javascript-clients] Migrate config-manager package to generate into src folder

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • None
    • Future Sustainability
    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • Unset
    • None
    • 5
    • 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/config-manager so that:

      1. generated typescript files and placed into the package's src folder
      2. 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
      3. 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
      • 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/config-manager/{dist,src}
        • npx nx run @redhat-cloud-services/config-manager-client:generate
        • npx nx run @redhat-cloud-services/config-manager-client:build
      • Compare the folder, files and content in the dist folder to the latest published package @redhat-cloud-services/config-manager-client using the OpenAPI spec defined in project.json as the source of truth  
      • Ensure exports in package.json is up to date
      • Determine if this is a major, minor or patch version increment and help me with a suitable conventional commit message. 

              rh-ee-otomylko Olha Tomylko
              rh-ee-chmulder Charles Mulder
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: