Skip to content

Commit

Permalink
feat: migrate @oclif/core from v1 to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Amzani committed Mar 13, 2024
1 parent 08e51d7 commit 5c61063
Show file tree
Hide file tree
Showing 17 changed files with 97 additions and 347 deletions.
251 changes: 20 additions & 231 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@asyncapi/protobuf-schema-parser": "^3.2.4",
"@asyncapi/raml-dt-schema-parser": "^4.0.14",
"@asyncapi/studio": "^0.20.0",
"@oclif/core": "^1.26.2",
"@oclif/core": "^2",
"@oclif/errors": "^1.3.6",
"@oclif/plugin-not-found": "^2.3.22",
"@smoya/multi-parser": "^4.0.0",
Expand Down
7 changes: 3 additions & 4 deletions src/commands/bundle.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Flags } from '@oclif/core';
import { Example } from '@oclif/core/lib/interfaces';
import Command from '../base';
import bundle from '@asyncapi/bundler';
import { promises } from 'fs';
Expand All @@ -12,7 +11,7 @@ export default class Bundle extends Command {
static description = 'bundle one or multiple asyncapi documents and their references together.';
static strict = false;

static examples: Example[] = [
static examples = [
'asyncapi bundle ./asyncapi.yaml > final-asyncapi.yaml',
'asyncapi bundle ./asyncapi.yaml --output final-asyncapi.yaml',
'asyncapi bundle ./asyncapi.yaml ./features.yaml --reference-into-components',
Expand All @@ -30,8 +29,8 @@ export default class Bundle extends Command {
const { argv, flags } = await this.parse(Bundle);
const output = flags.output;
let baseFile;
const outputFormat = path.extname(argv[0]);
const AsyncAPIFiles = await this.loadFiles(argv);
const outputFormat = path.extname(argv[0] as string);
const AsyncAPIFiles = await this.loadFiles(argv as string[]);

const containsAsyncAPI3 = AsyncAPIFiles.filter((file) => {
return file.isAsyncAPI3();
Expand Down
Loading

0 comments on commit 5c61063

Please sign in to comment.