diff --git a/README.md b/README.md index 2c7f76a..0a99b53 100644 --- a/README.md +++ b/README.md @@ -163,8 +163,7 @@ Command Options -g, --groupId string GroupId used in repo server, default is com.openapi for maven repo and @myCompany for npm repo -s, --repoServer string Repository server url to store OpenAPI specification files --repoSnapshotsServer string Repository server url to store OpenAPI snapshots specification files. If specified, - --repoServer will be used to store OpenAPI releases specification files. - For maven repo only + --repoServer will be used to store OpenAPI releases specification files -u, --repoUser string Repository server username. Authentication by using user/password -p, --repoPassword string Repository server password. Authentication by using user/password --repoToken string Repository server token. Authentication by using token. For npm repo only diff --git a/package.json b/package.json index bec0e3f..125d48a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lyra-network/openapi-dev-tool", - "version": "9.8.0", + "version": "9.8.1", "description": "OpenAPI Development tool", "main": "src/lib.js", "scripts": { diff --git a/src/commands/publish.js b/src/commands/publish.js index 374bc71..0598105 100644 --- a/src/commands/publish.js +++ b/src/commands/publish.js @@ -99,8 +99,7 @@ export function publish(config = { config: { specs: [] } }) { if ( config.repoSnapshotsServer && - api.info.version.match(/-snapshot/i) && - config.repoType === 'maven' + api.info.version.match(/-snapshot/i) ) { server = config.repoSnapshotsServer; } @@ -147,7 +146,7 @@ export function publish(config = { config: { specs: [] } }) { }; } npmPublish(packageNpm, fs.readFileSync(archive), { - registry: config.repoServer, + registry: server, forceAuth: { ...auth }, strictSSL: false, }) diff --git a/src/lib/config-definitions.js b/src/lib/config-definitions.js index 064271b..5232c9e 100644 --- a/src/lib/config-definitions.js +++ b/src/lib/config-definitions.js @@ -139,7 +139,7 @@ const publishOptionsDefinitions = [ name: 'repoSnapshotsServer', type: String, description: - 'Repository server url to store OpenAPI snapshots specification files. If specified, --repoServer will be used to store OpenAPI releases specification files. For maven repo only', + 'Repository server url to store OpenAPI snapshots specification files. If specified, --repoServer will be used to store OpenAPI releases specification files', }, { name: 'repoUser',