Skip to content

Commit

Permalink
Merge branch 'master' into patch-4
Browse files Browse the repository at this point in the history
  • Loading branch information
syedzubeen authored Oct 15, 2023
2 parents 22e8b53 + 9e49741 commit 403b05c
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 84 deletions.
18 changes: 9 additions & 9 deletions library/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/react-component",
"version": "1.0.1",
"version": "1.0.2",
"private": false,
"description": "A React component for AsyncAPI specification.",
"repository": {
Expand Down Expand Up @@ -71,7 +71,7 @@
"@asyncapi/avro-schema-parser": "3.0.3",
"@asyncapi/openapi-schema-parser": "3.0.4",
"@asyncapi/protobuf-schema-parser": "3.0.0",
"@asyncapi/parser": "^3.0.0-next-major-spec.1",
"@asyncapi/parser": "^3.0.0-next-major-spec.3",
"highlight.js": "^10.7.2",
"isomorphic-dompurify": "^0.13.0",
"marked": "^4.0.14",
Expand Down
1 change: 0 additions & 1 deletion library/src/containers/AsyncApi/Standalone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class AsyncApiComponent extends Component<AsyncApiProps, AsyncAPIState> {
if (parsedSpec) {
this.state = { asyncapi: parsedSpec };
}
return;
}

async componentDidMount() {
Expand Down
5 changes: 2 additions & 3 deletions library/src/containers/Servers/Security.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ export const Security: React.FunctionComponent<Props> = ({

let renderedSecurities;
if (
!security ||
!security.length ||
!security?.length ||
!securitySchemes ||
!Object.keys(securitySchemes).length
) {
Expand Down Expand Up @@ -276,7 +275,7 @@ const SecurityItem: React.FunctionComponent<SecurityItemProps> = ({
</div>
)}

{securitySchema && securitySchema.hasDescription() && (
{securitySchema?.hasDescription() && (
<div>
<Markdown>{securitySchema.description()}</Markdown>
</div>
Expand Down
8 changes: 3 additions & 5 deletions library/src/helpers/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ export class MessageHelpers {
}

const payload = msg.payload();
if (payload && payload.examples()) {
if (payload?.examples()) {
return payload.examples()?.map(example => ({ example }));
}

return;
}

Expand Down Expand Up @@ -84,10 +83,9 @@ export class MessageHelpers {
}

const headers = msg.headers();
if (headers && headers.examples()) {
if (headers?.examples()) {
return headers.examples()?.map(example => ({ example }));
}

return;
return undefined;
}
}
9 changes: 4 additions & 5 deletions library/src/helpers/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,12 @@ export class ServerHelpers {
} else {
securityProtocol = 'PLAINTEXT';
}
} else if (securitySchema) {
securityProtocol = 'SASL_SSL';
} else {
if (securitySchema) {
securityProtocol = 'SASL_SSL';
} else {
securityProtocol = 'SSL';
}
securityProtocol = 'SSL';
}

if (securitySchema) {
switch (securitySchema.type()) {
case 'plain':
Expand Down
9 changes: 0 additions & 9 deletions library/src/styles/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@
@apply lg:hidden;
}

.container\:xl .burger-menu {
}

.container\:base .sidebar {
@apply lg:relative lg:block lg:w-64 lg:h-auto;
}

.container\:xl .sidebar {
}

.container\:base .sidebar--content {
@apply lg:w-56;
}
Expand Down Expand Up @@ -57,9 +51,6 @@
@apply 2xl:p-0 2xl:mt-0;
}

.container\:xl .examples {
}

.container\:base .panel--right {
@apply hidden 2xl:block 2xl:w-5/12;
}
Expand Down
46 changes: 23 additions & 23 deletions playground/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Playground app for AsyncApi React Component",
"homepage": "https://asyncapi.github.io/asyncapi-react",
"dependencies": {
"@asyncapi/react-component": "^1.0.1",
"@asyncapi/react-component": "^1.0.2",
"@fortawesome/fontawesome-svg-core": "^1.2.22",
"@fortawesome/free-brands-svg-icons": "^5.10.2",
"@fortawesome/free-solid-svg-icons": "^5.10.2",
Expand Down Expand Up @@ -45,5 +45,5 @@
"last 1 safari version"
]
},
"version": "1.0.1"
"version": "1.0.2"
}
46 changes: 23 additions & 23 deletions web-component/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 403b05c

Please sign in to comment.