swaggerhub-cli 0.14.0 → 0.15.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.
Files changed (72) hide show
  1. package/README.md +41 -41
  2. package/bin/run +5 -4
  3. package/oclif.manifest.json +40 -40
  4. package/package.json +13 -11
  5. package/src/check-node-version.js +3 -2
  6. package/src/commands/api/clone.js +8 -7
  7. package/src/commands/api/create.js +8 -8
  8. package/src/commands/api/delete.js +6 -6
  9. package/src/commands/api/get.js +7 -7
  10. package/src/commands/api/publish.js +6 -6
  11. package/src/commands/api/rename.js +8 -10
  12. package/src/commands/api/setdefault.js +5 -5
  13. package/src/commands/api/unpublish.js +5 -5
  14. package/src/commands/api/update.js +8 -8
  15. package/src/commands/api/validate/download-rules.js +6 -6
  16. package/src/commands/api/validate/index.js +8 -8
  17. package/src/commands/api/validate/local.js +8 -8
  18. package/src/commands/configure.js +6 -6
  19. package/src/commands/domain/clone.js +8 -7
  20. package/src/commands/domain/create.js +8 -8
  21. package/src/commands/domain/delete.js +6 -6
  22. package/src/commands/domain/get.js +7 -7
  23. package/src/commands/domain/publish.js +5 -5
  24. package/src/commands/domain/rename.js +9 -8
  25. package/src/commands/domain/setdefault.js +5 -5
  26. package/src/commands/domain/unpublish.js +5 -5
  27. package/src/commands/domain/update.js +8 -8
  28. package/src/commands/integration/create.js +5 -5
  29. package/src/commands/integration/delete.js +5 -5
  30. package/src/commands/integration/execute.js +5 -5
  31. package/src/commands/integration/get.js +7 -7
  32. package/src/commands/integration/list.js +6 -6
  33. package/src/commands/integration/update.js +5 -5
  34. package/src/commands/project/api/add.js +5 -7
  35. package/src/commands/project/api/remove.js +7 -10
  36. package/src/commands/project/create.js +5 -9
  37. package/src/commands/project/delete.js +5 -5
  38. package/src/commands/project/domain/add.js +5 -7
  39. package/src/commands/project/domain/remove.js +7 -10
  40. package/src/commands/project/get.js +7 -7
  41. package/src/commands/project/list.js +5 -5
  42. package/src/commands/project/member/list.js +6 -6
  43. package/src/commands/spectral/download.js +8 -8
  44. package/src/commands/spectral/upload.js +10 -10
  45. package/src/config/index.js +18 -4
  46. package/src/format-readme.js +3 -2
  47. package/src/help.js +2 -2
  48. package/src/hooks/setup-config.js +9 -5
  49. package/src/index.js +2 -2
  50. package/src/requests/api.js +3 -3
  51. package/src/requests/domain.js +3 -3
  52. package/src/requests/project.js +2 -2
  53. package/src/requests/spec.js +5 -5
  54. package/src/requests/spectral.js +3 -3
  55. package/src/requests/standardization.js +4 -4
  56. package/src/support/command/base-command.js +10 -11
  57. package/src/support/command/base-validate-command.js +3 -3
  58. package/src/support/command/handle-response.js +7 -5
  59. package/src/support/command/parse-input.js +8 -6
  60. package/src/support/command/update-command.js +5 -5
  61. package/src/support/http/default-headers.js +1 -1
  62. package/src/support/http/header-templates.js +2 -2
  63. package/src/support/http/index.js +7 -7
  64. package/src/support/http/proxy-agent.js +4 -4
  65. package/src/support/inquirer/index.js +4 -4
  66. package/src/support/inquirer/prompt-templates.js +2 -2
  67. package/src/support/isOnPrem.js +4 -4
  68. package/src/template-strings/errors.js +2 -2
  69. package/src/template-strings/index.js +3 -3
  70. package/src/template-strings/info.js +2 -2
  71. package/src/utils/definitions.js +8 -6
  72. package/src/utils/general.js +3 -3
@@ -1,10 +1,10 @@
1
- const { Args } = require('@oclif/core')
2
- const BaseValidateCommand = require('../../../support/command/base-validate-command')
3
- const { getApiIdentifierArg } = require('../../../support/command/parse-input')
4
- const { getApi } = require('../../../requests/api')
5
- const { pipeAsync } = require('../../../utils/general')
6
- const { getResponseContent } = require('../../../support/command/handle-response')
7
- const { isOnPrem } = require('../../../support/isOnPrem')
1
+ import { Args } from '@oclif/core'
2
+ import BaseValidateCommand from '../../../support/command/base-validate-command.js'
3
+ import { getApiIdentifierArg } from '../../../support/command/parse-input.js'
4
+ import { getApi } from '../../../requests/api.js'
5
+ import { pipeAsync } from '../../../utils/general.js'
6
+ import { getResponseContent } from '../../../support/command/handle-response.js'
7
+ import { isOnPrem } from '../../../support/isOnPrem.js'
8
8
 
9
9
  class ValidateCommand extends BaseValidateCommand {
10
10
  async run() {
@@ -72,4 +72,4 @@ ValidateCommand.args = {
72
72
  ValidateCommand.flags = {
73
73
  ...BaseValidateCommand.flags
74
74
  }
75
- module.exports = ValidateCommand
75
+ export default ValidateCommand
@@ -1,10 +1,10 @@
1
- const { Flags } = require('@oclif/core')
2
- const BaseValidateCommand = require('../../../support/command/base-validate-command')
3
- const { pipeAsync } = require('../../../utils/general')
4
- const { getResponseContent } = require('../../../support/command/handle-response')
5
- const { postStandardization } = require('../../../requests/standardization')
6
- const { parseDefinition, getSpecification, getVersion } = require('../../../utils/definitions')
7
- const { readFileSync } = require('fs-extra')
1
+ import { Flags } from '@oclif/core'
2
+ import BaseValidateCommand from '../../../support/command/base-validate-command.js'
3
+ import { pipeAsync } from '../../../utils/general.js'
4
+ import { getResponseContent } from '../../../support/command/handle-response.js'
5
+ import { postStandardization } from '../../../requests/standardization.js'
6
+ import { parseDefinition, getSpecification, getVersion } from '../../../utils/definitions.js'
7
+ import { readFileSync } from 'node:fs'
8
8
 
9
9
  class ValidateLocalCommand extends BaseValidateCommand {
10
10
  async run() {
@@ -57,4 +57,4 @@ ValidateLocalCommand.flags = {
57
57
  }),
58
58
  ...BaseValidateCommand.flags
59
59
  }
60
- module.exports = ValidateLocalCommand
60
+ export default ValidateLocalCommand
@@ -1,8 +1,8 @@
1
- const path = require('path')
2
- const BaseCommand = require('../support/command/base-command')
3
- const inquirer = require('inquirer')
4
- const { getPrompts } = require('../support/inquirer')
5
- const { setConfig, getConfig } = require('../config')
1
+ import path from 'path'
2
+ import BaseCommand from '../support/command/base-command.js'
3
+ import inquirer from 'inquirer'
4
+ import { getPrompts } from '../support/inquirer/index.js'
5
+ import { setConfig, getConfig } from '../config/index.js'
6
6
 
7
7
  class ConfigureCommand extends BaseCommand {
8
8
  async run() {
@@ -23,5 +23,5 @@ Customers with on-premise installations (version 2.x) need to point this to thei
23
23
  Enter the API Key - this can be retrieved from https://app.swaggerhub.com/settings/apiKey
24
24
  You can set these as environment variables: SWAGGERHUB_URL, SWAGGERHUB_API_KEY. These take priority over config settings.
25
25
  `
26
- module.exports = ConfigureCommand
26
+ export default ConfigureCommand
27
27
 
@@ -1,9 +1,10 @@
1
- const BaseCommand = require('../../support/command/base-command')
2
- const { Args, Flags } = require('@oclif/core')
3
- const { getDomainIdentifierArg, apiNameRegex } = require('../../support/command/parse-input')
4
- const { errorMsg } = require('../../template-strings')
5
- const { CLIError } = require('@oclif/core/lib/errors')
6
- const { postDomain } = require('../../requests/domain')
1
+ import BaseCommand from '../../support/command/base-command.js'
2
+ import { Args, Flags, Errors } from '@oclif/core'
3
+ import { getDomainIdentifierArg, apiNameRegex } 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
7
8
 
8
9
  const getNewVersion = args => {
9
10
  const newVersion = args['NEW_VERSION']
@@ -62,4 +63,4 @@ CloneDomainCommand.flags = {
62
63
  ...BaseCommand.flags
63
64
  }
64
65
 
65
- module.exports = CloneDomainCommand
66
+ export default CloneDomainCommand
@@ -1,10 +1,10 @@
1
- const { Flags, Args } = require('@oclif/core')
2
- const { readFileSync } = require('fs-extra')
3
- const { getDomain, postDomain } = require('../../requests/domain')
4
- const { getDomainIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
5
- const { getVersion, parseDefinition } = require('../../utils/definitions')
6
- const BaseCommand = require('../../support/command/base-command')
7
- const UpdateCommand = require('../../support/command/update-command')
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
- module.exports = CreateDomainCommand
138
+ export default CreateDomainCommand
@@ -1,8 +1,8 @@
1
- const { Flags, Args } = require('@oclif/core')
2
- const { deleteDomain } = require('../../requests/domain')
3
- const { getDomainIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
4
- const BaseCommand = require('../../support/command/base-command')
5
- const inquirer = require('inquirer')
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
- module.exports = DeleteDomainCommand
64
+ export default DeleteDomainCommand
@@ -1,9 +1,9 @@
1
- const { Flags, Args } = require('@oclif/core')
2
- const { getDomainIdentifierArg, reqType, resolvedParam, splitPathParams } = require('../../support/command/parse-input')
3
- const { hasJsonStructure, prettyPrintJSON } = require('../../utils/general')
4
- const { getDomain } = require('../../requests/domain')
5
- const { getResponseContent } = require('../../support/command/handle-response')
6
- const BaseCommand = require('../../support/command/base-command')
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
- module.exports = GetDomainCommand
69
+ export default GetDomainCommand
@@ -1,7 +1,7 @@
1
- const { Flags, Args } = require('@oclif/core')
2
- const { getDomainIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
3
- const BaseCommand = require('../../support/command/base-command')
4
- const UpdateCommand = require('../../support/command/update-command')
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
- module.exports = PublishCommand
39
+ export default PublishCommand
@@ -1,12 +1,13 @@
1
- const BaseCommand = require('../../support/command/base-command')
2
- const { Args, Flags } = require('@oclif/core')
3
- const {
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
- } = require('../../support/command/parse-input')
7
- const { errorMsg } = require('../../template-strings')
8
- const { CLIError } = require('@oclif/core/lib/errors')
9
- const { postDomain } = require('../../requests/domain')
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
- module.exports = RenameDomainCommand
78
+ export default RenameDomainCommand
@@ -1,7 +1,7 @@
1
- const { Args } = require('@oclif/core')
2
- const { getDomainIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
3
- const BaseCommand = require('../../support/command/base-command')
4
- const UpdateCommand = require('../../support/command/update-command')
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
- module.exports = SetDefaultDomainCommand
32
+ export default SetDefaultDomainCommand
@@ -1,7 +1,7 @@
1
- const { Args } = require('@oclif/core')
2
- const { getDomainIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
3
- const BaseCommand = require('../../support/command/base-command')
4
- const UpdateCommand = require('../../support/command/update-command')
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
- module.exports = UnpublishCommand
32
+ export default UnpublishCommand
@@ -1,10 +1,10 @@
1
- const { Flags, Args } = require('@oclif/core')
2
- const { readFileSync } = require('fs-extra')
3
- const { getDomain, postDomain } = require('../../requests/domain')
4
- const { getDomainIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
5
- const { getVersion, parseDefinition } = require('../../utils/definitions')
6
- const BaseCommand = require('../../support/command/base-command')
7
- const UpdateCommand = require('../../support/command/update-command')
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
- module.exports = UpdateDomainCommand
110
+ export default UpdateDomainCommand
@@ -1,7 +1,7 @@
1
- const { Flags, Args } = require('@oclif/core')
2
- const { postApi } = require('../../requests/api')
3
- const { getApiIdentifierArg, readConfigFile } = require('../../support/command/parse-input')
4
- const BaseCommand = require('../../support/command/base-command')
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
- module.exports = CreateIntegrationCommand
56
+ export default CreateIntegrationCommand
@@ -1,7 +1,7 @@
1
- const { Args } = require('@oclif/core')
2
- const { deleteApi } = require('../../requests/api')
3
- const { getIntegrationIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
4
- const BaseCommand = require('../../support/command/base-command')
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
- module.exports = DeleteIntegrationCommand
42
+ export default DeleteIntegrationCommand
@@ -1,7 +1,7 @@
1
- const { Args } = require('@oclif/core')
2
- const { postApi } = require('../../requests/api')
3
- const { getIntegrationIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
4
- const BaseCommand = require('../../support/command/base-command')
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
- module.exports = ExecuteIntegrationCommand
42
+ export default ExecuteIntegrationCommand
@@ -1,9 +1,9 @@
1
- const { Args } = require('@oclif/core')
2
- const { getApi } = require('../../requests/api')
3
- const { getIntegrationIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
4
- const { getResponseContent } = require('../../support/command/handle-response')
5
- const { prettyPrintJSON } = require('../../utils/general')
6
- const BaseCommand = require('../../support/command/base-command')
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
- module.exports = GetIntegrationCommand
53
+ export default GetIntegrationCommand
@@ -1,8 +1,8 @@
1
- const { ux, Args } = require('@oclif/core')
2
- const { getApi } = require('../../requests/api')
3
- const { getResponseContent } = require('../../support/command/handle-response')
4
- const { getApiIdentifierArg } = require('../../support/command/parse-input')
5
- const BaseCommand = require('../../support/command/base-command')
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
- module.exports = ListIntegrationCommand
63
+ export default ListIntegrationCommand
@@ -1,7 +1,7 @@
1
- const { Flags, Args } = require('@oclif/core')
2
- const { putApi } = require('../../requests/api')
3
- const { getIntegrationIdentifierArg, readConfigFile, splitPathParams } = require('../../support/command/parse-input')
4
- const BaseCommand = require('../../support/command/base-command')
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
- module.exports = UpdateIntegrationCommand
52
+ export default UpdateIntegrationCommand
@@ -1,9 +1,7 @@
1
- const { Args } = require('@oclif/core')
2
- const { putProject } = require('../../../requests/project')
3
- const {
4
- getProjectIdentifierArg
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
- module.exports = ProjectApiAddCommand
44
+ export default ProjectApiAddCommand
@@ -1,12 +1,9 @@
1
- const { Args } = require('@oclif/core')
2
- const { putProject, getProject } = require('../../../requests/project')
3
- const {
4
- getProjectIdentifierArg,
5
- splitPathParams,
6
- } = require('../../../support/command/parse-input')
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
- module.exports = ProjectApiRemoveCommand
65
+ export default ProjectApiRemoveCommand
@@ -1,11 +1,7 @@
1
- const { Flags, Args } = require('@oclif/core')
2
- const { postProject } = require('../../requests/project')
3
- const {
4
- getProjectIdentifierArg,
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
- module.exports = CreateProjectCommand
74
+ export default CreateProjectCommand
@@ -1,7 +1,7 @@
1
- const { Args } = require('@oclif/core')
2
- const { deleteProject } = require('../../requests/project')
3
- const { getProjectIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
4
- const BaseCommand = require('../../support/command/base-command')
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
- module.exports = DeleteProjectCommand
46
+ export default DeleteProjectCommand
@@ -1,9 +1,7 @@
1
- const { Args } = require('@oclif/core')
2
- const { putProject } = require('../../../requests/project')
3
- const {
4
- getProjectIdentifierArg
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
- module.exports = ProjectDomainAddCommand
44
+ export default ProjectDomainAddCommand
@@ -1,12 +1,9 @@
1
- const { Args } = require('@oclif/core')
2
- const { putProject, getProject } = require('../../../requests/project')
3
- const {
4
- getProjectIdentifierArg,
5
- splitPathParams,
6
- } = require('../../../support/command/parse-input')
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
- module.exports = ProjectDomainRemoveCommand
65
+ export default ProjectDomainRemoveCommand
@@ -1,9 +1,9 @@
1
- const { Args } = require('@oclif/core')
2
- const { getProject } = require('../../requests/project')
3
- const { getProjectIdentifierArg, splitPathParams } = require('../../support/command/parse-input')
4
- const { getResponseContent } = require('../../support/command/handle-response')
5
- const { prettyPrintJSON } = require('../../utils/general')
6
- const BaseCommand = require('../../support/command/base-command')
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
- module.exports = GetProjectCommand
53
+ export default GetProjectCommand
@@ -1,7 +1,7 @@
1
- const { ux, Args, Flags } = require('@oclif/core')
2
- const { getProject } = require('../../requests/project')
3
- const { getResponseContent } = require('../../support/command/handle-response')
4
- const BaseCommand = require('../../support/command/base-command')
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
- module.exports = ListProjectCommand
82
+ export default ListProjectCommand
@@ -1,8 +1,8 @@
1
- const { ux, Args } = require('@oclif/core')
2
- const { getProject } = require('../../../requests/project')
3
- const { getResponseContent } = require('../../../support/command/handle-response')
4
- const BaseCommand = require('../../../support/command/base-command')
5
- const { getProjectIdentifierArg } = require('../../../support/command/parse-input')
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
- module.exports = ListProjectMembersCommand
61
+ export default ListProjectMembersCommand