Skip to content

Commit

Permalink
Added the correct build dependency of the multiparser to the parser b…
Browse files Browse the repository at this point in the history
…uild.
  • Loading branch information
AyushNautiyalDeveloper committed May 27, 2024
1 parent 104de72 commit f762fca
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 283 deletions.
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

8 changes: 4 additions & 4 deletions apps/multi-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@smoya/multi-parser",
"name": "@asyncapi/multi-parser",
"version": "2.0.0",
"description": "This tool allows to parse AsyncAPI documents and produce a desired interface based on a given Parser-API version",
"bugs": {
Expand Down Expand Up @@ -43,8 +43,7 @@
"@asyncapi/protobuf-schema-parser": "^3.0.0",
"@asyncapi/raml-dt-schema-parser": "^4.0.4",
"parserapiv1": "npm:@asyncapi/parser@^2.1.0",
"parserapiv2": "npm:@asyncapi/[email protected]",
"parserapiv3": "npm:@asyncapi/parser@^3.0.14"
"parserapiv2": "npm:@asyncapi/[email protected]"
},
"devDependencies": {
"@jest/types": "^29.0.2",
Expand All @@ -62,6 +61,7 @@
"markdown-toc": "^1.2.0",
"ts-loader": "^9.3.1",
"ts-node": "^10.9.1",
"typescript": "^4.8.2"
"typescript": "^4.8.2",
"parser":"*"
}
}
6 changes: 3 additions & 3 deletions apps/multi-parser/src/convert.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { createAsyncAPIDocument as createAsyncAPIDocumentParserV1 } from 'parserapiv1';
import { createAsyncAPIDocument as createAsyncAPIDocumentParserV2 } from 'parserapiv2';
import { createAsyncAPIDocument as createAsyncAPIDocumentParserV3 } from 'parserapiv3';
import { createAsyncAPIDocument as createAsyncAPIDocumentParserV3 } from '@asyncapi/parser';

import type { AsyncAPIDocumentInterface as AsyncAPIDocumentInterfaceParserV1 } from 'parserapiv1';
import type { AsyncAPIDocumentInterface as AsyncAPIDocumentInterfaceParserV2 } from 'parserapiv2';
import type { AsyncAPIDocumentInterface as AsyncAPIDocumentInterfaceParserV3 } from 'parserapiv3';
import type { AsyncAPIDocumentInterface as AsyncAPIDocumentInterfaceParserV3 } from '@asyncapi/parser';

import type { DetailedAsyncAPI as DetailedAsyncAPIParserV1 } from 'parserapiv1/esm/types';
import type { DetailedAsyncAPI as DetailedAsyncAPIParserV2 } from 'parserapiv2/esm/types';
import type { DetailedAsyncAPI as DetailedAsyncAPIParserV3 } from 'parserapiv3/esm/types';
import type { DetailedAsyncAPI as DetailedAsyncAPIParserV3 } from '@asyncapi/parser/esm/types';

export type AsyncAPIDocument = AsyncAPIDocumentInterfaceParserV1 | AsyncAPIDocumentInterfaceParserV2 | AsyncAPIDocumentInterfaceParserV3;

Expand Down
4 changes: 2 additions & 2 deletions apps/multi-parser/src/parse.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Parser as ParserV1 } from 'parserapiv1';
import { Parser as ParserV2 } from 'parserapiv2';
import { Parser as ParserV3 } from 'parserapiv3';
import { Parser as ParserV3 } from '@asyncapi/parser';

import { AvroSchemaParser } from '@asyncapi/avro-schema-parser';
import { OpenAPISchemaParser } from '@asyncapi/openapi-schema-parser';
Expand All @@ -9,7 +9,7 @@ import { ProtoBuffSchemaParser } from '@asyncapi/protobuf-schema-parser';

import type { ParserOptions as ParserOptionsParserV1 } from 'parserapiv1/esm/parser';
import type { ParserOptions as ParserOptionsParserV2 } from 'parserapiv2/esm/parser';
import type { ParserOptions as ParserOptionsParserV3 } from 'parserapiv3/esm/parser';
import type { ParserOptions as ParserOptionsParserV3 } from '@asyncapi/parser/esm/parser';

export type ParserOptions = ParserOptionsParserV1 | ParserOptionsParserV2 | ParserOptionsParserV3;
export type Options = {
Expand Down
2 changes: 1 addition & 1 deletion apps/multi-parser/test/convert.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import { Parser as ParserV1 } from 'parserapiv1';
import { Parser as ParserV2 } from 'parserapiv2';
import { Parser as ParserV3 } from 'parserapiv3';
import { Parser as ParserV3 } from '@asyncapi/parser';

import { AsyncAPIDocument, ConvertDocumentParserAPIVersion } from '../src/convert';

Expand Down
2 changes: 1 addition & 1 deletion apps/multi-parser/test/parse.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

import { Parser as ParserV1 } from 'parserapiv1';
import { Parser as ParserV2 } from 'parserapiv2';
import { Parser as ParserV3 } from 'parserapiv3';
import { Parser as ParserV3 } from '@asyncapi/parser';

import { AvroSchemaParser } from '@asyncapi/avro-schema-parser';
import { OpenAPISchemaParser } from '@asyncapi/openapi-schema-parser';
Expand Down
Loading

0 comments on commit f762fca

Please sign in to comment.