swaggerhub-cli 0.14.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +152 -41
- package/bin/run +5 -4
- package/oclif.manifest.json +841 -670
- package/package.json +21 -16
- package/skills/swaggerhub-cli/SKILL.md +43 -0
- package/src/check-node-version.js +3 -2
- package/src/commands/api/clone.js +8 -7
- package/src/commands/api/comment/list.js +91 -0
- package/src/commands/api/create.js +8 -8
- package/src/commands/api/delete.js +6 -6
- package/src/commands/api/fork.js +75 -0
- package/src/commands/api/get.js +7 -7
- package/src/commands/api/publish.js +6 -6
- package/src/commands/api/rename.js +8 -10
- package/src/commands/api/setdefault.js +5 -5
- package/src/commands/api/unpublish.js +5 -5
- package/src/commands/api/update.js +8 -8
- package/src/commands/api/validate/download-rules.js +6 -6
- package/src/commands/api/validate/index.js +8 -8
- package/src/commands/api/validate/local.js +8 -8
- package/src/commands/configure.js +6 -6
- package/src/commands/domain/clone.js +8 -7
- package/src/commands/domain/create.js +8 -8
- package/src/commands/domain/delete.js +6 -6
- package/src/commands/domain/fork.js +75 -0
- package/src/commands/domain/get.js +7 -7
- package/src/commands/domain/publish.js +5 -5
- package/src/commands/domain/rename.js +9 -8
- package/src/commands/domain/setdefault.js +5 -5
- package/src/commands/domain/unpublish.js +5 -5
- package/src/commands/domain/update.js +8 -8
- package/src/commands/integration/create.js +5 -5
- package/src/commands/integration/delete.js +5 -5
- package/src/commands/integration/execute.js +5 -5
- package/src/commands/integration/get.js +7 -7
- package/src/commands/integration/list.js +6 -6
- package/src/commands/integration/update.js +5 -5
- package/src/commands/project/api/add.js +5 -7
- package/src/commands/project/api/remove.js +7 -10
- package/src/commands/project/create.js +5 -9
- package/src/commands/project/delete.js +5 -5
- package/src/commands/project/domain/add.js +5 -7
- package/src/commands/project/domain/remove.js +7 -10
- package/src/commands/project/get.js +7 -7
- package/src/commands/project/list.js +5 -5
- package/src/commands/project/member/list.js +6 -6
- package/src/commands/spectral/download.js +8 -8
- package/src/commands/spectral/upload.js +10 -10
- package/src/config/index.js +27 -5
- package/src/format-readme.js +3 -2
- package/src/help.js +2 -2
- package/src/hooks/setup-config.js +11 -6
- package/src/index.js +2 -2
- package/src/requests/api.js +3 -3
- package/src/requests/domain.js +3 -3
- package/src/requests/project.js +2 -2
- package/src/requests/spec.js +5 -5
- package/src/requests/spectral.js +3 -3
- package/src/requests/standardization.js +4 -4
- package/src/support/command/base-command.js +10 -11
- package/src/support/command/base-validate-command.js +3 -3
- package/src/support/command/handle-response.js +7 -5
- package/src/support/command/parse-input.js +8 -6
- package/src/support/command/update-command.js +5 -5
- package/src/support/http/default-headers.js +1 -1
- package/src/support/http/header-templates.js +2 -2
- package/src/support/http/index.js +7 -7
- package/src/support/http/proxy-agent.js +4 -4
- package/src/support/inquirer/index.js +4 -4
- package/src/support/inquirer/prompt-templates.js +2 -2
- package/src/support/isOnPrem.js +4 -4
- package/src/template-strings/errors.js +2 -2
- package/src/template-strings/index.js +3 -3
- package/src/template-strings/info.js +6 -2
- package/src/utils/definitions.js +8 -6
- package/src/utils/general.js +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { readFileSync } from 'node:fs'
|
|
3
|
+
import { getDomain, postDomain } from '../../requests/domain.js'
|
|
4
|
+
import { getDomainIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
5
|
+
import { getVersion, parseDefinition } from '../../utils/definitions.js'
|
|
6
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
7
|
+
import UpdateCommand from '../../support/command/update-command.js'
|
|
8
8
|
|
|
9
9
|
const isDomainNameAvailable = response => response.status === 404
|
|
10
10
|
|
|
@@ -135,4 +135,4 @@ CreateDomainCommand.flags = {
|
|
|
135
135
|
...BaseCommand.flags
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
export default CreateDomainCommand
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { deleteDomain } from '../../requests/domain.js'
|
|
3
|
+
import { getDomainIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
4
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
5
|
+
import inquirer from 'inquirer'
|
|
6
6
|
|
|
7
7
|
class DeleteDomainCommand extends BaseCommand {
|
|
8
8
|
|
|
@@ -61,4 +61,4 @@ DeleteDomainCommand.flags = {
|
|
|
61
61
|
...BaseCommand.flags
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
export default DeleteDomainCommand
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
2
|
+
import { Args, Flags, Errors } from '@oclif/core'
|
|
3
|
+
import { getDomainIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
4
|
+
import { errorMsg } from '../../template-strings/index.js'
|
|
5
|
+
import { postDomain } from '../../requests/domain.js'
|
|
6
|
+
|
|
7
|
+
const { CLIError } = Errors
|
|
8
|
+
|
|
9
|
+
const targetRegex = new RegExp(/^[\w\-.]+\/[\w\-.]+\/[\w\-.]+$/)
|
|
10
|
+
|
|
11
|
+
const getTarget = args => {
|
|
12
|
+
const target = args['NEW_OWNER/NEW_DOMAIN_NAME/NEW_VERSION']
|
|
13
|
+
if (!targetRegex.test(target)) {
|
|
14
|
+
throw new CLIError(errorMsg.argsMustMatchFormat({ format: 'NEW_OWNER/NEW_DOMAIN_NAME/NEW_VERSION' }))
|
|
15
|
+
}
|
|
16
|
+
const [owner, name, version] = splitPathParams(target)
|
|
17
|
+
return { owner, name, version }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
class ForkDomainCommand extends BaseCommand {
|
|
21
|
+
|
|
22
|
+
async run() {
|
|
23
|
+
const { args, flags } = await this.parse(ForkDomainCommand)
|
|
24
|
+
|
|
25
|
+
const domainPath = getDomainIdentifierArg(args)
|
|
26
|
+
const body = getTarget(args)
|
|
27
|
+
const forkPath = `${body.owner}/${body.name}/${body.version}`
|
|
28
|
+
if (flags.project) body.project = flags.project
|
|
29
|
+
if (flags.visibility) body.private = flags.visibility === 'private'
|
|
30
|
+
|
|
31
|
+
this.log(`Forking domain: '${domainPath}' as '${forkPath}'`)
|
|
32
|
+
|
|
33
|
+
await this.executeHttp({
|
|
34
|
+
execute: () => postDomain({
|
|
35
|
+
pathParams: [domainPath, 'fork'],
|
|
36
|
+
body: JSON.stringify(body)
|
|
37
|
+
}),
|
|
38
|
+
onResolve: this.logCommandSuccess({ domainPath, forkPath }),
|
|
39
|
+
options: {}
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
ForkDomainCommand.description = `fork a domain version
|
|
45
|
+
The fork can be created as a new domain, or as a new version of another existing domain.
|
|
46
|
+
`
|
|
47
|
+
|
|
48
|
+
ForkDomainCommand.examples = [
|
|
49
|
+
'swaggerhub domain:fork organization/domain/1.0.0 myorg/domain-fork/1.0.0',
|
|
50
|
+
'swaggerhub domain:fork organization/domain/1.0.0 myorg/domain-fork/1.0.0 --project my-project --visibility private'
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
ForkDomainCommand.args = {
|
|
54
|
+
'OWNER/DOMAIN_NAME/VERSION': Args.string({
|
|
55
|
+
required: true,
|
|
56
|
+
description: 'Domain version to fork'
|
|
57
|
+
}),
|
|
58
|
+
'NEW_OWNER/NEW_DOMAIN_NAME/NEW_VERSION': Args.string({
|
|
59
|
+
required: true,
|
|
60
|
+
description: 'Owner, name and version of the fork. An existing domain name creates a new version of it.'
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
ForkDomainCommand.flags = {
|
|
65
|
+
project: Flags.string({
|
|
66
|
+
description: 'existing project of the target organization to add the fork to'
|
|
67
|
+
}),
|
|
68
|
+
visibility: Flags.string({
|
|
69
|
+
description: 'visibility of the fork (defaults to the visibility of the source version)',
|
|
70
|
+
options: ['public', 'private']
|
|
71
|
+
}),
|
|
72
|
+
...BaseCommand.flags
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export default ForkDomainCommand
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { getDomainIdentifierArg, reqType, resolvedParam, splitPathParams } from '../../support/command/parse-input.js'
|
|
3
|
+
import { hasJsonStructure, prettyPrintJSON } from '../../utils/general.js'
|
|
4
|
+
import { getDomain } from '../../requests/domain.js'
|
|
5
|
+
import { getResponseContent } from '../../support/command/handle-response.js'
|
|
6
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
7
7
|
|
|
8
8
|
class GetDomainCommand extends BaseCommand {
|
|
9
9
|
constructor(...props) {
|
|
@@ -66,4 +66,4 @@ GetDomainCommand.flags = {
|
|
|
66
66
|
...BaseCommand.flags
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
export default GetDomainCommand
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { getDomainIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
3
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
4
|
+
import UpdateCommand from '../../support/command/update-command.js'
|
|
5
5
|
|
|
6
6
|
class PublishCommand extends UpdateCommand {
|
|
7
7
|
|
|
@@ -36,4 +36,4 @@ PublishCommand.flags = {
|
|
|
36
36
|
...BaseCommand.flags
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
export default PublishCommand
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
2
|
+
import { Args, Flags, Errors } from '@oclif/core'
|
|
3
|
+
import {
|
|
4
4
|
noVersionRegex,
|
|
5
5
|
apiNameRegex
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
} from '../../support/command/parse-input.js'
|
|
7
|
+
import { errorMsg } from '../../template-strings/index.js'
|
|
8
|
+
import { postDomain } from '../../requests/domain.js'
|
|
9
|
+
|
|
10
|
+
const { CLIError } = Errors
|
|
10
11
|
|
|
11
12
|
const getDomainToRename = args => {
|
|
12
13
|
const domainPath = args['OWNER/DOMAIN_NAME']
|
|
@@ -74,4 +75,4 @@ RenameDomainCommand.flags = {
|
|
|
74
75
|
...BaseCommand.flags
|
|
75
76
|
}
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
export default RenameDomainCommand
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { getDomainIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
3
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
4
|
+
import UpdateCommand from '../../support/command/update-command.js'
|
|
5
5
|
|
|
6
6
|
class SetDefaultDomainCommand extends UpdateCommand {
|
|
7
7
|
|
|
@@ -29,4 +29,4 @@ SetDefaultDomainCommand.args = {
|
|
|
29
29
|
|
|
30
30
|
SetDefaultDomainCommand.flags = BaseCommand.flags
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
export default SetDefaultDomainCommand
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { getDomainIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
3
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
4
|
+
import UpdateCommand from '../../support/command/update-command.js'
|
|
5
5
|
|
|
6
6
|
class UnpublishCommand extends UpdateCommand {
|
|
7
7
|
|
|
@@ -29,4 +29,4 @@ UnpublishCommand.args = {
|
|
|
29
29
|
|
|
30
30
|
UnpublishCommand.flags = BaseCommand.flags
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
export default UnpublishCommand
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { readFileSync } from 'node:fs'
|
|
3
|
+
import { getDomain, postDomain } from '../../requests/domain.js'
|
|
4
|
+
import { getDomainIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
5
|
+
import { getVersion, parseDefinition } from '../../utils/definitions.js'
|
|
6
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
7
|
+
import UpdateCommand from '../../support/command/update-command.js'
|
|
8
8
|
|
|
9
9
|
class UpdateDomainCommand extends UpdateCommand {
|
|
10
10
|
|
|
@@ -107,4 +107,4 @@ UpdateDomainCommand.flags = {
|
|
|
107
107
|
...BaseCommand.flags
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
export default UpdateDomainCommand
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { postApi } from '../../requests/api.js'
|
|
3
|
+
import { getApiIdentifierArg, readConfigFile } from '../../support/command/parse-input.js'
|
|
4
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
5
5
|
|
|
6
6
|
class CreateIntegrationCommand extends BaseCommand {
|
|
7
7
|
|
|
@@ -53,4 +53,4 @@ CreateIntegrationCommand.flags = {
|
|
|
53
53
|
...BaseCommand.flags
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
export default CreateIntegrationCommand
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { deleteApi } from '../../requests/api.js'
|
|
3
|
+
import { getIntegrationIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
4
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
5
5
|
|
|
6
6
|
class DeleteIntegrationCommand extends BaseCommand {
|
|
7
7
|
|
|
@@ -39,4 +39,4 @@ DeleteIntegrationCommand.flags = {
|
|
|
39
39
|
...BaseCommand.flags
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
export default DeleteIntegrationCommand
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { postApi } from '../../requests/api.js'
|
|
3
|
+
import { getIntegrationIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
4
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
5
5
|
|
|
6
6
|
class ExecuteIntegrationCommand extends BaseCommand {
|
|
7
7
|
|
|
@@ -39,4 +39,4 @@ ExecuteIntegrationCommand.flags = {
|
|
|
39
39
|
...BaseCommand.flags
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
export default ExecuteIntegrationCommand
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { getApi } from '../../requests/api.js'
|
|
3
|
+
import { getIntegrationIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
4
|
+
import { getResponseContent } from '../../support/command/handle-response.js'
|
|
5
|
+
import { prettyPrintJSON } from '../../utils/general.js'
|
|
6
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
7
7
|
|
|
8
8
|
class GetIntegrationCommand extends BaseCommand {
|
|
9
9
|
constructor(...props) {
|
|
@@ -50,4 +50,4 @@ GetIntegrationCommand.flags = {
|
|
|
50
50
|
...BaseCommand.flags
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
export default GetIntegrationCommand
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { ux, Args } from '@oclif/core'
|
|
2
|
+
import { getApi } from '../../requests/api.js'
|
|
3
|
+
import { getResponseContent } from '../../support/command/handle-response.js'
|
|
4
|
+
import { getApiIdentifierArg } from '../../support/command/parse-input.js'
|
|
5
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
6
6
|
|
|
7
7
|
class ListIntegrationCommand extends BaseCommand {
|
|
8
8
|
constructor(...props) {
|
|
@@ -60,4 +60,4 @@ ListIntegrationCommand.flags = {
|
|
|
60
60
|
...BaseCommand.flags
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
export default ListIntegrationCommand
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { putApi } from '../../requests/api.js'
|
|
3
|
+
import { getIntegrationIdentifierArg, readConfigFile, splitPathParams } from '../../support/command/parse-input.js'
|
|
4
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
5
5
|
|
|
6
6
|
class UpdateIntegrationCommand extends BaseCommand {
|
|
7
7
|
|
|
@@ -49,4 +49,4 @@ UpdateIntegrationCommand.flags = {
|
|
|
49
49
|
...BaseCommand.flags
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
export default UpdateIntegrationCommand
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} = require('../../../support/command/parse-input')
|
|
6
|
-
const BaseCommand = require('../../../support/command/base-command')
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { putProject } from '../../../requests/project.js'
|
|
3
|
+
import { getProjectIdentifierArg } from '../../../support/command/parse-input.js'
|
|
4
|
+
import BaseCommand from '../../../support/command/base-command.js'
|
|
7
5
|
|
|
8
6
|
class ProjectApiAddCommand extends BaseCommand {
|
|
9
7
|
|
|
@@ -43,4 +41,4 @@ ProjectApiAddCommand.args = {
|
|
|
43
41
|
})
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
export default ProjectApiAddCommand
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
const BaseCommand = require('../../../support/command/base-command')
|
|
8
|
-
const { getResponseContent } = require('../../../support/command/handle-response')
|
|
9
|
-
const { pipeAsync } = require('../../../utils/general')
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { putProject, getProject } from '../../../requests/project.js'
|
|
3
|
+
import { getProjectIdentifierArg, splitPathParams } from '../../../support/command/parse-input.js'
|
|
4
|
+
import BaseCommand from '../../../support/command/base-command.js'
|
|
5
|
+
import { getResponseContent } from '../../../support/command/handle-response.js'
|
|
6
|
+
import { pipeAsync } from '../../../utils/general.js'
|
|
10
7
|
|
|
11
8
|
class ProjectApiRemoveCommand extends BaseCommand {
|
|
12
9
|
|
|
@@ -65,4 +62,4 @@ ProjectApiRemoveCommand.args = {
|
|
|
65
62
|
})
|
|
66
63
|
}
|
|
67
64
|
|
|
68
|
-
|
|
65
|
+
export default ProjectApiRemoveCommand
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
splitPathParams,
|
|
6
|
-
splitFlagParams
|
|
7
|
-
} = require('../../support/command/parse-input')
|
|
8
|
-
const BaseCommand = require('../../support/command/base-command')
|
|
1
|
+
import { Flags, Args } from '@oclif/core'
|
|
2
|
+
import { postProject } from '../../requests/project.js'
|
|
3
|
+
import { getProjectIdentifierArg, splitPathParams, splitFlagParams } from '../../support/command/parse-input.js'
|
|
4
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
9
5
|
|
|
10
6
|
class CreateProjectCommand extends BaseCommand {
|
|
11
7
|
|
|
@@ -75,4 +71,4 @@ CreateProjectCommand.flags = {
|
|
|
75
71
|
...BaseCommand.flags
|
|
76
72
|
}
|
|
77
73
|
|
|
78
|
-
|
|
74
|
+
export default CreateProjectCommand
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { deleteProject } from '../../requests/project.js'
|
|
3
|
+
import { getProjectIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
4
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
5
5
|
|
|
6
6
|
class DeleteProjectCommand extends BaseCommand {
|
|
7
7
|
constructor(...props) {
|
|
@@ -43,4 +43,4 @@ DeleteProjectCommand.flags = {
|
|
|
43
43
|
...BaseCommand.flags
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
export default DeleteProjectCommand
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} = require('../../../support/command/parse-input')
|
|
6
|
-
const BaseCommand = require('../../../support/command/base-command')
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { putProject } from '../../../requests/project.js'
|
|
3
|
+
import { getProjectIdentifierArg } from '../../../support/command/parse-input.js'
|
|
4
|
+
import BaseCommand from '../../../support/command/base-command.js'
|
|
7
5
|
|
|
8
6
|
class ProjectDomainAddCommand extends BaseCommand {
|
|
9
7
|
|
|
@@ -43,4 +41,4 @@ ProjectDomainAddCommand.args = {
|
|
|
43
41
|
})
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
export default ProjectDomainAddCommand
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
const BaseCommand = require('../../../support/command/base-command')
|
|
8
|
-
const { getResponseContent } = require('../../../support/command/handle-response')
|
|
9
|
-
const { pipeAsync } = require('../../../utils/general')
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { putProject, getProject } from '../../../requests/project.js'
|
|
3
|
+
import { getProjectIdentifierArg, splitPathParams } from '../../../support/command/parse-input.js'
|
|
4
|
+
import BaseCommand from '../../../support/command/base-command.js'
|
|
5
|
+
import { getResponseContent } from '../../../support/command/handle-response.js'
|
|
6
|
+
import { pipeAsync } from '../../../utils/general.js'
|
|
10
7
|
|
|
11
8
|
class ProjectDomainRemoveCommand extends BaseCommand {
|
|
12
9
|
|
|
@@ -65,4 +62,4 @@ ProjectDomainRemoveCommand.args = {
|
|
|
65
62
|
})
|
|
66
63
|
}
|
|
67
64
|
|
|
68
|
-
|
|
65
|
+
export default ProjectDomainRemoveCommand
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { Args } from '@oclif/core'
|
|
2
|
+
import { getProject } from '../../requests/project.js'
|
|
3
|
+
import { getProjectIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
4
|
+
import { getResponseContent } from '../../support/command/handle-response.js'
|
|
5
|
+
import { prettyPrintJSON } from '../../utils/general.js'
|
|
6
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
7
7
|
|
|
8
8
|
class GetProjectCommand extends BaseCommand {
|
|
9
9
|
constructor(...props) {
|
|
@@ -50,4 +50,4 @@ GetProjectCommand.flags = {
|
|
|
50
50
|
...BaseCommand.flags
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
export default GetProjectCommand
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ux, Args, Flags } from '@oclif/core'
|
|
2
|
+
import { getProject } from '../../requests/project.js'
|
|
3
|
+
import { getResponseContent } from '../../support/command/handle-response.js'
|
|
4
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
5
5
|
|
|
6
6
|
class ListProjectCommand extends BaseCommand {
|
|
7
7
|
constructor(...props) {
|
|
@@ -79,4 +79,4 @@ ListProjectCommand.flags = {
|
|
|
79
79
|
})
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
export default ListProjectCommand
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { ux, Args } from '@oclif/core'
|
|
2
|
+
import { getProject } from '../../../requests/project.js'
|
|
3
|
+
import { getResponseContent } from '../../../support/command/handle-response.js'
|
|
4
|
+
import BaseCommand from '../../../support/command/base-command.js'
|
|
5
|
+
import { getProjectIdentifierArg } from '../../../support/command/parse-input.js'
|
|
6
6
|
|
|
7
7
|
class ListProjectMembersCommand extends BaseCommand {
|
|
8
8
|
constructor(...props) {
|
|
@@ -58,4 +58,4 @@ ListProjectMembersCommand.flags = {
|
|
|
58
58
|
...BaseCommand.flags
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
export default ListProjectMembersCommand
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Args, Errors } from '@oclif/core'
|
|
2
|
+
import { getSpectralRuleset } from '../../requests/spectral.js'
|
|
3
|
+
import { getSpectralIdentifierArg, splitPathParams } from '../../support/command/parse-input.js'
|
|
4
|
+
import { errorMsg } from '../../template-strings/index.js'
|
|
5
|
+
import BaseCommand from '../../support/command/base-command.js'
|
|
6
|
+
import unzipper from 'unzipper'
|
|
7
|
+
import fs from 'fs'
|
|
8
8
|
|
|
9
9
|
class DownloadSpectralRulesetCommand extends BaseCommand {
|
|
10
10
|
async run() {
|
|
@@ -66,4 +66,4 @@ DownloadSpectralRulesetCommand.flags = {
|
|
|
66
66
|
...BaseCommand.flags
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
export default DownloadSpectralRulesetCommand
|