Skip to content

Commit

Permalink
Add repoSnapshotsServer for npm too
Browse files Browse the repository at this point in the history
  • Loading branch information
Damien Guérin committed Dec 18, 2023
1 parent f0c6a37 commit 00a3470
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
5 changes: 2 additions & 3 deletions src/commands/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -147,7 +146,7 @@ export function publish(config = { config: { specs: [] } }) {
};
}
npmPublish(packageNpm, fs.readFileSync(archive), {
registry: config.repoServer,
registry: server,
forceAuth: { ...auth },
strictSSL: false,
})
Expand Down
2 changes: 1 addition & 1 deletion src/lib/config-definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 00a3470

Please sign in to comment.