@oclif/core 3.26.6 → 4.0.0-beta.10

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 (124) hide show
  1. package/lib/args.d.ts +4 -4
  2. package/lib/cache.d.ts +3 -3
  3. package/lib/cache.js +1 -1
  4. package/lib/command.d.ts +18 -18
  5. package/lib/command.js +12 -21
  6. package/lib/config/config.d.ts +14 -40
  7. package/lib/config/config.js +120 -153
  8. package/lib/config/plugin-loader.d.ts +6 -6
  9. package/lib/config/plugin-loader.js +4 -28
  10. package/lib/config/plugin.d.ts +3 -3
  11. package/lib/config/plugin.js +7 -11
  12. package/lib/config/ts-path.d.ts +1 -1
  13. package/lib/config/ts-path.js +1 -2
  14. package/lib/config/util.d.ts +1 -1
  15. package/lib/config/util.js +5 -21
  16. package/lib/errors/error.js +5 -8
  17. package/lib/errors/errors/cli.d.ts +5 -5
  18. package/lib/errors/errors/cli.js +5 -5
  19. package/lib/errors/errors/pretty-print.d.ts +2 -2
  20. package/lib/errors/errors/pretty-print.js +2 -2
  21. package/lib/errors/exit.d.ts +1 -0
  22. package/lib/errors/exit.js +8 -0
  23. package/lib/errors/handle.js +4 -11
  24. package/lib/errors/index.d.ts +1 -3
  25. package/lib/errors/index.js +5 -12
  26. package/lib/errors/warn.d.ts +5 -0
  27. package/lib/errors/warn.js +10 -5
  28. package/lib/execute.js +1 -1
  29. package/lib/flags.d.ts +4 -4
  30. package/lib/{cli-ux/flush.js → flush.js} +2 -2
  31. package/lib/help/command.js +6 -5
  32. package/lib/help/formatter.d.ts +3 -3
  33. package/lib/help/formatter.js +8 -9
  34. package/lib/help/index.d.ts +1 -0
  35. package/lib/help/index.js +23 -17
  36. package/lib/help/root.js +3 -3
  37. package/lib/index.d.ts +6 -7
  38. package/lib/index.js +8 -12
  39. package/lib/interfaces/config.d.ts +9 -20
  40. package/lib/interfaces/errors.d.ts +5 -5
  41. package/lib/interfaces/flags.d.ts +2 -2
  42. package/lib/interfaces/index.d.ts +2 -1
  43. package/lib/interfaces/logger.d.ts +9 -0
  44. package/lib/interfaces/parser.d.ts +6 -6
  45. package/lib/interfaces/pjson.d.ts +217 -151
  46. package/lib/interfaces/plugin.d.ts +26 -24
  47. package/lib/interfaces/theme.d.ts +30 -19
  48. package/lib/interfaces/theme.js +2 -19
  49. package/lib/interfaces/topic.d.ts +2 -2
  50. package/lib/logger.d.ts +14 -0
  51. package/lib/logger.js +90 -0
  52. package/lib/main.js +5 -3
  53. package/lib/parser/errors.d.ts +1 -1
  54. package/lib/parser/errors.js +5 -5
  55. package/lib/parser/help.js +2 -2
  56. package/lib/parser/parse.js +2 -1
  57. package/lib/performance.js +3 -2
  58. package/lib/settings.d.ts +5 -11
  59. package/lib/util/determine-priority.d.ts +21 -0
  60. package/lib/util/determine-priority.js +55 -0
  61. package/lib/util/find-root.d.ts +1 -0
  62. package/lib/util/find-root.js +19 -19
  63. package/lib/util/fs.js +12 -0
  64. package/lib/util/ids.d.ts +1 -1
  65. package/lib/util/read-pjson.d.ts +7 -0
  66. package/lib/util/read-pjson.js +60 -0
  67. package/lib/util/read-tsconfig.js +3 -8
  68. package/lib/{cli-ux → ux}/action/base.d.ts +5 -7
  69. package/lib/{cli-ux → ux}/action/base.js +0 -3
  70. package/lib/{cli-ux → ux}/action/spinner.d.ts +5 -4
  71. package/lib/{cli-ux → ux}/action/spinner.js +16 -39
  72. package/lib/ux/action/types.d.ts +5 -0
  73. package/lib/ux/action/types.js +2 -0
  74. package/lib/ux/colorize-json.d.ts +28 -0
  75. package/lib/ux/colorize-json.js +67 -0
  76. package/lib/ux/index.d.ts +69 -0
  77. package/lib/ux/index.js +88 -0
  78. package/lib/{cli-ux → ux}/list.d.ts +1 -1
  79. package/lib/{cli-ux → ux}/list.js +1 -2
  80. package/lib/ux/theme.d.ts +9 -0
  81. package/lib/ux/theme.js +43 -0
  82. package/lib/ux/write.d.ts +2 -0
  83. package/lib/ux/write.js +22 -0
  84. package/package.json +37 -42
  85. package/flush.d.ts +0 -3
  86. package/flush.js +0 -1
  87. package/handle.js +0 -1
  88. package/lib/cli-ux/action/spinners.d.ts +0 -251
  89. package/lib/cli-ux/action/spinners.js +0 -374
  90. package/lib/cli-ux/action/types.d.ts +0 -5
  91. package/lib/cli-ux/config.d.ts +0 -25
  92. package/lib/cli-ux/config.js +0 -52
  93. package/lib/cli-ux/exit.d.ts +0 -8
  94. package/lib/cli-ux/exit.js +0 -16
  95. package/lib/cli-ux/index.d.ts +0 -133
  96. package/lib/cli-ux/index.js +0 -183
  97. package/lib/cli-ux/prompt.d.ts +0 -32
  98. package/lib/cli-ux/prompt.js +0 -185
  99. package/lib/cli-ux/stream.d.ts +0 -23
  100. package/lib/cli-ux/stream.js +0 -43
  101. package/lib/cli-ux/styled/index.d.ts +0 -4
  102. package/lib/cli-ux/styled/index.js +0 -36
  103. package/lib/cli-ux/styled/object.d.ts +0 -1
  104. package/lib/cli-ux/styled/object.js +0 -39
  105. package/lib/cli-ux/styled/progress.d.ts +0 -2
  106. package/lib/cli-ux/styled/progress.js +0 -8
  107. package/lib/cli-ux/styled/table.d.ts +0 -45
  108. package/lib/cli-ux/styled/table.js +0 -345
  109. package/lib/cli-ux/styled/tree.d.ts +0 -9
  110. package/lib/cli-ux/styled/tree.js +0 -37
  111. package/lib/cli-ux/theme.d.ts +0 -11
  112. package/lib/cli-ux/theme.js +0 -61
  113. package/lib/cli-ux/wait.d.ts +0 -2
  114. package/lib/cli-ux/wait.js +0 -5
  115. package/lib/cli-ux/write.d.ts +0 -8
  116. package/lib/cli-ux/write.js +0 -15
  117. package/lib/errors/config.d.ts +0 -6
  118. package/lib/errors/config.js +0 -38
  119. package/lib/errors/logger.d.ts +0 -8
  120. package/lib/errors/logger.js +0 -45
  121. /package/lib/{cli-ux/flush.d.ts → flush.d.ts} +0 -0
  122. /package/lib/{cli-ux/action/types.js → interfaces/logger.js} +0 -0
  123. /package/lib/{cli-ux → ux}/action/simple.d.ts +0 -0
  124. /package/lib/{cli-ux → ux}/action/simple.js +0 -0
package/package.json CHANGED
@@ -1,83 +1,64 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "3.26.6",
4
+ "version": "4.0.0-beta.10",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
8
- "@types/cli-progress": "^3.11.5",
9
8
  "ansi-escapes": "^4.3.2",
10
- "ansi-styles": "^4.3.0",
11
- "cardinal": "^2.1.1",
12
- "chalk": "^4.1.2",
9
+ "ansis": "^3.0.1",
13
10
  "clean-stack": "^3.0.1",
14
- "cli-progress": "^3.12.0",
15
- "color": "^4.2.3",
11
+ "cli-spinners": "^2.9.2",
12
+ "cosmiconfig": "^9.0.0",
16
13
  "debug": "^4.3.4",
17
14
  "ejs": "^3.1.10",
18
15
  "get-package-type": "^0.1.0",
19
16
  "globby": "^11.1.0",
20
- "hyperlinker": "^1.0.0",
21
17
  "indent-string": "^4.0.0",
22
18
  "is-wsl": "^2.2.0",
23
- "js-yaml": "^3.14.1",
24
19
  "minimatch": "^9.0.4",
25
- "natural-orderby": "^2.0.3",
26
- "object-treeify": "^1.1.33",
27
- "password-prompt": "^1.1.3",
28
- "slice-ansi": "^4.0.0",
29
20
  "string-width": "^4.2.3",
30
- "strip-ansi": "^6.0.1",
31
- "supports-color": "^8.1.1",
32
- "supports-hyperlinks": "^2.2.0",
21
+ "supports-color": "^9.4.0",
33
22
  "widest-line": "^3.1.0",
34
23
  "wordwrap": "^1.0.0",
35
24
  "wrap-ansi": "^7.0.0"
36
25
  },
37
26
  "devDependencies": {
38
- "@commitlint/config-conventional": "^17.8.1",
27
+ "@commitlint/config-conventional": "^19",
39
28
  "@oclif/plugin-help": "^6",
40
- "@oclif/plugin-plugins": "^4",
29
+ "@oclif/plugin-plugins": "^5",
41
30
  "@oclif/prettier-config": "^0.2.1",
42
- "@oclif/test": "^3.2.12",
43
- "@types/ansi-styles": "^3.2.1",
31
+ "@oclif/test": "^4",
44
32
  "@types/benchmark": "^2.1.5",
45
33
  "@types/chai": "^4.3.11",
46
34
  "@types/chai-as-promised": "^7.1.8",
47
35
  "@types/clean-stack": "^2.1.1",
48
- "@types/color": "^3.0.6",
49
36
  "@types/debug": "^4.1.10",
50
37
  "@types/ejs": "^3.1.5",
51
38
  "@types/indent-string": "^4.0.1",
52
- "@types/js-yaml": "^3.12.7",
53
39
  "@types/mocha": "^10.0.6",
54
40
  "@types/node": "^18",
55
- "@types/node-notifier": "^8.0.5",
56
41
  "@types/pnpapi": "^0.0.5",
57
- "@types/slice-ansi": "^4.0.0",
58
- "@types/strip-ansi": "^5.2.1",
59
- "@types/supports-color": "^8.1.1",
42
+ "@types/sinon": "^17.0.3",
60
43
  "@types/wordwrap": "^1.0.3",
61
44
  "@types/wrap-ansi": "^3.0.0",
62
45
  "benchmark": "^2.1.4",
63
46
  "chai": "^4.4.1",
64
47
  "chai-as-promised": "^7.1.1",
65
- "commitlint": "^17.8.1",
48
+ "commitlint": "^19",
66
49
  "cross-env": "^7.0.3",
67
50
  "eslint": "^8.57.0",
68
51
  "eslint-config-oclif": "^5.2.0",
69
52
  "eslint-config-oclif-typescript": "^3.1.7",
70
53
  "eslint-config-prettier": "^9.1.0",
71
- "fancy-test": "^3.0.14",
72
- "globby": "^11.1.0",
73
- "husky": "^8",
74
- "lint-staged": "^14.0.1",
54
+ "husky": "^9",
55
+ "lint-staged": "^15",
75
56
  "madge": "^6.1.0",
76
57
  "mocha": "^10.4.0",
77
58
  "nyc": "^15.1.0",
78
59
  "prettier": "^3.2.5",
79
60
  "shx": "^0.3.4",
80
- "sinon": "^16.1.3",
61
+ "sinon": "^18",
81
62
  "ts-node": "^10.9.2",
82
63
  "tsd": "^0.31.0",
83
64
  "typescript": "^5"
@@ -86,10 +67,7 @@
86
67
  "node": ">=18.0.0"
87
68
  },
88
69
  "files": [
89
- "/lib",
90
- "/flush.js",
91
- "/flush.d.ts",
92
- "/handle.js"
70
+ "/lib"
93
71
  ],
94
72
  "homepage": "https://github.com/oclif/core",
95
73
  "keywords": [
@@ -102,7 +80,26 @@
102
80
  "argv"
103
81
  ],
104
82
  "license": "MIT",
105
- "main": "./lib/index.js",
83
+ "exports": {
84
+ ".": "./lib/index.js",
85
+ "./args": "./lib/args.js",
86
+ "./command": "./lib/command.js",
87
+ "./config": "./lib/config/index.js",
88
+ "./errors": "./lib/errors/index.js",
89
+ "./execute": "./lib/execute.js",
90
+ "./flags": "./lib/flags.js",
91
+ "./flush": "./lib/flush.js",
92
+ "./handle": "./lib/errors/handle.js",
93
+ "./help": "./lib/help/index.js",
94
+ "./hooks": "./lib/interfaces/hooks.js",
95
+ "./interfaces": "./lib/interfaces/index.js",
96
+ "./logger": "./lib/logger.js",
97
+ "./performance": "./lib/performance.js",
98
+ "./run": "./lib/main.js",
99
+ "./settings": "./lib/settings.js",
100
+ "./util/ids": "./lib/util/ids.js",
101
+ "./ux": "./lib/ux/index.js"
102
+ },
106
103
  "repository": "oclif/core",
107
104
  "oclif": {
108
105
  "bin": "oclif",
@@ -116,20 +113,18 @@
116
113
  },
117
114
  "scripts": {
118
115
  "build": "shx rm -rf lib && tsc",
119
- "commitlint": "commitlint",
120
116
  "compile": "tsc",
121
117
  "format": "prettier --write \"+(src|test)/**/*.+(ts|js|json)\"",
122
118
  "lint": "eslint . --ext .ts",
123
119
  "posttest": "yarn lint && yarn test:circular-deps",
124
120
  "prepack": "yarn run build",
125
- "prepare": "husky install",
126
- "pretest": "yarn build && tsc -p test --noEmit --skipLibCheck",
127
- "test:circular-deps": "madge lib/ -c",
121
+ "prepare": "husky",
122
+ "test:circular-deps": "yarn build && madge lib/ -c",
128
123
  "test:debug": "nyc mocha --debug-brk --inspect \"test/**/*.test.ts\"",
129
124
  "test:integration": "mocha --forbid-only \"test/**/*.integration.ts\" --parallel --timeout 1200000",
130
125
  "test:interoperability": "cross-env DEBUG=integration:* ts-node test/integration/interop.ts",
131
126
  "test:perf": "ts-node test/perf/parser.perf.ts",
132
- "test": "nyc mocha --forbid-only \"test/**/*.test.ts\""
127
+ "test": "nyc mocha --forbid-only \"test/**/*.test.ts\" --parallel"
133
128
  },
134
129
  "types": "lib/index.d.ts"
135
130
  }
package/flush.d.ts DELETED
@@ -1,3 +0,0 @@
1
- declare const flush: () => Promise<void>
2
-
3
- export = flush
package/flush.js DELETED
@@ -1 +0,0 @@
1
- module.exports = require('./lib/cli-ux/flush').flush
package/handle.js DELETED
@@ -1 +0,0 @@
1
- module.exports = async error => require('./lib/errors/handle').handle(error)
@@ -1,251 +0,0 @@
1
- declare const _default: {
2
- arc: {
3
- frames: string[];
4
- interval: number;
5
- };
6
- arrow: {
7
- frames: string[];
8
- interval: number;
9
- };
10
- arrow2: {
11
- frames: string[];
12
- interval: number;
13
- };
14
- arrow3: {
15
- frames: string[];
16
- interval: number;
17
- };
18
- balloon: {
19
- frames: string[];
20
- interval: number;
21
- };
22
- balloon2: {
23
- frames: string[];
24
- interval: number;
25
- };
26
- bounce: {
27
- frames: string[];
28
- interval: number;
29
- };
30
- bouncingBall: {
31
- frames: string[];
32
- interval: number;
33
- };
34
- bouncingBar: {
35
- frames: string[];
36
- interval: number;
37
- };
38
- boxBounce: {
39
- frames: string[];
40
- interval: number;
41
- };
42
- boxBounce2: {
43
- frames: string[];
44
- interval: number;
45
- };
46
- circle: {
47
- frames: string[];
48
- interval: number;
49
- };
50
- circleHalves: {
51
- frames: string[];
52
- interval: number;
53
- };
54
- circleQuarters: {
55
- frames: string[];
56
- interval: number;
57
- };
58
- clock: {
59
- frames: string[];
60
- interval: number;
61
- };
62
- dots: {
63
- frames: string[];
64
- interval: number;
65
- };
66
- dots2: {
67
- frames: string[];
68
- interval: number;
69
- };
70
- dots3: {
71
- frames: string[];
72
- interval: number;
73
- };
74
- dots4: {
75
- frames: string[];
76
- interval: number;
77
- };
78
- dots5: {
79
- frames: string[];
80
- interval: number;
81
- };
82
- dots6: {
83
- frames: string[];
84
- interval: number;
85
- };
86
- dots7: {
87
- frames: string[];
88
- interval: number;
89
- };
90
- dots8: {
91
- frames: string[];
92
- interval: number;
93
- };
94
- dots9: {
95
- frames: string[];
96
- interval: number;
97
- };
98
- dots10: {
99
- frames: string[];
100
- interval: number;
101
- };
102
- dots11: {
103
- frames: string[];
104
- interval: number;
105
- };
106
- earth: {
107
- frames: string[];
108
- interval: number;
109
- };
110
- flip: {
111
- frames: string[];
112
- interval: number;
113
- };
114
- growHorizontal: {
115
- frames: string[];
116
- interval: number;
117
- };
118
- growVertical: {
119
- frames: string[];
120
- interval: number;
121
- };
122
- hamburger: {
123
- frames: string[];
124
- interval: number;
125
- };
126
- hearts: {
127
- frames: string[];
128
- interval: number;
129
- };
130
- hexagon: {
131
- frames: string[];
132
- interval: number;
133
- };
134
- line: {
135
- frames: string[];
136
- interval: number;
137
- };
138
- line2: {
139
- frames: string[];
140
- interval: number;
141
- };
142
- monkey: {
143
- frames: string[];
144
- interval: number;
145
- };
146
- moon: {
147
- frames: string[];
148
- interval: number;
149
- };
150
- noise: {
151
- frames: string[];
152
- interval: number;
153
- };
154
- pipe: {
155
- frames: string[];
156
- interval: number;
157
- };
158
- pong: {
159
- frames: string[];
160
- interval: number;
161
- };
162
- runner: {
163
- frames: string[];
164
- interval: number;
165
- };
166
- simpleDots: {
167
- frames: string[];
168
- interval: number;
169
- };
170
- simpleDotsScrolling: {
171
- frames: string[];
172
- interval: number;
173
- };
174
- smiley: {
175
- frames: string[];
176
- interval: number;
177
- };
178
- squareCorners: {
179
- frames: string[];
180
- interval: number;
181
- };
182
- squish: {
183
- frames: string[];
184
- interval: number;
185
- };
186
- star: {
187
- frames: string[];
188
- interval: number;
189
- };
190
- star2: {
191
- frames: string[];
192
- interval: number;
193
- };
194
- toggle: {
195
- frames: string[];
196
- interval: number;
197
- };
198
- toggle2: {
199
- frames: string[];
200
- interval: number;
201
- };
202
- toggle3: {
203
- frames: string[];
204
- interval: number;
205
- };
206
- toggle4: {
207
- frames: string[];
208
- interval: number;
209
- };
210
- toggle5: {
211
- frames: string[];
212
- interval: number;
213
- };
214
- toggle6: {
215
- frames: string[];
216
- interval: number;
217
- };
218
- toggle7: {
219
- frames: string[];
220
- interval: number;
221
- };
222
- toggle8: {
223
- frames: string[];
224
- interval: number;
225
- };
226
- toggle9: {
227
- frames: string[];
228
- interval: number;
229
- };
230
- toggle10: {
231
- frames: string[];
232
- interval: number;
233
- };
234
- toggle11: {
235
- frames: string[];
236
- interval: number;
237
- };
238
- toggle12: {
239
- frames: string[];
240
- interval: number;
241
- };
242
- toggle13: {
243
- frames: string[];
244
- interval: number;
245
- };
246
- triangle: {
247
- frames: string[];
248
- interval: number;
249
- };
250
- };
251
- export default _default;