@apimatic/cli 1.1.0-alpha.4 → 1.1.0-alpha.6

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 (61) hide show
  1. package/README.md +115 -37
  2. package/bin/run +5 -1
  3. package/lib/client-utils/auth-manager.js +3 -3
  4. package/lib/client-utils/sdk-client.js +1 -0
  5. package/lib/commands/api/transform.d.ts +7 -7
  6. package/lib/commands/api/transform.js +18 -15
  7. package/lib/commands/api/validate.d.ts +4 -4
  8. package/lib/commands/api/validate.js +13 -10
  9. package/lib/commands/auth/login.d.ts +2 -2
  10. package/lib/commands/auth/login.js +29 -12
  11. package/lib/commands/auth/logout.d.ts +1 -1
  12. package/lib/commands/auth/logout.js +3 -2
  13. package/lib/commands/auth/status.d.ts +1 -1
  14. package/lib/commands/auth/status.js +3 -2
  15. package/lib/commands/portal/generate.d.ts +6 -6
  16. package/lib/commands/portal/generate.js +16 -11
  17. package/lib/commands/portal/quickstart.d.ts +10 -0
  18. package/lib/commands/portal/quickstart.js +83 -0
  19. package/lib/commands/portal/serve.d.ts +17 -0
  20. package/lib/commands/portal/serve.js +143 -0
  21. package/lib/commands/sdk/generate.d.ts +8 -8
  22. package/lib/commands/sdk/generate.js +16 -13
  23. package/lib/config/axios-config.d.ts +2 -0
  24. package/lib/config/axios-config.js +12 -0
  25. package/lib/config/env.d.ts +26 -0
  26. package/lib/config/env.js +28 -1
  27. package/lib/controllers/api/transform.js +6 -5
  28. package/lib/controllers/api/validate.d.ts +1 -1
  29. package/lib/controllers/api/validate.js +25 -8
  30. package/lib/controllers/portal/generate.d.ts +2 -1
  31. package/lib/controllers/portal/generate.js +19 -11
  32. package/lib/controllers/portal/quickstart.d.ts +14 -0
  33. package/lib/controllers/portal/quickstart.js +206 -0
  34. package/lib/controllers/portal/serve.d.ts +4 -0
  35. package/lib/controllers/portal/serve.js +152 -0
  36. package/lib/controllers/sdk/generate.js +7 -6
  37. package/lib/index.d.ts +1 -1
  38. package/lib/index.js +3 -3
  39. package/lib/prompts/portal/quickstart.d.ts +32 -0
  40. package/lib/prompts/portal/quickstart.js +216 -0
  41. package/lib/prompts/portal/serve.d.ts +7 -0
  42. package/lib/prompts/portal/serve.js +25 -0
  43. package/lib/services/portal/server.d.ts +11 -0
  44. package/lib/services/portal/server.js +71 -0
  45. package/lib/types/api/transform.d.ts +0 -1
  46. package/lib/types/api/transform.js +1 -0
  47. package/lib/types/api/validate.js +1 -0
  48. package/lib/types/portal/generate.js +1 -0
  49. package/lib/types/portal/quickstart.d.ts +17 -0
  50. package/lib/types/portal/quickstart.js +3 -0
  51. package/lib/types/sdk/generate.js +1 -0
  52. package/lib/types/utils.js +1 -0
  53. package/lib/utils/utils.d.ts +28 -4
  54. package/lib/utils/utils.js +289 -53
  55. package/lib/validators/common/directoryValidator.d.ts +9 -0
  56. package/lib/validators/common/directoryValidator.js +53 -0
  57. package/lib/validators/common/portValidator.d.ts +5 -0
  58. package/lib/validators/common/portValidator.js +20 -0
  59. package/lib/validators/portal/serveValidator.d.ts +6 -0
  60. package/lib/validators/portal/serveValidator.js +21 -0
  61. package/package.json +60 -24
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apimatic/cli",
3
3
  "description": "The official CLI for APIMatic.",
4
- "version": "1.1.0-alpha.4",
4
+ "version": "1.1.0-alpha.6",
5
5
  "author": "APIMatic",
6
6
  "bin": {
7
7
  "apimatic": "./bin/run"
@@ -11,7 +11,7 @@
11
11
  "access": "public"
12
12
  },
13
13
  "engines": {
14
- "node": ">=12.0.0"
14
+ "node": ">=20.0.0"
15
15
  },
16
16
  "files": [
17
17
  "/bin",
@@ -44,62 +44,98 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@apimatic/sdk": "^0.1.0-alpha.2",
47
- "@oclif/command": "^1.8.0",
48
- "@oclif/config": "^1.17.0",
49
- "@oclif/plugin-autocomplete": "^0.3.0",
50
- "@oclif/plugin-help": "^3.2.3",
51
- "@oclif/plugin-not-found": "^1.2.4",
52
- "archiver": "^5.3.0",
53
- "axios": "^0.24.0",
47
+ "@clack/prompts": "^0.10.0",
48
+ "@oclif/core": "^4.2.8",
49
+ "@oclif/plugin-autocomplete": "^3.2.24",
50
+ "@oclif/plugin-help": "^6.2.26",
51
+ "@oclif/plugin-not-found": "^3.2.44",
52
+ "adm-zip": "^0.5.14",
53
+ "archiver": "^7.0.1",
54
+ "axios": "^1.8.1",
54
55
  "base-64": "^1.0.0",
55
- "form-data": "^4.0.0",
56
- "fs-extra": "^10.0.0",
56
+ "chokidar": "^3.6.0",
57
+ "connect-livereload": "^0.6.1",
58
+ "express": "^4.17.1",
59
+ "file-type": "^15.0.0",
60
+ "form-data": "^4.0.2",
61
+ "fs-extra": "^11.3.0",
62
+ "livereload": "^0.9.3",
63
+ "open": "^8.4.0",
64
+ "simple-git": "^3.27.0",
57
65
  "striptags": "^3.2.0",
58
- "tslib": "^1.14.1",
59
- "unzipper": "^0.10.11"
66
+ "treeify": "^1.1.0",
67
+ "tslib": "^2.5.0",
68
+ "unzipper": "^0.12.3"
60
69
  },
61
70
  "devDependencies": {
62
71
  "@commitlint/cli": "^15.0.0",
63
72
  "@commitlint/config-conventional": "^15.0.0",
64
- "@oclif/dev-cli": "^1.26.0",
65
- "@oclif/test": "^1.2.8",
73
+ "@oclif/test": "^4.1.11",
66
74
  "@semantic-release/changelog": "^6.0.3",
67
75
  "@semantic-release/git": "^10.0.1",
76
+ "@types/adm-zip": "^0.5.5",
68
77
  "@types/archiver": "^5.1.1",
69
- "@types/axios": "^0.14.0",
70
78
  "@types/base-64": "^1.0.0",
71
79
  "@types/chai": "^4.2.22",
80
+ "@types/connect-livereload": "^0.5.1",
81
+ "@types/express": "^4.17.13",
72
82
  "@types/fs-extra": "^9.0.13",
83
+ "@types/livereload": "^0.9.2",
73
84
  "@types/mocha": "^5.2.7",
74
85
  "@types/node": "^10.17.60",
86
+ "@types/treeify": "^1.0.3",
75
87
  "@types/unzipper": "^0.10.4",
76
- "@typescript-eslint/eslint-plugin": "^5.0.0",
77
- "@typescript-eslint/parser": "^5.0.0",
88
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
89
+ "@typescript-eslint/parser": "^8.0.0",
78
90
  "chai": "^4.3.4",
79
- "eslint": "^7.32.0",
91
+ "eslint": "^9.21.0",
80
92
  "eslint-config-prettier": "^8.3.0",
81
93
  "eslint-plugin-import": "^2.25.2",
82
- "globby": "^10.0.2",
83
94
  "husky": "^7.0.4",
84
95
  "lint-staged": "^11.2.6",
85
- "mocha": "^5.2.0",
86
- "nyc": "^14.1.1",
96
+ "mocha": "^11.1.0",
97
+ "nyc": "^17.1.0",
98
+ "oclif": "^4.17.34",
87
99
  "prettier": "^2.4.1",
88
- "rimraf": "^3.0.2",
100
+ "rimraf": "^6.0.1",
89
101
  "ts-node": "^8.10.2",
90
102
  "typescript": "^5.2.2"
91
103
  },
92
104
  "oclif": {
93
105
  "commands": "./lib/commands",
94
106
  "bin": "apimatic",
107
+ "description": "The official CLI for APIMatic. \nTo get started with APIMatic's CLI using a step by step wizard, run 'apimatic portal:quickstart'.",
95
108
  "plugins": [
96
109
  "@oclif/plugin-autocomplete",
97
110
  "@oclif/plugin-help",
98
111
  "@oclif/plugin-not-found"
99
- ]
112
+ ],
113
+ "topics": {
114
+ "api": {
115
+ "description": "Transform & Validate your API specifications."
116
+ },
117
+ "auth": {
118
+ "description": "Login using your APIMatic credentials, or view your authentication status."
119
+ },
120
+ "portal": {
121
+ "description": "Generate, download and serve an API Documentation portal for your APIs."
122
+ },
123
+ "sdk": {
124
+ "description": "Generate SDKs for your APIs in multiple languages."
125
+ }
126
+ },
127
+ "state": "Alpha"
100
128
  },
101
129
  "lint-staged": {
102
130
  "*.js": "eslint --cache --fix",
103
131
  "*.{js,ts}": "prettier --write"
132
+ },
133
+ "overrides": {
134
+ "inflight": "npm:lru-cache@^7.14.1",
135
+ "lodash.get": "npm:lodash@^4.17.21",
136
+ "@humanwhocodes/config-array": "npm:@eslint/config-array@latest",
137
+ "rimraf": "^6.0.1",
138
+ "glob": "^10.4.5",
139
+ "q": "npm:promise@^8.3.0"
104
140
  }
105
141
  }