Skip to content

Conversation

thulieblack
Copy link
Member

@thulieblack thulieblack commented Sep 23, 2025

As part of the componetization of the readme, this PR adds a readme to the python template.

relates #1524

Summary by CodeRabbit

  • New Features

    • Added a template to auto-generate README docs for Python WebSocket clients.
    • Introduced reusable components to assemble README content (overview, usage, installation, core methods, available operations, base info).
  • Documentation

    • READMEs now use a component-driven layout and include server URL, version, and language-specific usage examples (Python and JavaScript).
  • Bug Fixes

    • Fixed operation list rendering to ensure stable keys for generated docs.

Copy link

changeset-bot bot commented Sep 23, 2025

⚠️ No Changeset found

Latest commit: dd586e3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

coderabbitai bot commented Sep 23, 2025

Walkthrough

Adds a Python WebSocket README template and five shared generator components (BaseInfo, Overview, Usage, CoreMethods, Installation); refactors the JavaScript WebSocket README template to use these components and centralizes metadata extraction via BaseInfo. Also fixes React key usage in AvailableOperations.

Changes

Cohort / File(s) Summary of changes
Python WebSocket README template
packages/templates/clients/websocket/python/template/README.md.js
Adds a default-exported template function that generates README.md for a Python WebSocket client. Uses BaseInfo(asyncapi, params), composes content with File/Text, and renders title, overview, installation, usage, and core methods.
JavaScript WebSocket README template (refactor)
packages/templates/clients/websocket/javascript/template/README.md.js
Replaces manual metadata extraction and large inline README construction with component-driven rendering. Uses const { info, clientName, title, serverUrl } = BaseInfo(asyncapi, params) and renders <Overview>, <Usage>, <CoreMethods>, <AvailableOperations>.
Shared template components
packages/components/Info.js, packages/components/Overview.js, packages/components/Usage.js, packages/components/CoreMethods.js, packages/components/Installation.js
Adds BaseInfo(asyncapi, params) to centralize server/info/client/title/serverUrl extraction and adds components: Overview({ info, title, serverUrl }), Usage({ clientName, clientFileName, language }), CoreMethods({ language }), and Installation() that render README sections using Text from @asyncapi/generator-react-sdk.
JS AvailableOperations key fix
packages/templates/clients/websocket/javascript/components/AvailableOperations.js
Adds index parameter to map callback and sets key={index} on each rendered Text element to satisfy React key requirements; rendering logic unchanged.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly describes the primary change—adding the Python README template—in imperative mood and follows the Conventional Commits convention, making the intent clear to anyone reviewing history.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 414ea85 and 33a0e8e.

⛔ Files ignored due to path filters (1)
  • packages/templates/clients/websocket/test/integration-test/__snapshots__/integration.test.js.snap is excluded by !**/*.snap
📒 Files selected for processing (3)
  • packages/components/Info.js (1 hunks)
  • packages/components/Overview.js (1 hunks)
  • packages/templates/clients/websocket/javascript/template/README.md.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/components/Info.js
  • packages/templates/clients/websocket/javascript/template/README.md.js
🧰 Additional context used
🧬 Code graph analysis (1)
packages/components/Overview.js (1)
packages/components/Info.js (3)
  • info (5-5)
  • title (7-7)
  • serverUrl (8-8)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Test generator as dependency with Node 18
  • GitHub Check: Test generator as dependency with Node 20
  • GitHub Check: Acceptance tests for generated templates
  • GitHub Check: Test NodeJS PR - windows-latest
  • GitHub Check: Test NodeJS PR - ubuntu-latest
  • GitHub Check: Test NodeJS PR - macos-13
🔇 Additional comments (1)
packages/components/Overview.js (1)

4-12: Avoid emitting undefined in README metadata

If info.description() or info.version() return undefined (both fields are optional in AsyncAPI), the generated README literally prints “undefined”, which is a user-facing defect. Please normalize these values (and serverUrl) before composing the Markdown.

 export function Overview({ info, title, serverUrl }) {
-  return (
-    <Text newLines={2}>
-      {`## Overview
-
-${info.description() || `A WebSocket client for ${title}.`}
-
-- **Version:** ${info.version()}
-- **Server URL:** ${serverUrl}
-`}
-    </Text>
-  );
+  const description = info.description?.()?.trim() || `A WebSocket client for ${title}.`;
+  const version = info.version?.() ?? 'N/A';
+  const resolvedServerUrl = serverUrl ?? 'N/A';
+
+  return (
+    <Text newLines={2}>
+      {`## Overview
+
+${description}
+
+- **Version:** ${version}
+- **Server URL:** ${resolvedServerUrl}
+`}
+    </Text>
+  );
 }

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@asyncapi-bot
Copy link
Contributor

What reviewer looks at during PR review

The following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.

  1. PR Title: Use a concise title that follows our Conventional Commits guidelines and clearly summarizes the change using imperative mood (it means spoken or written as if giving a command or instruction, like "add new helper for listing operations")

    Note - In Generator, prepend feat: or fix: in PR title only when PATCH/MINOR release must be triggered.

  2. PR Description: Clearly explain the issue being solved, summarize the changes made, and mention the related issue.

    Note - In Generator, we use Maintainers Work board to track progress. Ensure the PR Description includes Resolves #<issue-number> or Fixes #<issue-number> this will automatically close the linked issue when the PR is merged and helps automate the maintainers workflow.

  3. Documentation: Update the relevant Generator documentation to accurately reflect the changes introduced in the PR, ensuring users and contributors have up-to-date guidance.

  4. Comments and JSDoc: Write clear and consistent JSDoc comments for functions, including parameter types, return values, and error conditions, so others can easily understand and use the code.

  5. DRY Code: Ensure the code follows the Don't Repeat Yourself principle. Look out for duplicate logic that can be reused.

  6. Test Coverage: Ensure the new code is well-tested with meaningful test cases that pass consistently and cover all relevant edge cases.

  7. Commit History: Contributors should avoid force-pushing as much as possible. It makes it harder to track incremental changes and review the latest updates.

  8. Template Design Principles Alignment: While reviewing template-related changes in the packages/ directory, ensure they align with the Assumptions and Principles. If any principle feels outdated or no longer applicable, start a discussion these principles are meant to evolve with the project.

  9. Reduce Scope When Needed: If an issue or PR feels too large or complex, consider splitting it and creating follow-up issues. Smaller, focused PRs are easier to review and merge.

  10. Bot Comments: As reviewers, check that contributors have appropriately addressed comments or suggestions made by automated bots. If there are bot comments the reviewer disagrees with, react to them or mark them as resolved, so the review history remains clear and accurate.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (3)
packages/templates/clients/websocket/python/template/README.md.js (3)

45-47: Document that connect() is async to match the example usage.

The sample uses await ws_client.connect() but the docs don't mention it's async.

-#### `connect()`
-Establishes a WebSocket connection to the server.
+#### `connect()` (async)
+Asynchronously establishes a WebSocket connection to the server.

87-93: Avoid referencing a likely non-existent method: send_echo_message.

This name is too specific and may not exist in the generated client. Point users to actual operation methods.

-        message = 'Hello, Echo!'
+        message = 'Hello, world!'
         while True:
             try:
-                await ws_client.send_echo_message(message)
+                await ws_client.<operation_method>(message)  # Replace with a generated method from "Available Operations" above
             except Exception as error:
                 print('Error while sending message:', error)
             await asyncio.sleep(interval)

77-77: Capitalize “WebSocket” correctly.

-    print('Errors from Websocket:', getattr(error, 'message', str(error)))
+    print('Errors from WebSocket:', getattr(error, 'message', str(error)))
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e7004b and e2f1156.

📒 Files selected for processing (1)
  • packages/templates/clients/websocket/python/template/README.md.js (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/templates/clients/websocket/python/template/README.md.js (3)
packages/helpers/src/servers.js (2)
  • getServer (34-45)
  • getServerUrl (8-22)
packages/helpers/src/utils.js (3)
  • getInfo (9-21)
  • getClientName (53-61)
  • getTitle (32-43)
packages/templates/clients/websocket/javascript/components/AvailableOperations.js (1)
  • AvailableOperations (5-20)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Test generator as dependency with Node 18
  • GitHub Check: Acceptance tests for generated templates
  • GitHub Check: Test generator as dependency with Node 20

@thulieblack
Copy link
Member Author

@Adi-204 I need to check how the readme renders but all the commands I have in my head are failing can you help me

@Adi-204
Copy link
Member

Adi-204 commented Sep 23, 2025

@thulieblack you can check the templates rendered content by running integration test we have new integration test setup https://github.com/asyncapi/generator/tree/master/packages/templates/clients/websocket/test#integration-testing

So basically cd packages\templates\clients\websocket\test\integration-test and run npm run test to run integration test and than in every template in your case in python their is test folder inside which temp folder will have templates for diff fixtures.

does it answers your question?

@thulieblack
Copy link
Member Author

Not really, I don't want to run the integration tests, but I want to generate the Python README code locally and see how it displays

@Adi-204
Copy link
Member

Adi-204 commented Sep 23, 2025

@thulieblack you want to see below README.md file right?

image

Also when you added this new README.md their should be changes in snapshots which I don't see in this PR. I would suggest you to run npm run test locally. In integration test we are using Generator so it helps you to see generated code locally.

@thulieblack
Copy link
Member Author

Sorry Adi, could you please walk me through how you did this because I'm not reproducing this from my end.

Also, I need to add the Readme to the snapshoot test as well?

@Adi-204
Copy link
Member

Adi-204 commented Sep 23, 2025

@thulieblack can you please share final logs when you run npm run test globally inside generator are all test passing successful? I would recommend to run npm i once again as in monorepo you can sometimes face dependencies issues.
I just clone your PR and when I ran npm run test the snapshots got updated.
btw can you see temp folder content in any of the clients or not?

@Adi-204
Copy link
Member

Adi-204 commented Sep 23, 2025

ok one thing I notice is in this PR ci logs test are failed still overall it is showing pass? 🤔

image

cc @derberg can you also please look.

@thulieblack
Copy link
Member Author

In terms of temp content, this is what I see

image

Logs after running npm run test

C:\Users\siban\Local Repos\generator> npm run test

> [email protected] test
> turbo run test

╭──────────────────────────────────────────────────────────────────────╮
│                                                                      │
│                  Update available v1.13.3 ≫ v2.5.6                   │
│    Changelog: https://github.com/vercel/turbo/releases/tag/v2.5.6    │
│           Run "npx @turbo/codemod@latest update" to update           │
│                                                                      │
│        Follow @turborepo for updates: https://x.com/turborepo        │
╰──────────────────────────────────────────────────────────────────────╯
 WARNING  stale pid file at "C:\\Users\\siban\\AppData\\Local\\Temp\\turbod\\c5b3f216f4f6a569\\turbod.pid"
• Packages in scope: @asyncapi/generator, @asyncapi/generator-components, @asyncapi/generator-helpers, @asyncapi/generator-hooks, @asyncapi/generator-react-sdk, @asyncapi/keeper, @asyncapi/nunjucks-filters, @asyncapi/template-acceptance-test-js, @asyncapi/template-integration-test, @asyncapi/template-kafka-integration-test, core-template-client-kafka-java-quarkus, core-template-client-websocket-dart, core-template-client-websocket-java-quarkus, core-template-client-websocket-javascript, core-template-client-websocket-python
• Running test in 15 packages
• Remote caching disabled
@asyncapi/generator-components:build: cache bypass, force executing 9909529abfbf0154
@asyncapi/keeper:build: cache bypass, force executing 3c25360b555d0a07
@asyncapi/generator-react-sdk:build: cache bypass, force executing acfe3de747d260d1
@asyncapi/generator-hooks:test: cache bypass, force executing 7f16ff210fb25f99
@asyncapi/nunjucks-filters:test: cache bypass, force executing cbd3905b6b1af93a
@asyncapi/generator-helpers:test: cache bypass, force executing abe8b83d3d078fe9
@asyncapi/generator-components:build: 
@asyncapi/generator-components:build: > @asyncapi/[email protected] build
@asyncapi/generator-components:build: > babel src --out-dir lib
@asyncapi/generator-components:build:
@asyncapi/keeper:build:
@asyncapi/keeper:build: > @asyncapi/[email protected] build
@asyncapi/keeper:build: > babel src --out-dir lib
@asyncapi/keeper:build:
@asyncapi/generator-react-sdk:build: 
@asyncapi/generator-react-sdk:build: > @asyncapi/[email protected] build
@asyncapi/generator-react-sdk:build: > tsc
@asyncapi/generator-react-sdk:build:
@asyncapi/generator-hooks:test: 
@asyncapi/generator-hooks:test: > @asyncapi/[email protected] test
@asyncapi/generator-hooks:test: > npm run test:cleanup && jest --coverage
@asyncapi/generator-hooks:test:
@asyncapi/generator-helpers:test: 
@asyncapi/generator-helpers:test: > @asyncapi/[email protected] test
@asyncapi/generator-helpers:test: > jest --coverage
@asyncapi/generator-helpers:test:
@asyncapi/nunjucks-filters:test: 
@asyncapi/nunjucks-filters:test: > @asyncapi/[email protected] test
@asyncapi/nunjucks-filters:test: > ava
@asyncapi/nunjucks-filters:test:
@asyncapi/nunjucks-filters:test: 
@asyncapi/generator-hooks:test: 
@asyncapi/generator-hooks:test: > @asyncapi/[email protected] test:cleanup
@asyncapi/generator-hooks:test: > rimraf "test/temp"
@asyncapi/generator-hooks:test:
@asyncapi/keeper:build: Successfully compiled 2 files with Babel (2102ms).
@asyncapi/nunjucks-filters:test:   ✔ lodashFilters › lodash isArray function is available and works as expected
@asyncapi/keeper:test: cache bypass, force executing 9bc5ce695672a37b
@asyncapi/nunjucks-filters:test:   ✔ customFilters › markdown2html returns valid html
@asyncapi/nunjucks-filters:test:   ✔ customFilters › generateExample returns valid example
@asyncapi/nunjucks-filters:test:   ✔ customFilters › oneLine returns one liner string
@asyncapi/nunjucks-filters:test:   ✔ customFilters › .getPayloadExamples() should return empty examples
@asyncapi/nunjucks-filters:test:   ✔ customFilters › .getPayloadExamples() should return payload examples
@asyncapi/nunjucks-filters:test:   ✔ customFilters › .getPayloadExamples() should return examples from payload schema
@asyncapi/nunjucks-filters:test:   ✔ customFilters › .getPayloadExamples() should return examples from payload schema - case when only headers examples are defined in `examples` field
@asyncapi/nunjucks-filters:test:   ✔ customFilters › .getPayloadExamples() should return examples for payload - case when at least one item in `examples` array has `payload` field with existing `payload.examples`
@asyncapi/nunjucks-filters:test:   ✔ customFilters › .getHeadersExamples() should return empty examples
@asyncapi/nunjucks-filters:test:   ✔ customFilters › .getHeadersExamples() should return headers examples
@asyncapi/nunjucks-filters:test:   ✔ customFilters › .getHeadersExamples() should return examples from headers schema
@asyncapi/nunjucks-filters:test:   ✔ customFilters › .getHeadersExamples() should return examples from headers schema - case when only payload examples are defined in `examples` field
@asyncapi/nunjucks-filters:test:   ✔ customFilters › .getHeadersExamples() should return examples for headers - case when at least one item in `examples` array has `headers` field with existing `headers.examples`
@asyncapi/nunjucks-filters:test:   ✔ customFilters › .replaceServerVariablesWithValues() should replace placeholder with default value
@asyncapi/nunjucks-filters:test:   ✔ customFilters › .replaceServerVariablesWithValues() should replace placeholder with first enum value when no default is specified
@asyncapi/generator-components:build: Successfully compiled 10 files with Babel (2596ms).
@asyncapi/nunjucks-filters:test:   ─
@asyncapi/nunjucks-filters:test: 
@asyncapi/nunjucks-filters:test:   16 tests passed
@asyncapi/keeper:test: 
@asyncapi/keeper:test: > @asyncapi/[email protected] pretest
@asyncapi/keeper:test: > npm run build
@asyncapi/keeper:test:
@asyncapi/generator-react-sdk:build: src/components/__tests__/File.spec.tsx(1,19): error TS7016: Could not find a declaration file for module 'react'. 'C:/Users/siban/Local Repos/generator/node_modules/react/index.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/react` if it exists or add a new declaration (.d.ts) file containing `declare module 'react';`
@asyncapi/generator-react-sdk:build: src/components/__tests__/File.spec.tsx(5,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/File.spec.tsx(6,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/File.spec.tsx(8,28): error TS7016: Could not find a declaration file for module 'react/jsx-runtime'. 'C:/Users/siban/Local Repos/generator/node_modules/react/jsx-runtime.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/react` if it exists or add a new declaration (.d.ts) file containing `declare module 'react/jsx-runtime';`    
@asyncapi/generator-react-sdk:build: src/components/__tests__/File.spec.tsx(9,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/__tests__/File.spec.tsx(12,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/File.spec.tsx(18,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/__tests__/File.spec.tsx(21,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/File.spec.tsx(28,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/__tests__/File.spec.tsx(31,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/File.spec.tsx(38,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(1,19): error TS7016: Could not find a declaration file for module 'react'. 'C:/Users/siban/Local Repos/generator/node_modules/react/index.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/react` if it exists or add a new declaration (.d.ts) file containing `declare module 'react';`
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(5,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(6,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(8,28): error TS7016: Could not find a declaration file for module 'react/jsx-runtime'. 'C:/Users/siban/Local Repos/generator/node_modules/react/jsx-runtime.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/react` if it exists or add a new declaration (.d.ts) file containing `declare module 'react/jsx-runtime';`    
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(9,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(12,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(18,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(21,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(27,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(30,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(36,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(39,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Indent.spec.tsx(49,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Text.spec.tsx(1,19): error TS7016: Could not find a declaration file for module 'react'. 'C:/Users/siban/Local Repos/generator/node_modules/react/index.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/react` if it exists or add a new declaration (.d.ts) file containing `declare module 'react';`
@asyncapi/generator-react-sdk:build: src/components/__tests__/Text.spec.tsx(5,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Text.spec.tsx(6,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Text.spec.tsx(8,28): error TS7016: Could not find a declaration file for module 'react/jsx-runtime'. 'C:/Users/siban/Local Repos/generator/node_modules/react/jsx-runtime.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/react` if it exists or add a new declaration (.d.ts) file containing `declare module 'react/jsx-runtime';`    
@asyncapi/generator-react-sdk:build: src/components/__tests__/Text.spec.tsx(9,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Text.spec.tsx(12,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Text.spec.tsx(18,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Text.spec.tsx(21,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Text.spec.tsx(27,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Text.spec.tsx(30,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/components/__tests__/Text.spec.tsx(33,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/components/File.tsx(1,23): error TS7016: Could not find a declaration file for module 'prop-types'. 'C:/Users/siban/Local Repos/generator/node_modules/prop-types/index.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/prop-types` if it exists or add a new declaration (.d.ts) file containing `declare module 'prop-types';`      
@asyncapi/generator-react-sdk:build: src/components/File.tsx(38,47): error TS7031: Binding element 'children' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build: src/components/File.tsx(39,10): error TS7016: Could not find a declaration file for module 'react/jsx-runtime'. 'C:/Users/siban/Local Repos/generator/node_modules/react/jsx-runtime.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/react` if it exists or add a new declaration (.d.ts) file containing `declare module 'react/jsx-runtime';`    
@asyncapi/generator-react-sdk:build: src/components/Indent.tsx(1,23): error TS7016: Could not find a declaration file for module 'prop-types'. 'C:/Users/siban/Local Repos/generator/node_modules/prop-types/index.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/prop-types` if it exists or add a new declaration (.d.ts) file containing `declare module 'prop-types';`      
@asyncapi/generator-react-sdk:build: src/components/Indent.tsx(41,93): error TS7031: Binding element 'childrenContent' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build: src/components/Indent.tsx(42,10): error TS7016: Could not find a declaration file for module 'react/jsx-runtime'. 'C:/Users/siban/Local Repos/generator/node_modules/react/jsx-runtime.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/react` if it exists or add a new declaration (.d.ts) file containing `declare module 'react/jsx-runtime';`    
@asyncapi/generator-react-sdk:build: src/components/Text.tsx(1,23): error TS7016: Could not find a declaration file for module 'prop-types'. 'C:/Users/siban/Local Repos/generator/node_modules/prop-types/index.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/prop-types` if it exists or add a new declaration (.d.ts) file containing `declare module 'prop-types';`      
@asyncapi/generator-react-sdk:build: src/components/Text.tsx(48,105): error TS7031: Binding element 'childrenContent' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build: src/components/Text.tsx(50,10): error TS7016: Could not find a declaration file for module 'react/jsx-runtime'. 'C:/Users/siban/Local Repos/generator/node_modules/react/jsx-runtime.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/react` if it exists or add a new declaration (.d.ts) file containing `declare module 'react/jsx-runtime';`    
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(1,19): error TS7016: Could not find a declaration file for module 'react'. 'C:/Users/siban/Local Repos/generator/node_modules/react/index.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/react` if it exists or add a new declaration (.d.ts) file containing `declare module 'react';`
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(4,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(5,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(7,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(10,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(12,14): error TS7016: Could not find a declaration file for module 'react/jsx-runtime'. 'C:/Users/siban/Local Repos/generator/node_modules/react/jsx-runtime.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/react` if it exists or add a new declaration (.d.ts) file containing `declare module 'react/jsx-runtime';`    
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(16,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(19,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(29,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(32,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(56,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(59,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(69,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(72,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(78,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(81,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(106,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(109,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(123,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(126,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(139,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(142,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(152,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(155,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(158,9): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(160,9): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/renderer.spec.tsx(171,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(5,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(6,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(10,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(11,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(12,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(15,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(19,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(20,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(21,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(22,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(23,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(24,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(25,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(28,3): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(32,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(33,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/__tests__/template.spec.ts(34,5): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/renderer/renderer.ts(23,33): error TS2503: Cannot find namespace 'React'.
@asyncapi/generator-react-sdk:build: src/renderer/renderer.ts(23,54): error TS2503: Cannot find namespace 'React'.
@asyncapi/generator-react-sdk:build: src/renderer/renderer.ts(63,35): error TS2503: Cannot find namespace 'React'.
@asyncapi/generator-react-sdk:build: src/renderer/renderer.ts(63,35): error TS4078: Parameter 'component' of exported function has or is using private name 'React'.
@asyncapi/generator-react-sdk:build: src/renderer/renderer.ts(70,49): error TS2503: Cannot find namespace 'React'.
@asyncapi/generator-react-sdk:build: src/renderer/renderer.ts(74,43): error TS2503: Cannot find namespace 'React'.
@asyncapi/generator-react-sdk:build: src/renderer/template.ts(1,19): error TS7016: Could not find a declaration file for module 'react'. 'C:/Users/siban/Local Repos/generator/node_modules/react/index.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build:   Try `npm i --save-dev @types/react` if it exists or add a new declaration (.d.ts) file containing `declare module 'react';`
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(12,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(16,3): error TS2304: Cannot find name 'beforeAll'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(16,20): error TS7006: Parameter 'done' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(28,3): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(29,5): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(33,7): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(35,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(37,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(38,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(41,7): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(43,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(48,3): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(49,5): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(53,7): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(55,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(57,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(58,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(61,7): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(63,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(68,3): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(69,5): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(73,7): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(75,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(77,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(78,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(81,7): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(83,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(88,3): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(89,5): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(93,7): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(95,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(97,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(98,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(101,7): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.
@asyncapi/generator-react-sdk:build: src/transpiler/__tests__/transpiler.spec.tsx(103,9): error TS2304: Cannot find name 'expect'.
@asyncapi/generator-react-sdk:build: src/types.ts(1,19): error TS7016: Could not find a declaration file for module 'react'. 'C:/Users/siban/Local Repos/generator/node_modules/react/index.js' implicitly has an 'any' type.
@asyncapi/generator-react-sdk:build: npm error Lifecycle script `build` failed with error:
@asyncapi/generator-react-sdk:build: npm error Lifecycle script `build` failed with error:
@asyncapi/generator-react-sdk:build: npm error code 1
@asyncapi/generator-react-sdk:build: npm error path C:\Users\siban\Local Repos\generator\apps\react-sdk
@asyncapi/generator-react-sdk:build: npm error workspace @asyncapi/[email protected]
@asyncapi/generator-react-sdk:build: npm error location C:\Users\siban\Local Repos\generator\apps\react-sdk
@asyncapi/generator-react-sdk:build: npm error command failed
@asyncapi/generator-react-sdk:build: npm error command C:\WINDOWS\system32\cmd.exe /d /s /c tsc
@asyncapi/generator-react-sdk:build: ERROR: command finished with error: command (C:\Users\siban\Local Repos\generator\apps\react-sdk) C:\Program Files\nodejs\npm.cmd run build exited (1)
@asyncapi/generator-react-sdk#build: command (C:\Users\siban\Local Repos\generator\apps\react-sdk) C:\Program Files\nodejs\npm.cmd run build exited (1)

 Tasks:    3 successful, 7 total
Cached:    0 cached, 7 total
  Time:    10.789s
Failed:    @asyncapi/generator-react-sdk#build

 ERROR  run failed: command  exited (1)

After running npm i

PS C:\Users\siban\Local Repos\generator> npm i
npm error code EBADENGINE
npm error engine Unsupported engine
npm error engine Not compatible with your version of node/npm: @stoplight/[email protected]
npm error notsup Not compatible with your version of node/npm: @stoplight/[email protected]
npm error notsup Required: {"node":"^16.20 || ^18.18 || >= 20.17"}
npm error notsup Actual:   {"npm":"10.9.3","node":"v20.14.0"}
npm error A complete log of this run can be found in: C:\Users\siban\AppData\Local\npm-cache\_logs\2025-09-23T13_54_15_663Z-debug-0.log

Let me update my node version

@Adi-204
Copy link
Member

Adi-204 commented Sep 23, 2025

yeah please update the node and after running npm run test it should look like below -

image

@thulieblack
Copy link
Member Author

thank you so much Adi, it worked

image

@derberg
Copy link
Member

derberg commented Sep 24, 2025

@thulieblack do you plan to add more commits to this PR? as for now I do not see it addressing the scope of the issue, the decomponentization

@thulieblack
Copy link
Member Author

Didn't you mention that I need to add create a PR for each component? https://asyncapi.slack.com/archives/C072JMTJ85Q/p1757513137652219?thread_ts=1757501093.164179&cid=C072JMTJ85Q

Or do I add it on this PR alongside the new Python readme?

@derberg
Copy link
Member

derberg commented Sep 25, 2025

@thulieblack yes, but in your PR you just add a new readme template, no components, and do not reuse from the other readme - so you do not identify common parts and do not create components

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/templates/clients/websocket/python/components/Overview.js (1)

10-12: Skip bullets when metadata is missing

When the AsyncAPI document has no default server (or the helper fails to resolve one) the README currently prints - **Server URL:** undefined, which looks broken and undermines the componentization effort. Same risk applies to version if the input omits it. Better to add those bullets only when the values exist.

Proposed tweak:

-      {`# ${title}
-
-## Overview
-
-${description || `A WebSocket client for ${title}.`}
-- **Version:** ${version}
-- **Server URL:** ${serverUrl}
-`}
+      {[
+        `# ${title}`,
+        '',
+        '## Overview',
+        '',
+        description || `A WebSocket client for ${title}.`,
+        version ? `- **Version:** ${version}` : null,
+        serverUrl ? `- **Server URL:** ${serverUrl}` : null,
+      ]
+        .filter(Boolean)
+        .join('\n')}
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dd983f3 and df08e03.

⛔ Files ignored due to path filters (1)
  • packages/templates/clients/websocket/test/integration-test/__snapshots__/integration.test.js.snap is excluded by !**/*.snap
📒 Files selected for processing (1)
  • packages/templates/clients/websocket/python/components/Overview.js (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Test generator as dependency with Node 18
  • GitHub Check: Test generator as dependency with Node 20
  • GitHub Check: Acceptance tests for generated templates
  • GitHub Check: Test NodeJS PR - macos-13
  • GitHub Check: Test NodeJS PR - ubuntu-latest
  • GitHub Check: Test NodeJS PR - windows-latest

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/components/Usage.js (1)

7-19: Make the Python usage snippet runnable as-is.

Line 14 defines main() but never runs it, so the copied snippet does nothing. Import asyncio and drive the coroutine to give users a working example.

Suggested diff:

 ```python
-from ${clientFileName.replace('.py', '')} import ${clientName}
-
-ws_client = ${clientName}()
-
-async def main():
-    await ws_client.connect()
-    # use ws_client to send/receive messages
-    await ws_client.close()
+import asyncio
+
+from ${clientFileName.replace('.py', '')} import ${clientName}
+
+ws_client = ${clientName}()
+
+async def main():
+    await ws_client.connect()
+    # use ws_client to send/receive messages
+    await ws_client.close()
+
+if __name__ == "__main__":
+    asyncio.run(main())

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: Path: .coderabbit.yaml

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between df08e03ba9f9992fca81361aaee7285ae1f806ec and 170a75f33980293caab144f73a6c6c0d8a65805f.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `packages/components/Overview.js` (1 hunks)
* `packages/components/Usage.js` (1 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)</summary>

* GitHub Check: Acceptance tests for generated templates
* GitHub Check: Test generator as dependency with Node 18
* GitHub Check: Test generator as dependency with Node 20
* GitHub Check: Test NodeJS PR - ubuntu-latest
* GitHub Check: Test NodeJS PR - windows-latest
* GitHub Check: Test NodeJS PR - macos-13

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (7)
packages/templates/clients/websocket/javascript/template/README.md.js (4)

12-12: Make operations retrieval resilient to parser differences.

Wrap asyncapi.operations().all() to avoid hard failures with older parsers.

-  const operations = asyncapi.operations().all();
+  let operations = [];
+  try {
+    operations = asyncapi.operations().all();
+  } catch (e) {
+    operations = [];
+  }

4-4: Style nit: add a space before the closing brace.

-import { CoreMethods} from '../../../../../components/CoreMethods';
+import { CoreMethods } from '../../../../../components/CoreMethods';

3-5: Consider adding Installation for parity with Python README.

If the section is generic, import and render it after Overview.

 import { Overview } from '../../../../../components/Overview';
-import { CoreMethods} from '../../../../../components/CoreMethods';
+import { Installation } from '../../../../../components/Installation';
+import { CoreMethods } from '../../../../../components/CoreMethods';

19-21: Consider adding Installation for parity with Python README (placement).

       <Overview info={info} title={title} serverUrl={serverUrl} />
+      <Installation />
       <Usage clientName={clientName} clientFileName={params.clientFileName} language="javascript" />
packages/templates/clients/websocket/python/template/README.md.js (3)

6-6: Style nit: add a space before the closing brace.

-import { CoreMethods} from '../../../../../components/CoreMethods';
+import { CoreMethods } from '../../../../../components/CoreMethods';

9-10: Provide a safe default for clientFileName.

Avoid passing undefined to <Usage>; set a Pythonic fallback.

   const { info, clientName, title, serverUrl } = Info(asyncapi, params);
+  const clientFileName = params?.clientFileName || 'client.py';

16-16: Use the computed clientFileName fallback.

-      <Usage clientName={clientName} clientFileName={params.clientFileName} language="python" />
+      <Usage clientName={clientName} clientFileName={clientFileName} language="python" />
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 170a75f and 9e28848.

📒 Files selected for processing (2)
  • packages/templates/clients/websocket/javascript/template/README.md.js (1 hunks)
  • packages/templates/clients/websocket/python/template/README.md.js (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
packages/templates/clients/websocket/javascript/template/README.md.js (1)
packages/templates/clients/websocket/python/template/README.md.js (1)
  • Info (9-9)
packages/templates/clients/websocket/python/template/README.md.js (1)
packages/templates/clients/websocket/javascript/template/README.md.js (1)
  • Info (9-9)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Test generator as dependency with Node 18
  • GitHub Check: Test generator as dependency with Node 20
  • GitHub Check: Acceptance tests for generated templates
🔇 Additional comments (2)
packages/templates/clients/websocket/javascript/template/README.md.js (1)

19-21: Confirm Usage can handle undefined clientFileName.

If params.clientFileName is optional, ensure <Usage> has a sensible fallback for JS; otherwise precompute a default here.

packages/templates/clients/websocket/python/template/README.md.js (1)

13-18: Nice move to componentize the README content.

Good separation with Overview, Installation, Usage, and CoreMethods.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e28848 and ce4b036.

⛔ Files ignored due to path filters (1)
  • packages/templates/clients/websocket/test/integration-test/__snapshots__/integration.test.js.snap is excluded by !**/*.snap
📒 Files selected for processing (7)
  • packages/components/CoreMethods.js (1 hunks)
  • packages/components/Info.js (1 hunks)
  • packages/components/Installation.js (1 hunks)
  • packages/components/Overview.js (1 hunks)
  • packages/components/Usage.js (1 hunks)
  • packages/templates/clients/websocket/javascript/template/README.md.js (1 hunks)
  • packages/templates/clients/websocket/python/template/README.md.js (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/templates/clients/websocket/python/template/README.md.js
  • packages/components/Overview.js
🧰 Additional context used
🧬 Code graph analysis (3)
packages/components/Usage.js (1)
packages/components/Info.js (1)
  • clientName (7-7)
packages/components/Info.js (4)
packages/templates/clients/websocket/javascript/template/README.md.js (1)
  • BaseInfo (9-9)
packages/templates/clients/websocket/python/template/README.md.js (1)
  • BaseInfo (9-9)
packages/helpers/src/servers.js (2)
  • getServer (34-45)
  • getServerUrl (8-22)
packages/helpers/src/utils.js (3)
  • getInfo (9-21)
  • getClientName (53-61)
  • getTitle (32-43)
packages/templates/clients/websocket/javascript/template/README.md.js (4)
packages/components/Info.js (5)
  • BaseInfo (4-12)
  • title (8-8)
  • info (6-6)
  • serverUrl (9-9)
  • clientName (7-7)
packages/components/Overview.js (1)
  • Overview (3-15)
packages/components/Usage.js (1)
  • Usage (3-46)
packages/components/CoreMethods.js (1)
  • CoreMethods (3-32)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Test generator as dependency with Node 18
  • GitHub Check: Acceptance tests for generated templates
  • GitHub Check: Test generator as dependency with Node 20
  • GitHub Check: Test NodeJS PR - macos-13
  • GitHub Check: Test NodeJS PR - ubuntu-latest
  • GitHub Check: Test NodeJS PR - windows-latest
🔇 Additional comments (4)
packages/components/CoreMethods.js (1)

4-27: Language-specific handler names look good.

The snake_case vs camelCase switch matches the Python and JavaScript clients’ APIs.

packages/components/Info.js (1)

4-11: Nice centralization of shared metadata.

Pulling server, info, clientName, title, and serverUrl into BaseInfo removes duplication across the README templates.

packages/templates/clients/websocket/javascript/template/README.md.js (1)

17-17: Trim the extra newline from the title.

Line [17] still embeds \n; with newLines={2} you end up with one blank line too many in the rendered README.

packages/components/Installation.js (1)

6-12: README instruction is valid: requirements.txt template exists
The Python WebSocket template includes packages/templates/clients/websocket/python/template/requirements.txt.js, which generates requirements.txt with the listed dependencies.

Comment on lines +6 to +33
if (language === 'python') {
snippet = `
from ${clientFileName.replace('.py', '')} import ${clientName}
ws_client = ${clientName}()
async def main():
await ws_client.connect()
# use ws_client to send/receive messages
await ws_client.close()
`;
} else if (language === 'javascript') {
snippet = `
const ${clientName} = require('./${clientFileName.replace('.js', '')}');
const wsClient = new ${clientName}();
async function main() {
try {
await wsClient.connect();
// use wsClient to send/receive messages
await wsClient.close();
} catch (error) {
console.error('Failed to connect:', error);
}
}
main();
`;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Python usage example never actually runs.

Line [12] defines async def main() but nothing ever drives the event loop—users copying the snippet get no connection attempt. Add the missing asyncio import plus asyncio.run(main()) (or equivalent) so the example is executable.

-    snippet = `
-from ${clientFileName.replace('.py', '')} import ${clientName}
+    snippet = `
+import asyncio
+from ${clientFileName.replace('.py', '')} import ${clientName}
 
 ws_client = ${clientName}()
 
 async def main():
     await ws_client.connect()
     # use ws_client to send/receive messages
     await ws_client.close()
+
+if __name__ == "__main__":
+    asyncio.run(main())
 `;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (language === 'python') {
snippet = `
from ${clientFileName.replace('.py', '')} import ${clientName}
ws_client = ${clientName}()
async def main():
await ws_client.connect()
# use ws_client to send/receive messages
await ws_client.close()
`;
} else if (language === 'javascript') {
snippet = `
const ${clientName} = require('./${clientFileName.replace('.js', '')}');
const wsClient = new ${clientName}();
async function main() {
try {
await wsClient.connect();
// use wsClient to send/receive messages
await wsClient.close();
} catch (error) {
console.error('Failed to connect:', error);
}
}
main();
`;
if (language === 'python') {
snippet = `
import asyncio
from ${clientFileName.replace('.py', '')} import ${clientName}
ws_client = ${clientName}()
async def main():
await ws_client.connect()
# use ws_client to send/receive messages
await ws_client.close()
if __name__ == "__main__":
asyncio.run(main())
`;
} else if (language === 'javascript') {
snippet = `
const ${clientName} = require('./${clientFileName.replace('.js', '')}');
const wsClient = new ${clientName}();
async function main() {
try {
await wsClient.connect();
// use wsClient to send/receive messages
await wsClient.close();
} catch (error) {
console.error('Failed to connect:', error);
}
}
main();
`;
🤖 Prompt for AI Agents
In packages/components/Usage.js around lines 6 to 33, the Python example defines
async def main() but never runs it; update the snippet to import asyncio at the
top of the Python block and add a call to asyncio.run(main()) (or equivalent) at
the end so the example actually drives the event loop and performs the
connect/close sequence when copied by users.

@thulieblack
Copy link
Member Author

Quick question, is that the correct folder where the components should be?

@Adi-204
Copy link
Member

Adi-204 commented Sep 26, 2025

@thulieblack yeah it should be inside packages/components but we have src folder inside that and @derberg discussed about putting components inside new folder /readme. So basically you should add components inside packages/components/src/readme create this readme folder in this PR.

Copy link

sonarqubecloud bot commented Oct 1, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants