@asyncapi/cli 0.8.0 → 0.9.2

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.
Files changed (42) hide show
  1. package/README.md +9 -47
  2. package/assets/examples/anyof.yml +31 -0
  3. package/assets/examples/application-headers.yml +83 -0
  4. package/assets/examples/correlation-id.yml +144 -0
  5. package/assets/examples/default-example.yaml +23 -0
  6. package/assets/examples/examples.json +58 -0
  7. package/assets/examples/gitter-streaming.yml +164 -0
  8. package/assets/examples/mercure.yml +49 -0
  9. package/assets/examples/not.yml +24 -0
  10. package/assets/examples/oneof.yml +46 -0
  11. package/assets/examples/rpc-client.yml +69 -0
  12. package/assets/examples/rpc-server.yml +66 -0
  13. package/assets/examples/simple.yml +23 -0
  14. package/assets/examples/slack-rtm.yml +884 -0
  15. package/assets/examples/streetlights-kafka.yml +163 -0
  16. package/assets/examples/streetlights-mqtt.yml +209 -0
  17. package/assets/examples/websocket-gemini.yml +213 -0
  18. package/lib/base.js +2 -1
  19. package/lib/commands/config/context/add.js +2 -1
  20. package/lib/commands/config/context/current.js +2 -1
  21. package/lib/commands/config/context/list.js +2 -1
  22. package/lib/commands/config/context/remove.js +2 -1
  23. package/lib/commands/config/context/use.js +2 -1
  24. package/lib/commands/config/context.js +2 -1
  25. package/lib/commands/config.js +2 -1
  26. package/lib/commands/new.d.ts +17 -0
  27. package/lib/commands/new.js +126 -0
  28. package/lib/commands/start/studio.d.ts +12 -0
  29. package/lib/commands/start/studio.js +23 -0
  30. package/lib/commands/validate.js +3 -2
  31. package/lib/errors/specification-file.d.ts +1 -1
  32. package/lib/errors/specification-file.js +6 -1
  33. package/lib/models/Context.js +8 -7
  34. package/lib/models/SpecificationFile.js +16 -8
  35. package/lib/models/Studio.d.ts +2 -0
  36. package/lib/models/Studio.js +110 -0
  37. package/oclif.manifest.json +1 -1
  38. package/package.json +16 -12
  39. package/lib/help/command.d.ts +0 -5
  40. package/lib/help/command.js +0 -58
  41. package/lib/help/index.d.ts +0 -8
  42. package/lib/help/index.js +0 -49
@@ -0,0 +1,69 @@
1
+ asyncapi: '2.2.0'
2
+ id: 'urn:rpc:example:client'
3
+ defaultContentType: application/json
4
+
5
+ info:
6
+ title: RPC Client Example
7
+ description: This example demonstrates how to define an RPC client.
8
+ version: '1.0.0'
9
+
10
+ servers:
11
+ production:
12
+ url: rabbitmq.example.org
13
+ protocol: amqp
14
+
15
+ channels:
16
+ '{queue}':
17
+ parameters:
18
+ queue:
19
+ schema:
20
+ type: string
21
+ pattern: '^amq\\.gen\\-.+$'
22
+ bindings:
23
+ amqp:
24
+ is: queue
25
+ queue:
26
+ exclusive: true
27
+ publish:
28
+ operationId: receiveSumResult
29
+ bindings:
30
+ amqp:
31
+ ack: false
32
+ message:
33
+ correlationId:
34
+ location: $message.header#/correlation_id
35
+ payload:
36
+ type: object
37
+ properties:
38
+ result:
39
+ type: number
40
+ examples:
41
+ - 7
42
+
43
+ rpc_queue:
44
+ bindings:
45
+ amqp:
46
+ is: queue
47
+ queue:
48
+ durable: false
49
+ subscribe:
50
+ operationId: requestSum
51
+ bindings:
52
+ amqp:
53
+ ack: true
54
+ message:
55
+ bindings:
56
+ amqp:
57
+ replyTo:
58
+ type: string
59
+ correlationId:
60
+ location: $message.header#/correlation_id
61
+ payload:
62
+ type: object
63
+ properties:
64
+ numbers:
65
+ type: array
66
+ items:
67
+ type: number
68
+ examples:
69
+ - [4,3]
@@ -0,0 +1,66 @@
1
+ asyncapi: '2.2.0'
2
+ id: 'urn:rpc:example:server'
3
+ defaultContentType: application/json
4
+
5
+ info:
6
+ title: RPC Server Example
7
+ description: This example demonstrates how to define an RPC server.
8
+ version: '1.0.0'
9
+
10
+ servers:
11
+ production:
12
+ url: rabbitmq.example.org
13
+ protocol: amqp
14
+
15
+ channels:
16
+ '{queue}':
17
+ parameters:
18
+ queue:
19
+ schema:
20
+ type: string
21
+ pattern: '^amq\\.gen\\-.+$'
22
+ bindings:
23
+ amqp:
24
+ is: queue
25
+ queue:
26
+ exclusive: true
27
+ subscribe:
28
+ operationId: sendSumResult
29
+ bindings:
30
+ amqp:
31
+ ack: true
32
+ message:
33
+ correlationId:
34
+ location: $message.header#/correlation_id
35
+ payload:
36
+ type: object
37
+ properties:
38
+ result:
39
+ type: number
40
+ examples:
41
+ - 7
42
+
43
+ rpc_queue:
44
+ bindings:
45
+ amqp:
46
+ is: queue
47
+ queue:
48
+ durable: false
49
+ publish:
50
+ operationId: sum
51
+ message:
52
+ bindings:
53
+ amqp:
54
+ replyTo:
55
+ type: string
56
+ correlationId:
57
+ location: $message.header#/correlation_id
58
+ payload:
59
+ type: object
60
+ properties:
61
+ numbers:
62
+ type: array
63
+ items:
64
+ type: number
65
+ examples:
66
+ - [4,3]
@@ -0,0 +1,23 @@
1
+ asyncapi: '2.2.0'
2
+ info:
3
+ title: Account Service
4
+ version: 1.0.0
5
+ description: This service is in charge of processing user signups
6
+ channels:
7
+ user/signedup:
8
+ subscribe:
9
+ message:
10
+ $ref: '#/components/messages/UserSignedUp'
11
+ components:
12
+ messages:
13
+ UserSignedUp:
14
+ payload:
15
+ type: object
16
+ properties:
17
+ displayName:
18
+ type: string
19
+ description: Name of the user
20
+ email:
21
+ type: string
22
+ format: email
23
+ description: Email of the user