@asyncapi/generator 3.2.1 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/docs/api_components.md +39 -0
- package/lib/generator.js +0 -1
- package/lib/logMessages.js +25 -1
- package/lib/parser.js +36 -16
- package/lib/templates/bakedInTemplates/core-template-client-websocket-dart/__transpiled/components/ClientClass.js +9 -3
- package/lib/templates/bakedInTemplates/core-template-client-websocket-dart/__transpiled/components/ClientClass.js.map +1 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-dart/__transpiled/template/client.dart.js +12 -20
- package/lib/templates/bakedInTemplates/core-template-client-websocket-dart/__transpiled/template/client.dart.js.map +1 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-dart/components/ClientClass.js +8 -4
- package/lib/templates/bakedInTemplates/core-template-client-websocket-dart/template/client.dart.js +2 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-java-quarkus/__transpiled/components/EchoWebSocket.js +4 -2
- package/lib/templates/bakedInTemplates/core-template-client-websocket-java-quarkus/__transpiled/components/EchoWebSocket.js.map +1 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-java-quarkus/__transpiled/template/src/main/java/com/asyncapi/client.java.js +4 -12
- package/lib/templates/bakedInTemplates/core-template-client-websocket-java-quarkus/__transpiled/template/src/main/java/com/asyncapi/client.java.js.map +1 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-java-quarkus/components/EchoWebSocket.js +2 -3
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/__transpiled/components/ClientClass.js +2 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/__transpiled/components/ClientClass.js.map +1 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/__transpiled/components/Constructor.js +1 -0
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/__transpiled/components/Constructor.js.map +1 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/__transpiled/components/RegisterOutgoingProcessor.js +24 -0
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/__transpiled/components/RegisterOutgoingProcessor.js.map +1 -0
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/__transpiled/example.js +12 -0
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/__transpiled/example.js.map +1 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/__transpiled/template/client.js.js +16 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/__transpiled/template/client.js.js.map +1 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/components/ClientClass.js +2 -0
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/components/Constructor.js +1 -0
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/components/RegisterOutgoingProcessor.js +17 -0
- package/lib/templates/bakedInTemplates/core-template-client-websocket-javascript/example.js +9 -0
- package/lib/templates/bakedInTemplates/core-template-client-websocket-python/__transpiled/components/ClientClass.js +3 -2
- package/lib/templates/bakedInTemplates/core-template-client-websocket-python/__transpiled/components/ClientClass.js.map +1 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-python/__transpiled/template/client.py.js +3 -16
- package/lib/templates/bakedInTemplates/core-template-client-websocket-python/__transpiled/template/client.py.js.map +1 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-python/components/ClientClass.js +2 -3
- package/lib/templates/config/validator.js +1 -1
- package/lib/utils.js +11 -8
- package/package.json +1 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-dart/__transpiled/components/SendEchoMessage.js +0 -27
- package/lib/templates/bakedInTemplates/core-template-client-websocket-dart/__transpiled/components/SendEchoMessage.js.map +0 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-dart/components/SendEchoMessage.js +0 -20
- package/lib/templates/bakedInTemplates/core-template-client-websocket-java-quarkus/__transpiled/components/HandleError.js +0 -19
- package/lib/templates/bakedInTemplates/core-template-client-websocket-java-quarkus/__transpiled/components/HandleError.js.map +0 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-java-quarkus/components/HandleError.js +0 -14
- package/lib/templates/bakedInTemplates/core-template-client-websocket-python/__transpiled/components/HandleError.js +0 -25
- package/lib/templates/bakedInTemplates/core-template-client-websocket-python/__transpiled/components/HandleError.js.map +0 -1
- package/lib/templates/bakedInTemplates/core-template-client-websocket-python/components/HandleError.js +0 -18
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('source-map-support/register');
|
|
4
|
-
var generatorReactSdk = require('@asyncapi/generator-react-sdk');
|
|
5
|
-
var jsxRuntime = require('/home/runner/work/generator/generator/node_modules/react/cjs/react-jsx-runtime.production.min.js');
|
|
6
|
-
|
|
7
|
-
function HandleError() {
|
|
8
|
-
return /*#__PURE__*/jsxRuntime.jsx(generatorReactSdk.Text, {
|
|
9
|
-
indent: 2,
|
|
10
|
-
children: `@OnError
|
|
11
|
-
public void onError(Throwable throwable) {
|
|
12
|
-
LOG.error("Websocket connection error: " + throwable.getMessage());
|
|
13
|
-
}
|
|
14
|
-
`
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
module.exports = HandleError;
|
|
19
|
-
//# sourceMappingURL=HandleError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HandleError.js","sources":["../../../../../../../../packages/templates/clients/websocket/java/quarkus/components/HandleError.js"],"sourcesContent":["import { Text } from '@asyncapi/generator-react-sdk';\n\nexport default function HandleError() {\n return (\n <Text indent={2}>\n {`@OnError\npublic void onError(Throwable throwable) {\n LOG.error(\"Websocket connection error: \" + throwable.getMessage());\n}\n`}\n </Text>\n );\n}\n\n"],"names":["HandleError","_jsx","Text","indent","children"],"mappings":";;;;;;AAEe,SAASA,WAAWA,GAAG;EACpC,oBACEC,cAAA,CAACC,sBAAI,EAAA;AAACC,IAAAA,MAAM,EAAE,CAAE;AAAAC,IAAAA,QAAA,EACb,CAAA;AACP;AACA;AACA;AACA,CAAA;AAAC,GACS,CAAC,CAAA;AAEX;;;;"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Text } from '@asyncapi/generator-react-sdk';
|
|
2
|
-
|
|
3
|
-
export default function HandleError() {
|
|
4
|
-
return (
|
|
5
|
-
<Text indent={2}>
|
|
6
|
-
{`@OnError
|
|
7
|
-
public void onError(Throwable throwable) {
|
|
8
|
-
LOG.error("Websocket connection error: " + throwable.getMessage());
|
|
9
|
-
}
|
|
10
|
-
`}
|
|
11
|
-
</Text>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
require('source-map-support/register');
|
|
6
|
-
var generatorReactSdk = require('@asyncapi/generator-react-sdk');
|
|
7
|
-
var jsxRuntime = require('/home/runner/work/generator/generator/node_modules/react/cjs/react-jsx-runtime.production.min.js');
|
|
8
|
-
|
|
9
|
-
function HandleError() {
|
|
10
|
-
return /*#__PURE__*/jsxRuntime.jsx(generatorReactSdk.Text, {
|
|
11
|
-
newLines: 2,
|
|
12
|
-
indent: 2,
|
|
13
|
-
children: `def handle_error(self, error):
|
|
14
|
-
"""Pass the error to all registered error handlers. Generic log message is printed if no handlers are registered."""
|
|
15
|
-
if len(self.error_handlers) == 0:
|
|
16
|
-
print("\\033[91mError occurred:\\033[0m", error)
|
|
17
|
-
else:
|
|
18
|
-
# Call custom error handlers
|
|
19
|
-
for handler in self.error_handlers:
|
|
20
|
-
handler(error)`
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
exports.HandleError = HandleError;
|
|
25
|
-
//# sourceMappingURL=HandleError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HandleError.js","sources":["../../../../../../../../packages/templates/clients/websocket/python/components/HandleError.js"],"sourcesContent":["import { Text } from '@asyncapi/generator-react-sdk';\n\nexport function HandleError() {\n return (\n <Text newLines={2} indent={2}>\n {\n `def handle_error(self, error):\n \"\"\"Pass the error to all registered error handlers. Generic log message is printed if no handlers are registered.\"\"\"\n if len(self.error_handlers) == 0:\n print(\"\\\\033[91mError occurred:\\\\033[0m\", error)\n else:\n # Call custom error handlers\n for handler in self.error_handlers:\n handler(error)`\n }\n </Text>\n );\n}\n"],"names":["HandleError","_jsx","Text","newLines","indent","children"],"mappings":";;;;;;;;AAEO,SAASA,WAAWA,GAAG;EAC5B,oBACEC,cAAA,CAACC,sBAAI,EAAA;AAACC,IAAAA,QAAQ,EAAE,CAAE;AAACC,IAAAA,MAAM,EAAE,CAAE;AAAAC,IAAAA,QAAA,EAEzB,CAAA;AACR;AACA;AACA;AACA;AACA;AACA;AACA,sBAAA,CAAA;AAAuB,GAEb,CAAC,CAAA;AAEX;;;;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Text } from '@asyncapi/generator-react-sdk';
|
|
2
|
-
|
|
3
|
-
export function HandleError() {
|
|
4
|
-
return (
|
|
5
|
-
<Text newLines={2} indent={2}>
|
|
6
|
-
{
|
|
7
|
-
`def handle_error(self, error):
|
|
8
|
-
"""Pass the error to all registered error handlers. Generic log message is printed if no handlers are registered."""
|
|
9
|
-
if len(self.error_handlers) == 0:
|
|
10
|
-
print("\\033[91mError occurred:\\033[0m", error)
|
|
11
|
-
else:
|
|
12
|
-
# Call custom error handlers
|
|
13
|
-
for handler in self.error_handlers:
|
|
14
|
-
handler(error)`
|
|
15
|
-
}
|
|
16
|
-
</Text>
|
|
17
|
-
);
|
|
18
|
-
}
|