Skip to content

Commit

Permalink
Merge branch 'master' into ag-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
devilkiller-ag authored Feb 6, 2024
2 parents 62180a4 + edb5071 commit 941789a
Show file tree
Hide file tree
Showing 18 changed files with 1,635 additions and 159 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
111 changes: 111 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
env:
node: true
es6: true
mocha: true
browser: true

plugins:
- sonarjs

extends:
- eslint:recommended
- plugin:sonarjs/recommended

parserOptions:
ecmaVersion: 2018
requireConfigFile: false

rules:
# Ignore Rules
strict: 0
no-underscore-dangle: 0
no-mixed-requires: 0
no-process-exit: 0
no-warning-comments: 0
no-use-before-define: 0
curly: 0
no-multi-spaces: 0
no-alert: 0
consistent-return: 0
consistent-this: [0, self]
func-style: 0
max-nested-callbacks: 0
camelcase: 0
no-dupe-class-members: 0
security/detect-object-injection: 0
sonarjs/no-small-switch: 0
sonarjs/no-nested-template-literals: 0

# Warnings
no-debugger: 1
no-empty: 1
no-invalid-regexp: 1
no-unused-expressions: 1
no-native-reassign: 1
no-fallthrough: 1
sonarjs/cognitive-complexity: 1

# Errors
eqeqeq: 2
no-undef: 2
no-dupe-keys: 2
no-empty-character-class: 2
no-self-compare: 2
valid-typeof: 2
handle-callback-err: 2
no-shadow-restricted-names: 2
no-new-require: 2
no-mixed-spaces-and-tabs: 2
block-scoped-var: 2
no-else-return: 2
no-throw-literal: 2
no-void: 2
radix: 2
wrap-iife: [2, outside]
no-shadow: 0
no-path-concat: 2
valid-jsdoc: [0, {requireReturn: false, requireParamDescription: false, requireReturnDescription: false}]

# stylistic errors
no-spaced-func: 2
semi-spacing: 2
quotes: [2, 'single']
key-spacing: [2, { beforeColon: false, afterColon: true }]
indent: [2, 2]
no-lonely-if: 2
no-floating-decimal: 2
brace-style: [2, 1tbs, { allowSingleLine: true }]
comma-style: [2, last]
no-multiple-empty-lines: [2, {max: 1}]
no-nested-ternary: 2
operator-assignment: [2, always]
padded-blocks: [2, never]
quote-props: [2, as-needed]
keyword-spacing: [2, {'before': true, 'after': true, 'overrides': {}}]
space-before-blocks: [2, always]
array-bracket-spacing: [2, never]
computed-property-spacing: [2, never]
space-in-parens: [2, never]
space-unary-ops: [2, {words: true, nonwords: false}]
wrap-regex: 2
linebreak-style: 0
semi: [2, always]
arrow-spacing: [2, {before: true, after: true}]
no-class-assign: 2
no-const-assign: 2
no-this-before-super: 2
no-var: 2
object-shorthand: [2, always]
prefer-arrow-callback: 2
prefer-const: 2
prefer-spread: 2
prefer-template: 2

overrides:
- files:
- "test/**"
rules:
prefer-arrow-callback: 0
sonarjs/no-duplicate-string: 0
security/detect-object-injection: 0
security/detect-non-literal-fs-filename: 0
14 changes: 7 additions & 7 deletions bindings/solace/0.2.0/operation.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@
}
]
}
},
"bindingVersion": {
"type": "string",
"enum": [
"0.2.0"
],
"description": "The version of this binding. If omitted, \"latest\" MUST be assumed."
}
},
"bindingVersion": {
"type": "string",
"enum": [
"0.2.0"
],
"description": "The version of this binding. If omitted, \"latest\" MUST be assumed."
},
"examples": [
{
"bindingVersion": "0.2.0",
Expand Down
14 changes: 7 additions & 7 deletions bindings/solace/0.3.0/operation.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@
}
]
}
},
"bindingVersion": {
"type": "string",
"enum": [
"0.3.0"
],
"description": "The version of this binding. If omitted, \"latest\" MUST be assumed."
}
},
"bindingVersion": {
"type": "string",
"enum": [
"0.3.0"
],
"description": "The version of this binding. If omitted, \"latest\" MUST be assumed."
},
"examples": [
{
"bindingVersion": "0.3.0",
Expand Down
128 changes: 128 additions & 0 deletions bindings/solace/0.4.0/operation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/solace/0.4.0/operation.json",
"title": "Solace operation bindings object",
"description": "This object contains information about the operation representation in Solace.",
"type": "object",
"additionalProperties": false,
"properties": {
"bindingVersion": {
"type": "string",
"enum": [
"0.4.0"
],
"description": "The version of this binding. If omitted, \"latest\" MUST be assumed."
},
"destinations": {
"description": "The list of Solace destinations referenced in the operation.",
"type": "array",
"items": {
"type": "object",
"properties": {
"deliveryMode": {
"type": "string",
"enum": [
"direct",
"persistent"
]
}
},
"oneOf": [
{
"properties": {
"destinationType": {
"type": "string",
"const": "queue",
"description": "If the type is queue, then the subscriber can bind to the queue. The queue subscribes to the given topicSubscriptions. If no topicSubscriptions are provied, the queue will subscribe to the topic as represented by the channel name."
},
"queue": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the queue"
},
"topicSubscriptions": {
"type": "array",
"description": "The list of topics that the queue subscribes to.",
"items": {
"type": "string"
}
},
"accessType": {
"type": "string",
"enum": [
"exclusive",
"nonexclusive"
]
},
"maxTtl": {
"type": "string",
"description": "The maximum TTL to apply to messages to be spooled."
},
"maxMsgSpoolUsage": {
"type": "string",
"description": "The maximum amount of message spool that the given queue may use"
}
}
}
}
},
{
"properties": {
"destinationType": {
"type": "string",
"const": "topic",
"description": "If the type is topic, then the subscriber subscribes to the given topicSubscriptions. If no topicSubscriptions are provided, the client will subscribe to the topic as represented by the channel name."
},
"topicSubscriptions": {
"type": "array",
"description": "The list of topics that the client subscribes to.",
"items": {
"type": "string"
}
}
}
}
]
}
},
"timeToLive": {
"type": "integer",
"description": "Interval in milliseconds or a Schema Object containing the definition of the lifetime of the message."
},
"priority": {
"type": "integer",
"minimum": 0,
"maximum": 255,
"description": "The valid priority value range is 0-255 with 0 as the lowest priority and 255 as the highest or a Schema Object containing the definition of the priority."
},
"dmqEligible": {
"type": "boolean",
"description": "Set the message to be eligible to be moved to a Dead Message Queue. The default value is false."
}
},
"examples": [
{
"bindingVersion": "0.4.0",
"destinations": [
{
"destinationType": "queue",
"queue": {
"name": "sampleQueue",
"topicSubscriptions": [
"samples/*"
],
"accessType": "nonexclusive"
}
},
{
"destinationType": "topic",
"topicSubscriptions": [
"samples/*"
]
}
]
}
]
}
38 changes: 38 additions & 0 deletions bindings/solace/0.4.0/server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://asyncapi.com/bindings/solace/0.4.0/server.json",
"title": "Solace server bindings object",
"description": "This object contains server connection information about the Solace broker. This object contains additional connectivity information not possible to represent within the core AsyncAPI specification.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x-[\\w\\d\\.\\x2d_]+$": {
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
}
},
"properties": {
"msgVpn": {
"type": "string",
"description": "The name of the Virtual Private Network to connect to on the Solace broker."
},
"clientName": {
"type": "string",
"minLength": 1,
"maxLength": 160,
"description": "A unique client name to use to register to the appliance. If specified, it must be a valid Topic name, and a maximum of 160 bytes in length when encoded as UTF-8."
},
"bindingVersion": {
"type": "string",
"enum": [
"0.4.0"
],
"description": "The version of this binding."
}
},
"examples": [
{
"msgVpn": "ProdVPN",
"bindingVersion": "0.4.0"
}
]
}
17 changes: 15 additions & 2 deletions definitions/3.0.0/operationBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
"solace": {
"properties": {
"bindingVersion": {
"enum": ["0.3.0", "0.2.0"]
"enum": ["0.4.0", "0.3.0", "0.2.0"]
}
},
"allOf": [
Expand All @@ -303,7 +303,20 @@
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/solace/0.3.0/operation.json"
"$ref": "http://asyncapi.com/bindings/solace/0.4.0/operation.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.4.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/solace/0.4.0/operation.json"
}
},
{
Expand Down
17 changes: 15 additions & 2 deletions definitions/3.0.0/serverBindingsObject.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
"solace": {
"properties": {
"bindingVersion": {
"enum": ["0.3.0", "0.2.0"]
"enum": ["0.4.0", "0.3.0", "0.2.0"]
}
},
"allOf": [
Expand All @@ -188,7 +188,20 @@
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/solace/0.3.0/server.json"
"$ref": "http://asyncapi.com/bindings/solace/0.4.0/server.json"
}
},
{
"if": {
"required": [ "bindingVersion" ],
"properties": {
"bindingVersion": {
"const": "0.4.0"
}
}
},
"then": {
"$ref": "http://asyncapi.com/bindings/solace/0.4.0/server.json"
}
},
{
Expand Down
Loading

0 comments on commit 941789a

Please sign in to comment.