Comparing version 10.1.0-next.2 to 10.1.0-next.3
@@ -87,3 +87,3 @@ import fs from 'node:fs'; | ||
const { spec } = this.args; | ||
const { preparedSpec, specFileType, specPath, specVersion } = await prepareOas(spec, 'openapi'); | ||
const { preparedSpec, specFileType, specPath, specVersion } = await prepareOas(spec, 'openapi upload'); | ||
const version = this.flags.useSpecVersion ? specVersion : this.flags.version; | ||
@@ -90,0 +90,0 @@ let filename = specFileType === 'url' ? nodePath.basename(specPath) : slugify.default(specPath); |
@@ -39,10 +39,3 @@ import chalk from 'chalk'; | ||
const fileFindingSpinner = ora({ text: 'Looking for API definitions...', ...oraOptions() }).start(); | ||
let action; | ||
switch (command) { | ||
case 'openapi': | ||
action = 'upload'; | ||
break; | ||
default: | ||
action = command.split(' ')[1]; | ||
} | ||
const action = command.replace('openapi ', ''); | ||
const jsonAndYamlFiles = readdirRecursive('.', true).filter(file => file.toLowerCase().endsWith('.json') || | ||
@@ -149,3 +142,4 @@ file.toLowerCase().endsWith('.yaml') || | ||
debug(`version in spec: ${specVersion}`); | ||
if (['openapi', 'openapi inspect', 'openapi reduce'].includes(command)) { | ||
const commandsThatBundle = ['openapi inspect', 'openapi reduce', 'openapi upload']; | ||
if (commandsThatBundle.includes(command)) { | ||
api = await oas.bundle(); | ||
@@ -152,0 +146,0 @@ debug('spec bundled'); |
{ | ||
"name": "rdme", | ||
"version": "10.1.0-next.2", | ||
"version": "10.1.0-next.3", | ||
"description": "ReadMe's official CLI and GitHub Action.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -430,3 +430,3 @@ { | ||
}, | ||
"version": "10.1.0-next.2" | ||
"version": "10.1.0-next.3" | ||
} |
{ | ||
"name": "rdme", | ||
"version": "10.1.0-next.2", | ||
"version": "10.1.0-next.3", | ||
"description": "ReadMe's official CLI and GitHub Action.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
159186
3121