diff --git a/github-action/test/unoptimized_optimized.yml b/github-action/test/unoptimized_optimized.yml new file mode 100644 index 00000000000..111004169b0 --- /dev/null +++ b/github-action/test/unoptimized_optimized.yml @@ -0,0 +1,73 @@ +asyncapi: 2.0.0 +info: + title: Streetlights API + version: 1.0.0 +channels: + smartylighting/event/{streetlightId}/lighting/measured: + $ref: >- + #/components/channels/smartylighting/event/{streetlightId}/lighting/measured + parameters: + streetlightId: + schema: + $ref: '#/components/schemas/schema' + smartylighting/action/{streetlightId}/turn/on: + $ref: '#/components/channels/smartylighting/action/{streetlightId}/turn/on' +components: + schemas: + sentAt: + type: string + format: date-time + lumens: + type: integer + minimum: 0 + payload: + type: object + properties: + sentAt: + $ref: '#/components/schemas/sentAt' + messages: + message: + name: turnOnOff + title: Turn on/off + traits: + - headers: + type: object + properties: + my-app-header: + type: integer + minimum: 0 + maximum: 100 + payload: + $ref: '#/components/schemas/payload' + operations: + subscribe: + operationId: receiveLightMeasurement + traits: + - bindings: + kafka: + clientId: my-app-id + message: + $ref: '#/components/messages/message' + publish: + operationId: turnOn + traits: + - bindings: + kafka: + clientId: my-app-id + message: + $ref: '#/components/messages/message' + channels: + smartylighting/event/{streetlightId}/lighting/measured: + parameters: + streetlightId: + schema: + $ref: '#/components/schemas/schema' + subscribe: + $ref: '#/components/operations/subscribe' + smartylighting/action/{streetlightId}/turn/on: + parameters: + streetlightId: + schema: + $ref: '#/components/schemas/schema' + publish: + $ref: '#/components/operations/publish' diff --git a/package-lock.json b/package-lock.json index f8d90c0044c..d8a80ae0e3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3685,6 +3685,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -8957,6 +8958,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", + "dev": true, "license": "MIT" }, "node_modules/are-we-there-yet": { @@ -9959,6 +9961,7 @@ "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, "funding": [ { "type": "github", diff --git a/test/fixtures/badFormatAsyncapi.json b/test/fixtures/badFormatAsyncapi.json index db8b7cae44c..58f5dd3b483 100644 --- a/test/fixtures/badFormatAsyncapi.json +++ b/test/fixtures/badFormatAsyncapi.json @@ -1,38 +1,37 @@ { - "asyncapi": "2.2.0", - "info": { - "title": "Account Service", - "version": "1.0.0", - "description": - "This service is in charge of processing user signups" - }, - "channels": { - "user/signedup": { - "subscribe": { - "message": { - "$ref": "#/components/messages/UserSignedUp" - } + "asyncapi": "2.2.0", + "info": { + "title": "Account Service", + "version": "1.0.0", + "description": "This service is in charge of processing user signups" + }, + "channels": { + "user/signedup": { + "subscribe": { + "message": { + "$ref": "#/components/messages/UserSignedUp" } } - }, - "components": { - "messages": { - "UserSignedUp": { - "payload": { - "type": "object", - "properties": { - "displayName": { - "type": "string", - "description": "Name of the user" - }, - "email": { - "type": "string", - "format": "email", - "description": "Email of the user" - } + } + }, + "components": { + "messages": { + "UserSignedUp": { + "payload": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "Name of the user" + }, + "email": { + "type": "string", + "format": "email", + "description": "Email of the user" } } } } } - } \ No newline at end of file + } +} \ No newline at end of file diff --git a/test/fixtures/newtemplate/__transpiled/index.js b/test/fixtures/newtemplate/__transpiled/index.js index 0e6f6e486c0..785dbde1b29 100644 --- a/test/fixtures/newtemplate/__transpiled/index.js +++ b/test/fixtures/newtemplate/__transpiled/index.js @@ -2,7 +2,7 @@ require('source-map-support/register'); var generatorReactSdk = require('@asyncapi/generator-react-sdk'); -var jsxRuntime = require('C:/Users/Souvik/Documents/Programs/asyncapi/forks/cli/node_modules/@asyncapi/generator-react-sdk/node_modules/react/cjs/react-jsx-runtime.production.min.js'); +var jsxRuntime = require('/media/souvik/HDDA/Programs/asyncapi/cli/node_modules/@asyncapi/generator-react-sdk/node_modules/react/cjs/react-jsx-runtime.production.min.js'); function index ({ asyncapi, diff --git a/test/fixtures/newtemplate/package.json b/test/fixtures/newtemplate/package.json index e5ee5a8aba2..8fe1e5700a5 100644 --- a/test/fixtures/newtemplate/package.json +++ b/test/fixtures/newtemplate/package.json @@ -5,7 +5,7 @@ "generator": { "renderer": "react", "apiVersion": "v3", - "generator": ">=2.0.0 <=2.4.1", + "generator": ">=2.0.0 <=2.5.0", "parameters": { "version": { "description": "Custom version to be used"